@mibmo/jellyfin-tizen 10.11.1 → 10.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tizen-adapter.js +1 -1
- package/www/{24468.096bec826cf0404cdaa3.chunk.js → 24468.cc4786b370fe6972ab57.chunk.js} +1 -1
- package/www/32721.1565fbee2f79c634a171.chunk.js +2 -0
- package/www/{68603.86a9f7c1c422138aace6.chunk.js → 68603.dd143553b71a7dcbae51.chunk.js} +1 -1
- package/www/72521.d31ee84e2c9918dfbd9d.chunk.js +1 -0
- package/www/{81954.aa14d2b70c4f9d683138.chunk.js → 81954.221ec67f79242f490c86.chunk.js} +1 -1
- package/www/assets/img/devices/titanos.svg +12 -0
- package/www/devices.77000b3a9001dd7234e5.chunk.js +1 -0
- package/www/index.7c072432f17194a39ef4.chunk.js +1 -0
- package/www/index.html +1 -1
- package/www/libraries.db1b6d7ee092583eeac8.chunk.js +1 -0
- package/www/library.0578cfcc17ad4ce09d2b.chunk.js +1 -0
- package/www/{livetv.f0d1908d9f07ce6b47e5.chunk.js → livetv.457ec4dc72eb4ce1054b.chunk.js} +1 -1
- package/www/{logs-file.83b735e0dfb98927581c.chunk.js → logs-file.89210666c52de5a5afb1.chunk.js} +1 -1
- package/www/lyrics.05d5ed668649f4fe72bd.chunk.js +1 -0
- package/www/main.jellyfin.bundle.js +1 -1
- package/www/node_modules.@mui.material.bundle.js +1 -1
- package/www/node_modules.@mui.system.bundle.js +1 -1
- package/www/playback-video.1bb437c4ee35983c6b77.chunk.js +2 -0
- package/www/runtime.bundle.js +1 -1
- package/www/{session-login.fc6a436c27a51e90cca1.chunk.js → session-login.c08895ee559e30dd0241.chunk.js} +2 -2
- package/www/{session-selectServer.76aca8020a1cfe95d0a5.chunk.js → session-selectServer.d08dd2225623662430d8.chunk.js} +1 -1
- package/www/users-parentalcontrol.e57b97ab683e297f81cd.chunk.js +1 -0
- package/www/32721.156e7af28047f73c8824.chunk.js +0 -2
- package/www/72521.dfbf250ffa67457d3498.chunk.js +0 -1
- package/www/devices.15672c5c1df44f1f0627.chunk.js +0 -1
- package/www/index.935caa32a3540f84db29.chunk.js +0 -1
- package/www/libraries.58c2c475e0ec08899483.chunk.js +0 -1
- package/www/library.3c022917ccaaa44c880e.chunk.js +0 -1
- package/www/lyrics.07069d116d4ca960ba52.chunk.js +0 -1
- package/www/playback-video.8a65f2bdd26567349b85.chunk.js +0 -2
- package/www/users-parentalcontrol.779915bd59333c770018.chunk.js +0 -1
- /package/www/{32721.156e7af28047f73c8824.chunk.js.LICENSE.txt → 32721.1565fbee2f79c634a171.chunk.js.LICENSE.txt} +0 -0
- /package/www/{playback-video.8a65f2bdd26567349b85.chunk.js.LICENSE.txt → playback-video.1bb437c4ee35983c6b77.chunk.js.LICENSE.txt} +0 -0
- /package/www/{session-login.fc6a436c27a51e90cca1.chunk.js.LICENSE.txt → session-login.c08895ee559e30dd0241.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.jellyfin.bundle.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk=self.webpackChunk||[]).push([[14577],{891:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(96802),i=n(80401),o=n(69410),a=function(){var e=(0,o.gf)();return(0,i.I)({queryKey:["QuickConnect","Enabled"],queryFn:function(t){var n,i,o,a,s,l,u=t.signal;return n=e,i={signal:u},o=void 0,a=void 0,l=function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:if(!(e=n.api))throw new Error("No API instance available");return[4,(0,r.k)(e).getQuickConnectEnabled(i)];case 1:return[2,t.sent().data]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}i((l=l.apply(o,a||[])).next())}))}})}},1935:function(e,t,n){"use strict";var r;n.d(t,{K:function(){return r}}),function(e){e.SignedIn="SignedIn",e.ServerMismatch="ServerMismatch",e.ServerSignIn="ServerSignIn",e.ServerSelection="ServerSelection",e.ServerUpdateNeeded="ServerUpdateNeeded",e.Unavailable="Unavailable"}(r||(r={}))},2290:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=40;function a(e){var t,n,r,o={Items:[],StartIndex:0,TotalRecordCount:0};try{for(var a=i(e),s=a.next();!s.done;s=a.next()){var l=s.value;l.Items?l.TotalRecordCount?void 0!==l.StartIndex?(o.Items=null===(r=o.Items)||void 0===r?void 0:r.concat(l.Items),o.TotalRecordCount+=l.TotalRecordCount,o.StartIndex=Math.min(o.StartIndex||0,l.StartIndex)):console.log("[getItems] Retrieved StartIndex is invalid",l.StartIndex):console.log("[getItems] Retrieved TotalRecordCount is invalid",l.TotalRecordCount):console.log("[getItems] Retrieved Items array is invalid",l.Items)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}function s(e,t,n){var i,s=null===(i=null==n?void 0:n.Ids)||void 0===i?void 0:i.split(",");if(!n||!s||s.length<=o)return e.getItems(t,n);var l=function(e,t,n){for(var i,a,s,l=r({},n),u=(null===(i=n.Ids)||void 0===i?void 0:i.split(","))||[],c=[],d=null!==(a=n.Limit)&&void 0!==a?a:1/0,f=0;f<u.length&&f<d;f=s){(s=f+o)>d&&(s=d);var p=u.slice(f,s);l.Ids=p.join(","),c.push(e.getItems(t,l))}return c}(e,t,n);return Promise.all(l).then(a)}},3312:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r}});var r=[{path:"addserver",pageProps:{controller:"session/addServer/index",view:"session/addServer/index.html"}},{path:"selectserver",pageProps:{controller:"session/selectServer/index",view:"session/selectServer/index.html"}},{path:"login",pageProps:{controller:"session/login/index",view:"session/login/index.html"}},{path:"forgotpassword",pageProps:{controller:"session/forgotPassword/index",view:"session/forgotPassword/index.html"}},{path:"forgotpasswordpin",pageProps:{controller:"session/resetPassword/index",view:"session/resetPassword/index.html"}}]},4877:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_ADMIN_ROUTES:function(){return i}});var r=n(19373),i=[{path:"networking",pageProps:{appType:r.u.Dashboard,controller:"networking",view:"networking.html"}},{path:"livetv/guide",pageProps:{appType:r.u.Dashboard,controller:"livetvguideprovider",view:"livetvguideprovider.html"}},{path:"livetv/tuner",pageProps:{appType:r.u.Dashboard,controller:"livetvtuner",view:"livetvtuner.html"}}]},5824:function(e,t,n){"use strict";n.d(t,{A:function(){return M}});var r=n(62540),i=n(68136),o=n(83273),a=n(75487),s=n(72073),l=n(63696),u=n(38829),c=n(69410),d=n(5898),f=n(38783),p=n(6460),m=n(66239),y=n(89857),v=n(4295),h=n(14380),g=n(32051),b=n(45065),S=n(29223),A=n(74156),x=n(44790),w=n(60434),P=n(80099),k=n(48402),I=n(85637),j=n(80401),T=function(){var e=(0,c.gf)().api;return(0,j.I)({queryKey:["SyncPlay","Groups"],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,r=void 0,o=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){switch(n.label){case 0:return[4,(0,p.u)(e).syncPlayGetGroups(t)];case 1:return[2,n.sent().data]}}))},new((i=void 0)||(i=Promise))((function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function s(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}l((o=o.apply(n,r||[])).next())}));var n,r,i,o}(e,{signal:n})},enabled:!!e})},C=n(44797),E=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},_="app-sync-play-menu",L=function(e){var t,o,a=e.anchorEl,s=e.open,j=e.onMenuClose,L=E((0,l.useState)(),2),M=L[0],O=L[1],R=(0,c.gf)(),D=R.__legacyApiClient__,N=R.api,F=R.user,U=E((0,l.useState)(),2),V=U[0],B=U[1],z=Boolean(V);(0,l.useEffect)((function(){var e;O(null===(e=u.X.firstOfType(f.Q.SyncPlay))||void 0===e?void 0:e.instance)}),[]);var q=T().data,H=(0,l.useCallback)((function(){N&&F&&((0,p.u)(N).syncPlayCreateGroup({newGroupRequestDto:{GroupName:d.Ay.translate("SyncPlayGroupDefaultTitle",F.Name)}}).catch((function(e){console.error("[SyncPlayMenu] failed to create a SyncPlay group",e)})),j())}),[N,j,F]),G=(0,l.useCallback)((function(){N&&((0,p.u)(N).syncPlayLeaveGroup().catch((function(e){console.error("[SyncPlayMenu] failed to leave SyncPlay group",e)})),j())}),[N,j]),W=(0,l.useCallback)((function(e){N&&((0,p.u)(N).syncPlayJoinGroup({joinGroupRequestDto:{GroupId:e}}).catch((function(e){console.error("[SyncPlayMenu] failed to join SyncPlay group",e)})),j())}),[N,j]),Y=(0,l.useCallback)((function(){return e=void 0,t=void 0,i=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(e){switch(e.label){case 0:return M?[4,Promise.all([n.e(45568),n.e(96084)]).then(n.bind(n,45568))]:[2];case 1:return new(0,e.sent().default)(D,M.Manager.getTimeSyncCore(),{groupInfo:V}).embed().catch((function(e){e&&console.error("[SyncPlayMenu] Error creating SyncPlay settings editor",e)})),j(),[2]}}))},new((r=void 0)||(r=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}));var e,t,r,i}),[D,V,j,M]),Q=(0,l.useCallback)((function(){D&&(null==M||M.Manager.resumeGroupPlayback(D),j())}),[D,j,M]),K=(0,l.useCallback)((function(){D&&(null==M||M.Manager.haltGroupPlayback(D),j())}),[D,j,M]),J=(0,l.useCallback)((function(e,t){var n;B(M&&t&&null!==(n=M.Manager.getGroupInfo())&&void 0!==n?n:void 0)}),[M]);(0,l.useEffect)((function(){if(M)return C.A.on(M.Manager,"enabled",J),function(){C.A.off(M.Manager,"enabled",J)}}),[J,M]);var X=[];z?((null==M?void 0:M.Manager.isPlaylistEmpty())||(null==M?void 0:M.Manager.isPlaybackActive())?(null==M?void 0:M.Manager.isPlaybackActive())&&X.push((0,r.jsxs)(I.A,{onClick:K,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(b.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayHaltPlayback")})]},"sync-play-stop-playback")):X.push((0,r.jsxs)(I.A,{onClick:Q,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(g.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayResumePlayback")})]},"sync-play-start-playback")),X.push((0,r.jsxs)(I.A,{onClick:Y,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(S.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("Settings")})]},"sync-play-settings")),X.push((0,r.jsx)(A.A,{},"sync-play-controls-divider")),X.push((0,r.jsxs)(I.A,{onClick:G,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(h.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayLeaveGroup")})]},"sync-play-exit"))):(null==q?void 0:q.length)||(null===(t=null==F?void 0:F.Policy)||void 0===t?void 0:t.SyncPlayAccess)===i.r.CreateAndJoinGroups?(q&&q.length>0&&(q.forEach((function(e){var t;X.push((0,r.jsxs)(I.A,{onClick:function(){return e.GroupId&&W(e.GroupId)},children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(y.A,{})}),(0,r.jsx)(w.A,{primary:e.GroupName,secondary:null===(t=e.Participants)||void 0===t?void 0:t.join(", ")})]},e.GroupId))})),X.push((0,r.jsx)(A.A,{},"sync-play-groups-divider"))),(null===(o=null==F?void 0:F.Policy)||void 0===o?void 0:o.SyncPlayAccess)===i.r.CreateAndJoinGroups&&X.push((0,r.jsxs)(I.A,{onClick:H,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(m.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayNewGroupDescription")})]},"sync-play-new-group"))):X.push((0,r.jsxs)(I.A,{disabled:!0,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(v.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayNoGroups")})]},"sync-play-unavailable"));var $=z?{"aria-labelledby":"sync-play-active-subheader",subheader:(0,r.jsx)(P.A,{component:"div",id:"sync-play-active-subheader",children:null==V?void 0:V.GroupName})}:void 0;return(0,r.jsx)(k.A,{anchorEl:a,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:_,keepMounted:!0,open:s,onClose:j,slotProps:{list:$},children:X})},M=function(){var e=(0,c.gf)().user,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,l.useState)(null),2),n=t[0],p=t[1],m=Boolean(n),y=(0,l.useCallback)((function(e){p(e.currentTarget)}),[p]),v=(0,l.useCallback)((function(){p(null)}),[p]);return(null==e?void 0:e.Policy)&&e.Policy.SyncPlayAccess===i.r.None||0===u.X.ofType(f.Q.SyncPlay).length?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{title:d.Ay.translate("ButtonSyncPlay"),children:(0,r.jsx)(a.A,{size:"large","aria-label":d.Ay.translate("ButtonSyncPlay"),"aria-controls":_,"aria-haspopup":"true",onClick:y,color:"inherit",children:(0,r.jsx)(o.A,{})})}),(0,r.jsx)(L,{open:m,anchorEl:n,onMenuClose:v})]})}},5898:function(e,t,n){"use strict";n.d(t,{Mo:function(){return d},Tl:function(){return A},c1:function(){return k},i5:function(){return h},jE:function(){return v}}),n(29305),n(32733),n(84701),n(14382),n(69892),n(76281),n(84734),n(44962),n(89336),n(78557),n(90076),n(95021),n(73687),n(99425),n(83994),n(93062),n(97747),n(82367);var r=n(77083),i=n(82885),o=n(44797),a=n(93721);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l,u,c,d="en-us",f=["ar","fa","ur","he"],p={},m=!1;function y(){return l}function v(){return u}function h(){var e;return document.documentElement.getAttribute("data-culture")||(navigator.language?navigator.language:navigator.userLanguage?navigator.userLanguage:null!==(e=navigator.languages)&&void 0!==e&&e.length?navigator.languages[0]:d)}function g(e){m=!1;var t,r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}(f);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(e.includes(o)){m=!0;break}}}catch(e){i.e(e)}finally{i.f()}r=m?"rtl":"ltr",document.getElementsByTagName("body")[0].setAttribute("dir",r),document.getElementsByTagName("html")[0].setAttribute("dir",r),"rtl"===r&&n.e(8752).then(n.bind(n,8752))}function b(){var e,t;try{e=i.currentSettings.language()}catch(e){console.error("no language set in user settings")}g(e=e||h()),l=A(e),document.documentElement.setAttribute("lang",l);try{t=i.currentSettings.dateTimeLocale()}catch(e){console.error("no date format set in user settings")}u=t?A(t):l,(0,a.cu)(u),function(e){for(var t in p)S(p[t],e);if(e!==d)for(var n in p)S(p[n],d)}(l)}function S(e,t){return e.dictionaries[t]?Promise.resolve():function(e,t){t=A(t);var r=e.filter((function(e){return A(e.lang)===t}));return r.length||(t=t.replace(/-.*/,""),(r=e.filter((function(e){return A(e.lang)===t}))).length||(r=e.filter((function(e){return A(e.lang)===d})))),new Promise((function(e){if(r.length){var t=r[0].path;n(73125)("./".concat(t)).then((function(t){e(t)})).catch((function(){e({})}))}else e()}))}(e.translations,t).then((function(n){e.dictionaries[t]=n}))}function A(e){return e.replace("_","-").toLowerCase()}function x(e,t){e||(e=I());var n=p[e];return n?n.dictionaries[t]:{}}function w(e){p[e.name]={translations:e.strings||e.translations,dictionaries:{}}}function P(e,t){var n,i,o=x(t,y());return null!==(n=o)&&void 0!==n&&n[e]||null!==(i=o=x(t,d))&&void 0!==i&&i[e]?o[e]:(!o||(0,r.A)(o)?console.warn("Translation dictionary is empty."):console.error("Translation key is missing from dictionary: ".concat(e)),e)}function k(e,t){if(e=e.default||e,t||(t=I()),!t)throw new Error("module cannot be null or empty");var n=e.indexOf("${");if(-1===n)return e;n+=2;var r=e.indexOf("}",n);if(-1===r)return e;var i=e.substring(n,r),o=P(i,t);return k(e=e.replace("${"+i+"}",o),t)}function I(e){return e&&(c=e),c}b(),o.A.on(i.currentSettings,"change",(function(e,t){"language"!==t&&"datetimelocale"!==t||b()})),t.Ay={translate:function(e){for(var t=function(e){var t,n=e.split("#");return n.length>1&&(t=n[0],e=n[1]),P(e,t)}(e),n=1;n<arguments.length;n++)t=t.replaceAll("{"+(n-1)+"}",arguments[n].toLocaleString(l));return t},translateHtml:k,loadStrings:function(e){var t,n=y(),r=[];return"string"==typeof e?t=e:(t=e.name,w(e)),r.push(S(p[t],n)),r.push(S(p[t],d)),Promise.all(r)},defaultModule:I,getCurrentLocale:y,getCurrentDateTimeLocale:v,register:w,updateCurrentCulture:b,getIsRTL:function(){return m},getIsElementRTL:function(e){return window.getComputedStyle?"rtl"==window.getComputedStyle(e,null).getPropertyValue("direction"):"rtl"==e.currentStyle.direction}}},7062:function(e,t,n){var r={"./edititemmetadata":[1217,90221],"./edititemmetadata.html":[20510,68529],"./edititemmetadata.js":[1217,90221],"./favorites":[53857,45642,29808,12011,24468,4113,4062],"./favorites.js":[53857,45642,29808,12011,24468,4113,4062],"./home":[15088,45642,4113,45568,73233,81954,27962],"./home.html":[5939,8372],"./home.js":[15088,45642,4113,45568,73233,81954,32762],"./hometab":[66242,45642,29808,12011,24468,4113,56213,18119],"./hometab.js":[66242,45642,29808,12011,24468,4113,56213,18119],"./itemDetails":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./itemDetails/":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./itemDetails/index":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./itemDetails/index.html":[90934,76331],"./itemDetails/index.js":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./list":[23416,45642,29808,28336,1820,32125,70712,12011,24468,4113,6940,45568,73233,83715],"./list.html":[68852,52179],"./list.js":[23416,45642,29808,28336,1820,32125,70712,12011,24468,4113,6940,45568,73233,83715],"./livetv.html":[19616,65911],"./livetv/livetvchannels":[69793,45642,29808,12011,24468,64340],"./livetv/livetvchannels.js":[69793,45642,29808,12011,24468,64340],"./livetv/livetvguide":[38193,12011,4113,36934,69212],"./livetv/livetvguide.js":[38193,12011,4113,36934,69212],"./livetv/livetvrecordings":[6157,45642,29808,12011,24468,28588],"./livetv/livetvrecordings.js":[6157,45642,29808,12011,24468,28588],"./livetv/livetvschedule":[21152,45642,29808,12011,24468,96603],"./livetv/livetvschedule.js":[21152,45642,29808,12011,24468,96603],"./livetv/livetvseriestimers":[61470,45642,12011,24468,3365],"./livetv/livetvseriestimers.js":[61470,45642,12011,24468,3365],"./livetv/livetvsuggested":[51070,45642,29808,12011,24468,4113,85757],"./livetv/livetvsuggested.js":[51070,45642,29808,12011,24468,4113,85757],"./lyrics":[87024,45642,45568,73233,7631],"./lyrics.html":[42512,97543],"./lyrics.js":[87024,45642,45568,73233,7631],"./movies/moviecollections":[35115,45642,29808,28336,1820,32125,70712,12011,24468,6940,35115,49654],"./movies/moviecollections.js":[35115,45642,29808,28336,1820,32125,70712,12011,24468,6940,35115,49654],"./movies/moviegenres":[3776,45642,12011,24468,12975],"./movies/moviegenres.js":[3776,45642,12011,24468,12975],"./movies/movies":[70179,45642,29808,28336,1820,32125,70712,12011,24468,6940,70179,9090],"./movies/movies.html":[98849,88300],"./movies/movies.js":[70179,45642,29808,28336,1820,32125,70712,12011,24468,6940,70179,9090],"./movies/moviesrecommended":[4628,45642,29808,12011,24468,4113,45568,73233,48935],"./movies/moviesrecommended.js":[4628,45642,29808,12011,24468,4113,45568,73233,48935],"./music/music.html":[54329,61612],"./music/musicalbums":[38775,45642,29808,28336,1820,32125,70712,12011,24468,6940,38775,96902],"./music/musicalbums.js":[38775,45642,29808,28336,1820,32125,70712,12011,24468,6940,38775,96902],"./music/musicartists":[43531,45642,29808,28336,1820,32125,70712,12011,24468,6940,43531,51418],"./music/musicartists.js":[43531,45642,29808,28336,1820,32125,70712,12011,24468,6940,43531,51418],"./music/musicgenres":[50959,45642,12011,24468,19830],"./music/musicgenres.js":[50959,45642,12011,24468,19830],"./music/musicplaylists":[67056,45642,12011,24468,23163],"./music/musicplaylists.js":[67056,45642,12011,24468,23163],"./music/musicrecommended":[82604,45642,29808,12011,24468,4113,45568,73233,48967],"./music/musicrecommended.js":[82604,45642,29808,12011,24468,4113,45568,73233,48967],"./music/songs":[47614,45642,29808,28336,1820,32125,70712,12011,24468,6940,50457],"./music/songs.js":[47614,45642,29808,28336,1820,32125,70712,12011,24468,6940,50457],"./playback/queue":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/queue/":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/queue/index":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/queue/index.html":[25006,53525],"./playback/queue/index.js":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/video":[33252,45642,45568,73233,57949,30394],"./playback/video/":[33252,45642,45568,73233,57949,30394],"./playback/video/index":[33252,45642,45568,73233,57949,30394],"./playback/video/index.html":[16818,21777],"./playback/video/index.js":[33252,45642,45568,73233,57949,30394],"./session/addServer":[43060,42462],"./session/addServer/":[43060,42462],"./session/addServer/index":[43060,42462],"./session/addServer/index.html":[11250,15741],"./session/addServer/index.js":[43060,42462],"./session/login":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/index":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/index.html":[14999,17244],"./session/login/index.js":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/login.scss":[26079,88654],"./session/resetPassword":[86086,70884],"./session/resetPassword/":[86086,70884],"./session/resetPassword/index":[86086,70884],"./session/resetPassword/index.html":[97652,38155],"./session/resetPassword/index.js":[86086,70884],"./session/selectServer":[1179,45642,29808,12011,4113,45568,73233,66259],"./session/selectServer/":[1179,45642,29808,12011,4113,45568,73233,66259],"./session/selectServer/index":[1179,45642,29808,12011,4113,45568,73233,66259],"./session/selectServer/index.html":[44625,89150],"./session/selectServer/index.js":[1179,45642,29808,12011,4113,45568,73233,66259],"./shows/episodes":[96747,45642,29808,28336,1820,32125,70712,12011,24468,6940,10442],"./shows/episodes.js":[96747,45642,29808,28336,1820,32125,70712,12011,24468,6940,10442],"./shows/tvgenres":[84055,45642,12011,24468,23230],"./shows/tvgenres.js":[84055,45642,12011,24468,23230],"./shows/tvrecommended":[81268,45642,29808,12011,24468,4113,45568,73233,22255],"./shows/tvrecommended.html":[77674,39783],"./shows/tvrecommended.js":[81268,45642,29808,12011,24468,4113,45568,73233,22255],"./shows/tvshows":[57965,45642,29808,28336,1820,32125,70712,12011,24468,6940,57965,17840],"./shows/tvshows.js":[57965,45642,29808,28336,1820,32125,70712,12011,24468,6940,57965,17840],"./shows/tvstudios":[3376,45642,12011,24468,98615],"./shows/tvstudios.js":[3376,45642,12011,24468,98615],"./shows/tvupcoming":[98769,45642,29808,12011,24468,17176],"./shows/tvupcoming.js":[98769,45642,29808,12011,24468,17176],"./user/controls":[73053,63549],"./user/controls/":[73053,63549],"./user/controls/index":[73053,63549],"./user/controls/index.html":[97107,44496],"./user/controls/index.js":[73053,63549],"./user/display":[40815,23247,60815,81771,40815,66935],"./user/display/":[40815,23247,60815,81771,40815,66935],"./user/display/index":[40815,23247,60815,81771,40815,66935],"./user/display/index.html":[32197,58122],"./user/display/index.js":[40815,40815,28312],"./user/home":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/home/":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/home/index":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/home/index.html":[38190,94889],"./user/home/index.js":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/playback":[77506,73468],"./user/playback/":[77506,73468],"./user/playback/index":[77506,73468],"./user/playback/index.html":[21464,64819],"./user/playback/index.js":[77506,73468],"./user/subtitles":[9070,57949,92594],"./user/subtitles/":[9070,57949,92594],"./user/subtitles/index":[9070,57949,92594],"./user/subtitles/index.html":[2690,96921],"./user/subtitles/index.js":[9070,57949,92594]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=7062,e.exports=i},7451:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r}});var r=[{path:"addserver",pageProps:{controller:"session/addServer/index",view:"session/addServer/index.html"}},{path:"selectserver",pageProps:{controller:"session/selectServer/index",view:"session/selectServer/index.html"}},{path:"login",pageProps:{controller:"session/login/index",view:"session/login/index.html"}},{path:"forgotpasswordpin",pageProps:{controller:"session/resetPassword/index",view:"session/resetPassword/index.html"}}]},7603:function(e,t,n){"use strict";n.r(t),n.d(t,{DASHBOARD_APP_PATHS:function(){return g},DASHBOARD_APP_ROUTES:function(){return b}});var r=n(62540),i=n(63696),o=n(87404),a=n(22477),s=n(39244),l=n(51218),u=n(37881),c=n(4877),d=n(62156),f=n(5898),p=n(67430),m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)},y=n(34569),v=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},h=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},g={Dashboard:"dashboard",MetadataManager:"metadata",PluginConfig:"configurationpage"},b=[{element:(0,r.jsx)(a.A,{level:"admin"}),children:[{lazy:function(){return Promise.all([n.e(45642),n.e(23247),n.e(60815),n.e(81771),n.e(90609),n.e(16304),n.e(1270),n.e(55931),n.e(41823),n.e(6496)]).then(n.bind(n,86336))},children:[{path:g.Dashboard,children:h(h(h([],v(s.ASYNC_ADMIN_ROUTES.map(l.G)),!1),v(c.LEGACY_ADMIN_ROUTES.map(u.I)),!1),[{path:"plugins/catalog",element:(0,r.jsx)(o.C5,{replace:!0,to:"/dashboard/plugins"})}],!1),errorElement:(0,r.jsx)(y.A,{pageClasses:["type-interior"]})},(0,u.I)({path:g.MetadataManager,pageProps:{controller:"edititemmetadata",view:"edititemmetadata.html"}}),{path:g.PluginConfig,element:(0,r.jsx)((function(e){var t=e.view,n=(0,o.zy)();return(0,i.useEffect)((function(){var e;e={url:n.pathname+n.search,state:n.state,autoFocus:!1,options:{supportsThemeMedia:!1,enableMediaControl:!0}},d.A.tryRestoreView(e).catch((function(r){return i=void 0,o=void 0,s=function(){var i,o;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(a){switch(a.label){case 0:return(null==r?void 0:r.cancelled)?[3,2]:[4,null==(i=p.tF.currentApiClient())?void 0:i.get(i.getUrl(t+n.search)).then((function(e){return f.Ay.translateHtml(e)}))];case 1:o=a.sent(),d.A.loadView(m(m({},e),{view:o})),a.label=2;case 2:return[2]}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function r(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}l((s=s.apply(i,o||[])).next())}));var i,o,a,s}))}),[t,n.pathname,n.search]),null}),{view:"/web/configurationpage"})}]}]}]},8566:function(e,t,n){"use strict";var r;function i(){r&&r.classList.remove("mdlSpinnerActive")}n.d(t,{jD:function(){return i}});var o={show:function(){var e;r||((e=document.createElement("div")).setAttribute("dir","ltr"),e.classList.add("docspinner"),e.classList.add("mdl-spinner"),e.innerHTML='<div class="mdl-spinner__layer mdl-spinner__layer-1"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-2"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-3"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-4"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div>',document.body.appendChild(e),r=e),r.classList.add("mdlSpinnerActive")},hide:i};window.Loading=o,t.Ay=o},9164:function(e,t,n){"use strict";n(84734),n(86584),n(87324),n(89336),n(78557),n(67593);var r=n(36300),i=n(93599),o=[];function a(e,t,n){var r;return!1!==n&&(r=e.querySelector("*[autofocus]"))||!1!==t&&(r=v(e,1,"noautofocus")[0])?(s(r),r):null}function s(e){try{e.focus({preventScroll:i.Ay.isEnabled()})}catch(e){console.error("Error in focusManager.autoFocus: "+e)}}var l=["INPUT","TEXTAREA","SELECT","BUTTON","A"],u=["BODY","DIALOG"],c=l.map((function(e){return"INPUT"===e&&(e+=':not([type="range"]):not([type="file"])'),e+':not([tabindex="-1"]):not(:disabled)'})).join(",")+",.focusable";function d(e){var t;return-1!==l.indexOf(e.tagName)||(null===(t=e.classList)||void 0===t?void 0:t.contains("focusable"))}function f(e,t){if(e){var n=e.tagName;n&&"HTML"!==n&&"BODY"!==n||(e=t)}return e}function p(e){for(var t=e;!d(e);){var n=e.parentNode;if(!n)return f(e,t);e=n}return f(e,t)}function m(e){return null!==e.offsetParent}function y(){return o[0]||document.body}function v(e,t,n){for(var r=(e||y()).querySelectorAll(c),i=[],o=0,a=r.length;o<a;o++){var s=r[o];if((!n||!s.classList.contains(n))&&m(s)&&(i.push(s),t&&i.length>=t))break}return i}function h(e,t){if(-1!==u.indexOf(e.tagName))return!0;var n=e.classList;if(n.contains("focuscontainer"))return!0;if(0===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-left"))return!0}else if(1===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-right"))return!0}else if(2===t){if(n.contains("focuscontainer-y"))return!0}else if(3===t){if(n.contains("focuscontainer-y"))return!0;if(n.contains("focuscontainer-down"))return!0}return!1}function g(e){var t;return null===(t=e.getBoundingClientRect?e.getBoundingClientRect():{top:0,left:0,width:0,height:0}).right&&((t={top:t.top,left:t.left,width:t.width,height:t.height}).right=t.left+t.width,t.bottom=t.top+t.height),t}function b(e,t,n,i){if((e=e||document.activeElement)&&(e=p(e)),n=n||(e?function(e,t){for(;!h(e,t);)if(!(e=e.parentNode))return y();return e}(e,t):y()),e&&e!=document.body){for(var o,l=r.Ay.parentWithClass(e,"focusable"),u=g(e),d=parseFloat(u.left)||0,f=parseFloat(u.top)||0,m=parseFloat(d+u.width-1)||d,v=parseFloat(f+u.height-1)||f,b=u.left+u.width/2,S=u.top+u.height/2,x=i||n.querySelectorAll(c),w=1/0,P=0,k=x.length;P<k;P++){var I=x[P];if(I!==e&&I!==l){var j=g(I);if(j.width||j.height){switch(t){case 0:if(j.left>=u.left)continue;if(j.right===u.right)continue;break;case 1:if(j.right<=u.right)continue;if(j.left===u.left)continue;break;case 2:if(j.top>=u.top)continue;if(j.bottom>=u.bottom)continue;break;case 3:if(j.bottom<=u.bottom)continue;if(j.top<=u.top)continue}var T=j.left,C=j.top,E=T+j.width-1,_=C+j.height-1,L=A(d,m,T,E),M=A(f,v,C,_),O=j.left+j.width/2,R=j.top+j.height/2,D=void 0,N=void 0;switch(t){case 0:D=Math.abs(d-Math.min(d,E)),N=M?0:Math.abs(S-R);break;case 1:D=Math.abs(m-Math.max(m,T)),N=M?0:Math.abs(S-R);break;case 2:N=Math.abs(f-Math.min(f,_)),D=L?0:Math.abs(b-O);break;case 3:N=Math.abs(v-Math.max(v,C)),D=L?0:Math.abs(b-O)}var F=Math.sqrt(D*D+N*N);F<w&&(o=I,w=F)}}}if(o){if(e){var U=r.Ay.parentWithClass(o,"focusable");U&&U!==o&&l!==U&&(o=U)}s(o)}}else a(n,!0,!1)}function S(e,t,n,r){return n>=e&&n<=t||r>=e&&r<=t}function A(e,t,n,r){return S(e,t,n,r)||S(n,r,e,t)}t.A={autoFocus:a,focus:s,focusableParent:p,getFocusableElements:v,moveLeft:function(e,t){b(e,0,t?t.container:null,t?t.focusableElements:null)},moveRight:function(e,t){b(e,1,t?t.container:null,t?t.focusableElements:null)},moveUp:function(e,t){b(e,2,t?t.container:null,t?t.focusableElements:null)},moveDown:function(e,t){b(e,3,t?t.container:null,t?t.focusableElements:null)},sendText:function(e){document.activeElement.value=e},isCurrentlyFocusable:function(e){var t;if(null===(t=e.classList)||void 0===t||!t.contains("focusable")){if(e.disabled)return!1;if("-1"===e.getAttribute("tabindex"))return!1;if("INPUT"===e.tagName){var n=e.type;if("range"===n)return!1;if("file"===n)return!1}}return m(e)},pushScope:function(e){o.push(e)},popScope:function(){o.length&&(o.length-=1)},focusFirst:function(e,t){for(var n=e.querySelectorAll(t),r=0,i=n.length;r<i;r++){var o=n[r];if(m(o)){s(o);break}}},focusLast:function(e,t){for(var n=[].slice.call(e.querySelectorAll(t),0).reverse(),r=0,i=n.length;r<i;r++){var o=n[r];if(m(o)){s(o);break}}},moveFocus:function(e,t,n,r){var i,o,a,l=t.querySelectorAll(n),u=[];for(i=0,o=l.length;i<o;i++)m(a=l[i])&&u.push(a);var c=-1;for(i=0,o=u.length;i<o;i++)if(e===(a=u[i])||a.contains(e)){c=i;break}if(-1!==c){var d=c+r;d=Math.max(0,d);var f=u[d=Math.min(d,u.length-1)];f&&s(f)}}}},10353:function(e,t,n){"use strict";n(69177);var r=n(22622),i=n(46782),o=n(70267),a=n(97339),s=n(36300),l=n(13615),u=Object.create(HTMLButtonElement.prototype),c=Object.create(HTMLAnchorElement.prototype);function d(e){var t=this.getAttribute("href")||"";"#"!==t?this.getAttribute("target")?r.g.supports(a.Y.TargetBlank)||(e.preventDefault(),l.A.openUrl(t)):(e.preventDefault(),o.appRouter.show(t)):e.preventDefault()}u.createdCallback=function(){this.classList.contains("emby-button")||(this.classList.add("emby-button"),i.A.tv&&this.classList.add("show-focus"))},u.attachedCallback=function(){"A"===this.tagName&&((0,s.f)(this,"click",d,{}),(0,s.q2)(this,"click",d,{}),"true"===this.getAttribute("data-autohide")&&(r.g.supports(a.Y.ExternalLinks)?this.classList.remove("hide"):this.classList.add("hide")))},u.detachedCallback=function(){(0,s.f)(this,"click",d,{})},c.createdCallback=u.createdCallback,c.attachedCallback=u.attachedCallback,document.registerElement("emby-button",{prototype:u,extends:"button"}),document.registerElement("emby-linkbutton",{prototype:c,extends:"a"}),t.A=u},10736:function(e,t,n){"use strict";n.r(t),n(78557),n(96054),n(23630);var r=n(41177),i=n(9164),o=n(39738),a=n(38829),s=n(70267),l=n(71866),u=n(67430),c=n(38490),d=n(44797),f=n(38783),p={};function m(){c.default.notify()}function y(e,t){var n,u=this,y=null===(n=a.X.firstOfType(f.Q.SyncPlay))||void 0===n?void 0:n.instance;if("Play"===t.MessageType){m();var v=u.serverInfo().Id;"PlayNext"===t.Data.PlayCommand?o.f.queueNext({ids:t.Data.ItemIds,serverId:v}):"PlayLast"===t.Data.PlayCommand?o.f.queue({ids:t.Data.ItemIds,serverId:v}):o.f.play({ids:t.Data.ItemIds,startPositionTicks:t.Data.StartPositionTicks,mediaSourceId:t.Data.MediaSourceId,audioStreamIndex:t.Data.AudioStreamIndex,subtitleStreamIndex:t.Data.SubtitleStreamIndex,startIndex:t.Data.StartIndex,serverId:v})}else if("Playstate"===t.MessageType)"Stop"===t.Data.Command?c.default.handleCommand("stop"):"Pause"===t.Data.Command?c.default.handleCommand("pause"):"Unpause"===t.Data.Command?c.default.handleCommand("play"):"PlayPause"===t.Data.Command?c.default.handleCommand("playpause"):"Seek"===t.Data.Command?o.f.seek(t.Data.SeekPositionTicks):"NextTrack"===t.Data.Command?c.default.handleCommand("next"):"PreviousTrack"===t.Data.Command?c.default.handleCommand("previous"):m();else if("GeneralCommand"===t.MessageType)!function(e,t){switch(console.debug("Received command: "+e.Name),e.Name){case"Select":return void c.default.handleCommand("select");case"Back":return void c.default.handleCommand("back");case"MoveUp":return void c.default.handleCommand("up");case"MoveDown":return void c.default.handleCommand("down");case"MoveLeft":return void c.default.handleCommand("left");case"MoveRight":return void c.default.handleCommand("right");case"PageUp":return void c.default.handleCommand("pageup");case"PageDown":return void c.default.handleCommand("pagedown");case"PlayTrailers":!function(e,t){e.getItem(e.getCurrentUserId(),t).then((function(e){o.f.playTrailers(e)}))}(t,e.Arguments.ItemId);break;case"SetRepeatMode":o.f.setRepeatMode(e.Arguments.RepeatMode);break;case"SetShuffleQueue":o.f.setQueueShuffleMode(e.Arguments.ShuffleMode);break;case"VolumeUp":return void c.default.handleCommand("volumeup");case"VolumeDown":return void c.default.handleCommand("volumedown");case"ChannelUp":return void c.default.handleCommand("channelup");case"ChannelDown":return void c.default.handleCommand("channeldown");case"Mute":return void c.default.handleCommand("mute");case"Unmute":return void c.default.handleCommand("unmute");case"ToggleMute":return void c.default.handleCommand("togglemute");case"SetVolume":m(),o.f.setVolume(e.Arguments.Volume);break;case"SetAudioStreamIndex":m(),o.f.setAudioStreamIndex(parseInt(e.Arguments.Index,10));break;case"SetSubtitleStreamIndex":m(),o.f.setSubtitleStreamIndex(parseInt(e.Arguments.Index,10));break;case"ToggleFullscreen":return void c.default.handleCommand("togglefullscreen");case"GoHome":return void c.default.handleCommand("home");case"GoToSettings":return void c.default.handleCommand("settings");case"DisplayContent":!function(e,t){o.f.isPlayingLocally(["Video","Book"])||s.appRouter.showItem(e.Arguments.ItemId,t.serverId())}(e,t);break;case"GoToSearch":return void c.default.handleCommand("search");case"DisplayMessage":!function(e){var t=e.Arguments;t.TimeoutMs?(0,l.A)({title:t.Header,text:t.Text}):(0,r.A)({title:t.Header,text:t.Text})}(e);break;case"ToggleOsd":case"ToggleContextMenu":case"SendKey":break;case"SendString":i.A.sendText(e.Arguments.String);break;default:console.debug("processGeneralCommand does not recognize: "+e.Name)}m()}(t.Data,u);else if("UserDataChanged"===t.MessageType){if(t.Data.UserId===u.getCurrentUserId())for(var h=0,g=t.Data.UserDataList.length;h<g;h++)d.A.trigger(p,"UserDataChanged",[u,t.Data.UserDataList[h]])}else"SyncPlayCommand"===t.MessageType?null==y||y.Manager.processCommand(t.Data,u):"SyncPlayGroupUpdate"===t.MessageType?null==y||y.Manager.processGroupUpdate(t.Data,u):d.A.trigger(p,t.MessageType,[u,t.Data])}function v(e){d.A.off(e,"message",y),d.A.on(e,"message",y)}u.tF.getApiClients().forEach(v),d.A.on(u.tF,"apiclientcreated",(function(e,t){v(t)})),window.ServerNotifications=p,t.default=p},10838:function(e,t,n){"use strict";n.r(t),n.d(t,{centerFocus:function(){return f},getPosition:function(){return a},toCenter:function(){return s},toStart:function(){return l}});var r=n(9164),i=n(36300);function o(e){return e.getBoundingClientRect?e.getBoundingClientRect():{top:0,left:0,width:void 0,height:void 0}}function a(e,t,n){var r=o(e),i=o(t),a=n?i.left-r.left:i.top-r.top,s=n?i.width:i.height;s||0===s||(s=t[n?"offsetWidth":"offsetHeight"]);var l=n?e.scrollLeft:e.scrollTop;a+=l;var u=n?e.offsetWidth:e.offsetHeight;return{start:a,center:a-u/2+s/2,end:a-u+s,size:s,isVisible:a>=l&&a+s<=l+u}}function s(e,t,n,r){var i=a(e,t,n);r&&i.isVisible||(e.scrollTo?n?e.scrollTo(i.center,0):e.scrollTo(0,i.center):n?e.scrollLeft=Math.round(i.center):e.scrollTop=Math.round(i.center))}function l(e,t,n,r){var i=a(e,t,n);r&&i.isVisible||(e.scrollTo?n?e.scrollTo(i.start,0):e.scrollTo(0,i.start):n?e.scrollLeft=Math.round(i.start):e.scrollTop=Math.round(i.start))}function u(e,t,n){var i=r.A.focusableParent(e.target);i&&s(t,i,n)}function c(e){u(e,this,!0)}function d(e){u(e,this,!1)}var f={on:function(e,t){e.setAttribute("data-scroll-mode-".concat(t?"x":"y"),"custom"),t?i.Ay.addEventListener(e,"focus",c,{capture:!0,passive:!0}):i.Ay.addEventListener(e,"focus",d,{capture:!0,passive:!0})},off:function(e,t){e.removeAttribute("data-scroll-mode-".concat(t?"x":"y")),t?i.Ay.removeEventListener(e,"focus",c,{capture:!0,passive:!0}):i.Ay.removeEventListener(e,"focus",d,{capture:!0,passive:!0})}};t.default={getPosition:a,centerFocus:f,toCenter:s,toStart:l}},10989:function(e,t,n){"use strict";n.d(t,{If:function(){return r},Jb:function(){return i},Y_:function(){return a},wi:function(){return o}});var r=1e3,i=1e4,o=r*i,a=60*o},11167:function(e,t,n){var r={"./backdropScreensaver/plugin":[53286,86040],"./backdropScreensaver/plugin.js":[53286,86040],"./bookPlayer/plugin":[14447,64633],"./bookPlayer/plugin.js":[14447,64633],"./bookPlayer/style.scss":[19036,17084],"./bookPlayer/tableOfContents":[80245,10905],"./bookPlayer/tableOfContents.js":[80245,10905],"./bookPlayer/template.html":[68104,68672],"./chromecastPlayer/castSenderApi":[9724,6270],"./chromecastPlayer/castSenderApi.js":[9724,6270],"./chromecastPlayer/plugin":[48671,30357],"./chromecastPlayer/plugin.js":[48671,30357],"./comicsPlayer/plugin":[79145,41542],"./comicsPlayer/plugin.js":[79145,41542],"./comicsPlayer/style.scss":[63459,23831],"./experimentalWarnings/plugin":[76066,40810],"./experimentalWarnings/plugin.js":[76066,40810],"./htmlAudioPlayer/plugin":[27907,87903],"./htmlAudioPlayer/plugin.js":[27907,87903],"./htmlVideoPlayer/plugin":[57379,55931,71318],"./htmlVideoPlayer/plugin.js":[57379,55931,71318],"./htmlVideoPlayer/style.scss":[28157,98887],"./logoScreensaver/plugin":[61619,49087],"./logoScreensaver/plugin.js":[61619,49087],"./logoScreensaver/style.scss":[18640,93654],"./pdfPlayer/plugin":[38362,4836],"./pdfPlayer/plugin.js":[38362,4836],"./pdfPlayer/style.scss":[63103,71769],"./photoPlayer/plugin":[7780,70118],"./photoPlayer/plugin.js":[7780,70118],"./playAccessValidation/plugin":[8450,90186],"./playAccessValidation/plugin.js":[8450,90186],"./sessionPlayer/plugin":[9112,64706],"./sessionPlayer/plugin.js":[9112,64706],"./syncPlay/core":[99555,13151,19907,60138,10672],"./syncPlay/core/":[99555,13151,19907,60138,10672],"./syncPlay/core/Controller":[73391,94561],"./syncPlay/core/Controller.js":[73391,94561],"./syncPlay/core/Helper":[20919,65849],"./syncPlay/core/Helper.js":[20919,65849],"./syncPlay/core/Manager":[86004,13151,19907,60138],"./syncPlay/core/Manager.js":[86004,13151,19907,60138],"./syncPlay/core/PlaybackCore":[629,13151],"./syncPlay/core/PlaybackCore.js":[629,13151],"./syncPlay/core/QueueCore":[19907,19907,80835],"./syncPlay/core/QueueCore.js":[19907,19907,80835],"./syncPlay/core/Settings":[4438,14510],"./syncPlay/core/Settings.js":[4438,14510],"./syncPlay/core/index":[99555,13151,19907,60138,10672],"./syncPlay/core/index.js":[99555,13151,19907,60138,10672],"./syncPlay/core/players/GenericPlayer":[16590,2],"./syncPlay/core/players/GenericPlayer.js":[16590,2],"./syncPlay/core/players/PlayerFactory":[24255,56577],"./syncPlay/core/players/PlayerFactory.js":[24255,56577],"./syncPlay/core/timeSync/TimeSync":[67122,83354],"./syncPlay/core/timeSync/TimeSync.js":[67122,83354],"./syncPlay/core/timeSync/TimeSyncCore":[55125,96307],"./syncPlay/core/timeSync/TimeSyncCore.js":[55125,96307],"./syncPlay/core/timeSync/TimeSyncServer":[95937,49755],"./syncPlay/core/timeSync/TimeSyncServer.js":[95937,49755],"./syncPlay/plugin":[55230,13151,19907,60138,927,1680],"./syncPlay/plugin.ts":[55230,13151,19907,60138,927,1680],"./syncPlay/ui/groupSelectionMenu":[1724,45568,3460],"./syncPlay/ui/groupSelectionMenu.js":[1724,45568,3460],"./syncPlay/ui/groupSelectionMenu.scss":[12475,75637],"./syncPlay/ui/playbackPermissionManager":[39387,52011],"./syncPlay/ui/playbackPermissionManager.js":[39387,52011],"./syncPlay/ui/players/HtmlAudioPlayer":[41443,13151,19907,60138,927,39573],"./syncPlay/ui/players/HtmlAudioPlayer.js":[41443,13151,19907,60138,927,39573],"./syncPlay/ui/players/HtmlVideoPlayer":[9066,13151,19907,60138,927,40394],"./syncPlay/ui/players/HtmlVideoPlayer.js":[9066,13151,19907,60138,927,40394],"./syncPlay/ui/players/NoActivePlayer":[10699,13151,19907,60138,927],"./syncPlay/ui/players/NoActivePlayer.js":[10699,13151,19907,60138,927],"./syncPlay/ui/players/QueueManager":[16209,29593],"./syncPlay/ui/players/QueueManager.js":[16209,29593],"./syncPlay/ui/settings/SettingsEditor":[45568,45568,96084],"./syncPlay/ui/settings/SettingsEditor.js":[45568,45568,96084],"./syncPlay/ui/settings/editor.html":[70123,18895],"./youtubePlayer/plugin":[8255,70555],"./youtubePlayer/plugin.js":[8255,70555],"./youtubePlayer/style.scss":[47312,49890]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=11167,e.exports=i},12446:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return r}});var r=[{path:"mypreferencesmenu",page:"user/settings"},{path:"quickconnect",page:"quickConnect"},{path:"search",page:"search"},{path:"userprofile",page:"user/userprofile"}]},13258:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(64963);t.A=function(e){var t=e.children;return(0,i.useEffect)((function(){return function(){o.Ay.reset()}}),[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mainAnimatedPages skinBody"}),(0,r.jsx)("div",{className:"skinBody",children:t})]})}},13615:function(e,t,n){"use strict";n(78557),n(23630),t.A={enableFullscreen:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.enableFullscreen&&window.NativeShell.enableFullscreen()},disableFullscreen:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.disableFullscreen&&window.NativeShell.disableFullscreen()},openClientSettings:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.openClientSettings&&window.NativeShell.openClientSettings()},openDownloadManager:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.openDownloadManager&&window.NativeShell.openDownloadManager()},openUrl:function(e,t){var n;null!==(n=window.NativeShell)&&void 0!==n&&n.openUrl?window.NativeShell.openUrl(e,t):window.open(e,t||"_blank")},updateMediaSession:function(e){var t;null!==(t=window.NativeShell)&&void 0!==t&&t.updateMediaSession&&window.NativeShell.updateMediaSession(e)},hideMediaSession:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.hideMediaSession&&window.NativeShell.hideMediaSession()},updateVolumeLevel:function(e){var t;null!==(t=window.NativeShell)&&void 0!==t&&t.updateVolumeLevel&&window.NativeShell.updateVolumeLevel(e)},downloadFiles:function(e){var t,n;return null!==(t=window.NativeShell)&&void 0!==t&&t.downloadFiles?(window.NativeShell.downloadFiles(e),!0):!(null===(n=window.NativeShell)||void 0===n||!n.downloadFile||(e.forEach((function(e){window.NativeShell.downloadFile(e)})),0))}}},13993:function(e,t,n){"use strict";n.r(t);var r=n(62540),i=n(92779),o=n(45318),a=n(63696),s=n(76617),l=n(5824),u=n(87119),c=n(55219),d=n(71286),f=n(44797);t.default=function(){var e=(0,a.useRef)(document),t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,a.useState)(!0),2),n=t[0],p=t[1],m=function(e,t){p(t)};return(0,a.useEffect)((function(){var t=e.current;return t&&f.A.on(t,d.B.SHOW_VIDEO_OSD,m),function(){t&&f.A.off(t,d.B.SHOW_VIDEO_OSD,m)}}),[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{in:n,easing:"fade-out",children:(0,r.jsx)(i.A,{sx:{position:"absolute",top:0,left:0,right:0,color:"white"},children:(0,r.jsx)(u.A,{isDrawerAvailable:!1,isDrawerOpen:!1,isBackButtonAvailable:!0,isUserMenuAvailable:!1,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.A,{}),(0,r.jsx)(s.A,{})]})})})}),(0,r.jsx)(c.A,{controller:"playback/video/index",view:"playback/video/index.html",type:"video-osd",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0})]})}},15453:function(e,t,n){"use strict";var r=n(46782),i=(n(69177),Object.create(HTMLButtonElement.prototype));i.createdCallback=function(){this.classList.add("paper-icon-button-light"),r.A.tv&&this.classList.add("show-focus")},document.registerElement("paper-icon-button-light",{prototype:i,extends:"button"})},19373:function(e,t,n){"use strict";var r;n.d(t,{u:function(){return r}}),function(e){e.Dashboard="dashboard",e.Experimental="experimental",e.Stable="stable",e.Wizard="wizard"}(r||(r={}))},21643:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return i}});var r=n(19373),i=[{path:"home",type:r.u.Experimental},{path:"homevideos",type:r.u.Experimental},{path:"livetv",type:r.u.Experimental},{path:"movies",type:r.u.Experimental},{path:"music",type:r.u.Experimental},{path:"mypreferencesdisplay",page:"user/display",type:r.u.Experimental},{path:"mypreferencesmenu",page:"user/settings"},{path:"quickconnect",page:"quickConnect"},{path:"search"},{path:"tv",page:"shows",type:r.u.Experimental},{path:"userprofile",page:"user/userprofile"}]},21840:function(e,t,n){"use strict";n.r(t),n(29305),n(32733),n(84701),n(81678),n(24776),n(44962),n(4754),n(94),n(36947),n(83810),n(78557),n(90076),n(83994),n(82367);var r,i=n(22696),o=n.n(i),a=n(8566),s=n(79754),l=n(36300),u=n(5898),c=(n(98959),n(15453),n(10353),n(41177));function d(e){return d="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},d(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function p(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function v(){a.Ay.hide()}function h(e,t,n,r){if(t&&"string"!=typeof t)throw new Error("invalid path");a.Ay.show();var i=[];t?(i.push(ApiClient.getDirectoryContents(t,n)),i.push(ApiClient.getParentPath(t))):i.push(ApiClient.getDrives()),Promise.all(i).then((function(n){var r=n[0],i=(n[1]?JSON.parse(n[1]):"")||"",o="";e.querySelector(".results").scrollTop=0,e.querySelector("#txtDirectoryPickerPath").value=t||"",t&&(o+=g("lnkPath lnkDirectory","",i,"..."));for(var s=0,l=r.length;s<l;s++){var u=r[s];o+=g("File"===u.Type?"lnkPath lnkFile":"lnkPath lnkDirectory",u.Type,u.Path,u.Name)}e.querySelector(".results").innerHTML=o,a.Ay.hide()}),(function(){r&&(e.querySelector("#txtDirectoryPickerPath").value="",e.querySelector(".results").innerHTML="",a.Ay.hide())}))}function g(e,t,n,r){var i="";return i+='<div class="listItem listItem-border '.concat(e,'" data-type="').concat(t,'" data-path="').concat(o()(n),'">'),i+='<div class="listItemBody" style="padding-left:0;padding-top:.5em;padding-bottom:.5em;">',i+='<div class="listItemBodyText">',i+=o()(r),i+="</div>",i+="</div>",(i+='<span class="material-icons arrow_forward" aria-hidden="true" style="font-size:inherit;"></span>')+"</div>"}function b(e){var t;t={text:e},(0,c.A)(t)}function S(e){return e.path?Promise.resolve(e.path):ApiClient.getJSON(ApiClient.getUrl("Environment/DefaultDirectoryBrowser")).then((function(e){return e.Path||""}),(function(){return""}))}var A=p((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),m(this,"currentDialog",void 0),m(this,"show",(function(e){var n={includeDirectories:!0};null!=(e=e||{}).includeDirectories&&(n.includeDirectories=e.includeDirectories),null!=e.includeFiles&&(n.includeFiles=e.includeFiles),Promise.all([r?Promise.resolve(r):ApiClient.getPublicSystemInfo().then((function(e){return r=e,e})),S(e)]).then((function(r){var i=r[0],a=r[1],c=s.default.createDialog({size:"small",removeOnClose:!0,scrollY:!1});c.classList.add("ui-body-a"),c.classList.add("background-theme-a"),c.classList.add("directoryPicker"),c.classList.add("formDialog");var d="";d+='<div class="formDialogHeader">',d+='<button is="paper-icon-button-light" class="btnCloseDialog autoSize" tabindex="-1" title="'.concat(u.Ay.translate("ButtonBack"),'"><span class="material-icons arrow_back" aria-hidden="true"></span></button>'),d+='<h3 class="formDialogHeaderTitle">',d+=o()(e.header||"")||u.Ay.translate("HeaderSelectPath"),d+="</h3>",d+="</div>",d+=function(e,t){var n,r="";r+='<div class="formDialogContent scrollY">',r+='<div class="dialogContentInner dialog-content-centered" style="padding-top:2em;">',e.pathReadOnly||(r+='<div class="infoBanner" style="margin-bottom:1.5em;">',r+=e.instruction?"".concat(o()(e.instruction),"<br/><br/>"):"","bsd"===t.OperatingSystem.toLowerCase()?(r+="<br/>",r+="<br/>",r+=u.Ay.translate("MessageDirectoryPickerBSDInstruction"),r+="<br/>"):"linux"===t.OperatingSystem.toLowerCase()&&(r+="<br/>",r+="<br/>",r+=u.Ay.translate("MessageDirectoryPickerLinuxInstruction"),r+="<br/>"),r+="</div>"),r+='<form style="margin:auto;">',r+='<div class="inputContainer" style="display: flex; align-items: center;">',r+='<div style="flex-grow:1;">',n=!0!==e.includeFiles?"LabelFolder":"LabelPath";var i=e.pathReadOnly?" readonly":"";return r+='<input is="emby-input" id="txtDirectoryPickerPath" type="text" required="required" '.concat(i,' label="').concat(u.Ay.translate(n),'"/>'),r+="</div>",i||(r+='<button type="button" is="paper-icon-button-light" class="btnRefreshDirectories emby-input-iconbutton" title="'.concat(u.Ay.translate("Refresh"),'"><span class="material-icons search" aria-hidden="true"></span></button>')),r+="</div>",i||(r+='<div class="results paperList" style="max-height: 200px; overflow-y: auto;"></div>'),e.enableNetworkSharePath&&(r+='<div class="inputContainer" style="margin-top:2em;">',r+='<input is="emby-input" id="txtNetworkPath" type="text" label="'.concat(u.Ay.translate("LabelOptionalNetworkPath"),'"/>'),r+='<div class="fieldDescription">',r+=u.Ay.translate("LabelOptionalNetworkPathHelp","<b>\\\\server</b>","<b>\\\\192.168.1.101</b>"),r+="</div>",r+="</div>"),r+='<div class="formDialogFooter">',r+='<button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem">'.concat(u.Ay.translate("ButtonOk"),"</button>"),r+="</div>",r+="</form>",r+="</div>",(r+="</div>")+"</div>"}(e,i),c.innerHTML=d,function(e,t,n){e.addEventListener("click",(function(t){var r=l.Ay.parentWithClass(t.target,"lnkPath");if(r){var i=r.getAttribute("data-path");r.classList.contains("lnkFile")?e.querySelector("#txtDirectoryPickerPath").value=i:h(e,i,n,!0)}})),e.addEventListener("click",(function(t){if(l.Ay.parentWithClass(t.target,"btnRefreshDirectories")){var r=e.querySelector("#txtDirectoryPickerPath").value;h(e,r,n)}})),e.addEventListener("change",(function(t){var r=l.Ay.parentWithTag(t.target,"INPUT");r&&"txtDirectoryPickerPath"===r.id&&h(e,r.value,n)})),e.querySelector("form").addEventListener("submit",(function(e){if(t.callback){var n=this.querySelector("#txtNetworkPath");n=n?n.value:null;var r=this.querySelector("#txtDirectoryPickerPath").value;(function(e,t,n){return n.ajax({type:"POST",url:n.getUrl("Environment/ValidatePath"),data:JSON.stringify({ValidateWriteable:t,Path:e}),contentType:"application/json"}).catch((function(e){if(e){if(404===e.status)return b(u.Ay.translate("PathNotFound")),Promise.reject();if(500===e.status)return b(t?u.Ay.translate("WriteAccessRequired"):u.Ay.translate("PathNotFound")),Promise.reject()}return Promise.resolve()}))})(r,t.validateWriteable,ApiClient).then(t.callback(r,n)).catch((function(){}))}return e.preventDefault(),e.stopPropagation(),!1}))}(c,e,n),c.addEventListener("close",v),s.default.open(c),c.querySelector(".btnCloseDialog").addEventListener("click",(function(){s.default.close(c)})),t.currentDialog=c,c.querySelector("#txtDirectoryPickerPath").value=a;var f=c.querySelector("#txtNetworkPath");f&&(f.value=e.networkSharePath||""),e.pathReadOnly||h(c,a,n,!0)}))})),m(this,"close",(function(){t.currentDialog&&s.default.close(t.currentDialog)}))}));t.default=A},22043:function(e,t,n){"use strict";var r;n.d(t,{W:function(){return r}}),function(e){e[e.Local=0]="Local",e[e.Remote=1]="Remote",e[e.Manual=2]="Manual"}(r||(r={}))},22477:function(e,t,n){"use strict";n.d(t,{A:function(){return k}});var r,i,o=n(62540),a=n(63696),s=n(87404),l=n(67430),u=n(31234),c=n.n(u),d=n(22622),f=n(65242),p=n(71866),m=n(97339),y=n(84851),v=n(5898),h=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},g=function(e){var t=e.state,n=h((0,a.useState)(),2),r=n[0],i=n[1],s=h((0,a.useState)(),2),u=s[0],g=s[1],b=h((0,a.useState)(),2),S=b[0],A=b[1],x=h((0,a.useState)(!1),2),w=x[0],P=x[1],k=(0,a.useCallback)((function(){return e=void 0,t=void 0,r=function(){var e,t;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){switch(n.label){case 0:P(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),e=l.tF.getLastUsedServer(),[4,l.tF.updateSavedServerId(e)];case 2:return n.sent(),window.location.reload(),[3,4];case 3:return t=n.sent(),console.error("[ConnectionErrorPage] Failed to force connect to server",t),(0,p.A)(v.Ay.translate("HeaderConnectionFailure")),P(!1),[3,4];case 4:return[2]}}))},new((n=void 0)||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}),[]);if((0,a.useEffect)((function(){switch(t){case l.KN.ServerMismatch:return i(v.Ay.translate("HeaderServerMismatch")),g(void 0),void A(v.Ay.translate("MessageServerMismatch"));case l.KN.ServerUpdateNeeded:return i(v.Ay.translate("HeaderUpdateRequired")),g(v.Ay.translate("ServerUpdateNeeded",'<a href="https://jellyfin.org/downloads/server/">jellyfin.org/downloads/server</a>')),void A(void 0);case l.KN.Unavailable:i(v.Ay.translate("HeaderServerUnavailable")),g(void 0),A(v.Ay.translate("MessageUnableToConnectToServer"))}}),[t]),r)return(0,o.jsx)(f.A,{id:"connectionErrorPage",className:"mainAnimatedPage standalonePage",isBackButtonEnabled:!1,children:(0,o.jsxs)("div",{className:"padded-left padded-right",children:[(0,o.jsx)("h1",{children:r}),u&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:c().sanitize(u)},style:{maxWidth:"80ch"}}),S&&(0,o.jsx)("p",{style:{maxWidth:"80ch"},children:S}),d.g.supports(m.Y.MultiServer)&&(0,o.jsx)(y.A,{className:"raised",href:"/selectserver",children:v.Ay.translate("ButtonChangeServer")}),t===l.KN.ServerMismatch&&(0,o.jsx)(y.A,{onClick:k,style:w?{pointerEvents:"none"}:void 0,children:v.Ay.translate("ConnectAnyway")})]})})},b=n(84849),S=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},x=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};!function(e){e.Admin="admin",e.Public="public",e.User="user",e.Wizard="wizard"}(r||(r={})),function(e){e.Home="/home",e.Login="/login",e.SelectServer="/selectserver",e.StartWizard="/wizard/start"}(i||(i={}));var w=[l.KN.ServerMismatch,l.KN.ServerUpdateNeeded,l.KN.Unavailable],P=function(e){return S(void 0,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return[4,fetch("".concat(e.serverAddress(),"/System/Info/Public"),{cache:"no-cache"})];case 1:if(!(t=n.sent()).ok)throw new Error("Public system info request failed");return[2,t.json()]}}))}))},k=function(e){var t=e.level,n=void 0===t?"user":t,u=(0,s.Zp)(),c=(0,s.zy)(),d=x((0,a.useState)(),2),f=d[0],p=d[1],m=x((0,a.useState)(!0),2),y=m[0],v=m[1],h=(0,a.useCallback)((function(e){c.pathname===e?v(!1):u(e)}),[c.pathname,u]),k=(0,a.useCallback)((function(e){return S(void 0,void 0,void 0,(function(){var t;return A(this,(function(n){switch(e.State){case l.KN.SignedIn:return console.debug("[ConnectionRequired] already logged in, redirecting to home"),u(i.Home),[2];case l.KN.ServerSignIn:return c.pathname===i.Login?v(!1):(console.debug("[ConnectionRequired] not logged in, redirecting to login page",c),t=encodeURIComponent(c.pathname+c.search),u("".concat(i.Login,"?serverid=").concat(e.ApiClient.serverId(),"&url=").concat(t))),[2];case l.KN.ServerSelection:return console.debug("[ConnectionRequired] redirecting to select server page"),h(i.SelectServer),[2]}return console.warn("[ConnectionRequired] unhandled connection state",e.State),[2]}))}))}),[h,c.pathname,u]),I=(0,a.useCallback)((function(e){return S(void 0,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(!(t=(null==e?void 0:e.ApiClient)||l.tF.currentApiClient()))throw new Error("No ApiClient available");return[4,P(t)];case 1:return(null==(n=r.sent())?void 0:n.StartupWizardCompleted)?(console.info("[ConnectionRequired] startup wizard is complete, redirecting home"),u(i.Home),[2]):(l.tF.setLocalApiClient(t),v(!1),[2])}}))}))}),[u]),j=(0,a.useCallback)((function(e){return S(void 0,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(e.State!==l.KN.ServerSignIn)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,P(e.ApiClient)];case 2:return(null==(t=r.sent())?void 0:t.StartupWizardCompleted)?[3,4]:(l.tF.setLocalApiClient(e.ApiClient),console.info("[ConnectionRequired] startup wizard is not complete, redirecting there"),u(i.StartWizard),[2]);case 3:return n=r.sent(),console.error("[ConnectionRequired] checking wizard status failed",n),[2];case 4:return k(e).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[2]}}))}))}),[k,u]),T=(0,a.useCallback)((function(){return S(void 0,void 0,void 0,(function(){var e,t,i,o,a,s,u;return A(this,(function(c){switch(c.label){case 0:if(e=l.tF.currentApiClient(),n!==r.Admin&&n!==r.User||(null==e?void 0:e.isLoggedIn()))return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),console.warn("[ConnectionRequired] unauthenticated user attempted to access user route"),t=k,[4,l.tF.connect()];case 2:return t.apply(void 0,[c.sent()]).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[3,4];case 3:return i=c.sent(),console.warn("[ConnectionRequired] error bouncing from user route",i),[3,4];case 4:return[2];case 5:if(n!==r.Admin)return[3,11];c.label=6;case 6:return c.trys.push([6,10,,11]),[4,null==e?void 0:e.getCurrentUser()];case 7:return o=c.sent(),(null===(u=null==o?void 0:o.Policy)||void 0===u?void 0:u.IsAdministrator)?[3,9]:(console.warn("[ConnectionRequired] normal user attempted to access admin route"),a=k,[4,l.tF.connect()]);case 8:return a.apply(void 0,[c.sent()]).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[2];case 9:return[3,11];case 10:return s=c.sent(),console.warn("[ConnectionRequired] error bouncing from admin route",s),[2];case 11:return v(!1),[2]}}))}))}),[k,n]);return(0,a.useEffect)((function(){var e=l.tF.currentApiClient();Promise.resolve(l.tF.firstConnection?null:l.tF.connect()).then((function(t){console.debug("[ConnectionRequired] connection state",null==t?void 0:t.State),l.tF.firstConnection=!0,w.includes(null==t?void 0:t.State)?p(t.State):n===r.Wizard?I(t).catch((function(e){console.error("[ConnectionRequired] could not validate wizard status",e)})):t&&t.State!==l.KN.SignedIn&&!(null==e?void 0:e.isLoggedIn())?j(t).catch((function(e){console.error("[ConnectionRequired] could not start wizard",e)})):T().catch((function(e){console.error("[ConnectionRequired] could not validate user access",e)}))})).catch((function(e){console.error("[ConnectionRequired] failed to connect",e)}))}),[j,I,n,T]),f?(0,o.jsx)(g,{state:f}):y?(0,o.jsx)(b.A,{}):(0,o.jsx)(s.sv,{})}},22622:function(e,t,n){"use strict";n.d(t,{g:function(){return P}}),n(14382),n(84734),n(44962),n(74576),n(78557),n(90076),n(45309),n(95021),n(73687),n(83994),n(93062),n(97747),n(23630),n(82367);var r=n(90381),i=n(34789),o=n(44797),a=n(58180),s=n(51876),l=n(5898),u=n(57634),c=n(97339),d={tizen:"Samsung Smart TV",web0s:"LG Smart TV",operaTv:"Opera TV",xboxOne:"Xbox One",ps4:"Sony PS4",chrome:"Chrome",edgeChromium:"Edge Chromium",edge:"Edge",firefox:"Firefox",opera:"Opera",safari:"Safari"};function f(){if(!g){var e="_deviceId2";(g=r.A.get(e))||((t=[]).push(navigator.userAgent),t.push((new Date).getTime()),g=window.btoa?btoa(t.join("|")).replaceAll("=","1"):(new Date).getTime(),r.A.set(e,g))}var t;return g}function p(){if(b)return b;for(var e in b="Web Browser",d)if(i.A[e]){b=d[e];break}return i.A.ipad?b+=" iPad":i.A.iphone?b+=" iPhone":i.A.android&&(b+=" Android"),b}function m(){k&&(k=!1,o.A.trigger(P,"resume"))}function y(){k||(k=!0)}var v,h,g,b,S=(v=[],navigator.share&&v.push(c.Y.Sharing),i.A.edgeUwp||i.A.tv||i.A.xboxOne||i.A.ps4||v.push(c.Y.FileDownload),(i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s)&&v.push(c.Y.Exit),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.ps4||v.push(c.Y.ExternalLinks),(i.A.edgeUwp||i.A.tizen||i.A.web0s||i.A.orsay||i.A.operaTv||i.A.ps4||i.A.xboxOne||!i.A.mobile)&&(v.push(c.Y.HtmlAudioAutoplay),v.push(c.Y.HtmlVideoAutoplay)),function(){if(i.A.tv)return!1;var e=document.documentElement;return!!(e.requestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen||e.msRequestFullscreen||document.createElement("video").webkitEnterFullscreen)}()&&v.push(c.Y.Fullscreen),(i.A.tv||i.A.xboxOne||i.A.ps4||i.A.mobile||i.A.ipad)&&v.push(c.Y.PhysicalVolumeControl),i.A.tv||i.A.xboxOne||i.A.ps4||v.push(c.Y.RemoteControl),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.edgeUwp||v.push(c.Y.RemoteVideo),v.push(c.Y.DisplayLanguage),v.push(c.Y.DisplayMode),v.push(c.Y.TargetBlank),v.push(c.Y.Screensaver),s.$A().then((function(e){e&&v.push(c.Y.MultiServer)})),!i.A.orsay&&(i.A.firefox||i.A.ps4||i.A.edge||function(){try{var e=document.createElement("video"),t=document.createElement("style");t.textContent="video::cue {background: inherit}",document.body.appendChild(t),document.body.appendChild(e);var n=window.getComputedStyle(e,"::cue").background;return document.body.removeChild(t),document.body.removeChild(e),!!n.length}catch(e){return console.error("error detecting cue support: "+e),!1}}())&&v.push(c.Y.SubtitleAppearance),i.A.orsay||v.push(c.Y.SubtitleBurnIn),i.A.tv||i.A.ps4||i.A.xboxOne||v.push(c.Y.FileInput),(i.A.chrome||i.A.edgeChromium)&&v.push(c.Y.Chromecast),v);function A(){try{var e;null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.exit?window.NativeShell.AppHost.exit():i.A.tizen?tizen.application.getCurrentApplication().exit():i.A.web0s?webOS.platformBack():window.close()}catch(e){console.error("error closing application: "+e)}}var x,w,P={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(){alert("setWindowState is not supported and should not be called")},exit:function(){window.appMode&&i.A.tizen?h||n.e(62882).then(n.bind(n,62882)).then((function(e){h=e.show({title:l.Ay.translate("MessageConfirmAppExit"),items:[{id:"yes",name:l.Ay.translate("Yes")},{id:"no",name:l.Ay.translate("No")}]}).then((function(e){"yes"===e&&A()})).finally((function(){h=null}))})):A()},supports:function(e){return window.NativeShell?window.NativeShell.AppHost.supports(e):-1!==S.indexOf(e.toLowerCase())},preferVisualCards:i.A.android||i.A.chrome,getDefaultLayout:function(){return window.NativeShell?window.NativeShell.AppHost.getDefaultLayout():"desktop"},getDeviceProfile:function(e){return new Promise((function(t){var n,o;if(window.NativeShell)o=window.NativeShell.AppHost.getDeviceProfile(u.A,"10.11.1");else{var s=function(e){var t=[];return e&&a.JQ(e.RunTimeTicks,e.MediaType)&&(i.A.edge&&t.push("mp3"),i.A.edgeChromium||(t.push("ac3"),t.push("eac3")),i.A.chrome||i.A.edgeChromium||i.A.firefox||t.push("opus")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:t}}(e);o=(0,u.A)(s)}var l=r.A.maxVideoWidth(),c=l<0?null===(n=P.screen())||void 0===n?void 0:n.maxAllowedWidth:l;if(c){var d={Condition:"LessThanEqual",Property:"Width",Value:c.toString(),IsRequired:!1};r.A.limitSupportedVideoResolution()&&o.CodecProfiles.push({Type:"Video",Conditions:[d]}),o.TranscodingProfiles.forEach((function(e){"Video"===e.Type&&(e.Conditions=(e.Conditions||[]).filter((function(e){return"Width"!==e.Property})),e.Conditions.push(d))}))}var f=r.A.preferredTranscodeVideoCodec();f&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.VideoCodec.split(","),n=t.indexOf(f);-1!==n&&(t.splice(n,1),t.unshift(f),e.VideoCodec=t.join(","))}}));var p=r.A.preferredTranscodeVideoAudioCodec();p&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(","),n=t.indexOf(p);-1!==n&&(t.splice(n,1),t.unshift(p),e.AudioCodec=t.join(","))}})),t(o)}))},init:function(){return window.NativeShell?window.NativeShell.AppHost.init():{deviceId:f(),deviceName:p()}},deviceName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceName?window.NativeShell.AppHost.deviceName():p()},deviceId:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceId?window.NativeShell.AppHost.deviceId():f()},appName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appName?window.NativeShell.AppHost.appName():"Jellyfin Web"},appVersion:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appVersion?window.NativeShell.AppHost.appVersion():"10.11.1"},getPushTokenInfo:function(){return{}},setUserScalable:function(e){if(!i.A.tv){var t=e?"width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes":"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no";document.querySelector("meta[name=viewport]").setAttribute("content",t)}},screen:function(){var e,t=null,n=null===(e=window.NativeShell)||void 0===e?void 0:e.AppHost;return null!=n&&n.screen?t=n.screen():window.screen&&!i.A.tv&&(t={width:Math.floor(window.screen.width*window.devicePixelRatio),height:Math.floor(window.screen.height*window.devicePixelRatio)}),t&&(t.maxAllowedWidth=Math.max(t.width,t.height)),t}},k=!1;void 0!==document.hidden?(x="hidden",w="visibilitychange"):void 0!==document.webkitHidden&&(x="webkitHidden",w="webkitvisibilitychange"),document.addEventListener(w,(function(){document[x]?y():m()}),!1),window.addEventListener&&(window.addEventListener("focus",m),window.addEventListener("blur",y)),P.init()},23648:function(e,t,n){"use strict";n.d(t,{Hc:function(){return b}}),n(29305),n(32733),n(84701),n(2623),n(84734),n(44962),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(82367);var r=n(65369),i=n(11444),o=n(1164),a=n(86084),s=n(45251),l=n(53096),u=n(22622),c=n(97339),d=n(5898),f=n(67430),p=n(75384);function m(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return y(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(y(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,y(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,y(d,"constructor",u),y(u,"constructor",l),l.displayName="GeneratorFunction",y(u,i,"GeneratorFunction"),y(d),y(d,i,"Generator"),y(d,r,(function(){return this})),y(d,"toString",(function(){return"[object Generator]"})),(m=function(){return{w:o,m:f}})()}function y(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}y=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){y(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},y(e,t,n,r)}function v(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function h(e,t){var n=t.Type;return"UserRootFolder"!==n&&"UserView"!==n&&"Program"!==n&&"Timer"!==n&&"SeriesTimer"!==n&&("Recording"!==t.Type||"Completed"===t.Status)&&!g(t)&&e.Policy.IsAdministrator}function g(e){return(null==e?void 0:e.Id)&&"string"==typeof e.Id&&0===e.Id.indexOf("local")}function b(e,t){return S.apply(this,arguments)}function S(){var e;return e=m().m((function e(t,n){var r,i,o,a,s;return m().w((function(e){for(;;)switch(e.n){case 0:return r=f.tF.getApiClient(n.ServerId),i=(0,p.C)(r),e.p=1,e.n=2,(0,l.C)(i).getPlaylistUser({userId:t.Id,playlistId:n.Id});case 2:return o=e.v,a=o.data,e.a(2,!!a.CanEdit);case 3:return e.p=3,s=e.v,console.error("Failed to get playlist permissions",s),e.a(2,!1)}}),e,null,[[1,3]])})),S=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){v(o,r,i,a,s,"next",e)}function s(e){v(o,r,i,a,s,"throw",e)}a(void 0)}))},S.apply(this,arguments)}t.Ay={getDisplayName:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("null item passed into getDisplayName");"Timer"===e.Type&&(e=e.ProgramInfo||e);var n=("Program"!==e.Type&&"Recording"!==e.Type||!e.IsSeries&&!e.EpisodeTitle?e.Name:e.EpisodeTitle)||"";if("TvChannel"===e.Type)return e.ChannelNumber?e.ChannelNumber+" "+n:n;if("Episode"===e.Type&&0===e.ParentIndexNumber)n=d.Ay.translate("ValueSpecialEpisodeName",n);else if(("Episode"===e.Type||"Program"===e.Type||"Recording"===e.Type)&&null!=e.IndexNumber&&null!=e.ParentIndexNumber&&!1!==t.includeIndexNumber){var r=e.IndexNumber,i=r,o=" - ";!1!==t.includeParentInfo?i="S"+e.ParentIndexNumber+":E"+i:o=". ",e.IndexNumberEnd&&(i+="-"+(r=e.IndexNumberEnd)),i&&(n=n?i+o+n:i)}return n},supportsAddingToCollection:function(e){return!("Recording"===e.Type&&"Completed"!==e.Status||e.CollectionType||-1!==["Genre","MusicGenre","Studio","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"].indexOf(e.Type)||"Photo"===e.MediaType||g(e))},supportsAddingToPlaylist:function(e){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"Photo"!==e.MediaType&&("Recording"!==e.Type||"Completed"===e.Status)&&!g(e)&&e.CollectionType!==r.X.Livetv&&(e.MediaType||e.IsFolder||"Genre"===e.Type||"MusicGenre"===e.Type||"MusicArtist"===e.Type)},isLocalItem:g,canIdentify:function(e,t){var n=t.Type;return("Movie"===n||"Trailer"===n||"Series"===n||"BoxSet"===n||"Person"===n||"Book"===n||"MusicAlbum"===n||"MusicArtist"===n||"MusicVideo"===n)&&e.Policy.IsAdministrator&&!g(t)},canEdit:h,canEditImages:function(e,t){var n=t.Type;return"Photo"!==t.MediaType&&("UserView"===n?!!e.Policy.IsAdministrator:("Recording"!==t.Type||"Completed"===t.Status)&&"Timer"!==n&&"SeriesTimer"!==n&&h(e,t)&&!g(t))},canEditSubtitles:function(e,t){if(t.MediaType!==s.z.Video)return!1;var n=t.Type;return(n!==i.D.Recording||t.Status===a.k.Completed)&&n!==i.D.TvChannel&&n!==i.D.Program&&"Timer"!==n&&"SeriesTimer"!==n&&n!==i.D.UserRootFolder&&n!==i.D.UserView&&!g(t)&&t.LocationType!==o.i.Virtual&&(e.Policy.EnableSubtitleManagement||e.Policy.IsAdministrator)},canEditLyrics:function(e,t){return t.MediaType===s.z.Audio&&!g(t)&&e.Policy.IsAdministrator},canShare:function(e,t){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&("Recording"!==e.Type||"Completed"===e.Status)&&!g(e)&&t.Policy.EnablePublicSharing&&u.g.supports(c.Y.Sharing)},enableDateAddedDisplay:function(e){return!e.IsFolder&&e.MediaType&&"Program"!==e.Type&&"TvChannel"!==e.Type&&"Trailer"!==e.Type},canMarkPlayed:function(e){if("Program"===e.Type)return!1;if("Video"===e.MediaType){if("TvChannel"!==e.Type)return!0}else if("Audio"===e.MediaType){if("AudioPodcast"===e.Type)return!0;if("AudioBook"===e.Type)return!0}return"Series"===e.Type||"Season"===e.Type||"BoxSet"===e.Type||"Book"===e.MediaType||"Recording"===e.MediaType},canRate:function(e){return"Program"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"CollectionFolder"!==e.Type&&"UserView"!==e.Type&&"Channel"!==e.Type&&e.UserData},canConvert:function(e,t){if(!t.Policy.EnableMediaConversion)return!1;if(g(e))return!1;var n=e.MediaType;if("Book"===n||"Photo"===n||"Audio"===n)return!1;if(e.CollectionType===r.X.Livetv)return!1;var i=e.Type;return!("Channel"===i||"Person"===i||"Year"===i||"Program"===i||"Timer"===i||"SeriesTimer"===i||"Virtual"===e.LocationType&&!e.IsFolder||e.IsPlaceHolder)},canRefreshMetadata:function(e,t){return!!t.Policy.IsAdministrator&&e.CollectionType!==r.X.Livetv&&!("Timer"===e.Type||"SeriesTimer"===e.Type||"Program"===e.Type||"TvChannel"===e.Type||"Recording"===e.Type&&"Completed"!==e.Status||g(e))},supportsMediaSourceSelection:function(e){return"Video"===e.MediaType&&"TvChannel"!==e.Type&&!(!e.MediaSources||1===e.MediaSources.length&&"Placeholder"===e.MediaSources[0].Type)&&(null!=e.EnableMediaSourceDisplay?!!e.EnableMediaSourceDisplay:!e.SourceType||"Library"===e.SourceType)},sortTracks:function(e,t){var n=e.IsExternal-t.IsExternal;return 0!=n||0!=(n=t.IsForced-e.IsForced)||0!=(n=t.IsDefault-e.IsDefault)?n:e.Index-t.Index}}},24639:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(2623),n(24776),n(14382),n(44962),n(86584),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(64062),n(23630),n(82367),n(21973),n(63960),n(63855),n(75507),n(86684),n(91315),n(74288),n(36956),n(63220),n(90883),n(79909),n(69785),n(45958),n(79237),n(29379),n(39603),n(82118),n(84238);var r=n(63696),i=n(7470),o=n(67430),a=n(22622),s=n(84069),l=n(8566),u=n(38829),c=n(70267),d=n(97339),f=n(5898),p=["af","ar","be-by","bg-bg","bn_bd","ca","cs","cy","da","de","el","en-gb","en-us","eo","es","es_419","es-ar","es_do","es-mx","et","eu","fa","fi","fil","fr","fr-ca","gl","gsw","he","hi-in","hr","hu","id","it","ja","kk","ko","lt-lt","lv","mr","ms","nb","nl","nn","pl","pr","pt","pt-br","pt-pt","ro","ru","sk","sl-si","sq","sv","ta","th","tr","uk","ur_pk","vi","zh-cn","zh-hk","zh-tw"].map((function(e){return{lang:e,path:"".concat(e,".json")}})),m=n(83237),y=n(34789),v=n(74550),h=n(51876),g=n(54048),b=n(89100),S=n(44797),A=n(62540),x=n(9790),w=n(84757),P=n(69410),k=n(28626),I=n(60182),j=n(31297),T=n(87003),C=window.Proxy&&!y.A.tv,E=function(){return(0,A.jsxs)(x.Ht,{client:j.q,children:[(0,A.jsx)(P.Kv,{children:(0,A.jsx)(k.w,{children:(0,A.jsx)(I.AQ,{children:(0,A.jsx)(T.A,{})})})}),C&&(0,A.jsx)(w.E,{initialIsOpen:!1})]})},_=(n(10353),n(66911)),L=n(75384),M=n(39738);document.addEventListener("viewshow",(function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.params)||{},r=n.serverId,i=n.id;r&&i&&function(e,t){var n,r,i,a;n=this,r=void 0,a=function(){var n,r,i,a,s,l;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(u){switch(u.label){case 0:if(!M.f.enableDisplayMirroring())return[3,4];if(!(n=M.f.getPlayerInfo())||n.isLocalPlayer||-1===n.supportedCommands.indexOf("DisplayContent"))return[3,4];r=o.tF.getApiClient(e),i=(0,L.C)(r),a=r.getCurrentUserId(),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,j.q.fetchQuery((0,_.I)(i,t,a))];case 2:return s=u.sent(),M.f.displayContent({ItemName:s.Name,ItemId:s.Id,ItemType:s.Type},M.f.getCurrentPlayer()),[3,4];case 3:return l=u.sent(),console.error("[DisplayMirrorManager] failed to mirror item",l),[3,4];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(e,t){function o(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(o,s)}l((a=a.apply(n,r||[])).next())}))}(r,i)})),n(86663),n(76281),n(84734),n(99425);var O,R=n(77612),D=n(45251),N=n(71857),F=n(82885),U=n(58961);function V(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return B(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(B(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,B(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,B(d,"constructor",u),B(u,"constructor",l),l.displayName="GeneratorFunction",B(u,i,"GeneratorFunction"),B(d),B(d,i,"Generator"),B(d,r,(function(){return this})),B(d,"toString",(function(){return"[object Generator]"})),(V=function(){return{w:o,m:f}})()}function B(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}B=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){B(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},B(e,t,n,r)}function z(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}var q=[];function H(e,t){var n=e.filter((function(e){return e.MediaType===D.z.Video?F.currentSettings.enableThemeVideos():F.currentSettings.enableThemeSongs()}));if(n.length){if(!O&&M.f.isPlaying())return;q=n.map((function(e){return e.Id})),n.forEach((function(e){e.playOptions={fullscreen:!1,enableRemotePlayers:!1}})),M.f.play({items:n,aspectRatio:"cover",fullscreen:!1,enableRemotePlayers:!1}).then((function(){O=t}))}else G()}function G(){O&&M.f.stop(),O=null}var W=[U.u.CollectionFolder,U.u.UserView,U.u.Person,U.u.Program,U.u.TvChannel,U.u.Channel,U.u.SeriesTimer];function Y(){var e;return e=V().m((function e(t,n){var r,i,a,s,l,u,c,d,f;return V().w((function(e){for(;;)switch(e.n){case 0:return r=o.tF.getApiClient(t),i=(0,L.C)(r),a=r.getCurrentUserId(),e.p=1,e.n=2,j.q.fetchQuery((0,_.I)(i,n,a));case 2:if(!(l=e.v).CollectionType){e.n=3;break}return G(),e.a(2);case 3:if(!W.includes(l.Type)){e.n=4;break}return G(),e.a(2);case 4:return e.n=5,(0,N.Q)(i).getThemeMedia({userId:a,itemId:l.Id,inheritFromParent:!0,sortBy:[R.B.Random]});case 5:u=e.v,c=u.data,(d=F.currentSettings.enableThemeVideos()&&null!==(s=c.ThemeVideosResult)&&void 0!==s&&null!==(s=s.Items)&&void 0!==s&&s.length?c.ThemeVideosResult:c.ThemeSongsResult).OwnerId!==O&&H(d.Items,d.OwnerId),e.n=7;break;case 6:e.p=6,f=e.v,console.error("[ThemeMediaPlayer] failed to load theme media",f);case 7:return e.a(2)}}),e,null,[[1,6]])})),Y=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){z(o,r,i,a,s,"next",e)}function s(e){z(o,r,i,a,s,"throw",e)}a(void 0)}))},Y.apply(this,arguments)}document.addEventListener("viewshow",(function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.params)||{},r=n.serverId,i=n.id;r&&i?function(e,t){Y.apply(this,arguments)}(r,i):(e.detail.options||{}).supportsThemeMedia||H([],null)}),!0),S.A.on(M.f,"playbackstart",(function(e,t){var n=M.f.currentItem(t);-1==q.indexOf(n.Id)&&(O=null)}));var Q=n(39641);Q.A.setTheme(F.theme()).then((function(){return document.body.classList.add("force-scroll")})),S.A.on(o.tF,"localusersignedin",(function(){Q.A.setTheme(F.theme())})),(0,b.pageClassOn)("viewbeforeshow","page",(function(){this.classList.contains("type-interior")?Q.A.setTheme(F.dashboardTheme()):Q.A.setTheme(F.theme())})),n(40787),n(69892),n(89336),n(95021),n(73687);var K=n(38783),J=n(38490);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $(){return 1e3*F.screensaverTime()}var Z=0;function ee(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return te(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(te(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,te(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,te(d,"constructor",u),te(u,"constructor",l),l.displayName="GeneratorFunction",te(u,i,"GeneratorFunction"),te(d),te(d,i,"Generator"),te(d,r,(function(){return this})),te(d,"toString",(function(){return"[object Generator]"})),(ee=function(){return{w:o,m:f}})()}function te(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}te=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){te(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},te(e,t,n,r)}function ne(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function re(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ne(o,r,i,a,s,"next",e)}function s(e){ne(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ie(){return(ie=re(ee().m((function e(){var t;return ee().w((function(e){for(;;)switch(e.n){case 0:return console.info("[".concat("jellyfin-web","]\nversion: ").concat("10.11.1","\ncommit: ").concat("b9fdc61b6","\nbuild: ").concat("Release")),window.Events=S.A,window.TaskButton=g.A,(0,b.pageClassOn)("viewshow","standalonePage",(function(){document.querySelector(".skinHeader").classList.add("noHeaderRight")})),(0,b.pageClassOn)("viewhide","standalonePage",(function(){document.querySelector(".skinHeader").classList.remove("noHeaderRight")})),e.n=1,(0,b.serverAddress)();case 1:return(t=e.v)&&o.tF.initApiClient(t),(0,m.n_)(),e.n=2,f.Ay.defaultModule("core"),f.Ay.loadStrings({name:"core",translations:p});case 2:return S.A.on(o.tF,"localusersignedin",f.Ay.updateCurrentCulture),S.A.on(o.tF,"localusersignedout",f.Ay.updateCurrentCulture),y.A.tv&&!y.A.android?(console.debug("using system fonts with explicit sizes"),n.e(84501).then(n.bind(n,84501))):(console.debug("using system fonts"),n.e(25348).then(n.bind(n,25348))),y.A.iOS&&n.e(66923).then(n.bind(n,66923)),e.n=3,oe();case 3:return S.A.on(a.g,"resume",(function(){var e;null===(e=o.tF.currentApiClient())||void 0===e||e.ensureWebSocket()})),o.tF.getApiClients().forEach((function(e){S.A.off(e,"requestfail",c.appRouter.onRequestFail),S.A.on(e,"requestfail",c.appRouter.onRequestFail)})),S.A.on(o.tF,"apiclientcreated",(function(e,t){S.A.off(t,"requestfail",c.appRouter.onRequestFail),S.A.on(t,"requestfail",c.appRouter.onRequestFail)})),e.n=4,se();case 4:y.A.tv||y.A.xboxOne||y.A.ps4||Promise.all([n.e(12011),n.e(55802),n.e(57949),n.e(14245)]).then(n.bind(n,35300)),a.g.supports(d.Y.RemoteControl)&&(Promise.resolve().then(n.bind(n,86663)),n.e(28567).then(n.bind(n,28567))),a.g.supports(d.Y.PhysicalVolumeControl)&&!y.A.touch||n.e(91737).then(n.bind(n,91737)),y.A.tv||y.A.xboxOne||(n.e(22424).then(n.bind(n,22424)),navigator.serviceWorker&&"cordova"!==window.appMode&&"android"!==window.appMode?navigator.serviceWorker.register("serviceworker.js").then((function(){return console.log("serviceWorker registered")})).catch((function(e){return console.log("error registering serviceWorker: "+e)})):console.warn("serviceWorker unsupported"),window.Notification&&n.e(44184).then(n.bind(n,78983))),v.Ay.enable(),s.default.enable();case 5:return e.a(2)}}),e)})))).apply(this,arguments)}function oe(){return ae.apply(this,arguments)}function ae(){return(ae=re(ee().m((function e(){var t,n;return ee().w((function(e){for(;;)switch(e.n){case 0:return console.groupCollapsed("loading installed plugins"),console.dir(u.X),e.n=1,(0,h.xy)();case 1:return t=e.v,a.g.supports(d.Y.RemoteControl)?y.A.chrome||y.A.edgeChromium||y.A.opera||(t=t.filter((function(e){return!e.startsWith("chromecastPlayer")}))):t=t.filter((function(e){return!e.startsWith("sessionPlayer")&&!e.startsWith("chromecastPlayer")})),window.NativeShell&&(t=t.concat(window.NativeShell.getPlugins())),e.p=2,e.n=3,Promise.all(t.map((function(e){return u.X.loadPlugin(e)})));case 3:console.debug("finished loading plugins"),e.n=5;break;case 4:e.p=4,n=e.v,console.warn("failed loading plugins",n);case 5:console.groupEnd("loading installed plugins");case 6:return e.a(2)}}),e,null,[[2,4]])})))).apply(this,arguments)}function se(){return le.apply(this,arguments)}function le(){return(le=re(ee().m((function e(){var t;return ee().w((function(e){for(;;)switch(e.n){case 0:(t=document.getElementById("reactRoot")).innerHTML="",l.Ay.show(),(0,i.H)(t).render(r.createElement(E,null));case 1:return e.a(2)}}),e)})))).apply(this,arguments)}S.A.on(M.f,"playbackstop",(function(e,t){var n=t.state;n.NowPlayingItem&&"Video"==n.NowPlayingItem.MediaType&&(Z=(new Date).getTime())})),new function(){var e,t=this;function n(){e&&(console.debug("Hiding screensaver"),e.hide().then((function(){document.body.classList.remove("screensaver-noScroll")})),e=null),window.removeEventListener("click",n,!0),window.removeEventListener("mousemove",n,!0),window.removeEventListener("keydown",n,!0)}this.isShowing=function(){return null!=e},this.show=function(){var t,r=o.tF.currentApiClient();null!=r&&r.isLoggedIn()&&(t=!0);var i=function(e){var t;try{t=F.get("screensaver",!1)}catch(n){t=e?"backdropscreensaver":"logoscreensaver"}var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return X(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(u.X.ofType(K.Q.Screensaver));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.id===t)return i}}catch(e){r.e(e)}finally{r.f()}return null}(t);i&&function(t){if(e)throw new Error("An existing screensaver is already active.");console.debug("Showing screensaver "+t.name),document.body.classList.add("screensaver-noScroll"),t.show(),e=t,!1!==t.hideOnClick&&window.addEventListener("click",n,!0),!1!==t.hideOnMouse&&window.addEventListener("mousemove",n,!0),!1!==t.hideOnKey&&window.addEventListener("keydown",n,!0)}(i)},this.hide=function(){n()},setInterval((function(){t.isShowing()||J.default.idleTime()<$()||(new Date).getTime()-Z<$()||M.f.isPlayingVideo()&&!M.f.paused()||t.show()}),5e3)},n(10736),function(){ie.apply(this,arguments)}()},24786:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return r.ASYNC_USER_ROUTES}});var r=n(21643)},27570:function(e,t,n){var r={"./_lib/buildFormatLongFn/index.js":[37658,7,37658],"./_lib/buildLocalizeFn/index.js":[94160,7,94160],"./_lib/buildMatchFn/index.js":[7184,7,7184],"./_lib/buildMatchPatternFn/index.js":[83518,7,83518],"./af/_lib/formatDistance/index.js":[82393,7,82393],"./af/_lib/formatLong/index.js":[70356,7,70356],"./af/_lib/formatRelative/index.js":[62654,7,62654],"./af/_lib/localize/index.js":[79870,7,79870],"./af/_lib/match/index.js":[25242,7,25242],"./af/index.js":[53687,7,53687],"./ar-DZ/_lib/formatDistance/index.js":[31402,7,31402],"./ar-DZ/_lib/formatLong/index.js":[42635,7,42635],"./ar-DZ/_lib/formatRelative/index.js":[79657,7,79657],"./ar-DZ/_lib/localize/index.js":[6753,7,6753],"./ar-DZ/_lib/match/index.js":[61695,7,61695],"./ar-DZ/index.js":[5692,7,5692],"./ar-EG/_lib/formatDistance/index.js":[92364,7,92364],"./ar-EG/_lib/formatLong/index.js":[45101,7,45101],"./ar-EG/_lib/formatRelative/index.js":[59871,7,59871],"./ar-EG/_lib/localize/index.js":[73775,7,73775],"./ar-EG/_lib/match/index.js":[73073,7,73073],"./ar-EG/index.js":[77350,7,77350],"./ar-MA/_lib/formatDistance/index.js":[25742,7,25742],"./ar-MA/_lib/formatLong/index.js":[53823,7,53823],"./ar-MA/_lib/formatRelative/index.js":[83461,7,83461],"./ar-MA/_lib/localize/index.js":[63525,7,63525],"./ar-MA/_lib/match/index.js":[66955,7,66955],"./ar-MA/index.js":[33792,7,33792],"./ar-SA/_lib/formatDistance/index.js":[69260,7,69260],"./ar-SA/_lib/formatLong/index.js":[12557,7,12557],"./ar-SA/_lib/formatRelative/index.js":[41247,7,41247],"./ar-SA/_lib/localize/index.js":[67503,7,67503],"./ar-SA/_lib/match/index.js":[32689,7,32689],"./ar-SA/index.js":[39718,7,39718],"./ar-TN/_lib/formatDistance/index.js":[32894,7,32894],"./ar-TN/_lib/formatLong/index.js":[93551,7,93551],"./ar-TN/_lib/formatRelative/index.js":[51797,7,51797],"./ar-TN/_lib/localize/index.js":[73653,7,73653],"./ar-TN/_lib/match/index.js":[1051,7,1051],"./ar-TN/index.js":[80144,7,80144],"./ar/_lib/formatDistance/index.js":[8117,7,8117],"./ar/_lib/formatLong/index.js":[4800,7,4800],"./ar/_lib/formatRelative/index.js":[37202,7,37202],"./ar/_lib/localize/index.js":[83370,7,83370],"./ar/_lib/match/index.js":[34286,7,34286],"./ar/index.js":[91763,7,91763],"./az/_lib/formatDistance/index.js":[653,7,653],"./az/_lib/formatLong/index.js":[83208,7,83208],"./az/_lib/formatRelative/index.js":[80106,7,80106],"./az/_lib/localize/index.js":[85234,7,85234],"./az/_lib/match/index.js":[15190,7,15190],"./az/index.js":[13115,7,13115],"./be-tarask/_lib/formatDistance/index.js":[6646,7,40085,22063],"./be-tarask/_lib/formatLong/index.js":[79735,7,40085,95105],"./be-tarask/_lib/formatRelative/index.js":[8013,7,90609,52154,43509,22252,40085,7256,81682,44444],"./be-tarask/_lib/localize/index.js":[45821,7,40085,19863],"./be-tarask/_lib/match/index.js":[19363,7,40085,27046],"./be-tarask/index.js":[87096,7,90609,52154,43509,22252,40085,7256,81682,77301],"./be/_lib/formatDistance/index.js":[76463,7,94388,99682],"./be/_lib/formatLong/index.js":[24218,7,94388,17486],"./be/_lib/formatRelative/index.js":[65088,7,90609,52154,43509,22252,94388,7256,81682,11587],"./be/_lib/localize/index.js":[68160,7,94388,42244],"./be/_lib/match/index.js":[38504,7,94388,4665],"./be/index.js":[52469,7,90609,52154,43509,22252,94388,7256,81682,33968],"./bg/_lib/formatDistance/index.js":[36117,7,36117],"./bg/_lib/formatLong/index.js":[62368,7,62368],"./bg/_lib/formatRelative/index.js":[65202,7,90609,65202],"./bg/_lib/localize/index.js":[91786,7,91786],"./bg/_lib/match/index.js":[7662,7,7662],"./bg/index.js":[86707,7,90609,86707],"./bn/_lib/formatDistance/index.js":[14866,7,14866],"./bn/_lib/formatLong/index.js":[6339,7,6339],"./bn/_lib/formatRelative/index.js":[97073,7,97073],"./bn/_lib/localize/index.js":[82681,9,82681],"./bn/_lib/match/index.js":[76068,7,76068],"./bn/index.js":[22356,7,22356],"./bs/_lib/formatDistance/index.js":[10393,7,10393],"./bs/_lib/formatLong/index.js":[27924,7,27924],"./bs/_lib/formatRelative/index.js":[7006,7,7006],"./bs/_lib/localize/index.js":[71934,7,71934],"./bs/_lib/match/index.js":[98618,7,98618],"./bs/index.js":[48631,7,48631],"./ca/_lib/formatDistance/index.js":[242,7,242],"./ca/_lib/formatLong/index.js":[95171,7,95171],"./ca/_lib/formatRelative/index.js":[80625,7,80625],"./ca/_lib/localize/index.js":[41241,7,41241],"./ca/_lib/match/index.js":[24855,7,24855],"./ca/index.js":[29108,7,29108],"./cs/_lib/formatDistance/index.js":[49516,7,49516],"./cs/_lib/formatLong/index.js":[96077,7,96077],"./cs/_lib/formatRelative/index.js":[54847,7,54847],"./cs/_lib/localize/index.js":[72143,7,72143],"./cs/_lib/match/index.js":[35601,7,35601],"./cs/index.js":[92102,7,92102],"./cy/_lib/formatDistance/index.js":[53610,7,53610],"./cy/_lib/formatLong/index.js":[17355,7,17355],"./cy/_lib/formatRelative/index.js":[30121,7,30121],"./cy/_lib/localize/index.js":[59553,7,59553],"./cy/_lib/match/index.js":[64671,7,64671],"./cy/index.js":[12060,7,12060],"./da/_lib/formatDistance/index.js":[25137,7,25137],"./da/_lib/formatLong/index.js":[26908,7,26908],"./da/_lib/formatRelative/index.js":[16566,7,16566],"./da/_lib/localize/index.js":[41286,7,41286],"./da/_lib/match/index.js":[38082,7,38082],"./da/index.js":[60607,7,60607],"./de-AT/_lib/localize/index.js":[64790,7,64790],"./de-AT/index.js":[24879,7,24879],"./de/_lib/formatDistance/index.js":[37821,7,37821],"./de/_lib/formatLong/index.js":[74776,7,74776],"./de/_lib/formatRelative/index.js":[99994,7,77613],"./de/_lib/localize/index.js":[87074,7,87074],"./de/_lib/match/index.js":[67942,7,67942],"./de/index.js":[78283,7,78283],"./el/_lib/formatDistance/index.js":[89903,7,89903],"./el/_lib/formatLong/index.js":[47066,7,47066],"./el/_lib/formatRelative/index.js":[53408,7,53408],"./el/_lib/localize/index.js":[6368,7,6368],"./el/_lib/match/index.js":[17864,7,17864],"./el/index.js":[88981,7,88981],"./en-AU/_lib/formatLong/index.js":[42351,7,42351],"./en-AU/index.js":[44336,7,44336],"./en-CA/_lib/formatDistance/index.js":[19292,7,19292],"./en-CA/_lib/formatLong/index.js":[37117,7,37117],"./en-CA/index.js":[59670,7,59670],"./en-GB/_lib/formatLong/index.js":[35172,7,35172],"./en-GB/index.js":[15015,7,15015],"./en-IE/index.js":[81992,7,81992],"./en-IN/_lib/formatLong/index.js":[65470,7,65470],"./en-IN/index.js":[30745,7,30745],"./en-NZ/_lib/formatLong/index.js":[37625,7,37625],"./en-NZ/index.js":[36962,7,36962],"./en-US/_lib/formatDistance/index.js":[39232,7,39232],"./en-US/_lib/formatLong/index.js":[40465,7,40465],"./en-US/_lib/formatRelative/index.js":[18395,7,18395],"./en-US/_lib/localize/index.js":[48979,7,48979],"./en-US/_lib/match/index.js":[68413,7,68413],"./en-US/index.js":[59258,7,59258],"./en-ZA/_lib/formatLong/index.js":[51664,7,51664],"./en-ZA/index.js":[83619,7,83619],"./eo/_lib/formatDistance/index.js":[59290,7,59290],"./eo/_lib/formatLong/index.js":[87803,7,87803],"./eo/_lib/formatRelative/index.js":[97689,7,97689],"./eo/_lib/localize/index.js":[72241,7,72241],"./eo/_lib/match/index.js":[47279,7,47279],"./eo/index.js":[26668,7,26668],"./es/_lib/formatDistance/index.js":[88918,7,88918],"./es/_lib/formatLong/index.js":[44119,7,44119],"./es/_lib/formatRelative/index.js":[90285,7,90285],"./es/_lib/localize/index.js":[59498,7,59498],"./es/_lib/match/index.js":[47203,7,47203],"./es/index.js":[95992,7,95992],"./et/_lib/formatDistance/index.js":[10455,7,10455],"./et/_lib/formatLong/index.js":[40946,7,40946],"./et/_lib/formatRelative/index.js":[98216,7,98216],"./et/_lib/localize/index.js":[54552,7,54552],"./et/_lib/match/index.js":[32896,7,32896],"./et/index.js":[65005,7,65005],"./eu/_lib/formatDistance/index.js":[90156,7,90156],"./eu/_lib/formatLong/index.js":[25709,7,25709],"./eu/_lib/formatRelative/index.js":[57663,7,57663],"./eu/_lib/localize/index.js":[89775,7,89775],"./eu/_lib/match/index.js":[2782,7,80401],"./eu/index.js":[16614,7,16614],"./fa-IR/_lib/formatDistance/index.js":[8833,7,8833],"./fa-IR/_lib/formatLong/index.js":[83116,7,83116],"./fa-IR/_lib/formatRelative/index.js":[52294,7,52294],"./fa-IR/_lib/localize/index.js":[28982,7,28982],"./fa-IR/_lib/match/index.js":[54738,7,54738],"./fa-IR/index.js":[12143,7,12143],"./fi/_lib/formatDistance/index.js":[40247,7,40247],"./fi/_lib/formatLong/index.js":[6546,7,6546],"./fi/_lib/formatRelative/index.js":[75336,7,75336],"./fi/_lib/localize/index.js":[47352,7,47352],"./fi/_lib/match/index.js":[65312,7,65312],"./fi/index.js":[56941,7,56941],"./fr-CA/_lib/formatLong/index.js":[66124,7,66124],"./fr-CA/index.js":[70831,7,70831],"./fr-CH/_lib/formatLong/index.js":[93855,7,93855],"./fr-CH/_lib/formatRelative/index.js":[46629,7,46629],"./fr-CH/index.js":[68448,7,68448],"./fr/_lib/formatDistance/index.js":[90810,7,90810],"./fr/_lib/formatLong/index.js":[77499,7,77499],"./fr/_lib/formatRelative/index.js":[14553,7,14553],"./fr/_lib/localize/index.js":[73041,7,73041],"./fr/_lib/match/index.js":[59631,7,59631],"./fr/index.js":[83756,7,83756],"./fy/_lib/formatDistance/index.js":[84903,7,84903],"./fy/_lib/formatLong/index.js":[5218,7,5218],"./fy/_lib/formatRelative/index.js":[44574,7,89336],"./fy/_lib/localize/index.js":[3080,7,3080],"./fy/_lib/match/index.js":[50352,7,50352],"./fy/index.js":[45085,7,45085],"./gd/_lib/formatDistance/index.js":[9205,7,9205],"./gd/_lib/formatLong/index.js":[14112,7,14112],"./gd/_lib/formatRelative/index.js":[35090,7,35090],"./gd/_lib/localize/index.js":[44426,7,44426],"./gd/_lib/match/index.js":[60910,7,60910],"./gd/index.js":[84019,7,84019],"./gl/_lib/formatDistance/index.js":[34157,7,34157],"./gl/_lib/formatLong/index.js":[24872,7,24872],"./gl/_lib/formatRelative/index.js":[56778,7,56778],"./gl/_lib/localize/index.js":[70546,7,70546],"./gl/_lib/match/index.js":[52470,7,52470],"./gl/index.js":[78651,7,78651],"./gu/_lib/formatDistance/index.js":[26954,7,26954],"./gu/_lib/formatLong/index.js":[16235,7,16235],"./gu/_lib/formatRelative/index.js":[75209,7,75209],"./gu/_lib/localize/index.js":[88449,7,88449],"./gu/_lib/match/index.js":[57407,7,57407],"./gu/index.js":[76476,7,76476],"./he/_lib/formatDistance/index.js":[42033,7,42033],"./he/_lib/formatLong/index.js":[25148,7,25148],"./he/_lib/formatRelative/index.js":[46902,7,46902],"./he/_lib/localize/index.js":[49702,7,49702],"./he/_lib/match/index.js":[25890,7,25890],"./he/index.js":[71103,7,71103],"./hi/_lib/formatDistance/index.js":[29477,7,29477],"./hi/_lib/formatLong/index.js":[28048,7,28048],"./hi/_lib/formatRelative/index.js":[70242,7,70242],"./hi/_lib/localize/index.js":[49882,9,49882],"./hi/_lib/match/index.js":[8734,7,8734],"./hi/index.js":[59459,7,59459],"./hr/_lib/formatDistance/index.js":[8892,7,8892],"./hr/_lib/formatLong/index.js":[59613,7,59613],"./hr/_lib/formatRelative/index.js":[13231,7,13231],"./hr/_lib/localize/index.js":[56127,7,56127],"./hr/_lib/match/index.js":[68385,7,68385],"./hr/index.js":[42870,7,42870],"./ht/_lib/formatDistance/index.js":[13734,7,13734],"./ht/_lib/formatLong/index.js":[85447,7,85447],"./ht/_lib/formatRelative/index.js":[31421,7,31421],"./ht/_lib/localize/index.js":[685,7,685],"./ht/_lib/match/index.js":[80083,7,80083],"./ht/index.js":[7720,7,7720],"./hu/_lib/formatDistance/index.js":[63585,7,63585],"./hu/_lib/formatLong/index.js":[83180,7,83180],"./hu/_lib/formatRelative/index.js":[7046,7,7046],"./hu/_lib/localize/index.js":[28662,7,28662],"./hu/_lib/match/index.js":[22770,7,22770],"./hu/index.js":[31759,7,31759],"./hy/_lib/formatDistance/index.js":[30869,7,30869],"./hy/_lib/formatLong/index.js":[26368,7,26368],"./hy/_lib/formatRelative/index.js":[56754,7,56754],"./hy/_lib/localize/index.js":[37290,7,37290],"./hy/_lib/match/index.js":[91054,7,91054],"./hy/index.js":[17427,7,17427],"./id/_lib/formatDistance/index.js":[49771,7,49771],"./id/_lib/formatLong/index.js":[72422,7,72422],"./id/_lib/formatRelative/index.js":[91684,7,91684],"./id/_lib/localize/index.js":[6140,7,6140],"./id/_lib/match/index.js":[78588,7,78588],"./id/index.js":[26273,7,26273],"./is/_lib/formatDistance/index.js":[44418,7,44418],"./is/_lib/formatLong/index.js":[82067,7,82067],"./is/_lib/formatRelative/index.js":[76059,7,31297],"./is/_lib/localize/index.js":[4969,7,4969],"./is/_lib/match/index.js":[91719,7,91719],"./is/index.js":[56068,7,56068],"./it-CH/_lib/formatLong/index.js":[40592,7,40592],"./it-CH/index.js":[61027,7,90609,15686],"./it/_lib/formatDistance/index.js":[59867,7,59867],"./it/_lib/formatLong/index.js":[95926,7,95926],"./it/_lib/formatRelative/index.js":[20404,7,90609,45315],"./it/_lib/localize/index.js":[13356,7,13356],"./it/_lib/match/index.js":[10092,7,10092],"./it/index.js":[95697,7,90609,89268],"./ja-Hira/_lib/formatDistance/index.js":[9684,7,9684],"./ja-Hira/_lib/formatLong/index.js":[36293,7,36293],"./ja-Hira/_lib/formatRelative/index.js":[94247,7,94247],"./ja-Hira/_lib/localize/index.js":[88711,7,88711],"./ja-Hira/_lib/match/index.js":[87241,7,87241],"./ja-Hira/index.js":[81790,7,81790],"./ja/_lib/formatDistance/index.js":[91163,7,91163],"./ja/_lib/formatLong/index.js":[45654,7,45654],"./ja/_lib/formatRelative/index.js":[77236,7,77236],"./ja/_lib/localize/index.js":[10540,7,10540],"./ja/_lib/match/index.js":[4588,7,4588],"./ja/index.js":[56785,7,56785],"./ka/_lib/formatDistance/index.js":[52154,7,29773],"./ka/_lib/formatLong/index.js":[29083,7,29083],"./ka/_lib/formatRelative/index.js":[62265,7,62265],"./ka/_lib/localize/index.js":[12849,7,12849],"./ka/_lib/match/index.js":[99932,7,77551],"./ka/index.js":[6828,7,6828],"./kk/_lib/formatDistance/index.js":[25404,7,28629,66825],"./kk/_lib/formatLong/index.js":[9021,7,28629,39867],"./kk/_lib/formatRelative/index.js":[87631,7,90609,28629,33188],"./kk/_lib/localize/index.js":[79839,7,28629,75101],"./kk/_lib/match/index.js":[83457,7,28629,71808],"./kk/index.js":[72278,7,90609,28629,82728],"./km/_lib/formatDistance/index.js":[31974,7,31974],"./km/_lib/formatLong/index.js":[25671,7,25671],"./km/_lib/formatRelative/index.js":[66429,7,66429],"./km/_lib/localize/index.js":[48557,7,48557],"./km/_lib/match/index.js":[78995,7,78995],"./km/index.js":[79336,7,79336],"./kn/_lib/formatDistance/index.js":[68971,7,68971],"./kn/_lib/formatLong/index.js":[48230,7,48230],"./kn/_lib/formatRelative/index.js":[21252,7,21252],"./kn/_lib/localize/index.js":[76892,7,76892],"./kn/_lib/match/index.js":[86479,7,8860],"./kn/index.js":[75681,7,75681],"./ko/_lib/formatDistance/index.js":[3888,7,3888],"./ko/_lib/formatLong/index.js":[39233,7,39233],"./ko/_lib/formatRelative/index.js":[3083,7,3083],"./ko/_lib/localize/index.js":[62083,7,62083],"./ko/_lib/match/index.js":[45645,7,45645],"./ko/index.js":[6282,7,6282],"./lb/_lib/formatDistance/index.js":[94728,7,94728],"./lb/_lib/formatLong/index.js":[5289,7,5289],"./lb/_lib/formatRelative/index.js":[12323,7,12323],"./lb/_lib/localize/index.js":[45995,7,45995],"./lb/_lib/match/index.js":[73557,7,73557],"./lb/index.js":[59186,7,59186],"./lt/_lib/formatDistance/index.js":[59034,7,59034],"./lt/_lib/formatLong/index.js":[89083,7,89083],"./lt/_lib/formatRelative/index.js":[21721,7,21721],"./lt/_lib/localize/index.js":[61745,7,61745],"./lt/_lib/match/index.js":[88559,7,88559],"./lt/index.js":[8140,7,8140],"./lv/_lib/formatDistance/index.js":[87652,7,87652],"./lv/_lib/formatLong/index.js":[11061,7,11061],"./lv/_lib/formatRelative/index.js":[84567,7,90609,27114],"./lv/_lib/localize/index.js":[59127,7,81508],"./lv/_lib/match/index.js":[33625,7,33625],"./lv/index.js":[79534,7,90609,70525],"./mk/_lib/formatDistance/index.js":[68134,7,68134],"./mk/_lib/formatLong/index.js":[72327,7,72327],"./mk/_lib/formatRelative/index.js":[32669,7,90609,34624],"./mk/_lib/localize/index.js":[17133,7,17133],"./mk/_lib/match/index.js":[87219,7,87219],"./mk/index.js":[91752,7,90609,12551],"./mn/_lib/formatDistance/index.js":[69773,7,69773],"./mn/_lib/formatLong/index.js":[36104,7,36104],"./mn/_lib/formatRelative/index.js":[51844,7,7082],"./mn/_lib/localize/index.js":[68402,7,68402],"./mn/_lib/match/index.js":[15126,7,15126],"./mn/index.js":[67515,7,67515],"./ms/_lib/formatDistance/index.js":[49182,7,49182],"./ms/_lib/formatLong/index.js":[21935,7,21935],"./ms/_lib/formatRelative/index.js":[68085,7,68085],"./ms/_lib/localize/index.js":[58389,7,58389],"./ms/_lib/match/index.js":[66907,7,66907],"./ms/index.js":[13872,7,13872],"./mt/_lib/formatDistance/index.js":[18591,7,18591],"./mt/_lib/formatLong/index.js":[86442,7,86442],"./mt/_lib/formatRelative/index.js":[48016,7,48016],"./mt/_lib/localize/index.js":[53872,7,53872],"./mt/_lib/match/index.js":[1912,7,1912],"./mt/index.js":[54693,7,54693],"./nb/_lib/formatDistance/index.js":[42546,7,42546],"./nb/_lib/formatLong/index.js":[55075,7,55075],"./nb/_lib/formatRelative/index.js":[63025,7,63025],"./nb/_lib/localize/index.js":[41049,7,41049],"./nb/_lib/match/index.js":[58807,7,58807],"./nb/index.js":[84020,7,84020],"./nl-BE/_lib/formatDistance/index.js":[11762,7,11762],"./nl-BE/_lib/formatLong/index.js":[93763,7,93763],"./nl-BE/_lib/formatRelative/index.js":[15889,7,15889],"./nl-BE/_lib/localize/index.js":[79033,7,79033],"./nl-BE/_lib/match/index.js":[76183,7,76183],"./nl-BE/index.js":[40852,7,40852],"./nl/_lib/formatDistance/index.js":[20472,7,20472],"./nl/_lib/formatLong/index.js":[73913,7,73913],"./nl/_lib/formatRelative/index.js":[19187,7,19187],"./nl/_lib/localize/index.js":[78747,7,78747],"./nl/_lib/match/index.js":[81477,7,81477],"./nl/index.js":[33858,7,33858],"./nn/_lib/formatDistance/index.js":[45198,7,45198],"./nn/_lib/formatLong/index.js":[63039,7,63039],"./nn/_lib/formatRelative/index.js":[2917,7,2917],"./nn/_lib/localize/index.js":[72389,7,72389],"./nn/_lib/match/index.js":[20779,7,20779],"./nn/index.js":[6464,7,6464],"./oc/_lib/formatDistance/index.js":[50304,7,50304],"./oc/_lib/formatLong/index.js":[35569,7,35569],"./oc/_lib/formatRelative/index.js":[29467,7,29467],"./oc/_lib/localize/index.js":[84499,7,84499],"./oc/_lib/match/index.js":[88637,7,88637],"./oc/index.js":[87738,7,87738],"./pl/_lib/formatDistance/index.js":[18934,7,18934],"./pl/_lib/formatLong/index.js":[1367,7,1367],"./pl/_lib/formatRelative/index.js":[97293,7,90609,69520],"./pl/_lib/localize/index.js":[31773,7,31773],"./pl/_lib/match/index.js":[54147,7,54147],"./pl/index.js":[18264,7,90609,10647],"./pt-BR/_lib/formatDistance/index.js":[87717,7,87717],"./pt-BR/_lib/formatLong/index.js":[50256,7,50256],"./pt-BR/_lib/formatRelative/index.js":[24450,7,24450],"./pt-BR/_lib/localize/index.js":[7802,7,7802],"./pt-BR/_lib/match/index.js":[78654,7,78654],"./pt-BR/index.js":[4003,7,4003],"./pt/_lib/formatDistance/index.js":[47886,7,47886],"./pt/_lib/formatLong/index.js":[46655,7,46655],"./pt/_lib/formatRelative/index.js":[62373,7,62373],"./pt/_lib/localize/index.js":[23845,7,46226],"./pt/_lib/match/index.js":[9611,7,9611],"./pt/index.js":[71680,7,71680],"./ro/_lib/formatDistance/index.js":[71805,7,71805],"./ro/_lib/formatLong/index.js":[4952,7,4952],"./ro/_lib/formatRelative/index.js":[33978,7,33978],"./ro/_lib/localize/index.js":[85794,7,85794],"./ro/_lib/match/index.js":[64422,7,64422],"./ro/index.js":[49931,7,49931],"./ru/_lib/formatDistance/index.js":[95887,7,19156,89206],"./ru/_lib/formatLong/index.js":[3322,7,19156,62248],"./ru/_lib/formatRelative/index.js":[43040,7,90609,19156,10807],"./ru/_lib/localize/index.js":[96672,7,19156,97482],"./ru/_lib/match/index.js":[40968,7,19156,49427],"./ru/index.js":[65685,7,90609,19156,60347],"./sk/_lib/formatDistance/index.js":[27892,7,27892],"./sk/_lib/formatLong/index.js":[73957,7,73957],"./sk/_lib/formatRelative/index.js":[24999,7,90609,53402],"./sk/_lib/localize/index.js":[46516,7,24135],"./sk/_lib/match/index.js":[85065,7,85065],"./sk/index.js":[65758,7,90609,74317],"./sl/_lib/formatDistance/index.js":[94809,7,94809],"./sl/_lib/formatLong/index.js":[58292,7,58292],"./sl/_lib/formatRelative/index.js":[82718,7,82718],"./sl/_lib/localize/index.js":[42206,7,42206],"./sl/_lib/match/index.js":[67322,7,67322],"./sl/index.js":[81508,7,59127],"./sq/_lib/formatDistance/index.js":[16914,7,16914],"./sq/_lib/formatLong/index.js":[45859,7,45859],"./sq/_lib/formatRelative/index.js":[93969,7,93969],"./sq/_lib/localize/index.js":[72409,7,72409],"./sq/_lib/match/index.js":[3767,7,3767],"./sq/index.js":[34644,7,34644],"./sr-Latn/_lib/formatDistance/index.js":[46783,7,46783],"./sr-Latn/_lib/formatLong/index.js":[17290,7,17290],"./sr-Latn/_lib/formatRelative/index.js":[54384,7,54384],"./sr-Latn/_lib/localize/index.js":[8528,7,8528],"./sr-Latn/_lib/match/index.js":[57688,7,57688],"./sr-Latn/index.js":[36165,7,36165],"./sr/_lib/formatDistance/index.js":[74535,7,74535],"./sr/_lib/formatLong/index.js":[77826,7,77826],"./sr/_lib/formatRelative/index.js":[78968,7,78968],"./sr/_lib/localize/index.js":[93384,7,93384],"./sr/_lib/match/index.js":[57104,7,57104],"./sr/index.js":[21789,7,21789],"./sv/_lib/formatDistance/index.js":[29035,7,29035],"./sv/_lib/formatLong/index.js":[1286,7,1286],"./sv/_lib/formatRelative/index.js":[87300,7,87300],"./sv/_lib/localize/index.js":[86748,7,86748],"./sv/_lib/match/index.js":[8444,7,8444],"./sv/index.js":[79681,7,79681],"./ta/_lib/formatDistance/index.js":[31553,7,62934,43015],"./ta/_lib/formatLong/index.js":[27180,7,62934,21933],"./ta/_lib/formatRelative/index.js":[75014,7,62934,65396],"./ta/_lib/localize/index.js":[42454,7,62934,9387],"./ta/_lib/match/index.js":[99378,7,62934,37522],"./ta/index.js":[91407,7,62934,332],"./te/_lib/formatDistance/index.js":[23789,7,23789],"./te/_lib/formatLong/index.js":[97480,7,97480],"./te/_lib/formatRelative/index.js":[62762,7,62762],"./te/_lib/localize/index.js":[60850,7,60850],"./te/_lib/match/index.js":[59222,7,59222],"./te/index.js":[55355,7,55355],"./th/_lib/formatDistance/index.js":[16526,7,16526],"./th/_lib/formatLong/index.js":[27711,7,27711],"./th/_lib/formatRelative/index.js":[4069,7,4069],"./th/_lib/localize/index.js":[60389,7,60389],"./th/_lib/match/index.js":[25995,7,25995],"./th/index.js":[65920,7,65920],"./tr/_lib/formatDistance/index.js":[59456,7,59456],"./tr/_lib/formatLong/index.js":[89009,7,89009],"./tr/_lib/formatRelative/index.js":[38619,7,38619],"./tr/_lib/localize/index.js":[98931,7,98931],"./tr/_lib/match/index.js":[83357,7,83357],"./tr/index.js":[87034,7,87034],"./ug/_lib/formatDistance/index.js":[93634,7,93634],"./ug/_lib/formatLong/index.js":[37491,7,37491],"./ug/_lib/formatRelative/index.js":[68481,7,68481],"./ug/_lib/localize/index.js":[73769,7,73769],"./ug/_lib/match/index.js":[51239,7,51239],"./ug/index.js":[21188,7,21188],"./uk/_lib/formatDistance/index.js":[93406,7,64983,96612],"./uk/_lib/formatLong/index.js":[60143,7,64983,44314],"./uk/_lib/formatRelative/index.js":[24085,7,90609,52154,43509,22252,7256,64983,81682,74231],"./uk/_lib/localize/index.js":[57365,7,64983,31768],"./uk/_lib/match/index.js":[83035,7,64983,15141],"./uk/index.js":[74544,7,90609,52154,43509,22252,7256,64983,81682],"./uz-Cyrl/_lib/formatDistance/index.js":[93958,7,93958],"./uz-Cyrl/_lib/formatLong/index.js":[16327,7,16327],"./uz-Cyrl/_lib/formatRelative/index.js":[7389,7,7389],"./uz-Cyrl/_lib/localize/index.js":[82381,7,82381],"./uz-Cyrl/_lib/match/index.js":[66995,7,66995],"./uz-Cyrl/index.js":[36392,7,36392],"./uz/_lib/formatDistance/index.js":[30793,7,30793],"./uz/_lib/formatLong/index.js":[76004,7,76004],"./uz/_lib/formatRelative/index.js":[94734,7,94734],"./uz/_lib/localize/index.js":[40622,7,40622],"./uz/_lib/match/index.js":[37418,7,37418],"./uz/index.js":[87399,7,87399],"./vi/_lib/formatDistance/index.js":[75783,7,75783],"./vi/_lib/formatLong/index.js":[1986,7,1986],"./vi/_lib/formatRelative/index.js":[16504,7,16504],"./vi/_lib/localize/index.js":[53736,7,53736],"./vi/_lib/match/index.js":[67248,7,67248],"./vi/index.js":[2077,7,2077],"./zh-CN/_lib/formatDistance/index.js":[94238,7,94238],"./zh-CN/_lib/formatLong/index.js":[6223,7,6223],"./zh-CN/_lib/formatRelative/index.js":[13141,7,90609,13960],"./zh-CN/_lib/localize/index.js":[22837,7,22837],"./zh-CN/_lib/match/index.js":[48315,7,48315],"./zh-CN/index.js":[57488,7,90609,90207],"./zh-HK/_lib/formatDistance/index.js":[53054,7,53054],"./zh-HK/_lib/formatLong/index.js":[13135,7,13135],"./zh-HK/_lib/formatRelative/index.js":[88309,7,88309],"./zh-HK/_lib/localize/index.js":[22197,7,22197],"./zh-HK/_lib/match/index.js":[46555,7,46555],"./zh-HK/index.js":[1488,7,1488],"./zh-TW/_lib/formatDistance/index.js":[21654,7,21654],"./zh-TW/_lib/formatLong/index.js":[26839,7,26839],"./zh-TW/_lib/formatRelative/index.js":[39373,7,39373],"./zh-TW/_lib/localize/index.js":[79357,7,79357],"./zh-TW/_lib/match/index.js":[62275,7,62275],"./zh-TW/index.js":[1368,7,1368]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(2).map(n.e)).then((function(){return n.t(i,16|t[1])}))}i.keys=function(){return Object.keys(r)},i.id=27570,e.exports=i},28626:function(e,t,n){"use strict";n.d(t,{Q:function(){return f},w:function(){return p}});var r=n(62540),i=n(63696),o=n(5898),a=n(82885),s=n(44797),l=n(69410),u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c={CustomCss:"customCss",DisableCustomCss:"disableCustomCss",Theme:"appTheme",DashboardTheme:"dashboardTheme",DateTimeLocale:"datetimelocale",Language:"language"},d=(0,i.createContext)({disableCustomCss:!1}),f=function(){return(0,i.useContext)(d)},p=function(e){var t=e.children,n=u((0,i.useState)(),2),f=n[0],p=n[1],m=u((0,i.useState)(!1),2),y=m[0],v=m[1],h=u((0,i.useState)(),2),g=h[0],b=h[1],S=u((0,i.useState)(),2),A=S[0],x=S[1],w=u((0,i.useState)(),2),P=w[0],k=w[1],I=u((0,i.useState)(o.Mo),2),j=I[0],T=I[1],C=(0,l.gf)().user,E=(0,i.useMemo)((function(){return{customCss:f,disableCustomCss:y,theme:g,dashboardTheme:A,dateTimeLocale:P,locale:j}}),[f,y,g,A,P,j]),_=(0,i.useCallback)((function(){p(a.currentSettings.customCss()),v(a.currentSettings.disableCustomCss()),b(a.currentSettings.theme()),x(a.currentSettings.dashboardTheme()),k(a.currentSettings.dateTimeLocale()),T(a.currentSettings.language())}),[]),L=(0,i.useCallback)((function(e,t){t&&Object.values(c).includes(t)&&_()}),[_]);return(0,i.useEffect)((function(){return s.A.on(a.currentSettings,"change",L),function(){s.A.off(a.currentSettings,"change",L)}}),[L]),(0,i.useEffect)((function(){_()}),[_,C]),(0,r.jsx)(d.Provider,{value:E,children:t})}},29379:function(e,t,n){n(78557),n(90076),function(e){"use strict";var t=e.prototype,n=t.play;t.play=function(){try{var e=n.apply(this,arguments);return"function"==typeof(null==e?void 0:e.then)?e:Promise.resolve()}catch(e){return Promise.reject(e)}}}(HTMLMediaElement)},29561:function(e,t,n){var r={"./asyncRoutes":[24786],"./asyncRoutes/":[24786],"./asyncRoutes/index":[24786],"./asyncRoutes/index.ts":[24786],"./asyncRoutes/user":[21643],"./asyncRoutes/user.ts":[21643],"./home":[52824,45642,4113,45568,73233,81954,27962],"./home.tsx":[52824,4113,38244],"./homevideos":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./homevideos/":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./homevideos/index":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./homevideos/index.tsx":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./legacyRoutes":[77285],"./legacyRoutes/":[77285],"./legacyRoutes/index":[77285],"./legacyRoutes/index.ts":[77285],"./legacyRoutes/public":[3312],"./legacyRoutes/public.ts":[3312],"./legacyRoutes/user":[38274],"./legacyRoutes/user.ts":[38274],"./livetv":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index.tsx":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./movies":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./movies/":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./movies/index":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./movies/index.tsx":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./music":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./music/":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./music/index":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./music/index.tsx":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./routes":[66359],"./routes.tsx":[66359],"./shows":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./shows/":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./shows/index":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./shows/index.tsx":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./user/display":[86779,23247,60815,81771,40815,66935],"./user/display/":[86779,23247,60815,81771,40815,66935],"./user/display/index":[86779,23247,60815,81771,40815,66935],"./user/display/index.tsx":[86779,23247,60815,81771,30010],"./video":[13993],"./video/":[13993],"./video/index":[13993],"./video/index.tsx":[13993]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=29561,e.exports=i},30224:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(62540),i=n(63696),o=n(77402),a=n(28626),s="dark",l=n(51876),u=function(e){return"themes/".concat(e,"/theme.css")},c=u((0,l.x0)().id),d=function(e){var t=e.dashboard,n=void 0!==t&&t,l=function(){var e=(0,a.Q)(),t=e.theme,n=e.dashboardTheme,r=(0,o.U)().defaultTheme;return{theme:t||(null==r?void 0:r.id)||s,dashboardTheme:n||(null==r?void 0:r.id)||s}}(),d=l.theme,f=l.dashboardTheme,p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)(c),2),m=p[0],y=p[1];return(0,i.useEffect)((function(){var e=n?f:d;e&&y(u(e))}),[n,f,d]),(0,r.jsx)("link",{rel:"stylesheet",type:"text/css",href:m})}},31297:function(e,t,n){"use strict";n.d(t,{q:function(){return r}});var r=new(n(53804).E)({defaultOptions:{mutations:{networkMode:"always"},queries:{networkMode:"always"}}})},31524:function(e,t,n){"use strict";n.d(t,{V:function(){return a}});var r=n(11444),i=n(64680),o=n(67430);function a(e,t){var n;if(void 0===t&&(t={}),!e.ServerId)return null;if(t.type=t.type||i.y.Primary,e.Type===r.D.Episode)return function(e,t){if(void 0===t&&(t={}),!e.ServerId)return null;if(e.SeriesId&&t.type===i.y.Primary&&e.SeriesPrimaryImageTag)return t.tag=e.SeriesPrimaryImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.SeriesId,t);if(t.type===i.y.Thumb){if(e.SeriesId&&e.SeriesThumbImageTag)return t.tag=e.SeriesThumbImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.SeriesId,t);if(e.ParentThumbItemId&&e.ParentThumbImageTag)return t.tag=e.ParentThumbImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.ParentThumbItemId,t)}return null}(e,t);var a=e.PrimaryImageItemId||e.Id;return a&&(null===(n=e.ImageTags)||void 0===n?void 0:n[t.type])?(t.tag=e.ImageTags[t.type],o.tF.getApiClient(e.ServerId).getScaledImageUrl(a,t)):e.AlbumId&&e.AlbumPrimaryImageTag?(t.tag=e.AlbumPrimaryImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.AlbumId,t)):null}},34569:function(e,t,n){"use strict";var r=n(62540),i=n(47891),o=n(4391),a=n(92779),s=n(69856),l=n(89348),u=n(4452),c=n.n(u),d=n(63696),f=n(87404),p=n(8566),m=n(65242);t.A=function(e){var t=e.pageClasses,n=void 0===t?["libraryPage"]:t,u=(0,f.r5)();return(0,d.useEffect)((function(){p.Ay.hide()}),[]),(0,r.jsx)(m.A,{id:"errorBoundary",className:c()("mainAnimatedPage",n),children:(0,r.jsx)(a.A,{className:"content-primary",children:(0,r.jsxs)(i.A,{severity:"error",children:[(0,r.jsx)(o.A,{children:u.name}),(0,r.jsx)(l.A,{children:u.message}),u.stack&&(0,r.jsx)(s.A,{variant:"outlined",sx:{marginTop:1,backgroundColor:"transparent"},children:(0,r.jsx)(a.A,{component:"pre",sx:{overflow:"auto",margin:2,maxHeight:"25rem"},children:u.stack})})]})})})}},34789:function(e,t,n){"use strict";var r,i;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(){var e=navigator.userAgent.toLowerCase();return-1!==e.indexOf("netcast")||-1!==e.indexOf("web0s")}n(29305),n(32733),n(84701),n(69892),n(76281),n(84734),n(44962),n(89336),n(78557),n(96054),n(646),n(95021),n(73687),n(99425),n(83994),n(93062),n(46968),n(82367);var s=navigator.userAgent,l=function(e){e=(e=e.toLowerCase()).replace(/(motorola edge)/,"").trim();var t,n=/(edg)[ /]([\w.]+)/.exec(e)||/(edga)[ /]([\w.]+)/.exec(e)||/(edgios)[ /]([\w.]+)/.exec(e)||/(edge)[ /]([\w.]+)/.exec(e)||/(opera)[ /]([\w.]+)/.exec(e)||/(opr)[ /]([\w.]+)/.exec(e)||/(chrome)[ /]([\w.]+)/.exec(e)||/(safari)[ /]([\w.]+)/.exec(e)||/(firefox)[ /]([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],r=/(version)[ /]([\w.]+)/.exec(e),i=/(ipad)/.exec(e)||/(iphone)/.exec(e)||/(windows)/.exec(e)||/(android)/.exec(e)||[],o=n[1]||"";"edge"===o&&(i=[""]),"opr"===o&&(o="opera"),r&&r.length>2&&(t=r[2]),t=t||n[2]||"0";var a=parseInt(t.split(".")[0],10);return isNaN(a)&&(a=0),{browser:o,version:t,platform:i[0]||"",versionMajor:a}}(s),u={};if(l.browser&&(u[l.browser]=!0,u.version=l.version,u.versionMajor=l.versionMajor),l.platform&&(u[l.platform]=!0),u.edgeChromium=u.edg||u.edga||u.edgios,u.chrome||u.edgeChromium||u.edge||u.opera||-1===s.toLowerCase().indexOf("webkit")||(u.safari=!0),u.osx=-1!==s.toLowerCase().indexOf("mac os x"),u.osx&&!u.iphone&&!u.ipod&&!u.ipad&&navigator.maxTouchPoints>1&&(u.ipad=!0),-1!==s.toLowerCase().indexOf("playstation 4")&&(u.ps4=!0,u.tv=!0),function(e){for(var t=["mobi","ipad","iphone","ipod","silk","gt-p1000","nexus 7","kindle fire","opera mini"],n=e.toLowerCase(),r=0,i=t.length;r<i;r++)if(-1!==n.indexOf(t[r]))return!0;return!1}(s)&&(u.mobile=!0),-1!==s.toLowerCase().indexOf("xbox")&&(u.xboxOne=!0,u.tv=!0),u.animate="undefined"!=typeof document&&null!=document.documentElement.animate,u.hisense=s.toLowerCase().includes("hisense"),u.tizen=-1!==s.toLowerCase().indexOf("tizen")||null!=window.tizen,u.vidaa=s.toLowerCase().includes("vidaa"),u.web0s=a(),u.edgeUwp=(u.edge||u.edgeChromium)&&(-1!==s.toLowerCase().indexOf("msapphost")||-1!==s.toLowerCase().indexOf("webview")),u.web0s)u.web0sVersion=function(e){if(e.chrome){if(-1!==navigator.userAgent.toLowerCase().indexOf("netcast"))return void console.warn("Unable to detect webOS version - NetCast");if(e.versionMajor>=94)return 23;if(e.versionMajor>=87)return 22;if(e.versionMajor>=79)return 6;if(e.versionMajor>=68)return 5;if(e.versionMajor>=53)return 4;if(e.versionMajor>=38)return 3;if(e.versionMajor>=34)return 2;if(e.versionMajor>=26)return 1}else{if(e.versionMajor>=538)return 2;if(e.versionMajor>=537)return 1}console.error("Unable to detect webOS version")}(u),delete u.chrome,delete u.safari;else if(u.tizen){var c=RegExp(/Tizen (\d+).(\d+)/).exec(s);u.tizenVersion=parseInt(c[1],10)+parseInt(c[2],10)/10,delete u.chrome,delete u.safari}else u.orsay=-1!==s.toLowerCase().indexOf("smarthub");u.tv=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("oculusbrowser")&&(-1!==e.indexOf("tv")||-1!==e.indexOf("samsungbrowser")||-1!==e.indexOf("viera")||a())}(),u.operaTv=u.tv&&-1!==s.toLowerCase().indexOf("opr/"),(u.mobile||u.tv)&&(u.slow=!0),("undefined"!=typeof document&&"ontouchstart"in window||navigator.maxTouchPoints>0)&&(u.touch=!0),u.keyboard=function(e){return!!(e.touch||e.xboxOne||e.ps4||e.edgeUwp||e.tv)}(u),u.supportsCssAnimation=function(e){if(e&&(!0===i||!1===i))return i;if(!0===r||!1===r)return r;var t=!1,n=document.createElement("div");if(void 0!==n.style.animationName&&(t=!0),!1===t&&e){var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}(["Webkit","O","Moz"]);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(void 0!==n.style[l+"AnimationName"]){t=!0;break}}}catch(e){s.e(e)}finally{s.f()}}return e?i=t:r=t},u.iOS=u.ipad||u.iphone||u.ipod,u.iOS&&(u.iOSVersion=function(){if(/iP(hone|od|ad)|MacIntel/.test(navigator.platform))for(var e=0,t=[/OS (\d+)_(\d+)_?(\d+)?/,/Version\/(\d+)/];e<t.length;e++){var n=RegExp(t[e]).exec(navigator.appVersion);if(n)return[parseInt(n[1],10),parseInt(n[2]||0,10),parseInt(n[3]||0,10)]}return[]}(),u.iOSVersion&&u.iOSVersion.length>=2&&(u.iOSVersion=u.iOSVersion[0]+u.iOSVersion[1]/10)),t.A=u},34945:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_PUBLIC_ROUTES:function(){return i.ASYNC_PUBLIC_ROUTES},ASYNC_USER_ROUTES:function(){return r.ASYNC_USER_ROUTES}});var r=n(12446),i=n(95260)},36300:function(e,t,n){"use strict";function r(e,t){for(var n=0,r=t.length;n<r;n++)if(e.contains(t[n]))return!0;return!1}n.d(t,{f:function(){return u},q2:function(){return l}}),n(84734),n(26448),n(36947),n(95021),n(93062);var i,o,a=!1;try{var s=Object.defineProperty({},"capture",{get:function(){return a=!0,null}});window.addEventListener("test",null,s)}catch(e){}function l(e,t,n,r){var i=r||{};a||(i=i.capture),e.addEventListener(t,n,i)}function u(e,t,n,r){var i=r||{};a||(i=i.capture),e.removeEventListener(t,n,i)}function c(){i=null}var d,f,p=[480,720,1280,1440,1920,2560,3840,5120,7680];function m(){if(d)return d;var e=document.createElement("div"),t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(var n in t)if(void 0!==e.style[n])return d=t[n],t[n];return d="animationend"}t.Ay={parentWithAttribute:function(e,t,n){for(;n?e.getAttribute(t)!==n:!e.getAttribute(t);){var r;if(null===(r=e=e.parentNode)||void 0===r||!r.getAttribute)return null}return e},parentWithClass:function(e,t){for(Array.isArray(t)||(t=[t]);!e.classList||!r(e.classList,t);)if(!(e=e.parentNode))return null;return e},parentWithTag:function(e,t){for(Array.isArray(t)||(t=[t]);-1===t.indexOf(e.tagName||"");)if(!(e=e.parentNode))return null;return e},addEventListener:l,removeEventListener:u,getWindowSize:function(){if(!i){var e=window.innerWidth,t=window.innerHeight;if(!Number.isFinite(e)||!Number.isFinite(t))return{innerWidth:Number.isFinite(e)?e:3840,innerHeight:Number.isFinite(t)?t:2160};i={innerWidth:e,innerHeight:t},o||(o=!0,l(window,"orientationchange",c,{passive:!0}),l(window,"resize",c,{passive:!0}))}return i},getScreenWidth:function(){var e=Number.isFinite(window.innerWidth)?window.innerWidth:3840,t=Number.isFinite(window.innerHeight)?window.innerHeight:2160;return t>e&&(e=t*(16/9)),p.sort((function(t,n){return Math.abs(e-t)-Math.abs(e-n)})),p[0]},setElementTitle:function(e,t,n){e.setAttribute("title",t),e.setAttribute("aria-label",n)},whichTransitionEvent:function(){if(f)return f;var e=document.createElement("div"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(var n in t)if(void 0!==e.style[n])return f=t[n],t[n];return f="transitionend"},whichAnimationEvent:m,whichAnimationCancelEvent:function(){return m().replace("animationend","animationcancel").replace("AnimationEnd","AnimationCancel")}}},37881:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(62540),i=(n(63696),n(55219)),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e){return{path:e.path,element:(0,r.jsx)(i.A,o({},e.pageProps))}}},38274:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_USER_ROUTES:function(){return r}});var r=[{path:"details",pageProps:{controller:"itemDetails/index",view:"itemDetails/index.html"}},{path:"list",pageProps:{controller:"list",view:"list.html"}},{path:"lyrics",pageProps:{controller:"lyrics",view:"lyrics.html"}},{path:"mypreferencescontrols",pageProps:{controller:"user/controls/index",view:"user/controls/index.html"}},{path:"mypreferenceshome",pageProps:{controller:"user/home/index",view:"user/home/index.html"}},{path:"mypreferencesplayback",pageProps:{controller:"user/playback/index",view:"user/playback/index.html"}},{path:"mypreferencessubtitles",pageProps:{controller:"user/subtitles/index",view:"user/subtitles/index.html"}},{path:"queue",pageProps:{controller:"playback/queue/index",view:"playback/queue/index.html",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}}]},38490:function(e,t,n){"use strict";n.r(t),n.d(t,{handleCommand:function(){return g},idleTime:function(){return f},notify:function(){return c},notifyMouseMove:function(){return d},off:function(){return v},on:function(){return y},select:function(){return p}});var r=n(22622),i=n(9164),o=n(39738),a=n(70267),s=n(97339),l=n(36300),u=(new Date).getTime();function c(){u=(new Date).getTime(),g("unknown")}function d(){u=(new Date).getTime()}function f(){return(new Date).getTime()-u}function p(e){e.click()}var m=0;function y(e,t){m++,l.Ay.addEventListener(e,"command",t,{})}function v(e,t){m&&m--,l.Ay.removeEventListener(e,"command",t,{})}var h={};function g(e,t){u=(new Date).getTime();var n=t?t.sourceElement:null;if(n&&(n=i.A.focusableParent(n)),!n){n=document.activeElement||window;var l=document.querySelectorAll(".dialogContainer .dialog.opened"),c=l.length?l[l.length-1]:null;c&&!c.contains(n)&&(n=c)}if(m){var d=new CustomEvent("command",{detail:{command:e},bubbles:!0,cancelable:!0});if(!n.dispatchEvent(d))return}var f={up:function(){i.A.moveUp(n)},down:function(){i.A.moveDown(n)},left:function(){i.A.moveLeft(n)},right:function(){i.A.moveRight(n)},home:function(){a.appRouter.goHome()},settings:function(){a.appRouter.showSettings()},back:function(){a.appRouter.canGoBack()?a.appRouter.back():r.g.supports(s.Y.Exit)&&r.g.exit()},select:function(){p(n)},nextchapter:function(){o.f.nextChapter()},next:function(){o.f.nextTrack()},nexttrack:function(){o.f.nextTrack()},previous:function(){o.f.previousTrack()},previoustrack:function(){o.f.previousTrack()},previouschapter:function(){o.f.previousChapter()},guide:function(){a.appRouter.showGuide()},recordedtv:function(){a.appRouter.showRecordedTV()},livetv:function(){a.appRouter.showLiveTV()},mute:function(){o.f.setMute(!0)},unmute:function(){o.f.setMute(!1)},togglemute:function(){o.f.toggleMute()},channelup:function(){o.f.channelUp()},channeldown:function(){o.f.channelDown()},volumedown:function(){o.f.volumeDown()},volumeup:function(){o.f.volumeUp()},play:function(){o.f.unpause()},pause:function(){o.f.pause()},playpause:function(){o.f.playPause()},stop:function(){var e,t,n;t=h[e="stop"]||0,!((n=(new Date).getTime())-t<1e3||(h[e]=n,0))&&o.f.stop()},changezoom:function(){o.f.toggleAspectRatio()},increaseplaybackrate:function(){o.f.increasePlaybackRate()},decreaseplaybackrate:function(){o.f.decreasePlaybackRate()},changeaudiotrack:function(){o.f.changeAudioStream()},changesubtitletrack:function(){o.f.changeSubtitleStream()},search:function(){a.appRouter.showSearch()},favorites:function(){a.appRouter.showFavorites()},fastforward:function(){o.f.fastForward()},rewind:function(){o.f.rewind()},seek:function(){o.f.seekMs(t)},togglefullscreen:function(){o.f.toggleFullscreen()},disabledisplaymirror:function(){o.f.enableDisplayMirroring(!1)},enabledisplaymirror:function(){o.f.enableDisplayMirroring(!0)},toggledisplaymirror:function(){o.f.toggleDisplayMirroring()},nowplaying:function(){a.appRouter.showNowPlaying()},repeatnone:function(){o.f.setRepeatMode("RepeatNone")},repeatall:function(){o.f.setRepeatMode("RepeatAll")},repeatone:function(){o.f.setRepeatMode("RepeatOne")},unknown:function(){}}[e];void 0!==f?f.call():console.debug("inputManager: tried to process command with no action assigned: ".concat(e))}l.Ay.addEventListener(document,"click",c,{passive:!0}),t.default={handleCommand:g,notify:c,notifyMouseMove:d,idleTime:f,on:y,off:v}},38601:function(e,t,n){var r={"./":[73422,45642,23247,60815,81771,16304,9886,1270,57308,13057],"./_asyncRoutes":[39244],"./_asyncRoutes.ts":[39244],"./_legacyRoutes":[4877],"./_legacyRoutes.ts":[4877],"./activity":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./activity/":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./activity/index":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./activity/index.tsx":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./backups":[87269,45642,23247,60815,81771,16304,9886,46876],"./backups/":[87269,45642,23247,60815,81771,16304,9886,46876],"./backups/index":[87269,45642,23247,60815,81771,16304,9886,46876],"./backups/index.tsx":[87269,45642,23247,60815,81771,16304,9886,46876],"./branding":[21475,45642,23247,60815,81771,16304,10878],"./branding/":[21475,45642,23247,60815,81771,16304,10878],"./branding/index":[21475,45642,23247,60815,81771,16304,10878],"./branding/index.tsx":[21475,45642,23247,60815,81771,16304,10878],"./devices":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./devices/":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./devices/index":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./devices/index.tsx":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./index":[73422,45642,23247,60815,81771,16304,9886,1270,57308,13057],"./index.tsx":[73422,45642,23247,60815,81771,16304,9886,1270,57308,13057],"./keys":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./keys/":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./keys/index":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./keys/index.tsx":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./libraries":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/display":[52433,45642,23247,60815,81771,8241],"./libraries/display.tsx":[52433,45642,23247,60815,81771,8241],"./libraries/index":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/index.tsx":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/metadata":[26364,45642,23247,60815,81771,8690],"./libraries/metadata.tsx":[26364,45642,23247,60815,81771,8690],"./libraries/nfo":[32204,45642,23247,60815,81771,84004],"./libraries/nfo.tsx":[32204,45642,23247,60815,81771,84004],"./livetv":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index.tsx":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/recordings":[92163,45642,23247,60815,81771,16304,99072],"./livetv/recordings.tsx":[92163,45642,23247,60815,81771,16304,99072],"./logs":[79905,45642,23247,60815,81771,45378],"./logs/":[79905,45642,23247,60815,81771,45378],"./logs/file":[15338,23247,60815,81771,16304,40229],"./logs/file.tsx":[15338,23247,60815,81771,16304,40229],"./logs/index":[79905,45642,23247,60815,81771,45378],"./logs/index.tsx":[79905,45642,23247,60815,81771,45378],"./playback/resume":[6820,45642,23247,60815,81771,12296],"./playback/resume.tsx":[6820,45642,23247,60815,81771,12296],"./playback/streaming":[75461,45642,23247,60815,81771,55383],"./playback/streaming.tsx":[75461,45642,23247,60815,81771,55383],"./playback/transcoding":[7077,45642,23247,60815,81771,16304,55691],"./playback/transcoding.tsx":[7077,45642,23247,60815,81771,16304,55691],"./playback/trickplay":[70298,45642,23247,60815,81771,77756],"./playback/trickplay.tsx":[70298,45642,23247,60815,81771,77756],"./plugins":[26057,45642,23247,60815,16304,70593],"./plugins/":[26057,45642,23247,60815,16304,70593],"./plugins/index":[26057,45642,23247,60815,16304,70593],"./plugins/index.tsx":[26057,45642,23247,60815,16304,70593],"./plugins/plugin":[18596,45642,23247,60815,16304,28336,1820,32125,9886,70712,29575],"./plugins/plugin.tsx":[18596,45642,23247,60815,16304,28336,1820,32125,9886,70712,29575],"./plugins/repositories":[60159,45642,23247,60815,81771,16304,9886,46390],"./plugins/repositories.tsx":[60159,45642,23247,60815,81771,16304,9886,46390],"./routes":[7603],"./routes.tsx":[7603],"./settings":[78963,45642,23247,60815,81771,16304,26472],"./settings/":[78963,45642,23247,60815,81771,16304,26472],"./settings/index":[78963,45642,23247,60815,81771,16304,26472],"./settings/index.tsx":[78963,45642,23247,60815,81771,16304,24357],"./tasks":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/index":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/index.tsx":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/task":[1625,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,19199],"./tasks/task.tsx":[1625,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,19199],"./users":[27239,23247,1270,58809],"./users/":[27239,23247,1270,58809],"./users/access":[61726,23247,97636],"./users/access.tsx":[61726,23247,97636],"./users/add":[35175,23247,99075],"./users/add.tsx":[35175,23247,99075],"./users/index":[27239,23247,1270,58809],"./users/index.tsx":[27239,23247,1270,58809],"./users/parentalcontrol":[78304,45642,23247,97200],"./users/parentalcontrol.tsx":[78304,45642,23247,97200],"./users/password":[19715,38245],"./users/password.tsx":[19715,38245],"./users/profile":[71005,18373],"./users/profile.tsx":[71005,18373]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=38601,e.exports=i},38783:function(e,t,n){"use strict";var r;n.d(t,{Q:function(){return r}}),function(e){e.MediaPlayer="mediaplayer",e.PreplayIntercept="preplayintercept",e.Screensaver="screensaver",e.SyncPlay="syncplay"}(r||(r={}))},38829:function(e,t,n){"use strict";n.d(t,{X:function(){return L}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(14382),n(76281),n(44962),n(17731),n(26448),n(4754),n(10849),n(70389),n(94),n(36947),n(26437),n(52697),n(78557),n(90076),n(99425),n(83994),n(90580),n(82367);var r=n(44797),i=n(5898),o=n(8566),a=n(90381),s=n(39738),l=n(22622),u=n(70267),c=n(38490),d=n(71866),f=n(47602),p=n(67430),m=n(89100);function y(e){return y="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},y(e)}function v(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return h(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(h(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,h(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,h(d,"constructor",u),h(u,"constructor",l),l.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(d),h(d,i,"Generator"),h(d,r,(function(){return this})),h(d,"toString",(function(){return"[object Generator]"})),(v=function(){return{w:o,m:f}})()}function h(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}h=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){h(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},h(e,t,n,r)}function g(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){g(o,r,i,a,s,"next",e)}function s(e){g(o,r,i,a,s,"throw",e)}a(void 0)}))}}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function A(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function x(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var w=(new Date).getTime(),P=new WeakSet,k=function(){return e=function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,P),t=this,r=[],(n=A(n="pluginsList"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r},t=[{key:"plugins",get:function(){return this.pluginsList}},{key:"loadPlugin",value:(y=b(v().m((function e(t){var y,h,g,b,S;return v().w((function(e){for(;;)switch(e.n){case 0:if("string"!=typeof t){e.n=8;break}if(!(t in window)){e.n=5;break}return console.log("Loading plugin (via window): ".concat(t)),e.n=1,window[t];case 1:if("function"==typeof(h=e.v)){e.n=2;break}throw new TypeError("Plugin definitions in window have to be an (async) function returning the plugin class");case 2:return e.n=3,h();case 3:if("function"==typeof(g=e.v)){e.n=4;break}throw new TypeError("Plugin definition doesn't return a class for '".concat(t,"'"));case 4:y=new g({events:r.A,loading:o.Ay,appSettings:a.A,playbackManager:s.f,globalize:i.Ay,appHost:l.g,appRouter:u.appRouter,inputManager:c,toast:d.A,confirm:f.A,dashboard:m,ServerConnections:p.tF}),e.n=7;break;case 5:return console.debug("Loading plugin (via dynamic import): ".concat(t)),e.n=6,n(11167)("./".concat(t));case 6:b=e.v,y=new b.default;case 7:e.n=11;break;case 8:if(!t.then){e.n=10;break}return console.debug("Loading plugin (via promise/async function)"),e.n=9,t;case 9:S=e.v,y=new S.default,e.n=11;break;case 10:throw new TypeError("Plugins have to be a Promise that resolves to a plugin builder function");case 11:return e.a(2,x(P,this,C).call(this,t,y))}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"ofType",value:function(e){return this.pluginsList.filter((function(t){return t.type===e}))}},{key:"firstOfType",value:function(e){return this.ofType(e).sort((function(e,t){return(e.priority||0)-(t.priority||0)}))[0]}},{key:"mapPath",value:function(e,t,n){"string"==typeof e&&(e=this.pluginsList.filter((function(t){return(t.id||t.packageName)===e}))[0]);var r=e.baseUrl+"/"+t;return n&&(r+=r.includes("?")?"&":"?",r+="v="+w),r}}],t&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,y}();function I(e){var t=e.getTranslations?e.getTranslations():[];return i.Ay.loadStrings({name:e.id||e.packageName,strings:t})}function j(e){return T.apply(this,arguments)}function T(){return(T=b(v().m((function e(t){return v().w((function(e){for(;;)switch(e.n){case 0:if(x(P,this,_).call(this,t),"skin"!==t.type){e.n=1;break}return e.a(2,t);case 1:return e.a(2,x(P,this,I).call(this,t));case 2:return e.a(2)}}),e,this)})))).apply(this,arguments)}function C(e,t){return E.apply(this,arguments)}function E(){return(E=b(v().m((function e(t,n){var r;return v().w((function(e){for(;;)switch(e.n){case 0:if("string"!=typeof t){e.n=2;break}if(!this.plugins.filter((function(e){return e.id===n.id}))[0]){e.n=1;break}return e.a(2,t);case 1:n.installUrl=t,r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),n.baseUrl=t.substring(0,r);case 2:return e.a(2,x(P,this,j).call(this,n))}}),e,this)})))).apply(this,arguments)}function _(e){this.pluginsList.push(e),r.A.trigger(this,"registered",[e])}var L=new k},39244:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_ADMIN_ROUTES:function(){return i}});var r=n(19373),i=[{path:"",type:r.u.Dashboard},{path:"activity",type:r.u.Dashboard},{path:"backups",type:r.u.Dashboard},{path:"branding",type:r.u.Dashboard},{path:"devices",type:r.u.Dashboard},{path:"settings",type:r.u.Dashboard},{path:"keys",type:r.u.Dashboard},{path:"libraries",type:r.u.Dashboard},{path:"libraries/display",type:r.u.Dashboard},{path:"libraries/metadata",type:r.u.Dashboard},{path:"libraries/nfo",type:r.u.Dashboard},{path:"livetv",type:r.u.Dashboard},{path:"livetv/recordings",type:r.u.Dashboard},{path:"logs",type:r.u.Dashboard},{path:"logs/:file",page:"logs/file",type:r.u.Dashboard},{path:"playback/resume",type:r.u.Dashboard},{path:"playback/streaming",type:r.u.Dashboard},{path:"playback/transcoding",type:r.u.Dashboard},{path:"playback/trickplay",type:r.u.Dashboard},{path:"plugins",type:r.u.Dashboard},{path:"plugins/:pluginId",page:"plugins/plugin",type:r.u.Dashboard},{path:"plugins/repositories",type:r.u.Dashboard},{path:"tasks",type:r.u.Dashboard},{path:"tasks/:id",page:"tasks/task",type:r.u.Dashboard},{path:"users",type:r.u.Dashboard},{path:"users/access",type:r.u.Dashboard},{path:"users/add",type:r.u.Dashboard},{path:"users/parentalcontrol",type:r.u.Dashboard},{path:"users/password",type:r.u.Dashboard},{path:"users/profile",type:r.u.Dashboard}]},39603:function(e,t,n){n(64251),function(e){"use strict";try{new e.KeyboardEvent("event",{bubbles:!0,cancelable:!0})}catch(r){var t=e.Event,n=function(e,t){t=t||{};var n=new Event(e,{bubbles:!!t.bubbles,cancelable:!!t.cancelable});return n.view=t.view||document.defaultView,n.key=t.key||t.keyIdentifier||"",n.keyCode=t.keyCode||0,n.code=t.code||"",n.charCode=t.charCode||0,n.char=t.char||"",n.which=t.which||0,n.location=t.location||t.keyLocation||0,n.ctrlKey=!!t.ctrlKey,n.altKey=!!t.altKey,n.shiftKey=!!t.shiftKey,n.metaKey=!!t.metaKey,n.repeat=!!t.repeat,n};n.prototype=t.prototype,e.KeyboardEvent=n}}(window)},39641:function(e,t,n){"use strict";n(69703),n(78557),n(90076);var r,i=n(44797),o=n(71286),a=n(51876);function s(){return(0,a.$D)()}t.A={getThemes:s,setTheme:function(e){return new Promise((function(t){r&&r===e?t():function(e){return s().then((function(t){var n;return e&&(n=t.find((function(t){return t.id===e}))),n||(n=(0,a.x0)()),n}))}(e).then((function(e){r&&r===e.id?t():(r=e.id,document.documentElement.setAttribute("data-theme",e.id),document.getElementById("themeColor").content=e.color,i.A.trigger(document,o.B.THEME_CHANGE,[e.id]))}))}))}}},39738:function(e,t,n){"use strict";n.d(t,{f:function(){return st}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(24776),n(14382),n(64771),n(69892),n(76281),n(84734),n(44962),n(86584),n(89336),n(26448),n(25352),n(4754),n(10849),n(70389),n(94),n(77575),n(33087),n(36947),n(36457),n(88908),n(26437),n(83810),n(52697),n(78557),n(96054),n(90076),n(646),n(95021),n(73687),n(99425),n(83994),n(93062),n(64062),n(23630),n(82367);var r=n(11444),i=n(92426),o=n(77612),a=n(45251),s=n(15122),l=n(74180),u=n(45950),c=n(35222),d=n(44797),f=n(98320),p=n(90381),m=n(23648),y=n(38829),v=(n(74576),n(58953));function h(e){return h="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},h(e)}function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function A(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}var x=0;function w(e){e.PlaylistItemId||(e.PlaylistItemId="playlistItem"+x,x++)}function P(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].PlaylistItemId===e)return n;return-1}var k,I=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._sortedPlaylist=[],this._playlist=[],this._repeatMode="RepeatNone",this._shuffleMode="Sorted"},t=[{key:"getPlaylist",value:function(){return this._playlist.slice(0)}},{key:"setPlaylist",value:function(e){for(var t=0,n=(e=e.slice(0)).length;t<n;t++)w(e[t]);this._currentPlaylistItemId=null,this._playlist=e,this._repeatMode="RepeatNone"}},{key:"queue",value:function(e){for(var t=0,n=e.length;t<n;t++)w(e[t]),this._playlist.push(e[t])}},{key:"shufflePlaylist",value:function(){this._sortedPlaylist=[];var e,t=g(this._playlist);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._sortedPlaylist.push(n)}}catch(e){t.e(e)}finally{t.f()}for(var r=this._playlist.splice(this.getCurrentPlaylistIndex(),1)[0],i=this._playlist.length-1;i>0;i--){var o=(0,v.HO)(0,i-1),a=this._playlist[i];this._playlist[i]=this._playlist[o],this._playlist[o]=a}this._playlist.unshift(r),this._shuffleMode="Shuffle"}},{key:"sortShuffledPlaylist",value:function(){this._playlist=[];var e,t=g(this._sortedPlaylist);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._playlist.push(n)}}catch(e){t.e(e)}finally{t.f()}this._sortedPlaylist=[],this._shuffleMode="Sorted"}},{key:"clearPlaylist",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._playlist.splice(this.getCurrentPlaylistIndex(),1)[0];this._playlist=[],e||this._playlist.push(t)}},{key:"queueNext",value:function(e){for(var t=0,n=e.length;t<n;t++)w(e[t]);var r,i,o,a=this.getCurrentPlaylistIndex();-1===a?a=this._playlist.length:a++,r=this._playlist,i=e,(o=[]).push(a),o.push(0),o=o.concat(i),r.splice.apply(r,o)}},{key:"getCurrentPlaylistIndex",value:function(){return P(this.getCurrentPlaylistItemId(),this._playlist)}},{key:"getCurrentItem",value:function(){var e=P(this.getCurrentPlaylistItemId(),this._playlist);return-1===e?null:this._playlist[e]}},{key:"getCurrentPlaylistItemId",value:function(){return this._currentPlaylistItemId}},{key:"setPlaylistState",value:function(e){this._currentPlaylistItemId=e}},{key:"setPlaylistIndex",value:function(e){e<0?this.setPlaylistState(null):this.setPlaylistState(this._playlist[e].PlaylistItemId)}},{key:"removeFromPlaylist",value:function(e){if(this._playlist.length<=e.length)return{result:"empty"};var t=this.getCurrentPlaylistItemId(),n=-1!==e.indexOf(t);return this._sortedPlaylist=this._sortedPlaylist.filter((function(t){return!e.includes(t.PlaylistItemId)})),this._playlist=this._playlist.filter((function(t){return!e.includes(t.PlaylistItemId)})),{result:"removed",isCurrentIndex:n}}},{key:"movePlaylistItem",value:function(e,t){for(var n,r,i,o,a=this.getPlaylist(),s=0,l=a.length;s<l;s++)if(a[s].PlaylistItemId===e){n=s;break}if(-1===n||n===t)return{result:"noop"};if(t>=a.length)throw new Error("newIndex out of bounds");return i=n,o=t,(r=a).splice(o,0,r.splice(i,1)[0]),this._playlist=a,{result:"moved",playlistItemId:e,newIndex:t}}},{key:"reset",value:function(){this._sortedPlaylist=[],this._playlist=[],this._currentPlaylistItemId=null,this._repeatMode="RepeatNone",this._shuffleMode="Sorted"}},{key:"setRepeatMode",value:function(e){if(!["RepeatOne","RepeatAll","RepeatNone"].includes(e))throw new TypeError("invalid value provided for setRepeatMode");this._repeatMode=e}},{key:"getRepeatMode",value:function(){return this._repeatMode}},{key:"setShuffleMode",value:function(e){switch(e){case"Shuffle":this.shufflePlaylist();break;case"Sorted":this.sortShuffledPlaylist();break;default:throw new TypeError("invalid value provided to setShuffleMode")}}},{key:"toggleShuffleMode",value:function(){switch(this._shuffleMode){case"Shuffle":this.setShuffleMode("Sorted");break;case"Sorted":this.setShuffleMode("Shuffle");break;default:throw new TypeError("current value for shufflequeue is invalid")}}},{key:"getShuffleMode",value:function(){return this._shuffleMode}},{key:"getNextItemInfo",value:function(){var e,t=this.getPlaylist(),n=t.length;switch(this.getRepeatMode()){case"RepeatOne":e=this.getCurrentPlaylistIndex();break;case"RepeatAll":(e=this.getCurrentPlaylistIndex()+1)>=n&&(e=0);break;default:e=this.getCurrentPlaylistIndex()+1}if(e<0||e>=n)return null;var r=t[e];return r?{item:r,index:e}:null}}],t&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),j=I,T=n(82885),C=n(5898),E=n(8566),_=n(22622),L=n(41177),M=n(38783),O=n(53089),R=n(2290),D=n(97067),N=n(57178),F=n(41087),U=n(40806),V=n(10989),B=n(67430),z=n(75384),q=n(73025),H=function(e,t,n){return-1===n?void 0!==e.EndTicks&&e.EndTicks<=t:void 0!==e.StartTicks&&e.StartTicks>t},G=function(e,t){return void 0!==e.StartTicks&&e.StartTicks<=t&&(void 0===e.EndTicks||e.EndTicks>t)};!function(e){e.Pairing="pairing",e.Paired="paired",e.PairError="pairerror",e.PlaybackCancelled="playbackcancelled",e.PlaybackError="playbackerror",e.PlaybackStart="playbackstart",e.PlaybackStop="playbackstop",e.PlayerChange="playerchange",e.ReportPlayback="reportplayback"}(k||(k={}));var W,Y=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Q=function(){function e(e){var t,n,r,i,o,a,s,l,u,c,f,p,m,y,v,h,g,b,S,A,x,w,P,I,j,T,C;this.playbackManager=e,this.playbackManagerEvents=((t={})[k.PlaybackCancelled]=null===(r=this.onPlaybackCancelled)||void 0===r?void 0:r.bind(this),t[k.PlaybackError]=null===(i=this.onPlaybackError)||void 0===i?void 0:i.bind(this),t[k.PlaybackStart]=null===(o=this.onPlaybackStart)||void 0===o?void 0:o.bind(this),t[k.PlaybackStop]=null===(a=this.onPlaybackStop)||void 0===a?void 0:a.bind(this),t[k.PlayerChange]=null===(s=this.onPlayerChange)||void 0===s?void 0:s.bind(this),t[k.ReportPlayback]=null===(l=this.onReportPlayback)||void 0===l?void 0:l.bind(this),t),this.playerEvents=((n={})[N.g.Error]=null===(u=this.onPlayerError)||void 0===u?void 0:u.bind(this),n[N.g.FullscreenChange]=null===(c=this.onPlayerFullscreenChange)||void 0===c?void 0:c.bind(this),n[N.g.ItemStarted]=null===(f=this.onPlayerItemStarted)||void 0===f?void 0:f.bind(this),n[N.g.ItemStopped]=null===(p=this.onPlayerItemStopped)||void 0===p?void 0:p.bind(this),n[N.g.MediaStreamsChange]=null===(m=this.onPlayerMediaStreamsChange)||void 0===m?void 0:m.bind(this),n[N.g.Pause]=null===(y=this.onPlayerPause)||void 0===y?void 0:y.bind(this),n[N.g.PlaybackStart]=null===(v=this.onPlayerPlaybackStart)||void 0===v?void 0:v.bind(this),n[N.g.PlaybackStop]=null===(h=this.onPlayerPlaybackStop)||void 0===h?void 0:h.bind(this),n[N.g.PlaylistItemAdd]=null===(g=this.onPlayerPlaylistItemAdd)||void 0===g?void 0:g.bind(this),n[N.g.PlaylistItemMove]=null===(b=this.onPlayerPlaylistItemMove)||void 0===b?void 0:b.bind(this),n[N.g.PlaylistItemRemove]=null===(S=this.onPlayerPlaylistItemRemove)||void 0===S?void 0:S.bind(this),n[N.g.PromptSkip]=null===(A=this.onPromptSkip)||void 0===A?void 0:A.bind(this),n[N.g.RepeatModeChange]=null===(x=this.onPlayerRepeatModeChange)||void 0===x?void 0:x.bind(this),n[N.g.ShuffleModeChange]=null===(w=this.onPlayerShuffleModeChange)||void 0===w?void 0:w.bind(this),n[N.g.StateChange]=null===(P=this.onPlayerStateChange)||void 0===P?void 0:P.bind(this),n[N.g.Stopped]=null===(I=this.onPlayerStopped)||void 0===I?void 0:I.bind(this),n[N.g.TimeUpdate]=null===(j=this.onPlayerTimeUpdate)||void 0===j?void 0:j.bind(this),n[N.g.Unpause]=null===(T=this.onPlayerUnpause)||void 0===T?void 0:T.bind(this),n[N.g.VolumeChange]=null===(C=this.onPlayerVolumeChange)||void 0===C?void 0:C.bind(this),n),Object.entries(this.playbackManagerEvents).forEach((function(t){var n=Y(t,2),r=n[0],i=n[1];i&&d.A.on(e,r,i)})),this.bindPlayerEvents(),d.A.on(e,k.PlayerChange,this.bindPlayerEvents.bind(this))}return e.prototype.bindPlayerEvents=function(){var e=this,t=this.playbackManager.getCurrentPlayer();this.player!==t&&(this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=Y(t,2),r=n[0],i=n[1];i&&d.A.off(e.player,r,i)})),this.player=t,this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=Y(t,2),r=n[0],i=n[1];i&&d.A.on(e.player,r,i)})))},e}(),K=n(94738),J=(W=function(e,t){return W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},W(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),X=function(e){function t(){var t=e.apply(this,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(arguments),!1))||this;return t.hasSegments=!1,t.isLastSegmentIgnored=!1,t.lastSegmentIndex=0,t.lastTime=-1,t.mediaSegments=[],t}return J(t,e),t.prototype.fetchMediaSegments=function(e,t,n){return r=this,i=void 0,a=function(){var r,i;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,(0,U.l)(e).getItemSegments({itemId:t,includeSegmentTypes:n})];case 1:return r=o.sent().data,this.mediaSegments=r.Items||[],[3,3];case 2:return i=o.sent(),console.error("[MediaSegmentManager] failed to fetch segments",i),this.mediaSegments=[],[3,3];case 3:return[2]}}))},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}l((a=a.apply(r,i||[])).next())}));var r,i,o,a},t.prototype.skipSegment=function(e){if(void 0!==e.StartTicks&&this.lastTime>e.StartTicks)console.info("[MediaSegmentManager] ignoring skipping segment that has been seeked back into",e),this.isLastSegmentIgnored=!0;else if(e.EndTicks){if(e.StartTicks&&e.EndTicks-e.StartTicks<V.wi)return console.info("[MediaSegmentManager] ignoring skipping segment with duration <1s",e),void(this.isLastSegmentIgnored=!0);console.debug("[MediaSegmentManager] skipping to %s ms",e.EndTicks/V.Jb),this.playbackManager.seek(e.EndTicks,this.player)}else console.debug("[MediaSegmentManager] skipping to next item in queue"),this.playbackManager.nextTrack(this.player)},t.prototype.promptToSkip=function(e){if(e.StartTicks&&e.EndTicks&&e.EndTicks-e.StartTicks<3*V.wi)return console.info("[MediaSegmentManager] ignoring segment prompt with duration <3s",e),void(this.isLastSegmentIgnored=!0);this.playbackManager.promptToSkip(e)},t.prototype.performAction=function(e){if(this.mediaSegmentTypeActions&&e.Type&&this.mediaSegmentTypeActions[e.Type]){var t=this.mediaSegmentTypeActions[e.Type];t===K.M.Skip?this.skipSegment(e):t===K.M.AskToSkip&&this.promptToSkip(e)}else console.error("[MediaSegmentManager] segment type missing from action map",e,this.mediaSegmentTypeActions)},t.prototype.onPlayerPlaybackStart=function(e,t){var n,r,i,o;this.isLastSegmentIgnored=!1,this.lastSegmentIndex=0,this.lastTime=-1,this.hasSegments=!!(null===(n=t.MediaSource)||void 0===n?void 0:n.HasSegments);var a=null===(r=t.MediaSource)||void 0===r?void 0:r.Id,s=(null===(i=t.NowPlayingItem)||void 0===i?void 0:i.ServerId)||(null===(o=B.tF.currentApiClient())||void 0===o?void 0:o.serverId());if(this.hasSegments&&s&&a)if(this.mediaSegmentTypeActions=Object.values(F.w).map((function(e){return{type:e,action:(0,q._)(T.currentSettings,e)}})).filter((function(e){var t=e.action;return!!t&&t!==K.M.None})).reduce((function(e,t){var n=t.type,r=t.action;return r&&(e[n]=r),e}),{}),Object.keys(this.mediaSegmentTypeActions).length){var l=(0,z.C)(B.tF.getApiClient(s));this.fetchMediaSegments(l,a,Object.keys(this.mediaSegmentTypeActions).map((function(e){return e})))}else console.info("[MediaSegmentManager] user has no media segment actions enabled")},t.prototype.onPlayerTimeUpdate=function(){if(this.hasSegments&&this.mediaSegments.length){var e=this.playbackManager.currentTime(this.player)*V.Jb,t=function(e,t,n){void 0===n&&(n=0);var r=e[n];if(G(r,t))return{index:n,segment:r};var i=1;n>0&&r.StartTicks&&r.StartTicks>t&&(i=-1);for(var o=n,a=e[o];o>=0&&o<e.length;a=e[o+=i]){if(H(a,t,i))return;if(G(a,t))return{index:o,segment:a}}}(this.mediaSegments,e,this.lastSegmentIndex);!t||this.isLastSegmentIgnored&&this.lastSegmentIndex===t.index||(console.debug("[MediaSegmentManager] found %s segment at %s ms",t.segment.Type,e/V.Jb,t),this.isLastSegmentIgnored=!1,this.performAction(t.segment),this.lastSegmentIndex=t.index),this.lastTime=e}},t}(Q),$=function(e){return new X(e)},Z=n(31524),ee=n(50921),te=n(34789),ne=n(13615),re=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ie=[96,128,192,256,384,512],oe="mediaSession"in navigator,ae=!!window.NativeShell,se=function(e){var t=[];return ie.forEach((function(n){var r=(0,Z.V)(e,{height:n});r&&t.push({src:r,sizes:"".concat(n,"x").concat(n)})})),t},le=function(){oe?navigator.mediaSession.metadata=null:ae&&ne.A.hideMediaSession()},ue=function(e){function t(t){var n=e.call(this,t)||this;return le(),oe&&n.bindNavigatorSession(),n}return re(t,e),t.prototype.bindNavigatorSession=function(){var e,t,n=["pause","play","previoustrack","nexttrack","stop","seekto"];te.A.iOS||n.push("seekbackward","seekforward");try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),i=r.next();!i.done;i=r.next()){var o=i.value;try{navigator.mediaSession.setActionHandler(o,this.onMediaSessionAction.bind(this))}catch(e){console.warn('[MediaSessionSubscriber] Failed to add "'.concat(o,'" action handler'),e)}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype.onMediaSessionAction=function(e){switch(e.action){case"pause":return this.playbackManager.pause(this.player);case"play":return this.playbackManager.unpause(this.player);case"stop":return this.playbackManager.stop(this.player);case"seekbackward":return this.playbackManager.rewind(this.player);case"seekforward":return this.playbackManager.fastForward(this.player);case"seekto":return this.playbackManager.seekMs((e.seekTime||0)*V.If,this.player);case"previoustrack":return this.playbackManager.previousTrack(this.player);case"nexttrack":return this.playbackManager.nextTrack(this.player);default:console.info("[MediaSessionSubscriber] Unhandled media session action",e)}},t.prototype.onMediaSessionUpdate=function(e,t){var n,r=e.type;void 0===t&&(t=this.playbackManager.getPlayerState(this.player));var i=t.NowPlayingItem;if(!i)return console.debug("[MediaSessionSubscriber] no now playing item; resetting media session",t),le();var o=i.MediaType===a.z.Video,s=!!(null===(n=this.player)||void 0===n?void 0:n.isLocalPlayer);if(s&&o)console.debug("[MediaSessionSubscriber] ignoring local player update");else{var l=i.Album||void 0,u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,ee.Y)(i,!1)||[],2),c=u[0],d=u[1],f=d||c,p=d&&c;oe?navigator.mediaSession.metadata&&navigator.mediaSession.metadata.album===l&&navigator.mediaSession.metadata.artist===f&&navigator.mediaSession.metadata.title===p||(navigator.mediaSession.metadata=new MediaMetadata({title:p,artist:f,album:l,artwork:se(i)})):ne.A.updateMediaSession({action:r,isLocalPlayer:s,itemId:i.Id,title:p,artist:f,album:l,duration:i.RunTimeTicks?Math.round(i.RunTimeTicks/V.Jb):0,position:t.PlayState.PositionTicks?Math.round(t.PlayState.PositionTicks/V.Jb):0,imageUrl:(0,Z.V)(i,{maxHeight:3e3}),canSeek:!!t.PlayState.CanSeek,isPaused:!!t.PlayState.IsPaused})}},t.prototype.onPlayerChange=function(){this.onMediaSessionUpdate({type:"timeupdate"})},t.prototype.onPlayerPause=function(e){this.onMediaSessionUpdate(e)},t.prototype.onPlayerPlaybackStart=function(e,t){this.onMediaSessionUpdate(e,t)},t.prototype.onPlayerPlaybackStop=function(){le()},t.prototype.onPlayerStateChange=function(e,t){this.onMediaSessionUpdate(e,t)},t.prototype.onPlayerUnpause=function(e){this.onMediaSessionUpdate(e)},t}(Q),ce=n(97339),de=n(80262);function fe(e){return"NotSupportedError"===(null==e?void 0:e.name)?de.F.MEDIA_NOT_SUPPORTED:de.F.PLAYER_ERROR}var pe=n(71286),me=n(36300),ye=n(9164),ve=n(46782),he=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function ge(){if(this){if(document.activeElement===this){this.blur();var e=document.querySelector(".btnPause");e&&ye.A.isCurrentlyFocusable(e)&&ye.A.focus(e)}this.classList.add("hide")}}var be=function(e){function t(t){var n=e.call(this,t)||this;return n.skipElement=null,n.onOsdChanged=n.onOsdChanged.bind(n),n}return he(t,e),t.prototype.createSkipElement=function(){var e=this;!this.skipElement&&this.currentSegment&&(document.body.insertAdjacentHTML("beforeend",'<div class="skip-button-container"><button is="emby-button" class="skip-button hide skip-button-hidden"></button></div>'),this.skipElement=document.body.querySelector(".skip-button"),this.skipElement&&this.skipElement.addEventListener("click",(function(){var t,n=e.playbackManager.currentTime()*V.Jb;(null===(t=e.currentSegment)||void 0===t?void 0:t.EndTicks)&&(n<e.currentSegment.EndTicks-V.wi?e.playbackManager.seek(e.currentSegment.EndTicks):e.hideSkipButton())})))},t.prototype.setButtonText=function(){this.skipElement&&this.currentSegment&&(this.skipElement.innerHTML=C.Ay.translate("MediaSegmentSkipPrompt",C.Ay.translate("MediaSegmentType.".concat(this.currentSegment.Type))),this.skipElement.innerHTML+='<span class="material-icons skip_next" aria-hidden="true"></span>')},t.prototype.showSkipButton=function(e){var t=this,n=this.skipElement;if(n){this.clearHideTimeout(),me.Ay.removeEventListener(n,me.Ay.whichTransitionEvent(),ge,{once:!0}),n.classList.remove("hide"),e.animate?n.classList.remove("no-transition"):n.classList.add("no-transition"),n.offsetWidth;var r=document.activeElement&&ye.A.isCurrentlyFocusable(document.activeElement);e.focus&&!r&&ye.A.focus(n),requestAnimationFrame((function(){n.classList.remove("skip-button-hidden"),e.keep||(t.hideTimeout=setTimeout(t.hideSkipButton.bind(t),8e3))}))}},t.prototype.hideSkipButton=function(){var e=this.skipElement;e&&(e.classList.remove("no-transition"),e.offsetWidth,requestAnimationFrame((function(){e.classList.add("skip-button-hidden"),me.Ay.addEventListener(e,me.Ay.whichTransitionEvent(),ge,{once:!0})})))},t.prototype.clearHideTimeout=function(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)},t.prototype.onOsdChanged=function(e,t){this.currentSegment&&(t?this.showSkipButton({animate:!1,keep:!0,focus:!1}):this.hideTimeout||this.hideSkipButton())},t.prototype.onPromptSkip=function(e,t){this.player&&null!=t.EndTicks&&t.EndTicks>=this.playbackManager.currentItem(this.player).RunTimeTicks&&this.playbackManager.getNextItem()&&T.enableNextVideoInfoOverlay()||this.currentSegment||(this.currentSegment=t,this.createSkipElement(),this.setButtonText(),this.showSkipButton({animate:!0,focus:ve.A.tv}))},t.prototype.onPlayerTimeUpdate=function(){if(this.currentSegment){var e=this.playbackManager.currentTime(this.player)*V.Jb;G(this.currentSegment,e)||(this.currentSegment=null,this.hideSkipButton())}},t.prototype.onPlayerChange=function(){this.playbackManager.getCurrentPlayer()&&(d.A.off(document,pe.B.SHOW_VIDEO_OSD,this.onOsdChanged),d.A.on(document,pe.B.SHOW_VIDEO_OSD,this.onOsdChanged))},t.prototype.onPlaybackStop=function(e,t){this.currentSegment=null,this.hideSkipButton(),t.nextItem||d.A.off(document,pe.B.SHOW_VIDEO_OSD,this.onOsdChanged)},t}(Q);function Se(e){return Se="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},Se(e)}function Ae(e){return function(e){if(Array.isArray(e))return je(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ie(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return we(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(we(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,we(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,we(d,"constructor",u),we(u,"constructor",l),l.displayName="GeneratorFunction",we(u,i,"GeneratorFunction"),we(d),we(d,i,"Generator"),we(d,r,(function(){return this})),we(d,"toString",(function(){return"[object Generator]"})),(xe=function(){return{w:o,m:f}})()}function we(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}we=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){we(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},we(e,t,n,r)}function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Ie(e,t)||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.")}()}function ke(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ie(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ie(e,t){if(e){if("string"==typeof e)return je(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Ce(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Ee(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ce(o,r,i,a,s,"next",e)}function s(e){Ce(o,r,i,a,s,"throw",e)}a(void 0)}))}}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Me(e,t,n){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e){var t=function(e){if("object"!=Se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}function Re(e){return!e.getPlaylist&&e.isLocalPlayer}function De(e){return e.isLocalPlayer&&_.g.supports(ce.Y.PhysicalVolumeControl)}function Ne(e,t,n,r,i,o,a){if(i){var s=Object.assign({},t.PlayState);s.ItemId=t.NowPlayingItem.Id,a&&(s.EventName=a),r&&function(e,t,n,r){t.NowPlayingQueue=function(e,t){return(t=t||e._currentPlayer)&&!Re(t)?t.getPlaylistSync():e._playQueueManager.getPlaylist()}(e,n).map((function(e){var t={Id:e.Id,PlaylistItemId:e.PlaylistItemId};return e.ServerId!==r&&(t.ServerId=e.ServerId),t}))}(e,s,n,i),B.tF.getApiClient(i)[o](s).then((function(){d.A.trigger(e,"reportplayback",[!0])}))}else d.A.trigger(e,"reportplayback",[!1])}function Fe(e){return e.toLowerCase().replace(" ","")}function Ue(e,t){var n=B.tF.getApiClient(e);if(t.Ids&&1===t.Ids.split(",").length){var r=t.Ids.split(",");return n.getItem(n.getCurrentUserId(),r).then((function(e){return{Items:[e],TotalRecordCount:1}}))}return-1===t.Limit?delete t.Limit:t.Limit=t.Limit||300,t.Fields=["Chapters","Trickplay"],t.ExcludeLocationTypes="Virtual",t.EnableTotalRecordCount=!1,t.CollapseBoxSetItems=!1,(0,R.J)(n,n.getCurrentUserId(),t)}function Ve(e,t){var n,r=(0,u.A)({},e,t),o=(null===(n=r.Filters)||void 0===n?void 0:n.split(","))||[];return o.includes(i.s.IsNotFolder)||o.push(i.s.IsNotFolder),r.Filters=o.join(","),r}function Be(e,t){if(t=(t||"").toLowerCase(),"audio"===e){if("opus"===t)return"audio/ogg";if("webma"===t)return"audio/webm";if("m4a"===t)return"audio/mp4"}else if("video"===e){if("mkv"===t)return"video/x-matroska";if("m4v"===t)return"video/mp4";if("mov"===t)return"video/quicktime";if("mpg"===t)return"video/mpeg";if("flv"===t)return"video/x-flv"}return e+"/"+t}function ze(e,t){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)","i").exec(t);return null==n?"":decodeURIComponent(n[1].replace(/\+/g," "))}function qe(e){return e.isLocalPlayer}function He(e){return!!e.Id}function Ge(e){var t=null,n=null,r=null;return e.CodecProfiles.forEach((function(e){"Audio"===e.Type&&(e.Conditions||[]).forEach((function(e){"LessThanEqual"===e.Condition&&"AudioBitDepth"===e.Property?n=e.Value:"LessThanEqual"===e.Condition&&"AudioSampleRate"===e.Property?t=e.Value:"LessThanEqual"===e.Condition&&"AudioBitrate"===e.Property&&(r=e.Value)}))})),{maxAudioSampleRate:t,maxAudioBitDepth:n,maxAudioBitrate:r}}var We=(new Date).getTime();function Ye(e,t,n,r,i,o){var a="Audio/"+e.Id+"/universal";return We++,r.getUrl(a,{UserId:r.getCurrentUserId(),DeviceId:r.deviceId(),MaxStreamingBitrate:o.maxAudioBitrate||o.maxBitrate,Container:n,TranscodingContainer:t.Container||null,TranscodingProtocol:t.Protocol||null,AudioCodec:t.AudioCodec,MaxAudioSampleRate:o.maxAudioSampleRate,MaxAudioBitDepth:o.maxAudioBitDepth,ApiKey:r.accessToken(),PlaySessionId:We,StartTimeTicks:i||0,EnableRedirection:!0,EnableRemoteMedia:_.g.supports(ce.Y.RemoteAudio),EnableAudioVbrEncoding:t.EnableAudioVbrEncoding})}function Qe(e,t,n,r,i){var o=t.TranscodingProfiles.filter((function(e){return"Audio"===e.Type&&"Streaming"===e.Context}))[0],a="";t.DirectPlayProfiles.forEach((function(e){"Audio"===e.Type&&(a?a+=","+e.Container:a=e.Container,e.AudioCodec&&(a+="|"+e.AudioCodec))}));var s=Ge(t);return Ye(e,o,a,r,i,Le({maxBitrate:n},s))}function Ke(e,t,n,r,i){return function(e,t,n,r,i){var o=t.TranscodingProfiles.filter((function(e){return"Audio"===e.Type&&"Streaming"===e.Context}))[0],a="";t.DirectPlayProfiles.forEach((function(e){"Audio"===e.Type&&(a?a+=","+e.Container:a=e.Container,e.AudioCodec&&(a+="|"+e.AudioCodec))}));for(var s=Ge(t),l=[],u=0,c=e.length;u<c;u++){var d=e[u],f=void 0;"Audio"!==d.MediaType||m.Ay.isLocalItem(d)||(f=Ye(d,o,a,r,i,Le({maxBitrate:n},s))),l.push(f||""),0===u&&(i=0)}return Promise.resolve(l)}(e,t,n,r,i).then((function(t){for(var n=0,r=e.length;n<r;n++){var i=e[n],o=t[n];o&&(i.PresetMediaSource={StreamUrl:o,Id:i.Id,MediaStreams:[],RunTimeTicks:i.RunTimeTicks})}}))}function Je(e,t,n,r,i,o,a){return Xe.apply(this,arguments)}function Xe(){return(Xe=Ee(xe().m((function e(t,n,r,i,o,a,s){var u,c,d,f,y;return xe().w((function(e){for(;;)switch(e.n){case 0:if(m.Ay.isLocalItem(r)||"Audio"!==r.MediaType||t.useServerPlaybackInfoForAudio){e.n=1;break}return e.a(2,{MediaSources:[{StreamUrl:Qe(r,i,s.maxBitrate,n,s.startPosition),Id:r.Id,MediaStreams:[],RunTimeTicks:r.RunTimeTicks}]});case 1:if(!r.PresetMediaSource){e.n=2;break}return e.a(2,{MediaSources:[r.PresetMediaSource]});case 2:return u=r.Id,c={UserId:n.getCurrentUserId(),StartTimeTicks:s.startPosition||0},d=(0,z.C)(n),f=(0,l.n)(d),s.isPlayback?(c.IsPlayback=!0,c.AutoOpenLiveStream=!0):(c.IsPlayback=!1,c.AutoOpenLiveStream=!1),null!=s.audioStreamIndex&&(c.AudioStreamIndex=s.audioStreamIndex),null!=s.subtitleStreamIndex&&(c.SubtitleStreamIndex=s.subtitleStreamIndex),null!=s.secondarySubtitleStreamIndex&&(c.SecondarySubtitleStreamIndex=s.secondarySubtitleStreamIndex),null!=s.enableDirectPlay&&(c.EnableDirectPlay=s.enableDirectPlay),null!=s.enableDirectStream&&(c.EnableDirectStream=s.enableDirectStream),null!=s.allowVideoStreamCopy&&(c.AllowVideoStreamCopy=s.allowVideoStreamCopy),null!=s.allowAudioStreamCopy&&(c.AllowAudioStreamCopy=s.allowAudioStreamCopy),o&&(c.MediaSourceId=o),a&&(c.LiveStreamId=a),s.maxBitrate&&(c.MaxStreamingBitrate=s.maxBitrate),t.enableMediaProbe&&!t.enableMediaProbe(r)&&(c.EnableMediaProbe=!1),!1!==c.EnableDirectStream&&t.supportsPlayMethod&&!t.supportsPlayMethod("DirectStream",r)&&(c.EnableDirectStream=!1),t.getDirectPlayProtocols&&(c.DirectPlayProtocols=t.getDirectPlayProtocols()),c.AlwaysBurnInSubtitleWhenTranscoding=p.A.alwaysBurnInSubtitleWhenTranscoding(),c.DeviceProfile=i,e.n=3,f.getPostedPlaybackInfo({itemId:u,playbackInfoDto:c});case 3:return y=e.v,e.a(2,y.data)}}),e)})))).apply(this,arguments)}function $e(e,t,n){var r="BluRay"===n.VideoType||"Dvd"===n.VideoType||"HdDvd"===n.VideoType;if(n.SupportsDirectPlay||r){if(n.IsRemote&&!_.g.supports(ce.Y.RemoteVideo))return Promise.resolve(!1);if("Http"===n.Protocol&&!n.RequiredHttpHeaders.length)return n.SupportsDirectStream||n.SupportsTranscoding?function(e,t){return e.IsRemote?Promise.resolve(!0):t.getEndpointInfo().then((function(t){if(t.IsInNetwork){if(!t.IsLocal){var n=(e.Path||"").toLowerCase();if(-1!==n.indexOf("localhost")||-1!==n.indexOf("127.0.0.1"))return Promise.resolve(!1)}return Promise.resolve(!0)}return Promise.resolve(!1)}))}(n,e):Promise.resolve(!0)}return Promise.resolve(!1)}function Ze(e,t){return!t.ErrorCode||(et(0,t.ErrorCode===s.V.NoCompatibleStream?"PlaybackErrorNoCompatibleStream":"PlaybackError.".concat(t.ErrorCode)),!1)}function et(e,t){(0,L.A)({text:C.Ay.translate(t),title:C.Ay.translate("HeaderPlaybackError")})}function tt(e){e.fullscreen=!1!==e.fullscreen}function nt(e){return!e.isLocalPlayer}function rt(e,t){return{name:t.name,id:t.id,playerName:t.name,playableMediaTypes:["Audio","Video","Photo","Book"].map(t.canPlayMediaType),isLocalPlayer:t.isLocalPlayer,supportedCommands:e.getSupportedCommands(t)}}function it(e){return e.getTargets?e.getTargets():Promise.resolve([rt(e)])}function ot(e,t){var n=e.isLocalPlayer?0:1,r=t.isLocalPlayer?0:1;return n=n.toString()+e.name,r=r.toString()+t.name,n.localeCompare(r)}var at=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t,i=this,s=[],l=null;this._playNextAfterEnded=!0;var u,v={};function h(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw new Error("player cannot be null");var n=t?U(e).secondarySubtitleStreamIndex:U(e).subtitleStreamIndex;return null==n||-1===n?null:i.getSubtitleStream(e,n)}function g(e){var t=i._currentPlayer;t&&e.id!==t.id||b(null)}function b(e,n){var r=i._currentPlayer,o=t;if(e&&!n&&e.isLocalPlayer&&(n=rt(i,e)),e&&!n)throw new Error("targetInfo cannot be null");l=null,i._currentPlayer=e,t=n,n&&console.debug("Active player: "+JSON.stringify(n)),r&&i.endPlayerUpdates(r),e&&i.beginPlayerUpdates(e),function(e,t,n,r,i){(t||r)&&(n&&i&&n.id===i.id||d.A.trigger(e,"playerchange",[t,n,r]))}(i,e,n,r,o)}function S(e,t){e||(e=B.tF.currentApiClient());var n=e.getSavedEndpointInfo()||{};return p.A.maxStreamingBitrate(n.IsInNetwork,t)}function A(e){return e.DeliveryMethod?e.DeliveryMethod:e.IsExternal?"External":"Embed"}function x(e){if(!e)throw new Error("player cannot be null");return-1!==(U(e).streamInfo.url||"").toLowerCase().indexOf(".m3u8")||(e.seekable?e.seekable():!("Transcode"===i.playMethod(e))&&e.duration())}function w(e,t,n){if(x(e)&&null==n)e.currentTime(parseInt(t/1e4,10));else{n=n||{};var r=U(e).streamInfo.liveStreamId,o=U(e).streamInfo.lastMediaInfoQuery,a=i.playSessionId(e),s=i.currentItem(e);e.getDeviceProfile(s,{isRetry:!1===n.EnableDirectPlay}).then((function(l){var u=null==n.AudioStreamIndex?U(e).audioStreamIndex:n.AudioStreamIndex,c=null==n.SubtitleStreamIndex?U(e).subtitleStreamIndex:n.SubtitleStreamIndex,d=null==n.SecondarySubtitleStreamIndex?U(e).secondarySubtitleStreamIndex:n.SecondarySubtitleStreamIndex,f=i.currentMediaSource(e),p=B.tF.getApiClient(s.ServerId);t&&(t=parseInt(t,10));var m=n.MaxStreamingBitrate||i.getMaxStreamingBitrate(e),y=s.playOptions||{fullscreen:!0},v={maxBitrate:m,startPosition:t,isPlayback:!0,audioStreamIndex:u,subtitleStreamIndex:c,enableDirectPlay:n.EnableDirectPlay,enableDirectStream:n.EnableDirectStream,allowVideoStreamCopy:n.AllowVideoStreamCopy,allowAudioStreamCopy:n.AllowAudioStreamCopy};Je(e,p,s,l,f.Id,r,v).then((function(n){if(Ze(0,n)){f=n.MediaSources[0];var r=Z(p,s.MediaType,s,f,t,e);if(r.fullscreen=y.fullscreen,r.lastMediaInfoQuery=o,r.resetSubtitleOffset=!1,!r.url)return W(),void et(0,"PlaybackError.".concat(de.F.NO_MEDIA_ERROR));U(e).subtitleStreamIndex=c,U(e).secondarySubtitleStreamIndex=d,U(e).audioStreamIndex=u,U(e).maxStreamingBitrate=m,function(e,t,n,r){var i=U(t);i.isChangingStream=!0,i.streamInfo&&n?e.stopActiveEncodings(n).then((function(){var i=function(){e.stopActiveEncodings(n)};P(0,t,r).then(i,i)})):P(0,t,r)}(p,e,a,r)}}))}))}}function P(e,t,n){var r=U(t);return r.streamInfo=n,t.play(n).then((function(){r.isChangingStream=!1,n.started=!0,n.ended=!1,Fe(t,"timeupdate")}),(function(e){r.isChangingStream=!1,ye.call(t,e,{type:fe(e),streamInfo:n})}))}function k(e,t){return I.apply(this,arguments)}function I(){return(I=Ee(xe().m((function e(t,n){var r,i,o,a,s;return xe().w((function(e){for(;;)switch(e.n){case 0:if(t.length){e.n=1;break}return e.a(2,[]);case 1:if(C(t,n),r=t[0],i=r.ServerId,o=n.queryOptions||{},!(a=L(r,i,n,o,t))){e.n=3;break}return e.n=2,a;case 2:return s=e.v,e.a(2,s?s.Items:t);case 3:return e.a(2,t);case 4:return e.a(2)}}),e)})))).apply(this,arguments)}function C(e,t){e.length>1&&null!=t&&t.ids&&e.sort((function(e,n){return t.ids.indexOf(e.Id)-t.ids.indexOf(n.Id)}))}function L(e,t,n,i,s){var l=n.shuffle?o.B.Random:o.B.SortName;switch(e.Type){case r.D.Program:return Ue(t,{Ids:e.ChannelId});case r.D.Playlist:return Ue(t,{ParentId:e.Id,SortBy:n.shuffle?l:void 0});case r.D.MusicArtist:return Ue(t,Ve({ArtistIds:e.Id,Recursive:!0,SortBy:n.shuffle?l:[o.B.Album,o.B.ParentIndexNumber,o.B.IndexNumber,o.B.SortName].join(","),MediaTypes:a.z.Audio},i));case r.D.PhotoAlbum:return Ue(t,Ve({ParentId:e.Id,Recursive:!1,SortBy:l,MediaTypes:a.z.Photo,Limit:-1},i));case r.D.MusicGenre:return Ue(t,Ve({GenreIds:e.Id,Recursive:!0,SortBy:l,MediaTypes:a.z.Audio},i));case r.D.Genre:return Ue(t,Ve({GenreIds:e.Id,ParentId:e.ParentId,Recursive:!0,SortBy:l,MediaTypes:a.z.Video},i));case r.D.Studio:return Ue(t,Ve({StudioIds:e.Id,Recursive:!0,SortBy:l,MediaTypes:a.z.Video},i));case r.D.Person:return Ue(t,Ve({PersonIds:e.Id,ParentId:e.ParentId,Recursive:!0,SortBy:l,MediaTypes:a.z.Video},i));case r.D.Series:case r.D.Season:return function(e,t,n){return F.apply(this,arguments)}(e,n,s);case r.D.Episode:return function(e,t,n){return 1===n.length&&!1!==ne(e,t).supportsProgress?function(e,t){return new Promise((function(n,r){var i=B.tF.getApiClient(e.ServerId),o=e.SeriesId,a=e.Id;o?i.getEpisodes(o,{IsVirtualUnaired:!1,IsMissing:!1,UserId:i.getCurrentUserId(),Fields:["Chapters","Trickplay"],limit:100,startItemId:a}).then((function(r){n(function(e,t,n){var r,i=ke(e.Items.entries());try{for(i.s();!(r=i.n()).done;){var o=Pe(r.value,2),a=o[0];if(o[1].Id===t.Id){e.StartIndex=a;break}}}catch(e){i.e(e)}finally{i.f()}return n.startIndex=e.StartIndex,e.TotalRecordCount=e.Items.length,e}(r,e,t))}),r):n(null)}))}(e,t):null}(e,n,s)}return function(e,t,n,r){if("Photo"===e.MediaType)return Ue(t,Ve({ParentId:e.ParentId,Filters:"IsNotFolder",Recursive:!1,SortBy:n.shuffle?"Random":"SortName",MediaTypes:"Photo,Video",Limit:-1},r)).then((function(t){var r=t.Items.map((function(e){return e.Id})).indexOf(e.Id);return-1===r&&(r=0),n.startIndex=r,Promise.resolve(t)}));if(e.IsFolder&&"homevideos"===e.CollectionType)return Ue(t,Ve({ParentId:e.Id,Filters:"IsNotFolder",Recursive:!0,SortBy:n.shuffle?"Random":"SortName",MediaTypes:"Photo",Limit:-1},r));if(e.IsFolder&&"musicvideos"===e.CollectionType)return Ue(t,Ve({ParentId:e.Id,Filters:"IsFolder",Recursive:!0,SortBy:n.shuffle?"Random":"SortName",MediaTypes:"Video",Limit:-1},r));if(e.IsFolder){var i=null;return n.shuffle?i="Random":"BoxSet"!==e.Type&&(i="music"===e.CollectionType||"Audio"===e.MediaType?"Album,ParentIndexNumber,IndexNumber,SortName":"SortName"),Ue(t,Ve({ParentId:e.Id,Filters:"IsNotFolder",Recursive:!0,SortBy:i,MediaTypes:"Audio,Video"},r))}return null}(e,t,n,i)}function F(){return(F=Ee(xe().m((function e(t,n,r){var i,o,a,s,l,u,c,d,f,p,m,y,v,h,g,b;return xe().w((function(e){for(;;)switch(e.n){case 0:if(i=B.tF.getApiClient(t.ServerId),o="Season"===t.Type?r[n.startIndex||0].Id:void 0,a=o&&1===r.length?o:void 0,s=t.SeriesId||t.Id,l=i.getCurrentUserId(),n.shuffle||a){e.n=2;break}return e.n=1,(0,R.J)(i,l,{SortBy:"SeriesSortName,SortName",SortOrder:"Ascending",IncludeItemTypes:"Episode",Recursive:!0,IsMissing:!1,ParentId:s,limit:1,Filters:"IsUnplayed"});case 1:d=e.v,u=null==d||null===(c=d.Items)||void 0===c||null===(c=c.at(0))||void 0===c?void 0:c.Id;case 2:return e.n=3,i.getEpisodes(s,{IsVirtualUnaired:!1,IsMissing:!1,SeasonId:a,limit:a?void 0:100,SortBy:n.shuffle?"Random":void 0,UserId:l,Fields:["Chapters","Trickplay"],startItemId:u});case 3:if(f=e.v,!n.shuffle){e.n=4;break}f.StartIndex=0,e.n=14;break;case 4:f.StartIndex=void 0,m=ke(f.Items.entries()),e.p=5,m.s();case 6:if((y=m.n()).done){e.n=10;break}if(v=Pe(y.value,2),h=v[0],g=v[1],!o||1==r.length){e.n=8;break}if(g.SeasonId!=o){e.n=7;break}void 0===p&&(p=h),e.n=8;break;case 7:return e.a(3,9);case 8:if(g.UserData.Played){e.n=9;break}return f.StartIndex=h,e.a(3,10);case 9:e.n=6;break;case 10:e.n=12;break;case 11:e.p=11,b=e.v,m.e(b);case 12:return e.p=12,m.f(),e.f(12);case 13:f.StartIndex=f.StartIndex||p||0;case 14:return n.startIndex=f.StartIndex,f.TotalRecordCount=f.Items.length,e.a(2,f)}}),e,null,[[5,11,12,13]])})))).apply(this,arguments)}function U(e){if(!e)throw new Error("player cannot be null");if(!e.name)throw new Error("player name cannot be null");var t=v[e.name];return t||(v[e.name]={},t=v[e.name]),e}function V(e){if(!e)throw new Error("player cannot be null");var t=Math.floor(1e4*e.currentTime());return U(e).streamInfo&&(t+=U(e).streamInfo.transcodingOffsetTicks||0),t}this._playQueueManager=new j,i.currentItem=function(e){if(!e)throw new Error("player cannot be null");if(e.currentItem)return e.currentItem();var t=U(e);return t.streamInfo?t.streamInfo.item:null},i.currentMediaSource=function(e){if(!e)throw new Error("player cannot be null");if(e.currentMediaSource)return e.currentMediaSource();var t=U(e);return t.streamInfo?t.streamInfo.mediaSource:null},i.playMethod=function(e){if(!e)throw new Error("player cannot be null");if(e.playMethod)return e.playMethod();var t=U(e);return t.streamInfo?t.streamInfo.playMethod:null},i.playSessionId=function(e){if(!e)throw new Error("player cannot be null");if(e.playSessionId)return e.playSessionId();var t=U(e);return t.streamInfo?t.streamInfo.playSessionId:null},i.getPlayerInfo=function(){var e=i._currentPlayer;if(!e)return null;var n=t||{};return{name:e.name,isLocalPlayer:e.isLocalPlayer,id:n.id,deviceName:n.deviceName,playableMediaTypes:n.playableMediaTypes,supportedCommands:n.supportedCommands}},i.setActivePlayer=function(e,t){if("localplayer"!==e&&"localplayer"!==e.name){if("string"==typeof e&&(e=s.filter((function(t){return t.name===e}))[0]),!e)throw new Error("null player");b(e,t)}else{var n;if(null!==(n=i._currentPlayer)&&void 0!==n&&n.isLocalPlayer)return;b(null,null)}},i.trySetActivePlayer=function(e,t){if("localplayer"!==e&&"localplayer"!==e.name){if("string"==typeof e&&(e=s.filter((function(t){return t.name===e}))[0]),!e)throw new Error("null player");if(l!==t.id){l=t.id;var n=e.tryPair?e.tryPair(t):Promise.resolve();d.A.trigger(i,"pairing"),n.then((function(){d.A.trigger(i,"paired"),b(e,t)}),(function(){d.A.trigger(i,"pairerror"),l===t.id&&(l=null)}))}}else{var r;null!==(r=i._currentPlayer)&&void 0!==r&&r.isLocalPlayer}},i.getTargets=function(){var e=s.filter(nt).map(it);return Promise.all(e).then((function(e){return e.flat().sort(ot)}))},i.playerHasSecondarySubtitleSupport=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i._currentPlayer;return!!e&&Boolean(e.supports("SecondarySubtitles"))},i.trackHasSecondarySubtitleSupport=function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:i._currentPlayer)||!e)return!1;var t=(e.Codec||"").toLowerCase();return"ssa"!==t&&"ass"!==t&&"External"===A(e)},i.secondarySubtitleTracks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i._currentPlayer;return i.subtitleTracks(e).filter((function(t){return i.trackHasSecondarySubtitleSupport(t,e)}))},i.getSubtitleStream=function(e,t){return i.subtitleTracks(e).filter((function(e){return"Subtitle"===e.Type&&e.Index===t}))[0]},i.getPlaylist=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getPlaylistSync?Promise.resolve(e.getPlaylistSync()):e.getPlaylist():Promise.resolve(i._playQueueManager.getPlaylist())},i.promptToSkip=function(e,t){t=t||i._currentPlayer,e&&this._skipSegment&&d.A.trigger(t,N.g.PromptSkip,[e])},i.isPlaying=function(e){var t,n;return null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.isPlaying?e.isPlaying():null!=(null===(n=e)||void 0===n?void 0:n.currentSrc())},i.isPlayingMediaType=function(e,t){var n;return null!==(n=t=t||i._currentPlayer)&&void 0!==n&&n.isPlaying?t.isPlaying(e):!!i.isPlaying(t)&&U(t).streamInfo.mediaType===e},i.isPlayingLocally=function(e,t){var n;return!(null===(n=t=t||i._currentPlayer)||void 0===n||!n.isLocalPlayer)&&e.filter((function(e){return i.isPlayingMediaType(e,t)})).length>0},i.isPlayingVideo=function(e){return i.isPlayingMediaType("Video",e)},i.isPlayingAudio=function(e){return i.isPlayingMediaType("Audio",e)},i.getPlayers=function(){return s},i.canPlay=function(e){var t=e.Type;if("PhotoAlbum"===t||"MusicGenre"===t||"Season"===t||"Series"===t||"BoxSet"===t||"MusicAlbum"===t||"MusicArtist"===t||"Playlist"===t)return!0;if("Virtual"===e.LocationType&&"Program"!==t)return!1;if("Program"===t){if(!e.EndDate||!e.StartDate)return!1;if((new Date).getTime()>f.Ay.parseISO8601Date(e.EndDate).getTime()||(new Date).getTime()<f.Ay.parseISO8601Date(e.StartDate).getTime())return!1}return null!=ne(e,{fullscreen:!0})},i.toggleAspectRatio=function(e){if(e=e||i._currentPlayer){for(var t=i.getAspectRatio(e),n=i.getSupportedAspectRatios(e),r=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){r=o;break}++r>=n.length&&(r=0),i.setAspectRatio(n[r].id,e)}},i.setAspectRatio=function(e,t){var n;null!==(n=t=t||i._currentPlayer)&&void 0!==n&&n.setAspectRatio&&t.setAspectRatio(e)},i.getSupportedAspectRatios=function(e){var t;return null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getSupportedAspectRatios?e.getSupportedAspectRatios():[]},i.getAspectRatio=function(e){var t;if(null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getAspectRatio)return e.getAspectRatio()},i.increasePlaybackRate=function(e){if(e=e||i._currentPlayer){for(var t=i.getPlaybackRate(e),n=i.getSupportedPlaybackRates(e),r=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){r=o;break}r=Math.min(r+1,n.length-1),i.setPlaybackRate(n[r].id,e)}},i.decreasePlaybackRate=function(e){if(e=e||i._currentPlayer){for(var t=i.getPlaybackRate(e),n=i.getSupportedPlaybackRates(e),r=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){r=o;break}r=Math.max(r-1,0),i.setPlaybackRate(n[r].id,e)}},i.getSupportedPlaybackRates=function(e){var t;return null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getSupportedPlaybackRates?e.getSupportedPlaybackRates():[]},i.setBrightness=function(e,t){(t=t||i._currentPlayer)&&(u||(u=!0,n.e(71454).then(n.bind(n,71454)).then()),t.setBrightness(e))},i.getBrightness=function(e){if(e=e||i._currentPlayer)return e.getBrightness()},i.setVolume=function(e,t){(t=t||i._currentPlayer)&&!De(t)&&t.setVolume(e)},i.getVolume=function(e){return(e=e||i._currentPlayer)&&!De(e)?e.getVolume():1},i.volumeUp=function(e){(e=e||i._currentPlayer)&&!De(e)&&e.volumeUp()},i.volumeDown=function(e){(e=e||i._currentPlayer)&&!De(e)&&e.volumeDown()},i.changeAudioStream=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.changeAudioStream();if(e){for(var t=i.currentMediaSource(e),n=[],r=0,o=t.MediaStreams.length;r<o;r++)"Audio"===t.MediaStreams[r].Type&&n.push(t.MediaStreams[r]);if(!(n.length<=1)){for(var a=i.getAudioStreamIndex(e),s=-1,l=0,u=n.length;l<u;l++)if(n[l].Index===a){s=l;break}var c=s+1;c>=n.length&&(c=0),c=-1===c?-1:n[c].Index,i.setAudioStreamIndex(c,e)}}},i.changeSubtitleStream=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.changeSubtitleStream();if(e){for(var t=i.currentMediaSource(e),n=[],r=0,o=t.MediaStreams.length;r<o;r++)"Subtitle"===t.MediaStreams[r].Type&&n.push(t.MediaStreams[r]);if(n.length){for(var a=i.getSubtitleStreamIndex(e),s=-1,l=0,u=n.length;l<u;l++)if(n[l].Index===a){s=l;break}var c=s+1;c>=n.length&&(c=-1),c=-1===c?-1:n[c].Index,i.setSubtitleStreamIndex(c,e)}}},i.getAudioStreamIndex=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getAudioStreamIndex():U(e).audioStreamIndex},i.setAudioStreamIndex=function(e,t){if((t=t||i._currentPlayer)&&!Re(t))return t.setAudioStreamIndex(e);"Transcode"!==i.playMethod(t)&&t.canSetAudioStreamIndex()?t.getDeviceProfile(i.currentItem(t)).then((function(n){!function(e,t,n){for(var r,i=e.MediaStreams,o=0,a=i.length;o<a;o++)if("Audio"===i[o].Type&&i[o].Index===t){r=i[o];break}if(!r)return!1;var s=e.Container.toLowerCase(),l=(r.Codec||"").toLowerCase();return!!l&&(n.DirectPlayProfiles||[]).some((function(e){return"Video"===e.Type&&(0,O.q)((e.Container||"").toLowerCase(),s)&&(0,O.q)((e.AudioCodec||"").toLowerCase(),l)}))}(i.currentMediaSource(t),e,n)?(w(t,V(t),{AudioStreamIndex:e}),U(t).audioStreamIndex=e):(t.setAudioStreamIndex(e),U(t).audioStreamIndex=e)})):(w(t,V(t),{AudioStreamIndex:e}),U(t).audioStreamIndex=e)},i.getMaxStreamingBitrate=function(e){var t;if(null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getMaxStreamingBitrate)return e.getMaxStreamingBitrate();var n=U(e);if(n.maxStreamingBitrate)return n.maxStreamingBitrate;var r=n.streamInfo?n.streamInfo.mediaType:null,o=i.currentItem(e);return S(o?B.tF.getApiClient(o.ServerId):B.tF.currentApiClient(),r)},i.enableAutomaticBitrateDetection=function(e){var t;if(null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.enableAutomaticBitrateDetection)return e.enableAutomaticBitrateDetection();var n=U(e),r=n.streamInfo?n.streamInfo.mediaType:null,o=i.currentItem(e),a=(o?B.tF.getApiClient(o.ServerId):B.tF.currentApiClient()).getSavedEndpointInfo()||{};return p.A.enableAutomaticBitrateDetection(a.IsInNetwork,r)},i.setMaxStreamingBitrate=function(e,t){var n;if(null!==(n=t=t||i._currentPlayer)&&void 0!==n&&n.setMaxStreamingBitrate)return t.setMaxStreamingBitrate(e);var r=B.tF.getApiClient(i.currentItem(t).ServerId);r.getEndpointInfo().then((function(n){var i,o=U(t),a=o.streamInfo?o.streamInfo.mediaType:null;e.enableAutomaticBitrateDetection?(p.A.enableAutomaticBitrateDetection(n.IsInNetwork,a,!0),i=r.detectBitrate(!0)):(p.A.enableAutomaticBitrateDetection(n.IsInNetwork,a,!1),i=Promise.resolve(e.maxBitrate)),i.then((function(e){p.A.maxStreamingBitrate(n.IsInNetwork,a,e),w(t,V(t),{MaxStreamingBitrate:e})}))}))},i.isFullscreen=function(e){return!(e=e||i._currentPlayer).isLocalPlayer||e.isFullscreen?e.isFullscreen():c.A.isEnabled?c.A.isFullscreen:document.webkitIsFullScreen},i.toggleFullscreen=function(e){if(!(e=e||i._currentPlayer).isLocalPlayer||e.toggleFullscreen)return e.toggleFullscreen();if(c.A.isEnabled)c.A.toggle();else if(document.webkitIsFullScreen&&document.webkitCancelFullscreen)document.webkitCancelFullscreen();else{var t=document.querySelector("video");null!=t&&t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}},i.togglePictureInPicture=function(e){return(e=e||i._currentPlayer).togglePictureInPicture()},i.toggleAirPlay=function(e){return(e=e||i._currentPlayer).toggleAirPlay()},i.getSubtitleStreamIndex=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.getSubtitleStreamIndex();if(!e)throw new Error("player cannot be null");return U(e).subtitleStreamIndex},i.getSecondarySubtitleStreamIndex=function(e){if(!(e=e||i._currentPlayer))throw new Error("player cannot be null");try{if(!Re(e))return e.getSecondarySubtitleStreamIndex()}catch(e){console.error("[playbackmanager] Failed to get secondary stream index:",e)}return U(e).secondarySubtitleStreamIndex},i.setSubtitleStreamIndex=function(e,t){if((t=t||i._currentPlayer)&&!Re(t))return t.setSubtitleStreamIndex(e);var n=h(t),r=i.getSubtitleStream(t,e);if(n||r){var o=-1,a=i.playMethod(t);n&&!r?("Encode"===A(n)||"Embed"===A(n)&&"Transcode"===a)&&w(t,V(t),{SubtitleStreamIndex:-1}):!n&&r?"External"===A(r)||"Embed"===A(r)&&"Transcode"!==a?o=e:w(t,V(t),{SubtitleStreamIndex:e}):n&&r&&("External"===A(r)||"Embed"===A(r)&&"Transcode"!==a?(o=e,"External"!==A(n)&&"Embed"!==A(n)&&w(t,V(t),{SubtitleStreamIndex:-1})):w(t,V(t),{SubtitleStreamIndex:e})),t.setSubtitleStreamIndex(o),-1!==o&&i.trackHasSecondarySubtitleSupport(r)||i.setSecondarySubtitleStreamIndex(-1),U(t).subtitleStreamIndex=e}},i.setSecondarySubtitleStreamIndex=function(e,t){if(t=t||i._currentPlayer,i.playerHasSecondarySubtitleSupport(t)){if(t&&!Re(t))try{return t.setSecondarySubtitleStreamIndex(e)}catch(e){console.error("[playbackmanager] AutoSet - Failed to set secondary track:",e)}var n=h(t,!0),r=i.getSubtitleStream(t,e);if((n||r)&&(!r||i.trackHasSecondarySubtitleSupport(r,t)))try{t.setSecondarySubtitleStreamIndex(e),U(t).secondarySubtitleStreamIndex=e}catch(e){console.error("[playbackmanager] AutoSet - Failed to set secondary track:",e)}}},i.supportSubtitleOffset=function(e){return(e=e||i._currentPlayer)&&"setSubtitleOffset"in e},i.enableShowingSubtitleOffset=function(e){(e=e||i._currentPlayer).enableShowingSubtitleOffset()},i.disableShowingSubtitleOffset=function(e){(e=e||i._currentPlayer).disableShowingSubtitleOffset&&e.disableShowingSubtitleOffset()},i.isShowingSubtitleOffsetEnabled=function(e){return(e=e||i._currentPlayer).isShowingSubtitleOffsetEnabled()},i.isSubtitleStreamExternal=function(e,t){var n=i.getSubtitleStream(t,e);return!!n&&"External"===A(n)},i.setSubtitleOffset=function(e,t){(t=t||i._currentPlayer).setSubtitleOffset&&t.setSubtitleOffset(e)},i.getPlayerSubtitleOffset=function(e){if((e=e||i._currentPlayer).getSubtitleOffset)return e.getSubtitleOffset()},i.canHandleOffsetOnCurrentSubtitle=function(e){var t=i.getSubtitleStreamIndex(e);return-1!==t&&i.isSubtitleStreamExternal(t,e)},i.seek=function(e,t){if(e=Math.max(0,e),(t=t||i._currentPlayer)&&!Re(t))return t.seek(e);w(t,e)},i.seekRelative=function(e,t){if((t=t||i._currentPlayer)&&!Re(t)&&t.seekRelative)return t.seekRelative(n);var n=V(t)+e;return this.seek(n,t)},i.translateItemsForPlayback=k,i.getItemsForPlayback=Ue,i.play=function(){var e=Ee(xe().m((function e(t){var n,r,o;return xe().w((function(e){for(;;)switch(e.n){case 0:if(tt(t),!i._currentPlayer){e.n=2;break}if(!1!==t.enableRemotePlayers||i._currentPlayer.isLocalPlayer){e.n=1;break}throw new Error("Remote players are disabled");case 1:if(i._currentPlayer.isLocalPlayer){e.n=2;break}return e.a(2,i._currentPlayer.play(t));case 2:if(t.fullscreen&&E.Ay.show(),n=t.items){e.n=5;break}if(t.serverId){e.n=3;break}throw new Error("serverId required!");case 3:return e.n=4,Ue(t.serverId,{Ids:t.ids.join(",")});case 4:n=e.v.Items;case 5:return e.n=6,k(n,t);case 6:return n=e.v,e.n=7,z(n);case 7:if(n=e.v,t.startIndex){for(r=0,o=0;o<t.startIndex;o++)r+=n[o].length;t.startIndex=r}return n=n.flat(),e.a(2,q(n,t))}}),e)})));return function(t){return e.apply(this,arguments)}}(),i.getPlayerState=function(e,t,n){if(!(e=e||i._currentPlayer))throw new Error("player cannot be null");if(!Re(e)&&e.getPlayerState)return e.getPlayerState();t=t||i.currentItem(e),n=n||i.currentMediaSource(e);var r={PlayState:{}};return e&&(r.PlayState.VolumeLevel=e.getVolume(),r.PlayState.IsMuted=e.isMuted(),r.PlayState.IsPaused=e.paused(),r.PlayState.RepeatMode=i.getRepeatMode(e),r.PlayState.ShuffleMode=i.getQueueShuffleMode(e),r.PlayState.MaxStreamingBitrate=i.getMaxStreamingBitrate(e),r.PlayState.PositionTicks=V(e),r.PlayState.PlaybackStartTimeTicks=i.playbackStartTime(e),r.PlayState.PlaybackRate=i.getPlaybackRate(e),r.PlayState.SubtitleStreamIndex=i.getSubtitleStreamIndex(e),r.PlayState.SecondarySubtitleStreamIndex=i.getSecondarySubtitleStreamIndex(e),r.PlayState.AudioStreamIndex=i.getAudioStreamIndex(e),r.PlayState.BufferedRanges=i.getBufferedRanges(e),r.PlayState.PlayMethod=i.playMethod(e),n&&(r.PlayState.LiveStreamId=n.LiveStreamId),r.PlayState.PlaySessionId=i.playSessionId(e),r.PlayState.PlaylistItemId=i.getCurrentPlaylistItemId(e)),n&&(r.PlayState.MediaSourceId=n.Id,r.NowPlayingItem={RunTimeTicks:n.RunTimeTicks},r.PlayState.CanSeek=(n.RunTimeTicks||0)>0||x(e)),t&&(r.NowPlayingItem=function(e,t,n){var r=Object.assign({},t);return n&&(r.RunTimeTicks=n.RunTimeTicks,r.MediaStreams=n.MediaStreams,r.MediaSources=null),r.RunTimeTicks=r.RunTimeTicks||1e4*e.duration(),r}(e,t,n)),r.MediaSource=n,r},i.duration=function(e){if((e=e||i._currentPlayer)&&!Re(e)&&!e.isLocalPlayer)return e.duration();if(!e)throw new Error("player cannot be null");var t=i.currentMediaSource(e);if(null!=t&&t.RunTimeTicks)return t.RunTimeTicks;var n=e.duration();return n&&(n*=1e4),n},i.getCurrentTicks=V;var z=function(){var e=Ee(xe().m((function e(t){var n;return xe().w((function(e){for(;;)if(0===e.n)return n=function(){var e=Ee(xe().m((function e(t){var n,i,o;return xe().w((function(e){for(;;)switch(e.n){case 0:if(!(t.PartCount&&t.PartCount>1&&[r.D.Episode,r.D.Movie].includes(t.Type))){e.n=3;break}return n=B.tF.getApiClient(t.ServerId),e.n=1,n.getCurrentUser();case 1:return i=e.v,e.n=2,n.getAdditionalVideoParts(i.Id,t.Id);case 2:if(!(o=e.v).Items.length){e.n=3;break}return e.a(2,[t].concat(Ae(o.Items)));case 3:return e.a(2,[t])}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.a(2,Promise.all(t.map(n)))}),e)})));return function(t){return e.apply(this,arguments)}}();function q(e,t){var n=t.startIndex||0,r=e[n];if(r||(r=e[n=0]),!r)return et(0,"PlaybackError.".concat(de.F.NO_MEDIA_ERROR)),Promise.reject();if("Photo"===r.MediaType||"Book"===r.MediaType)return function(e,t){var n=ne(e[t.startIndex||0],t);return E.Ay.hide(),t.items=e,n.play(t)}(e,t);var o=B.tF.getApiClient(r.ServerId);return function(e,t,n){return n.startPositionTicks||n.startIndex||!1===n.fullscreen||"Video"!==(r=e).MediaType||"TvChannel"===r.Type||"InProgress"===r.Status||!He(r)||!T.enableCinemaMode()?Promise.resolve({Items:[]}):t.getIntros(e.Id).then((function(e){return e}),(function(){return Promise.resolve({Items:[]})}));var r}(r,o,t).then((function(o){var a,s,l=o.Items;return r.playOptions={aspectRatio:(s=t).aspectRatio,fullscreen:s.fullscreen,mediaSourceId:s.mediaSourceId,audioStreamIndex:s.audioStreamIndex,subtitleStreamIndex:s.subtitleStreamIndex,startPositionTicks:s.startPositionTicks},a=l.length?{fullscreen:r.playOptions.fullscreen}:r.playOptions,e=l.concat(e),a.items=e,a.startIndex=n,G(e[n],a,(function(){i._playQueueManager.setPlaylist(e),H(e[n].PlaylistItemId,n),E.Ay.hide()}))}))}function H(e,t){isNaN(t)||i._playQueueManager.setPlaylistState(e,t)}function G(e,t,n,o){if(e.IsPlaceHolder)return E.Ay.hide(),et(0,"PlaybackErrorPlaceHolder"),Promise.reject();tt(t),t.isFirstItem?t.isFirstItem=!1:t.isFirstItem=!0;var a=B.tF.getApiClient(e.ServerId),s=e.MediaType;return t.fullscreen&&E.Ay.show(),function(e,t){return new Promise((function(n,r){var i=y.X.ofType(M.Q.PreplayIntercept);if(i.sort((function(e,t){return(e.order||0)-(t.order||0)})),i.length){var o=Object.assign({},t);o.mediaType=e.MediaType,o.item=e,J(i,0,o,n,r)}else n()}))}(e,t).catch(Y).then((function(){return function(e,t,n){return Promise.resolve().then((function(){return!He(t)||m.Ay.isLocalItem(t)?Promise.reject(new Error("skip bitrate detection")):e.getEndpointInfo().then((function(t){return"Video"!==n&&"Audio"!==n||!p.A.enableAutomaticBitrateDetection(t.IsInNetwork,n)?Promise.reject(new Error("skip bitrate detection")):e.detectBitrate().then((function(e){return p.A.maxStreamingBitrate(t.IsInNetwork,n,e),e}))}))})).catch((function(){return S(e,n)}))}(a,e,s)})).then((function(a){return function(e,t,n,o,a){var s,l=n.startPositionTicks,u=ne(t,n),c=i._currentPlayer;if(c?(i._playNextAfterEnded=!1,s=function(e,t,n){var r=i.getPlayerState(e),o=i.currentItem(e).ServerId;return le(e),function(e){d.A.off(e,"stopped",ve)}(e),(e===t?e.stop(!1):e.stop(!0)).then((function(){U(e).streamInfo=null,he(e),Re(e)&&Ne(i,r,e,!0,o,"reportPlaybackStopped"),d.A.trigger(i,"playbackstop",[{player:e,state:r,nextItem:n,nextMediaType:n.MediaType}])}))}(c,u,t)):s=Promise.resolve(),!u)return s.then((function(){W(),E.Ay.hide(),console.error("No player found for the requested media: ".concat(t.Url)),et(0,"ErrorPlayerNotFound")}));if(!He(t)||"Book"===t.MediaType)return s.then((function(){var e=function(e){return{url:e.Url||e.Path,playMethod:"DirectPlay",item:e,textTracks:[],mediaType:e.MediaType}}(t);return e.fullscreen=n.fullscreen,U(u).isChangingStream=!1,u.play(e).then((function(){E.Ay.hide(),o(),ue(u,n,e)})).catch((function(e){i.stop(u),E.Ay.hide(),et(0,e||"ErrorDefault")}))}));var f=n.mediaSourceId,p=B.tF.getApiClient(t.ServerId),m=[r.D.TvChannel,r.D.LiveTvChannel].includes(t.Type)?Promise.resolve([]):p.getItem(p.getCurrentUserId(),f||t.Id).then((function(e){return e.MediaStreams}));return Promise.all([s,u.getDeviceProfile(t),p.getCurrentUser(),m]).then((function(r){var s=r[1],c=r[2],d=r[3],m=n.audioStreamIndex,y=n.subtitleStreamIndex,v={aspectRatio:n.aspectRatio,maxBitrate:e,startPosition:l,isPlayback:null,audioStreamIndex:m,subtitleStreamIndex:y,startIndex:n.startIndex,enableDirectPlay:null,enableDirectStream:null,allowVideoStreamCopy:null,allowAudioStreamCopy:null};if(u&&!Re(u))return function(e,t,n,r,i,o){return Ke(t,n,o.maxBitrate,r,o.startPosition).then((function(){return E.Ay.hide(),e.play({items:t,startPositionTicks:o.startPosition||0,mediaSourceId:i,audioStreamIndex:o.audioStreamIndex,subtitleStreamIndex:o.subtitleStreamIndex,startIndex:o.startIndex})}))}(u,n.items,s,p,f,v);n.items=null;var h={},g=!1;return function(e,t,n,r,i){try{if(!e)return;if(!t)return void console.warn("AutoSet - No mediaStreams");r&&"number"==typeof e.DefaultAudioStreamIndex&&X(e.DefaultAudioStreamIndex,e,t,n,"Audio"),i&&"number"==typeof e.DefaultSubtitleStreamIndex&&X(e.DefaultSubtitleStreamIndex,e,t,n,"Subtitle"),i&&"number"==typeof e.DefaultSecondarySubtitleStreamIndex&&X(e.DefaultSecondarySubtitleStreamIndex,e,t,n,"Subtitle",!0)}catch(e){console.error("AutoSet - Caught unexpected error: ".concat(e))}}(a,d,h,c.Configuration.RememberAudioSelections,c.Configuration.RememberSubtitleSelections),null!=h.DefaultAudioStreamIndex&&(v.audioStreamIndex=h.DefaultAudioStreamIndex,g=!0),null!=h.DefaultSubtitleStreamIndex&&(v.subtitleStreamIndex=h.DefaultSubtitleStreamIndex,g=!0),g&&(f||(f=t.Id)),te(u,p,s,t,f,v).then(function(){var r=Ee(xe().m((function r(a){var s,c,d,f;return xe().w((function(r){for(;;)if(0===r.n)return null!=h.DefaultSecondarySubtitleStreamIndex&&(a.DefaultSecondarySubtitleStreamIndex=h.DefaultSecondarySubtitleStreamIndex),(null==a.DefaultSubtitleStreamIndex||a.DefaultSubtitleStreamIndex<0)&&(null!=a.DefaultSecondarySubtitleStreamIndex&&(a.DefaultSubtitleStreamIndex=a.DefaultSecondarySubtitleStreamIndex),a.DefaultSecondarySubtitleStreamIndex=-1),s=a.MediaStreams[a.DefaultSubtitleStreamIndex],c=a.MediaStreams[a.DefaultSecondarySubtitleStreamIndex],i.trackHasSecondarySubtitleSupport(s,u)&&i.trackHasSecondarySubtitleSupport(c,u)||(a.DefaultSecondarySubtitleStreamIndex=-1),(d=Z(p,t.MediaType,t,a,l,u)).aspectRatio=n.aspectRatio,d.fullscreen=n.fullscreen,(f=U(u)).isChangingStream=!1,f.maxStreamingBitrate=e,f.streamInfo=d,r.a(2,u.play(d).then((function(){E.Ay.hide(),o(),ue(u,n,d,a)}),(function(e){o(),ue(u,n,d,a),setTimeout((function(){ye.call(u,e,{type:fe(e),streamInfo:d})}),100)})))}),r)})));return function(e){return r.apply(this,arguments)}}())}))}(a,e,t,n,o).catch(Q)})).catch((function(){t.fullscreen&&E.Ay.hide()}))}function W(){var e=i._currentPlayer;e&&(K(e),g(e)),d.A.trigger(i,"playbackcancelled")}function Y(){return W(),Promise.reject()}function Q(e){W();var t="ErrorDefault";return e instanceof Response&&(e.status>=500?t="PlaybackError.".concat(de.F.SERVER_ERROR):e.status>=400&&(t="PlaybackError.".concat(de.F.NO_MEDIA_ERROR))),et(0,t),Promise.reject()}function K(e){e.destroy()}function J(e,t,n,r,i){t>=e.length?r():e[t].intercept(n).then((function(){J(e,t+1,n,r,i)}),i)}function X(e,t,n,r,i,o){if(-1==e)return console.debug("AutoSet ".concat(i," - No Stream Set")),void("Subtitle"==i&&(o?r.DefaultSecondarySubtitleStreamIndex=-1:r.DefaultSubtitleStreamIndex=-1));if(t.MediaStreams&&n){var a=null,s=0,l=t.MediaStreams[e];if(l){console.debug("AutoSet ".concat(i," - Previous was ").concat(l.Index," - ").concat(l.DisplayTitle));var u,c=0,d=ke(t.MediaStreams);try{for(d.s();!(u=d.n()).done;){var f=u.value;if(f.Type==i){if(f.Index==e)break;c+=1}}}catch(e){d.e(e)}finally{d.f()}var p,m=0,y=ke(n);try{for(y.s();!(p=y.n()).done;){var v=p.value;if(v.Type==i){var h=0;l.Codec==v.Codec&&(h+=1),c==m&&(h+=1),l.DisplayTitle&&l.DisplayTitle==v.DisplayTitle&&(h+=2),l.Language&&"und"!=l.Language&&l.Language==v.Language&&(h+=2),console.debug("AutoSet ".concat(i," - Score ").concat(h," for ").concat(v.Index," - ").concat(v.DisplayTitle)),h>s&&h>=3&&(s=h,a=v.Index),m+=1}}}catch(e){y.e(e)}finally{y.f()}null!=a?(console.debug("AutoSet ".concat(i," - Using ").concat(a," score ").concat(s,".")),"Subtitle"==i&&(o?r.DefaultSecondarySubtitleStreamIndex=a:r.DefaultSubtitleStreamIndex=a),"Audio"==i&&(r.DefaultAudioStreamIndex=a)):console.debug("AutoSet ".concat(i," - Threshold not met. Using default."))}else console.debug("AutoSet ".concat(i," - No prevStream"))}else console.debug("AutoSet ".concat(i," - No MediaStreams"))}function Z(e,t,n,r,i,o){var a,s,l,u=0,c=i,d=r.LiveStreamId,f="Transcode",p=(r.Container||"").toLowerCase();if(r.MediaStreams&&o.useFullSubtitleUrls&&r.MediaStreams.forEach((function(t){var n;null!==(n=t.DeliveryUrl)&&void 0!==n&&n.startsWith("/")&&(t.DeliveryUrl=e.getUrl(t.DeliveryUrl))})),"Video"===t||"Audio"===t)if(s=Be(t.toLowerCase(),p),r.enableDirectPlay)a=r.Path,f="DirectPlay";else if(r.StreamUrl)a=r.StreamUrl;else if(r.SupportsDirectPlay||r.SupportsDirectStream){l={Static:!0,mediaSourceId:r.Id,deviceId:e.deviceId(),ApiKey:e.accessToken()},r.ETag&&(l.Tag=r.ETag),r.LiveStreamId&&(l.LiveStreamId=r.LiveStreamId);var m="Video"===t?"Videos":"Audio";a=e.getUrl(m+"/"+n.Id+"/stream."+p,l),f=r.SupportsDirectPlay?"DirectPlay":"DirectStream"}else r.SupportsTranscoding&&(a=e.getUrl(r.TranscodingUrl),"hls"===r.TranscodingSubProtocol?s="application/x-mpegURL":(s=Be(t.toLowerCase(),r.TranscodingContainer),-1===a.toLowerCase().indexOf("copytimestamps=true")&&(u=i||0)));else a=r.Path,f="DirectPlay";!a&&r.SupportsDirectPlay&&(a=r.Path,f="DirectPlay");var y={url:a,mimeType:s,transcodingOffsetTicks:u,playMethod:f,playerStartPositionTicks:c,item:n,mediaSource:r,textTracks:ee(e,n,r),tracks:ee(e,n,r),mediaType:t,liveStreamId:d,playSessionId:ze("playSessionId",a),title:n.Name},v=(0,D.I)(e,n,{},!0);return v&&(y.backdropUrl=v),y}function ee(e,t,n){for(var r=n.MediaStreams.filter((function(e){return"Subtitle"===e.Type})).filter((function(e){return"External"===e.DeliveryMethod})),i=[],o=0,a=r.length;o<a;o++){var s,l=r[o];s=m.Ay.isLocalItem(t)?l.Path:l.IsExternalUrl?l.DeliveryUrl:e.getUrl(l.DeliveryUrl),i.push({url:s,language:l.Language||"und",isDefault:l.Index===n.DefaultSubtitleStreamIndex,index:l.Index,format:l.Codec})}return i}function te(e,t,n,r,i,o){return o.isPlayback=!0,Je(e,t,r,n,i,null,o).then((function(i){return Ze(0,i)?function(e,t,n){var r=n.map((function(t){return $e(e,0,t)}));return r.length?Promise.all(r).then((function(e){for(var t=0,r=n.length;t<r;t++)n[t].enableDirectPlay=e[t]||!1;var i=n.filter((function(e){return e.enableDirectPlay}))[0];return i||(i=n.filter((function(e){return e.SupportsDirectStream}))[0]),(i=i||n.filter((function(e){return e.SupportsTranscoding}))[0])||n[0]})):Promise.reject()}(t,0,i.MediaSources).then((function(a){return a?a.RequiresOpening&&!a.LiveStreamId?(o.audioStreamIndex=null,o.subtitleStreamIndex=null,function(e,t,n,r,i,o,a){var s={DeviceProfile:i,OpenToken:o.OpenToken},l={UserId:t.getCurrentUserId(),StartTimeTicks:a.startPosition||0,ItemId:n.Id,PlaySessionId:r};return a.maxBitrate&&(l.MaxStreamingBitrate=a.maxBitrate),null!=a.audioStreamIndex&&(l.AudioStreamIndex=a.audioStreamIndex),null!=a.subtitleStreamIndex&&(l.SubtitleStreamIndex=a.subtitleStreamIndex),!1!==l.EnableDirectStream&&e.supportsPlayMethod&&!e.supportsPlayMethod("DirectStream",n)&&(l.EnableDirectStream=!1),t.ajax({url:t.getUrl("LiveStreams/Open",l),type:"POST",data:JSON.stringify(s),contentType:"application/json",dataType:"json"})}(e,t,r,i.PlaySessionId,n,a,o).then((function(e){return $e(t,0,e.MediaSource).then((function(t){return e.MediaSource.enableDirectPlay=t,e.MediaSource}))}))):null!=r.AlbumId?t.getItem(t.getCurrentUserId(),r.AlbumId).then((function(e){return a.albumNormalizationGain=e.NormalizationGain,a})):a:(et(0,"PlaybackError.".concat(de.F.NO_MEDIA_ERROR)),Promise.reject())})):Promise.reject()}))}function ne(e,t,n){var r=He(e);return function(e,t){if(!t){var n=e._currentPlayer;if(n&&!qe(n))return[n]}return e.getPlayers().filter(qe)}(i,n).filter((function(n){if(n.canPlayMediaType(e.MediaType)){if(r)return!n.canPlayItem||n.canPlayItem(e,t);if(e.Url&&n.canPlayUrl)return n.canPlayUrl(e.Url)}return!1}))[0]}function re(e){var t=i.currentMediaSource(e),n=U(e);return Le(Le({},t),{},{DefaultAudioStreamIndex:n.audioStreamIndex,DefaultSubtitleStreamIndex:n.subtitleStreamIndex,DefaultSecondarySubtitleStreamIndex:n.secondarySubtitleStreamIndex})}function ie(e,t,n){if(!(n=n||i._currentPlayer))return i.play(e);if(e.items)return k(e.items,e).then((function(e){oe(e,t,n)}));if(!e.serverId)throw new Error("serverId required!");return Ue(e.serverId,{Ids:e.ids.join(",")}).then((function(r){return k(r.Items,e).then((function(e){oe(e,t,n)}))}))}function oe(e,t,n){if(e.length)if(n.isLocalPlayer)if(n&&!Re(n)){var r=B.tF.getApiClient(e[0].ServerId);n.getDeviceProfile(e[0]).then((function(o){Ke(e,o,i.getMaxStreamingBitrate(n),r,0).then((function(){"next"===t?n.queueNext(e):n.queue(e)}))}))}else"next"===t?i._playQueueManager.queueNext(e):i._playQueueManager.queue(e),d.A.trigger(n,"playlistitemadd");else"next"===t?n.queueNext({items:e}):n.queue({items:e})}function ae(){Fe(this,"timeupdate")}function se(e){le(e),e._progressInterval=setInterval(ae.bind(e),1e4)}function le(e){e._progressInterval&&(clearInterval(e._progressInterval),e._progressInterval=null)}function ue(e,t,n,r){if(!e)throw new Error("player cannot be null");b(e);var o=U(e);o.streamInfo=n,n.playbackStartTimeTicks=1e4*(new Date).getTime(),r?(o.audioStreamIndex=r.DefaultAudioStreamIndex,o.subtitleStreamIndex=r.DefaultSubtitleStreamIndex,o.secondarySubtitleStreamIndex=r.DefaultSecondarySubtitleStreamIndex):(o.audioStreamIndex=null,o.subtitleStreamIndex=null,o.secondarySubtitleStreamIndex=null),i._playNextAfterEnded=!0;var a=t.isFirstItem,s=t.fullscreen,l=i.getPlayerState(e,n.item,n.mediaSource);Ne(i,l,e,!0,l.NowPlayingItem.ServerId,"reportPlaybackStart"),l.IsFirstItem=a,l.IsFullscreen=s,d.A.trigger(e,"playbackstart",[l]),d.A.trigger(i,"playbackstart",[e,l]),n.started=!0,se(e)}function pe(e,t,n){var r=this;b(r);var o=t.playOptions||{fullscreen:!0},a=o.isFirstItem,s=o.fullscreen;o.isFirstItem=!1;var l=U(r);l.streamInfo={};var u=l.streamInfo;u.playbackStartTimeTicks=1e4*(new Date).getTime();var c=i.getPlayerState(r,t,n);Ne(i,c,r,!0,c.NowPlayingItem.ServerId,"reportPlaybackStart"),c.IsFirstItem=a,c.IsFullscreen=s,d.A.trigger(r,"playbackstart",[c]),d.A.trigger(i,"playbackstart",[r,c]),u.started=!0,se(r)}function me(e,t){var n=this;le(n);var r=i.getPlayerState(n,t.item,t.mediaSource),o=t.nextItem,a=t.nextMediaType,s={player:n,state:r,nextItem:o?o.item:null,nextMediaType:a};r.NextMediaType=a,U(n).streamInfo.ended=!0,He(t.item)&&(r.PlayState.PositionTicks=1e4*(t.positionMs||0),Ne(i,r,n,!0,t.item.ServerId,"reportPlaybackStopped")),r.NextItem=s.nextItem,d.A.trigger(n,"playbackstop",[r]),d.A.trigger(i,"playbackstop",[s]);var l=o&&o.item.playOptions||{fullscreen:!0};(o?ne(o.item,l):null)!==n&&(K(n),g(n))}function ye(e,t){var n=this,r=(t=t||{}).type;console.warn("[playbackmanager] onPlaybackError:",e,t);var o=t.streamInfo||U(n).streamInfo;if(null!=o&&o.url){var a=o.url.toLowerCase().includes("transcodereasons"),s=-1!==o.url.toLowerCase().indexOf("allowvideostreamcopy=false"),l=-1!==o.url.toLowerCase().indexOf("allowaudiostreamcopy=false");if(function(e,t,n,r){return e.mediaSource.SupportsTranscoding&&(!n||!r)}(o,0,s,l)){var u=V(n)||o.playerStartPositionTicks,c="Remote"===o.item.LocationType&&!a;return void w(n,u,{EnableDirectPlay:!1,EnableDirectStream:c,AllowVideoStreamCopy:c,AllowAudioStreamCopy:!l&&!s&&null})}}d.A.trigger(i,"playbackerror",[r]),ve.call(n,e,".".concat(r))}function ve(e,t){var n=this;if(!U(n).isChangingStream){le(n);var r=i.getPlayerState(n),o=U(n),s=o.streamInfo,l=t&&"string"==typeof t,u=i._playNextAfterEnded&&!l?i._playQueueManager.getNextItemInfo():null,c=u?u.item.MediaType:null,f={player:n,state:r,nextItem:u?u.item:null,nextMediaType:c};r.NextMediaType=c,s&&He(s.item)&&(!1===n.supportsProgress&&r.PlayState&&!r.PlayState.PositionTicks&&(r.PlayState.PositionTicks=s.item.RunTimeTicks),s.ended=!0,Ne(i,r,n,!0,s.item.ServerId,"reportPlaybackStopped")),r.NextItem=f.nextItem,u||i._playQueueManager.reset(),d.A.trigger(n,"playbackstop",[r]),d.A.trigger(i,"playbackstop",[f]);var p=u&&u.item.playOptions||{fullscreen:!0};(u?ne(u.item,p):null)!==n&&(o.streamInfo=null,K(n),g(n)),l?et(0,"PlaybackError"+t):u&&B.tF.getApiClient(u.item.ServerId).getCurrentUser().then((function(e){(e.Configuration.EnableNextEpisodeAutoPlay||c!==a.z.Video)&&i.nextTrack()}))}}function he(e){Re(e)&&(d.A.off(e,"stopped",ve),d.A.on(e,"stopped",ve))}function ge(){Fe(this,"timeupdate")}function Se(){Fe(this,"pause")}function we(){Fe(this,"unpause")}function Ie(){Fe(this,"volumechange")}function je(){Fe(this,"repeatmodechange")}function Te(){Fe(this,"shufflequeuemodechange")}function Ce(){Fe(this,"playlistitemmove",!0)}function _e(){Fe(this,"playlistitemremove",!0)}function Me(){Fe(this,"playlistitemadd",!0)}function Oe(e){s.push(e),s.sort((function(e,t){return(e.priority||0)-(t.priority||0)})),!1!==e.isLocalPlayer&&(e.isLocalPlayer=!0),e.currentState={},e.getVolume&&e.setVolume||function(e){e.getVolume=function(){return e.volume()},e.setVolume=function(t){return e.volume(t)}}(e),Re(e)?(d.A.on(e,"error",ye),d.A.on(e,"timeupdate",ge),d.A.on(e,"pause",Se),d.A.on(e,"unpause",we),d.A.on(e,"volumechange",Ie),d.A.on(e,"repeatmodechange",je),d.A.on(e,"shufflequeuemodechange",Te),d.A.on(e,"playlistitemmove",Ce),d.A.on(e,"playlistitemremove",_e),d.A.on(e,"playlistitemadd",Me)):e.isLocalPlayer&&(d.A.on(e,"itemstarted",pe),d.A.on(e,"itemstopped",me),d.A.on(e,"timeupdate",ge),d.A.on(e,"pause",Se),d.A.on(e,"unpause",we),d.A.on(e,"volumechange",Ie),d.A.on(e,"repeatmodechange",je),d.A.on(e,"shufflequeuemodechange",Te),d.A.on(e,"playlistitemmove",Ce),d.A.on(e,"playlistitemremove",_e),d.A.on(e,"playlistitemadd",Me)),e.isLocalPlayer&&function(e){c.A.isEnabled?c.A.on("change",(function(){d.A.trigger(e,"fullscreenchange")})):document.addEventListener("webkitfullscreenchange",(function(){d.A.trigger(e,"fullscreenchange")}),!1)}(e),he(e)}function Fe(e,t,n){if(!e)throw new Error("player cannot be null");var r=i.getPlayerState(e);if(r.NowPlayingItem){var o=r.NowPlayingItem.ServerId,a=U(e).streamInfo;null!=a&&a.started&&!a.ended&&Ne(i,r,e,n,o,"reportPlaybackProgress",t),null!=a&&a.liveStreamId&&(new Date).getTime()-(a.lastMediaInfoQuery||0)>=6e5&&function(e,t,n,r,i){console.debug("getLiveStreamMediaInfo"),t.lastMediaInfoQuery=(new Date).getTime(),B.tF.getApiClient(i).getLiveStreamMediaInfo(r).then((function(t){n.MediaStreams=t.MediaStreams,d.A.trigger(e,"mediastreamschange")}),(function(){}))}(e,a,i.currentMediaSource(e),a.liveStreamId,o)}}i.getPlaybackInfo=function(e,t){var n=(t=t||{}).startPositionTicks||0,r=t.mediaType||e.MediaType,i=ne(e,t),o=B.tF.getApiClient(e.ServerId);return o.getEndpointInfo().then((function(){var a=S(B.tF.getApiClient(e.ServerId),r);return i.getDeviceProfile(e).then((function(r){var s={maxBitrate:a,startPosition:n,isPlayback:null,audioStreamIndex:t.audioStreamIndex,subtitleStreamIndex:t.subtitleStreamIndex,startIndex:null,enableDirectPlay:null,enableDirectStream:null,allowVideoStreamCopy:null,allowAudioStreamCopy:null};return te(i,o,r,e,t.mediaSourceId,s).then((function(t){return Z(o,e.MediaType,e,t,n,i)}))}))}))},i.getPlaybackMediaSources=function(e,t){var n=(t=t||{}).startPositionTicks||0,r=t.mediaType||e.MediaType,i=ne(e,t,!0),o=B.tF.getApiClient(e.ServerId);return o.getEndpointInfo().then((function(){var t=S(B.tF.getApiClient(e.ServerId),r);return i.getDeviceProfile(e).then((function(r){return Je(i,o,e,r,null,null,{maxBitrate:t,startPosition:n,isPlayback:!0,audioStreamIndex:null,subtitleStreamIndex:null,enableDirectPlay:null,enableDirectStream:null,allowVideoStreamCopy:null,allowAudioStreamCopy:null}).then((function(e){return e.MediaSources}))}))}))},i.getItemFromPlaylistItemId=function(e){for(var t,n,r=i._playQueueManager.getPlaylist(),o=0,a=r.length;o<a;o++)if(r[o].PlaylistItemId===e){t=r[o],n=o;break}return{Item:t,Index:n}},i.setCurrentPlaylistItem=function(e,t){if((t=t||i._currentPlayer)&&!Re(t))return t.setCurrentPlaylistItem(e);var n=i.getItemFromPlaylistItemId(e);if(n.Item){var r=n.Item.playOptions||{fullscreen:!0};G(n.Item,r,(function(){H(n.Item.PlaylistItemId,n.Index)}))}},i.removeFromPlaylist=function(e,t){if(!e)throw new Error("Invalid playlistItemIds");if((t=t||i._currentPlayer)&&!Re(t))return t.removeFromPlaylist(e);var n=i._playQueueManager.removeFromPlaylist(e);if("empty"===n.result)return i.stop(t);var r=n.isCurrentIndex;return d.A.trigger(t,"playlistitemremove",[{playlistItemIds:e}]),r?i.setCurrentPlaylistItem(i._playQueueManager.getPlaylist()[0].PlaylistItemId,t):Promise.resolve()},i.movePlaylistItem=function(e,t,n){if((n=n||i._currentPlayer)&&!Re(n))return n.movePlaylistItem(e,t);var r=i._playQueueManager.movePlaylistItem(e,t);"noop"!==r.result&&d.A.trigger(n,"playlistitemmove",[{playlistItemId:r.playlistItemId,newIndex:r.newIndex}])},i.getCurrentPlaylistIndex=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getCurrentPlaylistIndex():i._playQueueManager.getCurrentPlaylistIndex()},i.getCurrentPlaylistItemId=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getCurrentPlaylistItemId():i._playQueueManager.getCurrentPlaylistItemId()},i.channelUp=function(e){return e=e||i._currentPlayer,i.nextTrack(e)},i.channelDown=function(e){return e=e||i._currentPlayer,i.previousTrack(e)},i.nextTrack=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.nextTrack();var t=i._playQueueManager.getNextItemInfo();if(t){console.debug("playing next track");var n=t.item.playOptions||{fullscreen:!0};G(t.item,n,(function(){H(t.item.PlaylistItemId,t.index)}),re(e))}},i.previousTrack=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.previousTrack();var t=i.getCurrentPlaylistIndex(e)-1;if(t>=0){var n=i._playQueueManager.getPlaylist()[t];if(n){var r=n.playOptions||{fullscreen:!0};r.startPositionTicks=0,G(n,r,(function(){H(n.PlaylistItemId,t)}),re(e))}}},i.queue=function(e){return ie(e,"",arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer)},i.queueNext=function(e){return ie(e,"next",arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer)},d.A.on(y.X,"registered",(function(e,t){t.type===M.Q.MediaPlayer&&Oe(t)})),y.X.ofType(M.Q.MediaPlayer).forEach(Oe),i.onAppClose=function(){var e=this._currentPlayer;e&&this.isPlaying(e)&&(this._playNextAfterEnded=!1,ve.call(e))},i.playbackStartTime=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e&&!Re(e)&&!e.isLocalPlayer)return e.playbackStartTime();var t=U(e).streamInfo;return t?t.playbackStartTimeTicks:null},_.g.supports(ce.Y.RemoteControl)&&Promise.resolve().then(n.bind(n,10736)).then((function(e){var t=e.default;d.A.on(t,"ServerShuttingDown",i.setDefaultPlayerActive.bind(i)),d.A.on(t,"ServerRestarting",i.setDefaultPlayerActive.bind(i))})),$(i),this._skipSegment=function(e){return new be(e)}(i)},t=[{key:"getCurrentPlayer",value:function(){return this._currentPlayer}},{key:"currentTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return!e||Re(e)||e.isLocalPlayer?this.getCurrentTicks(e)/1e4:e.currentTime()}},{key:"getNextItem",value:function(){return this._playQueueManager.getNextItemInfo()}},{key:"nextItem",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(t&&!Re(t))return t.nextItem();var n=this._playQueueManager.getNextItemInfo();if(null===(e=n)||void 0===e||!e.item)return Promise.reject();var r=B.tF.getApiClient(n.item.ServerId);return r.getItem(r.getCurrentUserId(),n.item.Id)}},{key:"canQueue",value:function(e){return"MusicAlbum"===e.Type||"MusicArtist"===e.Type||"MusicGenre"===e.Type?this.canQueueMediaType("Audio"):this.canQueueMediaType(e.MediaType)}},{key:"canQueueMediaType",value:function(e){return!!this._currentPlayer&&this._currentPlayer.canPlayMediaType(e)}},{key:"isMuted",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return!!e&&e.isMuted()}},{key:"setMute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;t&&t.setMute(e)}},{key:"toggleMute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;t&&(t.toggleMute?t.toggleMute():t.setMute(!t.isMuted()))}},{key:"toggleDisplayMirroring",value:function(){this.enableDisplayMirroring(!this.enableDisplayMirroring())}},{key:"enableDisplayMirroring",value:function(e){if(null==e)return"0"!==(p.A.get("displaymirror")||"");var t=e?"1":"0";p.A.set("displaymirror",t)}},{key:"nextChapter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer,t=this.currentItem(e),n=this.getCurrentTicks(e),r=(t.Chapters||[]).filter((function(e){return e.StartPositionTicks>n}))[0];r?this.seek(r.StartPositionTicks,e):this.nextTrack(e)}},{key:"previousChapter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer,t=this.currentItem(e),n=this.getCurrentTicks(e);n-=1e8,0===this.getCurrentPlaylistIndex(e)&&(n=Math.max(n,0));var r=(t.Chapters||[]).filter((function(e){return e.StartPositionTicks<=n}));r.length?this.seek(r[r.length-1].StartPositionTicks,e):this.previousTrack(e)}},{key:"fastForward",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(null==e.fastForward){var t=1e4*T.skipForwardLength();this.seekRelative(t,e)}else e.fastForward(T.skipForwardLength())}},{key:"rewind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(null==e.rewind){var t=0-1e4*T.skipBackLength();this.seekRelative(t,e)}else e.rewind(T.skipBackLength())}},{key:"seekPercent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer,n=this.duration(t)||0;n*=e/=100,this.seek(parseInt(n,10),t)}},{key:"seekMs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer,n=1e4*e;this.seek(n,t)}},{key:"playTrailers",value:(i=Ee(xe().m((function e(t){var n,r,i,o;return xe().w((function(e){for(;;)switch(e.n){case 0:if(null==(r=this._currentPlayer)||!r.playTrailers){e.n=1;break}return e.a(2,r.playTrailers(t));case 1:if(i=B.tF.getApiClient(t.ServerId),!t.LocalTrailerCount){e.n=3;break}return e.n=2,i.getLocalTrailers(i.getCurrentUserId(),t.Id);case 2:o=e.v;case 3:if(null!==(n=o)&&void 0!==n&&n.length||(o=(t.RemoteTrailers||[]).map((function(e){return{Name:e.Name||t.Name+" Trailer",Url:e.Url,MediaType:"Video",Type:"Trailer",ServerId:i.serverId()}}))),!o.length){e.n=4;break}return e.a(2,this.play({items:o}));case 4:return e.a(2,Promise.reject())}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"getSubtitleUrl",value:function(e,t){var n=B.tF.getApiClient(t);return e.IsExternalUrl?e.DeliveryUrl:n.getUrl(e.DeliveryUrl)}},{key:"stop",value:function(e){return(e=e||this._currentPlayer)?(Re(e)&&(this._playNextAfterEnded=!1),e.stop(!0,!0)):Promise.resolve()}},{key:"getBufferedRanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return null!=e&&e.getBufferedRanges?e.getBufferedRanges():[]}},{key:"playPause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e)return e.playPause?e.playPause():e.paused()?this.unpause(e):this.pause(e)}},{key:"paused",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e)return e.paused()}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;e&&e.pause()}},{key:"unpause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;e&&e.unpause()}},{key:"setPlaybackRate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;null!=t&&t.setPlaybackRate&&(t.setPlaybackRate(e),sessionStorage.setItem("playbackRateSpeed",e))}},{key:"getPlaybackRate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return null!=e&&e.getPlaybackRate?e.getPlaybackRate():null}},{key:"instantMix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(null!=t&&t.instantMix)return t.instantMix(e);var n=B.tF.getApiClient(e.ServerId),r={UserId:n.getCurrentUserId(),Limit:200},i=this;n.getInstantMixFromItem(e.Id,r).then((function(e){i.play({items:e.Items})}))}},{key:"shuffle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;return null!=t&&t.shuffle?t.shuffle(e):this.play({items:[e],shuffle:!0})}},{key:"audioTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e.audioTracks){var t=e.audioTracks();if(t)return t.sort(m.Ay.sortTracks)}var n=this.currentMediaSource(e);return((null==n?void 0:n.MediaStreams)||[]).filter((function(e){return"Audio"===e.Type})).sort(m.Ay.sortTracks)}},{key:"subtitleTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e.subtitleTracks){var t=e.subtitleTracks();if(t)return t.sort(m.Ay.sortTracks)}var n=this.currentMediaSource(e);return((null==n?void 0:n.MediaStreams)||[]).filter((function(e){return"Subtitle"===e.Type})).sort(m.Ay.sortTracks)}},{key:"getSupportedCommands",value:function(e){if((e=e||this._currentPlayer||{isLocalPlayer:!0}).isLocalPlayer){var t=["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","SetShuffleQueue","PlayMediaSource","PlayTrailers"];return _.g.supports(ce.Y.Fullscreen)&&t.push("ToggleFullscreen"),e.supports&&(e.supports("PictureInPicture")&&t.push("PictureInPicture"),e.supports("AirPlay")&&t.push("AirPlay"),e.supports("SetBrightness")&&t.push("SetBrightness"),e.supports("SetAspectRatio")&&t.push("SetAspectRatio"),e.supports("PlaybackRate")&&t.push("PlaybackRate")),t}var n=this.getPlayerInfo();return n?n.supportedCommands:[]}},{key:"setRepeatMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!Re(t))return t.setRepeatMode(e);this._playQueueManager.setRepeatMode(e),d.A.trigger(t,"repeatmodechange")}},{key:"getRepeatMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return e&&!Re(e)?e.getRepeatMode():this._playQueueManager.getRepeatMode()}},{key:"setQueueShuffleMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!Re(t))return t.setQueueShuffleMode(e);this._playQueueManager.setShuffleMode(e),d.A.trigger(t,"shufflequeuemodechange")}},{key:"getQueueShuffleMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return e&&!Re(e)?e.getQueueShuffleMode():this._playQueueManager.getShuffleMode()}},{key:"toggleQueueShuffleMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e&&!Re(e))switch(e.getQueueShuffleMode()){case"Shuffle":e.setQueueShuffleMode("Sorted");break;case"Sorted":e.setQueueShuffleMode("Shuffle");break;default:throw new TypeError("current value for shufflequeue is invalid")}else this._playQueueManager.toggleShuffleMode();d.A.trigger(e,"shufflequeuemodechange")}},{key:"clearQueue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!Re(t))return t.clearQueue(e);this._playQueueManager.clearPlaylist(e),d.A.trigger(t,"playlistitemremove")}},{key:"trySetActiveDeviceName",value:function(e){e=Fe(e);var t=this;t.getTargets().then((function(n){var r=n.filter((function(t){return Fe(t.name)===e}))[0];r&&t.trySetActivePlayer(r.playerName,r)}))}},{key:"displayContent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;null!=t&&t.displayContent&&t.displayContent(e)}},{key:"beginPlayerUpdates",value:function(e){e.beginPlayerUpdates&&e.beginPlayerUpdates()}},{key:"endPlayerUpdates",value:function(e){e.endPlayerUpdates&&e.endPlayerUpdates()}},{key:"setDefaultPlayerActive",value:function(){this.setActivePlayer("localplayer")}},{key:"removeActivePlayer",value:function(e){var t=this.getPlayerInfo();(null==t?void 0:t.name)===e&&this.setDefaultPlayerActive()}},{key:"removeActiveTarget",value:function(e){var t=this.getPlayerInfo();(null==t?void 0:t.id)===e&&this.setDefaultPlayerActive()}},{key:"sendCommand",value:function(e,t){switch(console.debug("MediaController received command: "+e.Name),e.Name){case"SetRepeatMode":this.setRepeatMode(e.Arguments.RepeatMode,t);break;case"SetShuffleQueue":this.setQueueShuffleMode(e.Arguments.ShuffleMode,t);break;case"VolumeUp":this.volumeUp(t);break;case"VolumeDown":this.volumeDown(t);break;case"Mute":this.setMute(!0,t);break;case"Unmute":this.setMute(!1,t);break;case"ToggleMute":this.toggleMute(t);break;case"SetVolume":this.setVolume(e.Arguments.Volume,t);break;case"SetAspectRatio":this.setAspectRatio(e.Arguments.AspectRatio,t);break;case"PlaybackRate":this.setPlaybackRate(e.Arguments.PlaybackRate,t);break;case"SetBrightness":this.setBrightness(e.Arguments.Brightness,t);break;case"SetAudioStreamIndex":this.setAudioStreamIndex(parseInt(e.Arguments.Index,10),t);break;case"SetSubtitleStreamIndex":this.setSubtitleStreamIndex(parseInt(e.Arguments.Index,10),t);break;case"SetMaxStreamingBitrate":this.setMaxStreamingBitrate(parseInt(e.Arguments.Bitrate,10),t);break;case"ToggleFullscreen":this.toggleFullscreen(t);break;default:t.sendCommand&&t.sendCommand(e)}}}],t&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}(),st=new at;$(st),function(e){(ae||oe)&&new ue(e)}(st),window.addEventListener("beforeunload",(function(){try{st.onAppClose()}catch(e){console.error("error in onAppClose: "+e)}}))},40787:function(e,t,n){"use strict";var r,i,o,a=n(38490),s=n(9164),l=n(34789),u=n(46782),c=n(36300),d=n(44797),f={},p=(new Date).getTime();function m(){var e=document.body.classList;e.remove("mouseIdle"),e.remove("mouseIdle-tv")}function y(){r&&(r=!1,m(),d.A.trigger(f,"mouseactive"))}function v(){var e;r||(r=!0,(e=document.body.classList).add("mouseIdle"),u.A.tv&&e.add("mouseIdle-tv"),d.A.trigger(f,"mouseidle"))}function h(e){var t=e.screenX||e.clientX,n=e.screenY||e.clientY;if(void 0!==t||void 0!==n){var r=i;r?Math.abs(t-r.x)<10&&Math.abs(n-r.y)<10||(r.x=t,r.y=n,p=(new Date).getTime(),a.default.notifyMouseMove(),y()):i={x:t,y:n}}}function g(e){if("mouse"===(e.pointerType||(u.A.mobile?"touch":"mouse"))&&!r){var t=s.A.focusableParent(e.target);t&&s.A.focus(t)}}function b(){!r&&(new Date).getTime()-p>=5e3&&v()}function S(){o&&(clearInterval(o),o=null),m(),c.Ay.removeEventListener(document,window.PointerEvent?"pointermove":"mousemove",h,{passive:!0}),u.A.mobile||(o||(o=setInterval(b,5e3)),c.Ay.addEventListener(document,window.PointerEvent?"pointermove":"mousemove",h,{passive:!0})),c.Ay.removeEventListener(document,window.PointerEvent?"pointerenter":"mouseenter",g,{capture:!0,passive:!0}),u.A.tv&&!l.A.web0s&&l.A.tv&&c.Ay.addEventListener(document,window.PointerEvent?"pointerenter":"mouseenter",g,{capture:!0,passive:!0})}S(),d.A.on(u.A,"modechange",S),t.Ay={hideCursor:v,showCursor:y}},41177:function(e,t,n){"use strict";n.d(t,{A:function(){return c}}),n(29305),n(32733),n(84701),n(2623),n(44962),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(83994),n(93062),n(97747),n(82367);var r=n(70267),i=n(34789),o=n(48080),a=n(5898);function s(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return l(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(l(t={},r,(function(){return this})),t),p=d.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,l(e,i,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=d,l(p,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(p),l(p,i,"Generator"),l(p,r,(function(){return this})),l(p,"toString",(function(){return"[object Generator]"})),(s=function(){return{w:o,m:m}})()}function l(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}l=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){l(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},l(e,t,n,r)}function u(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function c(e,t){return d.apply(this,arguments)}function d(){var e;return e=s().m((function e(t,n){var l,u;return s().w((function(e){for(;;)switch(e.n){case 0:return l=!(i.A.web0s||i.A.tizenVersion&&(i.A.tizenVersion<3||i.A.tizenVersion>=8)||!i.A.tv||!window.alert),u="string"==typeof t?{title:n,text:t}:t,e.n=1,r.appRouter.ready();case 1:if(!l){e.n=2;break}return alert((u.text||"").replaceAll("<br/>","\n")),e.a(2,Promise.resolve());case 2:return u.buttons=[{name:a.Ay.translate("ButtonGotIt"),id:"ok",type:"submit"}],e.a(2,o.A.show(u))}}),e)})),d=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))},d.apply(this,arguments)}},44305:function(e,t,n){"use strict";n.d(t,{G4:function(){return o},Q_:function(){return r},SP:function(){return a},z3:function(){return i}});var r=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),e.toLowerCase()===t.toLowerCase()};function i(e){return!(null==e?void 0:e.trim().length)}function o(e,t){return void 0===t&&(t=!1),"true"!==e&&"false"!==e?t:"false"!==e}function a(e,t){if(void 0===t&&(t=0),!e)return t;var n=parseFloat(e);return isNaN(n)?t:n}},44419:function(e,t,n){"use strict";n.d(t,{iz:function(){return l},l9:function(){return u},t5:function(){return s}});var r=n(39057),i=n(8280),o=n(80401),a=n(69410),s="BrandingOptions",l=function(e){return(0,i.j)({queryKey:[s],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,i=void 0,a=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){return[2,(0,r.g)(e).getBrandingOptions(t).then((function(e){return e.data}))]}))},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,s)}l((a=a.apply(n,i||[])).next())}));var n,i,o,a}(e,{signal:n})},enabled:!!e})},u=function(){var e=(0,a.gf)().api;return(0,o.I)(l(e))}},44797:function(e,t){"use strict";function n(e,t){if(!e)throw new Error("obj cannot be null!");e._callbacks=e._callbacks||{};var n=e._callbacks[t];return n||(e._callbacks[t]=[],n=e._callbacks[t]),n}t.A={on:function(e,t,r){n(e,t).push(r)},off:function(e,t,r){var i=n(e,t),o=i.indexOf(r);-1!==o&&i.splice(o,1)},trigger:function(e,t,r){void 0===r&&(r=[]);var i=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([{type:t}],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(r),!1);n(e,t).slice(0).forEach((function(t){t.apply(e,i)}))}}},45958:function(e,t,n){n(89336),n(36947),n(78557),n(23630),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))})),this.appendChild(t)}})})),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){Object.prototype.hasOwnProperty.call(e,"prepend")||Object.defineProperty(e,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))})),this.insertBefore(t,this.firstChild)}})}))},46782:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(83994),n(82367);var r=n(22622),i=n(34789),o=n(90381),a=n(44797);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 l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function d(e,t,n){t===n?(e[t]=!0,document.documentElement.classList.add("layout-"+t)):(e[t]=!1,document.documentElement.classList.remove("layout-"+t))}var f=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"tv",!1),u(this,"mobile",!1),u(this,"desktop",!1),u(this,"experimental",!1)},(t=[{key:"setLayout",value:function(e,t){if(e&&"auto"!==e){if(d(this,"mobile",e),d(this,"tv",e),d(this,"desktop",e),this.experimental="experimental"===e,this.experimental){var n=i.A.mobile?"mobile":this.defaultLayout||"desktop";d(this,n,n)}!1!==t&&o.A.set("layout",e)}else this.autoLayout(),!1!==t&&o.A.set("layout","");a.A.trigger(this,"modechange")}},{key:"getSavedLayout",value:function(){return o.A.get("layout")}},{key:"autoLayout",value:function(){i.A.mobile?this.setLayout("mobile",!1):i.A.tv||i.A.xboxOne||i.A.ps4?this.setLayout("tv",!1):this.setLayout(this.defaultLayout||"tv",!1)}},{key:"init",value:function(){var e=this.getSavedLayout();e?this.setLayout(e,!1):this.autoLayout()}}])&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());r.g.getDefaultLayout&&(f.defaultLayout=r.g.getDefaultLayout()),f.init(),t.A=f},47602:function(e,t,n){"use strict";var r=n(48080),i=n(70267),o=n(5898),a=n(34789),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},l=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},u=a.A.web0s||a.A.tizenVersion&&(a.A.tizenVersion<3||a.A.tizenVersion>=8)||!a.A.tv||!window.confirm?function(e){return s(this,arguments,void 0,(function(e,t){var n;return void 0===t&&(t=""),l(this,(function(a){switch(a.label){case 0:return"string"==typeof e&&(e={title:t,text:e}),(n=[]).push({name:e.cancelText||o.Ay.translate("ButtonCancel"),id:"cancel",type:"cancel"}),n.push({name:e.confirmText||o.Ay.translate("ButtonOk"),id:"ok",type:"delete"===e.primary?"delete":"submit"}),e.buttons=n,[4,i.appRouter.ready()];case 1:return a.sent(),[2,r.A.show(e).then((function(e){return"ok"===e?Promise.resolve():Promise.reject(new Error("Confirm dialog rejected"))}))]}}))}))}:function(e){return s(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return"string"==typeof e&&(e={text:e}),t=(e.text||"").replace(/<br\/>/g,"\n"),[4,i.appRouter.ready()];case 1:return n.sent(),window.confirm(t)?[2,Promise.resolve()]:[2,Promise.reject(new Error("Confirm dialog rejected"))]}}))}))};t.A=u},48080:function(e,t,n){"use strict";n.d(t,{A:function(){return y}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(44962),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(90076),n(83994),n(23630),n(82367);var r=n(31234),i=n.n(r),o=n(22696),a=n.n(o),s=n(79754),l=n(36300),u=n(46782),c=n(10838),d=n(5898);function f(e){return f="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},f(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(10353),n(15453),n(98959);var y={show:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dialogOptions:{},buttons:[]},t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({removeOnClose:!0,scrollY:!1},e.dialogOptions),n=u.A.tv;n&&(t.size="fullscreen");var r=s.default.createDialog(t);r.classList.add("formDialog"),r.innerHTML=d.Ay.translateHtml('<div class="formDialogHeader formDialogHeader-clear justify-content-center"> <h1 class="formDialogHeaderTitle" style="margin-top:.5em;padding:0 1em"></h1> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered" style="padding-top:1em;padding-bottom:1em;text-align:center"> <div class="text"></div> </div> </div> <div class="formDialogFooter formDialogFooter-clear formDialogFooter-flex" style="margin:1em"></div> ',"core"),r.classList.add("align-items-center"),r.classList.add("justify-content-center");var o=r.querySelector(".formDialogContent");o.classList.add("no-grow"),n?(o.style["max-width"]="50%",o.style["max-height"]="60%",c.default.centerFocus.on(o,!1)):(o.style.maxWidth="".concat(Math.min(150*e.buttons.length+200,l.Ay.getWindowSize().innerWidth-50),"px"),r.classList.add("dialog-fullscreen-lowres")),e.title?r.querySelector(".formDialogHeaderTitle").innerText=e.title||"":r.querySelector(".formDialogHeaderTitle").classList.add("hide");var f,y,v=e.html||e.text||"";r.querySelector(".text").innerHTML=i().sanitize(v),v||r.querySelector(".dialogContentInner").classList.add("hide");var h,g="",b=!1;for(f=0,y=e.buttons.length;f<y;f++){var S=e.buttons[f],A=0===f?" autofocus":"",x="btnOption raised formDialogFooterItem formDialogFooterItem-autosize";S.type&&(x+=" button-".concat(S.type)),S.description&&(b=!0),b&&(x+=" formDialogFooterItem-vertical formDialogFooterItem-nomarginbottom"),g+='<button is="emby-button" type="button" class="'.concat(x,'" data-id="').concat(S.id,'"').concat(A,">").concat(a()(S.name),"</button>"),S.description&&(g+='<div class="formDialogFooterItem formDialogFooterItem-autosize fieldDescription" style="margin-top:.25em!important;margin-bottom:1.25em!important;">'.concat(S.description,"</div>"))}function w(){h=this.getAttribute("data-id"),s.default.close(r)}r.querySelector(".formDialogFooter").innerHTML=g,b&&r.querySelector(".formDialogFooter").classList.add("formDialogFooter-vertical");var P=r.querySelectorAll(".btnOption");for(f=0,y=P.length;f<y;f++)P[f].addEventListener("click",w);return s.default.open(r).then((function(){return n&&c.default.centerFocus.off(r.querySelector(".formDialogContent"),!1),h||Promise.reject()}))}("string"==typeof e?{title:t,text:e}:e)}}},50921:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var r=n(45251);function i(e,t){var n,i;void 0===t&&(t=!0);var o,a=null==e?void 0:e.Name;if((null==e?void 0:e.MediaType)===r.z.Video&&(null!=e.IndexNumber&&(a=e.IndexNumber+" - "+a),null!=e.ParentIndexNumber&&(a=e.ParentIndexNumber+"."+a)),(null===(n=null==e?void 0:e.ArtistItems)||void 0===n?void 0:n.length)?o=e.ArtistItems.map((function(e){return e.Name})).join(", "):(null===(i=null==e?void 0:e.Artists)||void 0===i?void 0:i.length)?o=e.Artists.join(", "):(null==e?void 0:e.SeriesName)||(null==e?void 0:e.Album)?(o=a,a=e.SeriesName||e.Album):(null==e?void 0:e.ProductionYear)&&t&&(o=String(e.ProductionYear)),a){var s=[a];return o&&s.push(o),s}}},51218:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var r=n(19373),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=function(e,t){switch(t){case r.u.Dashboard:return n(38601)("./".concat(e));case r.u.Experimental:return n(29561)("./".concat(e));case r.u.Stable:return n(92950)("./".concat(e))}},a=function(e){var t=e.path,n=e.page,a=e.type,s=void 0===a?r.u.Stable:a;return{path:t,lazy:function(){return e=void 0,r=void 0,l=function(){var e,r,a;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(l){switch(l.label){case 0:return[4,o(null!=n?n:t,s)];case 1:return e=l.sent(),r=e.default,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["default"]),[2,i({Component:r},a)]}}))},new((a=void 0)||(a=Promise))((function(t,n){function i(e){try{s(l.next(e))}catch(e){n(e)}}function o(e){try{s(l.throw(e))}catch(e){n(e)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(e){e(n)}))).then(i,o)}s((l=l.apply(e,r||[])).next())}));var e,r,a,l}}}},51876:function(e,t,n){"use strict";n.d(t,{$A:function(){return f},$D:function(){return h},Io:function(){return d},T5:function(){return b},Ve:function(){return p},x0:function(){return g},xy:function(){return S}}),n(29305),n(32733),n(84701),n(2623),n(69703),n(44962),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(82367);var r,i=n(68272),o=n(74659);function a(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,a=0,s=e,f.n=n,l}};function p(n,r){for(a=n,s=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(a=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),a=c,s=m;(t=a<2?e:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(u=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==l)break}catch(t){o=e,a=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(s(t={},r,(function(){return this})),t),p=d.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,i,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=d,s(p,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(p),s(p,i,"Generator"),s(p,r,(function(){return this})),s(p,"toString",(function(){return"[object Generator]"})),(a=function(){return{w:o,m:m}})()}function s(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}s=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){s(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},s(e,t,n,r)}function l(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function u(){return c.apply(this,arguments)}function c(){var e;return e=a().m((function e(){var t,n;return a().w((function(e){for(;;)switch(e.n){case 0:if(!r){e.n=1;break}return e.a(2,Promise.resolve(r));case 1:return e.p=1,e.n=2,(0,o.A)("config.json",{cache:"no-store"});case 2:if((t=e.v).ok){e.n=3;break}throw new Error("network response was not ok");case 3:return e.n=4,t.json();case 4:return r=e.v,e.a(2,r);case 5:return e.p=5,n=e.v,console.warn("failed to fetch the web config file:",n),r=i,e.a(2,r)}}),e,null,[[1,5]])})),c=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){l(o,r,i,a,s,"next",e)}function s(e){l(o,r,i,a,s,"throw",e)}a(void 0)}))},c.apply(this,arguments)}function d(){return u().then((function(e){return!!e.includeCorsCredentials})).catch((function(e){return console.log("cannot get web config:",e),!1}))}function f(){return u().then((function(e){return!!e.multiserver})).catch((function(e){return console.log("cannot get web config:",e),!1}))}function p(){return u().then((function(e){return e.servers||[]})).catch((function(e){return console.log("cannot get web config:",e),[]}))}var m={name:"Dark",id:"dark",default:!0},y=m,v=function(e){if(e){var t=e.find((function(e){return e.default}));if(t)return void(y=t)}y=m};function h(){return u().then((function(e){Array.isArray(e.themes)||console.error("web config is invalid, missing themes:",e);var t=Array.isArray(e.themes)?e.themes:i.themes;return v(t),t})).catch((function(e){return console.log("cannot get web config:",e),v(),i.themes}))}var g=function(){return y};function b(){return u().then((function(e){return e.menuLinks||console.error("web config is invalid, missing menuLinks:",e),e.menuLinks||[]})).catch((function(e){return console.log("cannot get web config:",e),[]}))}function S(){return u().then((function(e){return e.plugins||console.error("web config is invalid, missing plugins:",e),e.plugins||i.plugins})).catch((function(e){return console.log("cannot get web config:",e),i.plugins}))}},53089:function(e,t,n){"use strict";function r(e,t){if(!e)return!0;var n=!1;return"string"==typeof e&&(e.startsWith("-")&&(n=!0,e=e.substring(1)),e=e.split(",")),!(e=e.filter((function(e){return e}))).length||("string"==typeof t&&(t=t.split(",")),(t=t.filter((function(e){return e}))).some((function(t){return e.includes(t)}))?!n:n)}n.d(t,{q:function(){return r}})},54048:function(e,t,n){"use strict";n(14382),n(9698),n(78557);var r=n(5898),i=n(67430),o=n(10736),a=n(44797);n(10353),t.A=function(e){function t(){i.tF.getApiClient(f).getScheduledTasks({IsEnabled:!0}).then(n)}function n(t){var n=t.filter((function(t){return t.Key==e.taskKey}))[0];if(e.panel&&(n?e.panel.classList.remove("hide"):e.panel.classList.add("hide")),n){"Idle"==n.State?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled"),d.setAttribute("data-taskid",n.Id);var i=(n.CurrentProgressPercentage||0).toFixed(1);if(e.progressElem&&(e.progressElem.value=i,"Running"==n.State?e.progressElem.classList.remove("hide"):e.progressElem.classList.add("hide")),e.lastResultElem){var o=n.LastExecutionResult?n.LastExecutionResult.Status:"";"Failed"==o?e.lastResultElem.html('<span style="color:#FF0000;">('+r.Ay.translate("LabelFailed")+")</span>"):"Cancelled"==o?e.lastResultElem.html('<span style="color:#0026FF;">('+r.Ay.translate("LabelCancelled")+")</span>"):"Aborted"==o?e.lastResultElem.html('<span style="color:#FF0000;">'+r.Ay.translate("LabelAbortedByServerShutdown")+"</span>"):e.lastResultElem.html(o)}}}function s(){var e;e=this.getAttribute("data-taskid"),i.tF.getApiClient(f).startScheduledTask(e).then(t)}function l(e,t,r){t.serverId()===f&&n(r)}var u,c,d=e.button,f=ApiClient.serverId();e.panel&&e.panel.classList.add("hide"),"off"==e.mode?(d.removeEventListener("click",s),a.A.off(o.default,"ScheduledTasksInfo",l),i.tF.getApiClient(f).sendMessage("ScheduledTasksInfoStop"),u&&clearInterval(u)):(d.addEventListener("click",s),t(),c=i.tF.getApiClient(f),u&&clearInterval(u),c.sendMessage("ScheduledTasksInfoStart","1000,1000"),u=setInterval((function(){i.tF.getApiClient(f).isMessageChannelOpen()||t()}),5e3),a.A.on(o.default,"ScheduledTasksInfo",l))}},55219:function(e,t,n){"use strict";var r=n(25127),i=n(63696),o=n(87404),a=n(5898),s=n(62156),l=n(19373),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},f=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},p=function(e,t,r){switch(e){case l.u.Dashboard:return Promise.all([n(74370)("./".concat(t)),n(74370)("./".concat(r)).then((function(e){return a.Ay.translateHtml(e)}))]);case l.u.Wizard:return Promise.all([n(89599)("./".concat(t)),n(89599)("./".concat(r)).then((function(e){return a.Ay.translateHtml(e)}))]);default:return Promise.all([n(7062)("./".concat(t)),n(7062)("./".concat(r)).then((function(e){return a.Ay.translateHtml(e)}))])}},m=function(e,t,n,r){return c(void 0,void 0,void 0,(function(){var i,o,a;return d(this,(function(l){switch(l.label){case 0:return[4,p(e,t,n)];case 1:return i=f.apply(void 0,[l.sent(),2]),o=i[0],a=i[1],s.A.loadView(u(u({},r),{controllerFactory:o,view:a})),[2]}}))}))};t.A=function(e){var t=e.appType,n=void 0===t?l.u.Stable:t,a=e.controller,u=e.view,f=e.type,p=e.isFullscreen,y=void 0!==p&&p,v=e.isNowPlayingBarEnabled,h=void 0===v||v,g=e.isThemeMediaSupported,b=void 0!==g&&g,S=e.transition,A=(0,o.zy)(),x=(0,o.wQ)();return(0,i.useEffect)((function(){var e;e={url:A.pathname+A.search,type:f,state:A.state,autoFocus:!1,fullscreen:y,transition:S,options:{supportsThemeMedia:b,enableMediaControl:h}},x!==r.rc.Pop?(console.debug("[ViewManagerPage] loading view [%s]",u),m(n,a,u,e)):(console.debug("[ViewManagerPage] restoring view [%s]",u),s.A.tryRestoreView(e).catch((function(t){return c(void 0,void 0,void 0,(function(){return d(this,(function(r){return(null==t?void 0:t.cancelled)?[2]:(console.debug("[ViewManagerPage] restore failed; loading view [%s]",u),[2,m(n,a,u,e)])}))}))})))}),[a,u,f,y,h,b,S,A.pathname,A.search]),null}},56419:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(62540),i=(n(63696),n(87404)),o=n(13258),a=n(78057),s=n(30224);function l(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{children:(0,r.jsx)(i.sv,{})}),(0,r.jsx)(s.A,{}),(0,r.jsx)(a.A,{})]})}},57178:function(e,t,n){"use strict";var r;n.d(t,{g:function(){return r}}),function(e){e.Error="error",e.FullscreenChange="fullscreenchange",e.ItemStarted="itemstarted",e.ItemStopped="itemstopped",e.MediaStreamsChange="mediastreamschange",e.Pause="pause",e.PlaybackStart="playbackstart",e.PlaybackStop="playbackstop",e.PlaylistItemAdd="playlistitemadd",e.PlaylistItemMove="playlistitemmove",e.PlaylistItemRemove="playlistitemremove",e.PromptSkip="promptskip",e.RepeatModeChange="repeatmodechange",e.ShuffleModeChange="shufflequeuemodechange",e.StateChange="statechange",e.Stopped="stopped",e.TimeUpdate="timeupdate",e.Unpause="unpause",e.VolumeChange="volumechange"}(r||(r={}))},57634:function(e,t,n){"use strict";n.d(t,{A:function(){return T},L:function(){return j}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(69892),n(76281),n(84734),n(44962),n(86584),n(89336),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(96054),n(95021),n(73687),n(99425),n(83994),n(93062),n(64062),n(23630),n(82367);var r,i,o,a=n(34789),s=n(90381),l=n(82885);function u(e){return u="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},u(e)}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){return!!(a.A.tizen||a.A.xboxOne||a.A.web0s||t.supportsHevc)||!a.A.ps4&&!!e.canPlayType&&(e.canPlayType('video/mp4; codecs="hvc1.1.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hev1.1.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hvc1.1.0.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hev1.1.0.L120"').replace(/no/,""))}function v(e){return a.A.tizenVersion>=5.5||a.A.web0sVersion>=5||!!e.canPlayType&&e.canPlayType('video/mp4; codecs="av01.0.15M.08"').replace(/no/,"")&&e.canPlayType('video/mp4; codecs="av01.0.15M.10"').replace(/no/,"")}function h(){return null==o&&(o=g()||null!=window.MediaSource),o}function g(){if(a.A.tizen)return!0;var e=document.createElement("video");return!(!e.canPlayType("application/x-mpegURL").replace(/no/,"")&&!e.canPlayType("application/vnd.apple.mpegURL").replace(/no/,""))}function b(e){return!!(a.A.edgeUwp||a.A.tizen||a.A.web0s)||!(a.A.iOS&&a.A.iOSVersion<11)&&e.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/,"")}function S(e){return!(!a.A.tizen&&!a.A.web0s)||!(a.A.iOS&&a.A.iOSVersion<11)&&e.canPlayType('audio/mp4; codecs="ec-3"').replace(/no/,"")}function A(e){var t;if("flac"===e||"asf"===e){if(a.A.tizen||a.A.web0s||a.A.edgeUwp)return!0}else if("wma"===e){if(a.A.tizen||a.A.edgeUwp)return!0}else if("opus"===e){if(a.A.web0s)return a.A.web0sVersion>=3.5;t='audio/ogg; codecs="opus"'}else if("alac"===e){if(a.A.iOS||a.A.osx&&a.A.safari)return!0}else if("mp2"===e)return!1;return"webma"===e?t="audio/webm":"mp2"===e?t="audio/mpeg":t||(t="audio/"+e),!!document.createElement("audio").canPlayType(t).replace(/no/,"")}function x(){return a.A.tizen||a.A.web0s||a.A.edgeUwp}function w(e){return a.A.tizen||a.A.web0s||a.A.edgeUwp||e.canPlayType('video/mp4; codecs="vc-1"').replace(/no/,"")}function P(e){var t;return null!==(t=e.supportsHdr10)&&void 0!==t?t:a.A.vidaa||a.A.tizen||a.A.web0s||a.A.safari&&(a.A.iOS&&a.A.iOSVersion>=11||a.A.osx)||a.A.edgeChromium&&a.A.versionMajor>=121||a.A.chrome&&!a.A.mobile||a.A.firefox&&a.A.osx&&!a.A.iphone&&!a.A.ipod&&!a.A.ipad&&a.A.versionMajor>=100}function k(e){var t;return null!==(t=e.supportsDolbyVision)&&void 0!==t?t:a.A.safari&&(a.A.iOS&&a.A.iOSVersion>=13||a.A.osx)}var I=null;function j(e){return!!e.audioTracks&&!a.A.firefox&&(a.A.tizenVersion>=5.5&&a.A.tizenVersion<8||!a.A.tizen)&&(a.A.web0sVersion>=4||!a.A.web0sVersion)}function T(e){var t;e=e||{};var n=12e7,o=document.createElement("video"),u=function(e,t){var n=parseInt(l.allowedAudioChannels(),10);if(n>0)return n;if(e.audioChannels)return e.audioChannels;var r=a.A.safari||a.A.chrome||a.A.edgeChromium||a.A.firefox||a.A.tv||a.A.ps4||a.A.xboxOne,i=b(t)||S(t),o=function(){if(null!=I)return I;I=-1;var e=window.AudioContext||window.webkitAudioContext||!1;if(e){var t=new e;I=t.destination.maxChannelCount}return I}();return i&&r?o>6?o:6:o>2?r?o:2:o>0?o:r?6:2}(e,o),d=o.canPlayType('video/webm; codecs="vp8"').replace(/no/,""),f=o.canPlayType('video/webm; codecs="vp9"').replace(/no/,""),m=a.A.safari&&a.A.versionMajor>=17&&!!document.createElement("audio").canPlayType('audio/x-caf; codecs="opus"').replace(/no/,""),T=["vorbis"],C=function(e){return!(a.A.vidaa||!a.A.tizen&&!a.A.web0s&&!e.canPlayType("video/x-matroska").replace(/no/,"")&&!e.canPlayType("video/mkv").replace(/no/,"")&&(!a.A.edgeChromium||!a.A.windows)&&!a.A.edgeUwp)}(o),E={MaxStreamingBitrate:n,MaxStaticBitrate:1e8,MusicStreamingTranscodingBitrate:Math.min(n,384e3),DirectPlayProfiles:[]},_=[],L=[],M=[],O=o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.69"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.6B"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="avc1.640029, mp3"').replace(/no/,""),R=e.supportsMp2VideoAudio;null==R&&(R=a.A.edgeUwp||a.A.tizen||a.A.web0s,O&&(a.A.chrome||a.A.edgeChromium||a.A.firefox&&a.A.versionMajor>=83)&&(R=!0),a.A.android&&(R=!1));var D=a.A.xboxOne?null===(t=window.screen)||void 0===t?void 0:t.width:null;e.maxVideoWidth&&(D=e.maxVideoWidth);var N=o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/,""),F=function(e){return!!e.canPlayType&&(e.canPlayType('application/x-mpegurl; codecs="avc1.64001E, mp4a.40.34"').replace(/no/,"")||e.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.64001E, mp4a.40.34"').replace(/no/,""))}(o),U=b(o),V=S(o),B=function(e){return!(a.A.web0sVersion>=4)&&(!(!a.A.tizen&&!a.A.web0s)||!!e.canPlayType&&(e.canPlayType('application/x-mpegurl; codecs="avc1.42E01E, ac-3"').replace(/no/,"")||e.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.42E01E, ac-3"').replace(/no/,"")))}(o);N&&(_.push("aac"),L.push("aac"),M.push("aac")),O&&_.push("mp3"),(a.A.safari||O&&!a.A.ps4)&&L.push("mp3"),F&&M.push("mp3"),U&&(_.push("ac3"),a.A.edgeChromium&&M.push("ac3"),V&&(_.push("eac3"),a.A.edgeChromium&&M.push("eac3")),B&&(L.push("ac3"),M.push("ac3"),V&&(L.push("eac3"),M.push("eac3")))),R&&(_.push("mp2"),L.push("mp2"),M.push("mp2"));var z=s.A.enableDts()||e.supportsDts;null==z&&(z=function(e){return!(a.A.tizenVersion>=4||a.A.web0sVersion>=5&&a.A.web0sVersion<23)&&(!(!e.canPlayType('video/mp4; codecs="dts-"').replace(/no/,"")&&!e.canPlayType('video/mp4; codecs="dts+"').replace(/no/,""))||null)}(o)),z&&(_.push("dca"),_.push("dts")),(a.A.tizen||a.A.web0s)&&(_.push("pcm_s16le"),_.push("pcm_s24le")),(s.A.enableTrueHd()||e.supportsTrueHd)&&_.push("truehd"),a.A.tizen&&_.push("aac_latm"),A("opus")?(_.push("opus"),T.push("opus"),a.A.tizen&&L.push("opus"),M.push("opus")):m&&(_.push("opus"),T.push("opus"),M.push("opus")),A("flac")&&!a.A.tizen&&(_.push("flac"),M.push("flac")),A("alac")&&(_.push("alac"),M.push("alac")),_=_.filter((function(t){return-1===(e.disableVideoAudioCodecs||[]).indexOf(t)})),L=L.filter((function(t){return-1===(e.disableHlsVideoAudioCodecs||[]).indexOf(t)})),M=M.filter((function(t){return-1===(e.disableHlsVideoAudioCodecs||[]).indexOf(t)}));var q=[],H=[],G=[],W=[];v(o)&&(a.A.safari||!a.A.mobile&&(a.A.edgeChromium||a.A.firefox||a.A.chrome||a.A.opera))&&W.push("av1"),y(o,e)&&(a.A.edgeChromium||a.A.safari||a.A.tizen||a.A.web0s||a.A.chrome&&(!a.A.android||a.A.versionMajor>=105)||a.A.opera&&!a.A.mobile||a.A.firefox&&a.A.versionMajor>=134)&&W.push("hevc"),function(e){var t;return!(null===(t=e.canPlayType)||void 0===t||!t.call(e,'video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,""))}(o)&&(q.push("h264"),G.push("h264"),W.push("h264")),y(o,e)&&(q.push("hevc"),(a.A.tizen||a.A.web0s||a.A.vidaa)&&G.push("hevc")),x()&&q.push("mpeg2video"),w(o)&&q.push("vc1"),a.A.tizen&&q.push("msmpeg4v2"),d&&H.push("vp8"),f&&(a.A.iOS||a.A.firefox&&a.A.osx||q.push("vp9"),(a.A.safari||a.A.edgeChromium||a.A.chrome||a.A.firefox)&&W.push("vp9"),(!a.A.safari||a.A.safari&&a.A.versionMajor>=15&&a.A.versionMajor<17)&&H.push("vp9")),v(o)&&(q.push("av1"),(!a.A.safari||a.A.safari&&a.A.versionMajor>=15&&a.A.versionMajor<17)&&H.push("av1")),(!a.A.safari&&d||a.A.tizen)&&_.push("vorbis"),H.length&&E.DirectPlayProfiles.push({Container:"webm",Type:"Video",VideoCodec:H.join(","),AudioCodec:T.join(",")}),q.length&&E.DirectPlayProfiles.push({Container:"mp4,m4v",Type:"Video",VideoCodec:q.join(","),AudioCodec:_.join(",")}),C&&q.length&&E.DirectPlayProfiles.push({Container:"mkv",Type:"Video",VideoCodec:q.join(","),AudioCodec:_.join(",")}),["m2ts","wmv","ts","asf","avi","mpg","mpeg","flv","3gp","mts","trp","vob","vro","mov"].map((function(t){return function(e,t,n,r){var i=!1,o=e,s=[];switch(e){case"asf":case"wmv":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,t=[];break;case"avi":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,a.A.tizenVersion>=4&&(s.push("h264"),y(n,r)&&s.push("hevc"));break;case"mpg":case"mpeg":i=a.A.tizen||a.A.web0s||a.A.edgeUwp;break;case"flv":case"3gp":case"mts":case"trp":case"vob":case"vro":i=a.A.tizen;break;case"mov":i=a.A.safari||a.A.tizen||a.A.web0s||a.A.chrome||a.A.edgeChromium||a.A.edgeUwp,s.push("h264");break;case"m2ts":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,s.push("h264"),w(n)&&s.push("vc1"),x()&&s.push("mpeg2video");break;case"ts":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,s.push("h264"),(a.A.tizen||a.A.web0s)&&y(n,r)&&s.push("hevc"),w(n)&&s.push("vc1"),x()&&s.push("mpeg2video"),o="ts,mpegts"}return i?{Container:o,Type:"Video",VideoCodec:s.join(","),AudioCodec:t.join(",")}:null}(t,_,o,e)})).filter((function(e){return null!=e})).forEach((function(e){E.DirectPlayProfiles.push(e)})),["opus","mp3","mp2","aac","flac","alac","webma","wma","wav","ogg","oga"].filter(A).forEach((function(e){"mp3"!=e||F||E.DirectPlayProfiles.push({Container:"ts",AudioCodec:"mp3",Type:"Audio"}),"flac"===e&&s.A.alwaysRemuxFlac()?E.DirectPlayProfiles.push({Container:"mp4",AudioCodec:"flac",Type:"Audio"}):"mp3"===e&&s.A.alwaysRemuxMp3()||E.DirectPlayProfiles.push({Container:e,Type:"Audio"}),"opus"!==e&&"webma"!==e||E.DirectPlayProfiles.push({Container:"webm",AudioCodec:e,Type:"Audio"}),"aac"!==e&&"alac"!==e||(E.DirectPlayProfiles.push({Container:"m4a",AudioCodec:e,Type:"Audio"}),E.DirectPlayProfiles.push({Container:"m4b",AudioCodec:e,Type:"Audio"}))})),m&&E.DirectPlayProfiles.push({Container:"mp4",AudioCodec:"opus",Type:"Audio"}),E.TranscodingProfiles=[];var Y=a.A.iOS||a.A.osx||a.A.edge||!g(),Q=l.preferFmp4HlsContainer();if((a.A.safari||a.A.tizen||a.A.web0s)&&!(a.A.tizenVersion>=5||a.A.web0sVersion>=3.5||a.A.iOS&&a.A.iOSVersion>=11||a.A.osx)&&(Q=!1),h()&&!1!==a.A.enableHlsAudio&&E.TranscodingProfiles.push({Container:Q?"mp4":"ts",Type:"Audio",AudioCodec:"aac",Context:"Streaming",Protocol:"hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2":"1",BreakOnNonKeyFrames:Y,EnableAudioVbrEncoding:!s.A.disableVbrAudio()}),["aac","mp3","opus","wav"].filter(A).forEach((function(e){E.TranscodingProfiles.push({Container:e,Type:"Audio",AudioCodec:e,Context:"Streaming",Protocol:"http",MaxAudioChannels:u.toString()})})),["opus","mp3","aac","wav"].filter(A).forEach((function(e){E.TranscodingProfiles.push({Container:e,Type:"Audio",AudioCodec:e,Context:"Static",Protocol:"http",MaxAudioChannels:u.toString()})})),h()&&!1!==e.enableHls){var K=l.limitSegmentLength();W.length&&M.length&&Q&&(E.DirectPlayProfiles.push({Container:"hls",Type:"Video",VideoCodec:W.join(","),AudioCodec:M.join(",")}),E.TranscodingProfiles.push({Container:"mp4",Type:"Video",AudioCodec:M.join(","),VideoCodec:W.join(","),Context:"Streaming",Protocol:"hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2":"1",BreakOnNonKeyFrames:Y,SegmentLength:K?1:void 0})),G.length&&L.length&&(E.DirectPlayProfiles.push({Container:"hls",Type:"Video",VideoCodec:G.join(","),AudioCodec:L.join(",")}),E.TranscodingProfiles.push({Container:"ts",Type:"Video",AudioCodec:L.join(","),VideoCodec:G.join(","),Context:"Streaming",Protocol:"hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2":"1",BreakOnNonKeyFrames:Y,SegmentLength:K?1:void 0}))}E.ContainerProfiles=[],a.A.tizen&&E.ContainerProfiles.push({Type:"Video",Conditions:[{Condition:"LessThanEqual",Property:"NumStreams",Value:"32",IsRequired:!1}]}),E.CodecProfiles=[];var J=j(o),X=[];o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.5"').replace(/no/,"")||X.push({Condition:"NotEquals",Property:"AudioProfile",Value:"HE-AAC"}),J||X.push({Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:!1}),X.length&&E.CodecProfiles.push({Type:"VideoAudio",Codec:"aac",Conditions:X});var $=[],Z=[];if(parseInt(l.allowedAudioChannels(),10)>0&&($.push({Condition:"LessThanEqual",Property:"AudioChannels",Value:u.toString(),IsRequired:!1}),Z.push({Condition:"LessThanEqual",Property:"AudioChannels",Value:u.toString(),IsRequired:!1})),J||Z.push({Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:!1}),$.length&&E.CodecProfiles.push({Type:"Audio",Conditions:$}),Z.length&&E.CodecProfiles.push({Type:"VideoAudio",Conditions:Z}),a.A.web0s){var ee,te=[{Condition:"LessThanEqual",Property:"AudioChannels",Value:"2",IsRequired:!1}];E.CodecProfiles.push({Type:"VideoAudio",Codec:"flac",Conditions:te});var ne=[];E.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(",");if(t.includes("flac")){var n=p({},e);n.AudioCodec="flac",n.ApplyConditions=[].concat(c(n.ApplyConditions||[]),te),ne.push(n),e.AudioCodec=t.filter((function(e){return"flac"!=e})).join(",")}}})),(ee=E.TranscodingProfiles).push.apply(ee,ne)}if(m){var re,ie=[{Condition:"LessThanEqual",Property:"AudioChannels",Value:"2",IsRequired:!1}];E.CodecProfiles.push({Type:"VideoAudio",Codec:"opus",Conditions:ie});var oe=[];E.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(",");if(t.includes("opus")){var n=p({},e);n.AudioCodec="opus",n.ApplyConditions=[].concat(c(n.ApplyConditions||[]),ie),oe.push(n),e.AudioCodec=t.filter((function(e){return"opus"!=e})).join(",")}}})),(re=E.TranscodingProfiles).push.apply(re,oe)}var ae=42,se="high|main|baseline|constrained baseline";(a.A.tizen||a.A.web0s||o.canPlayType('video/mp4; codecs="avc1.640833"').replace(/no/,""))&&(ae=51),(a.A.tizenVersion>=5&&window.NativeShell||o.canPlayType('video/mp4; codecs="avc1.640834"').replace(/no/,""))&&(ae=52),!o.canPlayType('video/mp4; codecs="avc1.6e0033"').replace(/no/,"")||a.A.safari||a.A.iOS||a.A.web0s||a.A.edge||a.A.mobile||a.A.tizen||(se+="|high 10");var le=120,ue="main";(o.canPlayType('video/mp4; codecs="hvc1.1.4.L123"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.1.4.L123"').replace(/no/,""))&&(le=123),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L123"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L123"').replace(/no/,""))&&(le=123,ue="main|main 10"),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L153"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L153"').replace(/no/,""))&&(le=153,ue="main|main 10"),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L183"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L183"').replace(/no/,""))&&(le=183,ue="main|main 10");var ce=15;o.canPlayType('video/mp4; codecs="av01.0.16M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.16M.10"').replace(/no/,"")&&(ce=16),o.canPlayType('video/mp4; codecs="av01.0.17M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.17M.10"').replace(/no/,"")&&(ce=17),o.canPlayType('video/mp4; codecs="av01.0.18M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.18M.10"').replace(/no/,"")&&(ce=18),o.canPlayType('video/mp4; codecs="av01.0.19M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.19M.10"').replace(/no/,"")&&(ce=19);var de="SDR",fe="SDR",pe="SDR";if(a.A.tizenVersion>=3&&(de+="|DOVIWithSDR"),P(e)&&(de+="|HDR10",fe+="|HDR10",pe+="|HDR10",(a.A.tizenVersion>=3||a.A.vidaa)&&(de+="|DOVIWithHDR10")),function(e){var t;return null!==(t=e.supportsHlg)&&void 0!==t?t:P(e)}(e)&&(de+="|HLG",fe+="|HLG",pe+="|HLG",a.A.tizenVersion>=3&&(de+="|DOVIWithHLG")),k(e)){var me=function(e){if(a.A.xboxOne)return[5,8];var t=[];return e.canPlayType&&(e.canPlayType('video/mp4; codecs="dvh1.05.06"').replace(/no/,"")&&t.push(5),(e.canPlayType('video/mp4; codecs="dvh1.08.06"').replace(/no/,"")||a.A.web0sVersion>=4)&&t.push(8)),t}(o);me.includes(5)&&(de+="|DOVI"),me.includes(8)&&(de+="|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR"),function(e){var t;return null===(t=e.canPlayType)||void 0===t?void 0:t.call(e,'video/mp4; codecs="dav1.10.06"').replace(/no/,"")}(o)&&(pe+="|DOVI|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR")}var ye=[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:se,IsRequired:!1},{Condition:"EqualsAny",Property:"VideoRangeType",Value:"SDR",IsRequired:!1},{Condition:"LessThanEqual",Property:"VideoLevel",Value:ae.toString(),IsRequired:!1}],ve=[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:ue,IsRequired:!1},{Condition:"EqualsAny",Property:"VideoRangeType",Value:de,IsRequired:!1},{Condition:"LessThanEqual",Property:"VideoLevel",Value:le.toString(),IsRequired:!1}],he=[{Condition:"EqualsAny",Property:"VideoRangeType",Value:fe,IsRequired:!1}],ge=[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:"main",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoRangeType",Value:pe,IsRequired:!1},{Condition:"LessThanEqual",Property:"VideoLevel",Value:ce.toString(),IsRequired:!1}];a.A.edgeUwp||a.A.tizen||a.A.web0s||(ye.push({Condition:"NotEquals",Property:"IsInterlaced",Value:"true",IsRequired:!1}),ve.push({Condition:"NotEquals",Property:"IsInterlaced",Value:"true",IsRequired:!1})),D&&(ye.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}),ve.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}),ge.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}));var be=(function(){var e=!1;if(a.A.tizen)try{e=!webapis.productinfo.isUdPanelSupported(),console.debug("isTizenFhd = "+e)}catch(e){console.error("isUdPanelSupported() error code = "+e.code)}var t=null;return a.A.ps4?t=8e6:a.A.xboxOne?t=12e6:a.A.tizen&&e&&(t=2e7),t}()||"").toString(),Se=be,Ae=be,xe=be;if(Se&&ye.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:Se,IsRequired:!0}),Ae&&ve.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:Ae,IsRequired:!0}),xe&&ge.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:xe,IsRequired:!0}),a.A.safari&&(ve.push({Condition:"EqualsAny",Property:"VideoCodecTag",Value:"hvc1|dvh1",IsRequired:!0}),ve.push({Condition:"LessThanEqual",Property:"VideoFramerate",Value:"60",IsRequired:!0})),a.A.iOS&&a.A.iOSVersion<13){var we={Type:"Video",Codec:"h264",Container:"ts",Conditions:ye.filter((function(e){return"VideoLevel"!==e.Property}))};we.Conditions.push({Condition:"LessThanEqual",Property:"VideoLevel",Value:"42",IsRequired:!1}),E.CodecProfiles.push(we);var Pe={Type:"Video",Codec:"h264",Container:"mp4",Conditions:ye.filter((function(e){return"VideoLevel"!==e.Property}))};Pe.Conditions.push({Condition:"LessThanEqual",Property:"VideoLevel",Value:"42",IsRequired:!1}),E.CodecProfiles.push(Pe)}a.A.safari&&s.A.enableHi10p()&&E.CodecProfiles.push({Type:"Video",Container:"hls",SubContainer:"mp4",Codec:"h264",Conditions:[{Condition:"EqualsAny",Property:"VideoProfile",Value:se+"|high 10",IsRequired:!1}]}),E.CodecProfiles.push({Type:"Video",Codec:"h264",Conditions:ye}),a.A.web0s&&k(e)&&E.CodecProfiles.push({Type:"Video",Container:"-mp4,ts",Codec:"hevc",Conditions:[{Condition:"EqualsAny",Property:"VideoRangeType",Value:de.split("|").filter((function(e){return!e.startsWith("DOVI")})).join("|"),IsRequired:!1}]}),E.CodecProfiles.push({Type:"Video",Codec:"hevc",Conditions:ve}),E.CodecProfiles.push({Type:"Video",Codec:"vp9",Conditions:he}),E.CodecProfiles.push({Type:"Video",Codec:"av1",Conditions:ge});var ke=[];be&&ke.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:be}),D&&ke.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}),ke.length&&E.CodecProfiles.push({Type:"Video",Conditions:ke}),E.SubtitleProfiles=[];var Ie=s.A.get("subtitleburnin"),je="true"===s.A.get("subtitlerenderpgs");return"all"!==Ie&&((a.A.tizen||(null==r&&(r=null!=document.createElement("video").textTracks),r))&&E.SubtitleProfiles.push({Format:"vtt",Method:"External"}),!1===e.enableSsaRender||e.isRetry||"allcomplexformats"===Ie||(E.SubtitleProfiles.push({Format:"ass",Method:"External"}),E.SubtitleProfiles.push({Format:"ssa",Method:"External"})),null==i&&(i=null!=document.createElement("canvas").getContext("2d")),i&&!1!==e.enablePgsRender&&!e.isRetry&&je&&"allcomplexformats"!==Ie&&"onlyimageformats"!==Ie&&E.SubtitleProfiles.push({Format:"pgssub",Method:"External"})),E.ResponseProfiles=[],E.ResponseProfiles.push({Type:"Video",Container:"m4v",MimeType:"video/mp4"}),E}},58180:function(e,t,n){"use strict";n.d(t,{B1:function(){return f},EK:function(){return k},HI:function(){return g},JN:function(){return w},JQ:function(){return p},Oy:function(){return A},X9:function(){return I},Y3:function(){return u},ZB:function(){return x},bR:function(){return m},di:function(){return v},iP:function(){return c},jK:function(){return y},n8:function(){return b},qQ:function(){return d},qh:function(){return j},si:function(){return S},we:function(){return P}}),n(24776),n(44962),n(94),n(78557),n(90076),n(95021),n(83994),n(93062),n(23630),n(82367),n(24362),n(76218),n(99102);var r,i,o=n(90381),a=n(34789),s=n(44797),l=n(80262);function u(){return o.A.get("volume")||1}function c(e){e&&o.A.set("volume",e)}function d(e){return e.IsRemote?null:"anonymous"}function f(e,t){return!(a.A.iOS||!a.A.safari||!e.MediaStreams.some((function(e){return"vp9"===e.Codec})))||p(e.RunTimeTicks,t)}function p(e,t){if(null==window.MediaSource)return!1;if(a.A.iOS)return!1;if(a.A.web0sVersion>=4)return!0;if(a.A.tizen||a.A.web0s)return!1;if((n=document.createElement("video")).canPlayType("application/x-mpegURL").replace(/no/,"")||n.canPlayType("application/vnd.apple.mpegURL").replace(/no/,"")){if(a.A.android&&("Audio"===t||"Video"===t))return!0;if(e)return!1}var n;return!0}function m(e,t){var n,o=e._hlsPlayer;if(o){var a=Date.now();null!==(n=window.performance)&&void 0!==n&&n.now&&(a=performance.now()),!r||a-r>3e3?(r=a,console.debug("try to recover media Error ..."),o.recoverMediaError()):!i||a-i>3e3?(i=a,console.debug("try to swap Audio Codec and recover media Error ..."),o.swapAudioCodec(),o.recoverMediaError()):(console.error("cannot recover, last media error recovery failed ..."),t?t():y(e,l.F.FATAL_HLS_ERROR))}}function y(e,t){e.destroyCustomTrack&&e.destroyCustomTrack(e._mediaElement),s.A.trigger(e,"error",[{type:t}])}function v(e){return e&&!isNaN(e)&&e!==Number.POSITIVE_INFINITY&&e!==Number.NEGATIVE_INFINITY}function h(e,t){Math.abs((e.currentTime||0)-t)>=1&&(e.currentTime=t)}function g(e,t,n,r){var i=(n||0)/1e7;if(i)if(t.duration>=i)h(t,i),r&&r();else{var o=["durationchange","loadeddata","play","loadedmetadata"],a=function(e){0===t.currentTime&&t.duration>=i&&(console.debug("seeking to ".concat(i," on ").concat(e.type," event")),h(t,i),o.forEach((function(e){t.removeEventListener(e,a)})),r&&r())};o.forEach((function(e){t.addEventListener(e,a)}))}}function b(e,t,n){var r;return window.Windows&&null!==(r=n.mediaSource)&&void 0!==r&&r.IsLocal?Windows.Storage.StorageFile.getFileFromPathAsync(n.url).then((function(t){var r=new Windows.Media.Playback.MediaPlaybackList,i=Windows.Media.Core.MediaSource.createFromStorageFile(t),o=(n.playerStartPositionTicks||0)/1e4;return r.items.append(new Windows.Media.Playback.MediaPlaybackItem(i,o)),e.src=URL.createObjectURL(r,{oneTimeOnly:!0}),Promise.resolve()})):(e.src=t,Promise.resolve())}function S(e){e.src="",e.innerHTML="",e.removeAttribute("src")}function A(e,t){try{return e.play().catch((function(e){var t=(e.name||"").toLowerCase();return"notallowederror"===t||"aborterror"===t?Promise.resolve():Promise.reject(e)})).then((function(){return function(e,t){e.addEventListener("error",t)}(e,t),Promise.resolve()}))}catch(e){return console.error("error calling video.play: "+e),Promise.reject()}}function x(e){var t=e._castPlayer;if(t){try{t.unload()}catch(e){console.error(e)}e._castPlayer=null}}function w(e){var t=e._hlsPlayer;if(t){try{t.destroy()}catch(e){console.error(e)}e._hlsPlayer=null}}function P(e){var t=e._flvPlayer;if(t){try{t.unload(),t.detachMediaElement(),t.destroy()}catch(e){console.error(e)}e._flvPlayer=null}}function k(e,t,n,r,i,o){t.on(Hls.Events.MANIFEST_PARSED,(function(){A(n,r).then(i,(function(){o&&(o(),o=null)}))})),t.on(Hls.Events.ERROR,(function(n,r){var i;if(console.error("HLS Error: Type: "+r.type+" Details: "+(r.details||"")+" Fatal: "+(r.fatal||!1)),r.type===Hls.ErrorTypes.NETWORK_ERROR&&null!==(i=r.response)&&void 0!==i&&i.code&&r.response.code>=400)return console.debug("hls.js response error code: "+r.response.code),t.destroy(),void(o?(o(l.F.SERVER_ERROR),o=null):y(e,l.F.SERVER_ERROR));if(r.fatal)switch(r.type){case Hls.ErrorTypes.NETWORK_ERROR:r.response&&0===r.response.code?(console.debug("hls.js response error code: "+r.response.code),t.destroy(),o?(o(l.F.NETWORK_ERROR),o=null):y(e,l.F.NETWORK_ERROR)):(console.debug("fatal network error encountered, try to recover"),t.startLoad());break;case Hls.ErrorTypes.MEDIA_ERROR:console.debug("fatal media error encountered, try to recover"),m(e,o),o=null;break;default:console.debug("Cannot recover from hls error - destroy and trigger error"),t.destroy(),o?(o(),o=null):y(e,l.F.FATAL_HLS_ERROR)}}))}function I(e,t,n){t.removeEventListener("error",n),S(t),w(e),P(e),x(e);var r={src:e._currentSrc};s.A.trigger(e,"stopped",[r]),e._currentTime=null,e._currentSrc=null,e._currentPlayOptions=null}function j(e,t){var n,r=[],i=t.buffered||[],o=e._currentPlayOptions;o&&(n=o.transcodingOffsetTicks),n=n||0;for(var a=0,s=i.length;a<s;a++){var l=i.start(a),u=i.end(a);v(l)||(l=0),v(u)?r.push({start:1e7*l+n,end:1e7*u+n}):u=0}return r}},58953:function(e,t,n){"use strict";function r(){return!("object"!=typeof Intl||!Intl||"function"!=typeof Intl.NumberFormat)}function i(e,t){return Math.floor(Math.random()*(t-e+1))+e}function o(e,t){return r()?e.toLocaleString(t):e.toString()}function a(e,t){return null==e?"":r()?e.toLocaleString(t,{style:"percent",maximumFractionDigits:0}):"".concat(Math.round(100*e),"%")}function s(e){return Number.isInteger(e)?0:e.toString().split(".")[1].length}n.d(t,{HO:function(){return i},WZ:function(){return o},a4:function(){return a},lf:function(){return s}})},58961:function(e,t,n){"use strict";n.d(t,{u:function(){return o}});var r=n(11444),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=i(i({},r.D),{Timer:"Timer",SeriesTimer:"SeriesTimer",AudioPodcast:"AudioPodcast"})},60182:function(e,t,n){"use strict";n.d(t,{AQ:function(){return u},IB:function(){return l}});var r=n(62540),i=n(63696),o=n(68272),a=n(74659),s=(0,i.createContext)(o),l=function(){return(0,i.useContext)(s)},u=function(e){var t=e.children,n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)(o),2),l=n[0],u=n[1];return(0,i.useEffect)((function(){var e,t,n,r;(e=void 0,t=void 0,n=void 0,r=function(){var e,t,n;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(0,a.A)("config.json",{cache:"no-store"})];case 1:if(!(e=r.sent()).ok)throw new Error("network response was not ok");return[4,e.json()];case 2:return t=r.sent(),u(t),[3,4];case 3:return n=r.sent(),console.warn("[WebConfigProvider] failed to fetch config file",n),[3,4];case 4:return[2]}}))},new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))).catch((function(){}))}),[u]),(0,r.jsx)(s.Provider,{value:l,children:t})}},62156:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(84734),n(44962),n(4754),n(94),n(36947),n(78557),n(90076),n(95021),n(83994),n(93062),n(23630),n(82367),n(99102);var r,i,o=n(64963),a=n(9164),s=n(46782);function l(e){return l="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},l(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function d(e,t,n){r&&p(r,null,"viewhide"),r=e;var o=m(e,t,n);n?s.A.mobile||(e.activeElement&&document.body.contains(e.activeElement)&&a.A.isCurrentlyFocusable(e.activeElement)?a.A.focus(e.activeElement):a.A.autoFocus(e)):!1!==t.autoFocus&&a.A.autoFocus(e),e.dispatchEvent(new CustomEvent("viewshow",o)),i&&e.dispatchEvent(new CustomEvent("pageshow",o))}function f(e){var t=e.getAttribute("data-properties");return t?t.split(","):[]}function p(e,t,n,r){t||(t={detail:{type:e.getAttribute("data-type"),properties:f(e)},bubbles:!0,cancelable:r}),t.cancelable=r||!1;var o=e.dispatchEvent(new CustomEvent(n,t));return i&&(t.cancelable=!1,e.dispatchEvent(new CustomEvent(n.replace("view","page"),t))),o}function m(e,t,n){var r=t.state,i=t.url,o=t.options,a=void 0===o?{}:o,s=i.indexOf("?"),l=new URLSearchParams(i.substring(s+1)),u={};return l.forEach((function(e,t){u[t]=e})),{detail:{type:e.getAttribute("data-type"),properties:f(e),params:u,isRestored:n,state:r,options:a},bubbles:!0,cancelable:!1}}o.Ay.setOnBeforeChange((function(e,t,n){r&&p(r,null,"viewbeforehide",!0);var o=m(e,n,t);e.initComplete||(e.initComplete=!0,"function"==typeof n.controllerFactory?new n.controllerFactory(e,o.detail.params):n.controllerFactory&&"function"==typeof n.controllerFactory.default&&new n.controllerFactory.default(e,o.detail.params),n.controllerFactory&&!i||p(e,o,"viewinit")),p(e,o,"viewbeforeshow")})),document.addEventListener("skinunload",(function(){o.Ay.reset()}));var y=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"loadView",value:function(e){r&&(r.activeElement=document.activeElement),e.cancel||o.Ay.loadView(e).then((function(t){d(t,e)}))}},{key:"hideView",value:function(){r&&(p(r,null,"viewbeforehide"),p(r,null,"viewhide"),r.classList.add("hide"),r=null)}},{key:"tryRestoreView",value:function(e,t){return e.cancel?Promise.reject({cancelled:!0}):(r&&(r.activeElement=document.activeElement),o.Ay.tryRestoreView(e).then((function(n){t&&t(),d(n,e,!0)})))}},{key:"currentView",value:function(){return r}},{key:"dispatchPageEvents",value:function(e){i=e}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());y.dispatchPageEvents(!0),t.A=y},64963:function(e,t,n){"use strict";n(76281),n(84734),n(78557),n(90076),n(95021),n(99425),n(93062),n(97747);var r,i,o=n(19119),a=n(89100),s=function(){return document.querySelector(".mainAnimatedPages")};function l(e,t){if(t.controllerFactory)return Promise.resolve();var n=e.getAttribute("data-controller");if(n){0===n.indexOf("__plugin/")&&(n=n.substring(9)),n=a.default.getPluginUrl(n);var r=ApiClient.getUrl("/web/"+n);return(0,o.W)(r).then((function(e){t.controllerFactory=e}))}return Promise.resolve()}function u(e,t,n){for(var r=0,i=e.length;r<i;r++)t!==r&&n!==r&&e[r].classList.add("hide")}function c(e,t){for(var n=0,r=e.length;n<r;n++)t!==n&&e[n].classList.add("hide")}function d(){console.debug("[viewContainer] resetting view cache"),f=[],p=[];var e=s();e&&(e.innerHTML=""),m=-1}var f=[],p=[],m=-1;d(),null===(r=s())||void 0===r||r.classList.remove("hide"),t.Ay={loadView:function(e){if(!e.cancel){var t=m,n=-1===t?null:f[t],r=t+1;r>=3&&(r=0);var o=e.url.includes("configurationpage"),a=function(e,t){var n=e.view;if(-1===n.indexOf('data-role="page"'))return n;var r=-1!==n.indexOf("<script"),i=function(e,t){t&&(e=e.replaceAll("\x3c!--<script","<script").replaceAll("<\/script>--\x3e","<\/script>"));var n=document.createElement("div");return n.innerHTML=e,n.querySelector('div[data-role="page"]')}(n,r);r&&(r=null!=i.querySelector("script"));var o=!1,a=!1,s=!1;return t&&(o=-1!=n.indexOf("jQuery")||-1!=n.indexOf("$(")||-1!=n.indexOf("$."),s=-1!=n.indexOf(".checked("),a=-1!=n.indexOf(".selectmenu(")),{elem:i,hasScript:r,hasjQuerySelect:a,hasjQueryChecked:s,hasjQuery:o}}(e,o),d=a.elem,y=f[r];y&&function(e){e.dispatchEvent(new CustomEvent("viewdestroy",{}))}(y);var v=d;"string"==typeof v&&((v=document.createElement("div")).innerHTML=d),v.classList.add("mainAnimatedPage");var h=s();if(!h)return void console.warn("[viewContainer] main animated pages element is not present");y?a.hasScript&&window.$?(h.removeChild(y),v=$(v).appendTo(h)[0]):h.replaceChild(v,y):a.hasScript&&window.$?v=$(v).appendTo(h)[0]:h.appendChild(v),e.type&&v.setAttribute("data-type",e.type);var g=[];return e.fullscreen&&g.push("fullscreen"),g.length&&v.setAttribute("data-properties",g.join(",")),f[r]=v,l(v,e).then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return i&&i(v,!1,e),u(f,r,t),m=r,p[r]=e.url,!e.cancel&&n&&c(f,r),window.$&&($.mobile=$.mobile||{},$.mobile.activePage=v),v}))}},tryRestoreView:function(e){console.debug("[viewContainer] tryRestoreView",e);var t=e.url,n=p.indexOf(t);if(-1!==n){var r=f[n],o=r;if(o){if(e.cancel)return;var a=m,s=-1===a?null:f[a];return l(o,e).then((function(){return i&&i(o,!0,e),u(f,n,a),r.classList.remove("hide"),m=n,!e.cancel&&s&&c(f,n),window.$&&($.mobile=$.mobile||{},$.mobile.activePage=o),o}))}}return Promise.reject()},reset:d,setOnBeforeChange:function(e){i=e}}},65242:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(84069),a=n(62156);t.A=function(e){var t=e.children,n=e.id,s=e.className,l=void 0===s?"":s,u=e.title,c=e.isBackButtonEnabled,d=void 0===c||c,f=e.isMenuButtonEnabled,p=void 0!==f&&f,m=e.isNowPlayingBarEnabled,y=void 0===m||m,v=e.isThemeMediaSupported,h=void 0!==v&&v,g=e.shouldAutoFocus,b=void 0!==g&&g,S=e.backDropType,A=(0,i.useRef)(null);return(0,i.useEffect)((function(){a.A.hideView()}),[]),(0,i.useEffect)((function(){var e,t,n,r,i={bubbles:!0,cancelable:!1,detail:{isRestored:!1,options:{enableMediaControl:y,supportsThemeMedia:h}}};null===(e=A.current)||void 0===e||e.dispatchEvent(new CustomEvent("viewbeforeshow",i)),null===(t=A.current)||void 0===t||t.dispatchEvent(new CustomEvent("pagebeforeshow",i)),null===(n=A.current)||void 0===n||n.dispatchEvent(new CustomEvent("viewshow",i)),null===(r=A.current)||void 0===r||r.dispatchEvent(new CustomEvent("pageshow",i))}),[A,y,h]),(0,i.useEffect)((function(){b&&o.default.autoFocus(A.current)}),[b]),(0,r.jsx)(i.StrictMode,{children:(0,r.jsx)("div",{ref:A,id:n,"data-role":"page",className:"page ".concat(l),"data-title":u,"data-backbutton":d,"data-menubutton":p,"data-backdroptype":S,children:t})})}},66359:function(e,t,n){"use strict";n.r(t),n.d(t,{EXPERIMENTAL_APP_ROUTES:function(){return y}});var r=n(62540),i=(n(63696),n(87404)),o=n(22477),a=n(51218),s=n(37881),l=n(34569),u=n(71004),c=n(24786),d=n(77285),f=n(13993),p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},m=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},y=[{path:"/*",lazy:function(){return Promise.all([n.e(45642),n.e(23247),n.e(60815),n.e(81771),n.e(16304),n.e(8575)]).then(n.bind(n,8575))},children:[{index:!0,element:(0,r.jsx)(i.C5,{replace:!0,to:"/home"})},{Component:o.A,children:m(m(m([],p(c.ASYNC_USER_ROUTES.map(a.G)),!1),p(d.LEGACY_USER_ROUTES.map(s.I)),!1),[{path:"video",Component:f.default}],!1),ErrorBoundary:l.A},{element:(0,r.jsx)(o.A,{level:"public"}),children:m(m([],p(d.LEGACY_PUBLIC_ROUTES.map(s.I)),!1),[{path:"*",Component:u.A}],!1)}]}]},66911:function(e,t,n){"use strict";n.d(t,{H:function(){return l},I:function(){return s}});var r=n(61364),i=n(8280),o=n(80401),a=n(69410),s=function(e,t,n){return(0,i.j)({queryKey:["User",n,"Items",t],queryFn:function(i){var o=i.signal;return function(e,t,n,i){return o=void 0,a=void 0,l=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(o){switch(o.label){case 0:return[4,(0,r.P)(e).getItem({userId:n,itemId:t},i)];case 1:return[2,o.sent().data]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}i((l=l.apply(o,a||[])).next())}));var o,a,s,l}(e,t,n,{signal:o})},staleTime:1e3,enabled:!!e&&!!n&&!!t})},l=function(e){var t=(0,a.gf)(),n=t.api,r=t.user;return(0,o.I)(s(n,e,null==r?void 0:r.Id))}},67430:function(e,t,n){"use strict";n.d(t,{KN:function(){return r.K},tF:function(){return i.A}}),n(22043);var r=n(1935),i=n(84138)},68272:function(e){"use strict";e.exports=JSON.parse('{"includeCorsCredentials":false,"multiserver":false,"themes":[{"name":"Apple TV","id":"appletv","color":"#bcbcbc"},{"name":"Blue Radiance","id":"blueradiance","color":"#011432"},{"name":"Dark","id":"dark","color":"#202020","default":true},{"name":"Light","id":"light","color":"#303030"},{"name":"Purple Haze","id":"purplehaze","color":"#000420"},{"name":"WMC","id":"wmc","color":"#0c2450"}],"menuLinks":[],"servers":[],"plugins":["playAccessValidation/plugin","experimentalWarnings/plugin","htmlAudioPlayer/plugin","htmlVideoPlayer/plugin","photoPlayer/plugin","comicsPlayer/plugin","bookPlayer/plugin","youtubePlayer/plugin","backdropScreensaver/plugin","pdfPlayer/plugin","logoScreensaver/plugin","sessionPlayer/plugin","chromecastPlayer/plugin","syncPlay/plugin"]}')},69410:function(e,t,n){"use strict";n.d(t,{Kv:function(){return d},gf:function(){return c}});var r=n(62540),i=n(63696),o=n(67430),a=n(44797),s=n(75384),l=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},u=(0,i.createContext)({}),c=function(){return(0,i.useContext)(u)},d=function(e){var t=e.children,n=l((0,i.useState)(),2),c=n[0],d=n[1],f=l((0,i.useState)(),2),p=f[0],m=f[1],y=l((0,i.useState)(),2),v=y[0],h=y[1],g=(0,i.useMemo)((function(){return{__legacyApiClient__:c,api:p,user:v}}),[p,c,v]);return(0,i.useEffect)((function(){var e;null===(e=o.tF.currentApiClient())||void 0===e||e.getCurrentUser().then((function(e){return t(void 0,e)})).catch((function(e){console.info("[ApiProvider] Could not get current user",e)}));var t=function(e,t){h(t),t.ServerId&&d(o.tF.getApiClient(t.ServerId))},n=function(){d(void 0),h(void 0)};return a.A.on(o.tF,"localusersignedin",t),a.A.on(o.tF,"localusersignedout",n),function(){a.A.off(o.tF,"localusersignedin",t),a.A.off(o.tF,"localusersignedout",n)}}),[d,h]),(0,i.useEffect)((function(){m(c?(0,s.C)(c):void 0)}),[c,m]),(0,r.jsx)(u.Provider,{value:g,children:t})}},69785:function(e,t,n){n(95021),function(e){"use strict";var t=e.prototype,n=t.parseFromString;try{if((new e).parseFromString("","text/html"))return}catch(e){}t.parseFromString=function(e,t){if(/^\s*text\/html\s*(?:;|$)/i.test(t)){var r=document.implementation.createHTMLDocument("");return r.documentElement.innerHTML=e,r}return n.apply(this,arguments)}}(DOMParser)},70267:function(e,t,n){"use strict";n.r(t),n.d(t,{appRouter:function(){return j},isLyricsPage:function(){return T}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(24776),n(76281),n(84734),n(44962),n(17731),n(4754),n(10849),n(70389),n(94),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(50987),n(83994),n(93062),n(97456),n(64062),n(90580),n(82367);var r=n(65369),i=n(89166),o=n(5898),a=n(23648),s=n(8566),l=n(41177),u=n(66911),c=n(67430),d=n(75384),f=n(31297),p=n(87003);function m(e){return m="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},m(e)}function y(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return v(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(v(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,v(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,v(d,"constructor",u),v(u,"constructor",l),l.displayName="GeneratorFunction",v(u,i,"GeneratorFunction"),v(d),v(d,i,"Generator"),v(d,r,(function(){return this})),v(d,"toString",(function(){return"[object Generator]"})),(y=function(){return{w:o,m:f}})()}function v(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}v=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){v(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},v(e,t,n,r)}function h(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){h(o,r,i,a,s,"next",e)}function s(e){h(o,r,i,a,s,"throw",e)}a(void 0)}))}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function S(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}var x=["/home","/login","/selectserver"],w=["/addserver","/selectserver","/login","/forgotpassword","/forgotpasswordpin","/wizardremoteaccess","/wizardfinish","/wizardlibrary","/wizardsettings","/wizardstart","/wizarduser"],P=new WeakSet,k=function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,P),S(this,"forcedLogoutMsg",void 0),S(this,"msgTimeout",void 0),S(this,"promiseShow",void 0),S(this,"resolveOnNextShow",void 0),document.addEventListener("viewshow",(function(){return t.onViewShow()})),this.lastPath=p.b.location.pathname+p.b.location.search,this.listen(),this.baseRoute=window.location.href.split("?")[0].replace(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(P,this,I).call(this),""),this.baseRoute=this.baseRoute.split("#")[0],this.baseRoute.endsWith("/")&&!this.baseRoute.endsWith("://")&&(this.baseRoute=this.baseRoute.substring(0,this.baseRoute.length-1))},t=[{key:"ready",value:function(){return this.promiseShow||Promise.resolve()}},{key:"back",value:(m=g(y().m((function e(){var t=this;return y().w((function(e){for(;;)switch(e.n){case 0:if(!this.promiseShow){e.n=1;break}return e.n=1,this.promiseShow;case 1:return this.promiseShow=new Promise((function(e){var n=p.b.listen((function(){n(),t.promiseShow=null,e()}));p.b.back()})),e.a(2,this.promiseShow)}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"show",value:(n=g(y().m((function e(t,n){var r=this;return y().w((function(e){for(;;)switch(e.n){case 0:if(!this.promiseShow){e.n=1;break}return e.n=1,this.promiseShow;case 1:if(t.startsWith("#")&&(t=t.substring(1)),t.startsWith("!")&&(t=t.substring(1)),0!==t.indexOf("/")&&-1===t.indexOf("://")&&(t="/"+t),t=t.replace(this.baseUrl(),""),p.b.location.pathname!==t||"/home"===t){e.n=2;break}return s.Ay.hide(),e.a(2,Promise.resolve());case 2:return this.promiseShow=new Promise((function(e){r.resolveOnNextShow=e,setTimeout((function(){return p.b.push(t,n)}),0)})),e.a(2,this.promiseShow)}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"listen",value:function(){var e=this;p.b.listen((function(t){var n=t.location,r=n.pathname.replace(/^!/,"")+n.search;r===e.lastPath&&(console.debug("[appRouter] path did not change, resolving promise"),e.onViewShow()),e.lastPath=r}))}},{key:"baseUrl",value:function(){return this.baseRoute}},{key:"canGoBack",value:function(){var e=p.b.location.pathname;return!(!document.querySelector(".dialogContainer")&&x.includes(e))&&window.history.length>1}},{key:"showItem",value:function(e,t,n){var r=this;if("string"==typeof e){var i=t?c.tF.getApiClient(t):c.tF.currentApiClient(),o=(0,d.C)(i),a=i.getCurrentUserId();f.q.fetchQuery((0,u.I)(o,e,a)).then((function(e){r.showItem(e,n)})).catch((function(e){console.error("[AppRouter] Failed to fetch item",e)}))}else{2===arguments.length&&(n=arguments[1]);var s=this.getRouteUrl(e,n);this.show(s)}}},{key:"setTransparency",value:function(e){console.warn("Deprecated! Use Dashboard.setBackdropTransparency"),(0,i.FB)(e)}},{key:"onViewShow",value:function(){var e=this.resolveOnNextShow;e&&(this.promiseShow=null,this.resolveOnNextShow=null,e())}},{key:"onForcedLogoutMessageTimeout",value:function(){var e=this.forcedLogoutMsg;this.forcedLogoutMsg=null,e&&(0,l.A)(e)}},{key:"showForcedLogoutMessage",value:function(e){this.forcedLogoutMsg=e,this.msgTimeout&&clearTimeout(this.msgTimeout),this.msgTimeout=setTimeout(this.onForcedLogoutMessageTimeout,100)}},{key:"onRequestFail",value:function(e,t){403===t.status&&"ParentalControl"===t.errorCode&&(w.includes(p.b.location.pathname)||(j.showForcedLogoutMessage(o.Ay.translate("AccessRestrictedTryAgainLater")),j.showLocalLogin(this.serverId())))}},{key:"getRouteUrl",value:function(e,t){if(!e)throw new Error("item cannot be null");if(e.url)return e.url;var n,i=t?t.context:null,o=e.Id||e.ItemId;t||(t={});var s=e.Type||(t?t.itemType:null),l=e.ServerId||t.serverId;if("settings"===e)return"#/mypreferencesmenu";if("wizard"===e)return"#/wizardstart";if("manageserver"===e)return"#/dashboard";if("recordedtv"===e)return"#/livetv?tab=3&serverId="+t.serverId;if("nextup"===e)return"#/list?type=nextup&serverId="+t.serverId;if("list"===e){var u="#/list?serverId="+t.serverId+"&type="+t.itemTypes;return t.isFavorite&&(u+="&IsFavorite=true"),t.isAiring&&(u+="&IsAiring=true"),t.isMovie&&(u+="&IsMovie=true"),t.isSeries&&(u+="&IsSeries=true&IsMovie=false&IsNews=false"),t.isSports&&(u+="&IsSports=true"),t.isKids&&(u+="&IsKids=true"),t.isNews&&(u+="&IsNews=true"),u}if("livetv"===e)return"programs"===t.section?"#/livetv?tab=0&serverId="+t.serverId:"guide"===t.section?"#/livetv?tab=1&serverId="+t.serverId:"movies"===t.section?"#/list?type=Programs&IsMovie=true&serverId="+t.serverId:"shows"===t.section?"#/list?type=Programs&IsSeries=true&IsMovie=false&IsNews=false&serverId="+t.serverId:"sports"===t.section?"#/list?type=Programs&IsSports=true&serverId="+t.serverId:"kids"===t.section?"#/list?type=Programs&IsKids=true&serverId="+t.serverId:"news"===t.section?"#/list?type=Programs&IsNews=true&serverId="+t.serverId:"onnow"===t.section?"#/list?type=Programs&IsAiring=true&serverId="+t.serverId:"channels"===t.section?"#/livetv?tab=2&serverId="+t.serverId:"dvrschedule"===t.section?"#/livetv?tab=4&serverId="+t.serverId:"seriesrecording"===t.section?"#/livetv?tab=5&serverId="+t.serverId:"#/livetv?serverId="+t.serverId;if("SeriesTimer"==s)return"#/details?seriesTimerId="+o+"&serverId="+l;if(e.CollectionType==r.X.Livetv)return"#/livetv?collectionType=".concat(e.CollectionType);if("Genre"===e.Type)return n="#/list?genreId="+e.Id+"&serverId="+l,"livetv"===i&&(n+="&type=Programs"),t.parentId&&(n+="&parentId="+t.parentId),n;if("MusicGenre"===e.Type)return n="#/list?musicGenreId="+e.Id+"&serverId="+l,t.parentId&&(n+="&parentId="+t.parentId),n;if("Studio"===e.Type)return n="#/list?studioId="+e.Id+"&serverId="+l,t.parentId&&(n+="&parentId="+t.parentId),n;if("tag"===e)return n="#/list?type=tag&tag=".concat(encodeURIComponent(t.tag),"&serverId=").concat(l),t.parentId&&(n+="&parentId="+t.parentId),n;if("folders"!==i&&!a.Ay.isLocalItem(e)){if(e.CollectionType==r.X.Movies)return n="#/movies?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),t&&"latest"===t.section&&(n+="&tab=1"),n;if(e.CollectionType==r.X.Tvshows)return n="#/tv?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),t&&"latest"===t.section&&(n+="&tab=1"),n;var c;if(e.CollectionType==r.X.Music)return n="#/music?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),"latest"===(null===(c=t)||void 0===c?void 0:c.section)&&(n+="&tab=1"),n;if("experimental"===localStorage.getItem("layout")&&e.CollectionType==r.X.Homevideos)return"#/homevideos?topParentId="+e.Id}return["Playlist","TvChannel","Program","BoxSet","MusicAlbum","MusicGenre","Person","Recording","MusicArtist"].indexOf(s)>=0?"#/details?id="+o+"&serverId="+l:"Series"==s||"Season"==s||"Episode"==s?"#/details?id="+o+(i?"&context="+i:"")+"&serverId="+l:e.IsFolder?o?"#/list?parentId="+o+"&serverId="+l:"#":"#/details?id="+o+"&serverId="+l}},{key:"showLocalLogin",value:function(e){return this.show("login?serverid="+e)}},{key:"showVideoOsd",value:function(){return this.show("video")}},{key:"showSelectServer",value:function(){return this.show("selectserver")}},{key:"showSettings",value:function(){return this.show("mypreferencesmenu")}},{key:"showNowPlaying",value:function(){return this.show("queue")}},{key:"showGuide",value:function(){return this.show("livetv?tab=1")}},{key:"goHome",value:function(){return this.show("home")}},{key:"showSearch",value:function(){return this.show("search")}},{key:"showLiveTV",value:function(){return this.show("livetv")}},{key:"showRecordedTV",value:function(){return this.show("livetv?tab=3")}},{key:"showFavorites",value:function(){return this.show("home?tab=1")}}],t&&b(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,m}();function I(){var e=window.location.pathname||"",t=e.lastIndexOf("/");return(e=-1!==t?e.substring(t):"/"+e)&&"/"!==e||(e="/index.html"),e}var j=new k,T=function(){return"/lyrics"===p.b.location.pathname.toLowerCase()};window.Emby=window.Emby||{},window.Emby.Page=j},70373:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_USER_ROUTES:function(){return r}});var r=[{path:"details",pageProps:{controller:"itemDetails/index",view:"itemDetails/index.html"}},{path:"list",pageProps:{controller:"list",view:"list.html"}},{path:"livetv",pageProps:{controller:"livetv/livetvsuggested",view:"livetv.html"}},{path:"lyrics",pageProps:{controller:"lyrics",view:"lyrics.html"}},{path:"music",pageProps:{controller:"music/musicrecommended",view:"music/music.html"}},{path:"mypreferencescontrols",pageProps:{controller:"user/controls/index",view:"user/controls/index.html"}},{path:"mypreferencesdisplay",pageProps:{controller:"user/display/index",view:"user/display/index.html"}},{path:"mypreferenceshome",pageProps:{controller:"user/home/index",view:"user/home/index.html"}},{path:"mypreferencesplayback",pageProps:{controller:"user/playback/index",view:"user/playback/index.html"}},{path:"mypreferencessubtitles",pageProps:{controller:"user/subtitles/index",view:"user/subtitles/index.html"}},{path:"tv",pageProps:{controller:"shows/tvrecommended",view:"shows/tvrecommended.html"}},{path:"video",pageProps:{controller:"playback/video/index",view:"playback/video/index.html",type:"video-osd",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}},{path:"queue",pageProps:{controller:"playback/queue/index",view:"playback/queue/index.html",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}},{path:"home",pageProps:{controller:"home",view:"home.html"}},{path:"movies",pageProps:{controller:"movies/moviesrecommended",view:"movies/movies.html"}}]},71004:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(87404),a=n(65242),s=n(5898),l=n(84851),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)};t.A=function(){var e=(0,o.zy)(),t=(0,i.useMemo)((function(){var t={search:e.search,hash:e.hash};return RegExp(/^\/wizard[a-z]+\.html/i).test(e.pathname)?u(u({},t),{pathname:"/wizard/".concat(e.pathname.slice(7,-5))}):e.pathname.endsWith(".html")?u(u({},t),{pathname:e.pathname.slice(0,-5)}):void 0}),[e]);return t?(console.warn("[FallbackRoute] You are using a deprecated URL format. This will stop working in a future Jellyfin update."),(0,r.jsx)(o.C5,{replace:!0,to:t})):(0,r.jsx)(a.A,{id:"fallbackPage",title:s.Ay.translate("HeaderPageNotFound"),className:"mainAnimatedPage libraryPage",children:(0,r.jsxs)("div",{className:"padded-left padded-right",children:[(0,r.jsx)("h1",{children:s.Ay.translate("HeaderPageNotFound")}),(0,r.jsx)("p",{children:s.Ay.translate("PageNotFound")}),(0,r.jsx)(l.A,{className:"button-link",href:"#/home",children:s.Ay.translate("GoHome")})]})})}},71286:function(e,t,n){"use strict";var r;n.d(t,{B:function(){return r}}),function(e){e.HEADER_RENDERED="HEADER_RENDERED",e.SET_TABS="SET_TABS",e.SHOW_VIDEO_OSD="SHOW_VIDEO_OSD",e.THEME_CHANGE="THEME_CHANGE"}(r||(r={}))},71866:function(e,t,n){"use strict";var r;function i(e){"string"==typeof e&&(e={text:e});var t=document.createElement("div");t.classList.add("toast"),t.textContent=e.text,(r||((r=document.createElement("div")).classList.add("toastContainer"),document.body.appendChild(r)),r).appendChild(t),setTimeout((function(){t.classList.add("toastVisible"),function(e){setTimeout((function(){e.classList.add("toastHide"),function(e){setTimeout((function(){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)}),300)}(e)}),3300)}(t)}),300)}n.d(t,{A:function(){return i}})},73025:function(e,t,n){"use strict";n.d(t,{O:function(){return s},_:function(){return l}});var r,i=n(41087),o=n(94738),a=((r={})[i.w.Intro]=o.M.AskToSkip,r[i.w.Outro]=o.M.AskToSkip,r),s=function(e){return"".concat("segmentTypeAction","__").concat(e)};function l(e,t){var n=e.get(s(t),!1),r=a[t]||o.M.None;return n||r}},73125:function(e,t,n){var r={"./af.json":[18086,23845],"./ar.json":[88506,9785],"./as.json":[62885,47206],"./be-by.json":[69986,34017],"./bg-bg.json":[23018,6377],"./bn.json":[86497,14050],"./bn_BD.json":[13256,37131],"./br.json":[14189,69806],"./ca.json":[12921,35994],"./ch.json":[9814,21493],"./ckb.json":[6295,63780],"./cs.json":[83343,1500],"./cy.json":[20833,90210],"./da.json":[98174,96509],"./de.json":[99810,89409],"./dv.json":[39331,5888],"./el.json":[67800,80571],"./en-gb.json":[24832,46179],"./en-us.json":[20233,79754],"./enm.json":[83645,39422],"./eo.json":[72661,68950],"./es-ar.json":[49827,39072],"./es-mx.json":[83425,99298],"./es.json":[62854,49146],"./es_419.json":[50700,31807],"./es_DO.json":[29387,22888],"./et.json":[20560,78579],"./eu.json":[8083,39952],"./fa.json":[69924,18775],"./fi.json":[45932,66527],"./fil.json":[13320,33355],"./fo.json":[60706,40257],"./fr-ca.json":[82992,71603],"./fr.json":[80225,65826],"./ga.json":[59069,3134],"./gl.json":[83366,91589],"./gsw.json":[56196,99479],"./gu.json":[51673,99994],"./he.json":[92926,87837],"./hi-in.json":[21782,29397],"./hr.json":[81379,90272],"./ht.json":[93929,15402],"./hu.json":[7566,46669],"./hy.json":[26346,53961],"./id.json":[19612,79823],"./is-is.json":[12284,15023],"./it.json":[39596,28159],"./ja.json":[96776,8363],"./jbo.json":[31758,8589],"./ka.json":[24609,52162],"./kab.json":[90905,70042],"./kk.json":[9500,60028],"./kn.json":[39040,4867],"./ko.json":[47043,32800],"./kw.json":[82379,85960],"./ky.json":[16697,25370],"./lb.json":[64839,76276],"./lt-lt.json":[93260,3679],"./lv.json":[48120,82344],"./mg.json":[837,94726],"./mk.json":[24121,52922],"./ml.json":[99459,82355],"./mn.json":[37922,27521],"./mr.json":[55814,87589],"./ms.json":[40769,79714],"./mt.json":[69080,84347],"./my.json":[12175,87580],"./nb.json":[48505,70362],"./ne.json":[50672,30419],"./nl.json":[53707,80424],"./nn.json":[1925,85318],"./pa.json":[54122,11305],"./pl.json":[30985,62634],"./pr.json":[60715,24072],"./pt-br.json":[36860,6735],"./pt-pt.json":[70183,69959],"./pt.json":[69969,41490],"./ro.json":[66998,2709],"./ru.json":[5276,74191],"./si.json":[69665,48834],"./sk.json":[79655,86836],"./sl-si.json":[10433,48962],"./so.json":[40475,30168],"./sq.json":[73529,48666],"./sr.json":[19020,49535],"./sv.json":[95760,29683],"./ta.json":[57294,81197],"./te.json":[36402,72145],"./th.json":[60257,23522],"./tr.json":[66655,30028],"./ug.json":[45581,10350],"./uk.json":[36529,62834],"./ur_PK.json":[35446,10805],"./uz.json":[50886,67813],"./vi.json":[36796,17935],"./zh-cn.json":[45487,12252],"./zh-hk.json":[88159,15852],"./zh-tw.json":[97983,63404],"./zu.json":[48420,94167]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n.t(i,19)}))}i.keys=function(){return Object.keys(r)},i.id=73125,e.exports=i},74370:function(e,t,n){var r={"./livetvguideprovider":[45043,28110],"./livetvguideprovider.html":[90833,87936],"./livetvguideprovider.js":[45043,28110],"./livetvtuner":[51250,2217],"./livetvtuner.html":[62720,61765],"./livetvtuner.js":[51250,2217],"./networking":[50506,80017],"./networking.html":[13072,57629],"./networking.js":[50506,80017]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=74370,e.exports=i},74550:function(e,t,n){"use strict";n(76281),n(84734),n(44962),n(78557),n(90076),n(83994),n(82367);var r=n(34789),i=n(38490),o=n(46782),a=n(90381),s={13:"Enter",19:"Pause",27:"Escape",32:"Space",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",138:"NavigationUp",139:"NavigationDown",140:"NavigationLeft",141:"NavigationRight",195:"GamepadA",196:"GamepadB",203:"GamepadDPadUp",204:"GamepadDPadDown",205:"GamepadDPadLeft",206:"GamepadDPadRight",211:"GamepadLeftThumbUp",212:"GamepadLeftThumbDown",214:"GamepadLeftThumbLeft",213:"GamepadLeftThumbRight",412:"MediaRewind",413:"MediaStop",415:"MediaPlay",417:"MediaFastForward",461:"Back",10009:"Back",10232:"MediaTrackPrevious",10233:"MediaTrackNext",10252:"MediaPlayPause"},l={GamepadB:"Escape",NavigationUp:"ArrowUp",NavigationDown:"ArrowDown",NavigationLeft:"ArrowLeft",NavigationRight:"ArrowRight",GamepadDPadUp:"ArrowUp",GamepadDPadDown:"ArrowDown",GamepadDPadLeft:"ArrowLeft",GamepadDPadRight:"ArrowRight",GamepadLeftThumbUp:"ArrowUp",GamepadLeftThumbDown:"ArrowDown",GamepadLeftThumbLeft:"ArrowLeft",GamepadLeftThumbRight:"ArrowRight"},u=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","BrowserHome","Find"],c=["MediaRewind","MediaStop","MediaPlay","MediaFastForward","MediaTrackPrevious","MediaTrackNext","MediaPlayPause"],d=["INPUT","TEXTAREA"],f=["button","checkbox","color","file","hidden","image","radio","reset","submit"],p=!1;try{p="key"in new KeyboardEvent("keydown")}catch(e){console.error("error checking 'key' field",e)}if(!p)for(var m=65;m<=90;m++)s[m]=String.fromCharCode(m).toLowerCase();function y(e){var t=s[e.keyCode]||e.key;return l[t]||t}function v(e){return-1!=u.indexOf(e)}function h(e){return!(!e||!d.includes(e.tagName)||"INPUT"===e.tagName&&f.includes(e.type))}function g(){return!r.A.edgeUwp}navigator.getGamepads&&a.A.enableGamepad()&&g()&&window.addEventListener("gamepadconnected",(function e(){console.log("Gamepad connected! Attaching gamepadtokey.js script"),window.removeEventListener("gamepadconnected",e),n.e(84348).then(n.bind(n,84348))})),t.Ay={enable:function(){var e="mediaSession"in navigator;window.addEventListener("keydown",(function(t){if(!t.defaultPrevented&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)){var n=y(t);if((o.A.tv||!v(n))&&(r.A.tv||!function(e){return c.includes(e)}(n)||!e)){var a=!0;switch(n){case"ArrowLeft":h(document.activeElement)?a=!1:i.default.handleCommand("left");break;case"ArrowUp":i.default.handleCommand("up");break;case"ArrowRight":h(document.activeElement)?a=!1:i.default.handleCommand("right");break;case"ArrowDown":i.default.handleCommand("down");break;case"GamepadA":i.default.handleCommand("select");break;case"Back":i.default.handleCommand("back");break;case"Backspace":r.A.tv&&r.A.hisense&&r.A.vidaa?i.default.handleCommand("back"):a=!1;break;case"Escape":o.A.tv?i.default.handleCommand("back"):a=!1;break;case"Find":i.default.handleCommand("search");break;case"BrowserHome":i.default.handleCommand("home");break;case"MediaPlay":i.default.handleCommand("play");break;case"Pause":i.default.handleCommand("pause");break;case"MediaPlayPause":i.default.handleCommand("playpause");break;case"MediaRewind":i.default.handleCommand("rewind");break;case"MediaFastForward":i.default.handleCommand("fastforward");break;case"MediaStop":i.default.handleCommand("stop");break;case"MediaTrackPrevious":i.default.handleCommand("previoustrack");break;case"MediaTrackNext":i.default.handleCommand("nexttrack");break;default:a=!1}a&&(console.debug("disabling default event handling"),t.preventDefault())}}}))},getKeyName:y,isNavigationKey:v,canEnableGamepad:g}},74659:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},o=document.createElement("a");function a(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){return o.href=e,n=o.href,[2,new Promise((function(r,i){var o=new XMLHttpRequest;o.onload=function(){var e=o.status;n.startsWith("file:")&&0===e&&(e=200),r(new Response(o.responseText,{status:e}))},o.onerror=function(){i(new TypeError("Local request failed"))},o.open("GET",e),(null==t?void 0:t.cache)&&o.setRequestHeader("Cache-Control",t.cache),o.send(null)}))]}))}))}},75384:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(73275),i=function(e){return new r.EX({clientInfo:{name:e.appName(),version:e.appVersion()},deviceInfo:{name:e.deviceName(),id:e.deviceId()}}).createApi(e.serverAddress(),e.accessToken())}},76617:function(e,t,n){"use strict";n.d(t,{A:function(){return B}});var r=n(62540),i=n(63696),o=n(46775),a=n(92779),s=n(63703),l=n(7630),u=n(75487),c=n(72073),d=n(39738),f=n(5898),p=n(44797),m=n(96797),y=n(74156),v=n(44790),h=n(60434),g=n(48402),b=n(85637),S=n(38829),A=n(78400),x=n(34266),w=n(71034),P=n(4805),k=n(42663),I=n(34789),j=function(e){var t=e.target;if(!t.deviceType&&t.isLocalPlayer)return I.A.tv?(0,r.jsx)(k.A,{}):I.A.mobile?(0,r.jsx)(w.A,{}):(0,r.jsx)(A.A,{});switch(t.deviceType){case"smartphone":return(0,r.jsx)(w.A,{});case"tablet":return(0,r.jsx)(P.A,{});case"desktop":return(0,r.jsx)(A.A,{});case"cast":return(0,r.jsx)(l.A,{});case"tv":return(0,r.jsx)(k.A,{});default:return(0,r.jsx)(x.A,{})}},T="app-remote-play-menu",C=function(e){var t=e.anchorEl,n=e.open,o=e.onMenuClose,a=!!S.X.plugins.find((function(e){return"chromecast"===e.id})),s=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)([]),2),l=s[0],u=s[1];return(0,i.useEffect)((function(){var e,t,r,i;n&&(e=void 0,t=void 0,r=void 0,i=function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:return e=u,[4,d.f.getTargets()];case 1:return e.apply(void 0,[t.sent()]),[2]}}))},new(r||(r=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))).catch((function(e){console.error("[AppRemotePlayMenu] unable to get playback targets",e)}))}),[n,u]),(0,r.jsxs)(g.A,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:T,keepMounted:!0,open:n,onClose:o,children:[!a&&(0,r.jsxs)(b.A,{disabled:!0,children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(m.A,{})}),(0,r.jsx)(h.A,{children:f.Ay.translate("GoogleCastUnsupported")})]}),!a&&l.length>0&&(0,r.jsx)(y.A,{}),l.map((function(e){var t;return(0,r.jsxs)(b.A,{onClick:function(){return function(e){d.f.trySetActivePlayer(e.playerName,e),o()}(e)},children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(j,{target:e})}),(0,r.jsx)(h.A,{primary:e.appName?"".concat(e.name," - ").concat(e.appName):e.name,secondary:null===(t=e.user)||void 0===t?void 0:t.Name})]},e.id)}))]})},E=n(249),_=n(10301),L=n(75578),M=n(80099),O=n(48080),R=n(9055),D=n(83237),N=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},F="app-remote-play-active-menu",U=function(e){var t=e.anchorEl,n=e.open,o=e.onMenuClose,a=e.playerInfo,s=N((0,i.useState)(d.f.enableDisplayMirroring()),2),l=s[0],u=s[1],c=(null==a?void 0:a.supportedCommands)&&-1!==a.supportedCommands.indexOf("DisplayContent"),p=(0,i.useCallback)((function(){d.f.enableDisplayMirroring(!l),u(!l)}),[l,u]),m=N((0,i.useState)((0,D.Ol)()),2),S=m[0],A=m[1],x=(0,i.useCallback)((function(){(0,D.sS)(!S),A(!S)}),[S]),w=(null==a?void 0:a.deviceName)||(null==a?void 0:a.name),P=(0,i.useCallback)((function(){-1!==d.f.getSupportedCommands().indexOf("EndSession")?O.A.show({buttons:[{name:f.Ay.translate("Yes"),id:"yes"},{name:f.Ay.translate("No"),id:"no"}],text:f.Ay.translate("ConfirmEndPlayerSession",w)}).then((function(e){o(),"yes"===e&&d.f.getCurrentPlayer().endSession(),d.f.setDefaultPlayerActive()})).catch((function(){})):(o(),d.f.setDefaultPlayerActive())}),[o,w]);return(0,r.jsxs)(g.A,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:F,keepMounted:!0,open:n,onClose:o,slotProps:{list:{"aria-labelledby":"remote-play-active-subheader",subheader:(0,r.jsx)(M.A,{component:"div",id:"remote-play-active-subheader",children:w})}},children:[c&&(0,r.jsxs)(b.A,{onClick:p,children:[l&&(0,r.jsx)(v.A,{children:(0,r.jsx)(E.A,{})}),(0,r.jsx)(h.A,{inset:!l,children:f.Ay.translate("EnableDisplayMirroring")})]}),(0,r.jsxs)(b.A,{onClick:x,children:[S&&(0,r.jsx)(v.A,{children:(0,r.jsx)(E.A,{})}),(0,r.jsx)(h.A,{inset:!S,children:f.Ay.translate("EnableAutoCast")})]}),(0,r.jsx)(y.A,{}),(0,r.jsxs)(b.A,{component:R.N_,to:"/queue",onClick:o,children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(L.A,{})}),(0,r.jsx)(h.A,{children:f.Ay.translate("HeaderRemoteControl")})]}),(0,r.jsx)(y.A,{}),(0,r.jsxs)(b.A,{onClick:P,children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(_.A,{})}),(0,r.jsx)(h.A,{children:f.Ay.translate("Disconnect")})]})]})},V=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},B=function(){var e=V((0,i.useState)(d.f.getPlayerInfo()),2),t=e[0],n=e[1],m=(0,i.useCallback)((function(){n(d.f.getPlayerInfo())}),[n]);(0,i.useEffect)((function(){return p.A.on(d.f,"playerchange",m),function(){p.A.off(d.f,"playerchange",m)}}),[m]);var y=V((0,i.useState)(null),2),v=y[0],h=y[1],g=Boolean(v),b=(0,i.useCallback)((function(e){h(e.currentTarget)}),[h]),S=(0,i.useCallback)((function(){h(null)}),[h]),A=V((0,i.useState)(null),2),x=A[0],w=A[1],P=Boolean(x),k=(0,i.useCallback)((function(e){w(e.currentTarget)}),[w]),I=(0,i.useCallback)((function(){w(null)}),[w]);return(0,r.jsxs)(r.Fragment,{children:[t&&!t.isLocalPlayer?(0,r.jsx)(a.A,{sx:{alignSelf:"center"},children:(0,r.jsx)(c.A,{title:f.Ay.translate("ButtonCast"),children:(0,r.jsx)(s.A,{variant:"text",size:"large",startIcon:(0,r.jsx)(o.A,{}),"aria-label":f.Ay.translate("ButtonCast"),"aria-controls":F,"aria-haspopup":"true",onClick:k,color:"inherit",sx:function(e){return{color:e.vars.palette.primary.main}},children:t.deviceName||t.name})})}):(0,r.jsx)(c.A,{title:f.Ay.translate("ButtonCast"),children:(0,r.jsx)(u.A,{size:"large","aria-label":f.Ay.translate("ButtonCast"),"aria-controls":T,"aria-haspopup":"true",onClick:b,color:"inherit",children:(0,r.jsx)(l.A,{})})}),(0,r.jsx)(C,{open:g,anchorEl:v,onMenuClose:S}),(0,r.jsx)(U,{open:P,anchorEl:x,onMenuClose:I,playerInfo:t})]})}},77157:function(e,t,n){"use strict";n.r(t);var r=n(34789),i=n(36300),o=(n(69177),Object.create(HTMLInputElement.prototype));function a(e){if(13===e.keyCode||32===e.keyCode&&r.A.tizen)return e.preventDefault(),this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),!1}var s=r.A.tizen||r.A.orsay||r.A.operaTv||r.A.web0s;function l(e){var t=this.parentNode;t.style.webkitAnimationName="repaintChrome",t.style.webkitAnimationDelay=!0===e?"500ms":"",t.style.webkitAnimationDuration="10ms",t.style.webkitAnimationIterationCount="1",setTimeout((function(){t.style.webkitAnimationName=""}),!0===e?520:20)}o.attachedCallback=function(){if("true"!==this.getAttribute("data-embycheckbox")){this.setAttribute("data-embycheckbox","true"),this.classList.add("emby-checkbox");var e=this.parentNode;e.classList.add("emby-checkbox-label");var t=e.querySelector("span"),n="checkboxOutline",r=this.getAttribute("data-outlineclass");r&&(n+=" "+r);var o='<span class="material-icons checkboxIcon checkboxIcon-checked '+(this.getAttribute("data-checkedicon")||"check")+'" aria-hidden="true"></span>',u='<span class="material-icons checkboxIcon checkboxIcon-unchecked '+(this.getAttribute("data-uncheckedicon")||"")+'" aria-hidden="true"></span>';e.insertAdjacentHTML("beforeend",'<span class="'+n+'">'+o+u+"</span>"),t.classList.add("checkboxLabel"),this.addEventListener("keydown",a),s&&(l.call(this,!0),i.Ay.addEventListener(this,"click",l,{passive:!0}),i.Ay.addEventListener(this,"blur",l,{passive:!0}),i.Ay.addEventListener(this,"focus",l,{passive:!0}),i.Ay.addEventListener(this,"change",l,{passive:!0}))}},o.detachedCallback=function(){this.removeEventListener("keydown",a),i.Ay.removeEventListener(this,"click",l,{passive:!0}),i.Ay.removeEventListener(this,"blur",l,{passive:!0}),i.Ay.removeEventListener(this,"focus",l,{passive:!0}),i.Ay.removeEventListener(this,"change",l,{passive:!0})},document.registerElement("emby-checkbox",{prototype:o,extends:"input"})},77285:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r.LEGACY_PUBLIC_ROUTES},LEGACY_USER_ROUTES:function(){return i.LEGACY_USER_ROUTES}});var r=n(3312),i=n(38274)},77402:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(63696),i=n(60182);function o(){var e=(0,i.IB)().themes,t=(0,r.useMemo)((function(){return null==e?void 0:e.find((function(e){return e.default}))}),[e]);return{themes:e||[],defaultTheme:t}}},78057:function(e,t,n){"use strict";var r=n(62540),i=(n(63696),n(28626)),o=n(44419);t.A=function(){var e=(0,o.l9)().data,t=(0,i.Q)(),n=t.customCss,a=t.disableCustomCss;return(0,r.jsxs)(r.Fragment,{children:[!a&&(null==e?void 0:e.CustomCss)&&(0,r.jsx)("style",{children:e.CustomCss}),n&&(0,r.jsx)("style",{children:n})]})}},79237:function(e,t,n){n(36947),void 0===HTMLElement.prototype.nativeFocus&&function(){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0);var n=Object.defineProperty({},"preventScroll",{get:function(){return e=!0,null}});t.focus(n)}catch(e){}e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){var t=window.scrollX,n=window.scrollY;this.nativeFocus(),null!=e&&e.preventScroll&&window.scroll(t,n)})}()},79754:function(e,t,n){"use strict";n.r(t),n.d(t,{close:function(){return A},createDialog:function(){return k},open:function(){return S},setOnOpen:function(){return I}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(76281),n(44962),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(90076),n(95021),n(99425),n(83994),n(93062),n(97456),n(23630),n(82367);var r,i=n(9164),o=n(34789),a=n(46782),s=n(38490),l=n(44305),u=n(8566),c=n(36300),d=n(87003);function f(e){return f="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},f(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return!o.A.tv&&o.A.supportsCssAnimation()}function h(e){var t=e.parentNode;if(t)try{t.removeChild(e)}catch(e){console.error("[dialogHelper] error removing dialog element: "+e)}}function g(e,t,n){this.originalUrl=window.location.href;var r,o=document.activeElement,f=!1;function p(){r&&(r(),r=null),e.dispatchEvent(new CustomEvent("close",{bubbles:!1,cancelable:!1})),n({element:e})}function y(t){"back"===t.detail.command&&(t.preventDefault(),t.stopPropagation(),A(e))}if(e.addEventListener("_close",(function(){if(b(e)||s.default.off(e,y),r&&(r(),r=null),function(e){var t=e.backdrop;if(t){e.backdrop=null;var n=function(){h(t)};if(v())return t.classList.remove("dialogBackdropOpened"),void setTimeout(n,300);n()}}(e),(0,u.jD)(),e.classList.remove("opened"),f&&document.body.classList.remove("noScroll"),b(e)){var n,c=d.b.location.state||{};(null===(n=c.dialogs)||void 0===n?void 0:n.length)>0&&(c.dialogs[c.dialogs.length-1]===t?(r=d.b.listen(p),d.b.back()):c.dialogs.includes(t)&&(console.warn('[dialogHelper] dialog "%s" was closed, but is not the last dialog opened',t),r=d.b.listen(p),d.b.replace("".concat(d.b.location.pathname).concat(d.b.location.search),m(m({},c),{},{dialogs:c.dialogs.filter((function(e){return e!==t}))}))))}if(a.A.tv&&i.A.focus(o),(0,l.G4)(e.getAttribute("data-removeonclose"),!0)){!function(e){a.A.tv&&(e.classList.contains("scrollX")?P(e,!0,!1):e.classList.contains("smoothScrollY")&&P(e,!1,!1))}(e);var g=e.dialogContainer;g?(h(g),e.dialogContainer=null):h(e)}r||p()})),!e.classList.contains("dialog-fixedSize")&&e.classList.add("centeredDialog"),e.classList.remove("hide"),function(e){var t=document.createElement("div");t.classList.add("dialogBackdrop");var n,r=e.dialogContainer||e;r.parentNode.insertBefore(t,r),e.backdrop=t,t.offsetWidth,t.classList.add("dialogBackdropOpened"),c.Ay.addEventListener(e.dialogContainer||t,"mousedown",(function(e){n=e.target})),c.Ay.addEventListener(e.dialogContainer||t,"click",(function(t){t.target===e.dialogContainer&&t.target==n&&A(e)}),{passive:!0}),c.Ay.addEventListener(e.dialogContainer||t,"contextmenu",(function(t){t.target===e.dialogContainer&&(A(e),t.preventDefault())}))}(e),e.classList.add("opened"),e.dispatchEvent(new CustomEvent("open",{bubbles:!1,cancelable:!1})),"true"!==e.getAttribute("data-lockscroll")||document.body.classList.contains("noScroll")||(document.body.classList.add("noScroll"),f=!0),function(e){var t=function(){i.A.pushScope(e),"true"===e.getAttribute("data-autofocus")&&i.A.autoFocus(e),document.activeElement&&!e.contains(document.activeElement)&&document.activeElement.blur()};v()?c.Ay.addEventListener(e,c.Ay.whichAnimationEvent(),x(e,t),{once:!0}):t()}(e),b(e)){var g=d.b.location.state||{},S=g.dialogs||[];S.push(t),d.b.push("".concat(d.b.location.pathname).concat(d.b.location.search),m(m({},g),{},{dialogs:S})),r=d.b.listen((function(n){var i,o=!((null===(i=n.location.state)||void 0===i?void 0:i.dialogs)||[]).includes(t);!o&&function(e){return!e.classList.contains("hide")}(e)||!r||(r(),r=null),o&&A(e)}))}else s.default.on(e,y)}function b(e){return"true"===e.getAttribute("data-history")}function S(e){r&&r(e);var t=e.parentNode;t&&t.removeChild(e);var n=document.createElement("div");return n.classList.add("dialogContainer"),n.appendChild(e),e.dialogContainer=n,document.body.appendChild(n),new Promise((function(t){new g(e,"dlg".concat((new Date).getTime()),t)}))}function A(e){e.classList.contains("hide")||(e.dispatchEvent(new CustomEvent("closing",{bubbles:!1,cancelable:!1})),function(e,t){if(v()){var n=!0;switch(e.animationConfig.exit.name){case"fadeout":e.style.animation="fadeout ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"scaledown":e.style.animation="scaledown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"slidedown":e.style.animation="slidedown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;default:n=!1}if(c.Ay.addEventListener(e,c.Ay.whichAnimationEvent(),x(e,t),{once:!0}),n)return}t()}(e,(function(){i.A.popScope(e),e.classList.add("hide"),e.dispatchEvent(new CustomEvent("_close",{bubbles:!1,cancelable:!1}))})))}var x=function(e,t){return function n(){c.Ay.removeEventListener(e,c.Ay.whichAnimationEvent(),n,{once:!0}),t()}},w="overscroll-behavior-y"in document.body.style;function P(e,t,r){Promise.resolve().then(n.bind(n,10838)).then((function(n){var i=r?"on":"off";n.centerFocus[i](e,t)}))}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=document.createElement("div");e.id&&(t.id=e.id),t.classList.add("focuscontainer"),t.classList.add("hide"),function(e){return null!=e.lockScroll?e.lockScroll:"fullscreen"===e.size||!(w&&(e.size||!o.A.touch))&&(!!e.size||o.A.touch)}(e)&&t.setAttribute("data-lockscroll","true"),!1!==e.enableHistory&&t.setAttribute("data-history","true"),!1!==e.modal&&t.setAttribute("modal","modal"),!1!==e.autoFocus&&t.setAttribute("data-autofocus","true");var n=e.entryAnimation||"scaleup",r=e.exitAnimation||"scaledown",i=e.entryAnimationDuration||("fullscreen"!==e.size?180:280),s=e.exitAnimationDuration||("fullscreen"!==e.size?120:220);if(t.animationConfig={entry:{name:n,timing:{duration:i,easing:"ease-out"}},exit:{name:r,timing:{duration:s,easing:"ease-out",fill:"both"}}},t.classList.add("dialog"),e.scrollX?(t.classList.add("scrollX"),t.classList.add("smoothScrollX"),a.A.tv&&P(t,!0,!0)):!1!==e.scrollY&&(t.classList.add("smoothScrollY"),a.A.tv&&P(t,!1,!0)),e.removeOnClose&&t.setAttribute("data-removeonclose","true"),e.size&&(t.classList.add("dialog-fixedSize"),t.classList.add("dialog-".concat(e.size))),v())switch(t.animationConfig.entry.name){case"fadein":t.style.animation="fadein ".concat(i,"ms ease-out normal");break;case"scaleup":t.style.animation="scaleup ".concat(i,"ms ease-out normal both");break;case"slideup":t.style.animation="slideup ".concat(i,"ms ease-out normal");break;case"slidedown":t.style.animation="slidedown ".concat(i,"ms ease-out normal")}return t}function I(e){r=e}t.default={open:S,close:A,createDialog:k,setOnOpen:I}},80262:function(e,t,n){"use strict";var r;n.d(t,{F:function(){return r}}),function(e){e.ASS_RENDER_ERROR="ASS_RENDER_ERROR",e.FATAL_HLS_ERROR="FATAL_HLS_ERROR",e.MEDIA_DECODE_ERROR="MEDIA_DECODE_ERROR",e.MEDIA_NOT_SUPPORTED="MEDIA_NOT_SUPPORTED",e.NETWORK_ERROR="NETWORK_ERROR",e.NO_MEDIA_ERROR="NO_MEDIA_ERROR",e.PLAYER_ERROR="PLAYER_ERROR",e.SERVER_ERROR="SERVER_ERROR"}(r||(r={}))},81965:function(e,t,n){"use strict";var r=n(62540),i=(n(63696),n(69018)),o=n(69410);t.A=function(e){var t,n=e.user,a=(0,o.gf)().api;return n?(0,r.jsx)(i.A,{alt:null!==(t=n.Name)&&void 0!==t?t:void 0,src:a&&n.Id&&n.PrimaryImageTag?"".concat(a.basePath,"/Users/").concat(n.Id,"/Images/Primary?tag=").concat(n.PrimaryImageTag):void 0,sx:function(e){return{bgcolor:a&&n.Id&&n.PrimaryImageTag?e.vars.palette.background.paper:e.vars.palette.primary.dark,color:"inherit"}}}):null}},82118:function(){!function(e){"use strict";if(e.Headers)try{new e.Headers(void 0)}catch(n){console.debug("patch 'Headers' to accept 'undefined'");var t=e.Headers;e.Headers=function(e){return e?new t(e):new t}}}(window)},82885:function(e,t,n){"use strict";n.r(t),n.d(t,{UserSettings:function(){return h},allowedAudioChannels:function(){return k},backdropScreensaverInterval:function(){return Y},currentSettings:function(){return g},customCss:function(){return se},dashboardTheme:function(){return q},dateTimeLocale:function(){return V},detailsBanner:function(){return N},disableCustomCss:function(){return le},enableBackdrops:function(){return D},enableBlurhash:function(){return R},enableCinemaMode:function(){return T},enableFastFadein:function(){return O},enableNextVideoInfoOverlay:function(){return E},enableRewatchingInNextUp:function(){return X},enableThemeSongs:function(){return L},enableThemeVideos:function(){return M},enableVideoRemainingTime:function(){return _},get:function(){return w},getComicsPlayerSettings:function(){return re},getData:function(){return S},getFilter:function(){return ae},getSavedView:function(){return ue},getSortValuesLegacy:function(){return de},getSubtitleAppearanceSettings:function(){return te},importFrom:function(){return A},language:function(){return U},libraryPageSize:function(){return K},limitSegmentLength:function(){return j},loadQuerySettings:function(){return Z},maxDaysForNextUp:function(){return J},preferFmp4HlsContainer:function(){return I},saveQuerySettings:function(){return ee},saveViewSetting:function(){return ce},screensaver:function(){return W},screensaverTime:function(){return Q},selectAudioNormalization:function(){return C},serverConfig:function(){return P},set:function(){return x},setComicsPlayerSettings:function(){return ie},setFilter:function(){return oe},setSubtitleAppearanceSettings:function(){return ne},setUserInfo:function(){return b},skin:function(){return H},skipBackLength:function(){return B},skipForwardLength:function(){return z},soundEffects:function(){return $},theme:function(){return G},useEpisodeImagesInNextUpAndResume:function(){return F}}),n(29305),n(32733),n(84701),n(81678),n(14382),n(76281),n(44962),n(20518),n(4754),n(94),n(77575),n(36947),n(83810),n(78557),n(96054),n(90076),n(73687),n(99425),n(83994),n(82367);var r=n(44797),i=n(44305),o=n(34789),a=n(90381);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 l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function c(){var e=this;e.saveTimeout=null,e.currentApiClient.updateDisplayPreferences("usersettings",e.displayPrefs,e.currentUserId,"emby")}var d=["SortBy","SortOrder"],f="-filter",p=["Filters","HasSubtitles","HasTrailer","HasSpecialFeature","HasThemeSong","HasThemeVideo","Genres","OfficialRatings","Tags","VideoTypes","IsSD","IsHD","Is4K","Is3D","IsFavorite","IsMissing","IsUnaired","ParentIndexNumber","SeriesStatus","Years"];function m(e,t){return Object.keys(e).filter((function(e){return t.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{})}var y={verticalPosition:-3},v={langDir:"ltr",pagesPerView:1},h=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"setUserInfo",value:function(e,t){if(this.saveTimeout&&clearTimeout(this.saveTimeout),this.currentUserId=e,this.currentApiClient=t,!e)return this.displayPrefs=null,Promise.resolve();var n=this;return t.getDisplayPreferences("usersettings",e,"emby").then((function(e){e.CustomPrefs=e.CustomPrefs||{},n.displayPrefs=e}))}},{key:"getData",value:function(){return this.displayPrefs}},{key:"importFrom",value:function(e){this.displayPrefs=e.getData()}},{key:"set",value:function(e,t,n){var i,o=this.currentUserId,s=this.get(e,n),l=a.A.set(e,t,o);return!1!==n&&this.displayPrefs&&(this.displayPrefs.CustomPrefs[e]=null==t?t:t.toString(),(i=this).saveTimeout&&clearTimeout(i.saveTimeout),i.saveTimeout=setTimeout(c.bind(i),50)),s!==t&&r.A.trigger(this,"change",[e]),l}},{key:"get",value:function(e,t){var n=this.currentUserId;return!1!==t&&this.displayPrefs?this.displayPrefs.CustomPrefs[e]:a.A.get(e,n)}},{key:"serverConfig",value:function(e){var t=this.currentApiClient;return e?t.updateUserConfiguration(this.currentUserId,e):t.getUser(this.currentUserId).then((function(e){return e.Configuration}))}},{key:"allowedAudioChannels",value:function(e){return void 0!==e?this.set("allowedAudioChannels",e,!1):this.get("allowedAudioChannels",!1)||"-1"}},{key:"preferFmp4HlsContainer",value:function(e){return void 0!==e?this.set("preferFmp4HlsContainer",e.toString(),!1):(0,i.G4)(this.get("preferFmp4HlsContainer",!1),o.A.safari||o.A.firefox||o.A.chrome||o.A.edgeChromium)}},{key:"limitSegmentLength",value:function(e){return void 0!==e?this.set("limitSegmentLength",e.toString(),!1):(0,i.G4)(this.get("limitSegmentLength",!1),!1)}},{key:"enableCinemaMode",value:function(e){return void 0!==e?this.set("enableCinemaMode",e.toString(),!1):(0,i.G4)(this.get("enableCinemaMode",!1),!0)}},{key:"selectAudioNormalization",value:function(e){return void 0!==e?this.set("selectAudioNormalization",e,!1):this.get("selectAudioNormalization",!1)||"TrackGain"}},{key:"enableNextVideoInfoOverlay",value:function(e){return void 0!==e?this.set("enableNextVideoInfoOverlay",e.toString()):(0,i.G4)(this.get("enableNextVideoInfoOverlay",!1),!0)}},{key:"enableVideoRemainingTime",value:function(e){return void 0!==e?this.set("enableVideoRemainingTime",e.toString()):(0,i.G4)(this.get("enableVideoRemainingTime",!1),!0)}},{key:"enableThemeSongs",value:function(e){return void 0!==e?this.set("enableThemeSongs",e.toString(),!1):(0,i.G4)(this.get("enableThemeSongs",!1),!1)}},{key:"enableThemeVideos",value:function(e){return void 0!==e?this.set("enableThemeVideos",e.toString(),!1):(0,i.G4)(this.get("enableThemeVideos",!1),!1)}},{key:"enableFastFadein",value:function(e){return void 0!==e?this.set("fastFadein",e.toString(),!1):(0,i.G4)(this.get("fastFadein",!1),!0)}},{key:"enableBlurhash",value:function(e){return void 0!==e?this.set("blurhash",e.toString(),!1):(0,i.G4)(this.get("blurhash",!1),!0)}},{key:"enableBackdrops",value:function(e){return void 0!==e?this.set("enableBackdrops",e.toString(),!1):(0,i.G4)(this.get("enableBackdrops",!1),!1)}},{key:"disableCustomCss",value:function(e){return void 0!==e?this.set("disableCustomCss",e.toString(),!1):(0,i.G4)(this.get("disableCustomCss",!1),!1)}},{key:"customCss",value:function(e){return void 0!==e?this.set("customCss",e.toString(),!1):this.get("customCss",!1)}},{key:"detailsBanner",value:function(e){return void 0!==e?this.set("detailsBanner",e.toString(),!1):(0,i.G4)(this.get("detailsBanner",!1),!0)}},{key:"useEpisodeImagesInNextUpAndResume",value:function(e){return void 0!==e?this.set("useEpisodeImagesInNextUpAndResume",e.toString(),!0):(0,i.G4)(this.get("useEpisodeImagesInNextUpAndResume",!0),!1)}},{key:"language",value:function(e){return void 0!==e?this.set("language",e.toString(),!1):this.get("language",!1)}},{key:"dateTimeLocale",value:function(e){return void 0!==e?this.set("datetimelocale",e.toString(),!1):this.get("datetimelocale",!1)}},{key:"skipBackLength",value:function(e){return void 0!==e?this.set("skipBackLength",e.toString()):parseInt(this.get("skipBackLength")||"10000",10)}},{key:"skipForwardLength",value:function(e){return void 0!==e?this.set("skipForwardLength",e.toString()):parseInt(this.get("skipForwardLength")||"30000",10)}},{key:"dashboardTheme",value:function(e){return void 0!==e?this.set("dashboardTheme",e):this.get("dashboardTheme")}},{key:"skin",value:function(e){return void 0!==e?this.set("skin",e,!1):this.get("skin",!1)}},{key:"theme",value:function(e){return void 0!==e?this.set("appTheme",e,!1):this.get("appTheme",!1)}},{key:"screensaver",value:function(e){return void 0!==e?this.set("screensaver",e,!1):this.get("screensaver",!1)}},{key:"backdropScreensaverInterval",value:function(e){return void 0!==e?this.set("backdropScreensaverInterval",e.toString(),!1):parseInt(this.get("backdropScreensaverInterval",!1),10)||5}},{key:"screensaverTime",value:function(e){return void 0!==e?this.set("screensaverTime",e.toString(),!1):parseInt(this.get("screensaverTime",!1),10)||180}},{key:"libraryPageSize",value:function(e){if(void 0!==e)return this.set("libraryPageSize",e.toString(),!1);var t=parseInt(this.get("libraryPageSize",!1),10);return 0===t?0:t||100}},{key:"maxDaysForNextUp",value:function(e){if(void 0!==e)return this.set("maxDaysForNextUp",e.toString(),!1);var t=parseInt(this.get("maxDaysForNextUp",!1),10);return 0===t?0:t||365}},{key:"enableRewatchingInNextUp",value:function(e){return void 0!==e?this.set("enableRewatchingInNextUp",e.toString(),!1):(0,i.G4)(this.get("enableRewatchingInNextUp",!1),!1)}},{key:"soundEffects",value:function(e){return void 0!==e?this.set("soundeffects",e,!1):this.get("soundeffects",!1)}},{key:"loadQuerySettings",value:function(e,t){var n=this.get(e),r=this.get(e+f,!1);return n&&(n=m(JSON.parse(n),d)),r&&(r=m(JSON.parse(r),p)),Object.assign(t,n,r)}},{key:"saveQuerySettings",value:function(e,t){var n=m(t,d),r=m(t,p);this.set(e,JSON.stringify(n)),this.set(e+f,JSON.stringify(r),!1)}},{key:"getSavedView",value:function(e){return this.get(e+"-_view")}},{key:"saveViewSetting",value:function(e,t){return this.set(e+"-_view",t)}},{key:"getSubtitleAppearanceSettings",value:function(e){return e=e||"localplayersubtitleappearance3",Object.assign(y,JSON.parse(this.get(e,!1)||"{}"))}},{key:"setSubtitleAppearanceSettings",value:function(e,t){return t=t||"localplayersubtitleappearance3",this.set(t,JSON.stringify(e),!1)}},{key:"getComicsPlayerSettings",value:function(e){var t=JSON.parse(this.get("comicsPlayerSettings",!1)||"{}");return Object.assign(v,t[e])}},{key:"setComicsPlayerSettings",value:function(e,t){var n=JSON.parse(this.get("comicsPlayerSettings",!1)||"{}");return n[t]=e,this.set("comicsPlayerSettings",JSON.stringify(n),!1)}},{key:"setFilter",value:function(e,t){return this.set(e,t,!0)}},{key:"getFilter",value:function(e){return this.get(e,!0)}},{key:"getSortValuesLegacy",value:function(e,t){return{sortBy:this.getFilter(e+"-sortby")||t,sortOrder:"Descending"===this.getFilter(e+"-sortorder")?"Descending":"Ascending"}}}],t&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),g=new h,b=g.setUserInfo.bind(g),S=g.getData.bind(g),A=g.importFrom.bind(g),x=g.set.bind(g),w=g.get.bind(g),P=g.serverConfig.bind(g),k=g.allowedAudioChannels.bind(g),I=g.preferFmp4HlsContainer.bind(g),j=g.limitSegmentLength.bind(g),T=g.enableCinemaMode.bind(g),C=g.selectAudioNormalization.bind(g),E=g.enableNextVideoInfoOverlay.bind(g),_=g.enableVideoRemainingTime.bind(g),L=g.enableThemeSongs.bind(g),M=g.enableThemeVideos.bind(g),O=g.enableFastFadein.bind(g),R=g.enableBlurhash.bind(g),D=g.enableBackdrops.bind(g),N=g.detailsBanner.bind(g),F=g.useEpisodeImagesInNextUpAndResume.bind(g),U=g.language.bind(g),V=g.dateTimeLocale.bind(g),B=g.skipBackLength.bind(g),z=g.skipForwardLength.bind(g),q=g.dashboardTheme.bind(g),H=g.skin.bind(g),G=g.theme.bind(g),W=g.screensaver.bind(g),Y=g.backdropScreensaverInterval.bind(g),Q=g.screensaverTime.bind(g),K=g.libraryPageSize.bind(g),J=g.maxDaysForNextUp.bind(g),X=g.enableRewatchingInNextUp.bind(g),$=g.soundEffects.bind(g),Z=g.loadQuerySettings.bind(g),ee=g.saveQuerySettings.bind(g),te=g.getSubtitleAppearanceSettings.bind(g),ne=g.setSubtitleAppearanceSettings.bind(g),re=g.getComicsPlayerSettings.bind(g),ie=g.setComicsPlayerSettings.bind(g),oe=g.setFilter.bind(g),ae=g.getFilter.bind(g),se=g.customCss.bind(g),le=g.disableCustomCss.bind(g),ue=g.getSavedView.bind(g),ce=g.saveViewSetting.bind(g),de=g.getSortValuesLegacy.bind(g)},83237:function(e,t,n){"use strict";n.d(t,{Ol:function(){return s},n_:function(){return u},sS:function(){return a}}),n(69703),n(78557),n(23630);var r=n(39738),i=n(67430),o=n(44797);function a(e){if(console.debug("[autocast] %s cast player",e?"enabling":"disabling"),e){var t=r.f.getPlayerInfo();null!=t&&t.id&&localStorage.setItem("autocastPlayerId",t.id)}else localStorage.removeItem("autocastPlayerId")}function s(){var e=localStorage.getItem("autocastPlayerId"),t=r.f.getPlayerInfo();return e&&(null==t?void 0:t.id)===e}function l(){var e=localStorage.getItem("autocastPlayerId");e?(console.debug("[autocast] initializing cast player",e),r.f.getTargets().then((function(t){console.debug("[autocast] playback targets",t);var n=t.find((function(t){return t.id===e}));n?(console.debug("[autocast] found target player",n),r.f.trySetActivePlayer(n.playerName,n)):console.debug("[autocast] selected cast player not found")}))):console.debug("[autocast] no active cast player")}function u(){console.debug("[autoCast] initializing connection listener"),i.tF.getApiClients().forEach((function(e){o.A.off(e,"websocketopen",l),o.A.on(e,"websocketopen",l)})),o.A.on(i.tF,"apiclientcreated",(function(e,t){o.A.off(t,"websocketopen",l),o.A.on(t,"websocketopen",l)}))}},83375:function(e,t,n){"use strict";n.d(t,{E:function(){return i},i:function(){return r}});var r=function(){var e=window.location.hash.indexOf("?");return-1!==e?window.location.hash.substring(e):window.location.search?window.location.search:-1!==(e=window.location.href.indexOf("?"))?window.location.href.substring(e):""},i=function(e,t){return t||(t=r()),new URLSearchParams(t).get(e)||""}},84069:function(e,t,n){"use strict";n.r(t),n.d(t,{autoFocus:function(){return l},enable:function(){return s},isEnabled:function(){return a}}),n(24776),n(69892),n(78557),n(83994);var r,i=n(9164),o=n(46782);function a(){return o.A.tv}function s(){a()&&(window.addEventListener("focusin",(function(e){r=e.target})),console.debug("AutoFocuser enabled"))}function l(e){if(!a())return null;e=e||document.body;var t,n=[];if(r&&(r.classList.contains("btnPreviousPage")?(n.push(e.querySelector(".btnPreviousPage")),n.push(e.querySelector(".btnNextPage"))):r.classList.contains("btnNextPage")?(n.push(e.querySelector(".btnNextPage")),n.push(e.querySelector(".btnPreviousPage"))):r.classList.contains("btnSelectView")&&n.push(e.querySelector(".btnSelectView")),n.push(r)),(n=n.concat(Array.from(e.querySelectorAll(".btnPlay")))).every((function(e){return!i.A.isCurrentlyFocusable(e)||(i.A.focus(e),t=e,!1)})),!t){var o=e.querySelector(".itemsContainer");o&&(t=i.A.autoFocus(o))}return t||(t=i.A.autoFocus(e)),t}t.default={isEnabled:a,enable:s,autoFocus:l}},84138:function(e,t,n){"use strict";n.d(t,{A:function(){return W}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(14382),n(44962),n(4754),n(10849),n(70389),n(94),n(33087),n(36947),n(36457),n(88908),n(26437),n(83810),n(52697),n(78557),n(96054),n(90076),n(21359),n(61642),n(83994),n(23630),n(82367),n(73275);var r=n(92600),i=n(22622),o=n(90381),a=n(82885),s=n(89100),l=n(44797),u=n(75384),c=(n(84734),n(86584),n(89336),n(26448),n(95021),n(93062),n(46968),n(63972)),d=n(97138),f=n(87082),p=n(95700),m=n(44305),y=n(22043),v=n(1935);function h(e){return h="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},h(e)}function g(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return b(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(b(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,b(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,b(d,"constructor",u),b(u,"constructor",l),l.displayName="GeneratorFunction",b(u,i,"GeneratorFunction"),b(d),b(d,i,"Generator"),b(d,r,(function(){return this})),b(d,"toString",(function(){return"[object Generator]"})),(g=function(){return{w:o,m:f}})()}function b(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}b=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){b(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},b(e,t,n,r)}function S(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function x(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function w(e,t){switch(t){case y.W.Local:return e.LocalAddress;case y.W.Manual:return e.ManualAddress;case y.W.Remote:return e.RemoteAddress;default:return e.ManualAddress||e.LocalAddress||e.RemoteAddress}}function P(e,t){e.Name=t.ServerName,t.Id&&(e.Id=t.Id),t.LocalAddress&&(e.LocalAddress=t.LocalAddress)}function k(e){return(e=(e=e.trim()).replace("Http:","http:")).replace("Https:","https:")}function I(e,t){return(t.DateLastAccessed||0)-(e.DateLastAccessed||0)}var j=function(){return e=function e(t,n,i,o,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),console.log("Begin ConnectionManager constructor");var u=this;function h(e,n,r,i){var o=t.credentials(),a=o.Servers.filter((function(e){return e.Id===n.ServerId})),s=a.length?a[0]:e.serverInfo();return!1!==r.updateDateLastAccessed&&(s.DateLastAccessed=(new Date).getTime()),s.Id=n.ServerId,i?(s.UserId=n.User.Id,s.AccessToken=n.AccessToken):(s.UserId=null,s.AccessToken=null),t.addOrUpdateServer(o.Servers,s),t.credentials(o),e.enableAutomaticBitrateDetection=r.enableAutomaticBitrateDetection,e.serverInfo(s),e.setAuthenticationInfo(n.AccessToken,n.User.Id),b(e,r),A(s,e.serverAddress(),n.User)}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!1!==t.reportCapabilities&&e.reportCapabilities(s),e.enableAutomaticBitrateDetection=t.enableAutomaticBitrateDetection,!1!==t.enableWebSocket&&(console.log("calling apiClient.ensureWebSocket"),e.ensureWebSocket())}function A(e,t,n){return u._getOrAddApiClient(e,t),(u.onLocalUserSignedIn?u.onLocalUserSignedIn.call(u,n):Promise.resolve()).then((function(){l.A.trigger(u,"localusersignedin",[n])}))}function j(e){var t={serverId:(e.serverInfo()||{}).Id};return e.logout().then((function(){l.A.trigger(u,"localusersignedout",[t])}),(function(){l.A.trigger(u,"localusersignedout",[t])}))}function T(e){if(e.Address&&e.EndpointAddress){var t=e.EndpointAddress.split(":")[0],n=e.Address.split(":");if(n.length>1){var r=n[n.length-1];isNaN(parseInt(r,10))||(t+=":".concat(r))}return k(t)}return null}function C(e){var t=[],n=[];return!e.manualAddressOnly&&e.LocalAddress&&-1===n.indexOf(e.LocalAddress)&&(t.push({url:e.LocalAddress,mode:y.W.Local,timeout:0}),n.push(t[t.length-1].url)),e.ManualAddress&&-1===n.indexOf(e.ManualAddress)&&(t.push({url:e.ManualAddress,mode:y.W.Manual,timeout:100}),n.push(t[t.length-1].url)),!e.manualAddressOnly&&e.RemoteAddress&&-1===n.indexOf(e.RemoteAddress)&&(t.push({url:e.RemoteAddress,mode:y.W.Remote,timeout:200}),n.push(t[t.length-1].url)),console.info("[ConnectionManager] tryReconnect addresses",n),new Promise((function(e,n){var r={};r.numAddresses=t.length,r.rejects=0,t.forEach((function(t){setTimeout((function(){r.resolved||function(e,t,n,r,i){console.log("getTryConnectPromise "+e),(0,p.ajax)({url:"".concat(e,"/System/Info/Public"),timeout:2e4,type:"GET",dataType:"json"}).then((function(i){n.resolved||(n.resolved=!0,console.log("Reconnect succeeded to "+e),r({url:e,connectionMode:t,data:i}))}),(function(){console.log("Reconnect failed to "+e),n.resolved||(n.rejects++,n.rejects>=n.numAddresses&&i())}))}(t.url,t.mode,r,e,n)}),t.timeout)}))}))}function E(e,r,s,f,m,y){var h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},g=t.credentials();if(!1===h.enableAutoLogin)e.UserId=null,e.AccessToken=null;else if(e.AccessToken&&m)return void function(e,t){return(0,p.ajax)({type:"GET",url:"".concat(t,"/System/Info"),dataType:"json",headers:(r={},s=c.u,l=(0,d.XL)({name:n,version:i},{id:a,name:o},e.AccessToken),(s=x(s))in r?Object.defineProperty(r,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[s]=l,r)}).then((function(t){return P(e,t),Promise.resolve()}),(function(){return e.UserId=null,e.AccessToken=null,Promise.resolve()}));var r,s,l}(e,f).then((function(){E(e,r,s,f,!1,y,h)}));P(e,r),e.LastConnectionMode=s,!1!==h.updateDateLastAccessed&&(e.DateLastAccessed=(new Date).getTime()),t.addOrUpdateServer(g.Servers,e),t.credentials(g);var S={Servers:[]};S.ApiClient=u._getOrAddApiClient(e,f),S.ApiClient.setSystemInfo(r),S.SystemInfo=r,S.State=e.AccessToken&&!1!==h.enableAutoLogin?v.K.SignedIn:v.K.ServerSignIn,S.Servers.push(e),S.ApiClient.enableAutomaticBitrateDetection=h.enableAutomaticBitrateDetection,S.ApiClient.updateServerInfo(e,f),S.ApiClient.setAuthenticationInfo(e.AccessToken,e.UserId);var w=function(){y(S),l.A.trigger(u,"connected",[S])};S.State===v.K.SignedIn?(b(S.ApiClient,h),S.ApiClient.getCurrentUser().then((function(t){A(e,f,t).then(w,w)}),w)):w()}function _(e,t){var n={ManualAddress:e,LastConnectionMode:y.W.Manual};return u.connectToServer(n,t).then((function(e){return e.State===v.K.Unavailable?Promise.reject():e}))}this._apiClients=[],u._minServerVersion=f.U,u.appVersion=function(){return i},u.appName=function(){return n},u.capabilities=function(){return s},u.deviceId=function(){return a},u.credentialProvider=function(){return t},u.getServerInfo=function(e){return t.credentials().Servers.filter((function(t){return t.Id===e}))[0]},u.getLastUsedServer=function(){var e=t.credentials().Servers;return e.sort(I),e.length?e[0]:null},u.addApiClient=function(e){u._apiClients.push(e);var n=t.credentials().Servers.filter((function(t){return(0,m.Q_)(t.ManualAddress,e.serverAddress())||(0,m.Q_)(t.LocalAddress,e.serverAddress())||(0,m.Q_)(t.RemoteAddress,e.serverAddress())})),r=n.length?n[0]:e.serverInfo();if(r.DateLastAccessed=(new Date).getTime(),r.LastConnectionMode=y.W.Manual,r.ManualAddress=e.serverAddress(),e.manualAddressOnly&&(r.manualAddressOnly=!0),e.serverInfo(r),e.onAuthenticated=function(e,t){return h(e,t,{},!0)},!n.length){var i=t.credentials();i.Servers=[r],t.credentials(i)}l.A.trigger(u,"apiclientcreated",[e])},u.clearData=function(){console.log("connection manager clearing data");var e=t.credentials();e.Servers=[],t.credentials(e)},u._getOrAddApiClient=function(e,t){var s=u.getApiClient(e.Id);return s||(s=new r.ApiClient(t,n,i,o,a),u._apiClients.push(s),s.serverInfo(e),s.onAuthenticated=function(e,t){return h(e,t,{},!0)},l.A.trigger(u,"apiclientcreated",[s])),console.log("returning instance from getOrAddApiClient"),s},u.getOrCreateApiClient=function(e){var n=t.credentials().Servers.filter((function(t){return(0,m.Q_)(t.Id,e)}));if(!n.length)throw new Error("Server not found: ".concat(e));var r=n[0];return u._getOrAddApiClient(r,w(r,r.LastConnectionMode))},u.user=function(e){return new Promise((function(t){var n;e&&e.getCurrentUserId()&&e&&e.getCurrentUserId()&&e.getCurrentUser().then((function(e){var r=function(e){return e&&e.PrimaryImageTag?{url:u.getApiClient(e).getUserImageUrl(e.Id,{tag:e.PrimaryImageTag,type:"Primary"}),supportsParams:!0}:{url:null,supportsParams:!1}}(n=e);t({localUser:n,name:n?n.Name:null,imageUrl:r.url,supportsImageParams:r.supportsParams})}))}))},u.logout=function(){for(var e=[],n=0,r=u._apiClients.length;n<r;n++){var i=u._apiClients[n];i.accessToken()&&e.push(j(i))}return Promise.all(e).then((function(){for(var e=t.credentials().Servers.filter((function(e){return"Guest"!==e.UserLinkType})),n=0,r=e.length;n<r;n++){var i=e[n];i.UserId=null,i.AccessToken=null,i.ExchangeToken=null}}))},u.getSavedServers=function(){var e=t.credentials().Servers.slice(0);return e.sort(I),e},u.getAvailableServers=function(){console.debug("[ConnectionManager] Begin getAvailableServers");var e=t.credentials();return new Promise((function(e){var t=function(t){var n=t.map((function(e){var t={Id:e.Id,LocalAddress:T(e)||e.Address,Name:e.Name};return t.LastConnectionMode=t.ManualAddress?y.W.Manual:y.W.Local,t}));e(n)};window&&window.NativeShell&&"function"==typeof window.NativeShell.findServers?window.NativeShell.findServers(1e3).then(t,(function(){t([])})):e([])})).then((function(n){var r=e.Servers.slice(0);return n.forEach((function(e){t.addOrUpdateServer(r,e)})),r.sort(I),e.Servers=r,t.credentials(e),r}))},u.connectToServers=function(e,t){console.log("Begin connectToServers, with ".concat(e.length," servers"));var n=e.length?e[0]:null;return n?u.connectToServer(n,t).then((function(e){return console.log("resolving connectToServers with result.State: "+e.State),e})):Promise.resolve({Servers:e,State:v.K.ServerSelection})},u.connectToServer=function(e,t){return console.debug("[ConnectionManager] begin connectToServer"),new Promise((function(n){t=t||{},C(e).then((function(r){var i=r.url,o=r.connectionMode;r=r.data,1===function(e,t){void 0===e&&(e=""),void 0===t&&(t="");for(var n=e.split("."),r=t.split("."),i=0,o=Math.max(n.length,r.length);i<o;i++){var a=parseInt(n[i]||"0",10),s=parseInt(r[i]||"0",10);if(a<s)return-1;if(a>s)return 1}return 0}(u.minServerVersion(),r.Version)?(console.warn("[ConnectionManager] minServerVersion requirement not met. Server version:",r.Version),n({State:v.K.ServerUpdateNeeded,Servers:[e]})):e.Id&&r.Id!==e.Id?(console.warn("[ConnectionManager] http request succeeded, but found a different server Id than what was expected"),n({State:v.K.ServerMismatch})):E(e,r,o,i,!0,n,t)}),(function(){n({State:v.K.Unavailable})}))}))},u.updateSavedServerId=function(){var e,n=(e=g().m((function e(n){var r,i,o;return g().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,C(n);case 1:r=e.v,i=r.data,n.Id=i.Id,n.AccessToken=null,n.UserId=null,o=t.credentials(),t.addOrUpdateServer(o.Servers,n),t.credentials(o);case 2:return e.a(2)}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){S(o,r,i,a,s,"next",e)}function s(e){S(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}(),u.connectToAddress=function(e,t){if(!e)return Promise.reject();e=k(e);var n=[];/^[^:]+:\/\//.test(e)?n.push(e):(n.push("https://".concat(e)),n.push("http://".concat(e)));var r=0;return _(n[r],t).catch((function e(){return console.log("connectToAddress ".concat(n[r]," failed")),++r<n.length?_(n[r],t).catch(e):Promise.resolve({State:v.K.Unavailable})}))},u.deleteServer=function(e){if(!e)throw new Error("null serverId");var n=t.credentials().Servers.filter((function(t){return t.Id===e}));return n=n.length?n[0]:null,new Promise((function(r){var i;n.ConnectServerId||((i=t.credentials()).Servers=i.Servers.filter((function(t){return t.Id!==e})),t.credentials(i),r())}))}},(t=[{key:"connect",value:function(e){var t=this;return console.log("Begin connect"),this.getAvailableServers().then((function(n){return t.connectToServers(n,e)}))}},{key:"handleMessageReceived",value:function(e){var t=e.ServerId;if(t){var n=this.getApiClient(t);if(n){if("string"==typeof e.Data)try{e.Data=JSON.parse(e.Data)}catch(e){console.log("unable to parse json content: "+e)}n.handleMessageReceived(e)}}}},{key:"getApiClients",value:function(){for(var e=this.getSavedServers(),t=0,n=e.length;t<n;t++){var r=e[t];r.Id&&this._getOrAddApiClient(r,w(r,r.LastConnectionMode))}return this._apiClients}},{key:"getApiClient",value:function(e){if(!e)throw new Error("item or serverId cannot be null");return e.ServerId&&(e=e.ServerId),this._apiClients.filter((function(t){var n=t.serverInfo();return!n||n.Id===e}))[0]}},{key:"minServerVersion",value:function(e){return e&&(this._minServerVersion=e),this._minServerVersion}}])&&A(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function T(e){return T="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},T(e)}function C(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return E(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(E(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,E(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,E(d,"constructor",u),E(u,"constructor",l),l.displayName="GeneratorFunction",E(u,i,"GeneratorFunction"),E(d),E(d,i,"Generator"),E(d,r,(function(){return this})),E(d,"toString",(function(){return"[object Generator]"})),(C=function(){return{w:o,m:f}})()}function E(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}E=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){E(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},E(e,t,n,r)}function _(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,D(r.key),r)}}function D(e){var t=function(e){if("object"!=T(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function F(){return F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=U(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},F.apply(null,arguments)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var B=function(e){!e.quality&&(e.maxWidth||e.width||e.maxHeight||e.height||e.fillWidth||e.fillHeight)&&(e.quality=90)},z=function(){if(navigator.connection){var e=navigator.connection.downlinkMax;if(e&&e>0&&e<Number.POSITIVE_INFINITY)return e/=8,e*=1e6,e*=.7,parseInt(e,10)}return null},q=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=U(t),function(e,t){if(t&&("object"==T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],U(e).constructor):t.apply(e,n))}(this,t,arguments)).localApiClient=null,e.firstConnection=null,l.A.on(e,"localusersignedout",(function(e,t){(0,a.setUserInfo)(null,null),H.credentials(H.credentials()),window.NativeShell&&"function"==typeof window.NativeShell.onLocalUserSignedOut&&window.NativeShell.onLocalUserSignedOut(t)})),l.A.on(e,"apiclientcreated",(function(e,t){t.getMaxBandwidth=z,t.normalizeImageOptions=B})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(t,e),n=t,s=[{key:"initApiClient",value:function(e){console.debug("creating ApiClient singleton");var t=new r.ApiClient(e,i.g.appName(),i.g.appVersion(),i.g.deviceName(),i.g.deviceId());t.enableAutomaticNetworking=!1,t.manualAddressOnly=!0,this.addApiClient(t),this.setLocalApiClient(t),console.debug("loaded ApiClient singleton")}},{key:"connect",value:function(e){return(n=t,r=this,"function"==typeof(i=F(U(1&3?n.prototype:n),"connect",r))?function(e){return i.apply(r,e)}:i)([M({enableAutoLogin:o.A.enableAutoLogin()},e)]);var n,r,i}},{key:"setLocalApiClient",value:function(e){e&&(this.localApiClient=e,window.ApiClient=e)}},{key:"getLocalApiClient",value:function(){return this.localApiClient}},{key:"currentApiClient",value:function(){var e=this.getLocalApiClient();if(!e){var t=this.getLastUsedServer();t&&(e=this.getApiClient(t.Id))}return e}},{key:"getCurrentApi",value:function(){var e=this.currentApiClient();if(e)return(0,u.C)(e)}},{key:"getCurrentApiClientAsync",value:(c=C().m((function e(){var t;return C().w((function(e){for(;;)switch(e.n){case 0:if(t=this.currentApiClient()){e.n=1;break}throw new Error("[ServerConnection] No current ApiClient instance");case 1:return e.a(2,t)}}),e,this)})),d=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=c.apply(e,t);function o(e){_(i,n,r,o,a,"next",e)}function a(e){_(i,n,r,o,a,"throw",e)}o(void 0)}))},function(){return d.apply(this,arguments)})},{key:"onLocalUserSignedIn",value:function(e){var t=this.getApiClient(e.ServerId);return this.setLocalApiClient(t),(0,a.setUserInfo)(e.Id,t).then((function(){return window.NativeShell&&"function"==typeof window.NativeShell.onLocalUserSignedIn?window.NativeShell.onLocalUserSignedIn(e,t.accessToken()):Promise.resolve()}))}}],s&&R(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s,c,d}(j),H=new r.Credentials,G=s.default.capabilities(i.g),W=new q(H,i.g.appName(),i.g.appVersion(),i.g.deviceName(),i.g.deviceId(),G)},84238:function(e,t,n){n(24776),n(36947),n(78557),function(){var e={transform:["webkitTransform"],transition:["webkitTransition"]},t=document.createElement("div");function n(n){n in t.style||(e[n]||[]).every((function(e){return!(e in t.style)||(console.debug("polyfill '".concat(n,"' with '").concat(e,"'")),Object.defineProperty(CSSStyleDeclaration.prototype,n,{get:function(){return this[e]},set:function(t){this[e]=t}}),!1)}))}t.style instanceof CSSStyleDeclaration&&(n("transform"),n("transition"))}()},84849:function(e,t,n){"use strict";var r=n(63696),i=n(8566);t.A=function(){return(0,r.useEffect)((function(){return i.Ay.show(),function(){i.Ay.hide()}}),[]),null}},84851:function(e,t,n){"use strict";var r=n(62540),i=n(4452),o=n.n(i),a=n(63696),s=n(22622),l=n(46782),u=n(70267),c=n(97339),d=n(13615),f=function(){return f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)};t.A=function(e){var t=e.className,n=e.isAutoHideEnabled,i=e.href,p=void 0===i?"#":i,m=e.target,y=e.onClick,v=e.children,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["className","isAutoHideEnabled","href","target","onClick","children"]),g=(0,a.useCallback)((function(e){var t=p||"";"#"!==t?m?s.g.supports(c.Y.TargetBlank)||(e.preventDefault(),d.A.openUrl(t)):(e.preventDefault(),u.appRouter.show(t).catch((function(e){console.error("[LinkButton] failed to show url",t,e)}))):e.preventDefault(),null==y||y(e)}),[p,m,y]);if(!0===n&&!s.g.supports(c.Y.ExternalLinks))return null;var b=o()("emby-button",t,{"show-focus":l.A.tv});return(0,r.jsx)("a",f({className:b,href:p,target:m,onClick:g},h,{children:v}))}},85660:function(e,t,n){"use strict";n.r(t),n.d(t,{STABLE_APP_ROUTES:function(){return y}});var r=n(62540),i=n(87404),o=(n(63696),n(22477)),a=n(51218),s=n(37881),l=n(34569),u=n(71004),c=n(56419),d=n(34945),f=n(98372),p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},m=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},y=[{path:"/*",Component:c.A,children:[{index:!0,element:(0,r.jsx)(i.C5,{replace:!0,to:"/home"})},{Component:o.A,children:m(m([],p(d.ASYNC_USER_ROUTES.map(a.G)),!1),p(f.LEGACY_USER_ROUTES.map(s.I)),!1),ErrorBoundary:l.A},{element:(0,r.jsx)(o.A,{level:"public"}),children:m(m(m([],p(d.ASYNC_PUBLIC_ROUTES.map(a.G)),!1),p(f.LEGACY_PUBLIC_ROUTES.map(s.I)),!1),[{path:"*",Component:u.A}],!1)}]}]},86663:function(e,t,n){"use strict";n.r(t),n.d(t,{show:function(){return v}}),n(14382),n(69703),n(84734),n(44962),n(86584),n(78557),n(90076),n(83994),n(82367);var r=n(97339),i=n(44797),o=n(34789),a=n(8566),s=n(39738),l=n(38829),u=n(70267),c=n(5898),d=n(22622),f=n(83237),p=(n(77157),n(10353),n(48080)),m=n(79754);function y(e){var t=e.deviceType;switch(!t&&e.isLocalPlayer&&(t=o.A.tv?"tv":o.A.mobile?"smartphone":"desktop"),t||(t="tv"),t){case"smartphone":return"smartphone";case"tablet":return"tablet";case"tv":default:return"tv";case"cast":return"cast";case"desktop":return"computer"}}function v(e){var t=s.f.getPlayerInfo();if(!t||t.isLocalPlayer){var i=t?t.id:null;a.Ay.show(),s.f.getTargets().then((function(t){var u=t.map((function(e){var t,n=e.name;return e.appName&&e.appName!==e.name&&(n+=" - "+e.appName),{name:n,id:e.id,selected:i===e.id,secondaryText:(t=e,t.user?t.user.Name:null),icon:y(e)}}));n.e(62882).then(n.bind(n,62882)).then((function(n){a.Ay.hide();var i={title:c.Ay.translate("HeaderPlayOn"),items:u,positionTo:e,resolveOnClick:!0,border:!0};!o.A.chrome&&!o.A.edgeChromium||d.g.supports(r.Y.CastMenuHashChange)||(i.enableHistory=!1),!!l.X.plugins.find((function(e){return"chromecast"===e.id}))||(i.text="(".concat(c.Ay.translate("GoogleCastUnsupported"),")")),n.show(i).then((function(e){var n=t.filter((function(t){return t.id===e}))[0];s.f.trySetActivePlayer(n.playerName,n)})).catch((function(){}))})).catch((function(e){console.error("[playerSelectionMenu] failed to import action sheet",e)}))})).catch((function(e){console.error("[playerSelectionMenu] failed to get playback targets",e)}))}else!function(e){var t="",n=m.default.createDialog({removeOnClose:!0,modal:!1,entryAnimationDuration:160,exitAnimationDuration:160,autoFocus:!1});n.classList.add("promptDialog");var r=e.deviceName||e.name;t+='<div class="promptDialogContent" style="padding:1.5em;">',t+='<h2 style="margin-top:.5em;">',t+=r,t+="</h2>",t+="<div>",-1!==e.supportedCommands.indexOf("DisplayContent")&&(t+='<label class="checkboxContainer">',t+='<input type="checkbox" is="emby-checkbox" class="chkMirror"'+(s.f.enableDisplayMirroring()?" checked":"")+"/>",t+="<span>"+c.Ay.translate("EnableDisplayMirroring")+"</span>",t+="</label>"),t+="</div>",t+='<div><label class="checkboxContainer">',t+='<input type="checkbox" is="emby-checkbox" class="chkAutoCast"'+((0,f.Ol)()?" checked":"")+"/>",t+="<span>"+c.Ay.translate("EnableAutoCast")+"</span>",t+="</label></div>",t+='<div style="margin-top:1em;display:flex;justify-content: flex-end;">',t+='<button is="emby-button" type="button" class="button-flat btnRemoteControl promptDialogButton">'+c.Ay.translate("HeaderRemoteControl")+"</button>",t+='<button is="emby-button" type="button" class="button-flat btnDisconnect promptDialogButton ">'+c.Ay.translate("Disconnect")+"</button>",t+='<button is="emby-button" type="button" class="button-flat btnCancel promptDialogButton">'+c.Ay.translate("ButtonCancel")+"</button>",t+="</div>",t+="</div>",n.innerHTML=t;var i=n.querySelector(".chkMirror");i&&i.addEventListener("change",h);var o=n.querySelector(".chkAutoCast");o&&o.addEventListener("change",g);var a="",l=n.querySelector(".btnRemoteControl");l&&l.addEventListener("click",(function(){a="nowplaying",m.default.close(n)})),n.querySelector(".btnDisconnect").addEventListener("click",(function(){a="disconnectFromPlayer",m.default.close(n)})),n.querySelector(".btnCancel").addEventListener("click",(function(){m.default.close(n)})),m.default.open(n).then((function(){if("nowplaying"===a)return u.appRouter.showNowPlaying();"disconnectFromPlayer"===a&&function(e){if(-1!==s.f.getSupportedCommands().indexOf("EndSession")){var t=[];t.push({name:c.Ay.translate("Yes"),id:"yes"}),t.push({name:c.Ay.translate("No"),id:"no"}),p.A.show({buttons:t,text:c.Ay.translate("ConfirmEndPlayerSession",e)}).then((function(e){switch(e){case"yes":s.f.getCurrentPlayer().endSession(),s.f.setDefaultPlayerActive();break;case"no":s.f.setDefaultPlayerActive()}})).catch((function(){}))}else s.f.setDefaultPlayerActive()}(r)})).catch((function(){}))}(t)}function h(){s.f.enableDisplayMirroring(this.checked)}function g(){(0,f.sS)(this.checked)}i.A.on(s.f,"pairing",(function(){a.Ay.show()})),i.A.on(s.f,"paired",(function(){a.Ay.hide()})),i.A.on(s.f,"pairerror",(function(){a.Ay.hide()})),t.default={show:v}},87003:function(e,t,n){"use strict";n.d(t,{A:function(){return G},b:function(){return H}});var r=n(62540),i=n(23133),o=n(63696),a=n(9055),s=n(87404),l=n(7603),u=n(66359),c=n(85660),d=n(56419),f=n(19373),p=n(22477),m=n(34569),y=n(37881),v=[{path:"remoteaccess",pageProps:{appType:f.u.Wizard,controller:"remote/index",view:"remote/index.html"}},{path:"finish",pageProps:{appType:f.u.Wizard,controller:"finish/index",view:"finish/index.html"}},{path:"library",pageProps:{appType:f.u.Wizard,controller:"library",view:"library.html"}},{path:"settings",pageProps:{appType:f.u.Wizard,controller:"settings/index",view:"settings/index.html"}},{path:"start",pageProps:{appType:f.u.Wizard,controller:"start/index",view:"start/index.html"}},{path:"user",pageProps:{appType:f.u.Wizard,controller:"user/index",view:"user/index.html"}}],h=[{element:(0,r.jsx)(p.A,{level:"wizard"}),children:[{Component:d.A,path:"wizard",children:function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([{index:!0,element:(0,r.jsx)(s.C5,{replace:!0,to:"start"})}],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(v.map(y.I)),!1),ErrorBoundary:m.A}]}],g=function(e){var t=e.isHidden,i=void 0!==t&&t;return(0,o.useEffect)((function(){Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(68603)]).then(n.bind(n,73233))}),[]),(0,r.jsxs)("div",{style:i?{display:"none"}:void 0,children:[(0,r.jsx)("div",{className:"mainDrawer hide",children:(0,r.jsx)("div",{className:"mainDrawer-scrollContainer scrollContainer focuscontainer-y"})}),(0,r.jsx)("div",{className:"skinHeader focuscontainer-x"}),(0,r.jsx)("div",{className:"mainDrawerHandle"})]})},b=function(){return(0,o.useEffect)((function(){Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(32721)]).then(n.bind(n,85420))}),[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"backdropContainer"}),(0,r.jsx)("div",{className:"backgroundContainer"})]})},S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},S.apply(this,arguments)},A=n(44797),x="HISTORY_UPDATE",w=function(){function e(e){this._router=e,this._router.subscribe((function(e){console.debug("[RouterHistory] history update",e),A.A.trigger(document,x,[e])})),this.createHref=e.createHref}return Object.defineProperty(e.prototype,"action",{get:function(){return this._router.state.historyAction},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this._router.state.location},enumerable:!1,configurable:!0}),e.prototype.back=function(){this._router.navigate(-1)},e.prototype.forward=function(){this._router.navigate(1)},e.prototype.go=function(e){this._router.navigate(e)},e.prototype.push=function(e,t){this._router.navigate(e,{state:t})},e.prototype.replace=function(e,t){this._router.navigate(e,{state:t,replace:!0})},e.prototype.block=function(){throw new Error("`history.block()` is not implemented")},e.prototype.listen=function(e){var t=function(t,n){return e({action:n.historyAction,location:n.location})};return A.A.on(document,x,t),function(){return A.A.off(document,x,t)}},e}(),P=n(58161),k=n(27367),I=n(45950),j={palette:{mode:"dark",primary:{main:"#00a4dc"},secondary:{main:"#aa5cc3"},background:{default:"#101010",paper:"#202020"},action:{selectedOpacity:.2},starIcon:{main:"#f2b01e"},error:{main:"#c62828"}}},T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},T.apply(this,arguments)},C=(0,P.A)({colorSchemes:{dark:!0,light:!0}}),E=function(e){var t;return(0,I.A)({},"light"===(null===(t=e.palette)||void 0===t?void 0:t.mode)?C.colorSchemes.light:C.colorSchemes.dark,j,e)},_=E({palette:{mode:"light",background:{default:"#d5e9f2",paper:"#fff"},AppBar:{defaultBg:"#bcbcbc"}}}),L=E({palette:{background:{paper:"#011432"},AppBar:{defaultBg:"#011432"}}}),M=(0,I.A)({},j,{palette:{mode:"light",background:{default:"#f2f2f2",paper:"#e8e8e8"},AppBar:{defaultBg:"#e8e8e8"}}}),O=E({palette:{background:{paper:"#000420"},primary:{main:"#48c3c8"},secondary:{main:"#ff77f1"},AppBar:{defaultBg:"#000420"}}}),R=E({palette:{background:{paper:"#0c2450"},AppBar:{defaultBg:"#0c2450"}}}),D={appletv:_,blueradiance:L,dark:j,light:M,purplehaze:O,wmc:R},N=(0,k.A)(T(T({cssVariables:{cssVarPrefix:"jf",colorSchemeSelector:'[data-theme="%s"]',disableCssColorScheme:!0},defaultColorScheme:"dark"},{typography:{fontFamily:'"Noto Sans", sans-serif',button:{textTransform:"none"},h1:{fontSize:"1.8rem"},h2:{fontSize:"1.5rem"},h3:{fontSize:"1.17rem"}},components:{MuiAlert:{styleOverrides:{message:{flexGrow:1}}},MuiAppBar:{styleOverrides:{colorTransparent:function(e){return{color:e.theme.vars.palette.text.primary}}}},MuiButton:{defaultProps:{variant:"contained"},variants:[{props:{size:"large"},style:{fontSize:"1rem",fontWeight:"bold"}}]},MuiFormControl:{defaultProps:{variant:"filled"}},MuiFormHelperText:{styleOverrides:{root:{fontSize:"1rem"}}},MuiTextField:{defaultProps:{variant:"filled"}},MuiListItemIcon:{styleOverrides:{root:{minWidth:36}}},MuiListSubheader:{styleOverrides:{root:{backgroundColor:"inherit",position:"initial"}}},MuiListItemText:{styleOverrides:{inset:{paddingLeft:36}}}}}),{colorSchemes:D})),F=n(71286),U=function(){return{get:function(e){return e},set:function(){},subscribe:function(e){var t=function(t,n){return e(n)};return A.A.on(document,F.B.THEME_CHANGE,t),function(){return A.A.off(document,F.B.THEME_CHANGE,t)}}}},V=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},B=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},z="experimental"===localStorage.getItem("layout"),q=(0,a.Ge)([{element:(0,r.jsx)((function(){var e=(0,s.zy)(),t=Object.values(l.DASHBOARD_APP_PATHS).some((function(t){return e.pathname.startsWith("/".concat(t))}));return(0,r.jsxs)(i.A,{theme:N,defaultMode:"dark",storageManager:U,children:[(0,r.jsx)(b,{}),(0,r.jsx)(g,{isHidden:z||t}),(0,r.jsx)(s.sv,{})]})}),{}),children:B(B(B(B([],V(z?u.EXPERIMENTAL_APP_ROUTES:c.STABLE_APP_ROUTES),!1),V(l.DASHBOARD_APP_ROUTES),!1),V(h),!1),[{path:"!/*",Component:function(){var e=(0,s.zy)(),t=(0,o.useMemo)((function(){var t={search:e.search,hash:e.hash};return e.pathname.startsWith("/!/")?S(S({},t),{pathname:e.pathname.substring(2)}):e.pathname.startsWith("/!")?S(S({},t),{pathname:e.pathname.replace(/^\/!/,"/")}):e.pathname.startsWith("!")?S(S({},t),{pathname:e.pathname.substring(1)}):void 0}),[e]);return t?(console.warn("[BangRedirect] You are using a deprecated URL format. This will stop working in a future Jellyfin update."),(0,r.jsx)(s.C5,{replace:!0,to:t})):null}}],!1)}]),H=function(e){return new w(e)}(q);function G(){return(0,r.jsx)(a.pg,{router:q})}},87119:function(e,t,n){"use strict";n.d(t,{A:function(){return V}});var r=n(62540),i=n(62955),o=n(67242),a=n(92779),s=n(75487),l=n(91401),u=n(72073),c=n(63696),d=n(70267),f=n(69410),p=n(5898),m=n(81965),y=n(87934),v=n(58304),h=n(10301),g=n(23849),b=n(55129),S=n(17997),A=n(74695),x=n(85002),w=n(94568),P=n(13960),k=n(74156),I=n(44790),j=n(60434),T=n(48402),C=n(85637),E=n(9055),_=n(22622),L=n(97339),M=n(891),O=n(13615),R=n(89100),D="app-user-menu",N=function(e){var t,n=e.anchorEl,i=e.open,o=e.onMenuClose,a=(0,f.gf)().user,s=(0,M.K)().data,l=(0,c.useCallback)((function(){O.A.openDownloadManager(),o()}),[o]),u=(0,c.useCallback)((function(){O.A.openClientSettings(),o()}),[o]),d=(0,c.useCallback)((function(){_.g.exit(),o()}),[o]),m=(0,c.useCallback)((function(){R.default.logout(),o()}),[o]),N=(0,c.useCallback)((function(){R.default.selectServer(),o()}),[o]);return(0,r.jsxs)(T.A,{anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:D,keepMounted:!0,open:i,onClose:o,children:[(0,r.jsxs)(C.A,{component:E.N_,to:"/userprofile?userId=".concat(null==a?void 0:a.Id),onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(y.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("Profile")})]}),(0,r.jsxs)(C.A,{component:E.N_,to:"/mypreferencesmenu",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(w.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("Settings")})]}),(_.g.supports(L.Y.DownloadManagement)||_.g.supports(L.Y.ClientSettings))&&(0,r.jsx)(k.A,{}),_.g.supports(L.Y.DownloadManagement)&&(0,r.jsxs)(C.A,{onClick:l,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(b.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("DownloadManager")})]}),_.g.supports(L.Y.ClientSettings)&&(0,r.jsxs)(C.A,{onClick:u,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(v.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("ClientSettings")})]}),(null===(t=null==a?void 0:a.Policy)||void 0===t?void 0:t.IsAdministrator)&&[(0,r.jsx)(k.A,{},"admin-links-divider"),(0,r.jsxs)(C.A,{component:E.N_,to:"/dashboard",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(g.A,{})}),(0,r.jsx)(j.A,{primary:p.Ay.translate("TabDashboard")})]},"admin-dashboard-link"),(0,r.jsxs)(C.A,{component:E.N_,to:"/metadata",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(S.A,{})}),(0,r.jsx)(j.A,{primary:p.Ay.translate("MetadataManager")})]},"admin-metadata-link")],(0,r.jsx)(k.A,{}),s&&(0,r.jsxs)(C.A,{component:E.N_,to:"/quickconnect",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(x.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("QuickConnect")})]}),_.g.supports(L.Y.MultiServer)&&(0,r.jsxs)(C.A,{onClick:N,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(P.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("SelectServer")})]}),(0,r.jsxs)(C.A,{onClick:m,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(A.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("ButtonSignOut")})]}),_.g.supports(L.Y.ExitMenu)&&[(0,r.jsx)(k.A,{},"exit-menu-divider"),(0,r.jsxs)(C.A,{onClick:d,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(h.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("ButtonExitApp")})]},"exit-menu-button")]]})},F=function(){var e=(0,f.gf)().user,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,c.useState)(null),2),n=t[0],i=t[1],o=Boolean(n),a=(0,c.useCallback)((function(e){i(e.currentTarget)}),[i]),l=(0,c.useCallback)((function(){i(null)}),[i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{title:p.Ay.translate("UserMenu"),children:(0,r.jsx)(s.A,{size:"large","aria-label":p.Ay.translate("UserMenu"),"aria-controls":D,"aria-haspopup":"true",onClick:a,color:"inherit",sx:{padding:0},children:(0,r.jsx)(m.A,{user:e})})}),(0,r.jsx)(N,{open:o,anchorEl:n,onMenuClose:l})]})},U=function(){d.appRouter.back().catch((function(e){console.error("[AppToolbar] error calling appRouter.back",e)}))},V=function(e){var t=e.buttons,n=e.children,c=e.isDrawerAvailable,d=e.isDrawerOpen,m=e.onDrawerButtonClick,y=void 0===m?function(){}:m,v=e.isBackButtonAvailable,h=void 0!==v&&v,g=e.isUserMenuAvailable,b=void 0===g||g,S=(0,f.gf)().user,A=Boolean(S);return(0,r.jsxs)(l.A,{variant:"dense",sx:{flexWrap:{xs:"wrap",lg:"nowrap"},pl:{xs:"max(16px, env(safe-area-inset-left))",sm:"max(24px, env(safe-area-inset-left))"},pr:{xs:"max(16px, env(safe-area-inset-left))",sm:"max(24px, env(safe-area-inset-left))"}},children:[A&&c&&(0,r.jsx)(u.A,{title:p.Ay.translate(d?"MenuClose":"MenuOpen"),children:(0,r.jsx)(s.A,{size:"large",edge:"start",color:"inherit","aria-label":p.Ay.translate(d?"MenuClose":"MenuOpen"),onClick:y,children:(0,r.jsx)(o.A,{})})}),h&&(0,r.jsx)(u.A,{title:p.Ay.translate("ButtonBack"),children:(0,r.jsx)(s.A,{size:"large",edge:A&&c?void 0:"start",color:"inherit","aria-label":p.Ay.translate("ButtonBack"),onClick:U,children:(0,r.jsx)(i.A,{})})}),n,(0,r.jsx)(a.A,{sx:{display:"flex",flexGrow:1,justifyContent:"flex-end"},children:t}),A&&b&&(0,r.jsx)(a.A,{sx:{flexGrow:0},children:(0,r.jsx)(F,{})})]})}},89100:function(e,t,n){"use strict";n.r(t),n.d(t,{alert:function(){return N},capabilities:function(){return F},confirm:function(){return z},getConfigurationResourceUrl:function(){return L},getCurrentUser:function(){return k},getCurrentUserId:function(){return T},getPluginUrl:function(){return _},hideLoadingMsg:function(){return V},logout:function(){return E},navigate:function(){return M},onServerChanged:function(){return C},pageClassOn:function(){return q},pageIdOn:function(){return H},processErrorResponse:function(){return D},processPluginConfigurationUpdateResult:function(){return O},processServerConfigurationUpdateResult:function(){return R},selectServer:function(){return U},serverAddress:function(){return I},showLoadingMsg:function(){return B}}),n(29305),n(32733),n(84701),n(2623),n(14382),n(69703),n(44962),n(17731),n(86584),n(10849),n(70389),n(77575),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(64062),n(82367);var r=n(22622),i=n(64963),o=n(97339),a=n(67430),s=n(71866),l=n(8566),u=n(70267),c=n(41177),d=n(47602),f=n(5898),p=n(51876),m=n(98320),y=n(89166),v=n(21840),h=n(79754),g=n(92305),b=n(83375),S=n(31297);function A(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return x(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(x(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,x(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,x(d,"constructor",u),x(u,"constructor",l),l.displayName="GeneratorFunction",x(u,i,"GeneratorFunction"),x(d),x(d,i,"Generator"),x(d,r,(function(){return this})),x(d,"toString",(function(){return"[object Generator]"})),(A=function(){return{w:o,m:f}})()}function x(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}x=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){x(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},x(e,t,n,r)}function w(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){w(o,r,i,a,s,"next",e)}function s(e){w(o,r,i,a,s,"throw",e)}a(void 0)}))}}function k(){return window.ApiClient.getCurrentUser(!1)}function I(){return j.apply(this,arguments)}function j(){return j=P(A().m((function e(){var t,n,r,i,o;return A().w((function(e){for(;;)switch(e.n){case 0:if(!(t=window.ApiClient)){e.n=1;break}return e.a(2,Promise.resolve(t.serverAddress()));case 1:return e.n=2,p.Ve();case 2:if(0!==(n=e.v).length){e.n=4;break}if(i=window.location.href.toLowerCase().lastIndexOf("/web"),!(r=-1!=i?window.location.href.substring(0,i):window.location.origin).startsWith("file:")){e.n=3;break}return e.a(2,Promise.resolve());case 3:n.push(r);case 4:return console.debug("URL candidates:",n),o=n.map((function(e){return fetch("".concat(e,"/System/Info/Public"),{cache:"no-cache"}).then(function(){var t=P(A().m((function t(n){var r;return A().w((function(t){for(;;)switch(t.n){case 0:if(n.ok){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,n.json();case 2:r=t.v,t.n=4;break;case 3:return t.p=3,t.v,t.a(2);case 4:return t.a(2,{url:e,config:r})}}),t,null,[[1,3]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){console.error(e)}))})),e.a(2,Promise.all(o).then((function(e){return e.filter((function(e){return null==e?void 0:e.config}))})).then((function(e){var t=e.find((function(e){return!e.config.StartupWizardCompleted}))||e[0];return null==t?void 0:t.url})).catch((function(e){console.error(e)})))}}),e)}))),j.apply(this,arguments)}function T(){var e=window.ApiClient;return e?e.getCurrentUserId():null}function C(e,t,n){a.tF.setLocalApiClient(n)}function E(){a.tF.logout().then((function(){S.q.clear(),i.Ay.reset(),r.g.supports(o.Y.MultiServer)?M("selectserver"):M("login")}))}function _(e){return"configurationpage?name="+encodeURIComponent(e)}function L(e){return ApiClient.getUrl("web/ConfigurationPage",{name:e})}function M(e,t){if(!e)throw new Error("url cannot be null or empty");var n=(0,b.i)();return t&&n&&(e+=n),u.appRouter.show(e)}function O(){l.Ay.hide(),(0,s.A)(f.Ay.translate("SettingsSaved"))}function R(){l.Ay.hide(),(0,s.A)(f.Ay.translate("SettingsSaved"))}function D(e){l.Ay.hide();var t=""+e.status;e.statusText&&(t=e.statusText),(0,c.A)({title:t,text:e.headers?e.headers.get("X-Application-Error-Code"):null})}function N(e){"string"==typeof e?(0,s.A)({text:e}):(0,c.A)({title:e.title||f.Ay.translate("HeaderAlert"),text:e.message}).then(e.callback||function(){})}function F(e){return Object.assign({PlayableMediaTypes:["Audio","Video"],SupportedCommands:["MoveUp","MoveDown","MoveLeft","MoveRight","PageUp","PageDown","PreviousLetter","NextLetter","ToggleOsd","ToggleContextMenu","Select","Back","SendKey","SendString","GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","SetShuffleQueue","ChannelUp","ChannelDown","PlayMediaSource","PlayTrailers"],SupportsPersistentIdentifier:"cordova"===window.appMode||"android"===window.appMode,SupportsMediaControl:!0},e.getPushTokenInfo())}function U(){window.NativeShell&&"function"==typeof window.NativeShell.selectServer?window.NativeShell.selectServer():M("selectserver")}function V(){l.Ay.hide()}function B(){l.Ay.show()}function z(e,t,n){(0,d.A)(e,t).then((function(){n(!0)})).catch((function(){n(!1)}))}var q=function(e,t,n){document.addEventListener(e,(function(e){var r=e.target;r.classList.contains(t)&&n.call(r,e)}))},H=function(e,t,n){document.addEventListener(e,(function(e){var r=e.target;r.id===t&&n.call(r,e)}))},G={alert:N,capabilities:F,confirm:z,getPluginUrl:_,getConfigurationResourceUrl:L,getCurrentUser:k,getCurrentUserId:T,hideLoadingMsg:V,logout:E,navigate:M,onServerChanged:C,processErrorResponse:D,processPluginConfigurationUpdateResult:O,processServerConfigurationUpdateResult:R,selectServer:U,serverAddress:I,showLoadingMsg:B,datetime:m.Ay,DirectoryBrowser:v.default,dialogHelper:h.default,itemIdentifier:g.default,setBackdropTransparency:y.FB};window.Dashboard=G,t.default=G},89166:function(e,t,n){"use strict";n.d(t,{C9:function(){return T},FB:function(){return M},KH:function(){return L},PI:function(){return C},gJ:function(){return S}}),n(29305),n(32733),n(84701),n(81678),n(44962),n(86584),n(4754),n(94),n(77575),n(36947),n(78557),n(83994),n(23630),n(82367);var r=n(98526),i=n(67430),o=n(34789),a=n(39738),s=n(36300),l=n(82885);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}var f,p,m,y,v,h,g=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"load",value:function(e,t,n){var r=new Image,i=this;r.onload=function(){if(!i.isDestroyed){var r=document.createElement("div");if(r.classList.add("backdropImage"),r.classList.add("displayingBackdropImage"),r.style.backgroundImage="url('".concat(e,"')"),r.setAttribute("data-url",e),r.classList.add("backdropImageFadeIn"),t.appendChild(r),o.A.slow)return null!=n&&n.parentNode&&n.parentNode.removeChild(n),void w(!0);var a=function(){s.Ay.removeEventListener(r,s.Ay.whichAnimationEvent(),a,{once:!0}),r===i.currentAnimatingElement&&(i.currentAnimatingElement=null),null!=n&&n.parentNode&&n.parentNode.removeChild(n)};s.Ay.addEventListener(r,s.Ay.whichAnimationEvent(),a,{once:!0}),w(!0)}},r.src=e}},{key:"cancelAnimation",value:function(){var e=this.currentAnimatingElement;e&&(e.classList.remove("backdropImageFadeIn"),this.currentAnimatingElement=null)}},{key:"destroy",value:function(){this.isDestroyed=!0,this.cancelAnimation()}}])&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function b(){return f||(f=document.querySelector(".backdropContainer")),f||((f=document.createElement("div")).classList.add("backdropContainer"),document.body.insertBefore(f,document.body.firstChild)),f}function S(e){_(),v&&(v.destroy(),v=null),b().innerHTML="",e&&(y=!1),w(!1)}function A(){return p||(p=document.querySelector(".backgroundContainer")),p}function x(){m||y?A().classList.add("withBackdrop"):A().classList.remove("withBackdrop")}function w(e){m=e,x()}function P(e){y=e,x()}function k(e,t){var n;t=t||{};var r=i.tF.getApiClient(e.ServerId);return e.BackdropImageTags&&e.BackdropImageTags.length>0?e.BackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.BackdropItemId||e.Id,Object.assign(t,{type:"Backdrop",tag:n,maxWidth:s.Ay.getScreenWidth(),index:i}))})):e.ParentBackdropItemId&&null!==(n=e.ParentBackdropImageTags)&&void 0!==n&&n.length?e.ParentBackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.ParentBackdropItemId,Object.assign(t,{type:"Backdrop",tag:n,maxWidth:s.Ay.getScreenWidth(),index:i}))})):[]}var I=[],j=-1;function T(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||l.enableBackdrops()){var n=function(e,t){for(var n=[],r=function(e){n.push(e)},i=0,o=e.length;i<o;i++)k(e[i],t).forEach(r);return n}(e,t);n.length?C(n):S()}}function C(e){(0,r.A)(e,I)||(_(),I=e,j=-1,e.length>1&&!o.A.tv&&(h=setInterval(E,1e4)),E())}function E(){if(!a.f.isPlayingLocally(["Video"])){var e=j+1;e>=I.length&&(e=0),j=e,function(e){v&&(v.destroy(),v=null);var t=b(),n=t.querySelector(".displayingBackdropImage");if(n&&n.getAttribute("data-url")===e){if(n.getAttribute("data-url")===e)return;n.classList.remove("displayingBackdropImage")}var r=new g;r.load(e,t,n),v=r}(I[e])}}function _(){h&&clearInterval(h),h=null,I=[],j=-1}var L={Full:"full",Backdrop:"backdrop",None:"none"};function M(e){var t=b(),n=A();e===L.Full||2===e?(S(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):e===L.Backdrop||1===e?(P(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):(P(!1),document.documentElement.classList.remove("transparentDocument"),n.classList.remove("backgroundContainer-transparent"),t.classList.remove("hide"))}},89599:function(e,t,n){var r={"./finish":[38077,85126],"./finish/":[38077,85126],"./finish/index":[38077,85126],"./finish/index.html":[26059,34997],"./finish/index.js":[38077,85126],"./library":[16118,77920],"./library.html":[55132,73662],"./library.js":[16118,77920],"./remote":[33432,96697],"./remote/":[33432,96697],"./remote/index":[33432,96697],"./remote/index.html":[76246,95732],"./remote/index.js":[33432,96697],"./settings":[39728,45642,23247,60815,81771,16304,26472],"./settings/":[39728,45642,23247,60815,81771,16304,26472],"./settings/index":[39728,45642,23247,60815,81771,16304,26472],"./settings/index.html":[69513,91751],"./settings/index.js":[39728,73405],"./start":[85518,92445],"./start/":[85518,92445],"./start/index":[85518,92445],"./start/index.html":[12364,18416],"./start/index.js":[85518,92445],"./user":[94053,96806],"./user/":[94053,96806],"./user/index":[94053,96806],"./user/index.html":[46307,80501],"./user/index.js":[94053,96806]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=89599,e.exports=i},90381:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(96054),n(73687),n(83994),n(90580),n(82367);var r=n(34789),i=n(44797),o=n(44305);function a(e){return a="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},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function u(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var c=new WeakSet,d=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,c)},(t=[{key:"enableAutoLogin",value:function(e){return void 0!==e&&this.set("enableAutoLogin",e.toString()),(0,o.G4)(this.get("enableAutoLogin"),!0)}},{key:"enableGamepad",value:function(e){return void 0!==e?this.set("enableGamepad",e.toString()):(0,o.G4)(this.get("enableGamepad"),!1)}},{key:"enableSmoothScroll",value:function(e){return void 0!==e?this.set("enableSmoothScroll",e.toString()):(0,o.G4)(this.get("enableSmoothScroll"),!!r.A.tizen)}},{key:"enableSystemExternalPlayers",value:function(e){return void 0!==e&&this.set("enableSystemExternalPlayers",e.toString()),(0,o.G4)(this.get("enableSystemExternalPlayers"),!1)}},{key:"enableAutomaticBitrateDetection",value:function(e,t,n){var r="enableautobitratebitrate-"+t+"-"+e;return void 0!==n&&(e&&"Audio"===t&&(n=!0),this.set(r,n.toString())),!(!e||"Audio"!==t)||(0,o.G4)(this.get(r),!0)}},{key:"maxStreamingBitrate",value:function(e,t,n){var r="maxbitrate-"+t+"-"+e;return void 0!==n&&(e&&"Audio"===t||this.set(r,n)),e&&"Audio"===t?15e7:parseInt(this.get(r)||"0",10)||15e5}},{key:"maxStaticMusicBitrate",value:function(e){void 0!==e&&this.set("maxStaticMusicBitrate",e);var t=32e4;return parseInt(this.get("maxStaticMusicBitrate")||t.toString(),10)||t}},{key:"maxChromecastBitrate",value:function(e){return void 0!==e&&this.set("chromecastBitrate1",e),(e=this.get("chromecastBitrate1"))?parseInt(e,10):null}},{key:"maxVideoWidth",value:function(e){return void 0!==e?this.set("maxVideoWidth",e.toString()):parseInt(this.get("maxVideoWidth")||"0",10)||0}},{key:"limitSupportedVideoResolution",value:function(e){return void 0!==e?this.set("limitSupportedVideoResolution",e.toString()):(0,o.G4)(this.get("limitSupportedVideoResolution"),!1)}},{key:"preferredTranscodeVideoCodec",value:function(e){return void 0!==e?this.set("preferredTranscodeVideoCodec",e):this.get("preferredTranscodeVideoCodec")||""}},{key:"preferredTranscodeVideoAudioCodec",value:function(e){return void 0!==e?this.set("preferredTranscodeVideoAudioCodec",e):this.get("preferredTranscodeVideoAudioCodec")||""}},{key:"alwaysBurnInSubtitleWhenTranscoding",value:function(e){return void 0!==e?this.set("alwaysBurnInSubtitleWhenTranscoding",e.toString()):(0,o.G4)(this.get("alwaysBurnInSubtitleWhenTranscoding"),!1)}},{key:"enableDts",value:function(e){return void 0!==e?this.set("enableDts",e.toString()):(0,o.G4)(this.get("enableDts"),!1)}},{key:"enableTrueHd",value:function(e){return void 0!==e?this.set("enableTrueHd",e.toString()):(0,o.G4)(this.get("enableTrueHd"),!1)}},{key:"enableHi10p",value:function(e){return void 0!==e?this.set("enableHi10p",e.toString()):(0,o.G4)(this.get("enableHi10p"),!1)}},{key:"disableVbrAudio",value:function(e){return void 0!==e?this.set("disableVbrAudio",e.toString()):(0,o.G4)(this.get("disableVbrAudio"),!1)}},{key:"alwaysRemuxFlac",value:function(e){return void 0!==e?this.set("alwaysRemuxFlac",e.toString()):(0,o.G4)(this.get("alwaysRemuxFlac"),!1)}},{key:"alwaysRemuxMp3",value:function(e){return void 0!==e?this.set("alwaysRemuxMp3",e.toString()):(0,o.G4)(this.get("alwaysRemuxMp3"),!1)}},{key:"aspectRatio",value:function(e){return void 0!==e?this.set("aspectRatio",e):this.get("aspectRatio")||""}},{key:"set",value:function(e,t,n){var r=this.get(e,n);localStorage.setItem(u(c,this,f).call(this,e,n),t),r!==t&&i.A.trigger(this,"change",[e])}},{key:"get",value:function(e,t){return localStorage.getItem(u(c,this,f).call(this,e,t))}}])&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function f(e,t){return t&&(e=t+"-"+e),e}t.A=new d},92305:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E},show:function(){return T},showFindNew:function(){return C}}),n(24776),n(78557),n(96054),n(90076);var r,i,o,a,s,l,u=n(22696),c=n.n(u),d=n(79754),f=n(8566),p=n(5898),m=n(67430),y=n(10838),v=n(46782),h=n(9164),g=n(34789),b=(n(98959),n(77157),n(15453),n(71866)),S='<div class="formDialogHeader"> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}"> <span class="material-icons arrow_back" aria-hidden="true"></span> </button> <h3 class="formDialogHeaderTitle">${Identify}</h3> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered"> <form class="popupIdentifyForm" style="margin:auto"> <p>${HeaderIdentifyItemHelp}</p> <div class="padded-bottom fldPath hide"> <div>${LabelPath}</div> <div class="txtPath fieldDescription"></div> </div> <div class="inputContainer"> <input is="emby-input" type="text" id="txtLookupName" class="identifyField" data-lookup="Name" label="${LabelName}"/> </div> <div class="fldLookupYear inputContainer"> <input is="emby-input" type="number" id="txtLookupYear" class="identifyField" data-lookup="Year" pattern="[0-9]*" min="1800" label="${LabelYear}"/> </div> <div class="identifyProviderIds"></div> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem"> <span>${Search}</span> </button> </div> </form> <div class="identificationSearchResults hide"> <h1>${SearchResults}</h1> <div class="identificationSearchResultList itemsContainer vertical-wrap"></div> </div> <form class="identifyOptionsForm hide" style="margin:auto"> <br/> <div class="selectedSearchResult"></div> <br/> <label class="checkboxContainer"> <input type="checkbox" is="emby-checkbox" id="chkIdentifyReplaceImages"/> <span>${ReplaceExistingImages}</span> </label> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised button-submit block btnSubmit formDialogFooterItem"> <span>${ButtonOk}</span> </button> </div> </form> </div> </div> ',A=n(98320),x=!g.A.slow&&!g.A.edge,w=!1;function P(){return m.tF.getApiClient(o)}function k(e){var t,n,o,a,s={ProviderIds:{}},u=e.querySelectorAll(".identifyField");for(n=0,o=u.length;n<o;n++)(a=u[n].value)&&("number"===u[n].type&&(a=parseInt(a,10)),s[u[n].getAttribute("data-lookup")]=a);var m=!1,y=e.querySelectorAll(".txtLookupId");for(n=0,o=y.length;n<o;n++)(a=y[n].value)&&(m=!0),s.ProviderIds[y[n].getAttribute("data-providerkey")]=a;if(m||s.Name){s={SearchInfo:s},null!==(t=r)&&void 0!==t&&t.Id?s.ItemId=r.Id:s.IncludeDisabledProviders=!0,f.Ay.show();var g=P();g.ajax({type:"POST",url:g.getUrl("Items/RemoteSearch/".concat(i)),data:JSON.stringify(s),contentType:"application/json",dataType:"json"}).then((function(t){f.Ay.hide(),function(e,t){var n=e.querySelector(".identificationSearchResults");e.querySelector(".popupIdentifyForm").classList.add("hide"),n.classList.remove("hide"),e.querySelector(".identifyOptionsForm").classList.add("hide"),e.querySelector(".dialogContentInner").classList.remove("dialog-content-centered");var i,o,a="";for(i=0,o=t.length;i<o;i++)a+=I(t[i],i);var s=e.querySelector(".identificationSearchResultList");function u(){var n,i=parseInt(this.getAttribute("data-index"),10),o=t[i];null!=r?function(e,t){var n=e.querySelector(".identifyOptionsForm");e.querySelector(".popupIdentifyForm").classList.add("hide"),e.querySelector(".identificationSearchResults").classList.add("hide"),n.classList.remove("hide"),e.querySelector("#chkIdentifyReplaceImages").checked=!0,e.querySelector(".dialogContentInner").classList.add("dialog-content-centered"),l=t;var r=[];r.push(c()(t.Name)),t.ProductionYear&&r.push(A.Ay.toLocaleString(t.ProductionYear,{useGrouping:!1}));var i=r.join("<br/>");t.ImageUrl&&(i='<div style="display:flex;align-items:center;"><img src="'.concat(t.ImageUrl,'" style="max-height:240px;" /><div style="margin-left:1em;">').concat(i,"</div>")),e.querySelector(".selectedSearchResult").innerHTML=i,h.A.focus(n.querySelector(".btnSubmit"))}(e,o):(n=e,l=o,w=!0,f.Ay.hide(),d.default.close(n))}s.innerHTML=a;var p=s.querySelectorAll(".card");for(i=0,o=p.length;i<o;i++)p[i].addEventListener("click",u);v.A.tv&&h.A.autoFocus(n)}(e,t)}))}else(0,b.A)(p.Ay.translate("PleaseEnterNameOrId"))}function I(e,t){var n,r="",o="card scalableCard";"Episode"===i?(o+=" backdropCard backdropCard-scalable",n="cardPadder-backdrop"):"MusicAlbum"===i||"MusicArtist"===i?(o+=" squareCard squareCard-scalable",n="cardPadder-square"):(o+=" portraitCard portraitCard-scalable",n="cardPadder-portrait"),v.A.tv&&(o+=" show-focus",x&&(o+=" show-animation")),r+='<button type="button" class="'.concat(o,'" data-index="').concat(t,'">'),r+='<div class="'.concat("cardBox cardBox-bottompadded",'">'),r+='<div class="cardScalable">',r+='<div class="'.concat(n,'"></div>'),r+='<div class="cardContent searchImage">',e.ImageUrl?r+='<div class="cardImageContainer coveredImage" style="background-image:url(\''.concat(e.ImageUrl,"');\"></div>"):r+='<div class="cardImageContainer coveredImage defaultCardBackground defaultCardBackground1"><div class="cardText cardCenteredText">'.concat(c()(e.Name),"</div></div>"),r+="</div>",r+="</div>";var a=3;"MusicAlbum"===i&&a++;var s=[e.Name];s.push(e.SearchProviderName),e.AlbumArtist&&s.push(e.AlbumArtist.Name),e.ProductionYear&&s.push(e.ProductionYear);for(var l=0;l<a;l++)r+=0===l?'<div class="cardText cardText-first cardTextCentered">':'<div class="cardText cardText-secondary cardTextCentered">',r+=c()(s[l]||"")||" ",r+="</div>";return(r+="</div>")+"</button>"}function j(){f.Ay.hide(),w?a():s()}function T(e,t){return new Promise((function(n,u){a=n,s=u,o=t,w=!1,function(e){f.Ay.show();var t=P();t.getItem(t.getCurrentUserId(),e).then((function(e){i=(r=e).Type;var t={size:"small",removeOnClose:!0,scrollY:!1};v.A.tv&&(t.size="fullscreen");var n=d.default.createDialog(t);n.classList.add("formDialog"),n.classList.add("recordingDialog");var o="";o+=p.Ay.translateHtml(S,"core"),n.innerHTML=o,n.addEventListener("close",j),v.A.tv&&y.default.centerFocus.on(n.querySelector(".formDialogContent"),!1),e.Path?n.querySelector(".fldPath").classList.remove("hide"):n.querySelector(".fldPath").classList.add("hide"),n.querySelector(".txtPath").innerText=e.Path||"",d.default.open(n),n.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(n),!1})),n.querySelector(".identifyOptionsForm").addEventListener("submit",(function(e){return e.preventDefault(),function(e){f.Ay.show();var t={ReplaceAllImages:e.querySelector("#chkIdentifyReplaceImages").checked},n=P();n.ajax({type:"POST",url:n.getUrl("Items/RemoteSearch/Apply/".concat(r.Id),t),data:JSON.stringify(l),contentType:"application/json"}).then((function(){w=!0,f.Ay.hide(),d.default.close(e)}),(function(){f.Ay.hide(),d.default.close(e)}))}(n),!1})),n.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(n)})),n.classList.add("identifyDialog"),function(e,t){var n=P();n.getJSON(n.getUrl("Items/".concat(t.Id,"/ExternalIdInfos"))).then((function(n){for(var r="",i=0,o=n.length;i<o;i++){var a=n[i],s="txtLookup".concat(a.Key);r+='<div class="inputContainer">';var l=a.Name;a.Type&&(l="".concat(a.Name," ").concat(p.Ay.translate(a.Type)));var u=p.Ay.translate("LabelDynamicExternalId",c()(l));r+='<input is="emby-input" class="txtLookupId" data-providerkey="'.concat(a.Key,'" id="').concat(s,'" label="').concat(u,'"/>'),r+="</div>"}e.querySelector("#txtLookupName").value="","Person"===t.Type||"BoxSet"===t.Type?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=""),e.querySelector(".identifyProviderIds").innerHTML=r,e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Identify")}))}(n,e),f.Ay.hide()}))}(e)}))}function C(e,t,n,a){return new Promise((function(s){o=a,w=!1,function(e,t,n,o){r=null,i=n;var a={size:"small",removeOnClose:!0,scrollY:!1};v.A.tv&&(a.size="fullscreen");var s=d.default.createDialog(a);s.classList.add("formDialog"),s.classList.add("recordingDialog");var u="";u+=p.Ay.translateHtml(S,"core"),s.innerHTML=u,v.A.tv&&y.default.centerFocus.on(s.querySelector(".formDialogContent"),!1),d.default.open(s),s.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(s)})),s.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(s),!1})),s.addEventListener("close",(function(){f.Ay.hide(),o(w?l:null)})),s.classList.add("identifyDialog"),function(e,t,n,r){e.querySelector("#txtLookupName").value=t,"Person"===r||"BoxSet"===r?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=n),e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Search")}(s,e,t,n)}(e,t,n,s)}))}var E={show:T,showFindNew:C}},92950:function(e,t,n){var r={"./asyncRoutes":[34945],"./asyncRoutes/":[34945],"./asyncRoutes/index":[34945],"./asyncRoutes/index.ts":[34945],"./asyncRoutes/public":[95260],"./asyncRoutes/public.ts":[95260],"./asyncRoutes/user":[12446],"./asyncRoutes/user.ts":[12446],"./legacyRoutes":[98372],"./legacyRoutes/":[98372],"./legacyRoutes/index":[98372],"./legacyRoutes/index.ts":[98372],"./legacyRoutes/public":[7451],"./legacyRoutes/public.ts":[7451],"./legacyRoutes/user":[70373],"./legacyRoutes/user.ts":[70373],"./quickConnect":[42118,5190],"./quickConnect/":[42118,5190],"./quickConnect/index":[42118,5190],"./quickConnect/index.tsx":[42118,5190],"./quickConnect/quickConnect.scss":[97070,22587],"./routes":[85660],"./routes.tsx":[85660],"./search":[39656,45642,29808,1161,12011,24468,4113,80187],"./search.tsx":[39656,45642,29808,1161,12011,24468,4113,80187],"./session/forgotPassword":[48754,45642,9886,23488],"./session/forgotPassword/":[48754,45642,9886,23488],"./session/forgotPassword/index":[48754,45642,9886,23488],"./session/forgotPassword/index.tsx":[48754,45642,9886,23488],"./user/settings":[48962,40544],"./user/settings/":[48962,40544],"./user/settings/index":[48962,40544],"./user/settings/index.tsx":[48962,40544],"./user/userprofile":[66718,16325],"./user/userprofile.tsx":[66718,16325]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=92950,e.exports=i},93599:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(83994),n(82367);var r=n(36300),i=n(90381),o=n(46782);function a(e){return a="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},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var u=1e-6,c="scrollBehavior"in document.documentElement.style,d=!1;try{var f=document.createElement("div"),p=Object.defineProperty({},"behavior",{get:function(){return d=!0,null}});f.scrollTo(p)}catch(e){}function m(e,t,n){return e<=t?t:e>=n?n:e}var y,v=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"scrollLeft",get:function(){return window.pageXOffset},set:function(e){window.scroll(e,window.pageYOffset)}},{key:"scrollTop",get:function(){return window.pageYOffset},set:function(e){window.scroll(window.pageXOffset,e)}},{key:"scrollWidth",get:function(){return Math.max(document.documentElement.scrollWidth,document.body.scrollWidth)}},{key:"scrollHeight",get:function(){return Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)}},{key:"clientWidth",get:function(){return Math.min(document.documentElement.clientWidth,document.body.clientWidth)}},{key:"clientHeight",get:function(){return Math.min(document.documentElement.clientHeight,document.body.clientHeight)}},{key:"getAttribute",value:function(e){return document.body.getAttribute(e)}},{key:"getBoundingClientRect",value:function(){return{left:0,top:0,width:this.clientWidth,height:this.clientHeight}}},{key:"scrollTo",value:function(){window.scrollTo.apply(window,arguments)}}],t&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),h=new v,g={x:{nameScroll:"scrollWidth",nameClient:"clientWidth",nameStyle:"overflowX",nameScrollMode:"data-scroll-mode-x"},y:{nameScroll:"scrollHeight",nameClient:"clientHeight",nameStyle:"overflowY",nameScrollMode:"data-scroll-mode-y"}};function b(e,t){if(e)for(var n=t?g.y:g.x,r=e.parentElement;r&&r!==document.body;){if("custom"===r.getAttribute(n.nameScrollMode))return r;var i=window.getComputedStyle(r);if("fixed"===i.position)return r;var o=i[n.nameStyle];if("scroll"===o||"auto"===o&&r[n.nameScroll]>r[n.nameClient])return r;r=r.parentElement}return h}function S(e,t){var n={};return t?(n.scrollPos=e.scrollTop,n.scrollSize=e.scrollHeight,n.clientSize=e.clientHeight,n.mode=e.getAttribute(g.y.nameScrollMode)):(n.scrollPos=e.scrollLeft,n.scrollSize=e.scrollWidth,n.clientSize=e.clientWidth,n.mode=e.getAttribute(g.x.nameScrollMode)),n.custom="custom"===n.mode,n}function A(e,t,n){var r=t.getBoundingClientRect(),i=e.getBoundingClientRect();return n?e.scrollTop+r.top-i.top:e.scrollLeft+r.left-i.left}function x(e,t,n,r){var i,o,a,s,l,u,c=e.scrollSize-e.clientSize;if(r)i=t+(n-e.clientSize)/2;else{var d=(o=t,a=t+n-1,s=e.scrollPos,u=e.scrollPos+e.clientSize-1-a,(l=o-s)<0&&l<u?-l:u<0?u:0);i=e.scrollPos-d}return m(Math.round(i),0,c)}function w(e,t){if("scrollTo"in e)if(d)e.scrollTo(t);else{var n=void 0!==t.left?t.left:e.scrollLeft,r=void 0!==t.top?t.top:e.scrollTop;e.scrollTo(n,r)}else"scrollLeft"in e&&(void 0!==t.left&&(e.scrollLeft=t.left),void 0!==t.top&&(e.scrollTop=t.top))}function P(e,t,n,r,i){var o=i?"smooth":"instant";e!==n?(e&&w(e,{left:t,behavior:o}),n&&w(n,{top:r,behavior:o})):e&&w(e,{left:t,top:r,behavior:o})}function k(){cancelAnimationFrame(y),y=void 0}function I(e,t,n,r,i){k(),i&&!c?function(e,t,n,r){var i,o=e?e.scrollLeft:t,a=n?n.scrollTop:r,s=t-o,l=r-a;Math.abs(s)<u&&Math.abs(l)<u||(y=requestAnimationFrame((function u(c){i=i||c;var d,f=Math.min(1,(c-i)/270);if(1===f)return k(),void P(e,t,n,r,!1);P(e,o+s*(f=(d=f)*(2-d)),n,a+l*f,!1),y=requestAnimationFrame(u)})))}(e,t,n,r):P(e,t,n,r,i)}function j(){return o.A.tv}function T(e,t){t=!!t;var n=!0,r=!0,i=e.offsetParent,o=i&&(!i.offsetParent||"fixed"===window.getComputedStyle(i).position);o&&(n=r=!1);var a=b(e,!1),s=b(e,!0),l=S(a,!1),u=S(s,!0);if(!(a===s&&(l.custom||u.custom)||l.custom&&u.custom)){var c,d=e.getBoundingClientRect(),f=0,p=0;l.custom?a=null:f=x(l,A(a,e,!1),d.width,n),u.custom?s=null:(p=x(u,A(s,e,!0),d.height,r),o&&d.bottom<0&&(p=0),p<((c=document.querySelector(".headerTop"))?c.clientHeight:0)&&s===h&&(p=0)),I(a,f,s,p,t)}}j()&&r.Ay.addEventListener(window,"focusin",(function(e){setTimeout((function(){T(e.target,i.A.enableSmoothScroll())}),0)}),{capture:!0}),t.Ay={isEnabled:j,scrollTo:function(e,t,n){n=!!n;var r=b(null,!1),i=S(r,!1),o=S(r,!0);I(r,e=m(Math.round(e),0,i.scrollSize-i.clientSize),r,t=m(Math.round(t),0,o.scrollSize-o.clientSize),n)},scrollToElement:T}},93721:function(e,t,n){"use strict";n.d(t,{Fq:function(){return c},JK:function(){return p},OE:function(){return m},QC:function(){return d},cu:function(){return f}});var r=n(62864),i=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},a={af:"af",ar:"ar-DZ","be-by":"be","bg-bg":"bg",bn:"bn",ca:"ca",cs:"cs",cy:"cy",da:"da",de:"de",el:"el","en-gb":"en-GB","en-us":"en-US",eo:"eo",es:"es","es-ar":"es","es-do":"es","es-mx":"es",et:"et",eu:"eu",fa:"fa-IR",fi:"fi",fr:"fr","fr-ca":"fr-CA",gl:"gl",gsw:"de",he:"he","hi-in":"hi",hr:"hr",hu:"hu",id:"id",is:"is",it:"it",ja:"ja",kk:"kk",ko:"ko","lt-lt":"lt",lv:"lv",ms:"ms",nb:"nb",nl:"nl",nn:"nn",pl:"pl",pt:"pt","pt-br":"pt-BR","pt-pt":"pt",ro:"ro",ru:"ru",sk:"sk","sl-si":"sl",sv:"sv",ta:"ta",th:"th",tr:"tr",uk:"uk",vi:"vi","zh-cn":"zh-CN","zh-hk":"zh-HK","zh-tw":"zh-TW"},s="en-US",l=s,u=r.A;function c(e){return n(27570)("./".concat(e,"/index.js"))}function d(e){return a[e]||a[e.replace(/-.*/,"")]||s}function f(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return console.debug("[dateFnsLocale] updating date-fns locale",e),l=d(e),console.debug("[dateFnsLocale] mapped to date-fns locale",l),[4,c(l)];case 1:return u=t.sent(),[2]}}))}))}function p(){return u}function m(){return{addSuffix:!0,locale:u}}},94738:function(e,t,n){"use strict";var r;n.d(t,{M:function(){return r}}),function(e){e.None="None",e.AskToSkip="AskToSkip",e.Skip="Skip"}(r||(r={}))},95260:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_PUBLIC_ROUTES:function(){return r}});var r=[{path:"forgotpassword",page:"session/forgotPassword"}]},95700:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||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.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){var t=e.headers||{};"json"===e.dataType&&(t.accept="application/json");var n={headers:t,method:e.type,credentials:"same-origin"},r=e.contentType;e.data&&("string"==typeof e.data?n.body=e.data:(n.body=a(e.data),r=r||"application/x-www-form-urlencoded; charset=UTF-8")),r&&(t["Content-Type"]=r);var i=e.url;if(e.query){var o=a(e.query);o&&(i+="?".concat(o))}return e.timeout?function(e,t,n){return console.debug("fetchWithTimeout: timeoutMs: ".concat(n,", url: ").concat(e)),new Promise((function(r,i){var o=setTimeout(i,n);(t=t||{}).credentials="same-origin",fetch(e,t).then((function(t){clearTimeout(o),console.debug("fetchWithTimeout: succeeded connecting to url: ".concat(e)),r(t)}),(function(t){clearTimeout(o),console.debug("fetchWithTimeout: timed out connecting to url: ".concat(e)),i(t)}))}))}(i,n,e.timeout):fetch(i,n)}function a(e){return Object.entries(e).filter((function(e){var t=r(e,2)[1];return null!=t&&""!==t})).map((function(e){var t=r(e,2),n=t[0],i=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i))})).join("&")}function s(e){if(!e)throw new Error("Request cannot be null");return e.headers=e.headers||{},console.debug("requesting url: ".concat(e.url)),o(e).then((function(t){return console.debug("response status: ".concat(t.status,", url: ").concat(e.url)),t.status<400?"json"===e.dataType||"application/json"===e.headers.accept?t.json():"text"===e.dataType||(t.headers.get("Content-Type")||"").toLowerCase().startsWith("text/")?t.text():t:Promise.reject(t)}),(function(t){throw console.error("request failed to url: ".concat(e.url)),t}))}n.r(t),n.d(t,{ajax:function(){return s},getFetchPromise:function(){return o}}),n(29305),n(32733),n(84701),n(24776),n(14382),n(69892),n(44962),n(86584),n(89336),n(57132),n(78557),n(90076),n(95021),n(73687),n(83994),n(64062),n(82367)},97067:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(64680),i=n(58953),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},a=function(e,t,n,a){var s,l,u;if(void 0===n&&(n={}),void 0===a&&(a=!1),t.Id&&(null===(s=t.BackdropImageTags)||void 0===s?void 0:s.length)){var c=a?(0,i.HO)(0,t.BackdropImageTags.length-1):0;return e.getScaledImageUrl(t.Id,o({type:r.y.Backdrop,index:c,tag:t.BackdropImageTags[c]},n))}return t.ParentBackdropItemId&&(null===(l=t.ParentBackdropImageTags)||void 0===l?void 0:l.length)?(c=a?(0,i.HO)(0,t.ParentBackdropImageTags.length-1):0,e.getScaledImageUrl(t.ParentBackdropItemId,o({type:r.y.Backdrop,index:c,tag:t.ParentBackdropImageTags[c]},n))):t.Id&&(null===(u=t.ImageTags)||void 0===u?void 0:u.Primary)?e.getScaledImageUrl(t.Id,o({type:r.y.Primary,tag:t.ImageTags.Primary},n)):void 0}},97339:function(e,t,n){"use strict";var r;n.d(t,{Y:function(){return r}}),function(e){e.CastMenuHashChange="castmenuhashchange",e.Chromecast="chromecast",e.ClientSettings="clientsettings",e.DisplayLanguage="displaylanguage",e.DisplayMode="displaymode",e.DownloadManagement="downloadmanagement",e.Exit="exit",e.ExitMenu="exitmenu",e.ExternalLinks="externallinks",e.ExternalPlayerIntent="externalplayerintent",e.FileDownload="filedownload",e.FileInput="fileinput",e.Fullscreen="fullscreenchange",e.HtmlAudioAutoplay="htmlaudioautoplay",e.HtmlVideoAutoplay="htmlvideoautoplay",e.MultiServer="multiserver",e.NativeBluRayPlayback="nativeblurayplayback",e.NativeDvdPlayback="nativedvdplayback",e.NativeIsoPlayback="nativeisoplayback",e.PhysicalVolumeControl="physicalvolumecontrol",e.RemoteAudio="remoteaudio",e.RemoteControl="remotecontrol",e.RemoteVideo="remotevideo",e.Screensaver="screensaver",e.Sharing="sharing",e.SubtitleAppearance="subtitleappearancesettings",e.SubtitleBurnIn="subtitleburnsettings",e.TargetBlank="targetblank"}(r||(r={}))},98320:function(e,t,n){"use strict";n.d(t,{YU:function(){return l}}),n(84734),n(67593),n(96054),n(95021),n(53819);var r=n(5898);function i(e,t){var n=e.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d+)?(Z|([+-])(\d{2}):(\d{2}))?/);if(!n)throw new Error("Couldn't parse ISO 8601 date string '"+e+"'");var r=[1,2,3,4,5,6,10,11];for(var i in r)n[r[i]]=parseInt(n[r[i]],10);n[7]=parseFloat(n[7]);var o=Date.UTC(n[1],n[2]-1,n[3],n[4],n[5],n[6]);if(n[7]>0&&(o+=Math.round(1e3*n[7])),"Z"!==n[8]&&n[10]){var a=60*n[10]*60*1e3;n[11]&&(a+=60*n[11]*1e3),"-"===n[9]?o-=a:o+=a}else!1===t&&(o+=6e4*new Date(o).getTimezoneOffset());return new Date(o)}var o=function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}return!1}();function a(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleString(n,t)}return e.toLocaleString()}function s(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleTimeString(n,t)}return e.toLocaleTimeString()}function l(e){if(!e)throw new Error("date cannot be null");if("string"==typeof e)try{e=i(e,!0)}catch(t){return e}return a(e)}t.Ay={parseISO8601Date:i,getDisplayRunningTime:function(e){var t=36e9,n=6e8,i=[],o=e/t;(o=Math.floor(o))&&i.push(o.toLocaleString(r.Ay.getCurrentDateTimeLocale()));var a=(e-=o*t)/n;e-=(a=Math.floor(a))*n,a=a<10&&o?(0).toLocaleString(r.Ay.getCurrentDateTimeLocale())+a.toLocaleString(r.Ay.getCurrentDateTimeLocale()):a.toLocaleString(r.Ay.getCurrentDateTimeLocale()),i.push(a);var s=e/1e7;return s=(s=Math.floor(s))<10?(0).toLocaleString(r.Ay.getCurrentDateTimeLocale())+s.toLocaleString(r.Ay.getCurrentDateTimeLocale()):s.toLocaleString(r.Ay.getCurrentDateTimeLocale()),i.push(s),i.join(":")},getDisplayDuration:function(e){var t=Math.round(e/6e8)||1,n=Math.floor(t/60),r=t%60,i=[];return n>0&&i.push("".concat(n,"h")),i.push("".concat(r,"m")),i.join(" ")},toLocaleDateString:function(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleDateString(n,t)}var i=function(e){var t=[];for(var n in e)t.push({name:n,value:e[n]});return t}(t);if(1===i.length&&"weekday"===i[0].name){var a=[];return a[0]="Sun",a[1]="Mon",a[2]="Tue",a[3]="Wed",a[4]="Thu",a[5]="Fri",a[6]="Sat",a[e.getDay()]}return e.toLocaleDateString()},toLocaleString:a,getDisplayTime:function(e){if(!e)throw new Error("date cannot be null");if("string"==typeof e)try{e=i(e,!0)}catch(t){return e}if(o)return s(e,{hour:"numeric",minute:"2-digit"});var t=s(e),n=t.toLowerCase();if(-1!==n.indexOf("am")||-1!==n.indexOf("pm")){var r=e.getHours()%12,a=e.getHours()>11?"pm":"am";r||(r=12);var l=e.getMinutes();l<10&&(l="0"+l),t=r+(l=":"+l)+a}else{var u=t.split(":");u.length>2&&(u.length=2,t=u.join(":"))}return t},isRelativeDay:function(e,t){if(!e)throw new Error("date cannot be null");var n=new Date,r=n.getDate()+t;return n.setDate(r),e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===r},toLocaleTimeString:s,supportsLocalization:function(){return o}}},98372:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r.LEGACY_PUBLIC_ROUTES},LEGACY_USER_ROUTES:function(){return i.LEGACY_USER_ROUTES}});var r=n(7451),i=n(70373)},98959:function(e,t,n){"use strict";n(36947),n(36457);var r=n(34789),i=n(36300),o=(n(69177),Object.create(HTMLInputElement.prototype)),a=0,s=!1;if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");if(null!=l&&l.configurable){var u=l.set;l.set=function(e){u.call(this,e),this.dispatchEvent(new CustomEvent("valueset",{bubbles:!1,cancelable:!1}))},Object.defineProperty(HTMLInputElement.prototype,"value",l),s=!0}}function c(){var e=this.labelElement;this.value?e.classList.remove("inputLabel-float"):s&&"date"!==this.type&&"time"!==this.type&&e.classList.add("inputLabel-float")}o.createdCallback=function(){if(this.id||(this.id="embyinput"+a,a++),!this.classList.contains("emby-input")){this.classList.add("emby-input");var e=this.parentNode,t=this.ownerDocument,n=t.createElement("label");n.innerText=this.getAttribute("label")||"",n.classList.add("inputLabel"),n.classList.add("inputLabelUnfocused"),n.htmlFor=this.id,e.insertBefore(n,this),this.labelElement=n,i.Ay.addEventListener(this,"focus",(function(){c.call(this),t.attachIME&&t.attachIME(this),n.classList.add("inputLabelFocused"),n.classList.remove("inputLabelUnfocused")}),{passive:!0}),i.Ay.addEventListener(this,"blur",(function(){c.call(this),n.classList.remove("inputLabelFocused"),n.classList.add("inputLabelUnfocused")}),{passive:!0}),i.Ay.addEventListener(this,"change",c,{passive:!0}),i.Ay.addEventListener(this,"input",c,{passive:!0}),i.Ay.addEventListener(this,"valueset",c,{passive:!0}),r.A.orsay&&this===t.activeElement&&t.attachIME&&t.attachIME(this)}},o.attachedCallback=function(){this.labelElement.htmlFor=this.id,c.call(this)},o.label=function(e){this.labelElement.innerText=e},document.registerElement("emby-input",{prototype:o,extends:"input"})}},function(e){e.O(0,[45642,23247,60815,81771,16304,9886,1270,55931,22940,59928,33067,44965,56401,7495,17060,67224,67622,94048,36933,82363,36546,85500,7011,80183,5267,46967],(function(){return e(e.s=24639)})),e.O()}]);
|
|
2
|
+
(self.webpackChunk=self.webpackChunk||[]).push([[14577],{891:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(96802),i=n(80401),o=n(69410),a=function(){var e=(0,o.gf)();return(0,i.I)({queryKey:["QuickConnect","Enabled"],queryFn:function(t){var n,i,o,a,s,l,u=t.signal;return n=e,i={signal:u},o=void 0,a=void 0,l=function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:if(!(e=n.api))throw new Error("No API instance available");return[4,(0,r.k)(e).getQuickConnectEnabled(i)];case 1:return[2,t.sent().data]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}i((l=l.apply(o,a||[])).next())}))}})}},1935:function(e,t,n){"use strict";var r;n.d(t,{K:function(){return r}}),function(e){e.SignedIn="SignedIn",e.ServerMismatch="ServerMismatch",e.ServerSignIn="ServerSignIn",e.ServerSelection="ServerSelection",e.ServerUpdateNeeded="ServerUpdateNeeded",e.Unavailable="Unavailable"}(r||(r={}))},2290:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=40;function a(e){var t,n,r,o={Items:[],StartIndex:0,TotalRecordCount:0};try{for(var a=i(e),s=a.next();!s.done;s=a.next()){var l=s.value;l.Items?l.TotalRecordCount?void 0!==l.StartIndex?(o.Items=null===(r=o.Items)||void 0===r?void 0:r.concat(l.Items),o.TotalRecordCount+=l.TotalRecordCount,o.StartIndex=Math.min(o.StartIndex||0,l.StartIndex)):console.log("[getItems] Retrieved StartIndex is invalid",l.StartIndex):console.log("[getItems] Retrieved TotalRecordCount is invalid",l.TotalRecordCount):console.log("[getItems] Retrieved Items array is invalid",l.Items)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}function s(e,t,n){var i,s=null===(i=null==n?void 0:n.Ids)||void 0===i?void 0:i.split(",");if(!n||!s||s.length<=o)return e.getItems(t,n);var l=function(e,t,n){for(var i,a,s,l=r({},n),u=(null===(i=n.Ids)||void 0===i?void 0:i.split(","))||[],c=[],d=null!==(a=n.Limit)&&void 0!==a?a:1/0,f=0;f<u.length&&f<d;f=s){(s=f+o)>d&&(s=d);var p=u.slice(f,s);l.Ids=p.join(","),c.push(e.getItems(t,l))}return c}(e,t,n);return Promise.all(l).then(a)}},3312:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r}});var r=[{path:"addserver",pageProps:{controller:"session/addServer/index",view:"session/addServer/index.html"}},{path:"selectserver",pageProps:{controller:"session/selectServer/index",view:"session/selectServer/index.html"}},{path:"login",pageProps:{controller:"session/login/index",view:"session/login/index.html"}},{path:"forgotpassword",pageProps:{controller:"session/forgotPassword/index",view:"session/forgotPassword/index.html"}},{path:"forgotpasswordpin",pageProps:{controller:"session/resetPassword/index",view:"session/resetPassword/index.html"}}]},4877:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_ADMIN_ROUTES:function(){return i}});var r=n(19373),i=[{path:"networking",pageProps:{appType:r.u.Dashboard,controller:"networking",view:"networking.html"}},{path:"livetv/guide",pageProps:{appType:r.u.Dashboard,controller:"livetvguideprovider",view:"livetvguideprovider.html"}},{path:"livetv/tuner",pageProps:{appType:r.u.Dashboard,controller:"livetvtuner",view:"livetvtuner.html"}}]},5824:function(e,t,n){"use strict";n.d(t,{A:function(){return M}});var r=n(62540),i=n(68136),o=n(83273),a=n(75487),s=n(72073),l=n(63696),u=n(38829),c=n(69410),d=n(5898),f=n(38783),p=n(6460),m=n(66239),y=n(89857),v=n(4295),h=n(14380),g=n(32051),b=n(45065),S=n(29223),A=n(74156),x=n(44790),w=n(60434),P=n(80099),k=n(48402),I=n(85637),j=n(80401),T=function(){var e=(0,c.gf)().api;return(0,j.I)({queryKey:["SyncPlay","Groups"],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,r=void 0,o=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){switch(n.label){case 0:return[4,(0,p.u)(e).syncPlayGetGroups(t)];case 1:return[2,n.sent().data]}}))},new((i=void 0)||(i=Promise))((function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function s(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}l((o=o.apply(n,r||[])).next())}));var n,r,i,o}(e,{signal:n})},enabled:!!e})},C=n(44797),E=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},_="app-sync-play-menu",L=function(e){var t,o,a=e.anchorEl,s=e.open,j=e.onMenuClose,L=E((0,l.useState)(),2),M=L[0],O=L[1],R=(0,c.gf)(),D=R.__legacyApiClient__,N=R.api,F=R.user,U=E((0,l.useState)(),2),V=U[0],B=U[1],z=Boolean(V);(0,l.useEffect)((function(){var e;O(null===(e=u.X.firstOfType(f.Q.SyncPlay))||void 0===e?void 0:e.instance)}),[]);var q=T().data,H=(0,l.useCallback)((function(){N&&F&&((0,p.u)(N).syncPlayCreateGroup({newGroupRequestDto:{GroupName:d.Ay.translate("SyncPlayGroupDefaultTitle",F.Name)}}).catch((function(e){console.error("[SyncPlayMenu] failed to create a SyncPlay group",e)})),j())}),[N,j,F]),G=(0,l.useCallback)((function(){N&&((0,p.u)(N).syncPlayLeaveGroup().catch((function(e){console.error("[SyncPlayMenu] failed to leave SyncPlay group",e)})),j())}),[N,j]),W=(0,l.useCallback)((function(e){N&&((0,p.u)(N).syncPlayJoinGroup({joinGroupRequestDto:{GroupId:e}}).catch((function(e){console.error("[SyncPlayMenu] failed to join SyncPlay group",e)})),j())}),[N,j]),Y=(0,l.useCallback)((function(){return e=void 0,t=void 0,i=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(e){switch(e.label){case 0:return M?[4,Promise.all([n.e(45568),n.e(96084)]).then(n.bind(n,45568))]:[2];case 1:return new(0,e.sent().default)(D,M.Manager.getTimeSyncCore(),{groupInfo:V}).embed().catch((function(e){e&&console.error("[SyncPlayMenu] Error creating SyncPlay settings editor",e)})),j(),[2]}}))},new((r=void 0)||(r=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}));var e,t,r,i}),[D,V,j,M]),Q=(0,l.useCallback)((function(){D&&(null==M||M.Manager.resumeGroupPlayback(D),j())}),[D,j,M]),K=(0,l.useCallback)((function(){D&&(null==M||M.Manager.haltGroupPlayback(D),j())}),[D,j,M]),J=(0,l.useCallback)((function(e,t){var n;B(M&&t&&null!==(n=M.Manager.getGroupInfo())&&void 0!==n?n:void 0)}),[M]);(0,l.useEffect)((function(){if(M)return C.A.on(M.Manager,"enabled",J),function(){C.A.off(M.Manager,"enabled",J)}}),[J,M]);var X=[];z?((null==M?void 0:M.Manager.isPlaylistEmpty())||(null==M?void 0:M.Manager.isPlaybackActive())?(null==M?void 0:M.Manager.isPlaybackActive())&&X.push((0,r.jsxs)(I.A,{onClick:K,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(b.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayHaltPlayback")})]},"sync-play-stop-playback")):X.push((0,r.jsxs)(I.A,{onClick:Q,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(g.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayResumePlayback")})]},"sync-play-start-playback")),X.push((0,r.jsxs)(I.A,{onClick:Y,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(S.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("Settings")})]},"sync-play-settings")),X.push((0,r.jsx)(A.A,{},"sync-play-controls-divider")),X.push((0,r.jsxs)(I.A,{onClick:G,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(h.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayLeaveGroup")})]},"sync-play-exit"))):(null==q?void 0:q.length)||(null===(t=null==F?void 0:F.Policy)||void 0===t?void 0:t.SyncPlayAccess)===i.r.CreateAndJoinGroups?(q&&q.length>0&&(q.forEach((function(e){var t;X.push((0,r.jsxs)(I.A,{onClick:function(){return e.GroupId&&W(e.GroupId)},children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(y.A,{})}),(0,r.jsx)(w.A,{primary:e.GroupName,secondary:null===(t=e.Participants)||void 0===t?void 0:t.join(", ")})]},e.GroupId))})),X.push((0,r.jsx)(A.A,{},"sync-play-groups-divider"))),(null===(o=null==F?void 0:F.Policy)||void 0===o?void 0:o.SyncPlayAccess)===i.r.CreateAndJoinGroups&&X.push((0,r.jsxs)(I.A,{onClick:H,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(m.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayNewGroupDescription")})]},"sync-play-new-group"))):X.push((0,r.jsxs)(I.A,{disabled:!0,children:[(0,r.jsx)(x.A,{children:(0,r.jsx)(v.A,{})}),(0,r.jsx)(w.A,{primary:d.Ay.translate("LabelSyncPlayNoGroups")})]},"sync-play-unavailable"));var $=z?{"aria-labelledby":"sync-play-active-subheader",subheader:(0,r.jsx)(P.A,{component:"div",id:"sync-play-active-subheader",children:null==V?void 0:V.GroupName})}:void 0;return(0,r.jsx)(k.A,{anchorEl:a,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:_,keepMounted:!0,open:s,onClose:j,slotProps:{list:$},children:X})},M=function(){var e=(0,c.gf)().user,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,l.useState)(null),2),n=t[0],p=t[1],m=Boolean(n),y=(0,l.useCallback)((function(e){p(e.currentTarget)}),[p]),v=(0,l.useCallback)((function(){p(null)}),[p]);return(null==e?void 0:e.Policy)&&e.Policy.SyncPlayAccess===i.r.None||0===u.X.ofType(f.Q.SyncPlay).length?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{title:d.Ay.translate("ButtonSyncPlay"),children:(0,r.jsx)(a.A,{size:"large","aria-label":d.Ay.translate("ButtonSyncPlay"),"aria-controls":_,"aria-haspopup":"true",onClick:y,color:"inherit",children:(0,r.jsx)(o.A,{})})}),(0,r.jsx)(L,{open:m,anchorEl:n,onMenuClose:v})]})}},5898:function(e,t,n){"use strict";n.d(t,{Mo:function(){return d},Tl:function(){return A},c1:function(){return k},i5:function(){return h},jE:function(){return v}}),n(29305),n(32733),n(84701),n(14382),n(69892),n(76281),n(84734),n(44962),n(89336),n(78557),n(90076),n(95021),n(73687),n(99425),n(83994),n(93062),n(97747),n(82367);var r=n(77083),i=n(82885),o=n(44797),a=n(93721);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l,u,c,d="en-us",f=["ar","fa","ur","he"],p={},m=!1;function y(){return l}function v(){return u}function h(){var e;return document.documentElement.getAttribute("data-culture")||(navigator.language?navigator.language:navigator.userLanguage?navigator.userLanguage:null!==(e=navigator.languages)&&void 0!==e&&e.length?navigator.languages[0]:d)}function g(e){m=!1;var t,r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}(f);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(e.includes(o)){m=!0;break}}}catch(e){i.e(e)}finally{i.f()}r=m?"rtl":"ltr",document.getElementsByTagName("body")[0].setAttribute("dir",r),document.getElementsByTagName("html")[0].setAttribute("dir",r),"rtl"===r&&n.e(8752).then(n.bind(n,8752))}function b(){var e,t;try{e=i.currentSettings.language()}catch(e){console.error("no language set in user settings")}g(e=e||h()),l=A(e),document.documentElement.setAttribute("lang",l);try{t=i.currentSettings.dateTimeLocale()}catch(e){console.error("no date format set in user settings")}u=t?A(t):l,(0,a.cu)(u),function(e){for(var t in p)S(p[t],e);if(e!==d)for(var n in p)S(p[n],d)}(l)}function S(e,t){return e.dictionaries[t]?Promise.resolve():function(e,t){t=A(t);var r=e.filter((function(e){return A(e.lang)===t}));return r.length||(t=t.replace(/-.*/,""),(r=e.filter((function(e){return A(e.lang)===t}))).length||(r=e.filter((function(e){return A(e.lang)===d})))),new Promise((function(e){if(r.length){var t=r[0].path;n(73125)("./".concat(t)).then((function(t){e(t)})).catch((function(){e({})}))}else e()}))}(e.translations,t).then((function(n){e.dictionaries[t]=n}))}function A(e){return e.replace("_","-").toLowerCase()}function x(e,t){e||(e=I());var n=p[e];return n?n.dictionaries[t]:{}}function w(e){p[e.name]={translations:e.strings||e.translations,dictionaries:{}}}function P(e,t){var n,i,o=x(t,y());return null!==(n=o)&&void 0!==n&&n[e]||null!==(i=o=x(t,d))&&void 0!==i&&i[e]?o[e]:(!o||(0,r.A)(o)?console.warn("Translation dictionary is empty."):console.error("Translation key is missing from dictionary: ".concat(e)),e)}function k(e,t){if(e=e.default||e,t||(t=I()),!t)throw new Error("module cannot be null or empty");var n=e.indexOf("${");if(-1===n)return e;n+=2;var r=e.indexOf("}",n);if(-1===r)return e;var i=e.substring(n,r),o=P(i,t);return k(e=e.replace("${"+i+"}",o),t)}function I(e){return e&&(c=e),c}b(),o.A.on(i.currentSettings,"change",(function(e,t){"language"!==t&&"datetimelocale"!==t||b()})),t.Ay={translate:function(e){for(var t=function(e){var t,n=e.split("#");return n.length>1&&(t=n[0],e=n[1]),P(e,t)}(e),n=1;n<arguments.length;n++)t=t.replaceAll("{"+(n-1)+"}",arguments[n].toLocaleString(l));return t},translateHtml:k,loadStrings:function(e){var t,n=y(),r=[];return"string"==typeof e?t=e:(t=e.name,w(e)),r.push(S(p[t],n)),r.push(S(p[t],d)),Promise.all(r)},defaultModule:I,getCurrentLocale:y,getCurrentDateTimeLocale:v,register:w,updateCurrentCulture:b,getIsRTL:function(){return m},getIsElementRTL:function(e){return window.getComputedStyle?"rtl"==window.getComputedStyle(e,null).getPropertyValue("direction"):"rtl"==e.currentStyle.direction}}},7062:function(e,t,n){var r={"./edititemmetadata":[1217,90221],"./edititemmetadata.html":[20510,68529],"./edititemmetadata.js":[1217,90221],"./favorites":[53857,45642,29808,12011,24468,4113,4062],"./favorites.js":[53857,45642,29808,12011,24468,4113,4062],"./home":[15088,45642,4113,45568,73233,81954,27962],"./home.html":[5939,8372],"./home.js":[15088,45642,4113,45568,73233,81954,32762],"./hometab":[66242,45642,29808,12011,24468,4113,56213,18119],"./hometab.js":[66242,45642,29808,12011,24468,4113,56213,18119],"./itemDetails":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./itemDetails/":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./itemDetails/index":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./itemDetails/index.html":[90934,76331],"./itemDetails/index.js":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,75844],"./list":[23416,45642,29808,28336,1820,32125,70712,12011,24468,4113,6940,45568,73233,83715],"./list.html":[68852,52179],"./list.js":[23416,45642,29808,28336,1820,32125,70712,12011,24468,4113,6940,45568,73233,83715],"./livetv.html":[19616,65911],"./livetv/livetvchannels":[69793,45642,29808,12011,24468,64340],"./livetv/livetvchannels.js":[69793,45642,29808,12011,24468,64340],"./livetv/livetvguide":[38193,12011,4113,36934,69212],"./livetv/livetvguide.js":[38193,12011,4113,36934,69212],"./livetv/livetvrecordings":[6157,45642,29808,12011,24468,28588],"./livetv/livetvrecordings.js":[6157,45642,29808,12011,24468,28588],"./livetv/livetvschedule":[21152,45642,29808,12011,24468,96603],"./livetv/livetvschedule.js":[21152,45642,29808,12011,24468,96603],"./livetv/livetvseriestimers":[61470,45642,12011,24468,3365],"./livetv/livetvseriestimers.js":[61470,45642,12011,24468,3365],"./livetv/livetvsuggested":[51070,45642,29808,12011,24468,4113,85757],"./livetv/livetvsuggested.js":[51070,45642,29808,12011,24468,4113,85757],"./lyrics":[87024,45642,45568,73233,7631],"./lyrics.html":[42512,97543],"./lyrics.js":[87024,45642,45568,73233,7631],"./movies/moviecollections":[35115,45642,29808,28336,1820,32125,70712,12011,24468,6940,35115,49654],"./movies/moviecollections.js":[35115,45642,29808,28336,1820,32125,70712,12011,24468,6940,35115,49654],"./movies/moviegenres":[3776,45642,12011,24468,12975],"./movies/moviegenres.js":[3776,45642,12011,24468,12975],"./movies/movies":[70179,45642,29808,28336,1820,32125,70712,12011,24468,6940,70179,9090],"./movies/movies.html":[98849,88300],"./movies/movies.js":[70179,45642,29808,28336,1820,32125,70712,12011,24468,6940,70179,9090],"./movies/moviesrecommended":[4628,45642,29808,12011,24468,4113,45568,73233,48935],"./movies/moviesrecommended.js":[4628,45642,29808,12011,24468,4113,45568,73233,48935],"./music/music.html":[54329,61612],"./music/musicalbums":[38775,45642,29808,28336,1820,32125,70712,12011,24468,6940,38775,96902],"./music/musicalbums.js":[38775,45642,29808,28336,1820,32125,70712,12011,24468,6940,38775,96902],"./music/musicartists":[43531,45642,29808,28336,1820,32125,70712,12011,24468,6940,43531,51418],"./music/musicartists.js":[43531,45642,29808,28336,1820,32125,70712,12011,24468,6940,43531,51418],"./music/musicgenres":[50959,45642,12011,24468,19830],"./music/musicgenres.js":[50959,45642,12011,24468,19830],"./music/musicplaylists":[67056,45642,12011,24468,23163],"./music/musicplaylists.js":[67056,45642,12011,24468,23163],"./music/musicrecommended":[82604,45642,29808,12011,24468,4113,45568,73233,48967],"./music/musicrecommended.js":[82604,45642,29808,12011,24468,4113,45568,73233,48967],"./music/songs":[47614,45642,29808,28336,1820,32125,70712,12011,24468,6940,50457],"./music/songs.js":[47614,45642,29808,28336,1820,32125,70712,12011,24468,6940,50457],"./playback/queue":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/queue/":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/queue/index":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/queue/index.html":[25006,53525],"./playback/queue/index.js":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,55802,57949,77574],"./playback/video":[33252,45642,45568,73233,57949,30394],"./playback/video/":[33252,45642,45568,73233,57949,30394],"./playback/video/index":[33252,45642,45568,73233,57949,30394],"./playback/video/index.html":[16818,21777],"./playback/video/index.js":[33252,45642,45568,73233,57949,30394],"./session/addServer":[43060,42462],"./session/addServer/":[43060,42462],"./session/addServer/index":[43060,42462],"./session/addServer/index.html":[11250,15741],"./session/addServer/index.js":[43060,42462],"./session/login":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/index":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/index.html":[14999,17244],"./session/login/index.js":[2825,45642,28336,1820,32125,70712,45568,73233,93649],"./session/login/login.scss":[26079,88654],"./session/resetPassword":[86086,70884],"./session/resetPassword/":[86086,70884],"./session/resetPassword/index":[86086,70884],"./session/resetPassword/index.html":[97652,38155],"./session/resetPassword/index.js":[86086,70884],"./session/selectServer":[1179,45642,29808,12011,4113,45568,73233,66259],"./session/selectServer/":[1179,45642,29808,12011,4113,45568,73233,66259],"./session/selectServer/index":[1179,45642,29808,12011,4113,45568,73233,66259],"./session/selectServer/index.html":[44625,89150],"./session/selectServer/index.js":[1179,45642,29808,12011,4113,45568,73233,66259],"./shows/episodes":[96747,45642,29808,28336,1820,32125,70712,12011,24468,6940,10442],"./shows/episodes.js":[96747,45642,29808,28336,1820,32125,70712,12011,24468,6940,10442],"./shows/tvgenres":[84055,45642,12011,24468,23230],"./shows/tvgenres.js":[84055,45642,12011,24468,23230],"./shows/tvrecommended":[81268,45642,29808,12011,24468,4113,45568,73233,22255],"./shows/tvrecommended.html":[77674,39783],"./shows/tvrecommended.js":[81268,45642,29808,12011,24468,4113,45568,73233,22255],"./shows/tvshows":[57965,45642,29808,28336,1820,32125,70712,12011,24468,6940,57965,17840],"./shows/tvshows.js":[57965,45642,29808,28336,1820,32125,70712,12011,24468,6940,57965,17840],"./shows/tvstudios":[3376,45642,12011,24468,98615],"./shows/tvstudios.js":[3376,45642,12011,24468,98615],"./shows/tvupcoming":[98769,45642,29808,12011,24468,17176],"./shows/tvupcoming.js":[98769,45642,29808,12011,24468,17176],"./user/controls":[73053,63549],"./user/controls/":[73053,63549],"./user/controls/index":[73053,63549],"./user/controls/index.html":[97107,44496],"./user/controls/index.js":[73053,63549],"./user/display":[40815,23247,60815,81771,40815,66935],"./user/display/":[40815,23247,60815,81771,40815,66935],"./user/display/index":[40815,23247,60815,81771,40815,66935],"./user/display/index.html":[32197,58122],"./user/display/index.js":[40815,40815,28312],"./user/home":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/home/":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/home/index":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/home/index.html":[38190,94889],"./user/home/index.js":[50813,45642,29808,12011,24468,4113,56213,87362],"./user/playback":[77506,73468],"./user/playback/":[77506,73468],"./user/playback/index":[77506,73468],"./user/playback/index.html":[21464,64819],"./user/playback/index.js":[77506,73468],"./user/subtitles":[9070,57949,92594],"./user/subtitles/":[9070,57949,92594],"./user/subtitles/index":[9070,57949,92594],"./user/subtitles/index.html":[2690,96921],"./user/subtitles/index.js":[9070,57949,92594]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=7062,e.exports=i},7451:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r}});var r=[{path:"addserver",pageProps:{controller:"session/addServer/index",view:"session/addServer/index.html"}},{path:"selectserver",pageProps:{controller:"session/selectServer/index",view:"session/selectServer/index.html"}},{path:"login",pageProps:{controller:"session/login/index",view:"session/login/index.html"}},{path:"forgotpasswordpin",pageProps:{controller:"session/resetPassword/index",view:"session/resetPassword/index.html"}}]},7603:function(e,t,n){"use strict";n.r(t),n.d(t,{DASHBOARD_APP_PATHS:function(){return g},DASHBOARD_APP_ROUTES:function(){return b}});var r=n(62540),i=n(63696),o=n(87404),a=n(22477),s=n(39244),l=n(51218),u=n(37881),c=n(4877),d=n(62156),f=n(5898),p=n(67430),m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)},y=n(34569),v=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},h=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},g={Dashboard:"dashboard",MetadataManager:"metadata",PluginConfig:"configurationpage"},b=[{element:(0,r.jsx)(a.A,{level:"admin"}),children:[{lazy:function(){return Promise.all([n.e(45642),n.e(23247),n.e(60815),n.e(81771),n.e(90609),n.e(16304),n.e(1270),n.e(55931),n.e(41823),n.e(6496)]).then(n.bind(n,86336))},children:[{path:g.Dashboard,children:h(h(h([],v(s.ASYNC_ADMIN_ROUTES.map(l.G)),!1),v(c.LEGACY_ADMIN_ROUTES.map(u.I)),!1),[{path:"plugins/catalog",element:(0,r.jsx)(o.C5,{replace:!0,to:"/dashboard/plugins"})}],!1),errorElement:(0,r.jsx)(y.A,{pageClasses:["type-interior"]})},(0,u.I)({path:g.MetadataManager,pageProps:{controller:"edititemmetadata",view:"edititemmetadata.html"}}),{path:g.PluginConfig,element:(0,r.jsx)((function(e){var t=e.view,n=(0,o.zy)();return(0,i.useEffect)((function(){var e;e={url:n.pathname+n.search,state:n.state,autoFocus:!1,options:{supportsThemeMedia:!1,enableMediaControl:!0}},d.A.tryRestoreView(e).catch((function(r){return i=void 0,o=void 0,s=function(){var i,o;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(a){switch(a.label){case 0:return(null==r?void 0:r.cancelled)?[3,2]:[4,null==(i=p.tF.currentApiClient())?void 0:i.get(i.getUrl(t+n.search)).then((function(e){return f.Ay.translateHtml(e)}))];case 1:o=a.sent(),d.A.loadView(m(m({},e),{view:o})),a.label=2;case 2:return[2]}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function r(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}l((s=s.apply(i,o||[])).next())}));var i,o,a,s}))}),[t,n.pathname,n.search]),null}),{view:"/web/configurationpage"})}]}]}]},8566:function(e,t,n){"use strict";var r;function i(){r&&r.classList.remove("mdlSpinnerActive")}n.d(t,{jD:function(){return i}});var o={show:function(){var e;r||((e=document.createElement("div")).setAttribute("dir","ltr"),e.classList.add("docspinner"),e.classList.add("mdl-spinner"),e.innerHTML='<div class="mdl-spinner__layer mdl-spinner__layer-1"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-2"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-3"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-4"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div>',document.body.appendChild(e),r=e),r.classList.add("mdlSpinnerActive")},hide:i};window.Loading=o,t.Ay=o},9164:function(e,t,n){"use strict";n(84734),n(86584),n(87324),n(89336),n(78557),n(67593);var r=n(36300),i=n(93599),o=[];function a(e,t,n){var r;return!1!==n&&(r=e.querySelector("*[autofocus]"))||!1!==t&&(r=v(e,1,"noautofocus")[0])?(s(r),r):null}function s(e){try{e.focus({preventScroll:i.Ay.isEnabled()})}catch(e){console.error("Error in focusManager.autoFocus: "+e)}}var l=["INPUT","TEXTAREA","SELECT","BUTTON","A"],u=["BODY","DIALOG"],c=l.map((function(e){return"INPUT"===e&&(e+=':not([type="range"]):not([type="file"])'),e+':not([tabindex="-1"]):not(:disabled)'})).join(",")+",.focusable";function d(e){var t;return-1!==l.indexOf(e.tagName)||(null===(t=e.classList)||void 0===t?void 0:t.contains("focusable"))}function f(e,t){if(e){var n=e.tagName;n&&"HTML"!==n&&"BODY"!==n||(e=t)}return e}function p(e){for(var t=e;!d(e);){var n=e.parentNode;if(!n)return f(e,t);e=n}return f(e,t)}function m(e){return null!==e.offsetParent}function y(){return o[0]||document.body}function v(e,t,n){for(var r=(e||y()).querySelectorAll(c),i=[],o=0,a=r.length;o<a;o++){var s=r[o];if((!n||!s.classList.contains(n))&&m(s)&&(i.push(s),t&&i.length>=t))break}return i}function h(e,t){if(-1!==u.indexOf(e.tagName))return!0;var n=e.classList;if(n.contains("focuscontainer"))return!0;if(0===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-left"))return!0}else if(1===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-right"))return!0}else if(2===t){if(n.contains("focuscontainer-y"))return!0}else if(3===t){if(n.contains("focuscontainer-y"))return!0;if(n.contains("focuscontainer-down"))return!0}return!1}function g(e){var t;return null===(t=e.getBoundingClientRect?e.getBoundingClientRect():{top:0,left:0,width:0,height:0}).right&&((t={top:t.top,left:t.left,width:t.width,height:t.height}).right=t.left+t.width,t.bottom=t.top+t.height),t}function b(e,t,n,i){if((e=e||document.activeElement)&&(e=p(e)),n=n||(e?function(e,t){for(;!h(e,t);)if(!(e=e.parentNode))return y();return e}(e,t):y()),e&&e!=document.body){for(var o,l=r.Ay.parentWithClass(e,"focusable"),u=g(e),d=parseFloat(u.left)||0,f=parseFloat(u.top)||0,m=parseFloat(d+u.width-1)||d,v=parseFloat(f+u.height-1)||f,b=u.left+u.width/2,S=u.top+u.height/2,x=i||n.querySelectorAll(c),w=1/0,P=0,k=x.length;P<k;P++){var I=x[P];if(I!==e&&I!==l){var j=g(I);if(j.width||j.height){switch(t){case 0:if(j.left>=u.left)continue;if(j.right===u.right)continue;break;case 1:if(j.right<=u.right)continue;if(j.left===u.left)continue;break;case 2:if(j.top>=u.top)continue;if(j.bottom>=u.bottom)continue;break;case 3:if(j.bottom<=u.bottom)continue;if(j.top<=u.top)continue}var T=j.left,C=j.top,E=T+j.width-1,_=C+j.height-1,L=A(d,m,T,E),M=A(f,v,C,_),O=j.left+j.width/2,R=j.top+j.height/2,D=void 0,N=void 0;switch(t){case 0:D=Math.abs(d-Math.min(d,E)),N=M?0:Math.abs(S-R);break;case 1:D=Math.abs(m-Math.max(m,T)),N=M?0:Math.abs(S-R);break;case 2:N=Math.abs(f-Math.min(f,_)),D=L?0:Math.abs(b-O);break;case 3:N=Math.abs(v-Math.max(v,C)),D=L?0:Math.abs(b-O)}var F=Math.sqrt(D*D+N*N);F<w&&(o=I,w=F)}}}if(o){if(e){var U=r.Ay.parentWithClass(o,"focusable");U&&U!==o&&l!==U&&(o=U)}s(o)}}else a(n,!0,!1)}function S(e,t,n,r){return n>=e&&n<=t||r>=e&&r<=t}function A(e,t,n,r){return S(e,t,n,r)||S(n,r,e,t)}t.A={autoFocus:a,focus:s,focusableParent:p,getFocusableElements:v,moveLeft:function(e,t){b(e,0,t?t.container:null,t?t.focusableElements:null)},moveRight:function(e,t){b(e,1,t?t.container:null,t?t.focusableElements:null)},moveUp:function(e,t){b(e,2,t?t.container:null,t?t.focusableElements:null)},moveDown:function(e,t){b(e,3,t?t.container:null,t?t.focusableElements:null)},sendText:function(e){document.activeElement.value=e},isCurrentlyFocusable:function(e){var t;if(null===(t=e.classList)||void 0===t||!t.contains("focusable")){if(e.disabled)return!1;if("-1"===e.getAttribute("tabindex"))return!1;if("INPUT"===e.tagName){var n=e.type;if("range"===n)return!1;if("file"===n)return!1}}return m(e)},pushScope:function(e){o.push(e)},popScope:function(){o.length&&(o.length-=1)},focusFirst:function(e,t){for(var n=e.querySelectorAll(t),r=0,i=n.length;r<i;r++){var o=n[r];if(m(o)){s(o);break}}},focusLast:function(e,t){for(var n=[].slice.call(e.querySelectorAll(t),0).reverse(),r=0,i=n.length;r<i;r++){var o=n[r];if(m(o)){s(o);break}}},moveFocus:function(e,t,n,r){var i,o,a,l=t.querySelectorAll(n),u=[];for(i=0,o=l.length;i<o;i++)m(a=l[i])&&u.push(a);var c=-1;for(i=0,o=u.length;i<o;i++)if(e===(a=u[i])||a.contains(e)){c=i;break}if(-1!==c){var d=c+r;d=Math.max(0,d);var f=u[d=Math.min(d,u.length-1)];f&&s(f)}}}},10353:function(e,t,n){"use strict";n(69177);var r=n(22622),i=n(46782),o=n(70267),a=n(97339),s=n(36300),l=n(13615),u=Object.create(HTMLButtonElement.prototype),c=Object.create(HTMLAnchorElement.prototype);function d(e){var t=this.getAttribute("href")||"";"#"!==t?this.getAttribute("target")?r.g.supports(a.Y.TargetBlank)||(e.preventDefault(),l.A.openUrl(t)):(e.preventDefault(),o.appRouter.show(t)):e.preventDefault()}u.createdCallback=function(){this.classList.contains("emby-button")||(this.classList.add("emby-button"),i.A.tv&&this.classList.add("show-focus"))},u.attachedCallback=function(){"A"===this.tagName&&((0,s.f)(this,"click",d,{}),(0,s.q2)(this,"click",d,{}),"true"===this.getAttribute("data-autohide")&&(r.g.supports(a.Y.ExternalLinks)?this.classList.remove("hide"):this.classList.add("hide")))},u.detachedCallback=function(){(0,s.f)(this,"click",d,{})},c.createdCallback=u.createdCallback,c.attachedCallback=u.attachedCallback,document.registerElement("emby-button",{prototype:u,extends:"button"}),document.registerElement("emby-linkbutton",{prototype:c,extends:"a"}),t.A=u},10736:function(e,t,n){"use strict";n.r(t),n(78557),n(96054),n(23630);var r=n(41177),i=n(9164),o=n(39738),a=n(38829),s=n(70267),l=n(71866),u=n(67430),c=n(38490),d=n(44797),f=n(38783),p={};function m(){c.default.notify()}function y(e,t){var n,u=this,y=null===(n=a.X.firstOfType(f.Q.SyncPlay))||void 0===n?void 0:n.instance;if("Play"===t.MessageType){m();var v=u.serverInfo().Id;"PlayNext"===t.Data.PlayCommand?o.f.queueNext({ids:t.Data.ItemIds,serverId:v}):"PlayLast"===t.Data.PlayCommand?o.f.queue({ids:t.Data.ItemIds,serverId:v}):o.f.play({ids:t.Data.ItemIds,startPositionTicks:t.Data.StartPositionTicks,mediaSourceId:t.Data.MediaSourceId,audioStreamIndex:t.Data.AudioStreamIndex,subtitleStreamIndex:t.Data.SubtitleStreamIndex,startIndex:t.Data.StartIndex,serverId:v})}else if("Playstate"===t.MessageType)"Stop"===t.Data.Command?c.default.handleCommand("stop"):"Pause"===t.Data.Command?c.default.handleCommand("pause"):"Unpause"===t.Data.Command?c.default.handleCommand("play"):"PlayPause"===t.Data.Command?c.default.handleCommand("playpause"):"Seek"===t.Data.Command?o.f.seek(t.Data.SeekPositionTicks):"NextTrack"===t.Data.Command?c.default.handleCommand("next"):"PreviousTrack"===t.Data.Command?c.default.handleCommand("previous"):m();else if("GeneralCommand"===t.MessageType)!function(e,t){switch(console.debug("Received command: "+e.Name),e.Name){case"Select":return void c.default.handleCommand("select");case"Back":return void c.default.handleCommand("back");case"MoveUp":return void c.default.handleCommand("up");case"MoveDown":return void c.default.handleCommand("down");case"MoveLeft":return void c.default.handleCommand("left");case"MoveRight":return void c.default.handleCommand("right");case"PageUp":return void c.default.handleCommand("pageup");case"PageDown":return void c.default.handleCommand("pagedown");case"PlayTrailers":!function(e,t){e.getItem(e.getCurrentUserId(),t).then((function(e){o.f.playTrailers(e)}))}(t,e.Arguments.ItemId);break;case"SetRepeatMode":o.f.setRepeatMode(e.Arguments.RepeatMode);break;case"SetShuffleQueue":o.f.setQueueShuffleMode(e.Arguments.ShuffleMode);break;case"VolumeUp":return void c.default.handleCommand("volumeup");case"VolumeDown":return void c.default.handleCommand("volumedown");case"ChannelUp":return void c.default.handleCommand("channelup");case"ChannelDown":return void c.default.handleCommand("channeldown");case"Mute":return void c.default.handleCommand("mute");case"Unmute":return void c.default.handleCommand("unmute");case"ToggleMute":return void c.default.handleCommand("togglemute");case"SetVolume":m(),o.f.setVolume(e.Arguments.Volume);break;case"SetAudioStreamIndex":m(),o.f.setAudioStreamIndex(parseInt(e.Arguments.Index,10));break;case"SetSubtitleStreamIndex":m(),o.f.setSubtitleStreamIndex(parseInt(e.Arguments.Index,10));break;case"ToggleFullscreen":return void c.default.handleCommand("togglefullscreen");case"GoHome":return void c.default.handleCommand("home");case"GoToSettings":return void c.default.handleCommand("settings");case"DisplayContent":!function(e,t){o.f.isPlayingLocally(["Video","Book"])||s.appRouter.showItem(e.Arguments.ItemId,t.serverId())}(e,t);break;case"GoToSearch":return void c.default.handleCommand("search");case"DisplayMessage":!function(e){var t=e.Arguments;t.TimeoutMs?(0,l.A)({title:t.Header,text:t.Text}):(0,r.A)({title:t.Header,text:t.Text})}(e);break;case"ToggleOsd":case"ToggleContextMenu":case"SendKey":break;case"SendString":i.A.sendText(e.Arguments.String);break;default:console.debug("processGeneralCommand does not recognize: "+e.Name)}m()}(t.Data,u);else if("UserDataChanged"===t.MessageType){if(t.Data.UserId===u.getCurrentUserId())for(var h=0,g=t.Data.UserDataList.length;h<g;h++)d.A.trigger(p,"UserDataChanged",[u,t.Data.UserDataList[h]])}else"SyncPlayCommand"===t.MessageType?null==y||y.Manager.processCommand(t.Data,u):"SyncPlayGroupUpdate"===t.MessageType?null==y||y.Manager.processGroupUpdate(t.Data,u):d.A.trigger(p,t.MessageType,[u,t.Data])}function v(e){d.A.off(e,"message",y),d.A.on(e,"message",y)}u.tF.getApiClients().forEach(v),d.A.on(u.tF,"apiclientcreated",(function(e,t){v(t)})),window.ServerNotifications=p,t.default=p},10838:function(e,t,n){"use strict";n.r(t),n.d(t,{centerFocus:function(){return f},getPosition:function(){return a},toCenter:function(){return s},toStart:function(){return l}});var r=n(9164),i=n(36300);function o(e){return e.getBoundingClientRect?e.getBoundingClientRect():{top:0,left:0,width:void 0,height:void 0}}function a(e,t,n){var r=o(e),i=o(t),a=n?i.left-r.left:i.top-r.top,s=n?i.width:i.height;s||0===s||(s=t[n?"offsetWidth":"offsetHeight"]);var l=n?e.scrollLeft:e.scrollTop;a+=l;var u=n?e.offsetWidth:e.offsetHeight;return{start:a,center:a-u/2+s/2,end:a-u+s,size:s,isVisible:a>=l&&a+s<=l+u}}function s(e,t,n,r){var i=a(e,t,n);r&&i.isVisible||(e.scrollTo?n?e.scrollTo(i.center,0):e.scrollTo(0,i.center):n?e.scrollLeft=Math.round(i.center):e.scrollTop=Math.round(i.center))}function l(e,t,n,r){var i=a(e,t,n);r&&i.isVisible||(e.scrollTo?n?e.scrollTo(i.start,0):e.scrollTo(0,i.start):n?e.scrollLeft=Math.round(i.start):e.scrollTop=Math.round(i.start))}function u(e,t,n){var i=r.A.focusableParent(e.target);i&&s(t,i,n)}function c(e){u(e,this,!0)}function d(e){u(e,this,!1)}var f={on:function(e,t){e.setAttribute("data-scroll-mode-".concat(t?"x":"y"),"custom"),t?i.Ay.addEventListener(e,"focus",c,{capture:!0,passive:!0}):i.Ay.addEventListener(e,"focus",d,{capture:!0,passive:!0})},off:function(e,t){e.removeAttribute("data-scroll-mode-".concat(t?"x":"y")),t?i.Ay.removeEventListener(e,"focus",c,{capture:!0,passive:!0}):i.Ay.removeEventListener(e,"focus",d,{capture:!0,passive:!0})}};t.default={getPosition:a,centerFocus:f,toCenter:s,toStart:l}},10989:function(e,t,n){"use strict";n.d(t,{If:function(){return r},Jb:function(){return i},Y_:function(){return a},wi:function(){return o}});var r=1e3,i=1e4,o=r*i,a=60*o},11167:function(e,t,n){var r={"./backdropScreensaver/plugin":[53286,86040],"./backdropScreensaver/plugin.js":[53286,86040],"./bookPlayer/plugin":[14447,64633],"./bookPlayer/plugin.js":[14447,64633],"./bookPlayer/style.scss":[19036,17084],"./bookPlayer/tableOfContents":[80245,10905],"./bookPlayer/tableOfContents.js":[80245,10905],"./bookPlayer/template.html":[68104,68672],"./chromecastPlayer/castSenderApi":[9724,6270],"./chromecastPlayer/castSenderApi.js":[9724,6270],"./chromecastPlayer/plugin":[48671,30357],"./chromecastPlayer/plugin.js":[48671,30357],"./comicsPlayer/plugin":[79145,41542],"./comicsPlayer/plugin.js":[79145,41542],"./comicsPlayer/style.scss":[63459,23831],"./experimentalWarnings/plugin":[76066,40810],"./experimentalWarnings/plugin.js":[76066,40810],"./htmlAudioPlayer/plugin":[27907,87903],"./htmlAudioPlayer/plugin.js":[27907,87903],"./htmlVideoPlayer/plugin":[57379,55931,71318],"./htmlVideoPlayer/plugin.js":[57379,55931,71318],"./htmlVideoPlayer/style.scss":[28157,98887],"./logoScreensaver/plugin":[61619,49087],"./logoScreensaver/plugin.js":[61619,49087],"./logoScreensaver/style.scss":[18640,93654],"./pdfPlayer/plugin":[38362,4836],"./pdfPlayer/plugin.js":[38362,4836],"./pdfPlayer/style.scss":[63103,71769],"./photoPlayer/plugin":[7780,70118],"./photoPlayer/plugin.js":[7780,70118],"./playAccessValidation/plugin":[8450,90186],"./playAccessValidation/plugin.js":[8450,90186],"./sessionPlayer/plugin":[9112,64706],"./sessionPlayer/plugin.js":[9112,64706],"./syncPlay/core":[99555,13151,19907,60138,10672],"./syncPlay/core/":[99555,13151,19907,60138,10672],"./syncPlay/core/Controller":[73391,94561],"./syncPlay/core/Controller.js":[73391,94561],"./syncPlay/core/Helper":[20919,65849],"./syncPlay/core/Helper.js":[20919,65849],"./syncPlay/core/Manager":[86004,13151,19907,60138],"./syncPlay/core/Manager.js":[86004,13151,19907,60138],"./syncPlay/core/PlaybackCore":[629,13151],"./syncPlay/core/PlaybackCore.js":[629,13151],"./syncPlay/core/QueueCore":[19907,19907,80835],"./syncPlay/core/QueueCore.js":[19907,19907,80835],"./syncPlay/core/Settings":[4438,14510],"./syncPlay/core/Settings.js":[4438,14510],"./syncPlay/core/index":[99555,13151,19907,60138,10672],"./syncPlay/core/index.js":[99555,13151,19907,60138,10672],"./syncPlay/core/players/GenericPlayer":[16590,2],"./syncPlay/core/players/GenericPlayer.js":[16590,2],"./syncPlay/core/players/PlayerFactory":[24255,56577],"./syncPlay/core/players/PlayerFactory.js":[24255,56577],"./syncPlay/core/timeSync/TimeSync":[67122,83354],"./syncPlay/core/timeSync/TimeSync.js":[67122,83354],"./syncPlay/core/timeSync/TimeSyncCore":[55125,96307],"./syncPlay/core/timeSync/TimeSyncCore.js":[55125,96307],"./syncPlay/core/timeSync/TimeSyncServer":[95937,49755],"./syncPlay/core/timeSync/TimeSyncServer.js":[95937,49755],"./syncPlay/plugin":[55230,13151,19907,60138,927,1680],"./syncPlay/plugin.ts":[55230,13151,19907,60138,927,1680],"./syncPlay/ui/groupSelectionMenu":[1724,45568,3460],"./syncPlay/ui/groupSelectionMenu.js":[1724,45568,3460],"./syncPlay/ui/groupSelectionMenu.scss":[12475,75637],"./syncPlay/ui/playbackPermissionManager":[39387,52011],"./syncPlay/ui/playbackPermissionManager.js":[39387,52011],"./syncPlay/ui/players/HtmlAudioPlayer":[41443,13151,19907,60138,927,39573],"./syncPlay/ui/players/HtmlAudioPlayer.js":[41443,13151,19907,60138,927,39573],"./syncPlay/ui/players/HtmlVideoPlayer":[9066,13151,19907,60138,927,40394],"./syncPlay/ui/players/HtmlVideoPlayer.js":[9066,13151,19907,60138,927,40394],"./syncPlay/ui/players/NoActivePlayer":[10699,13151,19907,60138,927],"./syncPlay/ui/players/NoActivePlayer.js":[10699,13151,19907,60138,927],"./syncPlay/ui/players/QueueManager":[16209,29593],"./syncPlay/ui/players/QueueManager.js":[16209,29593],"./syncPlay/ui/settings/SettingsEditor":[45568,45568,96084],"./syncPlay/ui/settings/SettingsEditor.js":[45568,45568,96084],"./syncPlay/ui/settings/editor.html":[70123,18895],"./youtubePlayer/plugin":[8255,70555],"./youtubePlayer/plugin.js":[8255,70555],"./youtubePlayer/style.scss":[47312,49890]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=11167,e.exports=i},12446:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return r}});var r=[{path:"mypreferencesmenu",page:"user/settings"},{path:"quickconnect",page:"quickConnect"},{path:"search",page:"search"},{path:"userprofile",page:"user/userprofile"}]},13258:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(64963);t.A=function(e){var t=e.children;return(0,i.useEffect)((function(){return function(){o.Ay.reset()}}),[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mainAnimatedPages skinBody"}),(0,r.jsx)("div",{className:"skinBody",children:t})]})}},13615:function(e,t,n){"use strict";n(78557),n(23630),t.A={enableFullscreen:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.enableFullscreen&&window.NativeShell.enableFullscreen()},disableFullscreen:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.disableFullscreen&&window.NativeShell.disableFullscreen()},openClientSettings:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.openClientSettings&&window.NativeShell.openClientSettings()},openDownloadManager:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.openDownloadManager&&window.NativeShell.openDownloadManager()},openUrl:function(e,t){var n;null!==(n=window.NativeShell)&&void 0!==n&&n.openUrl?window.NativeShell.openUrl(e,t):window.open(e,t||"_blank")},updateMediaSession:function(e){var t;null!==(t=window.NativeShell)&&void 0!==t&&t.updateMediaSession&&window.NativeShell.updateMediaSession(e)},hideMediaSession:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.hideMediaSession&&window.NativeShell.hideMediaSession()},updateVolumeLevel:function(e){var t;null!==(t=window.NativeShell)&&void 0!==t&&t.updateVolumeLevel&&window.NativeShell.updateVolumeLevel(e)},downloadFiles:function(e){var t,n;return null!==(t=window.NativeShell)&&void 0!==t&&t.downloadFiles?(window.NativeShell.downloadFiles(e),!0):!(null===(n=window.NativeShell)||void 0===n||!n.downloadFile||(e.forEach((function(e){window.NativeShell.downloadFile(e)})),0))}}},13993:function(e,t,n){"use strict";n.r(t);var r=n(62540),i=n(92779),o=n(45318),a=n(63696),s=n(76617),l=n(5824),u=n(87119),c=n(55219),d=n(71286),f=n(44797);t.default=function(){var e=(0,a.useRef)(document),t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,a.useState)(!0),2),n=t[0],p=t[1],m=function(e,t){p(t)};return(0,a.useEffect)((function(){var t=e.current;return t&&f.A.on(t,d.B.SHOW_VIDEO_OSD,m),function(){t&&f.A.off(t,d.B.SHOW_VIDEO_OSD,m)}}),[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{in:n,easing:"fade-out",children:(0,r.jsx)(i.A,{sx:{position:"absolute",top:0,left:0,right:0,color:"white"},children:(0,r.jsx)(u.A,{isDrawerAvailable:!1,isDrawerOpen:!1,isBackButtonAvailable:!0,isUserMenuAvailable:!1,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.A,{}),(0,r.jsx)(s.A,{})]})})})}),(0,r.jsx)(c.A,{controller:"playback/video/index",view:"playback/video/index.html",type:"video-osd",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0})]})}},15453:function(e,t,n){"use strict";var r=n(46782),i=(n(69177),Object.create(HTMLButtonElement.prototype));i.createdCallback=function(){this.classList.add("paper-icon-button-light"),r.A.tv&&this.classList.add("show-focus")},document.registerElement("paper-icon-button-light",{prototype:i,extends:"button"})},19373:function(e,t,n){"use strict";var r;n.d(t,{u:function(){return r}}),function(e){e.Dashboard="dashboard",e.Experimental="experimental",e.Stable="stable",e.Wizard="wizard"}(r||(r={}))},21643:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return i}});var r=n(19373),i=[{path:"home",type:r.u.Experimental},{path:"homevideos",type:r.u.Experimental},{path:"livetv",type:r.u.Experimental},{path:"movies",type:r.u.Experimental},{path:"music",type:r.u.Experimental},{path:"mypreferencesdisplay",page:"user/display",type:r.u.Experimental},{path:"mypreferencesmenu",page:"user/settings"},{path:"quickconnect",page:"quickConnect"},{path:"search"},{path:"tv",page:"shows",type:r.u.Experimental},{path:"userprofile",page:"user/userprofile"}]},21840:function(e,t,n){"use strict";n.r(t),n(29305),n(32733),n(84701),n(81678),n(24776),n(44962),n(4754),n(94),n(36947),n(83810),n(78557),n(90076),n(83994),n(82367);var r,i=n(22696),o=n.n(i),a=n(8566),s=n(79754),l=n(36300),u=n(5898),c=(n(98959),n(15453),n(10353),n(41177));function d(e){return d="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},d(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function p(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function v(){a.Ay.hide()}function h(e,t,n,r){if(t&&"string"!=typeof t)throw new Error("invalid path");a.Ay.show();var i=[];t?(i.push(ApiClient.getDirectoryContents(t,n)),i.push(ApiClient.getParentPath(t))):i.push(ApiClient.getDrives()),Promise.all(i).then((function(n){var r=n[0],i=(n[1]?JSON.parse(n[1]):"")||"",o="";e.querySelector(".results").scrollTop=0,e.querySelector("#txtDirectoryPickerPath").value=t||"",t&&(o+=g("lnkPath lnkDirectory","",i,"..."));for(var s=0,l=r.length;s<l;s++){var u=r[s];o+=g("File"===u.Type?"lnkPath lnkFile":"lnkPath lnkDirectory",u.Type,u.Path,u.Name)}e.querySelector(".results").innerHTML=o,a.Ay.hide()}),(function(){r&&(e.querySelector("#txtDirectoryPickerPath").value="",e.querySelector(".results").innerHTML="",a.Ay.hide())}))}function g(e,t,n,r){var i="";return i+='<div class="listItem listItem-border '.concat(e,'" data-type="').concat(t,'" data-path="').concat(o()(n),'">'),i+='<div class="listItemBody" style="padding-left:0;padding-top:.5em;padding-bottom:.5em;">',i+='<div class="listItemBodyText">',i+=o()(r),i+="</div>",i+="</div>",(i+='<span class="material-icons arrow_forward" aria-hidden="true" style="font-size:inherit;"></span>')+"</div>"}function b(e){var t;t={text:e},(0,c.A)(t)}function S(e){return e.path?Promise.resolve(e.path):ApiClient.getJSON(ApiClient.getUrl("Environment/DefaultDirectoryBrowser")).then((function(e){return e.Path||""}),(function(){return""}))}var A=p((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),m(this,"currentDialog",void 0),m(this,"show",(function(e){var n={includeDirectories:!0};null!=(e=e||{}).includeDirectories&&(n.includeDirectories=e.includeDirectories),null!=e.includeFiles&&(n.includeFiles=e.includeFiles),Promise.all([r?Promise.resolve(r):ApiClient.getPublicSystemInfo().then((function(e){return r=e,e})),S(e)]).then((function(r){var i=r[0],a=r[1],c=s.default.createDialog({size:"small",removeOnClose:!0,scrollY:!1});c.classList.add("ui-body-a"),c.classList.add("background-theme-a"),c.classList.add("directoryPicker"),c.classList.add("formDialog");var d="";d+='<div class="formDialogHeader">',d+='<button is="paper-icon-button-light" class="btnCloseDialog autoSize" tabindex="-1" title="'.concat(u.Ay.translate("ButtonBack"),'"><span class="material-icons arrow_back" aria-hidden="true"></span></button>'),d+='<h3 class="formDialogHeaderTitle">',d+=o()(e.header||"")||u.Ay.translate("HeaderSelectPath"),d+="</h3>",d+="</div>",d+=function(e,t){var n,r="";r+='<div class="formDialogContent scrollY">',r+='<div class="dialogContentInner dialog-content-centered" style="padding-top:2em;">',e.pathReadOnly||(r+='<div class="infoBanner" style="margin-bottom:1.5em;">',r+=e.instruction?"".concat(o()(e.instruction),"<br/><br/>"):"","bsd"===t.OperatingSystem.toLowerCase()?(r+="<br/>",r+="<br/>",r+=u.Ay.translate("MessageDirectoryPickerBSDInstruction"),r+="<br/>"):"linux"===t.OperatingSystem.toLowerCase()&&(r+="<br/>",r+="<br/>",r+=u.Ay.translate("MessageDirectoryPickerLinuxInstruction"),r+="<br/>"),r+="</div>"),r+='<form style="margin:auto;">',r+='<div class="inputContainer" style="display: flex; align-items: center;">',r+='<div style="flex-grow:1;">',n=!0!==e.includeFiles?"LabelFolder":"LabelPath";var i=e.pathReadOnly?" readonly":"";return r+='<input is="emby-input" id="txtDirectoryPickerPath" type="text" required="required" '.concat(i,' label="').concat(u.Ay.translate(n),'"/>'),r+="</div>",i||(r+='<button type="button" is="paper-icon-button-light" class="btnRefreshDirectories emby-input-iconbutton" title="'.concat(u.Ay.translate("Refresh"),'"><span class="material-icons search" aria-hidden="true"></span></button>')),r+="</div>",i||(r+='<div class="results paperList" style="max-height: 200px; overflow-y: auto;"></div>'),e.enableNetworkSharePath&&(r+='<div class="inputContainer" style="margin-top:2em;">',r+='<input is="emby-input" id="txtNetworkPath" type="text" label="'.concat(u.Ay.translate("LabelOptionalNetworkPath"),'"/>'),r+='<div class="fieldDescription">',r+=u.Ay.translate("LabelOptionalNetworkPathHelp","<b>\\\\server</b>","<b>\\\\192.168.1.101</b>"),r+="</div>",r+="</div>"),r+='<div class="formDialogFooter">',r+='<button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem">'.concat(u.Ay.translate("ButtonOk"),"</button>"),r+="</div>",r+="</form>",r+="</div>",(r+="</div>")+"</div>"}(e,i),c.innerHTML=d,function(e,t,n){e.addEventListener("click",(function(t){var r=l.Ay.parentWithClass(t.target,"lnkPath");if(r){var i=r.getAttribute("data-path");r.classList.contains("lnkFile")?e.querySelector("#txtDirectoryPickerPath").value=i:h(e,i,n,!0)}})),e.addEventListener("click",(function(t){if(l.Ay.parentWithClass(t.target,"btnRefreshDirectories")){var r=e.querySelector("#txtDirectoryPickerPath").value;h(e,r,n)}})),e.addEventListener("change",(function(t){var r=l.Ay.parentWithTag(t.target,"INPUT");r&&"txtDirectoryPickerPath"===r.id&&h(e,r.value,n)})),e.querySelector("form").addEventListener("submit",(function(e){if(t.callback){var n=this.querySelector("#txtNetworkPath");n=n?n.value:null;var r=this.querySelector("#txtDirectoryPickerPath").value;(function(e,t,n){return n.ajax({type:"POST",url:n.getUrl("Environment/ValidatePath"),data:JSON.stringify({ValidateWriteable:t,Path:e}),contentType:"application/json"}).catch((function(e){if(e){if(404===e.status)return b(u.Ay.translate("PathNotFound")),Promise.reject();if(500===e.status)return b(t?u.Ay.translate("WriteAccessRequired"):u.Ay.translate("PathNotFound")),Promise.reject()}return Promise.resolve()}))})(r,t.validateWriteable,ApiClient).then(t.callback(r,n)).catch((function(){}))}return e.preventDefault(),e.stopPropagation(),!1}))}(c,e,n),c.addEventListener("close",v),s.default.open(c),c.querySelector(".btnCloseDialog").addEventListener("click",(function(){s.default.close(c)})),t.currentDialog=c,c.querySelector("#txtDirectoryPickerPath").value=a;var f=c.querySelector("#txtNetworkPath");f&&(f.value=e.networkSharePath||""),e.pathReadOnly||h(c,a,n,!0)}))})),m(this,"close",(function(){t.currentDialog&&s.default.close(t.currentDialog)}))}));t.default=A},22043:function(e,t,n){"use strict";var r;n.d(t,{W:function(){return r}}),function(e){e[e.Local=0]="Local",e[e.Remote=1]="Remote",e[e.Manual=2]="Manual"}(r||(r={}))},22477:function(e,t,n){"use strict";n.d(t,{A:function(){return k}});var r,i,o=n(62540),a=n(63696),s=n(87404),l=n(67430),u=n(31234),c=n.n(u),d=n(22622),f=n(65242),p=n(71866),m=n(97339),y=n(84851),v=n(5898),h=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},g=function(e){var t=e.state,n=h((0,a.useState)(),2),r=n[0],i=n[1],s=h((0,a.useState)(),2),u=s[0],g=s[1],b=h((0,a.useState)(),2),S=b[0],A=b[1],x=h((0,a.useState)(!1),2),w=x[0],P=x[1],k=(0,a.useCallback)((function(){return e=void 0,t=void 0,r=function(){var e,t;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){switch(n.label){case 0:P(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),e=l.tF.getLastUsedServer(),[4,l.tF.updateSavedServerId(e)];case 2:return n.sent(),window.location.reload(),[3,4];case 3:return t=n.sent(),console.error("[ConnectionErrorPage] Failed to force connect to server",t),(0,p.A)(v.Ay.translate("HeaderConnectionFailure")),P(!1),[3,4];case 4:return[2]}}))},new((n=void 0)||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}),[]);if((0,a.useEffect)((function(){switch(t){case l.KN.ServerMismatch:return i(v.Ay.translate("HeaderServerMismatch")),g(void 0),void A(v.Ay.translate("MessageServerMismatch"));case l.KN.ServerUpdateNeeded:return i(v.Ay.translate("HeaderUpdateRequired")),g(v.Ay.translate("ServerUpdateNeeded",'<a href="https://jellyfin.org/downloads/server/">jellyfin.org/downloads/server</a>')),void A(void 0);case l.KN.Unavailable:i(v.Ay.translate("HeaderServerUnavailable")),g(void 0),A(v.Ay.translate("MessageUnableToConnectToServer"))}}),[t]),r)return(0,o.jsx)(f.A,{id:"connectionErrorPage",className:"mainAnimatedPage standalonePage",isBackButtonEnabled:!1,children:(0,o.jsxs)("div",{className:"padded-left padded-right",children:[(0,o.jsx)("h1",{children:r}),u&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:c().sanitize(u)},style:{maxWidth:"80ch"}}),S&&(0,o.jsx)("p",{style:{maxWidth:"80ch"},children:S}),d.g.supports(m.Y.MultiServer)&&(0,o.jsx)(y.A,{className:"raised",href:"/selectserver",children:v.Ay.translate("ButtonChangeServer")}),t===l.KN.ServerMismatch&&(0,o.jsx)(y.A,{onClick:k,style:w?{pointerEvents:"none"}:void 0,children:v.Ay.translate("ConnectAnyway")})]})})},b=n(84849),S=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},x=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};!function(e){e.Admin="admin",e.Public="public",e.User="user",e.Wizard="wizard"}(r||(r={})),function(e){e.Home="/home",e.Login="/login",e.SelectServer="/selectserver",e.StartWizard="/wizard/start"}(i||(i={}));var w=[l.KN.ServerMismatch,l.KN.ServerUpdateNeeded,l.KN.Unavailable],P=function(e){return S(void 0,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return[4,fetch("".concat(e.serverAddress(),"/System/Info/Public"),{cache:"no-cache"})];case 1:if(!(t=n.sent()).ok)throw new Error("Public system info request failed");return[2,t.json()]}}))}))},k=function(e){var t=e.level,n=void 0===t?"user":t,u=(0,s.Zp)(),c=(0,s.zy)(),d=x((0,a.useState)(),2),f=d[0],p=d[1],m=x((0,a.useState)(!0),2),y=m[0],v=m[1],h=(0,a.useCallback)((function(e){c.pathname===e?v(!1):u(e)}),[c.pathname,u]),k=(0,a.useCallback)((function(e){return S(void 0,void 0,void 0,(function(){var t;return A(this,(function(n){switch(e.State){case l.KN.SignedIn:return console.debug("[ConnectionRequired] already logged in, redirecting to home"),u(i.Home),[2];case l.KN.ServerSignIn:return c.pathname===i.Login?v(!1):(console.debug("[ConnectionRequired] not logged in, redirecting to login page",c),t=encodeURIComponent(c.pathname+c.search),u("".concat(i.Login,"?serverid=").concat(e.ApiClient.serverId(),"&url=").concat(t))),[2];case l.KN.ServerSelection:return console.debug("[ConnectionRequired] redirecting to select server page"),h(i.SelectServer),[2]}return console.warn("[ConnectionRequired] unhandled connection state",e.State),[2]}))}))}),[h,c.pathname,u]),I=(0,a.useCallback)((function(e){return S(void 0,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(!(t=(null==e?void 0:e.ApiClient)||l.tF.currentApiClient()))throw new Error("No ApiClient available");return[4,P(t)];case 1:return(null==(n=r.sent())?void 0:n.StartupWizardCompleted)?(console.info("[ConnectionRequired] startup wizard is complete, redirecting home"),u(i.Home),[2]):(l.tF.setLocalApiClient(t),v(!1),[2])}}))}))}),[u]),j=(0,a.useCallback)((function(e){return S(void 0,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(e.State!==l.KN.ServerSignIn)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,P(e.ApiClient)];case 2:return(null==(t=r.sent())?void 0:t.StartupWizardCompleted)?[3,4]:(l.tF.setLocalApiClient(e.ApiClient),console.info("[ConnectionRequired] startup wizard is not complete, redirecting there"),u(i.StartWizard),[2]);case 3:return n=r.sent(),console.error("[ConnectionRequired] checking wizard status failed",n),[2];case 4:return k(e).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[2]}}))}))}),[k,u]),T=(0,a.useCallback)((function(){return S(void 0,void 0,void 0,(function(){var e,t,i,o,a,s,u;return A(this,(function(c){switch(c.label){case 0:if(e=l.tF.currentApiClient(),n!==r.Admin&&n!==r.User||(null==e?void 0:e.isLoggedIn()))return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),console.warn("[ConnectionRequired] unauthenticated user attempted to access user route"),t=k,[4,l.tF.connect()];case 2:return t.apply(void 0,[c.sent()]).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[3,4];case 3:return i=c.sent(),console.warn("[ConnectionRequired] error bouncing from user route",i),[3,4];case 4:return[2];case 5:if(n!==r.Admin)return[3,11];c.label=6;case 6:return c.trys.push([6,10,,11]),[4,null==e?void 0:e.getCurrentUser()];case 7:return o=c.sent(),(null===(u=null==o?void 0:o.Policy)||void 0===u?void 0:u.IsAdministrator)?[3,9]:(console.warn("[ConnectionRequired] normal user attempted to access admin route"),a=k,[4,l.tF.connect()]);case 8:return a.apply(void 0,[c.sent()]).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[2];case 9:return[3,11];case 10:return s=c.sent(),console.warn("[ConnectionRequired] error bouncing from admin route",s),[2];case 11:return v(!1),[2]}}))}))}),[k,n]);return(0,a.useEffect)((function(){var e=l.tF.currentApiClient();Promise.resolve(l.tF.firstConnection?null:l.tF.connect()).then((function(t){console.debug("[ConnectionRequired] connection state",null==t?void 0:t.State),l.tF.firstConnection=!0,w.includes(null==t?void 0:t.State)?p(t.State):n===r.Wizard?I(t).catch((function(e){console.error("[ConnectionRequired] could not validate wizard status",e)})):t&&t.State!==l.KN.SignedIn&&!(null==e?void 0:e.isLoggedIn())?j(t).catch((function(e){console.error("[ConnectionRequired] could not start wizard",e)})):T().catch((function(e){console.error("[ConnectionRequired] could not validate user access",e)}))})).catch((function(e){console.error("[ConnectionRequired] failed to connect",e)}))}),[j,I,n,T]),f?(0,o.jsx)(g,{state:f}):y?(0,o.jsx)(b.A,{}):(0,o.jsx)(s.sv,{})}},22622:function(e,t,n){"use strict";n.d(t,{g:function(){return P}}),n(14382),n(84734),n(44962),n(74576),n(78557),n(90076),n(45309),n(95021),n(73687),n(83994),n(93062),n(97747),n(23630),n(82367);var r=n(90381),i=n(34789),o=n(44797),a=n(58180),s=n(51876),l=n(5898),u=n(57634),c=n(97339),d={tizen:"Samsung Smart TV",web0s:"LG Smart TV",titanos:"Titan OS",operaTv:"Opera TV",xboxOne:"Xbox One",ps4:"Sony PS4",chrome:"Chrome",edgeChromium:"Edge Chromium",edge:"Edge",firefox:"Firefox",opera:"Opera",safari:"Safari"};function f(){if(!g){var e="_deviceId2";(g=r.A.get(e))||((t=[]).push(navigator.userAgent),t.push((new Date).getTime()),g=window.btoa?btoa(t.join("|")).replaceAll("=","1"):(new Date).getTime(),r.A.set(e,g))}var t;return g}function p(){if(b)return b;for(var e in b="Web Browser",d)if(i.A[e]){b=d[e];break}return i.A.ipad?b+=" iPad":i.A.iphone?b+=" iPhone":i.A.android&&(b+=" Android"),b}function m(){k&&(k=!1,o.A.trigger(P,"resume"))}function y(){k||(k=!0)}var v,h,g,b,S=(v=[],navigator.share&&v.push(c.Y.Sharing),i.A.edgeUwp||i.A.tv||i.A.xboxOne||i.A.ps4||v.push(c.Y.FileDownload),(i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s)&&v.push(c.Y.Exit),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.ps4||v.push(c.Y.ExternalLinks),(i.A.edgeUwp||i.A.tizen||i.A.web0s||i.A.orsay||i.A.operaTv||i.A.ps4||i.A.xboxOne||!i.A.mobile)&&(v.push(c.Y.HtmlAudioAutoplay),v.push(c.Y.HtmlVideoAutoplay)),function(){if(i.A.tv)return!1;var e=document.documentElement;return!!(e.requestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen||e.msRequestFullscreen||document.createElement("video").webkitEnterFullscreen)}()&&v.push(c.Y.Fullscreen),(i.A.tv||i.A.xboxOne||i.A.ps4||i.A.mobile||i.A.ipad)&&v.push(c.Y.PhysicalVolumeControl),i.A.tv||i.A.xboxOne||i.A.ps4||v.push(c.Y.RemoteControl),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.edgeUwp||v.push(c.Y.RemoteVideo),v.push(c.Y.DisplayLanguage),v.push(c.Y.DisplayMode),v.push(c.Y.TargetBlank),v.push(c.Y.Screensaver),s.$A().then((function(e){e&&v.push(c.Y.MultiServer)})),!i.A.orsay&&(i.A.firefox||i.A.ps4||i.A.edge||function(){try{var e=document.createElement("video"),t=document.createElement("style");t.textContent="video::cue {background: inherit}",document.body.appendChild(t),document.body.appendChild(e);var n=window.getComputedStyle(e,"::cue").background;return document.body.removeChild(t),document.body.removeChild(e),!!n.length}catch(e){return console.error("error detecting cue support: "+e),!1}}())&&v.push(c.Y.SubtitleAppearance),i.A.orsay||v.push(c.Y.SubtitleBurnIn),i.A.tv||i.A.ps4||i.A.xboxOne||v.push(c.Y.FileInput),(i.A.chrome||i.A.edgeChromium)&&v.push(c.Y.Chromecast),v);function A(){try{var e;null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.exit?window.NativeShell.AppHost.exit():i.A.tizen?tizen.application.getCurrentApplication().exit():i.A.web0s?webOS.platformBack():window.close()}catch(e){console.error("error closing application: "+e)}}var x,w,P={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(){alert("setWindowState is not supported and should not be called")},exit:function(){window.appMode&&i.A.tizen?h||n.e(62882).then(n.bind(n,62882)).then((function(e){h=e.show({title:l.Ay.translate("MessageConfirmAppExit"),items:[{id:"yes",name:l.Ay.translate("Yes")},{id:"no",name:l.Ay.translate("No")}]}).then((function(e){"yes"===e&&A()})).finally((function(){h=null}))})):A()},supports:function(e){return window.NativeShell?window.NativeShell.AppHost.supports(e):-1!==S.indexOf(e.toLowerCase())},preferVisualCards:i.A.android||i.A.chrome,getDefaultLayout:function(){return window.NativeShell?window.NativeShell.AppHost.getDefaultLayout():"desktop"},getDeviceProfile:function(e){return new Promise((function(t){var n,o;if(window.NativeShell)o=window.NativeShell.AppHost.getDeviceProfile(u.A,"10.11.2");else{var s=function(e){var t=[];return e&&a.JQ(e.RunTimeTicks,e.MediaType)&&(i.A.edge&&t.push("mp3"),i.A.edgeChromium||(t.push("ac3"),t.push("eac3")),i.A.chrome||i.A.edgeChromium||i.A.firefox||t.push("opus")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:t}}(e);o=(0,u.A)(s)}var l=r.A.maxVideoWidth(),c=l<0?null===(n=P.screen())||void 0===n?void 0:n.maxAllowedWidth:l;if(c){var d={Condition:"LessThanEqual",Property:"Width",Value:c.toString(),IsRequired:!1};r.A.limitSupportedVideoResolution()&&o.CodecProfiles.push({Type:"Video",Conditions:[d]}),o.TranscodingProfiles.forEach((function(e){"Video"===e.Type&&(e.Conditions=(e.Conditions||[]).filter((function(e){return"Width"!==e.Property})),e.Conditions.push(d))}))}var f=r.A.preferredTranscodeVideoCodec();f&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.VideoCodec.split(","),n=t.indexOf(f);-1!==n&&(t.splice(n,1),t.unshift(f),e.VideoCodec=t.join(","))}}));var p=r.A.preferredTranscodeVideoAudioCodec();p&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(","),n=t.indexOf(p);-1!==n&&(t.splice(n,1),t.unshift(p),e.AudioCodec=t.join(","))}})),t(o)}))},init:function(){return window.NativeShell?window.NativeShell.AppHost.init():{deviceId:f(),deviceName:p()}},deviceName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceName?window.NativeShell.AppHost.deviceName():p()},deviceId:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceId?window.NativeShell.AppHost.deviceId():f()},appName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appName?window.NativeShell.AppHost.appName():"Jellyfin Web"},appVersion:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appVersion?window.NativeShell.AppHost.appVersion():"10.11.2"},getPushTokenInfo:function(){return{}},setUserScalable:function(e){if(!i.A.tv){var t=e?"width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes":"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no";document.querySelector("meta[name=viewport]").setAttribute("content",t)}},screen:function(){var e,t=null,n=null===(e=window.NativeShell)||void 0===e?void 0:e.AppHost;return null!=n&&n.screen?t=n.screen():window.screen&&!i.A.tv&&(t={width:Math.floor(window.screen.width*window.devicePixelRatio),height:Math.floor(window.screen.height*window.devicePixelRatio)}),t&&(t.maxAllowedWidth=Math.max(t.width,t.height)),t}},k=!1;void 0!==document.hidden?(x="hidden",w="visibilitychange"):void 0!==document.webkitHidden&&(x="webkitHidden",w="webkitvisibilitychange"),document.addEventListener(w,(function(){document[x]?y():m()}),!1),window.addEventListener&&(window.addEventListener("focus",m),window.addEventListener("blur",y)),P.init()},23648:function(e,t,n){"use strict";n.d(t,{Hc:function(){return b}}),n(29305),n(32733),n(84701),n(2623),n(84734),n(44962),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(82367);var r=n(65369),i=n(11444),o=n(1164),a=n(86084),s=n(45251),l=n(53096),u=n(22622),c=n(97339),d=n(5898),f=n(67430),p=n(75384);function m(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return y(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(y(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,y(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,y(d,"constructor",u),y(u,"constructor",l),l.displayName="GeneratorFunction",y(u,i,"GeneratorFunction"),y(d),y(d,i,"Generator"),y(d,r,(function(){return this})),y(d,"toString",(function(){return"[object Generator]"})),(m=function(){return{w:o,m:f}})()}function y(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}y=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){y(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},y(e,t,n,r)}function v(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function h(e,t){var n=t.Type;return"UserRootFolder"!==n&&"UserView"!==n&&"Program"!==n&&"Timer"!==n&&"SeriesTimer"!==n&&("Recording"!==t.Type||"Completed"===t.Status)&&!g(t)&&e.Policy.IsAdministrator}function g(e){return(null==e?void 0:e.Id)&&"string"==typeof e.Id&&0===e.Id.indexOf("local")}function b(e,t){return S.apply(this,arguments)}function S(){var e;return e=m().m((function e(t,n){var r,i,o,a,s;return m().w((function(e){for(;;)switch(e.n){case 0:return r=f.tF.getApiClient(n.ServerId),i=(0,p.C)(r),e.p=1,e.n=2,(0,l.C)(i).getPlaylistUser({userId:t.Id,playlistId:n.Id});case 2:return o=e.v,a=o.data,e.a(2,!!a.CanEdit);case 3:return e.p=3,s=e.v,console.error("Failed to get playlist permissions",s),e.a(2,!1)}}),e,null,[[1,3]])})),S=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){v(o,r,i,a,s,"next",e)}function s(e){v(o,r,i,a,s,"throw",e)}a(void 0)}))},S.apply(this,arguments)}t.Ay={getDisplayName:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("null item passed into getDisplayName");"Timer"===e.Type&&(e=e.ProgramInfo||e);var n=("Program"!==e.Type&&"Recording"!==e.Type||!e.IsSeries&&!e.EpisodeTitle?e.Name:e.EpisodeTitle)||"";if("TvChannel"===e.Type)return e.ChannelNumber?e.ChannelNumber+" "+n:n;if("Episode"===e.Type&&0===e.ParentIndexNumber)n=d.Ay.translate("ValueSpecialEpisodeName",n);else if(("Episode"===e.Type||"Program"===e.Type||"Recording"===e.Type)&&null!=e.IndexNumber&&null!=e.ParentIndexNumber&&!1!==t.includeIndexNumber){var r=e.IndexNumber,i=r,o=" - ";!1!==t.includeParentInfo?i="S"+e.ParentIndexNumber+":E"+i:o=". ",e.IndexNumberEnd&&(i+="-"+(r=e.IndexNumberEnd)),i&&(n=n?i+o+n:i)}return n},supportsAddingToCollection:function(e){return!("Recording"===e.Type&&"Completed"!==e.Status||e.CollectionType||-1!==["Genre","MusicGenre","Studio","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"].indexOf(e.Type)||"Photo"===e.MediaType||g(e))},supportsAddingToPlaylist:function(e){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"Photo"!==e.MediaType&&("Recording"!==e.Type||"Completed"===e.Status)&&!g(e)&&e.CollectionType!==r.X.Livetv&&(e.MediaType||e.IsFolder||"Genre"===e.Type||"MusicGenre"===e.Type||"MusicArtist"===e.Type)},isLocalItem:g,canIdentify:function(e,t){var n=t.Type;return("Movie"===n||"Trailer"===n||"Series"===n||"BoxSet"===n||"Person"===n||"Book"===n||"MusicAlbum"===n||"MusicArtist"===n||"MusicVideo"===n)&&e.Policy.IsAdministrator&&!g(t)},canEdit:h,canEditImages:function(e,t){var n=t.Type;return"Photo"!==t.MediaType&&("UserView"===n?!!e.Policy.IsAdministrator:("Recording"!==t.Type||"Completed"===t.Status)&&"Timer"!==n&&"SeriesTimer"!==n&&h(e,t)&&!g(t))},canEditSubtitles:function(e,t){if(t.MediaType!==s.z.Video)return!1;var n=t.Type;return(n!==i.D.Recording||t.Status===a.k.Completed)&&n!==i.D.TvChannel&&n!==i.D.Program&&"Timer"!==n&&"SeriesTimer"!==n&&n!==i.D.UserRootFolder&&n!==i.D.UserView&&!g(t)&&t.LocationType!==o.i.Virtual&&(e.Policy.EnableSubtitleManagement||e.Policy.IsAdministrator)},canEditLyrics:function(e,t){return t.MediaType===s.z.Audio&&!g(t)&&e.Policy.IsAdministrator},canShare:function(e,t){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&("Recording"!==e.Type||"Completed"===e.Status)&&!g(e)&&t.Policy.EnablePublicSharing&&u.g.supports(c.Y.Sharing)},enableDateAddedDisplay:function(e){return!e.IsFolder&&e.MediaType&&"Program"!==e.Type&&"TvChannel"!==e.Type&&"Trailer"!==e.Type},canMarkPlayed:function(e){if("Program"===e.Type)return!1;if("Video"===e.MediaType){if("TvChannel"!==e.Type)return!0}else if("Audio"===e.MediaType){if("AudioPodcast"===e.Type)return!0;if("AudioBook"===e.Type)return!0}return"Series"===e.Type||"Season"===e.Type||"BoxSet"===e.Type||"Book"===e.MediaType||"Recording"===e.MediaType},canRate:function(e){return"Program"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"CollectionFolder"!==e.Type&&"UserView"!==e.Type&&"Channel"!==e.Type&&e.UserData},canConvert:function(e,t){if(!t.Policy.EnableMediaConversion)return!1;if(g(e))return!1;var n=e.MediaType;if("Book"===n||"Photo"===n||"Audio"===n)return!1;if(e.CollectionType===r.X.Livetv)return!1;var i=e.Type;return!("Channel"===i||"Person"===i||"Year"===i||"Program"===i||"Timer"===i||"SeriesTimer"===i||"Virtual"===e.LocationType&&!e.IsFolder||e.IsPlaceHolder)},canRefreshMetadata:function(e,t){return!!t.Policy.IsAdministrator&&e.CollectionType!==r.X.Livetv&&!("Timer"===e.Type||"SeriesTimer"===e.Type||"Program"===e.Type||"TvChannel"===e.Type||"Recording"===e.Type&&"Completed"!==e.Status||g(e))},supportsMediaSourceSelection:function(e){return"Video"===e.MediaType&&"TvChannel"!==e.Type&&!(!e.MediaSources||1===e.MediaSources.length&&"Placeholder"===e.MediaSources[0].Type)&&(null!=e.EnableMediaSourceDisplay?!!e.EnableMediaSourceDisplay:!e.SourceType||"Library"===e.SourceType)},sortTracks:function(e,t){var n=e.IsExternal-t.IsExternal;return 0!=n||0!=(n=t.IsForced-e.IsForced)||0!=(n=t.IsDefault-e.IsDefault)?n:e.Index-t.Index}}},24639:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(2623),n(24776),n(14382),n(44962),n(86584),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(64062),n(23630),n(82367),n(21973),n(63960),n(63855),n(75507),n(86684),n(91315),n(74288),n(36956),n(63220),n(90883),n(79909),n(69785),n(45958),n(79237),n(29379),n(39603),n(82118),n(84238);var r=n(63696),i=n(7470),o=n(67430),a=n(22622),s=n(84069),l=n(8566),u=n(38829),c=n(70267),d=n(97339),f=n(5898),p=["af","ar","be-by","bg-bg","bn_bd","ca","cs","cy","da","de","el","en-gb","en-us","eo","es","es_419","es-ar","es_do","es-mx","et","eu","fa","fi","fil","fr","fr-ca","gl","gsw","he","hi-in","hr","hu","id","it","ja","kk","ko","lt-lt","lv","mr","ms","nb","nl","nn","pl","pr","pt","pt-br","pt-pt","ro","ru","sk","sl-si","sq","sv","ta","th","tr","uk","ur_pk","vi","zh-cn","zh-hk","zh-tw"].map((function(e){return{lang:e,path:"".concat(e,".json")}})),m=n(83237),y=n(34789),v=n(74550),h=n(51876),g=n(54048),b=n(89100),S=n(44797),A=n(62540),x=n(9790),w=n(84757),P=n(69410),k=n(28626),I=n(60182),j=n(31297),T=n(87003),C=window.Proxy&&!y.A.tv,E=function(){return(0,A.jsxs)(x.Ht,{client:j.q,children:[(0,A.jsx)(P.Kv,{children:(0,A.jsx)(k.w,{children:(0,A.jsx)(I.AQ,{children:(0,A.jsx)(T.A,{})})})}),C&&(0,A.jsx)(w.E,{initialIsOpen:!1})]})},_=(n(10353),n(66911)),L=n(75384),M=n(39738);document.addEventListener("viewshow",(function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.params)||{},r=n.serverId,i=n.id;r&&i&&function(e,t){var n,r,i,a;n=this,r=void 0,a=function(){var n,r,i,a,s,l;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(u){switch(u.label){case 0:if(!M.f.enableDisplayMirroring())return[3,4];if(!(n=M.f.getPlayerInfo())||n.isLocalPlayer||-1===n.supportedCommands.indexOf("DisplayContent"))return[3,4];r=o.tF.getApiClient(e),i=(0,L.C)(r),a=r.getCurrentUserId(),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,j.q.fetchQuery((0,_.I)(i,t,a))];case 2:return s=u.sent(),M.f.displayContent({ItemName:s.Name,ItemId:s.Id,ItemType:s.Type},M.f.getCurrentPlayer()),[3,4];case 3:return l=u.sent(),console.error("[DisplayMirrorManager] failed to mirror item",l),[3,4];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(e,t){function o(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(o,s)}l((a=a.apply(n,r||[])).next())}))}(r,i)})),n(86663),n(76281),n(84734),n(99425);var O,R=n(77612),D=n(45251),N=n(71857),F=n(82885),U=n(58961);function V(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return B(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(B(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,B(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,B(d,"constructor",u),B(u,"constructor",l),l.displayName="GeneratorFunction",B(u,i,"GeneratorFunction"),B(d),B(d,i,"Generator"),B(d,r,(function(){return this})),B(d,"toString",(function(){return"[object Generator]"})),(V=function(){return{w:o,m:f}})()}function B(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}B=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){B(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},B(e,t,n,r)}function z(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}var q=[];function H(e,t){var n=e.filter((function(e){return e.MediaType===D.z.Video?F.currentSettings.enableThemeVideos():F.currentSettings.enableThemeSongs()}));if(n.length){if(!O&&M.f.isPlaying())return;q=n.map((function(e){return e.Id})),n.forEach((function(e){e.playOptions={fullscreen:!1,enableRemotePlayers:!1}})),M.f.play({items:n,aspectRatio:"cover",fullscreen:!1,enableRemotePlayers:!1}).then((function(){O=t}))}else G()}function G(){O&&M.f.stop(),O=null}var W=[U.u.CollectionFolder,U.u.UserView,U.u.Person,U.u.Program,U.u.TvChannel,U.u.Channel,U.u.SeriesTimer];function Y(){var e;return e=V().m((function e(t,n){var r,i,a,s,l,u,c,d,f;return V().w((function(e){for(;;)switch(e.n){case 0:return r=o.tF.getApiClient(t),i=(0,L.C)(r),a=r.getCurrentUserId(),e.p=1,e.n=2,j.q.fetchQuery((0,_.I)(i,n,a));case 2:if(!(l=e.v).CollectionType){e.n=3;break}return G(),e.a(2);case 3:if(!W.includes(l.Type)){e.n=4;break}return G(),e.a(2);case 4:return e.n=5,(0,N.Q)(i).getThemeMedia({userId:a,itemId:l.Id,inheritFromParent:!0,sortBy:[R.B.Random]});case 5:u=e.v,c=u.data,(d=F.currentSettings.enableThemeVideos()&&null!==(s=c.ThemeVideosResult)&&void 0!==s&&null!==(s=s.Items)&&void 0!==s&&s.length?c.ThemeVideosResult:c.ThemeSongsResult).OwnerId!==O&&H(d.Items,d.OwnerId),e.n=7;break;case 6:e.p=6,f=e.v,console.error("[ThemeMediaPlayer] failed to load theme media",f);case 7:return e.a(2)}}),e,null,[[1,6]])})),Y=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){z(o,r,i,a,s,"next",e)}function s(e){z(o,r,i,a,s,"throw",e)}a(void 0)}))},Y.apply(this,arguments)}document.addEventListener("viewshow",(function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.params)||{},r=n.serverId,i=n.id;r&&i?function(e,t){Y.apply(this,arguments)}(r,i):(e.detail.options||{}).supportsThemeMedia||H([],null)}),!0),S.A.on(M.f,"playbackstart",(function(e,t){var n=M.f.currentItem(t);-1==q.indexOf(n.Id)&&(O=null)}));var Q=n(39641);Q.A.setTheme(F.theme()).then((function(){return document.body.classList.add("force-scroll")})),S.A.on(o.tF,"localusersignedin",(function(){Q.A.setTheme(F.theme())})),(0,b.pageClassOn)("viewbeforeshow","page",(function(){this.classList.contains("type-interior")?Q.A.setTheme(F.dashboardTheme()):Q.A.setTheme(F.theme())})),n(40787),n(69892),n(89336),n(95021),n(73687);var K=n(38783),J=n(38490);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $(){return 1e3*F.screensaverTime()}var Z=0;function ee(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return te(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(te(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,te(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,te(d,"constructor",u),te(u,"constructor",l),l.displayName="GeneratorFunction",te(u,i,"GeneratorFunction"),te(d),te(d,i,"Generator"),te(d,r,(function(){return this})),te(d,"toString",(function(){return"[object Generator]"})),(ee=function(){return{w:o,m:f}})()}function te(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}te=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){te(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},te(e,t,n,r)}function ne(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function re(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ne(o,r,i,a,s,"next",e)}function s(e){ne(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ie(){return(ie=re(ee().m((function e(){var t;return ee().w((function(e){for(;;)switch(e.n){case 0:return console.info("[".concat("jellyfin-web","]\nversion: ").concat("10.11.2","\ncommit: ").concat("933e1b255","\nbuild: ").concat("Release")),window.Events=S.A,window.TaskButton=g.A,(0,b.pageClassOn)("viewshow","standalonePage",(function(){document.querySelector(".skinHeader").classList.add("noHeaderRight")})),(0,b.pageClassOn)("viewhide","standalonePage",(function(){document.querySelector(".skinHeader").classList.remove("noHeaderRight")})),e.n=1,(0,b.serverAddress)();case 1:return(t=e.v)&&o.tF.initApiClient(t),(0,m.n_)(),e.n=2,f.Ay.defaultModule("core"),f.Ay.loadStrings({name:"core",translations:p});case 2:return S.A.on(o.tF,"localusersignedin",f.Ay.updateCurrentCulture),S.A.on(o.tF,"localusersignedout",f.Ay.updateCurrentCulture),y.A.tv&&!y.A.android?(console.debug("using system fonts with explicit sizes"),n.e(84501).then(n.bind(n,84501))):(console.debug("using system fonts"),n.e(25348).then(n.bind(n,25348))),y.A.iOS&&n.e(66923).then(n.bind(n,66923)),e.n=3,oe();case 3:return S.A.on(a.g,"resume",(function(){var e;null===(e=o.tF.currentApiClient())||void 0===e||e.ensureWebSocket()})),o.tF.getApiClients().forEach((function(e){S.A.off(e,"requestfail",c.appRouter.onRequestFail),S.A.on(e,"requestfail",c.appRouter.onRequestFail)})),S.A.on(o.tF,"apiclientcreated",(function(e,t){S.A.off(t,"requestfail",c.appRouter.onRequestFail),S.A.on(t,"requestfail",c.appRouter.onRequestFail)})),e.n=4,se();case 4:y.A.tv||y.A.xboxOne||y.A.ps4||Promise.all([n.e(12011),n.e(55802),n.e(57949),n.e(14245)]).then(n.bind(n,35300)),a.g.supports(d.Y.RemoteControl)&&(Promise.resolve().then(n.bind(n,86663)),n.e(28567).then(n.bind(n,28567))),a.g.supports(d.Y.PhysicalVolumeControl)&&!y.A.touch||n.e(91737).then(n.bind(n,91737)),y.A.tv||y.A.xboxOne||(n.e(22424).then(n.bind(n,22424)),navigator.serviceWorker&&"cordova"!==window.appMode&&"android"!==window.appMode?navigator.serviceWorker.register("serviceworker.js").then((function(){return console.log("serviceWorker registered")})).catch((function(e){return console.log("error registering serviceWorker: "+e)})):console.warn("serviceWorker unsupported"),window.Notification&&n.e(44184).then(n.bind(n,78983))),v.Ay.enable(),s.default.enable();case 5:return e.a(2)}}),e)})))).apply(this,arguments)}function oe(){return ae.apply(this,arguments)}function ae(){return(ae=re(ee().m((function e(){var t,n;return ee().w((function(e){for(;;)switch(e.n){case 0:return console.groupCollapsed("loading installed plugins"),console.dir(u.X),e.n=1,(0,h.xy)();case 1:return t=e.v,a.g.supports(d.Y.RemoteControl)?y.A.chrome||y.A.edgeChromium||y.A.opera||(t=t.filter((function(e){return!e.startsWith("chromecastPlayer")}))):t=t.filter((function(e){return!e.startsWith("sessionPlayer")&&!e.startsWith("chromecastPlayer")})),window.NativeShell&&(t=t.concat(window.NativeShell.getPlugins())),e.p=2,e.n=3,Promise.all(t.map((function(e){return u.X.loadPlugin(e)})));case 3:console.debug("finished loading plugins"),e.n=5;break;case 4:e.p=4,n=e.v,console.warn("failed loading plugins",n);case 5:console.groupEnd("loading installed plugins");case 6:return e.a(2)}}),e,null,[[2,4]])})))).apply(this,arguments)}function se(){return le.apply(this,arguments)}function le(){return(le=re(ee().m((function e(){var t;return ee().w((function(e){for(;;)switch(e.n){case 0:(t=document.getElementById("reactRoot")).innerHTML="",l.Ay.show(),(0,i.H)(t).render(r.createElement(E,null));case 1:return e.a(2)}}),e)})))).apply(this,arguments)}S.A.on(M.f,"playbackstop",(function(e,t){var n=t.state;n.NowPlayingItem&&"Video"==n.NowPlayingItem.MediaType&&(Z=(new Date).getTime())})),new function(){var e,t=this;function n(){e&&(console.debug("Hiding screensaver"),e.hide().then((function(){document.body.classList.remove("screensaver-noScroll")})),e=null),window.removeEventListener("click",n,!0),window.removeEventListener("mousemove",n,!0),window.removeEventListener("keydown",n,!0)}this.isShowing=function(){return null!=e},this.show=function(){var t,r=o.tF.currentApiClient();null!=r&&r.isLoggedIn()&&(t=!0);var i=function(e){var t;try{t=F.get("screensaver",!1)}catch(n){t=e?"backdropscreensaver":"logoscreensaver"}var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return X(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(u.X.ofType(K.Q.Screensaver));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.id===t)return i}}catch(e){r.e(e)}finally{r.f()}return null}(t);i&&function(t){if(e)throw new Error("An existing screensaver is already active.");console.debug("Showing screensaver "+t.name),document.body.classList.add("screensaver-noScroll"),t.show(),e=t,!1!==t.hideOnClick&&window.addEventListener("click",n,!0),!1!==t.hideOnMouse&&window.addEventListener("mousemove",n,!0),!1!==t.hideOnKey&&window.addEventListener("keydown",n,!0)}(i)},this.hide=function(){n()},setInterval((function(){t.isShowing()||J.default.idleTime()<$()||(new Date).getTime()-Z<$()||M.f.isPlayingVideo()&&!M.f.paused()||t.show()}),5e3)},n(10736),function(){ie.apply(this,arguments)}()},24786:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return r.ASYNC_USER_ROUTES}});var r=n(21643)},27570:function(e,t,n){var r={"./_lib/buildFormatLongFn/index.js":[37658,7,37658],"./_lib/buildLocalizeFn/index.js":[94160,7,94160],"./_lib/buildMatchFn/index.js":[7184,7,7184],"./_lib/buildMatchPatternFn/index.js":[83518,7,83518],"./af/_lib/formatDistance/index.js":[82393,7,82393],"./af/_lib/formatLong/index.js":[70356,7,70356],"./af/_lib/formatRelative/index.js":[62654,7,62654],"./af/_lib/localize/index.js":[79870,7,79870],"./af/_lib/match/index.js":[25242,7,25242],"./af/index.js":[53687,7,53687],"./ar-DZ/_lib/formatDistance/index.js":[31402,7,31402],"./ar-DZ/_lib/formatLong/index.js":[42635,7,42635],"./ar-DZ/_lib/formatRelative/index.js":[79657,7,79657],"./ar-DZ/_lib/localize/index.js":[6753,7,6753],"./ar-DZ/_lib/match/index.js":[61695,7,61695],"./ar-DZ/index.js":[5692,7,5692],"./ar-EG/_lib/formatDistance/index.js":[92364,7,92364],"./ar-EG/_lib/formatLong/index.js":[45101,7,45101],"./ar-EG/_lib/formatRelative/index.js":[59871,7,59871],"./ar-EG/_lib/localize/index.js":[73775,7,73775],"./ar-EG/_lib/match/index.js":[73073,7,73073],"./ar-EG/index.js":[77350,7,77350],"./ar-MA/_lib/formatDistance/index.js":[25742,7,25742],"./ar-MA/_lib/formatLong/index.js":[53823,7,53823],"./ar-MA/_lib/formatRelative/index.js":[83461,7,83461],"./ar-MA/_lib/localize/index.js":[63525,7,63525],"./ar-MA/_lib/match/index.js":[66955,7,66955],"./ar-MA/index.js":[33792,7,33792],"./ar-SA/_lib/formatDistance/index.js":[69260,7,69260],"./ar-SA/_lib/formatLong/index.js":[12557,7,12557],"./ar-SA/_lib/formatRelative/index.js":[41247,7,41247],"./ar-SA/_lib/localize/index.js":[67503,7,67503],"./ar-SA/_lib/match/index.js":[32689,7,32689],"./ar-SA/index.js":[39718,7,39718],"./ar-TN/_lib/formatDistance/index.js":[32894,7,32894],"./ar-TN/_lib/formatLong/index.js":[93551,7,93551],"./ar-TN/_lib/formatRelative/index.js":[51797,7,51797],"./ar-TN/_lib/localize/index.js":[73653,7,73653],"./ar-TN/_lib/match/index.js":[1051,7,1051],"./ar-TN/index.js":[80144,7,80144],"./ar/_lib/formatDistance/index.js":[8117,7,8117],"./ar/_lib/formatLong/index.js":[4800,7,4800],"./ar/_lib/formatRelative/index.js":[37202,7,37202],"./ar/_lib/localize/index.js":[83370,7,83370],"./ar/_lib/match/index.js":[34286,7,34286],"./ar/index.js":[91763,7,91763],"./az/_lib/formatDistance/index.js":[653,7,653],"./az/_lib/formatLong/index.js":[83208,7,83208],"./az/_lib/formatRelative/index.js":[80106,7,80106],"./az/_lib/localize/index.js":[85234,7,85234],"./az/_lib/match/index.js":[15190,7,15190],"./az/index.js":[13115,7,13115],"./be-tarask/_lib/formatDistance/index.js":[6646,7,40085,22063],"./be-tarask/_lib/formatLong/index.js":[79735,7,40085,95105],"./be-tarask/_lib/formatRelative/index.js":[8013,7,90609,52154,43509,22252,40085,7256,81682,44444],"./be-tarask/_lib/localize/index.js":[45821,7,40085,19863],"./be-tarask/_lib/match/index.js":[19363,7,40085,27046],"./be-tarask/index.js":[87096,7,90609,52154,43509,22252,40085,7256,81682,77301],"./be/_lib/formatDistance/index.js":[76463,7,94388,99682],"./be/_lib/formatLong/index.js":[24218,7,94388,17486],"./be/_lib/formatRelative/index.js":[65088,7,90609,52154,43509,22252,94388,7256,81682,11587],"./be/_lib/localize/index.js":[68160,7,94388,42244],"./be/_lib/match/index.js":[38504,7,94388,4665],"./be/index.js":[52469,7,90609,52154,43509,22252,94388,7256,81682,33968],"./bg/_lib/formatDistance/index.js":[36117,7,36117],"./bg/_lib/formatLong/index.js":[62368,7,62368],"./bg/_lib/formatRelative/index.js":[65202,7,90609,65202],"./bg/_lib/localize/index.js":[91786,7,91786],"./bg/_lib/match/index.js":[7662,7,7662],"./bg/index.js":[86707,7,90609,86707],"./bn/_lib/formatDistance/index.js":[14866,7,14866],"./bn/_lib/formatLong/index.js":[6339,7,6339],"./bn/_lib/formatRelative/index.js":[97073,7,97073],"./bn/_lib/localize/index.js":[82681,9,82681],"./bn/_lib/match/index.js":[76068,7,76068],"./bn/index.js":[22356,7,22356],"./bs/_lib/formatDistance/index.js":[10393,7,10393],"./bs/_lib/formatLong/index.js":[27924,7,27924],"./bs/_lib/formatRelative/index.js":[7006,7,7006],"./bs/_lib/localize/index.js":[71934,7,71934],"./bs/_lib/match/index.js":[98618,7,98618],"./bs/index.js":[48631,7,48631],"./ca/_lib/formatDistance/index.js":[242,7,242],"./ca/_lib/formatLong/index.js":[95171,7,95171],"./ca/_lib/formatRelative/index.js":[80625,7,80625],"./ca/_lib/localize/index.js":[41241,7,41241],"./ca/_lib/match/index.js":[24855,7,24855],"./ca/index.js":[29108,7,29108],"./cs/_lib/formatDistance/index.js":[49516,7,49516],"./cs/_lib/formatLong/index.js":[96077,7,96077],"./cs/_lib/formatRelative/index.js":[54847,7,54847],"./cs/_lib/localize/index.js":[72143,7,72143],"./cs/_lib/match/index.js":[35601,7,35601],"./cs/index.js":[92102,7,92102],"./cy/_lib/formatDistance/index.js":[53610,7,53610],"./cy/_lib/formatLong/index.js":[17355,7,17355],"./cy/_lib/formatRelative/index.js":[30121,7,30121],"./cy/_lib/localize/index.js":[59553,7,59553],"./cy/_lib/match/index.js":[64671,7,64671],"./cy/index.js":[12060,7,12060],"./da/_lib/formatDistance/index.js":[25137,7,25137],"./da/_lib/formatLong/index.js":[26908,7,26908],"./da/_lib/formatRelative/index.js":[16566,7,16566],"./da/_lib/localize/index.js":[41286,7,41286],"./da/_lib/match/index.js":[38082,7,38082],"./da/index.js":[60607,7,60607],"./de-AT/_lib/localize/index.js":[64790,7,64790],"./de-AT/index.js":[24879,7,24879],"./de/_lib/formatDistance/index.js":[37821,7,37821],"./de/_lib/formatLong/index.js":[74776,7,74776],"./de/_lib/formatRelative/index.js":[99994,7,77613],"./de/_lib/localize/index.js":[87074,7,87074],"./de/_lib/match/index.js":[67942,7,67942],"./de/index.js":[78283,7,78283],"./el/_lib/formatDistance/index.js":[89903,7,89903],"./el/_lib/formatLong/index.js":[47066,7,47066],"./el/_lib/formatRelative/index.js":[53408,7,53408],"./el/_lib/localize/index.js":[6368,7,6368],"./el/_lib/match/index.js":[17864,7,17864],"./el/index.js":[88981,7,88981],"./en-AU/_lib/formatLong/index.js":[42351,7,42351],"./en-AU/index.js":[44336,7,44336],"./en-CA/_lib/formatDistance/index.js":[19292,7,19292],"./en-CA/_lib/formatLong/index.js":[37117,7,37117],"./en-CA/index.js":[59670,7,59670],"./en-GB/_lib/formatLong/index.js":[35172,7,35172],"./en-GB/index.js":[15015,7,15015],"./en-IE/index.js":[81992,7,81992],"./en-IN/_lib/formatLong/index.js":[65470,7,65470],"./en-IN/index.js":[30745,7,30745],"./en-NZ/_lib/formatLong/index.js":[37625,7,37625],"./en-NZ/index.js":[36962,7,36962],"./en-US/_lib/formatDistance/index.js":[39232,7,39232],"./en-US/_lib/formatLong/index.js":[40465,7,40465],"./en-US/_lib/formatRelative/index.js":[18395,7,18395],"./en-US/_lib/localize/index.js":[48979,7,48979],"./en-US/_lib/match/index.js":[68413,7,68413],"./en-US/index.js":[59258,7,59258],"./en-ZA/_lib/formatLong/index.js":[51664,7,51664],"./en-ZA/index.js":[83619,7,83619],"./eo/_lib/formatDistance/index.js":[59290,7,59290],"./eo/_lib/formatLong/index.js":[87803,7,87803],"./eo/_lib/formatRelative/index.js":[97689,7,97689],"./eo/_lib/localize/index.js":[72241,7,72241],"./eo/_lib/match/index.js":[47279,7,47279],"./eo/index.js":[26668,7,26668],"./es/_lib/formatDistance/index.js":[88918,7,88918],"./es/_lib/formatLong/index.js":[44119,7,44119],"./es/_lib/formatRelative/index.js":[90285,7,90285],"./es/_lib/localize/index.js":[59498,7,59498],"./es/_lib/match/index.js":[47203,7,47203],"./es/index.js":[95992,7,95992],"./et/_lib/formatDistance/index.js":[10455,7,10455],"./et/_lib/formatLong/index.js":[40946,7,40946],"./et/_lib/formatRelative/index.js":[98216,7,98216],"./et/_lib/localize/index.js":[54552,7,54552],"./et/_lib/match/index.js":[32896,7,32896],"./et/index.js":[65005,7,65005],"./eu/_lib/formatDistance/index.js":[90156,7,90156],"./eu/_lib/formatLong/index.js":[25709,7,25709],"./eu/_lib/formatRelative/index.js":[57663,7,57663],"./eu/_lib/localize/index.js":[89775,7,89775],"./eu/_lib/match/index.js":[2782,7,80401],"./eu/index.js":[16614,7,16614],"./fa-IR/_lib/formatDistance/index.js":[8833,7,8833],"./fa-IR/_lib/formatLong/index.js":[83116,7,83116],"./fa-IR/_lib/formatRelative/index.js":[52294,7,52294],"./fa-IR/_lib/localize/index.js":[28982,7,28982],"./fa-IR/_lib/match/index.js":[54738,7,54738],"./fa-IR/index.js":[12143,7,12143],"./fi/_lib/formatDistance/index.js":[40247,7,40247],"./fi/_lib/formatLong/index.js":[6546,7,6546],"./fi/_lib/formatRelative/index.js":[75336,7,75336],"./fi/_lib/localize/index.js":[47352,7,47352],"./fi/_lib/match/index.js":[65312,7,65312],"./fi/index.js":[56941,7,56941],"./fr-CA/_lib/formatLong/index.js":[66124,7,66124],"./fr-CA/index.js":[70831,7,70831],"./fr-CH/_lib/formatLong/index.js":[93855,7,93855],"./fr-CH/_lib/formatRelative/index.js":[46629,7,46629],"./fr-CH/index.js":[68448,7,68448],"./fr/_lib/formatDistance/index.js":[90810,7,90810],"./fr/_lib/formatLong/index.js":[77499,7,77499],"./fr/_lib/formatRelative/index.js":[14553,7,14553],"./fr/_lib/localize/index.js":[73041,7,73041],"./fr/_lib/match/index.js":[59631,7,59631],"./fr/index.js":[83756,7,83756],"./fy/_lib/formatDistance/index.js":[84903,7,84903],"./fy/_lib/formatLong/index.js":[5218,7,5218],"./fy/_lib/formatRelative/index.js":[44574,7,89336],"./fy/_lib/localize/index.js":[3080,7,3080],"./fy/_lib/match/index.js":[50352,7,50352],"./fy/index.js":[45085,7,45085],"./gd/_lib/formatDistance/index.js":[9205,7,9205],"./gd/_lib/formatLong/index.js":[14112,7,14112],"./gd/_lib/formatRelative/index.js":[35090,7,35090],"./gd/_lib/localize/index.js":[44426,7,44426],"./gd/_lib/match/index.js":[60910,7,60910],"./gd/index.js":[84019,7,84019],"./gl/_lib/formatDistance/index.js":[34157,7,34157],"./gl/_lib/formatLong/index.js":[24872,7,24872],"./gl/_lib/formatRelative/index.js":[56778,7,56778],"./gl/_lib/localize/index.js":[70546,7,70546],"./gl/_lib/match/index.js":[52470,7,52470],"./gl/index.js":[78651,7,78651],"./gu/_lib/formatDistance/index.js":[26954,7,26954],"./gu/_lib/formatLong/index.js":[16235,7,16235],"./gu/_lib/formatRelative/index.js":[75209,7,75209],"./gu/_lib/localize/index.js":[88449,7,88449],"./gu/_lib/match/index.js":[57407,7,57407],"./gu/index.js":[76476,7,76476],"./he/_lib/formatDistance/index.js":[42033,7,42033],"./he/_lib/formatLong/index.js":[25148,7,25148],"./he/_lib/formatRelative/index.js":[46902,7,46902],"./he/_lib/localize/index.js":[49702,7,49702],"./he/_lib/match/index.js":[25890,7,25890],"./he/index.js":[71103,7,71103],"./hi/_lib/formatDistance/index.js":[29477,7,29477],"./hi/_lib/formatLong/index.js":[28048,7,28048],"./hi/_lib/formatRelative/index.js":[70242,7,70242],"./hi/_lib/localize/index.js":[49882,9,49882],"./hi/_lib/match/index.js":[8734,7,8734],"./hi/index.js":[59459,7,59459],"./hr/_lib/formatDistance/index.js":[8892,7,8892],"./hr/_lib/formatLong/index.js":[59613,7,59613],"./hr/_lib/formatRelative/index.js":[13231,7,13231],"./hr/_lib/localize/index.js":[56127,7,56127],"./hr/_lib/match/index.js":[68385,7,68385],"./hr/index.js":[42870,7,42870],"./ht/_lib/formatDistance/index.js":[13734,7,13734],"./ht/_lib/formatLong/index.js":[85447,7,85447],"./ht/_lib/formatRelative/index.js":[31421,7,31421],"./ht/_lib/localize/index.js":[685,7,685],"./ht/_lib/match/index.js":[80083,7,80083],"./ht/index.js":[7720,7,7720],"./hu/_lib/formatDistance/index.js":[63585,7,63585],"./hu/_lib/formatLong/index.js":[83180,7,83180],"./hu/_lib/formatRelative/index.js":[7046,7,7046],"./hu/_lib/localize/index.js":[28662,7,28662],"./hu/_lib/match/index.js":[22770,7,22770],"./hu/index.js":[31759,7,31759],"./hy/_lib/formatDistance/index.js":[30869,7,30869],"./hy/_lib/formatLong/index.js":[26368,7,26368],"./hy/_lib/formatRelative/index.js":[56754,7,56754],"./hy/_lib/localize/index.js":[37290,7,37290],"./hy/_lib/match/index.js":[91054,7,91054],"./hy/index.js":[17427,7,17427],"./id/_lib/formatDistance/index.js":[49771,7,49771],"./id/_lib/formatLong/index.js":[72422,7,72422],"./id/_lib/formatRelative/index.js":[91684,7,91684],"./id/_lib/localize/index.js":[6140,7,6140],"./id/_lib/match/index.js":[78588,7,78588],"./id/index.js":[26273,7,26273],"./is/_lib/formatDistance/index.js":[44418,7,44418],"./is/_lib/formatLong/index.js":[82067,7,82067],"./is/_lib/formatRelative/index.js":[76059,7,31297],"./is/_lib/localize/index.js":[4969,7,4969],"./is/_lib/match/index.js":[91719,7,91719],"./is/index.js":[56068,7,56068],"./it-CH/_lib/formatLong/index.js":[40592,7,40592],"./it-CH/index.js":[61027,7,90609,15686],"./it/_lib/formatDistance/index.js":[59867,7,59867],"./it/_lib/formatLong/index.js":[95926,7,95926],"./it/_lib/formatRelative/index.js":[20404,7,90609,45315],"./it/_lib/localize/index.js":[13356,7,13356],"./it/_lib/match/index.js":[10092,7,10092],"./it/index.js":[95697,7,90609,89268],"./ja-Hira/_lib/formatDistance/index.js":[9684,7,9684],"./ja-Hira/_lib/formatLong/index.js":[36293,7,36293],"./ja-Hira/_lib/formatRelative/index.js":[94247,7,94247],"./ja-Hira/_lib/localize/index.js":[88711,7,88711],"./ja-Hira/_lib/match/index.js":[87241,7,87241],"./ja-Hira/index.js":[81790,7,81790],"./ja/_lib/formatDistance/index.js":[91163,7,91163],"./ja/_lib/formatLong/index.js":[45654,7,45654],"./ja/_lib/formatRelative/index.js":[77236,7,77236],"./ja/_lib/localize/index.js":[10540,7,10540],"./ja/_lib/match/index.js":[4588,7,4588],"./ja/index.js":[56785,7,56785],"./ka/_lib/formatDistance/index.js":[52154,7,29773],"./ka/_lib/formatLong/index.js":[29083,7,29083],"./ka/_lib/formatRelative/index.js":[62265,7,62265],"./ka/_lib/localize/index.js":[12849,7,12849],"./ka/_lib/match/index.js":[99932,7,77551],"./ka/index.js":[6828,7,6828],"./kk/_lib/formatDistance/index.js":[25404,7,28629,66825],"./kk/_lib/formatLong/index.js":[9021,7,28629,39867],"./kk/_lib/formatRelative/index.js":[87631,7,90609,28629,33188],"./kk/_lib/localize/index.js":[79839,7,28629,75101],"./kk/_lib/match/index.js":[83457,7,28629,71808],"./kk/index.js":[72278,7,90609,28629,82728],"./km/_lib/formatDistance/index.js":[31974,7,31974],"./km/_lib/formatLong/index.js":[25671,7,25671],"./km/_lib/formatRelative/index.js":[66429,7,66429],"./km/_lib/localize/index.js":[48557,7,48557],"./km/_lib/match/index.js":[78995,7,78995],"./km/index.js":[79336,7,79336],"./kn/_lib/formatDistance/index.js":[68971,7,68971],"./kn/_lib/formatLong/index.js":[48230,7,48230],"./kn/_lib/formatRelative/index.js":[21252,7,21252],"./kn/_lib/localize/index.js":[76892,7,76892],"./kn/_lib/match/index.js":[86479,7,8860],"./kn/index.js":[75681,7,75681],"./ko/_lib/formatDistance/index.js":[3888,7,3888],"./ko/_lib/formatLong/index.js":[39233,7,39233],"./ko/_lib/formatRelative/index.js":[3083,7,3083],"./ko/_lib/localize/index.js":[62083,7,62083],"./ko/_lib/match/index.js":[45645,7,45645],"./ko/index.js":[6282,7,6282],"./lb/_lib/formatDistance/index.js":[94728,7,94728],"./lb/_lib/formatLong/index.js":[5289,7,5289],"./lb/_lib/formatRelative/index.js":[12323,7,12323],"./lb/_lib/localize/index.js":[45995,7,45995],"./lb/_lib/match/index.js":[73557,7,73557],"./lb/index.js":[59186,7,59186],"./lt/_lib/formatDistance/index.js":[59034,7,59034],"./lt/_lib/formatLong/index.js":[89083,7,89083],"./lt/_lib/formatRelative/index.js":[21721,7,21721],"./lt/_lib/localize/index.js":[61745,7,61745],"./lt/_lib/match/index.js":[88559,7,88559],"./lt/index.js":[8140,7,8140],"./lv/_lib/formatDistance/index.js":[87652,7,87652],"./lv/_lib/formatLong/index.js":[11061,7,11061],"./lv/_lib/formatRelative/index.js":[84567,7,90609,27114],"./lv/_lib/localize/index.js":[59127,7,81508],"./lv/_lib/match/index.js":[33625,7,33625],"./lv/index.js":[79534,7,90609,70525],"./mk/_lib/formatDistance/index.js":[68134,7,68134],"./mk/_lib/formatLong/index.js":[72327,7,72327],"./mk/_lib/formatRelative/index.js":[32669,7,90609,34624],"./mk/_lib/localize/index.js":[17133,7,17133],"./mk/_lib/match/index.js":[87219,7,87219],"./mk/index.js":[91752,7,90609,12551],"./mn/_lib/formatDistance/index.js":[69773,7,69773],"./mn/_lib/formatLong/index.js":[36104,7,36104],"./mn/_lib/formatRelative/index.js":[51844,7,7082],"./mn/_lib/localize/index.js":[68402,7,68402],"./mn/_lib/match/index.js":[15126,7,15126],"./mn/index.js":[67515,7,67515],"./ms/_lib/formatDistance/index.js":[49182,7,49182],"./ms/_lib/formatLong/index.js":[21935,7,21935],"./ms/_lib/formatRelative/index.js":[68085,7,68085],"./ms/_lib/localize/index.js":[58389,7,58389],"./ms/_lib/match/index.js":[66907,7,66907],"./ms/index.js":[13872,7,13872],"./mt/_lib/formatDistance/index.js":[18591,7,18591],"./mt/_lib/formatLong/index.js":[86442,7,86442],"./mt/_lib/formatRelative/index.js":[48016,7,48016],"./mt/_lib/localize/index.js":[53872,7,53872],"./mt/_lib/match/index.js":[1912,7,1912],"./mt/index.js":[54693,7,54693],"./nb/_lib/formatDistance/index.js":[42546,7,42546],"./nb/_lib/formatLong/index.js":[55075,7,55075],"./nb/_lib/formatRelative/index.js":[63025,7,63025],"./nb/_lib/localize/index.js":[41049,7,41049],"./nb/_lib/match/index.js":[58807,7,58807],"./nb/index.js":[84020,7,84020],"./nl-BE/_lib/formatDistance/index.js":[11762,7,11762],"./nl-BE/_lib/formatLong/index.js":[93763,7,93763],"./nl-BE/_lib/formatRelative/index.js":[15889,7,15889],"./nl-BE/_lib/localize/index.js":[79033,7,79033],"./nl-BE/_lib/match/index.js":[76183,7,76183],"./nl-BE/index.js":[40852,7,40852],"./nl/_lib/formatDistance/index.js":[20472,7,20472],"./nl/_lib/formatLong/index.js":[73913,7,73913],"./nl/_lib/formatRelative/index.js":[19187,7,19187],"./nl/_lib/localize/index.js":[78747,7,78747],"./nl/_lib/match/index.js":[81477,7,81477],"./nl/index.js":[33858,7,33858],"./nn/_lib/formatDistance/index.js":[45198,7,45198],"./nn/_lib/formatLong/index.js":[63039,7,63039],"./nn/_lib/formatRelative/index.js":[2917,7,2917],"./nn/_lib/localize/index.js":[72389,7,72389],"./nn/_lib/match/index.js":[20779,7,20779],"./nn/index.js":[6464,7,6464],"./oc/_lib/formatDistance/index.js":[50304,7,50304],"./oc/_lib/formatLong/index.js":[35569,7,35569],"./oc/_lib/formatRelative/index.js":[29467,7,29467],"./oc/_lib/localize/index.js":[84499,7,84499],"./oc/_lib/match/index.js":[88637,7,88637],"./oc/index.js":[87738,7,87738],"./pl/_lib/formatDistance/index.js":[18934,7,18934],"./pl/_lib/formatLong/index.js":[1367,7,1367],"./pl/_lib/formatRelative/index.js":[97293,7,90609,69520],"./pl/_lib/localize/index.js":[31773,7,31773],"./pl/_lib/match/index.js":[54147,7,54147],"./pl/index.js":[18264,7,90609,10647],"./pt-BR/_lib/formatDistance/index.js":[87717,7,87717],"./pt-BR/_lib/formatLong/index.js":[50256,7,50256],"./pt-BR/_lib/formatRelative/index.js":[24450,7,24450],"./pt-BR/_lib/localize/index.js":[7802,7,7802],"./pt-BR/_lib/match/index.js":[78654,7,78654],"./pt-BR/index.js":[4003,7,4003],"./pt/_lib/formatDistance/index.js":[47886,7,47886],"./pt/_lib/formatLong/index.js":[46655,7,46655],"./pt/_lib/formatRelative/index.js":[62373,7,62373],"./pt/_lib/localize/index.js":[23845,7,46226],"./pt/_lib/match/index.js":[9611,7,9611],"./pt/index.js":[71680,7,71680],"./ro/_lib/formatDistance/index.js":[71805,7,71805],"./ro/_lib/formatLong/index.js":[4952,7,4952],"./ro/_lib/formatRelative/index.js":[33978,7,33978],"./ro/_lib/localize/index.js":[85794,7,85794],"./ro/_lib/match/index.js":[64422,7,64422],"./ro/index.js":[49931,7,49931],"./ru/_lib/formatDistance/index.js":[95887,7,19156,89206],"./ru/_lib/formatLong/index.js":[3322,7,19156,62248],"./ru/_lib/formatRelative/index.js":[43040,7,90609,19156,10807],"./ru/_lib/localize/index.js":[96672,7,19156,97482],"./ru/_lib/match/index.js":[40968,7,19156,49427],"./ru/index.js":[65685,7,90609,19156,60347],"./sk/_lib/formatDistance/index.js":[27892,7,27892],"./sk/_lib/formatLong/index.js":[73957,7,73957],"./sk/_lib/formatRelative/index.js":[24999,7,90609,53402],"./sk/_lib/localize/index.js":[46516,7,24135],"./sk/_lib/match/index.js":[85065,7,85065],"./sk/index.js":[65758,7,90609,74317],"./sl/_lib/formatDistance/index.js":[94809,7,94809],"./sl/_lib/formatLong/index.js":[58292,7,58292],"./sl/_lib/formatRelative/index.js":[82718,7,82718],"./sl/_lib/localize/index.js":[42206,7,42206],"./sl/_lib/match/index.js":[67322,7,67322],"./sl/index.js":[81508,7,59127],"./sq/_lib/formatDistance/index.js":[16914,7,16914],"./sq/_lib/formatLong/index.js":[45859,7,45859],"./sq/_lib/formatRelative/index.js":[93969,7,93969],"./sq/_lib/localize/index.js":[72409,7,72409],"./sq/_lib/match/index.js":[3767,7,3767],"./sq/index.js":[34644,7,34644],"./sr-Latn/_lib/formatDistance/index.js":[46783,7,46783],"./sr-Latn/_lib/formatLong/index.js":[17290,7,17290],"./sr-Latn/_lib/formatRelative/index.js":[54384,7,54384],"./sr-Latn/_lib/localize/index.js":[8528,7,8528],"./sr-Latn/_lib/match/index.js":[57688,7,57688],"./sr-Latn/index.js":[36165,7,36165],"./sr/_lib/formatDistance/index.js":[74535,7,74535],"./sr/_lib/formatLong/index.js":[77826,7,77826],"./sr/_lib/formatRelative/index.js":[78968,7,78968],"./sr/_lib/localize/index.js":[93384,7,93384],"./sr/_lib/match/index.js":[57104,7,57104],"./sr/index.js":[21789,7,21789],"./sv/_lib/formatDistance/index.js":[29035,7,29035],"./sv/_lib/formatLong/index.js":[1286,7,1286],"./sv/_lib/formatRelative/index.js":[87300,7,87300],"./sv/_lib/localize/index.js":[86748,7,86748],"./sv/_lib/match/index.js":[8444,7,8444],"./sv/index.js":[79681,7,79681],"./ta/_lib/formatDistance/index.js":[31553,7,62934,43015],"./ta/_lib/formatLong/index.js":[27180,7,62934,21933],"./ta/_lib/formatRelative/index.js":[75014,7,62934,65396],"./ta/_lib/localize/index.js":[42454,7,62934,9387],"./ta/_lib/match/index.js":[99378,7,62934,37522],"./ta/index.js":[91407,7,62934,332],"./te/_lib/formatDistance/index.js":[23789,7,23789],"./te/_lib/formatLong/index.js":[97480,7,97480],"./te/_lib/formatRelative/index.js":[62762,7,62762],"./te/_lib/localize/index.js":[60850,7,60850],"./te/_lib/match/index.js":[59222,7,59222],"./te/index.js":[55355,7,55355],"./th/_lib/formatDistance/index.js":[16526,7,16526],"./th/_lib/formatLong/index.js":[27711,7,27711],"./th/_lib/formatRelative/index.js":[4069,7,4069],"./th/_lib/localize/index.js":[60389,7,60389],"./th/_lib/match/index.js":[25995,7,25995],"./th/index.js":[65920,7,65920],"./tr/_lib/formatDistance/index.js":[59456,7,59456],"./tr/_lib/formatLong/index.js":[89009,7,89009],"./tr/_lib/formatRelative/index.js":[38619,7,38619],"./tr/_lib/localize/index.js":[98931,7,98931],"./tr/_lib/match/index.js":[83357,7,83357],"./tr/index.js":[87034,7,87034],"./ug/_lib/formatDistance/index.js":[93634,7,93634],"./ug/_lib/formatLong/index.js":[37491,7,37491],"./ug/_lib/formatRelative/index.js":[68481,7,68481],"./ug/_lib/localize/index.js":[73769,7,73769],"./ug/_lib/match/index.js":[51239,7,51239],"./ug/index.js":[21188,7,21188],"./uk/_lib/formatDistance/index.js":[93406,7,64983,96612],"./uk/_lib/formatLong/index.js":[60143,7,64983,44314],"./uk/_lib/formatRelative/index.js":[24085,7,90609,52154,43509,22252,7256,64983,81682,74231],"./uk/_lib/localize/index.js":[57365,7,64983,31768],"./uk/_lib/match/index.js":[83035,7,64983,15141],"./uk/index.js":[74544,7,90609,52154,43509,22252,7256,64983,81682],"./uz-Cyrl/_lib/formatDistance/index.js":[93958,7,93958],"./uz-Cyrl/_lib/formatLong/index.js":[16327,7,16327],"./uz-Cyrl/_lib/formatRelative/index.js":[7389,7,7389],"./uz-Cyrl/_lib/localize/index.js":[82381,7,82381],"./uz-Cyrl/_lib/match/index.js":[66995,7,66995],"./uz-Cyrl/index.js":[36392,7,36392],"./uz/_lib/formatDistance/index.js":[30793,7,30793],"./uz/_lib/formatLong/index.js":[76004,7,76004],"./uz/_lib/formatRelative/index.js":[94734,7,94734],"./uz/_lib/localize/index.js":[40622,7,40622],"./uz/_lib/match/index.js":[37418,7,37418],"./uz/index.js":[87399,7,87399],"./vi/_lib/formatDistance/index.js":[75783,7,75783],"./vi/_lib/formatLong/index.js":[1986,7,1986],"./vi/_lib/formatRelative/index.js":[16504,7,16504],"./vi/_lib/localize/index.js":[53736,7,53736],"./vi/_lib/match/index.js":[67248,7,67248],"./vi/index.js":[2077,7,2077],"./zh-CN/_lib/formatDistance/index.js":[94238,7,94238],"./zh-CN/_lib/formatLong/index.js":[6223,7,6223],"./zh-CN/_lib/formatRelative/index.js":[13141,7,90609,13960],"./zh-CN/_lib/localize/index.js":[22837,7,22837],"./zh-CN/_lib/match/index.js":[48315,7,48315],"./zh-CN/index.js":[57488,7,90609,90207],"./zh-HK/_lib/formatDistance/index.js":[53054,7,53054],"./zh-HK/_lib/formatLong/index.js":[13135,7,13135],"./zh-HK/_lib/formatRelative/index.js":[88309,7,88309],"./zh-HK/_lib/localize/index.js":[22197,7,22197],"./zh-HK/_lib/match/index.js":[46555,7,46555],"./zh-HK/index.js":[1488,7,1488],"./zh-TW/_lib/formatDistance/index.js":[21654,7,21654],"./zh-TW/_lib/formatLong/index.js":[26839,7,26839],"./zh-TW/_lib/formatRelative/index.js":[39373,7,39373],"./zh-TW/_lib/localize/index.js":[79357,7,79357],"./zh-TW/_lib/match/index.js":[62275,7,62275],"./zh-TW/index.js":[1368,7,1368]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(2).map(n.e)).then((function(){return n.t(i,16|t[1])}))}i.keys=function(){return Object.keys(r)},i.id=27570,e.exports=i},28626:function(e,t,n){"use strict";n.d(t,{Q:function(){return f},w:function(){return p}});var r=n(62540),i=n(63696),o=n(5898),a=n(82885),s=n(44797),l=n(69410),u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c={CustomCss:"customCss",DisableCustomCss:"disableCustomCss",Theme:"appTheme",DashboardTheme:"dashboardTheme",DateTimeLocale:"datetimelocale",Language:"language"},d=(0,i.createContext)({disableCustomCss:!1}),f=function(){return(0,i.useContext)(d)},p=function(e){var t=e.children,n=u((0,i.useState)(),2),f=n[0],p=n[1],m=u((0,i.useState)(!1),2),y=m[0],v=m[1],h=u((0,i.useState)(),2),g=h[0],b=h[1],S=u((0,i.useState)(),2),A=S[0],x=S[1],w=u((0,i.useState)(),2),P=w[0],k=w[1],I=u((0,i.useState)(o.Mo),2),j=I[0],T=I[1],C=(0,l.gf)().user,E=(0,i.useMemo)((function(){return{customCss:f,disableCustomCss:y,theme:g,dashboardTheme:A,dateTimeLocale:P,locale:j}}),[f,y,g,A,P,j]),_=(0,i.useCallback)((function(){p(a.currentSettings.customCss()),v(a.currentSettings.disableCustomCss()),b(a.currentSettings.theme()),x(a.currentSettings.dashboardTheme()),k(a.currentSettings.dateTimeLocale()),T(a.currentSettings.language())}),[]),L=(0,i.useCallback)((function(e,t){t&&Object.values(c).includes(t)&&_()}),[_]);return(0,i.useEffect)((function(){return s.A.on(a.currentSettings,"change",L),function(){s.A.off(a.currentSettings,"change",L)}}),[L]),(0,i.useEffect)((function(){_()}),[_,C]),(0,r.jsx)(d.Provider,{value:E,children:t})}},29379:function(e,t,n){n(78557),n(90076),function(e){"use strict";var t=e.prototype,n=t.play;t.play=function(){try{var e=n.apply(this,arguments);return"function"==typeof(null==e?void 0:e.then)?e:Promise.resolve()}catch(e){return Promise.reject(e)}}}(HTMLMediaElement)},29561:function(e,t,n){var r={"./asyncRoutes":[24786],"./asyncRoutes/":[24786],"./asyncRoutes/index":[24786],"./asyncRoutes/index.ts":[24786],"./asyncRoutes/user":[21643],"./asyncRoutes/user.ts":[21643],"./home":[52824,45642,4113,45568,73233,81954,27962],"./home.tsx":[52824,4113,38244],"./homevideos":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./homevideos/":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./homevideos/index":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./homevideos/index.tsx":[46365,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,37470],"./legacyRoutes":[77285],"./legacyRoutes/":[77285],"./legacyRoutes/index":[77285],"./legacyRoutes/index.ts":[77285],"./legacyRoutes/public":[3312],"./legacyRoutes/public.ts":[3312],"./legacyRoutes/user":[38274],"./legacyRoutes/user.ts":[38274],"./livetv":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index.tsx":[86548,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./movies":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./movies/":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./movies/index":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./movies/index.tsx":[85775,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,17420],"./music":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./music/":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./music/index":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./music/index.tsx":[21665,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,75692],"./routes":[66359],"./routes.tsx":[66359],"./shows":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./shows/":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./shows/index":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./shows/index.tsx":[9214,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,49911],"./user/display":[86779,23247,60815,81771,40815,66935],"./user/display/":[86779,23247,60815,81771,40815,66935],"./user/display/index":[86779,23247,60815,81771,40815,66935],"./user/display/index.tsx":[86779,23247,60815,81771,30010],"./video":[13993],"./video/":[13993],"./video/index":[13993],"./video/index.tsx":[13993]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=29561,e.exports=i},30224:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(62540),i=n(63696),o=n(77402),a=n(28626),s="dark",l=n(51876),u=function(e){return"themes/".concat(e,"/theme.css")},c=u((0,l.x0)().id),d=function(e){var t=e.dashboard,n=void 0!==t&&t,l=function(){var e=(0,a.Q)(),t=e.theme,n=e.dashboardTheme,r=(0,o.U)().defaultTheme;return{theme:t||(null==r?void 0:r.id)||s,dashboardTheme:n||(null==r?void 0:r.id)||s}}(),d=l.theme,f=l.dashboardTheme,p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)(c),2),m=p[0],y=p[1];return(0,i.useEffect)((function(){var e=n?f:d;e&&y(u(e))}),[n,f,d]),(0,r.jsx)("link",{rel:"stylesheet",type:"text/css",href:m})}},31297:function(e,t,n){"use strict";n.d(t,{q:function(){return r}});var r=new(n(53804).E)({defaultOptions:{mutations:{networkMode:"always"},queries:{networkMode:"always"}}})},31524:function(e,t,n){"use strict";n.d(t,{V:function(){return a}});var r=n(11444),i=n(64680),o=n(67430);function a(e,t){var n;if(void 0===t&&(t={}),!e.ServerId)return null;if(t.type=t.type||i.y.Primary,e.Type===r.D.Episode)return function(e,t){if(void 0===t&&(t={}),!e.ServerId)return null;if(e.SeriesId&&t.type===i.y.Primary&&e.SeriesPrimaryImageTag)return t.tag=e.SeriesPrimaryImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.SeriesId,t);if(t.type===i.y.Thumb){if(e.SeriesId&&e.SeriesThumbImageTag)return t.tag=e.SeriesThumbImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.SeriesId,t);if(e.ParentThumbItemId&&e.ParentThumbImageTag)return t.tag=e.ParentThumbImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.ParentThumbItemId,t)}return null}(e,t);var a=e.PrimaryImageItemId||e.Id;return a&&(null===(n=e.ImageTags)||void 0===n?void 0:n[t.type])?(t.tag=e.ImageTags[t.type],o.tF.getApiClient(e.ServerId).getScaledImageUrl(a,t)):e.AlbumId&&e.AlbumPrimaryImageTag?(t.tag=e.AlbumPrimaryImageTag,o.tF.getApiClient(e.ServerId).getScaledImageUrl(e.AlbumId,t)):null}},34569:function(e,t,n){"use strict";var r=n(62540),i=n(47891),o=n(4391),a=n(92779),s=n(69856),l=n(89348),u=n(4452),c=n.n(u),d=n(63696),f=n(87404),p=n(8566),m=n(65242);t.A=function(e){var t=e.pageClasses,n=void 0===t?["libraryPage"]:t,u=(0,f.r5)();return(0,d.useEffect)((function(){p.Ay.hide()}),[]),(0,r.jsx)(m.A,{id:"errorBoundary",className:c()("mainAnimatedPage",n),children:(0,r.jsx)(a.A,{className:"content-primary",children:(0,r.jsxs)(i.A,{severity:"error",children:[(0,r.jsx)(o.A,{children:u.name}),(0,r.jsx)(l.A,{children:u.message}),u.stack&&(0,r.jsx)(s.A,{variant:"outlined",sx:{marginTop:1,backgroundColor:"transparent"},children:(0,r.jsx)(a.A,{component:"pre",sx:{overflow:"auto",margin:2,maxHeight:"25rem"},children:u.stack})})]})})})}},34789:function(e,t,n){"use strict";var r,i;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(){var e=navigator.userAgent.toLowerCase();return e.includes("netcast")||e.includes("web0s")}n(29305),n(32733),n(84701),n(69892),n(76281),n(44962),n(89336),n(78557),n(96054),n(646),n(95021),n(73687),n(99425),n(83994),n(93062),n(46968),n(82367);var s=navigator.userAgent,l=function(e){e=(e=e.toLowerCase()).replace(/(motorola edge)/,"").trim();var t,n=/(edg)[ /]([\w.]+)/.exec(e)||/(edga)[ /]([\w.]+)/.exec(e)||/(edgios)[ /]([\w.]+)/.exec(e)||/(edge)[ /]([\w.]+)/.exec(e)||/(titanos)[ /]([\w.]+)/.exec(e)||/(opera)[ /]([\w.]+)/.exec(e)||/(opr)[ /]([\w.]+)/.exec(e)||/(chrome)[ /]([\w.]+)/.exec(e)||/(safari)[ /]([\w.]+)/.exec(e)||/(firefox)[ /]([\w.]+)/.exec(e)||!e.includes("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],r=/(version)[ /]([\w.]+)/.exec(e),i=/(ipad)/.exec(e)||/(iphone)/.exec(e)||/(windows)/.exec(e)||/(android)/.exec(e)||/(titanos)/.exec(e)||[],o=n[1]||"";"edge"===o&&(i=[""]),"opr"===o&&(o="opera"),r&&r.length>2&&(t=r[2]),t=t||n[2]||"0";var a=parseInt(t.split(".")[0],10);return isNaN(a)&&(a=0),{browser:o,version:t,platform:i[0]||"",versionMajor:a}}(s),u={};if(l.browser&&(u[l.browser]=!0,u.version=l.version,u.versionMajor=l.versionMajor),l.platform&&(u[l.platform]=!0),u.edgeChromium=u.edg||u.edga||u.edgios,u.chrome||u.edgeChromium||u.edge||u.opera||!s.toLowerCase().includes("webkit")||(u.safari=!0),u.osx=s.toLowerCase().includes("mac os x"),u.osx&&!u.iphone&&!u.ipod&&!u.ipad&&navigator.maxTouchPoints>1&&(u.ipad=!0),s.toLowerCase().includes("playstation 4")&&(u.ps4=!0,u.tv=!0),function(e){for(var t=["mobi","ipad","iphone","ipod","silk","gt-p1000","nexus 7","kindle fire","opera mini"],n=e.toLowerCase(),r=0,i=t.length;r<i;r++)if(n.includes(t[r]))return!0;return!1}(s)&&(u.mobile=!0),s.toLowerCase().includes("xbox")&&(u.xboxOne=!0,u.tv=!0),u.animate="undefined"!=typeof document&&null!=document.documentElement.animate,u.hisense=s.toLowerCase().includes("hisense"),u.tizen=s.toLowerCase().includes("tizen")||null!=window.tizen,u.vidaa=s.toLowerCase().includes("vidaa"),u.web0s=a(),u.edgeUwp=(u.edge||u.edgeChromium)&&(s.toLowerCase().includes("msapphost")||s.toLowerCase().includes("webview")),u.web0s)u.web0sVersion=function(e){if(e.chrome){if(navigator.userAgent.toLowerCase().includes("netcast"))return void console.warn("Unable to detect webOS version - NetCast");if(e.versionMajor>=94)return 23;if(e.versionMajor>=87)return 22;if(e.versionMajor>=79)return 6;if(e.versionMajor>=68)return 5;if(e.versionMajor>=53)return 4;if(e.versionMajor>=38)return 3;if(e.versionMajor>=34)return 2;if(e.versionMajor>=26)return 1}else{if(e.versionMajor>=538)return 2;if(e.versionMajor>=537)return 1}console.error("Unable to detect webOS version")}(u),delete u.chrome,delete u.safari;else if(u.tizen){var c=RegExp(/Tizen (\d+).(\d+)/).exec(s);u.tizenVersion=parseInt(c[1],10)+parseInt(c[2],10)/10,delete u.chrome,delete u.safari}else u.titanos?(delete u.operaTv,delete u.safari):u.orsay=s.toLowerCase().includes("smarthub");u.tv=function(){var e=navigator.userAgent.toLowerCase();return!e.includes("oculusbrowser")&&(!!e.includes("tv")||!!e.includes("samsungbrowser")||!!e.includes("viera")||!!e.includes("titanos")||a())}(),u.operaTv=u.tv&&s.toLowerCase().includes("opr/"),(u.mobile||u.tv)&&(u.slow=!0),("undefined"!=typeof document&&"ontouchstart"in window||navigator.maxTouchPoints>0)&&(u.touch=!0),u.keyboard=function(e){return!!(e.touch||e.xboxOne||e.ps4||e.edgeUwp||e.tv)}(u),u.supportsCssAnimation=function(e){if(e&&(!0===i||!1===i))return i;if(!0===r||!1===r)return r;var t=!1,n=document.createElement("div");if(void 0!==n.style.animationName&&(t=!0),!1===t&&e){var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}(["Webkit","O","Moz"]);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(void 0!==n.style[l+"AnimationName"]){t=!0;break}}}catch(e){s.e(e)}finally{s.f()}}return e?i=t:r=t},u.iOS=u.ipad||u.iphone||u.ipod,u.iOS&&(u.iOSVersion=function(){if(/iP(hone|od|ad)|MacIntel/.test(navigator.platform))for(var e=0,t=[/OS (\d+)_(\d+)_?(\d+)?/,/Version\/(\d+)/];e<t.length;e++){var n=RegExp(t[e]).exec(navigator.appVersion);if(n)return[parseInt(n[1],10),parseInt(n[2]||0,10),parseInt(n[3]||0,10)]}return[]}(),u.iOSVersion&&u.iOSVersion.length>=2&&(u.iOSVersion=u.iOSVersion[0]+u.iOSVersion[1]/10)),t.A=u},34945:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_PUBLIC_ROUTES:function(){return i.ASYNC_PUBLIC_ROUTES},ASYNC_USER_ROUTES:function(){return r.ASYNC_USER_ROUTES}});var r=n(12446),i=n(95260)},36300:function(e,t,n){"use strict";function r(e,t){for(var n=0,r=t.length;n<r;n++)if(e.contains(t[n]))return!0;return!1}n.d(t,{f:function(){return u},q2:function(){return l}}),n(84734),n(26448),n(36947),n(95021),n(93062);var i,o,a=!1;try{var s=Object.defineProperty({},"capture",{get:function(){return a=!0,null}});window.addEventListener("test",null,s)}catch(e){}function l(e,t,n,r){var i=r||{};a||(i=i.capture),e.addEventListener(t,n,i)}function u(e,t,n,r){var i=r||{};a||(i=i.capture),e.removeEventListener(t,n,i)}function c(){i=null}var d,f,p=[480,720,1280,1440,1920,2560,3840,5120,7680];function m(){if(d)return d;var e=document.createElement("div"),t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(var n in t)if(void 0!==e.style[n])return d=t[n],t[n];return d="animationend"}t.Ay={parentWithAttribute:function(e,t,n){for(;n?e.getAttribute(t)!==n:!e.getAttribute(t);){var r;if(null===(r=e=e.parentNode)||void 0===r||!r.getAttribute)return null}return e},parentWithClass:function(e,t){for(Array.isArray(t)||(t=[t]);!e.classList||!r(e.classList,t);)if(!(e=e.parentNode))return null;return e},parentWithTag:function(e,t){for(Array.isArray(t)||(t=[t]);-1===t.indexOf(e.tagName||"");)if(!(e=e.parentNode))return null;return e},addEventListener:l,removeEventListener:u,getWindowSize:function(){if(!i){var e=window.innerWidth,t=window.innerHeight;if(!Number.isFinite(e)||!Number.isFinite(t))return{innerWidth:Number.isFinite(e)?e:3840,innerHeight:Number.isFinite(t)?t:2160};i={innerWidth:e,innerHeight:t},o||(o=!0,l(window,"orientationchange",c,{passive:!0}),l(window,"resize",c,{passive:!0}))}return i},getScreenWidth:function(){var e=Number.isFinite(window.innerWidth)?window.innerWidth:3840,t=Number.isFinite(window.innerHeight)?window.innerHeight:2160;return t>e&&(e=t*(16/9)),p.sort((function(t,n){return Math.abs(e-t)-Math.abs(e-n)})),p[0]},setElementTitle:function(e,t,n){e.setAttribute("title",t),e.setAttribute("aria-label",n)},whichTransitionEvent:function(){if(f)return f;var e=document.createElement("div"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(var n in t)if(void 0!==e.style[n])return f=t[n],t[n];return f="transitionend"},whichAnimationEvent:m,whichAnimationCancelEvent:function(){return m().replace("animationend","animationcancel").replace("AnimationEnd","AnimationCancel")}}},37881:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(62540),i=(n(63696),n(55219)),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e){return{path:e.path,element:(0,r.jsx)(i.A,o({},e.pageProps))}}},38274:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_USER_ROUTES:function(){return r}});var r=[{path:"details",pageProps:{controller:"itemDetails/index",view:"itemDetails/index.html"}},{path:"list",pageProps:{controller:"list",view:"list.html"}},{path:"lyrics",pageProps:{controller:"lyrics",view:"lyrics.html"}},{path:"mypreferencescontrols",pageProps:{controller:"user/controls/index",view:"user/controls/index.html"}},{path:"mypreferenceshome",pageProps:{controller:"user/home/index",view:"user/home/index.html"}},{path:"mypreferencesplayback",pageProps:{controller:"user/playback/index",view:"user/playback/index.html"}},{path:"mypreferencessubtitles",pageProps:{controller:"user/subtitles/index",view:"user/subtitles/index.html"}},{path:"queue",pageProps:{controller:"playback/queue/index",view:"playback/queue/index.html",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}}]},38490:function(e,t,n){"use strict";n.r(t),n.d(t,{handleCommand:function(){return g},idleTime:function(){return f},notify:function(){return c},notifyMouseMove:function(){return d},off:function(){return v},on:function(){return y},select:function(){return p}});var r=n(22622),i=n(9164),o=n(39738),a=n(70267),s=n(97339),l=n(36300),u=(new Date).getTime();function c(){u=(new Date).getTime(),g("unknown")}function d(){u=(new Date).getTime()}function f(){return(new Date).getTime()-u}function p(e){e.click()}var m=0;function y(e,t){m++,l.Ay.addEventListener(e,"command",t,{})}function v(e,t){m&&m--,l.Ay.removeEventListener(e,"command",t,{})}var h={};function g(e,t){u=(new Date).getTime();var n=t?t.sourceElement:null;if(n&&(n=i.A.focusableParent(n)),!n){n=document.activeElement||window;var l=document.querySelectorAll(".dialogContainer .dialog.opened"),c=l.length?l[l.length-1]:null;c&&!c.contains(n)&&(n=c)}if(m){var d=new CustomEvent("command",{detail:{command:e},bubbles:!0,cancelable:!0});if(!n.dispatchEvent(d))return}var f={up:function(){i.A.moveUp(n)},down:function(){i.A.moveDown(n)},left:function(){i.A.moveLeft(n)},right:function(){i.A.moveRight(n)},home:function(){a.appRouter.goHome()},settings:function(){a.appRouter.showSettings()},back:function(){a.appRouter.canGoBack()?a.appRouter.back():r.g.supports(s.Y.Exit)&&r.g.exit()},select:function(){p(n)},nextchapter:function(){o.f.nextChapter()},next:function(){o.f.nextTrack()},nexttrack:function(){o.f.nextTrack()},previous:function(){o.f.previousTrack()},previoustrack:function(){o.f.previousTrack()},previouschapter:function(){o.f.previousChapter()},guide:function(){a.appRouter.showGuide()},recordedtv:function(){a.appRouter.showRecordedTV()},livetv:function(){a.appRouter.showLiveTV()},mute:function(){o.f.setMute(!0)},unmute:function(){o.f.setMute(!1)},togglemute:function(){o.f.toggleMute()},channelup:function(){o.f.channelUp()},channeldown:function(){o.f.channelDown()},volumedown:function(){o.f.volumeDown()},volumeup:function(){o.f.volumeUp()},play:function(){o.f.unpause()},pause:function(){o.f.pause()},playpause:function(){o.f.playPause()},stop:function(){var e,t,n;t=h[e="stop"]||0,!((n=(new Date).getTime())-t<1e3||(h[e]=n,0))&&o.f.stop()},changezoom:function(){o.f.toggleAspectRatio()},increaseplaybackrate:function(){o.f.increasePlaybackRate()},decreaseplaybackrate:function(){o.f.decreasePlaybackRate()},changeaudiotrack:function(){o.f.changeAudioStream()},changesubtitletrack:function(){o.f.changeSubtitleStream()},search:function(){a.appRouter.showSearch()},favorites:function(){a.appRouter.showFavorites()},fastforward:function(){o.f.fastForward()},rewind:function(){o.f.rewind()},seek:function(){o.f.seekMs(t)},togglefullscreen:function(){o.f.toggleFullscreen()},disabledisplaymirror:function(){o.f.enableDisplayMirroring(!1)},enabledisplaymirror:function(){o.f.enableDisplayMirroring(!0)},toggledisplaymirror:function(){o.f.toggleDisplayMirroring()},nowplaying:function(){a.appRouter.showNowPlaying()},repeatnone:function(){o.f.setRepeatMode("RepeatNone")},repeatall:function(){o.f.setRepeatMode("RepeatAll")},repeatone:function(){o.f.setRepeatMode("RepeatOne")},unknown:function(){}}[e];void 0!==f?f.call():console.debug("inputManager: tried to process command with no action assigned: ".concat(e))}l.Ay.addEventListener(document,"click",c,{passive:!0}),t.default={handleCommand:g,notify:c,notifyMouseMove:d,idleTime:f,on:y,off:v}},38601:function(e,t,n){var r={"./":[73422,45642,23247,60815,81771,16304,9886,1270,57308,13057],"./_asyncRoutes":[39244],"./_asyncRoutes.ts":[39244],"./_legacyRoutes":[4877],"./_legacyRoutes.ts":[4877],"./activity":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./activity/":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./activity/index":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./activity/index.tsx":[43461,45642,23247,60815,81771,16304,1270,41823,22940,71187,78214,77481,67734,88788],"./backups":[87269,45642,23247,60815,81771,16304,9886,46876],"./backups/":[87269,45642,23247,60815,81771,16304,9886,46876],"./backups/index":[87269,45642,23247,60815,81771,16304,9886,46876],"./backups/index.tsx":[87269,45642,23247,60815,81771,16304,9886,46876],"./branding":[21475,45642,23247,60815,81771,16304,10878],"./branding/":[21475,45642,23247,60815,81771,16304,10878],"./branding/index":[21475,45642,23247,60815,81771,16304,10878],"./branding/index.tsx":[21475,45642,23247,60815,81771,16304,10878],"./devices":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./devices/":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./devices/index":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./devices/index.tsx":[56080,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,23920],"./index":[73422,45642,23247,60815,81771,16304,9886,1270,57308,13057],"./index.tsx":[73422,45642,23247,60815,81771,16304,9886,1270,57308,13057],"./keys":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./keys/":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./keys/index":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./keys/index.tsx":[33783,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,24167],"./libraries":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/display":[52433,45642,23247,60815,81771,8241],"./libraries/display.tsx":[52433,45642,23247,60815,81771,8241],"./libraries/index":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/index.tsx":[57415,45642,23247,60815,81771,16304,9886,95454,4350,91068],"./libraries/metadata":[26364,45642,23247,60815,81771,8690],"./libraries/metadata.tsx":[26364,45642,23247,60815,81771,8690],"./libraries/nfo":[32204,45642,23247,60815,81771,84004],"./libraries/nfo.tsx":[32204,45642,23247,60815,81771,84004],"./livetv":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/index.tsx":[87759,45642,23247,60815,81771,29808,16304,9886,55931,96820,49092,12011,24468,4113,36934,99883,73567],"./livetv/recordings":[92163,45642,23247,60815,81771,16304,99072],"./livetv/recordings.tsx":[92163,45642,23247,60815,81771,16304,99072],"./logs":[79905,45642,23247,60815,81771,45378],"./logs/":[79905,45642,23247,60815,81771,45378],"./logs/file":[15338,23247,60815,81771,16304,40229],"./logs/file.tsx":[15338,23247,60815,81771,16304,40229],"./logs/index":[79905,45642,23247,60815,81771,45378],"./logs/index.tsx":[79905,45642,23247,60815,81771,45378],"./playback/resume":[6820,45642,23247,60815,81771,12296],"./playback/resume.tsx":[6820,45642,23247,60815,81771,12296],"./playback/streaming":[75461,45642,23247,60815,81771,55383],"./playback/streaming.tsx":[75461,45642,23247,60815,81771,55383],"./playback/transcoding":[7077,45642,23247,60815,81771,16304,55691],"./playback/transcoding.tsx":[7077,45642,23247,60815,81771,16304,55691],"./playback/trickplay":[70298,45642,23247,60815,81771,77756],"./playback/trickplay.tsx":[70298,45642,23247,60815,81771,77756],"./plugins":[26057,45642,23247,60815,16304,70593],"./plugins/":[26057,45642,23247,60815,16304,70593],"./plugins/index":[26057,45642,23247,60815,16304,70593],"./plugins/index.tsx":[26057,45642,23247,60815,16304,70593],"./plugins/plugin":[18596,45642,23247,60815,16304,28336,1820,32125,9886,70712,29575],"./plugins/plugin.tsx":[18596,45642,23247,60815,16304,28336,1820,32125,9886,70712,29575],"./plugins/repositories":[60159,45642,23247,60815,81771,16304,9886,46390],"./plugins/repositories.tsx":[60159,45642,23247,60815,81771,16304,9886,46390],"./routes":[7603],"./routes.tsx":[7603],"./settings":[78963,45642,23247,60815,81771,16304,26472],"./settings/":[78963,45642,23247,60815,81771,16304,26472],"./settings/index":[78963,45642,23247,60815,81771,16304,26472],"./settings/index.tsx":[78963,45642,23247,60815,81771,16304,24357],"./tasks":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/index":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/index.tsx":[36041,45642,23247,60815,81771,16304,9886,1270,57308,38919],"./tasks/task":[1625,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,19199],"./tasks/task.tsx":[1625,45642,23247,60815,81771,16304,9886,1270,41823,22940,71187,78214,77481,67734,19199],"./users":[27239,23247,1270,58809],"./users/":[27239,23247,1270,58809],"./users/access":[61726,23247,97636],"./users/access.tsx":[61726,23247,97636],"./users/add":[35175,23247,99075],"./users/add.tsx":[35175,23247,99075],"./users/index":[27239,23247,1270,58809],"./users/index.tsx":[27239,23247,1270,58809],"./users/parentalcontrol":[78304,45642,23247,97200],"./users/parentalcontrol.tsx":[78304,45642,23247,97200],"./users/password":[19715,38245],"./users/password.tsx":[19715,38245],"./users/profile":[71005,18373],"./users/profile.tsx":[71005,18373]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=38601,e.exports=i},38783:function(e,t,n){"use strict";var r;n.d(t,{Q:function(){return r}}),function(e){e.MediaPlayer="mediaplayer",e.PreplayIntercept="preplayintercept",e.Screensaver="screensaver",e.SyncPlay="syncplay"}(r||(r={}))},38829:function(e,t,n){"use strict";n.d(t,{X:function(){return L}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(14382),n(76281),n(44962),n(17731),n(26448),n(4754),n(10849),n(70389),n(94),n(36947),n(26437),n(52697),n(78557),n(90076),n(99425),n(83994),n(90580),n(82367);var r=n(44797),i=n(5898),o=n(8566),a=n(90381),s=n(39738),l=n(22622),u=n(70267),c=n(38490),d=n(71866),f=n(47602),p=n(67430),m=n(89100);function y(e){return y="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},y(e)}function v(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return h(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(h(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,h(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,h(d,"constructor",u),h(u,"constructor",l),l.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(d),h(d,i,"Generator"),h(d,r,(function(){return this})),h(d,"toString",(function(){return"[object Generator]"})),(v=function(){return{w:o,m:f}})()}function h(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}h=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){h(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},h(e,t,n,r)}function g(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){g(o,r,i,a,s,"next",e)}function s(e){g(o,r,i,a,s,"throw",e)}a(void 0)}))}}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function A(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function x(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var w=(new Date).getTime(),P=new WeakSet,k=function(){return e=function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,P),t=this,r=[],(n=A(n="pluginsList"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r},t=[{key:"plugins",get:function(){return this.pluginsList}},{key:"loadPlugin",value:(y=b(v().m((function e(t){var y,h,g,b,S;return v().w((function(e){for(;;)switch(e.n){case 0:if("string"!=typeof t){e.n=8;break}if(!(t in window)){e.n=5;break}return console.log("Loading plugin (via window): ".concat(t)),e.n=1,window[t];case 1:if("function"==typeof(h=e.v)){e.n=2;break}throw new TypeError("Plugin definitions in window have to be an (async) function returning the plugin class");case 2:return e.n=3,h();case 3:if("function"==typeof(g=e.v)){e.n=4;break}throw new TypeError("Plugin definition doesn't return a class for '".concat(t,"'"));case 4:y=new g({events:r.A,loading:o.Ay,appSettings:a.A,playbackManager:s.f,globalize:i.Ay,appHost:l.g,appRouter:u.appRouter,inputManager:c,toast:d.A,confirm:f.A,dashboard:m,ServerConnections:p.tF}),e.n=7;break;case 5:return console.debug("Loading plugin (via dynamic import): ".concat(t)),e.n=6,n(11167)("./".concat(t));case 6:b=e.v,y=new b.default;case 7:e.n=11;break;case 8:if(!t.then){e.n=10;break}return console.debug("Loading plugin (via promise/async function)"),e.n=9,t;case 9:S=e.v,y=new S.default,e.n=11;break;case 10:throw new TypeError("Plugins have to be a Promise that resolves to a plugin builder function");case 11:return e.a(2,x(P,this,C).call(this,t,y))}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"ofType",value:function(e){return this.pluginsList.filter((function(t){return t.type===e}))}},{key:"firstOfType",value:function(e){return this.ofType(e).sort((function(e,t){return(e.priority||0)-(t.priority||0)}))[0]}},{key:"mapPath",value:function(e,t,n){"string"==typeof e&&(e=this.pluginsList.filter((function(t){return(t.id||t.packageName)===e}))[0]);var r=e.baseUrl+"/"+t;return n&&(r+=r.includes("?")?"&":"?",r+="v="+w),r}}],t&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,y}();function I(e){var t=e.getTranslations?e.getTranslations():[];return i.Ay.loadStrings({name:e.id||e.packageName,strings:t})}function j(e){return T.apply(this,arguments)}function T(){return(T=b(v().m((function e(t){return v().w((function(e){for(;;)switch(e.n){case 0:if(x(P,this,_).call(this,t),"skin"!==t.type){e.n=1;break}return e.a(2,t);case 1:return e.a(2,x(P,this,I).call(this,t));case 2:return e.a(2)}}),e,this)})))).apply(this,arguments)}function C(e,t){return E.apply(this,arguments)}function E(){return(E=b(v().m((function e(t,n){var r;return v().w((function(e){for(;;)switch(e.n){case 0:if("string"!=typeof t){e.n=2;break}if(!this.plugins.filter((function(e){return e.id===n.id}))[0]){e.n=1;break}return e.a(2,t);case 1:n.installUrl=t,r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),n.baseUrl=t.substring(0,r);case 2:return e.a(2,x(P,this,j).call(this,n))}}),e,this)})))).apply(this,arguments)}function _(e){this.pluginsList.push(e),r.A.trigger(this,"registered",[e])}var L=new k},39244:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_ADMIN_ROUTES:function(){return i}});var r=n(19373),i=[{path:"",type:r.u.Dashboard},{path:"activity",type:r.u.Dashboard},{path:"backups",type:r.u.Dashboard},{path:"branding",type:r.u.Dashboard},{path:"devices",type:r.u.Dashboard},{path:"settings",type:r.u.Dashboard},{path:"keys",type:r.u.Dashboard},{path:"libraries",type:r.u.Dashboard},{path:"libraries/display",type:r.u.Dashboard},{path:"libraries/metadata",type:r.u.Dashboard},{path:"libraries/nfo",type:r.u.Dashboard},{path:"livetv",type:r.u.Dashboard},{path:"livetv/recordings",type:r.u.Dashboard},{path:"logs",type:r.u.Dashboard},{path:"logs/:file",page:"logs/file",type:r.u.Dashboard},{path:"playback/resume",type:r.u.Dashboard},{path:"playback/streaming",type:r.u.Dashboard},{path:"playback/transcoding",type:r.u.Dashboard},{path:"playback/trickplay",type:r.u.Dashboard},{path:"plugins",type:r.u.Dashboard},{path:"plugins/:pluginId",page:"plugins/plugin",type:r.u.Dashboard},{path:"plugins/repositories",type:r.u.Dashboard},{path:"tasks",type:r.u.Dashboard},{path:"tasks/:id",page:"tasks/task",type:r.u.Dashboard},{path:"users",type:r.u.Dashboard},{path:"users/access",type:r.u.Dashboard},{path:"users/add",type:r.u.Dashboard},{path:"users/parentalcontrol",type:r.u.Dashboard},{path:"users/password",type:r.u.Dashboard},{path:"users/profile",type:r.u.Dashboard}]},39603:function(e,t,n){n(64251),function(e){"use strict";try{new e.KeyboardEvent("event",{bubbles:!0,cancelable:!0})}catch(r){var t=e.Event,n=function(e,t){t=t||{};var n=new Event(e,{bubbles:!!t.bubbles,cancelable:!!t.cancelable});return n.view=t.view||document.defaultView,n.key=t.key||t.keyIdentifier||"",n.keyCode=t.keyCode||0,n.code=t.code||"",n.charCode=t.charCode||0,n.char=t.char||"",n.which=t.which||0,n.location=t.location||t.keyLocation||0,n.ctrlKey=!!t.ctrlKey,n.altKey=!!t.altKey,n.shiftKey=!!t.shiftKey,n.metaKey=!!t.metaKey,n.repeat=!!t.repeat,n};n.prototype=t.prototype,e.KeyboardEvent=n}}(window)},39641:function(e,t,n){"use strict";n(69703),n(78557),n(90076);var r,i=n(44797),o=n(71286),a=n(51876);function s(){return(0,a.$D)()}t.A={getThemes:s,setTheme:function(e){return new Promise((function(t){r&&r===e?t():function(e){return s().then((function(t){var n;return e&&(n=t.find((function(t){return t.id===e}))),n||(n=(0,a.x0)()),n}))}(e).then((function(e){r&&r===e.id?t():(r=e.id,document.documentElement.setAttribute("data-theme",e.id),document.getElementById("themeColor").content=e.color,i.A.trigger(document,o.B.THEME_CHANGE,[e.id]))}))}))}}},39738:function(e,t,n){"use strict";n.d(t,{f:function(){return st}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(24776),n(14382),n(64771),n(69892),n(76281),n(84734),n(44962),n(86584),n(89336),n(26448),n(25352),n(4754),n(10849),n(70389),n(94),n(77575),n(33087),n(36947),n(36457),n(88908),n(26437),n(83810),n(52697),n(78557),n(96054),n(90076),n(646),n(95021),n(73687),n(99425),n(83994),n(93062),n(64062),n(23630),n(82367);var r=n(11444),i=n(92426),o=n(77612),a=n(45251),s=n(15122),l=n(74180),u=n(45950),c=n(35222),d=n(44797),f=n(98320),p=n(90381),m=n(23648),y=n(38829),v=(n(74576),n(58953));function h(e){return h="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},h(e)}function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function A(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}var x=0;function w(e){e.PlaylistItemId||(e.PlaylistItemId="playlistItem"+x,x++)}function P(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].PlaylistItemId===e)return n;return-1}var k,I=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._sortedPlaylist=[],this._playlist=[],this._repeatMode="RepeatNone",this._shuffleMode="Sorted"},t=[{key:"getPlaylist",value:function(){return this._playlist.slice(0)}},{key:"setPlaylist",value:function(e){for(var t=0,n=(e=e.slice(0)).length;t<n;t++)w(e[t]);this._currentPlaylistItemId=null,this._playlist=e,this._repeatMode="RepeatNone"}},{key:"queue",value:function(e){for(var t=0,n=e.length;t<n;t++)w(e[t]),this._playlist.push(e[t])}},{key:"shufflePlaylist",value:function(){this._sortedPlaylist=[];var e,t=g(this._playlist);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._sortedPlaylist.push(n)}}catch(e){t.e(e)}finally{t.f()}for(var r=this._playlist.splice(this.getCurrentPlaylistIndex(),1)[0],i=this._playlist.length-1;i>0;i--){var o=(0,v.HO)(0,i-1),a=this._playlist[i];this._playlist[i]=this._playlist[o],this._playlist[o]=a}this._playlist.unshift(r),this._shuffleMode="Shuffle"}},{key:"sortShuffledPlaylist",value:function(){this._playlist=[];var e,t=g(this._sortedPlaylist);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._playlist.push(n)}}catch(e){t.e(e)}finally{t.f()}this._sortedPlaylist=[],this._shuffleMode="Sorted"}},{key:"clearPlaylist",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._playlist.splice(this.getCurrentPlaylistIndex(),1)[0];this._playlist=[],e||this._playlist.push(t)}},{key:"queueNext",value:function(e){for(var t=0,n=e.length;t<n;t++)w(e[t]);var r,i,o,a=this.getCurrentPlaylistIndex();-1===a?a=this._playlist.length:a++,r=this._playlist,i=e,(o=[]).push(a),o.push(0),o=o.concat(i),r.splice.apply(r,o)}},{key:"getCurrentPlaylistIndex",value:function(){return P(this.getCurrentPlaylistItemId(),this._playlist)}},{key:"getCurrentItem",value:function(){var e=P(this.getCurrentPlaylistItemId(),this._playlist);return-1===e?null:this._playlist[e]}},{key:"getCurrentPlaylistItemId",value:function(){return this._currentPlaylistItemId}},{key:"setPlaylistState",value:function(e){this._currentPlaylistItemId=e}},{key:"setPlaylistIndex",value:function(e){e<0?this.setPlaylistState(null):this.setPlaylistState(this._playlist[e].PlaylistItemId)}},{key:"removeFromPlaylist",value:function(e){if(this._playlist.length<=e.length)return{result:"empty"};var t=this.getCurrentPlaylistItemId(),n=-1!==e.indexOf(t);return this._sortedPlaylist=this._sortedPlaylist.filter((function(t){return!e.includes(t.PlaylistItemId)})),this._playlist=this._playlist.filter((function(t){return!e.includes(t.PlaylistItemId)})),{result:"removed",isCurrentIndex:n}}},{key:"movePlaylistItem",value:function(e,t){for(var n,r,i,o,a=this.getPlaylist(),s=0,l=a.length;s<l;s++)if(a[s].PlaylistItemId===e){n=s;break}if(-1===n||n===t)return{result:"noop"};if(t>=a.length)throw new Error("newIndex out of bounds");return i=n,o=t,(r=a).splice(o,0,r.splice(i,1)[0]),this._playlist=a,{result:"moved",playlistItemId:e,newIndex:t}}},{key:"reset",value:function(){this._sortedPlaylist=[],this._playlist=[],this._currentPlaylistItemId=null,this._repeatMode="RepeatNone",this._shuffleMode="Sorted"}},{key:"setRepeatMode",value:function(e){if(!["RepeatOne","RepeatAll","RepeatNone"].includes(e))throw new TypeError("invalid value provided for setRepeatMode");this._repeatMode=e}},{key:"getRepeatMode",value:function(){return this._repeatMode}},{key:"setShuffleMode",value:function(e){switch(e){case"Shuffle":this.shufflePlaylist();break;case"Sorted":this.sortShuffledPlaylist();break;default:throw new TypeError("invalid value provided to setShuffleMode")}}},{key:"toggleShuffleMode",value:function(){switch(this._shuffleMode){case"Shuffle":this.setShuffleMode("Sorted");break;case"Sorted":this.setShuffleMode("Shuffle");break;default:throw new TypeError("current value for shufflequeue is invalid")}}},{key:"getShuffleMode",value:function(){return this._shuffleMode}},{key:"getNextItemInfo",value:function(){var e,t=this.getPlaylist(),n=t.length;switch(this.getRepeatMode()){case"RepeatOne":e=this.getCurrentPlaylistIndex();break;case"RepeatAll":(e=this.getCurrentPlaylistIndex()+1)>=n&&(e=0);break;default:e=this.getCurrentPlaylistIndex()+1}if(e<0||e>=n)return null;var r=t[e];return r?{item:r,index:e}:null}}],t&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),j=I,T=n(82885),C=n(5898),E=n(8566),_=n(22622),L=n(41177),M=n(38783),O=n(53089),R=n(2290),D=n(97067),N=n(57178),F=n(41087),U=n(40806),V=n(10989),B=n(67430),z=n(75384),q=n(73025),H=function(e,t,n){return-1===n?void 0!==e.EndTicks&&e.EndTicks<=t:void 0!==e.StartTicks&&e.StartTicks>t},G=function(e,t){return void 0!==e.StartTicks&&e.StartTicks<=t&&(void 0===e.EndTicks||e.EndTicks>t)};!function(e){e.Pairing="pairing",e.Paired="paired",e.PairError="pairerror",e.PlaybackCancelled="playbackcancelled",e.PlaybackError="playbackerror",e.PlaybackStart="playbackstart",e.PlaybackStop="playbackstop",e.PlayerChange="playerchange",e.ReportPlayback="reportplayback"}(k||(k={}));var W,Y=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Q=function(){function e(e){var t,n,r,i,o,a,s,l,u,c,f,p,m,y,v,h,g,b,S,A,x,w,P,I,j,T,C;this.playbackManager=e,this.playbackManagerEvents=((t={})[k.PlaybackCancelled]=null===(r=this.onPlaybackCancelled)||void 0===r?void 0:r.bind(this),t[k.PlaybackError]=null===(i=this.onPlaybackError)||void 0===i?void 0:i.bind(this),t[k.PlaybackStart]=null===(o=this.onPlaybackStart)||void 0===o?void 0:o.bind(this),t[k.PlaybackStop]=null===(a=this.onPlaybackStop)||void 0===a?void 0:a.bind(this),t[k.PlayerChange]=null===(s=this.onPlayerChange)||void 0===s?void 0:s.bind(this),t[k.ReportPlayback]=null===(l=this.onReportPlayback)||void 0===l?void 0:l.bind(this),t),this.playerEvents=((n={})[N.g.Error]=null===(u=this.onPlayerError)||void 0===u?void 0:u.bind(this),n[N.g.FullscreenChange]=null===(c=this.onPlayerFullscreenChange)||void 0===c?void 0:c.bind(this),n[N.g.ItemStarted]=null===(f=this.onPlayerItemStarted)||void 0===f?void 0:f.bind(this),n[N.g.ItemStopped]=null===(p=this.onPlayerItemStopped)||void 0===p?void 0:p.bind(this),n[N.g.MediaStreamsChange]=null===(m=this.onPlayerMediaStreamsChange)||void 0===m?void 0:m.bind(this),n[N.g.Pause]=null===(y=this.onPlayerPause)||void 0===y?void 0:y.bind(this),n[N.g.PlaybackStart]=null===(v=this.onPlayerPlaybackStart)||void 0===v?void 0:v.bind(this),n[N.g.PlaybackStop]=null===(h=this.onPlayerPlaybackStop)||void 0===h?void 0:h.bind(this),n[N.g.PlaylistItemAdd]=null===(g=this.onPlayerPlaylistItemAdd)||void 0===g?void 0:g.bind(this),n[N.g.PlaylistItemMove]=null===(b=this.onPlayerPlaylistItemMove)||void 0===b?void 0:b.bind(this),n[N.g.PlaylistItemRemove]=null===(S=this.onPlayerPlaylistItemRemove)||void 0===S?void 0:S.bind(this),n[N.g.PromptSkip]=null===(A=this.onPromptSkip)||void 0===A?void 0:A.bind(this),n[N.g.RepeatModeChange]=null===(x=this.onPlayerRepeatModeChange)||void 0===x?void 0:x.bind(this),n[N.g.ShuffleModeChange]=null===(w=this.onPlayerShuffleModeChange)||void 0===w?void 0:w.bind(this),n[N.g.StateChange]=null===(P=this.onPlayerStateChange)||void 0===P?void 0:P.bind(this),n[N.g.Stopped]=null===(I=this.onPlayerStopped)||void 0===I?void 0:I.bind(this),n[N.g.TimeUpdate]=null===(j=this.onPlayerTimeUpdate)||void 0===j?void 0:j.bind(this),n[N.g.Unpause]=null===(T=this.onPlayerUnpause)||void 0===T?void 0:T.bind(this),n[N.g.VolumeChange]=null===(C=this.onPlayerVolumeChange)||void 0===C?void 0:C.bind(this),n),Object.entries(this.playbackManagerEvents).forEach((function(t){var n=Y(t,2),r=n[0],i=n[1];i&&d.A.on(e,r,i)})),this.bindPlayerEvents(),d.A.on(e,k.PlayerChange,this.bindPlayerEvents.bind(this))}return e.prototype.bindPlayerEvents=function(){var e=this,t=this.playbackManager.getCurrentPlayer();this.player!==t&&(this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=Y(t,2),r=n[0],i=n[1];i&&d.A.off(e.player,r,i)})),this.player=t,this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=Y(t,2),r=n[0],i=n[1];i&&d.A.on(e.player,r,i)})))},e}(),K=n(94738),J=(W=function(e,t){return W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},W(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),X=function(e){function t(){var t=e.apply(this,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(arguments),!1))||this;return t.hasSegments=!1,t.isLastSegmentIgnored=!1,t.lastSegmentIndex=0,t.lastTime=-1,t.mediaSegments=[],t}return J(t,e),t.prototype.fetchMediaSegments=function(e,t,n){return r=this,i=void 0,a=function(){var r,i;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,(0,U.l)(e).getItemSegments({itemId:t,includeSegmentTypes:n})];case 1:return r=o.sent().data,this.mediaSegments=r.Items||[],[3,3];case 2:return i=o.sent(),console.error("[MediaSegmentManager] failed to fetch segments",i),this.mediaSegments=[],[3,3];case 3:return[2]}}))},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}l((a=a.apply(r,i||[])).next())}));var r,i,o,a},t.prototype.skipSegment=function(e){if(void 0!==e.StartTicks&&this.lastTime>e.StartTicks)console.info("[MediaSegmentManager] ignoring skipping segment that has been seeked back into",e),this.isLastSegmentIgnored=!0;else if(e.EndTicks){if(e.StartTicks&&e.EndTicks-e.StartTicks<V.wi)return console.info("[MediaSegmentManager] ignoring skipping segment with duration <1s",e),void(this.isLastSegmentIgnored=!0);console.debug("[MediaSegmentManager] skipping to %s ms",e.EndTicks/V.Jb),this.playbackManager.seek(e.EndTicks,this.player)}else console.debug("[MediaSegmentManager] skipping to next item in queue"),this.playbackManager.nextTrack(this.player)},t.prototype.promptToSkip=function(e){if(e.StartTicks&&e.EndTicks&&e.EndTicks-e.StartTicks<3*V.wi)return console.info("[MediaSegmentManager] ignoring segment prompt with duration <3s",e),void(this.isLastSegmentIgnored=!0);this.playbackManager.promptToSkip(e)},t.prototype.performAction=function(e){if(this.mediaSegmentTypeActions&&e.Type&&this.mediaSegmentTypeActions[e.Type]){var t=this.mediaSegmentTypeActions[e.Type];t===K.M.Skip?this.skipSegment(e):t===K.M.AskToSkip&&this.promptToSkip(e)}else console.error("[MediaSegmentManager] segment type missing from action map",e,this.mediaSegmentTypeActions)},t.prototype.onPlayerPlaybackStart=function(e,t){var n,r,i,o;this.isLastSegmentIgnored=!1,this.lastSegmentIndex=0,this.lastTime=-1,this.hasSegments=!!(null===(n=t.MediaSource)||void 0===n?void 0:n.HasSegments);var a=null===(r=t.MediaSource)||void 0===r?void 0:r.Id,s=(null===(i=t.NowPlayingItem)||void 0===i?void 0:i.ServerId)||(null===(o=B.tF.currentApiClient())||void 0===o?void 0:o.serverId());if(this.hasSegments&&s&&a)if(this.mediaSegmentTypeActions=Object.values(F.w).map((function(e){return{type:e,action:(0,q._)(T.currentSettings,e)}})).filter((function(e){var t=e.action;return!!t&&t!==K.M.None})).reduce((function(e,t){var n=t.type,r=t.action;return r&&(e[n]=r),e}),{}),Object.keys(this.mediaSegmentTypeActions).length){var l=(0,z.C)(B.tF.getApiClient(s));this.fetchMediaSegments(l,a,Object.keys(this.mediaSegmentTypeActions).map((function(e){return e})))}else console.info("[MediaSegmentManager] user has no media segment actions enabled")},t.prototype.onPlayerTimeUpdate=function(){if(this.hasSegments&&this.mediaSegments.length){var e=this.playbackManager.currentTime(this.player)*V.Jb,t=function(e,t,n){void 0===n&&(n=0);var r=e[n];if(G(r,t))return{index:n,segment:r};var i=1;n>0&&r.StartTicks&&r.StartTicks>t&&(i=-1);for(var o=n,a=e[o];o>=0&&o<e.length;a=e[o+=i]){if(H(a,t,i))return;if(G(a,t))return{index:o,segment:a}}}(this.mediaSegments,e,this.lastSegmentIndex);!t||this.isLastSegmentIgnored&&this.lastSegmentIndex===t.index||(console.debug("[MediaSegmentManager] found %s segment at %s ms",t.segment.Type,e/V.Jb,t),this.isLastSegmentIgnored=!1,this.performAction(t.segment),this.lastSegmentIndex=t.index),this.lastTime=e}},t}(Q),$=function(e){return new X(e)},Z=n(31524),ee=n(50921),te=n(34789),ne=n(13615),re=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ie=[96,128,192,256,384,512],oe="mediaSession"in navigator,ae=!!window.NativeShell,se=function(e){var t=[];return ie.forEach((function(n){var r=(0,Z.V)(e,{height:n});r&&t.push({src:r,sizes:"".concat(n,"x").concat(n)})})),t},le=function(){oe?navigator.mediaSession.metadata=null:ae&&ne.A.hideMediaSession()},ue=function(e){function t(t){var n=e.call(this,t)||this;return le(),oe&&n.bindNavigatorSession(),n}return re(t,e),t.prototype.bindNavigatorSession=function(){var e,t,n=["pause","play","previoustrack","nexttrack","stop","seekto"];te.A.iOS||n.push("seekbackward","seekforward");try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),i=r.next();!i.done;i=r.next()){var o=i.value;try{navigator.mediaSession.setActionHandler(o,this.onMediaSessionAction.bind(this))}catch(e){console.warn('[MediaSessionSubscriber] Failed to add "'.concat(o,'" action handler'),e)}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype.onMediaSessionAction=function(e){switch(e.action){case"pause":return this.playbackManager.pause(this.player);case"play":return this.playbackManager.unpause(this.player);case"stop":return this.playbackManager.stop(this.player);case"seekbackward":return this.playbackManager.rewind(this.player);case"seekforward":return this.playbackManager.fastForward(this.player);case"seekto":return this.playbackManager.seekMs((e.seekTime||0)*V.If,this.player);case"previoustrack":return this.playbackManager.previousTrack(this.player);case"nexttrack":return this.playbackManager.nextTrack(this.player);default:console.info("[MediaSessionSubscriber] Unhandled media session action",e)}},t.prototype.onMediaSessionUpdate=function(e,t){var n,r=e.type;void 0===t&&(t=this.playbackManager.getPlayerState(this.player));var i=t.NowPlayingItem;if(!i)return console.debug("[MediaSessionSubscriber] no now playing item; resetting media session",t),le();var o=i.MediaType===a.z.Video,s=!!(null===(n=this.player)||void 0===n?void 0:n.isLocalPlayer);if(s&&o)console.debug("[MediaSessionSubscriber] ignoring local player update");else{var l=i.Album||void 0,u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,ee.Y)(i,!1)||[],2),c=u[0],d=u[1],f=d||c,p=d&&c;oe?navigator.mediaSession.metadata&&navigator.mediaSession.metadata.album===l&&navigator.mediaSession.metadata.artist===f&&navigator.mediaSession.metadata.title===p||(navigator.mediaSession.metadata=new MediaMetadata({title:p,artist:f,album:l,artwork:se(i)})):ne.A.updateMediaSession({action:r,isLocalPlayer:s,itemId:i.Id,title:p,artist:f,album:l,duration:i.RunTimeTicks?Math.round(i.RunTimeTicks/V.Jb):0,position:t.PlayState.PositionTicks?Math.round(t.PlayState.PositionTicks/V.Jb):0,imageUrl:(0,Z.V)(i,{maxHeight:3e3}),canSeek:!!t.PlayState.CanSeek,isPaused:!!t.PlayState.IsPaused})}},t.prototype.onPlayerChange=function(){this.onMediaSessionUpdate({type:"timeupdate"})},t.prototype.onPlayerPause=function(e){this.onMediaSessionUpdate(e)},t.prototype.onPlayerPlaybackStart=function(e,t){this.onMediaSessionUpdate(e,t)},t.prototype.onPlayerPlaybackStop=function(){le()},t.prototype.onPlayerStateChange=function(e,t){this.onMediaSessionUpdate(e,t)},t.prototype.onPlayerUnpause=function(e){this.onMediaSessionUpdate(e)},t}(Q),ce=n(97339),de=n(80262);function fe(e){return"NotSupportedError"===(null==e?void 0:e.name)?de.F.MEDIA_NOT_SUPPORTED:de.F.PLAYER_ERROR}var pe=n(71286),me=n(36300),ye=n(9164),ve=n(46782),he=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function ge(){if(this){if(document.activeElement===this){this.blur();var e=document.querySelector(".btnPause");e&&ye.A.isCurrentlyFocusable(e)&&ye.A.focus(e)}this.classList.add("hide")}}var be=function(e){function t(t){var n=e.call(this,t)||this;return n.skipElement=null,n.onOsdChanged=n.onOsdChanged.bind(n),n}return he(t,e),t.prototype.createSkipElement=function(){var e=this;!this.skipElement&&this.currentSegment&&(document.body.insertAdjacentHTML("beforeend",'<div class="skip-button-container"><button is="emby-button" class="skip-button hide skip-button-hidden"></button></div>'),this.skipElement=document.body.querySelector(".skip-button"),this.skipElement&&this.skipElement.addEventListener("click",(function(){var t,n=e.playbackManager.currentTime()*V.Jb;(null===(t=e.currentSegment)||void 0===t?void 0:t.EndTicks)&&(n<e.currentSegment.EndTicks-V.wi?e.playbackManager.seek(e.currentSegment.EndTicks):e.hideSkipButton())})))},t.prototype.setButtonText=function(){this.skipElement&&this.currentSegment&&(this.skipElement.innerHTML=C.Ay.translate("MediaSegmentSkipPrompt",C.Ay.translate("MediaSegmentType.".concat(this.currentSegment.Type))),this.skipElement.innerHTML+='<span class="material-icons skip_next" aria-hidden="true"></span>')},t.prototype.showSkipButton=function(e){var t=this,n=this.skipElement;if(n){this.clearHideTimeout(),me.Ay.removeEventListener(n,me.Ay.whichTransitionEvent(),ge,{once:!0}),n.classList.remove("hide"),e.animate?n.classList.remove("no-transition"):n.classList.add("no-transition"),n.offsetWidth;var r=document.activeElement&&ye.A.isCurrentlyFocusable(document.activeElement);e.focus&&!r&&ye.A.focus(n),requestAnimationFrame((function(){n.classList.remove("skip-button-hidden"),e.keep||(t.hideTimeout=setTimeout(t.hideSkipButton.bind(t),8e3))}))}},t.prototype.hideSkipButton=function(){var e=this.skipElement;e&&(e.classList.remove("no-transition"),e.offsetWidth,requestAnimationFrame((function(){e.classList.add("skip-button-hidden"),me.Ay.addEventListener(e,me.Ay.whichTransitionEvent(),ge,{once:!0})})))},t.prototype.clearHideTimeout=function(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)},t.prototype.onOsdChanged=function(e,t){this.currentSegment&&(t?this.showSkipButton({animate:!1,keep:!0,focus:!1}):this.hideTimeout||this.hideSkipButton())},t.prototype.onPromptSkip=function(e,t){this.player&&null!=t.EndTicks&&t.EndTicks>=this.playbackManager.currentItem(this.player).RunTimeTicks&&this.playbackManager.getNextItem()&&T.enableNextVideoInfoOverlay()||this.currentSegment||(this.currentSegment=t,this.createSkipElement(),this.setButtonText(),this.showSkipButton({animate:!0,focus:ve.A.tv}))},t.prototype.onPlayerTimeUpdate=function(){if(this.currentSegment){var e=this.playbackManager.currentTime(this.player)*V.Jb;G(this.currentSegment,e)||(this.currentSegment=null,this.hideSkipButton())}},t.prototype.onPlayerChange=function(){this.playbackManager.getCurrentPlayer()&&(d.A.off(document,pe.B.SHOW_VIDEO_OSD,this.onOsdChanged),d.A.on(document,pe.B.SHOW_VIDEO_OSD,this.onOsdChanged))},t.prototype.onPlaybackStop=function(e,t){this.currentSegment=null,this.hideSkipButton(),t.nextItem||d.A.off(document,pe.B.SHOW_VIDEO_OSD,this.onOsdChanged)},t}(Q);function Se(e){return Se="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},Se(e)}function Ae(e){return function(e){if(Array.isArray(e))return je(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ie(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return we(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(we(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,we(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,we(d,"constructor",u),we(u,"constructor",l),l.displayName="GeneratorFunction",we(u,i,"GeneratorFunction"),we(d),we(d,i,"Generator"),we(d,r,(function(){return this})),we(d,"toString",(function(){return"[object Generator]"})),(xe=function(){return{w:o,m:f}})()}function we(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}we=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){we(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},we(e,t,n,r)}function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Ie(e,t)||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.")}()}function ke(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ie(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ie(e,t){if(e){if("string"==typeof e)return je(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Ce(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Ee(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ce(o,r,i,a,s,"next",e)}function s(e){Ce(o,r,i,a,s,"throw",e)}a(void 0)}))}}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Me(e,t,n){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e){var t=function(e){if("object"!=Se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}function Re(e){return!e.getPlaylist&&e.isLocalPlayer}function De(e){return e.isLocalPlayer&&_.g.supports(ce.Y.PhysicalVolumeControl)}function Ne(e,t,n,r,i,o,a){if(i){var s=Object.assign({},t.PlayState);s.ItemId=t.NowPlayingItem.Id,a&&(s.EventName=a),r&&function(e,t,n,r){t.NowPlayingQueue=function(e,t){return(t=t||e._currentPlayer)&&!Re(t)?t.getPlaylistSync():e._playQueueManager.getPlaylist()}(e,n).map((function(e){var t={Id:e.Id,PlaylistItemId:e.PlaylistItemId};return e.ServerId!==r&&(t.ServerId=e.ServerId),t}))}(e,s,n,i),B.tF.getApiClient(i)[o](s).then((function(){d.A.trigger(e,"reportplayback",[!0])}))}else d.A.trigger(e,"reportplayback",[!1])}function Fe(e){return e.toLowerCase().replace(" ","")}function Ue(e,t){var n=B.tF.getApiClient(e);if(t.Ids&&1===t.Ids.split(",").length){var r=t.Ids.split(",");return n.getItem(n.getCurrentUserId(),r).then((function(e){return{Items:[e],TotalRecordCount:1}}))}return-1===t.Limit?delete t.Limit:t.Limit=t.Limit||300,t.Fields=["Chapters","Trickplay"],t.ExcludeLocationTypes="Virtual",t.EnableTotalRecordCount=!1,t.CollapseBoxSetItems=!1,(0,R.J)(n,n.getCurrentUserId(),t)}function Ve(e,t){var n,r=(0,u.A)({},e,t),o=(null===(n=r.Filters)||void 0===n?void 0:n.split(","))||[];return o.includes(i.s.IsNotFolder)||o.push(i.s.IsNotFolder),r.Filters=o.join(","),r}function Be(e,t){if(t=(t||"").toLowerCase(),"audio"===e){if("opus"===t)return"audio/ogg";if("webma"===t)return"audio/webm";if("m4a"===t)return"audio/mp4"}else if("video"===e){if("mkv"===t)return"video/x-matroska";if("m4v"===t)return"video/mp4";if("mov"===t)return"video/quicktime";if("mpg"===t)return"video/mpeg";if("flv"===t)return"video/x-flv"}return e+"/"+t}function ze(e,t){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)","i").exec(t);return null==n?"":decodeURIComponent(n[1].replace(/\+/g," "))}function qe(e){return e.isLocalPlayer}function He(e){return!!e.Id}function Ge(e){var t=null,n=null,r=null;return e.CodecProfiles.forEach((function(e){"Audio"===e.Type&&(e.Conditions||[]).forEach((function(e){"LessThanEqual"===e.Condition&&"AudioBitDepth"===e.Property?n=e.Value:"LessThanEqual"===e.Condition&&"AudioSampleRate"===e.Property?t=e.Value:"LessThanEqual"===e.Condition&&"AudioBitrate"===e.Property&&(r=e.Value)}))})),{maxAudioSampleRate:t,maxAudioBitDepth:n,maxAudioBitrate:r}}var We=(new Date).getTime();function Ye(e,t,n,r,i,o){var a="Audio/"+e.Id+"/universal";return We++,r.getUrl(a,{UserId:r.getCurrentUserId(),DeviceId:r.deviceId(),MaxStreamingBitrate:o.maxAudioBitrate||o.maxBitrate,Container:n,TranscodingContainer:t.Container||null,TranscodingProtocol:t.Protocol||null,AudioCodec:t.AudioCodec,MaxAudioSampleRate:o.maxAudioSampleRate,MaxAudioBitDepth:o.maxAudioBitDepth,ApiKey:r.accessToken(),PlaySessionId:We,StartTimeTicks:i||0,EnableRedirection:!0,EnableRemoteMedia:_.g.supports(ce.Y.RemoteAudio),EnableAudioVbrEncoding:t.EnableAudioVbrEncoding})}function Qe(e,t,n,r,i){var o=t.TranscodingProfiles.filter((function(e){return"Audio"===e.Type&&"Streaming"===e.Context}))[0],a="";t.DirectPlayProfiles.forEach((function(e){"Audio"===e.Type&&(a?a+=","+e.Container:a=e.Container,e.AudioCodec&&(a+="|"+e.AudioCodec))}));var s=Ge(t);return Ye(e,o,a,r,i,Le({maxBitrate:n},s))}function Ke(e,t,n,r,i){return function(e,t,n,r,i){var o=t.TranscodingProfiles.filter((function(e){return"Audio"===e.Type&&"Streaming"===e.Context}))[0],a="";t.DirectPlayProfiles.forEach((function(e){"Audio"===e.Type&&(a?a+=","+e.Container:a=e.Container,e.AudioCodec&&(a+="|"+e.AudioCodec))}));for(var s=Ge(t),l=[],u=0,c=e.length;u<c;u++){var d=e[u],f=void 0;"Audio"!==d.MediaType||m.Ay.isLocalItem(d)||(f=Ye(d,o,a,r,i,Le({maxBitrate:n},s))),l.push(f||""),0===u&&(i=0)}return Promise.resolve(l)}(e,t,n,r,i).then((function(t){for(var n=0,r=e.length;n<r;n++){var i=e[n],o=t[n];o&&(i.PresetMediaSource={StreamUrl:o,Id:i.Id,MediaStreams:[],RunTimeTicks:i.RunTimeTicks})}}))}function Je(e,t,n,r,i,o,a){return Xe.apply(this,arguments)}function Xe(){return(Xe=Ee(xe().m((function e(t,n,r,i,o,a,s){var u,c,d,f,y;return xe().w((function(e){for(;;)switch(e.n){case 0:if(m.Ay.isLocalItem(r)||"Audio"!==r.MediaType||t.useServerPlaybackInfoForAudio){e.n=1;break}return e.a(2,{MediaSources:[{StreamUrl:Qe(r,i,s.maxBitrate,n,s.startPosition),Id:r.Id,MediaStreams:[],RunTimeTicks:r.RunTimeTicks}]});case 1:if(!r.PresetMediaSource){e.n=2;break}return e.a(2,{MediaSources:[r.PresetMediaSource]});case 2:return u=r.Id,c={UserId:n.getCurrentUserId(),StartTimeTicks:s.startPosition||0},d=(0,z.C)(n),f=(0,l.n)(d),s.isPlayback?(c.IsPlayback=!0,c.AutoOpenLiveStream=!0):(c.IsPlayback=!1,c.AutoOpenLiveStream=!1),null!=s.audioStreamIndex&&(c.AudioStreamIndex=s.audioStreamIndex),null!=s.subtitleStreamIndex&&(c.SubtitleStreamIndex=s.subtitleStreamIndex),null!=s.secondarySubtitleStreamIndex&&(c.SecondarySubtitleStreamIndex=s.secondarySubtitleStreamIndex),null!=s.enableDirectPlay&&(c.EnableDirectPlay=s.enableDirectPlay),null!=s.enableDirectStream&&(c.EnableDirectStream=s.enableDirectStream),null!=s.allowVideoStreamCopy&&(c.AllowVideoStreamCopy=s.allowVideoStreamCopy),null!=s.allowAudioStreamCopy&&(c.AllowAudioStreamCopy=s.allowAudioStreamCopy),o&&(c.MediaSourceId=o),a&&(c.LiveStreamId=a),s.maxBitrate&&(c.MaxStreamingBitrate=s.maxBitrate),t.enableMediaProbe&&!t.enableMediaProbe(r)&&(c.EnableMediaProbe=!1),!1!==c.EnableDirectStream&&t.supportsPlayMethod&&!t.supportsPlayMethod("DirectStream",r)&&(c.EnableDirectStream=!1),t.getDirectPlayProtocols&&(c.DirectPlayProtocols=t.getDirectPlayProtocols()),c.AlwaysBurnInSubtitleWhenTranscoding=p.A.alwaysBurnInSubtitleWhenTranscoding(),c.DeviceProfile=i,e.n=3,f.getPostedPlaybackInfo({itemId:u,playbackInfoDto:c});case 3:return y=e.v,e.a(2,y.data)}}),e)})))).apply(this,arguments)}function $e(e,t,n){var r="BluRay"===n.VideoType||"Dvd"===n.VideoType||"HdDvd"===n.VideoType;if(n.SupportsDirectPlay||r){if(n.IsRemote&&!_.g.supports(ce.Y.RemoteVideo))return Promise.resolve(!1);if("Http"===n.Protocol&&!n.RequiredHttpHeaders.length)return n.SupportsDirectStream||n.SupportsTranscoding?function(e,t){return e.IsRemote?Promise.resolve(!0):t.getEndpointInfo().then((function(t){if(t.IsInNetwork){if(!t.IsLocal){var n=(e.Path||"").toLowerCase();if(-1!==n.indexOf("localhost")||-1!==n.indexOf("127.0.0.1"))return Promise.resolve(!1)}return Promise.resolve(!0)}return Promise.resolve(!1)}))}(n,e):Promise.resolve(!0)}return Promise.resolve(!1)}function Ze(e,t){return!t.ErrorCode||(et(0,t.ErrorCode===s.V.NoCompatibleStream?"PlaybackErrorNoCompatibleStream":"PlaybackError.".concat(t.ErrorCode)),!1)}function et(e,t){(0,L.A)({text:C.Ay.translate(t),title:C.Ay.translate("HeaderPlaybackError")})}function tt(e){e.fullscreen=!1!==e.fullscreen}function nt(e){return!e.isLocalPlayer}function rt(e,t){return{name:t.name,id:t.id,playerName:t.name,playableMediaTypes:["Audio","Video","Photo","Book"].map(t.canPlayMediaType),isLocalPlayer:t.isLocalPlayer,supportedCommands:e.getSupportedCommands(t)}}function it(e){return e.getTargets?e.getTargets():Promise.resolve([rt(e)])}function ot(e,t){var n=e.isLocalPlayer?0:1,r=t.isLocalPlayer?0:1;return n=n.toString()+e.name,r=r.toString()+t.name,n.localeCompare(r)}var at=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t,i=this,s=[],l=null;this._playNextAfterEnded=!0;var u,v={};function h(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw new Error("player cannot be null");var n=t?U(e).secondarySubtitleStreamIndex:U(e).subtitleStreamIndex;return null==n||-1===n?null:i.getSubtitleStream(e,n)}function g(e){var t=i._currentPlayer;t&&e.id!==t.id||b(null)}function b(e,n){var r=i._currentPlayer,o=t;if(e&&!n&&e.isLocalPlayer&&(n=rt(i,e)),e&&!n)throw new Error("targetInfo cannot be null");l=null,i._currentPlayer=e,t=n,n&&console.debug("Active player: "+JSON.stringify(n)),r&&i.endPlayerUpdates(r),e&&i.beginPlayerUpdates(e),function(e,t,n,r,i){(t||r)&&(n&&i&&n.id===i.id||d.A.trigger(e,"playerchange",[t,n,r]))}(i,e,n,r,o)}function S(e,t){e||(e=B.tF.currentApiClient());var n=e.getSavedEndpointInfo()||{};return p.A.maxStreamingBitrate(n.IsInNetwork,t)}function A(e){return e.DeliveryMethod?e.DeliveryMethod:e.IsExternal?"External":"Embed"}function x(e){if(!e)throw new Error("player cannot be null");return-1!==(U(e).streamInfo.url||"").toLowerCase().indexOf(".m3u8")||(e.seekable?e.seekable():!("Transcode"===i.playMethod(e))&&e.duration())}function w(e,t,n){if(x(e)&&null==n)e.currentTime(parseInt(t/1e4,10));else{n=n||{};var r=U(e).streamInfo.liveStreamId,o=U(e).streamInfo.lastMediaInfoQuery,a=i.playSessionId(e),s=i.currentItem(e);e.getDeviceProfile(s,{isRetry:!1===n.EnableDirectPlay}).then((function(l){var u=null==n.AudioStreamIndex?U(e).audioStreamIndex:n.AudioStreamIndex,c=null==n.SubtitleStreamIndex?U(e).subtitleStreamIndex:n.SubtitleStreamIndex,d=null==n.SecondarySubtitleStreamIndex?U(e).secondarySubtitleStreamIndex:n.SecondarySubtitleStreamIndex,f=i.currentMediaSource(e),p=B.tF.getApiClient(s.ServerId);t&&(t=parseInt(t,10));var m=n.MaxStreamingBitrate||i.getMaxStreamingBitrate(e),y=s.playOptions||{fullscreen:!0},v={maxBitrate:m,startPosition:t,isPlayback:!0,audioStreamIndex:u,subtitleStreamIndex:c,enableDirectPlay:n.EnableDirectPlay,enableDirectStream:n.EnableDirectStream,allowVideoStreamCopy:n.AllowVideoStreamCopy,allowAudioStreamCopy:n.AllowAudioStreamCopy};Je(e,p,s,l,f.Id,r,v).then((function(n){if(Ze(0,n)){f=n.MediaSources[0];var r=Z(p,s.MediaType,s,f,t,e);if(r.fullscreen=y.fullscreen,r.lastMediaInfoQuery=o,r.resetSubtitleOffset=!1,!r.url)return W(),void et(0,"PlaybackError.".concat(de.F.NO_MEDIA_ERROR));U(e).subtitleStreamIndex=c,U(e).secondarySubtitleStreamIndex=d,U(e).audioStreamIndex=u,U(e).maxStreamingBitrate=m,function(e,t,n,r){var i=U(t);i.isChangingStream=!0,i.streamInfo&&n?e.stopActiveEncodings(n).then((function(){var i=function(){e.stopActiveEncodings(n)};P(0,t,r).then(i,i)})):P(0,t,r)}(p,e,a,r)}}))}))}}function P(e,t,n){var r=U(t);return r.streamInfo=n,t.play(n).then((function(){r.isChangingStream=!1,n.started=!0,n.ended=!1,Fe(t,"timeupdate")}),(function(e){r.isChangingStream=!1,ye.call(t,e,{type:fe(e),streamInfo:n})}))}function k(e,t){return I.apply(this,arguments)}function I(){return(I=Ee(xe().m((function e(t,n){var r,i,o,a,s;return xe().w((function(e){for(;;)switch(e.n){case 0:if(t.length){e.n=1;break}return e.a(2,[]);case 1:if(C(t,n),r=t[0],i=r.ServerId,o=n.queryOptions||{},!(a=L(r,i,n,o,t))){e.n=3;break}return e.n=2,a;case 2:return s=e.v,e.a(2,s?s.Items:t);case 3:return e.a(2,t);case 4:return e.a(2)}}),e)})))).apply(this,arguments)}function C(e,t){e.length>1&&null!=t&&t.ids&&e.sort((function(e,n){return t.ids.indexOf(e.Id)-t.ids.indexOf(n.Id)}))}function L(e,t,n,i,s){var l=n.shuffle?o.B.Random:o.B.SortName;switch(e.Type){case r.D.Program:return Ue(t,{Ids:e.ChannelId});case r.D.Playlist:return Ue(t,{ParentId:e.Id,SortBy:n.shuffle?l:void 0});case r.D.MusicArtist:return Ue(t,Ve({ArtistIds:e.Id,Recursive:!0,SortBy:n.shuffle?l:[o.B.Album,o.B.ParentIndexNumber,o.B.IndexNumber,o.B.SortName].join(","),MediaTypes:a.z.Audio},i));case r.D.PhotoAlbum:return Ue(t,Ve({ParentId:e.Id,Recursive:!1,SortBy:l,MediaTypes:a.z.Photo,Limit:-1},i));case r.D.MusicGenre:return Ue(t,Ve({GenreIds:e.Id,Recursive:!0,SortBy:l,MediaTypes:a.z.Audio},i));case r.D.Genre:return Ue(t,Ve({GenreIds:e.Id,ParentId:e.ParentId,Recursive:!0,SortBy:l,MediaTypes:a.z.Video},i));case r.D.Studio:return Ue(t,Ve({StudioIds:e.Id,Recursive:!0,SortBy:l,MediaTypes:a.z.Video},i));case r.D.Person:return Ue(t,Ve({PersonIds:e.Id,ParentId:e.ParentId,Recursive:!0,SortBy:l,MediaTypes:a.z.Video},i));case r.D.Series:case r.D.Season:return function(e,t,n){return F.apply(this,arguments)}(e,n,s);case r.D.Episode:return function(e,t,n){return 1===n.length&&!1!==ne(e,t).supportsProgress?function(e,t){return new Promise((function(n,r){var i=B.tF.getApiClient(e.ServerId),o=e.SeriesId,a=e.Id;o?i.getEpisodes(o,{IsVirtualUnaired:!1,IsMissing:!1,UserId:i.getCurrentUserId(),Fields:["Chapters","Trickplay"],limit:100,startItemId:a}).then((function(r){n(function(e,t,n){var r,i=ke(e.Items.entries());try{for(i.s();!(r=i.n()).done;){var o=Pe(r.value,2),a=o[0];if(o[1].Id===t.Id){e.StartIndex=a;break}}}catch(e){i.e(e)}finally{i.f()}return n.startIndex=e.StartIndex,e.TotalRecordCount=e.Items.length,e}(r,e,t))}),r):n(null)}))}(e,t):null}(e,n,s)}return function(e,t,n,r){if("Photo"===e.MediaType)return Ue(t,Ve({ParentId:e.ParentId,Filters:"IsNotFolder",Recursive:!1,SortBy:n.shuffle?"Random":"SortName",MediaTypes:"Photo,Video",Limit:-1},r)).then((function(t){var r=t.Items.map((function(e){return e.Id})).indexOf(e.Id);return-1===r&&(r=0),n.startIndex=r,Promise.resolve(t)}));if(e.IsFolder&&"homevideos"===e.CollectionType)return Ue(t,Ve({ParentId:e.Id,Filters:"IsNotFolder",Recursive:!0,SortBy:n.shuffle?"Random":"SortName",MediaTypes:"Photo",Limit:-1},r));if(e.IsFolder&&"musicvideos"===e.CollectionType)return Ue(t,Ve({ParentId:e.Id,Filters:"IsFolder",Recursive:!0,SortBy:n.shuffle?"Random":"SortName",MediaTypes:"Video",Limit:-1},r));if(e.IsFolder){var i=null;return n.shuffle?i="Random":"BoxSet"!==e.Type&&(i="music"===e.CollectionType||"Audio"===e.MediaType?"Album,ParentIndexNumber,IndexNumber,SortName":"SortName"),Ue(t,Ve({ParentId:e.Id,Filters:"IsNotFolder",Recursive:!0,SortBy:i,MediaTypes:"Audio,Video"},r))}return null}(e,t,n,i)}function F(){return(F=Ee(xe().m((function e(t,n,r){var i,o,a,s,l,u,c,d,f,p,m,y,v,h,g,b;return xe().w((function(e){for(;;)switch(e.n){case 0:if(i=B.tF.getApiClient(t.ServerId),o="Season"===t.Type?r[n.startIndex||0].Id:void 0,a=o&&1===r.length?o:void 0,s=t.SeriesId||t.Id,l=i.getCurrentUserId(),n.shuffle||a){e.n=2;break}return e.n=1,(0,R.J)(i,l,{SortBy:"SeriesSortName,SortName",SortOrder:"Ascending",IncludeItemTypes:"Episode",Recursive:!0,IsMissing:!1,ParentId:s,limit:1,Filters:"IsUnplayed"});case 1:d=e.v,u=null==d||null===(c=d.Items)||void 0===c||null===(c=c.at(0))||void 0===c?void 0:c.Id;case 2:return e.n=3,i.getEpisodes(s,{IsVirtualUnaired:!1,IsMissing:!1,SeasonId:a,limit:a?void 0:100,SortBy:n.shuffle?"Random":void 0,UserId:l,Fields:["Chapters","Trickplay"],startItemId:u});case 3:if(f=e.v,!n.shuffle){e.n=4;break}f.StartIndex=0,e.n=14;break;case 4:f.StartIndex=void 0,m=ke(f.Items.entries()),e.p=5,m.s();case 6:if((y=m.n()).done){e.n=10;break}if(v=Pe(y.value,2),h=v[0],g=v[1],!o||1==r.length){e.n=8;break}if(g.SeasonId!=o){e.n=7;break}void 0===p&&(p=h),e.n=8;break;case 7:return e.a(3,9);case 8:if(g.UserData.Played){e.n=9;break}return f.StartIndex=h,e.a(3,10);case 9:e.n=6;break;case 10:e.n=12;break;case 11:e.p=11,b=e.v,m.e(b);case 12:return e.p=12,m.f(),e.f(12);case 13:f.StartIndex=f.StartIndex||p||0;case 14:return n.startIndex=f.StartIndex,f.TotalRecordCount=f.Items.length,e.a(2,f)}}),e,null,[[5,11,12,13]])})))).apply(this,arguments)}function U(e){if(!e)throw new Error("player cannot be null");if(!e.name)throw new Error("player name cannot be null");var t=v[e.name];return t||(v[e.name]={},t=v[e.name]),e}function V(e){if(!e)throw new Error("player cannot be null");var t=Math.floor(1e4*e.currentTime());return U(e).streamInfo&&(t+=U(e).streamInfo.transcodingOffsetTicks||0),t}this._playQueueManager=new j,i.currentItem=function(e){if(!e)throw new Error("player cannot be null");if(e.currentItem)return e.currentItem();var t=U(e);return t.streamInfo?t.streamInfo.item:null},i.currentMediaSource=function(e){if(!e)throw new Error("player cannot be null");if(e.currentMediaSource)return e.currentMediaSource();var t=U(e);return t.streamInfo?t.streamInfo.mediaSource:null},i.playMethod=function(e){if(!e)throw new Error("player cannot be null");if(e.playMethod)return e.playMethod();var t=U(e);return t.streamInfo?t.streamInfo.playMethod:null},i.playSessionId=function(e){if(!e)throw new Error("player cannot be null");if(e.playSessionId)return e.playSessionId();var t=U(e);return t.streamInfo?t.streamInfo.playSessionId:null},i.getPlayerInfo=function(){var e=i._currentPlayer;if(!e)return null;var n=t||{};return{name:e.name,isLocalPlayer:e.isLocalPlayer,id:n.id,deviceName:n.deviceName,playableMediaTypes:n.playableMediaTypes,supportedCommands:n.supportedCommands}},i.setActivePlayer=function(e,t){if("localplayer"!==e&&"localplayer"!==e.name){if("string"==typeof e&&(e=s.filter((function(t){return t.name===e}))[0]),!e)throw new Error("null player");b(e,t)}else{var n;if(null!==(n=i._currentPlayer)&&void 0!==n&&n.isLocalPlayer)return;b(null,null)}},i.trySetActivePlayer=function(e,t){if("localplayer"!==e&&"localplayer"!==e.name){if("string"==typeof e&&(e=s.filter((function(t){return t.name===e}))[0]),!e)throw new Error("null player");if(l!==t.id){l=t.id;var n=e.tryPair?e.tryPair(t):Promise.resolve();d.A.trigger(i,"pairing"),n.then((function(){d.A.trigger(i,"paired"),b(e,t)}),(function(){d.A.trigger(i,"pairerror"),l===t.id&&(l=null)}))}}else{var r;null!==(r=i._currentPlayer)&&void 0!==r&&r.isLocalPlayer}},i.getTargets=function(){var e=s.filter(nt).map(it);return Promise.all(e).then((function(e){return e.flat().sort(ot)}))},i.playerHasSecondarySubtitleSupport=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i._currentPlayer;return!!e&&Boolean(e.supports("SecondarySubtitles"))},i.trackHasSecondarySubtitleSupport=function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:i._currentPlayer)||!e)return!1;var t=(e.Codec||"").toLowerCase();return"ssa"!==t&&"ass"!==t&&"External"===A(e)},i.secondarySubtitleTracks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i._currentPlayer;return i.subtitleTracks(e).filter((function(t){return i.trackHasSecondarySubtitleSupport(t,e)}))},i.getSubtitleStream=function(e,t){return i.subtitleTracks(e).filter((function(e){return"Subtitle"===e.Type&&e.Index===t}))[0]},i.getPlaylist=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getPlaylistSync?Promise.resolve(e.getPlaylistSync()):e.getPlaylist():Promise.resolve(i._playQueueManager.getPlaylist())},i.promptToSkip=function(e,t){t=t||i._currentPlayer,e&&this._skipSegment&&d.A.trigger(t,N.g.PromptSkip,[e])},i.isPlaying=function(e){var t,n;return null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.isPlaying?e.isPlaying():null!=(null===(n=e)||void 0===n?void 0:n.currentSrc())},i.isPlayingMediaType=function(e,t){var n;return null!==(n=t=t||i._currentPlayer)&&void 0!==n&&n.isPlaying?t.isPlaying(e):!!i.isPlaying(t)&&U(t).streamInfo.mediaType===e},i.isPlayingLocally=function(e,t){var n;return!(null===(n=t=t||i._currentPlayer)||void 0===n||!n.isLocalPlayer)&&e.filter((function(e){return i.isPlayingMediaType(e,t)})).length>0},i.isPlayingVideo=function(e){return i.isPlayingMediaType("Video",e)},i.isPlayingAudio=function(e){return i.isPlayingMediaType("Audio",e)},i.getPlayers=function(){return s},i.canPlay=function(e){var t=e.Type;if("PhotoAlbum"===t||"MusicGenre"===t||"Season"===t||"Series"===t||"BoxSet"===t||"MusicAlbum"===t||"MusicArtist"===t||"Playlist"===t)return!0;if("Virtual"===e.LocationType&&"Program"!==t)return!1;if("Program"===t){if(!e.EndDate||!e.StartDate)return!1;if((new Date).getTime()>f.Ay.parseISO8601Date(e.EndDate).getTime()||(new Date).getTime()<f.Ay.parseISO8601Date(e.StartDate).getTime())return!1}return null!=ne(e,{fullscreen:!0})},i.toggleAspectRatio=function(e){if(e=e||i._currentPlayer){for(var t=i.getAspectRatio(e),n=i.getSupportedAspectRatios(e),r=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){r=o;break}++r>=n.length&&(r=0),i.setAspectRatio(n[r].id,e)}},i.setAspectRatio=function(e,t){var n;null!==(n=t=t||i._currentPlayer)&&void 0!==n&&n.setAspectRatio&&t.setAspectRatio(e)},i.getSupportedAspectRatios=function(e){var t;return null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getSupportedAspectRatios?e.getSupportedAspectRatios():[]},i.getAspectRatio=function(e){var t;if(null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getAspectRatio)return e.getAspectRatio()},i.increasePlaybackRate=function(e){if(e=e||i._currentPlayer){for(var t=i.getPlaybackRate(e),n=i.getSupportedPlaybackRates(e),r=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){r=o;break}r=Math.min(r+1,n.length-1),i.setPlaybackRate(n[r].id,e)}},i.decreasePlaybackRate=function(e){if(e=e||i._currentPlayer){for(var t=i.getPlaybackRate(e),n=i.getSupportedPlaybackRates(e),r=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){r=o;break}r=Math.max(r-1,0),i.setPlaybackRate(n[r].id,e)}},i.getSupportedPlaybackRates=function(e){var t;return null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getSupportedPlaybackRates?e.getSupportedPlaybackRates():[]},i.setBrightness=function(e,t){(t=t||i._currentPlayer)&&(u||(u=!0,n.e(71454).then(n.bind(n,71454)).then()),t.setBrightness(e))},i.getBrightness=function(e){if(e=e||i._currentPlayer)return e.getBrightness()},i.setVolume=function(e,t){(t=t||i._currentPlayer)&&!De(t)&&t.setVolume(e)},i.getVolume=function(e){return(e=e||i._currentPlayer)&&!De(e)?e.getVolume():1},i.volumeUp=function(e){(e=e||i._currentPlayer)&&!De(e)&&e.volumeUp()},i.volumeDown=function(e){(e=e||i._currentPlayer)&&!De(e)&&e.volumeDown()},i.changeAudioStream=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.changeAudioStream();if(e){for(var t=i.currentMediaSource(e),n=[],r=0,o=t.MediaStreams.length;r<o;r++)"Audio"===t.MediaStreams[r].Type&&n.push(t.MediaStreams[r]);if(!(n.length<=1)){for(var a=i.getAudioStreamIndex(e),s=-1,l=0,u=n.length;l<u;l++)if(n[l].Index===a){s=l;break}var c=s+1;c>=n.length&&(c=0),c=-1===c?-1:n[c].Index,i.setAudioStreamIndex(c,e)}}},i.changeSubtitleStream=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.changeSubtitleStream();if(e){for(var t=i.currentMediaSource(e),n=[],r=0,o=t.MediaStreams.length;r<o;r++)"Subtitle"===t.MediaStreams[r].Type&&n.push(t.MediaStreams[r]);if(n.length){for(var a=i.getSubtitleStreamIndex(e),s=-1,l=0,u=n.length;l<u;l++)if(n[l].Index===a){s=l;break}var c=s+1;c>=n.length&&(c=-1),c=-1===c?-1:n[c].Index,i.setSubtitleStreamIndex(c,e)}}},i.getAudioStreamIndex=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getAudioStreamIndex():U(e).audioStreamIndex},i.setAudioStreamIndex=function(e,t){if((t=t||i._currentPlayer)&&!Re(t))return t.setAudioStreamIndex(e);"Transcode"!==i.playMethod(t)&&t.canSetAudioStreamIndex()?t.getDeviceProfile(i.currentItem(t)).then((function(n){!function(e,t,n){for(var r,i=e.MediaStreams,o=0,a=i.length;o<a;o++)if("Audio"===i[o].Type&&i[o].Index===t){r=i[o];break}if(!r)return!1;var s=e.Container.toLowerCase(),l=(r.Codec||"").toLowerCase();return!!l&&(n.DirectPlayProfiles||[]).some((function(e){return"Video"===e.Type&&(0,O.q)((e.Container||"").toLowerCase(),s)&&(0,O.q)((e.AudioCodec||"").toLowerCase(),l)}))}(i.currentMediaSource(t),e,n)?(w(t,V(t),{AudioStreamIndex:e}),U(t).audioStreamIndex=e):(t.setAudioStreamIndex(e),U(t).audioStreamIndex=e)})):(w(t,V(t),{AudioStreamIndex:e}),U(t).audioStreamIndex=e)},i.getMaxStreamingBitrate=function(e){var t;if(null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.getMaxStreamingBitrate)return e.getMaxStreamingBitrate();var n=U(e);if(n.maxStreamingBitrate)return n.maxStreamingBitrate;var r=n.streamInfo?n.streamInfo.mediaType:null,o=i.currentItem(e);return S(o?B.tF.getApiClient(o.ServerId):B.tF.currentApiClient(),r)},i.enableAutomaticBitrateDetection=function(e){var t;if(null!==(t=e=e||i._currentPlayer)&&void 0!==t&&t.enableAutomaticBitrateDetection)return e.enableAutomaticBitrateDetection();var n=U(e),r=n.streamInfo?n.streamInfo.mediaType:null,o=i.currentItem(e),a=(o?B.tF.getApiClient(o.ServerId):B.tF.currentApiClient()).getSavedEndpointInfo()||{};return p.A.enableAutomaticBitrateDetection(a.IsInNetwork,r)},i.setMaxStreamingBitrate=function(e,t){var n;if(null!==(n=t=t||i._currentPlayer)&&void 0!==n&&n.setMaxStreamingBitrate)return t.setMaxStreamingBitrate(e);var r=B.tF.getApiClient(i.currentItem(t).ServerId);r.getEndpointInfo().then((function(n){var i,o=U(t),a=o.streamInfo?o.streamInfo.mediaType:null;e.enableAutomaticBitrateDetection?(p.A.enableAutomaticBitrateDetection(n.IsInNetwork,a,!0),i=r.detectBitrate(!0)):(p.A.enableAutomaticBitrateDetection(n.IsInNetwork,a,!1),i=Promise.resolve(e.maxBitrate)),i.then((function(e){p.A.maxStreamingBitrate(n.IsInNetwork,a,e),w(t,V(t),{MaxStreamingBitrate:e})}))}))},i.isFullscreen=function(e){return!(e=e||i._currentPlayer).isLocalPlayer||e.isFullscreen?e.isFullscreen():c.A.isEnabled?c.A.isFullscreen:document.webkitIsFullScreen},i.toggleFullscreen=function(e){if(!(e=e||i._currentPlayer).isLocalPlayer||e.toggleFullscreen)return e.toggleFullscreen();if(c.A.isEnabled)c.A.toggle();else if(document.webkitIsFullScreen&&document.webkitCancelFullscreen)document.webkitCancelFullscreen();else{var t=document.querySelector("video");null!=t&&t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}},i.togglePictureInPicture=function(e){return(e=e||i._currentPlayer).togglePictureInPicture()},i.toggleAirPlay=function(e){return(e=e||i._currentPlayer).toggleAirPlay()},i.getSubtitleStreamIndex=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.getSubtitleStreamIndex();if(!e)throw new Error("player cannot be null");return U(e).subtitleStreamIndex},i.getSecondarySubtitleStreamIndex=function(e){if(!(e=e||i._currentPlayer))throw new Error("player cannot be null");try{if(!Re(e))return e.getSecondarySubtitleStreamIndex()}catch(e){console.error("[playbackmanager] Failed to get secondary stream index:",e)}return U(e).secondarySubtitleStreamIndex},i.setSubtitleStreamIndex=function(e,t){if((t=t||i._currentPlayer)&&!Re(t))return t.setSubtitleStreamIndex(e);var n=h(t),r=i.getSubtitleStream(t,e);if(n||r){var o=-1,a=i.playMethod(t);n&&!r?("Encode"===A(n)||"Embed"===A(n)&&"Transcode"===a)&&w(t,V(t),{SubtitleStreamIndex:-1}):!n&&r?"External"===A(r)||"Embed"===A(r)&&"Transcode"!==a?o=e:w(t,V(t),{SubtitleStreamIndex:e}):n&&r&&("External"===A(r)||"Embed"===A(r)&&"Transcode"!==a?(o=e,"External"!==A(n)&&"Embed"!==A(n)&&w(t,V(t),{SubtitleStreamIndex:-1})):w(t,V(t),{SubtitleStreamIndex:e})),t.setSubtitleStreamIndex(o),-1!==o&&i.trackHasSecondarySubtitleSupport(r)||i.setSecondarySubtitleStreamIndex(-1),U(t).subtitleStreamIndex=e}},i.setSecondarySubtitleStreamIndex=function(e,t){if(t=t||i._currentPlayer,i.playerHasSecondarySubtitleSupport(t)){if(t&&!Re(t))try{return t.setSecondarySubtitleStreamIndex(e)}catch(e){console.error("[playbackmanager] AutoSet - Failed to set secondary track:",e)}var n=h(t,!0),r=i.getSubtitleStream(t,e);if((n||r)&&(!r||i.trackHasSecondarySubtitleSupport(r,t)))try{t.setSecondarySubtitleStreamIndex(e),U(t).secondarySubtitleStreamIndex=e}catch(e){console.error("[playbackmanager] AutoSet - Failed to set secondary track:",e)}}},i.supportSubtitleOffset=function(e){return(e=e||i._currentPlayer)&&"setSubtitleOffset"in e},i.enableShowingSubtitleOffset=function(e){(e=e||i._currentPlayer).enableShowingSubtitleOffset()},i.disableShowingSubtitleOffset=function(e){(e=e||i._currentPlayer).disableShowingSubtitleOffset&&e.disableShowingSubtitleOffset()},i.isShowingSubtitleOffsetEnabled=function(e){return(e=e||i._currentPlayer).isShowingSubtitleOffsetEnabled()},i.isSubtitleStreamExternal=function(e,t){var n=i.getSubtitleStream(t,e);return!!n&&"External"===A(n)},i.setSubtitleOffset=function(e,t){(t=t||i._currentPlayer).setSubtitleOffset&&t.setSubtitleOffset(e)},i.getPlayerSubtitleOffset=function(e){if((e=e||i._currentPlayer).getSubtitleOffset)return e.getSubtitleOffset()},i.canHandleOffsetOnCurrentSubtitle=function(e){var t=i.getSubtitleStreamIndex(e);return-1!==t&&i.isSubtitleStreamExternal(t,e)},i.seek=function(e,t){if(e=Math.max(0,e),(t=t||i._currentPlayer)&&!Re(t))return t.seek(e);w(t,e)},i.seekRelative=function(e,t){if((t=t||i._currentPlayer)&&!Re(t)&&t.seekRelative)return t.seekRelative(n);var n=V(t)+e;return this.seek(n,t)},i.translateItemsForPlayback=k,i.getItemsForPlayback=Ue,i.play=function(){var e=Ee(xe().m((function e(t){var n,r,o;return xe().w((function(e){for(;;)switch(e.n){case 0:if(tt(t),!i._currentPlayer){e.n=2;break}if(!1!==t.enableRemotePlayers||i._currentPlayer.isLocalPlayer){e.n=1;break}throw new Error("Remote players are disabled");case 1:if(i._currentPlayer.isLocalPlayer){e.n=2;break}return e.a(2,i._currentPlayer.play(t));case 2:if(t.fullscreen&&E.Ay.show(),n=t.items){e.n=5;break}if(t.serverId){e.n=3;break}throw new Error("serverId required!");case 3:return e.n=4,Ue(t.serverId,{Ids:t.ids.join(",")});case 4:n=e.v.Items;case 5:return e.n=6,k(n,t);case 6:return n=e.v,e.n=7,z(n);case 7:if(n=e.v,t.startIndex){for(r=0,o=0;o<t.startIndex;o++)r+=n[o].length;t.startIndex=r}return n=n.flat(),e.a(2,q(n,t))}}),e)})));return function(t){return e.apply(this,arguments)}}(),i.getPlayerState=function(e,t,n){if(!(e=e||i._currentPlayer))throw new Error("player cannot be null");if(!Re(e)&&e.getPlayerState)return e.getPlayerState();t=t||i.currentItem(e),n=n||i.currentMediaSource(e);var r={PlayState:{}};return e&&(r.PlayState.VolumeLevel=e.getVolume(),r.PlayState.IsMuted=e.isMuted(),r.PlayState.IsPaused=e.paused(),r.PlayState.RepeatMode=i.getRepeatMode(e),r.PlayState.ShuffleMode=i.getQueueShuffleMode(e),r.PlayState.MaxStreamingBitrate=i.getMaxStreamingBitrate(e),r.PlayState.PositionTicks=V(e),r.PlayState.PlaybackStartTimeTicks=i.playbackStartTime(e),r.PlayState.PlaybackRate=i.getPlaybackRate(e),r.PlayState.SubtitleStreamIndex=i.getSubtitleStreamIndex(e),r.PlayState.SecondarySubtitleStreamIndex=i.getSecondarySubtitleStreamIndex(e),r.PlayState.AudioStreamIndex=i.getAudioStreamIndex(e),r.PlayState.BufferedRanges=i.getBufferedRanges(e),r.PlayState.PlayMethod=i.playMethod(e),n&&(r.PlayState.LiveStreamId=n.LiveStreamId),r.PlayState.PlaySessionId=i.playSessionId(e),r.PlayState.PlaylistItemId=i.getCurrentPlaylistItemId(e)),n&&(r.PlayState.MediaSourceId=n.Id,r.NowPlayingItem={RunTimeTicks:n.RunTimeTicks},r.PlayState.CanSeek=(n.RunTimeTicks||0)>0||x(e)),t&&(r.NowPlayingItem=function(e,t,n){var r=Object.assign({},t);return n&&(r.RunTimeTicks=n.RunTimeTicks,r.MediaStreams=n.MediaStreams,r.MediaSources=null),r.RunTimeTicks=r.RunTimeTicks||1e4*e.duration(),r}(e,t,n)),r.MediaSource=n,r},i.duration=function(e){if((e=e||i._currentPlayer)&&!Re(e)&&!e.isLocalPlayer)return e.duration();if(!e)throw new Error("player cannot be null");var t=i.currentMediaSource(e);if(null!=t&&t.RunTimeTicks)return t.RunTimeTicks;var n=e.duration();return n&&(n*=1e4),n},i.getCurrentTicks=V;var z=function(){var e=Ee(xe().m((function e(t){var n;return xe().w((function(e){for(;;)if(0===e.n)return n=function(){var e=Ee(xe().m((function e(t){var n,i,o;return xe().w((function(e){for(;;)switch(e.n){case 0:if(!(t.PartCount&&t.PartCount>1&&[r.D.Episode,r.D.Movie].includes(t.Type))){e.n=3;break}return n=B.tF.getApiClient(t.ServerId),e.n=1,n.getCurrentUser();case 1:return i=e.v,e.n=2,n.getAdditionalVideoParts(i.Id,t.Id);case 2:if(!(o=e.v).Items.length){e.n=3;break}return e.a(2,[t].concat(Ae(o.Items)));case 3:return e.a(2,[t])}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.a(2,Promise.all(t.map(n)))}),e)})));return function(t){return e.apply(this,arguments)}}();function q(e,t){var n=t.startIndex||0,r=e[n];if(r||(r=e[n=0]),!r)return et(0,"PlaybackError.".concat(de.F.NO_MEDIA_ERROR)),Promise.reject();if("Photo"===r.MediaType||"Book"===r.MediaType)return function(e,t){var n=ne(e[t.startIndex||0],t);return E.Ay.hide(),t.items=e,n.play(t)}(e,t);var o=B.tF.getApiClient(r.ServerId);return function(e,t,n){return n.startPositionTicks||n.startIndex||!1===n.fullscreen||"Video"!==(r=e).MediaType||"TvChannel"===r.Type||"InProgress"===r.Status||!He(r)||!T.enableCinemaMode()?Promise.resolve({Items:[]}):t.getIntros(e.Id).then((function(e){return e}),(function(){return Promise.resolve({Items:[]})}));var r}(r,o,t).then((function(o){var a,s,l=o.Items;return r.playOptions={aspectRatio:(s=t).aspectRatio,fullscreen:s.fullscreen,mediaSourceId:s.mediaSourceId,audioStreamIndex:s.audioStreamIndex,subtitleStreamIndex:s.subtitleStreamIndex,startPositionTicks:s.startPositionTicks},a=l.length?{fullscreen:r.playOptions.fullscreen}:r.playOptions,e=l.concat(e),a.items=e,a.startIndex=n,G(e[n],a,(function(){i._playQueueManager.setPlaylist(e),H(e[n].PlaylistItemId,n),E.Ay.hide()}))}))}function H(e,t){isNaN(t)||i._playQueueManager.setPlaylistState(e,t)}function G(e,t,n,o){if(e.IsPlaceHolder)return E.Ay.hide(),et(0,"PlaybackErrorPlaceHolder"),Promise.reject();tt(t),t.isFirstItem?t.isFirstItem=!1:t.isFirstItem=!0;var a=B.tF.getApiClient(e.ServerId),s=e.MediaType;return t.fullscreen&&E.Ay.show(),function(e,t){return new Promise((function(n,r){var i=y.X.ofType(M.Q.PreplayIntercept);if(i.sort((function(e,t){return(e.order||0)-(t.order||0)})),i.length){var o=Object.assign({},t);o.mediaType=e.MediaType,o.item=e,J(i,0,o,n,r)}else n()}))}(e,t).catch(Y).then((function(){return function(e,t,n){return Promise.resolve().then((function(){return!He(t)||m.Ay.isLocalItem(t)?Promise.reject(new Error("skip bitrate detection")):e.getEndpointInfo().then((function(t){return"Video"!==n&&"Audio"!==n||!p.A.enableAutomaticBitrateDetection(t.IsInNetwork,n)?Promise.reject(new Error("skip bitrate detection")):e.detectBitrate().then((function(e){return p.A.maxStreamingBitrate(t.IsInNetwork,n,e),e}))}))})).catch((function(){return S(e,n)}))}(a,e,s)})).then((function(a){return function(e,t,n,o,a){var s,l=n.startPositionTicks,u=ne(t,n),c=i._currentPlayer;if(c?(i._playNextAfterEnded=!1,s=function(e,t,n){var r=i.getPlayerState(e),o=i.currentItem(e).ServerId;return le(e),function(e){d.A.off(e,"stopped",ve)}(e),(e===t?e.stop(!1):e.stop(!0)).then((function(){U(e).streamInfo=null,he(e),Re(e)&&Ne(i,r,e,!0,o,"reportPlaybackStopped"),d.A.trigger(i,"playbackstop",[{player:e,state:r,nextItem:n,nextMediaType:n.MediaType}])}))}(c,u,t)):s=Promise.resolve(),!u)return s.then((function(){W(),E.Ay.hide(),console.error("No player found for the requested media: ".concat(t.Url)),et(0,"ErrorPlayerNotFound")}));if(!He(t)||"Book"===t.MediaType)return s.then((function(){var e=function(e){return{url:e.Url||e.Path,playMethod:"DirectPlay",item:e,textTracks:[],mediaType:e.MediaType}}(t);return e.fullscreen=n.fullscreen,U(u).isChangingStream=!1,u.play(e).then((function(){E.Ay.hide(),o(),ue(u,n,e)})).catch((function(e){i.stop(u),E.Ay.hide(),et(0,e||"ErrorDefault")}))}));var f=n.mediaSourceId,p=B.tF.getApiClient(t.ServerId),m=[r.D.TvChannel,r.D.LiveTvChannel].includes(t.Type)?Promise.resolve([]):p.getItem(p.getCurrentUserId(),f||t.Id).then((function(e){return e.MediaStreams}));return Promise.all([s,u.getDeviceProfile(t),p.getCurrentUser(),m]).then((function(r){var s=r[1],c=r[2],d=r[3],m=n.audioStreamIndex,y=n.subtitleStreamIndex,v={aspectRatio:n.aspectRatio,maxBitrate:e,startPosition:l,isPlayback:null,audioStreamIndex:m,subtitleStreamIndex:y,startIndex:n.startIndex,enableDirectPlay:null,enableDirectStream:null,allowVideoStreamCopy:null,allowAudioStreamCopy:null};if(u&&!Re(u))return function(e,t,n,r,i,o){return Ke(t,n,o.maxBitrate,r,o.startPosition).then((function(){return E.Ay.hide(),e.play({items:t,startPositionTicks:o.startPosition||0,mediaSourceId:i,audioStreamIndex:o.audioStreamIndex,subtitleStreamIndex:o.subtitleStreamIndex,startIndex:o.startIndex})}))}(u,n.items,s,p,f,v);n.items=null;var h={},g=!1;return function(e,t,n,r,i){try{if(!e)return;if(!t)return void console.warn("AutoSet - No mediaStreams");r&&"number"==typeof e.DefaultAudioStreamIndex&&X(e.DefaultAudioStreamIndex,e,t,n,"Audio"),i&&"number"==typeof e.DefaultSubtitleStreamIndex&&X(e.DefaultSubtitleStreamIndex,e,t,n,"Subtitle"),i&&"number"==typeof e.DefaultSecondarySubtitleStreamIndex&&X(e.DefaultSecondarySubtitleStreamIndex,e,t,n,"Subtitle",!0)}catch(e){console.error("AutoSet - Caught unexpected error: ".concat(e))}}(a,d,h,c.Configuration.RememberAudioSelections,c.Configuration.RememberSubtitleSelections),null!=h.DefaultAudioStreamIndex&&(v.audioStreamIndex=h.DefaultAudioStreamIndex,g=!0),null!=h.DefaultSubtitleStreamIndex&&(v.subtitleStreamIndex=h.DefaultSubtitleStreamIndex,g=!0),g&&(f||(f=t.Id)),te(u,p,s,t,f,v).then(function(){var r=Ee(xe().m((function r(a){var s,c,d,f;return xe().w((function(r){for(;;)if(0===r.n)return null!=h.DefaultSecondarySubtitleStreamIndex&&(a.DefaultSecondarySubtitleStreamIndex=h.DefaultSecondarySubtitleStreamIndex),(null==a.DefaultSubtitleStreamIndex||a.DefaultSubtitleStreamIndex<0)&&(null!=a.DefaultSecondarySubtitleStreamIndex&&(a.DefaultSubtitleStreamIndex=a.DefaultSecondarySubtitleStreamIndex),a.DefaultSecondarySubtitleStreamIndex=-1),s=a.MediaStreams[a.DefaultSubtitleStreamIndex],c=a.MediaStreams[a.DefaultSecondarySubtitleStreamIndex],i.trackHasSecondarySubtitleSupport(s,u)&&i.trackHasSecondarySubtitleSupport(c,u)||(a.DefaultSecondarySubtitleStreamIndex=-1),(d=Z(p,t.MediaType,t,a,l,u)).aspectRatio=n.aspectRatio,d.fullscreen=n.fullscreen,(f=U(u)).isChangingStream=!1,f.maxStreamingBitrate=e,f.streamInfo=d,r.a(2,u.play(d).then((function(){E.Ay.hide(),o(),ue(u,n,d,a)}),(function(e){o(),ue(u,n,d,a),setTimeout((function(){ye.call(u,e,{type:fe(e),streamInfo:d})}),100)})))}),r)})));return function(e){return r.apply(this,arguments)}}())}))}(a,e,t,n,o).catch(Q)})).catch((function(){t.fullscreen&&E.Ay.hide()}))}function W(){var e=i._currentPlayer;e&&(K(e),g(e)),d.A.trigger(i,"playbackcancelled")}function Y(){return W(),Promise.reject()}function Q(e){W();var t="ErrorDefault";return e instanceof Response&&(e.status>=500?t="PlaybackError.".concat(de.F.SERVER_ERROR):e.status>=400&&(t="PlaybackError.".concat(de.F.NO_MEDIA_ERROR))),et(0,t),Promise.reject()}function K(e){e.destroy()}function J(e,t,n,r,i){t>=e.length?r():e[t].intercept(n).then((function(){J(e,t+1,n,r,i)}),i)}function X(e,t,n,r,i,o){if(-1==e)return console.debug("AutoSet ".concat(i," - No Stream Set")),void("Subtitle"==i&&(o?r.DefaultSecondarySubtitleStreamIndex=-1:r.DefaultSubtitleStreamIndex=-1));if(t.MediaStreams&&n){var a=null,s=0,l=t.MediaStreams[e];if(l){console.debug("AutoSet ".concat(i," - Previous was ").concat(l.Index," - ").concat(l.DisplayTitle));var u,c=0,d=ke(t.MediaStreams);try{for(d.s();!(u=d.n()).done;){var f=u.value;if(f.Type==i){if(f.Index==e)break;c+=1}}}catch(e){d.e(e)}finally{d.f()}var p,m=0,y=ke(n);try{for(y.s();!(p=y.n()).done;){var v=p.value;if(v.Type==i){var h=0;l.Codec==v.Codec&&(h+=1),c==m&&(h+=1),l.DisplayTitle&&l.DisplayTitle==v.DisplayTitle&&(h+=2),l.Language&&"und"!=l.Language&&l.Language==v.Language&&(h+=2),console.debug("AutoSet ".concat(i," - Score ").concat(h," for ").concat(v.Index," - ").concat(v.DisplayTitle)),h>s&&h>=3&&(s=h,a=v.Index),m+=1}}}catch(e){y.e(e)}finally{y.f()}null!=a?(console.debug("AutoSet ".concat(i," - Using ").concat(a," score ").concat(s,".")),"Subtitle"==i&&(o?r.DefaultSecondarySubtitleStreamIndex=a:r.DefaultSubtitleStreamIndex=a),"Audio"==i&&(r.DefaultAudioStreamIndex=a)):console.debug("AutoSet ".concat(i," - Threshold not met. Using default."))}else console.debug("AutoSet ".concat(i," - No prevStream"))}else console.debug("AutoSet ".concat(i," - No MediaStreams"))}function Z(e,t,n,r,i,o){var a,s,l,u=0,c=i,d=r.LiveStreamId,f="Transcode",p=(r.Container||"").toLowerCase();if(r.MediaStreams&&o.useFullSubtitleUrls&&r.MediaStreams.forEach((function(t){var n;null!==(n=t.DeliveryUrl)&&void 0!==n&&n.startsWith("/")&&(t.DeliveryUrl=e.getUrl(t.DeliveryUrl))})),"Video"===t||"Audio"===t)if(s=Be(t.toLowerCase(),p),r.enableDirectPlay)a=r.Path,f="DirectPlay";else if(r.StreamUrl)a=r.StreamUrl;else if(r.SupportsDirectPlay||r.SupportsDirectStream){l={Static:!0,mediaSourceId:r.Id,deviceId:e.deviceId(),ApiKey:e.accessToken()},r.ETag&&(l.Tag=r.ETag),r.LiveStreamId&&(l.LiveStreamId=r.LiveStreamId);var m="Video"===t?"Videos":"Audio";a=e.getUrl(m+"/"+n.Id+"/stream."+p,l),f=r.SupportsDirectPlay?"DirectPlay":"DirectStream"}else r.SupportsTranscoding&&(a=e.getUrl(r.TranscodingUrl),"hls"===r.TranscodingSubProtocol?s="application/x-mpegURL":(s=Be(t.toLowerCase(),r.TranscodingContainer),-1===a.toLowerCase().indexOf("copytimestamps=true")&&(u=i||0)));else a=r.Path,f="DirectPlay";!a&&r.SupportsDirectPlay&&(a=r.Path,f="DirectPlay");var y={url:a,mimeType:s,transcodingOffsetTicks:u,playMethod:f,playerStartPositionTicks:c,item:n,mediaSource:r,textTracks:ee(e,n,r),tracks:ee(e,n,r),mediaType:t,liveStreamId:d,playSessionId:ze("playSessionId",a),title:n.Name},v=(0,D.I)(e,n,{},!0);return v&&(y.backdropUrl=v),y}function ee(e,t,n){for(var r=n.MediaStreams.filter((function(e){return"Subtitle"===e.Type})).filter((function(e){return"External"===e.DeliveryMethod})),i=[],o=0,a=r.length;o<a;o++){var s,l=r[o];s=m.Ay.isLocalItem(t)?l.Path:l.IsExternalUrl?l.DeliveryUrl:e.getUrl(l.DeliveryUrl),i.push({url:s,language:l.Language||"und",isDefault:l.Index===n.DefaultSubtitleStreamIndex,index:l.Index,format:l.Codec})}return i}function te(e,t,n,r,i,o){return o.isPlayback=!0,Je(e,t,r,n,i,null,o).then((function(i){return Ze(0,i)?function(e,t,n){var r=n.map((function(t){return $e(e,0,t)}));return r.length?Promise.all(r).then((function(e){for(var t=0,r=n.length;t<r;t++)n[t].enableDirectPlay=e[t]||!1;var i=n.filter((function(e){return e.enableDirectPlay}))[0];return i||(i=n.filter((function(e){return e.SupportsDirectStream}))[0]),(i=i||n.filter((function(e){return e.SupportsTranscoding}))[0])||n[0]})):Promise.reject()}(t,0,i.MediaSources).then((function(a){return a?a.RequiresOpening&&!a.LiveStreamId?(o.audioStreamIndex=null,o.subtitleStreamIndex=null,function(e,t,n,r,i,o,a){var s={DeviceProfile:i,OpenToken:o.OpenToken},l={UserId:t.getCurrentUserId(),StartTimeTicks:a.startPosition||0,ItemId:n.Id,PlaySessionId:r};return a.maxBitrate&&(l.MaxStreamingBitrate=a.maxBitrate),null!=a.audioStreamIndex&&(l.AudioStreamIndex=a.audioStreamIndex),null!=a.subtitleStreamIndex&&(l.SubtitleStreamIndex=a.subtitleStreamIndex),!1!==l.EnableDirectStream&&e.supportsPlayMethod&&!e.supportsPlayMethod("DirectStream",n)&&(l.EnableDirectStream=!1),t.ajax({url:t.getUrl("LiveStreams/Open",l),type:"POST",data:JSON.stringify(s),contentType:"application/json",dataType:"json"})}(e,t,r,i.PlaySessionId,n,a,o).then((function(e){return $e(t,0,e.MediaSource).then((function(t){return e.MediaSource.enableDirectPlay=t,e.MediaSource}))}))):null!=r.AlbumId?t.getItem(t.getCurrentUserId(),r.AlbumId).then((function(e){return a.albumNormalizationGain=e.NormalizationGain,a})):a:(et(0,"PlaybackError.".concat(de.F.NO_MEDIA_ERROR)),Promise.reject())})):Promise.reject()}))}function ne(e,t,n){var r=He(e);return function(e,t){if(!t){var n=e._currentPlayer;if(n&&!qe(n))return[n]}return e.getPlayers().filter(qe)}(i,n).filter((function(n){if(n.canPlayMediaType(e.MediaType)){if(r)return!n.canPlayItem||n.canPlayItem(e,t);if(e.Url&&n.canPlayUrl)return n.canPlayUrl(e.Url)}return!1}))[0]}function re(e){var t=i.currentMediaSource(e),n=U(e);return Le(Le({},t),{},{DefaultAudioStreamIndex:n.audioStreamIndex,DefaultSubtitleStreamIndex:n.subtitleStreamIndex,DefaultSecondarySubtitleStreamIndex:n.secondarySubtitleStreamIndex})}function ie(e,t,n){if(!(n=n||i._currentPlayer))return i.play(e);if(e.items)return k(e.items,e).then((function(e){oe(e,t,n)}));if(!e.serverId)throw new Error("serverId required!");return Ue(e.serverId,{Ids:e.ids.join(",")}).then((function(r){return k(r.Items,e).then((function(e){oe(e,t,n)}))}))}function oe(e,t,n){if(e.length)if(n.isLocalPlayer)if(n&&!Re(n)){var r=B.tF.getApiClient(e[0].ServerId);n.getDeviceProfile(e[0]).then((function(o){Ke(e,o,i.getMaxStreamingBitrate(n),r,0).then((function(){"next"===t?n.queueNext(e):n.queue(e)}))}))}else"next"===t?i._playQueueManager.queueNext(e):i._playQueueManager.queue(e),d.A.trigger(n,"playlistitemadd");else"next"===t?n.queueNext({items:e}):n.queue({items:e})}function ae(){Fe(this,"timeupdate")}function se(e){le(e),e._progressInterval=setInterval(ae.bind(e),1e4)}function le(e){e._progressInterval&&(clearInterval(e._progressInterval),e._progressInterval=null)}function ue(e,t,n,r){if(!e)throw new Error("player cannot be null");b(e);var o=U(e);o.streamInfo=n,n.playbackStartTimeTicks=1e4*(new Date).getTime(),r?(o.audioStreamIndex=r.DefaultAudioStreamIndex,o.subtitleStreamIndex=r.DefaultSubtitleStreamIndex,o.secondarySubtitleStreamIndex=r.DefaultSecondarySubtitleStreamIndex):(o.audioStreamIndex=null,o.subtitleStreamIndex=null,o.secondarySubtitleStreamIndex=null),i._playNextAfterEnded=!0;var a=t.isFirstItem,s=t.fullscreen,l=i.getPlayerState(e,n.item,n.mediaSource);Ne(i,l,e,!0,l.NowPlayingItem.ServerId,"reportPlaybackStart"),l.IsFirstItem=a,l.IsFullscreen=s,d.A.trigger(e,"playbackstart",[l]),d.A.trigger(i,"playbackstart",[e,l]),n.started=!0,se(e)}function pe(e,t,n){var r=this;b(r);var o=t.playOptions||{fullscreen:!0},a=o.isFirstItem,s=o.fullscreen;o.isFirstItem=!1;var l=U(r);l.streamInfo={};var u=l.streamInfo;u.playbackStartTimeTicks=1e4*(new Date).getTime();var c=i.getPlayerState(r,t,n);Ne(i,c,r,!0,c.NowPlayingItem.ServerId,"reportPlaybackStart"),c.IsFirstItem=a,c.IsFullscreen=s,d.A.trigger(r,"playbackstart",[c]),d.A.trigger(i,"playbackstart",[r,c]),u.started=!0,se(r)}function me(e,t){var n=this;le(n);var r=i.getPlayerState(n,t.item,t.mediaSource),o=t.nextItem,a=t.nextMediaType,s={player:n,state:r,nextItem:o?o.item:null,nextMediaType:a};r.NextMediaType=a,U(n).streamInfo.ended=!0,He(t.item)&&(r.PlayState.PositionTicks=1e4*(t.positionMs||0),Ne(i,r,n,!0,t.item.ServerId,"reportPlaybackStopped")),r.NextItem=s.nextItem,d.A.trigger(n,"playbackstop",[r]),d.A.trigger(i,"playbackstop",[s]);var l=o&&o.item.playOptions||{fullscreen:!0};(o?ne(o.item,l):null)!==n&&(K(n),g(n))}function ye(e,t){var n=this,r=(t=t||{}).type;console.warn("[playbackmanager] onPlaybackError:",e,t);var o=t.streamInfo||U(n).streamInfo;if(null!=o&&o.url){var a=o.url.toLowerCase().includes("transcodereasons"),s=-1!==o.url.toLowerCase().indexOf("allowvideostreamcopy=false"),l=-1!==o.url.toLowerCase().indexOf("allowaudiostreamcopy=false");if(function(e,t,n,r){return e.mediaSource.SupportsTranscoding&&(!n||!r)}(o,0,s,l)){var u=V(n)||o.playerStartPositionTicks,c="Remote"===o.item.LocationType&&!a;return void w(n,u,{EnableDirectPlay:!1,EnableDirectStream:c,AllowVideoStreamCopy:c,AllowAudioStreamCopy:!l&&!s&&null})}}d.A.trigger(i,"playbackerror",[r]),ve.call(n,e,".".concat(r))}function ve(e,t){var n=this;if(!U(n).isChangingStream){le(n);var r=i.getPlayerState(n),o=U(n),s=o.streamInfo,l=t&&"string"==typeof t,u=i._playNextAfterEnded&&!l?i._playQueueManager.getNextItemInfo():null,c=u?u.item.MediaType:null,f={player:n,state:r,nextItem:u?u.item:null,nextMediaType:c};r.NextMediaType=c,s&&He(s.item)&&(!1===n.supportsProgress&&r.PlayState&&!r.PlayState.PositionTicks&&(r.PlayState.PositionTicks=s.item.RunTimeTicks),s.ended=!0,Ne(i,r,n,!0,s.item.ServerId,"reportPlaybackStopped")),r.NextItem=f.nextItem,u||i._playQueueManager.reset(),d.A.trigger(n,"playbackstop",[r]),d.A.trigger(i,"playbackstop",[f]);var p=u&&u.item.playOptions||{fullscreen:!0};(u?ne(u.item,p):null)!==n&&(o.streamInfo=null,K(n),g(n)),l?et(0,"PlaybackError"+t):u&&B.tF.getApiClient(u.item.ServerId).getCurrentUser().then((function(e){(e.Configuration.EnableNextEpisodeAutoPlay||c!==a.z.Video)&&i.nextTrack()}))}}function he(e){Re(e)&&(d.A.off(e,"stopped",ve),d.A.on(e,"stopped",ve))}function ge(){Fe(this,"timeupdate")}function Se(){Fe(this,"pause")}function we(){Fe(this,"unpause")}function Ie(){Fe(this,"volumechange")}function je(){Fe(this,"repeatmodechange")}function Te(){Fe(this,"shufflequeuemodechange")}function Ce(){Fe(this,"playlistitemmove",!0)}function _e(){Fe(this,"playlistitemremove",!0)}function Me(){Fe(this,"playlistitemadd",!0)}function Oe(e){s.push(e),s.sort((function(e,t){return(e.priority||0)-(t.priority||0)})),!1!==e.isLocalPlayer&&(e.isLocalPlayer=!0),e.currentState={},e.getVolume&&e.setVolume||function(e){e.getVolume=function(){return e.volume()},e.setVolume=function(t){return e.volume(t)}}(e),Re(e)?(d.A.on(e,"error",ye),d.A.on(e,"timeupdate",ge),d.A.on(e,"pause",Se),d.A.on(e,"unpause",we),d.A.on(e,"volumechange",Ie),d.A.on(e,"repeatmodechange",je),d.A.on(e,"shufflequeuemodechange",Te),d.A.on(e,"playlistitemmove",Ce),d.A.on(e,"playlistitemremove",_e),d.A.on(e,"playlistitemadd",Me)):e.isLocalPlayer&&(d.A.on(e,"itemstarted",pe),d.A.on(e,"itemstopped",me),d.A.on(e,"timeupdate",ge),d.A.on(e,"pause",Se),d.A.on(e,"unpause",we),d.A.on(e,"volumechange",Ie),d.A.on(e,"repeatmodechange",je),d.A.on(e,"shufflequeuemodechange",Te),d.A.on(e,"playlistitemmove",Ce),d.A.on(e,"playlistitemremove",_e),d.A.on(e,"playlistitemadd",Me)),e.isLocalPlayer&&function(e){c.A.isEnabled?c.A.on("change",(function(){d.A.trigger(e,"fullscreenchange")})):document.addEventListener("webkitfullscreenchange",(function(){d.A.trigger(e,"fullscreenchange")}),!1)}(e),he(e)}function Fe(e,t,n){if(!e)throw new Error("player cannot be null");var r=i.getPlayerState(e);if(r.NowPlayingItem){var o=r.NowPlayingItem.ServerId,a=U(e).streamInfo;null!=a&&a.started&&!a.ended&&Ne(i,r,e,n,o,"reportPlaybackProgress",t),null!=a&&a.liveStreamId&&(new Date).getTime()-(a.lastMediaInfoQuery||0)>=6e5&&function(e,t,n,r,i){console.debug("getLiveStreamMediaInfo"),t.lastMediaInfoQuery=(new Date).getTime(),B.tF.getApiClient(i).getLiveStreamMediaInfo(r).then((function(t){n.MediaStreams=t.MediaStreams,d.A.trigger(e,"mediastreamschange")}),(function(){}))}(e,a,i.currentMediaSource(e),a.liveStreamId,o)}}i.getPlaybackInfo=function(e,t){var n=(t=t||{}).startPositionTicks||0,r=t.mediaType||e.MediaType,i=ne(e,t),o=B.tF.getApiClient(e.ServerId);return o.getEndpointInfo().then((function(){var a=S(B.tF.getApiClient(e.ServerId),r);return i.getDeviceProfile(e).then((function(r){var s={maxBitrate:a,startPosition:n,isPlayback:null,audioStreamIndex:t.audioStreamIndex,subtitleStreamIndex:t.subtitleStreamIndex,startIndex:null,enableDirectPlay:null,enableDirectStream:null,allowVideoStreamCopy:null,allowAudioStreamCopy:null};return te(i,o,r,e,t.mediaSourceId,s).then((function(t){return Z(o,e.MediaType,e,t,n,i)}))}))}))},i.getPlaybackMediaSources=function(e,t){var n=(t=t||{}).startPositionTicks||0,r=t.mediaType||e.MediaType,i=ne(e,t,!0),o=B.tF.getApiClient(e.ServerId);return o.getEndpointInfo().then((function(){var t=S(B.tF.getApiClient(e.ServerId),r);return i.getDeviceProfile(e).then((function(r){return Je(i,o,e,r,null,null,{maxBitrate:t,startPosition:n,isPlayback:!0,audioStreamIndex:null,subtitleStreamIndex:null,enableDirectPlay:null,enableDirectStream:null,allowVideoStreamCopy:null,allowAudioStreamCopy:null}).then((function(e){return e.MediaSources}))}))}))},i.getItemFromPlaylistItemId=function(e){for(var t,n,r=i._playQueueManager.getPlaylist(),o=0,a=r.length;o<a;o++)if(r[o].PlaylistItemId===e){t=r[o],n=o;break}return{Item:t,Index:n}},i.setCurrentPlaylistItem=function(e,t){if((t=t||i._currentPlayer)&&!Re(t))return t.setCurrentPlaylistItem(e);var n=i.getItemFromPlaylistItemId(e);if(n.Item){var r=n.Item.playOptions||{fullscreen:!0};G(n.Item,r,(function(){H(n.Item.PlaylistItemId,n.Index)}))}},i.removeFromPlaylist=function(e,t){if(!e)throw new Error("Invalid playlistItemIds");if((t=t||i._currentPlayer)&&!Re(t))return t.removeFromPlaylist(e);var n=i._playQueueManager.removeFromPlaylist(e);if("empty"===n.result)return i.stop(t);var r=n.isCurrentIndex;return d.A.trigger(t,"playlistitemremove",[{playlistItemIds:e}]),r?i.setCurrentPlaylistItem(i._playQueueManager.getPlaylist()[0].PlaylistItemId,t):Promise.resolve()},i.movePlaylistItem=function(e,t,n){if((n=n||i._currentPlayer)&&!Re(n))return n.movePlaylistItem(e,t);var r=i._playQueueManager.movePlaylistItem(e,t);"noop"!==r.result&&d.A.trigger(n,"playlistitemmove",[{playlistItemId:r.playlistItemId,newIndex:r.newIndex}])},i.getCurrentPlaylistIndex=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getCurrentPlaylistIndex():i._playQueueManager.getCurrentPlaylistIndex()},i.getCurrentPlaylistItemId=function(e){return(e=e||i._currentPlayer)&&!Re(e)?e.getCurrentPlaylistItemId():i._playQueueManager.getCurrentPlaylistItemId()},i.channelUp=function(e){return e=e||i._currentPlayer,i.nextTrack(e)},i.channelDown=function(e){return e=e||i._currentPlayer,i.previousTrack(e)},i.nextTrack=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.nextTrack();var t=i._playQueueManager.getNextItemInfo();if(t){console.debug("playing next track");var n=t.item.playOptions||{fullscreen:!0};G(t.item,n,(function(){H(t.item.PlaylistItemId,t.index)}),re(e))}},i.previousTrack=function(e){if((e=e||i._currentPlayer)&&!Re(e))return e.previousTrack();var t=i.getCurrentPlaylistIndex(e)-1;if(t>=0){var n=i._playQueueManager.getPlaylist()[t];if(n){var r=n.playOptions||{fullscreen:!0};r.startPositionTicks=0,G(n,r,(function(){H(n.PlaylistItemId,t)}),re(e))}}},i.queue=function(e){return ie(e,"",arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer)},i.queueNext=function(e){return ie(e,"next",arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer)},d.A.on(y.X,"registered",(function(e,t){t.type===M.Q.MediaPlayer&&Oe(t)})),y.X.ofType(M.Q.MediaPlayer).forEach(Oe),i.onAppClose=function(){var e=this._currentPlayer;e&&this.isPlaying(e)&&(this._playNextAfterEnded=!1,ve.call(e))},i.playbackStartTime=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e&&!Re(e)&&!e.isLocalPlayer)return e.playbackStartTime();var t=U(e).streamInfo;return t?t.playbackStartTimeTicks:null},_.g.supports(ce.Y.RemoteControl)&&Promise.resolve().then(n.bind(n,10736)).then((function(e){var t=e.default;d.A.on(t,"ServerShuttingDown",i.setDefaultPlayerActive.bind(i)),d.A.on(t,"ServerRestarting",i.setDefaultPlayerActive.bind(i))})),$(i),this._skipSegment=function(e){return new be(e)}(i)},t=[{key:"getCurrentPlayer",value:function(){return this._currentPlayer}},{key:"currentTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return!e||Re(e)||e.isLocalPlayer?this.getCurrentTicks(e)/1e4:e.currentTime()}},{key:"getNextItem",value:function(){return this._playQueueManager.getNextItemInfo()}},{key:"nextItem",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(t&&!Re(t))return t.nextItem();var n=this._playQueueManager.getNextItemInfo();if(null===(e=n)||void 0===e||!e.item)return Promise.reject();var r=B.tF.getApiClient(n.item.ServerId);return r.getItem(r.getCurrentUserId(),n.item.Id)}},{key:"canQueue",value:function(e){return"MusicAlbum"===e.Type||"MusicArtist"===e.Type||"MusicGenre"===e.Type?this.canQueueMediaType("Audio"):this.canQueueMediaType(e.MediaType)}},{key:"canQueueMediaType",value:function(e){return!!this._currentPlayer&&this._currentPlayer.canPlayMediaType(e)}},{key:"isMuted",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return!!e&&e.isMuted()}},{key:"setMute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;t&&t.setMute(e)}},{key:"toggleMute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;t&&(t.toggleMute?t.toggleMute():t.setMute(!t.isMuted()))}},{key:"toggleDisplayMirroring",value:function(){this.enableDisplayMirroring(!this.enableDisplayMirroring())}},{key:"enableDisplayMirroring",value:function(e){if(null==e)return"0"!==(p.A.get("displaymirror")||"");var t=e?"1":"0";p.A.set("displaymirror",t)}},{key:"nextChapter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer,t=this.currentItem(e),n=this.getCurrentTicks(e),r=(t.Chapters||[]).filter((function(e){return e.StartPositionTicks>n}))[0];r?this.seek(r.StartPositionTicks,e):this.nextTrack(e)}},{key:"previousChapter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer,t=this.currentItem(e),n=this.getCurrentTicks(e);n-=1e8,0===this.getCurrentPlaylistIndex(e)&&(n=Math.max(n,0));var r=(t.Chapters||[]).filter((function(e){return e.StartPositionTicks<=n}));r.length?this.seek(r[r.length-1].StartPositionTicks,e):this.previousTrack(e)}},{key:"fastForward",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(null==e.fastForward){var t=1e4*T.skipForwardLength();this.seekRelative(t,e)}else e.fastForward(T.skipForwardLength())}},{key:"rewind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(null==e.rewind){var t=0-1e4*T.skipBackLength();this.seekRelative(t,e)}else e.rewind(T.skipBackLength())}},{key:"seekPercent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer,n=this.duration(t)||0;n*=e/=100,this.seek(parseInt(n,10),t)}},{key:"seekMs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer,n=1e4*e;this.seek(n,t)}},{key:"playTrailers",value:(i=Ee(xe().m((function e(t){var n,r,i,o;return xe().w((function(e){for(;;)switch(e.n){case 0:if(null==(r=this._currentPlayer)||!r.playTrailers){e.n=1;break}return e.a(2,r.playTrailers(t));case 1:if(i=B.tF.getApiClient(t.ServerId),!t.LocalTrailerCount){e.n=3;break}return e.n=2,i.getLocalTrailers(i.getCurrentUserId(),t.Id);case 2:o=e.v;case 3:if(null!==(n=o)&&void 0!==n&&n.length||(o=(t.RemoteTrailers||[]).map((function(e){return{Name:e.Name||t.Name+" Trailer",Url:e.Url,MediaType:"Video",Type:"Trailer",ServerId:i.serverId()}}))),!o.length){e.n=4;break}return e.a(2,this.play({items:o}));case 4:return e.a(2,Promise.reject())}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"getSubtitleUrl",value:function(e,t){var n=B.tF.getApiClient(t);return e.IsExternalUrl?e.DeliveryUrl:n.getUrl(e.DeliveryUrl)}},{key:"stop",value:function(e){return(e=e||this._currentPlayer)?(Re(e)&&(this._playNextAfterEnded=!1),e.stop(!0,!0)):Promise.resolve()}},{key:"getBufferedRanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return null!=e&&e.getBufferedRanges?e.getBufferedRanges():[]}},{key:"playPause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e)return e.playPause?e.playPause():e.paused()?this.unpause(e):this.pause(e)}},{key:"paused",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e)return e.paused()}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;e&&e.pause()}},{key:"unpause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;e&&e.unpause()}},{key:"setPlaybackRate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;null!=t&&t.setPlaybackRate&&(t.setPlaybackRate(e),sessionStorage.setItem("playbackRateSpeed",e))}},{key:"getPlaybackRate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return null!=e&&e.getPlaybackRate?e.getPlaybackRate():null}},{key:"instantMix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(null!=t&&t.instantMix)return t.instantMix(e);var n=B.tF.getApiClient(e.ServerId),r={UserId:n.getCurrentUserId(),Limit:200},i=this;n.getInstantMixFromItem(e.Id,r).then((function(e){i.play({items:e.Items})}))}},{key:"shuffle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;return null!=t&&t.shuffle?t.shuffle(e):this.play({items:[e],shuffle:!0})}},{key:"audioTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e.audioTracks){var t=e.audioTracks();if(t)return t.sort(m.Ay.sortTracks)}var n=this.currentMediaSource(e);return((null==n?void 0:n.MediaStreams)||[]).filter((function(e){return"Audio"===e.Type})).sort(m.Ay.sortTracks)}},{key:"subtitleTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e.subtitleTracks){var t=e.subtitleTracks();if(t)return t.sort(m.Ay.sortTracks)}var n=this.currentMediaSource(e);return((null==n?void 0:n.MediaStreams)||[]).filter((function(e){return"Subtitle"===e.Type})).sort(m.Ay.sortTracks)}},{key:"getSupportedCommands",value:function(e){if((e=e||this._currentPlayer||{isLocalPlayer:!0}).isLocalPlayer){var t=["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","SetShuffleQueue","PlayMediaSource","PlayTrailers"];return _.g.supports(ce.Y.Fullscreen)&&t.push("ToggleFullscreen"),e.supports&&(e.supports("PictureInPicture")&&t.push("PictureInPicture"),e.supports("AirPlay")&&t.push("AirPlay"),e.supports("SetBrightness")&&t.push("SetBrightness"),e.supports("SetAspectRatio")&&t.push("SetAspectRatio"),e.supports("PlaybackRate")&&t.push("PlaybackRate")),t}var n=this.getPlayerInfo();return n?n.supportedCommands:[]}},{key:"setRepeatMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!Re(t))return t.setRepeatMode(e);this._playQueueManager.setRepeatMode(e),d.A.trigger(t,"repeatmodechange")}},{key:"getRepeatMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return e&&!Re(e)?e.getRepeatMode():this._playQueueManager.getRepeatMode()}},{key:"setQueueShuffleMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!Re(t))return t.setQueueShuffleMode(e);this._playQueueManager.setShuffleMode(e),d.A.trigger(t,"shufflequeuemodechange")}},{key:"getQueueShuffleMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return e&&!Re(e)?e.getQueueShuffleMode():this._playQueueManager.getShuffleMode()}},{key:"toggleQueueShuffleMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e&&!Re(e))switch(e.getQueueShuffleMode()){case"Shuffle":e.setQueueShuffleMode("Sorted");break;case"Sorted":e.setQueueShuffleMode("Shuffle");break;default:throw new TypeError("current value for shufflequeue is invalid")}else this._playQueueManager.toggleShuffleMode();d.A.trigger(e,"shufflequeuemodechange")}},{key:"clearQueue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!Re(t))return t.clearQueue(e);this._playQueueManager.clearPlaylist(e),d.A.trigger(t,"playlistitemremove")}},{key:"trySetActiveDeviceName",value:function(e){e=Fe(e);var t=this;t.getTargets().then((function(n){var r=n.filter((function(t){return Fe(t.name)===e}))[0];r&&t.trySetActivePlayer(r.playerName,r)}))}},{key:"displayContent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;null!=t&&t.displayContent&&t.displayContent(e)}},{key:"beginPlayerUpdates",value:function(e){e.beginPlayerUpdates&&e.beginPlayerUpdates()}},{key:"endPlayerUpdates",value:function(e){e.endPlayerUpdates&&e.endPlayerUpdates()}},{key:"setDefaultPlayerActive",value:function(){this.setActivePlayer("localplayer")}},{key:"removeActivePlayer",value:function(e){var t=this.getPlayerInfo();(null==t?void 0:t.name)===e&&this.setDefaultPlayerActive()}},{key:"removeActiveTarget",value:function(e){var t=this.getPlayerInfo();(null==t?void 0:t.id)===e&&this.setDefaultPlayerActive()}},{key:"sendCommand",value:function(e,t){switch(console.debug("MediaController received command: "+e.Name),e.Name){case"SetRepeatMode":this.setRepeatMode(e.Arguments.RepeatMode,t);break;case"SetShuffleQueue":this.setQueueShuffleMode(e.Arguments.ShuffleMode,t);break;case"VolumeUp":this.volumeUp(t);break;case"VolumeDown":this.volumeDown(t);break;case"Mute":this.setMute(!0,t);break;case"Unmute":this.setMute(!1,t);break;case"ToggleMute":this.toggleMute(t);break;case"SetVolume":this.setVolume(e.Arguments.Volume,t);break;case"SetAspectRatio":this.setAspectRatio(e.Arguments.AspectRatio,t);break;case"PlaybackRate":this.setPlaybackRate(e.Arguments.PlaybackRate,t);break;case"SetBrightness":this.setBrightness(e.Arguments.Brightness,t);break;case"SetAudioStreamIndex":this.setAudioStreamIndex(parseInt(e.Arguments.Index,10),t);break;case"SetSubtitleStreamIndex":this.setSubtitleStreamIndex(parseInt(e.Arguments.Index,10),t);break;case"SetMaxStreamingBitrate":this.setMaxStreamingBitrate(parseInt(e.Arguments.Bitrate,10),t);break;case"ToggleFullscreen":this.toggleFullscreen(t);break;default:t.sendCommand&&t.sendCommand(e)}}}],t&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}(),st=new at;$(st),function(e){(ae||oe)&&new ue(e)}(st),window.addEventListener("beforeunload",(function(){try{st.onAppClose()}catch(e){console.error("error in onAppClose: "+e)}}))},40787:function(e,t,n){"use strict";var r,i,o,a=n(38490),s=n(9164),l=n(34789),u=n(46782),c=n(36300),d=n(44797),f={},p=(new Date).getTime();function m(){var e=document.body.classList;e.remove("mouseIdle"),e.remove("mouseIdle-tv")}function y(){r&&(r=!1,m(),d.A.trigger(f,"mouseactive"))}function v(){var e;r||(r=!0,(e=document.body.classList).add("mouseIdle"),u.A.tv&&e.add("mouseIdle-tv"),d.A.trigger(f,"mouseidle"))}function h(e){var t=e.screenX||e.clientX,n=e.screenY||e.clientY;if(void 0!==t||void 0!==n){var r=i;r?Math.abs(t-r.x)<10&&Math.abs(n-r.y)<10||(r.x=t,r.y=n,p=(new Date).getTime(),a.default.notifyMouseMove(),y()):i={x:t,y:n}}}function g(e){if("mouse"===(e.pointerType||(u.A.mobile?"touch":"mouse"))&&!r){var t=s.A.focusableParent(e.target);t&&s.A.focus(t)}}function b(){!r&&(new Date).getTime()-p>=5e3&&v()}function S(){o&&(clearInterval(o),o=null),m(),c.Ay.removeEventListener(document,window.PointerEvent?"pointermove":"mousemove",h,{passive:!0}),u.A.mobile||(o||(o=setInterval(b,5e3)),c.Ay.addEventListener(document,window.PointerEvent?"pointermove":"mousemove",h,{passive:!0})),c.Ay.removeEventListener(document,window.PointerEvent?"pointerenter":"mouseenter",g,{capture:!0,passive:!0}),u.A.tv&&!l.A.web0s&&l.A.tv&&c.Ay.addEventListener(document,window.PointerEvent?"pointerenter":"mouseenter",g,{capture:!0,passive:!0})}S(),d.A.on(u.A,"modechange",S),t.Ay={hideCursor:v,showCursor:y}},41177:function(e,t,n){"use strict";n.d(t,{A:function(){return u}}),n(29305),n(32733),n(84701),n(2623),n(44962),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(82367);var r=n(70267),i=n(48080),o=n(5898);function a(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,a=0,s=e,f.n=n,l}};function p(n,r){for(a=n,s=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(a=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),a=c,s=m;(t=a<2?e:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(u=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==l)break}catch(t){o=e,a=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(s(t={},r,(function(){return this})),t),p=d.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,i,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=d,s(p,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(p),s(p,i,"Generator"),s(p,r,(function(){return this})),s(p,"toString",(function(){return"[object Generator]"})),(a=function(){return{w:o,m:m}})()}function s(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}s=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){s(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},s(e,t,n,r)}function l(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function u(e,t){return c.apply(this,arguments)}function c(){var e;return e=a().m((function e(t,n){var s;return a().w((function(e){for(;;)switch(e.n){case 0:return s="string"==typeof t?{title:n,text:t}:t,e.n=1,r.appRouter.ready();case 1:return s.buttons=[{name:o.Ay.translate("ButtonGotIt"),id:"ok",type:"submit"}],e.a(2,i.A.show(s))}}),e)})),c=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){l(o,r,i,a,s,"next",e)}function s(e){l(o,r,i,a,s,"throw",e)}a(void 0)}))},c.apply(this,arguments)}},44305:function(e,t,n){"use strict";n.d(t,{G4:function(){return o},Q_:function(){return r},SP:function(){return a},z3:function(){return i}});var r=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),e.toLowerCase()===t.toLowerCase()};function i(e){return!(null==e?void 0:e.trim().length)}function o(e,t){return void 0===t&&(t=!1),"true"!==e&&"false"!==e?t:"false"!==e}function a(e,t){if(void 0===t&&(t=0),!e)return t;var n=parseFloat(e);return isNaN(n)?t:n}},44419:function(e,t,n){"use strict";n.d(t,{iz:function(){return l},l9:function(){return u},t5:function(){return s}});var r=n(39057),i=n(8280),o=n(80401),a=n(69410),s="BrandingOptions",l=function(e){return(0,i.j)({queryKey:[s],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,i=void 0,a=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){return[2,(0,r.g)(e).getBrandingOptions(t).then((function(e){return e.data}))]}))},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,s)}l((a=a.apply(n,i||[])).next())}));var n,i,o,a}(e,{signal:n})},enabled:!!e})},u=function(){var e=(0,a.gf)().api;return(0,o.I)(l(e))}},44797:function(e,t){"use strict";function n(e,t){if(!e)throw new Error("obj cannot be null!");e._callbacks=e._callbacks||{};var n=e._callbacks[t];return n||(e._callbacks[t]=[],n=e._callbacks[t]),n}t.A={on:function(e,t,r){n(e,t).push(r)},off:function(e,t,r){var i=n(e,t),o=i.indexOf(r);-1!==o&&i.splice(o,1)},trigger:function(e,t,r){void 0===r&&(r=[]);var i=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([{type:t}],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(r),!1);n(e,t).slice(0).forEach((function(t){t.apply(e,i)}))}}},45958:function(e,t,n){n(89336),n(36947),n(78557),n(23630),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))})),this.appendChild(t)}})})),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){Object.prototype.hasOwnProperty.call(e,"prepend")||Object.defineProperty(e,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))})),this.insertBefore(t,this.firstChild)}})}))},46782:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(83994),n(82367);var r=n(22622),i=n(34789),o=n(90381),a=n(44797);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 l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function d(e,t,n){t===n?(e[t]=!0,document.documentElement.classList.add("layout-"+t)):(e[t]=!1,document.documentElement.classList.remove("layout-"+t))}var f=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"tv",!1),u(this,"mobile",!1),u(this,"desktop",!1),u(this,"experimental",!1)},(t=[{key:"setLayout",value:function(e,t){if(e&&"auto"!==e){if(d(this,"mobile",e),d(this,"tv",e),d(this,"desktop",e),this.experimental="experimental"===e,this.experimental){var n=i.A.mobile?"mobile":this.defaultLayout||"desktop";d(this,n,n)}!1!==t&&o.A.set("layout",e)}else this.autoLayout(),!1!==t&&o.A.set("layout","");a.A.trigger(this,"modechange")}},{key:"getSavedLayout",value:function(){return o.A.get("layout")}},{key:"autoLayout",value:function(){i.A.mobile?this.setLayout("mobile",!1):i.A.tv||i.A.xboxOne||i.A.ps4?this.setLayout("tv",!1):this.setLayout(this.defaultLayout||"tv",!1)}},{key:"init",value:function(){var e=this.getSavedLayout();e?this.setLayout(e,!1):this.autoLayout()}}])&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());r.g.getDefaultLayout&&(f.defaultLayout=r.g.getDefaultLayout()),f.init(),t.A=f},47602:function(e,t,n){"use strict";var r=n(48080),i=n(70267),o=n(5898);t.A=function(e){return t=this,n=arguments,s=function(e,t){var n;return void 0===t&&(t=""),function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(a){switch(a.label){case 0:return"string"==typeof e&&(e={title:t,text:e}),(n=[]).push({name:e.cancelText||o.Ay.translate("ButtonCancel"),id:"cancel",type:"cancel"}),n.push({name:e.confirmText||o.Ay.translate("ButtonOk"),id:"ok",type:"delete"===e.primary?"delete":"submit"}),e.buttons=n,[4,i.appRouter.ready()];case 1:return a.sent(),[2,r.A.show(e).then((function(e){return"ok"===e?Promise.resolve():Promise.reject(new Error("Confirm dialog rejected"))}))]}}))},new((a=void 0)||(a=Promise))((function(e,r){function i(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(i,o)}l((s=s.apply(t,n||[])).next())}));var t,n,a,s}},48080:function(e,t,n){"use strict";n.d(t,{A:function(){return y}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(44962),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(90076),n(83994),n(23630),n(82367);var r=n(31234),i=n.n(r),o=n(22696),a=n.n(o),s=n(79754),l=n(36300),u=n(46782),c=n(10838),d=n(5898);function f(e){return f="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},f(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(10353),n(15453),n(98959);var y={show:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dialogOptions:{},buttons:[]},t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({removeOnClose:!0,scrollY:!1},e.dialogOptions),n=u.A.tv;n&&(t.size="fullscreen");var r=s.default.createDialog(t);r.classList.add("formDialog"),r.innerHTML=d.Ay.translateHtml('<div class="formDialogHeader formDialogHeader-clear justify-content-center"> <h1 class="formDialogHeaderTitle" style="margin-top:.5em;padding:0 1em"></h1> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered" style="padding-top:1em;padding-bottom:1em;text-align:center"> <div class="text"></div> </div> </div> <div class="formDialogFooter formDialogFooter-clear formDialogFooter-flex" style="margin:1em"></div> ',"core"),r.classList.add("align-items-center"),r.classList.add("justify-content-center");var o=r.querySelector(".formDialogContent");o.classList.add("no-grow"),n?(o.style["max-width"]="50%",o.style["max-height"]="60%",c.default.centerFocus.on(o,!1)):(o.style.maxWidth="".concat(Math.min(150*e.buttons.length+200,l.Ay.getWindowSize().innerWidth-50),"px"),r.classList.add("dialog-fullscreen-lowres")),e.title?r.querySelector(".formDialogHeaderTitle").innerText=e.title||"":r.querySelector(".formDialogHeaderTitle").classList.add("hide");var f,y,v=e.html||e.text||"";r.querySelector(".text").innerHTML=i().sanitize(v),v||r.querySelector(".dialogContentInner").classList.add("hide");var h,g="",b=!1;for(f=0,y=e.buttons.length;f<y;f++){var S=e.buttons[f],A=0===f?" autofocus":"",x="btnOption raised formDialogFooterItem formDialogFooterItem-autosize";S.type&&(x+=" button-".concat(S.type)),S.description&&(b=!0),b&&(x+=" formDialogFooterItem-vertical formDialogFooterItem-nomarginbottom"),g+='<button is="emby-button" type="button" class="'.concat(x,'" data-id="').concat(S.id,'"').concat(A,">").concat(a()(S.name),"</button>"),S.description&&(g+='<div class="formDialogFooterItem formDialogFooterItem-autosize fieldDescription" style="margin-top:.25em!important;margin-bottom:1.25em!important;">'.concat(S.description,"</div>"))}function w(){h=this.getAttribute("data-id"),s.default.close(r)}r.querySelector(".formDialogFooter").innerHTML=g,b&&r.querySelector(".formDialogFooter").classList.add("formDialogFooter-vertical");var P=r.querySelectorAll(".btnOption");for(f=0,y=P.length;f<y;f++)P[f].addEventListener("click",w);return s.default.open(r).then((function(){return n&&c.default.centerFocus.off(r.querySelector(".formDialogContent"),!1),h||Promise.reject()}))}("string"==typeof e?{title:t,text:e}:e)}}},50921:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var r=n(45251);function i(e,t){var n,i;void 0===t&&(t=!0);var o,a=null==e?void 0:e.Name;if((null==e?void 0:e.MediaType)===r.z.Video&&(null!=e.IndexNumber&&(a=e.IndexNumber+" - "+a),null!=e.ParentIndexNumber&&(a=e.ParentIndexNumber+"."+a)),(null===(n=null==e?void 0:e.ArtistItems)||void 0===n?void 0:n.length)?o=e.ArtistItems.map((function(e){return e.Name})).join(", "):(null===(i=null==e?void 0:e.Artists)||void 0===i?void 0:i.length)?o=e.Artists.join(", "):(null==e?void 0:e.SeriesName)||(null==e?void 0:e.Album)?(o=a,a=e.SeriesName||e.Album):(null==e?void 0:e.ProductionYear)&&t&&(o=String(e.ProductionYear)),a){var s=[a];return o&&s.push(o),s}}},51218:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var r=n(19373),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=function(e,t){switch(t){case r.u.Dashboard:return n(38601)("./".concat(e));case r.u.Experimental:return n(29561)("./".concat(e));case r.u.Stable:return n(92950)("./".concat(e))}},a=function(e){var t=e.path,n=e.page,a=e.type,s=void 0===a?r.u.Stable:a;return{path:t,lazy:function(){return e=void 0,r=void 0,l=function(){var e,r,a;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(l){switch(l.label){case 0:return[4,o(null!=n?n:t,s)];case 1:return e=l.sent(),r=e.default,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["default"]),[2,i({Component:r},a)]}}))},new((a=void 0)||(a=Promise))((function(t,n){function i(e){try{s(l.next(e))}catch(e){n(e)}}function o(e){try{s(l.throw(e))}catch(e){n(e)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(e){e(n)}))).then(i,o)}s((l=l.apply(e,r||[])).next())}));var e,r,a,l}}}},51876:function(e,t,n){"use strict";n.d(t,{$A:function(){return f},$D:function(){return h},Io:function(){return d},T5:function(){return b},Ve:function(){return p},x0:function(){return g},xy:function(){return S}}),n(29305),n(32733),n(84701),n(2623),n(69703),n(44962),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(82367);var r,i=n(68272),o=n(74659);function a(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,a=0,s=e,f.n=n,l}};function p(n,r){for(a=n,s=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(a=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),a=c,s=m;(t=a<2?e:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(u=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==l)break}catch(t){o=e,a=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(s(t={},r,(function(){return this})),t),p=d.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,i,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=d,s(p,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(p),s(p,i,"Generator"),s(p,r,(function(){return this})),s(p,"toString",(function(){return"[object Generator]"})),(a=function(){return{w:o,m:m}})()}function s(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}s=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){s(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},s(e,t,n,r)}function l(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function u(){return c.apply(this,arguments)}function c(){var e;return e=a().m((function e(){var t,n;return a().w((function(e){for(;;)switch(e.n){case 0:if(!r){e.n=1;break}return e.a(2,Promise.resolve(r));case 1:return e.p=1,e.n=2,(0,o.A)("config.json",{cache:"no-store"});case 2:if((t=e.v).ok){e.n=3;break}throw new Error("network response was not ok");case 3:return e.n=4,t.json();case 4:return r=e.v,e.a(2,r);case 5:return e.p=5,n=e.v,console.warn("failed to fetch the web config file:",n),r=i,e.a(2,r)}}),e,null,[[1,5]])})),c=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){l(o,r,i,a,s,"next",e)}function s(e){l(o,r,i,a,s,"throw",e)}a(void 0)}))},c.apply(this,arguments)}function d(){return u().then((function(e){return!!e.includeCorsCredentials})).catch((function(e){return console.log("cannot get web config:",e),!1}))}function f(){return u().then((function(e){return!!e.multiserver})).catch((function(e){return console.log("cannot get web config:",e),!1}))}function p(){return u().then((function(e){return e.servers||[]})).catch((function(e){return console.log("cannot get web config:",e),[]}))}var m={name:"Dark",id:"dark",default:!0},y=m,v=function(e){if(e){var t=e.find((function(e){return e.default}));if(t)return void(y=t)}y=m};function h(){return u().then((function(e){Array.isArray(e.themes)||console.error("web config is invalid, missing themes:",e);var t=Array.isArray(e.themes)?e.themes:i.themes;return v(t),t})).catch((function(e){return console.log("cannot get web config:",e),v(),i.themes}))}var g=function(){return y};function b(){return u().then((function(e){return e.menuLinks||console.error("web config is invalid, missing menuLinks:",e),e.menuLinks||[]})).catch((function(e){return console.log("cannot get web config:",e),[]}))}function S(){return u().then((function(e){return e.plugins||console.error("web config is invalid, missing plugins:",e),e.plugins||i.plugins})).catch((function(e){return console.log("cannot get web config:",e),i.plugins}))}},53089:function(e,t,n){"use strict";function r(e,t){if(!e)return!0;var n=!1;return"string"==typeof e&&(e.startsWith("-")&&(n=!0,e=e.substring(1)),e=e.split(",")),!(e=e.filter((function(e){return e}))).length||("string"==typeof t&&(t=t.split(",")),(t=t.filter((function(e){return e}))).some((function(t){return e.includes(t)}))?!n:n)}n.d(t,{q:function(){return r}})},54048:function(e,t,n){"use strict";n(14382),n(9698),n(78557);var r=n(5898),i=n(67430),o=n(10736),a=n(44797);n(10353),t.A=function(e){function t(){i.tF.getApiClient(f).getScheduledTasks({IsEnabled:!0}).then(n)}function n(t){var n=t.filter((function(t){return t.Key==e.taskKey}))[0];if(e.panel&&(n?e.panel.classList.remove("hide"):e.panel.classList.add("hide")),n){"Idle"==n.State?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled"),d.setAttribute("data-taskid",n.Id);var i=(n.CurrentProgressPercentage||0).toFixed(1);if(e.progressElem&&(e.progressElem.value=i,"Running"==n.State?e.progressElem.classList.remove("hide"):e.progressElem.classList.add("hide")),e.lastResultElem){var o=n.LastExecutionResult?n.LastExecutionResult.Status:"";"Failed"==o?e.lastResultElem.html('<span style="color:#FF0000;">('+r.Ay.translate("LabelFailed")+")</span>"):"Cancelled"==o?e.lastResultElem.html('<span style="color:#0026FF;">('+r.Ay.translate("LabelCancelled")+")</span>"):"Aborted"==o?e.lastResultElem.html('<span style="color:#FF0000;">'+r.Ay.translate("LabelAbortedByServerShutdown")+"</span>"):e.lastResultElem.html(o)}}}function s(){var e;e=this.getAttribute("data-taskid"),i.tF.getApiClient(f).startScheduledTask(e).then(t)}function l(e,t,r){t.serverId()===f&&n(r)}var u,c,d=e.button,f=ApiClient.serverId();e.panel&&e.panel.classList.add("hide"),"off"==e.mode?(d.removeEventListener("click",s),a.A.off(o.default,"ScheduledTasksInfo",l),i.tF.getApiClient(f).sendMessage("ScheduledTasksInfoStop"),u&&clearInterval(u)):(d.addEventListener("click",s),t(),c=i.tF.getApiClient(f),u&&clearInterval(u),c.sendMessage("ScheduledTasksInfoStart","1000,1000"),u=setInterval((function(){i.tF.getApiClient(f).isMessageChannelOpen()||t()}),5e3),a.A.on(o.default,"ScheduledTasksInfo",l))}},55219:function(e,t,n){"use strict";var r=n(25127),i=n(63696),o=n(87404),a=n(5898),s=n(62156),l=n(19373),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},f=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},p=function(e,t,r){switch(e){case l.u.Dashboard:return Promise.all([n(74370)("./".concat(t)),n(74370)("./".concat(r)).then((function(e){return a.Ay.translateHtml(e)}))]);case l.u.Wizard:return Promise.all([n(89599)("./".concat(t)),n(89599)("./".concat(r)).then((function(e){return a.Ay.translateHtml(e)}))]);default:return Promise.all([n(7062)("./".concat(t)),n(7062)("./".concat(r)).then((function(e){return a.Ay.translateHtml(e)}))])}},m=function(e,t,n,r){return c(void 0,void 0,void 0,(function(){var i,o,a;return d(this,(function(l){switch(l.label){case 0:return[4,p(e,t,n)];case 1:return i=f.apply(void 0,[l.sent(),2]),o=i[0],a=i[1],s.A.loadView(u(u({},r),{controllerFactory:o,view:a})),[2]}}))}))};t.A=function(e){var t=e.appType,n=void 0===t?l.u.Stable:t,a=e.controller,u=e.view,f=e.type,p=e.isFullscreen,y=void 0!==p&&p,v=e.isNowPlayingBarEnabled,h=void 0===v||v,g=e.isThemeMediaSupported,b=void 0!==g&&g,S=e.transition,A=(0,o.zy)(),x=(0,o.wQ)();return(0,i.useEffect)((function(){var e;e={url:A.pathname+A.search,type:f,state:A.state,autoFocus:!1,fullscreen:y,transition:S,options:{supportsThemeMedia:b,enableMediaControl:h}},x!==r.rc.Pop?(console.debug("[ViewManagerPage] loading view [%s]",u),m(n,a,u,e)):(console.debug("[ViewManagerPage] restoring view [%s]",u),s.A.tryRestoreView(e).catch((function(t){return c(void 0,void 0,void 0,(function(){return d(this,(function(r){return(null==t?void 0:t.cancelled)?[2]:(console.debug("[ViewManagerPage] restore failed; loading view [%s]",u),[2,m(n,a,u,e)])}))}))})))}),[a,u,f,y,h,b,S,A.pathname,A.search]),null}},56419:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(62540),i=(n(63696),n(87404)),o=n(13258),a=n(78057),s=n(30224);function l(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{children:(0,r.jsx)(i.sv,{})}),(0,r.jsx)(s.A,{}),(0,r.jsx)(a.A,{})]})}},57178:function(e,t,n){"use strict";var r;n.d(t,{g:function(){return r}}),function(e){e.Error="error",e.FullscreenChange="fullscreenchange",e.ItemStarted="itemstarted",e.ItemStopped="itemstopped",e.MediaStreamsChange="mediastreamschange",e.Pause="pause",e.PlaybackStart="playbackstart",e.PlaybackStop="playbackstop",e.PlaylistItemAdd="playlistitemadd",e.PlaylistItemMove="playlistitemmove",e.PlaylistItemRemove="playlistitemremove",e.PromptSkip="promptskip",e.RepeatModeChange="repeatmodechange",e.ShuffleModeChange="shufflequeuemodechange",e.StateChange="statechange",e.Stopped="stopped",e.TimeUpdate="timeupdate",e.Unpause="unpause",e.VolumeChange="volumechange"}(r||(r={}))},57634:function(e,t,n){"use strict";n.d(t,{A:function(){return T},L:function(){return j}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(69892),n(76281),n(84734),n(44962),n(86584),n(89336),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(96054),n(95021),n(73687),n(99425),n(83994),n(93062),n(64062),n(23630),n(82367);var r,i,o,a=n(34789),s=n(90381),l=n(82885);function u(e){return u="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},u(e)}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){return!!(a.A.tizen||a.A.xboxOne||a.A.web0s||t.supportsHevc)||!a.A.ps4&&!!e.canPlayType&&(e.canPlayType('video/mp4; codecs="hvc1.1.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hev1.1.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hvc1.1.0.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hev1.1.0.L120"').replace(/no/,""))}function v(e){return a.A.tizenVersion>=5.5||a.A.web0sVersion>=5||!!e.canPlayType&&e.canPlayType('video/mp4; codecs="av01.0.15M.08"').replace(/no/,"")&&e.canPlayType('video/mp4; codecs="av01.0.15M.10"').replace(/no/,"")}function h(){return null==o&&(o=g()||null!=window.MediaSource),o}function g(){if(a.A.tizen)return!0;var e=document.createElement("video");return!(!e.canPlayType("application/x-mpegURL").replace(/no/,"")&&!e.canPlayType("application/vnd.apple.mpegURL").replace(/no/,""))}function b(e){return!!(a.A.edgeUwp||a.A.tizen||a.A.web0s)||!(a.A.iOS&&a.A.iOSVersion<11)&&e.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/,"")}function S(e){return!(!a.A.tizen&&!a.A.web0s)||!(a.A.iOS&&a.A.iOSVersion<11)&&e.canPlayType('audio/mp4; codecs="ec-3"').replace(/no/,"")}function A(e){var t;if("flac"===e||"asf"===e){if(a.A.tizen||a.A.web0s||a.A.edgeUwp)return!0}else if("wma"===e){if(a.A.tizen||a.A.edgeUwp)return!0}else if("opus"===e){if(a.A.web0s)return a.A.web0sVersion>=3.5;t='audio/ogg; codecs="opus"'}else if("alac"===e){if(a.A.iOS||a.A.osx&&a.A.safari)return!0}else if("mp2"===e)return!1;return"webma"===e?t="audio/webm":"mp2"===e?t="audio/mpeg":t||(t="audio/"+e),!!document.createElement("audio").canPlayType(t).replace(/no/,"")}function x(){return a.A.tizen||a.A.web0s||a.A.edgeUwp}function w(e){return a.A.tizen||a.A.web0s||a.A.edgeUwp||e.canPlayType('video/mp4; codecs="vc-1"').replace(/no/,"")}function P(e){var t;return null!==(t=e.supportsHdr10)&&void 0!==t?t:a.A.vidaa||a.A.tizen||a.A.web0s||a.A.safari&&(a.A.iOS&&a.A.iOSVersion>=11||a.A.osx)||a.A.edgeChromium&&a.A.versionMajor>=121||a.A.chrome&&!a.A.mobile||a.A.firefox&&a.A.osx&&!a.A.iphone&&!a.A.ipod&&!a.A.ipad&&a.A.versionMajor>=100}function k(e){var t;return null!==(t=e.supportsDolbyVision)&&void 0!==t?t:a.A.safari&&(a.A.iOS&&a.A.iOSVersion>=13||a.A.osx)}var I=null;function j(e){return!!e.audioTracks&&!a.A.firefox&&(a.A.tizenVersion>=5.5&&a.A.tizenVersion<8||!a.A.tizen)&&(a.A.web0sVersion>=4||!a.A.web0sVersion)}function T(e){var t;e=e||{};var n=12e7,o=document.createElement("video"),u=function(e,t){var n=parseInt(l.allowedAudioChannels(),10);if(n>0)return n;if(e.audioChannels)return e.audioChannels;var r=a.A.safari||a.A.chrome||a.A.edgeChromium||a.A.firefox||a.A.tv||a.A.ps4||a.A.xboxOne,i=b(t)||S(t),o=function(){if(null!=I)return I;I=-1;var e=window.AudioContext||window.webkitAudioContext||!1;if(e){var t=new e;I=t.destination.maxChannelCount}return I}();return i&&r?o>6?o:6:o>2?r?o:2:o>0?o:r?6:2}(e,o),d=o.canPlayType('video/webm; codecs="vp8"').replace(/no/,""),f=o.canPlayType('video/webm; codecs="vp9"').replace(/no/,""),m=a.A.safari&&a.A.versionMajor>=17&&!!document.createElement("audio").canPlayType('audio/x-caf; codecs="opus"').replace(/no/,""),T=["vorbis"],C=function(e){return!(a.A.vidaa||!a.A.tizen&&!a.A.web0s&&!e.canPlayType("video/x-matroska").replace(/no/,"")&&!e.canPlayType("video/mkv").replace(/no/,"")&&(!a.A.edgeChromium||!a.A.windows)&&!a.A.edgeUwp)}(o),E={MaxStreamingBitrate:n,MaxStaticBitrate:1e8,MusicStreamingTranscodingBitrate:Math.min(n,384e3),DirectPlayProfiles:[]},_=[],L=[],M=[],O=o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.69"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.6B"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="avc1.640029, mp3"').replace(/no/,""),R=e.supportsMp2VideoAudio;null==R&&(R=a.A.edgeUwp||a.A.tizen||a.A.web0s,O&&(a.A.chrome||a.A.edgeChromium||a.A.firefox&&a.A.versionMajor>=83)&&(R=!0),a.A.android&&(R=!1));var D=a.A.xboxOne?null===(t=window.screen)||void 0===t?void 0:t.width:null;e.maxVideoWidth&&(D=e.maxVideoWidth);var N=o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/,""),F=function(e){return!!e.canPlayType&&(e.canPlayType('application/x-mpegurl; codecs="avc1.64001E, mp4a.40.34"').replace(/no/,"")||e.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.64001E, mp4a.40.34"').replace(/no/,""))}(o),U=b(o),V=S(o),B=function(e){return!(a.A.web0sVersion>=4)&&(!(!a.A.tizen&&!a.A.web0s)||!!e.canPlayType&&(e.canPlayType('application/x-mpegurl; codecs="avc1.42E01E, ac-3"').replace(/no/,"")||e.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.42E01E, ac-3"').replace(/no/,"")))}(o);N&&(_.push("aac"),L.push("aac"),M.push("aac")),O&&_.push("mp3"),(a.A.safari||O&&!a.A.ps4)&&L.push("mp3"),F&&M.push("mp3"),U&&(_.push("ac3"),a.A.edgeChromium&&M.push("ac3"),V&&(_.push("eac3"),a.A.edgeChromium&&M.push("eac3")),B&&(L.push("ac3"),M.push("ac3"),V&&(L.push("eac3"),M.push("eac3")))),R&&(_.push("mp2"),L.push("mp2"),M.push("mp2"));var z=s.A.enableDts()||e.supportsDts;null==z&&(z=function(e){return!(a.A.tizenVersion>=4||a.A.web0sVersion>=5&&a.A.web0sVersion<23)&&(!(!e.canPlayType('video/mp4; codecs="dts-"').replace(/no/,"")&&!e.canPlayType('video/mp4; codecs="dts+"').replace(/no/,""))||null)}(o)),z&&(_.push("dca"),_.push("dts")),(a.A.tizen||a.A.web0s)&&(_.push("pcm_s16le"),_.push("pcm_s24le")),(s.A.enableTrueHd()||e.supportsTrueHd)&&_.push("truehd"),a.A.tizen&&_.push("aac_latm"),A("opus")?(_.push("opus"),T.push("opus"),a.A.tizen&&L.push("opus"),M.push("opus")):m&&(_.push("opus"),T.push("opus"),M.push("opus")),A("flac")&&!a.A.tizen&&(_.push("flac"),M.push("flac")),A("alac")&&(_.push("alac"),M.push("alac")),_=_.filter((function(t){return-1===(e.disableVideoAudioCodecs||[]).indexOf(t)})),L=L.filter((function(t){return-1===(e.disableHlsVideoAudioCodecs||[]).indexOf(t)})),M=M.filter((function(t){return-1===(e.disableHlsVideoAudioCodecs||[]).indexOf(t)}));var q=[],H=[],G=[],W=[];v(o)&&(a.A.safari||!a.A.mobile&&(a.A.edgeChromium||a.A.firefox||a.A.chrome||a.A.opera))&&W.push("av1"),y(o,e)&&(a.A.edgeChromium||a.A.safari||a.A.tizen||a.A.web0s||a.A.chrome&&(!a.A.android||a.A.versionMajor>=105)||a.A.opera&&!a.A.mobile||a.A.firefox&&a.A.versionMajor>=134)&&W.push("hevc"),function(e){var t;return!(null===(t=e.canPlayType)||void 0===t||!t.call(e,'video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,""))}(o)&&(q.push("h264"),G.push("h264"),W.push("h264")),y(o,e)&&(q.push("hevc"),(a.A.tizen||a.A.web0s||a.A.vidaa)&&G.push("hevc")),x()&&q.push("mpeg2video"),w(o)&&q.push("vc1"),a.A.tizen&&q.push("msmpeg4v2"),d&&H.push("vp8"),f&&(a.A.iOS||a.A.firefox&&a.A.osx||q.push("vp9"),(a.A.safari||a.A.edgeChromium||a.A.chrome||a.A.firefox)&&W.push("vp9"),(!a.A.safari||a.A.safari&&a.A.versionMajor>=15&&a.A.versionMajor<17)&&H.push("vp9")),v(o)&&(q.push("av1"),(!a.A.safari||a.A.safari&&a.A.versionMajor>=15&&a.A.versionMajor<17)&&H.push("av1")),(!a.A.safari&&d||a.A.tizen)&&_.push("vorbis"),H.length&&E.DirectPlayProfiles.push({Container:"webm",Type:"Video",VideoCodec:H.join(","),AudioCodec:T.join(",")}),q.length&&E.DirectPlayProfiles.push({Container:"mp4,m4v",Type:"Video",VideoCodec:q.join(","),AudioCodec:_.join(",")}),C&&q.length&&E.DirectPlayProfiles.push({Container:"mkv",Type:"Video",VideoCodec:q.join(","),AudioCodec:_.join(",")}),["m2ts","wmv","ts","asf","avi","mpg","mpeg","flv","3gp","mts","trp","vob","vro","mov"].map((function(t){return function(e,t,n,r){var i=!1,o=e,s=[];switch(e){case"asf":case"wmv":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,t=[];break;case"avi":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,a.A.tizenVersion>=4&&(s.push("h264"),y(n,r)&&s.push("hevc"));break;case"mpg":case"mpeg":i=a.A.tizen||a.A.web0s||a.A.edgeUwp;break;case"flv":case"3gp":case"mts":case"trp":case"vob":case"vro":i=a.A.tizen;break;case"mov":i=a.A.safari||a.A.tizen||a.A.web0s||a.A.chrome||a.A.edgeChromium||a.A.edgeUwp,s.push("h264");break;case"m2ts":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,s.push("h264"),w(n)&&s.push("vc1"),x()&&s.push("mpeg2video");break;case"ts":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,s.push("h264"),(a.A.tizen||a.A.web0s)&&y(n,r)&&s.push("hevc"),w(n)&&s.push("vc1"),x()&&s.push("mpeg2video"),o="ts,mpegts"}return i?{Container:o,Type:"Video",VideoCodec:s.join(","),AudioCodec:t.join(",")}:null}(t,_,o,e)})).filter((function(e){return null!=e})).forEach((function(e){E.DirectPlayProfiles.push(e)})),["opus","mp3","mp2","aac","flac","alac","webma","wma","wav","ogg","oga"].filter(A).forEach((function(e){"mp3"!=e||F||E.DirectPlayProfiles.push({Container:"ts",AudioCodec:"mp3",Type:"Audio"}),"flac"===e&&s.A.alwaysRemuxFlac()?E.DirectPlayProfiles.push({Container:"mp4",AudioCodec:"flac",Type:"Audio"}):"mp3"===e&&s.A.alwaysRemuxMp3()||E.DirectPlayProfiles.push({Container:e,Type:"Audio"}),"opus"!==e&&"webma"!==e||E.DirectPlayProfiles.push({Container:"webm",AudioCodec:e,Type:"Audio"}),"aac"!==e&&"alac"!==e||(E.DirectPlayProfiles.push({Container:"m4a",AudioCodec:e,Type:"Audio"}),E.DirectPlayProfiles.push({Container:"m4b",AudioCodec:e,Type:"Audio"}))})),m&&E.DirectPlayProfiles.push({Container:"mp4",AudioCodec:"opus",Type:"Audio"}),E.TranscodingProfiles=[];var Y=a.A.iOS||a.A.osx||a.A.edge||!g(),Q=l.preferFmp4HlsContainer();if((a.A.safari||a.A.tizen||a.A.web0s)&&!(a.A.tizenVersion>=5||a.A.web0sVersion>=3.5||a.A.iOS&&a.A.iOSVersion>=11||a.A.osx)&&(Q=!1),h()&&!1!==a.A.enableHlsAudio&&E.TranscodingProfiles.push({Container:Q?"mp4":"ts",Type:"Audio",AudioCodec:"aac",Context:"Streaming",Protocol:"hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2":"1",BreakOnNonKeyFrames:Y,EnableAudioVbrEncoding:!s.A.disableVbrAudio()}),["aac","mp3","opus","wav"].filter(A).forEach((function(e){E.TranscodingProfiles.push({Container:e,Type:"Audio",AudioCodec:e,Context:"Streaming",Protocol:"http",MaxAudioChannels:u.toString()})})),["opus","mp3","aac","wav"].filter(A).forEach((function(e){E.TranscodingProfiles.push({Container:e,Type:"Audio",AudioCodec:e,Context:"Static",Protocol:"http",MaxAudioChannels:u.toString()})})),h()&&!1!==e.enableHls){var K=l.limitSegmentLength();W.length&&M.length&&Q&&(E.DirectPlayProfiles.push({Container:"hls",Type:"Video",VideoCodec:W.join(","),AudioCodec:M.join(",")}),E.TranscodingProfiles.push({Container:"mp4",Type:"Video",AudioCodec:M.join(","),VideoCodec:W.join(","),Context:"Streaming",Protocol:"hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2":"1",BreakOnNonKeyFrames:Y,SegmentLength:K?1:void 0})),G.length&&L.length&&(E.DirectPlayProfiles.push({Container:"hls",Type:"Video",VideoCodec:G.join(","),AudioCodec:L.join(",")}),E.TranscodingProfiles.push({Container:"ts",Type:"Video",AudioCodec:L.join(","),VideoCodec:G.join(","),Context:"Streaming",Protocol:"hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2":"1",BreakOnNonKeyFrames:Y,SegmentLength:K?1:void 0}))}E.ContainerProfiles=[],a.A.tizen&&E.ContainerProfiles.push({Type:"Video",Conditions:[{Condition:"LessThanEqual",Property:"NumStreams",Value:"32",IsRequired:!1}]}),E.CodecProfiles=[];var J=j(o),X=[];o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.5"').replace(/no/,"")||X.push({Condition:"NotEquals",Property:"AudioProfile",Value:"HE-AAC"}),J||X.push({Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:!1}),X.length&&E.CodecProfiles.push({Type:"VideoAudio",Codec:"aac",Conditions:X});var $=[],Z=[];if(parseInt(l.allowedAudioChannels(),10)>0&&($.push({Condition:"LessThanEqual",Property:"AudioChannels",Value:u.toString(),IsRequired:!1}),Z.push({Condition:"LessThanEqual",Property:"AudioChannels",Value:u.toString(),IsRequired:!1})),J||Z.push({Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:!1}),$.length&&E.CodecProfiles.push({Type:"Audio",Conditions:$}),Z.length&&E.CodecProfiles.push({Type:"VideoAudio",Conditions:Z}),a.A.web0s){var ee,te=[{Condition:"LessThanEqual",Property:"AudioChannels",Value:"2",IsRequired:!1}];E.CodecProfiles.push({Type:"VideoAudio",Codec:"flac",Conditions:te});var ne=[];E.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(",");if(t.includes("flac")){var n=p({},e);n.AudioCodec="flac",n.ApplyConditions=[].concat(c(n.ApplyConditions||[]),te),ne.push(n),e.AudioCodec=t.filter((function(e){return"flac"!=e})).join(",")}}})),(ee=E.TranscodingProfiles).push.apply(ee,ne)}if(m){var re,ie=[{Condition:"LessThanEqual",Property:"AudioChannels",Value:"2",IsRequired:!1}];E.CodecProfiles.push({Type:"VideoAudio",Codec:"opus",Conditions:ie});var oe=[];E.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(",");if(t.includes("opus")){var n=p({},e);n.AudioCodec="opus",n.ApplyConditions=[].concat(c(n.ApplyConditions||[]),ie),oe.push(n),e.AudioCodec=t.filter((function(e){return"opus"!=e})).join(",")}}})),(re=E.TranscodingProfiles).push.apply(re,oe)}var ae=42,se="high|main|baseline|constrained baseline";(a.A.tizen||a.A.web0s||o.canPlayType('video/mp4; codecs="avc1.640833"').replace(/no/,""))&&(ae=51),(a.A.tizenVersion>=5&&window.NativeShell||o.canPlayType('video/mp4; codecs="avc1.640834"').replace(/no/,""))&&(ae=52),!o.canPlayType('video/mp4; codecs="avc1.6e0033"').replace(/no/,"")||a.A.safari||a.A.iOS||a.A.web0s||a.A.edge||a.A.mobile||a.A.tizen||(se+="|high 10");var le=120,ue="main";(o.canPlayType('video/mp4; codecs="hvc1.1.4.L123"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.1.4.L123"').replace(/no/,""))&&(le=123),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L123"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L123"').replace(/no/,""))&&(le=123,ue="main|main 10"),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L153"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L153"').replace(/no/,""))&&(le=153,ue="main|main 10"),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L183"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L183"').replace(/no/,""))&&(le=183,ue="main|main 10");var ce=15;o.canPlayType('video/mp4; codecs="av01.0.16M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.16M.10"').replace(/no/,"")&&(ce=16),o.canPlayType('video/mp4; codecs="av01.0.17M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.17M.10"').replace(/no/,"")&&(ce=17),o.canPlayType('video/mp4; codecs="av01.0.18M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.18M.10"').replace(/no/,"")&&(ce=18),o.canPlayType('video/mp4; codecs="av01.0.19M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.19M.10"').replace(/no/,"")&&(ce=19);var de="SDR",fe="SDR",pe="SDR";if(a.A.tizenVersion>=3&&(de+="|DOVIWithSDR"),P(e)&&(de+="|HDR10",fe+="|HDR10",pe+="|HDR10",(a.A.tizenVersion>=3||a.A.vidaa)&&(de+="|DOVIWithHDR10")),function(e){var t;return null!==(t=e.supportsHlg)&&void 0!==t?t:P(e)}(e)&&(de+="|HLG",fe+="|HLG",pe+="|HLG",a.A.tizenVersion>=3&&(de+="|DOVIWithHLG")),k(e)){var me=function(e){if(a.A.xboxOne)return[5,8];var t=[];return e.canPlayType&&(e.canPlayType('video/mp4; codecs="dvh1.05.06"').replace(/no/,"")&&t.push(5),(e.canPlayType('video/mp4; codecs="dvh1.08.06"').replace(/no/,"")||a.A.web0sVersion>=4)&&t.push(8)),t}(o);me.includes(5)&&(de+="|DOVI"),me.includes(8)&&(de+="|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR"),function(e){var t;return null===(t=e.canPlayType)||void 0===t?void 0:t.call(e,'video/mp4; codecs="dav1.10.06"').replace(/no/,"")}(o)&&(pe+="|DOVI|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR")}var ye=[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:se,IsRequired:!1},{Condition:"EqualsAny",Property:"VideoRangeType",Value:"SDR",IsRequired:!1},{Condition:"LessThanEqual",Property:"VideoLevel",Value:ae.toString(),IsRequired:!1}],ve=[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:ue,IsRequired:!1},{Condition:"EqualsAny",Property:"VideoRangeType",Value:de,IsRequired:!1},{Condition:"LessThanEqual",Property:"VideoLevel",Value:le.toString(),IsRequired:!1}],he=[{Condition:"EqualsAny",Property:"VideoRangeType",Value:fe,IsRequired:!1}],ge=[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:"main",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoRangeType",Value:pe,IsRequired:!1},{Condition:"LessThanEqual",Property:"VideoLevel",Value:ce.toString(),IsRequired:!1}];a.A.edgeUwp||a.A.tizen||a.A.web0s||(ye.push({Condition:"NotEquals",Property:"IsInterlaced",Value:"true",IsRequired:!1}),ve.push({Condition:"NotEquals",Property:"IsInterlaced",Value:"true",IsRequired:!1})),D&&(ye.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}),ve.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}),ge.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}));var be=(function(){var e=!1;if(a.A.tizen)try{e=!webapis.productinfo.isUdPanelSupported(),console.debug("isTizenFhd = "+e)}catch(e){console.error("isUdPanelSupported() error code = "+e.code)}var t=null;return a.A.ps4?t=8e6:a.A.xboxOne?t=12e6:a.A.tizen&&e&&(t=2e7),t}()||"").toString(),Se=be,Ae=be,xe=be;if(Se&&ye.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:Se,IsRequired:!0}),Ae&&ve.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:Ae,IsRequired:!0}),xe&&ge.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:xe,IsRequired:!0}),a.A.safari&&(ve.push({Condition:"EqualsAny",Property:"VideoCodecTag",Value:"hvc1|dvh1",IsRequired:!0}),ve.push({Condition:"LessThanEqual",Property:"VideoFramerate",Value:"60",IsRequired:!0})),a.A.iOS&&a.A.iOSVersion<13){var we={Type:"Video",Codec:"h264",Container:"ts",Conditions:ye.filter((function(e){return"VideoLevel"!==e.Property}))};we.Conditions.push({Condition:"LessThanEqual",Property:"VideoLevel",Value:"42",IsRequired:!1}),E.CodecProfiles.push(we);var Pe={Type:"Video",Codec:"h264",Container:"mp4",Conditions:ye.filter((function(e){return"VideoLevel"!==e.Property}))};Pe.Conditions.push({Condition:"LessThanEqual",Property:"VideoLevel",Value:"42",IsRequired:!1}),E.CodecProfiles.push(Pe)}a.A.safari&&s.A.enableHi10p()&&E.CodecProfiles.push({Type:"Video",Container:"hls",SubContainer:"mp4",Codec:"h264",Conditions:[{Condition:"EqualsAny",Property:"VideoProfile",Value:se+"|high 10",IsRequired:!1}]}),E.CodecProfiles.push({Type:"Video",Codec:"h264",Conditions:ye}),a.A.web0s&&k(e)&&E.CodecProfiles.push({Type:"Video",Container:"-mp4,ts",Codec:"hevc",Conditions:[{Condition:"EqualsAny",Property:"VideoRangeType",Value:de.split("|").filter((function(e){return!e.startsWith("DOVI")})).join("|"),IsRequired:!1}]}),E.CodecProfiles.push({Type:"Video",Codec:"hevc",Conditions:ve}),E.CodecProfiles.push({Type:"Video",Codec:"vp9",Conditions:he}),E.CodecProfiles.push({Type:"Video",Codec:"av1",Conditions:ge});var ke=[];be&&ke.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:be}),D&&ke.push({Condition:"LessThanEqual",Property:"Width",Value:D.toString(),IsRequired:!1}),ke.length&&E.CodecProfiles.push({Type:"Video",Conditions:ke}),E.SubtitleProfiles=[];var Ie=s.A.get("subtitleburnin"),je="true"===s.A.get("subtitlerenderpgs");return"all"!==Ie&&((a.A.tizen||(null==r&&(r=null!=document.createElement("video").textTracks),r))&&E.SubtitleProfiles.push({Format:"vtt",Method:"External"}),!1===e.enableSsaRender||e.isRetry||"allcomplexformats"===Ie||(E.SubtitleProfiles.push({Format:"ass",Method:"External"}),E.SubtitleProfiles.push({Format:"ssa",Method:"External"})),null==i&&(i=null!=document.createElement("canvas").getContext("2d")),i&&!1!==e.enablePgsRender&&!e.isRetry&&je&&"allcomplexformats"!==Ie&&"onlyimageformats"!==Ie&&E.SubtitleProfiles.push({Format:"pgssub",Method:"External"})),E.ResponseProfiles=[],E.ResponseProfiles.push({Type:"Video",Container:"m4v",MimeType:"video/mp4"}),E}},58180:function(e,t,n){"use strict";n.d(t,{B1:function(){return f},EK:function(){return k},HI:function(){return g},JN:function(){return w},JQ:function(){return p},Oy:function(){return A},X9:function(){return I},Y3:function(){return u},ZB:function(){return x},bR:function(){return m},di:function(){return v},iP:function(){return c},jK:function(){return y},n8:function(){return b},qQ:function(){return d},qh:function(){return j},si:function(){return S},we:function(){return P}}),n(24776),n(44962),n(94),n(78557),n(90076),n(95021),n(83994),n(93062),n(23630),n(82367),n(24362),n(76218),n(99102);var r,i,o=n(90381),a=n(34789),s=n(44797),l=n(80262);function u(){return o.A.get("volume")||1}function c(e){e&&o.A.set("volume",e)}function d(e){return e.IsRemote?null:"anonymous"}function f(e,t){return!(a.A.iOS||!a.A.safari||!e.MediaStreams.some((function(e){return"vp9"===e.Codec})))||p(e.RunTimeTicks,t)}function p(e,t){if(null==window.MediaSource)return!1;if(a.A.iOS)return!1;if(a.A.web0sVersion>=4)return!0;if(a.A.tizen||a.A.web0s)return!1;if((n=document.createElement("video")).canPlayType("application/x-mpegURL").replace(/no/,"")||n.canPlayType("application/vnd.apple.mpegURL").replace(/no/,"")){if(a.A.android&&("Audio"===t||"Video"===t))return!0;if(a.A.chrome||a.A.edgeChromium||a.A.opera)return!0;if(e)return!1}var n;return!0}function m(e,t){var n,o=e._hlsPlayer;if(o){var a=Date.now();null!==(n=window.performance)&&void 0!==n&&n.now&&(a=performance.now()),!r||a-r>3e3?(r=a,console.debug("try to recover media Error ..."),o.recoverMediaError()):!i||a-i>3e3?(i=a,console.debug("try to swap Audio Codec and recover media Error ..."),o.swapAudioCodec(),o.recoverMediaError()):(console.error("cannot recover, last media error recovery failed ..."),t?t():y(e,l.F.FATAL_HLS_ERROR))}}function y(e,t){e.destroyCustomTrack&&e.destroyCustomTrack(e._mediaElement),s.A.trigger(e,"error",[{type:t}])}function v(e){return e&&!isNaN(e)&&e!==Number.POSITIVE_INFINITY&&e!==Number.NEGATIVE_INFINITY}function h(e,t){Math.abs((e.currentTime||0)-t)>=1&&(e.currentTime=t)}function g(e,t,n,r){var i=(n||0)/1e7;if(i)if(t.duration>=i)h(t,i),r&&r();else{var o=["durationchange","loadeddata","play","loadedmetadata"],a=function(e){0===t.currentTime&&t.duration>=i&&(console.debug("seeking to ".concat(i," on ").concat(e.type," event")),h(t,i),o.forEach((function(e){t.removeEventListener(e,a)})),r&&r())};o.forEach((function(e){t.addEventListener(e,a)}))}}function b(e,t,n){var r;return window.Windows&&null!==(r=n.mediaSource)&&void 0!==r&&r.IsLocal?Windows.Storage.StorageFile.getFileFromPathAsync(n.url).then((function(t){var r=new Windows.Media.Playback.MediaPlaybackList,i=Windows.Media.Core.MediaSource.createFromStorageFile(t),o=(n.playerStartPositionTicks||0)/1e4;return r.items.append(new Windows.Media.Playback.MediaPlaybackItem(i,o)),e.src=URL.createObjectURL(r,{oneTimeOnly:!0}),Promise.resolve()})):(e.src=t,Promise.resolve())}function S(e){e.src="",e.innerHTML="",e.removeAttribute("src")}function A(e,t){try{return e.play().catch((function(e){var t=(e.name||"").toLowerCase();return"notallowederror"===t||"aborterror"===t?Promise.resolve():Promise.reject(e)})).then((function(){return function(e,t){e.addEventListener("error",t)}(e,t),Promise.resolve()}))}catch(e){return console.error("error calling video.play: "+e),Promise.reject()}}function x(e){var t=e._castPlayer;if(t){try{t.unload()}catch(e){console.error(e)}e._castPlayer=null}}function w(e){var t=e._hlsPlayer;if(t){try{t.destroy()}catch(e){console.error(e)}e._hlsPlayer=null}}function P(e){var t=e._flvPlayer;if(t){try{t.unload(),t.detachMediaElement(),t.destroy()}catch(e){console.error(e)}e._flvPlayer=null}}function k(e,t,n,r,i,o){t.on(Hls.Events.MANIFEST_PARSED,(function(){A(n,r).then(i,(function(){o&&(o(),o=null)}))})),t.on(Hls.Events.ERROR,(function(n,r){var i;if(console.error("HLS Error: Type: "+r.type+" Details: "+(r.details||"")+" Fatal: "+(r.fatal||!1)),r.type===Hls.ErrorTypes.NETWORK_ERROR&&null!==(i=r.response)&&void 0!==i&&i.code&&r.response.code>=400)return console.debug("hls.js response error code: "+r.response.code),t.destroy(),void(o?(o(l.F.SERVER_ERROR),o=null):y(e,l.F.SERVER_ERROR));if(r.fatal)switch(r.type){case Hls.ErrorTypes.NETWORK_ERROR:r.response&&0===r.response.code?(console.debug("hls.js response error code: "+r.response.code),t.destroy(),o?(o(l.F.NETWORK_ERROR),o=null):y(e,l.F.NETWORK_ERROR)):(console.debug("fatal network error encountered, try to recover"),t.startLoad());break;case Hls.ErrorTypes.MEDIA_ERROR:console.debug("fatal media error encountered, try to recover"),m(e,o),o=null;break;default:console.debug("Cannot recover from hls error - destroy and trigger error"),t.destroy(),o?(o(),o=null):y(e,l.F.FATAL_HLS_ERROR)}}))}function I(e,t,n){t.removeEventListener("error",n),S(t),w(e),P(e),x(e);var r={src:e._currentSrc};s.A.trigger(e,"stopped",[r]),e._currentTime=null,e._currentSrc=null,e._currentPlayOptions=null}function j(e,t){var n,r=[],i=t.buffered||[],o=e._currentPlayOptions;o&&(n=o.transcodingOffsetTicks),n=n||0;for(var a=0,s=i.length;a<s;a++){var l=i.start(a),u=i.end(a);v(l)||(l=0),v(u)?r.push({start:1e7*l+n,end:1e7*u+n}):u=0}return r}},58953:function(e,t,n){"use strict";function r(){return!("object"!=typeof Intl||!Intl||"function"!=typeof Intl.NumberFormat)}function i(e,t){return Math.floor(Math.random()*(t-e+1))+e}function o(e,t){return r()?e.toLocaleString(t):e.toString()}function a(e,t){return null==e?"":r()?e.toLocaleString(t,{style:"percent",maximumFractionDigits:0}):"".concat(Math.round(100*e),"%")}function s(e){return Number.isInteger(e)?0:e.toString().split(".")[1].length}n.d(t,{HO:function(){return i},WZ:function(){return o},a4:function(){return a},lf:function(){return s}})},58961:function(e,t,n){"use strict";n.d(t,{u:function(){return o}});var r=n(11444),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=i(i({},r.D),{Timer:"Timer",SeriesTimer:"SeriesTimer",AudioPodcast:"AudioPodcast"})},60182:function(e,t,n){"use strict";n.d(t,{AQ:function(){return u},IB:function(){return l}});var r=n(62540),i=n(63696),o=n(68272),a=n(74659),s=(0,i.createContext)(o),l=function(){return(0,i.useContext)(s)},u=function(e){var t=e.children,n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)(o),2),l=n[0],u=n[1];return(0,i.useEffect)((function(){var e,t,n,r;(e=void 0,t=void 0,n=void 0,r=function(){var e,t,n;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(0,a.A)("config.json",{cache:"no-store"})];case 1:if(!(e=r.sent()).ok)throw new Error("network response was not ok");return[4,e.json()];case 2:return t=r.sent(),u(t),[3,4];case 3:return n=r.sent(),console.warn("[WebConfigProvider] failed to fetch config file",n),[3,4];case 4:return[2]}}))},new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))).catch((function(){}))}),[u]),(0,r.jsx)(s.Provider,{value:l,children:t})}},62156:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(84734),n(44962),n(4754),n(94),n(36947),n(78557),n(90076),n(95021),n(83994),n(93062),n(23630),n(82367),n(99102);var r,i,o=n(64963),a=n(9164),s=n(46782);function l(e){return l="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},l(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function d(e,t,n){r&&p(r,null,"viewhide"),r=e;var o=m(e,t,n);n?s.A.mobile||(e.activeElement&&document.body.contains(e.activeElement)&&a.A.isCurrentlyFocusable(e.activeElement)?a.A.focus(e.activeElement):a.A.autoFocus(e)):!1!==t.autoFocus&&a.A.autoFocus(e),e.dispatchEvent(new CustomEvent("viewshow",o)),i&&e.dispatchEvent(new CustomEvent("pageshow",o))}function f(e){var t=e.getAttribute("data-properties");return t?t.split(","):[]}function p(e,t,n,r){t||(t={detail:{type:e.getAttribute("data-type"),properties:f(e)},bubbles:!0,cancelable:r}),t.cancelable=r||!1;var o=e.dispatchEvent(new CustomEvent(n,t));return i&&(t.cancelable=!1,e.dispatchEvent(new CustomEvent(n.replace("view","page"),t))),o}function m(e,t,n){var r=t.state,i=t.url,o=t.options,a=void 0===o?{}:o,s=i.indexOf("?"),l=new URLSearchParams(i.substring(s+1)),u={};return l.forEach((function(e,t){u[t]=e})),{detail:{type:e.getAttribute("data-type"),properties:f(e),params:u,isRestored:n,state:r,options:a},bubbles:!0,cancelable:!1}}o.Ay.setOnBeforeChange((function(e,t,n){r&&p(r,null,"viewbeforehide",!0);var o=m(e,n,t);e.initComplete||(e.initComplete=!0,"function"==typeof n.controllerFactory?new n.controllerFactory(e,o.detail.params):n.controllerFactory&&"function"==typeof n.controllerFactory.default&&new n.controllerFactory.default(e,o.detail.params),n.controllerFactory&&!i||p(e,o,"viewinit")),p(e,o,"viewbeforeshow")})),document.addEventListener("skinunload",(function(){o.Ay.reset()}));var y=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"loadView",value:function(e){r&&(r.activeElement=document.activeElement),e.cancel||o.Ay.loadView(e).then((function(t){d(t,e)}))}},{key:"hideView",value:function(){r&&(p(r,null,"viewbeforehide"),p(r,null,"viewhide"),r.classList.add("hide"),r=null)}},{key:"tryRestoreView",value:function(e,t){return e.cancel?Promise.reject({cancelled:!0}):(r&&(r.activeElement=document.activeElement),o.Ay.tryRestoreView(e).then((function(n){t&&t(),d(n,e,!0)})))}},{key:"currentView",value:function(){return r}},{key:"dispatchPageEvents",value:function(e){i=e}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());y.dispatchPageEvents(!0),t.A=y},64963:function(e,t,n){"use strict";n(76281),n(84734),n(78557),n(90076),n(95021),n(99425),n(93062),n(97747);var r,i,o=n(19119),a=n(89100),s=function(){return document.querySelector(".mainAnimatedPages")};function l(e,t){if(t.controllerFactory)return Promise.resolve();var n=e.getAttribute("data-controller");if(n){0===n.indexOf("__plugin/")&&(n=n.substring(9)),n=a.default.getPluginUrl(n);var r=ApiClient.getUrl("/web/"+n);return(0,o.W)(r).then((function(e){t.controllerFactory=e}))}return Promise.resolve()}function u(e,t,n){for(var r=0,i=e.length;r<i;r++)t!==r&&n!==r&&e[r].classList.add("hide")}function c(e,t){for(var n=0,r=e.length;n<r;n++)t!==n&&e[n].classList.add("hide")}function d(){console.debug("[viewContainer] resetting view cache"),f=[],p=[];var e=s();e&&(e.innerHTML=""),m=-1}var f=[],p=[],m=-1;d(),null===(r=s())||void 0===r||r.classList.remove("hide"),t.Ay={loadView:function(e){if(!e.cancel){var t=m,n=-1===t?null:f[t],r=t+1;r>=3&&(r=0);var o=e.url.includes("configurationpage"),a=function(e,t){var n=e.view;if(-1===n.indexOf('data-role="page"'))return n;var r=-1!==n.indexOf("<script"),i=function(e,t){t&&(e=e.replaceAll("\x3c!--<script","<script").replaceAll("<\/script>--\x3e","<\/script>"));var n=document.createElement("div");return n.innerHTML=e,n.querySelector('div[data-role="page"]')}(n,r);r&&(r=null!=i.querySelector("script"));var o=!1,a=!1,s=!1;return t&&(o=-1!=n.indexOf("jQuery")||-1!=n.indexOf("$(")||-1!=n.indexOf("$."),s=-1!=n.indexOf(".checked("),a=-1!=n.indexOf(".selectmenu(")),{elem:i,hasScript:r,hasjQuerySelect:a,hasjQueryChecked:s,hasjQuery:o}}(e,o),d=a.elem,y=f[r];y&&function(e){e.dispatchEvent(new CustomEvent("viewdestroy",{}))}(y);var v=d;"string"==typeof v&&((v=document.createElement("div")).innerHTML=d),v.classList.add("mainAnimatedPage");var h=s();if(!h)return void console.warn("[viewContainer] main animated pages element is not present");y?a.hasScript&&window.$?(h.removeChild(y),v=$(v).appendTo(h)[0]):h.replaceChild(v,y):a.hasScript&&window.$?v=$(v).appendTo(h)[0]:h.appendChild(v),e.type&&v.setAttribute("data-type",e.type);var g=[];return e.fullscreen&&g.push("fullscreen"),g.length&&v.setAttribute("data-properties",g.join(",")),f[r]=v,l(v,e).then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return i&&i(v,!1,e),u(f,r,t),m=r,p[r]=e.url,!e.cancel&&n&&c(f,r),window.$&&($.mobile=$.mobile||{},$.mobile.activePage=v),v}))}},tryRestoreView:function(e){console.debug("[viewContainer] tryRestoreView",e);var t=e.url,n=p.indexOf(t);if(-1!==n){var r=f[n],o=r;if(o){if(e.cancel)return;var a=m,s=-1===a?null:f[a];return l(o,e).then((function(){return i&&i(o,!0,e),u(f,n,a),r.classList.remove("hide"),m=n,!e.cancel&&s&&c(f,n),window.$&&($.mobile=$.mobile||{},$.mobile.activePage=o),o}))}}return Promise.reject()},reset:d,setOnBeforeChange:function(e){i=e}}},65242:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(84069),a=n(62156);t.A=function(e){var t=e.children,n=e.id,s=e.className,l=void 0===s?"":s,u=e.title,c=e.isBackButtonEnabled,d=void 0===c||c,f=e.isMenuButtonEnabled,p=void 0!==f&&f,m=e.isNowPlayingBarEnabled,y=void 0===m||m,v=e.isThemeMediaSupported,h=void 0!==v&&v,g=e.shouldAutoFocus,b=void 0!==g&&g,S=e.backDropType,A=(0,i.useRef)(null);return(0,i.useEffect)((function(){a.A.hideView()}),[]),(0,i.useEffect)((function(){var e,t,n,r,i={bubbles:!0,cancelable:!1,detail:{isRestored:!1,options:{enableMediaControl:y,supportsThemeMedia:h}}};null===(e=A.current)||void 0===e||e.dispatchEvent(new CustomEvent("viewbeforeshow",i)),null===(t=A.current)||void 0===t||t.dispatchEvent(new CustomEvent("pagebeforeshow",i)),null===(n=A.current)||void 0===n||n.dispatchEvent(new CustomEvent("viewshow",i)),null===(r=A.current)||void 0===r||r.dispatchEvent(new CustomEvent("pageshow",i))}),[A,y,h]),(0,i.useEffect)((function(){b&&o.default.autoFocus(A.current)}),[b]),(0,r.jsx)(i.StrictMode,{children:(0,r.jsx)("div",{ref:A,id:n,"data-role":"page",className:"page ".concat(l),"data-title":u,"data-backbutton":d,"data-menubutton":p,"data-backdroptype":S,children:t})})}},66359:function(e,t,n){"use strict";n.r(t),n.d(t,{EXPERIMENTAL_APP_ROUTES:function(){return y}});var r=n(62540),i=(n(63696),n(87404)),o=n(22477),a=n(51218),s=n(37881),l=n(34569),u=n(71004),c=n(24786),d=n(77285),f=n(13993),p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},m=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},y=[{path:"/*",lazy:function(){return Promise.all([n.e(45642),n.e(23247),n.e(60815),n.e(81771),n.e(16304),n.e(8575)]).then(n.bind(n,8575))},children:[{index:!0,element:(0,r.jsx)(i.C5,{replace:!0,to:"/home"})},{Component:o.A,children:m(m(m([],p(c.ASYNC_USER_ROUTES.map(a.G)),!1),p(d.LEGACY_USER_ROUTES.map(s.I)),!1),[{path:"video",Component:f.default}],!1),ErrorBoundary:l.A},{element:(0,r.jsx)(o.A,{level:"public"}),children:m(m([],p(d.LEGACY_PUBLIC_ROUTES.map(s.I)),!1),[{path:"*",Component:u.A}],!1)}]}]},66911:function(e,t,n){"use strict";n.d(t,{H:function(){return l},I:function(){return s}});var r=n(61364),i=n(8280),o=n(80401),a=n(69410),s=function(e,t,n){return(0,i.j)({queryKey:["User",n,"Items",t],queryFn:function(i){var o=i.signal;return function(e,t,n,i){return o=void 0,a=void 0,l=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(o){switch(o.label){case 0:return[4,(0,r.P)(e).getItem({userId:n,itemId:t},i)];case 1:return[2,o.sent().data]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}i((l=l.apply(o,a||[])).next())}));var o,a,s,l}(e,t,n,{signal:o})},staleTime:1e3,enabled:!!e&&!!n&&!!t})},l=function(e){var t=(0,a.gf)(),n=t.api,r=t.user;return(0,o.I)(s(n,e,null==r?void 0:r.Id))}},67430:function(e,t,n){"use strict";n.d(t,{KN:function(){return r.K},tF:function(){return i.A}}),n(22043);var r=n(1935),i=n(84138)},68272:function(e){"use strict";e.exports=JSON.parse('{"includeCorsCredentials":false,"multiserver":false,"themes":[{"name":"Apple TV","id":"appletv","color":"#bcbcbc"},{"name":"Blue Radiance","id":"blueradiance","color":"#011432"},{"name":"Dark","id":"dark","color":"#202020","default":true},{"name":"Light","id":"light","color":"#303030"},{"name":"Purple Haze","id":"purplehaze","color":"#000420"},{"name":"WMC","id":"wmc","color":"#0c2450"}],"menuLinks":[],"servers":[],"plugins":["playAccessValidation/plugin","experimentalWarnings/plugin","htmlAudioPlayer/plugin","htmlVideoPlayer/plugin","photoPlayer/plugin","comicsPlayer/plugin","bookPlayer/plugin","youtubePlayer/plugin","backdropScreensaver/plugin","pdfPlayer/plugin","logoScreensaver/plugin","sessionPlayer/plugin","chromecastPlayer/plugin","syncPlay/plugin"]}')},69410:function(e,t,n){"use strict";n.d(t,{Kv:function(){return d},gf:function(){return c}});var r=n(62540),i=n(63696),o=n(67430),a=n(44797),s=n(75384),l=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},u=(0,i.createContext)({}),c=function(){return(0,i.useContext)(u)},d=function(e){var t=e.children,n=l((0,i.useState)(),2),c=n[0],d=n[1],f=l((0,i.useState)(),2),p=f[0],m=f[1],y=l((0,i.useState)(),2),v=y[0],h=y[1],g=(0,i.useMemo)((function(){return{__legacyApiClient__:c,api:p,user:v}}),[p,c,v]);return(0,i.useEffect)((function(){var e;null===(e=o.tF.currentApiClient())||void 0===e||e.getCurrentUser().then((function(e){return t(void 0,e)})).catch((function(e){console.info("[ApiProvider] Could not get current user",e)}));var t=function(e,t){h(t),t.ServerId&&d(o.tF.getApiClient(t.ServerId))},n=function(){d(void 0),h(void 0)};return a.A.on(o.tF,"localusersignedin",t),a.A.on(o.tF,"localusersignedout",n),function(){a.A.off(o.tF,"localusersignedin",t),a.A.off(o.tF,"localusersignedout",n)}}),[d,h]),(0,i.useEffect)((function(){m(c?(0,s.C)(c):void 0)}),[c,m]),(0,r.jsx)(u.Provider,{value:g,children:t})}},69785:function(e,t,n){n(95021),function(e){"use strict";var t=e.prototype,n=t.parseFromString;try{if((new e).parseFromString("","text/html"))return}catch(e){}t.parseFromString=function(e,t){if(/^\s*text\/html\s*(?:;|$)/i.test(t)){var r=document.implementation.createHTMLDocument("");return r.documentElement.innerHTML=e,r}return n.apply(this,arguments)}}(DOMParser)},70267:function(e,t,n){"use strict";n.r(t),n.d(t,{appRouter:function(){return j},isLyricsPage:function(){return T}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(24776),n(76281),n(84734),n(44962),n(17731),n(4754),n(10849),n(70389),n(94),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(50987),n(83994),n(93062),n(97456),n(64062),n(90580),n(82367);var r=n(65369),i=n(89166),o=n(5898),a=n(23648),s=n(8566),l=n(41177),u=n(66911),c=n(67430),d=n(75384),f=n(31297),p=n(87003);function m(e){return m="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},m(e)}function y(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return v(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(v(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,v(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,v(d,"constructor",u),v(u,"constructor",l),l.displayName="GeneratorFunction",v(u,i,"GeneratorFunction"),v(d),v(d,i,"Generator"),v(d,r,(function(){return this})),v(d,"toString",(function(){return"[object Generator]"})),(y=function(){return{w:o,m:f}})()}function v(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}v=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){v(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},v(e,t,n,r)}function h(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){h(o,r,i,a,s,"next",e)}function s(e){h(o,r,i,a,s,"throw",e)}a(void 0)}))}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function S(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}var x=["/home","/login","/selectserver"],w=["/addserver","/selectserver","/login","/forgotpassword","/forgotpasswordpin","/wizardremoteaccess","/wizardfinish","/wizardlibrary","/wizardsettings","/wizardstart","/wizarduser"],P=new WeakSet,k=function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,P),S(this,"forcedLogoutMsg",void 0),S(this,"msgTimeout",void 0),S(this,"promiseShow",void 0),S(this,"resolveOnNextShow",void 0),document.addEventListener("viewshow",(function(){return t.onViewShow()})),this.lastPath=p.b.location.pathname+p.b.location.search,this.listen(),this.baseRoute=window.location.href.split("?")[0].replace(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(P,this,I).call(this),""),this.baseRoute=this.baseRoute.split("#")[0],this.baseRoute.endsWith("/")&&!this.baseRoute.endsWith("://")&&(this.baseRoute=this.baseRoute.substring(0,this.baseRoute.length-1))},t=[{key:"ready",value:function(){return this.promiseShow||Promise.resolve()}},{key:"back",value:(m=g(y().m((function e(){var t=this;return y().w((function(e){for(;;)switch(e.n){case 0:if(!this.promiseShow){e.n=1;break}return e.n=1,this.promiseShow;case 1:return this.promiseShow=new Promise((function(e){var n=p.b.listen((function(){n(),t.promiseShow=null,e()}));p.b.back()})),e.a(2,this.promiseShow)}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"show",value:(n=g(y().m((function e(t,n){var r=this;return y().w((function(e){for(;;)switch(e.n){case 0:if(!this.promiseShow){e.n=1;break}return e.n=1,this.promiseShow;case 1:if(t.startsWith("#")&&(t=t.substring(1)),t.startsWith("!")&&(t=t.substring(1)),0!==t.indexOf("/")&&-1===t.indexOf("://")&&(t="/"+t),t=t.replace(this.baseUrl(),""),p.b.location.pathname!==t||"/home"===t){e.n=2;break}return s.Ay.hide(),e.a(2,Promise.resolve());case 2:return this.promiseShow=new Promise((function(e){r.resolveOnNextShow=e,setTimeout((function(){return p.b.push(t,n)}),0)})),e.a(2,this.promiseShow)}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"listen",value:function(){var e=this;p.b.listen((function(t){var n=t.location,r=n.pathname.replace(/^!/,"")+n.search;r===e.lastPath&&(console.debug("[appRouter] path did not change, resolving promise"),e.onViewShow()),e.lastPath=r}))}},{key:"baseUrl",value:function(){return this.baseRoute}},{key:"canGoBack",value:function(){var e=p.b.location.pathname;return!(!document.querySelector(".dialogContainer")&&x.includes(e))&&window.history.length>1}},{key:"showItem",value:function(e,t,n){var r=this;if("string"==typeof e){var i=t?c.tF.getApiClient(t):c.tF.currentApiClient(),o=(0,d.C)(i),a=i.getCurrentUserId();f.q.fetchQuery((0,u.I)(o,e,a)).then((function(e){r.showItem(e,n)})).catch((function(e){console.error("[AppRouter] Failed to fetch item",e)}))}else{2===arguments.length&&(n=arguments[1]);var s=this.getRouteUrl(e,n);this.show(s)}}},{key:"setTransparency",value:function(e){console.warn("Deprecated! Use Dashboard.setBackdropTransparency"),(0,i.FB)(e)}},{key:"onViewShow",value:function(){var e=this.resolveOnNextShow;e&&(this.promiseShow=null,this.resolveOnNextShow=null,e())}},{key:"onForcedLogoutMessageTimeout",value:function(){var e=this.forcedLogoutMsg;this.forcedLogoutMsg=null,e&&(0,l.A)(e)}},{key:"showForcedLogoutMessage",value:function(e){this.forcedLogoutMsg=e,this.msgTimeout&&clearTimeout(this.msgTimeout),this.msgTimeout=setTimeout(this.onForcedLogoutMessageTimeout,100)}},{key:"onRequestFail",value:function(e,t){403===t.status&&"ParentalControl"===t.errorCode&&(w.includes(p.b.location.pathname)||(j.showForcedLogoutMessage(o.Ay.translate("AccessRestrictedTryAgainLater")),j.showLocalLogin(this.serverId())))}},{key:"getRouteUrl",value:function(e,t){if(!e)throw new Error("item cannot be null");if(e.url)return e.url;var n,i=t?t.context:null,o=e.Id||e.ItemId;t||(t={});var s=e.Type||(t?t.itemType:null),l=e.ServerId||t.serverId;if("settings"===e)return"#/mypreferencesmenu";if("wizard"===e)return"#/wizardstart";if("manageserver"===e)return"#/dashboard";if("recordedtv"===e)return"#/livetv?tab=3&serverId="+t.serverId;if("nextup"===e)return"#/list?type=nextup&serverId="+t.serverId;if("list"===e){var u="#/list?serverId="+t.serverId+"&type="+t.itemTypes;return t.isFavorite&&(u+="&IsFavorite=true"),t.isAiring&&(u+="&IsAiring=true"),t.isMovie&&(u+="&IsMovie=true"),t.isSeries&&(u+="&IsSeries=true&IsMovie=false&IsNews=false"),t.isSports&&(u+="&IsSports=true"),t.isKids&&(u+="&IsKids=true"),t.isNews&&(u+="&IsNews=true"),u}if("livetv"===e)return"programs"===t.section?"#/livetv?tab=0&serverId="+t.serverId:"guide"===t.section?"#/livetv?tab=1&serverId="+t.serverId:"movies"===t.section?"#/list?type=Programs&IsMovie=true&serverId="+t.serverId:"shows"===t.section?"#/list?type=Programs&IsSeries=true&IsMovie=false&IsNews=false&serverId="+t.serverId:"sports"===t.section?"#/list?type=Programs&IsSports=true&serverId="+t.serverId:"kids"===t.section?"#/list?type=Programs&IsKids=true&serverId="+t.serverId:"news"===t.section?"#/list?type=Programs&IsNews=true&serverId="+t.serverId:"onnow"===t.section?"#/list?type=Programs&IsAiring=true&serverId="+t.serverId:"channels"===t.section?"#/livetv?tab=2&serverId="+t.serverId:"dvrschedule"===t.section?"#/livetv?tab=4&serverId="+t.serverId:"seriesrecording"===t.section?"#/livetv?tab=5&serverId="+t.serverId:"#/livetv?serverId="+t.serverId;if("SeriesTimer"==s)return"#/details?seriesTimerId="+o+"&serverId="+l;if(e.CollectionType==r.X.Livetv)return"#/livetv?collectionType=".concat(e.CollectionType);if("Genre"===e.Type)return n="#/list?genreId="+e.Id+"&serverId="+l,"livetv"===i&&(n+="&type=Programs"),t.parentId&&(n+="&parentId="+t.parentId),n;if("MusicGenre"===e.Type)return n="#/list?musicGenreId="+e.Id+"&serverId="+l,t.parentId&&(n+="&parentId="+t.parentId),n;if("Studio"===e.Type)return n="#/list?studioId="+e.Id+"&serverId="+l,t.parentId&&(n+="&parentId="+t.parentId),n;if("tag"===e)return n="#/list?type=tag&tag=".concat(encodeURIComponent(t.tag),"&serverId=").concat(l),t.parentId&&(n+="&parentId="+t.parentId),n;if("folders"!==i&&!a.Ay.isLocalItem(e)){if(e.CollectionType==r.X.Movies)return n="#/movies?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),t&&"latest"===t.section&&(n+="&tab=1"),n;if(e.CollectionType==r.X.Tvshows)return n="#/tv?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),t&&"latest"===t.section&&(n+="&tab=1"),n;var c;if(e.CollectionType==r.X.Music)return n="#/music?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),"latest"===(null===(c=t)||void 0===c?void 0:c.section)&&(n+="&tab=1"),n;if("experimental"===localStorage.getItem("layout")&&e.CollectionType==r.X.Homevideos)return"#/homevideos?topParentId="+e.Id}return["Playlist","TvChannel","Program","BoxSet","MusicAlbum","MusicGenre","Person","Recording","MusicArtist"].indexOf(s)>=0?"#/details?id="+o+"&serverId="+l:"Series"==s||"Season"==s||"Episode"==s?"#/details?id="+o+(i?"&context="+i:"")+"&serverId="+l:e.IsFolder?o?"#/list?parentId="+o+"&serverId="+l:"#":"#/details?id="+o+"&serverId="+l}},{key:"showLocalLogin",value:function(e){return this.show("login?serverid="+e)}},{key:"showVideoOsd",value:function(){return this.show("video")}},{key:"showSelectServer",value:function(){return this.show("selectserver")}},{key:"showSettings",value:function(){return this.show("mypreferencesmenu")}},{key:"showNowPlaying",value:function(){return this.show("queue")}},{key:"showGuide",value:function(){return this.show("livetv?tab=1")}},{key:"goHome",value:function(){return this.show("home")}},{key:"showSearch",value:function(){return this.show("search")}},{key:"showLiveTV",value:function(){return this.show("livetv")}},{key:"showRecordedTV",value:function(){return this.show("livetv?tab=3")}},{key:"showFavorites",value:function(){return this.show("home?tab=1")}}],t&&b(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,m}();function I(){var e=window.location.pathname||"",t=e.lastIndexOf("/");return(e=-1!==t?e.substring(t):"/"+e)&&"/"!==e||(e="/index.html"),e}var j=new k,T=function(){return"/lyrics"===p.b.location.pathname.toLowerCase()};window.Emby=window.Emby||{},window.Emby.Page=j},70373:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_USER_ROUTES:function(){return r}});var r=[{path:"details",pageProps:{controller:"itemDetails/index",view:"itemDetails/index.html"}},{path:"list",pageProps:{controller:"list",view:"list.html"}},{path:"livetv",pageProps:{controller:"livetv/livetvsuggested",view:"livetv.html"}},{path:"lyrics",pageProps:{controller:"lyrics",view:"lyrics.html"}},{path:"music",pageProps:{controller:"music/musicrecommended",view:"music/music.html"}},{path:"mypreferencescontrols",pageProps:{controller:"user/controls/index",view:"user/controls/index.html"}},{path:"mypreferencesdisplay",pageProps:{controller:"user/display/index",view:"user/display/index.html"}},{path:"mypreferenceshome",pageProps:{controller:"user/home/index",view:"user/home/index.html"}},{path:"mypreferencesplayback",pageProps:{controller:"user/playback/index",view:"user/playback/index.html"}},{path:"mypreferencessubtitles",pageProps:{controller:"user/subtitles/index",view:"user/subtitles/index.html"}},{path:"tv",pageProps:{controller:"shows/tvrecommended",view:"shows/tvrecommended.html"}},{path:"video",pageProps:{controller:"playback/video/index",view:"playback/video/index.html",type:"video-osd",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}},{path:"queue",pageProps:{controller:"playback/queue/index",view:"playback/queue/index.html",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}},{path:"home",pageProps:{controller:"home",view:"home.html"}},{path:"movies",pageProps:{controller:"movies/moviesrecommended",view:"movies/movies.html"}}]},71004:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(87404),a=n(65242),s=n(5898),l=n(84851),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)};t.A=function(){var e=(0,o.zy)(),t=(0,i.useMemo)((function(){var t={search:e.search,hash:e.hash};return RegExp(/^\/wizard[a-z]+\.html/i).test(e.pathname)?u(u({},t),{pathname:"/wizard/".concat(e.pathname.slice(7,-5))}):e.pathname.endsWith(".html")?u(u({},t),{pathname:e.pathname.slice(0,-5)}):void 0}),[e]);return t?(console.warn("[FallbackRoute] You are using a deprecated URL format. This will stop working in a future Jellyfin update."),(0,r.jsx)(o.C5,{replace:!0,to:t})):(0,r.jsx)(a.A,{id:"fallbackPage",title:s.Ay.translate("HeaderPageNotFound"),className:"mainAnimatedPage libraryPage",children:(0,r.jsxs)("div",{className:"padded-left padded-right",children:[(0,r.jsx)("h1",{children:s.Ay.translate("HeaderPageNotFound")}),(0,r.jsx)("p",{children:s.Ay.translate("PageNotFound")}),(0,r.jsx)(l.A,{className:"button-link",href:"#/home",children:s.Ay.translate("GoHome")})]})})}},71286:function(e,t,n){"use strict";var r;n.d(t,{B:function(){return r}}),function(e){e.HEADER_RENDERED="HEADER_RENDERED",e.SET_TABS="SET_TABS",e.SHOW_VIDEO_OSD="SHOW_VIDEO_OSD",e.THEME_CHANGE="THEME_CHANGE"}(r||(r={}))},71866:function(e,t,n){"use strict";var r;function i(e){"string"==typeof e&&(e={text:e});var t=document.createElement("div");t.classList.add("toast"),t.textContent=e.text,(r||((r=document.createElement("div")).classList.add("toastContainer"),document.body.appendChild(r)),r).appendChild(t),setTimeout((function(){t.classList.add("toastVisible"),function(e){setTimeout((function(){e.classList.add("toastHide"),function(e){setTimeout((function(){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)}),300)}(e)}),3300)}(t)}),300)}n.d(t,{A:function(){return i}})},73025:function(e,t,n){"use strict";n.d(t,{O:function(){return s},_:function(){return l}});var r,i=n(41087),o=n(94738),a=((r={})[i.w.Intro]=o.M.AskToSkip,r[i.w.Outro]=o.M.AskToSkip,r),s=function(e){return"".concat("segmentTypeAction","__").concat(e)};function l(e,t){var n=e.get(s(t),!1),r=a[t]||o.M.None;return n||r}},73125:function(e,t,n){var r={"./af.json":[18086,23845],"./ar.json":[88506,9785],"./as.json":[62885,47206],"./be-by.json":[69986,34017],"./bg-bg.json":[23018,6377],"./bn.json":[86497,14050],"./bn_BD.json":[13256,37131],"./br.json":[14189,69806],"./ca.json":[12921,35994],"./ch.json":[9814,21493],"./ckb.json":[6295,63780],"./cs.json":[83343,1500],"./cy.json":[20833,90210],"./da.json":[98174,96509],"./de.json":[99810,89409],"./dv.json":[39331,5888],"./el.json":[67800,80571],"./en-gb.json":[24832,46179],"./en-us.json":[20233,79754],"./enm.json":[83645,39422],"./eo.json":[72661,68950],"./es-ar.json":[49827,39072],"./es-mx.json":[83425,99298],"./es.json":[62854,49146],"./es_419.json":[50700,31807],"./es_DO.json":[29387,22888],"./et.json":[20560,78579],"./eu.json":[8083,39952],"./fa.json":[69924,18775],"./fi.json":[45932,66527],"./fil.json":[13320,33355],"./fo.json":[60706,40257],"./fr-ca.json":[82992,71603],"./fr.json":[80225,65826],"./ga.json":[59069,3134],"./gl.json":[83366,91589],"./gsw.json":[56196,99479],"./gu.json":[51673,99994],"./he.json":[92926,87837],"./hi-in.json":[21782,29397],"./hr.json":[81379,90272],"./ht.json":[93929,15402],"./hu.json":[7566,46669],"./hy.json":[26346,53961],"./id.json":[19612,79823],"./is-is.json":[12284,15023],"./it.json":[39596,28159],"./ja.json":[96776,8363],"./jbo.json":[31758,8589],"./ka.json":[24609,52162],"./kab.json":[90905,70042],"./kk.json":[9500,60028],"./kn.json":[39040,4867],"./ko.json":[47043,32800],"./kw.json":[82379,85960],"./ky.json":[16697,25370],"./lb.json":[64839,76276],"./lt-lt.json":[93260,3679],"./lv.json":[48120,82344],"./mg.json":[837,94726],"./mk.json":[24121,52922],"./ml.json":[99459,82355],"./mn.json":[37922,27521],"./mr.json":[55814,87589],"./ms.json":[40769,79714],"./mt.json":[69080,84347],"./my.json":[12175,87580],"./nb.json":[48505,70362],"./ne.json":[50672,30419],"./nl.json":[53707,80424],"./nn.json":[1925,85318],"./pa.json":[54122,11305],"./pl.json":[30985,62634],"./pr.json":[60715,24072],"./pt-br.json":[36860,6735],"./pt-pt.json":[70183,69959],"./pt.json":[69969,41490],"./ro.json":[66998,2709],"./ru.json":[5276,74191],"./si.json":[69665,48834],"./sk.json":[79655,86836],"./sl-si.json":[10433,48962],"./so.json":[40475,30168],"./sq.json":[73529,48666],"./sr.json":[19020,49535],"./sv.json":[95760,29683],"./ta.json":[57294,81197],"./te.json":[36402,72145],"./th.json":[60257,23522],"./tr.json":[66655,30028],"./ug.json":[45581,10350],"./uk.json":[36529,62834],"./ur_PK.json":[35446,10805],"./uz.json":[50886,67813],"./vi.json":[36796,17935],"./zh-cn.json":[45487,12252],"./zh-hk.json":[88159,15852],"./zh-tw.json":[97983,63404],"./zu.json":[48420,94167]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n.t(i,19)}))}i.keys=function(){return Object.keys(r)},i.id=73125,e.exports=i},74370:function(e,t,n){var r={"./livetvguideprovider":[45043,28110],"./livetvguideprovider.html":[90833,87936],"./livetvguideprovider.js":[45043,28110],"./livetvtuner":[51250,2217],"./livetvtuner.html":[62720,61765],"./livetvtuner.js":[51250,2217],"./networking":[50506,80017],"./networking.html":[13072,57629],"./networking.js":[50506,80017]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=74370,e.exports=i},74550:function(e,t,n){"use strict";n(76281),n(84734),n(44962),n(78557),n(90076),n(83994),n(82367);var r=n(34789),i=n(38490),o=n(46782),a=n(90381),s={13:"Enter",19:"Pause",27:"Escape",32:"Space",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",138:"NavigationUp",139:"NavigationDown",140:"NavigationLeft",141:"NavigationRight",195:"GamepadA",196:"GamepadB",203:"GamepadDPadUp",204:"GamepadDPadDown",205:"GamepadDPadLeft",206:"GamepadDPadRight",211:"GamepadLeftThumbUp",212:"GamepadLeftThumbDown",214:"GamepadLeftThumbLeft",213:"GamepadLeftThumbRight",412:"MediaRewind",413:"MediaStop",415:"MediaPlay",417:"MediaFastForward",461:"Back",10009:"Back",10232:"MediaTrackPrevious",10233:"MediaTrackNext",10252:"MediaPlayPause"},l={GamepadB:"Escape",NavigationUp:"ArrowUp",NavigationDown:"ArrowDown",NavigationLeft:"ArrowLeft",NavigationRight:"ArrowRight",GamepadDPadUp:"ArrowUp",GamepadDPadDown:"ArrowDown",GamepadDPadLeft:"ArrowLeft",GamepadDPadRight:"ArrowRight",GamepadLeftThumbUp:"ArrowUp",GamepadLeftThumbDown:"ArrowDown",GamepadLeftThumbLeft:"ArrowLeft",GamepadLeftThumbRight:"ArrowRight"},u=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","BrowserHome","Find"],c=["MediaRewind","MediaStop","MediaPlay","MediaFastForward","MediaTrackPrevious","MediaTrackNext","MediaPlayPause"],d=["INPUT","TEXTAREA"],f=["button","checkbox","color","file","hidden","image","radio","reset","submit"],p=!1;try{p="key"in new KeyboardEvent("keydown")}catch(e){console.error("error checking 'key' field",e)}if(!p)for(var m=65;m<=90;m++)s[m]=String.fromCharCode(m).toLowerCase();function y(e){var t=s[e.keyCode]||e.key;return l[t]||t}function v(e){return-1!=u.indexOf(e)}function h(e){return!(!e||!d.includes(e.tagName)||"INPUT"===e.tagName&&f.includes(e.type))}function g(){return!r.A.edgeUwp}navigator.getGamepads&&a.A.enableGamepad()&&g()&&window.addEventListener("gamepadconnected",(function e(){console.log("Gamepad connected! Attaching gamepadtokey.js script"),window.removeEventListener("gamepadconnected",e),n.e(84348).then(n.bind(n,84348))})),t.Ay={enable:function(){var e="mediaSession"in navigator;window.addEventListener("keydown",(function(t){if(!t.defaultPrevented&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)){var n=y(t);if((o.A.tv||!v(n))&&(r.A.tv||!function(e){return c.includes(e)}(n)||!e)){var a=!0;switch(n){case"ArrowLeft":h(document.activeElement)?a=!1:i.default.handleCommand("left");break;case"ArrowUp":i.default.handleCommand("up");break;case"ArrowRight":h(document.activeElement)?a=!1:i.default.handleCommand("right");break;case"ArrowDown":i.default.handleCommand("down");break;case"GamepadA":i.default.handleCommand("select");break;case"Back":i.default.handleCommand("back");break;case"Backspace":r.A.tv&&r.A.hisense&&r.A.vidaa?i.default.handleCommand("back"):a=!1;break;case"Escape":o.A.tv?i.default.handleCommand("back"):a=!1;break;case"Find":i.default.handleCommand("search");break;case"BrowserHome":i.default.handleCommand("home");break;case"MediaPlay":i.default.handleCommand("play");break;case"Pause":i.default.handleCommand("pause");break;case"MediaPlayPause":i.default.handleCommand("playpause");break;case"MediaRewind":i.default.handleCommand("rewind");break;case"MediaFastForward":i.default.handleCommand("fastforward");break;case"MediaStop":i.default.handleCommand("stop");break;case"MediaTrackPrevious":i.default.handleCommand("previoustrack");break;case"MediaTrackNext":i.default.handleCommand("nexttrack");break;default:a=!1}a&&(console.debug("disabling default event handling"),t.preventDefault())}}}))},getKeyName:y,isNavigationKey:v,canEnableGamepad:g}},74659:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},o=document.createElement("a");function a(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){return o.href=e,n=o.href,[2,new Promise((function(r,i){var o=new XMLHttpRequest;o.onload=function(){var e=o.status;n.startsWith("file:")&&0===e&&(e=200),r(new Response(o.responseText,{status:e}))},o.onerror=function(){i(new TypeError("Local request failed"))},o.open("GET",e),(null==t?void 0:t.cache)&&o.setRequestHeader("Cache-Control",t.cache),o.send(null)}))]}))}))}},75384:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(73275),i=function(e){return new r.EX({clientInfo:{name:e.appName(),version:e.appVersion()},deviceInfo:{name:e.deviceName(),id:e.deviceId()}}).createApi(e.serverAddress(),e.accessToken())}},76617:function(e,t,n){"use strict";n.d(t,{A:function(){return B}});var r=n(62540),i=n(63696),o=n(46775),a=n(92779),s=n(63703),l=n(7630),u=n(75487),c=n(72073),d=n(39738),f=n(5898),p=n(44797),m=n(96797),y=n(74156),v=n(44790),h=n(60434),g=n(48402),b=n(85637),S=n(38829),A=n(78400),x=n(34266),w=n(71034),P=n(4805),k=n(42663),I=n(34789),j=function(e){var t=e.target;if(!t.deviceType&&t.isLocalPlayer)return I.A.tv?(0,r.jsx)(k.A,{}):I.A.mobile?(0,r.jsx)(w.A,{}):(0,r.jsx)(A.A,{});switch(t.deviceType){case"smartphone":return(0,r.jsx)(w.A,{});case"tablet":return(0,r.jsx)(P.A,{});case"desktop":return(0,r.jsx)(A.A,{});case"cast":return(0,r.jsx)(l.A,{});case"tv":return(0,r.jsx)(k.A,{});default:return(0,r.jsx)(x.A,{})}},T="app-remote-play-menu",C=function(e){var t=e.anchorEl,n=e.open,o=e.onMenuClose,a=!!S.X.plugins.find((function(e){return"chromecast"===e.id})),s=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)([]),2),l=s[0],u=s[1];return(0,i.useEffect)((function(){var e,t,r,i;n&&(e=void 0,t=void 0,r=void 0,i=function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:return e=u,[4,d.f.getTargets()];case 1:return e.apply(void 0,[t.sent()]),[2]}}))},new(r||(r=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))).catch((function(e){console.error("[AppRemotePlayMenu] unable to get playback targets",e)}))}),[n,u]),(0,r.jsxs)(g.A,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:T,keepMounted:!0,open:n,onClose:o,children:[!a&&(0,r.jsxs)(b.A,{disabled:!0,children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(m.A,{})}),(0,r.jsx)(h.A,{children:f.Ay.translate("GoogleCastUnsupported")})]}),!a&&l.length>0&&(0,r.jsx)(y.A,{}),l.map((function(e){var t;return(0,r.jsxs)(b.A,{onClick:function(){return function(e){d.f.trySetActivePlayer(e.playerName,e),o()}(e)},children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(j,{target:e})}),(0,r.jsx)(h.A,{primary:e.appName?"".concat(e.name," - ").concat(e.appName):e.name,secondary:null===(t=e.user)||void 0===t?void 0:t.Name})]},e.id)}))]})},E=n(249),_=n(10301),L=n(75578),M=n(80099),O=n(48080),R=n(9055),D=n(83237),N=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},F="app-remote-play-active-menu",U=function(e){var t=e.anchorEl,n=e.open,o=e.onMenuClose,a=e.playerInfo,s=N((0,i.useState)(d.f.enableDisplayMirroring()),2),l=s[0],u=s[1],c=(null==a?void 0:a.supportedCommands)&&-1!==a.supportedCommands.indexOf("DisplayContent"),p=(0,i.useCallback)((function(){d.f.enableDisplayMirroring(!l),u(!l)}),[l,u]),m=N((0,i.useState)((0,D.Ol)()),2),S=m[0],A=m[1],x=(0,i.useCallback)((function(){(0,D.sS)(!S),A(!S)}),[S]),w=(null==a?void 0:a.deviceName)||(null==a?void 0:a.name),P=(0,i.useCallback)((function(){-1!==d.f.getSupportedCommands().indexOf("EndSession")?O.A.show({buttons:[{name:f.Ay.translate("Yes"),id:"yes"},{name:f.Ay.translate("No"),id:"no"}],text:f.Ay.translate("ConfirmEndPlayerSession",w)}).then((function(e){o(),"yes"===e&&d.f.getCurrentPlayer().endSession(),d.f.setDefaultPlayerActive()})).catch((function(){})):(o(),d.f.setDefaultPlayerActive())}),[o,w]);return(0,r.jsxs)(g.A,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:F,keepMounted:!0,open:n,onClose:o,slotProps:{list:{"aria-labelledby":"remote-play-active-subheader",subheader:(0,r.jsx)(M.A,{component:"div",id:"remote-play-active-subheader",children:w})}},children:[c&&(0,r.jsxs)(b.A,{onClick:p,children:[l&&(0,r.jsx)(v.A,{children:(0,r.jsx)(E.A,{})}),(0,r.jsx)(h.A,{inset:!l,children:f.Ay.translate("EnableDisplayMirroring")})]}),(0,r.jsxs)(b.A,{onClick:x,children:[S&&(0,r.jsx)(v.A,{children:(0,r.jsx)(E.A,{})}),(0,r.jsx)(h.A,{inset:!S,children:f.Ay.translate("EnableAutoCast")})]}),(0,r.jsx)(y.A,{}),(0,r.jsxs)(b.A,{component:R.N_,to:"/queue",onClick:o,children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(L.A,{})}),(0,r.jsx)(h.A,{children:f.Ay.translate("HeaderRemoteControl")})]}),(0,r.jsx)(y.A,{}),(0,r.jsxs)(b.A,{onClick:P,children:[(0,r.jsx)(v.A,{children:(0,r.jsx)(_.A,{})}),(0,r.jsx)(h.A,{children:f.Ay.translate("Disconnect")})]})]})},V=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},B=function(){var e=V((0,i.useState)(d.f.getPlayerInfo()),2),t=e[0],n=e[1],m=(0,i.useCallback)((function(){n(d.f.getPlayerInfo())}),[n]);(0,i.useEffect)((function(){return p.A.on(d.f,"playerchange",m),function(){p.A.off(d.f,"playerchange",m)}}),[m]);var y=V((0,i.useState)(null),2),v=y[0],h=y[1],g=Boolean(v),b=(0,i.useCallback)((function(e){h(e.currentTarget)}),[h]),S=(0,i.useCallback)((function(){h(null)}),[h]),A=V((0,i.useState)(null),2),x=A[0],w=A[1],P=Boolean(x),k=(0,i.useCallback)((function(e){w(e.currentTarget)}),[w]),I=(0,i.useCallback)((function(){w(null)}),[w]);return(0,r.jsxs)(r.Fragment,{children:[t&&!t.isLocalPlayer?(0,r.jsx)(a.A,{sx:{alignSelf:"center"},children:(0,r.jsx)(c.A,{title:f.Ay.translate("ButtonCast"),children:(0,r.jsx)(s.A,{variant:"text",size:"large",startIcon:(0,r.jsx)(o.A,{}),"aria-label":f.Ay.translate("ButtonCast"),"aria-controls":F,"aria-haspopup":"true",onClick:k,color:"inherit",sx:function(e){return{color:e.vars.palette.primary.main}},children:t.deviceName||t.name})})}):(0,r.jsx)(c.A,{title:f.Ay.translate("ButtonCast"),children:(0,r.jsx)(u.A,{size:"large","aria-label":f.Ay.translate("ButtonCast"),"aria-controls":T,"aria-haspopup":"true",onClick:b,color:"inherit",children:(0,r.jsx)(l.A,{})})}),(0,r.jsx)(C,{open:g,anchorEl:v,onMenuClose:S}),(0,r.jsx)(U,{open:P,anchorEl:x,onMenuClose:I,playerInfo:t})]})}},77157:function(e,t,n){"use strict";n.r(t);var r=n(34789),i=n(36300),o=(n(69177),Object.create(HTMLInputElement.prototype));function a(e){if(13===e.keyCode||32===e.keyCode&&r.A.tizen)return e.preventDefault(),this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),!1}var s=r.A.tizen||r.A.orsay||r.A.operaTv||r.A.web0s;function l(e){var t=this.parentNode;t.style.webkitAnimationName="repaintChrome",t.style.webkitAnimationDelay=!0===e?"500ms":"",t.style.webkitAnimationDuration="10ms",t.style.webkitAnimationIterationCount="1",setTimeout((function(){t.style.webkitAnimationName=""}),!0===e?520:20)}o.attachedCallback=function(){if("true"!==this.getAttribute("data-embycheckbox")){this.setAttribute("data-embycheckbox","true"),this.classList.add("emby-checkbox");var e=this.parentNode;e.classList.add("emby-checkbox-label");var t=e.querySelector("span"),n="checkboxOutline",r=this.getAttribute("data-outlineclass");r&&(n+=" "+r);var o='<span class="material-icons checkboxIcon checkboxIcon-checked '+(this.getAttribute("data-checkedicon")||"check")+'" aria-hidden="true"></span>',u='<span class="material-icons checkboxIcon checkboxIcon-unchecked '+(this.getAttribute("data-uncheckedicon")||"")+'" aria-hidden="true"></span>';e.insertAdjacentHTML("beforeend",'<span class="'+n+'">'+o+u+"</span>"),t.classList.add("checkboxLabel"),this.addEventListener("keydown",a),s&&(l.call(this,!0),i.Ay.addEventListener(this,"click",l,{passive:!0}),i.Ay.addEventListener(this,"blur",l,{passive:!0}),i.Ay.addEventListener(this,"focus",l,{passive:!0}),i.Ay.addEventListener(this,"change",l,{passive:!0}))}},o.detachedCallback=function(){this.removeEventListener("keydown",a),i.Ay.removeEventListener(this,"click",l,{passive:!0}),i.Ay.removeEventListener(this,"blur",l,{passive:!0}),i.Ay.removeEventListener(this,"focus",l,{passive:!0}),i.Ay.removeEventListener(this,"change",l,{passive:!0})},document.registerElement("emby-checkbox",{prototype:o,extends:"input"})},77285:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r.LEGACY_PUBLIC_ROUTES},LEGACY_USER_ROUTES:function(){return i.LEGACY_USER_ROUTES}});var r=n(3312),i=n(38274)},77402:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(63696),i=n(60182);function o(){var e=(0,i.IB)().themes,t=(0,r.useMemo)((function(){return null==e?void 0:e.find((function(e){return e.default}))}),[e]);return{themes:e||[],defaultTheme:t}}},78057:function(e,t,n){"use strict";var r=n(62540),i=(n(63696),n(28626)),o=n(44419);t.A=function(){var e=(0,o.l9)().data,t=(0,i.Q)(),n=t.customCss,a=t.disableCustomCss;return(0,r.jsxs)(r.Fragment,{children:[!a&&(null==e?void 0:e.CustomCss)&&(0,r.jsx)("style",{children:e.CustomCss}),n&&(0,r.jsx)("style",{children:n})]})}},79237:function(e,t,n){n(36947),void 0===HTMLElement.prototype.nativeFocus&&function(){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0);var n=Object.defineProperty({},"preventScroll",{get:function(){return e=!0,null}});t.focus(n)}catch(e){}e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){var t=window.scrollX,n=window.scrollY;this.nativeFocus(),null!=e&&e.preventScroll&&window.scroll(t,n)})}()},79754:function(e,t,n){"use strict";n.r(t),n.d(t,{close:function(){return A},createDialog:function(){return k},open:function(){return S},setOnOpen:function(){return I}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(76281),n(44962),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(90076),n(95021),n(99425),n(83994),n(93062),n(97456),n(23630),n(82367);var r,i=n(9164),o=n(34789),a=n(46782),s=n(38490),l=n(44305),u=n(8566),c=n(36300),d=n(87003);function f(e){return f="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},f(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return!o.A.tv&&o.A.supportsCssAnimation()}function h(e){var t=e.parentNode;if(t)try{t.removeChild(e)}catch(e){console.error("[dialogHelper] error removing dialog element: "+e)}}function g(e,t,n){this.originalUrl=window.location.href;var r,o=document.activeElement,f=!1;function p(){r&&(r(),r=null),e.dispatchEvent(new CustomEvent("close",{bubbles:!1,cancelable:!1})),n({element:e})}function y(t){"back"===t.detail.command&&(t.preventDefault(),t.stopPropagation(),A(e))}if(e.addEventListener("_close",(function(){if(b(e)||s.default.off(e,y),r&&(r(),r=null),function(e){var t=e.backdrop;if(t){e.backdrop=null;var n=function(){h(t)};if(v())return t.classList.remove("dialogBackdropOpened"),void setTimeout(n,300);n()}}(e),(0,u.jD)(),e.classList.remove("opened"),f&&document.body.classList.remove("noScroll"),b(e)){var n,c=d.b.location.state||{};(null===(n=c.dialogs)||void 0===n?void 0:n.length)>0&&(c.dialogs[c.dialogs.length-1]===t?(r=d.b.listen(p),d.b.back()):c.dialogs.includes(t)&&(console.warn('[dialogHelper] dialog "%s" was closed, but is not the last dialog opened',t),r=d.b.listen(p),d.b.replace("".concat(d.b.location.pathname).concat(d.b.location.search),m(m({},c),{},{dialogs:c.dialogs.filter((function(e){return e!==t}))}))))}if(a.A.tv&&i.A.focus(o),(0,l.G4)(e.getAttribute("data-removeonclose"),!0)){!function(e){a.A.tv&&(e.classList.contains("scrollX")?P(e,!0,!1):e.classList.contains("smoothScrollY")&&P(e,!1,!1))}(e);var g=e.dialogContainer;g?(h(g),e.dialogContainer=null):h(e)}r||p()})),!e.classList.contains("dialog-fixedSize")&&e.classList.add("centeredDialog"),e.classList.remove("hide"),function(e){var t=document.createElement("div");t.classList.add("dialogBackdrop");var n,r=e.dialogContainer||e;r.parentNode.insertBefore(t,r),e.backdrop=t,t.offsetWidth,t.classList.add("dialogBackdropOpened"),c.Ay.addEventListener(e.dialogContainer||t,"mousedown",(function(e){n=e.target})),c.Ay.addEventListener(e.dialogContainer||t,"click",(function(t){t.target===e.dialogContainer&&t.target==n&&A(e)}),{passive:!0}),c.Ay.addEventListener(e.dialogContainer||t,"contextmenu",(function(t){t.target===e.dialogContainer&&(A(e),t.preventDefault())}))}(e),e.classList.add("opened"),e.dispatchEvent(new CustomEvent("open",{bubbles:!1,cancelable:!1})),"true"!==e.getAttribute("data-lockscroll")||document.body.classList.contains("noScroll")||(document.body.classList.add("noScroll"),f=!0),function(e){var t=function(){i.A.pushScope(e),"true"===e.getAttribute("data-autofocus")&&i.A.autoFocus(e),document.activeElement&&!e.contains(document.activeElement)&&document.activeElement.blur()};v()?c.Ay.addEventListener(e,c.Ay.whichAnimationEvent(),x(e,t),{once:!0}):t()}(e),b(e)){var g=d.b.location.state||{},S=g.dialogs||[];S.push(t),d.b.push("".concat(d.b.location.pathname).concat(d.b.location.search),m(m({},g),{},{dialogs:S})),r=d.b.listen((function(n){var i,o=!((null===(i=n.location.state)||void 0===i?void 0:i.dialogs)||[]).includes(t);!o&&function(e){return!e.classList.contains("hide")}(e)||!r||(r(),r=null),o&&A(e)}))}else s.default.on(e,y)}function b(e){return"true"===e.getAttribute("data-history")}function S(e){r&&r(e);var t=e.parentNode;t&&t.removeChild(e);var n=document.createElement("div");return n.classList.add("dialogContainer"),n.appendChild(e),e.dialogContainer=n,document.body.appendChild(n),new Promise((function(t){new g(e,"dlg".concat((new Date).getTime()),t)}))}function A(e){e.classList.contains("hide")||(e.dispatchEvent(new CustomEvent("closing",{bubbles:!1,cancelable:!1})),function(e,t){if(v()){var n=!0;switch(e.animationConfig.exit.name){case"fadeout":e.style.animation="fadeout ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"scaledown":e.style.animation="scaledown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"slidedown":e.style.animation="slidedown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;default:n=!1}if(c.Ay.addEventListener(e,c.Ay.whichAnimationEvent(),x(e,t),{once:!0}),n)return}t()}(e,(function(){i.A.popScope(e),e.classList.add("hide"),e.dispatchEvent(new CustomEvent("_close",{bubbles:!1,cancelable:!1}))})))}var x=function(e,t){return function n(){c.Ay.removeEventListener(e,c.Ay.whichAnimationEvent(),n,{once:!0}),t()}},w="overscroll-behavior-y"in document.body.style;function P(e,t,r){Promise.resolve().then(n.bind(n,10838)).then((function(n){var i=r?"on":"off";n.centerFocus[i](e,t)}))}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=document.createElement("div");e.id&&(t.id=e.id),t.classList.add("focuscontainer"),t.classList.add("hide"),function(e){return null!=e.lockScroll?e.lockScroll:"fullscreen"===e.size||!(w&&(e.size||!o.A.touch))&&(!!e.size||o.A.touch)}(e)&&t.setAttribute("data-lockscroll","true"),!1!==e.enableHistory&&t.setAttribute("data-history","true"),!1!==e.modal&&t.setAttribute("modal","modal"),!1!==e.autoFocus&&t.setAttribute("data-autofocus","true");var n=e.entryAnimation||"scaleup",r=e.exitAnimation||"scaledown",i=e.entryAnimationDuration||("fullscreen"!==e.size?180:280),s=e.exitAnimationDuration||("fullscreen"!==e.size?120:220);if(t.animationConfig={entry:{name:n,timing:{duration:i,easing:"ease-out"}},exit:{name:r,timing:{duration:s,easing:"ease-out",fill:"both"}}},t.classList.add("dialog"),e.scrollX?(t.classList.add("scrollX"),t.classList.add("smoothScrollX"),a.A.tv&&P(t,!0,!0)):!1!==e.scrollY&&(t.classList.add("smoothScrollY"),a.A.tv&&P(t,!1,!0)),e.removeOnClose&&t.setAttribute("data-removeonclose","true"),e.size&&(t.classList.add("dialog-fixedSize"),t.classList.add("dialog-".concat(e.size))),v())switch(t.animationConfig.entry.name){case"fadein":t.style.animation="fadein ".concat(i,"ms ease-out normal");break;case"scaleup":t.style.animation="scaleup ".concat(i,"ms ease-out normal both");break;case"slideup":t.style.animation="slideup ".concat(i,"ms ease-out normal");break;case"slidedown":t.style.animation="slidedown ".concat(i,"ms ease-out normal")}return t}function I(e){r=e}t.default={open:S,close:A,createDialog:k,setOnOpen:I}},80262:function(e,t,n){"use strict";var r;n.d(t,{F:function(){return r}}),function(e){e.ASS_RENDER_ERROR="ASS_RENDER_ERROR",e.FATAL_HLS_ERROR="FATAL_HLS_ERROR",e.MEDIA_DECODE_ERROR="MEDIA_DECODE_ERROR",e.MEDIA_NOT_SUPPORTED="MEDIA_NOT_SUPPORTED",e.NETWORK_ERROR="NETWORK_ERROR",e.NO_MEDIA_ERROR="NO_MEDIA_ERROR",e.PLAYER_ERROR="PLAYER_ERROR",e.SERVER_ERROR="SERVER_ERROR"}(r||(r={}))},81965:function(e,t,n){"use strict";var r=n(62540),i=(n(63696),n(69018)),o=n(69410);t.A=function(e){var t,n=e.user,a=(0,o.gf)().api;return n?(0,r.jsx)(i.A,{alt:null!==(t=n.Name)&&void 0!==t?t:void 0,src:a&&n.Id&&n.PrimaryImageTag?"".concat(a.basePath,"/Users/").concat(n.Id,"/Images/Primary?tag=").concat(n.PrimaryImageTag):void 0,sx:function(e){return{bgcolor:a&&n.Id&&n.PrimaryImageTag?e.vars.palette.background.paper:e.vars.palette.primary.dark,color:"inherit"}}}):null}},82118:function(){!function(e){"use strict";if(e.Headers)try{new e.Headers(void 0)}catch(n){console.debug("patch 'Headers' to accept 'undefined'");var t=e.Headers;e.Headers=function(e){return e?new t(e):new t}}}(window)},82885:function(e,t,n){"use strict";n.r(t),n.d(t,{UserSettings:function(){return h},allowedAudioChannels:function(){return k},backdropScreensaverInterval:function(){return Y},currentSettings:function(){return g},customCss:function(){return se},dashboardTheme:function(){return q},dateTimeLocale:function(){return V},detailsBanner:function(){return N},disableCustomCss:function(){return le},enableBackdrops:function(){return D},enableBlurhash:function(){return R},enableCinemaMode:function(){return T},enableFastFadein:function(){return O},enableNextVideoInfoOverlay:function(){return E},enableRewatchingInNextUp:function(){return X},enableThemeSongs:function(){return L},enableThemeVideos:function(){return M},enableVideoRemainingTime:function(){return _},get:function(){return w},getComicsPlayerSettings:function(){return re},getData:function(){return S},getFilter:function(){return ae},getSavedView:function(){return ue},getSortValuesLegacy:function(){return de},getSubtitleAppearanceSettings:function(){return te},importFrom:function(){return A},language:function(){return U},libraryPageSize:function(){return K},limitSegmentLength:function(){return j},loadQuerySettings:function(){return Z},maxDaysForNextUp:function(){return J},preferFmp4HlsContainer:function(){return I},saveQuerySettings:function(){return ee},saveViewSetting:function(){return ce},screensaver:function(){return W},screensaverTime:function(){return Q},selectAudioNormalization:function(){return C},serverConfig:function(){return P},set:function(){return x},setComicsPlayerSettings:function(){return ie},setFilter:function(){return oe},setSubtitleAppearanceSettings:function(){return ne},setUserInfo:function(){return b},skin:function(){return H},skipBackLength:function(){return B},skipForwardLength:function(){return z},soundEffects:function(){return $},theme:function(){return G},useEpisodeImagesInNextUpAndResume:function(){return F}}),n(29305),n(32733),n(84701),n(81678),n(14382),n(76281),n(44962),n(20518),n(4754),n(94),n(77575),n(36947),n(83810),n(78557),n(96054),n(90076),n(73687),n(99425),n(83994),n(82367);var r=n(44797),i=n(44305),o=n(34789),a=n(90381);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 l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function c(){var e=this;e.saveTimeout=null,e.currentApiClient.updateDisplayPreferences("usersettings",e.displayPrefs,e.currentUserId,"emby")}var d=["SortBy","SortOrder"],f="-filter",p=["Filters","HasSubtitles","HasTrailer","HasSpecialFeature","HasThemeSong","HasThemeVideo","Genres","OfficialRatings","Tags","VideoTypes","IsSD","IsHD","Is4K","Is3D","IsFavorite","IsMissing","IsUnaired","ParentIndexNumber","SeriesStatus","Years"];function m(e,t){return Object.keys(e).filter((function(e){return t.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{})}var y={verticalPosition:-3},v={langDir:"ltr",pagesPerView:1},h=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"setUserInfo",value:function(e,t){if(this.saveTimeout&&clearTimeout(this.saveTimeout),this.currentUserId=e,this.currentApiClient=t,!e)return this.displayPrefs=null,Promise.resolve();var n=this;return t.getDisplayPreferences("usersettings",e,"emby").then((function(e){e.CustomPrefs=e.CustomPrefs||{},n.displayPrefs=e}))}},{key:"getData",value:function(){return this.displayPrefs}},{key:"importFrom",value:function(e){this.displayPrefs=e.getData()}},{key:"set",value:function(e,t,n){var i,o=this.currentUserId,s=this.get(e,n),l=a.A.set(e,t,o);return!1!==n&&this.displayPrefs&&(this.displayPrefs.CustomPrefs[e]=null==t?t:t.toString(),(i=this).saveTimeout&&clearTimeout(i.saveTimeout),i.saveTimeout=setTimeout(c.bind(i),50)),s!==t&&r.A.trigger(this,"change",[e]),l}},{key:"get",value:function(e,t){var n=this.currentUserId;return!1!==t&&this.displayPrefs?this.displayPrefs.CustomPrefs[e]:a.A.get(e,n)}},{key:"serverConfig",value:function(e){var t=this.currentApiClient;return e?t.updateUserConfiguration(this.currentUserId,e):t.getUser(this.currentUserId).then((function(e){return e.Configuration}))}},{key:"allowedAudioChannels",value:function(e){return void 0!==e?this.set("allowedAudioChannels",e,!1):this.get("allowedAudioChannels",!1)||"-1"}},{key:"preferFmp4HlsContainer",value:function(e){return void 0!==e?this.set("preferFmp4HlsContainer",e.toString(),!1):(0,i.G4)(this.get("preferFmp4HlsContainer",!1),o.A.safari||o.A.firefox||o.A.chrome||o.A.edgeChromium)}},{key:"limitSegmentLength",value:function(e){return void 0!==e?this.set("limitSegmentLength",e.toString(),!1):(0,i.G4)(this.get("limitSegmentLength",!1),!1)}},{key:"enableCinemaMode",value:function(e){return void 0!==e?this.set("enableCinemaMode",e.toString(),!1):(0,i.G4)(this.get("enableCinemaMode",!1),!0)}},{key:"selectAudioNormalization",value:function(e){return void 0!==e?this.set("selectAudioNormalization",e,!1):this.get("selectAudioNormalization",!1)||"TrackGain"}},{key:"enableNextVideoInfoOverlay",value:function(e){return void 0!==e?this.set("enableNextVideoInfoOverlay",e.toString()):(0,i.G4)(this.get("enableNextVideoInfoOverlay",!1),!0)}},{key:"enableVideoRemainingTime",value:function(e){return void 0!==e?this.set("enableVideoRemainingTime",e.toString()):(0,i.G4)(this.get("enableVideoRemainingTime",!1),!0)}},{key:"enableThemeSongs",value:function(e){return void 0!==e?this.set("enableThemeSongs",e.toString(),!1):(0,i.G4)(this.get("enableThemeSongs",!1),!1)}},{key:"enableThemeVideos",value:function(e){return void 0!==e?this.set("enableThemeVideos",e.toString(),!1):(0,i.G4)(this.get("enableThemeVideos",!1),!1)}},{key:"enableFastFadein",value:function(e){return void 0!==e?this.set("fastFadein",e.toString(),!1):(0,i.G4)(this.get("fastFadein",!1),!0)}},{key:"enableBlurhash",value:function(e){return void 0!==e?this.set("blurhash",e.toString(),!1):(0,i.G4)(this.get("blurhash",!1),!0)}},{key:"enableBackdrops",value:function(e){return void 0!==e?this.set("enableBackdrops",e.toString(),!1):(0,i.G4)(this.get("enableBackdrops",!1),!1)}},{key:"disableCustomCss",value:function(e){return void 0!==e?this.set("disableCustomCss",e.toString(),!1):(0,i.G4)(this.get("disableCustomCss",!1),!1)}},{key:"customCss",value:function(e){return void 0!==e?this.set("customCss",e.toString(),!1):this.get("customCss",!1)}},{key:"detailsBanner",value:function(e){return void 0!==e?this.set("detailsBanner",e.toString(),!1):(0,i.G4)(this.get("detailsBanner",!1),!0)}},{key:"useEpisodeImagesInNextUpAndResume",value:function(e){return void 0!==e?this.set("useEpisodeImagesInNextUpAndResume",e.toString(),!0):(0,i.G4)(this.get("useEpisodeImagesInNextUpAndResume",!0),!1)}},{key:"language",value:function(e){return void 0!==e?this.set("language",e.toString(),!1):this.get("language",!1)}},{key:"dateTimeLocale",value:function(e){return void 0!==e?this.set("datetimelocale",e.toString(),!1):this.get("datetimelocale",!1)}},{key:"skipBackLength",value:function(e){return void 0!==e?this.set("skipBackLength",e.toString()):parseInt(this.get("skipBackLength")||"10000",10)}},{key:"skipForwardLength",value:function(e){return void 0!==e?this.set("skipForwardLength",e.toString()):parseInt(this.get("skipForwardLength")||"30000",10)}},{key:"dashboardTheme",value:function(e){return void 0!==e?this.set("dashboardTheme",e):this.get("dashboardTheme")}},{key:"skin",value:function(e){return void 0!==e?this.set("skin",e,!1):this.get("skin",!1)}},{key:"theme",value:function(e){return void 0!==e?this.set("appTheme",e,!1):this.get("appTheme",!1)}},{key:"screensaver",value:function(e){return void 0!==e?this.set("screensaver",e,!1):this.get("screensaver",!1)}},{key:"backdropScreensaverInterval",value:function(e){return void 0!==e?this.set("backdropScreensaverInterval",e.toString(),!1):parseInt(this.get("backdropScreensaverInterval",!1),10)||5}},{key:"screensaverTime",value:function(e){return void 0!==e?this.set("screensaverTime",e.toString(),!1):parseInt(this.get("screensaverTime",!1),10)||180}},{key:"libraryPageSize",value:function(e){if(void 0!==e)return this.set("libraryPageSize",e.toString(),!1);var t=parseInt(this.get("libraryPageSize",!1),10);return 0===t?0:t||100}},{key:"maxDaysForNextUp",value:function(e){if(void 0!==e)return this.set("maxDaysForNextUp",e.toString(),!1);var t=parseInt(this.get("maxDaysForNextUp",!1),10);return 0===t?0:t||365}},{key:"enableRewatchingInNextUp",value:function(e){return void 0!==e?this.set("enableRewatchingInNextUp",e.toString(),!1):(0,i.G4)(this.get("enableRewatchingInNextUp",!1),!1)}},{key:"soundEffects",value:function(e){return void 0!==e?this.set("soundeffects",e,!1):this.get("soundeffects",!1)}},{key:"loadQuerySettings",value:function(e,t){var n=this.get(e),r=this.get(e+f,!1);return n&&(n=m(JSON.parse(n),d)),r&&(r=m(JSON.parse(r),p)),Object.assign(t,n,r)}},{key:"saveQuerySettings",value:function(e,t){var n=m(t,d),r=m(t,p);this.set(e,JSON.stringify(n)),this.set(e+f,JSON.stringify(r),!1)}},{key:"getSavedView",value:function(e){return this.get(e+"-_view")}},{key:"saveViewSetting",value:function(e,t){return this.set(e+"-_view",t)}},{key:"getSubtitleAppearanceSettings",value:function(e){return e=e||"localplayersubtitleappearance3",Object.assign(y,JSON.parse(this.get(e,!1)||"{}"))}},{key:"setSubtitleAppearanceSettings",value:function(e,t){return t=t||"localplayersubtitleappearance3",this.set(t,JSON.stringify(e),!1)}},{key:"getComicsPlayerSettings",value:function(e){var t=JSON.parse(this.get("comicsPlayerSettings",!1)||"{}");return Object.assign(v,t[e])}},{key:"setComicsPlayerSettings",value:function(e,t){var n=JSON.parse(this.get("comicsPlayerSettings",!1)||"{}");return n[t]=e,this.set("comicsPlayerSettings",JSON.stringify(n),!1)}},{key:"setFilter",value:function(e,t){return this.set(e,t,!0)}},{key:"getFilter",value:function(e){return this.get(e,!0)}},{key:"getSortValuesLegacy",value:function(e,t){return{sortBy:this.getFilter(e+"-sortby")||t,sortOrder:"Descending"===this.getFilter(e+"-sortorder")?"Descending":"Ascending"}}}],t&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),g=new h,b=g.setUserInfo.bind(g),S=g.getData.bind(g),A=g.importFrom.bind(g),x=g.set.bind(g),w=g.get.bind(g),P=g.serverConfig.bind(g),k=g.allowedAudioChannels.bind(g),I=g.preferFmp4HlsContainer.bind(g),j=g.limitSegmentLength.bind(g),T=g.enableCinemaMode.bind(g),C=g.selectAudioNormalization.bind(g),E=g.enableNextVideoInfoOverlay.bind(g),_=g.enableVideoRemainingTime.bind(g),L=g.enableThemeSongs.bind(g),M=g.enableThemeVideos.bind(g),O=g.enableFastFadein.bind(g),R=g.enableBlurhash.bind(g),D=g.enableBackdrops.bind(g),N=g.detailsBanner.bind(g),F=g.useEpisodeImagesInNextUpAndResume.bind(g),U=g.language.bind(g),V=g.dateTimeLocale.bind(g),B=g.skipBackLength.bind(g),z=g.skipForwardLength.bind(g),q=g.dashboardTheme.bind(g),H=g.skin.bind(g),G=g.theme.bind(g),W=g.screensaver.bind(g),Y=g.backdropScreensaverInterval.bind(g),Q=g.screensaverTime.bind(g),K=g.libraryPageSize.bind(g),J=g.maxDaysForNextUp.bind(g),X=g.enableRewatchingInNextUp.bind(g),$=g.soundEffects.bind(g),Z=g.loadQuerySettings.bind(g),ee=g.saveQuerySettings.bind(g),te=g.getSubtitleAppearanceSettings.bind(g),ne=g.setSubtitleAppearanceSettings.bind(g),re=g.getComicsPlayerSettings.bind(g),ie=g.setComicsPlayerSettings.bind(g),oe=g.setFilter.bind(g),ae=g.getFilter.bind(g),se=g.customCss.bind(g),le=g.disableCustomCss.bind(g),ue=g.getSavedView.bind(g),ce=g.saveViewSetting.bind(g),de=g.getSortValuesLegacy.bind(g)},83237:function(e,t,n){"use strict";n.d(t,{Ol:function(){return s},n_:function(){return u},sS:function(){return a}}),n(69703),n(78557),n(23630);var r=n(39738),i=n(67430),o=n(44797);function a(e){if(console.debug("[autocast] %s cast player",e?"enabling":"disabling"),e){var t=r.f.getPlayerInfo();null!=t&&t.id&&localStorage.setItem("autocastPlayerId",t.id)}else localStorage.removeItem("autocastPlayerId")}function s(){var e=localStorage.getItem("autocastPlayerId"),t=r.f.getPlayerInfo();return e&&(null==t?void 0:t.id)===e}function l(){var e=localStorage.getItem("autocastPlayerId");e?(console.debug("[autocast] initializing cast player",e),r.f.getTargets().then((function(t){console.debug("[autocast] playback targets",t);var n=t.find((function(t){return t.id===e}));n?(console.debug("[autocast] found target player",n),r.f.trySetActivePlayer(n.playerName,n)):console.debug("[autocast] selected cast player not found")}))):console.debug("[autocast] no active cast player")}function u(){console.debug("[autoCast] initializing connection listener"),i.tF.getApiClients().forEach((function(e){o.A.off(e,"websocketopen",l),o.A.on(e,"websocketopen",l)})),o.A.on(i.tF,"apiclientcreated",(function(e,t){o.A.off(t,"websocketopen",l),o.A.on(t,"websocketopen",l)}))}},83375:function(e,t,n){"use strict";n.d(t,{E:function(){return i},i:function(){return r}});var r=function(){var e=window.location.hash.indexOf("?");return-1!==e?window.location.hash.substring(e):window.location.search?window.location.search:-1!==(e=window.location.href.indexOf("?"))?window.location.href.substring(e):""},i=function(e,t){return t||(t=r()),new URLSearchParams(t).get(e)||""}},84069:function(e,t,n){"use strict";n.r(t),n.d(t,{autoFocus:function(){return l},enable:function(){return s},isEnabled:function(){return a}}),n(24776),n(69892),n(78557),n(83994);var r,i=n(9164),o=n(46782);function a(){return o.A.tv}function s(){a()&&(window.addEventListener("focusin",(function(e){r=e.target})),console.debug("AutoFocuser enabled"))}function l(e){if(!a())return null;e=e||document.body;var t,n=[];if(r&&(r.classList.contains("btnPreviousPage")?(n.push(e.querySelector(".btnPreviousPage")),n.push(e.querySelector(".btnNextPage"))):r.classList.contains("btnNextPage")?(n.push(e.querySelector(".btnNextPage")),n.push(e.querySelector(".btnPreviousPage"))):r.classList.contains("btnSelectView")&&n.push(e.querySelector(".btnSelectView")),n.push(r)),(n=n.concat(Array.from(e.querySelectorAll(".btnPlay")))).every((function(e){return!i.A.isCurrentlyFocusable(e)||(i.A.focus(e),t=e,!1)})),!t){var o=e.querySelector(".itemsContainer");o&&(t=i.A.autoFocus(o))}return t||(t=i.A.autoFocus(e)),t}t.default={isEnabled:a,enable:s,autoFocus:l}},84138:function(e,t,n){"use strict";n.d(t,{A:function(){return W}}),n(29305),n(32733),n(84701),n(81678),n(2623),n(14382),n(44962),n(4754),n(10849),n(70389),n(94),n(33087),n(36947),n(36457),n(88908),n(26437),n(83810),n(52697),n(78557),n(96054),n(90076),n(21359),n(61642),n(83994),n(23630),n(82367),n(73275);var r=n(92600),i=n(22622),o=n(90381),a=n(82885),s=n(89100),l=n(44797),u=n(75384),c=(n(84734),n(86584),n(89336),n(26448),n(95021),n(93062),n(46968),n(63972)),d=n(97138),f=n(87082),p=n(95700),m=n(44305),y=n(22043),v=n(1935);function h(e){return h="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},h(e)}function g(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return b(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(b(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,b(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,b(d,"constructor",u),b(u,"constructor",l),l.displayName="GeneratorFunction",b(u,i,"GeneratorFunction"),b(d),b(d,i,"Generator"),b(d,r,(function(){return this})),b(d,"toString",(function(){return"[object Generator]"})),(g=function(){return{w:o,m:f}})()}function b(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}b=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){b(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},b(e,t,n,r)}function S(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function x(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function w(e,t){switch(t){case y.W.Local:return e.LocalAddress;case y.W.Manual:return e.ManualAddress;case y.W.Remote:return e.RemoteAddress;default:return e.ManualAddress||e.LocalAddress||e.RemoteAddress}}function P(e,t){e.Name=t.ServerName,t.Id&&(e.Id=t.Id),t.LocalAddress&&(e.LocalAddress=t.LocalAddress)}function k(e){return(e=(e=e.trim()).replace("Http:","http:")).replace("Https:","https:")}function I(e,t){return(t.DateLastAccessed||0)-(e.DateLastAccessed||0)}var j=function(){return e=function e(t,n,i,o,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),console.log("Begin ConnectionManager constructor");var u=this;function h(e,n,r,i){var o=t.credentials(),a=o.Servers.filter((function(e){return e.Id===n.ServerId})),s=a.length?a[0]:e.serverInfo();return!1!==r.updateDateLastAccessed&&(s.DateLastAccessed=(new Date).getTime()),s.Id=n.ServerId,i?(s.UserId=n.User.Id,s.AccessToken=n.AccessToken):(s.UserId=null,s.AccessToken=null),t.addOrUpdateServer(o.Servers,s),t.credentials(o),e.enableAutomaticBitrateDetection=r.enableAutomaticBitrateDetection,e.serverInfo(s),e.setAuthenticationInfo(n.AccessToken,n.User.Id),b(e,r),A(s,e.serverAddress(),n.User)}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!1!==t.reportCapabilities&&e.reportCapabilities(s),e.enableAutomaticBitrateDetection=t.enableAutomaticBitrateDetection,!1!==t.enableWebSocket&&(console.log("calling apiClient.ensureWebSocket"),e.ensureWebSocket())}function A(e,t,n){return u._getOrAddApiClient(e,t),(u.onLocalUserSignedIn?u.onLocalUserSignedIn.call(u,n):Promise.resolve()).then((function(){l.A.trigger(u,"localusersignedin",[n])}))}function j(e){var t={serverId:(e.serverInfo()||{}).Id};return e.logout().then((function(){l.A.trigger(u,"localusersignedout",[t])}),(function(){l.A.trigger(u,"localusersignedout",[t])}))}function T(e){if(e.Address&&e.EndpointAddress){var t=e.EndpointAddress.split(":")[0],n=e.Address.split(":");if(n.length>1){var r=n[n.length-1];isNaN(parseInt(r,10))||(t+=":".concat(r))}return k(t)}return null}function C(e){var t=[],n=[];return!e.manualAddressOnly&&e.LocalAddress&&-1===n.indexOf(e.LocalAddress)&&(t.push({url:e.LocalAddress,mode:y.W.Local,timeout:0}),n.push(t[t.length-1].url)),e.ManualAddress&&-1===n.indexOf(e.ManualAddress)&&(t.push({url:e.ManualAddress,mode:y.W.Manual,timeout:100}),n.push(t[t.length-1].url)),!e.manualAddressOnly&&e.RemoteAddress&&-1===n.indexOf(e.RemoteAddress)&&(t.push({url:e.RemoteAddress,mode:y.W.Remote,timeout:200}),n.push(t[t.length-1].url)),console.info("[ConnectionManager] tryReconnect addresses",n),new Promise((function(e,n){var r={};r.numAddresses=t.length,r.rejects=0,t.forEach((function(t){setTimeout((function(){r.resolved||function(e,t,n,r,i){console.log("getTryConnectPromise "+e),(0,p.ajax)({url:"".concat(e,"/System/Info/Public"),timeout:2e4,type:"GET",dataType:"json"}).then((function(i){n.resolved||(n.resolved=!0,console.log("Reconnect succeeded to "+e),r({url:e,connectionMode:t,data:i}))}),(function(){console.log("Reconnect failed to "+e),n.resolved||(n.rejects++,n.rejects>=n.numAddresses&&i())}))}(t.url,t.mode,r,e,n)}),t.timeout)}))}))}function E(e,r,s,f,m,y){var h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},g=t.credentials();if(!1===h.enableAutoLogin)e.UserId=null,e.AccessToken=null;else if(e.AccessToken&&m)return void function(e,t){return(0,p.ajax)({type:"GET",url:"".concat(t,"/System/Info"),dataType:"json",headers:(r={},s=c.u,l=(0,d.XL)({name:n,version:i},{id:a,name:o},e.AccessToken),(s=x(s))in r?Object.defineProperty(r,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[s]=l,r)}).then((function(t){return P(e,t),Promise.resolve()}),(function(){return e.UserId=null,e.AccessToken=null,Promise.resolve()}));var r,s,l}(e,f).then((function(){E(e,r,s,f,!1,y,h)}));P(e,r),e.LastConnectionMode=s,!1!==h.updateDateLastAccessed&&(e.DateLastAccessed=(new Date).getTime()),t.addOrUpdateServer(g.Servers,e),t.credentials(g);var S={Servers:[]};S.ApiClient=u._getOrAddApiClient(e,f),S.ApiClient.setSystemInfo(r),S.SystemInfo=r,S.State=e.AccessToken&&!1!==h.enableAutoLogin?v.K.SignedIn:v.K.ServerSignIn,S.Servers.push(e),S.ApiClient.enableAutomaticBitrateDetection=h.enableAutomaticBitrateDetection,S.ApiClient.updateServerInfo(e,f),S.ApiClient.setAuthenticationInfo(e.AccessToken,e.UserId);var w=function(){y(S),l.A.trigger(u,"connected",[S])};S.State===v.K.SignedIn?(b(S.ApiClient,h),S.ApiClient.getCurrentUser().then((function(t){A(e,f,t).then(w,w)}),w)):w()}function _(e,t){var n={ManualAddress:e,LastConnectionMode:y.W.Manual};return u.connectToServer(n,t).then((function(e){return e.State===v.K.Unavailable?Promise.reject():e}))}this._apiClients=[],u._minServerVersion=f.U,u.appVersion=function(){return i},u.appName=function(){return n},u.capabilities=function(){return s},u.deviceId=function(){return a},u.credentialProvider=function(){return t},u.getServerInfo=function(e){return t.credentials().Servers.filter((function(t){return t.Id===e}))[0]},u.getLastUsedServer=function(){var e=t.credentials().Servers;return e.sort(I),e.length?e[0]:null},u.addApiClient=function(e){u._apiClients.push(e);var n=t.credentials().Servers.filter((function(t){return(0,m.Q_)(t.ManualAddress,e.serverAddress())||(0,m.Q_)(t.LocalAddress,e.serverAddress())||(0,m.Q_)(t.RemoteAddress,e.serverAddress())})),r=n.length?n[0]:e.serverInfo();if(r.DateLastAccessed=(new Date).getTime(),r.LastConnectionMode=y.W.Manual,r.ManualAddress=e.serverAddress(),e.manualAddressOnly&&(r.manualAddressOnly=!0),e.serverInfo(r),e.onAuthenticated=function(e,t){return h(e,t,{},!0)},!n.length){var i=t.credentials();i.Servers=[r],t.credentials(i)}l.A.trigger(u,"apiclientcreated",[e])},u.clearData=function(){console.log("connection manager clearing data");var e=t.credentials();e.Servers=[],t.credentials(e)},u._getOrAddApiClient=function(e,t){var s=u.getApiClient(e.Id);return s||(s=new r.ApiClient(t,n,i,o,a),u._apiClients.push(s),s.serverInfo(e),s.onAuthenticated=function(e,t){return h(e,t,{},!0)},l.A.trigger(u,"apiclientcreated",[s])),console.log("returning instance from getOrAddApiClient"),s},u.getOrCreateApiClient=function(e){var n=t.credentials().Servers.filter((function(t){return(0,m.Q_)(t.Id,e)}));if(!n.length)throw new Error("Server not found: ".concat(e));var r=n[0];return u._getOrAddApiClient(r,w(r,r.LastConnectionMode))},u.user=function(e){return new Promise((function(t){var n;e&&e.getCurrentUserId()&&e&&e.getCurrentUserId()&&e.getCurrentUser().then((function(e){var r=function(e){return e&&e.PrimaryImageTag?{url:u.getApiClient(e).getUserImageUrl(e.Id,{tag:e.PrimaryImageTag,type:"Primary"}),supportsParams:!0}:{url:null,supportsParams:!1}}(n=e);t({localUser:n,name:n?n.Name:null,imageUrl:r.url,supportsImageParams:r.supportsParams})}))}))},u.logout=function(){for(var e=[],n=0,r=u._apiClients.length;n<r;n++){var i=u._apiClients[n];i.accessToken()&&e.push(j(i))}return Promise.all(e).then((function(){for(var e=t.credentials().Servers.filter((function(e){return"Guest"!==e.UserLinkType})),n=0,r=e.length;n<r;n++){var i=e[n];i.UserId=null,i.AccessToken=null,i.ExchangeToken=null}}))},u.getSavedServers=function(){var e=t.credentials().Servers.slice(0);return e.sort(I),e},u.getAvailableServers=function(){console.debug("[ConnectionManager] Begin getAvailableServers");var e=t.credentials();return new Promise((function(e){var t=function(t){var n=t.map((function(e){var t={Id:e.Id,LocalAddress:T(e)||e.Address,Name:e.Name};return t.LastConnectionMode=t.ManualAddress?y.W.Manual:y.W.Local,t}));e(n)};window&&window.NativeShell&&"function"==typeof window.NativeShell.findServers?window.NativeShell.findServers(1e3).then(t,(function(){t([])})):e([])})).then((function(n){var r=e.Servers.slice(0);return n.forEach((function(e){t.addOrUpdateServer(r,e)})),r.sort(I),e.Servers=r,t.credentials(e),r}))},u.connectToServers=function(e,t){console.log("Begin connectToServers, with ".concat(e.length," servers"));var n=e.length?e[0]:null;return n?u.connectToServer(n,t).then((function(e){return console.log("resolving connectToServers with result.State: "+e.State),e})):Promise.resolve({Servers:e,State:v.K.ServerSelection})},u.connectToServer=function(e,t){return console.debug("[ConnectionManager] begin connectToServer"),new Promise((function(n){t=t||{},C(e).then((function(r){var i=r.url,o=r.connectionMode;r=r.data,1===function(e,t){void 0===e&&(e=""),void 0===t&&(t="");for(var n=e.split("."),r=t.split("."),i=0,o=Math.max(n.length,r.length);i<o;i++){var a=parseInt(n[i]||"0",10),s=parseInt(r[i]||"0",10);if(a<s)return-1;if(a>s)return 1}return 0}(u.minServerVersion(),r.Version)?(console.warn("[ConnectionManager] minServerVersion requirement not met. Server version:",r.Version),n({State:v.K.ServerUpdateNeeded,Servers:[e]})):e.Id&&r.Id!==e.Id?(console.warn("[ConnectionManager] http request succeeded, but found a different server Id than what was expected"),n({State:v.K.ServerMismatch})):E(e,r,o,i,!0,n,t)}),(function(){n({State:v.K.Unavailable})}))}))},u.updateSavedServerId=function(){var e,n=(e=g().m((function e(n){var r,i,o;return g().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,C(n);case 1:r=e.v,i=r.data,n.Id=i.Id,n.AccessToken=null,n.UserId=null,o=t.credentials(),t.addOrUpdateServer(o.Servers,n),t.credentials(o);case 2:return e.a(2)}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){S(o,r,i,a,s,"next",e)}function s(e){S(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}(),u.connectToAddress=function(e,t){if(!e)return Promise.reject();e=k(e);var n=[];/^[^:]+:\/\//.test(e)?n.push(e):(n.push("https://".concat(e)),n.push("http://".concat(e)));var r=0;return _(n[r],t).catch((function e(){return console.log("connectToAddress ".concat(n[r]," failed")),++r<n.length?_(n[r],t).catch(e):Promise.resolve({State:v.K.Unavailable})}))},u.deleteServer=function(e){if(!e)throw new Error("null serverId");var n=t.credentials().Servers.filter((function(t){return t.Id===e}));return n=n.length?n[0]:null,new Promise((function(r){var i;n.ConnectServerId||((i=t.credentials()).Servers=i.Servers.filter((function(t){return t.Id!==e})),t.credentials(i),r())}))}},(t=[{key:"connect",value:function(e){var t=this;return console.log("Begin connect"),this.getAvailableServers().then((function(n){return t.connectToServers(n,e)}))}},{key:"handleMessageReceived",value:function(e){var t=e.ServerId;if(t){var n=this.getApiClient(t);if(n){if("string"==typeof e.Data)try{e.Data=JSON.parse(e.Data)}catch(e){console.log("unable to parse json content: "+e)}n.handleMessageReceived(e)}}}},{key:"getApiClients",value:function(){for(var e=this.getSavedServers(),t=0,n=e.length;t<n;t++){var r=e[t];r.Id&&this._getOrAddApiClient(r,w(r,r.LastConnectionMode))}return this._apiClients}},{key:"getApiClient",value:function(e){if(!e)throw new Error("item or serverId cannot be null");return e.ServerId&&(e=e.ServerId),this._apiClients.filter((function(t){var n=t.serverInfo();return!n||n.Id===e}))[0]}},{key:"minServerVersion",value:function(e){return e&&(this._minServerVersion=e),this._minServerVersion}}])&&A(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function T(e){return T="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},T(e)}function C(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return E(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(E(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,E(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,E(d,"constructor",u),E(u,"constructor",l),l.displayName="GeneratorFunction",E(u,i,"GeneratorFunction"),E(d),E(d,i,"Generator"),E(d,r,(function(){return this})),E(d,"toString",(function(){return"[object Generator]"})),(C=function(){return{w:o,m:f}})()}function E(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}E=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){E(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},E(e,t,n,r)}function _(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,D(r.key),r)}}function D(e){var t=function(e){if("object"!=T(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function F(){return F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=U(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},F.apply(null,arguments)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var B=function(e){!e.quality&&(e.maxWidth||e.width||e.maxHeight||e.height||e.fillWidth||e.fillHeight)&&(e.quality=90)},z=function(){if(navigator.connection){var e=navigator.connection.downlinkMax;if(e&&e>0&&e<Number.POSITIVE_INFINITY)return e/=8,e*=1e6,e*=.7,parseInt(e,10)}return null},q=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=U(t),function(e,t){if(t&&("object"==T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],U(e).constructor):t.apply(e,n))}(this,t,arguments)).localApiClient=null,e.firstConnection=null,l.A.on(e,"localusersignedout",(function(e,t){(0,a.setUserInfo)(null,null),H.credentials(H.credentials()),window.NativeShell&&"function"==typeof window.NativeShell.onLocalUserSignedOut&&window.NativeShell.onLocalUserSignedOut(t)})),l.A.on(e,"apiclientcreated",(function(e,t){t.getMaxBandwidth=z,t.normalizeImageOptions=B})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(t,e),n=t,s=[{key:"initApiClient",value:function(e){console.debug("creating ApiClient singleton");var t=new r.ApiClient(e,i.g.appName(),i.g.appVersion(),i.g.deviceName(),i.g.deviceId());t.enableAutomaticNetworking=!1,t.manualAddressOnly=!0,this.addApiClient(t),this.setLocalApiClient(t),console.debug("loaded ApiClient singleton")}},{key:"connect",value:function(e){return(n=t,r=this,"function"==typeof(i=F(U(1&3?n.prototype:n),"connect",r))?function(e){return i.apply(r,e)}:i)([M({enableAutoLogin:o.A.enableAutoLogin()},e)]);var n,r,i}},{key:"setLocalApiClient",value:function(e){e&&(this.localApiClient=e,window.ApiClient=e)}},{key:"getLocalApiClient",value:function(){return this.localApiClient}},{key:"currentApiClient",value:function(){var e=this.getLocalApiClient();if(!e){var t=this.getLastUsedServer();t&&(e=this.getApiClient(t.Id))}return e}},{key:"getCurrentApi",value:function(){var e=this.currentApiClient();if(e)return(0,u.C)(e)}},{key:"getCurrentApiClientAsync",value:(c=C().m((function e(){var t;return C().w((function(e){for(;;)switch(e.n){case 0:if(t=this.currentApiClient()){e.n=1;break}throw new Error("[ServerConnection] No current ApiClient instance");case 1:return e.a(2,t)}}),e,this)})),d=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=c.apply(e,t);function o(e){_(i,n,r,o,a,"next",e)}function a(e){_(i,n,r,o,a,"throw",e)}o(void 0)}))},function(){return d.apply(this,arguments)})},{key:"onLocalUserSignedIn",value:function(e){var t=this.getApiClient(e.ServerId);return this.setLocalApiClient(t),(0,a.setUserInfo)(e.Id,t).then((function(){return window.NativeShell&&"function"==typeof window.NativeShell.onLocalUserSignedIn?window.NativeShell.onLocalUserSignedIn(e,t.accessToken()):Promise.resolve()}))}}],s&&R(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s,c,d}(j),H=new r.Credentials,G=s.default.capabilities(i.g),W=new q(H,i.g.appName(),i.g.appVersion(),i.g.deviceName(),i.g.deviceId(),G)},84238:function(e,t,n){n(24776),n(36947),n(78557),function(){var e={transform:["webkitTransform"],transition:["webkitTransition"]},t=document.createElement("div");function n(n){n in t.style||(e[n]||[]).every((function(e){return!(e in t.style)||(console.debug("polyfill '".concat(n,"' with '").concat(e,"'")),Object.defineProperty(CSSStyleDeclaration.prototype,n,{get:function(){return this[e]},set:function(t){this[e]=t}}),!1)}))}t.style instanceof CSSStyleDeclaration&&(n("transform"),n("transition"))}()},84849:function(e,t,n){"use strict";var r=n(63696),i=n(8566);t.A=function(){return(0,r.useEffect)((function(){return i.Ay.show(),function(){i.Ay.hide()}}),[]),null}},84851:function(e,t,n){"use strict";var r=n(62540),i=n(4452),o=n.n(i),a=n(63696),s=n(22622),l=n(46782),u=n(70267),c=n(97339),d=n(13615),f=function(){return f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)};t.A=function(e){var t=e.className,n=e.isAutoHideEnabled,i=e.href,p=void 0===i?"#":i,m=e.target,y=e.onClick,v=e.children,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["className","isAutoHideEnabled","href","target","onClick","children"]),g=(0,a.useCallback)((function(e){var t=p||"";"#"!==t?m?s.g.supports(c.Y.TargetBlank)||(e.preventDefault(),d.A.openUrl(t)):(e.preventDefault(),u.appRouter.show(t).catch((function(e){console.error("[LinkButton] failed to show url",t,e)}))):e.preventDefault(),null==y||y(e)}),[p,m,y]);if(!0===n&&!s.g.supports(c.Y.ExternalLinks))return null;var b=o()("emby-button",t,{"show-focus":l.A.tv});return(0,r.jsx)("a",f({className:b,href:p,target:m,onClick:g},h,{children:v}))}},85660:function(e,t,n){"use strict";n.r(t),n.d(t,{STABLE_APP_ROUTES:function(){return y}});var r=n(62540),i=n(87404),o=(n(63696),n(22477)),a=n(51218),s=n(37881),l=n(34569),u=n(71004),c=n(56419),d=n(34945),f=n(98372),p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},m=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},y=[{path:"/*",Component:c.A,children:[{index:!0,element:(0,r.jsx)(i.C5,{replace:!0,to:"/home"})},{Component:o.A,children:m(m([],p(d.ASYNC_USER_ROUTES.map(a.G)),!1),p(f.LEGACY_USER_ROUTES.map(s.I)),!1),ErrorBoundary:l.A},{element:(0,r.jsx)(o.A,{level:"public"}),children:m(m(m([],p(d.ASYNC_PUBLIC_ROUTES.map(a.G)),!1),p(f.LEGACY_PUBLIC_ROUTES.map(s.I)),!1),[{path:"*",Component:u.A}],!1)}]}]},86663:function(e,t,n){"use strict";n.r(t),n.d(t,{show:function(){return v}}),n(14382),n(69703),n(84734),n(44962),n(86584),n(78557),n(90076),n(83994),n(82367);var r=n(97339),i=n(44797),o=n(34789),a=n(8566),s=n(39738),l=n(38829),u=n(70267),c=n(5898),d=n(22622),f=n(83237),p=(n(77157),n(10353),n(48080)),m=n(79754);function y(e){var t=e.deviceType;switch(!t&&e.isLocalPlayer&&(t=o.A.tv?"tv":o.A.mobile?"smartphone":"desktop"),t||(t="tv"),t){case"smartphone":return"smartphone";case"tablet":return"tablet";case"tv":default:return"tv";case"cast":return"cast";case"desktop":return"computer"}}function v(e){var t=s.f.getPlayerInfo();if(!t||t.isLocalPlayer){var i=t?t.id:null;a.Ay.show(),s.f.getTargets().then((function(t){var u=t.map((function(e){var t,n=e.name;return e.appName&&e.appName!==e.name&&(n+=" - "+e.appName),{name:n,id:e.id,selected:i===e.id,secondaryText:(t=e,t.user?t.user.Name:null),icon:y(e)}}));n.e(62882).then(n.bind(n,62882)).then((function(n){a.Ay.hide();var i={title:c.Ay.translate("HeaderPlayOn"),items:u,positionTo:e,resolveOnClick:!0,border:!0};!o.A.chrome&&!o.A.edgeChromium||d.g.supports(r.Y.CastMenuHashChange)||(i.enableHistory=!1),!!l.X.plugins.find((function(e){return"chromecast"===e.id}))||(i.text="(".concat(c.Ay.translate("GoogleCastUnsupported"),")")),n.show(i).then((function(e){var n=t.filter((function(t){return t.id===e}))[0];s.f.trySetActivePlayer(n.playerName,n)})).catch((function(){}))})).catch((function(e){console.error("[playerSelectionMenu] failed to import action sheet",e)}))})).catch((function(e){console.error("[playerSelectionMenu] failed to get playback targets",e)}))}else!function(e){var t="",n=m.default.createDialog({removeOnClose:!0,modal:!1,entryAnimationDuration:160,exitAnimationDuration:160,autoFocus:!1});n.classList.add("promptDialog");var r=e.deviceName||e.name;t+='<div class="promptDialogContent" style="padding:1.5em;">',t+='<h2 style="margin-top:.5em;">',t+=r,t+="</h2>",t+="<div>",-1!==e.supportedCommands.indexOf("DisplayContent")&&(t+='<label class="checkboxContainer">',t+='<input type="checkbox" is="emby-checkbox" class="chkMirror"'+(s.f.enableDisplayMirroring()?" checked":"")+"/>",t+="<span>"+c.Ay.translate("EnableDisplayMirroring")+"</span>",t+="</label>"),t+="</div>",t+='<div><label class="checkboxContainer">',t+='<input type="checkbox" is="emby-checkbox" class="chkAutoCast"'+((0,f.Ol)()?" checked":"")+"/>",t+="<span>"+c.Ay.translate("EnableAutoCast")+"</span>",t+="</label></div>",t+='<div style="margin-top:1em;display:flex;justify-content: flex-end;">',t+='<button is="emby-button" type="button" class="button-flat btnRemoteControl promptDialogButton">'+c.Ay.translate("HeaderRemoteControl")+"</button>",t+='<button is="emby-button" type="button" class="button-flat btnDisconnect promptDialogButton ">'+c.Ay.translate("Disconnect")+"</button>",t+='<button is="emby-button" type="button" class="button-flat btnCancel promptDialogButton">'+c.Ay.translate("ButtonCancel")+"</button>",t+="</div>",t+="</div>",n.innerHTML=t;var i=n.querySelector(".chkMirror");i&&i.addEventListener("change",h);var o=n.querySelector(".chkAutoCast");o&&o.addEventListener("change",g);var a="",l=n.querySelector(".btnRemoteControl");l&&l.addEventListener("click",(function(){a="nowplaying",m.default.close(n)})),n.querySelector(".btnDisconnect").addEventListener("click",(function(){a="disconnectFromPlayer",m.default.close(n)})),n.querySelector(".btnCancel").addEventListener("click",(function(){m.default.close(n)})),m.default.open(n).then((function(){if("nowplaying"===a)return u.appRouter.showNowPlaying();"disconnectFromPlayer"===a&&function(e){if(-1!==s.f.getSupportedCommands().indexOf("EndSession")){var t=[];t.push({name:c.Ay.translate("Yes"),id:"yes"}),t.push({name:c.Ay.translate("No"),id:"no"}),p.A.show({buttons:t,text:c.Ay.translate("ConfirmEndPlayerSession",e)}).then((function(e){switch(e){case"yes":s.f.getCurrentPlayer().endSession(),s.f.setDefaultPlayerActive();break;case"no":s.f.setDefaultPlayerActive()}})).catch((function(){}))}else s.f.setDefaultPlayerActive()}(r)})).catch((function(){}))}(t)}function h(){s.f.enableDisplayMirroring(this.checked)}function g(){(0,f.sS)(this.checked)}i.A.on(s.f,"pairing",(function(){a.Ay.show()})),i.A.on(s.f,"paired",(function(){a.Ay.hide()})),i.A.on(s.f,"pairerror",(function(){a.Ay.hide()})),t.default={show:v}},87003:function(e,t,n){"use strict";n.d(t,{A:function(){return G},b:function(){return H}});var r=n(62540),i=n(23133),o=n(63696),a=n(9055),s=n(87404),l=n(7603),u=n(66359),c=n(85660),d=n(56419),f=n(19373),p=n(22477),m=n(34569),y=n(37881),v=[{path:"remoteaccess",pageProps:{appType:f.u.Wizard,controller:"remote/index",view:"remote/index.html"}},{path:"finish",pageProps:{appType:f.u.Wizard,controller:"finish/index",view:"finish/index.html"}},{path:"library",pageProps:{appType:f.u.Wizard,controller:"library",view:"library.html"}},{path:"settings",pageProps:{appType:f.u.Wizard,controller:"settings/index",view:"settings/index.html"}},{path:"start",pageProps:{appType:f.u.Wizard,controller:"start/index",view:"start/index.html"}},{path:"user",pageProps:{appType:f.u.Wizard,controller:"user/index",view:"user/index.html"}}],h=[{element:(0,r.jsx)(p.A,{level:"wizard"}),children:[{Component:d.A,path:"wizard",children:function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([{index:!0,element:(0,r.jsx)(s.C5,{replace:!0,to:"start"})}],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(v.map(y.I)),!1),ErrorBoundary:m.A}]}],g=function(e){var t=e.isHidden,i=void 0!==t&&t;return(0,o.useEffect)((function(){Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(68603)]).then(n.bind(n,73233))}),[]),(0,r.jsxs)("div",{style:i?{display:"none"}:void 0,children:[(0,r.jsx)("div",{className:"mainDrawer hide",children:(0,r.jsx)("div",{className:"mainDrawer-scrollContainer scrollContainer focuscontainer-y"})}),(0,r.jsx)("div",{className:"skinHeader focuscontainer-x"}),(0,r.jsx)("div",{className:"mainDrawerHandle"})]})},b=function(){return(0,o.useEffect)((function(){Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(32721)]).then(n.bind(n,85420))}),[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"backdropContainer"}),(0,r.jsx)("div",{className:"backgroundContainer"})]})},S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},S.apply(this,arguments)},A=n(44797),x="HISTORY_UPDATE",w=function(){function e(e){this._router=e,this._router.subscribe((function(e){console.debug("[RouterHistory] history update",e),A.A.trigger(document,x,[e])})),this.createHref=e.createHref}return Object.defineProperty(e.prototype,"action",{get:function(){return this._router.state.historyAction},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this._router.state.location},enumerable:!1,configurable:!0}),e.prototype.back=function(){this._router.navigate(-1)},e.prototype.forward=function(){this._router.navigate(1)},e.prototype.go=function(e){this._router.navigate(e)},e.prototype.push=function(e,t){this._router.navigate(e,{state:t})},e.prototype.replace=function(e,t){this._router.navigate(e,{state:t,replace:!0})},e.prototype.block=function(){throw new Error("`history.block()` is not implemented")},e.prototype.listen=function(e){var t=function(t,n){return e({action:n.historyAction,location:n.location})};return A.A.on(document,x,t),function(){return A.A.off(document,x,t)}},e}(),P=n(58161),k=n(27367),I=n(45950),j={palette:{mode:"dark",primary:{main:"#00a4dc"},secondary:{main:"#aa5cc3"},background:{default:"#101010",paper:"#202020"},action:{selectedOpacity:.2},starIcon:{main:"#f2b01e"},error:{main:"#c62828"}}},T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},T.apply(this,arguments)},C=(0,P.A)({colorSchemes:{dark:!0,light:!0}}),E=function(e){var t;return(0,I.A)({},"light"===(null===(t=e.palette)||void 0===t?void 0:t.mode)?C.colorSchemes.light:C.colorSchemes.dark,j,e)},_=E({palette:{mode:"light",background:{default:"#d5e9f2",paper:"#fff"},AppBar:{defaultBg:"#bcbcbc"}}}),L=E({palette:{background:{paper:"#011432"},AppBar:{defaultBg:"#011432"}}}),M=(0,I.A)({},j,{palette:{mode:"light",background:{default:"#f2f2f2",paper:"#e8e8e8"},AppBar:{defaultBg:"#e8e8e8"}}}),O=E({palette:{background:{paper:"#000420"},primary:{main:"#48c3c8"},secondary:{main:"#ff77f1"},AppBar:{defaultBg:"#000420"}}}),R=E({palette:{background:{paper:"#0c2450"},AppBar:{defaultBg:"#0c2450"}}}),D={appletv:_,blueradiance:L,dark:j,light:M,purplehaze:O,wmc:R},N=(0,k.A)(T(T({cssVariables:{cssVarPrefix:"jf",colorSchemeSelector:'[data-theme="%s"]',disableCssColorScheme:!0},defaultColorScheme:"dark"},{typography:{fontFamily:'"Noto Sans", sans-serif',button:{textTransform:"none"},h1:{fontSize:"1.8rem"},h2:{fontSize:"1.5rem"},h3:{fontSize:"1.17rem"}},components:{MuiAlert:{styleOverrides:{message:{flexGrow:1}}},MuiAppBar:{styleOverrides:{colorTransparent:function(e){return{color:e.theme.vars.palette.text.primary}}}},MuiButton:{defaultProps:{variant:"contained"},variants:[{props:{size:"large"},style:{fontSize:"1rem",fontWeight:"bold"}}]},MuiFormControl:{defaultProps:{variant:"filled"}},MuiFormHelperText:{styleOverrides:{root:{fontSize:"1rem"}}},MuiTextField:{defaultProps:{variant:"filled"}},MuiListItemIcon:{styleOverrides:{root:{minWidth:36}}},MuiListSubheader:{styleOverrides:{root:{backgroundColor:"inherit",position:"initial"}}},MuiListItemText:{styleOverrides:{inset:{paddingLeft:36}}}}}),{colorSchemes:D})),F=n(71286),U=function(){return{get:function(e){return e},set:function(){},subscribe:function(e){var t=function(t,n){return e(n)};return A.A.on(document,F.B.THEME_CHANGE,t),function(){return A.A.off(document,F.B.THEME_CHANGE,t)}}}},V=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},B=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},z="experimental"===localStorage.getItem("layout"),q=(0,a.Ge)([{element:(0,r.jsx)((function(){var e=(0,s.zy)(),t=Object.values(l.DASHBOARD_APP_PATHS).some((function(t){return e.pathname.startsWith("/".concat(t))}));return(0,r.jsxs)(i.A,{theme:N,defaultMode:"dark",storageManager:U,children:[(0,r.jsx)(b,{}),(0,r.jsx)(g,{isHidden:z||t}),(0,r.jsx)(s.sv,{})]})}),{}),children:B(B(B(B([],V(z?u.EXPERIMENTAL_APP_ROUTES:c.STABLE_APP_ROUTES),!1),V(l.DASHBOARD_APP_ROUTES),!1),V(h),!1),[{path:"!/*",Component:function(){var e=(0,s.zy)(),t=(0,o.useMemo)((function(){var t={search:e.search,hash:e.hash};return e.pathname.startsWith("/!/")?S(S({},t),{pathname:e.pathname.substring(2)}):e.pathname.startsWith("/!")?S(S({},t),{pathname:e.pathname.replace(/^\/!/,"/")}):e.pathname.startsWith("!")?S(S({},t),{pathname:e.pathname.substring(1)}):void 0}),[e]);return t?(console.warn("[BangRedirect] You are using a deprecated URL format. This will stop working in a future Jellyfin update."),(0,r.jsx)(s.C5,{replace:!0,to:t})):null}}],!1)}]),H=function(e){return new w(e)}(q);function G(){return(0,r.jsx)(a.pg,{router:q})}},87119:function(e,t,n){"use strict";n.d(t,{A:function(){return V}});var r=n(62540),i=n(62955),o=n(67242),a=n(92779),s=n(75487),l=n(91401),u=n(72073),c=n(63696),d=n(70267),f=n(69410),p=n(5898),m=n(81965),y=n(87934),v=n(58304),h=n(10301),g=n(23849),b=n(55129),S=n(17997),A=n(74695),x=n(85002),w=n(94568),P=n(13960),k=n(74156),I=n(44790),j=n(60434),T=n(48402),C=n(85637),E=n(9055),_=n(22622),L=n(97339),M=n(891),O=n(13615),R=n(89100),D="app-user-menu",N=function(e){var t,n=e.anchorEl,i=e.open,o=e.onMenuClose,a=(0,f.gf)().user,s=(0,M.K)().data,l=(0,c.useCallback)((function(){O.A.openDownloadManager(),o()}),[o]),u=(0,c.useCallback)((function(){O.A.openClientSettings(),o()}),[o]),d=(0,c.useCallback)((function(){_.g.exit(),o()}),[o]),m=(0,c.useCallback)((function(){R.default.logout(),o()}),[o]),N=(0,c.useCallback)((function(){R.default.selectServer(),o()}),[o]);return(0,r.jsxs)(T.A,{anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:D,keepMounted:!0,open:i,onClose:o,children:[(0,r.jsxs)(C.A,{component:E.N_,to:"/userprofile?userId=".concat(null==a?void 0:a.Id),onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(y.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("Profile")})]}),(0,r.jsxs)(C.A,{component:E.N_,to:"/mypreferencesmenu",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(w.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("Settings")})]}),(_.g.supports(L.Y.DownloadManagement)||_.g.supports(L.Y.ClientSettings))&&(0,r.jsx)(k.A,{}),_.g.supports(L.Y.DownloadManagement)&&(0,r.jsxs)(C.A,{onClick:l,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(b.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("DownloadManager")})]}),_.g.supports(L.Y.ClientSettings)&&(0,r.jsxs)(C.A,{onClick:u,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(v.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("ClientSettings")})]}),(null===(t=null==a?void 0:a.Policy)||void 0===t?void 0:t.IsAdministrator)&&[(0,r.jsx)(k.A,{},"admin-links-divider"),(0,r.jsxs)(C.A,{component:E.N_,to:"/dashboard",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(g.A,{})}),(0,r.jsx)(j.A,{primary:p.Ay.translate("TabDashboard")})]},"admin-dashboard-link"),(0,r.jsxs)(C.A,{component:E.N_,to:"/metadata",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(S.A,{})}),(0,r.jsx)(j.A,{primary:p.Ay.translate("MetadataManager")})]},"admin-metadata-link")],(0,r.jsx)(k.A,{}),s&&(0,r.jsxs)(C.A,{component:E.N_,to:"/quickconnect",onClick:o,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(x.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("QuickConnect")})]}),_.g.supports(L.Y.MultiServer)&&(0,r.jsxs)(C.A,{onClick:N,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(P.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("SelectServer")})]}),(0,r.jsxs)(C.A,{onClick:m,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(A.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("ButtonSignOut")})]}),_.g.supports(L.Y.ExitMenu)&&[(0,r.jsx)(k.A,{},"exit-menu-divider"),(0,r.jsxs)(C.A,{onClick:d,children:[(0,r.jsx)(I.A,{children:(0,r.jsx)(h.A,{})}),(0,r.jsx)(j.A,{children:p.Ay.translate("ButtonExitApp")})]},"exit-menu-button")]]})},F=function(){var e=(0,f.gf)().user,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,c.useState)(null),2),n=t[0],i=t[1],o=Boolean(n),a=(0,c.useCallback)((function(e){i(e.currentTarget)}),[i]),l=(0,c.useCallback)((function(){i(null)}),[i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{title:p.Ay.translate("UserMenu"),children:(0,r.jsx)(s.A,{size:"large","aria-label":p.Ay.translate("UserMenu"),"aria-controls":D,"aria-haspopup":"true",onClick:a,color:"inherit",sx:{padding:0},children:(0,r.jsx)(m.A,{user:e})})}),(0,r.jsx)(N,{open:o,anchorEl:n,onMenuClose:l})]})},U=function(){d.appRouter.back().catch((function(e){console.error("[AppToolbar] error calling appRouter.back",e)}))},V=function(e){var t=e.buttons,n=e.children,c=e.isDrawerAvailable,d=e.isDrawerOpen,m=e.onDrawerButtonClick,y=void 0===m?function(){}:m,v=e.isBackButtonAvailable,h=void 0!==v&&v,g=e.isUserMenuAvailable,b=void 0===g||g,S=(0,f.gf)().user,A=Boolean(S);return(0,r.jsxs)(l.A,{variant:"dense",sx:{flexWrap:{xs:"wrap",lg:"nowrap"},pl:{xs:"max(16px, env(safe-area-inset-left))",sm:"max(24px, env(safe-area-inset-left))"},pr:{xs:"max(16px, env(safe-area-inset-left))",sm:"max(24px, env(safe-area-inset-left))"}},children:[A&&c&&(0,r.jsx)(u.A,{title:p.Ay.translate(d?"MenuClose":"MenuOpen"),children:(0,r.jsx)(s.A,{size:"large",edge:"start",color:"inherit","aria-label":p.Ay.translate(d?"MenuClose":"MenuOpen"),onClick:y,children:(0,r.jsx)(o.A,{})})}),h&&(0,r.jsx)(u.A,{title:p.Ay.translate("ButtonBack"),children:(0,r.jsx)(s.A,{size:"large",edge:A&&c?void 0:"start",color:"inherit","aria-label":p.Ay.translate("ButtonBack"),onClick:U,children:(0,r.jsx)(i.A,{})})}),n,(0,r.jsx)(a.A,{sx:{display:"flex",flexGrow:1,justifyContent:"flex-end"},children:t}),A&&b&&(0,r.jsx)(a.A,{sx:{flexGrow:0},children:(0,r.jsx)(F,{})})]})}},89100:function(e,t,n){"use strict";n.r(t),n.d(t,{alert:function(){return N},capabilities:function(){return F},confirm:function(){return z},getConfigurationResourceUrl:function(){return L},getCurrentUser:function(){return k},getCurrentUserId:function(){return T},getPluginUrl:function(){return _},hideLoadingMsg:function(){return V},logout:function(){return E},navigate:function(){return M},onServerChanged:function(){return C},pageClassOn:function(){return q},pageIdOn:function(){return H},processErrorResponse:function(){return D},processPluginConfigurationUpdateResult:function(){return O},processServerConfigurationUpdateResult:function(){return R},selectServer:function(){return U},serverAddress:function(){return I},showLoadingMsg:function(){return B}}),n(29305),n(32733),n(84701),n(2623),n(14382),n(69703),n(44962),n(17731),n(86584),n(10849),n(70389),n(77575),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(64062),n(82367);var r=n(22622),i=n(64963),o=n(97339),a=n(67430),s=n(71866),l=n(8566),u=n(70267),c=n(41177),d=n(47602),f=n(5898),p=n(51876),m=n(98320),y=n(89166),v=n(21840),h=n(79754),g=n(92305),b=n(83375),S=n(31297);function A(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return x(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,m=o[2];n>3?(i=m===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(x(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,x(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,x(d,"constructor",u),x(u,"constructor",l),l.displayName="GeneratorFunction",x(u,i,"GeneratorFunction"),x(d),x(d,i,"Generator"),x(d,r,(function(){return this})),x(d,"toString",(function(){return"[object Generator]"})),(A=function(){return{w:o,m:f}})()}function x(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}x=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){x(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}},x(e,t,n,r)}function w(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){w(o,r,i,a,s,"next",e)}function s(e){w(o,r,i,a,s,"throw",e)}a(void 0)}))}}function k(){return window.ApiClient.getCurrentUser(!1)}function I(){return j.apply(this,arguments)}function j(){return j=P(A().m((function e(){var t,n,r,i,o;return A().w((function(e){for(;;)switch(e.n){case 0:if(!(t=window.ApiClient)){e.n=1;break}return e.a(2,Promise.resolve(t.serverAddress()));case 1:return e.n=2,p.Ve();case 2:if(0!==(n=e.v).length){e.n=4;break}if(i=window.location.href.toLowerCase().lastIndexOf("/web"),!(r=-1!=i?window.location.href.substring(0,i):window.location.origin).startsWith("file:")){e.n=3;break}return e.a(2,Promise.resolve());case 3:n.push(r);case 4:return console.debug("URL candidates:",n),o=n.map((function(e){return fetch("".concat(e,"/System/Info/Public"),{cache:"no-cache"}).then(function(){var t=P(A().m((function t(n){var r;return A().w((function(t){for(;;)switch(t.n){case 0:if(n.ok){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,n.json();case 2:r=t.v,t.n=4;break;case 3:return t.p=3,t.v,t.a(2);case 4:return t.a(2,{url:e,config:r})}}),t,null,[[1,3]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){console.error(e)}))})),e.a(2,Promise.all(o).then((function(e){return e.filter((function(e){return null==e?void 0:e.config}))})).then((function(e){var t=e.find((function(e){return!e.config.StartupWizardCompleted}))||e[0];return null==t?void 0:t.url})).catch((function(e){console.error(e)})))}}),e)}))),j.apply(this,arguments)}function T(){var e=window.ApiClient;return e?e.getCurrentUserId():null}function C(e,t,n){a.tF.setLocalApiClient(n)}function E(){a.tF.logout().then((function(){S.q.clear(),i.Ay.reset(),r.g.supports(o.Y.MultiServer)?M("selectserver"):M("login")}))}function _(e){return"configurationpage?name="+encodeURIComponent(e)}function L(e){return ApiClient.getUrl("web/ConfigurationPage",{name:e})}function M(e,t){if(!e)throw new Error("url cannot be null or empty");var n=(0,b.i)();return t&&n&&(e+=n),u.appRouter.show(e)}function O(){l.Ay.hide(),(0,s.A)(f.Ay.translate("SettingsSaved"))}function R(){l.Ay.hide(),(0,s.A)(f.Ay.translate("SettingsSaved"))}function D(e){l.Ay.hide();var t=""+e.status;e.statusText&&(t=e.statusText),(0,c.A)({title:t,text:e.headers?e.headers.get("X-Application-Error-Code"):null})}function N(e){"string"==typeof e?(0,s.A)({text:e}):(0,c.A)({title:e.title||f.Ay.translate("HeaderAlert"),text:e.message}).then(e.callback||function(){})}function F(e){return Object.assign({PlayableMediaTypes:["Audio","Video"],SupportedCommands:["MoveUp","MoveDown","MoveLeft","MoveRight","PageUp","PageDown","PreviousLetter","NextLetter","ToggleOsd","ToggleContextMenu","Select","Back","SendKey","SendString","GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","SetShuffleQueue","ChannelUp","ChannelDown","PlayMediaSource","PlayTrailers"],SupportsPersistentIdentifier:"cordova"===window.appMode||"android"===window.appMode,SupportsMediaControl:!0},e.getPushTokenInfo())}function U(){window.NativeShell&&"function"==typeof window.NativeShell.selectServer?window.NativeShell.selectServer():M("selectserver")}function V(){l.Ay.hide()}function B(){l.Ay.show()}function z(e,t,n){(0,d.A)(e,t).then((function(){n(!0)})).catch((function(){n(!1)}))}var q=function(e,t,n){document.addEventListener(e,(function(e){var r=e.target;r.classList.contains(t)&&n.call(r,e)}))},H=function(e,t,n){document.addEventListener(e,(function(e){var r=e.target;r.id===t&&n.call(r,e)}))},G={alert:N,capabilities:F,confirm:z,getPluginUrl:_,getConfigurationResourceUrl:L,getCurrentUser:k,getCurrentUserId:T,hideLoadingMsg:V,logout:E,navigate:M,onServerChanged:C,processErrorResponse:D,processPluginConfigurationUpdateResult:O,processServerConfigurationUpdateResult:R,selectServer:U,serverAddress:I,showLoadingMsg:B,datetime:m.Ay,DirectoryBrowser:v.default,dialogHelper:h.default,itemIdentifier:g.default,setBackdropTransparency:y.FB};window.Dashboard=G,t.default=G},89166:function(e,t,n){"use strict";n.d(t,{C9:function(){return T},FB:function(){return M},KH:function(){return L},PI:function(){return C},gJ:function(){return S}}),n(29305),n(32733),n(84701),n(81678),n(44962),n(86584),n(4754),n(94),n(77575),n(36947),n(78557),n(83994),n(23630),n(82367);var r=n(98526),i=n(67430),o=n(34789),a=n(39738),s=n(36300),l=n(82885);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}var f,p,m,y,v,h,g=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"load",value:function(e,t,n){var r=new Image,i=this;r.onload=function(){if(!i.isDestroyed){var r=document.createElement("div");if(r.classList.add("backdropImage"),r.classList.add("displayingBackdropImage"),r.style.backgroundImage="url('".concat(e,"')"),r.setAttribute("data-url",e),r.classList.add("backdropImageFadeIn"),t.appendChild(r),o.A.slow)return null!=n&&n.parentNode&&n.parentNode.removeChild(n),void w(!0);var a=function(){s.Ay.removeEventListener(r,s.Ay.whichAnimationEvent(),a,{once:!0}),r===i.currentAnimatingElement&&(i.currentAnimatingElement=null),null!=n&&n.parentNode&&n.parentNode.removeChild(n)};s.Ay.addEventListener(r,s.Ay.whichAnimationEvent(),a,{once:!0}),w(!0)}},r.src=e}},{key:"cancelAnimation",value:function(){var e=this.currentAnimatingElement;e&&(e.classList.remove("backdropImageFadeIn"),this.currentAnimatingElement=null)}},{key:"destroy",value:function(){this.isDestroyed=!0,this.cancelAnimation()}}])&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function b(){return f||(f=document.querySelector(".backdropContainer")),f||((f=document.createElement("div")).classList.add("backdropContainer"),document.body.insertBefore(f,document.body.firstChild)),f}function S(e){_(),v&&(v.destroy(),v=null),b().innerHTML="",e&&(y=!1),w(!1)}function A(){return p||(p=document.querySelector(".backgroundContainer")),p}function x(){m||y?A().classList.add("withBackdrop"):A().classList.remove("withBackdrop")}function w(e){m=e,x()}function P(e){y=e,x()}function k(e,t){var n;t=t||{};var r=i.tF.getApiClient(e.ServerId);return e.BackdropImageTags&&e.BackdropImageTags.length>0?e.BackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.BackdropItemId||e.Id,Object.assign(t,{type:"Backdrop",tag:n,maxWidth:s.Ay.getScreenWidth(),index:i}))})):e.ParentBackdropItemId&&null!==(n=e.ParentBackdropImageTags)&&void 0!==n&&n.length?e.ParentBackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.ParentBackdropItemId,Object.assign(t,{type:"Backdrop",tag:n,maxWidth:s.Ay.getScreenWidth(),index:i}))})):[]}var I=[],j=-1;function T(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||l.enableBackdrops()){var n=function(e,t){for(var n=[],r=function(e){n.push(e)},i=0,o=e.length;i<o;i++)k(e[i],t).forEach(r);return n}(e,t);n.length?C(n):S()}}function C(e){(0,r.A)(e,I)||(_(),I=e,j=-1,e.length>1&&!o.A.tv&&(h=setInterval(E,1e4)),E())}function E(){if(!a.f.isPlayingLocally(["Video"])){var e=j+1;e>=I.length&&(e=0),j=e,function(e){v&&(v.destroy(),v=null);var t=b(),n=t.querySelector(".displayingBackdropImage");if(n&&n.getAttribute("data-url")===e){if(n.getAttribute("data-url")===e)return;n.classList.remove("displayingBackdropImage")}var r=new g;r.load(e,t,n),v=r}(I[e])}}function _(){h&&clearInterval(h),h=null,I=[],j=-1}var L={Full:"full",Backdrop:"backdrop",None:"none"};function M(e){var t=b(),n=A();e===L.Full||2===e?(S(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):e===L.Backdrop||1===e?(P(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):(P(!1),document.documentElement.classList.remove("transparentDocument"),n.classList.remove("backgroundContainer-transparent"),t.classList.remove("hide"))}},89599:function(e,t,n){var r={"./finish":[38077,85126],"./finish/":[38077,85126],"./finish/index":[38077,85126],"./finish/index.html":[26059,34997],"./finish/index.js":[38077,85126],"./library":[16118,77920],"./library.html":[55132,73662],"./library.js":[16118,77920],"./remote":[33432,96697],"./remote/":[33432,96697],"./remote/index":[33432,96697],"./remote/index.html":[76246,95732],"./remote/index.js":[33432,96697],"./settings":[39728,45642,23247,60815,81771,16304,26472],"./settings/":[39728,45642,23247,60815,81771,16304,26472],"./settings/index":[39728,45642,23247,60815,81771,16304,26472],"./settings/index.html":[69513,91751],"./settings/index.js":[39728,73405],"./start":[85518,92445],"./start/":[85518,92445],"./start/index":[85518,92445],"./start/index.html":[12364,18416],"./start/index.js":[85518,92445],"./user":[94053,96806],"./user/":[94053,96806],"./user/index":[94053,96806],"./user/index.html":[46307,80501],"./user/index.js":[94053,96806]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=89599,e.exports=i},90381:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(96054),n(73687),n(83994),n(90580),n(82367);var r=n(34789),i=n(44797),o=n(44305);function a(e){return a="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},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function u(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var c=new WeakSet,d=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,c)},(t=[{key:"enableAutoLogin",value:function(e){return void 0!==e&&this.set("enableAutoLogin",e.toString()),(0,o.G4)(this.get("enableAutoLogin"),!0)}},{key:"enableGamepad",value:function(e){return void 0!==e?this.set("enableGamepad",e.toString()):(0,o.G4)(this.get("enableGamepad"),!1)}},{key:"enableSmoothScroll",value:function(e){return void 0!==e?this.set("enableSmoothScroll",e.toString()):(0,o.G4)(this.get("enableSmoothScroll"),!!r.A.tizen)}},{key:"enableSystemExternalPlayers",value:function(e){return void 0!==e&&this.set("enableSystemExternalPlayers",e.toString()),(0,o.G4)(this.get("enableSystemExternalPlayers"),!1)}},{key:"enableAutomaticBitrateDetection",value:function(e,t,n){var r="enableautobitratebitrate-"+t+"-"+e;return void 0!==n&&(e&&"Audio"===t&&(n=!0),this.set(r,n.toString())),!(!e||"Audio"!==t)||(0,o.G4)(this.get(r),!0)}},{key:"maxStreamingBitrate",value:function(e,t,n){var r="maxbitrate-"+t+"-"+e;return void 0!==n&&(e&&"Audio"===t||this.set(r,n)),e&&"Audio"===t?15e7:parseInt(this.get(r)||"0",10)||15e5}},{key:"maxStaticMusicBitrate",value:function(e){void 0!==e&&this.set("maxStaticMusicBitrate",e);var t=32e4;return parseInt(this.get("maxStaticMusicBitrate")||t.toString(),10)||t}},{key:"maxChromecastBitrate",value:function(e){return void 0!==e&&this.set("chromecastBitrate1",e),(e=this.get("chromecastBitrate1"))?parseInt(e,10):null}},{key:"maxVideoWidth",value:function(e){return void 0!==e?this.set("maxVideoWidth",e.toString()):parseInt(this.get("maxVideoWidth")||"0",10)||0}},{key:"limitSupportedVideoResolution",value:function(e){return void 0!==e?this.set("limitSupportedVideoResolution",e.toString()):(0,o.G4)(this.get("limitSupportedVideoResolution"),!1)}},{key:"preferredTranscodeVideoCodec",value:function(e){return void 0!==e?this.set("preferredTranscodeVideoCodec",e):this.get("preferredTranscodeVideoCodec")||""}},{key:"preferredTranscodeVideoAudioCodec",value:function(e){return void 0!==e?this.set("preferredTranscodeVideoAudioCodec",e):this.get("preferredTranscodeVideoAudioCodec")||""}},{key:"alwaysBurnInSubtitleWhenTranscoding",value:function(e){return void 0!==e?this.set("alwaysBurnInSubtitleWhenTranscoding",e.toString()):(0,o.G4)(this.get("alwaysBurnInSubtitleWhenTranscoding"),!1)}},{key:"enableDts",value:function(e){return void 0!==e?this.set("enableDts",e.toString()):(0,o.G4)(this.get("enableDts"),!1)}},{key:"enableTrueHd",value:function(e){return void 0!==e?this.set("enableTrueHd",e.toString()):(0,o.G4)(this.get("enableTrueHd"),!1)}},{key:"enableHi10p",value:function(e){return void 0!==e?this.set("enableHi10p",e.toString()):(0,o.G4)(this.get("enableHi10p"),!1)}},{key:"disableVbrAudio",value:function(e){return void 0!==e?this.set("disableVbrAudio",e.toString()):(0,o.G4)(this.get("disableVbrAudio"),!1)}},{key:"alwaysRemuxFlac",value:function(e){return void 0!==e?this.set("alwaysRemuxFlac",e.toString()):(0,o.G4)(this.get("alwaysRemuxFlac"),!1)}},{key:"alwaysRemuxMp3",value:function(e){return void 0!==e?this.set("alwaysRemuxMp3",e.toString()):(0,o.G4)(this.get("alwaysRemuxMp3"),!1)}},{key:"aspectRatio",value:function(e){return void 0!==e?this.set("aspectRatio",e):this.get("aspectRatio")||""}},{key:"set",value:function(e,t,n){var r=this.get(e,n);localStorage.setItem(u(c,this,f).call(this,e,n),t),r!==t&&i.A.trigger(this,"change",[e])}},{key:"get",value:function(e,t){return localStorage.getItem(u(c,this,f).call(this,e,t))}}])&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function f(e,t){return t&&(e=t+"-"+e),e}t.A=new d},92305:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E},show:function(){return T},showFindNew:function(){return C}}),n(24776),n(78557),n(96054),n(90076);var r,i,o,a,s,l,u=n(22696),c=n.n(u),d=n(79754),f=n(8566),p=n(5898),m=n(67430),y=n(10838),v=n(46782),h=n(9164),g=n(34789),b=(n(98959),n(77157),n(15453),n(71866)),S='<div class="formDialogHeader"> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}"> <span class="material-icons arrow_back" aria-hidden="true"></span> </button> <h3 class="formDialogHeaderTitle">${Identify}</h3> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered"> <form class="popupIdentifyForm" style="margin:auto"> <p>${HeaderIdentifyItemHelp}</p> <div class="padded-bottom fldPath hide"> <div>${LabelPath}</div> <div class="txtPath fieldDescription"></div> </div> <div class="inputContainer"> <input is="emby-input" type="text" id="txtLookupName" class="identifyField" data-lookup="Name" label="${LabelName}"/> </div> <div class="fldLookupYear inputContainer"> <input is="emby-input" type="number" id="txtLookupYear" class="identifyField" data-lookup="Year" pattern="[0-9]*" min="1800" label="${LabelYear}"/> </div> <div class="identifyProviderIds"></div> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem"> <span>${Search}</span> </button> </div> </form> <div class="identificationSearchResults hide"> <h1>${SearchResults}</h1> <div class="identificationSearchResultList itemsContainer vertical-wrap"></div> </div> <form class="identifyOptionsForm hide" style="margin:auto"> <br/> <div class="selectedSearchResult"></div> <br/> <label class="checkboxContainer"> <input type="checkbox" is="emby-checkbox" id="chkIdentifyReplaceImages"/> <span>${ReplaceExistingImages}</span> </label> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised button-submit block btnSubmit formDialogFooterItem"> <span>${ButtonOk}</span> </button> </div> </form> </div> </div> ',A=n(98320),x=!g.A.slow&&!g.A.edge,w=!1;function P(){return m.tF.getApiClient(o)}function k(e){var t,n,o,a,s={ProviderIds:{}},u=e.querySelectorAll(".identifyField");for(n=0,o=u.length;n<o;n++)(a=u[n].value)&&("number"===u[n].type&&(a=parseInt(a,10)),s[u[n].getAttribute("data-lookup")]=a);var m=!1,y=e.querySelectorAll(".txtLookupId");for(n=0,o=y.length;n<o;n++)(a=y[n].value)&&(m=!0),s.ProviderIds[y[n].getAttribute("data-providerkey")]=a;if(m||s.Name){s={SearchInfo:s},null!==(t=r)&&void 0!==t&&t.Id?s.ItemId=r.Id:s.IncludeDisabledProviders=!0,f.Ay.show();var g=P();g.ajax({type:"POST",url:g.getUrl("Items/RemoteSearch/".concat(i)),data:JSON.stringify(s),contentType:"application/json",dataType:"json"}).then((function(t){f.Ay.hide(),function(e,t){var n=e.querySelector(".identificationSearchResults");e.querySelector(".popupIdentifyForm").classList.add("hide"),n.classList.remove("hide"),e.querySelector(".identifyOptionsForm").classList.add("hide"),e.querySelector(".dialogContentInner").classList.remove("dialog-content-centered");var i,o,a="";for(i=0,o=t.length;i<o;i++)a+=I(t[i],i);var s=e.querySelector(".identificationSearchResultList");function u(){var n,i=parseInt(this.getAttribute("data-index"),10),o=t[i];null!=r?function(e,t){var n=e.querySelector(".identifyOptionsForm");e.querySelector(".popupIdentifyForm").classList.add("hide"),e.querySelector(".identificationSearchResults").classList.add("hide"),n.classList.remove("hide"),e.querySelector("#chkIdentifyReplaceImages").checked=!0,e.querySelector(".dialogContentInner").classList.add("dialog-content-centered"),l=t;var r=[];r.push(c()(t.Name)),t.ProductionYear&&r.push(A.Ay.toLocaleString(t.ProductionYear,{useGrouping:!1}));var i=r.join("<br/>");t.ImageUrl&&(i='<div style="display:flex;align-items:center;"><img src="'.concat(t.ImageUrl,'" style="max-height:240px;" /><div style="margin-left:1em;">').concat(i,"</div>")),e.querySelector(".selectedSearchResult").innerHTML=i,h.A.focus(n.querySelector(".btnSubmit"))}(e,o):(n=e,l=o,w=!0,f.Ay.hide(),d.default.close(n))}s.innerHTML=a;var p=s.querySelectorAll(".card");for(i=0,o=p.length;i<o;i++)p[i].addEventListener("click",u);v.A.tv&&h.A.autoFocus(n)}(e,t)}))}else(0,b.A)(p.Ay.translate("PleaseEnterNameOrId"))}function I(e,t){var n,r="",o="card scalableCard";"Episode"===i?(o+=" backdropCard backdropCard-scalable",n="cardPadder-backdrop"):"MusicAlbum"===i||"MusicArtist"===i?(o+=" squareCard squareCard-scalable",n="cardPadder-square"):(o+=" portraitCard portraitCard-scalable",n="cardPadder-portrait"),v.A.tv&&(o+=" show-focus",x&&(o+=" show-animation")),r+='<button type="button" class="'.concat(o,'" data-index="').concat(t,'">'),r+='<div class="'.concat("cardBox cardBox-bottompadded",'">'),r+='<div class="cardScalable">',r+='<div class="'.concat(n,'"></div>'),r+='<div class="cardContent searchImage">',e.ImageUrl?r+='<div class="cardImageContainer coveredImage" style="background-image:url(\''.concat(e.ImageUrl,"');\"></div>"):r+='<div class="cardImageContainer coveredImage defaultCardBackground defaultCardBackground1"><div class="cardText cardCenteredText">'.concat(c()(e.Name),"</div></div>"),r+="</div>",r+="</div>";var a=3;"MusicAlbum"===i&&a++;var s=[e.Name];s.push(e.SearchProviderName),e.AlbumArtist&&s.push(e.AlbumArtist.Name),e.ProductionYear&&s.push(e.ProductionYear);for(var l=0;l<a;l++)r+=0===l?'<div class="cardText cardText-first cardTextCentered">':'<div class="cardText cardText-secondary cardTextCentered">',r+=c()(s[l]||"")||" ",r+="</div>";return(r+="</div>")+"</button>"}function j(){f.Ay.hide(),w?a():s()}function T(e,t){return new Promise((function(n,u){a=n,s=u,o=t,w=!1,function(e){f.Ay.show();var t=P();t.getItem(t.getCurrentUserId(),e).then((function(e){i=(r=e).Type;var t={size:"small",removeOnClose:!0,scrollY:!1};v.A.tv&&(t.size="fullscreen");var n=d.default.createDialog(t);n.classList.add("formDialog"),n.classList.add("recordingDialog");var o="";o+=p.Ay.translateHtml(S,"core"),n.innerHTML=o,n.addEventListener("close",j),v.A.tv&&y.default.centerFocus.on(n.querySelector(".formDialogContent"),!1),e.Path?n.querySelector(".fldPath").classList.remove("hide"):n.querySelector(".fldPath").classList.add("hide"),n.querySelector(".txtPath").innerText=e.Path||"",d.default.open(n),n.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(n),!1})),n.querySelector(".identifyOptionsForm").addEventListener("submit",(function(e){return e.preventDefault(),function(e){f.Ay.show();var t={ReplaceAllImages:e.querySelector("#chkIdentifyReplaceImages").checked},n=P();n.ajax({type:"POST",url:n.getUrl("Items/RemoteSearch/Apply/".concat(r.Id),t),data:JSON.stringify(l),contentType:"application/json"}).then((function(){w=!0,f.Ay.hide(),d.default.close(e)}),(function(){f.Ay.hide(),d.default.close(e)}))}(n),!1})),n.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(n)})),n.classList.add("identifyDialog"),function(e,t){var n=P();n.getJSON(n.getUrl("Items/".concat(t.Id,"/ExternalIdInfos"))).then((function(n){for(var r="",i=0,o=n.length;i<o;i++){var a=n[i],s="txtLookup".concat(a.Key);r+='<div class="inputContainer">';var l=a.Name;a.Type&&(l="".concat(a.Name," ").concat(p.Ay.translate(a.Type)));var u=p.Ay.translate("LabelDynamicExternalId",c()(l));r+='<input is="emby-input" class="txtLookupId" data-providerkey="'.concat(a.Key,'" id="').concat(s,'" label="').concat(u,'"/>'),r+="</div>"}e.querySelector("#txtLookupName").value="","Person"===t.Type||"BoxSet"===t.Type?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=""),e.querySelector(".identifyProviderIds").innerHTML=r,e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Identify")}))}(n,e),f.Ay.hide()}))}(e)}))}function C(e,t,n,a){return new Promise((function(s){o=a,w=!1,function(e,t,n,o){r=null,i=n;var a={size:"small",removeOnClose:!0,scrollY:!1};v.A.tv&&(a.size="fullscreen");var s=d.default.createDialog(a);s.classList.add("formDialog"),s.classList.add("recordingDialog");var u="";u+=p.Ay.translateHtml(S,"core"),s.innerHTML=u,v.A.tv&&y.default.centerFocus.on(s.querySelector(".formDialogContent"),!1),d.default.open(s),s.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(s)})),s.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(s),!1})),s.addEventListener("close",(function(){f.Ay.hide(),o(w?l:null)})),s.classList.add("identifyDialog"),function(e,t,n,r){e.querySelector("#txtLookupName").value=t,"Person"===r||"BoxSet"===r?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=n),e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Search")}(s,e,t,n)}(e,t,n,s)}))}var E={show:T,showFindNew:C}},92950:function(e,t,n){var r={"./asyncRoutes":[34945],"./asyncRoutes/":[34945],"./asyncRoutes/index":[34945],"./asyncRoutes/index.ts":[34945],"./asyncRoutes/public":[95260],"./asyncRoutes/public.ts":[95260],"./asyncRoutes/user":[12446],"./asyncRoutes/user.ts":[12446],"./legacyRoutes":[98372],"./legacyRoutes/":[98372],"./legacyRoutes/index":[98372],"./legacyRoutes/index.ts":[98372],"./legacyRoutes/public":[7451],"./legacyRoutes/public.ts":[7451],"./legacyRoutes/user":[70373],"./legacyRoutes/user.ts":[70373],"./quickConnect":[42118,5190],"./quickConnect/":[42118,5190],"./quickConnect/index":[42118,5190],"./quickConnect/index.tsx":[42118,5190],"./quickConnect/quickConnect.scss":[97070,22587],"./routes":[85660],"./routes.tsx":[85660],"./search":[39656,45642,29808,1161,12011,24468,4113,80187],"./search.tsx":[39656,45642,29808,1161,12011,24468,4113,80187],"./session/forgotPassword":[48754,45642,9886,23488],"./session/forgotPassword/":[48754,45642,9886,23488],"./session/forgotPassword/index":[48754,45642,9886,23488],"./session/forgotPassword/index.tsx":[48754,45642,9886,23488],"./user/settings":[48962,40544],"./user/settings/":[48962,40544],"./user/settings/index":[48962,40544],"./user/settings/index.tsx":[48962,40544],"./user/userprofile":[66718,16325],"./user/userprofile.tsx":[66718,16325]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=92950,e.exports=i},93599:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(83994),n(82367);var r=n(36300),i=n(90381),o=n(46782);function a(e){return a="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},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var u=1e-6,c="scrollBehavior"in document.documentElement.style,d=!1;try{var f=document.createElement("div"),p=Object.defineProperty({},"behavior",{get:function(){return d=!0,null}});f.scrollTo(p)}catch(e){}function m(e,t,n){return e<=t?t:e>=n?n:e}var y,v=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"scrollLeft",get:function(){return window.pageXOffset},set:function(e){window.scroll(e,window.pageYOffset)}},{key:"scrollTop",get:function(){return window.pageYOffset},set:function(e){window.scroll(window.pageXOffset,e)}},{key:"scrollWidth",get:function(){return Math.max(document.documentElement.scrollWidth,document.body.scrollWidth)}},{key:"scrollHeight",get:function(){return Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)}},{key:"clientWidth",get:function(){return Math.min(document.documentElement.clientWidth,document.body.clientWidth)}},{key:"clientHeight",get:function(){return Math.min(document.documentElement.clientHeight,document.body.clientHeight)}},{key:"getAttribute",value:function(e){return document.body.getAttribute(e)}},{key:"getBoundingClientRect",value:function(){return{left:0,top:0,width:this.clientWidth,height:this.clientHeight}}},{key:"scrollTo",value:function(){window.scrollTo.apply(window,arguments)}}],t&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),h=new v,g={x:{nameScroll:"scrollWidth",nameClient:"clientWidth",nameStyle:"overflowX",nameScrollMode:"data-scroll-mode-x"},y:{nameScroll:"scrollHeight",nameClient:"clientHeight",nameStyle:"overflowY",nameScrollMode:"data-scroll-mode-y"}};function b(e,t){if(e)for(var n=t?g.y:g.x,r=e.parentElement;r&&r!==document.body;){if("custom"===r.getAttribute(n.nameScrollMode))return r;var i=window.getComputedStyle(r);if("fixed"===i.position)return r;var o=i[n.nameStyle];if("scroll"===o||"auto"===o&&r[n.nameScroll]>r[n.nameClient])return r;r=r.parentElement}return h}function S(e,t){var n={};return t?(n.scrollPos=e.scrollTop,n.scrollSize=e.scrollHeight,n.clientSize=e.clientHeight,n.mode=e.getAttribute(g.y.nameScrollMode)):(n.scrollPos=e.scrollLeft,n.scrollSize=e.scrollWidth,n.clientSize=e.clientWidth,n.mode=e.getAttribute(g.x.nameScrollMode)),n.custom="custom"===n.mode,n}function A(e,t,n){var r=t.getBoundingClientRect(),i=e.getBoundingClientRect();return n?e.scrollTop+r.top-i.top:e.scrollLeft+r.left-i.left}function x(e,t,n,r){var i,o,a,s,l,u,c=e.scrollSize-e.clientSize;if(r)i=t+(n-e.clientSize)/2;else{var d=(o=t,a=t+n-1,s=e.scrollPos,u=e.scrollPos+e.clientSize-1-a,(l=o-s)<0&&l<u?-l:u<0?u:0);i=e.scrollPos-d}return m(Math.round(i),0,c)}function w(e,t){if("scrollTo"in e)if(d)e.scrollTo(t);else{var n=void 0!==t.left?t.left:e.scrollLeft,r=void 0!==t.top?t.top:e.scrollTop;e.scrollTo(n,r)}else"scrollLeft"in e&&(void 0!==t.left&&(e.scrollLeft=t.left),void 0!==t.top&&(e.scrollTop=t.top))}function P(e,t,n,r,i){var o=i?"smooth":"instant";e!==n?(e&&w(e,{left:t,behavior:o}),n&&w(n,{top:r,behavior:o})):e&&w(e,{left:t,top:r,behavior:o})}function k(){cancelAnimationFrame(y),y=void 0}function I(e,t,n,r,i){k(),i&&!c?function(e,t,n,r){var i,o=e?e.scrollLeft:t,a=n?n.scrollTop:r,s=t-o,l=r-a;Math.abs(s)<u&&Math.abs(l)<u||(y=requestAnimationFrame((function u(c){i=i||c;var d,f=Math.min(1,(c-i)/270);if(1===f)return k(),void P(e,t,n,r,!1);P(e,o+s*(f=(d=f)*(2-d)),n,a+l*f,!1),y=requestAnimationFrame(u)})))}(e,t,n,r):P(e,t,n,r,i)}function j(){return o.A.tv}function T(e,t){t=!!t;var n=!0,r=!0,i=e.offsetParent,o=i&&(!i.offsetParent||"fixed"===window.getComputedStyle(i).position);o&&(n=r=!1);var a=b(e,!1),s=b(e,!0),l=S(a,!1),u=S(s,!0);if(!(a===s&&(l.custom||u.custom)||l.custom&&u.custom)){var c,d=e.getBoundingClientRect(),f=0,p=0;l.custom?a=null:f=x(l,A(a,e,!1),d.width,n),u.custom?s=null:(p=x(u,A(s,e,!0),d.height,r),o&&d.bottom<0&&(p=0),p<((c=document.querySelector(".headerTop"))?c.clientHeight:0)&&s===h&&(p=0)),I(a,f,s,p,t)}}j()&&r.Ay.addEventListener(window,"focusin",(function(e){setTimeout((function(){T(e.target,i.A.enableSmoothScroll())}),0)}),{capture:!0}),t.Ay={isEnabled:j,scrollTo:function(e,t,n){n=!!n;var r=b(null,!1),i=S(r,!1),o=S(r,!0);I(r,e=m(Math.round(e),0,i.scrollSize-i.clientSize),r,t=m(Math.round(t),0,o.scrollSize-o.clientSize),n)},scrollToElement:T}},93721:function(e,t,n){"use strict";n.d(t,{Fq:function(){return c},JK:function(){return p},OE:function(){return m},QC:function(){return d},cu:function(){return f}});var r=n(62864),i=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},a={af:"af",ar:"ar-DZ","be-by":"be","bg-bg":"bg",bn:"bn",ca:"ca",cs:"cs",cy:"cy",da:"da",de:"de",el:"el","en-gb":"en-GB","en-us":"en-US",eo:"eo",es:"es","es-ar":"es","es-do":"es","es-mx":"es",et:"et",eu:"eu",fa:"fa-IR",fi:"fi",fr:"fr","fr-ca":"fr-CA",gl:"gl",gsw:"de",he:"he","hi-in":"hi",hr:"hr",hu:"hu",id:"id",is:"is",it:"it",ja:"ja",kk:"kk",ko:"ko","lt-lt":"lt",lv:"lv",ms:"ms",nb:"nb",nl:"nl",nn:"nn",pl:"pl",pt:"pt","pt-br":"pt-BR","pt-pt":"pt",ro:"ro",ru:"ru",sk:"sk","sl-si":"sl",sv:"sv",ta:"ta",th:"th",tr:"tr",uk:"uk",vi:"vi","zh-cn":"zh-CN","zh-hk":"zh-HK","zh-tw":"zh-TW"},s="en-US",l=s,u=r.A;function c(e){return n(27570)("./".concat(e,"/index.js"))}function d(e){return a[e]||a[e.replace(/-.*/,"")]||s}function f(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return console.debug("[dateFnsLocale] updating date-fns locale",e),l=d(e),console.debug("[dateFnsLocale] mapped to date-fns locale",l),[4,c(l)];case 1:return u=t.sent(),[2]}}))}))}function p(){return u}function m(){return{addSuffix:!0,locale:u}}},94738:function(e,t,n){"use strict";var r;n.d(t,{M:function(){return r}}),function(e){e.None="None",e.AskToSkip="AskToSkip",e.Skip="Skip"}(r||(r={}))},95260:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_PUBLIC_ROUTES:function(){return r}});var r=[{path:"forgotpassword",page:"session/forgotPassword"}]},95700:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||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.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){var t=e.headers||{};"json"===e.dataType&&(t.accept="application/json");var n={headers:t,method:e.type,credentials:"same-origin"},r=e.contentType;e.data&&("string"==typeof e.data?n.body=e.data:(n.body=a(e.data),r=r||"application/x-www-form-urlencoded; charset=UTF-8")),r&&(t["Content-Type"]=r);var i=e.url;if(e.query){var o=a(e.query);o&&(i+="?".concat(o))}return e.timeout?function(e,t,n){return console.debug("fetchWithTimeout: timeoutMs: ".concat(n,", url: ").concat(e)),new Promise((function(r,i){var o=setTimeout(i,n);(t=t||{}).credentials="same-origin",fetch(e,t).then((function(t){clearTimeout(o),console.debug("fetchWithTimeout: succeeded connecting to url: ".concat(e)),r(t)}),(function(t){clearTimeout(o),console.debug("fetchWithTimeout: timed out connecting to url: ".concat(e)),i(t)}))}))}(i,n,e.timeout):fetch(i,n)}function a(e){return Object.entries(e).filter((function(e){var t=r(e,2)[1];return null!=t&&""!==t})).map((function(e){var t=r(e,2),n=t[0],i=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i))})).join("&")}function s(e){if(!e)throw new Error("Request cannot be null");return e.headers=e.headers||{},console.debug("requesting url: ".concat(e.url)),o(e).then((function(t){return console.debug("response status: ".concat(t.status,", url: ").concat(e.url)),t.status<400?"json"===e.dataType||"application/json"===e.headers.accept?t.json():"text"===e.dataType||(t.headers.get("Content-Type")||"").toLowerCase().startsWith("text/")?t.text():t:Promise.reject(t)}),(function(t){throw console.error("request failed to url: ".concat(e.url)),t}))}n.r(t),n.d(t,{ajax:function(){return s},getFetchPromise:function(){return o}}),n(29305),n(32733),n(84701),n(24776),n(14382),n(69892),n(44962),n(86584),n(89336),n(57132),n(78557),n(90076),n(95021),n(73687),n(83994),n(64062),n(82367)},97067:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(64680),i=n(58953),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},a=function(e,t,n,a){var s,l,u;if(void 0===n&&(n={}),void 0===a&&(a=!1),t.Id&&(null===(s=t.BackdropImageTags)||void 0===s?void 0:s.length)){var c=a?(0,i.HO)(0,t.BackdropImageTags.length-1):0;return e.getScaledImageUrl(t.Id,o({type:r.y.Backdrop,index:c,tag:t.BackdropImageTags[c]},n))}return t.ParentBackdropItemId&&(null===(l=t.ParentBackdropImageTags)||void 0===l?void 0:l.length)?(c=a?(0,i.HO)(0,t.ParentBackdropImageTags.length-1):0,e.getScaledImageUrl(t.ParentBackdropItemId,o({type:r.y.Backdrop,index:c,tag:t.ParentBackdropImageTags[c]},n))):t.Id&&(null===(u=t.ImageTags)||void 0===u?void 0:u.Primary)?e.getScaledImageUrl(t.Id,o({type:r.y.Primary,tag:t.ImageTags.Primary},n)):void 0}},97339:function(e,t,n){"use strict";var r;n.d(t,{Y:function(){return r}}),function(e){e.CastMenuHashChange="castmenuhashchange",e.Chromecast="chromecast",e.ClientSettings="clientsettings",e.DisplayLanguage="displaylanguage",e.DisplayMode="displaymode",e.DownloadManagement="downloadmanagement",e.Exit="exit",e.ExitMenu="exitmenu",e.ExternalLinks="externallinks",e.ExternalPlayerIntent="externalplayerintent",e.FileDownload="filedownload",e.FileInput="fileinput",e.Fullscreen="fullscreenchange",e.HtmlAudioAutoplay="htmlaudioautoplay",e.HtmlVideoAutoplay="htmlvideoautoplay",e.MultiServer="multiserver",e.NativeBluRayPlayback="nativeblurayplayback",e.NativeDvdPlayback="nativedvdplayback",e.NativeIsoPlayback="nativeisoplayback",e.PhysicalVolumeControl="physicalvolumecontrol",e.RemoteAudio="remoteaudio",e.RemoteControl="remotecontrol",e.RemoteVideo="remotevideo",e.Screensaver="screensaver",e.Sharing="sharing",e.SubtitleAppearance="subtitleappearancesettings",e.SubtitleBurnIn="subtitleburnsettings",e.TargetBlank="targetblank"}(r||(r={}))},98320:function(e,t,n){"use strict";n.d(t,{YU:function(){return l}}),n(84734),n(67593),n(96054),n(95021),n(53819);var r=n(5898);function i(e,t){var n=e.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d+)?(Z|([+-])(\d{2}):(\d{2}))?/);if(!n)throw new Error("Couldn't parse ISO 8601 date string '"+e+"'");var r=[1,2,3,4,5,6,10,11];for(var i in r)n[r[i]]=parseInt(n[r[i]],10);n[7]=parseFloat(n[7]);var o=Date.UTC(n[1],n[2]-1,n[3],n[4],n[5],n[6]);if(n[7]>0&&(o+=Math.round(1e3*n[7])),"Z"!==n[8]&&n[10]){var a=60*n[10]*60*1e3;n[11]&&(a+=60*n[11]*1e3),"-"===n[9]?o-=a:o+=a}else!1===t&&(o+=6e4*new Date(o).getTimezoneOffset());return new Date(o)}var o=function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}return!1}();function a(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleString(n,t)}return e.toLocaleString()}function s(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleTimeString(n,t)}return e.toLocaleTimeString()}function l(e){if(!e)throw new Error("date cannot be null");if("string"==typeof e)try{e=i(e,!0)}catch(t){return e}return a(e)}t.Ay={parseISO8601Date:i,getDisplayRunningTime:function(e){var t=36e9,n=6e8,i=[],o=e/t;(o=Math.floor(o))&&i.push(o.toLocaleString(r.Ay.getCurrentDateTimeLocale()));var a=(e-=o*t)/n;e-=(a=Math.floor(a))*n,a=a<10&&o?(0).toLocaleString(r.Ay.getCurrentDateTimeLocale())+a.toLocaleString(r.Ay.getCurrentDateTimeLocale()):a.toLocaleString(r.Ay.getCurrentDateTimeLocale()),i.push(a);var s=e/1e7;return s=(s=Math.floor(s))<10?(0).toLocaleString(r.Ay.getCurrentDateTimeLocale())+s.toLocaleString(r.Ay.getCurrentDateTimeLocale()):s.toLocaleString(r.Ay.getCurrentDateTimeLocale()),i.push(s),i.join(":")},getDisplayDuration:function(e){var t=Math.round(e/6e8)||1,n=Math.floor(t/60),r=t%60,i=[];return n>0&&i.push("".concat(n,"h")),i.push("".concat(r,"m")),i.join(" ")},toLocaleDateString:function(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleDateString(n,t)}var i=function(e){var t=[];for(var n in e)t.push({name:n,value:e[n]});return t}(t);if(1===i.length&&"weekday"===i[0].name){var a=[];return a[0]="Sun",a[1]="Mon",a[2]="Tue",a[3]="Wed",a[4]="Thu",a[5]="Fri",a[6]="Sat",a[e.getDay()]}return e.toLocaleDateString()},toLocaleString:a,getDisplayTime:function(e){if(!e)throw new Error("date cannot be null");if("string"==typeof e)try{e=i(e,!0)}catch(t){return e}if(o)return s(e,{hour:"numeric",minute:"2-digit"});var t=s(e),n=t.toLowerCase();if(-1!==n.indexOf("am")||-1!==n.indexOf("pm")){var r=e.getHours()%12,a=e.getHours()>11?"pm":"am";r||(r=12);var l=e.getMinutes();l<10&&(l="0"+l),t=r+(l=":"+l)+a}else{var u=t.split(":");u.length>2&&(u.length=2,t=u.join(":"))}return t},isRelativeDay:function(e,t){if(!e)throw new Error("date cannot be null");var n=new Date,r=n.getDate()+t;return n.setDate(r),e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===r},toLocaleTimeString:s,supportsLocalization:function(){return o}}},98372:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r.LEGACY_PUBLIC_ROUTES},LEGACY_USER_ROUTES:function(){return i.LEGACY_USER_ROUTES}});var r=n(7451),i=n(70373)},98959:function(e,t,n){"use strict";n(36947),n(36457);var r=n(34789),i=n(36300),o=(n(69177),Object.create(HTMLInputElement.prototype)),a=0,s=!1;if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");if(null!=l&&l.configurable){var u=l.set;l.set=function(e){u.call(this,e),this.dispatchEvent(new CustomEvent("valueset",{bubbles:!1,cancelable:!1}))},Object.defineProperty(HTMLInputElement.prototype,"value",l),s=!0}}function c(){var e=this.labelElement;this.value?e.classList.remove("inputLabel-float"):s&&"date"!==this.type&&"time"!==this.type&&e.classList.add("inputLabel-float")}o.createdCallback=function(){if(this.id||(this.id="embyinput"+a,a++),!this.classList.contains("emby-input")){this.classList.add("emby-input");var e=this.parentNode,t=this.ownerDocument,n=t.createElement("label");n.innerText=this.getAttribute("label")||"",n.classList.add("inputLabel"),n.classList.add("inputLabelUnfocused"),n.htmlFor=this.id,e.insertBefore(n,this),this.labelElement=n,i.Ay.addEventListener(this,"focus",(function(){c.call(this),t.attachIME&&t.attachIME(this),n.classList.add("inputLabelFocused"),n.classList.remove("inputLabelUnfocused")}),{passive:!0}),i.Ay.addEventListener(this,"blur",(function(){c.call(this),n.classList.remove("inputLabelFocused"),n.classList.add("inputLabelUnfocused")}),{passive:!0}),i.Ay.addEventListener(this,"change",c,{passive:!0}),i.Ay.addEventListener(this,"input",c,{passive:!0}),i.Ay.addEventListener(this,"valueset",c,{passive:!0}),r.A.orsay&&this===t.activeElement&&t.attachIME&&t.attachIME(this)}},o.attachedCallback=function(){this.labelElement.htmlFor=this.id,c.call(this)},o.label=function(e){this.labelElement.innerText=e},document.registerElement("emby-input",{prototype:o,extends:"input"})}},function(e){e.O(0,[45642,23247,60815,81771,16304,9886,1270,55931,22940,59928,33067,44965,56401,7495,17060,67224,67622,94048,36933,82363,36546,85500,7011,80183,5267,46967],(function(){return e(e.s=24639)})),e.O()}]);
|