Files
pgsql-jellyfin/publish_test/wwwroot/user-playback.df3d8017d047a6d6bf0b.chunk.js
T
2026-07-08 13:13:46 -04:00

1 line
32 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[40501,62882,73468,96084],{62882:function(e,t,i){i.r(t),i.d(t,{show:function(){return u}});var n=i(22696),o=i.n(n),a=i(79754),l=i(46782),c=i(5898),r=i(36300),s=(i(10353),function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")});function d(e,t,n){Promise.resolve().then(i.bind(i,10838)).then((function(i){var o=n?"on":"off";i.centerFocus[o](e,t)})).catch((function(e){console.warn("Error in centerFocus",e)}))}function u(e){var t,i,n,u={removeOnClose:!0,enableHistory:e.enableHistory,scrollY:!1};l.A.tv?(u.size="fullscreen",n=!0,u.autoFocus=!0):(u.modal=!1,u.entryAnimation=e.entryAnimation,u.exitAnimation=e.exitAnimation,u.entryAnimationDuration=e.entryAnimationDuration||140,u.exitAnimationDuration=e.exitAnimationDuration||100,u.autoFocus=!1);var b=a.default.createDialog(u);n?b.classList.add("actionsheet-fullscreen"):b.classList.add("actionsheet-not-fullscreen"),b.classList.add("actionSheet"),e.dialogClass&&b.classList.add(e.dialogClass);var h="",p=l.A.tv?"scrollY smoothScrollY hiddenScrollY":"scrollY",v="";e.items.length>20&&(v+="min-width:"+(r.Ay.getWindowSize().innerWidth>=300?240:200)+"px;");var y,m=!1,f=[];try{for(var S=s(e.items),A=S.next();!A.done;A=S.next())(y=(L=A.value).icon||(L.selected?"check":null))&&(m=!0),f.push(y||"")}catch(e){t={error:e}}finally{try{A&&!A.done&&(i=S.return)&&i.call(S)}finally{if(t)throw t.error}}l.A.tv&&(h+='<button is="paper-icon-button-light" class="btnCloseActionSheet hide-mouse-idle-tv" tabindex="-1" title="'.concat(c.Ay.translate("ButtonBack"),'">\n <span class="material-icons arrow_back" aria-hidden="true"></span>\n </button>'));var k=e.title&&!m;k||l.A.tv?h+='<div class="actionSheetContent actionSheetContent-centered">':h+='<div class="actionSheetContent">',e.title&&(h+='<h1 class="actionSheetTitle">'+o()(e.title)+"</h1>"),e.text&&(h+='<p class="actionSheetText">'+o()(e.text)+"</p>");var x="actionSheetScroller";l.A.tv&&(x+=" actionSheetScroller-tv focuscontainer-x focuscontainer-y"),h+='<div class="'+x+" "+p+'" style="'+v+'">';var g="listItem listItem-button actionSheetMenuItem";(e.border||e.shaded)&&(g+=" listItem-border"),e.menuItemClass&&(g+=" "+e.menuItemClass),l.A.tv&&(g+=" listItem-focusscale"),l.A.mobile&&(g+=" actionsheet-xlargeFont");for(var C=0;C<e.items.length;C++){var L;(L=e.items[C]).divider?h+='<div class="actionsheetDivider"></div>':(h+="<button"+(L.selected&&l.A.tv?" autoFocus":"")+' is="emby-button" type="button" class="'+g+'" data-id="'+(null==L.id||""===L.id?L.value:L.id)+'">',(y=f[C])?h+='<span class="actionsheetMenuItemIcon listItemIcon listItemIcon-transparent material-icons '.concat(y,'" aria-hidden="true"></span>'):m&&!k&&(h+='<span class="actionsheetMenuItemIcon listItemIcon listItemIcon-transparent material-icons check" aria-hidden="true" style="visibility:hidden;"></span>'),h+='<div class="listItemBody actionsheetListItemBody">',h+='<div class="listItemBodyText actionSheetItemText">',h+=o()(L.name||L.textContent||L.innerText),h+="</div>",L.secondaryText&&(h+='<div class="listItemBodyText secondary">'.concat(o()(L.secondaryText),"</div>")),h+="</div>",L.asideText&&(h+='<div class="listItemAside actionSheetItemAsideText">'.concat(o()(L.asideText),"</div>")),h+="</button>")}if(e.showCancel&&(h+='<div class="buttons">',h+='<button is="emby-button" type="button" class="btnCloseActionSheet">'.concat(c.Ay.translate("ButtonCancel"),"</button>"),h+="</div>"),h+="</div>",b.innerHTML=h,l.A.tv){var w=b.querySelector(".actionSheetScroller");w&&d(w,!1,!0)}var E=b.querySelector(".btnCloseActionSheet");E&&E.addEventListener("click",(function(){a.default.close(b)}));var q,T=null;return e.timeout&&(q=setTimeout((function(){a.default.close(b)}),e.timeout)),new Promise((function(t,i){var n=!1;b.addEventListener("click",(function(i){var o=r.Ay.parentWithClass(i.target,"actionSheetMenuItem");o&&(T=o.getAttribute("data-id"),e.resolveOnClick&&(Array.isArray(e.resolveOnClick)?-1!==e.resolveOnClick.indexOf(T)&&(t(T),n=!0):(t(T),n=!0)),a.default.close(b))})),b.addEventListener("close",(function(){if(l.A.tv){var o=b.querySelector(".actionSheetScroller");o&&d(o,!1,!1)}q&&(clearTimeout(q),q=void 0),n||(null!=T?(e.callback&&e.callback(T),t(T)):i(new Error("ActionSheet closed without resolving")))})),a.default.open(b).catch((function(e){console.warn("DialogHelper.open error",e)}));var o=e.positionTo&&"fullscreen"!==u.size?function(e,t,i){var n=r.Ay.getWindowSize(),o=n.innerHeight,a=n.innerWidth,l=function(e){var t,i,n=[];if(!document)return n;try{for(var o=s(e),a=o.next();!a.done;a=o.next()){var l=a.value.getBoundingClientRect();n.push({top:l.top,left:l.left,width:l.width,height:l.height})}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}return n}([e])[0];"top"!==t.positionY&&(l.top+=(l.height||0)/2),l.left+=(l.width||0)/2;var c=i.offsetHeight||300,d=i.offsetWidth||160;l.top-=c/2,l.left-=d/2;var u=l.left+d-a,b=l.top+c-o;return u>0&&(l.left-=u+20),b>0&&(l.top-=b+20),l.top+=t.offsetTop||0,l.left+=t.offsetLeft||0,l.top=Math.max(l.top,10),l.left=Math.max(l.left,10),l}(e.positionTo,e,b):null;o&&(b.style.position="fixed",b.style.margin="0",b.style.left=o.left+"px",b.style.top=o.top+"px")}))}t.default={show:u}},63001:function(e,t,i){var n=i(46782),o=i(34789),a=i(62882),l=(i(69177),Object.create(HTMLSelectElement.prototype));function c(){return!(o.A.edgeUwp||o.A.xboxOne||o.A.tizen||o.A.orsay||o.A.web0s||!o.A.tv&&n.A.tv)}function r(e){var t=s(e),i=t?t.textContent||t.innerText:null;a.default.show({items:e.options,positionTo:e,title:i}).then((function(t){!function(e,t){e.value=t}(e,t),function(e){var t=new Event("change",{bubbles:!1,cancelable:!0});e.dispatchEvent(t)}(e)}))}function s(e){for(var t=e.previousSibling;t&&"LABEL"!==t.tagName;)t=t.previousSibling;return t}function d(){var e=s(this);e&&e.classList.add("selectLabelFocused")}function u(){var e=s(this);e&&e.classList.remove("selectLabelFocused")}function b(e){e.button||c()||(e.preventDefault(),r(this))}function h(e){13!==e.keyCode&&195!==e.keyCode||c()||(e.preventDefault(),r(this))}var p=0;l.createdCallback=function(){this.id||(this.id="embyselect"+p,p++),this.classList.add("emby-select-withcolor"),n.A.tv&&this.classList.add("emby-select-focusscale"),this.addEventListener("mousedown",b),this.addEventListener("keydown",h),this.addEventListener("focus",d),this.addEventListener("blur",u)},l.attachedCallback=function(){var e;if(!this.classList.contains("emby-select")){this.classList.add("emby-select");var t,i=this.ownerDocument.createElement("label");i.innerText=this.getAttribute("label")||"",i.classList.add("selectLabel"),i.htmlFor=this.id,null===(e=this.parentNode)||void 0===e||e.insertBefore(i,this),this.classList.contains("emby-select-withcolor")&&(null===(t=this.parentNode)||void 0===t||t.insertAdjacentHTML("beforeend",'<div class="selectArrowContainer"><div style="visibility:hidden;display:none;">0</div><span class="selectArrow material-icons keyboard_arrow_down" aria-hidden="true"></span></div>'))}},l.setLabel=function(e){var t;(null===(t=this.parentNode)||void 0===t?void 0:t.querySelector("label")).innerText=e},document.registerElement("emby-select",{prototype:l,extends:"select"})},73706:function(e,t,i){i(14382),i(76281),i(78557),i(23630);var n=i(5898);t.Ay={getVideoQualityOptions:function(e){var t,i=e.currentMaxBitrate,o=null!==(t=e.videoBitRate)&&void 0!==t?t:-1,a=e.videoCodec,l=o,c=[{name:"120 Mbps",maxHeight:2160,bitrate:12e7},{name:"80 Mbps",maxHeight:2160,bitrate:8e7},{name:"60 Mbps",maxHeight:2160,bitrate:6e7},{name:"40 Mbps",maxHeight:2160,bitrate:4e7},{name:"20 Mbps",maxHeight:2160,bitrate:2e7},{name:"15 Mbps",maxHeight:1440,bitrate:15e6},{name:"10 Mbps",maxHeight:1440,bitrate:1e7},{name:"8 Mbps",maxHeight:1080,bitrate:8e6},{name:"6 Mbps",maxHeight:1080,bitrate:6e6},{name:"4 Mbps",maxHeight:720,bitrate:4e6},{name:"3 Mbps",maxHeight:720,bitrate:3e6},{name:"1.5 Mbps",maxHeight:720,bitrate:15e5},{name:"720 kbps",maxHeight:480,bitrate:72e4},{name:"420 kbps",maxHeight:360,bitrate:42e4}],r=[],s={name:n.Ay.translate("Auto"),bitrate:0,selected:e.isAutomaticBitrateEnabled};if(e.enableAuto&&r.push(s),o>0&&o<c[0].bitrate){a&&["hevc","av1","vp9"].includes(a)&&l<=2e7&&(l*=1.5);var d=c.filter((function(e){return e.bitrate>l})).pop();r.push(d)}if(c.forEach((function(e){(o<=0||e.bitrate<=l)&&r.push(e)})),i){for(var u=r.length-1,b=0,h=r.length;b<h;b++){var p=r[b];if(p.bitrate>0&&p.bitrate<=i){u=b;break}}var v=r[u];e.isAutomaticBitrateEnabled?s.autoText=v.name:v.selected=!0}return r},getAudioQualityOptions:function(e){var t=e.currentMaxBitrate,i=[],o={name:n.Ay.translate("Auto"),bitrate:0,selected:e.isAutomaticBitrateEnabled};if(e.enableAuto&&i.push(o),i.push({name:"2 Mbps",bitrate:2e6}),i.push({name:"1.5 Mbps",bitrate:15e5}),i.push({name:"1 Mbps",bitrate:1e6}),i.push({name:"320 kbps",bitrate:32e4}),i.push({name:"256 kbps",bitrate:256e3}),i.push({name:"192 kbps",bitrate:192e3}),i.push({name:"128 kbps",bitrate:128e3}),i.push({name:"96 kbps",bitrate:96e3}),i.push({name:"64 kbps",bitrate:64e3}),t){for(var a=i.length-1,l=0,c=i.length;l<c;l++){var r=i[l];if(r.bitrate>0&&r.bitrate<=t){a=l;break}}var s=i[a];e.isAutomaticBitrateEnabled?o.autoText=s.name:s.selected=!0}return i}}},77506:function(e,t,i){i.r(t),i.d(t,{default:function(){return M}}),i(29305),i(32733),i(84701),i(81678),i(24776),i(69892),i(44962),i(86584),i(89336),i(4754),i(94),i(36947),i(57132),i(78557),i(64628),i(95021),i(73687),i(83994),i(23630),i(82367);var n=i(41087),o=i(22696),a=i.n(o),l=i(94738),c=i(73025),r=i(97339),s=i(67430),d=i(90381),u=i(22622),b=i(34789),h=i(9164),p=i(73706),v=i(5898),y=i(8566),m=i(44797),f=i(71866);function S(e){return S="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},S(e)}function A(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,k(n.key),n)}}function k(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=S(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function x(e,t){if(e){if("string"==typeof e)return g(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function C(e){e.innerHTML=[5,10,15,20,25,30].map((function(e){return{name:v.Ay.translate("ValueSeconds",e),value:1e3*e}})).map((function(e){return'<option value="'.concat(e.value,'">').concat(e.name,"</option>")})).join("")}function L(e,t,i){!function(e,t,i){var n="Audio"===i?p.Ay.getAudioQualityOptions({currentMaxBitrate:d.A.maxStreamingBitrate(t,i),isAutomaticBitrateEnabled:d.A.enableAutomaticBitrateDetection(t,i),enableAuto:!0}):p.Ay.getVideoQualityOptions({currentMaxBitrate:d.A.maxStreamingBitrate(t,i),isAutomaticBitrateEnabled:d.A.enableAutomaticBitrateDetection(t,i),enableAuto:!0,maxVideoWidth:void 0});e.innerHTML=n.map((function(e){return'<option value="'.concat(e.bitrate||"",'">').concat(e.name,"</option>")})).join("")}(e,t,i),d.A.enableAutomaticBitrateDetection(t,i)?e.value="":e.value=d.A.maxStreamingBitrate(t,i)}function w(e,t,i){e.value?(d.A.maxStreamingBitrate(t,i,e.value),d.A.enableAutomaticBitrateDetection(t,i,!1)):d.A.enableAutomaticBitrateDetection(t,i,!0)}function E(e,t,i,o,s){var h,m,f=s.getCurrentUserId(),S=t.Id;!function(e,t,i){if(t.Policy.EnableVideoPlaybackTranscoding?e.querySelector(".videoQualitySection").classList.remove("hide"):e.querySelector(".videoQualitySection").classList.add("hide"),u.g.supports(r.Y.MultiServer))return e.querySelector(".fldVideoInNetworkQuality").classList.remove("hide"),e.querySelector(".fldVideoInternetQuality").classList.remove("hide"),void(t.Policy.EnableAudioPlaybackTranscoding?e.querySelector(".musicQualitySection").classList.remove("hide"):e.querySelector(".musicQualitySection").classList.add("hide"));i.getEndpointInfo().then((function(i){i.IsInNetwork?(e.querySelector(".fldVideoInNetworkQuality").classList.remove("hide"),e.querySelector(".fldVideoInternetQuality").classList.add("hide"),e.querySelector(".musicQualitySection").classList.add("hide")):(e.querySelector(".fldVideoInNetworkQuality").classList.add("hide"),e.querySelector(".fldVideoInternetQuality").classList.remove("hide"),t.Policy.EnableAudioPlaybackTranscoding?e.querySelector(".musicQualitySection").classList.remove("hide"):e.querySelector(".musicQualitySection").classList.add("hide"))}))}(e,t,s),b.A.safari&&e.querySelector(".fldEnableHi10p").classList.remove("hide"),b.A.web0s&&e.querySelector(".fldLimitSegmentLength").classList.remove("hide"),e.querySelector("#selectAllowedAudioChannels").value=i.allowedAudioChannels(),s.getCultures().then((function(i){!function(e,t){var i="";i+="<option value=''>".concat(v.Ay.translate("AnyLanguage"),"</option>");for(var n=0,o=t.length;n<o;n++){var a=t[n];i+="<option value='".concat(a.ThreeLetterISOLanguageName,"'>").concat(a.DisplayName,"</option>")}e.innerHTML=i}(e.querySelector("#selectAudioLanguage"),i),e.querySelector("#selectAudioLanguage",e).value=t.Configuration.AudioLanguagePreference||"",e.querySelector(".chkEpisodeAutoPlay").checked=t.Configuration.EnableNextEpisodeAutoPlay||!1})),u.g.supports(r.Y.ExternalPlayerIntent)&&S===f?e.querySelector(".fldExternalPlayer").classList.remove("hide"):e.querySelector(".fldExternalPlayer").classList.add("hide"),S===f&&(t.Policy.EnableVideoPlaybackTranscoding||t.Policy.EnableAudioPlaybackTranscoding)?(e.querySelector(".qualitySections").classList.remove("hide"),u.g.supports(r.Y.Chromecast)&&t.Policy.EnableVideoPlaybackTranscoding?e.querySelector(".fldChromecastQuality").classList.remove("hide"):e.querySelector(".fldChromecastQuality").classList.add("hide")):(e.querySelector(".qualitySections").classList.add("hide"),e.querySelector(".fldChromecastQuality").classList.add("hide")),e.querySelector(".chkPlayDefaultAudioTrack").checked=t.Configuration.PlayDefaultAudioTrack||!1,e.querySelector(".chkPreferFmp4HlsContainer").checked=i.preferFmp4HlsContainer(),e.querySelector(".chkLimitSegmentLength").checked=i.limitSegmentLength(),e.querySelector(".chkEnableDts").checked=d.A.enableDts(),e.querySelector(".chkEnableTrueHd").checked=d.A.enableTrueHd(),e.querySelector(".chkEnableHi10p").checked=d.A.enableHi10p(),e.querySelector(".chkEnableCinemaMode").checked=i.enableCinemaMode(),e.querySelector("#selectAudioNormalization").value=i.selectAudioNormalization(),e.querySelector(".chkEnableNextVideoOverlay").checked=i.enableNextVideoInfoOverlay(),e.querySelector(".chkRememberAudioSelections").checked=t.Configuration.RememberAudioSelections||!1,e.querySelector(".chkRememberSubtitleSelections").checked=t.Configuration.RememberSubtitleSelections||!1,e.querySelector(".chkExternalVideoPlayer").checked=d.A.enableSystemExternalPlayers(),e.querySelector(".chkLimitSupportedVideoResolution").checked=d.A.limitSupportedVideoResolution(),e.querySelector("#selectPreferredTranscodeVideoCodec").value=d.A.preferredTranscodeVideoCodec(),e.querySelector("#selectPreferredTranscodeVideoAudioCodec").value=d.A.preferredTranscodeVideoAudioCodec(),e.querySelector(".chkDisableVbrAudioEncoding").checked=d.A.disableVbrAudio(),e.querySelector(".chkAlwaysRemuxFlac").checked=d.A.alwaysRemuxFlac(),e.querySelector(".chkAlwaysRemuxMp3").checked=d.A.alwaysRemuxMp3(),L(e.querySelector(".selectVideoInNetworkQuality"),!0,"Video"),L(e.querySelector(".selectVideoInternetQuality"),!1,"Video"),L(e.querySelector(".selectMusicInternetQuality"),!1,"Audio"),h=e.querySelector(".selectChromecastVideoQuality"),m=p.Ay.getVideoQualityOptions({currentMaxBitrate:d.A.maxChromecastBitrate(),isAutomaticBitrateEnabled:!d.A.maxChromecastBitrate(),enableAuto:!0,maxVideoWidth:undefined}),h.innerHTML=m.map((function(e){return'<option value="'.concat(e.bitrate||"",'">').concat(e.name,"</option>")})).join(""),h.value=d.A.maxChromecastBitrate()||"";var A,k=e.querySelector(".selectChromecastVersion"),g="",w=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=x(e))){t&&(e=t);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}(o.CastReceiverApplications);try{for(w.s();!(A=w.n()).done;){var E=A.value;g+="<option value='".concat(a()(E.Id),"'>").concat(a()(E.Name),"</option>")}}catch(e){w.e(e)}finally{w.f()}k.innerHTML=g,k.value=t.Configuration.CastReceiverId,e.querySelector(".selectMaxVideoWidth").value=d.A.maxVideoWidth();var q=e.querySelector(".selectSkipForwardLength");C(q),q.value=i.skipForwardLength();var T=e.querySelector(".selectSkipBackLength");C(T),T.value=i.skipBackLength(),function(e,t){var i={},o=Object.values(l.M).map((function(e){var t=v.Ay.translate("MediaSegmentAction.".concat(e));return"<option value='".concat(e,"'>").concat(t,"</option>")})).join(""),a=[n.w.Intro,n.w.Preview,n.w.Recap,n.w.Commercial,n.w.Outro].map((function(e){var n=v.Ay.translate("LabelMediaSegmentsType",v.Ay.translate("MediaSegmentType.".concat(e))),a=(0,c.O)(e);return i[a]=(0,c._)(t,e),'<div class="selectContainer">\n<select is="emby-select" id="'.concat(a,'" class="segmentTypeAction" label="').concat(n,'">\n ').concat(o,"\n</select>\n</div>")})).join("");e.innerHTML=a,Object.entries(i).forEach((function(t){var i,n,o=(n=2,function(e){if(Array.isArray(e))return e}(i=t)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,a,l,c=[],r=!0,s=!1;try{if(a=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;r=!1}else for(;!(r=(n=a.call(i)).done)&&(c.push(n.value),c.length!==t);r=!0);}catch(e){s=!0,o=e}finally{try{if(!r&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(s)throw o}}return c}}(i,n)||x(i,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],l=o[1],c=e.querySelector("#".concat(a));c&&(c.value=l)}))}(e.querySelector(".mediaSegmentActionContainer"),i),y.Ay.hide()}function q(e){var t=this,i=s.tF.getApiClient(t.options.serverId),n=t.options.userId,o=t.options.userSettings;return o.setUserInfo(n,i).then((function(){var e=t.options.enableSaveConfirmation;!function(e,t,i,n,o,a){y.Ay.show(),o.getUser(i).then((function(i){(function(e,t,i,n){d.A.enableSystemExternalPlayers(e.querySelector(".chkExternalVideoPlayer").checked),d.A.maxChromecastBitrate(e.querySelector(".selectChromecastVideoQuality").value),d.A.maxVideoWidth(e.querySelector(".selectMaxVideoWidth").value),d.A.limitSupportedVideoResolution(e.querySelector(".chkLimitSupportedVideoResolution").checked),d.A.preferredTranscodeVideoCodec(e.querySelector("#selectPreferredTranscodeVideoCodec").value),d.A.preferredTranscodeVideoAudioCodec(e.querySelector("#selectPreferredTranscodeVideoAudioCodec").value),d.A.enableDts(e.querySelector(".chkEnableDts").checked),d.A.enableTrueHd(e.querySelector(".chkEnableTrueHd").checked),d.A.enableHi10p(e.querySelector(".chkEnableHi10p").checked),d.A.disableVbrAudio(e.querySelector(".chkDisableVbrAudioEncoding").checked),d.A.alwaysRemuxFlac(e.querySelector(".chkAlwaysRemuxFlac").checked),d.A.alwaysRemuxMp3(e.querySelector(".chkAlwaysRemuxMp3").checked),w(e.querySelector(".selectVideoInNetworkQuality"),!0,"Video"),w(e.querySelector(".selectVideoInternetQuality"),!1,"Video"),w(e.querySelector(".selectMusicInternetQuality"),!1,"Audio"),i.allowedAudioChannels(e.querySelector("#selectAllowedAudioChannels").value),t.Configuration.AudioLanguagePreference=e.querySelector("#selectAudioLanguage").value,t.Configuration.PlayDefaultAudioTrack=e.querySelector(".chkPlayDefaultAudioTrack").checked,t.Configuration.EnableNextEpisodeAutoPlay=e.querySelector(".chkEpisodeAutoPlay").checked,i.preferFmp4HlsContainer(e.querySelector(".chkPreferFmp4HlsContainer").checked),i.limitSegmentLength(e.querySelector(".chkLimitSegmentLength").checked),i.enableCinemaMode(e.querySelector(".chkEnableCinemaMode").checked),i.selectAudioNormalization(e.querySelector("#selectAudioNormalization").value),i.enableNextVideoInfoOverlay(e.querySelector(".chkEnableNextVideoOverlay").checked),t.Configuration.RememberAudioSelections=e.querySelector(".chkRememberAudioSelections").checked,t.Configuration.RememberSubtitleSelections=e.querySelector(".chkRememberSubtitleSelections").checked,t.Configuration.CastReceiverId=e.querySelector(".selectChromecastVersion").value,i.skipForwardLength(e.querySelector(".selectSkipForwardLength").value),i.skipBackLength(e.querySelector(".selectSkipBackLength").value);var o=e.querySelectorAll(".segmentTypeAction")||[];return Array.prototype.forEach.call(o,(function(e){i.set(e.id,e.value,!1)})),n.updateUserConfiguration(t.Id,t.Configuration)})(t,i,n,o).then((function(){y.Ay.hide(),a&&(0,f.A)(v.Ay.translate("SettingsSaved")),m.A.trigger(e,"saved")}),(function(){y.Ay.hide()}))}))}(t,t.options.element,n,o,i,e)})),e&&e.preventDefault(),!1}i(63001),i(77157);var T=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,function(e,t){e.element.innerHTML=v.Ay.translateHtml('<form style="margin:0 auto"> <div class="verticalSection verticalSection-extrabottompadding"> <h2 class="sectionTitle"> ${HeaderAudioSettings} </h2> <div class="selectContainer"> <select is="emby-select" id="selectAllowedAudioChannels" label="${LabelAllowedAudioChannels}"> <option value="-1">${Auto}</option> <option value="1">${LabelSelectMono}</option> <option value="2">${LabelSelectStereo}</option> <option value="6">5.1 ${LabelSelectAudioChannels}</option> <option value="8">7.1 ${LabelSelectAudioChannels}</option> </select> </div> <div class="selectContainer"> <select is="emby-select" id="selectAudioLanguage" label="${LabelAudioLanguagePreference}"></select> </div> <label class="checkboxContainer"> <input type="checkbox" is="emby-checkbox" class="chkPlayDefaultAudioTrack"/> <span>${LabelPlayDefaultAudioTrack}</span> </label> <div class="checkboxContainer checkboxContainer-withDescription"> <label> <input type="checkbox" is="emby-checkbox" class="chkDisableVbrAudioEncoding"/> <span>${LabelDisableVbrAudioEncoding}</span> </label> <div class="fieldDescription checkboxFieldDescription">${DisableVbrAudioEncodingHelp}</div> </div> </div> <div class="qualitySections hide"> <div class="verticalSection verticalSection-extrabottompadding videoQualitySection hide"> <h2 class="sectionTitle"> ${HeaderVideoQuality} </h2> <div class="selectContainer fldVideoInNetworkQuality hide"> <select is="emby-select" class="selectVideoInNetworkQuality" label="${LabelHomeNetworkQuality}"></select> </div> <div class="selectContainer fldVideoInternetQuality hide"> <select is="emby-select" class="selectVideoInternetQuality" label="${LabelInternetQuality}"></select> </div> <div class="selectContainer fldChromecastQuality hide"> <select is="emby-select" class="selectChromecastVideoQuality" label="${LabelMaxChromecastBitrate}"></select> </div> <div class="selectContainer"> <select is="emby-select" class="selectMaxVideoWidth" label="${LabelMaxVideoResolution}"> <option value="0">${Auto}</option> <option value="-1">${ScreenResolution}</option> <option value="640">360p</option> <option value="852">480p</option> <option value="1280">720p</option> <option value="1920">1080p</option> <option value="3840">4K</option> <option value="7680">8K</option> </select> </div> <div class="checkboxContainer checkboxContainer-withDescription"> <label> <input type="checkbox" is="emby-checkbox" class="chkLimitSupportedVideoResolution"/> <span>${LimitSupportedVideoResolution}</span> </label> <div class="fieldDescription checkboxFieldDescription">${LimitSupportedVideoResolutionHelp}</div> </div> </div> <div class="verticalSection verticalSection-extrabottompadding musicQualitySection hide"> <h2> ${HeaderMusicQuality} </h2> <div class="selectContainer"> <select is="emby-select" class="selectMusicInternetQuality" label="${LabelInternetQuality}"></select> </div> </div> </div> <div class="verticalSection verticalSection-extrabottompadding"> <h2 class="sectionTitle"> ${TabAdvanced} </h2> <div class="checkboxContainer checkboxContainer-withDescription"> <label> <input type="checkbox" is="emby-checkbox" class="chkPreferFmp4HlsContainer"/> <span>${PreferFmp4HlsContainer}</span> </label> <div class="fieldDescription checkboxFieldDescription">${PreferFmp4HlsContainerHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription cinemaModeOptions"> <label> <input type="checkbox" is="emby-checkbox" class="chkEnableCinemaMode"/> <span>${EnableCinemaMode}</span> </label> <div class="fieldDescription checkboxFieldDescription">${CinemaModeConfigurationHelp}</div> </div> <div class="checkboxContainer fldEpisodeAutoPlay"> <label> <input type="checkbox" is="emby-checkbox" class="chkEpisodeAutoPlay"/> <span>${PlayNextEpisodeAutomatically}</span> </label> </div> <div class="checkboxContainer checkboxContainer-withDescription"> <label> <input type="checkbox" is="emby-checkbox" class="chkRememberAudioSelections"/> <span>${RememberAudioSelections}</span> </label> <div class="fieldDescription checkboxFieldDescription">${RememberAudioSelectionsHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription"> <label> <input type="checkbox" is="emby-checkbox" class="chkRememberSubtitleSelections"/> <span>${RememberSubtitleSelections}</span> </label> <div class="fieldDescription checkboxFieldDescription">${RememberSubtitleSelectionsHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription fldEnableNextVideoOverlay"> <label> <input type="checkbox" is="emby-checkbox" class="chkEnableNextVideoOverlay"/> <span>${EnableNextVideoInfoOverlay}</span> </label> <div class="fieldDescription checkboxFieldDescription">${EnableNextVideoInfoOverlayHelp}</div> </div> <div class="checkboxContainer fldExternalPlayer checkboxContainer-withDescription hide"> <label> <input type="checkbox" is="emby-checkbox" class="chkExternalVideoPlayer"/> <span>${EnableExternalVideoPlayers}</span> </label> <div class="fieldDescription checkboxFieldDescription"> <div class="labelNativeExternalPlayers">${EnableExternalVideoPlayersHelp}</div> </div> </div> <div class="selectContainer"> <select is="emby-select" class="selectChromecastVersion" label="${LabelChromecastVersion}"></select> </div> <div class="selectContainer"> <select is="emby-select" class="selectSkipForwardLength" label="${LabelSkipForwardLength}"></select> </div> <div class="selectContainer"> <select is="emby-select" class="selectSkipBackLength" label="${LabelSkipBackLength}"></select> </div> <h3 class="sectionTitle">${HeaderMediaSegmentActions}</h3> <div class="mediaSegmentActionContainer"></div> </div> <div class="verticalSection verticalSection-extrabottompadding"> <h2 class="sectionTitle"> ${HeaderVideoAdvanced} </h2> <div class="checkboxContainer checkboxContainer-withDescription fldEnableDts"> <label> <input type="checkbox" is="emby-checkbox" class="chkEnableDts"/> <span>${EnableDts}</span> </label> <div class="fieldDescription checkboxFieldDescription">${EnableDtsHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription fldEnableTrueHd"> <label> <input type="checkbox" is="emby-checkbox" class="chkEnableTrueHd"/> <span>${EnableTrueHd}</span> </label> <div class="fieldDescription checkboxFieldDescription">${EnableTrueHdHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription fldEnableHi10p hide"> <label> <input type="checkbox" is="emby-checkbox" class="chkEnableHi10p"/> <span>${EnableHi10p}</span> </label> <div class="fieldDescription checkboxFieldDescription">${EnableHi10pHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription fldLimitSegmentLength hide"> <label> <input type="checkbox" is="emby-checkbox" class="chkLimitSegmentLength"/> <span>${LimitSegmentLength}</span> </label> <div class="fieldDescription checkboxFieldDescription">${LimitSegmentLengthHelp}</div> </div> <div class="selectContainer"> <select is="emby-select" id="selectPreferredTranscodeVideoCodec" label="${LabelSelectPreferredTranscodeVideoCodec}"> <option value="">${Auto}</option> <option value="h264">H264</option> <option value="hevc">HEVC</option> <option value="av1">AV1</option> </select> <div class="fieldDescription">${SelectPreferredTranscodeVideoCodecHelp}</div> </div> <div class="selectContainer"> <select is="emby-select" id="selectPreferredTranscodeVideoAudioCodec" label="${LabelSelectPreferredTranscodeVideoAudioCodec}"> <option value="">${Auto}</option> <option value="aac">AAC</option> <option value="ac3">AC3</option> <option value="alac">ALAC</option> <option value="dts">DTS</option> <option value="flac">FLAC</option> <option value="opus">Opus</option> </select> <div class="fieldDescription">${SelectPreferredTranscodeVideoAudioCodecHelp}</div> </div> </div> <div class="verticalSection verticalSection-extrabottompadding"> <h2 class="sectionTitle"> ${HeaderAudioAdvanced} </h2> <div class="selectContainer"> <select is="emby-select" id="selectAudioNormalization" label="${LabelSelectAudioNormalization}"> <option value="Off">${Off}</option> <option value="TrackGain">${LabelTrackGain}</option> <option value="AlbumGain">${LabelAlbumGain}</option> </select> <div class="fieldDescription">${SelectAudioNormalizationHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription"> <label> <input type="checkbox" is="emby-checkbox" class="chkAlwaysRemuxFlac"/> <span>${LabelAlwaysRemuxFlacAudioFiles}</span> </label> <div class="fieldDescription checkboxFieldDescription">${AlwaysRemuxFlacAudioFilesHelp}</div> </div> <div class="checkboxContainer checkboxContainer-withDescription"> <label> <input type="checkbox" is="emby-checkbox" class="chkAlwaysRemuxMp3"/> <span>${LabelAlwaysRemuxMp3AudioFiles}</span> </label> <div class="fieldDescription checkboxFieldDescription">${AlwaysRemuxMp3AudioFilesHelp}</div> </div> </div> <button is="emby-button" type="submit" class="raised button-submit block btnSave hide"> <span>${Save}</span> </button> </form> ',"core"),e.element.querySelector("form").addEventListener("submit",q.bind(t)),e.enableSaveButton&&e.element.querySelector(".btnSave").classList.remove("hide"),t.loadData(),e.autoFocus&&h.A.autoFocus(e.element)}(t,this)},t=[{key:"loadData",value:function(){var e=this,t=e.options.element;y.Ay.show();var i=e.options.userId,n=s.tF.getApiClient(e.options.serverId),o=e.options.userSettings;n.getUser(i).then((function(a){n.getSystemInfo().then((function(l){o.setUserInfo(i,n).then((function(){e.dataLoaded=!0,E(t,a,o,l,n)}))}))}))}},{key:"submit",value:function(){q.call(this)}},{key:"destroy",value:function(){this.options=null}}],t&&A(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),D=T,V=i(82885),H=i(84069),I=V.UserSettings;function M(e,t){var i,n=t.userId||ApiClient.getCurrentUserId(),o=n===ApiClient.getCurrentUserId()?V:new I;e.addEventListener("viewshow",(function(){i?i.loadData():i=new D({serverId:ApiClient.serverId(),userId:n,element:e.querySelector(".settingsContainer"),userSettings:o,enableSaveButton:!0,enableSaveConfirmation:!0,autoFocus:H.default.isEnabled()})})),e.addEventListener("viewdestroy",(function(){i&&(i.destroy(),i=null)}))}}}]);