diff --git a/registry/dist/components/style/custom-navbar.js b/registry/dist/components/style/custom-navbar.js index ac6bba97b1..47c9046ed9 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,2871)).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,896)).then((t=>t.default))},p={name:"userInfo",displayName:"个人信息",content:()=>Promise.resolve().then(n.bind(n,6935)).then((t=>t.default)),href:(0,a.getUID)()?"https://space.bilibili.com":null,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,6774)).then((t=>t.default)),lazy:!1,noPopupPadding:!0,boundingWidth:240},u={name:"logo",displayName:"Logo",content:()=>Promise.resolve().then(n.bind(n,4262)).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,2599)).then((t=>t.default))},f=t=>({...t,name:`${t.iframeName}Iframe`,content:t.displayName,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,9481)).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,7346)).then((t=>t.default)),touch:!0,href:"https://member.bilibili.com/v2#/upload/video/frame",popupContent:()=>Promise.resolve().then(n.bind(n,8062)).then((t=>t.default))},V={name:"search",displayName:"搜索",content:()=>Promise.resolve().then(n.bind(n,2639)).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,9837)).then((t=>t.default)),boundingWidth:300,noPopupPadding:!0};var I=n(9457);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,2454)).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,9065)).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,4305)).then((t=>t.default))},[E,$,T,D]=b;var M=n(9689),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(3661),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(2945),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},9065: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(1808);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(5009),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},9837: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(1808);const c=[{name:"video",displayName:"视频",component:()=>Promise.resolve().then(n.bind(n,7840)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=8",count:0},{name:"bangumi",displayName:"番剧",component:()=>Promise.resolve().then(n.bind(n,2434)).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,329)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=64",count:0},{name:"live",displayName:"直播",component:()=>Promise.resolve().then(n.bind(n,1752)).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(9854),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},2434: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(2529),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(8196),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},329: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(2529),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(1880),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},1752: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(8855),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},7840: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(2529);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(9033),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},4305: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(1808),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(9847),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},2599: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(1808);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(9036),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},9481: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(1808),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},4262: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(1960),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},2871: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(1808);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(3386),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},896: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(1808);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(2659),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},2639: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(3743),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},5735: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(8553),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(7427),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},4629: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(9689);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(9061),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},2724: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(6473),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},7414: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(6473),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},5799: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(1808),s=n(9457),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,2724)).then((t=>t.default))},{name:s.N.Cinema,displayName:"追剧",activeLink:`https://space.bilibili.com/${t}/cinema`,component:()=>Promise.resolve().then(n.bind(n,7414)).then((t=>t.default))}]}}}),l=n(3379),d=n.n(l),p=n(1792),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},6473: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(9457);!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(4753),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},7346: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(5623),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},8062: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(1808),r=Vue.extend({mixins:[a.u]}),o=n(3379),s=n.n(o),c=n(2822),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},6935: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(7949),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},6774: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(1808),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(1391),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},2454: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(1808),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(6476),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,5077)),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,748,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,5735)).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,8553));t()}}]})}))}},commitHash:"5c80c0af46787b56670d7f637ae95a4e2a641b7d"}}(),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,2871)).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,896)).then((t=>t.default))},p={name:"userInfo",displayName:"个人信息",content:()=>Promise.resolve().then(n.bind(n,6935)).then((t=>t.default)),href:(0,a.getUID)()?"https://space.bilibili.com":null,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,6774)).then((t=>t.default)),lazy:!1,noPopupPadding:!0,boundingWidth:240},u={name:"logo",displayName:"Logo",content:()=>Promise.resolve().then(n.bind(n,4262)).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,2599)).then((t=>t.default))},f=t=>({...t,name:`${t.iframeName}Iframe`,content:t.displayName,touch:!0,popupContent:()=>Promise.resolve().then(n.bind(n,9481)).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,7346)).then((t=>t.default)),touch:!0,href:"https://member.bilibili.com/v2#/upload/video/frame",popupContent:()=>Promise.resolve().then(n.bind(n,8062)).then((t=>t.default))},V={name:"search",displayName:"搜索",content:()=>Promise.resolve().then(n.bind(n,2639)).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,9837)).then((t=>t.default)),boundingWidth:300,noPopupPadding:!0};var I=n(9457);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,2454)).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,9065)).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,4305)).then((t=>t.default))},[E,$,T,D]=b;var M=n(9689),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(3661),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(2945),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},9065: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(1808);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(5009),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},9837: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(1808);const c=[{name:"video",displayName:"视频",component:()=>Promise.resolve().then(n.bind(n,7840)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=8",count:0},{name:"bangumi",displayName:"番剧",component:()=>Promise.resolve().then(n.bind(n,2434)).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,329)).then((t=>t.default)),activeLink:"https://t.bilibili.com/?tab=64",count:0},{name:"live",displayName:"直播",component:()=>Promise.resolve().then(n.bind(n,1752)).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(9854),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},2434: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(2529),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(8196),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},329: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(2529),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(1880),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},1752: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(8855),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},7840: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(2529);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(9033),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},4305: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(1808),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=t.cover?s(t.cover):t.covers?s(t.covers[0]):"",f={title:t.title,viewAt:1e3*t.view_at,time:p,timeText:m(p),cover:u,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{...f,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{...f,id:n,url:`https://www.bilibili.com/video/${n}?p=${t.history.page}&${r}`,type:d.Video};if(i)return{...f,id:i,url:`https://www.bilibili.com/read/cv${i}`,type:d.Article};if(a)return{...f,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(9847),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},2599: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(1808);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(9036),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},9481: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(1808),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},4262: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(1960),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},2871: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(1808);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(3386),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},896: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(1808);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(2659),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},2639: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(3743),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},5735: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(8553),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(7427),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},4629: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(9689);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(9061),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},2724: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(6473),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},7414: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(6473),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},5799: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(1808),s=n(9457),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,2724)).then((t=>t.default))},{name:s.N.Cinema,displayName:"追剧",activeLink:`https://space.bilibili.com/${t}/cinema`,component:()=>Promise.resolve().then(n.bind(n,7414)).then((t=>t.default))}]}}}),l=n(3379),d=n.n(l),p=n(1792),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},6473: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(9457);!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(4753),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},7346: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(5623),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},8062: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(1808),r=Vue.extend({mixins:[a.u]}),o=n(3379),s=n.n(o),c=n(2822),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},6935: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(7949),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},6774: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(1808),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(1391),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},2454: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(1808),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(6476),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,5077)),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,748,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,5735)).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,8553));t()}}]})}))}},commitHash:"5c80c0af46787b56670d7f637ae95a4e2a641b7d"}}(),r=r.component}()})); \ No newline at end of file diff --git a/registry/lib/components/style/custom-navbar/history/types.ts b/registry/lib/components/style/custom-navbar/history/types.ts index ce5d2e3132..fc2b768634 100644 --- a/registry/lib/components/style/custom-navbar/history/types.ts +++ b/registry/lib/components/style/custom-navbar/history/types.ts @@ -113,12 +113,21 @@ const parseHistoryItem = (item: any): HistoryItem => { const progress = item.progress === -1 ? 1 : (item.progress / item.duration) const https = (url: string) => url.replace('http:', 'https:') const time = new Date(item.view_at * 1000) + const cover = (() => { + if (item.cover) { + return https(item.cover) + } + if (item.covers) { + return https(item.covers[0]) + } + return '' + })() const commonInfo = { title: item.title, viewAt: item.view_at * 1000, time, timeText: formatTime(time), - cover: item.cover ? https(item.cover) : https(item.covers[0]), + cover, covers: item.covers?.map(https) ?? [], progress, progressText: Number.isNaN(progress) ? null : `${fixed(progress * 100, 1)}%`,