!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/auto-remove-watchlater"]=t():e["video/auto-remove-watchlater"]=t()}(globalThis,(()=>(()=>{var e,t,o={762:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=762,e.exports=t},117:e=>{"use strict";e.exports="在稍后再看页面播放结束时, 自动将当前视频移出稍后再看.\n注意:\n- 一定要播放结束, 快结束时手动切走不算\n- b 站的稍后再看列表不会实时刷新\n"}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return o[e](a,a.exports,n),a.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var a=Object.create(null);n.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&r&&o;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,n.d(a,i),a},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";n.d(a,{component:()=>s});const e=coreApis.componentApis.define,t=coreApis.observer,o=coreApis.utils.urls,r=coreApis.componentApis.video.playerAgent,i=coreApis.componentApis.video.watchlater;let c=null;const s=(0,e.defineComponentMetadata)({name:"autoRemoveWatchlater",displayName:"自动移出稍后再看",tags:[componentsTags.video],urlInclude:[...o.watchlaterUrls,...o.videoUrls],entry:()=>{(0,t.videoChange)((async e=>{let{aid:t}=e;const o=await r.playerAgent.query.video.element();null!==c&&o.removeEventListener("ended",c),c=async()=>{(await(0,i.getWatchlaterList)()).includes(parseInt(t))&&await(0,i.toggleWatchlater)(t)},o.addEventListener("ended",c)}))},commitHash:"f8d9b5665fc198fe5b2eb39c57dab6d686e5ed74",coreVersion:"2.10.4",description:(()=>{const e=n(762);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(n.t.bind(n,117,17)).then((e=>e.default))}})()})})(),a=a.component})()));