diff --git a/dist/bilibili-evolved.preview.user.js b/dist/bilibili-evolved.preview.user.js index 3de637c91..6b67e3733 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 Mn}});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 Me},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 Le}});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 Mt},VideoInfo:function(){return Ot}});var g={};n.r(g),n.d(g,{allQualities:function(){return zt},loginRequiredQualities:function(){return Lt},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 Kt}});var x={};n.r(x),n.d(x,{addMenuItem:function(){return on},commentAreas:function(){return Xt},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),M=n(9017);function L(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,L(this,"orientation",B.horizontal),L(this,"enabled",!1),L(this,"children",void 0),L(this,"snapshots",new Map),L(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 K=n(4742),X=n(1290),J=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,K.raiseEvent)(a,"mouseover"),await(0,K.delay)(i),(0,K.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,K.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=K.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,M.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,M.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,M.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,M.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,M.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,K.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 Me=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Le=e=>(...t)=>e(...t).then((e=>Me(e))),Pe=Le((async(e="video")=>{if(!(0,K.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,K.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,J.formatCount)(e.desc.like),duration:t.duration,durationText:(0,J.formatDuration)(t.duration,0),playCount:(0,J.formatCount)(t.stat.view),danmakuCount:(0,J.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,J.formatCount)(e.desc.like),durationText:"",playCount:(0,J.formatCount)(t.play_count),danmakuCount:(0,J.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,K.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,K.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,K.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,K.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Ke=n(1267),Xe=n.n(Ke),Je={insert:"head",singleton:!1},Ye=(je()(Xe(),Je),Xe().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,K.getCookieValue)(`bp_t_offset_${(0,K.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,K.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,K.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,K.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:K.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,M.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,M.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 Mt{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 Lt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"8K",displayName:"超高清 8K",value:127},{name:"DolbyVision",displayName:"杜比视界",value:126},{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,...Lt,{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,M.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,M.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,K.matchUrlPattern)(e)))&&(0,M.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,K.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,M.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,K.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,M.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 Kt 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,K.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 Xt=[],Jt="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,M.childList)(t,(t=>{i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Jt)){const t={element:e,items:[]};Xt.push(t),(e=>{e.observer||(e.items=(0,K.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,M.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,M.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,K.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Xt.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:M,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...K,constants:X,formatters:J,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Mn={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:M,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...K,...X,...J,...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=>Boolean(e?.entry))(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>Boolean(e?.setup))(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>Boolean(e?.style))(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.7","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:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f",branch:"preview",nearestTag:"v2.0.7",versionWithTag:"v2.0.7-18-g10382e9b8"},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,M.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,K.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 Me=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Le=e=>(...t)=>e(...t).then((e=>Me(e))),Pe=Le((async(e="video")=>{if(!(0,K.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,K.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,J.formatCount)(e.desc.like),duration:t.duration,durationText:(0,J.formatDuration)(t.duration,0),playCount:(0,J.formatCount)(t.stat.view),danmakuCount:(0,J.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,J.formatCount)(e.desc.like),durationText:"",playCount:(0,J.formatCount)(t.play_count),danmakuCount:(0,J.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,K.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,K.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,K.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,K.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Ke=n(1267),Xe=n.n(Ke),Je={insert:"head",singleton:!1},Ye=(je()(Xe(),Je),Xe().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,K.getCookieValue)(`bp_t_offset_${(0,K.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,K.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,K.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,K.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:K.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,M.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,M.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 Mt{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 Lt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"8K",displayName:"超高清 8K",value:127},{name:"DolbyVision",displayName:"杜比视界",value:126},{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,...Lt,{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,M.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,M.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,K.matchUrlPattern)(e)))&&(0,M.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,K.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,M.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,K.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,M.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 Kt 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,K.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 Xt=[],Jt="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,M.childList)(t,(t=>{i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Jt)){const t={element:e,items:[]};Xt.push(t),(e=>{e.observer||(e.items=(0,K.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,M.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,M.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,K.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Xt.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:M,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...K,constants:X,formatters:J,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Mn={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:M,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...K,...X,...J,...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=>Boolean(e?.entry))(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>Boolean(e?.setup))(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>Boolean(e?.style))(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.7","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:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f",branch:"preview",nearestTag:"v2.0.7",versionWithTag:"v2.0.7-23-g2acf9c591"},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",M=$.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+I])}),[]),L=[].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 265e98a7e..35d68da6c 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 Mn}});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 Me},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 Le}});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 Mt},VideoInfo:function(){return Ot}});var g={};n.r(g),n.d(g,{allQualities:function(){return zt},loginRequiredQualities:function(){return Lt},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 Kt}});var x={};n.r(x),n.d(x,{addMenuItem:function(){return on},commentAreas:function(){return Xt},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),M=n(3420);function L(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,L(this,"orientation",B.horizontal),L(this,"enabled",!1),L(this,"children",void 0),L(this,"snapshots",new Map),L(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 K=n(1906),X=n(2121),J=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,K.raiseEvent)(a,"mouseover"),await(0,K.delay)(i),(0,K.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,K.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=K.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,M.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,M.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,M.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,M.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,M.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,K.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 Me=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Le=e=>(...t)=>e(...t).then((e=>Me(e))),Pe=Le((async(e="video")=>{if(!(0,K.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,K.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,J.formatCount)(e.desc.like),duration:t.duration,durationText:(0,J.formatDuration)(t.duration,0),playCount:(0,J.formatCount)(t.stat.view),danmakuCount:(0,J.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,J.formatCount)(e.desc.like),durationText:"",playCount:(0,J.formatCount)(t.play_count),danmakuCount:(0,J.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,K.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,K.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,K.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,K.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Ke=n(1745),Xe=n.n(Ke),Je={insert:"head",singleton:!1},Ye=(je()(Xe(),Je),Xe().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,K.getCookieValue)(`bp_t_offset_${(0,K.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,K.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,K.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,K.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:K.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,M.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,M.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 Mt{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 Lt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"8K",displayName:"超高清 8K",value:127},{name:"DolbyVision",displayName:"杜比视界",value:126},{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,...Lt,{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,M.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,M.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,K.matchUrlPattern)(e)))&&(0,M.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,K.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,M.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,K.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,M.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 Kt 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,K.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 Xt=[],Jt="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,M.childList)(t,(t=>{i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Jt)){const t={element:e,items:[]};Xt.push(t),(e=>{e.observer||(e.items=(0,K.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,M.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,M.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,K.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Xt.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:M,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...K,constants:X,formatters:J,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Mn={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:M,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...K,...X,...J,...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=>Boolean(e?.entry))(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>Boolean(e?.setup))(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>Boolean(e?.style))(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.7","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:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f",branch:"preview",nearestTag:"v2.0.7",versionWithTag:"v2.0.7-18-g10382e9b8"},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,M.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,K.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 Me=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Le=e=>(...t)=>e(...t).then((e=>Me(e))),Pe=Le((async(e="video")=>{if(!(0,K.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,K.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,J.formatCount)(e.desc.like),duration:t.duration,durationText:(0,J.formatDuration)(t.duration,0),playCount:(0,J.formatCount)(t.stat.view),danmakuCount:(0,J.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,J.formatCount)(e.desc.like),durationText:"",playCount:(0,J.formatCount)(t.play_count),danmakuCount:(0,J.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,K.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,K.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,K.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,K.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Ke=n(1745),Xe=n.n(Ke),Je={insert:"head",singleton:!1},Ye=(je()(Xe(),Je),Xe().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,K.getCookieValue)(`bp_t_offset_${(0,K.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,K.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,K.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,K.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:K.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,M.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,M.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 Mt{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 Lt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"8K",displayName:"超高清 8K",value:127},{name:"DolbyVision",displayName:"杜比视界",value:126},{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,...Lt,{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,M.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,M.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,K.matchUrlPattern)(e)))&&(0,M.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,K.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,M.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,K.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,M.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 Kt 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,K.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 Xt=[],Jt="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,M.childList)(t,(t=>{i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,K.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Jt)){const t={element:e,items:[]};Xt.push(t),(e=>{e.observer||(e.items=(0,K.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,M.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,M.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,K.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Xt.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:M,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...K,constants:X,formatters:J,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Mn={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:M,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...K,...X,...J,...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=>Boolean(e?.entry))(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>Boolean(e?.setup))(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>Boolean(e?.style))(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.7","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:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f",branch:"preview",nearestTag:"v2.0.7",versionWithTag:"v2.0.7-23-g2acf9c591"},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",M=$.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+I])}),[]),L=[].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/registry/dist/components/feeds/copy-link.js b/registry/dist/components/feeds/copy-link.js index 7248b3e69..0f5118620 100644 --- a/registry/dist/components/feeds/copy-link.js +++ b/registry/dist/components/feeds/copy-link.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["feeds/copy-link"]=t():e["feeds/copy-link"]=t()}(self,(function(){return function(){"use strict";var e,t,o={23:function(e){e.exports=coreApis.componentApis.feeds.api}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var f=2&n&&o;"object"==typeof f&&!~e.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach((function(e){i[e]=function(){return o[e]}}));return i.default=function(){return o},r.d(c,i),c},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return e}});const e={name:"copyFeedsLink",displayName:"复制动态链接",description:{"zh-CN":"开启后, 可在每条动态的菜单中选择复制链接."},entry:async()=>{const{forEachFeedsCard:e,addMenuItem:t}=await Promise.resolve().then(r.t.bind(r,23,23));e({added:e=>{t(e,{className:"copy-link",text:"复制链接",action:async()=>{await navigator.clipboard.writeText(`https://t.bilibili.com/${e.id}`)}})}})},urlInclude:coreApis.utils.urls.feedsUrls,tags:[componentsTags.feeds,componentsTags.utils],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),c=c.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["feeds/copy-link"]=t():e["feeds/copy-link"]=t()}(self,(function(){return function(){"use strict";var e,t,o={23:function(e){e.exports=coreApis.componentApis.feeds.api}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var f=2&n&&o;"object"==typeof f&&!~e.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach((function(e){i[e]=function(){return o[e]}}));return i.default=function(){return o},r.d(c,i),c},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return e}});const e={name:"copyFeedsLink",displayName:"复制动态链接",description:{"zh-CN":"开启后, 可在每条动态的菜单中选择复制链接."},entry:async()=>{const{forEachFeedsCard:e,addMenuItem:t}=await Promise.resolve().then(r.t.bind(r,23,23));e({added:e=>{t(e,{className:"copy-link",text:"复制链接",action:async()=>{await navigator.clipboard.writeText(`https://t.bilibili.com/${e.id}`)}})}})},urlInclude:coreApis.utils.urls.feedsUrls,tags:[componentsTags.feeds,componentsTags.utils],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),c=c.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/disable-details.js b/registry/dist/components/feeds/disable-details.js index ef1fea8c5..f425ba1dd 100644 --- a/registry/dist/components/feeds/disable-details.js +++ b/registry/dist/components/feeds/disable-details.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;i{const{addImportantStyle:t}=await Promise.resolve().then(r.t.bind(r,163,23)),{default:e}=await Promise.resolve().then(r.t.bind(r,94,23));t(e,n)},s={name:"disableFeedsDetails",displayName:"禁止跳转动态详情",tags:[componentsTags.feeds],urlInclude:t.feedsUrls,description:{"zh-CN":"禁止动态点击后跳转详情页, 方便选择其中的文字."},entry:async()=>{const{addImportantStyle:t}=await Promise.resolve().then(r.t.bind(r,163,23)),{forEachFeedsCard:n}=await Promise.resolve().then(r.t.bind(r,23,23)),{default:i}=await Promise.resolve().then(r.t.bind(r,377,23));t(i,"disable-feeds-details-init-style"),o();n({added:t=>{const{element:n}=t;n.addEventListener("click",(t=>{if(t.ctrlKey||!e)return;const o=dqa(n,".content"),r=t.target;if(r.hasAttribute("click-title"))return;dqa(n,".im-popup").some((t=>t.contains(r)))||o.some((t=>t===r||t.contains(r)))&&t.stopImmediatePropagation()}),{capture:!0});const o=dq(n,".post-content");if(!o)return;if(![".video-container",".bangumi-container",".media-list",".article-container"].some((t=>dq(o,t)))&&!dq(o,".details")&&o.classList.contains("repost")){const t=dq(o,".content");if(!t)return;const e=document.createElement("div");e.classList.add("details"),e.setAttribute("click-title","详情"),e.innerHTML='\n 详情\n ',t.insertAdjacentElement("beforeend",e)}}})},unload:()=>{document.getElementById(n)?.remove(),e=!1},reload:()=>{o(),e=!0},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var s=this[i][0];null!=s&&(r[s]=!0)}for(var a=0;a{const{addImportantStyle:t}=await Promise.resolve().then(r.t.bind(r,163,23)),{default:e}=await Promise.resolve().then(r.t.bind(r,94,23));t(e,n)},s={name:"disableFeedsDetails",displayName:"禁止跳转动态详情",tags:[componentsTags.feeds],urlInclude:t.feedsUrls,description:{"zh-CN":"禁止动态点击后跳转详情页, 方便选择其中的文字."},entry:async()=>{const{addImportantStyle:t}=await Promise.resolve().then(r.t.bind(r,163,23)),{forEachFeedsCard:n}=await Promise.resolve().then(r.t.bind(r,23,23)),{default:i}=await Promise.resolve().then(r.t.bind(r,377,23));t(i,"disable-feeds-details-init-style"),o();n({added:t=>{const{element:n}=t;n.addEventListener("click",(t=>{if(t.ctrlKey||!e)return;const o=dqa(n,".content"),r=t.target;if(r.hasAttribute("click-title"))return;dqa(n,".im-popup").some((t=>t.contains(r)))||o.some((t=>t===r||t.contains(r)))&&t.stopImmediatePropagation()}),{capture:!0});const o=dq(n,".post-content");if(!o)return;if(![".video-container",".bangumi-container",".media-list",".article-container"].some((t=>dq(o,t)))&&!dq(o,".details")&&o.classList.contains("repost")){const t=dq(o,".content");if(!t)return;const e=document.createElement("div");e.classList.add("details"),e.setAttribute("click-title","详情"),e.innerHTML='\n 详情\n ',t.insertAdjacentElement("beforeend",e)}}})},unload:()=>{document.getElementById(n)?.remove(),e=!1},reload:()=>{o(),e=!0},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/extend-live.js b/registry/dist/components/feeds/extend-live.js index db245220b..0ead6efe5 100644 --- a/registry/dist/components/feeds/extend-live.js +++ b/registry/dist/components/feeds/extend-live.js @@ -6,4 +6,4 @@ t.i=function(e,n,i){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var o={};if(i)for(var r=0;rPromise.resolve().then(o.t.bind(o,134,23))),(async()=>{const{select:e}=await Promise.resolve().then(o.t.bind(o,569,23)),t=await e(".live-up-list");if(null===t)return;const{getPages:n,getJsonWithCredentials:i}=await Promise.resolve().then(o.t.bind(o,663,23)),r=await n({api:e=>i(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${e}&pagesize=24`),getList:e=>lodash.get(e,"data.list",[]),getTotal:e=>lodash.get(e,"data.results",0)}),l=dqa(t,".up-name").map((e=>e.innerText.trim())),a=r.filter((e=>l.includes(e.uname))),c=r.filter((e=>!l.includes(e.uname))),s=t.children[0];c.forEach((e=>{if(dqa(t,".up-name").some((t=>t.innerText.trim()===e.uname)))return;const n=s.cloneNode(!0);dqa(n,"a[href]").forEach((t=>t.setAttribute("href",`https://live.bilibili.com/${e.roomid}`)));dq(n,".live-up-img").style.backgroundImage=`url(${e.face})`;const i=dq(n,".live-name");i.innerHTML=e.title,i.title=e.title;const o=dq(n,".up-name");o.innerHTML=e.uname,o.title=e.uname,t.insertAdjacentElement("beforeend",n)}));const{disableProfilePopup:u}=await Promise.resolve().then(o.t.bind(o,30,23));u(),console.log(a,c)})),tags:[componentsTags.feeds,componentsTags.live],urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +var l=this[r][0];null!=l&&(o[l]=!0)}for(var a=0;aPromise.resolve().then(o.t.bind(o,134,23))),(async()=>{const{select:e}=await Promise.resolve().then(o.t.bind(o,569,23)),t=await e(".live-up-list");if(null===t)return;const{getPages:n,getJsonWithCredentials:i}=await Promise.resolve().then(o.t.bind(o,663,23)),r=await n({api:e=>i(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${e}&pagesize=24`),getList:e=>lodash.get(e,"data.list",[]),getTotal:e=>lodash.get(e,"data.results",0)}),l=dqa(t,".up-name").map((e=>e.innerText.trim())),a=r.filter((e=>l.includes(e.uname))),c=r.filter((e=>!l.includes(e.uname))),s=t.children[0];c.forEach((e=>{if(dqa(t,".up-name").some((t=>t.innerText.trim()===e.uname)))return;const n=s.cloneNode(!0);dqa(n,"a[href]").forEach((t=>t.setAttribute("href",`https://live.bilibili.com/${e.roomid}`)));dq(n,".live-up-img").style.backgroundImage=`url(${e.face})`;const i=dq(n,".live-name");i.innerHTML=e.title,i.title=e.title;const o=dq(n,".up-name");o.innerHTML=e.uname,o.title=e.uname,t.insertAdjacentElement("beforeend",n)}));const{disableProfilePopup:u}=await Promise.resolve().then(o.t.bind(o,30,23));u(),console.log(a,c)})),tags:[componentsTags.feeds,componentsTags.live],urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/filter.js b/registry/dist/components/feeds/filter.js index 2b81d0226..138aac275 100644 --- a/registry/dist/components/feeds/filter.js +++ b/registry/dist/components/feeds/filter.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var s={};if(i)for(var r=0;rPromise.resolve().then(n.bind(n,179)),VIcon:o.VIcon,TextBox:o.TextBox,VButton:o.VButton},data:()=>({allTypes:[],patterns:[...d.patterns],newPattern:"",allSideCards:c,blockSideCards:[...d.sideCards],collapse:!0}),watch:{patterns(){d.patterns=this.patterns,f&&f.cards.forEach((e=>this.updateCard(lodash.clone(e))))}},async mounted(){this.updateBlockSide();const e=await(0,r.select)(".feed-card .tab-bar");if(!e)return void console.error("tabBar not found");const t=e.querySelector(".tab:nth-child(1) .tab-text");(0,a.attributes)(t,(()=>{document.body.classList.toggle("by-type",!t.classList.contains("selected"))})),document.body.classList.add("enable-feeds-filter");const{feedsCardsManager:i,feedsCardTypes:s}=await Promise.resolve().then(n.t.bind(n,23,23));if(!await i.startWatching())return void console.error("feedsCardsManager.startWatching() failed");this.allTypes=Object.entries(s).concat(Object.entries({"self-repost":{id:-1,name:"自转发"}})).filter((([,e])=>e.id<=2048)).map((([e,t])=>[e,lodash.clone(t)])),i.cards.forEach((e=>this.updateCard(lodash.clone(e)))),i.addEventListener("addCard",(e=>{const t=e.detail;this.updateCard(t)})),f=i},methods:{updateCard(e){d.patterns.some((t=>(0,l.hasBlockedPattern)(t,e)))?e.element.classList.add("pattern-block"):e.element.classList.remove("pattern-block")},deletePattern(e){const t=d.patterns.indexOf(e);-1!==t&&this.patterns.splice(t,1)},addPattern(e){e&&!this.patterns.includes(e)&&this.patterns.push(e),this.newPattern=""},updateBlockSide(){Object.entries(c).forEach((([e,t])=>{const n=p+t.className;document.body.classList[this.blockSideCards.includes(e)?"add":"remove"](n)}))},toggleBlockSide(e){const t=this.blockSideCards.indexOf(e),n=c[e];-1!==t?(this.blockSideCards.splice(t,1),document.body.classList.remove(p+n.className)):(this.blockSideCards.push(e),document.body.classList.add(p+n.className)),d.sideCards=this.blockSideCards},sideDisabled(e){return this.blockSideCards.includes(e)}}}),b=n(379),y=n.n(b),m=n(420),h=n.n(m),v={insert:"head",singleton:!1},g=(y()(h(),v),h().locals,(0,n(900).Z)(u,i,[],!1,null,null,null));g.options.__file="registry/lib/components/feeds/filter/FeedsFilterCard.vue";var x=g.exports},179:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"filter-type-switch feeds-filter-swtich"},[n("label",{class:{disabled:e.disabled}},[n("span",{staticClass:"name",class:{disabled:e.disabled}},[e._v(e._s(e.type.name))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.disabled,expression:"disabled"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.disabled)?e._i(e.disabled,null)>-1:e.disabled},on:{change:function(t){var n=e.disabled,i=t.target,s=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.disabled=n.concat([null])):r>-1&&(e.disabled=n.slice(0,r).concat(n.slice(r+1)))}else e.disabled=s}}}),e._v(" "),e.disabled?n("VIcon",{staticClass:"disabled",attrs:{size:16,icon:"mdi-cancel"}}):n("VIcon",{attrs:{size:16,icon:"mdi-check"}})],1)])};i._withStripped=!0;var s=n(407),r=n(643);const{options:a}=(0,s.getComponentSettings)("feedsFilter");var o=Vue.extend({components:{VIcon:r.VIcon},props:{name:{type:String,required:!0},type:{type:Object,required:!0}},data(){const e=this.type.id>=0?"types":"specialTypes";return{disabled:a[e].includes(this.type.id),optionKey:e}},watch:{disabled(e){this.setFilter(e)}},created(){this.setFilter(this.disabled,!1)},methods:{setFilter(e,t=!0){if(document.body.classList[e?"add":"remove"](`feeds-filter-block-${this.name}`),t)if(e)a[this.optionKey].push(this.type.id);else{const e=a[this.optionKey].indexOf(this.type.id);-1!==e&&a[this.optionKey].splice(e,1)}}}}),l=n(379),d=n.n(l),c=n(866),f=n.n(c),p={insert:"head",singleton:!1},u=(d()(f(),p),f().locals,(0,n(900).Z)(o,i,[],!1,null,null,null));u.options.__file="registry/lib/components/feeds/filter/FilterTypeSwitch.vue";var b=u.exports},900:function(e,t,n){"use strict";function i(e,t,n,i,s,r,a,o){var l,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=l):s&&(l=o?function(){s.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(d.functional){d._injectStyles=l;var c=d.render;d.render=function(e,t){return l.call(t),c(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:d}}n.d(t,{Z:function(){return i}})},23:function(e){"use strict";e.exports=coreApis.componentApis.feeds.api},407:function(e){"use strict";e.exports=coreApis.settings},569:function(e){"use strict";e.exports=coreApis.spinQuery},643:function(e){"use strict";e.exports=coreApis.ui},109:function(e){"use strict";e.exports=coreApis.utils}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,exports:{}};return n[e](r,r.exports,s),r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},s.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);s.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&i&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},s.d(r,a),r},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";s.d(r,{component:function(){return n}});const e=[{username:"title",text:"epTitle"},{username:"upName",text:["title","dynamic"]},{username:["username","repostUsername"],text:["text","repostText"]}],t={name:"feeds.contentFilters.patterns",displayName:"动态关键词过滤",setup:({addData:t})=>{t("feeds.contentFilters",(async t=>{const{getComponentSettings:n}=await Promise.resolve().then(s.t.bind(s,407,23)),{hasBlockedPattern:i}=await Promise.resolve().then(s.bind(s,151));t.push({filter:t=>{const{patterns:s}=n("feedsFilter").options;return t.filter((t=>{const n=e.find((e=>Object.values(e).every((e=>Array.isArray(e)?e.some((e=>e in t)):e in t)))),r=Object.fromEntries(Object.entries(n).map((([e,n])=>Array.isArray(n)?[e,n.map((e=>t[e]??"")).join("\n").trim()]:[e,t[n].trim()])));return s.every((e=>!i(e,r)))}))}})}))}},n={name:"feedsFilter",displayName:"动态过滤器",description:{"zh-CN":"按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片."},entry:async()=>{const{select:e}=await Promise.resolve().then(s.t.bind(s,569,23)),t=await e(".home-container .left-panel");if(null===t)return;const n=await Promise.resolve().then(s.bind(s,135)),{mountVueComponent:i}=await Promise.resolve().then(s.t.bind(s,109,23));t.insertAdjacentElement("afterbegin",i(n).$el)},tags:[componentsTags.feeds],options:{types:{defaultValue:[],displayName:"过滤动态类型",hidden:!0},patterns:{defaultValue:[],displayName:"过滤关键词",hidden:!0},sideCards:{defaultValue:[],displayName:"过滤侧边栏",hidden:!0},specialTypes:{defaultValue:[],displayName:"过滤特殊动态类型",hidden:!0}},reload:()=>document.body.classList.remove("disable-feeds-filter"),unload:()=>document.body.classList.add("disable-feeds-filter"),urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],plugin:t,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;nPromise.resolve().then(n.bind(n,179)),VIcon:o.VIcon,TextBox:o.TextBox,VButton:o.VButton},data:()=>({allTypes:[],patterns:[...d.patterns],newPattern:"",allSideCards:c,blockSideCards:[...d.sideCards],collapse:!0}),watch:{patterns(){d.patterns=this.patterns,f&&f.cards.forEach((e=>this.updateCard(lodash.clone(e))))}},async mounted(){this.updateBlockSide();const e=await(0,r.select)(".feed-card .tab-bar");if(!e)return void console.error("tabBar not found");const t=e.querySelector(".tab:nth-child(1) .tab-text");(0,a.attributes)(t,(()=>{document.body.classList.toggle("by-type",!t.classList.contains("selected"))})),document.body.classList.add("enable-feeds-filter");const{feedsCardsManager:i,feedsCardTypes:s}=await Promise.resolve().then(n.t.bind(n,23,23));if(!await i.startWatching())return void console.error("feedsCardsManager.startWatching() failed");this.allTypes=Object.entries(s).concat(Object.entries({"self-repost":{id:-1,name:"自转发"}})).filter((([,e])=>e.id<=2048)).map((([e,t])=>[e,lodash.clone(t)])),i.cards.forEach((e=>this.updateCard(lodash.clone(e)))),i.addEventListener("addCard",(e=>{const t=e.detail;this.updateCard(t)})),f=i},methods:{updateCard(e){d.patterns.some((t=>(0,l.hasBlockedPattern)(t,e)))?e.element.classList.add("pattern-block"):e.element.classList.remove("pattern-block")},deletePattern(e){const t=d.patterns.indexOf(e);-1!==t&&this.patterns.splice(t,1)},addPattern(e){e&&!this.patterns.includes(e)&&this.patterns.push(e),this.newPattern=""},updateBlockSide(){Object.entries(c).forEach((([e,t])=>{const n=p+t.className;document.body.classList[this.blockSideCards.includes(e)?"add":"remove"](n)}))},toggleBlockSide(e){const t=this.blockSideCards.indexOf(e),n=c[e];-1!==t?(this.blockSideCards.splice(t,1),document.body.classList.remove(p+n.className)):(this.blockSideCards.push(e),document.body.classList.add(p+n.className)),d.sideCards=this.blockSideCards},sideDisabled(e){return this.blockSideCards.includes(e)}}}),b=n(379),y=n.n(b),m=n(420),h=n.n(m),v={insert:"head",singleton:!1},g=(y()(h(),v),h().locals,(0,n(900).Z)(u,i,[],!1,null,null,null));g.options.__file="registry/lib/components/feeds/filter/FeedsFilterCard.vue";var x=g.exports},179:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"filter-type-switch feeds-filter-swtich"},[n("label",{class:{disabled:e.disabled}},[n("span",{staticClass:"name",class:{disabled:e.disabled}},[e._v(e._s(e.type.name))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.disabled,expression:"disabled"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.disabled)?e._i(e.disabled,null)>-1:e.disabled},on:{change:function(t){var n=e.disabled,i=t.target,s=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.disabled=n.concat([null])):r>-1&&(e.disabled=n.slice(0,r).concat(n.slice(r+1)))}else e.disabled=s}}}),e._v(" "),e.disabled?n("VIcon",{staticClass:"disabled",attrs:{size:16,icon:"mdi-cancel"}}):n("VIcon",{attrs:{size:16,icon:"mdi-check"}})],1)])};i._withStripped=!0;var s=n(407),r=n(643);const{options:a}=(0,s.getComponentSettings)("feedsFilter");var o=Vue.extend({components:{VIcon:r.VIcon},props:{name:{type:String,required:!0},type:{type:Object,required:!0}},data(){const e=this.type.id>=0?"types":"specialTypes";return{disabled:a[e].includes(this.type.id),optionKey:e}},watch:{disabled(e){this.setFilter(e)}},created(){this.setFilter(this.disabled,!1)},methods:{setFilter(e,t=!0){if(document.body.classList[e?"add":"remove"](`feeds-filter-block-${this.name}`),t)if(e)a[this.optionKey].push(this.type.id);else{const e=a[this.optionKey].indexOf(this.type.id);-1!==e&&a[this.optionKey].splice(e,1)}}}}),l=n(379),d=n.n(l),c=n(866),f=n.n(c),p={insert:"head",singleton:!1},u=(d()(f(),p),f().locals,(0,n(900).Z)(o,i,[],!1,null,null,null));u.options.__file="registry/lib/components/feeds/filter/FilterTypeSwitch.vue";var b=u.exports},900:function(e,t,n){"use strict";function i(e,t,n,i,s,r,a,o){var l,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=l):s&&(l=o?function(){s.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(d.functional){d._injectStyles=l;var c=d.render;d.render=function(e,t){return l.call(t),c(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:d}}n.d(t,{Z:function(){return i}})},23:function(e){"use strict";e.exports=coreApis.componentApis.feeds.api},407:function(e){"use strict";e.exports=coreApis.settings},569:function(e){"use strict";e.exports=coreApis.spinQuery},643:function(e){"use strict";e.exports=coreApis.ui},109:function(e){"use strict";e.exports=coreApis.utils}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,exports:{}};return n[e](r,r.exports,s),r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},s.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);s.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&i&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},s.d(r,a),r},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";s.d(r,{component:function(){return n}});const e=[{username:"title",text:"epTitle"},{username:"upName",text:["title","dynamic"]},{username:["username","repostUsername"],text:["text","repostText"]}],t={name:"feeds.contentFilters.patterns",displayName:"动态关键词过滤",setup:({addData:t})=>{t("feeds.contentFilters",(async t=>{const{getComponentSettings:n}=await Promise.resolve().then(s.t.bind(s,407,23)),{hasBlockedPattern:i}=await Promise.resolve().then(s.bind(s,151));t.push({filter:t=>{const{patterns:s}=n("feedsFilter").options;return t.filter((t=>{const n=e.find((e=>Object.values(e).every((e=>Array.isArray(e)?e.some((e=>e in t)):e in t)))),r=Object.fromEntries(Object.entries(n).map((([e,n])=>Array.isArray(n)?[e,n.map((e=>t[e]??"")).join("\n").trim()]:[e,t[n].trim()])));return s.every((e=>!i(e,r)))}))}})}))}},n={name:"feedsFilter",displayName:"动态过滤器",description:{"zh-CN":"按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片."},entry:async()=>{const{select:e}=await Promise.resolve().then(s.t.bind(s,569,23)),t=await e(".home-container .left-panel");if(null===t)return;const n=await Promise.resolve().then(s.bind(s,135)),{mountVueComponent:i}=await Promise.resolve().then(s.t.bind(s,109,23));t.insertAdjacentElement("afterbegin",i(n).$el)},tags:[componentsTags.feeds],options:{types:{defaultValue:[],displayName:"过滤动态类型",hidden:!0},patterns:{defaultValue:[],displayName:"过滤关键词",hidden:!0},sideCards:{defaultValue:[],displayName:"过滤侧边栏",hidden:!0},specialTypes:{defaultValue:[],displayName:"过滤特殊动态类型",hidden:!0}},reload:()=>document.body.classList.remove("disable-feeds-filter"),unload:()=>document.body.classList.add("disable-feeds-filter"),urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],plugin:t,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/fixed-sidebars.js b/registry/dist/components/feeds/fixed-sidebars.js index 8e696f804..f93f20778 100644 --- a/registry/dist/components/feeds/fixed-sidebars.js +++ b/registry/dist/components/feeds/fixed-sidebars.js @@ -6,4 +6,4 @@ t.i=function(n,e,o){"string"==typeof n&&( // eslint-disable-next-line no-param-reassign n=[[null,n,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,871,23)),important:!0}],displayName:"强制固定动态侧栏",description:{"zh-CN":"强制固定动态主页的顶栏和所有侧栏."},tags:[componentsTags.feeds],entry:async()=>{const{disableProfilePopup:n}=await Promise.resolve().then(r.t.bind(r,30,23));n()},urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var p=0;pPromise.resolve().then(r.t.bind(r,871,23)),important:!0}],displayName:"强制固定动态侧栏",description:{"zh-CN":"强制固定动态主页的顶栏和所有侧栏."},tags:[componentsTags.feeds],entry:async()=>{const{disableProfilePopup:n}=await Promise.resolve().then(r.t.bind(r,30,23));n()},urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/fold-comments.js b/registry/dist/components/feeds/fold-comments.js index 672f8e0c5..9d6764284 100644 --- a/registry/dist/components/feeds/fold-comments.js +++ b/registry/dist/components/feeds/fold-comments.js @@ -6,4 +6,4 @@ n.i=function(e,t,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var c=0;cPromise.resolve().then(r.t.bind(r,895,23))),(async()=>{const{forEachFeedsCard:e}=await Promise.resolve().then(r.t.bind(r,23,23)),{childList:n}=await Promise.resolve().then(r.t.bind(r,156,23));e({added:e=>(e=>{const t=n=>{const t=document.createElement("div");t.classList.add("fold-comment"),t.innerHTML="收起评论";const o=n.querySelector(".bb-comment");null===o.querySelector(".fold-comment")&&(null!==o?(t.addEventListener("click",(()=>{const n=e.querySelector(".button-bar").children[1];null!==n&&(n.click(),e.scrollIntoView())})),o.insertAdjacentElement("beforeend",t)):console.error("未找到评论区"))},o=e.querySelector(".panel-area");if(null===o&&console.log(e),0===o.childElementCount){const[e]=n(o,(n=>{n.length>0&&(t(o),e.disconnect())}))}else t(o)})(e.element)})})),commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),c=c.component}()})); \ No newline at end of file +var i=this[c][0];null!=i&&(r[i]=!0)}for(var s=0;sPromise.resolve().then(r.t.bind(r,895,23))),(async()=>{const{forEachFeedsCard:e}=await Promise.resolve().then(r.t.bind(r,23,23)),{childList:n}=await Promise.resolve().then(r.t.bind(r,156,23));e({added:e=>(e=>{const t=n=>{const t=document.createElement("div");t.classList.add("fold-comment"),t.innerHTML="收起评论";const o=n.querySelector(".bb-comment");null===o.querySelector(".fold-comment")&&(null!==o?(t.addEventListener("click",(()=>{const n=e.querySelector(".button-bar").children[1];null!==n&&(n.click(),e.scrollIntoView())})),o.insertAdjacentElement("beforeend",t)):console.error("未找到评论区"))},o=e.querySelector(".panel-area");if(null===o&&console.log(e),0===o.childElementCount){const[e]=n(o,(n=>{n.length>0&&(t(o),e.disconnect())}))}else t(o)})(e.element)})})),commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),c=c.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/full-content.js b/registry/dist/components/feeds/full-content.js index 7d692951d..c5ff451b8 100644 --- a/registry/dist/components/feeds/full-content.js +++ b/registry/dist/components/feeds/full-content.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var c=0;cPromise.resolve().then(r.t.bind(r,223,23)))),displayName:"展开动态内容",description:{"zh-CN":"不管内容多长, 总是完全展开动态的内容."},tags:[componentsTags.style,componentsTags.feeds],urlInclude:e.feedsUrlsWithoutDetail,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),c=c.component}()})); \ No newline at end of file +var i=this[c][0];null!=i&&(r[i]=!0)}for(var u=0;uPromise.resolve().then(r.t.bind(r,223,23)))),displayName:"展开动态内容",description:{"zh-CN":"不管内容多长, 总是完全展开动态的内容."},tags:[componentsTags.style,componentsTags.feeds],urlInclude:e.feedsUrlsWithoutDetail,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),c=c.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/full-title.js b/registry/dist/components/feeds/full-title.js index 688ae64df..fdc5ed191 100644 --- a/registry/dist/components/feeds/full-title.js +++ b/registry/dist/components/feeds/full-title.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,856,23)))),displayName:"展开动态标题",description:{"zh-CN":"在顶栏的视频动态中, 无论标题多长总是完全展开."},tags:[componentsTags.feeds,componentsTags.style],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var f=0;fPromise.resolve().then(r.t.bind(r,856,23)))),displayName:"展开动态标题",description:{"zh-CN":"在顶栏的视频动态中, 无论标题多长总是完全展开."},tags:[componentsTags.feeds,componentsTags.style],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/feeds/unfold.js b/registry/dist/components/feeds/unfold.js index e8c9a7802..f56101f94 100644 --- a/registry/dist/components/feeds/unfold.js +++ b/registry/dist/components/feeds/unfold.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["feeds/unfold"]=t():e["feeds/unfold"]=t()}(self,(function(){return function(){"use strict";var e,t,o={23:function(e){e.exports=coreApis.componentApis.feeds.api}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var f=n[e]={exports:{}};return o[e](f,f.exports,r),f.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var f=Object.create(null);r.r(f);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},r.d(f,c),f},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){r.d(f,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"unfoldFeeds",displayName:"动态反折叠",tags:[componentsTags.feeds],description:{"zh-CN":"自动展开被折叠的动态."},urlInclude:e.feedsUrlsWithoutDetail,entry:async()=>{const{forEachFeedsCard:e}=await Promise.resolve().then(r.t.bind(r,23,23));e({added:e=>{dq(e.element,".fold-hoverable")?.click()}})},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),f=f.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["feeds/unfold"]=t():e["feeds/unfold"]=t()}(self,(function(){return function(){"use strict";var e,t,o={23:function(e){e.exports=coreApis.componentApis.feeds.api}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var f=n[e]={exports:{}};return o[e](f,f.exports,r),f.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var f=Object.create(null);r.r(f);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},r.d(f,c),f},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){r.d(f,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"unfoldFeeds",displayName:"动态反折叠",tags:[componentsTags.feeds],description:{"zh-CN":"自动展开被折叠的动态."},urlInclude:e.feedsUrlsWithoutDetail,entry:async()=>{const{forEachFeedsCard:e}=await Promise.resolve().then(r.t.bind(r,23,23));e({added:e=>{dq(e.element,".fold-hoverable")?.click()}})},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),f=f.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/auto-draw.js b/registry/dist/components/live/auto-draw.js index f35ca2420..7482d46c5 100644 --- a/registry/dist/components/live/auto-draw.js +++ b/registry/dist/components/live/auto-draw.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["live/auto-draw"]=t():e["live/auto-draw"]=t()}(self,(function(){return function(){"use strict";var e,t,n={156:function(e){e.exports=coreApis.observer},569:function(e){e.exports=coreApis.spinQuery}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var c=o[e]={exports:{}};return n[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){i[e]=function(){return n[e]}}));return i.default=function(){return n},r.d(c,i),c},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"liveAutoDraw",displayName:"直播间自动抽奖",description:{"zh-CN":"在当前直播间有抽奖活动时, 自动点击抽奖按钮. 注意只适用于少量抽奖, 那种99+限量抽奖可能跟不上其他人的手速("},tags:[componentsTags.live],entry:async()=>{const{sq:e}=await Promise.resolve().then(r.t.bind(r,569,23)),{childListSubtree:t,attributes:n}=await Promise.resolve().then(r.t.bind(r,156,23)),o=await e((()=>dq(".chat-popups-section")),(e=>null!==e&&null===e.querySelector("chat-draw-area")));o?t(o,(()=>{console.log("draw button = ",dq(".chat-popups-section .draw>span:nth-child(3)"));const e=dq(".chat-popups-section .draw>span:nth-child(3)");if(null===e){const e=dq(".chat-popups-section .function-bar>span:nth-child(3)");if(null!==e){const[t]=n(e,(()=>{"none"!==e.style.display&&(t.disconnect(),e.click())}))}}null!==e&&e.click()})):console.warn("[自动领奖] 未能找到弹窗容器")},urlInclude:e.liveUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),c=c.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["live/auto-draw"]=t():e["live/auto-draw"]=t()}(self,(function(){return function(){"use strict";var e,t,n={156:function(e){e.exports=coreApis.observer},569:function(e){e.exports=coreApis.spinQuery}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var c=o[e]={exports:{}};return n[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){i[e]=function(){return n[e]}}));return i.default=function(){return n},r.d(c,i),c},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"liveAutoDraw",displayName:"直播间自动抽奖",description:{"zh-CN":"在当前直播间有抽奖活动时, 自动点击抽奖按钮. 注意只适用于少量抽奖, 那种99+限量抽奖可能跟不上其他人的手速("},tags:[componentsTags.live],entry:async()=>{const{sq:e}=await Promise.resolve().then(r.t.bind(r,569,23)),{childListSubtree:t,attributes:n}=await Promise.resolve().then(r.t.bind(r,156,23)),o=await e((()=>dq(".chat-popups-section")),(e=>null!==e&&null===e.querySelector("chat-draw-area")));o?t(o,(()=>{console.log("draw button = ",dq(".chat-popups-section .draw>span:nth-child(3)"));const e=dq(".chat-popups-section .draw>span:nth-child(3)");if(null===e){const e=dq(".chat-popups-section .function-bar>span:nth-child(3)");if(null!==e){const[t]=n(e,(()=>{"none"!==e.style.display&&(t.disconnect(),e.click())}))}}null!==e&&e.click()})):console.warn("[自动领奖] 未能找到弹窗容器")},urlInclude:e.liveUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),c=c.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/badge-helper.js b/registry/dist/components/live/badge-helper.js index f0c8e0d83..9a6149f1e 100644 --- a/registry/dist/components/live/badge-helper.js +++ b/registry/dist/components/live/badge-helper.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var l={};if(o)for(var a=0;a({medalList:[],titleList:[],medalOpen:!1,titleOpen:!1}),async mounted(){await(async()=>{const e=this.loadMedalList();await r.Dx.getImageMap();const n=this.loadTitleList();return Promise.all([e,n])})(),this.updateColumnsCount()},methods:{updateColumnsCount(){const e=this.$el,n=Math.min(Math.ceil(this.medalList.length/12),6);e.style.setProperty("--medal-columns",n.toString());const t=Math.min(Math.ceil(this.titleList.length/12),6);e.style.setProperty("--title-columns",t.toString())},async loadMedalList(){this.medalList=(await(0,r.KK)()).sort((0,a.descendingSort)((e=>e.level))).slice(0,c.maxBadgeCount)},async loadTitleList(){this.titleList=(await(0,r.eB)()).slice(0,c.maxBadgeCount)},async toggleBadge(e,n){if(console.log(e),e.isActive)e.isActive=!1,await e.deactivate();else{const t=n.find((e=>e.isActive));t&&(t.isActive=!1),e.isActive=!0,await e.activate(),e instanceof r.j9&&(c.defaultMedalID=e.id)}e instanceof r.j9?await this.loadMedalList():e instanceof r.Dx&&await this.loadTitleList()}}}),p=t(379),d=t.n(p),u=t(256),b=t.n(u),f={insert:"head",singleton:!1};d()(b(),f),b().locals;var g=function(e,n,t,o,l,a,i,r){var c,s="function"==typeof e?e.options:e;if(n&&(s.render=n,s.staticRenderFns=t,s._compiled=!0),o&&(s.functional=!0),a&&(s._scopeId="data-v-"+a),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),l&&l.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},s._ssrRegister=c):l&&(c=r?function(){l.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:l),c)if(s.functional){s._injectStyles=c;var p=s.render;s.render=function(e,n){return c.call(n),p(e,n)}}else{var d=s.beforeCreate;s.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:s}}(s,o,[],!1,null,null,null);g.options.__file="registry/lib/components/live/badge-helper/BadgeHelper.vue";var v=g.exports},663:function(e){"use strict";e.exports=coreApis.ajax},407:function(e){"use strict";e.exports=coreApis.settings},109:function(e){"use strict";e.exports=coreApis.utils}},o={};function l(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={id:e,exports:{}};return t[e](a,a.exports,l),a.exports}l.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},l.t=function(t,o){if(1&o&&(t=this(t)),8&o)return t;if("object"==typeof t&&t){if(4&o&&t.__esModule)return t;if(16&o&&"function"==typeof t.then)return t}var a=Object.create(null);l.r(a);var i={};e=e||[null,n({}),n([]),n(n)];for(var r=2&o&&t;"object"==typeof r&&!~e.indexOf(r);r=n(r))Object.getOwnPropertyNames(r).forEach((function(e){i[e]=function(){return t[e]}}));return i.default=function(){return t},l.d(a,i),a},l.d=function(e,n){for(var t in n)l.o(n,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},l.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){"use strict";l.d(a,{component:function(){return t}});var e=l(109),n=l(930);const t={name:"badgeHelper",displayName:"直播勋章快速更换",description:{"zh-CN":"在直播区中, 可从功能面板中直接切换勋章和头衔. 默认加载 256 个 (同时也是上限), 可在选项中修改."},entry:()=>(async()=>{const{getUID:e}=await Promise.resolve().then(l.t.bind(l,109,23));if(!e())return;const{getComponentSettings:t}=await Promise.resolve().then(l.t.bind(l,407,23)),{options:o}=t("badgeHelper");if(!o.autoMatchMedal)return;const a=document.URL.match(/^https:\/\/live\.bilibili\.com\/(blanc\/)?([\d]+)/);if(!a)return;const i=parseInt(a[2]);if(Number.isNaN(i))return void console.warn("roomID not found");const r=await(0,n.KK)();if(!o.defaultMedalID){const e=r.find((e=>e.isActive));e&&(o.defaultMedalID=e.id,console.log(`set defaultMedalID to activeMedal (${e.id})`))}const c=o.defaultMedalID?r.find((e=>e.id===o.defaultMedalID)):r.find((e=>e.isActive)),s=r.find((e=>e.roomID===i));s?(await s.activate(),console.log(`activated matchMedal (${s.id})`)):c&&(await c.activate(),console.log(`no matchMedal, fallback to defaultMedal (${c.id})`))})(),reload:e.none,unload:e.none,tags:[componentsTags.live],widget:{component:()=>Promise.resolve().then(l.bind(l,995)).then((e=>e.default)),condition:()=>Boolean((0,e.getUID)())},options:{autoMatchMedal:{defaultValue:!0,displayName:"自动佩戴当前直播间勋章"},maxBadgeCount:{defaultValue:256,displayName:"最大加载数量",validator:e=>lodash.clamp(e,1,256)},defaultMedalID:{displayName:"默认勋章ID",hidden:!0,defaultValue:0}},urlInclude:["//live.bilibili.com"],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),a=a.component}()})); \ No newline at end of file +o=Boolean(window&&document&&document.all&&!window.atob)),o},a=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),i=[];function r(e){for(var n=-1,t=0;t({medalList:[],titleList:[],medalOpen:!1,titleOpen:!1}),async mounted(){await(async()=>{const e=this.loadMedalList();await r.Dx.getImageMap();const n=this.loadTitleList();return Promise.all([e,n])})(),this.updateColumnsCount()},methods:{updateColumnsCount(){const e=this.$el,n=Math.min(Math.ceil(this.medalList.length/12),6);e.style.setProperty("--medal-columns",n.toString());const t=Math.min(Math.ceil(this.titleList.length/12),6);e.style.setProperty("--title-columns",t.toString())},async loadMedalList(){this.medalList=(await(0,r.KK)()).sort((0,a.descendingSort)((e=>e.level))).slice(0,c.maxBadgeCount)},async loadTitleList(){this.titleList=(await(0,r.eB)()).slice(0,c.maxBadgeCount)},async toggleBadge(e,n){if(console.log(e),e.isActive)e.isActive=!1,await e.deactivate();else{const t=n.find((e=>e.isActive));t&&(t.isActive=!1),e.isActive=!0,await e.activate(),e instanceof r.j9&&(c.defaultMedalID=e.id)}e instanceof r.j9?await this.loadMedalList():e instanceof r.Dx&&await this.loadTitleList()}}}),p=t(379),d=t.n(p),u=t(256),b=t.n(u),f={insert:"head",singleton:!1};d()(b(),f),b().locals;var g=function(e,n,t,o,l,a,i,r){var c,s="function"==typeof e?e.options:e;if(n&&(s.render=n,s.staticRenderFns=t,s._compiled=!0),o&&(s.functional=!0),a&&(s._scopeId="data-v-"+a),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),l&&l.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},s._ssrRegister=c):l&&(c=r?function(){l.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:l),c)if(s.functional){s._injectStyles=c;var p=s.render;s.render=function(e,n){return c.call(n),p(e,n)}}else{var d=s.beforeCreate;s.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:s}}(s,o,[],!1,null,null,null);g.options.__file="registry/lib/components/live/badge-helper/BadgeHelper.vue";var v=g.exports},663:function(e){"use strict";e.exports=coreApis.ajax},407:function(e){"use strict";e.exports=coreApis.settings},109:function(e){"use strict";e.exports=coreApis.utils}},o={};function l(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={id:e,exports:{}};return t[e](a,a.exports,l),a.exports}l.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},l.t=function(t,o){if(1&o&&(t=this(t)),8&o)return t;if("object"==typeof t&&t){if(4&o&&t.__esModule)return t;if(16&o&&"function"==typeof t.then)return t}var a=Object.create(null);l.r(a);var i={};e=e||[null,n({}),n([]),n(n)];for(var r=2&o&&t;"object"==typeof r&&!~e.indexOf(r);r=n(r))Object.getOwnPropertyNames(r).forEach((function(e){i[e]=function(){return t[e]}}));return i.default=function(){return t},l.d(a,i),a},l.d=function(e,n){for(var t in n)l.o(n,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},l.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){"use strict";l.d(a,{component:function(){return t}});var e=l(109),n=l(930);const t={name:"badgeHelper",displayName:"直播勋章快速更换",description:{"zh-CN":"在直播区中, 可从功能面板中直接切换勋章和头衔. 默认加载 256 个 (同时也是上限), 可在选项中修改."},entry:()=>(async()=>{const{getUID:e}=await Promise.resolve().then(l.t.bind(l,109,23));if(!e())return;const{getComponentSettings:t}=await Promise.resolve().then(l.t.bind(l,407,23)),{options:o}=t("badgeHelper");if(!o.autoMatchMedal)return;const a=document.URL.match(/^https:\/\/live\.bilibili\.com\/(blanc\/)?([\d]+)/);if(!a)return;const i=parseInt(a[2]);if(Number.isNaN(i))return void console.warn("roomID not found");const r=await(0,n.KK)();if(!o.defaultMedalID){const e=r.find((e=>e.isActive));e&&(o.defaultMedalID=e.id,console.log(`set defaultMedalID to activeMedal (${e.id})`))}const c=o.defaultMedalID?r.find((e=>e.id===o.defaultMedalID)):r.find((e=>e.isActive)),s=r.find((e=>e.roomID===i));s?(await s.activate(),console.log(`activated matchMedal (${s.id})`)):c&&(await c.activate(),console.log(`no matchMedal, fallback to defaultMedal (${c.id})`))})(),reload:e.none,unload:e.none,tags:[componentsTags.live],widget:{component:()=>Promise.resolve().then(l.bind(l,995)).then((e=>e.default)),condition:()=>Boolean((0,e.getUID)())},options:{autoMatchMedal:{defaultValue:!0,displayName:"自动佩戴当前直播间勋章"},maxBadgeCount:{defaultValue:256,displayName:"最大加载数量",validator:e=>lodash.clamp(e,1,256)},defaultMedalID:{displayName:"默认勋章ID",hidden:!0,defaultValue:0}},urlInclude:["//live.bilibili.com"],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),a=a.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/danmaku-sendbar.js b/registry/dist/components/live/danmaku-sendbar.js index 362573ff2..7b6ca9b1b 100644 --- a/registry/dist/components/live/danmaku-sendbar.js +++ b/registry/dist/components/live/danmaku-sendbar.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var o={};if(r)for(var a=0;a({originalTextArea:null,sendButton:null,value:""}),async mounted(){const e=await(0,o.select)(i.M6),n=await(0,o.select)(i.Jd);if(!e||!n)throw new Error(`[danmakuSendBar] ref elements not found. originalTextArea = ${null===e} sendButton = ${null===n}`);if(this.originalTextArea=e,this.sendButton=n,this.value=e.value,e.addEventListener("input",this.listenChange),e.addEventListener("change",this.listenChange),!l){const n=Object.getOwnPropertyDescriptors(HTMLTextAreaElement.prototype).value;Object.defineProperty(e,"value",{...n,set(t){n.set?.call(this,t),(0,a.raiseEvent)(e,"input")}}),l=!0}},beforeDestroy(){this.originalTextArea.removeEventListener("input",this.listenChange),this.originalTextArea.removeEventListener("change",this.listenChange)},methods:{updateValue(e){this.originalTextArea.value=e,(0,a.raiseEvent)(this.originalTextArea,"input")},send(){this.sendButton.disabled||(this.value="",this.sendButton.click())},listenChange(e){this.value=e.target.value}}}),s=t(379),c=t.n(s),d=t(667),f=t.n(d),p={insert:"head",singleton:!1};c()(f(),p),f().locals;var v=function(e,n,t,r,o,a,i,l){var u,s="function"==typeof e?e.options:e;if(n&&(s.render=n,s.staticRenderFns=t,s._compiled=!0),r&&(s.functional=!0),a&&(s._scopeId="data-v-"+a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},s._ssrRegister=u):o&&(u=l?function(){o.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(s.functional){s._injectStyles=u;var c=s.render;s.render=function(e,n){return u.call(n),c(e,n)}}else{var d=s.beforeCreate;s.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:s}}(u,r,[],!1,null,null,null);v.options.__file="registry/lib/components/live/danmaku-sendbar/DanmakuSendbar.vue";var m=v.exports},109:function(e){"use strict";e.exports=coreApis.utils}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={id:e,exports:{}};return t[e](a,a.exports,o),a.exports}o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(t,r){if(1&r&&(t=this(t)),8&r)return t;if("object"==typeof t&&t){if(4&r&&t.__esModule)return t;if(16&r&&"function"==typeof t.then)return t}var a=Object.create(null);o.r(a);var i={};e=e||[null,n({}),n([]),n(n)];for(var l=2&r&&t;"object"==typeof l&&!~e.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((function(e){i[e]=function(){return t[e]}}));return i.default=function(){return t},o.d(a,i),a},o.d=function(e,n){for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){"use strict";o.d(a,{component:function(){return i}});var e=coreApis.componentApis.live.liveControlBar,n=o(109),t=coreApis.utils.urls,r=o(281);const i={name:"liveDanmakuSendbar",displayName:"直播弹幕发送栏",tags:[componentsTags.live],description:{"zh-CN":"在直播的网页全屏和全屏模式状态下, 在底部显示弹幕栏."},entry:async()=>{if(!(0,n.getUID)())return;let t;(0,e.waitForControlBar)({callback:async e=>{const n=dq(e,r.xO);if(!n)throw new Error("[danmakuSendBar] leftController not found");if(!dq(e,".danmaku-send-bar")){if(!t){const{mountVueComponent:e}=await Promise.resolve().then(o.t.bind(o,109,23)),n=await Promise.resolve().then(o.bind(o,83));t=e(n).$el}n.insertAdjacentElement("afterend",t)}}})},reload:()=>document.body.classList.remove("danmaku-send-bar-unloaded"),unload:()=>document.body.classList.add("danmaku-send-bar-unloaded"),urlInclude:t.liveUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),a=a.component}()})); \ No newline at end of file +r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),i=[];function l(e){for(var n=-1,t=0;t({originalTextArea:null,sendButton:null,value:""}),async mounted(){const e=await(0,o.select)(i.M6),n=await(0,o.select)(i.Jd);if(!e||!n)throw new Error(`[danmakuSendBar] ref elements not found. originalTextArea = ${null===e} sendButton = ${null===n}`);if(this.originalTextArea=e,this.sendButton=n,this.value=e.value,e.addEventListener("input",this.listenChange),e.addEventListener("change",this.listenChange),!l){const n=Object.getOwnPropertyDescriptors(HTMLTextAreaElement.prototype).value;Object.defineProperty(e,"value",{...n,set(t){n.set?.call(this,t),(0,a.raiseEvent)(e,"input")}}),l=!0}},beforeDestroy(){this.originalTextArea.removeEventListener("input",this.listenChange),this.originalTextArea.removeEventListener("change",this.listenChange)},methods:{updateValue(e){this.originalTextArea.value=e,(0,a.raiseEvent)(this.originalTextArea,"input")},send(){this.sendButton.disabled||(this.value="",this.sendButton.click())},listenChange(e){this.value=e.target.value}}}),s=t(379),c=t.n(s),d=t(667),f=t.n(d),p={insert:"head",singleton:!1};c()(f(),p),f().locals;var v=function(e,n,t,r,o,a,i,l){var u,s="function"==typeof e?e.options:e;if(n&&(s.render=n,s.staticRenderFns=t,s._compiled=!0),r&&(s.functional=!0),a&&(s._scopeId="data-v-"+a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},s._ssrRegister=u):o&&(u=l?function(){o.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(s.functional){s._injectStyles=u;var c=s.render;s.render=function(e,n){return u.call(n),c(e,n)}}else{var d=s.beforeCreate;s.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:s}}(u,r,[],!1,null,null,null);v.options.__file="registry/lib/components/live/danmaku-sendbar/DanmakuSendbar.vue";var m=v.exports},109:function(e){"use strict";e.exports=coreApis.utils}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={id:e,exports:{}};return t[e](a,a.exports,o),a.exports}o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(t,r){if(1&r&&(t=this(t)),8&r)return t;if("object"==typeof t&&t){if(4&r&&t.__esModule)return t;if(16&r&&"function"==typeof t.then)return t}var a=Object.create(null);o.r(a);var i={};e=e||[null,n({}),n([]),n(n)];for(var l=2&r&&t;"object"==typeof l&&!~e.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((function(e){i[e]=function(){return t[e]}}));return i.default=function(){return t},o.d(a,i),a},o.d=function(e,n){for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){"use strict";o.d(a,{component:function(){return i}});var e=coreApis.componentApis.live.liveControlBar,n=o(109),t=coreApis.utils.urls,r=o(281);const i={name:"liveDanmakuSendbar",displayName:"直播弹幕发送栏",tags:[componentsTags.live],description:{"zh-CN":"在直播的网页全屏和全屏模式状态下, 在底部显示弹幕栏."},entry:async()=>{if(!(0,n.getUID)())return;let t;(0,e.waitForControlBar)({callback:async e=>{const n=dq(e,r.xO);if(!n)throw new Error("[danmakuSendBar] leftController not found");if(!dq(e,".danmaku-send-bar")){if(!t){const{mountVueComponent:e}=await Promise.resolve().then(o.t.bind(o,109,23)),n=await Promise.resolve().then(o.bind(o,83));t=e(n).$el}n.insertAdjacentElement("afterend",t)}}})},reload:()=>document.body.classList.remove("danmaku-send-bar-unloaded"),unload:()=>document.body.classList.add("danmaku-send-bar-unloaded"),urlInclude:t.liveUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),a=a.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/download-records.js b/registry/dist/components/live/download-records.js index 471b31b29..37e81e75f 100644 --- a/registry/dist/components/live/download-records.js +++ b/registry/dist/components/live/download-records.js @@ -1 +1 @@ -!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["live/download-records"]=o():e["live/download-records"]=o()}(self,(function(){return function(){"use strict";var e={420:function(e,o,t){t.r(o),t.d(o,{default:function(){return c}});var n=function(){var e=this,o=e.$createElement;return(e._self._c||o)("DefaultWidget",{staticClass:"download-live-records",attrs:{disabled:e.disabled,name:"下载录像",icon:"mdi-download"},on:{click:function(o){return e.download()}}})};n._withStripped=!0;var r=coreApis.ui,i=coreApis.ajax,s=coreApis.toast,d=coreApis.utils.log;var a=function(e,o,t,n,r,i,s,d){var a,c="function"==typeof e?e.options:e;if(o&&(c.render=o,c.staticRenderFns=t,c._compiled=!0),n&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=a):r&&(a=d?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),a)if(c.functional){c._injectStyles=a;var l=c.render;c.render=function(e,o){return a.call(o),l(e,o)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,a):[a]}return{exports:e,options:c}}(Vue.extend({components:{DefaultWidget:r.DefaultWidget},data:()=>({disabled:!1}),methods:{async download(){try{this.disabled=!0;const e=document.URL.replace(window.location.search,"").match(/^https:\/\/live\.bilibili\.com\/record\/(.+)/);if(!e)return void(0,d.logError)(new Error(`获取录像ID失败: ${document.URL}`));const o=e[1],t=await(0,i.getJson)(`https://api.live.bilibili.com/xlive/web-room/v1/record/getLiveRecordUrl?rid=${o}&platform=html5`);if(0!==t.code)return void(0,d.logError)(new Error(`获取录像链接失败: ${t.message}`));const n=t.data.list.map((e=>e.url));s.Toast.success(n.map((e=>`${e}`)).join("\n"),"下载录像")}finally{this.disabled=!1}}}}),n,[],!1,null,null,null);a.options.__file="registry/lib/components/live/download-records/DownloadRecords.vue";var c=a.exports}},o={};function t(n){var r=o[n];if(void 0!==r)return r.exports;var i=o[n]={exports:{}};return e[n](i,i.exports,t),i.exports}t.d=function(e,o){for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){t.d(n,{component:function(){return e}});const e={name:"downloadLiveRecords",displayName:"直播录像下载",description:{"zh-CN":"在直播录像页面 `live.bilibili.com/record/` 中添加下载支持."},tags:[componentsTags.live],entry:none,widget:{component:()=>Promise.resolve().then(t.bind(t,420)).then((e=>e.default))},urlInclude:[/^https:\/\/live\.bilibili\.com\/record\/(.+)/],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),n=n.component}()})); \ No newline at end of file +!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["live/download-records"]=o():e["live/download-records"]=o()}(self,(function(){return function(){"use strict";var e={420:function(e,o,t){t.r(o),t.d(o,{default:function(){return c}});var n=function(){var e=this,o=e.$createElement;return(e._self._c||o)("DefaultWidget",{staticClass:"download-live-records",attrs:{disabled:e.disabled,name:"下载录像",icon:"mdi-download"},on:{click:function(o){return e.download()}}})};n._withStripped=!0;var r=coreApis.ui,i=coreApis.ajax,s=coreApis.toast,a=coreApis.utils.log;var d=function(e,o,t,n,r,i,s,a){var d,c="function"==typeof e?e.options:e;if(o&&(c.render=o,c.staticRenderFns=t,c._compiled=!0),n&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=d):r&&(d=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),d)if(c.functional){c._injectStyles=d;var l=c.render;c.render=function(e,o){return d.call(o),l(e,o)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,d):[d]}return{exports:e,options:c}}(Vue.extend({components:{DefaultWidget:r.DefaultWidget},data:()=>({disabled:!1}),methods:{async download(){try{this.disabled=!0;const e=document.URL.replace(window.location.search,"").match(/^https:\/\/live\.bilibili\.com\/record\/(.+)/);if(!e)return void(0,a.logError)(new Error(`获取录像ID失败: ${document.URL}`));const o=e[1],t=await(0,i.getJson)(`https://api.live.bilibili.com/xlive/web-room/v1/record/getLiveRecordUrl?rid=${o}&platform=html5`);if(0!==t.code)return void(0,a.logError)(new Error(`获取录像链接失败: ${t.message}`));const n=t.data.list.map((e=>e.url));s.Toast.success(n.map((e=>`${e}`)).join("\n"),"下载录像")}finally{this.disabled=!1}}}}),n,[],!1,null,null,null);d.options.__file="registry/lib/components/live/download-records/DownloadRecords.vue";var c=d.exports}},o={};function t(n){var r=o[n];if(void 0!==r)return r.exports;var i=o[n]={exports:{}};return e[n](i,i.exports,t),i.exports}t.d=function(e,o){for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){t.d(n,{component:function(){return e}});const e={name:"downloadLiveRecords",displayName:"直播录像下载",description:{"zh-CN":"在直播录像页面 `live.bilibili.com/record/` 中添加下载支持."},tags:[componentsTags.live],entry:none,widget:{component:()=>Promise.resolve().then(t.bind(t,420)).then((e=>e.default))},urlInclude:[/^https:\/\/live\.bilibili\.com\/record\/(.+)/],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),n=n.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/gift-box.js b/registry/dist/components/live/gift-box.js index 9d59a030e..c687b0d65 100644 --- a/registry/dist/components/live/gift-box.js +++ b/registry/dist/components/live/gift-box.js @@ -6,4 +6,4 @@ e.i=function(n,t,o){"string"==typeof n&&( // eslint-disable-next-line no-param-reassign n=[[null,n,""]]);var r={};if(o)for(var l=0;l{let t;(0,n.waitForControlBar)({init:()=>(0,e.addStyle)(i(),"fullscreen-gift-box"),callback:async n=>{const e=dq(n,".right-area");if(e){if(!dq(e,".fullscreen-gift-box")){if(!t){const n=".gift-package";t=document.createElement("div"),t.innerHTML="包裹",t.classList.add(c),t.addEventListener("click",(()=>{dq(n)?.click()}))}e.appendChild(t)}}else console.warn("[fullscreenGiftBox] ref elements not found",null===e)}})},reload:()=>document.body.classList.remove("fullscreen-gift-box-unloaded"),unload:()=>document.body.classList.add("fullscreen-gift-box-unloaded"),commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +var i=this[l][0];null!=i&&(r[i]=!0)}for(var a=0;a{let t;(0,n.waitForControlBar)({init:()=>(0,e.addStyle)(i(),"fullscreen-gift-box"),callback:async n=>{const e=dq(n,".right-area");if(e){if(!dq(e,".fullscreen-gift-box")){if(!t){const n=".gift-package";t=document.createElement("div"),t.innerHTML="包裹",t.classList.add(a),t.addEventListener("click",(()=>{dq(n)?.click()}))}e.appendChild(t)}}else console.warn("[fullscreenGiftBox] ref elements not found",null===e)}})},reload:()=>document.body.classList.remove("fullscreen-gift-box-unloaded"),unload:()=>document.body.classList.add("fullscreen-gift-box-unloaded"),commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/home-mute.js b/registry/dist/components/live/home-mute.js index a9038cc14..3a0de908b 100644 --- a/registry/dist/components/live/home-mute.js +++ b/registry/dist/components/live/home-mute.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["live/home-mute"]=t():e["live/home-mute"]=t()}(self,(function(){return function(){"use strict";var e,t,n={569:function(e){e.exports=coreApis.spinQuery},109:function(e){e.exports=coreApis.utils}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return o}});var e=coreApis.settings,t=coreApis.style;const n=/^https:\/\/live\.bilibili\.com\/(index\.html)?$/,o={name:"liveHomeMute",displayName:"直播首页静音",tags:[componentsTags.live],description:{"zh-CN":"禁止直播首页的推荐直播间自动开始播放."},entry:async({metadata:n})=>{const o="hide-home-live";(0,e.addComponentListener)(`${n.name}.hide`,(e=>{e?(0,t.addStyle)(".player-area-ctnr,#player-header { display: none !important }",o):(0,t.removeStyle)(o)}),!0)},options:{hide:{displayName:"隐藏首页直播板块",defaultValue:!1}},urlInclude:[n],plugin:{displayName:"直播首页静音 - 提前执行",description:{"zh-CN":"提前执行代码以尽快静音."},async setup(){const{matchUrlPattern:e}=await Promise.resolve().then(r.t.bind(r,109,23));if(!e(n))return;const{select:t}=await Promise.resolve().then(r.t.bind(r,569,23));t("video").then((e=>{e.muted=!0}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["live/home-mute"]=t():e["live/home-mute"]=t()}(self,(function(){return function(){"use strict";var e,t,n={569:function(e){e.exports=coreApis.spinQuery},109:function(e){e.exports=coreApis.utils}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return o}});var e=coreApis.settings,t=coreApis.style;const n=/^https:\/\/live\.bilibili\.com\/(index\.html)?$/,o={name:"liveHomeMute",displayName:"直播首页静音",tags:[componentsTags.live],description:{"zh-CN":"禁止直播首页的推荐直播间自动开始播放."},entry:async({metadata:n})=>{const o="hide-home-live";(0,e.addComponentListener)(`${n.name}.hide`,(e=>{e?(0,t.addStyle)(".player-area-ctnr,#player-header { display: none !important }",o):(0,t.removeStyle)(o)}),!0)},options:{hide:{displayName:"隐藏首页直播板块",defaultValue:!1}},urlInclude:[n],plugin:{displayName:"直播首页静音 - 提前执行",description:{"zh-CN":"提前执行代码以尽快静音."},async setup(){const{matchUrlPattern:e}=await Promise.resolve().then(r.t.bind(r,109,23));if(!e(n))return;const{select:t}=await Promise.resolve().then(r.t.bind(r,569,23));t("video").then((e=>{e.muted=!0}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/pip.js b/registry/dist/components/live/pip.js index 0647e82b1..0ee1b1ff5 100644 --- a/registry/dist/components/live/pip.js +++ b/registry/dist/components/live/pip.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var o={};if(r)for(var i=0;iPromise.resolve().then(n.bind(n,573)).then((e=>e.default)),condition:()=>"requestPictureInPicture"in HTMLVideoElement.prototype},urlInclude:e.liveUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),c=[];function a(e){for(var t=-1,n=0;nPromise.resolve().then(n.bind(n,573)).then((e=>e.default)),condition:()=>"requestPictureInPicture"in HTMLVideoElement.prototype},urlInclude:e.liveUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/remove-watermark.js b/registry/dist/components/live/remove-watermark.js index 355d18acd..410b4919b 100644 --- a/registry/dist/components/live/remove-watermark.js +++ b/registry/dist/components/live/remove-watermark.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,980,23)))),displayName:"删除直播水印",tags:[componentsTags.live,componentsTags.style],description:{"zh-CN":"删除观看直播时角落的水印."},urlInclude:t.liveUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var u=0;uPromise.resolve().then(r.t.bind(r,980,23)))),displayName:"删除直播水印",tags:[componentsTags.live,componentsTags.style],description:{"zh-CN":"删除观看直播时角落的水印."},urlInclude:t.liveUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/showgirl.js b/registry/dist/components/live/showgirl.js index 9a577efb2..693a83883 100644 --- a/registry/dist/components/live/showgirl.js +++ b/registry/dist/components/live/showgirl.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["live/showgirl"]=t():e["live/showgirl"]=t()}(self,(function(){return function(){"use strict";var e,t,n={163:function(e){e.exports=coreApis.style}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return o}});var e=coreApis.utils.urls;const t="dpi-live-showgirl",n=async()=>{const{addStyle:e}=await Promise.resolve().then(r.t.bind(r,163,23));null===document.getElementById(t)&&e(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n `,t)},o={name:"dpiLiveShowgirl",displayName:"直播看板娘高 DPI 适配",enabledByDefault:window.devicePixelRatio>1,description:{"zh-CN":"根据屏幕 DPI 缩放直播看板娘的大小, 避免像素锯齿."},tags:[componentsTags.live,componentsTags.style],entry:n,reload:n,unload:()=>{document.getElementById(t)?.remove()},urlInclude:e.liveUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["live/showgirl"]=t():e["live/showgirl"]=t()}(self,(function(){return function(){"use strict";var e,t,n={163:function(e){e.exports=coreApis.style}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return o}});var e=coreApis.utils.urls;const t="dpi-live-showgirl",n=async()=>{const{addStyle:e}=await Promise.resolve().then(r.t.bind(r,163,23));null===document.getElementById(t)&&e(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n `,t)},o={name:"dpiLiveShowgirl",displayName:"直播看板娘高 DPI 适配",enabledByDefault:window.devicePixelRatio>1,description:{"zh-CN":"根据屏幕 DPI 缩放直播看板娘的大小, 避免像素锯齿."},tags:[componentsTags.live,componentsTags.style],entry:n,reload:n,unload:()=>{document.getElementById(t)?.remove()},urlInclude:e.liveUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/live/side-bar.js b/registry/dist/components/live/side-bar.js index 56c9782ce..cced4aa97 100644 --- a/registry/dist/components/live/side-bar.js +++ b/registry/dist/components/live/side-bar.js @@ -4,6 +4,6 @@ r.exports=function(r){var n=[];return n.toString=function(){return this.map((fun // eslint-disable-next-line func-names n.i=function(r,t,e){"string"==typeof r&&( // eslint-disable-next-line no-param-reassign -r=[[null,r,""]]);var o={};if(e)for(var i=0;iPromise.resolve().then(o.t.bind(o,984,23))}],displayName:"自动收起直播侧栏",description:'自动收起直播间右边偏下的侧栏. (上面有个 "关注" 的面板)',tags:[componentsTags.live,componentsTags.style],urlInclude:r.liveUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var i=this[a][0];null!=i&&(o[i]=!0)}for(var c=0;cPromise.resolve().then(o.t.bind(o,984,23))}],displayName:"自动收起直播侧栏",description:'自动收起直播间右边偏下的侧栏. (上面有个 "关注" 的面板)',tags:[componentsTags.live,componentsTags.style],urlInclude:r.liveUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),a=a.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/always-show-duration.js b/registry/dist/components/style/always-show-duration.js index d2b18d06a..8d7f3f48e 100644 --- a/registry/dist/components/style/always-show-duration.js +++ b/registry/dist/components/style/always-show-duration.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,539,23)))),displayName:"总是显示视频时长",description:{"zh-CN":"使脚本展示的各种视频卡片中的时长无需鼠标经过也能一直显示."},tags:[componentsTags.video,componentsTags.style],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var u=0;uPromise.resolve().then(r.t.bind(r,539,23)))),displayName:"总是显示视频时长",description:{"zh-CN":"使脚本展示的各种视频卡片中的时长无需鼠标经过也能一直显示."},tags:[componentsTags.video,componentsTags.style],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/auto-hide-sidebar.js b/registry/dist/components/style/auto-hide-sidebar.js index 7f0fb0558..cd0b45d7d 100644 --- a/registry/dist/components/style/auto-hide-sidebar.js +++ b/registry/dist/components/style/auto-hide-sidebar.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,879,23)),important:!0}],tags:[componentsTags.style,componentsTags.general],description:{"zh-CN":"自动隐藏脚本的侧栏 (功能和设置图标). 设置面板停靠在右侧时不建议使用, 因为网页的滚动条会占用右边缘的触发区域."},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;cPromise.resolve().then(r.t.bind(r,879,23)),important:!0}],tags:[componentsTags.style,componentsTags.general],description:{"zh-CN":"自动隐藏脚本的侧栏 (功能和设置图标). 设置面板停靠在右侧时不建议使用, 因为网页的滚动条会占用右边缘的触发区域."},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/custom-navbar.js b/registry/dist/components/style/custom-navbar.js index 2772f386f..a30bc13e7 100644 --- a/registry/dist/components/style/custom-navbar.js +++ b/registry/dist/components/style/custom-navbar.js @@ -25,4 +25,4 @@ t=[[null,t,""]]);var a={};if(i)for(var r=0;rPromise.resolve().then(n.bind(n,2542)).then((t=>t.default)),lazy:!1},l="https://www.bilibili.com/v/popular/rank/",d={name:"ranking",displayName:"排行",content:"排行",href:`${l}all`,active:document.URL.startsWith(l),touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,2632)).then((t=>t.default))},p={name:"userInfo",displayName:"个人信息",content:()=>Promise.resolve().then(n.bind(n,399)).then((t=>t.default)),href:(0,a.getUID)()?"https://space.bilibili.com":null,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,7437)).then((t=>t.default)),lazy:!1,noPopupPadding:!0,boundingWidth:240},u={name:"logo",displayName:"Logo",content:()=>Promise.resolve().then(n.bind(n,969)).then((t=>t.default)),href:"https://www.bilibili.com/"},m={name:"home",displayName:"主站",content:"主站",href:"https://www.bilibili.com/",touch:!0,boundingWidth:366,popupContent:()=>Promise.resolve().then(n.bind(n,1742)).then((t=>t.default))},f=t=>({...t,name:`${t.iframeName}Iframe`,content:t.displayName,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,4666)).then((t=>t.default)),boundingWidth:t.width,noPopupPadding:!0,transparentPopup:!0}),h=f({src:"https://www.bilibili.com/page-proxy/game-nav.html",href:"https://game.bilibili.com/",width:680,height:260,lazy:!0,displayName:"游戏中心",iframeName:"games"}),g=f({src:"https://live.bilibili.com/blackboard/dropdown-menu.html",href:"https://live.bilibili.com",width:528,height:266,lazy:!0,displayName:"直播",iframeName:"lives"}),v=f({src:"https://manga.bilibili.com/eden/bilibili-nav-panel.html",href:"https://manga.bilibili.com",width:720,height:266,lazy:!0,displayName:"漫画",iframeName:"manga"}),b=new Array(4).fill(0).map(((t,e)=>({name:`blank${e+1}`,displayName:`弹性空白${e+1}`,content:"",disabled:!0,flexStyle:"1 0 auto"}))),x=t=>({...t,content:t.displayName,active:document.URL.startsWith(t.href)}),y=(x({name:"ranking",displayName:"排行",href:"https://www.bilibili.com/v/popular/rank/all"}),x({name:"bangumi",displayName:"番剧",href:"https://www.bilibili.com/anime/"})),w=x({name:"drawing",displayName:"相簿",href:"https://h.bilibili.com"}),_=x({name:"music",displayName:"音频",href:"https://www.bilibili.com/audio/home/"}),C=x({name:"shop",displayName:"会员购",href:"https://show.bilibili.com"}),k=x({name:"match",displayName:"赛事",href:"https://www.bilibili.com/v/game/match/"}),S={name:"upload",displayName:"投稿",content:()=>Promise.resolve().then(n.bind(n,6426)).then((t=>t.default)),touch:!0,href:"https://member.bilibili.com/v2#/upload/video/frame",popupContent:()=>Promise.resolve().then(n.bind(n,4037)).then((t=>t.default))},V={name:"search",displayName:"搜索",content:()=>Promise.resolve().then(n.bind(n,5700)).then((t=>t.default)),disabled:!0},N={name:"feeds",displayName:"动态",content:"动态",href:"https://t.bilibili.com/",touch:!0,active:"https://t.bilibili.com/"===document.URL.replace(window.location.search,""),contentMounted:async t=>{const{getNotifyCount:e}=await Promise.resolve().then(n.t.bind(n,3864,23));await(async()=>{const n=await e();t.notifyCount=n})()},loginRequired:!0,popupContent:()=>Promise.resolve().then(n.bind(n,4196)).then((t=>t.default)),boundingWidth:300,noPopupPadding:!0};var I=n(2194);const L={name:"watchlater",displayName:"稍后再看",content:"稍后再看",href:"https://www.bilibili.com/watchlater/#/list",touch:!0,active:document.URL.startsWith("https://www.bilibili.com/watchlater/"),loginRequired:!0,boundingWidth:380,noPopupPadding:!0,popupContent:()=>Promise.resolve().then(n.bind(n,5878)).then((t=>t.default))},P=`https://space.bilibili.com/${(0,a.getUID)()}/favlist`,O={name:"favorites",displayName:"收藏",content:"收藏",href:P,touch:!0,active:document.URL.replace(/\?.*$/,"")===P,loginRequired:!0,boundingWidth:380,noPopupPadding:!0,popupContent:()=>Promise.resolve().then(n.bind(n,3995)).then((t=>t.default))},j="https://www.bilibili.com/account/history",z={name:"history",displayName:"历史",content:"历史",href:j,active:document.URL.replace(/\?.*$/,"")===j,loginRequired:!0,boundingWidth:350,noPopupPadding:!0,popupContent:()=>Promise.resolve().then(n.bind(n,712)).then((t=>t.default))},[E,$,T,D]=b;var M=n(12),A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:!t.item.hidden,expression:"!item.hidden"}],staticClass:"custom-navbar-item",class:{disabled:t.item.disabled,active:t.item.active},style:{flex:t.item.flexStyle,order:t.item.order},attrs:{role:"listitem","data-name":t.item.name}},[t.item.href?n("CustomNavbarLink",{staticClass:"main-content",attrs:{"new-tab":t.newTab,href:!t.item.active&&!t.item.touch&&t.item.href},on:{mouseover:function(e){return e.target!==e.currentTarget?null:t.requestPopup()}}},["string"==typeof t.item.content?[t._v("\n "+t._s(t.item.content)+"\n ")]:n(t.item.content,{tag:"component",attrs:{item:t.item}})],2):n("div",{staticClass:"main-content",on:{click:function(e){!t.item.active&&!t.item.touch&&t.item.clickAction&&t.item.clickAction(e)}}},["string"==typeof t.item.content?[t._v("\n "+t._s(t.item.content)+"\n ")]:n(t.item.content,{tag:"component",attrs:{item:t.item}})],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.item.active,expression:"!item.active"}],staticClass:"notify-count"},[t.item.notifyCount>0?[t._v("\n "+t._s(t.item.notifyCount)+"\n ")]:t._e()],2),t._v(" "),n("div",{ref:"popupContainer",staticClass:"popup-container"},[t.item.popupContent?n("div",{staticClass:"popup",class:t.popupClasses(t.item)},[t.item.requestedPopup?n(t.item.popupContent,{ref:"popup",tag:"component",attrs:{container:t.$refs.popupContainer,item:t.item}}):t._e()],1):t._e()]),t._v(" "),n("div",{staticClass:"active-bar"})],1)};A._withStripped=!0;var B=n(407),U=function(){var t=this,e=t.$createElement;return(t._self._c||e)("a",t._g(t._b({attrs:{target:t.newTab?"_blank":null}},"a",t.$attrs,!1),t.$listeners),[t._t("default")],2)};U._withStripped=!0;var F=Vue.extend({props:{newTab:{type:Boolean,default:!0}}}),W=n(1900),R=(0,W.Z)(F,U,[],!1,null,null,null);R.options.__file="registry/lib/components/style/custom-navbar/CustomNavbarLink.vue";var q=R.exports;const Z=t=>{const{name:e}=t,n=M.kO.navbarOptions;return e in n.openInNewTabOverrides?n.openInNewTabOverrides[e]:n.openInNewTab};var H=Vue.extend({components:{CustomNavbarLink:q},props:{item:{type:M.kO,required:!0}},data(){return{newTab:Z(this.item),cancelListeners:none}},mounted(){const t=this.item;t.contentMounted?.(t);const e=()=>{this.updateLinkOption()};(0,B.addComponentListener)("customNavbar.openInNewTabOverrides",e),(0,B.addComponentListener)("customNavbar.openInNewTab",e),this.cancelListeners=()=>{(0,B.removeComponentListener)("customNavbar.openInNewTabOverrides",e),(0,B.removeComponentListener)("customNavbar.openInNewTab",e)}},beforeDestroy(){this.cancelListeners?.()},methods:{updateLinkOption(){this.newTab=Z(this.item)},popupClasses:t=>({transparent:t.transparentPopup,"no-padding":t.noPopupPadding,"iframe-container":t.iframeName}),triggerPopupShow:lodash.debounce((function(){const{popup:t}=this.$refs;t&&"popupShow"in t&&"function"==typeof t.popupShow&&t.popupShow()}),300),async requestPopup(){const{item:t}=this;t.requestedPopup||t.disabled||(t.requestedPopup=!0),this.triggerPopupShow()}}}),J=n(3379),Y=n.n(J),X=n(9065),G=n.n(X),Q={insert:"head",singleton:!1},K=(Y()(G(),Q),G().locals,(0,W.Z)(H,A,[],!1,null,null,null));K.options.__file="registry/lib/components/style/custom-navbar/CustomNavbarItem.vue";var tt=K.exports,et=coreApis.observer,nt=coreApis.spinQuery,it=coreApis.utils.urls;const[at]=(0,o.registerAndGetData)(M.rm,[E,u,m,y,d,w,_,h,g,C,k,v,$,V,T,p,c,N,I.V,L,O,z,S,D]),[rt]=(0,o.registerAndGetData)(M.Je,{items:[]}),ot=()=>{const t=Boolean((0,a.getUID)()),e=at.filter((e=>!(e.loginRequired&&!t))).map((t=>new M.kO(t))).sort((0,r.ascendingSort)((t=>t.order)));return rt.items=e,e};var st=Vue.extend({components:{NavbarItem:tt},data:()=>({initItems:at,items:ot(),styles:[]}),watch:{initItems(){this.items=ot()}},async mounted(){await(async t=>{(0,it.matchCurrentPage)(it.mainSiteUrls)&&(0,nt.sq)((()=>dq("#banner_link,.international-header .bili-banner, .bili-header__banner")),(t=>null!==t&&Boolean(t.style.backgroundImage))).then((e=>{e&&(0,et.attributes)(e,(()=>{(0,B.addComponentListener)("customNavbar.transparent",(e=>{(0,B.getComponentSettings)("hideBanner").enabled||t.toggleStyle(e,"transparent")}),!0),(0,B.addComponentListener)("hideBanner",(e=>{(0,B.getComponentSettings)("customNavbar").options.transparent&&t.toggleStyle(!e,"transparent")}))}))}))})(this)},methods:{toggleStyle(t,e){t&&!this.styles.includes(e)?this.styles.push(e):!t&&this.styles.includes(e)&&this.styles.splice(this.styles.indexOf(e),1)}}}),ct=n(5173),lt=n.n(ct),dt={insert:"head",singleton:!1},pt=(Y()(lt(),dt),lt().locals,(0,W.Z)(st,i,[],!1,null,null,null));pt.options.__file="registry/lib/components/style/custom-navbar/CustomNavbar.vue";var ut=pt.exports},3995:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return I}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"favorites-list"},[n("div",{staticClass:"header"},[n("FavoritesFolderSelect",{model:{value:t.folder,callback:function(e){t.folder=e},expression:"folder"}}),t._v(" "),n("div",{staticClass:"search"},[n("TextBox",{attrs:{linear:"",placeholder:"搜索"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("a",{staticClass:"operation",attrs:{href:t.playLink,title:"播放全部",target:"_blank"}},[n("VButton",{staticClass:"play-all",attrs:{round:""}},[n("VIcon",{attrs:{icon:"mdi-play",size:18}})],1)],1),t._v(" "),n("a",{staticClass:"operation",attrs:{href:t.moreLink,title:"查看更多",target:"_blank"}},[n("VButton",{staticClass:"more-info",attrs:{round:""}},[n("VIcon",{attrs:{icon:"mdi-dots-horizontal",size:18}})],1)],1)],1),t._v(" "),n("div",{staticClass:"content"},[t.loading&&!t.searching?n("VLoading"):t.loading||t.canLoadMore||0!==t.filteredCards.length?n("transition-group",{staticClass:"cards",attrs:{name:"cards",tag:"div"}},[t._l(t.filteredCards,(function(e){return n("div",{key:e.id,staticClass:"favorite-card"},[n("a",{staticClass:"cover-container",attrs:{target:"_blank",href:"https://www.bilibili.com/video/"+e.bvid}},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{width:130,height:85}}}),t._v(" "),n("div",{staticClass:"floating duration"},[t._v(t._s(e.durationText))]),t._v(" "),n("div",{staticClass:"floating favorite-time"},[t._v(t._s(e.favoriteTime))])],1),t._v(" "),n("a",{staticClass:"title",attrs:{target:"_blank",href:"https://www.bilibili.com/video/"+e.bvid,title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.upID,title:e.upName}},[n("DpiImage",{staticClass:"face",attrs:{"placeholder-image":"",src:e.upFaceUrl,size:20}}),t._v(" "),n("div",{staticClass:"name"},[t._v(t._s(e.upName))])],1)])})),t._v(" "),t.canLoadMore?n("ScrollTrigger",{key:"scroll-trigger",on:{trigger:function(e){return t.scrollTrigger()}}}):t._e()],2):n("VEmpty")],1)])};i._withStripped=!0;var a=n(8643),r=n(8117),o=n(3109),s=n(3663),c=n(5729),l=n(407);const d={id:0,name:"加载中...",count:0};var p=function(){var t=this,e=t.$createElement;return(t._self._c||e)("VDropdown",{staticClass:"favorites-folder-select",attrs:{round:"",items:t.folders,"key-mapper":function(t){return t.id},value:t.folder},on:{change:function(e){return t.change(e)}},scopedSlots:t._u([{key:"item",fn:function(e){var n=e.item;return[t._v("\n "+t._s(n.name)+"\n ")]}}])})};p._withStripped=!0;const u=(0,l.getComponentSettings)("customNavbar").options;var m=Vue.extend({components:{VDropdown:a.VDropdown},model:{prop:"folder",event:"change"},props:{folder:{type:Object,required:!0}},data:()=>({folders:[]}),async created(){const t=(0,o.getUID)();if(!t)return;const e=`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${t}&is_space=0`,n=await(0,s.getJsonWithCredentials)(e);if(0!==n.code)throw new Error(`获取收藏夹列表失败: ${n.message}`);if(this.folders=lodash.get(n,"data.list",[]).map((t=>({id:t.id,name:t.title,count:t.media_count}))),this.folders.length>0&&this.folder.id===d.id){const{lastFavoriteFolder:t}=u,e=this.folders.find((e=>e.id===t));e?this.$emit("change",e):this.$emit("change",this.folders[0])}},methods:{change(t){u.lastFavoriteFolder=t.id,this.$emit("change",t)}}}),f=n(1900),h=(0,f.Z)(m,p,[],!1,null,null,null);h.options.__file="registry/lib/components/style/custom-navbar/favorites/FavoritesFolderSelect.vue";var g=h.exports,v=n(3037);const b=(0,l.getComponentSettings)("customNavbar").options,x=t=>!!b.showDeadVideos||9!==t.attr&&1!==t.attr,y=t=>({id:t.id,aid:t.id,bvid:t.bvid,coverUrl:t.cover.replace("http:","https:"),favoriteTimestamp:1e3*t.fav_time,favoriteTime:(0,r.formatDate)(new Date(1e3*t.fav_time)),title:t.title,description:t.intro,duration:t.duration,durationText:(0,r.formatDuration)(t.duration),playCount:t.cnt_info.play,danmakuCount:t.cnt_info.danmaku,upName:t.upper.name,upFaceUrl:t.upper.face.replace("http:","https:"),upID:t.upper.mid});var w=Vue.extend({components:{FavoritesFolderSelect:g,VLoading:a.VLoading,VEmpty:a.VEmpty,VIcon:a.VIcon,VButton:a.VButton,TextBox:a.TextBox,DpiImage:a.DpiImage,ScrollTrigger:a.ScrollTrigger},mixins:[v.u],data:()=>({loading:!0,cards:[],filteredCards:[],page:1,hasMorePage:!0,searchPage:1,hasMoreSearchPage:!0,search:"",folder:d}),computed:{searching(){return""!==this.search},moreLink(){const{id:t}=this.folder;return 0===t?`https://space.bilibili.com/${(0,o.getUID)()}/favlist`:`https://space.bilibili.com/${(0,o.getUID)()}/favlist?fid=${t}`},playLink(){const{id:t}=this.folder;if(0!==t)return`https://www.bilibili.com/medialist/play/ml${t}`},canLoadMore(){return this.searching?this.hasMoreSearchPage:this.hasMorePage}},watch:{folder(){this.changeList()},search(t){""!==t?(t=t.toLowerCase(),this.hasMoreSearchPage=!0,this.searchPage=1,this.filteredCards=this.cards.filter((e=>e.title.toLowerCase().includes(t)||e.upName.toLowerCase().includes(t)))):this.filteredCards=this.cards}},methods:{async getCards(){const t=`https://api.bilibili.com/medialist/gateway/base/spaceDetail?media_id=${this.folder.id}&pn=${this.page}&ps=20`,e=await(0,s.getJsonWithCredentials)(t);if(0!==e.code)throw new Error(`加载收藏夹内容失败: ${e.message}`);return e.data.medias?e.data.medias.filter(x).map(y):[]},async changeList(){if(0!==this.folder.id)try{this.search="",this.cards=[],this.loading=!0,this.searchPage=1,this.hasMoreSearchPage=!0,this.page=1,this.hasMorePage=!0,this.cards=await this.getCards(),this.filteredCards=this.cards}catch(t){(0,c.logError)(t)}finally{this.loading=!1}},async loadNextPage(){try{this.page++;const t=await this.getCards();this.cards.push(...t),this.hasMorePage=0===t.length||this.cards.lengtht.id));this.filteredCards=a;const r=n.length+i.length===0,o=i.length<20;if(r||o)return void(this.hasMoreSearchPage=!1)}catch(t){console.error(t)}finally{this.loading=!1}}),200),scrollTrigger(){this.searching?this.debounceSearchAllList():this.loadNextPage()}}}),_=n(3379),C=n.n(_),k=n(6410),S=n.n(k),V={insert:"head",singleton:!1},N=(C()(S(),V),S().locals,(0,f.Z)(w,i,[],!1,null,null,null));N.options.__file="registry/lib/components/style/custom-navbar/favorites/NavbarFavorites.vue";var I=N.exports},4196:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"navbar-feeds"},[n("TabControl",{ref:"tabControl",attrs:{tabs:t.tabs,"more-link":"https://t.bilibili.com/"},scopedSlots:t._u([{key:"more-link",fn:function(){return[t._v("\n 所有动态\n "),n("VIcon",{attrs:{icon:"feeds",size:18}})]},proxy:!0}])})],1)};i._withStripped=!0;var a=n(8643),r=n(2023),o=n(3864),s=n(3037);const c=[{name:"video",displayName:"视频",component:()=>Promise.resolve().then(n.bind(n,7747)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=8",count:0},{name:"bangumi",displayName:"番剧",component:()=>Promise.resolve().then(n.bind(n,9312)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=512,4097,4098,4099,4100,4101",count:0},{name:"column",displayName:"专栏",component:()=>Promise.resolve().then(n.bind(n,1728)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=64",count:0},{name:"live",displayName:"直播",component:()=>Promise.resolve().then(n.bind(n,1141)).then((t=>t.default)),activeLink:"https://link.bilibili.com/p/center/index#/user-center/follow/1",count:0}];var l=Vue.extend({components:{TabControl:a.TabControl,VIcon:a.VIcon},mixins:[s.u],data:()=>({tabs:c}),mounted(){this.refreshNotifyCount()},methods:{popupShow(){this.item.notifyCount=0},async refreshNotifyCount(){const{tabControl:t}=this.$refs;c.forEach((async e=>{if(t.selectedTab===e)return;if("live"===e.name)return;const n=await(0,o.getNotifyCount)(r.feedsCardTypes[e.name].id.toString());e.count=n,console.log(e)}))}}}),d=n(3379),p=n.n(d),u=n(3030),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/feeds/NavbarFeeds.vue";var g=h.exports},9312:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"bangumi-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"bangumi-feeds-content"},t._l(t.cards,(function(t){return n("BangumiCard",{key:t.id,attrs:{"is-new":t.new,data:t}})})),1),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a=n(2023),r=n(3864),o=coreApis.componentApis.feeds.BangumiCard,s=n.n(o),c=n(8281),l=Vue.extend({components:{BangumiCard:s()},mixins:[(0,c.I)(a.feedsCardTypes.bangumi,(t=>{const e=JSON.parse(t.card);return{id:t.desc.dynamic_id_str,title:e.apiSeasonInfo.title,coverUrl:e.apiSeasonInfo.cover,epCoverUrl:e.cover,epTitle:e.new_desc,url:e.url,get new(){return(0,r.isNewID)(this.id)}}}))]}),d=n(3379),p=n.n(d),u=n(4728),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/BangumiFeeds.vue";var g=h.exports},1728:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"column-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"columns-feeds-content"},t._l(t.cards,(function(t){return n("ColumnCard",{key:t.id,attrs:{"is-new":t.new,data:t}})})),1),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a=n(2023),r=n(3864),o=coreApis.componentApis.feeds.ColumnCard,s=n.n(o),c=n(8281),l=Vue.extend({components:{ColumnCard:s()},mixins:[(0,c.I)(a.feedsCardTypes.column,(t=>{const e=JSON.parse(t.card);return{id:t.desc.dynamic_id_str,cvID:e.id,title:e.title,upName:e.author.name,upFaceUrl:e.author.face,upID:e.author.mid,description:e.summary,covers:e.image_urls,originalCovers:e.origin_image_urls,get new(){return(0,r.isNewID)(this.id)}}}))]}),d=n(3379),p=n.n(d),u=n(8994),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/ColumnFeeds.vue";var g=h.exports},1141:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"live-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?t._e():n("VEmpty"),t._v(" "),n("transition-group",{staticClass:"live-feeds-content",attrs:{name:"cards",tag:"div"}},t._l(t.cards,(function(e){return n("a",{key:e.id,staticClass:"live-card",attrs:{target:"_blank",href:e.url}},[n("div",{staticClass:"face-container"},[n("DpiImage",{staticClass:"face",attrs:{size:48,src:e.upFaceUrl}})],1),t._v(" "),n("div",{staticClass:"live-info"},[n("div",{staticClass:"live-title",attrs:{title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("div",{staticClass:"live-name",attrs:{title:e.name}},[t._v(t._s(e.upName))])])])})),0)],1)};i._withStripped=!0;var a=n(8643),r=n(3663),o=Vue.extend({components:{VLoading:a.VLoading,VEmpty:a.VEmpty,DpiImage:a.DpiImage},data:()=>({loading:!0,rawItems:[],hasMorePage:!0}),computed:{cards(){return this.rawItems.map((t=>({id:t.roomid,title:t.title,upFaceUrl:t.face,upName:t.uname,url:t.link})))}},async created(){const[t]=(0,r.responsiveGetPages)({api:t=>(0,r.getJsonWithCredentials)(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${t}&pagesize=24`),getList:t=>lodash.get(t,"data.list",[]),getTotal:t=>lodash.get(t,"data.results",0)});this.rawItems=await t,this.loading=!1}}),s=n(3379),c=n.n(s),l=n(2422),d=n.n(l),p={insert:"head",singleton:!1},u=(c()(d(),p),d().locals,(0,n(1900).Z)(o,i,[],!1,null,null,null));u.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/LiveFeeds.vue";var m=u.exports},7747:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return x}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"video-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"video-feeds-content"},[n("transition-group",{staticClass:"left-column",attrs:{name:"cards",tag:"div"}},t._l(t.columnedCards.left,(function(t){return n("VideoCard",{key:t.id,attrs:{orientation:"vertical","is-new":t.new,"show-stats":!1,data:t}})})),1),t._v(" "),n("transition-group",{staticClass:"right-column",attrs:{name:"cards",tag:"div"}},t._l(t.columnedCards.right,(function(t){return n("VideoCard",{key:t.id,attrs:{orientation:"vertical","is-new":t.new,"show-stats":!1,data:t}})})),1)],1),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a=n(8117),r=n(3864),o=n(2023),s=coreApis.componentApis.feeds.VideoCard,c=n.n(s),l=n(8281);const d=t=>{const e=Number(new Date),n=new Date(t),i=[n.getHours(),n.getMinutes(),n.getSeconds()].map((t=>t.toString().padStart(2,"0"))).join(":");let a;return a=new Date(e).getFullYear()!==n.getFullYear()?[n.getFullYear(),n.getMonth()+1,n.getDate()]:[n.getMonth()+1,n.getDate()],`${a.map((t=>t.toString().padStart(2,"0"))).join("-")} ${i}`},p=t=>{const e=Number(new Date);if(e-864e5t.toString().padStart(2,"0"))).join("-")}`};var u=Vue.extend({components:{VideoCard:c()},mixins:[(0,l.I)(o.feedsCardTypes.video,(t=>{const e=JSON.parse(t.card);return{id:t.desc.dynamic_id_str,aid:e.aid,bvid:t.desc.bvid,videoUrl:`https://www.bilibili.com/${t.desc.bvid}`,coverUrl:e.pic,title:e.title,duration:e.duration,durationText:(0,a.formatDuration)(e.duration),description:e.desc,pubTime:d(1e3*e.pubdate),pubTimeText:p(1e3*e.pubdate),upFaceUrl:t.desc.user_profile.info.face,upName:t.desc.user_profile.info.uname,upID:t.desc.user_profile.info.uid,watchlater:!0,playCount:(0,a.formatCount)(e.stat.view),get new(){return(0,r.isNewID)(this.id)}}}))],computed:{columnedCards(){const{cards:t}=this;return{left:t.filter(((t,e)=>e%2==0)),right:t.filter(((t,e)=>e%2!=0))}}},methods:{onCardsUpdate:t=>(0,o.groupVideoFeeds)(t)}}),m=n(3379),f=n.n(m),h=n(4812),g=n.n(h),v={insert:"head",singleton:!1},b=(f()(g(),v),g().locals,(0,n(1900).Z)(u,i,[],!1,null,"6e663916",null));b.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/VideoFeeds.vue";var x=b.exports},712:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return _}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"history-list"},[n("div",{staticClass:"header"},[n("div",{staticClass:"header-row"},[n("div",{staticClass:"search"},[n("TextBox",{attrs:{placeholder:"搜索",linear:""},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("div",{staticClass:"operations"},[n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/account/history"}},[n("VButton",{attrs:{title:"查看更多",round:""}},[n("VIcon",{attrs:{icon:"mdi-dots-horizontal",size:18}})],1)],1)])]),t._v(" "),n("div",{staticClass:"header-row"},[n("div",{staticClass:"row-title"},[t._v("\n 过滤:\n ")]),t._v(" "),n("div",{staticClass:"type-filters"},t._l(t.types,(function(e){return n("div",{key:e.name,staticClass:"type-filter"},[n("VButton",{class:{checked:e.checked},attrs:{round:"",title:(e.checked?"不显示":"显示")+e.displayName},on:{click:function(n){return t.toggleTypeFilter(e)}}},[n("VIcon",{attrs:{icon:e.icon,size:18}}),t._v("\n "+t._s(e.displayName)+"\n ")],1)],1)})),0)])]),t._v(" "),n("div",{staticClass:"content"},[t.loading?n("VLoading"):t.loading||0!==t.groups.length?n("transition-group",{staticClass:"cards",attrs:{name:"cards",tag:"div"}},[t._l(t.groups,(function(e){return n("div",{key:e.name,staticClass:"time-group"},[n("div",{staticClass:"time-group-name"},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("transition-group",{staticClass:"time-group-items",attrs:{name:"time-group",tag:"div"}},t._l(e.items,(function(e){return n("div",{key:e.id,staticClass:"time-group-item"},[n("a",{staticClass:"cover-container",attrs:{target:"_blank",href:e.url}},[n("DpiImage",{staticClass:"cover",attrs:{src:e.cover,size:{width:160,height:110},"placeholder-image":""}}),t._v(" "),e.progress?n("div",{staticClass:"progress",style:{width:100*e.progress+"%"}}):t._e(),t._v(" "),e.progressText?n("div",{staticClass:"floating progress-number"},[t._v(t._s(e.progress>=1?"已看完":e.progressText))]):t._e(),t._v(" "),void 0!==e.liveStatus?n("div",{staticClass:"floating duration live-status",class:{on:1===e.liveStatus}},[t._v(t._s(1===e.liveStatus?"直播中":"未开播"))]):t._e(),t._v(" "),e.durationText?n("div",{staticClass:"floating duration"},[t._v(t._s(e.durationText))]):t._e()],1),t._v(" "),n("a",{staticClass:"title",attrs:{target:"_blank",href:e.url,title:e.title}},[t._v(t._s(e.title||e.upName+"的直播间"))]),t._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"pgc"===e.type?e.url:"https://space.bilibili.com/"+e.upID,title:e.upName}},[e.upFaceUrl?n("DpiImage",{staticClass:"up-face",attrs:{size:18,src:e.upFaceUrl}}):t._e(),t._v(" "),n("div",{staticClass:"up-name"},[t._v(t._s(e.upName))])],1),t._v(" "),e.timeText?n("div",{staticClass:"time",attrs:{title:new Date(e.viewAt).toLocaleString()}},[t._v("\n "+t._s(e.timeText)+"\n ")]):t._e()])})),0)],1)})),t._v(" "),t.canNextPage?n("ScrollTrigger",{key:"scroll-trigger",on:{trigger:function(e){return t.nextPage()}}}):t._e()],2):n("VEmpty")],1)])};i._withStripped=!0;var a=n(4522),r=n(8643),o=n(3037),s=n(3663),c=n(3109),l=n(8117);let d;!function(t){t.Video="archive",t.Live="live",t.Article="article",t.Bangumi="pgc"}(d||(d={}));const p=[{name:d.Video,displayName:"视频",icon:"mdi-play-circle-outline",checked:!0},{name:d.Bangumi,displayName:"番剧",icon:"mdi-television-classic",checked:!0},{name:d.Live,displayName:"直播",icon:"mdi-video-wireless-outline",checked:!0},{name:d.Article,displayName:"专栏",icon:"mdi-newspaper-variant-outline",checked:!0}],u=()=>{const t=new Date,e=Number(new Date(t.getFullYear(),t.getMonth(),t.getDate())),n=864e5;return{now:t,today:e,oneDay:n,yesterday:e-n,lastWeek:e-7*n}},m=t=>{const{yesterday:e}=u();return Number(t)>=e?`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`:`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`},f=t=>{"article"===t.history.business&&(t.history.cid=t.history.oid);const{epid:e,bvid:n,cid:i,oid:a}=t.history,r=t.progress>0?`t=${t.progress}`:"t=0",o=-1===t.progress?1:t.progress/t.duration,s=t=>t.replace("http:","https:"),p=new Date(1e3*t.view_at),u={title:t.title,viewAt:1e3*t.view_at,time:p,timeText:m(p),cover:t.cover?s(t.cover):s(t.covers[0]),covers:t.covers?.map(s)??[],progress:o,progressText:Number.isNaN(o)?null:`${(0,c.fixed)(100*o,1)}%`,duration:t.duration,durationText:t.duration?(0,l.formatDuration)(t.duration):null,upName:t.author_name,upFaceUrl:s(t.author_face),upID:t.author_mid};if(e)return{...u,id:e,url:`https://www.bilibili.com/bangumi/play/ep${e}?${r}`,title:t.show_title||t.title,upName:t.title,type:d.Bangumi};if(n)return{...u,id:n,url:`https://www.bilibili.com/video/${n}?p=${t.history.page}&${r}`,type:d.Video};if(i)return{...u,id:i,url:`https://www.bilibili.com/read/cv${i}`,type:d.Article};if(a)return{...u,id:a,url:`https://live.bilibili.com/${a}`,liveStatus:t.live_status,type:d.Live};throw console.error("unknown history item type",t),new Error("未知的历史项目类型")};var h=Vue.extend({components:{VButton:r.VButton,VIcon:r.VIcon,TextBox:r.TextBox,VLoading:r.VLoading,VEmpty:r.VEmpty,ScrollTrigger:r.ScrollTrigger,DpiImage:r.DpiImage},mixins:[o.u],data:()=>({types:p,search:"",viewTime:0,cards:[],groups:[],loading:!0,hasMorePage:!0}),computed:{canNextPage(){return""===this.search&&!this.loading&&this.hasMorePage&&this.types.every((t=>t.checked))}},watch:{search:lodash.debounce((function(){this.updateGroups()}),200)},async created(){try{await this.nextPage()}finally{this.loading=!1}},methods:{toggleTypeFilter(t){t.checked=!t.checked,this.updateGroups()},filterFunc(t){return!p.some((e=>e.name===t.type&&!e.checked))&&!(!t.title.toLowerCase().includes(this.search.toLowerCase())&&!t.upName.toLowerCase().includes(this.search.toLowerCase()))},updateGroups(){this.groups=(t=>{if(0===t.length)return[];const{today:e,yesterday:n,lastWeek:i}=u(),a=lodash.groupBy(t,(t=>t.viewAt>=e?"今天":t.viewAt>=n?"昨天":t.viewAt>=i?"本周":"更早"));return Object.entries(a).map((([t,e])=>({name:t,items:e})))})(this.cards.filter(this.filterFunc))},async nextPage(){const t=await(async t=>{let e="https://api.bilibili.com/x/web-interface/history/cursor";t&&(e+=`?view_at=${Math.round(t/1e3)}`);const{list:n}=await(0,s.bilibiliApi)((0,s.getJsonWithCredentials)(e),"获取历史记录失败");return Array.isArray(n)?n.map(f):[]})(this.viewTime),e=lodash.uniqBy(this.cards.concat(t).sort((0,a.descendingSort)((t=>t.viewAt))),(t=>t.id));this.cards=e,this.updateGroups(),e.length>0&&(this.viewTime=lodash.last(e).viewAt),this.hasMorePage=0!==e.length}}}),g=n(3379),v=n.n(g),b=n(7337),x=n.n(b),y={insert:"head",singleton:!1},w=(v()(x(),y),x().locals,(0,n(1900).Z)(h,i,[],!1,null,null,null));w.options.__file="registry/lib/components/style/custom-navbar/history/NavbarHistory.vue";var _=w.exports},1742:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"home-popup",attrs:{role:"list"}},t._l(Object.entries(t.categories),(function(e){var i=e[0],a=e[1];return n("div",{key:i,staticClass:"category-item",class:{main:null!==a.code},attrs:{role:"listitem"}},[n("a",{attrs:{href:a.link,target:"_blank"}},[n("svg",{attrs:{"aria-hidden":"true"}},[n("use",{attrs:{href:"#header-icon-"+a.icon,"xlink:href":"#header-icon-"+a.icon}})]),t._v(" "),n("div",{staticClass:"name"},[t._v(t._s(i))]),t._v(" "),n("span",{staticClass:"count"},[null!==a.count?[t._v(t._s(a.count))]:t._e()],2)]),t._v(" "),a.subCategories?n("div",{staticClass:"sub-regions-popup popup"},t._l(Object.entries(a.subCategories),(function(e){var i=e[0],a=e[1];return n("a",{key:i,staticClass:"sub-region",attrs:{href:a,target:"_blank"}},[t._v(t._s(i))])})),0):t._e()])})),0)};i._withStripped=!0;var a=n(1212),r=n(3037);const o=lodash.cloneDeep(a.categories);Object.values(o).forEach((t=>{t.count=null}));let s=!1;var c=Vue.extend({mixins:[r.u],data:()=>({categories:o}),async created(){if(s)return;s=!0;const{bilibiliApi:t,getJson:e}=await Promise.resolve().then(n.t.bind(n,3663,23)),{addCategoryIcons:i}=await Promise.resolve().then(n.t.bind(n,1212,23));i();const{region_count:a={}}=await t(e("https://api.bilibili.com/x/web-interface/online"),"[自定义顶栏] 分区投稿信息获取失败");Object.values(this.categories).forEach((t=>{t.code&&(Array.isArray(t.code)?t.count=lodash.sum(t.code.map((t=>a[t]))):t.count=a[t.code])}))}}),l=n(3379),d=n.n(l),p=n(4374),u=n.n(p),m={insert:"head",singleton:!1},f=(d()(u(),m),u().locals,(0,n(1900).Z)(c,i,[],!1,null,null,null));f.options.__file="registry/lib/components/style/custom-navbar/home/NavbarHome.vue";var h=f.exports},4666:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return s}});var i=function(){var t=this,e=t.$createElement;return(t._self._c||e)("iframe",{attrs:{src:t.item.src,frameborder:"0",width:t.item.width,height:t.item.height}})};i._withStripped=!0;var a=n(3037),r=Vue.extend({name:"IframePopup",mixins:[a.u]}),o=(0,n(1900).Z)(r,i,[],!1,null,null,null);o.options.__file="registry/lib/components/style/custom-navbar/iframe/IframePopup.vue";var s=o.exports},969:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.seasonLogoUrl?n("img",{staticClass:"custom-navbar-logo season",attrs:{height:"38",src:t.seasonLogoUrl}}):n("VIcon",{staticClass:"custom-navbar-logo",attrs:{icon:"logo"}})};i._withStripped=!0;var a=n(407),r=n(3663),o=n(8643),s=Vue.extend({name:"NavbarLogo",components:{VIcon:o.VIcon},data:()=>({seasonLogoUrl:""}),watch:{seasonLogoUrl(){document.body.classList.toggle("season-logo-enabled",Boolean(this.seasonLogoUrl))}},async created(){(0,a.addComponentListener)("customNavbar.seasonLogo",(async t=>{if(!t)return void(this.seasonLogoUrl="");const e=await(0,r.getJson)("https://api.bilibili.com/x/web-show/page/header?resource_id=1");0===e.code?this.seasonLogoUrl=lodash.get(e,"data.litpic","").replace("http:","https:"):this.seasonLogoUrl=""}),!0)}}),c=n(3379),l=n.n(c),d=n(3324),p=n.n(d),u={insert:"head",singleton:!1},m=(l()(p(),u),p().locals,(0,n(1900).Z)(s,i,[],!1,null,null,null));m.options.__file="registry/lib/components/style/custom-navbar/logo/NavbarLogo.vue";var f=m.exports},2542:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"messages-popup",attrs:{role:"list"}},t._l(t.entries,(function(e){return n("div",{key:e.name,staticClass:"message-entry",attrs:{role:"listitem"}},[n("a",{attrs:{"data-prop":e.prop,target:"_blank",href:e.href,"data-count":e.count||null},on:{click:function(n){return t.clearCount(e)}}},[t._v(t._s(e.name))])])})),0)};i._withStripped=!0;var a=n(3663),r=n(3037);const o=[{prop:"reply",href:"https://message.bilibili.com/#/reply",name:"回复我的"},{prop:"at",href:"https://message.bilibili.com/#/at",name:"@我的"},{prop:"like",href:"https://message.bilibili.com/#/love",name:"收到的赞"},{prop:"sys_msg",href:"https://message.bilibili.com/#/system",name:"系统通知"},{prop:"user_msg",href:"https://message.bilibili.com/#/whisper",name:"我的消息"},{href:"https://message.bilibili.com/#/archive",name:"私信存档"},{href:"https://message.bilibili.com/#/config",name:"消息设置"}];var s=Vue.extend({name:"MessagesPopup",mixins:[r.u],data:()=>({entries:o.map((t=>(t.count=0,t))),settings:{notify:!0,hideNotFollowedCount:!1,json:{}}}),async created(){await this.fetchSettings(),this.settings.notify&&this.notify()},methods:{async fetchSettings(){const t=await(0,a.getJsonWithCredentials)("https://api.vc.bilibili.com/link_setting/v1/link_setting/get?msg_notify=1&show_unfollowed_msg=1");0===t.code&&(this.settings={notify:3!==t.data.msg_notify,hideNotFollowedCount:1===t.data.show_unfollowed_msg,json:t.data})},async notify(){const t=await(0,a.getJsonWithCredentials)("https://api.bilibili.com/x/msgfeed/unread"),e=await(0,a.getJsonWithCredentials)("https://api.vc.bilibili.com/session_svr/v1/session_svr/single_unread");t.data.user_msg=e.data.follow_unread||0,this.settings.hideNotFollowedCount||(t.data.user_msg+=e.data.unfollow_unread||0),this.item.notifyCount=o.reduce(((e,n)=>e+(n.prop?t.data[n.prop]:0)),0),this.item.notifyCount&&(console.log(o),o.forEach((e=>{if(!e.prop)return;const n=t.data[e.prop];console.log(e.prop,e.count,n),n>0&&(e.count=n)})))},clearCount(t){this.item.notifyCount-=t.count,t.count=0}}}),c=n(3379),l=n.n(c),d=n(6617),p=n.n(d),u={insert:"head",singleton:!1},m=(l()(p(),u),p().locals,(0,n(1900).Z)(s,i,[],!1,null,"589ce0fa",null));m.options.__file="registry/lib/components/style/custom-navbar/messages/NavbarMessages.vue";var f=m.exports},2632:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ranking-popup",attrs:{role:"list"}},t._l(t.entries,(function(e){return n("div",{key:e.name,staticClass:"ranking-entry",attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:e.href}},[t._v(t._s(e.name))])])})),0)};i._withStripped=!0;var a=n(3037);const r=[{href:"https://www.bilibili.com/v/popular/all",name:"综合热门"},{href:"https://www.bilibili.com/v/popular/weekly",name:"每周必看"},{href:"https://www.bilibili.com/v/popular/history",name:"入站必刷"},{href:"https://www.bilibili.com/v/popular/rank/all",name:"排行榜"}];var o=Vue.extend({name:"RankingPopup",mixins:[a.u],data:()=>({entries:r})}),s=n(3379),c=n.n(s),l=n(3369),d=n.n(l),p={insert:"head",singleton:!1},u=(c()(d(),p),d().locals,(0,n(1900).Z)(o,i,[],!1,null,"6678d691",null));u.options.__file="registry/lib/components/style/custom-navbar/ranking/NavbarRanking.vue";var m=u.exports},5700:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var i=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"custom-navbar-search"},[e("LaunchBar")],1)};i._withStripped=!0;var a=coreApis.componentApis.launchBar.LaunchBar,r=n.n(a),o=Vue.extend({components:{LaunchBar:r()}}),s=n(3379),c=n.n(s),l=n(2438),d=n.n(l),p={insert:"head",singleton:!1},u=(c()(d(),p),d().locals,(0,n(1900).Z)(o,i,[],!1,null,null,null));u.options.__file="registry/lib/components/style/custom-navbar/search/NavbarSearch.vue";var m=u.exports},359:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"custom-navbar-extra-options"},[t.login?n("VButton",{ref:"button",on:{mouseover:function(e){return t.loadNavbarSettings()},click:function(e){return t.toggleNavbarSettings()}}},[t._v("\n 布局设置"),n("VIcon",{attrs:{icon:"right-arrow",size:16}})],1):t._e()],1)};i._withStripped=!0;var a=n(3109),r=n(8643),o=n(5220),s=Vue.extend({components:{VIcon:r.VIcon,VButton:r.VButton},data:()=>({login:Boolean((0,a.getUID)())}),methods:{async loadNavbarSettings(){if(await(0,o.loadNavbarSettings)()){const t=this.$refs.button.$el;(0,o.setTriggerElement)(t)}},toggleNavbarSettings:o.toggleNavbarSettings}}),c=n(3379),l=n.n(c),d=n(8306),p=n.n(d),u={insert:"head",singleton:!1},m=(l()(p(),u),p().locals,(0,n(1900).Z)(s,i,[],!1,null,null,null));m.options.__file="registry/lib/components/style/custom-navbar/settings/ExtraOptions.vue";var f=m.exports},4040:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return y}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("VPopup",{ref:"popup",staticClass:"custom-navbar-settings be-settings-extra-options",attrs:{fixed:"",lazy:!1,"trigger-element":t.triggerElement},model:{value:t.open,callback:function(e){t.open=e},expression:"open"}},[n("div",{staticClass:"navbar-settings-header"},[n("VIcon",{staticClass:"title-icon",attrs:{icon:"mdi-sort",size:24}}),t._v(" "),n("div",{staticClass:"title"},[t._v("\n 顶栏布局设置\n ")]),t._v(" "),n("div",{staticClass:"grow"}),t._v(" "),n("div",{staticClass:"close",on:{click:function(e){t.open=!1}}},[n("VIcon",{attrs:{icon:"close",size:18}})],1)],1),t._v(" "),n("div",{staticClass:"navbar-settings-content"},[n("div",{staticClass:"navbar-settings-section"},[n("div",{staticClass:"navbar-settings-section-title"},[t._v("\n 边缘间距\n ")]),t._v(" "),n("div",{staticClass:"navbar-settings-section-description"},[t._v("\n 设定两侧边缘处的间距, 单位为百分比, 100%为整个顶栏的宽度.\n "),n("br"),t._v("空间不足时, 实际呈现的间距会自动缩小.\n ")]),t._v(" "),n("div",{staticClass:"navbar-settings-section-content",on:{mouseover:function(e){return t.peekPadding(!0)},mouseout:function(e){return t.peekPadding(!1)}}},[n("VSlider",{attrs:{min:0,max:40,step:.5},model:{value:t.padding,callback:function(e){t.padding=e},expression:"padding"}}),t._v(" "),n("div",{staticClass:"padding-value"},[t._v("\n "+t._s(t.padding.toFixed(1))+"%\n ")])],1)]),t._v(" "),n("div",{staticClass:"navbar-settings-section"},[n("div",{staticClass:"navbar-settings-section-title"},[t._v("\n 元素呈现\n ")]),t._v(" "),n("div",{staticClass:"navbar-settings-section-description"},[t._v("\n 按住并拖动可以调整顺序, 点击眼睛图标可以切换隐藏/显示.\n ")]),t._v(" "),t.loaded?t._e():n("VLoading"),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.loaded,expression:"loaded"}],ref:"navbarSortList",staticClass:"navbar-settings-section-content navbar-sort-list"},t._l(t.rendered.items,(function(e){return n("div",{key:e.name,staticClass:"navbar-sort-item",class:{"navbar-hidden":e.hidden},attrs:{"data-name":e.name},on:{mouseover:function(n){return t.peekItem(e,!0)},mouseout:function(n){return t.peekItem(e,!1)}}},[n("div",{staticClass:"item-name"},[t._v("\n "+t._s(e.displayName)+"\n ")]),t._v(" "),n("div",{staticClass:"toggle-visible"},[n("VIcon",{attrs:{size:18,icon:e.hidden?"mdi-eye-off-outline":"mdi-eye-outline"},on:{click:function(n){return t.toggleVisible(e)}}})],1)])})),0)],1)])])};i._withStripped=!0;var a=n(8643),r=n(407),o=n(3109),s=coreApis.runtimeLibrary,c=n(8269),l=n(12);const d=t=>{t.forEach(((t,e)=>{t.order!==e&&(t.order=e)}));const e=Object.fromEntries(t.map((t=>[t.name,t.order])));l.kO.navbarOptions.order=e},{navbarOptions:p}=l.kO,[u]=(0,c.getData)(l.Je);var m=Vue.extend({components:{VPopup:a.VPopup,VIcon:a.VIcon,VSlider:a.VSlider,VLoading:a.VLoading},props:{triggerElement:{type:HTMLElement,default:null}},data:()=>({open:!1,padding:p.padding,rendered:u,hidden:p.hidden,loaded:!1}),watch:{padding:lodash.debounce((t=>{p.padding=t}),200)},async mounted(){(0,r.addComponentListener)("customNavbar.padding",(t=>{this.padding!==t&&(this.padding=t)}));const t=this.$refs.navbarSortList;var e;(await s.SortableJSLibrary).create(t,{delay:100,forceFallback:!0,onEnd:t=>{this.onSort(t)}}),(e=u.items).every(((t,e)=>t.order===e))||d(e),this.loaded=!0},methods:{toggle(){this.$refs.popup.toggle()},peekPadding(t){(0,o.dqa)(".custom-navbar .padding").forEach((e=>e.classList.toggle("peek",t)))},peekItem(t,e){t.element?.classList.toggle("peek",e)},onSort(t){const e=this.$refs.navbarSortList,n=t.item;console.log(`${n.getAttribute("data-name")} ${t.oldIndex}->${t.newIndex}`);const i=Object.fromEntries([...e.children].map(((t,e)=>[t.getAttribute("data-name"),e])));this.rendered.items=((t,e)=>{const n=lodash.sortBy(t,(t=>e[t.name]));return d(n),n})(u.items,i)},toggleVisible(t){p.hidden.includes(t.name)?(lodash.pull(p.hidden,t.name),t.hidden=!1,console.log("delete",t.name)):(p.hidden.push(t.name),t.hidden=!0,console.log("add",t.name))}}}),f=n(3379),h=n.n(f),g=n(4754),v=n.n(g),b={insert:"head",singleton:!1},x=(h()(v(),b),v().locals,(0,n(1900).Z)(m,i,[],!1,null,null,null));x.options.__file="registry/lib/components/style/custom-navbar/settings/NavbarSettings.vue";var y=x.exports},7898:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return s}});var i=function(){var t=this.$createElement;return(this._self._c||t)("SubscriptionsList",{attrs:{type:"bangumi"}})};i._withStripped=!0;var a=n(806),r=Vue.extend({components:{SubscriptionsList:a.Z}}),o=(0,n(1900).Z)(r,i,[],!1,null,null,null);o.options.__file="registry/lib/components/style/custom-navbar/subscriptions/BangumiSubscriptions.vue";var s=o.exports},8324:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return s}});var i=function(){var t=this.$createElement;return(this._self._c||t)("SubscriptionsList",{attrs:{type:"cinema"}})};i._withStripped=!0;var a=n(806),r=Vue.extend({components:{SubscriptionsList:a.Z}}),o=(0,n(1900).Z)(r,i,[],!1,null,null,null);o.options.__file="registry/lib/components/style/custom-navbar/subscriptions/CinemaSubscriptions.vue";var s=o.exports},8834:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"navbar-subscriptions"},[n("TabControl",{ref:"tabControl",attrs:{tabs:t.tabs,"more-link":t.moreLink}})],1)};i._withStripped=!0;var a=n(8643),r=n(3109),o=n(3037),s=n(2194),c=Vue.extend({components:{TabControl:a.TabControl},mixins:[o.u],data(){const t=(0,r.getUID)();return{moreLink:e=>`https://space.bilibili.com/${t}/${e.name}`,tabs:[{name:s.N.Bangumi,displayName:"追番",activeLink:`https://space.bilibili.com/${t}/bangumi`,component:()=>Promise.resolve().then(n.bind(n,7898)).then((t=>t.default))},{name:s.N.Cinema,displayName:"追剧",activeLink:`https://space.bilibili.com/${t}/cinema`,component:()=>Promise.resolve().then(n.bind(n,8324)).then((t=>t.default))}]}}}),l=n(3379),d=n.n(l),p=n(8734),u=n.n(p),m={insert:"head",singleton:!1},f=(d()(u(),m),u().locals,(0,n(1900).Z)(c,i,[],!1,null,null,null));f.options.__file="registry/lib/components/style/custom-navbar/subscriptions/NavbarSubscriptions.vue";var h=f.exports},806:function(t,e,n){"use strict";n.d(e,{Z:function(){return x}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"subscription-list"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"subscription-content"},t._l(t.cards,(function(e){return n("a",{key:e.id,staticClass:"subscription-card",attrs:{href:e.playUrl,target:"_blank"}},[n("div",{staticClass:"cover-container"},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:64}})],1),t._v(" "),n("div",{staticClass:"card-info"},[n("h1",{staticClass:"title",attrs:{title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("div",{staticClass:"progress-row"},[e.status?n("div",{staticClass:"status",class:"status-"+e.status},[t._v(t._s(e.statusText))]):t._e(),t._v(" "),e.progress?n("div",{staticClass:"progress",attrs:{title:e.progress+" | "+e.latest}},[t._v(t._s(e.progress)+" | "+t._s(e.latest))]):n("div",{staticClass:"progress",attrs:{title:e.latest}},[t._v(t._s(e.latest))]),t._v(" "),n("a",{staticClass:"info",attrs:{href:e.mediaUrl,target:"_blank",title:"详细信息"}},[n("VIcon",{attrs:{icon:"mdi-information-outline",size:16}})],1)])])])})),0),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a,r=n(3109),o=n(5729),s=n(8643),c=n(3663),l=n(2194);!function(t){t[t.ToView=1]="ToView",t[t.Viewing=2]="Viewing",t[t.Viewed=3]="Viewed"}(a||(a={}));const d=t=>{switch(t){case a.ToView:return"想看";case a.Viewing:default:return"在看";case a.Viewed:return"看过"}},p=(t,e)=>{let n=t.status;n!==a.Viewed&&(n=a.Viewed-n);let i=e.status;return i!==a.Viewed&&(i=a.Viewed-i),n-i};var u=Vue.extend({components:{DpiImage:s.DpiImage,VLoading:s.VLoading,VEmpty:s.VEmpty,VIcon:s.VIcon,ScrollTrigger:s.ScrollTrigger},props:{type:{type:String,default:l.N.Bangumi}},data:()=>({loading:!0,hasMorePage:!0,cards:[],page:1}),async created(){this.nextPage()},methods:{async nextPage(){try{const t=await(0,c.getJsonWithCredentials)(`https://api.bilibili.com/x/space/bangumi/follow/list?type=${this.type!==l.N.Bangumi?"2":"1"}&pn=${this.page}&ps=16&vmid=${(0,r.getUID)()}`);if(0!==t.code)return void(0,o.logError)(`加载订阅信息失败: ${t.message}`);const e=lodash.uniqBy(this.cards.concat(lodash.get(t,"data.list").map((t=>({title:t.title,coverUrl:t.square_cover.replace("http:","https:"),latest:t.new_ep.index_show,progress:t.progress,id:t.season_id,status:t.follow_status,statusText:d(t.follow_status),playUrl:`https://www.bilibili.com/bangumi/play/ss${t.season_id}`,mediaUrl:`https://www.bilibili.com/bangumi/media/md${t.media_id}`})))),(t=>t.id)).sort(p);this.page++,this.cards=e,this.hasMorePage=lodash.get(t,"data.total",0)>this.cards.length}finally{this.loading=!1}}}}),m=n(3379),f=n.n(m),h=n(7104),g=n.n(h),v={insert:"head",singleton:!1},b=(f()(g(),v),g().locals,(0,n(1900).Z)(u,i,[],!1,null,null,null));b.options.__file="registry/lib/components/style/custom-navbar/subscriptions/SubscriptionsList.vue";var x=b.exports},6426:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return u}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"navbar-upload"},[n("VIcon",{attrs:{icon:"upload",size:18}}),t._v(" "),n("div",{staticClass:"navbar-upload-name"},[t._v("\n 投稿\n ")])],1)};i._withStripped=!0;var a=n(8643),r=Vue.extend({components:{VIcon:a.VIcon}}),o=n(3379),s=n.n(o),c=n(8961),l=n.n(c),d={insert:"head",singleton:!1},p=(s()(l(),d),l().locals,(0,n(1900).Z)(r,i,[],!1,null,"1a272463",null));p.options.__file="registry/lib/components/style/custom-navbar/upload/NavbarUpload.vue";var u=p.exports},4037:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return u}});var i=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)};i._withStripped=!0;var a=n(3037),r=Vue.extend({mixins:[a.u]}),o=n(3379),s=n.n(o),c=n(2360),l=n.n(c),d={insert:"head",singleton:!1},p=(s()(l(),d),l().locals,(0,n(1900).Z)(r,i,[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"upload-popup",attrs:{role:"list"}},[n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload/text/apply"}},[t._v("专栏投稿")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload/audio/"}},[t._v("音频投稿")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload/video/frame"}},[t._v("视频投稿")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload-manager/article"}},[t._v("投稿管理")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/home"}},[t._v("创作中心")])])])}],!1,null,"a07cc62e",null));p.options.__file="registry/lib/components/style/custom-navbar/upload/UploadPopup.vue";var u=p.exports},399:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"user-face-container"},[n("img",{staticClass:"user-face",attrs:{src:t.faceSrc,srcset:t.faceSrcset}}),t._v(" "),n("img",{staticClass:"user-pendant",attrs:{src:t.pendantSrc,srcset:t.pendantSrcset}})])};i._withStripped=!0;var a=n(3278),r=n(3109),o=coreApis.utils.constants;const s="//static.hdslb.com/images/member/noface.gif";var c=Vue.extend({name:"UserFace",data:()=>({faceSrc:o.EmptyImageUrl,pendantSrc:o.EmptyImageUrl,faceSrcset:null,pendantSrcset:null}),async created(){const t=await(0,a.getUserInfo)();if(t.isLogin){if(t.face){const e=t.face.replace("http","https");if(e.includes(s))this.faceSrc=s;else{const t=68;this.faceSrc=e,this.faceSrcset=(0,r.getDpiSourceSet)(e,t)}}if(t.pendant?.image){const e=t.pendant.image.replace("http","https"),n=116;this.pendantSrcset=(0,r.getDpiSourceSet)(e,n,"png")}}else this.faceSrc="https://static.hdslb.com/images/akari.jpg"}}),l=n(3379),d=n.n(l),p=n(464),u=n.n(p),m={insert:"head",singleton:!1},f=(d()(u(),m),u().locals,(0,n(1900).Z)(c,i,[],!1,null,null,null));f.options.__file="registry/lib/components/style/custom-navbar/user-info/UserFace.vue";var h=f.exports},7437:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return v}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"user-info-panel"},[t.isLogin&&!0===t.userInfo.isLogin?n("div",{staticClass:"logged-in"},[n("a",{staticClass:"name",attrs:{target:"_blank",href:"https://space.bilibili.com/"}},[t._v(t._s(t.userInfo.uname))]),t._v(" "),n("a",{staticClass:"type",attrs:{target:"_blank",href:"https://account.bilibili.com/account/big"}},[t._v(t._s(t.userType))]),t._v(" "),1===t.userInfo.vipStatus&&2===t.userInfo.vipType?n("div",{staticClass:"privileges row"},[n("div",{staticClass:"b-coin",class:{received:t.privileges.bCoin.received},attrs:{title:"有效期限: "+t.privileges.bCoin.expire},on:{click:function(e){return t.privilegeReceive(1)}}},[t._v("\n "+t._s(t.privileges.bCoin.received?"已领取B币":"领取B币")+"\n ")]),t._v(" "),n("div",{staticClass:"coupons",class:{received:t.privileges.coupons.received},attrs:{title:"有效期限: "+t.privileges.coupons.expire},on:{click:function(e){return t.privilegeReceive(2)}}},[t._v("\n "+t._s(t.privileges.coupons.received?"已领取优惠券":"领取优惠券")+"\n ")])]):t._e(),t._v(" "),n("div",{staticClass:"level-info row"},[n("a",{staticClass:"level",attrs:{target:"_blank",title:"等级",href:"https://account.bilibili.com/account/record"}},[n("VIcon",{staticClass:"level-icon",attrs:{icon:"lv"+t.userInfo.level_info.current_level}})],1),t._v(" "),n("span",{staticClass:"level-progress-label"},[t._v(t._s(t.userInfo.level_info.current_exp)+" / "+t._s(t.userInfo.level_info.next_exp))])]),t._v(" "),n("div",{staticClass:"level-progress separator"},[n("div",{staticClass:"level-progress-thumb",style:t.levelProgressStyle})]),t._v(" "),n("div",{staticClass:"items"},[n("a",{staticClass:"item",attrs:{target:"_blank",title:"手机验证",href:"https://passport.bilibili.com/account/security#/bindphone"}},[n("VIcon",{attrs:{icon:"bind-phone",size:20}}),t._v(" "),t.userInfo.mobile_verified?n("VIcon",{attrs:{icon:"ok",size:18}}):n("VIcon",{attrs:{icon:"cancel",size:18}})],1),t._v(" "),n("a",{staticClass:"item",attrs:{target:"_blank",title:"邮箱验证",href:"https://passport.bilibili.com/account/security#/bindmail"}},[n("VIcon",{attrs:{icon:"bind-email",size:20}}),t._v(" "),t.userInfo.email_verified?n("VIcon",{attrs:{icon:"ok",size:18}}):n("VIcon",{attrs:{icon:"cancel",size:18}})],1),t._v(" "),n("a",{staticClass:"item",attrs:{target:"_blank",href:"https://account.bilibili.com/site/coin",title:"硬币"}},[n("VIcon",{attrs:{icon:"coin-outline",size:20}}),t._v(" "),n("span",[t._v(t._s(t.userInfo.money))])],1),t._v(" "),n("a",{staticClass:"item",attrs:{target:"_blank",href:"https://pay.bilibili.com/bb_balance.html",title:"B币"}},[n("VIcon",{attrs:{icon:"b-coin-outline",size:20}}),t._v(" "),n("span",[t._v(t._s(t.userInfo.wallet.bcoin_balance))])],1)]),t._v(" "),n("div",{staticClass:"separator"}),t._v(" "),n("div",{staticClass:"stats"},[n("a",{staticClass:"stats-item",attrs:{href:"https://space.bilibili.com/"+t.userInfo.mid+"/fans/follow",target:"_blank"}},[n("div",{staticClass:"stats-number"},[t._v(t._s(t._f("count")(t.stat.following)))]),t._v("关注\n ")]),t._v(" "),n("a",{staticClass:"stats-item",attrs:{href:"https://space.bilibili.com/"+t.userInfo.mid+"/fans/fans",target:"_blank"}},[n("div",{staticClass:"stats-number"},[t._v(t._s(t._f("count")(t.stat.follower)))]),t._v("粉丝\n ")]),t._v(" "),n("a",{staticClass:"stats-item",attrs:{href:"https://space.bilibili.com/"+t.userInfo.mid+"/dynamic",target:"_blank"}},[n("div",{staticClass:"stats-number"},[t._v(t._s(t._f("count")(t.stat.dynamic_count)))]),t._v("动态\n ")])]),t._v(" "),n("div",{staticClass:"separator"}),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://account.bilibili.com/account/home"}},[n("VIcon",{attrs:{icon:"profile"}}),t._v("个人中心\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload-manager/article"}},[n("VIcon",{attrs:{icon:"posts"}}),t._v("投稿管理\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://pay.bilibili.com/"}},[n("VIcon",{attrs:{icon:"wallet"}}),t._v("B币钱包\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://link.bilibili.com/p/center/index"}},[n("VIcon",{attrs:{icon:"live-center"}}),t._v("直播中心\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://show.bilibili.com/orderlist"}},[n("VIcon",{attrs:{icon:"order-center"}}),t._v("订单中心\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/v/cheese/mine"}},[n("VIcon",{attrs:{icon:"course"}}),t._v("我的课程\n ")],1),t._v(" "),n("div",{staticClass:"logout grey-button",on:{click:function(e){return t.logout()}}},[t._v("\n 退出登录\n ")])]):t._e(),t._v(" "),t.isLogin?t._e():n("div",{staticClass:"not-logged-in"},[n("h1",{staticClass:"welcome"},[t._v("\n 欢迎来到 bilibili\n ")]),t._v(" "),n("a",{staticClass:"signup grey-button",attrs:{href:"https://passport.bilibili.com/register/phone.html"}},[t._v("注册")]),t._v(" "),n("a",{staticClass:"login theme-button",attrs:{href:"https://passport.bilibili.com/login"}},[t._v("登录")])])])};i._withStripped=!0;var a=n(3109),r=n(8117),o=n(5729),s=n(3663),c=n(3278),l=n(3037),d=Vue.extend({components:{VIcon:coreApis.ui.VIcon},filters:{count:r.formatCount},mixins:[l.u],data:()=>({userInfo:{},stat:{},isLogin:Boolean((0,a.getUID)()),privileges:{bCoin:{received:!1,expire:""},coupons:{received:!1,expire:""}}}),computed:{userType(){if(!this.userInfo.isLogin)return"未登录";if(0===this.userInfo.level_info.current_level)return"注册会员";if(1===this.userInfo.vipStatus){if(1===this.userInfo.vipType)return this.userInfo.vip_theme_type?"小会员":"大会员";if(2===this.userInfo.vipType)return this.userInfo.vip_theme_type?"年度小会员":"年度大会员"}return"正式会员"},levelProgressStyle(){if(!this.userInfo.isLogin)return{};const{current_exp:t,current_min:e,next_exp:n}=this.userInfo.level_info;return{transform:`scaleX(${(t-e)/(n-e)})`}}},async created(){const t=await(0,c.getUserInfo)();this.userInfo=t;const e=await(0,s.getJsonWithCredentials)("https://api.bilibili.com/x/web-interface/nav/stat");if(this.stat=e.data||{},this.isLogin&&2===this.userInfo.vipType){const t=await(0,s.getJsonWithCredentials)("https://api.bilibili.com/x/vip/privilege/my");if(0===t.code){const e=t.data.list.find((t=>1===t.type));this.privileges.bCoin.received=1===e.state,this.privileges.bCoin.expire=new Date(1e3*e.expire_time).toLocaleDateString();const n=t.data.list.find((t=>2===t.type));this.privileges.coupons.received=1===n.state,this.privileges.coupons.expire=new Date(1e3*n.expire_time).toLocaleDateString()}}},methods:{async privilegeReceive(t){const e={1:"bCoin",2:"coupons"};if(this.privileges[e[t]].received)return;this.privileges[e[t]].received=!0;const n=(0,a.getCsrf)(),i=await(await fetch("https://api.bilibili.com/x/vip/privilege/receive",{credentials:"include",headers:{"content-type":"application/x-www-form-urlencoded"},body:`type=${t}&csrf=${n}`,method:"POST"})).json();console.log(i),0===i.code?"bCoin"===e[t]&&(this.userInfo.wallet.bcoin_balance+=5):69801===i.code||(this.privileges[e[t]].received=!1,(0,o.logError)(i.message))},async logout(){const t=await(0,s.postTextWithCredentials)("https://passport.bilibili.com/login/exit/v2",(0,a.formData)({biliCSRF:(0,a.getCsrf)()})),e=lodash.get(JSON.parse(t),"data.redirectUrl","");e&&window.location.assign(e)}}}),p=n(3379),u=n.n(p),m=n(9692),f=n.n(m),h={insert:"head",singleton:!1},g=(u()(f(),h),f().locals,(0,n(1900).Z)(d,i,[],!1,null,null,null));g.options.__file="registry/lib/components/style/custom-navbar/user-info/UserInfoPopup.vue";var v=g.exports},5878:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"watchlater-list"},[n("div",{staticClass:"header"},[n("div",{staticClass:"search"},[n("TextBox",{attrs:{linear:"",placeholder:"搜索"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/medialist/play/watchlater"}},[n("VButton",{staticClass:"round-button",attrs:{title:"播放全部",round:""}},[n("VIcon",{attrs:{icon:"mdi-play",size:18}})],1)],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/watchlater/#/list"}},[n("VButton",{staticClass:"round-button",attrs:{title:"查看更多",round:""}},[n("VIcon",{attrs:{icon:"mdi-dots-horizontal",size:18}})],1)],1)]),t._v(" "),t.loading?n("VLoading"):t.loading||0!==t.cards.length?n("transition-group",{staticClass:"watchlater-list-content",attrs:{name:"cards",tag:"div"}},t._l(t.filteredCards,(function(e,i){return n("div",{key:e.aid,staticClass:"watchlater-card"},[n("a",{staticClass:"cover-container",attrs:{target:"_blank",href:e.href}},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{width:130,height:85}}}),t._v(" "),n("div",{staticClass:"floating remove",attrs:{title:"移除"},on:{click:function(n){return n.preventDefault(),t.remove(e.aid,i)}}},[n("VIcon",{attrs:{icon:"mdi-close",size:16}})],1),t._v(" "),n("div",{staticClass:"floating duration"},[t._v(t._s(e.durationText))]),t._v(" "),e.complete?n("div",{staticClass:"floating viewed"},[t._v("已观看")]):t._e()],1),t._v(" "),n("a",{staticClass:"title",attrs:{target:"_blank",href:e.href,title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.upID,title:e.upName}},[n("DpiImage",{staticClass:"face",attrs:{src:e.upFaceUrl,size:20}}),t._v(" "),n("div",{staticClass:"name"},[t._v(t._s(e.upName))])],1)])})),0):n("VEmpty")],1)};i._withStripped=!0;var a=n(407),r=n(8117),o=coreApis.componentApis.video.watchlater,s=n(8643),c=n(3037),l=Vue.extend({components:{VLoading:s.VLoading,VEmpty:s.VEmpty,TextBox:s.TextBox,VButton:s.VButton,VIcon:s.VIcon,DpiImage:s.DpiImage},mixins:[c.u],data(){const t=(0,a.getComponentSettings)("watchlaterRedirect");return{watchlaterList:o.watchlaterList,loading:!0,cards:[],filteredCards:[],search:"",redirect:t.enabled&&t.options.navbar}},watch:{search(){this.updateFilteredCards()}},async created(){try{await this.updateList()}finally{this.loading=!1}},methods:{toggleWatchlater:o.toggleWatchlater,async updateList(){const t=await(0,o.getWatchlaterList)(!0);if(!t)return void(this.cards=[]);const e=t=>this.redirect?`https://www.bilibili.com/video/${t.bvid}`:`https://www.bilibili.com/medialist/play/watchlater/${t.bvid}`,n=t.map((t=>{const n=(()=>{if(void 0===t.pages)return e(t);const n=t.pages.map((t=>t.cid)),i=0===t.cid?1:n.indexOf(t.cid)+1;return this.redirect?`${e(t)}?p=${i}`:e(t)})(),i=Math.round(1e3*t.progress/t.duration)/1e3;return{aid:t.aid,href:n,coverUrl:t.pic.replace("http:","https:"),durationText:(0,r.formatDuration)(t.duration),duration:t.duration,complete:t.progress<0||i>.95,title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid}}));this.cards=n,this.search?this.updateFilteredCards():this.filteredCards=n},async remove(t,e){this.cards.splice(e,1),await this.toggleWatchlater(t),this.lastRemovedAid=t},async undo(){const t=this.lastRemovedAid;0!==t&&await this.toggleWatchlater(t)},updateFilteredCards:lodash.debounce((function(){const t=this.search.toLowerCase();this.$el.querySelector(".watchlater-list-content").scrollTo(0,0),this.filteredCards=this.cards.filter((e=>e.title.toLowerCase().includes(t)||e.upName.toLowerCase().includes(t)))}),100)}}),d=n(3379),p=n.n(d),u=n(8120),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/watchlater/NavbarWatchlater.vue";var g=h.exports},1900:function(t,e,n){"use strict";function i(t,e,n,i,a,r,o,s){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):a&&(c=s?function(){a.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(t,e){return c.call(e),d(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:t,options:l}}n.d(e,{Z:function(){return i}})},3663:function(t){"use strict";t.exports=coreApis.ajax},2023:function(t){"use strict";t.exports=coreApis.componentApis.feeds.api},3864:function(t){"use strict";t.exports=coreApis.componentApis.feeds.notify},1212:function(t){"use strict";t.exports=coreApis.componentApis.utils.categories.data},8269:function(t){"use strict";t.exports=coreApis.pluginApis.data},407:function(t){"use strict";t.exports=coreApis.settings},8643:function(t){"use strict";t.exports=coreApis.ui},3278:function(t){"use strict";t.exports=coreApis.userInfo},8117:function(t){"use strict";t.exports=coreApis.utils.formatters},5729:function(t){"use strict";t.exports=coreApis.utils.log},4522:function(t){"use strict";t.exports=coreApis.utils.sort},3109:function(t){"use strict";t.exports=coreApis.utils}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,exports:{}};return n[t](r,r.exports,a),r.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},a.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var o={};t=t||[null,e({}),e([]),e(e)];for(var s=2&i&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){o[t]=function(){return n[t]}}));return o.default=function(){return n},a.d(r,o),r},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";a.d(r,{component:function(){return n}});var t=a(407),e=a(3109);const n={name:"customNavbar",displayName:"自定义顶栏",description:"\n使用脚本提供的顶栏替换原版的主站顶栏 (非主站不替换), 启用后还可以在反广告插件 (例如 ABP) 中配置禁止原版顶栏的消息 iframe 以提升性能:\n- *://message.bilibili.com/pages/nav/index_new_pc_sync\n- *://message.bilibili.com/pages/nav/index_new_sync\n ".trim(),entry:async({metadata:{name:n}})=>{if((0,e.isIframe)()||(0,e.isNotHtml)())return;(0,t.addComponentListener)(`${n}.padding`,(t=>{document.documentElement.style.setProperty("--navbar-bounds-padding",`${t}%`)}),!0);["https://space.bilibili.com","https://www.bilibili.com/read"].some((t=>(0,e.matchUrlPattern)(t)))||(0,t.addComponentListener)(`${n}.globalFixed`,(t=>{document.body.classList.toggle("fixed-navbar",t)}),!0);const i=await Promise.resolve().then(a.bind(a,6870)),r=(0,e.mountVueComponent)(i);document.body.insertAdjacentElement("beforeend",r.$el),["fill","shadow","blur"].forEach((e=>{(0,t.addComponentListener)(`${n}.${e}`,(t=>r.toggleStyle(t,e)),!0)}))},tags:[componentsTags.style,componentsTags.general],options:{hidden:{hidden:!0,defaultValue:["blank1","blank4","drawing","music","gamesIframe","bangumi","match"],displayName:"隐藏的元素"},order:{hidden:!0,defaultValue:{},displayName:"元素顺序"},padding:{hidden:!0,defaultValue:10,displayName:"边缘间距(%)"},globalFixed:{defaultValue:!1,displayName:"全局固定"},fill:{defaultValue:!1,displayName:"主题色填充"},transparent:{defaultValue:!0,displayName:"透明填充"},blur:{defaultValue:!1,displayName:"背景模糊"},shadow:{defaultValue:!0,displayName:"投影"},seasonLogo:{defaultValue:!1,displayName:"使用季节Logo"},touch:{defaultValue:!1,displayName:"触摸模式"},openInNewTab:{defaultValue:!0,displayName:"新标签页打开"},openInNewTabOverrides:{defaultValue:{logo:!1},displayName:"新标签页打开设置覆盖",hidden:!0},showDeadVideos:{defaultValue:!1,displayName:"显示已失效视频",hidden:!0}},urlInclude:["//www.bilibili.com","//t.bilibili.com","//search.bilibili.com","//space.bilibili.com","//account.bilibili.com","//pay.bilibili.com","//member.bilibili.com","//big.bilibili.com","//message.bilibili.com","//app.bilibili.com","//passport.bilibili.com","//live.bilibili.com/blackboard/"],urlExclude:["//t.bilibili.com/vote/h5/index/#/result","//t.bilibili.com/lottery/h5/index/#/result","//member.bilibili.com/video/upload","//space.bilibili.com/ajax/","//www.bilibili.com/h5/comment/","//member.bilibili.com/v2","//game.bilibili.com/"],instantStyles:[{name:"custom-navbar-style",style:()=>Promise.resolve().then(a.t.bind(a,6064,23)),important:!0}],unload:async()=>{document.querySelectorAll(".custom-navbar,.custom-navbar-settings").forEach((t=>t.style.display="none"))},reload:async()=>{document.querySelectorAll(".custom-navbar,.custom-navbar-settings").forEach((t=>t.style.display="flex"))},extraOptions:()=>Promise.resolve().then(a.bind(a,359)).then((t=>t.default)),plugin:{displayName:"自定义顶栏 - 功能扩展",setup:({addData:t})=>{t("launchBar.actions",(t=>{t.push({name:"navbarSettings",getActions:async()=>[{name:"自定义顶栏设置",description:"Custom Navbar Settings",icon:"mdi-sort",action:async()=>{const{toggleNavbarSettings:t}=await Promise.resolve().then(a.bind(a,5220));t()}}]})}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function s(t){for(var e=-1,n=0;nPromise.resolve().then(n.bind(n,2542)).then((t=>t.default)),lazy:!1},l="https://www.bilibili.com/v/popular/rank/",d={name:"ranking",displayName:"排行",content:"排行",href:`${l}all`,active:document.URL.startsWith(l),touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,2632)).then((t=>t.default))},p={name:"userInfo",displayName:"个人信息",content:()=>Promise.resolve().then(n.bind(n,399)).then((t=>t.default)),href:(0,a.getUID)()?"https://space.bilibili.com":null,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,7437)).then((t=>t.default)),lazy:!1,noPopupPadding:!0,boundingWidth:240},u={name:"logo",displayName:"Logo",content:()=>Promise.resolve().then(n.bind(n,969)).then((t=>t.default)),href:"https://www.bilibili.com/"},m={name:"home",displayName:"主站",content:"主站",href:"https://www.bilibili.com/",touch:!0,boundingWidth:366,popupContent:()=>Promise.resolve().then(n.bind(n,1742)).then((t=>t.default))},f=t=>({...t,name:`${t.iframeName}Iframe`,content:t.displayName,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,4666)).then((t=>t.default)),boundingWidth:t.width,noPopupPadding:!0,transparentPopup:!0}),h=f({src:"https://www.bilibili.com/page-proxy/game-nav.html",href:"https://game.bilibili.com/",width:680,height:260,lazy:!0,displayName:"游戏中心",iframeName:"games"}),g=f({src:"https://live.bilibili.com/blackboard/dropdown-menu.html",href:"https://live.bilibili.com",width:528,height:266,lazy:!0,displayName:"直播",iframeName:"lives"}),v=f({src:"https://manga.bilibili.com/eden/bilibili-nav-panel.html",href:"https://manga.bilibili.com",width:720,height:266,lazy:!0,displayName:"漫画",iframeName:"manga"}),b=new Array(4).fill(0).map(((t,e)=>({name:`blank${e+1}`,displayName:`弹性空白${e+1}`,content:"",disabled:!0,flexStyle:"1 0 auto"}))),x=t=>({...t,content:t.displayName,active:document.URL.startsWith(t.href)}),y=(x({name:"ranking",displayName:"排行",href:"https://www.bilibili.com/v/popular/rank/all"}),x({name:"bangumi",displayName:"番剧",href:"https://www.bilibili.com/anime/"})),w=x({name:"drawing",displayName:"相簿",href:"https://h.bilibili.com"}),_=x({name:"music",displayName:"音频",href:"https://www.bilibili.com/audio/home/"}),C=x({name:"shop",displayName:"会员购",href:"https://show.bilibili.com"}),k=x({name:"match",displayName:"赛事",href:"https://www.bilibili.com/v/game/match/"}),S={name:"upload",displayName:"投稿",content:()=>Promise.resolve().then(n.bind(n,6426)).then((t=>t.default)),touch:!0,href:"https://member.bilibili.com/v2#/upload/video/frame",popupContent:()=>Promise.resolve().then(n.bind(n,4037)).then((t=>t.default))},V={name:"search",displayName:"搜索",content:()=>Promise.resolve().then(n.bind(n,5700)).then((t=>t.default)),disabled:!0},N={name:"feeds",displayName:"动态",content:"动态",href:"https://t.bilibili.com/",touch:!0,active:"https://t.bilibili.com/"===document.URL.replace(window.location.search,""),contentMounted:async t=>{const{getNotifyCount:e}=await Promise.resolve().then(n.t.bind(n,3864,23));await(async()=>{const n=await e();t.notifyCount=n})()},loginRequired:!0,popupContent:()=>Promise.resolve().then(n.bind(n,4196)).then((t=>t.default)),boundingWidth:300,noPopupPadding:!0};var I=n(2194);const L={name:"watchlater",displayName:"稍后再看",content:"稍后再看",href:"https://www.bilibili.com/watchlater/#/list",touch:!0,active:document.URL.startsWith("https://www.bilibili.com/watchlater/"),loginRequired:!0,boundingWidth:380,noPopupPadding:!0,popupContent:()=>Promise.resolve().then(n.bind(n,5878)).then((t=>t.default))},P=`https://space.bilibili.com/${(0,a.getUID)()}/favlist`,O={name:"favorites",displayName:"收藏",content:"收藏",href:P,touch:!0,active:document.URL.replace(/\?.*$/,"")===P,loginRequired:!0,boundingWidth:380,noPopupPadding:!0,popupContent:()=>Promise.resolve().then(n.bind(n,3995)).then((t=>t.default))},j="https://www.bilibili.com/account/history",z={name:"history",displayName:"历史",content:"历史",href:j,active:document.URL.replace(/\?.*$/,"")===j,loginRequired:!0,boundingWidth:350,noPopupPadding:!0,popupContent:()=>Promise.resolve().then(n.bind(n,712)).then((t=>t.default))},[E,$,T,D]=b;var M=n(12),A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:!t.item.hidden,expression:"!item.hidden"}],staticClass:"custom-navbar-item",class:{disabled:t.item.disabled,active:t.item.active},style:{flex:t.item.flexStyle,order:t.item.order},attrs:{role:"listitem","data-name":t.item.name}},[t.item.href?n("CustomNavbarLink",{staticClass:"main-content",attrs:{"new-tab":t.newTab,href:!t.item.active&&!t.item.touch&&t.item.href},on:{mouseover:function(e){return e.target!==e.currentTarget?null:t.requestPopup()}}},["string"==typeof t.item.content?[t._v("\n "+t._s(t.item.content)+"\n ")]:n(t.item.content,{tag:"component",attrs:{item:t.item}})],2):n("div",{staticClass:"main-content",on:{click:function(e){!t.item.active&&!t.item.touch&&t.item.clickAction&&t.item.clickAction(e)}}},["string"==typeof t.item.content?[t._v("\n "+t._s(t.item.content)+"\n ")]:n(t.item.content,{tag:"component",attrs:{item:t.item}})],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.item.active,expression:"!item.active"}],staticClass:"notify-count"},[t.item.notifyCount>0?[t._v("\n "+t._s(t.item.notifyCount)+"\n ")]:t._e()],2),t._v(" "),n("div",{ref:"popupContainer",staticClass:"popup-container"},[t.item.popupContent?n("div",{staticClass:"popup",class:t.popupClasses(t.item)},[t.item.requestedPopup?n(t.item.popupContent,{ref:"popup",tag:"component",attrs:{container:t.$refs.popupContainer,item:t.item}}):t._e()],1):t._e()]),t._v(" "),n("div",{staticClass:"active-bar"})],1)};A._withStripped=!0;var B=n(407),U=function(){var t=this,e=t.$createElement;return(t._self._c||e)("a",t._g(t._b({attrs:{target:t.newTab?"_blank":null}},"a",t.$attrs,!1),t.$listeners),[t._t("default")],2)};U._withStripped=!0;var F=Vue.extend({props:{newTab:{type:Boolean,default:!0}}}),W=n(1900),R=(0,W.Z)(F,U,[],!1,null,null,null);R.options.__file="registry/lib/components/style/custom-navbar/CustomNavbarLink.vue";var q=R.exports;const Z=t=>{const{name:e}=t,n=M.kO.navbarOptions;return e in n.openInNewTabOverrides?n.openInNewTabOverrides[e]:n.openInNewTab};var H=Vue.extend({components:{CustomNavbarLink:q},props:{item:{type:M.kO,required:!0}},data(){return{newTab:Z(this.item),cancelListeners:none}},mounted(){const t=this.item;t.contentMounted?.(t);const e=()=>{this.updateLinkOption()};(0,B.addComponentListener)("customNavbar.openInNewTabOverrides",e),(0,B.addComponentListener)("customNavbar.openInNewTab",e),this.cancelListeners=()=>{(0,B.removeComponentListener)("customNavbar.openInNewTabOverrides",e),(0,B.removeComponentListener)("customNavbar.openInNewTab",e)}},beforeDestroy(){this.cancelListeners?.()},methods:{updateLinkOption(){this.newTab=Z(this.item)},popupClasses:t=>({transparent:t.transparentPopup,"no-padding":t.noPopupPadding,"iframe-container":t.iframeName}),triggerPopupShow:lodash.debounce((function(){const{popup:t}=this.$refs;t&&"popupShow"in t&&"function"==typeof t.popupShow&&t.popupShow()}),300),async requestPopup(){const{item:t}=this;t.requestedPopup||t.disabled||(t.requestedPopup=!0),this.triggerPopupShow()}}}),J=n(3379),Y=n.n(J),X=n(9065),G=n.n(X),Q={insert:"head",singleton:!1},K=(Y()(G(),Q),G().locals,(0,W.Z)(H,A,[],!1,null,null,null));K.options.__file="registry/lib/components/style/custom-navbar/CustomNavbarItem.vue";var tt=K.exports,et=coreApis.observer,nt=coreApis.spinQuery,it=coreApis.utils.urls;const[at]=(0,o.registerAndGetData)(M.rm,[E,u,m,y,d,w,_,h,g,C,k,v,$,V,T,p,c,N,I.V,L,O,z,S,D]),[rt]=(0,o.registerAndGetData)(M.Je,{items:[]}),ot=()=>{const t=Boolean((0,a.getUID)()),e=at.filter((e=>!(e.loginRequired&&!t))).map((t=>new M.kO(t))).sort((0,r.ascendingSort)((t=>t.order)));return rt.items=e,e};var st=Vue.extend({components:{NavbarItem:tt},data:()=>({initItems:at,items:ot(),styles:[]}),watch:{initItems(){this.items=ot()}},async mounted(){await(async t=>{(0,it.matchCurrentPage)(it.mainSiteUrls)&&(0,nt.sq)((()=>dq("#banner_link,.international-header .bili-banner, .bili-header__banner")),(t=>null!==t&&Boolean(t.style.backgroundImage))).then((e=>{e&&(0,et.attributes)(e,(()=>{(0,B.addComponentListener)("customNavbar.transparent",(e=>{(0,B.getComponentSettings)("hideBanner").enabled||t.toggleStyle(e,"transparent")}),!0),(0,B.addComponentListener)("hideBanner",(e=>{(0,B.getComponentSettings)("customNavbar").options.transparent&&t.toggleStyle(!e,"transparent")}))}))}))})(this)},methods:{toggleStyle(t,e){t&&!this.styles.includes(e)?this.styles.push(e):!t&&this.styles.includes(e)&&this.styles.splice(this.styles.indexOf(e),1)}}}),ct=n(5173),lt=n.n(ct),dt={insert:"head",singleton:!1},pt=(Y()(lt(),dt),lt().locals,(0,W.Z)(st,i,[],!1,null,null,null));pt.options.__file="registry/lib/components/style/custom-navbar/CustomNavbar.vue";var ut=pt.exports},3995:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return I}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"favorites-list"},[n("div",{staticClass:"header"},[n("FavoritesFolderSelect",{model:{value:t.folder,callback:function(e){t.folder=e},expression:"folder"}}),t._v(" "),n("div",{staticClass:"search"},[n("TextBox",{attrs:{linear:"",placeholder:"搜索"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("a",{staticClass:"operation",attrs:{href:t.playLink,title:"播放全部",target:"_blank"}},[n("VButton",{staticClass:"play-all",attrs:{round:""}},[n("VIcon",{attrs:{icon:"mdi-play",size:18}})],1)],1),t._v(" "),n("a",{staticClass:"operation",attrs:{href:t.moreLink,title:"查看更多",target:"_blank"}},[n("VButton",{staticClass:"more-info",attrs:{round:""}},[n("VIcon",{attrs:{icon:"mdi-dots-horizontal",size:18}})],1)],1)],1),t._v(" "),n("div",{staticClass:"content"},[t.loading&&!t.searching?n("VLoading"):t.loading||t.canLoadMore||0!==t.filteredCards.length?n("transition-group",{staticClass:"cards",attrs:{name:"cards",tag:"div"}},[t._l(t.filteredCards,(function(e){return n("div",{key:e.id,staticClass:"favorite-card"},[n("a",{staticClass:"cover-container",attrs:{target:"_blank",href:"https://www.bilibili.com/video/"+e.bvid}},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{width:130,height:85}}}),t._v(" "),n("div",{staticClass:"floating duration"},[t._v(t._s(e.durationText))]),t._v(" "),n("div",{staticClass:"floating favorite-time"},[t._v(t._s(e.favoriteTime))])],1),t._v(" "),n("a",{staticClass:"title",attrs:{target:"_blank",href:"https://www.bilibili.com/video/"+e.bvid,title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.upID,title:e.upName}},[n("DpiImage",{staticClass:"face",attrs:{"placeholder-image":"",src:e.upFaceUrl,size:20}}),t._v(" "),n("div",{staticClass:"name"},[t._v(t._s(e.upName))])],1)])})),t._v(" "),t.canLoadMore?n("ScrollTrigger",{key:"scroll-trigger",on:{trigger:function(e){return t.scrollTrigger()}}}):t._e()],2):n("VEmpty")],1)])};i._withStripped=!0;var a=n(8643),r=n(8117),o=n(3109),s=n(3663),c=n(5729),l=n(407);const d={id:0,name:"加载中...",count:0};var p=function(){var t=this,e=t.$createElement;return(t._self._c||e)("VDropdown",{staticClass:"favorites-folder-select",attrs:{round:"",items:t.folders,"key-mapper":function(t){return t.id},value:t.folder},on:{change:function(e){return t.change(e)}},scopedSlots:t._u([{key:"item",fn:function(e){var n=e.item;return[t._v("\n "+t._s(n.name)+"\n ")]}}])})};p._withStripped=!0;const u=(0,l.getComponentSettings)("customNavbar").options;var m=Vue.extend({components:{VDropdown:a.VDropdown},model:{prop:"folder",event:"change"},props:{folder:{type:Object,required:!0}},data:()=>({folders:[]}),async created(){const t=(0,o.getUID)();if(!t)return;const e=`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${t}&is_space=0`,n=await(0,s.getJsonWithCredentials)(e);if(0!==n.code)throw new Error(`获取收藏夹列表失败: ${n.message}`);if(this.folders=lodash.get(n,"data.list",[]).map((t=>({id:t.id,name:t.title,count:t.media_count}))),this.folders.length>0&&this.folder.id===d.id){const{lastFavoriteFolder:t}=u,e=this.folders.find((e=>e.id===t));e?this.$emit("change",e):this.$emit("change",this.folders[0])}},methods:{change(t){u.lastFavoriteFolder=t.id,this.$emit("change",t)}}}),f=n(1900),h=(0,f.Z)(m,p,[],!1,null,null,null);h.options.__file="registry/lib/components/style/custom-navbar/favorites/FavoritesFolderSelect.vue";var g=h.exports,v=n(3037);const b=(0,l.getComponentSettings)("customNavbar").options,x=t=>!!b.showDeadVideos||9!==t.attr&&1!==t.attr,y=t=>({id:t.id,aid:t.id,bvid:t.bvid,coverUrl:t.cover.replace("http:","https:"),favoriteTimestamp:1e3*t.fav_time,favoriteTime:(0,r.formatDate)(new Date(1e3*t.fav_time)),title:t.title,description:t.intro,duration:t.duration,durationText:(0,r.formatDuration)(t.duration),playCount:t.cnt_info.play,danmakuCount:t.cnt_info.danmaku,upName:t.upper.name,upFaceUrl:t.upper.face.replace("http:","https:"),upID:t.upper.mid});var w=Vue.extend({components:{FavoritesFolderSelect:g,VLoading:a.VLoading,VEmpty:a.VEmpty,VIcon:a.VIcon,VButton:a.VButton,TextBox:a.TextBox,DpiImage:a.DpiImage,ScrollTrigger:a.ScrollTrigger},mixins:[v.u],data:()=>({loading:!0,cards:[],filteredCards:[],page:1,hasMorePage:!0,searchPage:1,hasMoreSearchPage:!0,search:"",folder:d}),computed:{searching(){return""!==this.search},moreLink(){const{id:t}=this.folder;return 0===t?`https://space.bilibili.com/${(0,o.getUID)()}/favlist`:`https://space.bilibili.com/${(0,o.getUID)()}/favlist?fid=${t}`},playLink(){const{id:t}=this.folder;if(0!==t)return`https://www.bilibili.com/medialist/play/ml${t}`},canLoadMore(){return this.searching?this.hasMoreSearchPage:this.hasMorePage}},watch:{folder(){this.changeList()},search(t){""!==t?(t=t.toLowerCase(),this.hasMoreSearchPage=!0,this.searchPage=1,this.filteredCards=this.cards.filter((e=>e.title.toLowerCase().includes(t)||e.upName.toLowerCase().includes(t)))):this.filteredCards=this.cards}},methods:{async getCards(){const t=`https://api.bilibili.com/medialist/gateway/base/spaceDetail?media_id=${this.folder.id}&pn=${this.page}&ps=20`,e=await(0,s.getJsonWithCredentials)(t);if(0!==e.code)throw new Error(`加载收藏夹内容失败: ${e.message}`);return e.data.medias?e.data.medias.filter(x).map(y):[]},async changeList(){if(0!==this.folder.id)try{this.search="",this.cards=[],this.loading=!0,this.searchPage=1,this.hasMoreSearchPage=!0,this.page=1,this.hasMorePage=!0,this.cards=await this.getCards(),this.filteredCards=this.cards}catch(t){(0,c.logError)(t)}finally{this.loading=!1}},async loadNextPage(){try{this.page++;const t=await this.getCards();this.cards.push(...t),this.hasMorePage=0===t.length||this.cards.lengtht.id));this.filteredCards=a;const r=n.length+i.length===0,o=i.length<20;if(r||o)return void(this.hasMoreSearchPage=!1)}catch(t){console.error(t)}finally{this.loading=!1}}),200),scrollTrigger(){this.searching?this.debounceSearchAllList():this.loadNextPage()}}}),_=n(3379),C=n.n(_),k=n(6410),S=n.n(k),V={insert:"head",singleton:!1},N=(C()(S(),V),S().locals,(0,f.Z)(w,i,[],!1,null,null,null));N.options.__file="registry/lib/components/style/custom-navbar/favorites/NavbarFavorites.vue";var I=N.exports},4196:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"navbar-feeds"},[n("TabControl",{ref:"tabControl",attrs:{tabs:t.tabs,"more-link":"https://t.bilibili.com/"},scopedSlots:t._u([{key:"more-link",fn:function(){return[t._v("\n 所有动态\n "),n("VIcon",{attrs:{icon:"feeds",size:18}})]},proxy:!0}])})],1)};i._withStripped=!0;var a=n(8643),r=n(2023),o=n(3864),s=n(3037);const c=[{name:"video",displayName:"视频",component:()=>Promise.resolve().then(n.bind(n,7747)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=8",count:0},{name:"bangumi",displayName:"番剧",component:()=>Promise.resolve().then(n.bind(n,9312)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=512,4097,4098,4099,4100,4101",count:0},{name:"column",displayName:"专栏",component:()=>Promise.resolve().then(n.bind(n,1728)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=64",count:0},{name:"live",displayName:"直播",component:()=>Promise.resolve().then(n.bind(n,1141)).then((t=>t.default)),activeLink:"https://link.bilibili.com/p/center/index#/user-center/follow/1",count:0}];var l=Vue.extend({components:{TabControl:a.TabControl,VIcon:a.VIcon},mixins:[s.u],data:()=>({tabs:c}),mounted(){this.refreshNotifyCount()},methods:{popupShow(){this.item.notifyCount=0},async refreshNotifyCount(){const{tabControl:t}=this.$refs;c.forEach((async e=>{if(t.selectedTab===e)return;if("live"===e.name)return;const n=await(0,o.getNotifyCount)(r.feedsCardTypes[e.name].id.toString());e.count=n,console.log(e)}))}}}),d=n(3379),p=n.n(d),u=n(3030),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/feeds/NavbarFeeds.vue";var g=h.exports},9312:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"bangumi-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"bangumi-feeds-content"},t._l(t.cards,(function(t){return n("BangumiCard",{key:t.id,attrs:{"is-new":t.new,data:t}})})),1),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a=n(2023),r=n(3864),o=coreApis.componentApis.feeds.BangumiCard,s=n.n(o),c=n(8281),l=Vue.extend({components:{BangumiCard:s()},mixins:[(0,c.I)(a.feedsCardTypes.bangumi,(t=>{const e=JSON.parse(t.card);return{id:t.desc.dynamic_id_str,title:e.apiSeasonInfo.title,coverUrl:e.apiSeasonInfo.cover,epCoverUrl:e.cover,epTitle:e.new_desc,url:e.url,get new(){return(0,r.isNewID)(this.id)}}}))]}),d=n(3379),p=n.n(d),u=n(4728),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/BangumiFeeds.vue";var g=h.exports},1728:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"column-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"columns-feeds-content"},t._l(t.cards,(function(t){return n("ColumnCard",{key:t.id,attrs:{"is-new":t.new,data:t}})})),1),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a=n(2023),r=n(3864),o=coreApis.componentApis.feeds.ColumnCard,s=n.n(o),c=n(8281),l=Vue.extend({components:{ColumnCard:s()},mixins:[(0,c.I)(a.feedsCardTypes.column,(t=>{const e=JSON.parse(t.card);return{id:t.desc.dynamic_id_str,cvID:e.id,title:e.title,upName:e.author.name,upFaceUrl:e.author.face,upID:e.author.mid,description:e.summary,covers:e.image_urls,originalCovers:e.origin_image_urls,get new(){return(0,r.isNewID)(this.id)}}}))]}),d=n(3379),p=n.n(d),u=n(8994),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/ColumnFeeds.vue";var g=h.exports},1141:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"live-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?t._e():n("VEmpty"),t._v(" "),n("transition-group",{staticClass:"live-feeds-content",attrs:{name:"cards",tag:"div"}},t._l(t.cards,(function(e){return n("a",{key:e.id,staticClass:"live-card",attrs:{target:"_blank",href:e.url}},[n("div",{staticClass:"face-container"},[n("DpiImage",{staticClass:"face",attrs:{size:48,src:e.upFaceUrl}})],1),t._v(" "),n("div",{staticClass:"live-info"},[n("div",{staticClass:"live-title",attrs:{title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("div",{staticClass:"live-name",attrs:{title:e.name}},[t._v(t._s(e.upName))])])])})),0)],1)};i._withStripped=!0;var a=n(8643),r=n(3663),o=Vue.extend({components:{VLoading:a.VLoading,VEmpty:a.VEmpty,DpiImage:a.DpiImage},data:()=>({loading:!0,rawItems:[],hasMorePage:!0}),computed:{cards(){return this.rawItems.map((t=>({id:t.roomid,title:t.title,upFaceUrl:t.face,upName:t.uname,url:t.link})))}},async created(){const[t]=(0,r.responsiveGetPages)({api:t=>(0,r.getJsonWithCredentials)(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${t}&pagesize=24`),getList:t=>lodash.get(t,"data.list",[]),getTotal:t=>lodash.get(t,"data.results",0)});this.rawItems=await t,this.loading=!1}}),s=n(3379),c=n.n(s),l=n(2422),d=n.n(l),p={insert:"head",singleton:!1},u=(c()(d(),p),d().locals,(0,n(1900).Z)(o,i,[],!1,null,null,null));u.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/LiveFeeds.vue";var m=u.exports},7747:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return x}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"video-feeds"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"video-feeds-content"},[n("transition-group",{staticClass:"left-column",attrs:{name:"cards",tag:"div"}},t._l(t.columnedCards.left,(function(t){return n("VideoCard",{key:t.id,attrs:{orientation:"vertical","is-new":t.new,"show-stats":!1,data:t}})})),1),t._v(" "),n("transition-group",{staticClass:"right-column",attrs:{name:"cards",tag:"div"}},t._l(t.columnedCards.right,(function(t){return n("VideoCard",{key:t.id,attrs:{orientation:"vertical","is-new":t.new,"show-stats":!1,data:t}})})),1)],1),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a=n(8117),r=n(3864),o=n(2023),s=coreApis.componentApis.feeds.VideoCard,c=n.n(s),l=n(8281);const d=t=>{const e=Number(new Date),n=new Date(t),i=[n.getHours(),n.getMinutes(),n.getSeconds()].map((t=>t.toString().padStart(2,"0"))).join(":");let a;return a=new Date(e).getFullYear()!==n.getFullYear()?[n.getFullYear(),n.getMonth()+1,n.getDate()]:[n.getMonth()+1,n.getDate()],`${a.map((t=>t.toString().padStart(2,"0"))).join("-")} ${i}`},p=t=>{const e=Number(new Date);if(e-864e5t.toString().padStart(2,"0"))).join("-")}`};var u=Vue.extend({components:{VideoCard:c()},mixins:[(0,l.I)(o.feedsCardTypes.video,(t=>{const e=JSON.parse(t.card);return{id:t.desc.dynamic_id_str,aid:e.aid,bvid:t.desc.bvid,videoUrl:`https://www.bilibili.com/${t.desc.bvid}`,coverUrl:e.pic,title:e.title,duration:e.duration,durationText:(0,a.formatDuration)(e.duration),description:e.desc,pubTime:d(1e3*e.pubdate),pubTimeText:p(1e3*e.pubdate),upFaceUrl:t.desc.user_profile.info.face,upName:t.desc.user_profile.info.uname,upID:t.desc.user_profile.info.uid,watchlater:!0,playCount:(0,a.formatCount)(e.stat.view),get new(){return(0,r.isNewID)(this.id)}}}))],computed:{columnedCards(){const{cards:t}=this;return{left:t.filter(((t,e)=>e%2==0)),right:t.filter(((t,e)=>e%2!=0))}}},methods:{onCardsUpdate:t=>(0,o.groupVideoFeeds)(t)}}),m=n(3379),f=n.n(m),h=n(4812),g=n.n(h),v={insert:"head",singleton:!1},b=(f()(g(),v),g().locals,(0,n(1900).Z)(u,i,[],!1,null,"6e663916",null));b.options.__file="registry/lib/components/style/custom-navbar/feeds/tabs/VideoFeeds.vue";var x=b.exports},712:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return _}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"history-list"},[n("div",{staticClass:"header"},[n("div",{staticClass:"header-row"},[n("div",{staticClass:"search"},[n("TextBox",{attrs:{placeholder:"搜索",linear:""},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("div",{staticClass:"operations"},[n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/account/history"}},[n("VButton",{attrs:{title:"查看更多",round:""}},[n("VIcon",{attrs:{icon:"mdi-dots-horizontal",size:18}})],1)],1)])]),t._v(" "),n("div",{staticClass:"header-row"},[n("div",{staticClass:"row-title"},[t._v("\n 过滤:\n ")]),t._v(" "),n("div",{staticClass:"type-filters"},t._l(t.types,(function(e){return n("div",{key:e.name,staticClass:"type-filter"},[n("VButton",{class:{checked:e.checked},attrs:{round:"",title:(e.checked?"不显示":"显示")+e.displayName},on:{click:function(n){return t.toggleTypeFilter(e)}}},[n("VIcon",{attrs:{icon:e.icon,size:18}}),t._v("\n "+t._s(e.displayName)+"\n ")],1)],1)})),0)])]),t._v(" "),n("div",{staticClass:"content"},[t.loading?n("VLoading"):t.loading||0!==t.groups.length?n("transition-group",{staticClass:"cards",attrs:{name:"cards",tag:"div"}},[t._l(t.groups,(function(e){return n("div",{key:e.name,staticClass:"time-group"},[n("div",{staticClass:"time-group-name"},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("transition-group",{staticClass:"time-group-items",attrs:{name:"time-group",tag:"div"}},t._l(e.items,(function(e){return n("div",{key:e.id,staticClass:"time-group-item"},[n("a",{staticClass:"cover-container",attrs:{target:"_blank",href:e.url}},[n("DpiImage",{staticClass:"cover",attrs:{src:e.cover,size:{width:160,height:110},"placeholder-image":""}}),t._v(" "),e.progress?n("div",{staticClass:"progress",style:{width:100*e.progress+"%"}}):t._e(),t._v(" "),e.progressText?n("div",{staticClass:"floating progress-number"},[t._v(t._s(e.progress>=1?"已看完":e.progressText))]):t._e(),t._v(" "),void 0!==e.liveStatus?n("div",{staticClass:"floating duration live-status",class:{on:1===e.liveStatus}},[t._v(t._s(1===e.liveStatus?"直播中":"未开播"))]):t._e(),t._v(" "),e.durationText?n("div",{staticClass:"floating duration"},[t._v(t._s(e.durationText))]):t._e()],1),t._v(" "),n("a",{staticClass:"title",attrs:{target:"_blank",href:e.url,title:e.title}},[t._v(t._s(e.title||e.upName+"的直播间"))]),t._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"pgc"===e.type?e.url:"https://space.bilibili.com/"+e.upID,title:e.upName}},[e.upFaceUrl?n("DpiImage",{staticClass:"up-face",attrs:{size:18,src:e.upFaceUrl}}):t._e(),t._v(" "),n("div",{staticClass:"up-name"},[t._v(t._s(e.upName))])],1),t._v(" "),e.timeText?n("div",{staticClass:"time",attrs:{title:new Date(e.viewAt).toLocaleString()}},[t._v("\n "+t._s(e.timeText)+"\n ")]):t._e()])})),0)],1)})),t._v(" "),t.canNextPage?n("ScrollTrigger",{key:"scroll-trigger",on:{trigger:function(e){return t.nextPage()}}}):t._e()],2):n("VEmpty")],1)])};i._withStripped=!0;var a=n(4522),r=n(8643),o=n(3037),s=n(3663),c=n(3109),l=n(8117);let d;!function(t){t.Video="archive",t.Live="live",t.Article="article",t.Bangumi="pgc"}(d||(d={}));const p=[{name:d.Video,displayName:"视频",icon:"mdi-play-circle-outline",checked:!0},{name:d.Bangumi,displayName:"番剧",icon:"mdi-television-classic",checked:!0},{name:d.Live,displayName:"直播",icon:"mdi-video-wireless-outline",checked:!0},{name:d.Article,displayName:"专栏",icon:"mdi-newspaper-variant-outline",checked:!0}],u=()=>{const t=new Date,e=Number(new Date(t.getFullYear(),t.getMonth(),t.getDate())),n=864e5;return{now:t,today:e,oneDay:n,yesterday:e-n,lastWeek:e-7*n}},m=t=>{const{yesterday:e}=u();return Number(t)>=e?`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`:`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`},f=t=>{"article"===t.history.business&&(t.history.cid=t.history.oid);const{epid:e,bvid:n,cid:i,oid:a}=t.history,r=t.progress>0?`t=${t.progress}`:"t=0",o=-1===t.progress?1:t.progress/t.duration,s=t=>t.replace("http:","https:"),p=new Date(1e3*t.view_at),u={title:t.title,viewAt:1e3*t.view_at,time:p,timeText:m(p),cover:t.cover?s(t.cover):s(t.covers[0]),covers:t.covers?.map(s)??[],progress:o,progressText:Number.isNaN(o)?null:`${(0,c.fixed)(100*o,1)}%`,duration:t.duration,durationText:t.duration?(0,l.formatDuration)(t.duration):null,upName:t.author_name,upFaceUrl:s(t.author_face),upID:t.author_mid};if(e)return{...u,id:e,url:`https://www.bilibili.com/bangumi/play/ep${e}?${r}`,title:t.show_title||t.title,upName:t.title,type:d.Bangumi};if(n)return{...u,id:n,url:`https://www.bilibili.com/video/${n}?p=${t.history.page}&${r}`,type:d.Video};if(i)return{...u,id:i,url:`https://www.bilibili.com/read/cv${i}`,type:d.Article};if(a)return{...u,id:a,url:`https://live.bilibili.com/${a}`,liveStatus:t.live_status,type:d.Live};throw console.error("unknown history item type",t),new Error("未知的历史项目类型")};var h=Vue.extend({components:{VButton:r.VButton,VIcon:r.VIcon,TextBox:r.TextBox,VLoading:r.VLoading,VEmpty:r.VEmpty,ScrollTrigger:r.ScrollTrigger,DpiImage:r.DpiImage},mixins:[o.u],data:()=>({types:p,search:"",viewTime:0,cards:[],groups:[],loading:!0,hasMorePage:!0}),computed:{canNextPage(){return""===this.search&&!this.loading&&this.hasMorePage&&this.types.every((t=>t.checked))}},watch:{search:lodash.debounce((function(){this.updateGroups()}),200)},async created(){try{await this.nextPage()}finally{this.loading=!1}},methods:{toggleTypeFilter(t){t.checked=!t.checked,this.updateGroups()},filterFunc(t){return!p.some((e=>e.name===t.type&&!e.checked))&&!(!t.title.toLowerCase().includes(this.search.toLowerCase())&&!t.upName.toLowerCase().includes(this.search.toLowerCase()))},updateGroups(){this.groups=(t=>{if(0===t.length)return[];const{today:e,yesterday:n,lastWeek:i}=u(),a=lodash.groupBy(t,(t=>t.viewAt>=e?"今天":t.viewAt>=n?"昨天":t.viewAt>=i?"本周":"更早"));return Object.entries(a).map((([t,e])=>({name:t,items:e})))})(this.cards.filter(this.filterFunc))},async nextPage(){const t=await(async t=>{let e="https://api.bilibili.com/x/web-interface/history/cursor";t&&(e+=`?view_at=${Math.round(t/1e3)}`);const{list:n}=await(0,s.bilibiliApi)((0,s.getJsonWithCredentials)(e),"获取历史记录失败");return Array.isArray(n)?n.map(f):[]})(this.viewTime),e=lodash.uniqBy(this.cards.concat(t).sort((0,a.descendingSort)((t=>t.viewAt))),(t=>t.id));this.cards=e,this.updateGroups(),e.length>0&&(this.viewTime=lodash.last(e).viewAt),this.hasMorePage=0!==e.length}}}),g=n(3379),v=n.n(g),b=n(7337),x=n.n(b),y={insert:"head",singleton:!1},w=(v()(x(),y),x().locals,(0,n(1900).Z)(h,i,[],!1,null,null,null));w.options.__file="registry/lib/components/style/custom-navbar/history/NavbarHistory.vue";var _=w.exports},1742:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"home-popup",attrs:{role:"list"}},t._l(Object.entries(t.categories),(function(e){var i=e[0],a=e[1];return n("div",{key:i,staticClass:"category-item",class:{main:null!==a.code},attrs:{role:"listitem"}},[n("a",{attrs:{href:a.link,target:"_blank"}},[n("svg",{attrs:{"aria-hidden":"true"}},[n("use",{attrs:{href:"#header-icon-"+a.icon,"xlink:href":"#header-icon-"+a.icon}})]),t._v(" "),n("div",{staticClass:"name"},[t._v(t._s(i))]),t._v(" "),n("span",{staticClass:"count"},[null!==a.count?[t._v(t._s(a.count))]:t._e()],2)]),t._v(" "),a.subCategories?n("div",{staticClass:"sub-regions-popup popup"},t._l(Object.entries(a.subCategories),(function(e){var i=e[0],a=e[1];return n("a",{key:i,staticClass:"sub-region",attrs:{href:a,target:"_blank"}},[t._v(t._s(i))])})),0):t._e()])})),0)};i._withStripped=!0;var a=n(1212),r=n(3037);const o=lodash.cloneDeep(a.categories);Object.values(o).forEach((t=>{t.count=null}));let s=!1;var c=Vue.extend({mixins:[r.u],data:()=>({categories:o}),async created(){if(s)return;s=!0;const{bilibiliApi:t,getJson:e}=await Promise.resolve().then(n.t.bind(n,3663,23)),{addCategoryIcons:i}=await Promise.resolve().then(n.t.bind(n,1212,23));i();const{region_count:a={}}=await t(e("https://api.bilibili.com/x/web-interface/online"),"[自定义顶栏] 分区投稿信息获取失败");Object.values(this.categories).forEach((t=>{t.code&&(Array.isArray(t.code)?t.count=lodash.sum(t.code.map((t=>a[t]))):t.count=a[t.code])}))}}),l=n(3379),d=n.n(l),p=n(4374),u=n.n(p),m={insert:"head",singleton:!1},f=(d()(u(),m),u().locals,(0,n(1900).Z)(c,i,[],!1,null,null,null));f.options.__file="registry/lib/components/style/custom-navbar/home/NavbarHome.vue";var h=f.exports},4666:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return s}});var i=function(){var t=this,e=t.$createElement;return(t._self._c||e)("iframe",{attrs:{src:t.item.src,frameborder:"0",width:t.item.width,height:t.item.height}})};i._withStripped=!0;var a=n(3037),r=Vue.extend({name:"IframePopup",mixins:[a.u]}),o=(0,n(1900).Z)(r,i,[],!1,null,null,null);o.options.__file="registry/lib/components/style/custom-navbar/iframe/IframePopup.vue";var s=o.exports},969:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.seasonLogoUrl?n("img",{staticClass:"custom-navbar-logo season",attrs:{height:"38",src:t.seasonLogoUrl}}):n("VIcon",{staticClass:"custom-navbar-logo",attrs:{icon:"logo"}})};i._withStripped=!0;var a=n(407),r=n(3663),o=n(8643),s=Vue.extend({name:"NavbarLogo",components:{VIcon:o.VIcon},data:()=>({seasonLogoUrl:""}),watch:{seasonLogoUrl(){document.body.classList.toggle("season-logo-enabled",Boolean(this.seasonLogoUrl))}},async created(){(0,a.addComponentListener)("customNavbar.seasonLogo",(async t=>{if(!t)return void(this.seasonLogoUrl="");const e=await(0,r.getJson)("https://api.bilibili.com/x/web-show/page/header?resource_id=1");0===e.code?this.seasonLogoUrl=lodash.get(e,"data.litpic","").replace("http:","https:"):this.seasonLogoUrl=""}),!0)}}),c=n(3379),l=n.n(c),d=n(3324),p=n.n(d),u={insert:"head",singleton:!1},m=(l()(p(),u),p().locals,(0,n(1900).Z)(s,i,[],!1,null,null,null));m.options.__file="registry/lib/components/style/custom-navbar/logo/NavbarLogo.vue";var f=m.exports},2542:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"messages-popup",attrs:{role:"list"}},t._l(t.entries,(function(e){return n("div",{key:e.name,staticClass:"message-entry",attrs:{role:"listitem"}},[n("a",{attrs:{"data-prop":e.prop,target:"_blank",href:e.href,"data-count":e.count||null},on:{click:function(n){return t.clearCount(e)}}},[t._v(t._s(e.name))])])})),0)};i._withStripped=!0;var a=n(3663),r=n(3037);const o=[{prop:"reply",href:"https://message.bilibili.com/#/reply",name:"回复我的"},{prop:"at",href:"https://message.bilibili.com/#/at",name:"@我的"},{prop:"like",href:"https://message.bilibili.com/#/love",name:"收到的赞"},{prop:"sys_msg",href:"https://message.bilibili.com/#/system",name:"系统通知"},{prop:"user_msg",href:"https://message.bilibili.com/#/whisper",name:"我的消息"},{href:"https://message.bilibili.com/#/archive",name:"私信存档"},{href:"https://message.bilibili.com/#/config",name:"消息设置"}];var s=Vue.extend({name:"MessagesPopup",mixins:[r.u],data:()=>({entries:o.map((t=>(t.count=0,t))),settings:{notify:!0,hideNotFollowedCount:!1,json:{}}}),async created(){await this.fetchSettings(),this.settings.notify&&this.notify()},methods:{async fetchSettings(){const t=await(0,a.getJsonWithCredentials)("https://api.vc.bilibili.com/link_setting/v1/link_setting/get?msg_notify=1&show_unfollowed_msg=1");0===t.code&&(this.settings={notify:3!==t.data.msg_notify,hideNotFollowedCount:1===t.data.show_unfollowed_msg,json:t.data})},async notify(){const t=await(0,a.getJsonWithCredentials)("https://api.bilibili.com/x/msgfeed/unread"),e=await(0,a.getJsonWithCredentials)("https://api.vc.bilibili.com/session_svr/v1/session_svr/single_unread");t.data.user_msg=e.data.follow_unread||0,this.settings.hideNotFollowedCount||(t.data.user_msg+=e.data.unfollow_unread||0),this.item.notifyCount=o.reduce(((e,n)=>e+(n.prop?t.data[n.prop]:0)),0),this.item.notifyCount&&(console.log(o),o.forEach((e=>{if(!e.prop)return;const n=t.data[e.prop];console.log(e.prop,e.count,n),n>0&&(e.count=n)})))},clearCount(t){this.item.notifyCount-=t.count,t.count=0}}}),c=n(3379),l=n.n(c),d=n(6617),p=n.n(d),u={insert:"head",singleton:!1},m=(l()(p(),u),p().locals,(0,n(1900).Z)(s,i,[],!1,null,"589ce0fa",null));m.options.__file="registry/lib/components/style/custom-navbar/messages/NavbarMessages.vue";var f=m.exports},2632:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ranking-popup",attrs:{role:"list"}},t._l(t.entries,(function(e){return n("div",{key:e.name,staticClass:"ranking-entry",attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:e.href}},[t._v(t._s(e.name))])])})),0)};i._withStripped=!0;var a=n(3037);const r=[{href:"https://www.bilibili.com/v/popular/all",name:"综合热门"},{href:"https://www.bilibili.com/v/popular/weekly",name:"每周必看"},{href:"https://www.bilibili.com/v/popular/history",name:"入站必刷"},{href:"https://www.bilibili.com/v/popular/rank/all",name:"排行榜"}];var o=Vue.extend({name:"RankingPopup",mixins:[a.u],data:()=>({entries:r})}),s=n(3379),c=n.n(s),l=n(3369),d=n.n(l),p={insert:"head",singleton:!1},u=(c()(d(),p),d().locals,(0,n(1900).Z)(o,i,[],!1,null,"6678d691",null));u.options.__file="registry/lib/components/style/custom-navbar/ranking/NavbarRanking.vue";var m=u.exports},5700:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var i=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"custom-navbar-search"},[e("LaunchBar")],1)};i._withStripped=!0;var a=coreApis.componentApis.launchBar.LaunchBar,r=n.n(a),o=Vue.extend({components:{LaunchBar:r()}}),s=n(3379),c=n.n(s),l=n(2438),d=n.n(l),p={insert:"head",singleton:!1},u=(c()(d(),p),d().locals,(0,n(1900).Z)(o,i,[],!1,null,null,null));u.options.__file="registry/lib/components/style/custom-navbar/search/NavbarSearch.vue";var m=u.exports},359:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"custom-navbar-extra-options"},[t.login?n("VButton",{ref:"button",on:{mouseover:function(e){return t.loadNavbarSettings()},click:function(e){return t.toggleNavbarSettings()}}},[t._v("\n 布局设置"),n("VIcon",{attrs:{icon:"right-arrow",size:16}})],1):t._e()],1)};i._withStripped=!0;var a=n(3109),r=n(8643),o=n(5220),s=Vue.extend({components:{VIcon:r.VIcon,VButton:r.VButton},data:()=>({login:Boolean((0,a.getUID)())}),methods:{async loadNavbarSettings(){if(await(0,o.loadNavbarSettings)()){const t=this.$refs.button.$el;(0,o.setTriggerElement)(t)}},toggleNavbarSettings:o.toggleNavbarSettings}}),c=n(3379),l=n.n(c),d=n(8306),p=n.n(d),u={insert:"head",singleton:!1},m=(l()(p(),u),p().locals,(0,n(1900).Z)(s,i,[],!1,null,null,null));m.options.__file="registry/lib/components/style/custom-navbar/settings/ExtraOptions.vue";var f=m.exports},4040:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return y}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("VPopup",{ref:"popup",staticClass:"custom-navbar-settings be-settings-extra-options",attrs:{fixed:"",lazy:!1,"trigger-element":t.triggerElement},model:{value:t.open,callback:function(e){t.open=e},expression:"open"}},[n("div",{staticClass:"navbar-settings-header"},[n("VIcon",{staticClass:"title-icon",attrs:{icon:"mdi-sort",size:24}}),t._v(" "),n("div",{staticClass:"title"},[t._v("\n 顶栏布局设置\n ")]),t._v(" "),n("div",{staticClass:"grow"}),t._v(" "),n("div",{staticClass:"close",on:{click:function(e){t.open=!1}}},[n("VIcon",{attrs:{icon:"close",size:18}})],1)],1),t._v(" "),n("div",{staticClass:"navbar-settings-content"},[n("div",{staticClass:"navbar-settings-section"},[n("div",{staticClass:"navbar-settings-section-title"},[t._v("\n 边缘间距\n ")]),t._v(" "),n("div",{staticClass:"navbar-settings-section-description"},[t._v("\n 设定两侧边缘处的间距, 单位为百分比, 100%为整个顶栏的宽度.\n "),n("br"),t._v("空间不足时, 实际呈现的间距会自动缩小.\n ")]),t._v(" "),n("div",{staticClass:"navbar-settings-section-content",on:{mouseover:function(e){return t.peekPadding(!0)},mouseout:function(e){return t.peekPadding(!1)}}},[n("VSlider",{attrs:{min:0,max:40,step:.5},model:{value:t.padding,callback:function(e){t.padding=e},expression:"padding"}}),t._v(" "),n("div",{staticClass:"padding-value"},[t._v("\n "+t._s(t.padding.toFixed(1))+"%\n ")])],1)]),t._v(" "),n("div",{staticClass:"navbar-settings-section"},[n("div",{staticClass:"navbar-settings-section-title"},[t._v("\n 元素呈现\n ")]),t._v(" "),n("div",{staticClass:"navbar-settings-section-description"},[t._v("\n 按住并拖动可以调整顺序, 点击眼睛图标可以切换隐藏/显示.\n ")]),t._v(" "),t.loaded?t._e():n("VLoading"),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.loaded,expression:"loaded"}],ref:"navbarSortList",staticClass:"navbar-settings-section-content navbar-sort-list"},t._l(t.rendered.items,(function(e){return n("div",{key:e.name,staticClass:"navbar-sort-item",class:{"navbar-hidden":e.hidden},attrs:{"data-name":e.name},on:{mouseover:function(n){return t.peekItem(e,!0)},mouseout:function(n){return t.peekItem(e,!1)}}},[n("div",{staticClass:"item-name"},[t._v("\n "+t._s(e.displayName)+"\n ")]),t._v(" "),n("div",{staticClass:"toggle-visible"},[n("VIcon",{attrs:{size:18,icon:e.hidden?"mdi-eye-off-outline":"mdi-eye-outline"},on:{click:function(n){return t.toggleVisible(e)}}})],1)])})),0)],1)])])};i._withStripped=!0;var a=n(8643),r=n(407),o=n(3109),s=coreApis.runtimeLibrary,c=n(8269),l=n(12);const d=t=>{t.forEach(((t,e)=>{t.order!==e&&(t.order=e)}));const e=Object.fromEntries(t.map((t=>[t.name,t.order])));l.kO.navbarOptions.order=e},{navbarOptions:p}=l.kO,[u]=(0,c.getData)(l.Je);var m=Vue.extend({components:{VPopup:a.VPopup,VIcon:a.VIcon,VSlider:a.VSlider,VLoading:a.VLoading},props:{triggerElement:{type:HTMLElement,default:null}},data:()=>({open:!1,padding:p.padding,rendered:u,hidden:p.hidden,loaded:!1}),watch:{padding:lodash.debounce((t=>{p.padding=t}),200)},async mounted(){(0,r.addComponentListener)("customNavbar.padding",(t=>{this.padding!==t&&(this.padding=t)}));const t=this.$refs.navbarSortList;var e;(await s.SortableJSLibrary).create(t,{delay:100,forceFallback:!0,onEnd:t=>{this.onSort(t)}}),(e=u.items).every(((t,e)=>t.order===e))||d(e),this.loaded=!0},methods:{toggle(){this.$refs.popup.toggle()},peekPadding(t){(0,o.dqa)(".custom-navbar .padding").forEach((e=>e.classList.toggle("peek",t)))},peekItem(t,e){t.element?.classList.toggle("peek",e)},onSort(t){const e=this.$refs.navbarSortList,n=t.item;console.log(`${n.getAttribute("data-name")} ${t.oldIndex}->${t.newIndex}`);const i=Object.fromEntries([...e.children].map(((t,e)=>[t.getAttribute("data-name"),e])));this.rendered.items=((t,e)=>{const n=lodash.sortBy(t,(t=>e[t.name]));return d(n),n})(u.items,i)},toggleVisible(t){p.hidden.includes(t.name)?(lodash.pull(p.hidden,t.name),t.hidden=!1,console.log("delete",t.name)):(p.hidden.push(t.name),t.hidden=!0,console.log("add",t.name))}}}),f=n(3379),h=n.n(f),g=n(4754),v=n.n(g),b={insert:"head",singleton:!1},x=(h()(v(),b),v().locals,(0,n(1900).Z)(m,i,[],!1,null,null,null));x.options.__file="registry/lib/components/style/custom-navbar/settings/NavbarSettings.vue";var y=x.exports},7898:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return s}});var i=function(){var t=this.$createElement;return(this._self._c||t)("SubscriptionsList",{attrs:{type:"bangumi"}})};i._withStripped=!0;var a=n(806),r=Vue.extend({components:{SubscriptionsList:a.Z}}),o=(0,n(1900).Z)(r,i,[],!1,null,null,null);o.options.__file="registry/lib/components/style/custom-navbar/subscriptions/BangumiSubscriptions.vue";var s=o.exports},8324:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return s}});var i=function(){var t=this.$createElement;return(this._self._c||t)("SubscriptionsList",{attrs:{type:"cinema"}})};i._withStripped=!0;var a=n(806),r=Vue.extend({components:{SubscriptionsList:a.Z}}),o=(0,n(1900).Z)(r,i,[],!1,null,null,null);o.options.__file="registry/lib/components/style/custom-navbar/subscriptions/CinemaSubscriptions.vue";var s=o.exports},8834:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"navbar-subscriptions"},[n("TabControl",{ref:"tabControl",attrs:{tabs:t.tabs,"more-link":t.moreLink}})],1)};i._withStripped=!0;var a=n(8643),r=n(3109),o=n(3037),s=n(2194),c=Vue.extend({components:{TabControl:a.TabControl},mixins:[o.u],data(){const t=(0,r.getUID)();return{moreLink:e=>`https://space.bilibili.com/${t}/${e.name}`,tabs:[{name:s.N.Bangumi,displayName:"追番",activeLink:`https://space.bilibili.com/${t}/bangumi`,component:()=>Promise.resolve().then(n.bind(n,7898)).then((t=>t.default))},{name:s.N.Cinema,displayName:"追剧",activeLink:`https://space.bilibili.com/${t}/cinema`,component:()=>Promise.resolve().then(n.bind(n,8324)).then((t=>t.default))}]}}}),l=n(3379),d=n.n(l),p=n(8734),u=n.n(p),m={insert:"head",singleton:!1},f=(d()(u(),m),u().locals,(0,n(1900).Z)(c,i,[],!1,null,null,null));f.options.__file="registry/lib/components/style/custom-navbar/subscriptions/NavbarSubscriptions.vue";var h=f.exports},806:function(t,e,n){"use strict";n.d(e,{Z:function(){return x}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"subscription-list"},[t.loading?n("VLoading"):t.loading||0!==t.cards.length?[n("div",{staticClass:"subscription-content"},t._l(t.cards,(function(e){return n("a",{key:e.id,staticClass:"subscription-card",attrs:{href:e.playUrl,target:"_blank"}},[n("div",{staticClass:"cover-container"},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:64}})],1),t._v(" "),n("div",{staticClass:"card-info"},[n("h1",{staticClass:"title",attrs:{title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("div",{staticClass:"progress-row"},[e.status?n("div",{staticClass:"status",class:"status-"+e.status},[t._v(t._s(e.statusText))]):t._e(),t._v(" "),e.progress?n("div",{staticClass:"progress",attrs:{title:e.progress+" | "+e.latest}},[t._v(t._s(e.progress)+" | "+t._s(e.latest))]):n("div",{staticClass:"progress",attrs:{title:e.latest}},[t._v(t._s(e.latest))]),t._v(" "),n("a",{staticClass:"info",attrs:{href:e.mediaUrl,target:"_blank",title:"详细信息"}},[n("VIcon",{attrs:{icon:"mdi-information-outline",size:16}})],1)])])])})),0),t._v(" "),t.hasMorePage?n("ScrollTrigger",{on:{trigger:function(e){return t.nextPage()}}}):t._e()]:n("VEmpty")],2)};i._withStripped=!0;var a,r=n(3109),o=n(5729),s=n(8643),c=n(3663),l=n(2194);!function(t){t[t.ToView=1]="ToView",t[t.Viewing=2]="Viewing",t[t.Viewed=3]="Viewed"}(a||(a={}));const d=t=>{switch(t){case a.ToView:return"想看";case a.Viewing:default:return"在看";case a.Viewed:return"看过"}},p=(t,e)=>{let n=t.status;n!==a.Viewed&&(n=a.Viewed-n);let i=e.status;return i!==a.Viewed&&(i=a.Viewed-i),n-i};var u=Vue.extend({components:{DpiImage:s.DpiImage,VLoading:s.VLoading,VEmpty:s.VEmpty,VIcon:s.VIcon,ScrollTrigger:s.ScrollTrigger},props:{type:{type:String,default:l.N.Bangumi}},data:()=>({loading:!0,hasMorePage:!0,cards:[],page:1}),async created(){this.nextPage()},methods:{async nextPage(){try{const t=await(0,c.getJsonWithCredentials)(`https://api.bilibili.com/x/space/bangumi/follow/list?type=${this.type!==l.N.Bangumi?"2":"1"}&pn=${this.page}&ps=16&vmid=${(0,r.getUID)()}`);if(0!==t.code)return void(0,o.logError)(`加载订阅信息失败: ${t.message}`);const e=lodash.uniqBy(this.cards.concat(lodash.get(t,"data.list").map((t=>({title:t.title,coverUrl:t.square_cover.replace("http:","https:"),latest:t.new_ep.index_show,progress:t.progress,id:t.season_id,status:t.follow_status,statusText:d(t.follow_status),playUrl:`https://www.bilibili.com/bangumi/play/ss${t.season_id}`,mediaUrl:`https://www.bilibili.com/bangumi/media/md${t.media_id}`})))),(t=>t.id)).sort(p);this.page++,this.cards=e,this.hasMorePage=lodash.get(t,"data.total",0)>this.cards.length}finally{this.loading=!1}}}}),m=n(3379),f=n.n(m),h=n(7104),g=n.n(h),v={insert:"head",singleton:!1},b=(f()(g(),v),g().locals,(0,n(1900).Z)(u,i,[],!1,null,null,null));b.options.__file="registry/lib/components/style/custom-navbar/subscriptions/SubscriptionsList.vue";var x=b.exports},6426:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return u}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"navbar-upload"},[n("VIcon",{attrs:{icon:"upload",size:18}}),t._v(" "),n("div",{staticClass:"navbar-upload-name"},[t._v("\n 投稿\n ")])],1)};i._withStripped=!0;var a=n(8643),r=Vue.extend({components:{VIcon:a.VIcon}}),o=n(3379),s=n.n(o),c=n(8961),l=n.n(c),d={insert:"head",singleton:!1},p=(s()(l(),d),l().locals,(0,n(1900).Z)(r,i,[],!1,null,"1a272463",null));p.options.__file="registry/lib/components/style/custom-navbar/upload/NavbarUpload.vue";var u=p.exports},4037:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return u}});var i=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)};i._withStripped=!0;var a=n(3037),r=Vue.extend({mixins:[a.u]}),o=n(3379),s=n.n(o),c=n(2360),l=n.n(c),d={insert:"head",singleton:!1},p=(s()(l(),d),l().locals,(0,n(1900).Z)(r,i,[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"upload-popup",attrs:{role:"list"}},[n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload/text/apply"}},[t._v("专栏投稿")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload/audio/"}},[t._v("音频投稿")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload/video/frame"}},[t._v("视频投稿")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload-manager/article"}},[t._v("投稿管理")])]),t._v(" "),n("div",{attrs:{role:"listitem"}},[n("a",{attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/home"}},[t._v("创作中心")])])])}],!1,null,"a07cc62e",null));p.options.__file="registry/lib/components/style/custom-navbar/upload/UploadPopup.vue";var u=p.exports},399:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"user-face-container"},[n("img",{staticClass:"user-face",attrs:{src:t.faceSrc,srcset:t.faceSrcset}}),t._v(" "),n("img",{staticClass:"user-pendant",attrs:{src:t.pendantSrc,srcset:t.pendantSrcset}})])};i._withStripped=!0;var a=n(3278),r=n(3109),o=coreApis.utils.constants;const s="//static.hdslb.com/images/member/noface.gif";var c=Vue.extend({name:"UserFace",data:()=>({faceSrc:o.EmptyImageUrl,pendantSrc:o.EmptyImageUrl,faceSrcset:null,pendantSrcset:null}),async created(){const t=await(0,a.getUserInfo)();if(t.isLogin){if(t.face){const e=t.face.replace("http","https");if(e.includes(s))this.faceSrc=s;else{const t=68;this.faceSrc=e,this.faceSrcset=(0,r.getDpiSourceSet)(e,t)}}if(t.pendant?.image){const e=t.pendant.image.replace("http","https"),n=116;this.pendantSrcset=(0,r.getDpiSourceSet)(e,n,"png")}}else this.faceSrc="https://static.hdslb.com/images/akari.jpg"}}),l=n(3379),d=n.n(l),p=n(464),u=n.n(p),m={insert:"head",singleton:!1},f=(d()(u(),m),u().locals,(0,n(1900).Z)(c,i,[],!1,null,null,null));f.options.__file="registry/lib/components/style/custom-navbar/user-info/UserFace.vue";var h=f.exports},7437:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return v}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"user-info-panel"},[t.isLogin&&!0===t.userInfo.isLogin?n("div",{staticClass:"logged-in"},[n("a",{staticClass:"name",attrs:{target:"_blank",href:"https://space.bilibili.com/"}},[t._v(t._s(t.userInfo.uname))]),t._v(" "),n("a",{staticClass:"type",attrs:{target:"_blank",href:"https://account.bilibili.com/account/big"}},[t._v(t._s(t.userType))]),t._v(" "),1===t.userInfo.vipStatus&&2===t.userInfo.vipType?n("div",{staticClass:"privileges row"},[n("div",{staticClass:"b-coin",class:{received:t.privileges.bCoin.received},attrs:{title:"有效期限: "+t.privileges.bCoin.expire},on:{click:function(e){return t.privilegeReceive(1)}}},[t._v("\n "+t._s(t.privileges.bCoin.received?"已领取B币":"领取B币")+"\n ")]),t._v(" "),n("div",{staticClass:"coupons",class:{received:t.privileges.coupons.received},attrs:{title:"有效期限: "+t.privileges.coupons.expire},on:{click:function(e){return t.privilegeReceive(2)}}},[t._v("\n "+t._s(t.privileges.coupons.received?"已领取优惠券":"领取优惠券")+"\n ")])]):t._e(),t._v(" "),n("div",{staticClass:"level-info row"},[n("a",{staticClass:"level",attrs:{target:"_blank",title:"等级",href:"https://account.bilibili.com/account/record"}},[n("VIcon",{staticClass:"level-icon",attrs:{icon:"lv"+t.userInfo.level_info.current_level}})],1),t._v(" "),n("span",{staticClass:"level-progress-label"},[t._v(t._s(t.userInfo.level_info.current_exp)+" / "+t._s(t.userInfo.level_info.next_exp))])]),t._v(" "),n("div",{staticClass:"level-progress separator"},[n("div",{staticClass:"level-progress-thumb",style:t.levelProgressStyle})]),t._v(" "),n("div",{staticClass:"items"},[n("a",{staticClass:"item",attrs:{target:"_blank",title:"手机验证",href:"https://passport.bilibili.com/account/security#/bindphone"}},[n("VIcon",{attrs:{icon:"bind-phone",size:20}}),t._v(" "),t.userInfo.mobile_verified?n("VIcon",{attrs:{icon:"ok",size:18}}):n("VIcon",{attrs:{icon:"cancel",size:18}})],1),t._v(" "),n("a",{staticClass:"item",attrs:{target:"_blank",title:"邮箱验证",href:"https://passport.bilibili.com/account/security#/bindmail"}},[n("VIcon",{attrs:{icon:"bind-email",size:20}}),t._v(" "),t.userInfo.email_verified?n("VIcon",{attrs:{icon:"ok",size:18}}):n("VIcon",{attrs:{icon:"cancel",size:18}})],1),t._v(" "),n("a",{staticClass:"item",attrs:{target:"_blank",href:"https://account.bilibili.com/site/coin",title:"硬币"}},[n("VIcon",{attrs:{icon:"coin-outline",size:20}}),t._v(" "),n("span",[t._v(t._s(t.userInfo.money))])],1),t._v(" "),n("a",{staticClass:"item",attrs:{target:"_blank",href:"https://pay.bilibili.com/bb_balance.html",title:"B币"}},[n("VIcon",{attrs:{icon:"b-coin-outline",size:20}}),t._v(" "),n("span",[t._v(t._s(t.userInfo.wallet.bcoin_balance))])],1)]),t._v(" "),n("div",{staticClass:"separator"}),t._v(" "),n("div",{staticClass:"stats"},[n("a",{staticClass:"stats-item",attrs:{href:"https://space.bilibili.com/"+t.userInfo.mid+"/fans/follow",target:"_blank"}},[n("div",{staticClass:"stats-number"},[t._v(t._s(t._f("count")(t.stat.following)))]),t._v("关注\n ")]),t._v(" "),n("a",{staticClass:"stats-item",attrs:{href:"https://space.bilibili.com/"+t.userInfo.mid+"/fans/fans",target:"_blank"}},[n("div",{staticClass:"stats-number"},[t._v(t._s(t._f("count")(t.stat.follower)))]),t._v("粉丝\n ")]),t._v(" "),n("a",{staticClass:"stats-item",attrs:{href:"https://space.bilibili.com/"+t.userInfo.mid+"/dynamic",target:"_blank"}},[n("div",{staticClass:"stats-number"},[t._v(t._s(t._f("count")(t.stat.dynamic_count)))]),t._v("动态\n ")])]),t._v(" "),n("div",{staticClass:"separator"}),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://account.bilibili.com/account/home"}},[n("VIcon",{attrs:{icon:"profile"}}),t._v("个人中心\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://member.bilibili.com/v2#/upload-manager/article"}},[n("VIcon",{attrs:{icon:"posts"}}),t._v("投稿管理\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://pay.bilibili.com/"}},[n("VIcon",{attrs:{icon:"wallet"}}),t._v("B币钱包\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://link.bilibili.com/p/center/index"}},[n("VIcon",{attrs:{icon:"live-center"}}),t._v("直播中心\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://show.bilibili.com/orderlist"}},[n("VIcon",{attrs:{icon:"order-center"}}),t._v("订单中心\n ")],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/v/cheese/mine"}},[n("VIcon",{attrs:{icon:"course"}}),t._v("我的课程\n ")],1),t._v(" "),n("div",{staticClass:"logout grey-button",on:{click:function(e){return t.logout()}}},[t._v("\n 退出登录\n ")])]):t._e(),t._v(" "),t.isLogin?t._e():n("div",{staticClass:"not-logged-in"},[n("h1",{staticClass:"welcome"},[t._v("\n 欢迎来到 bilibili\n ")]),t._v(" "),n("a",{staticClass:"signup grey-button",attrs:{href:"https://passport.bilibili.com/register/phone.html"}},[t._v("注册")]),t._v(" "),n("a",{staticClass:"login theme-button",attrs:{href:"https://passport.bilibili.com/login"}},[t._v("登录")])])])};i._withStripped=!0;var a=n(3109),r=n(8117),o=n(5729),s=n(3663),c=n(3278),l=n(3037),d=Vue.extend({components:{VIcon:coreApis.ui.VIcon},filters:{count:r.formatCount},mixins:[l.u],data:()=>({userInfo:{},stat:{},isLogin:Boolean((0,a.getUID)()),privileges:{bCoin:{received:!1,expire:""},coupons:{received:!1,expire:""}}}),computed:{userType(){if(!this.userInfo.isLogin)return"未登录";if(0===this.userInfo.level_info.current_level)return"注册会员";if(1===this.userInfo.vipStatus){if(1===this.userInfo.vipType)return this.userInfo.vip_theme_type?"小会员":"大会员";if(2===this.userInfo.vipType)return this.userInfo.vip_theme_type?"年度小会员":"年度大会员"}return"正式会员"},levelProgressStyle(){if(!this.userInfo.isLogin)return{};const{current_exp:t,current_min:e,next_exp:n}=this.userInfo.level_info;return{transform:`scaleX(${(t-e)/(n-e)})`}}},async created(){const t=await(0,c.getUserInfo)();this.userInfo=t;const e=await(0,s.getJsonWithCredentials)("https://api.bilibili.com/x/web-interface/nav/stat");if(this.stat=e.data||{},this.isLogin&&2===this.userInfo.vipType){const t=await(0,s.getJsonWithCredentials)("https://api.bilibili.com/x/vip/privilege/my");if(0===t.code){const e=t.data.list.find((t=>1===t.type));this.privileges.bCoin.received=1===e.state,this.privileges.bCoin.expire=new Date(1e3*e.expire_time).toLocaleDateString();const n=t.data.list.find((t=>2===t.type));this.privileges.coupons.received=1===n.state,this.privileges.coupons.expire=new Date(1e3*n.expire_time).toLocaleDateString()}}},methods:{async privilegeReceive(t){const e={1:"bCoin",2:"coupons"};if(this.privileges[e[t]].received)return;this.privileges[e[t]].received=!0;const n=(0,a.getCsrf)(),i=await(await fetch("https://api.bilibili.com/x/vip/privilege/receive",{credentials:"include",headers:{"content-type":"application/x-www-form-urlencoded"},body:`type=${t}&csrf=${n}`,method:"POST"})).json();console.log(i),0===i.code?"bCoin"===e[t]&&(this.userInfo.wallet.bcoin_balance+=5):69801===i.code||(this.privileges[e[t]].received=!1,(0,o.logError)(i.message))},async logout(){const t=await(0,s.postTextWithCredentials)("https://passport.bilibili.com/login/exit/v2",(0,a.formData)({biliCSRF:(0,a.getCsrf)()})),e=lodash.get(JSON.parse(t),"data.redirectUrl","");e&&window.location.assign(e)}}}),p=n(3379),u=n.n(p),m=n(9692),f=n.n(m),h={insert:"head",singleton:!1},g=(u()(f(),h),f().locals,(0,n(1900).Z)(d,i,[],!1,null,null,null));g.options.__file="registry/lib/components/style/custom-navbar/user-info/UserInfoPopup.vue";var v=g.exports},5878:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"watchlater-list"},[n("div",{staticClass:"header"},[n("div",{staticClass:"search"},[n("TextBox",{attrs:{linear:"",placeholder:"搜索"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/medialist/play/watchlater"}},[n("VButton",{staticClass:"round-button",attrs:{title:"播放全部",round:""}},[n("VIcon",{attrs:{icon:"mdi-play",size:18}})],1)],1),t._v(" "),n("a",{staticClass:"operation",attrs:{target:"_blank",href:"https://www.bilibili.com/watchlater/#/list"}},[n("VButton",{staticClass:"round-button",attrs:{title:"查看更多",round:""}},[n("VIcon",{attrs:{icon:"mdi-dots-horizontal",size:18}})],1)],1)]),t._v(" "),t.loading?n("VLoading"):t.loading||0!==t.cards.length?n("transition-group",{staticClass:"watchlater-list-content",attrs:{name:"cards",tag:"div"}},t._l(t.filteredCards,(function(e,i){return n("div",{key:e.aid,staticClass:"watchlater-card"},[n("a",{staticClass:"cover-container",attrs:{target:"_blank",href:e.href}},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{width:130,height:85}}}),t._v(" "),n("div",{staticClass:"floating remove",attrs:{title:"移除"},on:{click:function(n){return n.preventDefault(),t.remove(e.aid,i)}}},[n("VIcon",{attrs:{icon:"mdi-close",size:16}})],1),t._v(" "),n("div",{staticClass:"floating duration"},[t._v(t._s(e.durationText))]),t._v(" "),e.complete?n("div",{staticClass:"floating viewed"},[t._v("已观看")]):t._e()],1),t._v(" "),n("a",{staticClass:"title",attrs:{target:"_blank",href:e.href,title:e.title}},[t._v(t._s(e.title))]),t._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.upID,title:e.upName}},[n("DpiImage",{staticClass:"face",attrs:{src:e.upFaceUrl,size:20}}),t._v(" "),n("div",{staticClass:"name"},[t._v(t._s(e.upName))])],1)])})),0):n("VEmpty")],1)};i._withStripped=!0;var a=n(407),r=n(8117),o=coreApis.componentApis.video.watchlater,s=n(8643),c=n(3037),l=Vue.extend({components:{VLoading:s.VLoading,VEmpty:s.VEmpty,TextBox:s.TextBox,VButton:s.VButton,VIcon:s.VIcon,DpiImage:s.DpiImage},mixins:[c.u],data(){const t=(0,a.getComponentSettings)("watchlaterRedirect");return{watchlaterList:o.watchlaterList,loading:!0,cards:[],filteredCards:[],search:"",redirect:t.enabled&&t.options.navbar}},watch:{search(){this.updateFilteredCards()}},async created(){try{await this.updateList()}finally{this.loading=!1}},methods:{toggleWatchlater:o.toggleWatchlater,async updateList(){const t=await(0,o.getWatchlaterList)(!0);if(!t)return void(this.cards=[]);const e=t=>this.redirect?`https://www.bilibili.com/video/${t.bvid}`:`https://www.bilibili.com/medialist/play/watchlater/${t.bvid}`,n=t.map((t=>{const n=(()=>{if(void 0===t.pages)return e(t);const n=t.pages.map((t=>t.cid)),i=0===t.cid?1:n.indexOf(t.cid)+1;return this.redirect?`${e(t)}?p=${i}`:e(t)})(),i=Math.round(1e3*t.progress/t.duration)/1e3;return{aid:t.aid,href:n,coverUrl:t.pic.replace("http:","https:"),durationText:(0,r.formatDuration)(t.duration),duration:t.duration,complete:t.progress<0||i>.95,title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid}}));this.cards=n,this.search?this.updateFilteredCards():this.filteredCards=n},async remove(t,e){this.cards.splice(e,1),await this.toggleWatchlater(t),this.lastRemovedAid=t},async undo(){const t=this.lastRemovedAid;0!==t&&await this.toggleWatchlater(t)},updateFilteredCards:lodash.debounce((function(){const t=this.search.toLowerCase();this.$el.querySelector(".watchlater-list-content").scrollTo(0,0),this.filteredCards=this.cards.filter((e=>e.title.toLowerCase().includes(t)||e.upName.toLowerCase().includes(t)))}),100)}}),d=n(3379),p=n.n(d),u=n(8120),m=n.n(u),f={insert:"head",singleton:!1},h=(p()(m(),f),m().locals,(0,n(1900).Z)(l,i,[],!1,null,null,null));h.options.__file="registry/lib/components/style/custom-navbar/watchlater/NavbarWatchlater.vue";var g=h.exports},1900:function(t,e,n){"use strict";function i(t,e,n,i,a,r,o,s){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):a&&(c=s?function(){a.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(t,e){return c.call(e),d(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:t,options:l}}n.d(e,{Z:function(){return i}})},3663:function(t){"use strict";t.exports=coreApis.ajax},2023:function(t){"use strict";t.exports=coreApis.componentApis.feeds.api},3864:function(t){"use strict";t.exports=coreApis.componentApis.feeds.notify},1212:function(t){"use strict";t.exports=coreApis.componentApis.utils.categories.data},8269:function(t){"use strict";t.exports=coreApis.pluginApis.data},407:function(t){"use strict";t.exports=coreApis.settings},8643:function(t){"use strict";t.exports=coreApis.ui},3278:function(t){"use strict";t.exports=coreApis.userInfo},8117:function(t){"use strict";t.exports=coreApis.utils.formatters},5729:function(t){"use strict";t.exports=coreApis.utils.log},4522:function(t){"use strict";t.exports=coreApis.utils.sort},3109:function(t){"use strict";t.exports=coreApis.utils}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,exports:{}};return n[t](r,r.exports,a),r.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},a.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var o={};t=t||[null,e({}),e([]),e(e)];for(var s=2&i&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){o[t]=function(){return n[t]}}));return o.default=function(){return n},a.d(r,o),r},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";a.d(r,{component:function(){return n}});var t=a(407),e=a(3109);const n={name:"customNavbar",displayName:"自定义顶栏",description:"\n使用脚本提供的顶栏替换原版的主站顶栏 (非主站不替换), 启用后还可以在反广告插件 (例如 ABP) 中配置禁止原版顶栏的消息 iframe 以提升性能:\n- *://message.bilibili.com/pages/nav/index_new_pc_sync\n- *://message.bilibili.com/pages/nav/index_new_sync\n ".trim(),entry:async({metadata:{name:n}})=>{if((0,e.isIframe)()||(0,e.isNotHtml)())return;(0,t.addComponentListener)(`${n}.padding`,(t=>{document.documentElement.style.setProperty("--navbar-bounds-padding",`${t}%`)}),!0);["https://space.bilibili.com","https://www.bilibili.com/read"].some((t=>(0,e.matchUrlPattern)(t)))||(0,t.addComponentListener)(`${n}.globalFixed`,(t=>{document.body.classList.toggle("fixed-navbar",t)}),!0);const i=await Promise.resolve().then(a.bind(a,6870)),r=(0,e.mountVueComponent)(i);document.body.insertAdjacentElement("beforeend",r.$el),["fill","shadow","blur"].forEach((e=>{(0,t.addComponentListener)(`${n}.${e}`,(t=>r.toggleStyle(t,e)),!0)}))},tags:[componentsTags.style,componentsTags.general],options:{hidden:{hidden:!0,defaultValue:["blank1","blank4","drawing","music","gamesIframe","bangumi","match"],displayName:"隐藏的元素"},order:{hidden:!0,defaultValue:{},displayName:"元素顺序"},padding:{hidden:!0,defaultValue:10,displayName:"边缘间距(%)"},globalFixed:{defaultValue:!1,displayName:"全局固定"},fill:{defaultValue:!1,displayName:"主题色填充"},transparent:{defaultValue:!0,displayName:"透明填充"},blur:{defaultValue:!1,displayName:"背景模糊"},shadow:{defaultValue:!0,displayName:"投影"},seasonLogo:{defaultValue:!1,displayName:"使用季节Logo"},touch:{defaultValue:!1,displayName:"触摸模式"},openInNewTab:{defaultValue:!0,displayName:"新标签页打开"},openInNewTabOverrides:{defaultValue:{logo:!1},displayName:"新标签页打开设置覆盖",hidden:!0},showDeadVideos:{defaultValue:!1,displayName:"显示已失效视频",hidden:!0}},urlInclude:["//www.bilibili.com","//t.bilibili.com","//search.bilibili.com","//space.bilibili.com","//account.bilibili.com","//pay.bilibili.com","//member.bilibili.com","//big.bilibili.com","//message.bilibili.com","//app.bilibili.com","//passport.bilibili.com","//live.bilibili.com/blackboard/"],urlExclude:["//t.bilibili.com/vote/h5/index/#/result","//t.bilibili.com/lottery/h5/index/#/result","//member.bilibili.com/video/upload","//space.bilibili.com/ajax/","//www.bilibili.com/h5/comment/","//member.bilibili.com/v2","//game.bilibili.com/"],instantStyles:[{name:"custom-navbar-style",style:()=>Promise.resolve().then(a.t.bind(a,6064,23)),important:!0}],unload:async()=>{document.querySelectorAll(".custom-navbar,.custom-navbar-settings").forEach((t=>t.style.display="none"))},reload:async()=>{document.querySelectorAll(".custom-navbar,.custom-navbar-settings").forEach((t=>t.style.display="flex"))},extraOptions:()=>Promise.resolve().then(a.bind(a,359)).then((t=>t.default)),plugin:{displayName:"自定义顶栏 - 功能扩展",setup:({addData:t})=>{t("launchBar.actions",(t=>{t.push({name:"navbarSettings",getActions:async()=>[{name:"自定义顶栏设置",description:"Custom Navbar Settings",icon:"mdi-sort",action:async()=>{const{toggleNavbarSettings:t}=await Promise.resolve().then(a.bind(a,5220));t()}}]})}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/dark-mode.js b/registry/dist/components/style/dark-mode.js index e797a8cdb..2b81df2b4 100644 --- a/registry/dist/components/style/dark-mode.js +++ b/registry/dist/components/style/dark-mode.js @@ -6,4 +6,4 @@ e.i=function(n,t,a){"string"==typeof n&&( // eslint-disable-next-line no-param-reassign n=[[null,n,""]]);var o={};if(a)for(var r=0;r{document.body.classList.add("dark"),localStorage.setItem("pbp_theme_v4","b")},e=async()=>{document.body.classList.remove("dark")},t={name:"darkMode",displayName:"夜间模式",entry:()=>{setTimeout(n,200)},reload:()=>{setTimeout(n,200)},unload:()=>{setTimeout(e,200)},description:"启用夜间模式能更好地适应光线暗的环境, 并会大量应用主题颜色.",tags:[componentsTags.style,componentsTags.general],instantStyles:[{name:"dark-mode",style:()=>Promise.resolve().then(o.t.bind(o,869,23)),important:!1},{name:"dark-mode-important",style:()=>Promise.resolve().then(o.t.bind(o,410,23)),important:!0}],plugin:{displayName:"夜间模式 - 提前注入",description:{"zh-CN":"提前注入夜间模式的 .dark class 以减少一些组件首屏仍然是白色的问题."},async setup(){const{contentLoaded:n}=await Promise.resolve().then(o.t.bind(o,270,23)),{isComponentEnabled:e}=await Promise.resolve().then(o.t.bind(o,407,23));n((()=>{e("darkMode")&&document.body.classList.add("dark")}))}},urlExclude:["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/","//member.bilibili.com/platform","//live.bilibili.com/p/html/live-lottery/anchor-join.html","//account.bilibili.com/subtitle/edit/#/editor","/york/allowance-charge","//cm.bilibili.com/quests/#/task"],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +var i=this[r][0];null!=i&&(o[i]=!0)}for(var l=0;l{document.body.classList.add("dark"),localStorage.setItem("pbp_theme_v4","b")},e=async()=>{document.body.classList.remove("dark")},t={name:"darkMode",displayName:"夜间模式",entry:()=>{setTimeout(n,200)},reload:()=>{setTimeout(n,200)},unload:()=>{setTimeout(e,200)},description:"启用夜间模式能更好地适应光线暗的环境, 并会大量应用主题颜色.",tags:[componentsTags.style,componentsTags.general],instantStyles:[{name:"dark-mode",style:()=>Promise.resolve().then(o.t.bind(o,869,23)),important:!1},{name:"dark-mode-important",style:()=>Promise.resolve().then(o.t.bind(o,410,23)),important:!0}],plugin:{displayName:"夜间模式 - 提前注入",description:{"zh-CN":"提前注入夜间模式的 .dark class 以减少一些组件首屏仍然是白色的问题."},async setup(){const{contentLoaded:n}=await Promise.resolve().then(o.t.bind(o,270,23)),{isComponentEnabled:e}=await Promise.resolve().then(o.t.bind(o,407,23));n((()=>{e("darkMode")&&document.body.classList.add("dark")}))}},urlExclude:["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/","//member.bilibili.com/platform","//live.bilibili.com/p/html/live-lottery/anchor-join.html","//account.bilibili.com/subtitle/edit/#/editor","/york/allowance-charge","//cm.bilibili.com/quests/#/task"],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/dark-mode/follow-system.js b/registry/dist/components/style/dark-mode/follow-system.js index ccb3298ee..eedbcaea2 100644 --- a/registry/dist/components/style/dark-mode/follow-system.js +++ b/registry/dist/components/style/dark-mode/follow-system.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["style/dark-mode/follow-system"]=t():e["style/dark-mode/follow-system"]=t()}(self,(function(){return function(){"use strict";var e,t,o={407:function(e){e.exports=coreApis.settings}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,n),r.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(o,i){if(1&i&&(o=this(o)),8&i)return o;if("object"==typeof o&&o){if(4&i&&o.__esModule)return o;if(16&i&&"function"==typeof o.then)return o}var r=Object.create(null);n.r(r);var c={};e=e||[null,t({}),t([]),t(t)];for(var l=2&i&&o;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},n.d(r,c),r},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){n.d(r,{component:function(){return t}});var e=coreApis.lifeCycle;const t={name:"darkModeFollowSystem",displayName:"夜间模式跟随系统",entry:()=>{unsafeWindow.addEventListener(e.LifeCycleEventTypes.End,(async()=>{const{getComponentSettings:e}=await Promise.resolve().then(n.t.bind(n,407,23)),t=e("darkMode"),o=matchMedia("(prefers-color-scheme: dark)"),i=e=>{e!==t.enabled&&(t.enabled=e)};i(o.matches),o.addEventListener("change",(e=>{i(e.matches)}))}))},urlExclude:["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/","//member.bilibili.com/platform","//live.bilibili.com/p/html/live-lottery/anchor-join.html","//account.bilibili.com/subtitle/edit/#/editor","/york/allowance-charge","//cm.bilibili.com/quests/#/task"],tags:[componentsTags.style,componentsTags.general],description:{"zh-CN":"\n使夜间模式同步系统设置的亮 / 暗主题, 请勿和 `夜间模式计划时段` 一同使用.\n\n> 注:在某些浏览器 (如 `Microsoft Edge`) 中,夜间模式仅会同步浏览器的亮 / 暗主题.\n ".trim()},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["style/dark-mode/follow-system"]=t():e["style/dark-mode/follow-system"]=t()}(self,(function(){return function(){"use strict";var e,t,o={407:function(e){e.exports=coreApis.settings}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,n),r.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(o,i){if(1&i&&(o=this(o)),8&i)return o;if("object"==typeof o&&o){if(4&i&&o.__esModule)return o;if(16&i&&"function"==typeof o.then)return o}var r=Object.create(null);n.r(r);var c={};e=e||[null,t({}),t([]),t(t)];for(var l=2&i&&o;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},n.d(r,c),r},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){n.d(r,{component:function(){return t}});var e=coreApis.lifeCycle;const t={name:"darkModeFollowSystem",displayName:"夜间模式跟随系统",entry:()=>{unsafeWindow.addEventListener(e.LifeCycleEventTypes.End,(async()=>{const{getComponentSettings:e}=await Promise.resolve().then(n.t.bind(n,407,23)),t=e("darkMode"),o=matchMedia("(prefers-color-scheme: dark)"),i=e=>{e!==t.enabled&&(t.enabled=e)};i(o.matches),o.addEventListener("change",(e=>{i(e.matches)}))}))},urlExclude:["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/","//member.bilibili.com/platform","//live.bilibili.com/p/html/live-lottery/anchor-join.html","//account.bilibili.com/subtitle/edit/#/editor","/york/allowance-charge","//cm.bilibili.com/quests/#/task"],tags:[componentsTags.style,componentsTags.general],description:{"zh-CN":"\n使夜间模式同步系统设置的亮 / 暗主题, 请勿和 `夜间模式计划时段` 一同使用.\n\n> 注:在某些浏览器 (如 `Microsoft Edge`) 中,夜间模式仅会同步浏览器的亮 / 暗主题.\n ".trim()},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/dark-mode/schedule.js b/registry/dist/components/style/dark-mode/schedule.js index ed8a19472..d64b0cf7e 100644 --- a/registry/dist/components/style/dark-mode/schedule.js +++ b/registry/dist/components/style/dark-mode/schedule.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["style/dark-mode/schedule"]=t():e["style/dark-mode/schedule"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return u}});var i=coreApis.lifeCycle,n=coreApis.settings;function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class o{constructor(...e){if(r(this,"hour",void 0),r(this,"minute",void 0),0===e.length){const e=new Date;this.hour=e.getHours(),this.minute=e.getMinutes()}else if(1===e.length){const[t]=e;[this.hour,this.minute]=t.split(":").slice(0,2).map((e=>o.validatePart(e))),this.normalize()}else 2===e.length&&([this.hour,this.minute]=e)}normalize(){for(;this.minute<0;)this.minute+=60,this.hour-=1;for(;this.minute>=60;)this.minute-=60,this.hour+=1;for(;this.hour<0;)this.hour+=24;for(;this.hour>=24;)this.hour-=24}lessThan(e){return this.houre.hour||this.hour===e.hour&&this.minute>e.minute}equals(e){return this.hour===e.hour&&this.minute===e.minute}isInRange(e,t){if(e.equals(t))return!1;let i=this.greaterThan(e)&&this.lessThan(t);e.greaterThan(t)&&(i=this.greaterThan(e)||this.lessThan(t));return i||this.equals(e)}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}`}static validatePart(e){const t=parseInt(e);return!Number.isNaN(t)&&t>=0&&t<=59?t:null}static millisecondsBefore(e){const t=new o,i=(new Date).getSeconds(),n=1e3*(3600*t.hour+60*t.minute+i);let r=1e3*(3600*e.hour+60*e.minute)-n;return(t.greaterThan(e)||t.equals(e)&&0!==i)&&(r+=864e5),r}}const s=e=>{const t=new o(e.options.range.start),i=new o(e.options.range.end),r=(new o).isInRange(t,i),u=(0,n.getComponentSettings)("darkMode");u.enabled!==r&&(u.enabled=r);let l=0;l=r?o.millisecondsBefore(i):o.millisecondsBefore(t),0!==l&&setTimeout((()=>s(e)),l)},u={name:"darkModeSchedule",displayName:"夜间模式计划时段",description:"设置一个使用夜间模式的时间段, 进入 / 离开此时间段时, 会自动开启 / 关闭夜间模式. 结束时间小于起始时间时将视为次日, 如 `18:00` 至 `6:00` 表示晚上 18:00 到次日 6:00. 请勿和 `夜间模式跟随系统` 一同使用.",tags:[componentsTags.style,componentsTags.general],entry:({settings:e})=>(0,i.fullyLoaded)((()=>s(e))),urlExclude:["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/","//member.bilibili.com/platform","//live.bilibili.com/p/html/live-lottery/anchor-join.html","//account.bilibili.com/subtitle/edit/#/editor","/york/allowance-charge","//cm.bilibili.com/quests/#/task"],options:{range:{defaultValue:{start:"18:00",end:"6:00"},displayName:"时间段",validator:e=>{const{start:t,end:i}=e,n=/^(\d{1,2}):(\d{1,2})$/;if(!n.test(t)||!n.test(i))return null;const r=new o(e.start),s=new o(e.end);return{start:r.toString(),end:s.toString()}}}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return t=t.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["style/dark-mode/schedule"]=t():e["style/dark-mode/schedule"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return u}});var i=coreApis.lifeCycle,n=coreApis.settings;function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class o{constructor(...e){if(r(this,"hour",void 0),r(this,"minute",void 0),0===e.length){const e=new Date;this.hour=e.getHours(),this.minute=e.getMinutes()}else if(1===e.length){const[t]=e;[this.hour,this.minute]=t.split(":").slice(0,2).map((e=>o.validatePart(e))),this.normalize()}else 2===e.length&&([this.hour,this.minute]=e)}normalize(){for(;this.minute<0;)this.minute+=60,this.hour-=1;for(;this.minute>=60;)this.minute-=60,this.hour+=1;for(;this.hour<0;)this.hour+=24;for(;this.hour>=24;)this.hour-=24}lessThan(e){return this.houre.hour||this.hour===e.hour&&this.minute>e.minute}equals(e){return this.hour===e.hour&&this.minute===e.minute}isInRange(e,t){if(e.equals(t))return!1;let i=this.greaterThan(e)&&this.lessThan(t);e.greaterThan(t)&&(i=this.greaterThan(e)||this.lessThan(t));return i||this.equals(e)}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}`}static validatePart(e){const t=parseInt(e);return!Number.isNaN(t)&&t>=0&&t<=59?t:null}static millisecondsBefore(e){const t=new o,i=(new Date).getSeconds(),n=1e3*(3600*t.hour+60*t.minute+i);let r=1e3*(3600*e.hour+60*e.minute)-n;return(t.greaterThan(e)||t.equals(e)&&0!==i)&&(r+=864e5),r}}const s=e=>{const t=new o(e.options.range.start),i=new o(e.options.range.end),r=(new o).isInRange(t,i),u=(0,n.getComponentSettings)("darkMode");u.enabled!==r&&(u.enabled=r);let l=0;l=r?o.millisecondsBefore(i):o.millisecondsBefore(t),0!==l&&setTimeout((()=>s(e)),l)},u={name:"darkModeSchedule",displayName:"夜间模式计划时段",description:"设置一个使用夜间模式的时间段, 进入 / 离开此时间段时, 会自动开启 / 关闭夜间模式. 结束时间小于起始时间时将视为次日, 如 `18:00` 至 `6:00` 表示晚上 18:00 到次日 6:00. 请勿和 `夜间模式跟随系统` 一同使用.",tags:[componentsTags.style,componentsTags.general],entry:({settings:e})=>(0,i.fullyLoaded)((()=>s(e))),urlExclude:["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/","//member.bilibili.com/platform","//live.bilibili.com/p/html/live-lottery/anchor-join.html","//account.bilibili.com/subtitle/edit/#/editor","/york/allowance-charge","//cm.bilibili.com/quests/#/task"],options:{range:{defaultValue:{start:"18:00",end:"6:00"},displayName:"时间段",validator:e=>{const{start:t,end:i}=e,n=/^(\d{1,2}):(\d{1,2})$/;if(!n.test(t)||!n.test(i))return null;const r=new o(e.start),s=new o(e.end);return{start:r.toString(),end:s.toString()}}}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return t=t.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/hide/bangumi/reviews.js b/registry/dist/components/style/hide/bangumi/reviews.js index 1bd5a6ecf..772ea31c9 100644 --- a/registry/dist/components/style/hide/bangumi/reviews.js +++ b/registry/dist/components/style/hide/bangumi/reviews.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,481,23)))),urlInclude:t.bangumiUrls,description:{"zh-CN":"隐藏番剧播放页面里的点评板块."},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var u=this[i][0];null!=u&&(r[u]=!0)}for(var c=0;cPromise.resolve().then(r.t.bind(r,481,23)))),urlInclude:t.bangumiUrls,description:{"zh-CN":"隐藏番剧播放页面里的点评板块."},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/hide/bangumi/sponsors.js b/registry/dist/components/style/hide/bangumi/sponsors.js index 2e4dd4b87..39147807a 100644 --- a/registry/dist/components/style/hide/bangumi/sponsors.js +++ b/registry/dist/components/style/hide/bangumi/sponsors.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,961,23)))),urlInclude:e.bangumiUrls,description:{"zh-CN":"隐藏番剧页面下方的承包榜, 以及右边的承包按钮."},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var u=this[i][0];null!=u&&(r[u]=!0)}for(var c=0;cPromise.resolve().then(r.t.bind(r,961,23)))),urlInclude:e.bangumiUrls,description:{"zh-CN":"隐藏番剧页面下方的承包榜, 以及右边的承包按钮."},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/hide/banner.js b/registry/dist/components/style/hide/banner.js index 5a5c0bbc4..4f508f651 100644 --- a/registry/dist/components/style/hide/banner.js +++ b/registry/dist/components/style/hide/banner.js @@ -6,4 +6,4 @@ e.i=function(n,t,r){"string"==typeof n&&( // eslint-disable-next-line no-param-reassign n=[[null,n,""]]);var o={};if(r)for(var i=0;iPromise.resolve().then(o.t.bind(o,912,23))}],tags:[componentsTags.style],description:{"zh-CN":"隐藏首页顶部横幅."},urlInclude:n.mainSiteUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;cPromise.resolve().then(o.t.bind(o,912,23))}],tags:[componentsTags.style],description:{"zh-CN":"隐藏首页顶部横幅."},urlInclude:n.mainSiteUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/hide/video/recommended-live.js b/registry/dist/components/style/hide/video/recommended-live.js index 59272a774..90682ac9a 100644 --- a/registry/dist/components/style/hide/video/recommended-live.js +++ b/registry/dist/components/style/hide/video/recommended-live.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,969,23))}],displayName:"隐藏直播推荐",tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"隐藏视频页面右侧下方的直播推荐."},urlInclude:e.videoUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var u=0;uPromise.resolve().then(r.t.bind(r,969,23))}],displayName:"隐藏直播推荐",tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"隐藏视频页面右侧下方的直播推荐."},urlInclude:e.videoUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/hide/video/related-videos.js b/registry/dist/components/style/hide/video/related-videos.js index 6caf7541c..0030e72dc 100644 --- a/registry/dist/components/style/hide/video/related-videos.js +++ b/registry/dist/components/style/hide/video/related-videos.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,32,23))}],tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"隐藏番剧和视频页面右侧的推荐视频列表. 注意: 如果你想关闭 b 站的自动连播 (自动播放下一个推荐视频) 功能, 需要先取消隐藏视频推荐才能看到开关."},urlInclude:e.videoAndBangumiUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var u=0;uPromise.resolve().then(r.t.bind(r,32,23))}],tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"隐藏番剧和视频页面右侧的推荐视频列表. 注意: 如果你想关闭 b 站的自动连播 (自动播放下一个推荐视频) 功能, 需要先取消隐藏视频推荐才能看到开关."},urlInclude:e.videoAndBangumiUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/hide/video/top-mask.js b/registry/dist/components/style/hide/video/top-mask.js index a8b6d9fa8..91f0bef72 100644 --- a/registry/dist/components/style/hide/video/top-mask.js +++ b/registry/dist/components/style/hide/video/top-mask.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,498,23)))),tags:[componentsTags.style],description:{"zh-CN":"隐藏视频里鼠标经过时出现在右上角的覆盖层."},urlInclude:e.playerUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var u=0;uPromise.resolve().then(r.t.bind(r,498,23)))),tags:[componentsTags.style],description:{"zh-CN":"隐藏视频里鼠标经过时出现在右上角的覆盖层."},urlInclude:e.playerUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/player-on-top.js b/registry/dist/components/style/player-on-top.js index 2b62c6281..e88e55472 100644 --- a/registry/dist/components/style/player-on-top.js +++ b/registry/dist/components/style/player-on-top.js @@ -6,4 +6,4 @@ t.i=function(n,e,o){"string"==typeof n&&( // eslint-disable-next-line no-param-reassign n=[[null,n,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,168,23))}],tags:[componentsTags.style,componentsTags.video],entry:none,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;cPromise.resolve().then(r.t.bind(r,168,23))}],tags:[componentsTags.style,componentsTags.video],entry:none,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/player-shadow.js b/registry/dist/components/style/player-shadow.js index ba4c9004a..fb4fa1506 100644 --- a/registry/dist/components/style/player-shadow.js +++ b/registry/dist/components/style/player-shadow.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,509,23))}],tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"为播放器添加主题色投影."},urlInclude:e.allVideoUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;cPromise.resolve().then(r.t.bind(r,509,23))}],tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"为播放器添加主题色投影."},urlInclude:e.allVideoUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/scrollbar.js b/registry/dist/components/style/scrollbar.js index 669f93e8a..b990741aa 100644 --- a/registry/dist/components/style/scrollbar.js +++ b/registry/dist/components/style/scrollbar.js @@ -4,6 +4,6 @@ t.exports=function(t){var n=[];return n.toString=function(){return this.map((fun // eslint-disable-next-line func-names n.i=function(t,e,r){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign -t=[[null,t,""]]);var o={};if(r)for(var c=0;cPromise.resolve().then(o.t.bind(o,227,23))}],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),c=c.component}()})); \ No newline at end of file +var c=this[a][0];null!=c&&(o[c]=!0)}for(var i=0;iPromise.resolve().then(o.t.bind(o,227,23))}],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),a=a.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/sidebar-offset.js b/registry/dist/components/style/sidebar-offset.js index e13e01915..34c26c452 100644 --- a/registry/dist/components/style/sidebar-offset.js +++ b/registry/dist/components/style/sidebar-offset.js @@ -4,6 +4,6 @@ t.exports=function(t){var e=[];return e.toString=function(){return this.map((fun // eslint-disable-next-line func-names e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign -t=[[null,t,""]]);var r={};if(o)for(var f=0;fPromise.resolve().then(r.t.bind(r,202,23))}],description:{"zh-CN":"给脚本的侧栏设置垂直偏移量, 范围为 -40% ~ 40%"},entry:({metadata:e})=>{(0,t.addComponentListener)(`${e.name}.offset`,(t=>{document.body.style.setProperty("--be-sidebar-offset",`${t}%`)}),!0)},options:{offset:{displayName:"偏移量 (%)",defaultValue:0,validator:t=>lodash.clamp(t,-40,40)}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),f=f.component}()})); \ No newline at end of file +var f=this[i][0];null!=f&&(r[f]=!0)}for(var a=0;aPromise.resolve().then(r.t.bind(r,202,23))}],description:{"zh-CN":"给脚本的侧栏设置垂直偏移量, 范围为 -40% ~ 40%"},entry:({metadata:e})=>{(0,t.addComponentListener)(`${e.name}.offset`,(t=>{document.body.style.setProperty("--be-sidebar-offset",`${t}%`)}),!0)},options:{offset:{displayName:"偏移量 (%)",defaultValue:0,validator:t=>lodash.clamp(t,-40,40)}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/simplify/comments.js b/registry/dist/components/style/simplify/comments.js index 854846ec2..36aa1ce60 100644 --- a/registry/dist/components/style/simplify/comments.js +++ b/registry/dist/components/style/simplify/comments.js @@ -6,4 +6,4 @@ t.i=function(n,e,o){"string"==typeof n&&( // eslint-disable-next-line no-param-reassign n=[[null,n,""]]);var i={};if(o)for(var m=0;mPromise.resolve().then(i.t.bind(i,500,23))),(async({metadata:n})=>{const{addComponentListener:t}=await Promise.resolve().then(i.t.bind(i,407,23));t(n.name,(n=>{document.body.classList.toggle("simplify-comment",n)}),!0)})),displayName:"简化评论区",description:{"zh-CN":"\n- 删除热评头像下方的关注按钮\n- 删除用户的等级标识\n- 删除发送源信息(`来自安卓客户端` 这种)\n- 删除用户名右边的勋章\n- 删除评论区顶部的横幅\n- 发送时间移动到右上角\n- 位图图标全部换用矢量图标, 高分屏不会模糊\n- 投票仅显示链接, 隐藏下面的大框.\n\n> 注: 关注和等级可以通过鼠标停留在头像上, 在弹出的资料卡小窗中查看.".trim()},tags:[componentsTags.style],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),m=m.component}()})); \ No newline at end of file +var a=this[m][0];null!=a&&(i[a]=!0)}for(var r=0;rPromise.resolve().then(i.t.bind(i,500,23))),(async({metadata:n})=>{const{addComponentListener:t}=await Promise.resolve().then(i.t.bind(i,407,23));t(n.name,(n=>{document.body.classList.toggle("simplify-comment",n)}),!0)})),displayName:"简化评论区",description:{"zh-CN":"\n- 删除热评头像下方的关注按钮\n- 删除用户的等级标识\n- 删除发送源信息(`来自安卓客户端` 这种)\n- 删除用户名右边的勋章\n- 删除评论区顶部的横幅\n- 发送时间移动到右上角\n- 位图图标全部换用矢量图标, 高分屏不会模糊\n- 投票仅显示链接, 隐藏下面的大框.\n\n> 注: 关注和等级可以通过鼠标停留在头像上, 在弹出的资料卡小窗中查看.".trim()},tags:[componentsTags.style],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),m=m.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/special-danmaku.js b/registry/dist/components/style/special-danmaku.js index f41006842..bea242c05 100644 --- a/registry/dist/components/style/special-danmaku.js +++ b/registry/dist/components/style/special-danmaku.js @@ -4,6 +4,6 @@ t.exports=function(t){var n=[];return n.toString=function(){return this.map((fun // eslint-disable-next-line func-names n.i=function(t,e,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign -t=[[null,t,""]]);var r={};if(o)for(var a=0;aPromise.resolve().then(r.t.bind(r,294,23))),(({metadata:t,settings:{options:n}})=>{Object.keys(n).forEach((n=>{(0,e.addComponentListener)(`${t.name}.${n}`,(t=>{document.body.classList.toggle(`disable-${n}-danmaku-style`,t)}),!0)}))})),urlInclude:n.playerUrls,description:{"zh-CN":"移除高赞弹幕或 UP 主弹幕的特殊样式, 弹幕内容不会移除."},options:{highlight:{displayName:"禁用高赞弹幕",defaultValue:!0},up:{displayName:"禁用UP主弹幕",defaultValue:!0}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),a=a.component}()})); \ No newline at end of file +var i=this[r][0];null!=i&&(a[i]=!0)}for(var u=0;uPromise.resolve().then(a.t.bind(a,294,23))),(({metadata:t,settings:{options:n}})=>{Object.keys(n).forEach((n=>{(0,e.addComponentListener)(`${t.name}.${n}`,(t=>{document.body.classList.toggle(`disable-${n}-danmaku-style`,t)}),!0)}))})),urlInclude:n.playerUrls,description:{"zh-CN":"移除高赞弹幕或 UP 主弹幕的特殊样式, 弹幕内容不会移除."},options:{highlight:{displayName:"禁用高赞弹幕",defaultValue:!0},up:{displayName:"禁用UP主弹幕",defaultValue:!0}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/style/v1-panel.js b/registry/dist/components/style/v1-panel.js index 1c7f6dfbc..ca2a94423 100644 --- a/registry/dist/components/style/v1-panel.js +++ b/registry/dist/components/style/v1-panel.js @@ -6,4 +6,4 @@ n.i=function(t,e,r){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var o={};if(r)for(var i=0;iPromise.resolve().then(o.t.bind(o,564,23))}],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;sPromise.resolve().then(o.t.bind(o,564,23))}],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/touch/combo-like.js b/registry/dist/components/touch/combo-like.js index 4fd029cc4..b7bb9302b 100644 --- a/registry/dist/components/touch/combo-like.js +++ b/registry/dist/components/touch/combo-like.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["touch/combo-like"]=t():e["touch/combo-like"]=t()}(self,(function(){return function(){"use strict";var e,t,o={569:function(e){e.exports=coreApis.spinQuery}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var u={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&o;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((function(e){u[e]=function(){return o[e]}}));return u.default=function(){return o},r.d(c,u),c},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"touchComboLike",displayName:"三连触摸支持",tags:[componentsTags.touch],enabledByDefault:navigator.maxTouchPoints>0,entry:async()=>{const{select:e}=await Promise.resolve().then(r.t.bind(r,569,23)),t=await e(".ops span.like");if(!t)return;t.style.userSelect="none";const o=(e,o)=>{const n=new CustomEvent(e,o);t.dispatchEvent(n)};let n=!0;t.addEventListener("touchstart",(e=>{e.preventDefault(),n=!0,setTimeout((()=>n=!1),200),o("mousedown",e)})),t.addEventListener("touchend",(e=>{e.preventDefault(),o("mouseup",e),n&&o("click",e)}))},description:{"zh-CN":"为视频页面中的三连操作 (长按点赞) 启用触摸支持."},urlInclude:e.videoUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),c=c.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["touch/combo-like"]=t():e["touch/combo-like"]=t()}(self,(function(){return function(){"use strict";var e,t,o={569:function(e){e.exports=coreApis.spinQuery}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var u={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&o;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((function(e){u[e]=function(){return o[e]}}));return u.default=function(){return o},r.d(c,u),c},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"touchComboLike",displayName:"三连触摸支持",tags:[componentsTags.touch],enabledByDefault:navigator.maxTouchPoints>0,entry:async()=>{const{select:e}=await Promise.resolve().then(r.t.bind(r,569,23)),t=await e(".ops span.like");if(!t)return;t.style.userSelect="none";const o=(e,o)=>{const n=new CustomEvent(e,o);t.dispatchEvent(n)};let n=!0;t.addEventListener("touchstart",(e=>{e.preventDefault(),n=!0,setTimeout((()=>n=!1),200),o("mousedown",e)})),t.addEventListener("touchend",(e=>{e.preventDefault(),o("mouseup",e),n&&o("click",e)}))},description:{"zh-CN":"为视频页面中的三连操作 (长按点赞) 启用触摸支持."},urlInclude:e.videoUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),c=c.component}()})); \ No newline at end of file diff --git a/registry/dist/components/touch/double-click-control.js b/registry/dist/components/touch/double-click-control.js index cf6f6b821..ad12be0aa 100644 --- a/registry/dist/components/touch/double-click-control.js +++ b/registry/dist/components/touch/double-click-control.js @@ -6,4 +6,4 @@ o.i=function(i,l,e){"string"==typeof i&&( // eslint-disable-next-line no-param-reassign i=[[null,i,""]]);var n={};if(e)for(var t=0;t0,urlInclude:e.playerUrls,entry:async()=>{(0,l.addStyle)(a());const e="disable-original-hover";(0,o.videoChange)((async()=>{const o=await i.playerAgent.query.playerArea();if(o.classList.contains(e))return;o.classList.add(e);const l=i.playerAgent.query.video.container.sync(),{DoubleClickEvent:t}=await Promise.resolve().then(n.t.bind(n,109,23)),r=new t((()=>i.playerAgent.togglePlay()),!0);r.singleClickHandler=()=>{o.classList.toggle("touch-video-control-show")},r.bind(l)}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),t=t.component}()})); \ No newline at end of file +var r=this[t][0];null!=r&&(n[r]=!0)}for(var a=0;a0,urlInclude:e.playerUrls,entry:async()=>{(0,l.addStyle)(a());const e="disable-original-hover";(0,o.videoChange)((async()=>{const o=await i.playerAgent.query.playerArea();if(o.classList.contains(e))return;o.classList.add(e);const l=i.playerAgent.query.video.container.sync(),{DoubleClickEvent:t}=await Promise.resolve().then(n.t.bind(n,109,23)),r=new t((()=>i.playerAgent.togglePlay()),!0);r.singleClickHandler=()=>{o.classList.toggle("touch-video-control-show")},r.bind(l)}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),t=t.component}()})); \ No newline at end of file diff --git a/registry/dist/components/touch/mini-player.js b/registry/dist/components/touch/mini-player.js index cc8dcf126..f071c51c3 100644 --- a/registry/dist/components/touch/mini-player.js +++ b/registry/dist/components/touch/mini-player.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var i={};if(o)for(var r=0;r{if(document.URL.startsWith("https://live.bilibili.com")){const{touchLiveMiniPlayer:t}=await Promise.resolve().then(n.bind(n,304));await t(e)}else{const{touchVideoMiniPlayer:t}=await Promise.resolve().then(n.bind(n,47));await t(e)}},i={name:"touchMiniPlayer",displayName:"迷你播放器触摸拖动",description:{"zh-CN":"使迷你播放器的拖动条可以触摸拖动."},enabledByDefault:navigator.maxTouchPoints>0,tags:[componentsTags.touch],urlInclude:[...e.videoAndBangumiUrls,...e.liveUrls],entry:()=>t(!0),reload:()=>t(!0),unload:()=>t(!1),options:{touchMoveDistance:{displayName:"拖动触发最小距离",defaultValue:10,hidden:!0}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +var c=this[r][0];null!=c&&(i[c]=!0)}for(var a=0;a{if(document.URL.startsWith("https://live.bilibili.com")){const{touchLiveMiniPlayer:t}=await Promise.resolve().then(n.bind(n,304));await t(e)}else{const{touchVideoMiniPlayer:t}=await Promise.resolve().then(n.bind(n,47));await t(e)}},i={name:"touchMiniPlayer",displayName:"迷你播放器触摸拖动",description:{"zh-CN":"使迷你播放器的拖动条可以触摸拖动."},enabledByDefault:navigator.maxTouchPoints>0,tags:[componentsTags.touch],urlInclude:[...e.videoAndBangumiUrls,...e.liveUrls],entry:()=>t(!0),reload:()=>t(!0),unload:()=>t(!1),options:{touchMoveDistance:{displayName:"拖动触发最小距离",defaultValue:10,hidden:!0}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/touch/player-control.js b/registry/dist/components/touch/player-control.js index 4a6098d10..2e003c9c5 100644 --- a/registry/dist/components/touch/player-control.js +++ b/registry/dist/components/touch/player-control.js @@ -6,4 +6,4 @@ l.i=function(e,r,i){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var o={};if(i)for(var t=0;t{document.body.classList.add(l)},i={name:"touchPlayerControl",displayName:"控制栏触摸优化",description:{"zh-CN":"增大播放器控制栏里按钮的间距, 方便触屏使用."},tags:[componentsTags.touch,componentsTags.style],enabledByDefault:navigator.maxTouchPoints>0,urlInclude:e.playerUrls,instantStyles:[{name:l,style:()=>Promise.resolve().then(o.t.bind(o,685,23))}],entry:r,reload:r,unload:()=>{document.body.classList.remove(l)},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),t=t.component}()})); \ No newline at end of file +var a=this[t][0];null!=a&&(o[a]=!0)}for(var n=0;n{document.body.classList.add(l)},i={name:"touchPlayerControl",displayName:"控制栏触摸优化",description:{"zh-CN":"增大播放器控制栏里按钮的间距, 方便触屏使用."},tags:[componentsTags.touch,componentsTags.style],enabledByDefault:navigator.maxTouchPoints>0,urlInclude:e.playerUrls,instantStyles:[{name:l,style:()=>Promise.resolve().then(o.t.bind(o,685,23))}],entry:r,reload:r,unload:()=>{document.body.classList.remove(l)},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),t=t.component}()})); \ No newline at end of file diff --git a/registry/dist/components/touch/player-gestures.js b/registry/dist/components/touch/player-gestures.js index a22b5daf9..0fcafda93 100644 --- a/registry/dist/components/touch/player-gestures.js +++ b/registry/dist/components/touch/player-gestures.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var i={};if(s)for(var r=0;r0;t--)if(e>=i[t]){r=t;break}const o=s.image;if(null===o)return null;const a=s.img_x_len??10,c=s.img_y_len??10,l=a*this.viewWidth,u=c*this.viewHeight,p=this.viewWidth,d=this.viewHeight,h=-(r-1)%100%a*p,v=-Math.floor((r-1)%100/c)*d;return{backgroundImage:`url(${o[Math.floor(r/100)]})`,backgroundPosition:`${h}px ${v}px`,backgroundSize:`${l}px ${u}px`}}}var u=n(977);const p=(e,t,n=1,s=0)=>{const i=e+t;return i>n?n:i(0,o.formatDuration)(e,1),progressDiff:e=>`${e>0?"+":"-"}${(e=>{e=Math.abs(e);const t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),s=e-3600*t-60*n;let i=`${(0,r.fixed)(s)}秒`;return n>0&&(i=`${n}分${i}`),t>0&&(i=`${t}时${i}`),i})(e)}`},data(){const e={progress:0,brightness:1,volume:.66};return{opened:!1,video:dq("video"),videoshot:new l,videoshotStyle:{},store:e,preview:{...e,progress:null,seekMode:a.q.Fast}}},computed:{progressNaN(){return Number.isNaN(this.preview.progress)},progressNull(){return null===this.preview.progress},progressValid(){return!this.progressNaN&&!this.progressNull}},methods:{sync(){const e=dq("video");this.video=e,this.store.volume=e.volume,this.store.progress=e.currentTime,this.store.brightness=(()=>{if(e.style.filter){const t=e.style.filter.match(/brightness\((.+)\)/);return t?parseFloat(t[1]):1}return 1})(),this.preview={...this.preview,...this.store,progress:null}},startPreview({brightness:e,volume:t,progress:n}){if(this.opened=!0,void 0!==n){this.preview.progress=p(this.store.progress,n,this.video.duration);this.videoshot.getVideoshot(this.preview.progress).then((e=>{this.videoshotStyle=e}))}else void 0!==e?this.preview.brightness=p(this.store.brightness,e,1/0):void 0!==t&&(this.preview.volume=p(this.store.volume,t)),this.apply({brightness:e,volume:t})},cancelPreview(){this.preview.progress=NaN},endPreview(){unsafeWindow.touchGestureDebug||(this.opened=!1),this.store.volume!==this.preview.volume&&(0,u.syncVolumeUI)(this.preview.volume),Number.isNaN(this.preview.progress)?this.preview.progress=null:this.store.progress!==this.preview.progress&&null!==this.preview.progress&&this.apply({progress:this.preview.progress})},async apply({brightness:e,volume:t,progress:s}){const i=this.video;if(i)if(void 0!==e){const{setBrightness:e}=await Promise.resolve().then(n.bind(n,620));e(i,this.preview.brightness)}else if(void 0!==t){const{setVolume:e}=await Promise.resolve().then(n.bind(n,977));e(i,this.preview.volume)}else if(void 0!==s){const{setProgress:e}=await Promise.resolve().then(n.bind(n,99));e(i,s)}}}}),h=n(379),v=n.n(h),f=n(777),g=n.n(f),m={insert:"head",singleton:!1};v()(g(),m),g().locals;var w=function(e,t,n,s,i,r,o,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),s&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),o?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=c):i&&(c=a?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}(d,s,[],!1,null,null,null);w.options.__file="registry/lib/components/touch/player-gestures/GesturePreview.vue";var b=w.exports},663:function(e){"use strict";e.exports=coreApis.ajax},156:function(e){"use strict";e.exports=coreApis.observer},109:function(e){"use strict";e.exports=coreApis.utils}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={id:e,exports:{}};return n[e](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);i.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&s&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){o[e]=function(){return n[e]}}));return o.default=function(){return n},i.d(r,o),r},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";i.d(r,{component:function(){return n}});var e=coreApis.utils.urls,t=coreApis.componentApis.video.playerAgent;const n={name:"touchPlayerGestures",displayName:"播放器触摸手势",enabledByDefault:navigator.maxTouchPoints>0,tags:[componentsTags.touch],description:{"zh-CN":"为播放器启用触摸手势支持:\n- 左右滑动可调整进度\n- 上下滑动可调整音量\n- 进度调整可在左上角和右上角取消\n- 进度调整时在不同位置滑动, 可以使用3档不同的灵敏度."},entry:async()=>{const{videoChange:e}=await Promise.resolve().then(i.t.bind(i,156,23));e((async()=>{if(!await t.playerAgent.query.video.element())return;let e;if(!dq(".gesture-preview")){const n=await Promise.resolve().then(i.bind(i,332)),{mountVueComponent:s}=await Promise.resolve().then(i.t.bind(i,109,23));e=s(n),t.playerAgent.query.video.subtitle.sync()?.insertAdjacentElement("beforebegin",e.$el)}const{Swiper:n}=await Promise.resolve().then(i.bind(i,39)),s=new n(t.playerAgent.query.video.container.sync());s.action.addEventListener("start",(()=>{e.sync()})),s.action.addEventListener("cancel",(()=>{e.cancelPreview()})),s.action.addEventListener("end",(()=>{e.endPreview()})),["volume","brightness"].forEach((t=>{s.action.addEventListener(t,(n=>{e.startPreview({[t]:n.detail})}))})),s.action.addEventListener("progress",(t=>{const{progress:n,mode:s}=t.detail;e.preview.seekMode=s,e.startPreview({progress:n})}))}))},urlInclude:e.playerUrls,options:{swiperDistance:{displayName:"手势触发最小距离",defaultValue:10,hidden:!0}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +s=Boolean(window&&document&&document.all&&!window.atob)),s},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function a(e){for(var t=-1,n=0;n0;t--)if(e>=i[t]){r=t;break}const o=s.image;if(null===o)return null;const a=s.img_x_len??10,c=s.img_y_len??10,l=a*this.viewWidth,u=c*this.viewHeight,p=this.viewWidth,d=this.viewHeight,h=-(r-1)%100%a*p,v=-Math.floor((r-1)%100/c)*d;return{backgroundImage:`url(${o[Math.floor(r/100)]})`,backgroundPosition:`${h}px ${v}px`,backgroundSize:`${l}px ${u}px`}}}var u=n(977);const p=(e,t,n=1,s=0)=>{const i=e+t;return i>n?n:i(0,o.formatDuration)(e,1),progressDiff:e=>`${e>0?"+":"-"}${(e=>{e=Math.abs(e);const t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),s=e-3600*t-60*n;let i=`${(0,r.fixed)(s)}秒`;return n>0&&(i=`${n}分${i}`),t>0&&(i=`${t}时${i}`),i})(e)}`},data(){const e={progress:0,brightness:1,volume:.66};return{opened:!1,video:dq("video"),videoshot:new l,videoshotStyle:{},store:e,preview:{...e,progress:null,seekMode:a.q.Fast}}},computed:{progressNaN(){return Number.isNaN(this.preview.progress)},progressNull(){return null===this.preview.progress},progressValid(){return!this.progressNaN&&!this.progressNull}},methods:{sync(){const e=dq("video");this.video=e,this.store.volume=e.volume,this.store.progress=e.currentTime,this.store.brightness=(()=>{if(e.style.filter){const t=e.style.filter.match(/brightness\((.+)\)/);return t?parseFloat(t[1]):1}return 1})(),this.preview={...this.preview,...this.store,progress:null}},startPreview({brightness:e,volume:t,progress:n}){if(this.opened=!0,void 0!==n){this.preview.progress=p(this.store.progress,n,this.video.duration);this.videoshot.getVideoshot(this.preview.progress).then((e=>{this.videoshotStyle=e}))}else void 0!==e?this.preview.brightness=p(this.store.brightness,e,1/0):void 0!==t&&(this.preview.volume=p(this.store.volume,t)),this.apply({brightness:e,volume:t})},cancelPreview(){this.preview.progress=NaN},endPreview(){unsafeWindow.touchGestureDebug||(this.opened=!1),this.store.volume!==this.preview.volume&&(0,u.syncVolumeUI)(this.preview.volume),Number.isNaN(this.preview.progress)?this.preview.progress=null:this.store.progress!==this.preview.progress&&null!==this.preview.progress&&this.apply({progress:this.preview.progress})},async apply({brightness:e,volume:t,progress:s}){const i=this.video;if(i)if(void 0!==e){const{setBrightness:e}=await Promise.resolve().then(n.bind(n,620));e(i,this.preview.brightness)}else if(void 0!==t){const{setVolume:e}=await Promise.resolve().then(n.bind(n,977));e(i,this.preview.volume)}else if(void 0!==s){const{setProgress:e}=await Promise.resolve().then(n.bind(n,99));e(i,s)}}}}),h=n(379),v=n.n(h),f=n(777),g=n.n(f),m={insert:"head",singleton:!1};v()(g(),m),g().locals;var w=function(e,t,n,s,i,r,o,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),s&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),o?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=c):i&&(c=a?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}(d,s,[],!1,null,null,null);w.options.__file="registry/lib/components/touch/player-gestures/GesturePreview.vue";var b=w.exports},663:function(e){"use strict";e.exports=coreApis.ajax},156:function(e){"use strict";e.exports=coreApis.observer},109:function(e){"use strict";e.exports=coreApis.utils}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={id:e,exports:{}};return n[e](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);i.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&s&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){o[e]=function(){return n[e]}}));return o.default=function(){return n},i.d(r,o),r},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";i.d(r,{component:function(){return n}});var e=coreApis.utils.urls,t=coreApis.componentApis.video.playerAgent;const n={name:"touchPlayerGestures",displayName:"播放器触摸手势",enabledByDefault:navigator.maxTouchPoints>0,tags:[componentsTags.touch],description:{"zh-CN":"为播放器启用触摸手势支持:\n- 左右滑动可调整进度\n- 上下滑动可调整音量\n- 进度调整可在左上角和右上角取消\n- 进度调整时在不同位置滑动, 可以使用3档不同的灵敏度."},entry:async()=>{const{videoChange:e}=await Promise.resolve().then(i.t.bind(i,156,23));e((async()=>{if(!await t.playerAgent.query.video.element())return;let e;if(!dq(".gesture-preview")){const n=await Promise.resolve().then(i.bind(i,332)),{mountVueComponent:s}=await Promise.resolve().then(i.t.bind(i,109,23));e=s(n),t.playerAgent.query.video.subtitle.sync()?.insertAdjacentElement("beforebegin",e.$el)}const{Swiper:n}=await Promise.resolve().then(i.bind(i,39)),s=new n(t.playerAgent.query.video.container.sync());s.action.addEventListener("start",(()=>{e.sync()})),s.action.addEventListener("cancel",(()=>{e.cancelPreview()})),s.action.addEventListener("end",(()=>{e.endPreview()})),["volume","brightness"].forEach((t=>{s.action.addEventListener(t,(n=>{e.startPreview({[t]:n.detail})}))})),s.action.addEventListener("progress",(t=>{const{progress:n,mode:s}=t.detail;e.preview.seekMode=s,e.startPreview({progress:n})}))}))},urlInclude:e.playerUrls,options:{swiperDistance:{displayName:"手势触发最小距离",defaultValue:10,hidden:!0}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/change-update-urls.js b/registry/dist/components/utils/change-update-urls.js index c2b31b848..77a00ee43 100644 --- a/registry/dist/components/utils/change-update-urls.js +++ b/registry/dist/components/utils/change-update-urls.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/change-update-urls"]=t():e["utils/change-update-urls"]=t()}(self,(function(){return function(){"use strict";var e={251:function(e,t,n){n.r(t),n.d(t,{default:function(){return u}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{attrs:{name:"替换更新链接",icon:"mdi-file-replace-outline",disabled:e.busy},on:{click:function(t){return e.replaceBranch()}}})};o._withStripped=!0;var r=coreApis.settings,i=coreApis.toast,s=coreApis.utils.log,c=coreApis.ui;var l=function(e,t,n,o,r,i,s,c){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=l):r&&(l=c?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var a=u.render;u.render=function(e,t){return l.call(t),a(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:u}}(Vue.extend({components:{DefaultWidget:c.DefaultWidget},data:()=>({busy:!1}),methods:{async replaceBranch(){const e=window.prompt("输入希望替换成的分支名称");if(e){this.busy=!0;try{const{options:t}=(0,r.getComponentSettings)("autoUpdate");Object.values(t.urls).forEach((t=>{Object.values(t).forEach((t=>{const n=/^(https:\/\/github\.com\/.+\/Bilibili-Evolved\/raw\/)(.+?)(\/)/;if(n.test(t.url))return void(t.url=t.url.replace(n,`$1${e}$3`));const o=/^(https:\/\/raw\.githubusercontent\.com\/.+\/Bilibili-Evolved\/)(.+?)(\/)/;if(o.test(t.url))return void(t.url=t.url.replace(o,`$1${e}$3`));const r=/^(https:\/\/cdn\.jsdelivr\.net\/gh\/.+\/Bilibili-Evolved@)(.+?)(\/)/;r.test(t.url)?t.url=t.url.replace(r,`$1${e}$3`):console.log("skip record",t)}))})),i.Toast.info("替换完成","替换更新链接",3e3)}catch(e){(0,s.logError)(e)}finally{this.busy=!1}}}}}),o,[],!1,null,null,null);l.options.__file="registry/lib/components/utils/change-update-urls/Widget.vue";var u=l.exports}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){n.d(o,{component:function(){return e}});const e={name:"changeUpdateUrls",displayName:"更新链接替换",description:"批量更换已安装功能的更新链接的分支, 对本地安装的功能无效.",entry:none,tags:[componentsTags.utils],widget:{component:()=>Promise.resolve().then(n.bind(n,251)).then((e=>e.default))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/change-update-urls"]=t():e["utils/change-update-urls"]=t()}(self,(function(){return function(){"use strict";var e={251:function(e,t,n){n.r(t),n.d(t,{default:function(){return a}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{attrs:{name:"替换更新链接",icon:"mdi-file-replace-outline",disabled:e.busy},on:{click:function(t){return e.replaceBranch()}}})};o._withStripped=!0;var r=coreApis.settings,i=coreApis.toast,s=coreApis.utils.log,c=coreApis.ui;var l=function(e,t,n,o,r,i,s,c){var l,a="function"==typeof e?e.options:e;if(t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),o&&(a.functional=!0),i&&(a._scopeId="data-v-"+i),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},a._ssrRegister=l):r&&(l=c?function(){r.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(a.functional){a._injectStyles=l;var u=a.render;a.render=function(e,t){return l.call(t),u(e,t)}}else{var p=a.beforeCreate;a.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:a}}(Vue.extend({components:{DefaultWidget:c.DefaultWidget},data:()=>({busy:!1}),methods:{async replaceBranch(){const e=window.prompt("输入希望替换成的分支名称");if(e){this.busy=!0;try{const{options:t}=(0,r.getComponentSettings)("autoUpdate");Object.values(t.urls).forEach((t=>{Object.values(t).forEach((t=>{const n=/^(https:\/\/github\.com\/.+\/Bilibili-Evolved\/raw\/)(.+?)(\/)/;if(n.test(t.url))return void(t.url=t.url.replace(n,`$1${e}$3`));const o=/^(https:\/\/raw\.githubusercontent\.com\/.+\/Bilibili-Evolved\/)(.+?)(\/)/;if(o.test(t.url))return void(t.url=t.url.replace(o,`$1${e}$3`));const r=/^(https:\/\/cdn\.jsdelivr\.net\/gh\/.+\/Bilibili-Evolved@)(.+?)(\/)/;r.test(t.url)?t.url=t.url.replace(r,`$1${e}$3`):console.log("skip record",t)}))})),i.Toast.info("替换完成","替换更新链接",3e3)}catch(e){(0,s.logError)(e)}finally{this.busy=!1}}}}}),o,[],!1,null,null,null);l.options.__file="registry/lib/components/utils/change-update-urls/Widget.vue";var a=l.exports}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){n.d(o,{component:function(){return e}});const e={name:"changeUpdateUrls",displayName:"更新链接替换",description:"批量更换已安装功能的更新链接的分支, 对本地安装的功能无效.",entry:none,tags:[componentsTags.utils],widget:{component:()=>Promise.resolve().then(n.bind(n,251)).then((e=>e.default))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/check-in-center.js b/registry/dist/components/utils/check-in-center.js index e848ac851..32786f44f 100644 --- a/registry/dist/components/utils/check-in-center.js +++ b/registry/dist/components/utils/check-in-center.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/check-in-center"]=t():e["utils/check-in-center"]=t()}(self,(function(){return function(){"use strict";var e={181:function(e,t,n){n.r(t),n.d(t,{default:function(){return f}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"multiple-widgets"},e._l(e.items,(function(t){return n("DefaultWidget",{key:t.name,attrs:{disabled:t.disabled,"data-name":t.name,name:t.displayName,icon:t.icon},on:{click:function(n){return e.runItemAction(t,n)}}})})),1)};i._withStripped=!0;var o=coreApis.ui,s=coreApis.ajax,r=coreApis.toast,a=n(109),c=coreApis.pluginApis.data;const l=[{name:"seeds-to-coins",displayName:"瓜子换硬币",icon:"mdi-seed-outline",action:async()=>{const e=await(0,s.postTextWithCredentials)("https://api.live.bilibili.com/xlive/revenue/v1/wallet/silver2coin",(0,a.formData)({csrf:(0,a.getCsrf)(),csrf_token:(0,a.getCsrf)()})),t=JSON.parse(e);0!==t.code?r.Toast.info(t.message,"瓜子换硬币",3e3):r.Toast.success(`${t.message}\n剩余银瓜子:${t.data.silver}`,"瓜子换硬币",3e3)}},{name:"live-check-in",displayName:"直播间签到",icon:"mdi-calendar-check",action:async()=>{const e=await(0,s.getJsonWithCredentials)("https://api.live.bilibili.com/xlive/web-ucenter/v1/sign/DoSign");if(0!==e.code)r.Toast.info(e.message,"直播间签到",3e3);else{const{text:t,specialText:n,allDays:i,hadSignDays:o}=e.data,s=`签到成功, 获得了${t} ${n}\n本月进度: ${o} / ${i}`;r.Toast.success(s,"直播间签到",3e3)}}}],[d]=(0,c.registerAndGetData)("checkInCenter.items",l);var u=function(e,t,n,i,o,s,r,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),r?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:o.DefaultWidget},data:()=>({items:d}),methods:{async runItemAction(e,t){try{this.$set(e,"disabled",!0);const n=this.$el.querySelector(`[data-name='${e.name}']`);await e.action(n,t)}finally{e.disabled=!1}}}}),i,[],!1,null,null,null);u.options.__file="registry/lib/components/utils/check-in-center/Widget.vue";var f=u.exports},109:function(e){e.exports=coreApis.utils}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){n.d(i,{component:function(){return t}});var e=n(109);const t={name:"checkInCenter",displayName:"签到助手",description:{"zh-CN":"在功能面板中提供一些可以每日进行的操作."},tags:[componentsTags.utils],entry:none,widget:{component:()=>Promise.resolve().then(n.bind(n,181)).then((e=>e.default)),condition:()=>Boolean((0,e.getUID)())},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/check-in-center"]=t():e["utils/check-in-center"]=t()}(self,(function(){return function(){"use strict";var e={181:function(e,t,n){n.r(t),n.d(t,{default:function(){return f}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"multiple-widgets"},e._l(e.items,(function(t){return n("DefaultWidget",{key:t.name,attrs:{disabled:t.disabled,"data-name":t.name,name:t.displayName,icon:t.icon},on:{click:function(n){return e.runItemAction(t,n)}}})})),1)};i._withStripped=!0;var o=coreApis.ui,s=coreApis.ajax,r=coreApis.toast,a=n(109),c=coreApis.pluginApis.data;const l=[{name:"seeds-to-coins",displayName:"瓜子换硬币",icon:"mdi-seed-outline",action:async()=>{const e=await(0,s.postTextWithCredentials)("https://api.live.bilibili.com/xlive/revenue/v1/wallet/silver2coin",(0,a.formData)({csrf:(0,a.getCsrf)(),csrf_token:(0,a.getCsrf)()})),t=JSON.parse(e);0!==t.code?r.Toast.info(t.message,"瓜子换硬币",3e3):r.Toast.success(`${t.message}\n剩余银瓜子:${t.data.silver}`,"瓜子换硬币",3e3)}},{name:"live-check-in",displayName:"直播间签到",icon:"mdi-calendar-check",action:async()=>{const e=await(0,s.getJsonWithCredentials)("https://api.live.bilibili.com/xlive/web-ucenter/v1/sign/DoSign");if(0!==e.code)r.Toast.info(e.message,"直播间签到",3e3);else{const{text:t,specialText:n,allDays:i,hadSignDays:o}=e.data,s=`签到成功, 获得了${t} ${n}\n本月进度: ${o} / ${i}`;r.Toast.success(s,"直播间签到",3e3)}}}],[d]=(0,c.registerAndGetData)("checkInCenter.items",l);var u=function(e,t,n,i,o,s,r,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),r?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:o.DefaultWidget},data:()=>({items:d}),methods:{async runItemAction(e,t){try{this.$set(e,"disabled",!0);const n=this.$el.querySelector(`[data-name='${e.name}']`);await e.action(n,t)}finally{e.disabled=!1}}}}),i,[],!1,null,null,null);u.options.__file="registry/lib/components/utils/check-in-center/Widget.vue";var f=u.exports},109:function(e){e.exports=coreApis.utils}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){n.d(i,{component:function(){return t}});var e=n(109);const t={name:"checkInCenter",displayName:"签到助手",description:{"zh-CN":"在功能面板中提供一些可以每日进行的操作."},tags:[componentsTags.utils],entry:none,widget:{component:()=>Promise.resolve().then(n.bind(n,181)).then((e=>e.default)),condition:()=>Boolean((0,e.getUID)())},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/column-unlock.js b/registry/dist/components/utils/column-unlock.js index 5ac7cceab..a55b63a0d 100644 --- a/registry/dist/components/utils/column-unlock.js +++ b/registry/dist/components/utils/column-unlock.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/column-unlock"]=t():e["utils/column-unlock"]=t()}(self,(function(){return function(){"use strict";var e,t,o={163:function(e){e.exports=coreApis.style}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var u={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&o;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((function(e){u[e]=function(){return o[e]}}));return u.default=function(){return o},r.d(c,u),c},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return u}});let e=!1,t=!0;const o="column-unlock",n=async()=>{t=!0;const{addStyle:n}=await Promise.resolve().then(r.t.bind(r,163,23));n(".article-holder { user-select: text !important }",o),e||(e=!0,document.addEventListener("copy",(e=>{t&&e.stopImmediatePropagation()}),{capture:!0}))},u={name:"columnUnlock",displayName:"专栏文字选择",entry:n,reload:n,unload:async()=>{document.getElementById(o)?.remove(),t=!1},tags:[componentsTags.utils],description:{"zh-CN":"使专栏的文字可以选择."},urlInclude:["//www.bilibili.com/read/"],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),c=c.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/column-unlock"]=t():e["utils/column-unlock"]=t()}(self,(function(){return function(){"use strict";var e,t,o={163:function(e){e.exports=coreApis.style}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var u={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&o;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((function(e){u[e]=function(){return o[e]}}));return u.default=function(){return o},r.d(c,u),c},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return u}});let e=!1,t=!0;const o="column-unlock",n=async()=>{t=!0;const{addStyle:n}=await Promise.resolve().then(r.t.bind(r,163,23));n(".article-holder { user-select: text !important }",o),e||(e=!0,document.addEventListener("copy",(e=>{t&&e.stopImmediatePropagation()}),{capture:!0}))},u={name:"columnUnlock",displayName:"专栏文字选择",entry:n,reload:n,unload:async()=>{document.getElementById(o)?.remove(),t=!1},tags:[componentsTags.utils],description:{"zh-CN":"使专栏的文字可以选择."},urlInclude:["//www.bilibili.com/read/"],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),c=c.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/comments/copy-link.js b/registry/dist/components/utils/comments/copy-link.js index c8af693df..e5dcaf683 100644 --- a/registry/dist/components/utils/comments/copy-link.js +++ b/registry/dist/components/utils/comments/copy-link.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["utils/comments/copy-link"]=e():t["utils/comments/copy-link"]=e()}(self,(function(){return function(){"use strict";var t,e,n={169:function(t){t.exports=coreApis.componentApis.utils.commentApis}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={exports:{}};return n[t](i,i.exports,r),i.exports}e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};t=t||[null,e({}),e([]),e(e)];for(var u=2&o&&n;"object"==typeof u&&!~t.indexOf(u);u=e(u))Object.getOwnPropertyNames(u).forEach((function(t){c[t]=function(){return n[t]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return n}});var t=coreApis.utils,e=coreApis.utils.urls;const n={name:"copyCommentsLink",displayName:"复制评论链接",description:{"zh-CN":"开启后, 可在每条评论的菜单中选择复制链接."},entry:async()=>{const{forEachCommentItem:n,addMenuItem:o}=await Promise.resolve().then(r.t.bind(r,169,23));n({added:n=>{const r=n=>{n.forEach((n=>{o(n,{className:"copy-link",text:"复制链接",action:async()=>{const o=(n=>{if(document.URL.match(/\/\/t\.bilibili\.com\/(\d+)/))return"";if(e.feedsUrls.every((e=>!(0,t.matchUrlPattern)(e))))return"";let o=n;for(;null!==o&&o!==document.body;){if(o.hasAttribute("data-did"))return`https://t.bilibili.com/${o.getAttribute("data-did")}`;o=o.parentElement}return""})(n.element)||document.URL;await navigator.clipboard.writeText(`${o}#reply${n.id}`)}})}))};r([n,...n.replies]),n.onRepliesUpdate=t=>r(t)}})},tags:[componentsTags.utils],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["utils/comments/copy-link"]=e():t["utils/comments/copy-link"]=e()}(self,(function(){return function(){"use strict";var t,e,n={169:function(t){t.exports=coreApis.componentApis.utils.commentApis}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={exports:{}};return n[t](i,i.exports,r),i.exports}e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};t=t||[null,e({}),e([]),e(e)];for(var u=2&o&&n;"object"==typeof u&&!~t.indexOf(u);u=e(u))Object.getOwnPropertyNames(u).forEach((function(t){c[t]=function(){return n[t]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return n}});var t=coreApis.utils,e=coreApis.utils.urls;const n={name:"copyCommentsLink",displayName:"复制评论链接",description:{"zh-CN":"开启后, 可在每条评论的菜单中选择复制链接."},entry:async()=>{const{forEachCommentItem:n,addMenuItem:o}=await Promise.resolve().then(r.t.bind(r,169,23));n({added:n=>{const r=n=>{n.forEach((n=>{o(n,{className:"copy-link",text:"复制链接",action:async()=>{const o=(n=>{if(document.URL.match(/\/\/t\.bilibili\.com\/(\d+)/))return"";if(e.feedsUrls.every((e=>!(0,t.matchUrlPattern)(e))))return"";let o=n;for(;null!==o&&o!==document.body;){if(o.hasAttribute("data-did"))return`https://t.bilibili.com/${o.getAttribute("data-did")}`;o=o.parentElement}return""})(n.element)||document.URL;await navigator.clipboard.writeText(`${o}#reply${n.id}`)}})}))};r([n,...n.replies]),n.onRepliesUpdate=t=>r(t)}})},tags:[componentsTags.utils],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/download-audio.js b/registry/dist/components/utils/download-audio.js index 17ef20bfb..acaf8c2ac 100644 --- a/registry/dist/components/utils/download-audio.js +++ b/registry/dist/components/utils/download-audio.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/download-audio"]=t():e["utils/download-audio"]=t()}(self,(function(){return function(){"use strict";var e,t,o={917:function(e,t,o){o.r(t),o.d(t,{default:function(){return u}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{attrs:{disabled:e.disabled||e.downloading,name:e.progress||"下载音频",icon:"mdi-download"},on:{click:function(t){return e.download()}}})};n._withStripped=!0;var r=coreApis.spinQuery,i=coreApis.observer,s=coreApis.download,d=coreApis.ui;function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}class l{constructor(){a(this,"progress",null),a(this,"sid",void 0)}async getDownloadUrl(){const{getJsonWithCredentials:e}=await Promise.resolve().then(o.t.bind(o,663,23)),{Toast:t}=await Promise.resolve().then(o.t.bind(o,141,23)),n=`https://www.bilibili.com/audio/music-service-c/web/url?sid=${this.sid}&privilege=2&quality=2`,r=await e(n);return 0!==r.code?(t.error("获取下载链接失败, 请确保当前账号有下载权限.","下载音频",1e4),null):r.data.cdns.shift()}async download(){const e=await this.getDownloadUrl();return new Promise(((t,o)=>{const n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.addEventListener("load",(()=>t(n.response))),n.addEventListener("error",(()=>o(n.status))),n.addEventListener("progress",(e=>this.progress?.(100*e.loaded/e.total))),n.send()}))}}var c=function(e,t,o,n,r,i,s,d){var a,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=a):r&&(a=d?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),a)if(l.functional){l._injectStyles=a;var c=l.render;l.render=function(e,t){return a.call(t),c(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,a):[a]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:d.DefaultWidget},data:()=>({progress:"",disabled:!0,downloader:new l,downloading:!1}),async mounted(){const e=await(0,r.select)("#app"),t=this.downloader;t.progress=e=>{this.progress=`${Math.round(e)}%`},(0,i.childList)(e,(()=>{const e=document.URL.match(/bilibili\.com\/audio\/au([\d]+)/);e&&e[1]?(this.disabled=!1,[,t.sid]=e):this.disabled=!0}))},methods:{async download(){if(!this.downloading){this.downloading=!0;try{const e=this.downloader;if(null===e.sid)return;const t=await e.download(),o=`${(()=>{const e=document.querySelector(".song-title");return e?e.getAttribute("title"):"神秘音频"})()}.mp3`;this.progress="",await s.DownloadPackage.single(o,t)}finally{this.downloading=!1}}}}}),n,[],!1,null,null,null);c.options.__file="registry/lib/components/utils/download-audio/DownloadAudio.vue";var u=c.exports},663:function(e){e.exports=coreApis.ajax},141:function(e){e.exports=coreApis.toast}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var i=Object.create(null);r.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var d=2&n&&o;"object"==typeof d&&!~e.indexOf(d);d=t(d))Object.getOwnPropertyNames(d).forEach((function(e){s[e]=function(){return o[e]}}));return s.default=function(){return o},r.d(i,s),i},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return e}});const e={name:"downloadAudio",displayName:"下载音频",entry:none,tags:[componentsTags.utils],description:{"zh-CN":"\n开启音频下载支持, 音频页面中可以在功能面板中下载当前音频.\n\n> 需要进入音频的详细信息页面才能下载, 在其他页面中此按钮将不可点击.\n ".trim()},widget:{component:()=>Promise.resolve().then(r.bind(r,917)).then((e=>e.default))},urlInclude:["//www.bilibili.com/audio/"],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/download-audio"]=t():e["utils/download-audio"]=t()}(self,(function(){return function(){"use strict";var e,t,o={917:function(e,t,o){o.r(t),o.d(t,{default:function(){return u}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{attrs:{disabled:e.disabled||e.downloading,name:e.progress||"下载音频",icon:"mdi-download"},on:{click:function(t){return e.download()}}})};n._withStripped=!0;var r=coreApis.spinQuery,i=coreApis.observer,s=coreApis.download,a=coreApis.ui;function d(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}class l{constructor(){d(this,"progress",null),d(this,"sid",void 0)}async getDownloadUrl(){const{getJsonWithCredentials:e}=await Promise.resolve().then(o.t.bind(o,663,23)),{Toast:t}=await Promise.resolve().then(o.t.bind(o,141,23)),n=`https://www.bilibili.com/audio/music-service-c/web/url?sid=${this.sid}&privilege=2&quality=2`,r=await e(n);return 0!==r.code?(t.error("获取下载链接失败, 请确保当前账号有下载权限.","下载音频",1e4),null):r.data.cdns.shift()}async download(){const e=await this.getDownloadUrl();return new Promise(((t,o)=>{const n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.addEventListener("load",(()=>t(n.response))),n.addEventListener("error",(()=>o(n.status))),n.addEventListener("progress",(e=>this.progress?.(100*e.loaded/e.total))),n.send()}))}}var c=function(e,t,o,n,r,i,s,a){var d,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=d):r&&(d=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),d)if(l.functional){l._injectStyles=d;var c=l.render;l.render=function(e,t){return d.call(t),c(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,d):[d]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:a.DefaultWidget},data:()=>({progress:"",disabled:!0,downloader:new l,downloading:!1}),async mounted(){const e=await(0,r.select)("#app"),t=this.downloader;t.progress=e=>{this.progress=`${Math.round(e)}%`},(0,i.childList)(e,(()=>{const e=document.URL.match(/bilibili\.com\/audio\/au([\d]+)/);e&&e[1]?(this.disabled=!1,[,t.sid]=e):this.disabled=!0}))},methods:{async download(){if(!this.downloading){this.downloading=!0;try{const e=this.downloader;if(null===e.sid)return;const t=await e.download(),o=`${(()=>{const e=document.querySelector(".song-title");return e?e.getAttribute("title"):"神秘音频"})()}.mp3`;this.progress="",await s.DownloadPackage.single(o,t)}finally{this.downloading=!1}}}}}),n,[],!1,null,null,null);c.options.__file="registry/lib/components/utils/download-audio/DownloadAudio.vue";var u=c.exports},663:function(e){e.exports=coreApis.ajax},141:function(e){e.exports=coreApis.toast}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var i=Object.create(null);r.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){s[e]=function(){return o[e]}}));return s.default=function(){return o},r.d(i,s),i},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return e}});const e={name:"downloadAudio",displayName:"下载音频",entry:none,tags:[componentsTags.utils],description:{"zh-CN":"\n开启音频下载支持, 音频页面中可以在功能面板中下载当前音频.\n\n> 需要进入音频的详细信息页面才能下载, 在其他页面中此按钮将不可点击.\n ".trim()},widget:{component:()=>Promise.resolve().then(r.bind(r,917)).then((e=>e.default))},urlInclude:["//www.bilibili.com/audio/"],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/image-exporter.js b/registry/dist/components/utils/image-exporter.js index b5575d8e9..4380d6ae2 100644 --- a/registry/dist/components/utils/image-exporter.js +++ b/registry/dist/components/utils/image-exporter.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/image-exporter"]=t():e["utils/image-exporter"]=t()}(self,(function(){return function(){"use strict";var e={505:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{attrs:{name:"导出图片",icon:"mdi-export",disabled:e.busy},on:{click:function(t){return e.exportImages()}}})};o._withStripped=!0;var r=n(663),i=n(508),s=coreApis.settings,a=n(141),c=n(109),l=coreApis.utils.log,u=n(129),d=coreApis.ui;var f=function(e,t,n,o,r,i,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:d.DefaultWidget},data:()=>({busy:!1}),methods:{async exportImages(){const{columnFormat:e}=(0,s.getComponentSettings)("imageExporter").options,t=a.Toast.info("下载中...","导出图片");this.busy=!0;try{const n=[],o=dq(".banner-image .card-image__image"),s=(0,c.retrieveImageUrl)(o);s&&(n.push({...s,name:`${(0,u.formatTitle)(e,!1,{n:"1"})}${s.extension}`}),console.log(o,s,n));if(dqa('.article-content .img-box img:not([class*="cut-off-"])').forEach((t=>{const o=(0,c.retrieveImageUrl)(t);o&&n.push({...o,name:`${(0,u.formatTitle)(e,!1,{n:(n.length+1).toString()})}${o.extension}`})})),0===n.length)return void a.Toast.info("此页面没有检测到任何可导出图片.","图片导出");let l=0;const d=await Promise.all(n.map((async({url:e})=>{const o=await(0,r.getBlob)(e);return l++,t.message=`下载中... (${l}/${n.length})`,o}))),f=new i.DownloadPackage;d.forEach(((e,t)=>f.add(n[t].name,e))),await f.emit(`${(0,u.formatTitle)(e,!1,{n:""})}.zip`)}catch(e){(0,l.logError)(e)}finally{this.busy=!1,t.dismiss()}}}}),o,[],!1,null,null,null);f.options.__file="registry/lib/components/utils/image-exporter/Widget.vue";var m=f.exports},663:function(e){e.exports=coreApis.ajax},508:function(e){e.exports=coreApis.download},141:function(e){e.exports=coreApis.toast},129:function(e){e.exports=coreApis.utils.title},109:function(e){e.exports=coreApis.utils}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){n.d(o,{component:function(){return l}});var e=n(109),t=coreApis.utils.urls,r=coreApis.componentApis.feeds.api,i=n(663),s=n(508),a=n(141),c=n(129);const l={name:"imageExporter",displayName:"图片批量导出",description:{"zh-CN":"可以批量导出某个地方的图片, 目前支持动态和专栏.\n\n动态文件名变量:\n- `user`: 用户名\n- `id`: 动态 ID\n- `n`: 第 n 张图\n\n专栏文件名变量:\n- `title`: 专栏标题\n- `n`: 第 n 张图"},tags:[componentsTags.feeds,componentsTags.utils],entry:async n=>{await(async({settings:{options:n}})=>{if(!t.feedsUrls.some((t=>(0,e.matchUrlPattern)(t))))return;(0,r.forEachFeedsCard)({added:t=>{(0,r.addMenuItem)(t,{className:"image-export",text:"导出图片",action:async()=>{const o=[];if(dqa(t.element,".main-content img, .main-content .img-content").forEach((t=>{const n=(0,e.retrieveImageUrl)(t);n&&!o.some((({url:e})=>e===n.url))&&o.push(n)})),0===o.length)return void a.Toast.info("此条动态没有检测到任何图片.","导出图片");const r=a.Toast.info("下载中...","导出图片");let l=0;const u=await Promise.all(o.map((async({url:e})=>{const t=await(0,i.getBlob)(e);return l++,r.message=`下载中... (${l}/${o.length})`,t}))),d=new s.DownloadPackage,{feedFormat:f}=n;u.forEach(((e,n)=>{const r={user:t.username,id:t.id,n:(n+1).toString()};d.add(`${(0,c.formatTitle)(f,!1,r)}${o[n].extension}`,e)})),r.dismiss();const m={user:t.username,id:t.id,n:""};await d.emit(`${(0,c.formatTitle)(f,!1,m)}.zip`)}})}})})(n)},widget:{condition:()=>t.columnUrls.some((t=>(0,e.matchUrlPattern)(t))),component:()=>Promise.resolve().then(n.bind(n,505)).then((e=>e.default))},urlInclude:[...t.feedsUrls,...t.columnUrls],options:{columnFormat:{defaultValue:"[title][ - n]",displayName:"专栏图片命名格式"},feedFormat:{defaultValue:"[user][ - id][ - n]",displayName:"动态图片命名格式"}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/image-exporter"]=t():e["utils/image-exporter"]=t()}(self,(function(){return function(){"use strict";var e={505:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{attrs:{name:"导出图片",icon:"mdi-export",disabled:e.busy},on:{click:function(t){return e.exportImages()}}})};o._withStripped=!0;var r=n(663),i=n(508),s=coreApis.settings,a=n(141),c=n(109),l=coreApis.utils.log,u=n(129),d=coreApis.ui;var f=function(e,t,n,o,r,i,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:d.DefaultWidget},data:()=>({busy:!1}),methods:{async exportImages(){const{columnFormat:e}=(0,s.getComponentSettings)("imageExporter").options,t=a.Toast.info("下载中...","导出图片");this.busy=!0;try{const n=[],o=dq(".banner-image .card-image__image"),s=(0,c.retrieveImageUrl)(o);s&&(n.push({...s,name:`${(0,u.formatTitle)(e,!1,{n:"1"})}${s.extension}`}),console.log(o,s,n));if(dqa('.article-content .img-box img:not([class*="cut-off-"])').forEach((t=>{const o=(0,c.retrieveImageUrl)(t);o&&n.push({...o,name:`${(0,u.formatTitle)(e,!1,{n:(n.length+1).toString()})}${o.extension}`})})),0===n.length)return void a.Toast.info("此页面没有检测到任何可导出图片.","图片导出");let l=0;const d=await Promise.all(n.map((async({url:e})=>{const o=await(0,r.getBlob)(e);return l++,t.message=`下载中... (${l}/${n.length})`,o}))),f=new i.DownloadPackage;d.forEach(((e,t)=>f.add(n[t].name,e))),await f.emit(`${(0,u.formatTitle)(e,!1,{n:""})}.zip`)}catch(e){(0,l.logError)(e)}finally{this.busy=!1,t.dismiss()}}}}),o,[],!1,null,null,null);f.options.__file="registry/lib/components/utils/image-exporter/Widget.vue";var m=f.exports},663:function(e){e.exports=coreApis.ajax},508:function(e){e.exports=coreApis.download},141:function(e){e.exports=coreApis.toast},129:function(e){e.exports=coreApis.utils.title},109:function(e){e.exports=coreApis.utils}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){n.d(o,{component:function(){return l}});var e=n(109),t=coreApis.utils.urls,r=coreApis.componentApis.feeds.api,i=n(663),s=n(508),a=n(141),c=n(129);const l={name:"imageExporter",displayName:"图片批量导出",description:{"zh-CN":"可以批量导出某个地方的图片, 目前支持动态和专栏.\n\n动态文件名变量:\n- `user`: 用户名\n- `id`: 动态 ID\n- `n`: 第 n 张图\n\n专栏文件名变量:\n- `title`: 专栏标题\n- `n`: 第 n 张图"},tags:[componentsTags.feeds,componentsTags.utils],entry:async n=>{await(async({settings:{options:n}})=>{if(!t.feedsUrls.some((t=>(0,e.matchUrlPattern)(t))))return;(0,r.forEachFeedsCard)({added:t=>{(0,r.addMenuItem)(t,{className:"image-export",text:"导出图片",action:async()=>{const o=[];if(dqa(t.element,".main-content img, .main-content .img-content").forEach((t=>{const n=(0,e.retrieveImageUrl)(t);n&&!o.some((({url:e})=>e===n.url))&&o.push(n)})),0===o.length)return void a.Toast.info("此条动态没有检测到任何图片.","导出图片");const r=a.Toast.info("下载中...","导出图片");let l=0;const u=await Promise.all(o.map((async({url:e})=>{const t=await(0,i.getBlob)(e);return l++,r.message=`下载中... (${l}/${o.length})`,t}))),d=new s.DownloadPackage,{feedFormat:f}=n;u.forEach(((e,n)=>{const r={user:t.username,id:t.id,n:(n+1).toString()};d.add(`${(0,c.formatTitle)(f,!1,r)}${o[n].extension}`,e)})),r.dismiss();const m={user:t.username,id:t.id,n:""};await d.emit(`${(0,c.formatTitle)(f,!1,m)}.zip`)}})}})})(n)},widget:{condition:()=>t.columnUrls.some((t=>(0,e.matchUrlPattern)(t))),component:()=>Promise.resolve().then(n.bind(n,505)).then((e=>e.default))},urlInclude:[...t.feedsUrls,...t.columnUrls],options:{columnFormat:{defaultValue:"[title][ - n]",displayName:"专栏图片命名格式"},feedFormat:{defaultValue:"[user][ - id][ - n]",displayName:"动态图片命名格式"}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/image-resolution.js b/registry/dist/components/utils/image-resolution.js index 367d6bb41..c01113d0e 100644 --- a/registry/dist/components/utils/image-resolution.js +++ b/registry/dist/components/utils/image-resolution.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;i{const n=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT);let o=n.nextNode();for(;o;)e(o),o=n.nextNode()},a=async(t,o)=>{const{attributes:i}=await Promise.resolve().then(r.t.bind(r,156,23)),a=(r,i)=>{const a=r(o);if(null===a)return;if(n.some((t=>o.matches(t))))return;const c=a.match(e);if(!c)return;const[,s,u]=c,f=parseInt(o.getAttribute("data-resolution-width")||"0");if(parseInt(s)>=f&&0!==f)return;null===o.getAttribute("width")&&null===o.getAttribute("height")&&(o.classList.contains("bili-avatar-img")?o.setAttribute("height",u):o.setAttribute("width",s));const l=Math.round(t*parseInt(s)).toString(),d=Math.round(t*parseInt(u)).toString();o.setAttribute("data-resolution-width",l),i(o,a.replace(e,`@${l}w_${d}h`))};i(o,(()=>{a((t=>t.getAttribute("src")),((t,e)=>t.setAttribute("src",e))),a((t=>t.style.backgroundImage),((t,e)=>t.style.backgroundImage=e))}))},c=(0,t.styledComponentEntry)((()=>Promise.resolve().then(r.t.bind(r,972,23))),(async({settings:t})=>{const{allMutations:e}=await Promise.resolve().then(r.t.bind(r,156,23)),n="auto"===t.options.scale?window.devicePixelRatio:parseFloat(t.options.scale);o(document.body,(t=>a(n,t))),e((t=>{t.forEach((t=>t.addedNodes.forEach((t=>{t instanceof HTMLElement&&(a(n,t),"IMG"!==t.nodeName.toUpperCase()&&o(t,(t=>a(n,t))))}))))}))})),s={name:"imageResolution",displayName:"高分辨率图片",tags:[componentsTags.utils],enabledByDefault:window.devicePixelRatio>1,entry:c,description:{"zh-CN":"根据屏幕 DPI 请求更高分辨率的图片, 例如 DPI 缩放 200% 则请求 2 倍的分辨率, 加载时间也会相应变长一些. (也会导致某些浏览器里出现图片闪动, 因为本质上是更换了图片源)"},options:{scale:{displayName:"缩放级别",defaultValue:"auto",hidden:!0}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;c{const n=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT);let o=n.nextNode();for(;o;)e(o),o=n.nextNode()},a=async(t,o)=>{const{attributes:i}=await Promise.resolve().then(r.t.bind(r,156,23)),a=(r,i)=>{const a=r(o);if(null===a)return;if(n.some((t=>o.matches(t))))return;const c=a.match(e);if(!c)return;const[,s,u]=c,f=parseInt(o.getAttribute("data-resolution-width")||"0");if(parseInt(s)>=f&&0!==f)return;null===o.getAttribute("width")&&null===o.getAttribute("height")&&(o.classList.contains("bili-avatar-img")?o.setAttribute("height",u):o.setAttribute("width",s));const l=Math.round(t*parseInt(s)).toString(),d=Math.round(t*parseInt(u)).toString();o.setAttribute("data-resolution-width",l),i(o,a.replace(e,`@${l}w_${d}h`))};i(o,(()=>{a((t=>t.getAttribute("src")),((t,e)=>t.setAttribute("src",e))),a((t=>t.style.backgroundImage),((t,e)=>t.style.backgroundImage=e))}))},c=(0,t.styledComponentEntry)((()=>Promise.resolve().then(r.t.bind(r,972,23))),(async({settings:t})=>{const{allMutations:e}=await Promise.resolve().then(r.t.bind(r,156,23)),n="auto"===t.options.scale?window.devicePixelRatio:parseFloat(t.options.scale);o(document.body,(t=>a(n,t))),e((t=>{t.forEach((t=>t.addedNodes.forEach((t=>{t instanceof HTMLElement&&(a(n,t),"IMG"!==t.nodeName.toUpperCase()&&o(t,(t=>a(n,t))))}))))}))})),s={name:"imageResolution",displayName:"高分辨率图片",tags:[componentsTags.utils],enabledByDefault:window.devicePixelRatio>1,entry:c,description:{"zh-CN":"根据屏幕 DPI 请求更高分辨率的图片, 例如 DPI 缩放 200% 则请求 2 倍的分辨率, 加载时间也会相应变长一些. (也会导致某些浏览器里出现图片闪动, 因为本质上是更换了图片源)"},options:{scale:{displayName:"缩放级别",defaultValue:"auto",hidden:!0}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/keymap.js b/registry/dist/components/utils/keymap.js index 80b482c98..3aa865a71 100644 --- a/registry/dist/components/utils/keymap.js +++ b/registry/dist/components/utils/keymap.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var r={};if(i)for(var o=0;o({popupOpen:!1}),methods:{async loadSettings(){await(0,o.loadKeymapSettings)(this.$refs.button)},async toggleSettings(){await(0,o.toggleKeymapSettings)(this.$refs.button)}}}),a=t(379),l=t.n(a),c=t(298),d=t.n(c),p={insert:"head",singleton:!1},u=(l()(d(),p),d().locals,(0,t(900).Z)(s,i,[],!1,null,null,null));u.options.__file="registry/lib/components/utils/keymap/settings/ExtraOptions.vue";var g=u.exports},166:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return B}});var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("VPopup",{staticClass:"keymap-settings-popup be-settings-extra-options",attrs:{fixed:"","trigger-element":e.triggerElement},model:{value:e.popupOpen,callback:function(n){e.popupOpen=n},expression:"popupOpen"}},[t("div",{staticClass:"keymap-settings"},[t("div",{staticClass:"keymap-settings-header"},[t("div",{staticClass:"keymap-settings-header-title"},[t("VIcon",{attrs:{icon:"mdi-keyboard-settings-outline"}}),e._v("\n 快捷键设置\n ")],1),e._v(" "),t("a",{staticClass:"keymap-settings-header-help",attrs:{href:"https://github.com/the1812/Bilibili-Evolved/blob/preview/registry/lib/components/utils/keymap/help.md",target:"_blank",title:"查看帮助"}},[t("VIcon",{attrs:{size:18,icon:"mdi-help-circle-outline"}})],1),e._v(" "),t("div",{staticClass:"keymap-settings-header-close",attrs:{title:"关闭"}},[t("VIcon",{attrs:{size:18,icon:"close"},on:{click:function(n){e.popupOpen=!1}}})],1)]),e._v(" "),t("div",{staticClass:"keymap-settings-content"},[t("div",{staticClass:"keymap-settings-grid"},[t("div",{staticClass:"grid-header"},[t("div",{staticClass:"header-name"},[e._v("\n 动作\n ")]),e._v(" "),t("div",{staticClass:"header-default-binding"},[e._v("\n 默认按键\n ")]),e._v(" "),t("div",{staticClass:"header-preset-binding"},[t("VDropdown",{attrs:{items:e.presetOptions,"key-mapper":function(e){return e}},scopedSlots:e._u([{key:"item",fn:function(n){var t=n.item;return[e._v("\n "+e._s(t)+"\n ")]}}]),model:{value:e.selectedPreset,callback:function(n){e.selectedPreset=n},expression:"selectedPreset"}})],1),e._v(" "),t("div",{staticClass:"header-custom-binding"},[e._v("\n 自定义按键\n ")])]),e._v(" "),e._l(e.rows,(function(n){return t("KeymapSettingsRow",{key:n.name,attrs:{row:n,"selected-preset":e.selectedPreset}})}))],2)])])])};i._withStripped=!0;var r=t(407),o=t(643),s=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"grid-row"},[t("div",{staticClass:"row-name",attrs:{title:e.row.name}},[e._v("\n "+e._s(e.row.displayName)+"\n ")]),e._v(" "),t("div",{staticClass:"row-default-binding",class:{overwritten:e.isOverwrittern(e.presets[e.selectedPreset],e.customKeyBindings),"not-set":void 0===e.presetBase[e.row.name]}},[e._v("\n "+e._s(e.showReadonlyKey(e.presetBase))+"\n ")]),e._v(" "),t("div",{staticClass:"row-preset-binding",class:{overwritten:e.isOverwrittern(e.customKeyBindings),"not-set":void 0===e.presets[e.selectedPreset][e.row.name]}},[e._v("\n "+e._s(e.showReadonlyKey(e.presets[e.selectedPreset]))+"\n ")]),e._v(" "),t("div",{staticClass:"row-custom-binding"},[e.editable?t("div",{staticClass:"custom-binding-edit"},[t("TextBox",{ref:"customBindingTextBox",attrs:{placeholder:"禁用","change-on-blur":"",text:e.customKeyBindings[e.row.name]},on:{change:e.updateCustomBinding}}),e._v(" "),t("VButton",{attrs:{type:"transparent",title:"删除自定义键位"},on:{click:function(n){return e.removeCustomBinding()}}},[t("VIcon",{attrs:{icon:"mdi-trash-can-outline",size:16}})],1)],1):t("div",{staticClass:"custom-binding-add"},[t("VButton",{attrs:{type:"transparent",title:"添加自定义键位"},on:{click:function(n){return e.addCustomBinding()}}},[t("VIcon",{attrs:{icon:"mdi-plus",size:16}})],1)],1)])])};s._withStripped=!0;var a=t(445);const l=(0,r.getComponentSettings)("keymap").options;var c=Vue.extend({components:{TextBox:o.TextBox,VButton:o.VButton,VIcon:o.VIcon},props:{row:{type:Object,required:!0},selectedPreset:{type:String,required:!0}},data:()=>({presets:a.um,presetBase:a.Wb,customKeyBindings:l.customKeyBindings,editable:!1}),created(){this.checkEditable()},methods:{checkEditable(){this.editable=void 0!==this.customKeyBindings[this.row.name]},showReadonlyKey(e){const{name:n}=this.row,t=e[n];return void 0===t?"继承":""===t?"禁用":t},isOverwrittern(...e){const{name:n}=this.row;return e.some((e=>void 0!==e[n]))},async addCustomBinding(){const{name:e}=this.row;this.customKeyBindings[e]="",this.checkEditable(),await this.$nextTick(),this.$refs.customBindingTextBox.focus()},removeCustomBinding(){const{name:e}=this.row;delete this.customKeyBindings[e],this.checkEditable()},updateCustomBinding(e){console.log("update",e);const{name:n}=this.row;this.customKeyBindings[n]=e}}}),d=t(379),p=t.n(d),u=t(88),g=t.n(u),m={insert:"head",singleton:!1},f=(p()(g(),m),g().locals,t(900)),y=(0,f.Z)(c,s,[],!1,null,null,null);y.options.__file="registry/lib/components/utils/keymap/settings/KeymapSettingsRow.vue";var h=y.exports,b=t(323);const v=(0,r.getComponentSettings)("keymap").options;console.log(a.um,b.Nw,v.preset,v.customKeyBindings);var w=Vue.extend({components:{VIcon:o.VIcon,VDropdown:o.VDropdown,VPopup:o.VPopup,KeymapSettingsRow:h},props:{triggerElement:{type:HTMLElement,default:null}},data:()=>({popupOpen:!1,actions:b.Nw,presets:a.um,customKeyBindings:v.customKeyBindings}),computed:{selectedPreset:{get:()=>v.preset,set(e){v.preset=e}},rows(){return Object.entries(this.actions).map((([e,n])=>({name:e,...n})))},presetOptions(){return Object.keys(this.presets)}}}),k=t(418),x=t.n(k),_={insert:"head",singleton:!1},C=(p()(x(),_),x().locals,(0,f.Z)(w,i,[],!1,null,null,null));C.options.__file="registry/lib/components/utils/keymap/settings/KeymapSettings.vue";var B=C.exports},900:function(e,n,t){"use strict";function i(e,n,t,i,r,o,s,a){var l,c="function"==typeof e?e.options:e;if(n&&(c.render=n,c.staticRenderFns=t,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,n){return l.call(n),d(e,n)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}t.d(n,{Z:function(){return i}})},269:function(e){"use strict";e.exports=coreApis.pluginApis.data},407:function(e){"use strict";e.exports=coreApis.settings},643:function(e){"use strict";e.exports=coreApis.ui},109:function(e){"use strict";e.exports=coreApis.utils}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var o=i[e]={id:e,exports:{}};return t[e](o,o.exports,r),o.exports}r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.__esModule)return t;if(16&i&&"function"==typeof t.then)return t}var o=Object.create(null);r.r(o);var s={};e=e||[null,n({}),n([]),n(n)];for(var a=2&i&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((function(e){s[e]=function(){return t[e]}}));return s.default=function(){return t},r.d(o,s),o},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){"use strict";r.d(o,{component:function(){return u}});var e=coreApis.componentApis.styledComponent,n=r(407),t=r(323),i=r(109),s=coreApis.utils.urls;const a=["shift","alt","ctrl","meta"],l=lodash.once((e=>{const n=s.watchlaterUrls.some((e=>(0,i.matchUrlPattern)(e))),r=s.mediaListUrls.some((e=>(0,i.matchUrlPattern)(e))),o={enable:!0,bindings:e};return document.body.addEventListener("keydown",(e=>{o.enable&&o.bindings.forEach((o=>{if(0===o.keys.length)return;if(!1!==o.action.ignoreTyping&&(0,i.isTyping)())return;const s=e.key.toLowerCase(),l=dq(".bilibili-player-sphere-control");if(null!==l&&"none"!==l.style.display&&["w","a","s","d"].includes(s))return;if(a.some((n=>{const t=o.keys.includes(n);if(o.keys.includes(`[${n}]`))return!1;return t!==e[`${n}Key`]})))return;const c=o.keys.filter((e=>!a.includes(e.toLowerCase()))).map((e=>e.toLowerCase()));if(!(c.includes(e.key.toLowerCase())||c.includes(e.code.toLowerCase())))return;const d=o.action.run({binding:o,isWatchlater:n,isMediaList:r,event:e,clickElement:t.$j,changeVideoTime:t.vN,showTip:t.kW}),p=!lodash.isNil(d);(o.action.prevent??p)&&(e.stopPropagation(),e.preventDefault())}))})),o}));var c=r(445);let d=null;const p=(0,e.styledComponentEntry)((()=>Promise.resolve().then(r.t.bind(r,224,23))),(async({settings:e})=>{const i=()=>{const n=e.options.preset,i=c.um[n]||{},r=(e=>Object.entries(e).map((([e,n])=>({keys:n.split(" ").filter((e=>""!==e)),action:t.Nw[e]||none}))))({...c.Wb,...i,...e.options.customKeyBindings});d?d.bindings=r:d=l(r)};(0,n.addComponentListener)("keymap.preset",i,!0),(0,n.addComponentListener)("keymap.customKeyBindings",i)})),u={name:"keymap",displayName:"快捷键扩展",tags:[componentsTags.video,componentsTags.utils],entry:p,unload:()=>{d&&(d.enable=!1)},reload:()=>{d&&(d.enable=!0)},description:{"zh-CN":"为脚本的功能和 b 站的功能启用键盘快捷键支持, 快捷键列表可在`快捷键设置`中查看和配置."},extraOptions:()=>Promise.resolve().then(r.bind(r,708)).then((e=>e.default)),options:{longJumpSeconds:{defaultValue:85,displayName:"长跳跃秒数"},customKeyBindings:{defaultValue:{},displayName:"自定义键位",hidden:!0},preset:{defaultValue:"Default",displayName:"预设",hidden:!0}},plugin:{displayName:"快捷键扩展 - 搜索支持",setup:({addData:e})=>{e("launchBar.actions",(e=>{e.push({name:"keymapSettings",getActions:async()=>[{name:"快捷键扩展设置",description:"Keymap Settings",icon:"mdi-keyboard-settings-outline",action:async()=>{const{toggleKeymapSettings:e}=await Promise.resolve().then(r.bind(r,527));e()}}]})}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),s=[];function a(e){for(var n=-1,t=0;t({popupOpen:!1}),methods:{async loadSettings(){await(0,o.loadKeymapSettings)(this.$refs.button)},async toggleSettings(){await(0,o.toggleKeymapSettings)(this.$refs.button)}}}),a=t(379),l=t.n(a),c=t(298),d=t.n(c),p={insert:"head",singleton:!1},u=(l()(d(),p),d().locals,(0,t(900).Z)(s,i,[],!1,null,null,null));u.options.__file="registry/lib/components/utils/keymap/settings/ExtraOptions.vue";var g=u.exports},166:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return B}});var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("VPopup",{staticClass:"keymap-settings-popup be-settings-extra-options",attrs:{fixed:"","trigger-element":e.triggerElement},model:{value:e.popupOpen,callback:function(n){e.popupOpen=n},expression:"popupOpen"}},[t("div",{staticClass:"keymap-settings"},[t("div",{staticClass:"keymap-settings-header"},[t("div",{staticClass:"keymap-settings-header-title"},[t("VIcon",{attrs:{icon:"mdi-keyboard-settings-outline"}}),e._v("\n 快捷键设置\n ")],1),e._v(" "),t("a",{staticClass:"keymap-settings-header-help",attrs:{href:"https://github.com/the1812/Bilibili-Evolved/blob/preview/registry/lib/components/utils/keymap/help.md",target:"_blank",title:"查看帮助"}},[t("VIcon",{attrs:{size:18,icon:"mdi-help-circle-outline"}})],1),e._v(" "),t("div",{staticClass:"keymap-settings-header-close",attrs:{title:"关闭"}},[t("VIcon",{attrs:{size:18,icon:"close"},on:{click:function(n){e.popupOpen=!1}}})],1)]),e._v(" "),t("div",{staticClass:"keymap-settings-content"},[t("div",{staticClass:"keymap-settings-grid"},[t("div",{staticClass:"grid-header"},[t("div",{staticClass:"header-name"},[e._v("\n 动作\n ")]),e._v(" "),t("div",{staticClass:"header-default-binding"},[e._v("\n 默认按键\n ")]),e._v(" "),t("div",{staticClass:"header-preset-binding"},[t("VDropdown",{attrs:{items:e.presetOptions,"key-mapper":function(e){return e}},scopedSlots:e._u([{key:"item",fn:function(n){var t=n.item;return[e._v("\n "+e._s(t)+"\n ")]}}]),model:{value:e.selectedPreset,callback:function(n){e.selectedPreset=n},expression:"selectedPreset"}})],1),e._v(" "),t("div",{staticClass:"header-custom-binding"},[e._v("\n 自定义按键\n ")])]),e._v(" "),e._l(e.rows,(function(n){return t("KeymapSettingsRow",{key:n.name,attrs:{row:n,"selected-preset":e.selectedPreset}})}))],2)])])])};i._withStripped=!0;var r=t(407),o=t(643),s=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"grid-row"},[t("div",{staticClass:"row-name",attrs:{title:e.row.name}},[e._v("\n "+e._s(e.row.displayName)+"\n ")]),e._v(" "),t("div",{staticClass:"row-default-binding",class:{overwritten:e.isOverwrittern(e.presets[e.selectedPreset],e.customKeyBindings),"not-set":void 0===e.presetBase[e.row.name]}},[e._v("\n "+e._s(e.showReadonlyKey(e.presetBase))+"\n ")]),e._v(" "),t("div",{staticClass:"row-preset-binding",class:{overwritten:e.isOverwrittern(e.customKeyBindings),"not-set":void 0===e.presets[e.selectedPreset][e.row.name]}},[e._v("\n "+e._s(e.showReadonlyKey(e.presets[e.selectedPreset]))+"\n ")]),e._v(" "),t("div",{staticClass:"row-custom-binding"},[e.editable?t("div",{staticClass:"custom-binding-edit"},[t("TextBox",{ref:"customBindingTextBox",attrs:{placeholder:"禁用","change-on-blur":"",text:e.customKeyBindings[e.row.name]},on:{change:e.updateCustomBinding}}),e._v(" "),t("VButton",{attrs:{type:"transparent",title:"删除自定义键位"},on:{click:function(n){return e.removeCustomBinding()}}},[t("VIcon",{attrs:{icon:"mdi-trash-can-outline",size:16}})],1)],1):t("div",{staticClass:"custom-binding-add"},[t("VButton",{attrs:{type:"transparent",title:"添加自定义键位"},on:{click:function(n){return e.addCustomBinding()}}},[t("VIcon",{attrs:{icon:"mdi-plus",size:16}})],1)],1)])])};s._withStripped=!0;var a=t(445);const l=(0,r.getComponentSettings)("keymap").options;var c=Vue.extend({components:{TextBox:o.TextBox,VButton:o.VButton,VIcon:o.VIcon},props:{row:{type:Object,required:!0},selectedPreset:{type:String,required:!0}},data:()=>({presets:a.um,presetBase:a.Wb,customKeyBindings:l.customKeyBindings,editable:!1}),created(){this.checkEditable()},methods:{checkEditable(){this.editable=void 0!==this.customKeyBindings[this.row.name]},showReadonlyKey(e){const{name:n}=this.row,t=e[n];return void 0===t?"继承":""===t?"禁用":t},isOverwrittern(...e){const{name:n}=this.row;return e.some((e=>void 0!==e[n]))},async addCustomBinding(){const{name:e}=this.row;this.customKeyBindings[e]="",this.checkEditable(),await this.$nextTick(),this.$refs.customBindingTextBox.focus()},removeCustomBinding(){const{name:e}=this.row;delete this.customKeyBindings[e],this.checkEditable()},updateCustomBinding(e){console.log("update",e);const{name:n}=this.row;this.customKeyBindings[n]=e}}}),d=t(379),p=t.n(d),u=t(88),g=t.n(u),m={insert:"head",singleton:!1},f=(p()(g(),m),g().locals,t(900)),y=(0,f.Z)(c,s,[],!1,null,null,null);y.options.__file="registry/lib/components/utils/keymap/settings/KeymapSettingsRow.vue";var h=y.exports,b=t(323);const v=(0,r.getComponentSettings)("keymap").options;console.log(a.um,b.Nw,v.preset,v.customKeyBindings);var w=Vue.extend({components:{VIcon:o.VIcon,VDropdown:o.VDropdown,VPopup:o.VPopup,KeymapSettingsRow:h},props:{triggerElement:{type:HTMLElement,default:null}},data:()=>({popupOpen:!1,actions:b.Nw,presets:a.um,customKeyBindings:v.customKeyBindings}),computed:{selectedPreset:{get:()=>v.preset,set(e){v.preset=e}},rows(){return Object.entries(this.actions).map((([e,n])=>({name:e,...n})))},presetOptions(){return Object.keys(this.presets)}}}),k=t(418),x=t.n(k),_={insert:"head",singleton:!1},C=(p()(x(),_),x().locals,(0,f.Z)(w,i,[],!1,null,null,null));C.options.__file="registry/lib/components/utils/keymap/settings/KeymapSettings.vue";var B=C.exports},900:function(e,n,t){"use strict";function i(e,n,t,i,r,o,s,a){var l,c="function"==typeof e?e.options:e;if(n&&(c.render=n,c.staticRenderFns=t,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,n){return l.call(n),d(e,n)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}t.d(n,{Z:function(){return i}})},269:function(e){"use strict";e.exports=coreApis.pluginApis.data},407:function(e){"use strict";e.exports=coreApis.settings},643:function(e){"use strict";e.exports=coreApis.ui},109:function(e){"use strict";e.exports=coreApis.utils}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var o=i[e]={id:e,exports:{}};return t[e](o,o.exports,r),o.exports}r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.__esModule)return t;if(16&i&&"function"==typeof t.then)return t}var o=Object.create(null);r.r(o);var s={};e=e||[null,n({}),n([]),n(n)];for(var a=2&i&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((function(e){s[e]=function(){return t[e]}}));return s.default=function(){return t},r.d(o,s),o},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){"use strict";r.d(o,{component:function(){return u}});var e=coreApis.componentApis.styledComponent,n=r(407),t=r(323),i=r(109),s=coreApis.utils.urls;const a=["shift","alt","ctrl","meta"],l=lodash.once((e=>{const n=s.watchlaterUrls.some((e=>(0,i.matchUrlPattern)(e))),r=s.mediaListUrls.some((e=>(0,i.matchUrlPattern)(e))),o={enable:!0,bindings:e};return document.body.addEventListener("keydown",(e=>{o.enable&&o.bindings.forEach((o=>{if(0===o.keys.length)return;if(!1!==o.action.ignoreTyping&&(0,i.isTyping)())return;const s=e.key.toLowerCase(),l=dq(".bilibili-player-sphere-control");if(null!==l&&"none"!==l.style.display&&["w","a","s","d"].includes(s))return;if(a.some((n=>{const t=o.keys.includes(n);if(o.keys.includes(`[${n}]`))return!1;return t!==e[`${n}Key`]})))return;const c=o.keys.filter((e=>!a.includes(e.toLowerCase()))).map((e=>e.toLowerCase()));if(!(c.includes(e.key.toLowerCase())||c.includes(e.code.toLowerCase())))return;const d=o.action.run({binding:o,isWatchlater:n,isMediaList:r,event:e,clickElement:t.$j,changeVideoTime:t.vN,showTip:t.kW}),p=!lodash.isNil(d);(o.action.prevent??p)&&(e.stopPropagation(),e.preventDefault())}))})),o}));var c=r(445);let d=null;const p=(0,e.styledComponentEntry)((()=>Promise.resolve().then(r.t.bind(r,224,23))),(async({settings:e})=>{const i=()=>{const n=e.options.preset,i=c.um[n]||{},r=(e=>Object.entries(e).map((([e,n])=>({keys:n.split(" ").filter((e=>""!==e)),action:t.Nw[e]||none}))))({...c.Wb,...i,...e.options.customKeyBindings});d?d.bindings=r:d=l(r)};(0,n.addComponentListener)("keymap.preset",i,!0),(0,n.addComponentListener)("keymap.customKeyBindings",i)})),u={name:"keymap",displayName:"快捷键扩展",tags:[componentsTags.video,componentsTags.utils],entry:p,unload:()=>{d&&(d.enable=!1)},reload:()=>{d&&(d.enable=!0)},description:{"zh-CN":"为脚本的功能和 b 站的功能启用键盘快捷键支持, 快捷键列表可在`快捷键设置`中查看和配置."},extraOptions:()=>Promise.resolve().then(r.bind(r,708)).then((e=>e.default)),options:{longJumpSeconds:{defaultValue:85,displayName:"长跳跃秒数"},customKeyBindings:{defaultValue:{},displayName:"自定义键位",hidden:!0},preset:{defaultValue:"Default",displayName:"预设",hidden:!0}},plugin:{displayName:"快捷键扩展 - 搜索支持",setup:({addData:e})=>{e("launchBar.actions",(e=>{e.push({name:"keymapSettings",getActions:async()=>[{name:"快捷键扩展设置",description:"Keymap Settings",icon:"mdi-keyboard-settings-outline",action:async()=>{const{toggleKeymapSettings:e}=await Promise.resolve().then(r.bind(r,527));e()}}]})}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/remove-promotions.js b/registry/dist/components/utils/remove-promotions.js index 2bf716310..a7897ae27 100644 --- a/registry/dist/components/utils/remove-promotions.js +++ b/registry/dist/components/utils/remove-promotions.js @@ -6,4 +6,4 @@ n.i=function(e,t,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;i{const{addComponentListener:t}=await Promise.resolve().then(r.t.bind(r,407,23));if("https://www.bilibili.com/"===document.URL.replace(window.location.search,"")){const{selectAll:n,select:t}=await Promise.resolve().then(r.t.bind(r,569,23));t(".eva-extension-area").then((e=>{e&&(e.parentElement.style.margin="12px")})),n(".gg-pic").then((n=>{0!==n.length&&n.forEach((n=>{const t=n.parentElement;t.style.display="none";const o=[...t.parentElement.childNodes].indexOf(t)+1,r=t.parentElement.parentElement.querySelector(`.pic li:nth-child(${o})`);if(r){r.style.display="flex";const n=r.querySelector("a:not(.more-text)");n.insertAdjacentHTML("afterend",`\n
${e.options.showPlaceholder?"🚫已屏蔽广告":""}
\n `),n.style.visibility="hidden";[r.querySelector("a.more-text"),r.querySelector("img")].forEach((e=>e.style.display="none"))}}))})),t(".focus-carousel.home-slide").then((n=>{n&&dqa(n,".gg-icon,.bypb-icon").map((e=>e.parentElement.parentElement)).forEach((n=>{n.style.display="none",n.insertAdjacentHTML("afterend",`\n
${e.options.showPlaceholder?"🚫已屏蔽广告":""}
\n `)}))}))}t(`${n.name}.preserveEventBanner`,(e=>{document.body.classList.toggle("preserve-event-banner",e)}),!0)},instantStyles:[{name:"removePromotions",style:()=>Promise.resolve().then(r.t.bind(r,775,23))}],tags:[componentsTags.utils],description:{"zh-CN":'\n删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示"🚫已屏蔽广告"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.\n'.trim()},options:{showPlaceholder:{displayName:"占位文本",defaultValue:!0},preserveEventBanner:{displayName:"保留活动横幅",defaultValue:!1}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;c{const{addComponentListener:t}=await Promise.resolve().then(r.t.bind(r,407,23));if("https://www.bilibili.com/"===document.URL.replace(window.location.search,"")){const{selectAll:n,select:t}=await Promise.resolve().then(r.t.bind(r,569,23));t(".eva-extension-area").then((e=>{e&&(e.parentElement.style.margin="12px")})),n(".gg-pic").then((n=>{0!==n.length&&n.forEach((n=>{const t=n.parentElement;t.style.display="none";const o=[...t.parentElement.childNodes].indexOf(t)+1,r=t.parentElement.parentElement.querySelector(`.pic li:nth-child(${o})`);if(r){r.style.display="flex";const n=r.querySelector("a:not(.more-text)");n.insertAdjacentHTML("afterend",`\n
${e.options.showPlaceholder?"🚫已屏蔽广告":""}
\n `),n.style.visibility="hidden";[r.querySelector("a.more-text"),r.querySelector("img")].forEach((e=>e.style.display="none"))}}))})),t(".focus-carousel.home-slide").then((n=>{n&&dqa(n,".gg-icon,.bypb-icon").map((e=>e.parentElement.parentElement)).forEach((n=>{n.style.display="none",n.insertAdjacentHTML("afterend",`\n
${e.options.showPlaceholder?"🚫已屏蔽广告":""}
\n `)}))}))}t(`${n.name}.preserveEventBanner`,(e=>{document.body.classList.toggle("preserve-event-banner",e)}),!0)},instantStyles:[{name:"removePromotions",style:()=>Promise.resolve().then(r.t.bind(r,775,23))}],tags:[componentsTags.utils],description:{"zh-CN":'\n删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示"🚫已屏蔽广告"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.\n'.trim()},options:{showPlaceholder:{displayName:"占位文本",defaultValue:!0},preserveEventBanner:{displayName:"保留活动横幅",defaultValue:!1}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/url-params-clean.js b/registry/dist/components/utils/url-params-clean.js index 46f4ed232..ff8c23298 100644 --- a/registry/dist/components/utils/url-params-clean.js +++ b/registry/dist/components/utils/url-params-clean.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/url-params-clean"]=t():e["utils/url-params-clean"]=t()}(self,(function(){return function(){"use strict";var e,t,r={270:function(e){e.exports=coreApis.lifeCycle},156:function(e){e.exports=coreApis.observer}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(i,a),i},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){n.d(i,{component:function(){return r}});var e=coreApis.pluginApis.data,t=coreApis.utils;const r={name:"urlParamsClean",displayName:"网址参数清理",entry:async()=>{if((0,t.isNotHtml)())return;const[r]=(0,e.registerAndGetData)("urlParamsClean.noClean",["videocard_series"]),[o]=(0,e.registerAndGetData)("urlParamsClean.params",["spm_id_from","from_source","from_spmid","from","seid","share_source","share_medium","share_plat","share_tag","share_session_id","bbid","ts","timestamp","unique_k","rt","tdsourcetag","accept_quality","broadcast_type","current_qn","current_quality","playurl_h264","playurl_h265","quality_description","network","network_status","platform_network_status","p2p_type","referfrom","visit_id","bsource","spm","hotRank"]),[i]=(0,e.registerAndGetData)("urlParamsClean.siteSpecifiedParams",[{match:/\/\/www\.bilibili\.com\/audio\/(au[\d]+|mycollection)/,param:"type"},{match:/\/\/live\.bilibili\.com\//,param:"session_id"},{match:/\/\/www\.bilibili\.com\/bangumi\//,param:"theme"}]),{fullyLoaded:a}=await Promise.resolve().then(n.t.bind(n,270,23)),{urlChange:s}=await Promise.resolve().then(n.t.bind(n,156,23));a((()=>{"text/html"===document.contentType&&s((()=>(()=>{const e=window.location.search.substring(1).split("&");if(e.some((e=>r.some((t=>e.includes(t))))))return;const t=e.filter((e=>!o.some((t=>e.startsWith(`${t}=`)))&&!i.some((({match:t,param:r})=>document.URL.match(t)&&e.startsWith(`${r}=`))))).join("&"),n=document.URL.replace(window.location.search,"")+(t?`?${t}`:"");n!==document.URL&&(console.log("[URL params clean]",document.URL,n),window.history.replaceState({},document.title,n))})()))}))},description:{"zh-CN":"自动删除网址中的多余跟踪参数."},tags:[componentsTags.utils],urlExclude:[/game\.bilibili\.com\/fgo/],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/url-params-clean"]=t():e["utils/url-params-clean"]=t()}(self,(function(){return function(){"use strict";var e,t,r={270:function(e){e.exports=coreApis.lifeCycle},156:function(e){e.exports=coreApis.observer}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(i,a),i},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){n.d(i,{component:function(){return r}});var e=coreApis.pluginApis.data,t=coreApis.utils;const r={name:"urlParamsClean",displayName:"网址参数清理",entry:async()=>{if((0,t.isNotHtml)())return;const[r]=(0,e.registerAndGetData)("urlParamsClean.noClean",["videocard_series"]),[o]=(0,e.registerAndGetData)("urlParamsClean.params",["spm_id_from","from_source","from_spmid","from","seid","share_source","share_medium","share_plat","share_tag","share_session_id","bbid","ts","timestamp","unique_k","rt","tdsourcetag","accept_quality","broadcast_type","current_qn","current_quality","playurl_h264","playurl_h265","quality_description","network","network_status","platform_network_status","p2p_type","referfrom","visit_id","bsource","spm","hotRank"]),[i]=(0,e.registerAndGetData)("urlParamsClean.siteSpecifiedParams",[{match:/\/\/www\.bilibili\.com\/audio\/(au[\d]+|mycollection)/,param:"type"},{match:/\/\/live\.bilibili\.com\//,param:"session_id"},{match:/\/\/www\.bilibili\.com\/bangumi\//,param:"theme"}]),{fullyLoaded:a}=await Promise.resolve().then(n.t.bind(n,270,23)),{urlChange:s}=await Promise.resolve().then(n.t.bind(n,156,23));a((()=>{"text/html"===document.contentType&&s((()=>(()=>{const e=window.location.search.substring(1).split("&");if(e.some((e=>r.some((t=>e.includes(t))))))return;const t=e.filter((e=>!o.some((t=>e.startsWith(`${t}=`)))&&!i.some((({match:t,param:r})=>document.URL.match(t)&&e.startsWith(`${r}=`))))).join("&"),n=document.URL.replace(window.location.search,"")+(t?`?${t}`:"");n!==document.URL&&(console.log("[URL params clean]",document.URL,n),window.history.replaceState({},document.title,n))})()))}))},description:{"zh-CN":"自动删除网址中的多余跟踪参数."},tags:[componentsTags.utils],urlExclude:[/game\.bilibili\.com\/fgo/],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/v1-migrate.js b/registry/dist/components/utils/v1-migrate.js index 1b0f2e245..31b4c640f 100644 --- a/registry/dist/components/utils/v1-migrate.js +++ b/registry/dist/components/utils/v1-migrate.js @@ -1 +1 @@ -!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["utils/v1-migrate"]=o():e["utils/v1-migrate"]=o()}(self,(function(){return function(){"use strict";var e,o,t={290:function(e){e.exports=coreApis.filePicker},729:function(e){e.exports=coreApis.utils.log}},n={};function a(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,a),i.exports}o=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var i=Object.create(null);a.r(i);var r={};e=e||[null,o({}),o([]),o(o)];for(var s=2&n&&t;"object"==typeof s&&!~e.indexOf(s);s=o(s))Object.getOwnPropertyNames(s).forEach((function(e){r[e]=function(){return t[e]}}));return r.default=function(){return t},a.d(i,r),i},a.d=function(e,o){for(var t in o)a.o(o,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},a.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){a.d(i,{component:function(){return u}});var e=coreApis.pluginApis.data,o=coreApis.componentApis.component,t=coreApis.componentApis.userComponent,n=coreApis.ajax,r=coreApis.cdnTypes,s=coreApis.meta,l=coreApis.settings,c=coreApis.toast,d=a(729),m=coreApis.pluginApis.hook,p=coreApis.pluginApis.plugin;const u={name:"v1Migrate",displayName:"v1 设置迁移",description:{"zh-CN":"在设置的 `关于` 面板中添加 `导入 v1 设置` 按钮, 点击导入可以导入 v1 的设置, 并根据打开的选项自动下载安装 v2 中对应的功能."},tags:[componentsTags.utils],entry:()=>{(0,e.addData)("settingsPanel.about.actions",(e=>{e.push({icon:"mdi-inbox-arrow-down-outline",name:"importV1Settings",displayName:"导入 v1 设置",run:async()=>{const{logError:e}=await Promise.resolve().then(a.t.bind(a,729,23)),{pickFile:i}=await Promise.resolve().then(a.t.bind(a,290,23)),u=await i({accept:"*.json"});if(0===u.length)return;const[f]=u;try{const e=JSON.parse(await f.text());await(async e=>{const a=c.Toast.info("下载功能列表中","导入 v1 设置");try{console.log("下载功能列表中");const i=`${r.cdnRoots[(0,l.getGeneralSettings)().cdnRoot](s.meta.compilationInfo.branch)}doc/features/features.json`,c=await(0,n.monkey)({url:i});console.log(c);const d=JSON.parse(c);console.log("下载功能列表完成");const u=(a,i,c)=>async()=>{if(!e[a])return void console.log(`跳过了未开启的选项 ${a}`);const u={component:o.componentsMap,plugin:p.pluginsMap},f={component:t.installComponent,plugin:p.installPlugin};if(i in u[c])console.log(`${i} 已经存在, 跳过安装`);else{const e=d.find((e=>e.type===c&&e.name===i)),o=e?.fullAbsolutePath;if(!o||!e)return void console.log(`没有找到名为 ${i} 的功能`);const t=`${r.cdnRoots[(0,l.getGeneralSettings)().cdnRoot](s.meta.compilationInfo.branch,e.owner)}${o}`,a=await(0,n.monkey)({url:t}),{before:p,after:u}=(0,m.getHook)(`user${lodash.startCase(c)}s.add`,a,t);await p();const{metadata:g,message:v}=await f[c](a);await u(g),console.log(v)}},f=(o,t,n)=>()=>{const a=e[o],i=n?.(a)??a;if(void 0!==i){const[e,...o]=t.split("."),{options:n}=(0,l.getComponentSettings)(e);lodash.set(n,o,i)}console.log(`迁移了选项 ${o} -> ${t}`)},g=()=>()=>{const{customStyles:o}=e;o.filter((e=>e.enabled)).forEach((e=>{l.settings.userStyles[e.name]=lodash.omit(e,"enabled")}))},v=e=>u("guiSettings",e,"plugin"),y=()=>none,b={category:"home",activities:"feeds",bangumi:"subscriptions",watchlaterList:"watchlater",favoritesList:"favorites",historyList:"history",rankingLink:"ranking",drawingLink:"drawing",bangumiLink:"bangumi",musicLink:"music",matchLink:"match",shopLink:"shop"},h=[u("useDarkStyle","darkMode","component"),u("darkColorScheme","darkModeFollowSystem","component"),u("hideBanner","hideBanner","component"),u("expandDanmakuList","expandDanmakuList","component"),f("expandDanmakuListIgnoreMediaList","expandDanmakuList.ignoreMediaList"),u("expandDescription","fullVideoDescription","component"),u("watchlaterRedirect","watchlaterRedirect","component"),f("watchLaterRedirectNavbar","watchlaterRedirect.navbar"),f("watchLaterRedirectPage","watchlaterRedirect.page"),u("touchVideoPlayer","touchPlayerGestures","component"),u("touchVideoPlayer","touchPlayerControl","component"),u("customControlBackground","playerControlBackground","component"),f("customControlBackgroundOpacity","playerControlBackground.opacity",(e=>{const o=parseFloat(e);return Math.round(100*o)})),u("darkSchedule","darkModeSchedule","component"),f("darkScheduleStart","darkModeSchedule.range.start"),f("darkScheduleEnd","darkModeSchedule.range.end"),u("fullTweetsTitle","fullFeedsTitle","component"),u("fullPageTitle","fullEpisodeTitle","component"),u("removeVideoTopMask","hideVideoTopMask","component"),u("removeLiveWatermark","removeLiveWatermark","component"),u("harunaScale","dpiLiveShowgirl","component"),u("harunaScale","dpiLiveShowgirl","component"),u("removeAds","removePromotions","component"),f("showBlockedAdsTip","removePromotions.showPlaceholder"),f("preserveEventBanner","removePromotions.preserveEventBanner"),u("touchVideoPlayerDoubleTapControl","doubleClickControl","component"),f("customStyleColor","settingsPanel.themeColor"),u("useDefaultPlayerMode","defaultPlayerMode","component"),f("applyPlayerModeOnPlay","defaultPlayerMode.applyOnPlay"),f("defaultPlayerMode","defaultPlayerMode.mode"),u("skipChargeList","skipChargeList","component"),u("comboLike","touchComboLike","component"),u("autoLightOff","playerAutoLight","component"),u("airborne","danmakuAirborne","component"),u("useBiliplusRedirect","biliplusRedirect","component"),u("biliplusRedirect","biliplusRedirect","component"),u("framePlayback","seekByFrames","component"),u("useCommentStyle","simplifyComments","component"),u("imageResolution","imageResolution","component"),f("imageResolutionScale","imageResolution.scale"),u("playerFocus","playerFocus","component"),f("playerFocusOffset","playerFocus.offset"),u("simplifyLiveroom","simplifyLiveroom","component"),f("simplifyLiveroomSettings","simplifyLiveroom",(e=>{const{options:o}=(0,l.getComponentSettings)("simplifyLiveroom");Object.assign(o,Object.fromEntries(Object.entries(e).map((([e,o])=>[`switch-${e}`,o]))))})),u("customNavbar","customNavbar","component"),v("customNavbar.items.darkMode"),f("favoritesListCurrentSelect","customNavbar.lastFavoriteFolder"),f("touchNavBar","customNavbar.touch"),f("customNavbarFill","customNavbar.fill"),f("customNavbarTransparent","customNavbar.transparent"),f("customNavbarShadow","customNavbar.shadow"),f("customNavbarBlur","customNavbar.blur"),f("customNavbarOrder","customNavbar.order",(e=>(Object.keys(e).forEach((o=>{o in b&&(e[b[o]]=e[o],delete e[o])})),delete e.mangaLink,e))),f("customNavbarHidden","customNavbar.hidden",(e=>([...e].forEach((o=>{o in b&&(e.push(b[o]),lodash.pull(e,o))})),lodash.pull(e,"mangaLink"),e))),f("customNavbarBoundsPadding","customNavbar.padding",(e=>parseFloat(e))),f("customNavbarGlobalFixed","customNavbar.globalFixed"),f("customNavbarSeasonLogo","customNavbar.seasonLogo"),f("customNavbarShowDeadVideos","customNavbar.showDeadVideos"),u("playerShadow","playerShadow","component"),u("narrowDanmaku","preserveDanmakuInput","component"),u("outerWatchlater","outerWatchlater","component"),u("videoScreenshot","videoScreenshot","component"),u("hideBangumiReviews","hideBangumiReviews","component"),f("filenameFormat","settingsPanel.filenameFormat"),f("batchFilenameFormat","settingsPanel.batchFilenameFormat"),u("sidebarOffset","sidebarOffset","component"),f("sidebarOffset","sidebarOffset.offset"),u("noLiveAutoplay","liveHomeMute","component"),u("foldComment","rememberVideoSpeed","component"),f("defaultVideoSpeed","rememberVideoSpeed.speed"),f("rememberVideoSpeedList","rememberVideoSpeed.individualRememberList"),f("rememberVideoSpeed","rememberVideoSpeed.individualRemember"),f("extendVideoSpeed","rememberVideoSpeed.extend"),f("extendVideoSpeedList","rememberVideoSpeed.extendList"),u("foldComment","foldComments","component"),u("autoDraw","liveAutoDraw","component"),u("keymap","keymap","component"),f("keymapPreset","keymap.preset"),f("keymapJumpSeconds","keymap.longJumpSeconds"),f("customKeyBindings","keymap.customKeyBindings"),u("doubleClickFullscreen","doubleClickFullscreen","component"),f("doubleClickFullscreenPreventSingleClick","doubleClickFullscreen.preventSingleClick"),f("scriptLoadingMode","settingsPanel.scriptLoadingMode",(e=>e.replace(/\(自动\)$/,""))),f("guiSettingsDockSide","settingsPanel.dockSide"),u("fullActivityContent","fullFeedsContent","component"),u("feedsFilter","feedsFilter","component"),f("feedsFilterPatterns","feedsFilter.patterns"),f("feedsSpecialFilterTypes","feedsFilter.types"),f("feedsFilterSideCards","feedsFilter.sideCards"),u("selectableColumnText","columnUnlock","component"),u("miniPlayerTouchMove","touchMiniPlayer","component"),u("hideBangumiSponsors","hideBangumiSponsors","component"),u("hideRecommendLive","hideRecommendedLive","component"),u("hideRelatedVideos","hideRelatedVideos","component"),u("urlParamsClean","urlParamsClean","component"),u("collapseLiveSideBar","collapseLiveSideBar","component"),f("foregroundColorMode","settingsPanel.textColor"),f("updateCdn","settingsPanel.cdnRoot"),f("downloadPackageEmitMode","settingsPanel.downloadPackageEmitMode",(e=>"分别下载"===e?"单独下载":e)),u("bvidConvert","bvidConvert","component"),u("fixedSidebars","fixedFeedsSidebars","component"),u("autoHideSideBar","autoHideSidebar","component"),u("livePip","livePip","component"),u("extendFeedsLive","extendFeedsLive","component"),u("playerOnTop","playerOnTop","component"),u("quickFavorite","quickFavorite","component"),f("quickFavoriteID","quickFavorite.favoriteFolderID"),u("disableFeedsDetails","disableFeedsDetails","component"),u("elegantScrollbar","elegantScrollbar","component"),u("danmakuSendBar","liveDanmakuSendbar","component"),u("showCoverBeforePlay","showCoverBeforePlay","component"),u("seoJump","seoRedirect","component"),u("copyFeedsLink","copyFeedsLink","component"),u("copyCommentLink","copyCommentsLink","component"),u("unfoldFeeds","unfoldFeeds","component"),u("feedsImageExporter","imageExporter","component"),u("columnImageExporter","imageExporter","component"),u("preferAvUrl","avUrl","component"),u("homeHidden","simplifyHome","component"),f("homeHiddenItems","simplifyHome",(e=>{const{options:o}=(0,l.getComponentSettings)("simplifyHome");e.forEach((e=>o[`switch-${e}`]=!0))})),u("alwaysShowDuration","alwaysShowDuration","component"),u("removeVideoPopup","removePlayerPopup","component"),u("removeGuidePopup","removePlayerPopup","component"),u("removeVotePopup","removePlayerPopup","component"),f("removeVideoPopup","removePlayerPopup.relatedVideos"),f("removeGuidePopup","removePlayerPopup.comboLikes"),f("removeVotePopup","removePlayerPopup.votes"),u("checkInCenter","checkInCenter","component"),u("fullscreenGiftBox","liveGiftBox","component"),u("autoPlayControl","legacyAutoPlay","component"),u("scrollOutPlayer","playerIntersectionActions","component"),f("scrollOutPlayerTriggerPlace","playerIntersectionActions.triggerLocation"),f("scrollOutPlayerAutoPause","playerIntersectionActions.pause"),f("scrollOutPlayerAutoLightOn","playerIntersectionActions.light"),u("disableDanmakuHighlights","disableSpecialDanmaku","component"),u("disableUpDanmakuStyle","disableSpecialDanmaku","component"),f("disableDanmakuHighlights","disableSpecialDanmaku.highlight"),f("disableUpDanmakuStyle","disableSpecialDanmaku.up"),u("viewCover","viewCover","component"),u("downloadVideo","downloadVideo","component"),v("downloadVideo.outputs.aria2"),v("downloadVideo.outputs.idm"),f("downloadVideoQuality","downloadVideo.basicConfig.quality"),f("downloadVideoFormat","downloadVideo.basicConfig.api",(o=>({flv:"video.flv",dash:e.downloadVideoDashCodec.startsWith("HEVC")?"video.dash.hevc":"video.dash.avc"}[o]))),f("downloadVideoDefaultDanmaku","downloadVideo.danmakuType"),f("downloadVideoDefaultSubtitle","downloadVideo.subtitleType"),f("aria2RpcOptionProfiles","downloadVideo.rpcProfiles"),u("downloadDanmaku","downloadDanmaku","component"),u("downloadSubtitle","downloadSubtitle","component"),u("downloadAudio","downloadAudio","component"),u("downloadLiveRecords","downloadLiveRecords","component"),u("medalHelper","badgeHelper","component"),f("defaultMedalID","badgeHelper.defaultMedalID"),f("autoMatchMedal","badgeHelper.autoMatchMedal"),g(),y()];let k=0;a.message=`导入中... (${k}/${h.length})`;let S=0,P=0;for(const e of h)try{await e(),S++}catch(e){console.log(e),P++}finally{k++,a.message=`导入中... (${k}/${h.length})`}a.message=`导入完成. 成功 ${S} 个, 失败 ${P} 个, 可在控制台查看详细日志.`}catch(e){a.dismiss(),(0,d.logError)(e)}})(e)}catch(o){e(o)}}})}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["utils/v1-migrate"]=o():e["utils/v1-migrate"]=o()}(self,(function(){return function(){"use strict";var e,o,t={290:function(e){e.exports=coreApis.filePicker},729:function(e){e.exports=coreApis.utils.log}},n={};function a(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,a),i.exports}o=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var i=Object.create(null);a.r(i);var r={};e=e||[null,o({}),o([]),o(o)];for(var s=2&n&&t;"object"==typeof s&&!~e.indexOf(s);s=o(s))Object.getOwnPropertyNames(s).forEach((function(e){r[e]=function(){return t[e]}}));return r.default=function(){return t},a.d(i,r),i},a.d=function(e,o){for(var t in o)a.o(o,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},a.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){a.d(i,{component:function(){return u}});var e=coreApis.pluginApis.data,o=coreApis.componentApis.component,t=coreApis.componentApis.userComponent,n=coreApis.ajax,r=coreApis.cdnTypes,s=coreApis.meta,l=coreApis.settings,c=coreApis.toast,d=a(729),m=coreApis.pluginApis.hook,p=coreApis.pluginApis.plugin;const u={name:"v1Migrate",displayName:"v1 设置迁移",description:{"zh-CN":"在设置的 `关于` 面板中添加 `导入 v1 设置` 按钮, 点击导入可以导入 v1 的设置, 并根据打开的选项自动下载安装 v2 中对应的功能."},tags:[componentsTags.utils],entry:()=>{(0,e.addData)("settingsPanel.about.actions",(e=>{e.push({icon:"mdi-inbox-arrow-down-outline",name:"importV1Settings",displayName:"导入 v1 设置",run:async()=>{const{logError:e}=await Promise.resolve().then(a.t.bind(a,729,23)),{pickFile:i}=await Promise.resolve().then(a.t.bind(a,290,23)),u=await i({accept:"*.json"});if(0===u.length)return;const[f]=u;try{const e=JSON.parse(await f.text());await(async e=>{const a=c.Toast.info("下载功能列表中","导入 v1 设置");try{console.log("下载功能列表中");const i=`${r.cdnRoots[(0,l.getGeneralSettings)().cdnRoot](s.meta.compilationInfo.branch)}doc/features/features.json`,c=await(0,n.monkey)({url:i});console.log(c);const d=JSON.parse(c);console.log("下载功能列表完成");const u=(a,i,c)=>async()=>{if(!e[a])return void console.log(`跳过了未开启的选项 ${a}`);const u={component:o.componentsMap,plugin:p.pluginsMap},f={component:t.installComponent,plugin:p.installPlugin};if(i in u[c])console.log(`${i} 已经存在, 跳过安装`);else{const e=d.find((e=>e.type===c&&e.name===i)),o=e?.fullAbsolutePath;if(!o||!e)return void console.log(`没有找到名为 ${i} 的功能`);const t=`${r.cdnRoots[(0,l.getGeneralSettings)().cdnRoot](s.meta.compilationInfo.branch,e.owner)}${o}`,a=await(0,n.monkey)({url:t}),{before:p,after:u}=(0,m.getHook)(`user${lodash.startCase(c)}s.add`,a,t);await p();const{metadata:g,message:v}=await f[c](a);await u(g),console.log(v)}},f=(o,t,n)=>()=>{const a=e[o],i=n?.(a)??a;if(void 0!==i){const[e,...o]=t.split("."),{options:n}=(0,l.getComponentSettings)(e);lodash.set(n,o,i)}console.log(`迁移了选项 ${o} -> ${t}`)},g=()=>()=>{const{customStyles:o}=e;o.filter((e=>e.enabled)).forEach((e=>{l.settings.userStyles[e.name]=lodash.omit(e,"enabled")}))},v=e=>u("guiSettings",e,"plugin"),y=()=>none,b={category:"home",activities:"feeds",bangumi:"subscriptions",watchlaterList:"watchlater",favoritesList:"favorites",historyList:"history",rankingLink:"ranking",drawingLink:"drawing",bangumiLink:"bangumi",musicLink:"music",matchLink:"match",shopLink:"shop"},h=[u("useDarkStyle","darkMode","component"),u("darkColorScheme","darkModeFollowSystem","component"),u("hideBanner","hideBanner","component"),u("expandDanmakuList","expandDanmakuList","component"),f("expandDanmakuListIgnoreMediaList","expandDanmakuList.ignoreMediaList"),u("expandDescription","fullVideoDescription","component"),u("watchlaterRedirect","watchlaterRedirect","component"),f("watchLaterRedirectNavbar","watchlaterRedirect.navbar"),f("watchLaterRedirectPage","watchlaterRedirect.page"),u("touchVideoPlayer","touchPlayerGestures","component"),u("touchVideoPlayer","touchPlayerControl","component"),u("customControlBackground","playerControlBackground","component"),f("customControlBackgroundOpacity","playerControlBackground.opacity",(e=>{const o=parseFloat(e);return Math.round(100*o)})),u("darkSchedule","darkModeSchedule","component"),f("darkScheduleStart","darkModeSchedule.range.start"),f("darkScheduleEnd","darkModeSchedule.range.end"),u("fullTweetsTitle","fullFeedsTitle","component"),u("fullPageTitle","fullEpisodeTitle","component"),u("removeVideoTopMask","hideVideoTopMask","component"),u("removeLiveWatermark","removeLiveWatermark","component"),u("harunaScale","dpiLiveShowgirl","component"),u("harunaScale","dpiLiveShowgirl","component"),u("removeAds","removePromotions","component"),f("showBlockedAdsTip","removePromotions.showPlaceholder"),f("preserveEventBanner","removePromotions.preserveEventBanner"),u("touchVideoPlayerDoubleTapControl","doubleClickControl","component"),f("customStyleColor","settingsPanel.themeColor"),u("useDefaultPlayerMode","defaultPlayerMode","component"),f("applyPlayerModeOnPlay","defaultPlayerMode.applyOnPlay"),f("defaultPlayerMode","defaultPlayerMode.mode"),u("skipChargeList","skipChargeList","component"),u("comboLike","touchComboLike","component"),u("autoLightOff","playerAutoLight","component"),u("airborne","danmakuAirborne","component"),u("useBiliplusRedirect","biliplusRedirect","component"),u("biliplusRedirect","biliplusRedirect","component"),u("framePlayback","seekByFrames","component"),u("useCommentStyle","simplifyComments","component"),u("imageResolution","imageResolution","component"),f("imageResolutionScale","imageResolution.scale"),u("playerFocus","playerFocus","component"),f("playerFocusOffset","playerFocus.offset"),u("simplifyLiveroom","simplifyLiveroom","component"),f("simplifyLiveroomSettings","simplifyLiveroom",(e=>{const{options:o}=(0,l.getComponentSettings)("simplifyLiveroom");Object.assign(o,Object.fromEntries(Object.entries(e).map((([e,o])=>[`switch-${e}`,o]))))})),u("customNavbar","customNavbar","component"),v("customNavbar.items.darkMode"),f("favoritesListCurrentSelect","customNavbar.lastFavoriteFolder"),f("touchNavBar","customNavbar.touch"),f("customNavbarFill","customNavbar.fill"),f("customNavbarTransparent","customNavbar.transparent"),f("customNavbarShadow","customNavbar.shadow"),f("customNavbarBlur","customNavbar.blur"),f("customNavbarOrder","customNavbar.order",(e=>(Object.keys(e).forEach((o=>{o in b&&(e[b[o]]=e[o],delete e[o])})),delete e.mangaLink,e))),f("customNavbarHidden","customNavbar.hidden",(e=>([...e].forEach((o=>{o in b&&(e.push(b[o]),lodash.pull(e,o))})),lodash.pull(e,"mangaLink"),e))),f("customNavbarBoundsPadding","customNavbar.padding",(e=>parseFloat(e))),f("customNavbarGlobalFixed","customNavbar.globalFixed"),f("customNavbarSeasonLogo","customNavbar.seasonLogo"),f("customNavbarShowDeadVideos","customNavbar.showDeadVideos"),u("playerShadow","playerShadow","component"),u("narrowDanmaku","preserveDanmakuInput","component"),u("outerWatchlater","outerWatchlater","component"),u("videoScreenshot","videoScreenshot","component"),u("hideBangumiReviews","hideBangumiReviews","component"),f("filenameFormat","settingsPanel.filenameFormat"),f("batchFilenameFormat","settingsPanel.batchFilenameFormat"),u("sidebarOffset","sidebarOffset","component"),f("sidebarOffset","sidebarOffset.offset"),u("noLiveAutoplay","liveHomeMute","component"),u("foldComment","rememberVideoSpeed","component"),f("defaultVideoSpeed","rememberVideoSpeed.speed"),f("rememberVideoSpeedList","rememberVideoSpeed.individualRememberList"),f("rememberVideoSpeed","rememberVideoSpeed.individualRemember"),f("extendVideoSpeed","rememberVideoSpeed.extend"),f("extendVideoSpeedList","rememberVideoSpeed.extendList"),u("foldComment","foldComments","component"),u("autoDraw","liveAutoDraw","component"),u("keymap","keymap","component"),f("keymapPreset","keymap.preset"),f("keymapJumpSeconds","keymap.longJumpSeconds"),f("customKeyBindings","keymap.customKeyBindings"),u("doubleClickFullscreen","doubleClickFullscreen","component"),f("doubleClickFullscreenPreventSingleClick","doubleClickFullscreen.preventSingleClick"),f("scriptLoadingMode","settingsPanel.scriptLoadingMode",(e=>e.replace(/\(自动\)$/,""))),f("guiSettingsDockSide","settingsPanel.dockSide"),u("fullActivityContent","fullFeedsContent","component"),u("feedsFilter","feedsFilter","component"),f("feedsFilterPatterns","feedsFilter.patterns"),f("feedsSpecialFilterTypes","feedsFilter.types"),f("feedsFilterSideCards","feedsFilter.sideCards"),u("selectableColumnText","columnUnlock","component"),u("miniPlayerTouchMove","touchMiniPlayer","component"),u("hideBangumiSponsors","hideBangumiSponsors","component"),u("hideRecommendLive","hideRecommendedLive","component"),u("hideRelatedVideos","hideRelatedVideos","component"),u("urlParamsClean","urlParamsClean","component"),u("collapseLiveSideBar","collapseLiveSideBar","component"),f("foregroundColorMode","settingsPanel.textColor"),f("updateCdn","settingsPanel.cdnRoot"),f("downloadPackageEmitMode","settingsPanel.downloadPackageEmitMode",(e=>"分别下载"===e?"单独下载":e)),u("bvidConvert","bvidConvert","component"),u("fixedSidebars","fixedFeedsSidebars","component"),u("autoHideSideBar","autoHideSidebar","component"),u("livePip","livePip","component"),u("extendFeedsLive","extendFeedsLive","component"),u("playerOnTop","playerOnTop","component"),u("quickFavorite","quickFavorite","component"),f("quickFavoriteID","quickFavorite.favoriteFolderID"),u("disableFeedsDetails","disableFeedsDetails","component"),u("elegantScrollbar","elegantScrollbar","component"),u("danmakuSendBar","liveDanmakuSendbar","component"),u("showCoverBeforePlay","showCoverBeforePlay","component"),u("seoJump","seoRedirect","component"),u("copyFeedsLink","copyFeedsLink","component"),u("copyCommentLink","copyCommentsLink","component"),u("unfoldFeeds","unfoldFeeds","component"),u("feedsImageExporter","imageExporter","component"),u("columnImageExporter","imageExporter","component"),u("preferAvUrl","avUrl","component"),u("homeHidden","simplifyHome","component"),f("homeHiddenItems","simplifyHome",(e=>{const{options:o}=(0,l.getComponentSettings)("simplifyHome");e.forEach((e=>o[`switch-${e}`]=!0))})),u("alwaysShowDuration","alwaysShowDuration","component"),u("removeVideoPopup","removePlayerPopup","component"),u("removeGuidePopup","removePlayerPopup","component"),u("removeVotePopup","removePlayerPopup","component"),f("removeVideoPopup","removePlayerPopup.relatedVideos"),f("removeGuidePopup","removePlayerPopup.comboLikes"),f("removeVotePopup","removePlayerPopup.votes"),u("checkInCenter","checkInCenter","component"),u("fullscreenGiftBox","liveGiftBox","component"),u("autoPlayControl","legacyAutoPlay","component"),u("scrollOutPlayer","playerIntersectionActions","component"),f("scrollOutPlayerTriggerPlace","playerIntersectionActions.triggerLocation"),f("scrollOutPlayerAutoPause","playerIntersectionActions.pause"),f("scrollOutPlayerAutoLightOn","playerIntersectionActions.light"),u("disableDanmakuHighlights","disableSpecialDanmaku","component"),u("disableUpDanmakuStyle","disableSpecialDanmaku","component"),f("disableDanmakuHighlights","disableSpecialDanmaku.highlight"),f("disableUpDanmakuStyle","disableSpecialDanmaku.up"),u("viewCover","viewCover","component"),u("downloadVideo","downloadVideo","component"),v("downloadVideo.outputs.aria2"),v("downloadVideo.outputs.idm"),f("downloadVideoQuality","downloadVideo.basicConfig.quality"),f("downloadVideoFormat","downloadVideo.basicConfig.api",(o=>({flv:"video.flv",dash:e.downloadVideoDashCodec.startsWith("HEVC")?"video.dash.hevc":"video.dash.avc"}[o]))),f("downloadVideoDefaultDanmaku","downloadVideo.danmakuType"),f("downloadVideoDefaultSubtitle","downloadVideo.subtitleType"),f("aria2RpcOptionProfiles","downloadVideo.rpcProfiles"),u("downloadDanmaku","downloadDanmaku","component"),u("downloadSubtitle","downloadSubtitle","component"),u("downloadAudio","downloadAudio","component"),u("downloadLiveRecords","downloadLiveRecords","component"),u("medalHelper","badgeHelper","component"),f("defaultMedalID","badgeHelper.defaultMedalID"),f("autoMatchMedal","badgeHelper.autoMatchMedal"),g(),y()];let k=0;a.message=`导入中... (${k}/${h.length})`;let S=0,P=0;for(const e of h)try{await e(),S++}catch(e){console.log(e),P++}finally{k++,a.message=`导入中... (${k}/${h.length})`}a.message=`导入完成. 成功 ${S} 个, 失败 ${P} 个, 可在控制台查看详细日志.`}catch(e){a.dismiss(),(0,d.logError)(e)}})(e)}catch(o){e(o)}}})}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/view-cover.js b/registry/dist/components/utils/view-cover.js index 695b403b2..526ad524e 100644 --- a/registry/dist/components/utils/view-cover.js +++ b/registry/dist/components/utils/view-cover.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/view-cover"]=t():e["utils/view-cover"]=t()}(self,(function(){return function(){"use strict";var e={761:function(e,t,o){o.r(t),o.d(t,{default:function(){return u}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{staticClass:"view-cover",attrs:{disabled:!e.imageUrl,name:"查看封面",icon:"mdi-image-outline"},on:{click:function(t){return e.viewCover()}}})};n._withStripped=!0;var i=coreApis.ajax,r=coreApis.observer,s=coreApis.spinQuery,c=coreApis.utils.log,a=coreApis.ui,l=coreApis.componentApis.video.videoInfo;var d=function(e,t,o,n,i,r,s,c){var a,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=a):i&&(a=c?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(l.functional){l._injectStyles=a;var d=l.render;l.render=function(e,t){return a.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,a):[a]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:a.DefaultWidget},data:()=>({imageUrl:""}),async mounted(){if(document.URL.includes("live.bilibili.com")){const e=".header-info-ctnr .room-cover, .header-info-ctnr .avatar",t=await(0,s.select)(e);if(!t)return;const o=t.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(o&&o[1]){const e=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${o[1]}`,t=await(0,i.getJson)(e);this.imageUrl=t.data.cover.replace("http:","https:")}}else(0,r.videoChange)((async()=>{const{aid:e}=unsafeWindow,t=new l.VideoInfo(e);try{await t.fetchInfo()}catch(e){throw(0,c.logError)(e),e}this.imageUrl=t.coverUrl.replace("http:","https:")}))},methods:{async viewCover(){(0,a.showImage)(this.imageUrl)}}}),n,[],!1,null,null,null);d.options.__file="registry/lib/components/utils/view-cover/ViewCover.vue";var u=d.exports}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){o.d(n,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"viewCover",displayName:"查看封面",tags:[componentsTags.utils,componentsTags.video],entry:none,reload:none,unload:none,widget:{component:()=>Promise.resolve().then(o.bind(o,761)).then((e=>e.default))},description:{"zh-CN":"在视频页面中, 可从功能面板中查看封面."},urlInclude:[...e.videoAndBangumiUrls],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),n=n.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/view-cover"]=t():e["utils/view-cover"]=t()}(self,(function(){return function(){"use strict";var e={761:function(e,t,o){o.r(t),o.d(t,{default:function(){return u}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("DefaultWidget",{staticClass:"view-cover",attrs:{disabled:!e.imageUrl,name:"查看封面",icon:"mdi-image-outline"},on:{click:function(t){return e.viewCover()}}})};n._withStripped=!0;var i=coreApis.ajax,r=coreApis.observer,s=coreApis.spinQuery,a=coreApis.utils.log,c=coreApis.ui,l=coreApis.componentApis.video.videoInfo;var d=function(e,t,o,n,i,r,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):i&&(c=a?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:c.DefaultWidget},data:()=>({imageUrl:""}),async mounted(){if(document.URL.includes("live.bilibili.com")){const e=".header-info-ctnr .room-cover, .header-info-ctnr .avatar",t=await(0,s.select)(e);if(!t)return;const o=t.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(o&&o[1]){const e=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${o[1]}`,t=await(0,i.getJson)(e);this.imageUrl=t.data.cover.replace("http:","https:")}}else(0,r.videoChange)((async()=>{const{aid:e}=unsafeWindow,t=new l.VideoInfo(e);try{await t.fetchInfo()}catch(e){throw(0,a.logError)(e),e}this.imageUrl=t.coverUrl.replace("http:","https:")}))},methods:{async viewCover(){(0,c.showImage)(this.imageUrl)}}}),n,[],!1,null,null,null);d.options.__file="registry/lib/components/utils/view-cover/ViewCover.vue";var u=d.exports}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){o.d(n,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"viewCover",displayName:"查看封面",tags:[componentsTags.utils,componentsTags.video],entry:none,reload:none,unload:none,widget:{component:()=>Promise.resolve().then(o.bind(o,761)).then((e=>e.default))},description:{"zh-CN":"在视频页面中, 可从功能面板中查看封面."},urlInclude:[...e.videoAndBangumiUrls],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),n=n.component}()})); \ No newline at end of file diff --git a/registry/dist/components/utils/watchlater-redirect.js b/registry/dist/components/utils/watchlater-redirect.js index d9e85b7c9..f58851f38 100644 --- a/registry/dist/components/utils/watchlater-redirect.js +++ b/registry/dist/components/utils/watchlater-redirect.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/watchlater-redirect"]=t():e["utils/watchlater-redirect"]=t()}(self,(function(){return function(){"use strict";var e,t,o={539:function(e){e.exports=coreApis.componentApis.video.watchlater},156:function(e){e.exports=coreApis.observer},569:function(e){e.exports=coreApis.spinQuery}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},n.d(i,c),i},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){n.d(i,{component:function(){return e}});const e={name:"watchlaterRedirect",displayName:"稍后再看重定向",description:{"zh-CN":"将稍后再看的链接重定向为普通播放网址."},entry:async({settings:e})=>{if(e.options.page){const{select:e}=await Promise.resolve().then(n.t.bind(n,569,23)),{childList:t}=await Promise.resolve().then(n.t.bind(n,156,23)),{getWatchlaterList:o}=await Promise.resolve().then(n.t.bind(n,539,23)),r=await o(!0),i=await e(".watch-later-list .list-box > span");if(!i)return;const c=(e,t)=>{try{const o=r[t],{bvid:n,cid:i,pages:c}=o,a=c.find((e=>e.cid===i))?.page??1,s=a>1?`https://www.bilibili.com/video/${n}?p=${a}`:`https://www.bilibili.com/video/${n}`,l=e.querySelector(".av-pic");l.target="_blank",l.href=s;const f=e.querySelector(".av-about .t");f.target="_blank",f.href=s}catch(o){console.error(`[watchlater redirect] error at index ${t}`,e,o)}},a=()=>{i.querySelectorAll(".av-item").forEach(c)};t(i,(e=>{e.forEach((e=>{e.removedNodes.forEach((e=>{if(e instanceof HTMLElement&&!e.classList.contains("itemlist-move")){const t=parseInt(dq(e,".key").textContent)-1;console.log("remove index",t),r.splice(t,1)}}))})),a()}))}},options:{page:{displayName:"重定向页面",defaultValue:!0},navbar:{displayName:"重定向顶栏",defaultValue:!0}},urlInclude:["https://www.bilibili.com/watchlater/#/list"],tags:[componentsTags.utils,componentsTags.video],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/watchlater-redirect"]=t():e["utils/watchlater-redirect"]=t()}(self,(function(){return function(){"use strict";var e,t,o={539:function(e){e.exports=coreApis.componentApis.video.watchlater},156:function(e){e.exports=coreApis.observer},569:function(e){e.exports=coreApis.spinQuery}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},n.d(i,c),i},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){n.d(i,{component:function(){return e}});const e={name:"watchlaterRedirect",displayName:"稍后再看重定向",description:{"zh-CN":"将稍后再看的链接重定向为普通播放网址."},entry:async({settings:e})=>{if(e.options.page){const{select:e}=await Promise.resolve().then(n.t.bind(n,569,23)),{childList:t}=await Promise.resolve().then(n.t.bind(n,156,23)),{getWatchlaterList:o}=await Promise.resolve().then(n.t.bind(n,539,23)),r=await o(!0),i=await e(".watch-later-list .list-box > span");if(!i)return;const c=(e,t)=>{try{const o=r[t],{bvid:n,cid:i,pages:c}=o,a=c.find((e=>e.cid===i))?.page??1,s=a>1?`https://www.bilibili.com/video/${n}?p=${a}`:`https://www.bilibili.com/video/${n}`,l=e.querySelector(".av-pic");l.target="_blank",l.href=s;const f=e.querySelector(".av-about .t");f.target="_blank",f.href=s}catch(o){console.error(`[watchlater redirect] error at index ${t}`,e,o)}},a=()=>{i.querySelectorAll(".av-item").forEach(c)};t(i,(e=>{e.forEach((e=>{e.removedNodes.forEach((e=>{if(e instanceof HTMLElement&&!e.classList.contains("itemlist-move")){const t=parseInt(dq(e,".key").textContent)-1;console.log("remove index",t),r.splice(t,1)}}))})),a()}))}},options:{page:{displayName:"重定向页面",defaultValue:!0},navbar:{displayName:"重定向顶栏",defaultValue:!0}},urlInclude:["https://www.bilibili.com/watchlater/#/list"],tags:[componentsTags.utils,componentsTags.video],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/biliplus-redirect.js b/registry/dist/components/video/biliplus-redirect.js index a9562de30..0078eb1a2 100644 --- a/registry/dist/components/video/biliplus-redirect.js +++ b/registry/dist/components/video/biliplus-redirect.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/biliplus-redirect"]=t():e["video/biliplus-redirect"]=t()}(self,(function(){return function(){"use strict";var e={592:function(e,t,o){o.r(t),o.d(t,{default:function(){return a}});var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("a",{attrs:{href:e.url,target:"_blank",tabindex:"-1"}},[o("DefaultWidget",{attrs:{name:"转到BiliPlus",icon:"biliplus",disabled:!e.url}})],1)};i._withStripped=!0;var n=coreApis.observer,r=coreApis.ui;const c=/\/(video|medialist\/play)\/([^\/]+\/)?(av[\d]+|BV.+)/i,s=[{condition:()=>"space.bilibili.com"===window.location.host,getUrl:e=>document.URL.replace("space.bilibili.com/",`${e}/space/`)},{condition:()=>"space.bilibili.com"===window.location.host,getUrl:e=>document.URL.replace("space.bilibili.com/",`${e}/space/`)},{condition:()=>document.URL.includes("/bangumi/play"),getUrl:(e,t)=>((0,n.videoChange)((()=>{const o=unsafeWindow.aid||document.querySelector(".av-link,.info-sec-av").innerText.replace(/[aAvV]/g,""),i=`https://${e}/video/av${o}/`;document.URL!==i?t(i):t("")})),`https://${e}${window.location.pathname}${window.location.search}`)},{condition:()=>c.test(document.URL),getUrl:e=>`https://${e}/video/${document.URL.match(c)[3]}/`}];var l=function(e,t,o,i,n,r,c,s){var l,a="function"==typeof e?e.options:e;if(t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),i&&(a.functional=!0),r&&(a._scopeId="data-v-"+r),c?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(c)},a._ssrRegister=l):n&&(l=s?function(){n.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(a.functional){a._injectStyles=l;var d=a.render;a.render=function(e,t){return l.call(t),d(e,t)}}else{var u=a.beforeCreate;a.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:a}}(Vue.extend({components:{DefaultWidget:r.DefaultWidget},data:()=>({url:""}),created(){const e="www.biliplus.com",t=e=>this.url=e,o=s.find((e=>e.condition()));o?t(o.getUrl(e,t)):(0,n.videoChange)((()=>{this.url=document.URL.replace(window.location.host,e)}))}}),i,[],!1,null,null,null);l.options.__file="registry/lib/components/video/biliplus-redirect/BiliplusRedirect.vue";var a=l.exports}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,o),r.exports}o.d=function(e,t){for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){o.d(i,{component:function(){return e}});const e={name:"biliplusRedirect",displayName:"BiliPlus 跳转支持",description:{"zh-CN":"在视频 / 番剧 / 空间中, 可以从功能中的按钮点击转到 BiliPlus 上对应的页面."},urlInclude:[...coreApis.utils.urls.videoAndBangumiUrls,"//space.bilibili.com"],entry:none,tags:[componentsTags.video,componentsTags.utils],widget:{component:()=>Promise.resolve().then(o.bind(o,592)).then((e=>e.default))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/biliplus-redirect"]=t():e["video/biliplus-redirect"]=t()}(self,(function(){return function(){"use strict";var e={592:function(e,t,o){o.r(t),o.d(t,{default:function(){return a}});var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("a",{attrs:{href:e.url,target:"_blank",tabindex:"-1"}},[o("DefaultWidget",{attrs:{name:"转到BiliPlus",icon:"biliplus",disabled:!e.url}})],1)};i._withStripped=!0;var n=coreApis.observer,r=coreApis.ui;const c=/\/(video|medialist\/play)\/([^\/]+\/)?(av[\d]+|BV.+)/i,s=[{condition:()=>"space.bilibili.com"===window.location.host,getUrl:e=>document.URL.replace("space.bilibili.com/",`${e}/space/`)},{condition:()=>"space.bilibili.com"===window.location.host,getUrl:e=>document.URL.replace("space.bilibili.com/",`${e}/space/`)},{condition:()=>document.URL.includes("/bangumi/play"),getUrl:(e,t)=>((0,n.videoChange)((()=>{const o=unsafeWindow.aid||document.querySelector(".av-link,.info-sec-av").innerText.replace(/[aAvV]/g,""),i=`https://${e}/video/av${o}/`;document.URL!==i?t(i):t("")})),`https://${e}${window.location.pathname}${window.location.search}`)},{condition:()=>c.test(document.URL),getUrl:e=>`https://${e}/video/${document.URL.match(c)[3]}/`}];var l=function(e,t,o,i,n,r,c,s){var l,a="function"==typeof e?e.options:e;if(t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),i&&(a.functional=!0),r&&(a._scopeId="data-v-"+r),c?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(c)},a._ssrRegister=l):n&&(l=s?function(){n.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(a.functional){a._injectStyles=l;var d=a.render;a.render=function(e,t){return l.call(t),d(e,t)}}else{var u=a.beforeCreate;a.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:a}}(Vue.extend({components:{DefaultWidget:r.DefaultWidget},data:()=>({url:""}),created(){const e="www.biliplus.com",t=e=>this.url=e,o=s.find((e=>e.condition()));o?t(o.getUrl(e,t)):(0,n.videoChange)((()=>{this.url=document.URL.replace(window.location.host,e)}))}}),i,[],!1,null,null,null);l.options.__file="registry/lib/components/video/biliplus-redirect/BiliplusRedirect.vue";var a=l.exports}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,o),r.exports}o.d=function(e,t){for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){o.d(i,{component:function(){return e}});const e={name:"biliplusRedirect",displayName:"BiliPlus 跳转支持",description:{"zh-CN":"在视频 / 番剧 / 空间中, 可以从功能中的按钮点击转到 BiliPlus 上对应的页面."},urlInclude:[...coreApis.utils.urls.videoAndBangumiUrls,"//space.bilibili.com"],entry:none,tags:[componentsTags.video,componentsTags.utils],widget:{component:()=>Promise.resolve().then(o.bind(o,592)).then((e=>e.default))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/bvid-convert.js b/registry/dist/components/video/bvid-convert.js index a7bed81d9..f5ce2968b 100644 --- a/registry/dist/components/video/bvid-convert.js +++ b/registry/dist/components/video/bvid-convert.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var o={};if(i)for(var r=0;r({aid:"",aidCopyed:!1,bvid:"",bvidCopyed:!1}),async mounted(){(0,o.videoChange)((async()=>{this.aid=`av${unsafeWindow.aid}`,this.bvid=unsafeWindow.bvid;const e=await(0,r.select)(".av-link,.bv-link,.bvid-link");e&&(this.bvid=e.innerHTML.trim())}))},methods:{async copyLink(e){if(this[`${e}Copyed`])return;const n=window.location.search,t=document.URL.replace(n,"").replace(/\/[^\/]+$/,`/${this[e]}`)+n;await navigator.clipboard.writeText(t),this[`${e}Copyed`]=!0,setTimeout((()=>this[`${e}Copyed`]=!1),1e3)}}}),s=t(379),d=t.n(s),u=t(309),l=t.n(u),f={insert:"head",singleton:!1};d()(l(),f),l().locals;var v=function(e,n,t,i,o,r,c,a){var s,d="function"==typeof e?e.options:e;if(n&&(d.render=n,d.staticRenderFns=t,d._compiled=!0),i&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),c?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(c)},d._ssrRegister=s):o&&(s=a?function(){o.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(d.functional){d._injectStyles=s;var u=d.render;d.render=function(e,n){return s.call(n),u(e,n)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,s):[s]}return{exports:e,options:d}}(a,i,[],!1,null,null,null);v.options.__file="registry/lib/components/video/bvid-convert/BvidConvert.vue";var p=v.exports},569:function(e){"use strict";e.exports=coreApis.spinQuery}},n={};function t(i){var o=n[i];if(void 0!==o)return o.exports;var r=n[i]={id:i,exports:{}};return e[i](r,r.exports,t),r.exports}t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";t.d(i,{component:function(){return o}});var e=t(569),n=coreApis.utils.urls;const o={name:"bvidConvert",displayName:"BV 号转换",entry:none,description:{"zh-CN":"在功能面板中显示视频的 AV 号和 BV 号."},tags:[componentsTags.video,componentsTags.utils],widget:{component:()=>Promise.resolve().then(t.bind(t,238)).then((e=>e.default)),condition:e.hasVideo},urlInclude:n.videoAndBangumiUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),c=[];function a(e){for(var n=-1,t=0;t({aid:"",aidCopyed:!1,bvid:"",bvidCopyed:!1}),async mounted(){(0,o.videoChange)((async()=>{this.aid=`av${unsafeWindow.aid}`,this.bvid=unsafeWindow.bvid;const e=await(0,r.select)(".av-link,.bv-link,.bvid-link");e&&(this.bvid=e.innerHTML.trim())}))},methods:{async copyLink(e){if(this[`${e}Copyed`])return;const n=window.location.search,t=document.URL.replace(n,"").replace(/\/[^\/]+$/,`/${this[e]}`)+n;await navigator.clipboard.writeText(t),this[`${e}Copyed`]=!0,setTimeout((()=>this[`${e}Copyed`]=!1),1e3)}}}),s=t(379),d=t.n(s),u=t(309),l=t.n(u),f={insert:"head",singleton:!1};d()(l(),f),l().locals;var v=function(e,n,t,i,o,r,c,a){var s,d="function"==typeof e?e.options:e;if(n&&(d.render=n,d.staticRenderFns=t,d._compiled=!0),i&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),c?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(c)},d._ssrRegister=s):o&&(s=a?function(){o.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(d.functional){d._injectStyles=s;var u=d.render;d.render=function(e,n){return s.call(n),u(e,n)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,s):[s]}return{exports:e,options:d}}(a,i,[],!1,null,null,null);v.options.__file="registry/lib/components/video/bvid-convert/BvidConvert.vue";var p=v.exports},569:function(e){"use strict";e.exports=coreApis.spinQuery}},n={};function t(i){var o=n[i];if(void 0!==o)return o.exports;var r=n[i]={id:i,exports:{}};return e[i](r,r.exports,t),r.exports}t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";t.d(i,{component:function(){return o}});var e=t(569),n=coreApis.utils.urls;const o={name:"bvidConvert",displayName:"BV 号转换",entry:none,description:{"zh-CN":"在功能面板中显示视频的 AV 号和 BV 号."},tags:[componentsTags.video,componentsTags.utils],widget:{component:()=>Promise.resolve().then(t.bind(t,238)).then((e=>e.default)),condition:e.hasVideo},urlInclude:n.videoAndBangumiUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/danmaku/airborne.js b/registry/dist/components/video/danmaku/airborne.js index 022d9c43a..ab189e85c 100644 --- a/registry/dist/components/video/danmaku/airborne.js +++ b/registry/dist/components/video/danmaku/airborne.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,665,23))),(async({settings:e})=>{const{enabled:r}=e,i=e=>{if(!e)return NaN;const t=e.match(/(\d+)[ ]*[::时分][ ]*(\d+)([ ]*[::分][ ]*(\d+))?/);if(!t)return NaN;if(t[3]){const[,n,o,,r]=t.map((e=>parseInt(e)));return[n,o,r].some((e=>Number.isNaN(e)))||e.includes("分")&&!e.includes("时")?NaN:3600*n+60*o+r}const[,n,o]=t.map((e=>parseInt(e)));return[n,o].some((e=>Number.isNaN(e)))?NaN:60*n+o},a=e=>{if(!r)return;const t=e.target;if(!t.classList.contains("b-danmaku"))return;const n=i(t.textContent);Number.isNaN(n)||unsafeWindow.player.seek(n,!1)};(0,n.forEachVideoDanmaku)({added:e=>{const t=!Number.isNaN(i(e.text));e.element.classList.toggle("airborne",t)}}),(0,o.videoChange)((async()=>{const e=await t.playerAgent.query.video.wrap();e.classList.contains("airborne-enabled")||(e.classList.add("airborne-enabled"),e.addEventListener("click",a))}))})),commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;cPromise.resolve().then(r.t.bind(r,665,23))),(async({settings:e})=>{const{enabled:r}=e,i=e=>{if(!e)return NaN;const t=e.match(/(\d+)[ ]*[::时分][ ]*(\d+)([ ]*[::分][ ]*(\d+))?/);if(!t)return NaN;if(t[3]){const[,n,o,,r]=t.map((e=>parseInt(e)));return[n,o,r].some((e=>Number.isNaN(e)))||e.includes("分")&&!e.includes("时")?NaN:3600*n+60*o+r}const[,n,o]=t.map((e=>parseInt(e)));return[n,o].some((e=>Number.isNaN(e)))?NaN:60*n+o},a=e=>{if(!r)return;const t=e.target;if(!t.classList.contains("b-danmaku"))return;const n=i(t.textContent);Number.isNaN(n)||unsafeWindow.player.seek(n,!1)};(0,n.forEachVideoDanmaku)({added:e=>{const t=!Number.isNaN(i(e.text));e.element.classList.toggle("airborne",t)}}),(0,o.videoChange)((async()=>{const e=await t.playerAgent.query.video.wrap();e.classList.contains("airborne-enabled")||(e.classList.add("airborne-enabled"),e.addEventListener("click",a))}))})),commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/danmaku/download.js b/registry/dist/components/video/danmaku/download.js index 351d6b04b..30351b23b 100644 --- a/registry/dist/components/video/danmaku/download.js +++ b/registry/dist/components/video/danmaku/download.js @@ -9,4 +9,4 @@ t=[[null,t,""]]);var o={};if(n)for(var r=0;r{t.danmaku=''}));var d=Vue.extend({components:{DefaultWidget:l.DefaultWidget},data:()=>({disabled:!1}),methods:{async download(t){try{this.disabled=!0;const e=(0,a.getFriendlyTitle)(),i=await(0,c.getBlobByType)(t);await o.DownloadPackage.single(`${e}.${t}`,i)}catch(t){(0,r.logError)(t)}finally{this.disabled=!1}}}}),u=(0,i(900).Z)(d,n,[],!1,null,null,null);u.options.__file="registry/lib/components/video/danmaku/download/DownloadDanmaku.vue";var p=u.exports},257:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return m}});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"download-danmaku-config download-video-config-section"},[i("div",{staticClass:"download-video-config-item"},[i("div",{staticClass:"download-video-config-title"},[t._v("\n 弹幕:\n ")]),t._v(" "),i("VDropdown",{attrs:{items:t.items},scopedSlots:t._u([{key:"item",fn:function(e){var i=e.item;return[t._v("\n "+t._s(i)+"\n ")]}}]),model:{value:t.type,callback:function(e){t.type=e},expression:"type"}})],1)])};n._withStripped=!0;var o=coreApis.settings,r=i(643);const a=(0,o.getComponentSettings)("downloadVideo").options;var s=Vue.extend({components:{VDropdown:r.VDropdown},data:()=>({type:a.danmakuType??"无",items:["无","ass","json","xml"]}),computed:{enabled(){return"无"!==this.type}},watch:{type(t){a.danmakuType=t}}}),l=i(379),c=i.n(l),d=i(616),u=i.n(d),p={insert:"head",singleton:!1},h=(c()(u(),p),u().locals,(0,i(900).Z)(s,n,[],!1,null,null,null));h.options.__file="registry/lib/components/video/danmaku/download/Plugin.vue";var m=h.exports},900:function(t,e,i){"use strict";function n(t,e,i,n,o,r,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}i.d(e,{Z:function(){return n}})},643:function(t){"use strict";t.exports=coreApis.ui},729:function(t){"use strict";t.exports=coreApis.utils.log},129:function(t){"use strict";t.exports=coreApis.utils.title}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){"use strict";i.d(n,{component:function(){return r}});var t=coreApis.spinQuery,e=coreApis.toast,o=coreApis.utils.urls;const r={name:"downloadDanmaku",displayName:"下载弹幕",description:{"zh-CN":"启用下载弹幕支持, 在视频和番剧页面中可从功能面板里下载弹幕. 请注意 ASS 弹幕下载不会包含高级弹幕, 字幕弹幕等."},tags:[componentsTags.video],entry:none,reload:none,unload:none,plugin:{displayName:"下载视频 - 下载弹幕支持",setup:({addData:t})=>{t("downloadVideo.assets",(async t=>{const{getBlobByType:n}=await Promise.resolve().then(i.bind(i,948));t.push({name:"downloadDanmaku",displayName:"下载弹幕",getAssets:async(t,i)=>{const{type:o,enabled:r}=i;if(!r)return[];const a=e.Toast.info("获取弹幕中...","下载弹幕");let s=0;const l=await Promise.allSettled(t.map((async e=>{const i=await n(o,e.input);return s++,a.message=`获取弹幕中... (${s}/${t.length})`,{name:`${e.input.title}.${o}`,data:i}}))),c=l.filter((t=>"fulfilled"===t.status)),d=l.filter((t=>"rejected"===t.status));return a.message=`获取完成. 成功 ${c.length} 个, 失败 ${d.length} 个.`,c.map((t=>t.value))},component:()=>Promise.resolve().then(i.bind(i,257)).then((t=>t.default))})}))}},urlInclude:o.videoAndBangumiUrls,widget:{condition:t.hasVideo,component:()=>Promise.resolve().then(i.bind(i,982)).then((t=>t.default))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),n=n.component}()})); \ No newline at end of file +n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),a=[];function s(t){for(var e=-1,i=0;i{t.danmaku=''}));var d=Vue.extend({components:{DefaultWidget:l.DefaultWidget},data:()=>({disabled:!1}),methods:{async download(t){try{this.disabled=!0;const e=(0,a.getFriendlyTitle)(),i=await(0,c.getBlobByType)(t);await o.DownloadPackage.single(`${e}.${t}`,i)}catch(t){(0,r.logError)(t)}finally{this.disabled=!1}}}}),u=(0,i(900).Z)(d,n,[],!1,null,null,null);u.options.__file="registry/lib/components/video/danmaku/download/DownloadDanmaku.vue";var p=u.exports},257:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return m}});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"download-danmaku-config download-video-config-section"},[i("div",{staticClass:"download-video-config-item"},[i("div",{staticClass:"download-video-config-title"},[t._v("\n 弹幕:\n ")]),t._v(" "),i("VDropdown",{attrs:{items:t.items},scopedSlots:t._u([{key:"item",fn:function(e){var i=e.item;return[t._v("\n "+t._s(i)+"\n ")]}}]),model:{value:t.type,callback:function(e){t.type=e},expression:"type"}})],1)])};n._withStripped=!0;var o=coreApis.settings,r=i(643);const a=(0,o.getComponentSettings)("downloadVideo").options;var s=Vue.extend({components:{VDropdown:r.VDropdown},data:()=>({type:a.danmakuType??"无",items:["无","ass","json","xml"]}),computed:{enabled(){return"无"!==this.type}},watch:{type(t){a.danmakuType=t}}}),l=i(379),c=i.n(l),d=i(616),u=i.n(d),p={insert:"head",singleton:!1},h=(c()(u(),p),u().locals,(0,i(900).Z)(s,n,[],!1,null,null,null));h.options.__file="registry/lib/components/video/danmaku/download/Plugin.vue";var m=h.exports},900:function(t,e,i){"use strict";function n(t,e,i,n,o,r,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}i.d(e,{Z:function(){return n}})},643:function(t){"use strict";t.exports=coreApis.ui},729:function(t){"use strict";t.exports=coreApis.utils.log},129:function(t){"use strict";t.exports=coreApis.utils.title}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){"use strict";i.d(n,{component:function(){return r}});var t=coreApis.spinQuery,e=coreApis.toast,o=coreApis.utils.urls;const r={name:"downloadDanmaku",displayName:"下载弹幕",description:{"zh-CN":"启用下载弹幕支持, 在视频和番剧页面中可从功能面板里下载弹幕. 请注意 ASS 弹幕下载不会包含高级弹幕, 字幕弹幕等."},tags:[componentsTags.video],entry:none,reload:none,unload:none,plugin:{displayName:"下载视频 - 下载弹幕支持",setup:({addData:t})=>{t("downloadVideo.assets",(async t=>{const{getBlobByType:n}=await Promise.resolve().then(i.bind(i,948));t.push({name:"downloadDanmaku",displayName:"下载弹幕",getAssets:async(t,i)=>{const{type:o,enabled:r}=i;if(!r)return[];const a=e.Toast.info("获取弹幕中...","下载弹幕");let s=0;const l=await Promise.allSettled(t.map((async e=>{const i=await n(o,e.input);return s++,a.message=`获取弹幕中... (${s}/${t.length})`,{name:`${e.input.title}.${o}`,data:i}}))),c=l.filter((t=>"fulfilled"===t.status)),d=l.filter((t=>"rejected"===t.status));return a.message=`获取完成. 成功 ${c.length} 个, 失败 ${d.length} 个.`,c.map((t=>t.value))},component:()=>Promise.resolve().then(i.bind(i,257)).then((t=>t.default))})}))}},urlInclude:o.videoAndBangumiUrls,widget:{condition:t.hasVideo,component:()=>Promise.resolve().then(i.bind(i,982)).then((t=>t.default))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),n=n.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/danmaku/expand.js b/registry/dist/components/video/danmaku/expand.js index 3c74b7a95..611155cac 100644 --- a/registry/dist/components/video/danmaku/expand.js +++ b/registry/dist/components/video/danmaku/expand.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/danmaku/expand"]=t():e["video/danmaku/expand"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return a}});var o=coreApis.observer,n=coreApis.spinQuery,i=coreApis.utils,s=coreApis.utils.urls;const a={name:"expandDanmakuList",displayName:"展开弹幕列表",entry:async({settings:{options:e}})=>{(0,o.videoChange)((async()=>{if(s.mediaListUrls.some((e=>(0,i.matchUrlPattern)(e)))&&e.ignoreMediaList)return;const t=await(0,n.select)(".bui-collapse-wrap");if(t&&t.classList.contains("bui-collapse-wrap-folded")){(await(0,n.select)(".bui-collapse-header"))?.click()}}))},tags:[componentsTags.video],description:{"zh-CN":"每次加载视频时自动展开弹幕列表."},options:{ignoreMediaList:{defaultValue:!0,displayName:"合集类页面不自动展开"}},urlInclude:[...s.videoAndBangumiUrls,...s.mediaListUrls],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return t=t.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/danmaku/expand"]=t():e["video/danmaku/expand"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return s}});var o=coreApis.observer,n=coreApis.spinQuery,i=coreApis.utils,a=coreApis.utils.urls;const s={name:"expandDanmakuList",displayName:"展开弹幕列表",entry:async({settings:{options:e}})=>{(0,o.videoChange)((async()=>{if(a.mediaListUrls.some((e=>(0,i.matchUrlPattern)(e)))&&e.ignoreMediaList)return;const t=await(0,n.select)(".bui-collapse-wrap");if(t&&t.classList.contains("bui-collapse-wrap-folded")){(await(0,n.select)(".bui-collapse-header"))?.click()}}))},tags:[componentsTags.video],description:{"zh-CN":"每次加载视频时自动展开弹幕列表."},options:{ignoreMediaList:{defaultValue:!0,displayName:"合集类页面不自动展开"}},urlInclude:[...a.videoAndBangumiUrls,...a.mediaListUrls],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return t=t.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/download.js b/registry/dist/components/video/download.js index 65c62a914..5c1360cac 100644 --- a/registry/dist/components/video/download.js +++ b/registry/dist/components/video/download.js @@ -11,4 +11,4 @@ var a=this[s][0];null!=a&&(o[a]=!0)}for(var d=0;d({episodeItems:[],maxCheckedItems:32,lastCheckedEpisodeIndex:-1}),computed:{checkedRatio(){return`(${this.episodeItems.filter((e=>e.isChecked)).length}/${this.episodeItems.length})`},inputItems(){return this.episodeItems.map((e=>e.inputItem))},checkedInputItems(){return this.episodeItems.filter((e=>e.isChecked)).map((e=>e.inputItem))}},created(){this.getEpisodeItems()},methods:{shiftSelect(e,t,n){e.shiftKey&&-1!==this.lastCheckedEpisodeIndex?e.shiftKey&&-1!==this.lastCheckedEpisodeIndex&&(this.episodeItems.slice(Math.min(this.lastCheckedEpisodeIndex,n)+1,Math.max(this.lastCheckedEpisodeIndex,n)).forEach((e=>{e.isChecked=!e.isChecked})),this.lastCheckedEpisodeIndex=n,e.preventDefault()):this.lastCheckedEpisodeIndex=n},forEachItem(e){this.episodeItems.forEach(e)},async getEpisodeItems(){this.episodeItems.length>0||(this.episodeItems=await this.api(this))}}}),g=n(379),w=n.n(g),y=n(977),b=n.n(y),x={insert:"head",singleton:!1},_=(w()(b(),x),b().locals,n(900)),I=(0,_.Z)(v,m,[],!1,null,null,null);I.options.__file="registry/lib/components/video/download/inputs/EpisodesPicker.vue";var k=I.exports;const C=e=>Vue.extend({computed:{checkedInputItems(){return this.$refs.picker.checkedInputItems}},render:t=>t(k,{props:{api:e},ref:"picker"})}),V={name:"bangumi.batch",displayName:"当前番剧 (多P)",match:h.bangumiUrls,getInputs:async e=>e?.checkedInputItems??[],component:async()=>C((async e=>{const t=document.querySelector("meta[property='og:url']");if(null===t)return(0,a.logError)("获取番剧数据失败: 无法找到 Season ID"),[];const n=t.getAttribute("content")?.match(/play\/ss(\d+)/)?.[1];if(void 0===n)return(0,a.logError)("获取番剧数据失败: 无法解析 Season ID"),[];const i=await(0,p.getJson)(`https://api.bilibili.com/pgc/web/season/section?season_id=${n}`);if(0!==i.code)return(0,a.logError)(`获取番剧数据失败: 无法获取番剧集数列表, message=${i.message}`),[];const s=i.result.main_section.episodes;return s.map(((t,n)=>{const i=t.long_title?t.title:(n+1).toString(),a=t.long_title?t.long_title:t.title;return{key:t.cid,title:`${i} - ${a}`,isChecked:ne?.checkedInputItems??[],component:async()=>C((async e=>{const{aid:t}=unsafeWindow,n=`https://api.bilibili.com/x/web-interface/view?aid=${t}`,i=await(0,p.getJson)(n);if(0!==i.code)return(0,a.logError)(`获取视频选集列表失败, message = ${i.message}`),[];const{pages:s}=i.data;return void 0===s?((0,a.logError)("获取视频选集列表失败, 没有找到选集信息."),[]):s.map(((n,i)=>({key:n.cid,title:`P${n.page} ${n.part}`,isChecked:i[{aid:unsafeWindow.aid,cid:unsafeWindow.cid,title:(0,f.getFriendlyTitle)(!0)}],component:()=>Promise.resolve().then(n.bind(n,919)).then((e=>e.default))};var D=coreApis.utils.sort;const S=(e,t)=>{e.quality&&t.currentQuality.value!==e.quality.value&&(e.allowQualityDrop?console.warn(`'${e.title}' 不支持选择的清晰度${e.quality.displayName}, 已降级为${t.currentQuality.displayName}`):(e=>{if(c.vipRequiredQualities.find((t=>t.value===e)))throw new Error("您选择的清晰度需要大会员, 请更改清晰度后重试.");if(c.loginRequiredQualities.find((t=>t.value===e)))throw new Error("您选择的清晰度需要先登录.");throw new Error("获取下载链接失败, 请尝试更换清晰度或更换格式.")})(e.quality.value))};var $=coreApis.download;function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class q{constructor(e){O(this,"input",void 0),O(this,"fragments",void 0),O(this,"qualities",void 0),O(this,"currentQuality",void 0),O(this,"jsonData",void 0),Object.assign(this,e)}get totalSize(){return lodash.sumBy(this.fragments,(e=>e.size))}get totalLength(){return lodash.sumBy(this.fragments,(e=>e.length))}get titledFragments(){return this.fragments.map(((e,t)=>{const n=this.fragments.filter((t=>t.extension===e.extension)).length>1?` - ${(0,d.formatNumber)(t+1,this.fragments.length)}`:"";return{...e,title:`${this.input.title}${n}${e.extension}`}}))}}class Q{constructor(e){this.infos=e,O(this,"inputs",[]),O(this,"extraAssets",[]),this.inputs=e.map((e=>e.input))}get isSingleVideo(){return this.inputs.length<2}async downloadExtraAssets(){console.log("[downloadExtraAssets]",this.extraAssets);const e=`${(0,f.getFriendlyTitle)(!1)}.zip`;await new $.DownloadPackage(this.extraAssets).emit(e)}} /* spell-checker: disable */ -const T={video:".mp4",audio:".m4a"},U=e=>({url:e.downloadUrl,backupUrls:e.backupUrls,length:e.duration,size:Math.trunc(e.bandWidth*e.duration/8),extension:T[e.type]??".m4s"}),j=async(e,t)=>{const{codec:n="AVC/H.264",filters:i}=t,o={video:()=>!0,audio:()=>!0,...i},{aid:a,cid:d,quality:r}=e,l={avid:a,cid:d,qn:r?.value??"",otype:"json",fourk:1,fnver:0,fnval:2e3},u=`https://api.bilibili.com/x/player/playurl?${(0,s.formData)(l)}`,f=await(0,p.bilibiliApi)((0,p.getJsonWithCredentials)(u),"获取视频链接失败");if(!f.dash)throw new Error("此视频没有 dash 格式, 请改用其他格式.");const h=c.allQualities.find((e=>e.value===f.quality)),{duration:m,video:v,audio:g,dolby:w}=f.dash,y=v.filter((e=>e.id===h.value)).map((e=>{const t=(()=>{switch(e.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();return{type:"video",quality:h,width:e.width,height:e.height,codecs:e.codecs,codecId:e.codecid,bandWidth:e.bandwidth,frameRate:e.frameRate,backupUrls:(e.backupUrl||e.backup_url||[]).map((e=>e.replace("http:","https:"))),downloadUrl:(e.baseUrl||e.base_url||"").replace("http:","https:"),duration:m,videoCodec:t}})).filter((e=>o.video(e))),b=(g||[]).map((e=>({type:"audio",bandWidth:e.bandwidth,codecs:e.codecs,codecId:e.codecid,backupUrls:(e.backupUrl||e.backup_url||[]).map((e=>e.replace("http:","https:"))),downloadUrl:(e.baseUrl||e.base_url||"").replace("http:","https:"),duration:m}))).filter((e=>o.audio(e)));w&&b.push(...w.audio?.map((e=>({type:"audio",bandWidth:e.bandwidth,codecs:e.codecs,codecId:-1,backupUrls:[],downloadUrl:(e.baseUrl||e.base_url||"").replace("http:","https:"),duration:m})))??[]);const x=(e=>{const{videoDashes:t,audioDashes:n,videoCodec:i}=e,o=[];if(0!==t.length){const e=e=>e.videoCodec===i;if(t.some(e)){const n=t.filter(e).sort((0,D.ascendingSort)((e=>e.bandWidth)))[0];o.push(U(n))}else o.push(U(t.sort((0,D.ascendingSort)((e=>e.bandWidth)))[0]))}if(0!==n.length){const e=n.sort((0,D.descendingSort)((e=>e.bandWidth)))[0];o.push(U(e))}return o})({audioDashes:b,videoDashes:y,videoCodec:n}),_=f.accept_quality.map((e=>c.allQualities.find((t=>t.value===e)))).filter((e=>void 0!==e)),I=new q({input:e,jsonData:f,fragments:x,qualities:_,currentQuality:h});return S(e,I),I},P={name:"video.dash.avc",displayName:"dash (AVC/H.264)",description:"音画分离的 mp4 格式, 编码为 H.264, 兼容性较好. 下载后可以合并为单个 mp4 文件.",downloadVideoInfo:async e=>j(e,{codec:"AVC/H.264"})},N={name:"video.dash.hevc",displayName:"dash (HEVC/H.265)",description:"音画分离的 mp4 格式, 编码为 H.265, 体积较小, 兼容性较差. 下载后可以合并为单个 mp4 文件.",downloadVideoInfo:async e=>j(e,{codec:"HEVC/H.265"})},z={name:"video.dash.audio",displayName:"dash (仅音频)",description:"仅下载视频中的音频轨道.",downloadVideoInfo:async e=>j(e,{filters:{video:()=>!1}})},W=(e,t)=>{const n=e=>t.length>e?t[e]:t[t.length-1];return{fragments:e.durl.map(((e,t)=>({length:e.length,size:e.size,url:e.url,backupUrls:e.backup_url,extension:n(t)}))),qualities:e.accept_quality.map((e=>c.allQualities.find((t=>t.value===e)))).filter((e=>void 0!==e)),currentQuality:c.allQualities.find((t=>t.value===e.quality))}},B={name:"video.flv",displayName:"flv",description:"使用 flv 格式下载, 兼容 H.264 编码.",downloadVideoInfo:async e=>{const{aid:t,cid:n,quality:i}=e,o={avid:t,cid:n,qn:i?.value??"",otype:"json",fourk:1,fnver:0,fnval:0},a=`https://api.bilibili.com/x/player/playurl?${(0,s.formData)(o)}`,d=await(0,p.bilibiliApi)((0,p.getJsonWithCredentials)(a),"获取视频链接失败"),r=new q({input:e,jsonData:d,...W(d,[".flv"])});return S(e,r),r}},F={name:"consoleLogDemo",displayName:"Toast",description:"弹一条消息显示出下载链接, 右键新标签页打开就可以下载. 链接有 referer 限制, 复制无用, 且不能保留视频文件名.",runAction:async e=>{const t=e.infos.flatMap((e=>e.titledFragments)),n=t.map((e=>e.url)).join("\n");u.Toast.show(t.map((e=>`${e.title}`)).join("\n"),"下载视频"),console.log(n),console.log(e)}},[H]=(0,l.registerAndGetData)("downloadVideo.inputs",[E,A,V]),[M]=(0,l.registerAndGetData)("downloadVideo.apis",[B,P,N,z]),[R]=(0,l.registerAndGetData)("downloadVideo.assets",[]),[G]=(0,l.registerAndGetData)("downloadVideo.outputs",[F]),{basicConfig:L}=(0,o.getComponentSettings)("downloadVideo").options;var J=Vue.extend({components:{VPopup:r.VPopup,VButton:r.VButton,VDropdown:r.VDropdown,VIcon:r.VIcon},props:{triggerElement:{required:!0}},data(){const e=L.api,t=L.output;return{open:!1,busy:!1,testData:{videoInfo:null,multiple:!1},assets:R,qualities:[],selectedQuality:void 0,inputs:[],selectedInput:void 0,apis:M,selectedApi:M.find((t=>t.name===e))||M[0],outputs:G,selectedOutput:G.find((e=>e.name===t))||G[0]}},computed:{assetsWithOptions(){return this.assets.filter((e=>e.component))},filteredQualities(){return 0===this.qualities.length?c.allQualities:this.qualities},canStartDownload(){if(this.busy||!this.open)return!1;return!Object.entries(this).filter((([e])=>e.startsWith("selected"))).some((([,e])=>!e))}},watch:{selectedInput(e){void 0!==e&&this.updateTestVideoInfo()},selectedApi(e){void 0!==e&&(this.updateTestVideoInfo(),L.api=e.name)},selectedOutput(e){void 0!==e&&(L.output=e.name)}},mounted(){coreApis.observer.videoChange((()=>{const e=H.filter((e=>e.match?.some((e=>(0,s.matchUrlPattern)(e)))??!0));this.inputs=e,this.selectedInput=e[0]}))},methods:{formatFileSize:d.formatFileSize,saveSelectedQuality(){const e=this.selectedQuality;void 0!==e&&(L.quality=e.value,this.updateTestVideoInfo())},async getVideoItems(){const e=this.selectedInput;return await e.getInputs(this.$refs.inputOptions)},async updateTestVideoInfo(){if(!this.selectedInput)return;this.testData.videoInfo=null;const e=await this.getVideoItems();console.log("[updateTestVideoInfo]",e),this.testData.multiple=e.length>1;const t=this.selectedApi,[n]=e;if(!this.selectedQuality){const e=await t.downloadVideoInfo(n);if(this.qualities=e.qualities,this.selectedQuality=e.qualities[0],L.quality){const[t]=e.qualities.filter((e=>e.value<=L.quality));t&&(this.selectedQuality=t)}}try{n.quality=this.selectedQuality;const e=await t.downloadVideoInfo(n);this.testData.videoInfo=e}catch(e){this.testData.videoInfo=void 0}},async startDownload(e,t){try{this.busy=!0;const n=this.selectedInput,i=this.selectedApi,o=await n.getInputs(this.$refs.inputOptions);if(0===o.length)return void u.Toast.info("未接收到视频, 如果输入源支持批量, 请至少选择一个视频.","下载视频",3e3);o.forEach((e=>{e.quality=this.selectedQuality}));const s=await Promise.all(o.map((e=>i.downloadVideoInfo(e))));if(0===s.length||0===lodash.sumBy(s,(e=>e.fragments.length)))return void u.Toast.info("未接收到可下载数据, 请检查输入源和格式是否适用于当前视频.","下载视频",3e3);const a=new Q(s),d=(await Promise.all(R.map((e=>e.getAssets(s,this.$refs.assetsOptions.find((t=>t.$attrs.name===e.name))))))).flat();a.extraAssets.push(...d),await a.downloadExtraAssets(),await t.runAction(a,e)}catch(e){(0,a.logError)(e)}finally{this.busy=!1}}}}),Z=n(652),X=n.n(Z),Y={insert:"head",singleton:!1},K=(w()(X(),Y),X().locals,(0,_.Z)(J,i,[],!1,null,null,null));K.options.__file="registry/lib/components/video/download/DownloadVideo.vue";var ee=K.exports},962:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"multiple-widgets"},[n("DefaultWidget",{ref:"button",attrs:{name:"下载视频",icon:"mdi-download"},on:{mouseover:function(t){return e.createDownloadPanel()},click:function(t){return e.toggleDownloadPanel()}}})],1)};let o;i._withStripped=!0;var s=Vue.extend({components:{DefaultWidget:coreApis.ui.DefaultWidget},methods:{async createDownloadPanel(){if(!o){const e=document.createElement("div");document.body.appendChild(e);const t=await Promise.resolve().then(n.bind(n,442)).then((e=>e.default));o=new t({propsData:{triggerElement:this.$refs.button}}).$mount(e)}},async toggleDownloadPanel(){o&&(o.open=!o.open)}}}),a=(0,n(900).Z)(s,i,[],!1,null,null,null);a.options.__file="registry/lib/components/video/download/Widget.vue";var d=a.exports},919:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"single-video-info download-video-config-section"},[e.imageUrl?n("img",{staticClass:"shadow",attrs:{src:e.imageUrl}}):e._e(),e._v(" "),e.imageUrl?n("img",{attrs:{src:e.imageUrl}}):e._e()])};i._withStripped=!0;var o=coreApis.observer,s=n(729),a=coreApis.componentApis.video.videoInfo,d=Vue.extend({data:()=>({imageUrl:""}),created(){(0,o.videoChange)((async()=>{const{aid:e}=unsafeWindow,t=new a.VideoInfo(e);try{await t.fetchInfo()}catch(e){throw(0,s.logError)(e),e}this.imageUrl=t.coverUrl.replace("http:","https:")}))}}),r=n(379),l=n.n(r),c=n(614),u=n.n(c),p={insert:"head",singleton:!1},f=(l()(u(),p),u().locals,(0,n(900).Z)(d,i,[],!1,null,null,null));f.options.__file="registry/lib/components/video/download/inputs/video/SingleVideoInfo.vue";var h=f.exports},900:function(e,t,n){"use strict";function i(e,t,n,i,o,s,a,d){var r,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),a?(r=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=r):o&&(r=d?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),r)if(l.functional){l._injectStyles=r;var c=l.render;l.render=function(e,t){return r.call(t),c(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,r):[r]}return{exports:e,options:l}}n.d(t,{Z:function(){return i}})},729:function(e){"use strict";e.exports=coreApis.utils.log}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var s=t[i]={id:i,exports:{}};return e[i](s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";n.d(i,{component:function(){return t}});var e=coreApis.spinQuery;const t={name:"downloadVideo",displayName:"下载视频",description:"在功能面板中添加下载视频支持. 请注意不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.",entry:none,reload:none,unload:none,widget:{component:()=>Promise.resolve().then(n.bind(n,962)).then((e=>e.default)),condition:()=>(0,e.hasVideo)()},tags:[componentsTags.video],options:{basicConfig:{defaultValue:{},displayName:"基础配置",hidden:!0}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +const T={video:".mp4",audio:".m4a"},U=e=>({url:e.downloadUrl,backupUrls:e.backupUrls,length:e.duration,size:Math.trunc(e.bandWidth*e.duration/8),extension:T[e.type]??".m4s"}),j=async(e,t)=>{const{codec:n="AVC/H.264",filters:i}=t,o={video:()=>!0,audio:()=>!0,...i},{aid:a,cid:d,quality:r}=e,l={avid:a,cid:d,qn:r?.value??"",otype:"json",fourk:1,fnver:0,fnval:2e3},u=`https://api.bilibili.com/x/player/playurl?${(0,s.formData)(l)}`,f=await(0,p.bilibiliApi)((0,p.getJsonWithCredentials)(u),"获取视频链接失败");if(!f.dash)throw new Error("此视频没有 dash 格式, 请改用其他格式.");const h=c.allQualities.find((e=>e.value===f.quality)),{duration:m,video:v,audio:g,dolby:w}=f.dash,y=v.filter((e=>e.id===h.value)).map((e=>{const t=(()=>{switch(e.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();return{type:"video",quality:h,width:e.width,height:e.height,codecs:e.codecs,codecId:e.codecid,bandWidth:e.bandwidth,frameRate:e.frameRate,backupUrls:(e.backupUrl||e.backup_url||[]).map((e=>e.replace("http:","https:"))),downloadUrl:(e.baseUrl||e.base_url||"").replace("http:","https:"),duration:m,videoCodec:t}})).filter((e=>o.video(e))),b=(g||[]).map((e=>({type:"audio",bandWidth:e.bandwidth,codecs:e.codecs,codecId:e.codecid,backupUrls:(e.backupUrl||e.backup_url||[]).map((e=>e.replace("http:","https:"))),downloadUrl:(e.baseUrl||e.base_url||"").replace("http:","https:"),duration:m}))).filter((e=>o.audio(e)));w&&b.push(...w.audio?.map((e=>({type:"audio",bandWidth:e.bandwidth,codecs:e.codecs,codecId:-1,backupUrls:[],downloadUrl:(e.baseUrl||e.base_url||"").replace("http:","https:"),duration:m})))??[]);const x=(e=>{const{videoDashes:t,audioDashes:n,videoCodec:i}=e,o=[];if(0!==t.length){const e=e=>e.videoCodec===i;if(t.some(e)){const n=t.filter(e).sort((0,D.ascendingSort)((e=>e.bandWidth)))[0];o.push(U(n))}else o.push(U(t.sort((0,D.ascendingSort)((e=>e.bandWidth)))[0]))}if(0!==n.length){const e=n.sort((0,D.descendingSort)((e=>e.bandWidth)))[0];o.push(U(e))}return o})({audioDashes:b,videoDashes:y,videoCodec:n}),_=f.accept_quality.map((e=>c.allQualities.find((t=>t.value===e)))).filter((e=>void 0!==e)),I=new q({input:e,jsonData:f,fragments:x,qualities:_,currentQuality:h});return S(e,I),I},P={name:"video.dash.avc",displayName:"dash (AVC/H.264)",description:"音画分离的 mp4 格式, 编码为 H.264, 兼容性较好. 下载后可以合并为单个 mp4 文件.",downloadVideoInfo:async e=>j(e,{codec:"AVC/H.264"})},N={name:"video.dash.hevc",displayName:"dash (HEVC/H.265)",description:"音画分离的 mp4 格式, 编码为 H.265, 体积较小, 兼容性较差. 下载后可以合并为单个 mp4 文件.",downloadVideoInfo:async e=>j(e,{codec:"HEVC/H.265"})},z={name:"video.dash.audio",displayName:"dash (仅音频)",description:"仅下载视频中的音频轨道.",downloadVideoInfo:async e=>j(e,{filters:{video:()=>!1}})},W=(e,t)=>{const n=e=>t.length>e?t[e]:t[t.length-1];return{fragments:e.durl.map(((e,t)=>({length:e.length,size:e.size,url:e.url,backupUrls:e.backup_url,extension:n(t)}))),qualities:e.accept_quality.map((e=>c.allQualities.find((t=>t.value===e)))).filter((e=>void 0!==e)),currentQuality:c.allQualities.find((t=>t.value===e.quality))}},B={name:"video.flv",displayName:"flv",description:"使用 flv 格式下载, 兼容 H.264 编码.",downloadVideoInfo:async e=>{const{aid:t,cid:n,quality:i}=e,o={avid:t,cid:n,qn:i?.value??"",otype:"json",fourk:1,fnver:0,fnval:0},a=`https://api.bilibili.com/x/player/playurl?${(0,s.formData)(o)}`,d=await(0,p.bilibiliApi)((0,p.getJsonWithCredentials)(a),"获取视频链接失败"),r=new q({input:e,jsonData:d,...W(d,[".flv"])});return S(e,r),r}},F={name:"consoleLogDemo",displayName:"Toast",description:"弹一条消息显示出下载链接, 右键新标签页打开就可以下载. 链接有 referer 限制, 复制无用, 且不能保留视频文件名.",runAction:async e=>{const t=e.infos.flatMap((e=>e.titledFragments)),n=t.map((e=>e.url)).join("\n");u.Toast.show(t.map((e=>`${e.title}`)).join("\n"),"下载视频"),console.log(n),console.log(e)}},[H]=(0,l.registerAndGetData)("downloadVideo.inputs",[E,A,V]),[M]=(0,l.registerAndGetData)("downloadVideo.apis",[B,P,N,z]),[R]=(0,l.registerAndGetData)("downloadVideo.assets",[]),[G]=(0,l.registerAndGetData)("downloadVideo.outputs",[F]),{basicConfig:L}=(0,o.getComponentSettings)("downloadVideo").options;var J=Vue.extend({components:{VPopup:r.VPopup,VButton:r.VButton,VDropdown:r.VDropdown,VIcon:r.VIcon},props:{triggerElement:{required:!0}},data(){const e=L.api,t=L.output;return{open:!1,busy:!1,testData:{videoInfo:null,multiple:!1},assets:R,qualities:[],selectedQuality:void 0,inputs:[],selectedInput:void 0,apis:M,selectedApi:M.find((t=>t.name===e))||M[0],outputs:G,selectedOutput:G.find((e=>e.name===t))||G[0]}},computed:{assetsWithOptions(){return this.assets.filter((e=>e.component))},filteredQualities(){return 0===this.qualities.length?c.allQualities:this.qualities},canStartDownload(){if(this.busy||!this.open)return!1;return!Object.entries(this).filter((([e])=>e.startsWith("selected"))).some((([,e])=>!e))}},watch:{selectedInput(e){void 0!==e&&this.updateTestVideoInfo()},selectedApi(e){void 0!==e&&(this.updateTestVideoInfo(),L.api=e.name)},selectedOutput(e){void 0!==e&&(L.output=e.name)}},mounted(){coreApis.observer.videoChange((()=>{const e=H.filter((e=>e.match?.some((e=>(0,s.matchUrlPattern)(e)))??!0));this.inputs=e,this.selectedInput=e[0]}))},methods:{formatFileSize:d.formatFileSize,saveSelectedQuality(){const e=this.selectedQuality;void 0!==e&&(L.quality=e.value,this.updateTestVideoInfo())},async getVideoItems(){const e=this.selectedInput;return await e.getInputs(this.$refs.inputOptions)},async updateTestVideoInfo(){if(!this.selectedInput)return;this.testData.videoInfo=null;const e=await this.getVideoItems();console.log("[updateTestVideoInfo]",e),this.testData.multiple=e.length>1;const t=this.selectedApi,[n]=e;if(!this.selectedQuality){const e=await t.downloadVideoInfo(n);if(this.qualities=e.qualities,this.selectedQuality=e.qualities[0],L.quality){const[t]=e.qualities.filter((e=>e.value<=L.quality));t&&(this.selectedQuality=t)}}try{n.quality=this.selectedQuality;const e=await t.downloadVideoInfo(n);this.testData.videoInfo=e}catch(e){this.testData.videoInfo=void 0}},async startDownload(e,t){try{this.busy=!0;const n=this.selectedInput,i=this.selectedApi,o=await n.getInputs(this.$refs.inputOptions);if(0===o.length)return void u.Toast.info("未接收到视频, 如果输入源支持批量, 请至少选择一个视频.","下载视频",3e3);o.forEach((e=>{e.quality=this.selectedQuality}));const s=await Promise.all(o.map((e=>i.downloadVideoInfo(e))));if(0===s.length||0===lodash.sumBy(s,(e=>e.fragments.length)))return void u.Toast.info("未接收到可下载数据, 请检查输入源和格式是否适用于当前视频.","下载视频",3e3);const a=new Q(s),d=(await Promise.all(R.map((e=>e.getAssets(s,this.$refs.assetsOptions.find((t=>t.$attrs.name===e.name))))))).flat();a.extraAssets.push(...d),await a.downloadExtraAssets(),await t.runAction(a,e)}catch(e){(0,a.logError)(e)}finally{this.busy=!1}}}}),Z=n(652),X=n.n(Z),Y={insert:"head",singleton:!1},K=(w()(X(),Y),X().locals,(0,_.Z)(J,i,[],!1,null,null,null));K.options.__file="registry/lib/components/video/download/DownloadVideo.vue";var ee=K.exports},962:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"multiple-widgets"},[n("DefaultWidget",{ref:"button",attrs:{name:"下载视频",icon:"mdi-download"},on:{mouseover:function(t){return e.createDownloadPanel()},click:function(t){return e.toggleDownloadPanel()}}})],1)};let o;i._withStripped=!0;var s=Vue.extend({components:{DefaultWidget:coreApis.ui.DefaultWidget},methods:{async createDownloadPanel(){if(!o){const e=document.createElement("div");document.body.appendChild(e);const t=await Promise.resolve().then(n.bind(n,442)).then((e=>e.default));o=new t({propsData:{triggerElement:this.$refs.button}}).$mount(e)}},async toggleDownloadPanel(){o&&(o.open=!o.open)}}}),a=(0,n(900).Z)(s,i,[],!1,null,null,null);a.options.__file="registry/lib/components/video/download/Widget.vue";var d=a.exports},919:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"single-video-info download-video-config-section"},[e.imageUrl?n("img",{staticClass:"shadow",attrs:{src:e.imageUrl}}):e._e(),e._v(" "),e.imageUrl?n("img",{attrs:{src:e.imageUrl}}):e._e()])};i._withStripped=!0;var o=coreApis.observer,s=n(729),a=coreApis.componentApis.video.videoInfo,d=Vue.extend({data:()=>({imageUrl:""}),created(){(0,o.videoChange)((async()=>{const{aid:e}=unsafeWindow,t=new a.VideoInfo(e);try{await t.fetchInfo()}catch(e){throw(0,s.logError)(e),e}this.imageUrl=t.coverUrl.replace("http:","https:")}))}}),r=n(379),l=n.n(r),c=n(614),u=n.n(c),p={insert:"head",singleton:!1},f=(l()(u(),p),u().locals,(0,n(900).Z)(d,i,[],!1,null,null,null));f.options.__file="registry/lib/components/video/download/inputs/video/SingleVideoInfo.vue";var h=f.exports},900:function(e,t,n){"use strict";function i(e,t,n,i,o,s,a,d){var r,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),a?(r=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=r):o&&(r=d?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),r)if(l.functional){l._injectStyles=r;var c=l.render;l.render=function(e,t){return r.call(t),c(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,r):[r]}return{exports:e,options:l}}n.d(t,{Z:function(){return i}})},729:function(e){"use strict";e.exports=coreApis.utils.log}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var s=t[i]={id:i,exports:{}};return e[i](s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";n.d(i,{component:function(){return t}});var e=coreApis.spinQuery;const t={name:"downloadVideo",displayName:"下载视频",description:"在功能面板中添加下载视频支持. 请注意不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.",entry:none,reload:none,unload:none,widget:{component:()=>Promise.resolve().then(n.bind(n,962)).then((e=>e.default)),condition:()=>(0,e.hasVideo)()},tags:[componentsTags.video],options:{basicConfig:{defaultValue:{},displayName:"基础配置",hidden:!0}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/full-description.js b/registry/dist/components/video/full-description.js index 019be7200..8e528849f 100644 --- a/registry/dist/components/video/full-description.js +++ b/registry/dist/components/video/full-description.js @@ -6,4 +6,4 @@ n.i=function(e,t,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;i{(0,i.addStyle)(s(),u),(0,n.videoChange)((async()=>{if(!await(0,r.select)(".video-desc"))return;(await(0,r.select)('.video-desc .btn[report-id="abstract_spread"], .video-desc .toggle-btn'))?.click()}))},d={name:u,entry:a,reload:a,unload:()=>{(0,i.removeStyle)(u)},displayName:"展开视频简介",tags:[componentsTags.video,componentsTags.style],description:{"zh-CN":"总是展开完整的视频简介."},urlInclude:e.videoAndBangumiUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var s=0;s{(0,i.addStyle)(s(),a),(0,n.videoChange)((async()=>{if(!await(0,r.select)(".video-desc"))return;(await(0,r.select)('.video-desc .btn[report-id="abstract_spread"], .video-desc .toggle-btn'))?.click()}))},d={name:a,entry:u,reload:u,unload:()=>{(0,i.removeStyle)(a)},displayName:"展开视频简介",tags:[componentsTags.video,componentsTags.style],description:{"zh-CN":"总是展开完整的视频简介."},urlInclude:e.videoAndBangumiUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/full-episode-title.js b/registry/dist/components/video/full-episode-title.js index 32a2f7cf1..e922aa0a9 100644 --- a/registry/dist/components/video/full-episode-title.js +++ b/registry/dist/components/video/full-episode-title.js @@ -6,4 +6,4 @@ e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,121,23)))),displayName:"展开选集标题",description:{"zh-CN":"总是完全展开视频选集列表的标题, 注意对番剧无效."},tags:[componentsTags.video],urlInclude:e.videoUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var u=this[i][0];null!=u&&(r[u]=!0)}for(var c=0;cPromise.resolve().then(r.t.bind(r,121,23)))),displayName:"展开选集标题",description:{"zh-CN":"总是完全展开视频选集列表的标题, 注意对番剧无效."},tags:[componentsTags.video],urlInclude:e.videoUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/outer-watchlater.js b/registry/dist/components/video/outer-watchlater.js index da4675164..a5c065bcb 100644 --- a/registry/dist/components/video/outer-watchlater.js +++ b/registry/dist/components/video/outer-watchlater.js @@ -9,4 +9,4 @@ t=[[null,t,""]]);var r={};if(o)for(var i=0;i({watchlaterList:i.watchlaterList,aid:unsafeWindow.aid,tipText:"",tipShowing:!1,tipHandle:0,on:!1}),created(){this.on=this.isInWatchlater()},methods:{isInWatchlater(){return this.watchlaterList.includes(parseInt(this.aid))},showTip(t){this.tipText=t,this.tipShowing=!0,this.tipHandle&&clearTimeout(this.tipHandle),this.tipHandle=setTimeout((()=>{this.tipShowing=!1}),2e3)},async toggle(){try{await(0,i.toggleWatchlater)(this.aid),this.on=this.isInWatchlater(),this.showTip(this.on?"已添加至稍后再看":"已从稍后再看移除")}catch(t){(0,a.logError)(t)}}}}),c=n(379),l=n.n(c),u=n(117),d=n.n(u),p={insert:"head",singleton:!1};l()(d(),p),d().locals;var f=function(t,e,n,o,r,i,a,s){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):r&&(c=s?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}(s,o,[],!1,null,null,null);f.options.__file="registry/lib/components/video/outer-watchlater/OuterWatchlater.vue";var h=f.exports},156:function(t){"use strict";t.exports=coreApis.observer},109:function(t){"use strict";t.exports=coreApis.utils}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={id:t,exports:{}};return n[t](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&o&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){a[t]=function(){return n[t]}}));return a.default=function(){return n},r.d(i,a),i},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";r.d(i,{component:function(){return e}});var t=coreApis.utils.urls;const e={name:"outerWatchlater",displayName:"外置稍后再看",entry:async()=>{const{mountVueComponent:t,getUID:e,playerReady:n}=await Promise.resolve().then(r.t.bind(r,109,23));if(!e())return;await n();const o=dq(".video-toolbar .ops .collect");if(!o)return;const i=t(await Promise.resolve().then(r.bind(r,176)));o.insertAdjacentElement("afterend",i.$el);const{videoChange:a}=await Promise.resolve().then(r.t.bind(r,156,23));a((()=>{i.aid=unsafeWindow.aid}))},tags:[componentsTags.video],description:{"zh-CN":"将视频页面菜单里的 `稍后再看` 移到外面."},urlInclude:t.videoUrls,urlExclude:t.watchlaterUrls,reload:()=>{dqa(".ops .watchlater").forEach((t=>{t.style.display="inline-block"}))},unload:()=>{dqa(".ops .watchlater").forEach((t=>{t.style.display="none"}))},plugin:{displayName:"稍后再看 - 快捷键支持",setup:({addData:t})=>{t("keymap.actions",(t=>{t.watchlater={displayName:"稍后再看",run:t=>{const{clickElement:e}=t;return e(".video-toolbar .ops .watchlater, .more-ops-list .ops-watch-later, .video-toolbar-module .see-later-box",t)}}})),t("keymap.presets",(t=>{t.watchlater="shift w"}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n({watchlaterList:i.watchlaterList,aid:unsafeWindow.aid,tipText:"",tipShowing:!1,tipHandle:0,on:!1}),created(){this.on=this.isInWatchlater()},methods:{isInWatchlater(){return this.watchlaterList.includes(parseInt(this.aid))},showTip(t){this.tipText=t,this.tipShowing=!0,this.tipHandle&&clearTimeout(this.tipHandle),this.tipHandle=setTimeout((()=>{this.tipShowing=!1}),2e3)},async toggle(){try{await(0,i.toggleWatchlater)(this.aid),this.on=this.isInWatchlater(),this.showTip(this.on?"已添加至稍后再看":"已从稍后再看移除")}catch(t){(0,a.logError)(t)}}}}),c=n(379),l=n.n(c),u=n(117),d=n.n(u),p={insert:"head",singleton:!1};l()(d(),p),d().locals;var f=function(t,e,n,o,r,i,a,s){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):r&&(c=s?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}(s,o,[],!1,null,null,null);f.options.__file="registry/lib/components/video/outer-watchlater/OuterWatchlater.vue";var h=f.exports},156:function(t){"use strict";t.exports=coreApis.observer},109:function(t){"use strict";t.exports=coreApis.utils}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={id:t,exports:{}};return n[t](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&o&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){a[t]=function(){return n[t]}}));return a.default=function(){return n},r.d(i,a),i},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";r.d(i,{component:function(){return e}});var t=coreApis.utils.urls;const e={name:"outerWatchlater",displayName:"外置稍后再看",entry:async()=>{const{mountVueComponent:t,getUID:e,playerReady:n}=await Promise.resolve().then(r.t.bind(r,109,23));if(!e())return;await n();const o=dq(".video-toolbar .ops .collect");if(!o)return;const i=t(await Promise.resolve().then(r.bind(r,176)));o.insertAdjacentElement("afterend",i.$el);const{videoChange:a}=await Promise.resolve().then(r.t.bind(r,156,23));a((()=>{i.aid=unsafeWindow.aid}))},tags:[componentsTags.video],description:{"zh-CN":"将视频页面菜单里的 `稍后再看` 移到外面."},urlInclude:t.videoUrls,urlExclude:t.watchlaterUrls,reload:()=>{dqa(".ops .watchlater").forEach((t=>{t.style.display="inline-block"}))},unload:()=>{dqa(".ops .watchlater").forEach((t=>{t.style.display="none"}))},plugin:{displayName:"稍后再看 - 快捷键支持",setup:({addData:t})=>{t("keymap.actions",(t=>{t.watchlater={displayName:"稍后再看",run:t=>{const{clickElement:e}=t;return e(".video-toolbar .ops .watchlater, .more-ops-list .ops-watch-later, .video-toolbar-module .see-later-box",t)}}})),t("keymap.presets",(t=>{t.watchlater="shift w"}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/auto-light.js b/registry/dist/components/video/player/auto-light.js index 3391915b8..a0554d45a 100644 --- a/registry/dist/components/video/player/auto-light.js +++ b/registry/dist/components/video/player/auto-light.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/auto-light"]=t():e["video/player/auto-light"]=t()}(self,(function(){return function(){"use strict";var e,t,n={579:function(e){e.exports=coreApis.componentApis.video.playerLight},109:function(e){e.exports=coreApis.utils}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return o}});var e=coreApis.componentApis.video.playerAgent,t=coreApis.observer;let n;const o={name:"playerAutoLight",displayName:"播放时自动关灯",urlInclude:coreApis.utils.urls.allVideoUrls,tags:[componentsTags.video],description:{"zh-CN":"在视频播放时自动关灯, 暂停或结束时再自动打开."},entry:async()=>{const{isEmbeddedPlayer:o}=await Promise.resolve().then(r.t.bind(r,109,23)),{lightOn:i,lightOff:c}=await Promise.resolve().then(r.t.bind(r,579,23));o()||(0,t.videoChange)((async()=>{if(null!=n){const e=await n.query.video.element();e.removeEventListener("ended",i),e.removeEventListener("pause",i),e.removeEventListener("play",c)}n=e.playerAgent;const t=await n.query.video.element();n.isAutoPlay()&&c(),t.addEventListener("ended",i),t.addEventListener("pause",i),t.addEventListener("play",c)}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/auto-light"]=t():e["video/player/auto-light"]=t()}(self,(function(){return function(){"use strict";var e,t,n={579:function(e){e.exports=coreApis.componentApis.video.playerLight},109:function(e){e.exports=coreApis.utils}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return o}});var e=coreApis.componentApis.video.playerAgent,t=coreApis.observer;let n;const o={name:"playerAutoLight",displayName:"播放时自动关灯",urlInclude:coreApis.utils.urls.allVideoUrls,tags:[componentsTags.video],description:{"zh-CN":"在视频播放时自动关灯, 暂停或结束时再自动打开."},entry:async()=>{const{isEmbeddedPlayer:o}=await Promise.resolve().then(r.t.bind(r,109,23)),{lightOn:i,lightOff:c}=await Promise.resolve().then(r.t.bind(r,579,23));o()||(0,t.videoChange)((async()=>{if(null!=n){const e=await n.query.video.element();e.removeEventListener("ended",i),e.removeEventListener("pause",i),e.removeEventListener("play",c)}n=e.playerAgent;const t=await n.query.video.element();n.isAutoPlay()&&c(),t.addEventListener("ended",i),t.addEventListener("pause",i),t.addEventListener("play",c)}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/control-background.js b/registry/dist/components/video/player/control-background.js index 331ff76c4..6273559ff 100644 --- a/registry/dist/components/video/player/control-background.js +++ b/registry/dist/components/video/player/control-background.js @@ -6,4 +6,4 @@ o.i=function(t,e,n){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(n)for(var i=0;i{const{addComponentListener:o}=await Promise.resolve().then(r.t.bind(r,407,23));o(`${t.name}.includeProgress`,(t=>{document.body.classList.toggle("video-control-progress-background",t)}),!0),o(`${t.name}.opacity`,lodash.debounce((t=>{document.documentElement.style.setProperty("--video-control-opacity",(t/100).toString())}),200),!0)},instantStyles:[{name:"playerControlBackground",style:()=>Promise.resolve().then(r.t.bind(r,494,23))}],urlInclude:t.playerUrls,options:{opacity:{displayName:"不透明度(%)",defaultValue:64,slider:{}},includeProgress:{displayName:"包括进度条",defaultValue:!0}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;c{const{addComponentListener:o}=await Promise.resolve().then(r.t.bind(r,407,23));o(`${t.name}.includeProgress`,(t=>{document.body.classList.toggle("video-control-progress-background",t)}),!0),o(`${t.name}.opacity`,lodash.debounce((t=>{document.documentElement.style.setProperty("--video-control-opacity",(t/100).toString())}),200),!0)},instantStyles:[{name:"playerControlBackground",style:()=>Promise.resolve().then(r.t.bind(r,494,23))}],urlInclude:t.playerUrls,options:{opacity:{displayName:"不透明度(%)",defaultValue:64,slider:{}},includeProgress:{displayName:"包括进度条",defaultValue:!0}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/default-mode.js b/registry/dist/components/video/player/default-mode.js index 1a548930a..1b07222fb 100644 --- a/registry/dist/components/video/player/default-mode.js +++ b/registry/dist/components/video/player/default-mode.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/default-mode"]=t():e["video/player/default-mode"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return s}});var n=coreApis.componentApis.video.playerAgent,o=coreApis.spinQuery,l=coreApis.utils,r=coreApis.utils.urls;let a;!function(e){e.Normal="常规",e.Wide="宽屏",e.WebFullscreen="网页全屏",e.Fullscreen="全屏"}(a||(a={}));const s={name:"defaultPlayerMode",displayName:"默认播放器模式",entry:async({settings:{options:e}})=>{if((0,l.isEmbeddedPlayer)())return;await(0,l.playerReady)();const t=new Map([[a.Normal,none],[a.Wide,()=>{n.playerAgent.widescreen()}],[a.WebFullscreen,()=>{n.playerAgent.webFullscreen()}],[a.Fullscreen,async()=>{null!==await(0,o.sq)((()=>dq(n.playerAgent.query.video.element.selector)),(e=>null!==e&&4===e.readyState&&"complete"===document.readyState&&document.hasFocus()))?n.playerAgent.fullscreen():console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.")}]]),r=await n.playerAgent.query.video.element();if(!r)return;const s=t.get(e.mode),c=()=>{!dq("body[class*=player-mode-]")&&s()};e.applyOnPlay&&!n.playerAgent.isAutoPlay()?r.addEventListener("play",c,{once:!0}):c()},tags:[componentsTags.video],description:{"zh-CN":"控制是否使用默认播放器模式, 可以为`常规`, `宽屏`, `网页全屏`或`全屏`. 注意: 不能和其他影响定位的功能一同使用, 例如播放器定位. (相关讨论: [#483](https://github.com/the1812/Bilibili-Evolved/issues/483))","en-US":"Set the default player mode. Could be `Normal`, `Widescreen`, `Web fullscreen` or `Fullscreen`.","ja-JP":"デフォルト・プレーヤー・モードが使用するかどうかを制御する、 例えば`常规`、`宽屏`、 `网页全屏`か`全屏`."},options:{mode:{defaultValue:a.Normal,displayName:"模式选择",dropdownEnum:a},applyOnPlay:{defaultValue:!1,displayName:"播放时应用"}},urlInclude:r.allVideoUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return t=t.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/default-mode"]=t():e["video/player/default-mode"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return s}});var n=coreApis.componentApis.video.playerAgent,o=coreApis.spinQuery,l=coreApis.utils,r=coreApis.utils.urls;let a;!function(e){e.Normal="常规",e.Wide="宽屏",e.WebFullscreen="网页全屏",e.Fullscreen="全屏"}(a||(a={}));const s={name:"defaultPlayerMode",displayName:"默认播放器模式",entry:async({settings:{options:e}})=>{if((0,l.isEmbeddedPlayer)())return;await(0,l.playerReady)();const t=new Map([[a.Normal,none],[a.Wide,()=>{n.playerAgent.widescreen()}],[a.WebFullscreen,()=>{n.playerAgent.webFullscreen()}],[a.Fullscreen,async()=>{null!==await(0,o.sq)((()=>dq(n.playerAgent.query.video.element.selector)),(e=>null!==e&&4===e.readyState&&"complete"===document.readyState&&document.hasFocus()))?n.playerAgent.fullscreen():console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.")}]]),r=await n.playerAgent.query.video.element();if(!r)return;const s=t.get(e.mode),c=()=>{!dq("body[class*=player-mode-]")&&s()};e.applyOnPlay&&!n.playerAgent.isAutoPlay()?r.addEventListener("play",c,{once:!0}):c()},tags:[componentsTags.video],description:{"zh-CN":"控制是否使用默认播放器模式, 可以为`常规`, `宽屏`, `网页全屏`或`全屏`. 注意: 不能和其他影响定位的功能一同使用, 例如播放器定位. (相关讨论: [#483](https://github.com/the1812/Bilibili-Evolved/issues/483))","en-US":"Set the default player mode. Could be `Normal`, `Widescreen`, `Web fullscreen` or `Fullscreen`.","ja-JP":"デフォルト・プレーヤー・モードが使用するかどうかを制御する、 例えば`常规`、`宽屏`、 `网页全屏`か`全屏`."},options:{mode:{defaultValue:a.Normal,displayName:"模式选择",dropdownEnum:a},applyOnPlay:{defaultValue:!1,displayName:"播放时应用"}},urlInclude:r.allVideoUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return t=t.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/double-click-fullscreen.js b/registry/dist/components/video/player/double-click-fullscreen.js index 749b15b53..7afb794a0 100644 --- a/registry/dist/components/video/player/double-click-fullscreen.js +++ b/registry/dist/components/video/player/double-click-fullscreen.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/double-click-fullscreen"]=t():e["video/player/double-click-fullscreen"]=t()}(self,(function(){return function(){"use strict";var e,t,n={730:function(e){e.exports=coreApis.componentApis.video.playerAgent},156:function(e){e.exports=coreApis.observer},109:function(e){e.exports=coreApis.utils}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var l=2&o&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"doubleClickFullscreen",displayName:"双击全屏",description:"为视频播放器启用双击全屏功能, 请注意不能和 `启用双击控制` 一同使用.",entry:async({settings:{options:e}})=>{const{videoChange:t}=await Promise.resolve().then(r.t.bind(r,156,23));t((async()=>{const{DoubleClickEvent:t}=await Promise.resolve().then(r.t.bind(r,109,23)),{playerAgent:n}=await Promise.resolve().then(r.t.bind(r,730,23)),o=await n.query.danmakuTipLayer();if(null===o)return void console.error("playerArea not found");const i="double-click-fullscreen";if(!o.classList.contains(i)){o.classList.add(i);const r=n.query.video.container.sync(),c=new t((()=>n.fullscreen()),e.preventSingleClick);c.singleClickHandler=()=>n.togglePlay(),c.bind(r)}}))},tags:[componentsTags.video],options:{preventSingleClick:{displayName:"双击时阻止单击事件",defaultValue:!0}},urlInclude:e.playerUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/double-click-fullscreen"]=t():e["video/player/double-click-fullscreen"]=t()}(self,(function(){return function(){"use strict";var e,t,n={730:function(e){e.exports=coreApis.componentApis.video.playerAgent},156:function(e){e.exports=coreApis.observer},109:function(e){e.exports=coreApis.utils}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var l=2&o&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"doubleClickFullscreen",displayName:"双击全屏",description:"为视频播放器启用双击全屏功能, 请注意不能和 `启用双击控制` 一同使用.",entry:async({settings:{options:e}})=>{const{videoChange:t}=await Promise.resolve().then(r.t.bind(r,156,23));t((async()=>{const{DoubleClickEvent:t}=await Promise.resolve().then(r.t.bind(r,109,23)),{playerAgent:n}=await Promise.resolve().then(r.t.bind(r,730,23)),o=await n.query.danmakuTipLayer();if(null===o)return void console.error("playerArea not found");const i="double-click-fullscreen";if(!o.classList.contains(i)){o.classList.add(i);const r=n.query.video.container.sync(),c=new t((()=>n.fullscreen()),e.preventSingleClick);c.singleClickHandler=()=>n.togglePlay(),c.bind(r)}}))},tags:[componentsTags.video],options:{preventSingleClick:{displayName:"双击时阻止单击事件",defaultValue:!0}},urlInclude:e.playerUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/focus.js b/registry/dist/components/video/player/focus.js index 50564ccd5..aacec742b 100644 --- a/registry/dist/components/video/player/focus.js +++ b/registry/dist/components/video/player/focus.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/focus"]=t():e["video/player/focus"]=t()}(self,(function(){return function(){"use strict";var e,t,o={569:function(e){e.exports=coreApis.spinQuery},109:function(e){e.exports=coreApis.utils}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},r.d(i,c),i},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"playerFocus",displayName:"播放器定位",tags:[componentsTags.video],entry:async({settings:{options:e}})=>{const t=document.URL.includes("bangumi")?".bilibili-player":".video-info .video-title .tit",{select:o}=await Promise.resolve().then(r.t.bind(r,569,23)),{playerReady:n}=await Promise.resolve().then(r.t.bind(r,109,23)),i=await o(t);await n(),i&&(i.scrollIntoView(),0!==e.offset&&window.scrollBy(0,e.offset))},description:{"zh-CN":"进入视频 / 番剧页面时, 自动定位到播放器. 注意: 不能和其他影响定位的功能一同使用, 例如自动宽屏. (相关讨论: [#483](https://github.com/the1812/Bilibili-Evolved/issues/483))\n\n可设置定位时的竖直偏移量, 单位为像素(px)."},options:{offset:{displayName:"定位偏移量",defaultValue:-10}},urlInclude:e.videoAndBangumiUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/focus"]=t():e["video/player/focus"]=t()}(self,(function(){return function(){"use strict";var e,t,o={569:function(e){e.exports=coreApis.spinQuery},109:function(e){e.exports=coreApis.utils}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){c[e]=function(){return o[e]}}));return c.default=function(){return o},r.d(i,c),i},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{component:function(){return t}});var e=coreApis.utils.urls;const t={name:"playerFocus",displayName:"播放器定位",tags:[componentsTags.video],entry:async({settings:{options:e}})=>{const t=document.URL.includes("bangumi")?".bilibili-player":".video-info .video-title .tit",{select:o}=await Promise.resolve().then(r.t.bind(r,569,23)),{playerReady:n}=await Promise.resolve().then(r.t.bind(r,109,23)),i=await o(t);await n(),i&&(i.scrollIntoView(),0!==e.offset&&window.scrollBy(0,e.offset))},description:{"zh-CN":"进入视频 / 番剧页面时, 自动定位到播放器. 注意: 不能和其他影响定位的功能一同使用, 例如自动宽屏. (相关讨论: [#483](https://github.com/the1812/Bilibili-Evolved/issues/483))\n\n可设置定位时的竖直偏移量, 单位为像素(px)."},options:{offset:{displayName:"定位偏移量",defaultValue:-10}},urlInclude:e.videoAndBangumiUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/intersection-actions.js b/registry/dist/components/video/player/intersection-actions.js index e1ac1c3c5..23b477a80 100644 --- a/registry/dist/components/video/player/intersection-actions.js +++ b/registry/dist/components/video/player/intersection-actions.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/intersection-actions"]=t():e["video/player/intersection-actions"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return s}});var n,o=coreApis.componentApis.video.playerAgent,i=coreApis.componentApis.video.playerLight,a=coreApis.observer,r=coreApis.settings;!function(e){e.Top="视频顶部",e.Medium="视频中间",e.Bottom="视频底部"}(n||(n={}));const s={name:"playerIntersectionActions",author:{name:"FoundTheWOUT",link:"https://github.com/FoundTheWOUT"},tags:[componentsTags.video],entry:async({settings:{options:e},metadata:t})=>{const s=e,{query:{video:p}}=o.playerAgent,c=await p.element(),d=document.getElementById("video-player")??(dq(".player-wrap")||dq(".player-module"));let u,l=!0;function m(e){switch(e){case n.Top:return 1;case n.Medium:return.5;case n.Bottom:return 0;default:return.5}}function f(){u.observe(d)}function y(){u.unobserve(d)}const g=e=>new IntersectionObserver((([e])=>{e.isIntersecting?l||(l=!0,s.pause&&c.paused&&c.play(),s.light&&(0,r.getComponentSettings)("playerAutoLight").enabled&&!s.pause&&!c.paused&&(0,i.lightOff)()):(c.paused||(l=!1),s.pause&&!c.paused&&c.pause(),s.light&&(0,r.getComponentSettings)("playerAutoLight").enabled&&!s.pause&&(0,i.lightOn)())}),{threshold:m(e||s.triggerLocation)});(0,r.addComponentListener)(`${t.name}.triggerLocation`,(e=>{y(),u=g(e),f()})),u=g(),(0,a.videoChange)((async()=>{o.playerAgent.isAutoPlay()&&f(),c.addEventListener("play",f),c.addEventListener("ended",y)}))},displayName:"播放器位置动作",description:{"zh-CN":"设置当播放器移出视图的位置变化时执行的动作."},options:{triggerLocation:{defaultValue:n.Medium,displayName:"触发位置",dropdownEnum:n},pause:{defaultValue:!1,displayName:"自动暂停"},light:{defaultValue:!0,displayName:"自动开灯"}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return t=t.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/intersection-actions"]=t():e["video/player/intersection-actions"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return s}});var n,o=coreApis.componentApis.video.playerAgent,i=coreApis.componentApis.video.playerLight,a=coreApis.observer,r=coreApis.settings;!function(e){e.Top="视频顶部",e.Medium="视频中间",e.Bottom="视频底部"}(n||(n={}));const s={name:"playerIntersectionActions",author:{name:"FoundTheWOUT",link:"https://github.com/FoundTheWOUT"},tags:[componentsTags.video],entry:async({settings:{options:e},metadata:t})=>{const s=e,{query:{video:p}}=o.playerAgent,c=await p.element(),d=document.getElementById("video-player")??(dq(".player-wrap")||dq(".player-module"));let u,l=!0;function m(e){switch(e){case n.Top:return 1;case n.Medium:return.5;case n.Bottom:return 0;default:return.5}}function y(){u.observe(d)}function f(){u.unobserve(d)}const g=e=>new IntersectionObserver((([e])=>{e.isIntersecting?l||(l=!0,s.pause&&c.paused&&c.play(),s.light&&(0,r.getComponentSettings)("playerAutoLight").enabled&&!s.pause&&!c.paused&&(0,i.lightOff)()):(c.paused||(l=!1),s.pause&&!c.paused&&c.pause(),s.light&&(0,r.getComponentSettings)("playerAutoLight").enabled&&!s.pause&&(0,i.lightOn)())}),{threshold:m(e||s.triggerLocation)});(0,r.addComponentListener)(`${t.name}.triggerLocation`,(e=>{f(),u=g(e),y()})),u=g(),(0,a.videoChange)((async()=>{o.playerAgent.isAutoPlay()&&y(),c.addEventListener("play",y),c.addEventListener("ended",f)}))},displayName:"播放器位置动作",description:{"zh-CN":"设置当播放器移出视图的位置变化时执行的动作."},options:{triggerLocation:{defaultValue:n.Medium,displayName:"触发位置",dropdownEnum:n},pause:{defaultValue:!1,displayName:"自动暂停"},light:{defaultValue:!0,displayName:"自动开灯"}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return t=t.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/legacy-auto-play.js b/registry/dist/components/video/player/legacy-auto-play.js index f80ba0552..32916164e 100644 --- a/registry/dist/components/video/player/legacy-auto-play.js +++ b/registry/dist/components/video/player/legacy-auto-play.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/legacy-auto-play"]=t():e["video/player/legacy-auto-play"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return c}});var o=coreApis.observer,n=coreApis.spinQuery,a=coreApis.utils,i=coreApis.utils.urls;const c={name:"legacyAutoPlay",displayName:"传统连播模式",description:"模拟传统的多 P 连播策略: 仅连播视频的分 P 和番剧的多集, 最后 1P 放完禁止连播其他推荐视频.",tags:[componentsTags.video],urlInclude:i.videoUrls,entry:async()=>{const e={enable:[".multi-page .next-button",".player-auxiliary-autoplay-switch input"],disable:[".recommend-list .next-button"]},t=[()=>Boolean(dq(".multi-page .list-box li.on:last-child"))];await(0,a.playerReady)();const i=async()=>{const o=await(0,n.select)([...e.disable,...e.enable].join(","));if(!o)return;var a;(e.enable.some((e=>o.matches(e)))&&t.every((e=>!e())))!==(a=o,Boolean(a.querySelector(".switch-button.on")||a.matches(":checked")))&&o.click()};(0,o.videoChange)((async()=>{i();(await(0,n.select)(".bilibili-player-video video"))?.addEventListener("play",i,{once:!0})}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return t=t.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/legacy-auto-play"]=t():e["video/player/legacy-auto-play"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{component:function(){return c}});var o=coreApis.observer,n=coreApis.spinQuery,a=coreApis.utils,i=coreApis.utils.urls;const c={name:"legacyAutoPlay",displayName:"传统连播模式",description:"模拟传统的多 P 连播策略: 仅连播视频的分 P 和番剧的多集, 最后 1P 放完禁止连播其他推荐视频.",tags:[componentsTags.video],urlInclude:i.videoUrls,entry:async()=>{const e={enable:[".multi-page .next-button",".player-auxiliary-autoplay-switch input"],disable:[".recommend-list .next-button"]},t=[()=>Boolean(dq(".multi-page .list-box li.on:last-child"))];await(0,a.playerReady)();const i=async()=>{const o=await(0,n.select)([...e.disable,...e.enable].join(","));if(!o)return;var a;(e.enable.some((e=>o.matches(e)))&&t.every((e=>!e())))!==(a=o,Boolean(a.querySelector(".switch-button.on")||a.matches(":checked")))&&o.click()};(0,o.videoChange)((async()=>{i();(await(0,n.select)(".bilibili-player-video video"))?.addEventListener("play",i,{once:!0})}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return t=t.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/preserve-danmaku-input.js b/registry/dist/components/video/player/preserve-danmaku-input.js index da9751e70..723ef1295 100644 --- a/registry/dist/components/video/player/preserve-danmaku-input.js +++ b/registry/dist/components/video/player/preserve-danmaku-input.js @@ -6,4 +6,4 @@ t.i=function(e,n,r){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var o={};if(r)for(var i=0;iPromise.resolve().then(o.t.bind(o,471,23)))),displayName:"强制保留弹幕发送栏",tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"在视频播放器网页全屏时, 即使宽度过小也强制保留弹幕发送栏, 注意这可能导致右侧的功能按钮挤出边界."},urlInclude:t.playerUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var u=this[i][0];null!=u&&(o[u]=!0)}for(var c=0;cPromise.resolve().then(o.t.bind(o,471,23)))),displayName:"强制保留弹幕发送栏",tags:[componentsTags.style,componentsTags.video],description:{"zh-CN":"在视频播放器网页全屏时, 即使宽度过小也强制保留弹幕发送栏, 注意这可能导致右侧的功能按钮挤出边界."},urlInclude:t.playerUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/remember-speed.js b/registry/dist/components/video/player/remember-speed.js index fff2be734..e5233693f 100644 --- a/registry/dist/components/video/player/remember-speed.js +++ b/registry/dist/components/video/player/remember-speed.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/remember-speed"]=t():e["video/player/remember-speed"]=t()}(self,(function(){return function(){"use strict";var e,t,n={71:function(e,t,n){n.r(t),n.d(t,{createController:function(){return N}});var r=n(730),i=coreApis.observer,o=n(619);const s=(0,o.cK)(o.VG.custom.active.selector),a=(0,o.cK)(o.VG.custom.show.selector);let d,l,c,u,p,m,f,v=1;const y=e=>{for(const[t,n]of Object.entries(o.YM.individualRememberList))if(n.some((t=>t.toString()===(0,o.yM)(e).toString())))return parseFloat(t);return null},b=()=>o.am?parseFloat(o.YM.speed):null,g=e=>{e=(0,o.yM)(e);let t=-1;for(const n of Object.values(o.YM.individualRememberList))if(t=n.indexOf(e),-1!==t){n.splice(t,1);break}return-1!==t},S=(e,t=!1,n)=>{n=(0,o.yM)(n);(g(n)||t)&&(o.YM.individualRememberList[e]||(o.YM.individualRememberList[e]=[]),o.YM.individualRememberList[e].push(n))},h=e=>p.querySelector(`${o.VG.custom.speedMenuItem.selector}[data-value="${e}"]`),x=e=>e?(h(e)?.click(),e):m.playbackRate,M=x,V=(e=!1)=>{if(e){const e=b();if(!e)return;g(),M(e)}else M(1)},w=(e="smart",t=!1)=>{switch(e){case"smart":1===x()?x(l):V(t);break;case"classic":M(l)}},L=e=>{p.querySelector(`${o.VG.custom.speedMenuItem.selector}[data-value="${x()}"]`)?.classList.remove(s),m.playbackRate=e,p.querySelector(`${o.VG.custom.speedMenuItem.selector}[data-value="${e}"]`)?.classList.add(s),u.classList.remove(a),f.innerText=(0,o.Nq)(e)},E=async()=>{const{getExtraSpeedMenuItemElements:e}=await Promise.resolve().then(n.bind(n,85));p.prepend(...await e()),p.querySelectorAll(`${o.VG.custom.speedMenuItem.selector}[data-value]:not(.extended)`).forEach((e=>{e.style.order=(0,o.dP)(parseFloat(e.getAttribute("data-value")??"1"))})),(0,o.NH)(p,["click",e=>{const t=e.target,n=parseFloat(t.dataset.value);var r;e.target.classList.contains("extended")&&(r=n,o.Tt.includes(r)?h(r)?.click():L(r)),(0,o.aC)().includes(x())&&d===n&&L(n)}])},G=(e,t)=>{const n=o.Tt.includes(t);u.dispatchEvent(new CustomEvent("changed",{detail:{speed:t,isNativeSpeed:n,previousSpeed:e}}))},N=_.once((()=>((0,i.videoChange)((async()=>{(0,o.oG)();const e=await o.VG.custom.speedContainer(),t=await r.playerAgent.query.video.element();if(!e)throw new Error("speed container element not found!");if(!t)throw new Error("video element not found!");var n;u=e,m=t,f=u.querySelector(o.VG.custom.speedNameBtn.selector),p=u.querySelector(o.VG.custom.speedMenuList.selector),await(async()=>{o.YM.extend&&!u.classList.contains("extended")&&(await E(),u.classList.add("extended"))})(),p.querySelectorAll(o.VG.custom.speedMenuItem.selector).forEach((e=>{if(!e.hasAttribute("data-value")){const t=parseFloat(e.textContent).toString();e.setAttribute("data-value",t)}})),d=v,n=G,(0,o.NH)(p,["click",e=>{n(c,parseFloat(e.target.dataset.value??"1"))}]),(0,o.NH)(u,["changed",({detail:{speed:e,isNativeSpeed:t,previousSpeed:n}})=>{c=e,t&&(v=e,d=e),o.YM.extend&&o.Tt.includes(e)&&p.querySelector(`${o.VG.custom.speedMenuItem.selector}.extended${o.VG.custom.active.selector}`)?.classList.remove(s),o.am&&(o.YM.individualRemember?S(e,e!==b()):o.YM.speed=e.toString()),n&&n!==e&&(l=n)}]),setTimeout((()=>{M(o.am&&o.YM.individualRemember&&y()||b()||c)}),100)})),{getSupportedRates:o.V3,getExtendedSupportedRates:o.aC,setVideoSpeed:M,videoSpeed:x,getRememberSpeed:y,rememberSpeed:S,forgetSpeed:g,resetVideoSpeed:V,toggleVideoSpeed:w})))},85:function(e,t,n){n.r(t),n.d(t,{getExtraSpeedMenuItemElements:function(){return l}});var r=coreApis.style,i=coreApis.utils.log,o=n(619);const s=(0,o.cK)(o.VG.custom.speedMenuItem.selector),a=e=>{const t=document.createElement("li");t.innerText=(0,o.Nq)(e),t.classList.add(s,"extended"),t.dataset.value=e.toString(),t.style.order=(0,o.dP)(e);const n=document.createElement("i");return n.classList.add("mdi","mdi-close-circle"),n.addEventListener("click",(()=>{lodash.pull(o.YM.extendList,e),t.remove()})),t.append(n),t},d=e=>{const t=(()=>{const e=(0,o.V3)().slice(-1)[0]+o.hD;return e>o.PW?null:e})();e.setAttribute("min",t?e.value=t.toString():(e.value="",o.uv.toString()))},l=async()=>{(0,r.addStyle)(`\n ${o.VG.custom.speedContainer.selector} ${o.VG.custom.speedMenuItem.selector}:first-child .mdi-playlist-plus {\n font-size: 1.5em;\n }\n ${o.VG.custom.speedContainer.selector} ${o.VG.custom.speedMenuItem.selector}:first-child input {\n font-size: inherit;\n color: inherit;\n line-height: inherit;\n background: transparent;\n outline: none;\n width: 100%;\n border: none;\n text-align: center;\n }\n ${o.VG.custom.speedMenuItem.selector} .mdi-close-circle {\n color: inherit;\n opacity: 0.5;\n display: none;\n position: absolute;\n right: 4px;\n }\n ${o.VG.custom.speedMenuItem.selector}:not(${o.VG.custom.active.selector}):hover .mdi-close-circle {\n display: inline;\n }\n ${o.VG.custom.speedMenuItem.selector} .mdi-close-circle:hover {\n opacity: 1;\n transition: all .3s;\n }\n /* https://stackoverflow.com/a/4298216 */\n /* Chrome */\n .add-speed-entry::-webkit-outer-spin-button,\n .add-speed-entry::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* Firefox */\n .add-speed-entry[type=number] {\n -moz-appearance:textfield;\n }\n ${o.VG.custom.speedMenuList.selector} {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n max-height: 360px;\n }\n `,"extend-video-speed-style");const e=(0,o.aC)().map((e=>a(e))).reverse();return e.unshift((()=>{const e=document.createElement("li");e.classList.add(s);const t=document.createElement("i");t.classList.add("mdi","mdi-playlist-plus");const n=document.createElement("input");return n.classList.add("add-speed-entry"),n.setAttribute("type","number"),n.setAttribute("max",o.PW.toString()),n.setAttribute("step",o.hD.toString()),n.setAttribute("title","增加新的倍速值"),d(n),n.addEventListener("keydown",(t=>{if("Enter"===t.key){const t=parseFloat(n.value);if(!isFinite(t))return(0,i.logError)("无效的倍速值",o.cJ),!1;if(to.PW)return(0,i.logError)("倍速值太大了",o.cJ),!1;if((0,o.V3)().includes(t))return(0,i.logError)("不能重复添加已有的倍速值",o.cJ),!1;o.YM.extendList.push(t),o.YM.extendList=(0,o.uL)(o.YM.extendList);let r=e.nextElementSibling;for(;!r.dataset.value||parseFloat(r.dataset.value)>o.Tt.slice(-1)[0]&&t{d(n),n.style.display="inline",t.style.display="none",n.focus()})),e.addEventListener("mouseleave",(()=>{t.style.display="inline",n.style.display="none"})),e})()),e}},619:function(e,t,n){n.d(t,{NH:function(){return M},dP:function(){return m},am:function(){return y},cJ:function(){return l},VG:function(){return u},Nq:function(){return h},yM:function(){return f},aC:function(){return g},V3:function(){return S},uL:function(){return b},PW:function(){return a},uv:function(){return s},Tt:function(){return c},YM:function(){return v},oG:function(){return V},hD:function(){return d},cK:function(){return p}});var r=n(730),i=n(407),o=coreApis.utils.sort;const s=.0625,a=16,d=.5,l=2e3,c=[.5,.75,1,1.25,1.5,2],u=r.playerAgent.provideCustomQuery({video:{speedMenuList:".bilibili-player-video-btn-speed-menu",speedMenuItem:".bilibili-player-video-btn-speed-menu-list",speedNameBtn:".bilibili-player-video-btn-speed-name",speedContainer:".bilibili-player-video-btn-speed",active:".bilibili-player-active",show:".bilibili-player-speed-show"},bangumi:{speedMenuList:".squirtle-speed-select-list",speedMenuItem:".squirtle-select-item",speedNameBtn:".squirtle-speed-select-result",speedContainer:".squirtle-speed-wrap",active:".active",show:".bilibili-player-speed-show"}}),p=e=>e.replace(/^\./,""),m=e=>(1e4*(a-e)).toString(),f=(e=unsafeWindow.aid)=>{if(!e)throw new Error("aid is unknown");return e},{options:v,enabled:y}=(0,i.getComponentSettings)("rememberVideoSpeed"),b=e=>Array.from(new Set(e)).sort((0,o.ascendingSort)()),g=()=>b(v.extendList),S=()=>v.extend?[...c,...g()].sort((0,o.ascendingSort)()):c,h=e=>1===e?"倍速":Math.trunc(e)===e?`${e}.0x`:`${e}x`,x=new Map,M=(e,t)=>{e.addEventListener(...t),x.set(e,t)},V=()=>x.forEach(((e,t)=>t.removeEventListener(...e)))},730:function(e){e.exports=coreApis.componentApis.video.playerAgent},407:function(e){e.exports=coreApis.settings}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);i.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){s[e]=function(){return n[e]}}));return s.default=function(){return n},i.d(o,s),o},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){i.d(o,{component:function(){return r}});var e=coreApis.componentApis.component,t=coreApis.utils.urls;const n="rememberVideoSpeed",r={name:n,displayName:"倍速记忆",author:{name:"JLoeve",link:"https://github.com/LonelySteve"},description:{"zh-CN":"记忆上次选择的视频播放速度, 还可以使用更多倍速来扩展原生倍速菜单."},tags:[componentsTags.video],urlInclude:t.playerUrls,entry:async()=>(await Promise.resolve().then(i.bind(i,71))).createController(),plugin:{displayName:"倍速记忆 - 快捷键支持",setup:async({addData:t})=>{const{getComponentSettings:r}=await Promise.resolve().then(i.t.bind(i,407,23)),o=async(t,r)=>{const i=(0,e.importComponent)(n);r(i,i.getSupportedRates()),t.showTip(`${i.videoSpeed()}x`,"mdi-fast-forward")};t("keymap.actions",(e=>{e.videoSpeedIncrease={displayName:"提高倍速",run:e=>(o(e,((e,t)=>{e.setVideoSpeed(t.find((t=>t>e.videoSpeed()))||t[t.length-1])})),!0)},e.videoSpeedDecrease={displayName:"降低倍速",run:e=>(o(e,((e,t)=>{e.setVideoSpeed([...t].reverse().find((t=>t(o(e,(e=>{e.toggleVideoSpeed()})),!0)},r("rememberVideoSpeed").options.individualRemember&&(e.videoSpeedForget={displayName:"清除当前倍速记忆",run:e=>(o(e,(e=>{e.resetVideoSpeed(!0)})),!0)})})),t("keymap.presets",(e=>{e.videoSpeedIncrease="shift > 》 arrowUp",e.videoSpeedDecrease="shift < 《 arrowDown",e.videoSpeedReset="shift ? ?",e.videoSpeedForget="shift : :"}))}},options:{speed:{displayName:"记忆的速度",defaultValue:"1.0",hidden:!0},extend:{displayName:"扩展倍速菜单",defaultValue:!0},extendList:{displayName:"扩展倍速列表",defaultValue:[2.5,3],hidden:!0},individualRemember:{displayName:"各视频分别记忆",defaultValue:!1,hidden:!0},individualRememberList:{displayName:"分别记忆倍速列表",defaultValue:{},hidden:!0}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/remember-speed"]=t():e["video/player/remember-speed"]=t()}(self,(function(){return function(){"use strict";var e,t,n={71:function(e,t,n){n.r(t),n.d(t,{createController:function(){return N}});var r=n(730),i=coreApis.observer,o=n(619);const s=(0,o.cK)(o.VG.custom.active.selector),a=(0,o.cK)(o.VG.custom.show.selector);let d,l,c,u,p,m,f,v=1;const y=e=>{for(const[t,n]of Object.entries(o.YM.individualRememberList))if(n.some((t=>t.toString()===(0,o.yM)(e).toString())))return parseFloat(t);return null},b=()=>o.am?parseFloat(o.YM.speed):null,g=e=>{e=(0,o.yM)(e);let t=-1;for(const n of Object.values(o.YM.individualRememberList))if(t=n.indexOf(e),-1!==t){n.splice(t,1);break}return-1!==t},S=(e,t=!1,n)=>{n=(0,o.yM)(n);(g(n)||t)&&(o.YM.individualRememberList[e]||(o.YM.individualRememberList[e]=[]),o.YM.individualRememberList[e].push(n))},h=e=>p.querySelector(`${o.VG.custom.speedMenuItem.selector}[data-value="${e}"]`),x=e=>e?(h(e)?.click(),e):m.playbackRate,M=x,V=(e=!1)=>{if(e){const e=b();if(!e)return;g(),M(e)}else M(1)},w=(e="smart",t=!1)=>{switch(e){case"smart":1===x()?x(l):V(t);break;case"classic":M(l)}},L=e=>{p.querySelector(`${o.VG.custom.speedMenuItem.selector}[data-value="${x()}"]`)?.classList.remove(s),m.playbackRate=e,p.querySelector(`${o.VG.custom.speedMenuItem.selector}[data-value="${e}"]`)?.classList.add(s),u.classList.remove(a),f.innerText=(0,o.Nq)(e)},E=async()=>{const{getExtraSpeedMenuItemElements:e}=await Promise.resolve().then(n.bind(n,85));p.prepend(...await e()),p.querySelectorAll(`${o.VG.custom.speedMenuItem.selector}[data-value]:not(.extended)`).forEach((e=>{e.style.order=(0,o.dP)(parseFloat(e.getAttribute("data-value")??"1"))})),(0,o.NH)(p,["click",e=>{const t=e.target,n=parseFloat(t.dataset.value);var r;e.target.classList.contains("extended")&&(r=n,o.Tt.includes(r)?h(r)?.click():L(r)),(0,o.aC)().includes(x())&&d===n&&L(n)}])},G=(e,t)=>{const n=o.Tt.includes(t);u.dispatchEvent(new CustomEvent("changed",{detail:{speed:t,isNativeSpeed:n,previousSpeed:e}}))},N=_.once((()=>((0,i.videoChange)((async()=>{(0,o.oG)();const e=await o.VG.custom.speedContainer(),t=await r.playerAgent.query.video.element();if(!e)throw new Error("speed container element not found!");if(!t)throw new Error("video element not found!");var n;u=e,m=t,f=u.querySelector(o.VG.custom.speedNameBtn.selector),p=u.querySelector(o.VG.custom.speedMenuList.selector),await(async()=>{o.YM.extend&&!u.classList.contains("extended")&&(await E(),u.classList.add("extended"))})(),p.querySelectorAll(o.VG.custom.speedMenuItem.selector).forEach((e=>{if(!e.hasAttribute("data-value")){const t=parseFloat(e.textContent).toString();e.setAttribute("data-value",t)}})),d=v,n=G,(0,o.NH)(p,["click",e=>{n(c,parseFloat(e.target.dataset.value??"1"))}]),(0,o.NH)(u,["changed",({detail:{speed:e,isNativeSpeed:t,previousSpeed:n}})=>{c=e,t&&(v=e,d=e),o.YM.extend&&o.Tt.includes(e)&&p.querySelector(`${o.VG.custom.speedMenuItem.selector}.extended${o.VG.custom.active.selector}`)?.classList.remove(s),o.am&&(o.YM.individualRemember?S(e,e!==b()):o.YM.speed=e.toString()),n&&n!==e&&(l=n)}]),setTimeout((()=>{M(o.am&&o.YM.individualRemember&&y()||b()||c)}),100)})),{getSupportedRates:o.V3,getExtendedSupportedRates:o.aC,setVideoSpeed:M,videoSpeed:x,getRememberSpeed:y,rememberSpeed:S,forgetSpeed:g,resetVideoSpeed:V,toggleVideoSpeed:w})))},85:function(e,t,n){n.r(t),n.d(t,{getExtraSpeedMenuItemElements:function(){return l}});var r=coreApis.style,i=coreApis.utils.log,o=n(619);const s=(0,o.cK)(o.VG.custom.speedMenuItem.selector),a=e=>{const t=document.createElement("li");t.innerText=(0,o.Nq)(e),t.classList.add(s,"extended"),t.dataset.value=e.toString(),t.style.order=(0,o.dP)(e);const n=document.createElement("i");return n.classList.add("mdi","mdi-close-circle"),n.addEventListener("click",(()=>{lodash.pull(o.YM.extendList,e),t.remove()})),t.append(n),t},d=e=>{const t=(()=>{const e=(0,o.V3)().slice(-1)[0]+o.hD;return e>o.PW?null:e})();e.setAttribute("min",t?e.value=t.toString():(e.value="",o.uv.toString()))},l=async()=>{(0,r.addStyle)(`\n ${o.VG.custom.speedContainer.selector} ${o.VG.custom.speedMenuItem.selector}:first-child .mdi-playlist-plus {\n font-size: 1.5em;\n }\n ${o.VG.custom.speedContainer.selector} ${o.VG.custom.speedMenuItem.selector}:first-child input {\n font-size: inherit;\n color: inherit;\n line-height: inherit;\n background: transparent;\n outline: none;\n width: 100%;\n border: none;\n text-align: center;\n }\n ${o.VG.custom.speedMenuItem.selector} .mdi-close-circle {\n color: inherit;\n opacity: 0.5;\n display: none;\n position: absolute;\n right: 4px;\n }\n ${o.VG.custom.speedMenuItem.selector}:not(${o.VG.custom.active.selector}):hover .mdi-close-circle {\n display: inline;\n }\n ${o.VG.custom.speedMenuItem.selector} .mdi-close-circle:hover {\n opacity: 1;\n transition: all .3s;\n }\n /* https://stackoverflow.com/a/4298216 */\n /* Chrome */\n .add-speed-entry::-webkit-outer-spin-button,\n .add-speed-entry::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* Firefox */\n .add-speed-entry[type=number] {\n -moz-appearance:textfield;\n }\n ${o.VG.custom.speedMenuList.selector} {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n max-height: 360px;\n }\n `,"extend-video-speed-style");const e=(0,o.aC)().map((e=>a(e))).reverse();return e.unshift((()=>{const e=document.createElement("li");e.classList.add(s);const t=document.createElement("i");t.classList.add("mdi","mdi-playlist-plus");const n=document.createElement("input");return n.classList.add("add-speed-entry"),n.setAttribute("type","number"),n.setAttribute("max",o.PW.toString()),n.setAttribute("step",o.hD.toString()),n.setAttribute("title","增加新的倍速值"),d(n),n.addEventListener("keydown",(t=>{if("Enter"===t.key){const t=parseFloat(n.value);if(!isFinite(t))return(0,i.logError)("无效的倍速值",o.cJ),!1;if(to.PW)return(0,i.logError)("倍速值太大了",o.cJ),!1;if((0,o.V3)().includes(t))return(0,i.logError)("不能重复添加已有的倍速值",o.cJ),!1;o.YM.extendList.push(t),o.YM.extendList=(0,o.uL)(o.YM.extendList);let r=e.nextElementSibling;for(;!r.dataset.value||parseFloat(r.dataset.value)>o.Tt.slice(-1)[0]&&t{d(n),n.style.display="inline",t.style.display="none",n.focus()})),e.addEventListener("mouseleave",(()=>{t.style.display="inline",n.style.display="none"})),e})()),e}},619:function(e,t,n){n.d(t,{NH:function(){return M},dP:function(){return m},am:function(){return y},cJ:function(){return l},VG:function(){return u},Nq:function(){return h},yM:function(){return f},aC:function(){return g},V3:function(){return S},uL:function(){return b},PW:function(){return a},uv:function(){return s},Tt:function(){return c},YM:function(){return v},oG:function(){return V},hD:function(){return d},cK:function(){return p}});var r=n(730),i=n(407),o=coreApis.utils.sort;const s=.0625,a=16,d=.5,l=2e3,c=[.5,.75,1,1.25,1.5,2],u=r.playerAgent.provideCustomQuery({video:{speedMenuList:".bilibili-player-video-btn-speed-menu",speedMenuItem:".bilibili-player-video-btn-speed-menu-list",speedNameBtn:".bilibili-player-video-btn-speed-name",speedContainer:".bilibili-player-video-btn-speed",active:".bilibili-player-active",show:".bilibili-player-speed-show"},bangumi:{speedMenuList:".squirtle-speed-select-list",speedMenuItem:".squirtle-select-item",speedNameBtn:".squirtle-speed-select-result",speedContainer:".squirtle-speed-wrap",active:".active",show:".bilibili-player-speed-show"}}),p=e=>e.replace(/^\./,""),m=e=>(1e4*(a-e)).toString(),f=(e=unsafeWindow.aid)=>{if(!e)throw new Error("aid is unknown");return e},{options:v,enabled:y}=(0,i.getComponentSettings)("rememberVideoSpeed"),b=e=>Array.from(new Set(e)).sort((0,o.ascendingSort)()),g=()=>b(v.extendList),S=()=>v.extend?[...c,...g()].sort((0,o.ascendingSort)()):c,h=e=>1===e?"倍速":Math.trunc(e)===e?`${e}.0x`:`${e}x`,x=new Map,M=(e,t)=>{e.addEventListener(...t),x.set(e,t)},V=()=>x.forEach(((e,t)=>t.removeEventListener(...e)))},730:function(e){e.exports=coreApis.componentApis.video.playerAgent},407:function(e){e.exports=coreApis.settings}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);i.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){s[e]=function(){return n[e]}}));return s.default=function(){return n},i.d(o,s),o},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){i.d(o,{component:function(){return r}});var e=coreApis.componentApis.component,t=coreApis.utils.urls;const n="rememberVideoSpeed",r={name:n,displayName:"倍速记忆",author:{name:"JLoeve",link:"https://github.com/LonelySteve"},description:{"zh-CN":"记忆上次选择的视频播放速度, 还可以使用更多倍速来扩展原生倍速菜单."},tags:[componentsTags.video],urlInclude:t.playerUrls,entry:async()=>(await Promise.resolve().then(i.bind(i,71))).createController(),plugin:{displayName:"倍速记忆 - 快捷键支持",setup:async({addData:t})=>{const{getComponentSettings:r}=await Promise.resolve().then(i.t.bind(i,407,23)),o=async(t,r)=>{const i=(0,e.importComponent)(n);r(i,i.getSupportedRates()),t.showTip(`${i.videoSpeed()}x`,"mdi-fast-forward")};t("keymap.actions",(e=>{e.videoSpeedIncrease={displayName:"提高倍速",run:e=>(o(e,((e,t)=>{e.setVideoSpeed(t.find((t=>t>e.videoSpeed()))||t[t.length-1])})),!0)},e.videoSpeedDecrease={displayName:"降低倍速",run:e=>(o(e,((e,t)=>{e.setVideoSpeed([...t].reverse().find((t=>t(o(e,(e=>{e.toggleVideoSpeed()})),!0)},r("rememberVideoSpeed").options.individualRemember&&(e.videoSpeedForget={displayName:"清除当前倍速记忆",run:e=>(o(e,(e=>{e.resetVideoSpeed(!0)})),!0)})})),t("keymap.presets",(e=>{e.videoSpeedIncrease="shift > 》 arrowUp",e.videoSpeedDecrease="shift < 《 arrowDown",e.videoSpeedReset="shift ? ?",e.videoSpeedForget="shift : :"}))}},options:{speed:{displayName:"记忆的速度",defaultValue:"1.0",hidden:!0},extend:{displayName:"扩展倍速菜单",defaultValue:!0},extendList:{displayName:"扩展倍速列表",defaultValue:[2.5,3],hidden:!0},individualRemember:{displayName:"各视频分别记忆",defaultValue:!1,hidden:!0},individualRememberList:{displayName:"分别记忆倍速列表",defaultValue:{},hidden:!0}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/remove-popup.js b/registry/dist/components/video/player/remove-popup.js index 3a55b7e9a..df9039892 100644 --- a/registry/dist/components/video/player/remove-popup.js +++ b/registry/dist/components/video/player/remove-popup.js @@ -6,4 +6,4 @@ o.i=function(e,t,n){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(n)for(var i=0;iPromise.resolve().then(r.t.bind(r,173,23))),(({settings:e,metadata:t})=>{const{options:n}=e,{kebabCase:r}=lodash;Object.keys(n).forEach((e=>{(0,o.addComponentListener)(`${t.name}.${e}`,(o=>{document.body.classList.toggle(`${r(t.name)}-${r(e)}`,o)}),!0)}))})),displayName:"删除视频弹窗",tags:[componentsTags.video,componentsTags.style],description:{"zh-CN":"删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择."},urlInclude:t.playerUrls,options:{votes:{defaultValue:!1,displayName:"投票"},relatedVideos:{defaultValue:!0,displayName:"关联视频"},comboLikes:{defaultValue:!0,displayName:"关注/三连"},rates:{defaultValue:!0,displayName:"评分"}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var p=this[i][0];null!=p&&(r[p]=!0)}for(var a=0;aPromise.resolve().then(r.t.bind(r,173,23))),(({settings:e,metadata:t})=>{const{options:n}=e,{kebabCase:r}=lodash;Object.keys(n).forEach((e=>{(0,o.addComponentListener)(`${t.name}.${e}`,(o=>{document.body.classList.toggle(`${r(t.name)}-${r(e)}`,o)}),!0)}))})),displayName:"删除视频弹窗",tags:[componentsTags.video,componentsTags.style],description:{"zh-CN":"删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择."},urlInclude:t.playerUrls,options:{votes:{defaultValue:!1,displayName:"投票"},relatedVideos:{defaultValue:!0,displayName:"关联视频"},comboLikes:{defaultValue:!0,displayName:"关注/三连"},rates:{defaultValue:!0,displayName:"评分"}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/screenshot.js b/registry/dist/components/video/player/screenshot.js index 8e588b384..65b0f5027 100644 --- a/registry/dist/components/video/player/screenshot.js +++ b/registry/dist/components/video/player/screenshot.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var o={};if(i)for(var r=0;r=this.video.videoWidth/this.video.videoHeight?(c.height=this.video.videoHeight,c.width=this.video.videoHeight*t):(c.width=this.video.videoWidth,c.height=this.video.videoWidth/t)}else c.width=this.video.videoWidth,c.height=this.video.videoHeight;const t=c.getContext("2d");if(null===t)return void e("视频截图失败: canvas 未创建或创建失败.");const n=(c.width-this.video.videoWidth)/2,r=(c.height-this.video.videoHeight)/2;if(t.drawImage(this.video,n,r),this.withDanmaku){const e=dq("canvas.bilibili-player-video-danmaku, canvas.dm-canvas");null!==e&&t.drawImage(e,0,0,c.width,c.height)}try{c.toBlob((t=>{null!==t?(this.blob=t,this.url=URL.createObjectURL(t)):e("视频截图失败: 创建 blob 失败.")}),"image/png")}catch(t){e("视频截图失败: 操作被浏览器阻止. 这通常发生于电影的试看片段, 请在正片尝试使用截图功能.")}}get filename(){return`${(0,s.getFriendlyTitle)()} @${this.time.replace(/:/g,"-")} ${this.timeStamp.toString()}.png`}get id(){return this.videoTime.toString()+this.timeStamp.toString()}get time(){const e=Math.trunc(this.videoTime/3600).toString(),t=Math.trunc(this.videoTime/60).toString(),n=(this.videoTime%60).toFixed(2);return"0"===e?`${t.padStart(2,"0")}:${n.padStart(5,"0")}`:`${e}:${t.padStart(2,"0")}:${n.padStart(5,"0")}`}revoke(){URL.revokeObjectURL(this.url)}}var l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"video-screenshot-container"},[n("transition-group",{staticClass:"video-screenshot-list",attrs:{name:"video-screenshot-list",tag:"div"}},e._l(e.screenshots,(function(t){return n("VideoScreenshot",{key:t.id,attrs:{filename:t.filename,"object-url":t.url,time:t.time},on:{discard:function(n){return e.discard(t)}}})})),1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showBatch,expression:"showBatch"}],staticClass:"video-screenshot-batch"},[n("button",{on:{click:e.saveAll}},[n("VIcon",{attrs:{size:18,icon:"mdi-content-save"}}),e._v("全部保存\n ")],1),e._v(" "),n("button",{on:{click:e.discardAll}},[n("VIcon",{attrs:{size:18,icon:"mdi-delete-forever"}}),e._v("全部丢弃\n ")],1)])],1)};l._withStripped=!0;var h=coreApis.download,u=coreApis.ui,v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"video-screenshot-thumbnail"},[e.objectUrl?n("img",{attrs:{src:e.objectUrl}}):e._e(),e._v(" "),e.objectUrl?n("div",{staticClass:"mask"},[n("a",{ref:"link",staticClass:"link",staticStyle:{display:"none"},attrs:{href:e.objectUrl,download:e.filename}}),e._v(" "),n("button",{staticClass:"save",attrs:{title:"保存"},on:{click:e.save}},[n("VIcon",{attrs:{size:28,icon:"mdi-content-save-outline"}})],1),e._v(" "),n("button",{staticClass:"discard",attrs:{title:"丢弃"},on:{click:e.discard}},[n("VIcon",{attrs:{size:28,icon:"mdi-delete-forever-outline"}})],1),e._v(" "),n("span",{staticClass:"time"},[e._v(e._s(e.time))])]):n("div",{staticClass:"loading",on:{click:e.discard}})])};v._withStripped=!0;var p=Vue.extend({components:{VIcon:u.VIcon},props:{objectUrl:{type:String,required:!0},filename:{type:String,required:!0},time:{type:String,required:!0}},methods:{discard(){this.$emit("discard")},save(){this.$refs.link.click(),this.discard()}}}),f=o(379),m=o.n(f),b=o(686),g=o.n(b),y={insert:"head",singleton:!1};m()(g(),y),g().locals;function w(e,t,n,i,o,r,s,a){var c,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},d._ssrRegister=c):o&&(c=a?function(){o.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(e,t){return c.call(t),l(e,t)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,c):[c]}return{exports:e,options:d}}var x=w(p,v,[],!1,null,null,null);x.options.__file="registry/lib/components/video/player/screenshot/VideoScreenshot.vue";var k=x.exports,_=Vue.extend({components:{VIcon:u.VIcon,VideoScreenshot:k},data:()=>({screenshots:[]}),computed:{showBatch(){return this.screenshots.length>=2}},methods:{discard(e){this.screenshots.splice(this.screenshots.indexOf(e),1),e.revoke()},async saveAll(){const e=new h.DownloadPackage;this.screenshots.forEach((t=>{e.add(t.filename,t.blob,{date:new Date(t.timeStamp)})})),await e.emit(`${(0,s.getFriendlyTitle)()}.zip`),this.discardAll()},discardAll(){this.screenshots.forEach((e=>e.revoke())),this.screenshots=[]}}}),S=o(938),C=o.n(S),j={insert:"head",singleton:!1},A=(m()(C(),j),C().locals,w(_,l,[],!1,null,null,null));A.options.__file="registry/lib/components/video/player/screenshot/VideoScreenshotContainer.vue";var T=A.exports;const O="video-screenshot-disable",$={name:"videoScreenshot",displayName:"启用视频截图",tags:[componentsTags.video],entry:async()=>{let n;(0,e.addControlBarButton)({name:"takeScreenshot",displayName:"截图",icon:"mdi-camera",order:0,action:async e=>{const{playerAgent:i}=await Promise.resolve().then(o.t.bind(o,730,23)),r=((e,t=!1)=>{const n=e.currentTime;return new d(e,n,t)})(await i.query.video.element(),e.shiftKey);n||(n=(0,t.mountVueComponent)(T),document.body.insertAdjacentElement("beforeend",n.$el)),n.screenshots.unshift(r)}})},description:{"zh-CN":"启用视频快速截图, 将在播放器的时间右边增加一个截图按钮. 装有 `快捷键扩展` 时支持键盘快捷键Ctrl+Alt+C."},urlInclude:n.playerUrls,reload:()=>document.body.classList.remove(O),unload:()=>document.body.classList.add(O),plugin:{displayName:"视频截图 - 快捷键支持",setup:({addData:e})=>{e("keymap.actions",(e=>{e.takeScreenshot={displayName:"视频截图",run:e=>{const{clickElement:t}=e;return t('.be-video-control-bar-extend [data-name="takeScreenshot"]',e)}}})),e("keymap.presets",(e=>{e.takeScreenshot="ctrl [shift] alt c"}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function a(e){for(var t=-1,n=0;n=this.video.videoWidth/this.video.videoHeight?(c.height=this.video.videoHeight,c.width=this.video.videoHeight*t):(c.width=this.video.videoWidth,c.height=this.video.videoWidth/t)}else c.width=this.video.videoWidth,c.height=this.video.videoHeight;const t=c.getContext("2d");if(null===t)return void e("视频截图失败: canvas 未创建或创建失败.");const n=(c.width-this.video.videoWidth)/2,r=(c.height-this.video.videoHeight)/2;if(t.drawImage(this.video,n,r),this.withDanmaku){const e=dq("canvas.bilibili-player-video-danmaku, canvas.dm-canvas");null!==e&&t.drawImage(e,0,0,c.width,c.height)}try{c.toBlob((t=>{null!==t?(this.blob=t,this.url=URL.createObjectURL(t)):e("视频截图失败: 创建 blob 失败.")}),"image/png")}catch(t){e("视频截图失败: 操作被浏览器阻止. 这通常发生于电影的试看片段, 请在正片尝试使用截图功能.")}}get filename(){return`${(0,s.getFriendlyTitle)()} @${this.time.replace(/:/g,"-")} ${this.timeStamp.toString()}.png`}get id(){return this.videoTime.toString()+this.timeStamp.toString()}get time(){const e=Math.trunc(this.videoTime/3600).toString(),t=Math.trunc(this.videoTime/60).toString(),n=(this.videoTime%60).toFixed(2);return"0"===e?`${t.padStart(2,"0")}:${n.padStart(5,"0")}`:`${e}:${t.padStart(2,"0")}:${n.padStart(5,"0")}`}revoke(){URL.revokeObjectURL(this.url)}}var l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"video-screenshot-container"},[n("transition-group",{staticClass:"video-screenshot-list",attrs:{name:"video-screenshot-list",tag:"div"}},e._l(e.screenshots,(function(t){return n("VideoScreenshot",{key:t.id,attrs:{filename:t.filename,"object-url":t.url,time:t.time},on:{discard:function(n){return e.discard(t)}}})})),1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showBatch,expression:"showBatch"}],staticClass:"video-screenshot-batch"},[n("button",{on:{click:e.saveAll}},[n("VIcon",{attrs:{size:18,icon:"mdi-content-save"}}),e._v("全部保存\n ")],1),e._v(" "),n("button",{on:{click:e.discardAll}},[n("VIcon",{attrs:{size:18,icon:"mdi-delete-forever"}}),e._v("全部丢弃\n ")],1)])],1)};l._withStripped=!0;var h=coreApis.download,u=coreApis.ui,v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"video-screenshot-thumbnail"},[e.objectUrl?n("img",{attrs:{src:e.objectUrl}}):e._e(),e._v(" "),e.objectUrl?n("div",{staticClass:"mask"},[n("a",{ref:"link",staticClass:"link",staticStyle:{display:"none"},attrs:{href:e.objectUrl,download:e.filename}}),e._v(" "),n("button",{staticClass:"save",attrs:{title:"保存"},on:{click:e.save}},[n("VIcon",{attrs:{size:28,icon:"mdi-content-save-outline"}})],1),e._v(" "),n("button",{staticClass:"discard",attrs:{title:"丢弃"},on:{click:e.discard}},[n("VIcon",{attrs:{size:28,icon:"mdi-delete-forever-outline"}})],1),e._v(" "),n("span",{staticClass:"time"},[e._v(e._s(e.time))])]):n("div",{staticClass:"loading",on:{click:e.discard}})])};v._withStripped=!0;var p=Vue.extend({components:{VIcon:u.VIcon},props:{objectUrl:{type:String,required:!0},filename:{type:String,required:!0},time:{type:String,required:!0}},methods:{discard(){this.$emit("discard")},save(){this.$refs.link.click(),this.discard()}}}),f=o(379),m=o.n(f),b=o(686),g=o.n(b),y={insert:"head",singleton:!1};m()(g(),y),g().locals;function w(e,t,n,i,o,r,s,a){var c,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},d._ssrRegister=c):o&&(c=a?function(){o.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(e,t){return c.call(t),l(e,t)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,c):[c]}return{exports:e,options:d}}var x=w(p,v,[],!1,null,null,null);x.options.__file="registry/lib/components/video/player/screenshot/VideoScreenshot.vue";var k=x.exports,_=Vue.extend({components:{VIcon:u.VIcon,VideoScreenshot:k},data:()=>({screenshots:[]}),computed:{showBatch(){return this.screenshots.length>=2}},methods:{discard(e){this.screenshots.splice(this.screenshots.indexOf(e),1),e.revoke()},async saveAll(){const e=new h.DownloadPackage;this.screenshots.forEach((t=>{e.add(t.filename,t.blob,{date:new Date(t.timeStamp)})})),await e.emit(`${(0,s.getFriendlyTitle)()}.zip`),this.discardAll()},discardAll(){this.screenshots.forEach((e=>e.revoke())),this.screenshots=[]}}}),S=o(938),C=o.n(S),j={insert:"head",singleton:!1},A=(m()(C(),j),C().locals,w(_,l,[],!1,null,null,null));A.options.__file="registry/lib/components/video/player/screenshot/VideoScreenshotContainer.vue";var T=A.exports;const O="video-screenshot-disable",$={name:"videoScreenshot",displayName:"启用视频截图",tags:[componentsTags.video],entry:async()=>{let n;(0,e.addControlBarButton)({name:"takeScreenshot",displayName:"截图",icon:"mdi-camera",order:0,action:async e=>{const{playerAgent:i}=await Promise.resolve().then(o.t.bind(o,730,23)),r=((e,t=!1)=>{const n=e.currentTime;return new d(e,n,t)})(await i.query.video.element(),e.shiftKey);n||(n=(0,t.mountVueComponent)(T),document.body.insertAdjacentElement("beforeend",n.$el)),n.screenshots.unshift(r)}})},description:{"zh-CN":"启用视频快速截图, 将在播放器的时间右边增加一个截图按钮. 装有 `快捷键扩展` 时支持键盘快捷键Ctrl+Alt+C."},urlInclude:n.playerUrls,reload:()=>document.body.classList.remove(O),unload:()=>document.body.classList.add(O),plugin:{displayName:"视频截图 - 快捷键支持",setup:({addData:e})=>{e("keymap.actions",(e=>{e.takeScreenshot={displayName:"视频截图",run:e=>{const{clickElement:t}=e;return t('.be-video-control-bar-extend [data-name="takeScreenshot"]',e)}}})),e("keymap.presets",(e=>{e.takeScreenshot="ctrl [shift] alt c"}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/seek-by-frames.js b/registry/dist/components/video/player/seek-by-frames.js index 94cdfe6f3..e615a1c1f 100644 --- a/registry/dist/components/video/player/seek-by-frames.js +++ b/registry/dist/components/video/player/seek-by-frames.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/seek-by-frames"]=t():e["video/player/seek-by-frames"]=t()}(self,(function(){return function(){"use strict";var e,t,n={730:function(e){e.exports=coreApis.componentApis.video.playerAgent}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){i[e]=function(){return n[e]}}));return i.default=function(){return n},o.d(a,i),a},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){o.d(a,{component:function(){return c}});var e=coreApis.componentApis.video.videoControlBar,t=coreApis.observer,n=coreApis.utils,r=coreApis.utils.urls,i=coreApis.pluginApis.data;const s="seek-by-frame-disable",c={name:"seekByFrames",displayName:"启用逐帧调整",tags:[componentsTags.video],description:{"zh-CN":"在播放器的时间右边增加两个按钮, 用于**较精细**调整视频时间. 装有 `快捷键扩展` 时支持键盘快捷键Shift+/.\n\n> 注: `视频的实际播放帧率`跟`视频本身的帧率`和`显示器的刷新率`有关, 很难计算一个精准的数值, 部分视频仍然会有暂停不到那种一闪而过的图的情况."},entry:async()=>{await(0,n.playerReady)();const{playerAgent:r}=await Promise.resolve().then(o.t.bind(o,730,23));(0,i.addData)("ui.icons",(e=>{e["seek-left"]='\n\x3c!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n\n\n\t\n\n\n\n',e["seek-right"]='\n\x3c!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n\n\n\t\n\n\n\n'}));let a=0;(0,t.attributesSubtree)(`${r.query.control.buttons.quality.selector} ul`,(()=>{const e=dq(`${r.query.control.buttons.quality.selector} .bui-select-item-active, ${r.query.control.buttons.quality.selector} .active`),t=e?parseInt(e.getAttribute("data-value")):0,n=(()=>{switch(t){case 116:case 74:return 6e4/1001;default:return 3e4/1001}})();a=1/n}));const s=e=>{r.changeTime(e*a)};(0,e.addControlBarButton)({name:"seekPrevFrame",displayName:"上一帧",icon:"seek-left",order:1,action:()=>{s(-1)}}),(0,e.addControlBarButton)({name:"seekNextFrame",displayName:"下一帧",icon:"seek-right",order:2,action:()=>{s(1)}})},reload:()=>document.body.classList.remove(s),unload:()=>document.body.classList.add(s),urlInclude:r.playerUrls,plugin:{displayName:"逐帧调整 - 快捷键支持",setup:()=>{(0,i.addData)("keymap.actions",(e=>{e.previousFrame={displayName:"上一帧",run:e=>{const{clickElement:t}=e;return t('.be-video-control-bar-extend [data-name="seekPrevFrame"]',e)}},e.nextFrame={displayName:"下一帧",run:e=>{const{clickElement:t}=e;return t('.be-video-control-bar-extend [data-name="seekNextFrame"]',e)}}})),(0,i.addData)("keymap.presets",(e=>{e.previousFrame="shift arrowLeft",e.nextFrame="shift arrowRight"}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),a=a.component}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/player/seek-by-frames"]=t():e["video/player/seek-by-frames"]=t()}(self,(function(){return function(){"use strict";var e,t,n={730:function(e){e.exports=coreApis.componentApis.video.playerAgent}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){i[e]=function(){return n[e]}}));return i.default=function(){return n},o.d(a,i),a},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){o.d(a,{component:function(){return c}});var e=coreApis.componentApis.video.videoControlBar,t=coreApis.observer,n=coreApis.utils,r=coreApis.utils.urls,i=coreApis.pluginApis.data;const s="seek-by-frame-disable",c={name:"seekByFrames",displayName:"启用逐帧调整",tags:[componentsTags.video],description:{"zh-CN":"在播放器的时间右边增加两个按钮, 用于**较精细**调整视频时间. 装有 `快捷键扩展` 时支持键盘快捷键Shift+/.\n\n> 注: `视频的实际播放帧率`跟`视频本身的帧率`和`显示器的刷新率`有关, 很难计算一个精准的数值, 部分视频仍然会有暂停不到那种一闪而过的图的情况."},entry:async()=>{await(0,n.playerReady)();const{playerAgent:r}=await Promise.resolve().then(o.t.bind(o,730,23));(0,i.addData)("ui.icons",(e=>{e["seek-left"]='\n\x3c!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n\n\n\t\n\n\n\n',e["seek-right"]='\n\x3c!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n\n\n\t\n\n\n\n'}));let a=0;(0,t.attributesSubtree)(`${r.query.control.buttons.quality.selector} ul`,(()=>{const e=dq(`${r.query.control.buttons.quality.selector} .bui-select-item-active, ${r.query.control.buttons.quality.selector} .active`),t=e?parseInt(e.getAttribute("data-value")):0,n=(()=>{switch(t){case 116:case 74:return 6e4/1001;default:return 3e4/1001}})();a=1/n}));const s=e=>{r.changeTime(e*a)};(0,e.addControlBarButton)({name:"seekPrevFrame",displayName:"上一帧",icon:"seek-left",order:1,action:()=>{s(-1)}}),(0,e.addControlBarButton)({name:"seekNextFrame",displayName:"下一帧",icon:"seek-right",order:2,action:()=>{s(1)}})},reload:()=>document.body.classList.remove(s),unload:()=>document.body.classList.add(s),urlInclude:r.playerUrls,plugin:{displayName:"逐帧调整 - 快捷键支持",setup:()=>{(0,i.addData)("keymap.actions",(e=>{e.previousFrame={displayName:"上一帧",run:e=>{const{clickElement:t}=e;return t('.be-video-control-bar-extend [data-name="seekPrevFrame"]',e)}},e.nextFrame={displayName:"下一帧",run:e=>{const{clickElement:t}=e;return t('.be-video-control-bar-extend [data-name="seekNextFrame"]',e)}}})),(0,i.addData)("keymap.presets",(e=>{e.previousFrame="shift arrowLeft",e.nextFrame="shift arrowRight"}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),a=a.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/show-cover.js b/registry/dist/components/video/player/show-cover.js index 32dc74c7f..03f157906 100644 --- a/registry/dist/components/video/player/show-cover.js +++ b/registry/dist/components/video/player/show-cover.js @@ -7,4 +7,4 @@ t.i=function(e,o,n){"string"==typeof e&&( e=[[null,e,""]]);var r={};if(n)for(var i=0;i{let n;// eslint-disable-next-line prefer-arrow-callback -(0,o.createHook)((0,o.isBwpVideo)()?BwpElement.prototype:HTMLVideoElement.prototype,"play",(function(){return document.body.style.removeProperty("--cover-url"),!0}));(0,e.videoChange)((async()=>{const e=await(0,t.select)((()=>unsafeWindow.aid));if(!e)return void console.warn("[播放前显示封面] 未找到av号");if(e===n)return;n=e;const{VideoInfo:o}=await Promise.resolve().then(r.t.bind(r,705,23)),i=new o(e);await i.fetchInfo(),document.body.style.setProperty("--cover-url",`url('${i.coverUrl}')`)}))},instantStyles:[{name:"showCoverBeforePlay",style:()=>Promise.resolve().then(r.t.bind(r,879,23))}],description:{"zh-CN":"在视频开始播放前, 在播放器中显示封面."},tags:[componentsTags.video],commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +(0,o.createHook)((0,o.isBwpVideo)()?BwpElement.prototype:HTMLVideoElement.prototype,"play",(function(){return document.body.style.removeProperty("--cover-url"),!0}));(0,e.videoChange)((async()=>{const e=await(0,t.select)((()=>unsafeWindow.aid));if(!e)return void console.warn("[播放前显示封面] 未找到av号");if(e===n)return;n=e;const{VideoInfo:o}=await Promise.resolve().then(r.t.bind(r,705,23)),i=new o(e);await i.fetchInfo(),document.body.style.setProperty("--cover-url",`url('${i.coverUrl}')`)}))},instantStyles:[{name:"showCoverBeforePlay",style:()=>Promise.resolve().then(r.t.bind(r,879,23))}],description:{"zh-CN":"在视频开始播放前, 在播放器中显示封面."},tags:[componentsTags.video],commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/player/skip-charge-list.js b/registry/dist/components/video/player/skip-charge-list.js index 9999c0ae9..c6867bee6 100644 --- a/registry/dist/components/video/player/skip-charge-list.js +++ b/registry/dist/components/video/player/skip-charge-list.js @@ -6,4 +6,4 @@ t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var r={};if(o)for(var i=0;iPromise.resolve().then(r.t.bind(r,888,23))),(async()=>{const{videoChange:e}=await Promise.resolve().then(r.t.bind(r,156,23)),{select:t}=await Promise.resolve().then(r.t.bind(r,569,23));e((async()=>{(await t("video"))?.addEventListener("ended",(async()=>{if(document.body.classList.contains(n))return;(await t(".bilibili-player-electric-panel-jump"))?.click()}))}))})),c={name:"skipChargeList",displayName:"跳过充电鸣谢",tags:[componentsTags.video],entry:o,description:{"zh-CN":"自动跳过视频结尾的充电鸣谢. 注意: 不包括番剧承包鸣谢."},reload:()=>document.body.classList.remove(n),unload:()=>document.body.classList.add(n),urlInclude:t.playerUrls,commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.component}()})); \ No newline at end of file +var c=this[i][0];null!=c&&(r[c]=!0)}for(var s=0;sPromise.resolve().then(r.t.bind(r,888,23))),(async()=>{const{videoChange:e}=await Promise.resolve().then(r.t.bind(r,156,23)),{select:t}=await Promise.resolve().then(r.t.bind(r,569,23));e((async()=>{(await t("video"))?.addEventListener("ended",(async()=>{if(document.body.classList.contains(n))return;(await t(".bilibili-player-electric-panel-jump"))?.click()}))}))})),c={name:"skipChargeList",displayName:"跳过充电鸣谢",tags:[componentsTags.video],entry:o,description:{"zh-CN":"自动跳过视频结尾的充电鸣谢. 注意: 不包括番剧承包鸣谢."},reload:()=>document.body.classList.remove(n),unload:()=>document.body.classList.add(n),urlInclude:t.playerUrls,commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/quick-favorite.js b/registry/dist/components/video/quick-favorite.js index f0872ff90..103b73de1 100644 --- a/registry/dist/components/video/quick-favorite.js +++ b/registry/dist/components/video/quick-favorite.js @@ -9,4 +9,4 @@ A=[[null,A,""]]);var n={};if(i)for(var o=0;o({aid:unsafeWindow.aid,favoriteTitle:"",isFavorite:!1,tipText:"",tipShowing:!1,tipHandle:0,lists:[],selectedFavorite:"<未选择>",listShowing:!1}),watch:{selectedFavorite(A){if(0===this.lists.length)return;const{lists:t}=this,e=t.find((t=>t.title===A));e?(l.favoriteFolderID=e.id,this.syncFavoriteState()):console.error("list not found in selectedFavorite(value)")},async listShowing(A){if(A&&(document.addEventListener("click",(A=>{const t=this.$el,e=A.target;e===t||t.contains(e)||(this.listShowing=!1)})),0===this.lists.length))try{const A=await(0,o.getJsonWithCredentials)(`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${(0,r.getUID)()}&is_space=0`);if(0!==A.code)throw new Error(`获取收藏夹列表失败: ${A.message}`);this.lists=lodash.get(A,"data.list",[])}catch(A){(0,a.logError)(A)}}},created(){this.syncFavoriteState()},methods:{async syncFavoriteState(){if(0!==l.favoriteFolderID)try{const A=await(0,o.getJsonWithCredentials)(`https://api.bilibili.com/x/v3/fav/folder/created/list-all?type=2&rid=${this.aid}&up_mid=${(0,r.getUID)()}`);if(0!==A.code)throw new Error(`获取收藏状态失败: ${A.message}`);const t=lodash.get(A,"data.list",[]).find((A=>A.id===l.favoriteFolderID));if(void 0===t)return void(l.favoriteFolderID=0);this.isFavorite=Boolean(t.fav_state),this.favoriteTitle=t.title,this.selectedFavorite=t.title}catch(A){(0,a.logError)(A)}},showTip(A){this.tipText=A,this.tipShowing=!0,this.tipHandle&&clearTimeout(this.tipHandle),this.tipHandle=setTimeout((()=>{this.tipShowing=!1}),2e3)},async toggle(){if(0===l.favoriteFolderID)return void(this.listShowing=!0);const A={rid:this.aid,type:2,add_media_ids:"",del_media_ids:"",csrf:(0,r.getCsrf)()};A[this.isFavorite?"del_media_ids":"add_media_ids"]=l.favoriteFolderID.toString();try{await(0,o.postTextWithCredentials)("https://api.bilibili.com/x/v3/fav/resource/deal",Object.entries(A).map((([A,t])=>`${A}=${t}`)).join("&")),this.isFavorite=!this.isFavorite,this.showTip(this.isFavorite?`已添加至收藏夹: ${this.favoriteTitle}`:`已移出收藏夹: ${this.favoriteTitle}`)}catch(A){s.Toast.error(`快速收藏失败: ${A.message}`,"快速收藏"),console.error(A)}}}}),u=e(379),f=e.n(u),p=e(708),v=e.n(p),g={insert:"head",singleton:!1};f()(v(),g),v().locals;var h=function(A,t,e,i,n,o,r,a){var s,c="function"==typeof A?A.options:A;if(t&&(c.render=t,c.staticRenderFns=e,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),r?(s=function(A){(A=A||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(A=__VUE_SSR_CONTEXT__),n&&n.call(this,A),A&&A._registeredComponents&&A._registeredComponents.add(r)},c._ssrRegister=s):n&&(s=a?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),s)if(c.functional){c._injectStyles=s;var l=c.render;c.render=function(A,t){return s.call(t),l(A,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,s):[s]}return{exports:A,options:c}}(d,i,[],!1,null,null,null);h.options.__file="registry/lib/components/video/quick-favorite/QuickFavorite.vue";var m=h.exports},156:function(A){"use strict";A.exports=coreApis.observer},109:function(A){"use strict";A.exports=coreApis.utils}},i={};function n(A){var t=i[A];if(void 0!==t)return t.exports;var o=i[A]={id:A,exports:{}};return e[A](o,o.exports,n),o.exports}n.n=function(A){var t=A&&A.__esModule?function(){return A.default}:function(){return A};return n.d(t,{a:t}),t},t=Object.getPrototypeOf?function(A){return Object.getPrototypeOf(A)}:function(A){return A.__proto__},n.t=function(e,i){if(1&i&&(e=this(e)),8&i)return e;if("object"==typeof e&&e){if(4&i&&e.__esModule)return e;if(16&i&&"function"==typeof e.then)return e}var o=Object.create(null);n.r(o);var r={};A=A||[null,t({}),t([]),t(t)];for(var a=2&i&&e;"object"==typeof a&&!~A.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(A){r[A]=function(){return e[A]}}));return r.default=function(){return e},n.d(o,r),o},n.d=function(A,t){for(var e in t)n.o(t,e)&&!n.o(A,e)&&Object.defineProperty(A,e,{enumerable:!0,get:t[e]})},n.o=function(A,t){return Object.prototype.hasOwnProperty.call(A,t)},n.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var o={};return function(){"use strict";n.d(o,{component:function(){return t}});var A=coreApis.utils.urls;const t={name:"quickFavorite",displayName:"启用快速收藏",description:{"zh-CN":"启用快速收藏, 在视频页面可以一键收藏到设定的某个收藏夹. 首次启动时或者右键点击快速收藏图标可以配置快速收藏夹."},entry:async()=>{const{playerReady:A,mountVueComponent:t,getUID:e}=await Promise.resolve().then(n.t.bind(n,109,23));if(!e())return;await A();const i=dq(".video-toolbar .ops .collect");if(!i)return;const o=await Promise.resolve().then(n.bind(n,123));let r;const{videoChange:a}=await Promise.resolve().then(n.t.bind(n,156,23));a((()=>{r||(r=t(o),i.insertAdjacentElement("afterend",r.$el)),r.aid=unsafeWindow.aid,r.syncFavoriteState()}))},unload:()=>{dqa(".ops .quick-favorite").forEach((A=>A.style.display="none"))},reload:()=>{dqa(".ops .quick-favorite").forEach((A=>A.style.display="inline-block"))},urlInclude:A.videoUrls,urlExclude:A.favoriteListUrls,tags:[componentsTags.video],options:{favoriteFolderID:{defaultValue:0,displayName:"快速收藏夹ID",hidden:!0}},plugin:{displayName:"快速收藏 - 快捷键支持",setup:({addData:A})=>{A("keymap.actions",(A=>{A.quickFavorite={displayName:"快速收藏",run:A=>{const{clickElement:t}=A;return t(".quick-favorite",A)}}})),A("keymap.presets",(A=>{A.quickFavorite="shift s"}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.component}()})); \ No newline at end of file +i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var A={};return function(t){if(void 0===A[t]){var e=document.querySelector(t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(A){e=null}A[t]=e}return A[t]}}(),r=[];function a(A){for(var t=-1,e=0;e({aid:unsafeWindow.aid,favoriteTitle:"",isFavorite:!1,tipText:"",tipShowing:!1,tipHandle:0,lists:[],selectedFavorite:"<未选择>",listShowing:!1}),watch:{selectedFavorite(A){if(0===this.lists.length)return;const{lists:t}=this,e=t.find((t=>t.title===A));e?(l.favoriteFolderID=e.id,this.syncFavoriteState()):console.error("list not found in selectedFavorite(value)")},async listShowing(A){if(A&&(document.addEventListener("click",(A=>{const t=this.$el,e=A.target;e===t||t.contains(e)||(this.listShowing=!1)})),0===this.lists.length))try{const A=await(0,o.getJsonWithCredentials)(`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${(0,r.getUID)()}&is_space=0`);if(0!==A.code)throw new Error(`获取收藏夹列表失败: ${A.message}`);this.lists=lodash.get(A,"data.list",[])}catch(A){(0,a.logError)(A)}}},created(){this.syncFavoriteState()},methods:{async syncFavoriteState(){if(0!==l.favoriteFolderID)try{const A=await(0,o.getJsonWithCredentials)(`https://api.bilibili.com/x/v3/fav/folder/created/list-all?type=2&rid=${this.aid}&up_mid=${(0,r.getUID)()}`);if(0!==A.code)throw new Error(`获取收藏状态失败: ${A.message}`);const t=lodash.get(A,"data.list",[]).find((A=>A.id===l.favoriteFolderID));if(void 0===t)return void(l.favoriteFolderID=0);this.isFavorite=Boolean(t.fav_state),this.favoriteTitle=t.title,this.selectedFavorite=t.title}catch(A){(0,a.logError)(A)}},showTip(A){this.tipText=A,this.tipShowing=!0,this.tipHandle&&clearTimeout(this.tipHandle),this.tipHandle=setTimeout((()=>{this.tipShowing=!1}),2e3)},async toggle(){if(0===l.favoriteFolderID)return void(this.listShowing=!0);const A={rid:this.aid,type:2,add_media_ids:"",del_media_ids:"",csrf:(0,r.getCsrf)()};A[this.isFavorite?"del_media_ids":"add_media_ids"]=l.favoriteFolderID.toString();try{await(0,o.postTextWithCredentials)("https://api.bilibili.com/x/v3/fav/resource/deal",Object.entries(A).map((([A,t])=>`${A}=${t}`)).join("&")),this.isFavorite=!this.isFavorite,this.showTip(this.isFavorite?`已添加至收藏夹: ${this.favoriteTitle}`:`已移出收藏夹: ${this.favoriteTitle}`)}catch(A){s.Toast.error(`快速收藏失败: ${A.message}`,"快速收藏"),console.error(A)}}}}),u=e(379),f=e.n(u),p=e(708),v=e.n(p),g={insert:"head",singleton:!1};f()(v(),g),v().locals;var h=function(A,t,e,i,n,o,r,a){var s,c="function"==typeof A?A.options:A;if(t&&(c.render=t,c.staticRenderFns=e,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),r?(s=function(A){(A=A||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(A=__VUE_SSR_CONTEXT__),n&&n.call(this,A),A&&A._registeredComponents&&A._registeredComponents.add(r)},c._ssrRegister=s):n&&(s=a?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),s)if(c.functional){c._injectStyles=s;var l=c.render;c.render=function(A,t){return s.call(t),l(A,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,s):[s]}return{exports:A,options:c}}(d,i,[],!1,null,null,null);h.options.__file="registry/lib/components/video/quick-favorite/QuickFavorite.vue";var m=h.exports},156:function(A){"use strict";A.exports=coreApis.observer},109:function(A){"use strict";A.exports=coreApis.utils}},i={};function n(A){var t=i[A];if(void 0!==t)return t.exports;var o=i[A]={id:A,exports:{}};return e[A](o,o.exports,n),o.exports}n.n=function(A){var t=A&&A.__esModule?function(){return A.default}:function(){return A};return n.d(t,{a:t}),t},t=Object.getPrototypeOf?function(A){return Object.getPrototypeOf(A)}:function(A){return A.__proto__},n.t=function(e,i){if(1&i&&(e=this(e)),8&i)return e;if("object"==typeof e&&e){if(4&i&&e.__esModule)return e;if(16&i&&"function"==typeof e.then)return e}var o=Object.create(null);n.r(o);var r={};A=A||[null,t({}),t([]),t(t)];for(var a=2&i&&e;"object"==typeof a&&!~A.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(A){r[A]=function(){return e[A]}}));return r.default=function(){return e},n.d(o,r),o},n.d=function(A,t){for(var e in t)n.o(t,e)&&!n.o(A,e)&&Object.defineProperty(A,e,{enumerable:!0,get:t[e]})},n.o=function(A,t){return Object.prototype.hasOwnProperty.call(A,t)},n.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var o={};return function(){"use strict";n.d(o,{component:function(){return t}});var A=coreApis.utils.urls;const t={name:"quickFavorite",displayName:"启用快速收藏",description:{"zh-CN":"启用快速收藏, 在视频页面可以一键收藏到设定的某个收藏夹. 首次启动时或者右键点击快速收藏图标可以配置快速收藏夹."},entry:async()=>{const{playerReady:A,mountVueComponent:t,getUID:e}=await Promise.resolve().then(n.t.bind(n,109,23));if(!e())return;await A();const i=dq(".video-toolbar .ops .collect");if(!i)return;const o=await Promise.resolve().then(n.bind(n,123));let r;const{videoChange:a}=await Promise.resolve().then(n.t.bind(n,156,23));a((()=>{r||(r=t(o),i.insertAdjacentElement("afterend",r.$el)),r.aid=unsafeWindow.aid,r.syncFavoriteState()}))},unload:()=>{dqa(".ops .quick-favorite").forEach((A=>A.style.display="none"))},reload:()=>{dqa(".ops .quick-favorite").forEach((A=>A.style.display="inline-block"))},urlInclude:A.videoUrls,urlExclude:A.favoriteListUrls,tags:[componentsTags.video],options:{favoriteFolderID:{defaultValue:0,displayName:"快速收藏夹ID",hidden:!0}},plugin:{displayName:"快速收藏 - 快捷键支持",setup:({addData:A})=>{A("keymap.actions",(A=>{A.quickFavorite={displayName:"快速收藏",run:A=>{const{clickElement:t}=A;return t(".quick-favorite",A)}}})),A("keymap.presets",(A=>{A.quickFavorite="shift s"}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/seo-redirect.js b/registry/dist/components/video/seo-redirect.js index ead6a0067..8ab539caa 100644 --- a/registry/dist/components/video/seo-redirect.js +++ b/registry/dist/components/video/seo-redirect.js @@ -1 +1 @@ -!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["video/seo-redirect"]=o():e["video/seo-redirect"]=o()}(self,(function(){return function(){"use strict";var e={d:function(o,t){for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)}},o={};e.d(o,{component:function(){return t}});const t={name:"seoRedirect",displayName:"SEO 页面重定向",entry:()=>{window.location.assign(document.URL.replace("/s/","/"))},urlInclude:["//www.bilibili.com/s/video/"],tags:[componentsTags.video],description:{"zh-CN":"进入 SEO 视频页面时 (`https://www.bilibili.com/s/video/`) 自动跳转到原视频页面."},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return o=o.component}()})); \ No newline at end of file +!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["video/seo-redirect"]=o():e["video/seo-redirect"]=o()}(self,(function(){return function(){"use strict";var e={d:function(o,t){for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)}},o={};e.d(o,{component:function(){return t}});const t={name:"seoRedirect",displayName:"SEO 页面重定向",entry:()=>{window.location.assign(document.URL.replace("/s/","/"))},urlInclude:["//www.bilibili.com/s/video/"],tags:[componentsTags.video],description:{"zh-CN":"进入 SEO 视频页面时 (`https://www.bilibili.com/s/video/`) 自动跳转到原视频页面."},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return o=o.component}()})); \ No newline at end of file diff --git a/registry/dist/components/video/subtitle/download.js b/registry/dist/components/video/subtitle/download.js index f85d5359c..d0e8f7b35 100644 --- a/registry/dist/components/video/subtitle/download.js +++ b/registry/dist/components/video/subtitle/download.js @@ -9,4 +9,4 @@ t=[[null,t,""]]);var o={};if(i)for(var r=0;r{t.subtitle=''}));var u=Vue.extend({components:{DefaultWidget:r.DefaultWidget},data:()=>({disabled:!1}),methods:{async download(t){try{this.disabled=!0;const e=await(0,c.mE)(t);l.DownloadPackage.single(`${(0,s.getFriendlyTitle)(!0)}.${t}`,e)}catch(t){(0,a.logError)(t)}finally{this.disabled=!1}}}}),d=(0,n(900).Z)(u,i,[],!1,null,null,null);d.options.__file="registry/lib/components/video/subtitle/download/DownloadSubtitle.vue";var f=d.exports},623:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"download-subtitle-config download-video-config-section"},[n("div",{staticClass:"download-video-config-item"},[n("div",{staticClass:"download-video-config-title"},[t._v("\n 字幕:\n ")]),t._v(" "),n("VDropdown",{attrs:{items:t.items},scopedSlots:t._u([{key:"item",fn:function(e){var n=e.item;return[t._v("\n "+t._s(n)+"\n ")]}}]),model:{value:t.type,callback:function(e){t.type=e},expression:"type"}})],1)])};i._withStripped=!0;var o=coreApis.settings,r=n(643);const a=(0,o.getComponentSettings)("downloadVideo").options;var s=Vue.extend({components:{VDropdown:r.VDropdown},data:()=>({type:a.subtitleType??"无",items:["无","ass","json"]}),computed:{enabled(){return"无"!==this.type}},watch:{type(t){a.subtitleType=t}}}),l=n(379),c=n.n(l),u=n(937),d=n.n(u),f={insert:"head",singleton:!1},p=(c()(d(),f),d().locals,(0,n(900).Z)(s,i,[],!1,null,null,null));p.options.__file="registry/lib/components/video/subtitle/download/Plugin.vue";var g=p.exports},900:function(t,e,n){"use strict";function i(t,e,n,i,o,r,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,{Z:function(){return i}})},740:function(t){"use strict";t.exports=coreApis.componentApis.video.assUtils},705:function(t){"use strict";t.exports=coreApis.componentApis.video.videoInfo},141:function(t){"use strict";t.exports=coreApis.toast},643:function(t){"use strict";t.exports=coreApis.ui},729:function(t){"use strict";t.exports=coreApis.utils.log},129:function(t){"use strict";t.exports=coreApis.utils.title}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,exports:{}};return n[t](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},o.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&i&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){a[t]=function(){return n[t]}}));return a.default=function(){return n},o.d(r,a),r},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";o.d(r,{component:function(){return a}});var t=coreApis.spinQuery,e=o(141),n=coreApis.utils.urls,i=o(753);const a={name:"downloadSubtitle",displayName:"下载字幕",description:{"zh-CN":"启用下载字幕支持, 在视频页面中可从功能面板里下载字幕."},tags:[componentsTags.video],entry:none,urlInclude:n.videoUrls,widget:{condition:t.hasVideo,component:()=>Promise.resolve().then(o.bind(o,321)).then((t=>t.default))},plugin:{displayName:"下载视频 - 下载字幕支持",setup:({addData:t})=>{t("downloadVideo.assets",(async t=>{t.push({name:"downloadSubtitles",displayName:"下载字幕",getAssets:async(t,n)=>{const{type:o,enabled:r}=n;if(!r)return[];const a=e.Toast.info("获取字幕中...","下载字幕");let s=0;const l=await Promise.allSettled(t.map((async e=>{const n=await(0,i.mE)(o,e.input);return s++,a.message=`获取字幕中... (${s}/${t.length})`,{name:`${e.input.title}.${o}`,data:n}}))),c=l.filter((t=>"fulfilled"===t.status)),u=l.filter((t=>"rejected"===t.status));return a.message=`获取完成. 成功 ${c.length} 个, 失败 ${u.length} 个.`,c.map((t=>t.value))},component:()=>Promise.resolve().then(o.bind(o,623)).then((t=>t.default))})}))}},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),r=r.component}()})); \ No newline at end of file +i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n{t.subtitle=''}));var u=Vue.extend({components:{DefaultWidget:r.DefaultWidget},data:()=>({disabled:!1}),methods:{async download(t){try{this.disabled=!0;const e=await(0,c.mE)(t);l.DownloadPackage.single(`${(0,s.getFriendlyTitle)(!0)}.${t}`,e)}catch(t){(0,a.logError)(t)}finally{this.disabled=!1}}}}),d=(0,n(900).Z)(u,i,[],!1,null,null,null);d.options.__file="registry/lib/components/video/subtitle/download/DownloadSubtitle.vue";var f=d.exports},623:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"download-subtitle-config download-video-config-section"},[n("div",{staticClass:"download-video-config-item"},[n("div",{staticClass:"download-video-config-title"},[t._v("\n 字幕:\n ")]),t._v(" "),n("VDropdown",{attrs:{items:t.items},scopedSlots:t._u([{key:"item",fn:function(e){var n=e.item;return[t._v("\n "+t._s(n)+"\n ")]}}]),model:{value:t.type,callback:function(e){t.type=e},expression:"type"}})],1)])};i._withStripped=!0;var o=coreApis.settings,r=n(643);const a=(0,o.getComponentSettings)("downloadVideo").options;var s=Vue.extend({components:{VDropdown:r.VDropdown},data:()=>({type:a.subtitleType??"无",items:["无","ass","json"]}),computed:{enabled(){return"无"!==this.type}},watch:{type(t){a.subtitleType=t}}}),l=n(379),c=n.n(l),u=n(937),d=n.n(u),f={insert:"head",singleton:!1},p=(c()(d(),f),d().locals,(0,n(900).Z)(s,i,[],!1,null,null,null));p.options.__file="registry/lib/components/video/subtitle/download/Plugin.vue";var g=p.exports},900:function(t,e,n){"use strict";function i(t,e,n,i,o,r,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,{Z:function(){return i}})},740:function(t){"use strict";t.exports=coreApis.componentApis.video.assUtils},705:function(t){"use strict";t.exports=coreApis.componentApis.video.videoInfo},141:function(t){"use strict";t.exports=coreApis.toast},643:function(t){"use strict";t.exports=coreApis.ui},729:function(t){"use strict";t.exports=coreApis.utils.log},129:function(t){"use strict";t.exports=coreApis.utils.title}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,exports:{}};return n[t](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},o.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&i&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){a[t]=function(){return n[t]}}));return a.default=function(){return n},o.d(r,a),r},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";o.d(r,{component:function(){return a}});var t=coreApis.spinQuery,e=o(141),n=coreApis.utils.urls,i=o(753);const a={name:"downloadSubtitle",displayName:"下载字幕",description:{"zh-CN":"启用下载字幕支持, 在视频页面中可从功能面板里下载字幕."},tags:[componentsTags.video],entry:none,urlInclude:n.videoUrls,widget:{condition:t.hasVideo,component:()=>Promise.resolve().then(o.bind(o,321)).then((t=>t.default))},plugin:{displayName:"下载视频 - 下载字幕支持",setup:({addData:t})=>{t("downloadVideo.assets",(async t=>{t.push({name:"downloadSubtitles",displayName:"下载字幕",getAssets:async(t,n)=>{const{type:o,enabled:r}=n;if(!r)return[];const a=e.Toast.info("获取字幕中...","下载字幕");let s=0;const l=await Promise.allSettled(t.map((async e=>{const n=await(0,i.mE)(o,e.input);return s++,a.message=`获取字幕中... (${s}/${t.length})`,{name:`${e.input.title}.${o}`,data:n}}))),c=l.filter((t=>"fulfilled"===t.status)),u=l.filter((t=>"rejected"===t.status));return a.message=`获取完成. 成功 ${c.length} 个, 失败 ${u.length} 个.`,c.map((t=>t.value))},component:()=>Promise.resolve().then(o.bind(o,623)).then((t=>t.default))})}))}},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/dist/plugins/launch-bar/trending-search.js b/registry/dist/plugins/launch-bar/trending-search.js index 7ba17f69d..8e08104f0 100644 --- a/registry/dist/plugins/launch-bar/trending-search.js +++ b/registry/dist/plugins/launch-bar/trending-search.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["launch-bar/trending-search"]=t():e["launch-bar/trending-search"]=t()}(self,(function(){return function(){"use strict";var e,t,r={663:function(e){e.exports=coreApis.ajax}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&n&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((function(e){i[e]=function(){return r[e]}}));return i.default=function(){return r},o.d(a,i),a},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){o.d(a,{plugin:function(){return e}});const e={name:"launchBar.trendingSearch",displayName:"搜索栏 - 搜索推荐",description:'在脚本的搜索栏中默认显示类似 b 站搜索栏的搜索推荐词, 替代原来的 "搜索" 两字.',setup:({addData:e})=>{e("launchBar.recommended",(async e=>{const{getJson:t}=await Promise.resolve().then(o.t.bind(o,663,23)),r=await t("https://api.bilibili.com/x/web-interface/search/default");if(0===r.code){let t;e.word=r.data.show_name,t=""!==r.data.url?r.data.url:r.data.name.startsWith("av")?`https://www.bilibili.com/${r.data.name}`:`https://search.bilibili.com/all?keyword=${r.data.name}`,e.href=t}else console.error("获取搜索推荐词失败")}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),a=a.plugin}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["launch-bar/trending-search"]=t():e["launch-bar/trending-search"]=t()}(self,(function(){return function(){"use strict";var e,t,r={663:function(e){e.exports=coreApis.ajax}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&n&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((function(e){i[e]=function(){return r[e]}}));return i.default=function(){return r},o.d(a,i),a},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){o.d(a,{plugin:function(){return e}});const e={name:"launchBar.trendingSearch",displayName:"搜索栏 - 搜索推荐",description:'在脚本的搜索栏中默认显示类似 b 站搜索栏的搜索推荐词, 替代原来的 "搜索" 两字.',setup:({addData:e})=>{e("launchBar.recommended",(async e=>{const{getJson:t}=await Promise.resolve().then(o.t.bind(o,663,23)),r=await t("https://api.bilibili.com/x/web-interface/search/default");if(0===r.code){let t;e.word=r.data.show_name,t=""!==r.data.url?r.data.url:r.data.name.startsWith("av")?`https://www.bilibili.com/${r.data.name}`:`https://search.bilibili.com/all?keyword=${r.data.name}`,e.href=t}else console.error("获取搜索推荐词失败")}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),a=a.plugin}()})); \ No newline at end of file diff --git a/registry/dist/plugins/settings-panel/recent-components.js b/registry/dist/plugins/settings-panel/recent-components.js index 246e29253..dea0a35bc 100644 --- a/registry/dist/plugins/settings-panel/recent-components.js +++ b/registry/dist/plugins/settings-panel/recent-components.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["settings-panel/recent-components"]=t():e["settings-panel/recent-components"]=t()}(self,(function(){return function(){"use strict";var e,t,n={407:function(e){e.exports=coreApis.settings}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){c[e]=function(){return n[e]}}));return c.default=function(){return n},r.d(i,c),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{plugin:function(){return e}});const e={name:"settingsPanel.tagFilters.recentComponents",displayName:'设置面板 - "最近使用" 类别',description:'在设置面板中添加 "最近使用" 类别, 方便检索最近操作过的组件.',setup:({addData:e,addHook:t})=>{const n=async()=>{const{getGeneralSettings:e}=await Promise.resolve().then(r.t.bind(r,407,23)),t=e();return t.recentComponents||(t.recentComponents={}),t.recentComponents};t("settingsPanel.componentDetail.open",{after:async e=>{(await n())[e]=Number(new Date)}}),t("userComponents.add",{after:async(e,t,o)=>{(await n())[o.name]=Number(new Date)}}),t("userComponents.remove",{after:async e=>{delete(await n())[e.name]}}),e("settingsPanel.tagFilters",(async e=>{const t=await n();e.unshift((({renderedComponents:e})=>({name:"recent",displayName:"最近",color:"inherit",icon:"mdi-clock-outline",order:0,count:e.length,filter:e=>lodash.sortBy(e,(e=>t[e.name]??0)).reverse()})))}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),i=i.plugin}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["settings-panel/recent-components"]=t():e["settings-panel/recent-components"]=t()}(self,(function(){return function(){"use strict";var e,t,n={407:function(e){e.exports=coreApis.settings}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&n;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},r.d(i,a),i},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){r.d(i,{plugin:function(){return e}});const e={name:"settingsPanel.tagFilters.recentComponents",displayName:'设置面板 - "最近使用" 类别',description:'在设置面板中添加 "最近使用" 类别, 方便检索最近操作过的组件.',setup:({addData:e,addHook:t})=>{const n=async()=>{const{getGeneralSettings:e}=await Promise.resolve().then(r.t.bind(r,407,23)),t=e();return t.recentComponents||(t.recentComponents={}),t.recentComponents};t("settingsPanel.componentDetail.open",{after:async e=>{(await n())[e]=Number(new Date)}}),t("userComponents.add",{after:async(e,t,o)=>{(await n())[o.name]=Number(new Date)}}),t("userComponents.remove",{after:async e=>{delete(await n())[e.name]}}),e("settingsPanel.tagFilters",(async e=>{const t=await n();e.unshift((({renderedComponents:e})=>({name:"recent",displayName:"最近",color:"inherit",icon:"mdi-clock-outline",order:0,count:e.length,filter:e=>lodash.sortBy(e,(e=>t[e.name]??0)).reverse()})))}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),i=i.plugin}()})); \ No newline at end of file diff --git a/registry/dist/plugins/style/custom-navbar-dark-mode.js b/registry/dist/plugins/style/custom-navbar-dark-mode.js index 1ee80ebe8..06f12909c 100644 --- a/registry/dist/plugins/style/custom-navbar-dark-mode.js +++ b/registry/dist/plugins/style/custom-navbar-dark-mode.js @@ -9,4 +9,4 @@ t=[[null,t,""]]);var o={};if(r)for(var a=0;a({dark:(0,o.getComponentSettings)("darkMode").enabled}),created(){(0,o.addComponentListener)("darkMode",(t=>{this.dark=t}))}}),i=n(379),s=n.n(i),c=n(52),u=n.n(c),d={insert:"head",singleton:!1};s()(u(),d),u().locals;var f=function(t,e,n,r,o,a,i,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),i?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(t,e){return c.call(e),d(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}(a,r,[],!1,null,null,null);f.options.__file="registry/lib/plugins/style/custom-navbar-dark-mode/NavbarDarkMode.vue";var l=f.exports},407:function(t){"use strict";t.exports=coreApis.settings}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var a=r[t]={id:t,exports:{}};return n[t](a,a.exports,o),a.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};t=t||[null,e({}),e([]),e(e)];for(var s=2&r&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){i[t]=function(){return n[t]}}));return i.default=function(){return n},o.d(a,i),a},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return function(){"use strict";o.d(a,{plugin:function(){return t}});const t={name:"customNavbar.items.darkMode",displayName:"自定义顶栏 - 夜间模式开关",description:"为自定义顶栏添加一个夜间模式开关, 方便快速切换夜间模式.",async setup({addData:t}){const{getComponentSettings:e}=await Promise.resolve().then(o.t.bind(o,407,23));t("customNavbar.items",(t=>{t.push({name:"darkMode",displayName:"夜间开关",content:()=>Promise.resolve().then(o.bind(o,462)),clickAction:()=>{const t=e("darkMode");t.enabled=!t.enabled}})}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),a=a.plugin}()})); \ No newline at end of file +r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),i=[];function s(t){for(var e=-1,n=0;n({dark:(0,o.getComponentSettings)("darkMode").enabled}),created(){(0,o.addComponentListener)("darkMode",(t=>{this.dark=t}))}}),i=n(379),s=n.n(i),c=n(52),u=n.n(c),d={insert:"head",singleton:!1};s()(u(),d),u().locals;var f=function(t,e,n,r,o,a,i,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),i?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(t,e){return c.call(e),d(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}(a,r,[],!1,null,null,null);f.options.__file="registry/lib/plugins/style/custom-navbar-dark-mode/NavbarDarkMode.vue";var l=f.exports},407:function(t){"use strict";t.exports=coreApis.settings}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var a=r[t]={id:t,exports:{}};return n[t](a,a.exports,o),a.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};t=t||[null,e({}),e([]),e(e)];for(var s=2&r&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){i[t]=function(){return n[t]}}));return i.default=function(){return n},o.d(a,i),a},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return function(){"use strict";o.d(a,{plugin:function(){return t}});const t={name:"customNavbar.items.darkMode",displayName:"自定义顶栏 - 夜间模式开关",description:"为自定义顶栏添加一个夜间模式开关, 方便快速切换夜间模式.",async setup({addData:t}){const{getComponentSettings:e}=await Promise.resolve().then(o.t.bind(o,407,23));t("customNavbar.items",(t=>{t.push({name:"darkMode",displayName:"夜间开关",content:()=>Promise.resolve().then(o.bind(o,462)),clickAction:()=>{const t=e("darkMode");t.enabled=!t.enabled}})}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),a=a.plugin}()})); \ No newline at end of file diff --git a/registry/dist/plugins/utils/keymap-empty-action.ts.js b/registry/dist/plugins/utils/keymap-empty-action.ts.js index 8d03739c4..e1d791e04 100644 --- a/registry/dist/plugins/utils/keymap-empty-action.ts.js +++ b/registry/dist/plugins/utils/keymap-empty-action.ts.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/keymap-empty-action.ts"]=t():e["utils/keymap-empty-action.ts"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{plugin:function(){return n}});const n={name:"keymap.actions.empty",displayName:"快捷键扩展 - 无动作",description:'在快捷键的动作列表里添加一个 "无动作", 将按键绑定到这个上面就可以阻止原有的快捷键行为.',setup:({addData:e})=>{e("keymap.actions",(e=>{e.empty={displayName:"无动作",prevent:!0,run:none}})),e("keymap.presets",(e=>{e.empty=""}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return t=t.plugin}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/keymap-empty-action.ts"]=t():e["utils/keymap-empty-action.ts"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{plugin:function(){return n}});const n={name:"keymap.actions.empty",displayName:"快捷键扩展 - 无动作",description:'在快捷键的动作列表里添加一个 "无动作", 将按键绑定到这个上面就可以阻止原有的快捷键行为.',setup:({addData:e})=>{e("keymap.actions",(e=>{e.empty={displayName:"无动作",prevent:!0,run:none}})),e("keymap.presets",(e=>{e.empty=""}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return t=t.plugin}()})); \ No newline at end of file diff --git a/registry/dist/plugins/v-loading/reimu.js b/registry/dist/plugins/v-loading/reimu.js index cbdb81c62..6e1258b54 100644 --- a/registry/dist/plugins/v-loading/reimu.js +++ b/registry/dist/plugins/v-loading/reimu.js @@ -9,4 +9,4 @@ A=[[null,A,""]]);var g={};if(C)for(var E=0;E{A("vLoading",(A=>{A.content=()=>Promise.resolve().then(Q.bind(Q,433)).then((A=>A.default))}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),C=C.plugin}()})); \ No newline at end of file +C=Boolean(window&&document&&document.all&&!window.atob)),C},E=function(){var A={};return function(I){if(void 0===A[I]){var Q=document.querySelector(I);if(window.HTMLIFrameElement&&Q instanceof window.HTMLIFrameElement)try{Q=Q.contentDocument.head}catch(A){Q=null}A[I]=Q}return A[I]}}(),B=[];function M(A){for(var I=-1,Q=0;Q{A("vLoading",(A=>{A.content=()=>Promise.resolve().then(Q.bind(Q,433)).then((A=>A.default))}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),C=C.plugin}()})); \ No newline at end of file diff --git a/registry/dist/plugins/video/download/aria2-output.js b/registry/dist/plugins/video/download/aria2-output.js index d92557494..0a4cde94c 100644 --- a/registry/dist/plugins/video/download/aria2-output.js +++ b/registry/dist/plugins/video/download/aria2-output.js @@ -9,4 +9,4 @@ e=[[null,e,""]]);var r={};if(o)for(var i=0;ie.name===l.selectedRpcProfileName))??(l.rpcProfiles.length<1?(l.rpcProfiles.push(a),a):l.rpcProfiles[0]);console.log(l,d);var p=Vue.extend({components:{TextBox:s.TextBox,VButton:s.VButton,VIcon:s.VIcon,VDropdown:s.VDropdown,TextArea:s.TextArea},data:()=>({isRenaming:!1,profileRename:"",rpcProfiles:l.rpcProfiles,selectedRpcProfile:d}),methods:{saveSettings(){l.selectedRpcProfileName=this.selectedRpcProfile.name,l.rpcProfiles=this.rpcProfiles,Object.assign(c,l)},async startRename(){this.profileRename=this.selectedRpcProfile.name,this.isRenaming=!0,await this.$nextTick(),this.$refs.renameInput?.focus()},endRename(){const e=this.profileRename;e?l.rpcProfiles.some((t=>t.name!==this.selectedRpcProfile.name&&t.name===e))?i.Toast.error("名称不得与其他预设重复","重命名 RPC 预设",2e3):(this.selectedRpcProfile.name=this.profileRename,this.isRenaming=!1,this.saveSettings()):i.Toast.error("名称不得为空","重命名 RPC 预设",2e3)},newProfile(){const e={...this.selectedRpcProfile},t={num:1,toString(){return`未命名${this.num}`}};for(;l.rpcProfiles.some((e=>e.name===t.toString()));)t.num++;e.name=t.toString(),l.rpcProfiles.push(e),this.selectedRpcProfile=e},deleteProfile(){if(l.rpcProfiles.length<2)return;const e=l.rpcProfiles.findIndex((e=>e.name===this.selectedRpcProfile.name));-1!==e&&confirm(`确认删除 RPC 预设 "${this.selectedRpcProfile.name}" 吗?`)&&(l.rpcProfiles.splice(e,1),this.selectedRpcProfile=l.rpcProfiles[0])}}}),f=n(379),u=n.n(f),m=n(308),h=n.n(m),v={insert:"head",singleton:!1};u()(h(),v),h().locals;var g=function(e,t,n,o,r,i,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}(p,o,[],!1,null,null,null);g.options.__file="registry/lib/plugins/video/download/aria2-output/RpcConfig.vue";var P=g.exports},141:function(e){"use strict";e.exports=coreApis.toast}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,exports:{}};return e[o](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){"use strict";n.d(o,{plugin:function(){return h}});var e=coreApis.download,t=coreApis.utils.constants,r=coreApis.utils.title;const i={name:"aria2",displayName:"aria2 Input",description:"使用 aria2 命令行输入文件开始下载. (aria2c -i xxx.txt)",runAction:async n=>{const{infos:o}=n,i=document.URL.replace(window.location.search,""),s=`\n# Generated by Bilibili Evolved Video Export\n# https://github.com/the1812/Bilibili-Evolved/\n${o.map((e=>e.titledFragments.map((e=>({url:e.url,params:{referer:i,userAgent:t.UserAgent,out:e.title}}))).flat().map((e=>{const t=Object.entries(e.params).map((([e,t])=>` ${lodash.kebabCase(e)}=${t}`)).join("\n");return`${e.url}\n${t}`})))).flat().join("\n")}`.trim();await e.DownloadPackage.single(`${(0,r.getFriendlyTitle)()}.txt`,s)}};var s=coreApis.ajax,a=n(141),c=coreApis.utils.log;const l=e=>{const t=e.host.match(/^http[s]?:\/\//)?e.host:`http://${e.host}`;return{option:e,host:t,methodName:"aria2.addUri"}},d=async(e,t)=>{try{let n=await t();return"string"==typeof n&&(n=JSON.parse(n)),void 0!==n.error?1===n.error.code?{param:e,success:!1,message:"请求遭到拒绝, 请检查您的密钥相关设置."}:{param:e,success:!1,message:`请求发生错误, code = ${n.error.code}, message = ${n.error.message}`}:{param:e,success:!0,message:n.result}}catch(t){return{param:e,success:!1,message:`无法连接到RPC主机, error = ${t.toString()}`}}},p=async(e,t)=>{const{option:n,host:o,methodName:r}=l(e);return d(t,(async()=>{const e=window.btoa(unescape(encodeURIComponent(JSON.stringify(t.params)))),i=`${o}:${n.port}/jsonrpc?method=${r}&id=${t.id}¶ms=${e}`;return console.log(`RPC request: ${i}`),i.startsWith("http:")?(0,s.monkey)({method:"GET",url:i,responseType:"json"}):(0,s.getJson)(i)}))},f=async(e,t)=>{const{option:n,host:o,methodName:r}=l(e);return d(t,(async()=>{const e=`${o}:${n.port}/jsonrpc`,i={method:r,id:t.id,params:t.params};return e.startsWith("http:")?(0,s.monkey)({method:"POST",url:e,responseType:"json",data:JSON.stringify(i)}):(0,s.postJson)(e,i)}))},u=e=>{if(!e)return{};const t=e.split("\n").map((e=>{const[t,...n]=e.trim().split("=");return[t.trim(),n.join("=").trim()]})).filter((e=>Boolean(e[1])));return Object.fromEntries(t)},m={name:"aria2Rpc",displayName:"aria2 RPC",description:"使用 aria2 RPC 功能发送下载请求.",runAction:async(e,n)=>{const{infos:o}=e,{selectedRpcProfile:r}=n,{secretKey:i,dir:s,other:l}=r,d=document.URL.replace(window.location.search,""),m=o.map((e=>e.titledFragments.map((e=>{const n=[];i&&n.push(`token:${i}`),n.push([e.url]),n.push({referer:d,"user-agent":t.UserAgent,out:e.title,dir:s||void 0,...u(l)});return{params:n,id:encodeURIComponent(e.title)}})))).flat(),h=await(async(e,t)=>{const n=[];for(const o of t){let t;t="get"===e.method?await p(e,o):await f(e,o),n.push(t)}return n})(r,m);if(console.table(h),1===h.length){const e=h[0];e.success?a.Toast.success(`成功发送了请求, GID = ${e.message}`,"aria2 RPC",5e3):(0,c.logError)(e.message)}else{const e=h.filter((e=>e.success)).length,t=h.length-e;a.Toast.info(`发送了 ${h.length} 个请求, 成功 ${e} 个, 失败 ${t} 个.`,"aria2 RPC",5e3)}},component:()=>Promise.resolve().then(n.bind(n,302)).then((e=>e.default))},h={name:"downloadVideo.outputs.aria2",displayName:"下载视频 - aria2 输出支持",description:"为下载视频增加 aria2 文件导出和 RPC 输出支持.",setup:({addData:e})=>{e("downloadVideo.outputs",(e=>{e.push(i),e.push(m)}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"}}(),o=o.plugin}()})); \ No newline at end of file +o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function a(e){for(var t=-1,n=0;ne.name===l.selectedRpcProfileName))??(l.rpcProfiles.length<1?(l.rpcProfiles.push(a),a):l.rpcProfiles[0]);console.log(l,d);var p=Vue.extend({components:{TextBox:s.TextBox,VButton:s.VButton,VIcon:s.VIcon,VDropdown:s.VDropdown,TextArea:s.TextArea},data:()=>({isRenaming:!1,profileRename:"",rpcProfiles:l.rpcProfiles,selectedRpcProfile:d}),methods:{saveSettings(){l.selectedRpcProfileName=this.selectedRpcProfile.name,l.rpcProfiles=this.rpcProfiles,Object.assign(c,l)},async startRename(){this.profileRename=this.selectedRpcProfile.name,this.isRenaming=!0,await this.$nextTick(),this.$refs.renameInput?.focus()},endRename(){const e=this.profileRename;e?l.rpcProfiles.some((t=>t.name!==this.selectedRpcProfile.name&&t.name===e))?i.Toast.error("名称不得与其他预设重复","重命名 RPC 预设",2e3):(this.selectedRpcProfile.name=this.profileRename,this.isRenaming=!1,this.saveSettings()):i.Toast.error("名称不得为空","重命名 RPC 预设",2e3)},newProfile(){const e={...this.selectedRpcProfile},t={num:1,toString(){return`未命名${this.num}`}};for(;l.rpcProfiles.some((e=>e.name===t.toString()));)t.num++;e.name=t.toString(),l.rpcProfiles.push(e),this.selectedRpcProfile=e},deleteProfile(){if(l.rpcProfiles.length<2)return;const e=l.rpcProfiles.findIndex((e=>e.name===this.selectedRpcProfile.name));-1!==e&&confirm(`确认删除 RPC 预设 "${this.selectedRpcProfile.name}" 吗?`)&&(l.rpcProfiles.splice(e,1),this.selectedRpcProfile=l.rpcProfiles[0])}}}),f=n(379),u=n.n(f),m=n(308),h=n.n(m),v={insert:"head",singleton:!1};u()(h(),v),h().locals;var g=function(e,t,n,o,r,i,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}(p,o,[],!1,null,null,null);g.options.__file="registry/lib/plugins/video/download/aria2-output/RpcConfig.vue";var P=g.exports},141:function(e){"use strict";e.exports=coreApis.toast}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,exports:{}};return e[o](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){"use strict";n.d(o,{plugin:function(){return h}});var e=coreApis.download,t=coreApis.utils.constants,r=coreApis.utils.title;const i={name:"aria2",displayName:"aria2 Input",description:"使用 aria2 命令行输入文件开始下载. (aria2c -i xxx.txt)",runAction:async n=>{const{infos:o}=n,i=document.URL.replace(window.location.search,""),s=`\n# Generated by Bilibili Evolved Video Export\n# https://github.com/the1812/Bilibili-Evolved/\n${o.map((e=>e.titledFragments.map((e=>({url:e.url,params:{referer:i,userAgent:t.UserAgent,out:e.title}}))).flat().map((e=>{const t=Object.entries(e.params).map((([e,t])=>` ${lodash.kebabCase(e)}=${t}`)).join("\n");return`${e.url}\n${t}`})))).flat().join("\n")}`.trim();await e.DownloadPackage.single(`${(0,r.getFriendlyTitle)()}.txt`,s)}};var s=coreApis.ajax,a=n(141),c=coreApis.utils.log;const l=e=>{const t=e.host.match(/^http[s]?:\/\//)?e.host:`http://${e.host}`;return{option:e,host:t,methodName:"aria2.addUri"}},d=async(e,t)=>{try{let n=await t();return"string"==typeof n&&(n=JSON.parse(n)),void 0!==n.error?1===n.error.code?{param:e,success:!1,message:"请求遭到拒绝, 请检查您的密钥相关设置."}:{param:e,success:!1,message:`请求发生错误, code = ${n.error.code}, message = ${n.error.message}`}:{param:e,success:!0,message:n.result}}catch(t){return{param:e,success:!1,message:`无法连接到RPC主机, error = ${t.toString()}`}}},p=async(e,t)=>{const{option:n,host:o,methodName:r}=l(e);return d(t,(async()=>{const e=window.btoa(unescape(encodeURIComponent(JSON.stringify(t.params)))),i=`${o}:${n.port}/jsonrpc?method=${r}&id=${t.id}¶ms=${e}`;return console.log(`RPC request: ${i}`),i.startsWith("http:")?(0,s.monkey)({method:"GET",url:i,responseType:"json"}):(0,s.getJson)(i)}))},f=async(e,t)=>{const{option:n,host:o,methodName:r}=l(e);return d(t,(async()=>{const e=`${o}:${n.port}/jsonrpc`,i={method:r,id:t.id,params:t.params};return e.startsWith("http:")?(0,s.monkey)({method:"POST",url:e,responseType:"json",data:JSON.stringify(i)}):(0,s.postJson)(e,i)}))},u=e=>{if(!e)return{};const t=e.split("\n").map((e=>{const[t,...n]=e.trim().split("=");return[t.trim(),n.join("=").trim()]})).filter((e=>Boolean(e[1])));return Object.fromEntries(t)},m={name:"aria2Rpc",displayName:"aria2 RPC",description:"使用 aria2 RPC 功能发送下载请求.",runAction:async(e,n)=>{const{infos:o}=e,{selectedRpcProfile:r}=n,{secretKey:i,dir:s,other:l}=r,d=document.URL.replace(window.location.search,""),m=o.map((e=>e.titledFragments.map((e=>{const n=[];i&&n.push(`token:${i}`),n.push([e.url]),n.push({referer:d,"user-agent":t.UserAgent,out:e.title,dir:s||void 0,...u(l)});return{params:n,id:encodeURIComponent(e.title)}})))).flat(),h=await(async(e,t)=>{const n=[];for(const o of t){let t;t="get"===e.method?await p(e,o):await f(e,o),n.push(t)}return n})(r,m);if(console.table(h),1===h.length){const e=h[0];e.success?a.Toast.success(`成功发送了请求, GID = ${e.message}`,"aria2 RPC",5e3):(0,c.logError)(e.message)}else{const e=h.filter((e=>e.success)).length,t=h.length-e;a.Toast.info(`发送了 ${h.length} 个请求, 成功 ${e} 个, 失败 ${t} 个.`,"aria2 RPC",5e3)}},component:()=>Promise.resolve().then(n.bind(n,302)).then((e=>e.default))},h={name:"downloadVideo.outputs.aria2",displayName:"下载视频 - aria2 输出支持",description:"为下载视频增加 aria2 文件导出和 RPC 输出支持.",setup:({addData:e})=>{e("downloadVideo.outputs",(e=>{e.push(i),e.push(m)}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"}}(),o=o.plugin}()})); \ No newline at end of file diff --git a/registry/dist/plugins/video/download/idm-output.js b/registry/dist/plugins/video/download/idm-output.js index 4ede9893f..8a94d6e08 100644 --- a/registry/dist/plugins/video/download/idm-output.js +++ b/registry/dist/plugins/video/download/idm-output.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/download/idm-output"]=t():e["video/download/idm-output"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{plugin:function(){return r}});var o=coreApis.download,n=coreApis.utils.constants,i=coreApis.utils.title;const r={name:"downloadVideo.outputs.idm",displayName:"下载视频 - IDM 输出支持",description:"为下载视频增加 IDM 输出支持.",setup:({addData:e})=>{e("downloadVideo.outputs",(e=>{e.push({name:"idm",displayName:"IDM",description:"使用 IDM 的 .ef2 格式导出, 可以在 IDM 中使用导入开始下载. 请注意此导出方式不能保留视频文件名.",runAction:async e=>{const{infos:t}=e,r=document.URL.replace(window.location.search,""),a=t.map((e=>e.titledFragments.map((e=>`<\n${e.url}\nreferer: ${r}\nUser-Agent: ${n.UserAgent}\n>`.trim())))).flat().concat("").join("\n").replace(/([^\r])\n/g,"$1\r\n");await o.DownloadPackage.single(`${(0,i.getFriendlyTitle)()}.ef2`,a)}})}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return t=t.plugin}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/download/idm-output"]=t():e["video/download/idm-output"]=t()}(self,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{plugin:function(){return r}});var o=coreApis.download,n=coreApis.utils.constants,i=coreApis.utils.title;const r={name:"downloadVideo.outputs.idm",displayName:"下载视频 - IDM 输出支持",description:"为下载视频增加 IDM 输出支持.",setup:({addData:e})=>{e("downloadVideo.outputs",(e=>{e.push({name:"idm",displayName:"IDM",description:"使用 IDM 的 .ef2 格式导出, 可以在 IDM 中使用导入开始下载. 请注意此导出方式不能保留视频文件名.",runAction:async e=>{const{infos:t}=e,r=document.URL.replace(window.location.search,""),a=t.map((e=>e.titledFragments.map((e=>`<\n${e.url}\nreferer: ${r}\nUser-Agent: ${n.UserAgent}\n>`.trim())))).flat().concat("").join("\n").replace(/([^\r])\n/g,"$1\r\n");await o.DownloadPackage.single(`${(0,i.getFriendlyTitle)()}.ef2`,a)}})}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return t=t.plugin}()})); \ No newline at end of file diff --git a/registry/dist/plugins/video/download/mpv-output.js b/registry/dist/plugins/video/download/mpv-output.js index 3add25ae7..5f5093622 100644 --- a/registry/dist/plugins/video/download/mpv-output.js +++ b/registry/dist/plugins/video/download/mpv-output.js @@ -1 +1 @@ -!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["video/download/mpv-output"]=e():o["video/download/mpv-output"]=e()}(self,(function(){return function(){"use strict";var o={d:function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(o,e){return Object.prototype.hasOwnProperty.call(o,e)}},e={};o.d(e,{plugin:function(){return n}});var t=coreApis.toast;const n={name:"downloadVideo.outputs.mpv",displayName:"下载视频 - MPV 输出支持",description:"by [@diannaojiang](https://github.com/diannaojiang)\n\n为下载视频增加 MPV 输出支持, 配置方式请参考 [Bilibili-Playin-Mpv](https://github.com/diannaojiang/Bilibili-Playin-Mpv)",setup:({addData:o})=>{o("downloadVideo.outputs",(o=>{o.push({name:"mpv",displayName:"MPV",description:"弹一条消息显示出播放按钮,点击即可使用MPV进行播放",runAction:async o=>{const e=o.infos.flatMap((o=>o.titledFragments)),n=e.map((o=>o.url)).join("\n"),i=`mpv://--http-header-fields="referer:https://www.bilibili.com/" "${e[0].url}" --audio-file="${e[1].url}"`;console.log(i),t.Toast.show(`播放`,"MPV播放"),console.log(n),console.log(o)}})}))},commitHash:"10382e9b89f6cebe24f0cc3753ae0cfcecdf166f"};return e=e.plugin}()})); \ No newline at end of file +!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["video/download/mpv-output"]=e():o["video/download/mpv-output"]=e()}(self,(function(){return function(){"use strict";var o={d:function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(o,e){return Object.prototype.hasOwnProperty.call(o,e)}},e={};o.d(e,{plugin:function(){return n}});var t=coreApis.toast;const n={name:"downloadVideo.outputs.mpv",displayName:"下载视频 - MPV 输出支持",description:"by [@diannaojiang](https://github.com/diannaojiang)\n\n为下载视频增加 MPV 输出支持, 配置方式请参考 [Bilibili-Playin-Mpv](https://github.com/diannaojiang/Bilibili-Playin-Mpv)",setup:({addData:o})=>{o("downloadVideo.outputs",(o=>{o.push({name:"mpv",displayName:"MPV",description:"弹一条消息显示出播放按钮,点击即可使用MPV进行播放",runAction:async o=>{const e=o.infos.flatMap((o=>o.titledFragments)),n=e.map((o=>o.url)).join("\n"),i=`mpv://--http-header-fields="referer:https://www.bilibili.com/" "${e[0].url}" --audio-file="${e[1].url}"`;console.log(i),t.Toast.show(`播放`,"MPV播放"),console.log(n),console.log(o)}})}))},commitHash:"2acf9c591c1b55e3ef8e8e20becca001a39dc13f"};return e=e.plugin}()})); \ No newline at end of file