!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["video/outer-watchlater"]=e():t["video/outer-watchlater"]=e()}(self,(function(){return function(){var t,e,n={772:function(t,e,n){var o=n(645)((function(t){return t[1]}));o.push([t.id,".video-toolbar .ops .watchlater {\n margin-right: 28px !important;\n position: relative;\n width: auto !important;\n}\n@media screen and (max-width: 1320px), (max-height: 750px) {\n.video-toolbar .ops .watchlater {\n margin-right: max(min(11vw, 11vh) - 117.2px, 6px) !important;\n}\n.video-toolbar .ops .watchlater .text {\n display: none;\n}\n}\n.video-toolbar .ops .watchlater .tip {\n position: absolute;\n top: calc(100% + 8px);\n left: 50%;\n transform: translateX(-50%);\n z-index: 1000;\n background: rgba(0, 0, 0, 0.8666666667);\n padding: 4px 8px;\n border-radius: 4px;\n color: #eee;\n transition: all 0.2s ease-out;\n opacity: 0;\n pointer-events: none;\n}\n.video-toolbar .ops .watchlater .tip.show {\n opacity: 1;\n pointer-events: initial;\n}\n.video-toolbar .ops .watchlater .be-icon {\n display: inline-flex;\n}\n.more-ops-list > ul > li:nth-child(2) {\n display: none !important;\n}",""]),t.exports=o},645:function(t){"use strict"; // eslint-disable-next-line func-names t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")}, // eslint-disable-next-line func-names e.i=function(t,n,o){"string"==typeof t&&( // eslint-disable-next-line no-param-reassign t=[[null,t,""]]);var r={};if(o)for(var i=0;i({watchlaterList:i.watchlaterList,aid:unsafeWindow.aid,tipText:"",tipShowing:!1,tipHandle:0}),computed:{on(){return console.log(this.watchlaterList,this.aid,this.watchlaterList.includes(parseInt(this.aid))),this.watchlaterList.includes(parseInt(this.aid))}},methods:{showTip(t){this.tipText=t,this.tipShowing=!0,this.tipHandle&&clearTimeout(this.tipHandle),this.tipHandle=setTimeout((()=>{this.tipShowing=!1}),2e3)},async toggle(){await(0,i.toggleWatchlater)(this.aid),this.showTip(this.on?"已添加至稍后再看":"已从稍后再看移除")}}}),s=n(379),c=n.n(s),l=n(772),u=n.n(l),d={insert:"head",singleton:!1};c()(u(),d),u().locals;var p=function(t,e,n,o,r,i,a,s){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):r&&(c=s?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}(a,o,[],!1,null,null,null);p.options.__file="registry/lib/components/video/outer-watchlater/OuterWatchlater.vue";var f=p.exports},391:function(t){"use strict";t.exports=coreApis.observer},200:function(t){"use strict";t.exports=coreApis.spinQuery},605:function(t){"use strict";t.exports=coreApis.utils}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={id:t,exports:{}};return n[t](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&o&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){a[t]=function(){return n[t]}}));return a.default=function(){return n},r.d(i,a),i},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";r.d(i,{component:function(){return a}});var t=coreApis.componentApis.define,e=r(605),n=coreApis.utils.urls;const o=(0,t.defineOptionsMetadata)({showInWatchlaterPages:{defaultValue:!1,displayName:"在稍后再看页面中仍然显示"}}),a=(0,t.defineComponentMetadata)({name:"outerWatchlater",displayName:"外置稍后再看",entry:async t=>{let{settings:o}=t;if(n.watchlaterUrls.some(e.matchUrlPattern)&&!o.options.showInWatchlaterPages)return;const{mountVueComponent:i,getUID:a,playerReady:s}=await Promise.resolve().then(r.t.bind(r,605,23));if(!a())return;await s();const c=dq(".video-toolbar .ops .collect");if(!c)return;const{hasVideo:l}=await Promise.resolve().then(r.t.bind(r,200,23));await l();const u=i(await Promise.resolve().then(r.bind(r,334)));c.insertAdjacentElement("afterend",u.$el);const{videoChange:d}=await Promise.resolve().then(r.t.bind(r,391,23));d((t=>{let{aid:e}=t;console.log("videoChange",unsafeWindow.aid,e),u.aid=unsafeWindow.aid}))},tags:[componentsTags.video],description:{"zh-CN":"将视频页面菜单里的 `稍后再看` 移到外面. 请注意如果在稍后再看页面中仍然显示, 是不会实时同步右侧的播放列表的."},urlInclude:n.videoUrls,options:o,reload:()=>{dqa(".ops .watchlater").forEach((t=>{t.style.display="inline-block"}))},unload:()=>{dqa(".ops .watchlater").forEach((t=>{t.style.display="none"}))},plugin:{displayName:"稍后再看 - 快捷键支持",setup:t=>{let{addData:e}=t;e("keymap.actions",(t=>{t.watchlater={displayName:"稍后再看",run:t=>{const{clickElement:e}=t;return e(".video-toolbar .ops .watchlater, .more-ops-list .ops-watch-later, .video-toolbar-module .see-later-box",t)}}})),e("keymap.presets",(t=>{t.watchlater="shift w"}))}},commitHash:"dd5e2656921d751d01201e25c19856bebc948f72",coreVersion:"2.2.1"})}(),i=i.component}()}));