30 lines
5.8 MiB
JavaScript
30 lines
5.8 MiB
JavaScript
|
(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[1814],{77539:e=>{var t;t=function(){return function(){var e={254:function(e,t,n){e.exports=n(721).default},721:function(e,t,n){"use strict";var o=n(48),i=n.n(o),r=n(153),a=n.n(r),s=n(961),l=n.n(s);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var u=l().log,d=l().utils.secondsToMs,p=l().utils.assign,f=l().utils.getComputedStyle,h=l().utils.extractHostname,m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i().shaka;if("object"!==c(e)||void 0===e.constructor.version)return u.warn("[shakaPlayer-mux] You must provide a valid shakaPlayer to initShakaPlayerMux."),{emit:function(){u.warn("[shakaPlayer-mux] emit is a no-op because initShakaPlayerMux was not initialized correctly")},loadErrorHandler:function(){u.warn("[shakaPlayer-mux] loadErrorHandler is a no-op because initShakaPlayerMux was not initialized correctly")}};var o=function(t){return e.getMediaElement()&&e.getMediaElement()[t]},r=function(t){var n=e.getMediaElement();if(n)return parseInt(f(n,t))},s=function(){var e=o("preload");return"auto"===e||"metadata"===e};function m(){var t=a().fullscreenElement||a().webkitFullscreenElement||a().mozFullScreenElement||a().msFullscreenElement;return t?t===e.getMediaElement():void 0}(t=p({automaticErrorTracking:!0},t)).data=p({player_software_name:"Shaka Player",player_software_version:e.constructor.version,player_mux_plugin_name:"shakaplayer-mux",player_mux_plugin_version:"5.8.5"},t.data);var g=l().utils.generateShortID();e.mux={},e.mux.emit=function(e,t){l().emit(g,e,t)},t.getPlayheadTime=function(){return d(o("currentTime"))},t.getStateData=function(){var t=e.getStats();return{player_is_paused:o("paused"),player_width:r("width"),player_height:r("height"),video_source_height:t.height,video_source_width:t.width,player_is_fullscreen:m(),player_autoplay_on:o("autoplay"),player_preload_on:s(),video_source_url:e.getAssetUri(),video_source_duration:d(o("duration")),view_dropped_frame_count:t.droppedFrames,video_poster_url:o("poster"),player_language_code:o("lang")}};var v=["pause","play","playing","seeking","seeked","timeupdate","stalled","waiting","ended"],y={},_={},b=!1;_.onstatechange=function(t){!b&&e.getMediaElement()&&function(){b=!0;var t=e.getMediaElement();if(!t)return u.warn("[shakaPlayer-mux] Unable to getMediaElement() on shaka.Player instance when attempting to attachMediaElementEvents()");v.forEach((function(n){y[n]=function(){var o={};"timeupdate"===n&&(o.player_playhead_time=t.currentTime),e.mux.emit(n,o)},t.addEventListener(n,y[n],!1)}))}(),"load"===t.state&&e.mux.emit("playerready")};var S={video_source_bitrate:void 0,video_source_codec:void 0,video_source_fps:void 0},E=function(){var t=function(){var t,n,o=e.getVariantTracks(),i=o&&o.filter((function(e){return e.active})),r=i&&i.map((function(e){return e.bandwidth}));return{video_source_bitrate:r&&r.reduce((function(e,t){return e+t}),0),video_source_codec:null==i||null===(t=i[0])||void 0===t?void 0:t.videoCodec,video_source_fps:null==i||null===(n=i[0])||void 0===n?void 0:n.frameRate}}();t&&JSON.stringify(t)!==JSON.stringify(S)&&(S=t,e.mux.emit("renditionchange",t))};_.adaptation=function(){E()},_.variantchanged=function(){E()},e.addEventListener("onstatechange",_.onstatechange),e.addEventListener("adaptation",_.adaptation),e.addEventListener("variantchanged",_.variantchanged);var A=function(e){var t,o;if(e.message)return e.message;var i=null===(t=n.util)||void 0===t||null===(o=t.Error)||void 0===o?void 0:o.Code;for(var r in i)if(i[r]===e.code)return r;return e.code},T=function(t){var n;2===(null==t?void 0:t.severity)&&e.mux.emit("error",{player_error_code:t.code,player_error_message:A(t),player_error_context:null===(n=t.data)||void 0===n?void 0:n.toString()})};_.error=function(e){if(t.automaticErrorTracking){var n=e.detail;T(n)}},e.add
|
||
|
if (J.popper?.firstChild?.id === "context-menu") {
|
||
|
const container = J.popper.firstChild;
|
||
|
if (!container.children.length) {
|
||
|
const observer = new MutationObserver(() => {
|
||
|
Spicetify.ContextMenu._addItems(J.popper);
|
||
|
observer.disconnect();
|
||
|
});
|
||
|
observer.observe(container, { childList: true });
|
||
|
} else if (container.firstChild.classList.contains("main-userWidget-dropDownMenu")) {
|
||
|
Spicetify.Menu._addItems(J.popper);
|
||
|
} else {
|
||
|
Spicetify.ContextMenu._addItems(J.popper);
|
||
|
}
|
||
|
};0,J.props.animation&&ee()&&function(e,t){me(e,t)}(i,(function(){J.state.isShown=!0,ae("onShown",[J])}))}},function(){var e,t=J.props.appendTo,n=te();e=J.props.interactive&&t===d||"parent"===t?n.parentNode:h(t,[n]);e.contains(H)||e.appendChild(H);J.state.isMounted=!0,Te(),!1}()},hide:function(){0;var e=!J.state.isVisible,t=J.state.isDestroyed,n=!J.state.isEnabled,o=p(J.props.duration,1,U.duration);if(e||t||n)return;if(ae("onHide",[J],!1),!1===J.props.onHide(J))return;J.state.isVisible=!1,J.state.isShown=!1,w=!1,T=!1,ee()&&(H.style.visibility="hidden");if(ce(),he(),re(!0),ee()){var i=oe(),r=i.box,a=i.content;J.props.animation&&(O([r,a],o),C([r,a],"hidden"))}se(),le(),J.props.animation?ee()&&function(e,t){me(e,(function(){!J.state.isVisible&&H.parentNode&&H.parentNode.contains(H)&&t()}))}(o,J.unmount):J.unmount()},hideWithInteractivity:function(e){0;ne().addEventListener("mousemove",M),v(q,M),M(e)},enable:function(){J.state.isEnabled=!0},disable:function(){J.hide(),J.state.isEnabled=!1},unmount:function(){0;J.state.isVisible&&J.hide();if(!J.state.isMounted)return;Pe(),Oe().forEach((function(e){e._tippy.unmount()})),H.parentNode&&H.parentNode.removeChild(H);X=X.filter((function(e){return e!==J})),J.state.isMounted=!1,ae("onHidden",[J])},destroy:function(){0;if(J.state.isDestroyed)return;J.clearDelayTimeouts(),J.unmount(),ye(),delete e._tippy,J.state.isDestroyed=!0,ae("onDestroy",[J])}};if(!E.render)return J;var j=E.render(J),H=j.popper,K=j.onUpdate;H.setAttribute("data-tippy-root",""),H.id="tippy-"+J.id,J.popper=H,e._tippy=J,H._tippy=J;var W=B.map((function(e){return e.fn(J)})),Z=e.hasAttribute("aria-expanded");return ve(),le(),re(),ae("onCreate",[J]),E.showOnCreate&&Ce(),H.addEventListener("mouseenter",(function(){J.props.interactive&&J.state.isVisible&&J.clearDelayTimeouts()})),H.addEventListener("mouseleave",(function(){J.props.interactive&&J.props.trigger.indexOf("mouseenter")>=0&&ne().addEventListener("mousemove",M)})),J;function Q(){var e=J.props.touch;return Array.isArray(e)?e:[e,0]}function $(){return"hold"===Q()[0]}function ee(){var e;return!(null==(e=J.props.render)||!e.$$tippy)}function te(){return c||e}function ne(){var e=te().parentNode;return e?k(e):document}function oe(){return Y(H)}function ie(e){return J.state.isMounted&&!J.state.isVisible||I.isTouch||a&&"focus"===a.type?0:p(J.props.delay,e?0:1,U.delay)}function re(e){void 0===e&&(e=!1),H.style.pointerEvents=J.props.interactive&&!e?"":"none",H.style.zIndex=""+J.props.zIndex}function ae(e,t,n){var o;(void 0===n&&(n=!0),W.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(o=J.props)[e].apply(o,t)}function se(){var t=J.props.aria;if(t.content){var n="aria-"+t.content,o=H.id;g(J.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(J.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var i=t&&t.replace(o,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function le(){!Z&&J.props.aria.expanded&&g(J.props.triggerTarget||e).forEach((function(e){J.props.interactive?e.setAttribute("aria-expanded",J.state.isVisible&&e===te()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ce(){ne().removeEventListener("mousemove",M),q=q.filter((function(e){return e!==M}))}function ue(t){if(!I.isTouch||!N&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!J.props.interactive||!L(H,n)){if(g(J.props.triggerTarget||e).some((function(e){return L(e,n)}))){if(I.isTouch)return;if(J.state.isVisible&&J.props.trigger.indexOf("click")>=0)return}else ae("onClickOutside",[J,t]);!0===J.props.hideOnClick&&(J.clearDelayTimeouts(),J.hide(),P=!0,setTimeout((function(){P=!1})),J.state.isMounted||he())}}}function de(){N=!0}function pe(){N=!1}function fe(){var e=ne();e.addEventListener("mousedown",ue,!0),e.addEventListener("touchend",ue,u),e.addEventListener("touchstart",pe,u),e.addEventListener("touchmove",de,u)}function he(){var e=ne();e.removeEventListener("mousedown",ue,!0),e.removeEventListener("touchend",ue,u),e.removeEventListener("touchstart",pe,u),e.removeEventListener("touchmove",de,u)}function me(e,t){var n=oe().box;functio
|
||
|
if (Y.popper?.firstChild?.id === "context-menu") {
|
||
|
const container = Y.popper.firstChild;
|
||
|
if (!container.children.length) {
|
||
|
const observer = new MutationObserver(() => {
|
||
|
Spicetify.ContextMenu._addItems(Y.popper);
|
||
|
observer.disconnect();
|
||
|
});
|
||
|
observer.observe(container, { childList: true });
|
||
|
} else if (container.firstChild.classList.contains("main-userWidget-dropDownMenu")) {
|
||
|
Spicetify.Menu._addItems(Y.popper);
|
||
|
} else {
|
||
|
Spicetify.ContextMenu._addItems(Y.popper);
|
||
|
}
|
||
|
};0,Y.props.animation&&ee()&&function(e,t){me(e,t)}(i,(function(){Y.state.isShown=!0,ae("onShown",[Y])}))}},function(){var e,t=Y.props.appendTo,n=te();e=Y.props.interactive&&t===u||"parent"===t?n.parentNode:f(t,[n]);e.contains(z)||e.appendChild(z);Y.state.isMounted=!0,Te(),!1}()},hide:function(){0;var e=!Y.state.isVisible,t=Y.state.isDestroyed,n=!Y.state.isEnabled,o=d(Y.props.duration,1,F.duration);if(e||t||n)return;if(ae("onHide",[Y],!1),!1===Y.props.onHide(Y))return;Y.state.isVisible=!1,Y.state.isShown=!1,w=!1,T=!1,ee()&&(z.style.visibility="hidden");if(ce(),he(),re(!0),ee()){var i=oe(),r=i.box,a=i.content;Y.props.animation&&(P([r,a],o),O([r,a],"hidden"))}se(),le(),Y.props.animation?ee()&&function(e,t){me(e,(function(){!Y.state.isVisible&&z.parentNode&&z.parentNode.contains(z)&&t()}))}(o,Y.unmount):Y.unmount()},hideWithInteractivity:function(e){0;ne().addEventListener("mousemove",x),g(j,x),x(e)},enable:function(){Y.state.isEnabled=!0},disable:function(){Y.hide(),Y.state.isEnabled=!1},unmount:function(){0;Y.state.isVisible&&Y.hide();if(!Y.state.isMounted)return;Pe(),Oe().forEach((function(e){e._tippy.unmount()})),z.parentNode&&z.parentNode.removeChild(z);H=H.filter((function(e){return e!==Y})),Y.state.isMounted=!1,ae("onHidden",[Y])},destroy:function(){0;if(Y.state.isDestroyed)return;Y.clearDelayTimeouts(),Y.unmount(),ye(),delete e._tippy,Y.state.isDestroyed=!0,ae("onDestroy",[Y])}};if(!A.render)return Y;var W=A.render(Y),z=W.popper,q=W.onUpdate;z.setAttribute("data-tippy-root",""),z.id="tippy-"+Y.id,Y.popper=z,e._tippy=Y,z._tippy=Y;var X=K.map((function(e){return e.fn(Y)})),Z=e.hasAttribute("aria-expanded");return ve(),le(),re(),ae("onCreate",[Y]),A.showOnCreate&&Ce(),z.addEventListener("mouseenter",(function(){Y.props.interactive&&Y.state.isVisible&&Y.clearDelayTimeouts()})),z.addEventListener("mouseleave",(function(){Y.props.interactive&&Y.props.trigger.indexOf("mouseenter")>=0&&ne().addEventListener("mousemove",x)})),Y;function Q(){var e=Y.props.touch;return Array.isArray(e)?e:[e,0]}function $(){return"hold"===Q()[0]}function ee(){var e;return!(null==(e=Y.props.render)||!e.$$tippy)}function te(){return p||e}function ne(){var e=te().parentNode;return e?C(e):document}function oe(){return G(z)}function ie(e){return Y.state.isMounted&&!Y.state.isVisible||L.isTouch||a&&"focus"===a.type?0:d(Y.props.delay,e?0:1,F.delay)}function re(e){void 0===e&&(e=!1),z.style.pointerEvents=Y.props.interactive&&!e?"":"none",z.style.zIndex=""+Y.props.zIndex}function ae(e,t,n){var o;(void 0===n&&(n=!0),X.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(o=Y.props)[e].apply(o,t)}function se(){var t=Y.props.aria;if(t.content){var n="aria-"+t.content,o=z.id;m(Y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(Y.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var i=t&&t.replace(o,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function le(){!Z&&Y.props.aria.expanded&&m(Y.props.triggerTarget||e).forEach((function(e){Y.props.interactive?e.setAttribute("aria-expanded",Y.state.isVisible&&e===te()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ce(){ne().removeEventListener("mousemove",x),j=j.filter((function(e){return e!==x}))}function ue(t){if(!L.isTouch||!N&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!Y.props.interactive||!R(z,n)){if(m(Y.props.triggerTarget||e).some((function(e){return R(e,n)}))){if(L.isTouch)return;if(Y.state.isVisible&&Y.props.trigger.indexOf("click")>=0)return}else ae("onClickOutside",[Y,t]);!0===Y.props.hideOnClick&&(Y.clearDelayTimeouts(),Y.hide(),I=!0,setTimeout((function(){I=!1})),Y.state.isMounted||he())}}}function de(){N=!0}function pe(){N=!1}function fe(){var e=ne();e.addEventListener("mousedown",ue,!0),e.addEventListener("touchend",ue,c),e.addEventListener("touchstart",pe,c),e.addEventListener("touchmove",de,c)}function he(){var e=ne();e.removeEventListener("mousedown",ue,!0),e.removeEventListener("touchend",ue,c),e.removeEventListener("touchstart",pe,c),e.removeEventListener("touchmove",de,c)}function me(e,t){var n=oe().box;functio
|
||
|
//# sourceMappingURL=vendor~xpui.js.map
|