@mibmo/jellyfin-tizen 10.11.0 → 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.
Files changed (56) hide show
  1. package/LICENSE +373 -0
  2. package/package.json +1 -1
  3. package/tizen-adapter.js +1 -1
  4. package/www/24468.cc4786b370fe6972ab57.chunk.js +1 -0
  5. package/www/32721.1565fbee2f79c634a171.chunk.js +2 -0
  6. package/www/{4113.12576845930ab6331447.chunk.js → 4113.83b0350d733cb0566fab.chunk.js} +1 -1
  7. package/www/{68603.86a9f7c1c422138aace6.chunk.js → 68603.dd143553b71a7dcbae51.chunk.js} +1 -1
  8. package/www/72521.d31ee84e2c9918dfbd9d.chunk.js +1 -0
  9. package/www/{81954.aa14d2b70c4f9d683138.chunk.js → 81954.221ec67f79242f490c86.chunk.js} +1 -1
  10. package/www/99883.5844681b34492722e137.chunk.js +1 -0
  11. package/www/assets/img/devices/titanos.svg +12 -0
  12. package/www/{backups.292eca94f13ea5bb0e78.chunk.js → backups.fe49fae27db0ff6cb33d.chunk.js} +1 -1
  13. package/www/devices.77000b3a9001dd7234e5.chunk.js +1 -0
  14. package/www/{homevideos.3f284a07bf310dc59f2a.chunk.js → homevideos.6eb642fb97120c09757c.chunk.js} +1 -1
  15. package/www/htmlVideoPlayer-plugin.f37fbfc78b8a9cbf8f41.chunk.js +2 -0
  16. package/www/index.7c072432f17194a39ef4.chunk.js +1 -0
  17. package/www/index.html +1 -1
  18. package/www/libraries.db1b6d7ee092583eeac8.chunk.js +1 -0
  19. package/www/library.0578cfcc17ad4ce09d2b.chunk.js +1 -0
  20. package/www/{livetv.cdf5926c347a6d1cc6fb.chunk.js → livetv.457ec4dc72eb4ce1054b.chunk.js} +1 -1
  21. package/www/{logs-file.83b735e0dfb98927581c.chunk.js → logs-file.89210666c52de5a5afb1.chunk.js} +1 -1
  22. package/www/lyrics.05d5ed668649f4fe72bd.chunk.js +1 -0
  23. package/www/{main.jellyfin.0196d1aa92641204d3e6.css → main.jellyfin.28c121270fe02d9f8014.css} +1 -1
  24. package/www/main.jellyfin.bundle.js +1 -1
  25. package/www/{movies.28b0eeb1c6a2066dd633.chunk.js → movies.4106553c773ffeda5bc3.chunk.js} +1 -1
  26. package/www/{music.6076bd9d6e38426ea341.chunk.js → music.c9283625aa8ef4ae59d4.chunk.js} +1 -1
  27. package/www/node_modules.@jellyfin.sdk.bundle.js +1 -1
  28. package/www/node_modules.@mui.material.bundle.js +1 -1
  29. package/www/node_modules.@mui.system.bundle.js +1 -1
  30. package/www/node_modules.axios.bundle.js +1 -1
  31. package/www/playback-video.1bb437c4ee35983c6b77.chunk.js +2 -0
  32. package/www/runtime.bundle.js +1 -1
  33. package/www/{session-login.fc6a436c27a51e90cca1.chunk.js → session-login.c08895ee559e30dd0241.chunk.js} +2 -2
  34. package/www/{session-selectServer.76aca8020a1cfe95d0a5.chunk.js → session-selectServer.d08dd2225623662430d8.chunk.js} +1 -1
  35. package/www/{shows.10497d861949012254f2.chunk.js → shows.31c9e0251166d4c44439.chunk.js} +1 -1
  36. package/www/{syncPlay-plugin.deda95c9d1bfd1d4c523.chunk.js → syncPlay-plugin.f532382eb6cd87a2687a.chunk.js} +1 -1
  37. package/www/{syncPlay-ui-players-HtmlAudioPlayer.507a8fd024149328704a.chunk.js → syncPlay-ui-players-HtmlAudioPlayer.3de6fd4a4fce53fe49dd.chunk.js} +1 -1
  38. package/www/{syncPlay-ui-players-HtmlVideoPlayer.c0ca132c5f118c9e8d99.chunk.js → syncPlay-ui-players-HtmlVideoPlayer.9f6ea856bc1c5b5aeb09.chunk.js} +1 -1
  39. package/www/{syncPlay-ui-settings-editor-html.00709e3534fb1bda1bd2.chunk.js → syncPlay-ui-settings-editor-html.596e49f135d17d457a2e.chunk.js} +1 -1
  40. package/www/users-parentalcontrol.e57b97ab683e297f81cd.chunk.js +1 -0
  41. package/www/24468.c97dc4915ec288b66ec8.chunk.js +0 -1
  42. package/www/32721.156e7af28047f73c8824.chunk.js +0 -2
  43. package/www/72521.dfbf250ffa67457d3498.chunk.js +0 -1
  44. package/www/76719.ed2bd85278dc85cdf20c.chunk.js +0 -1
  45. package/www/devices.15672c5c1df44f1f0627.chunk.js +0 -1
  46. package/www/htmlVideoPlayer-plugin.01ca8734872ddd916185.chunk.js +0 -2
  47. package/www/index.063e156faf3206f4bae1.chunk.js +0 -1
  48. package/www/libraries.58c2c475e0ec08899483.chunk.js +0 -1
  49. package/www/library.3c022917ccaaa44c880e.chunk.js +0 -1
  50. package/www/lyrics.07069d116d4ca960ba52.chunk.js +0 -1
  51. package/www/playback-video.8a65f2bdd26567349b85.chunk.js +0 -2
  52. package/www/users-parentalcontrol.779915bd59333c770018.chunk.js +0 -1
  53. /package/www/{32721.156e7af28047f73c8824.chunk.js.LICENSE.txt → 32721.1565fbee2f79c634a171.chunk.js.LICENSE.txt} +0 -0
  54. /package/www/{htmlVideoPlayer-plugin.01ca8734872ddd916185.chunk.js.LICENSE.txt → htmlVideoPlayer-plugin.f37fbfc78b8a9cbf8f41.chunk.js.LICENSE.txt} +0 -0
  55. /package/www/{playback-video.8a65f2bdd26567349b85.chunk.js.LICENSE.txt → playback-video.1bb437c4ee35983c6b77.chunk.js.LICENSE.txt} +0 -0
  56. /package/www/{session-login.fc6a436c27a51e90cca1.chunk.js.LICENSE.txt → session-login.c08895ee559e30dd0241.chunk.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[72521,97200],{30658:function(e,t,n){var a=n(62540),r=(n(63696),n(85817));t.A=function(e){var t=e.SectionClassName,n=e.title,l=e.isBtnVisible,o=void 0!==l&&l,i=e.btnId,c=e.btnClassName,s=e.btnTitle,u=e.btnIcon;return(0,a.jsxs)("div",{className:"".concat(t," sectionTitleContainer flex align-items-center"),children:[(0,a.jsx)("h2",{className:"sectionTitle",children:n}),o&&(0,a.jsx)(r.A,{is:"emby-button",id:i,className:c,title:s,icon:u})]})}},45228:function(e,t,n){var a=n(62540),r=n(63696),l=n(40643),o=n(75487),i=n(10301),c=function(){return c=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)};t.A=function(e){var t=(0,r.useCallback)((function(t){var n;null===(n=e.onClose)||void 0===n||n.call(e,t,"clickaway")}),[e]),n=(0,a.jsx)(o.A,{size:"small",color:"inherit",onClick:t,children:(0,a.jsx)(i.A,{fontSize:"small"})});return(0,a.jsx)(l.A,c({autoHideDuration:3300,action:n},e))}},50723:function(e,t,n){var a,r=n(62540),l=(n(63696),n(4452)),o=n.n(l),i=n(46782),c=function(){return c=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)};!function(e){e.RIGHT="RIGHT",e.LEFT="LEFT"}(a||(a={})),t.A=function(e){var t=e.className,n=e.title,l=e.icon,s=e.iconClassName,u=e.iconPos,d=e.onClick,f=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n}(e,["className","title","icon","iconClassName","iconPos","onClick"]),v=o()("emby-button",t,{"show-focus":i.A.tv}),m=o()("material-icons",s,l);return(0,r.jsxs)("button",c({className:v,onClick:d},f,{children:[l&&u===a.LEFT&&(0,r.jsx)("span",{className:m,"aria-hidden":"true"}),(0,r.jsx)("span",{children:n}),l&&u===a.RIGHT&&(0,r.jsx)("span",{className:m,"aria-hidden":"true"})]}))}},58702:function(e,t,n){var a=n(62540),r=n(63696),l=n(5898),o=n(89100),i=n(84851);function c(e){return r.useCallback((function(){(0,o.navigate)(e,!0).catch((function(e){console.warn("Error navigating to dashboard url",e)}))}),[e])}t.A=function(e){var t=e.activeTab,n=c("/dashboard/users/profile"),r=c("/dashboard/users/access"),o=c("/dashboard/users/parentalcontrol"),s=c("/dashboard/users/password");return(0,a.jsxs)("div",{"data-role":"controlgroup","data-type":"horizontal",className:"localnav",children:[(0,a.jsx)(i.A,{href:"#","data-role":"button",className:"useredit"===t?"ui-btn-active":"",onClick:n,children:l.Ay.translate("Profile")}),(0,a.jsx)(i.A,{href:"#","data-role":"button",className:"userlibraryaccess"===t?"ui-btn-active":"",onClick:r,children:l.Ay.translate("TabAccess")}),(0,a.jsx)(i.A,{href:"#","data-role":"button",className:"userparentalcontrol"===t?"ui-btn-active":"",onClick:o,children:l.Ay.translate("TabParentalControl")}),(0,a.jsx)(i.A,{href:"#","data-role":"button",className:"userpassword"===t?"ui-btn-active":"",onClick:s,children:l.Ay.translate("HeaderPassword")})]})}},67692:function(e,t,n){var a=n(62540),r=(n(63696),n(5898)),l=function(e){var t=e.name,n=e.id,a=e.required,r=e.label,l=e.option;return{__html:'<select\n is="emby-select"\n '.concat(t,'\n id="').concat(n,'"\n ').concat(a,'\n label="').concat(r,'"\n >\n ').concat(l,"\n </select>")}};t.A=function(e){var t=e.name,n=e.id,o=e.required,i=e.label,c=e.children;return(0,a.jsx)("div",{dangerouslySetInnerHTML:l({name:t?"name='".concat(t,"'"):"",id:n,required:o?"required='".concat(o,"'"):"",label:r.Ay.translate(i),option:c})})}},72521:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}}),n(29305),n(32733),n(78557),n(90076),n(95021),n(93062),n(97747);var a=n(34789),r=n(79754),l=n(46782),o=n(10838),i=n(5898),c=n(36300),s=(n(10353),n(15453),n(98959),(a.A.tv||a.A.xboxOne)&&window.confirm?function(e){"string"==typeof e&&(e={label:"",text:e});var t=(e.label||"").replaceAll("<br/>","\n"),n=prompt(t,e.text||"");return n?Promise.resolve(n):Promise.reject(n)}:function(e){return"string"==typeof e&&(e={title:"",text:e}),function(e){var t={removeOnClose:!0,scrollY:!1};l.A.tv&&(t.size="fullscreen");var n,a=r.default.createDialog(t);return a.classList.add("formDialog"),a.innerHTML=i.Ay.translateHtml('<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"></h3> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered" style="padding-top:2em"> <form> <div class="inputContainer"> <input is="emby-input" type="text" id="txtInput" label=""/> <div class="fieldDescription"></div> </div> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised btnSubmit block formDialogFooterItem button-submit"> <span class="submitText"></span> </button> </div> </form> </div> </div> ',"core"),l.A.tv?o.default.centerFocus.on(a.querySelector(".formDialogContent"),!1):(a.querySelector(".dialogContentInner").classList.add("dialogContentInner-mini"),a.classList.add("dialog-fullscreen-lowres")),a.querySelector(".btnCancel").addEventListener("click",(function(){r.default.close(a)})),a.querySelector(".formDialogHeaderTitle").innerText=e.title||"",e.description?a.querySelector(".fieldDescription").innerText=e.description:a.querySelector(".fieldDescription").classList.add("hide"),function(e,t){var n=e.querySelector("#txtInput");n.label?n.label(t.label||""):n.setAttribute("label",t.label||""),n.value=t.value||""}(a,e),a.querySelector("form").addEventListener("submit",(function(e){return n=a.querySelector("#txtInput").value,e.preventDefault(),e.stopPropagation(),setTimeout((function(){r.default.close(a)}),300),!1})),a.querySelector(".submitText").innerText=e.confirmText||i.Ay.translate("ButtonOk"),a.style.minWidth="".concat(Math.min(400,c.Ay.getWindowSize().innerWidth-50),"px"),r.default.open(a).then((function(){return l.A.tv&&o.default.centerFocus.off(a.querySelector(".formDialogContent"),!1),n||Promise.reject()}))}(e)})},78304:function(e,t,n){n.r(t),n.d(t,{default:function(){return j}});var a=n(62540),r=n(36657),l=n(50117),o=n(22696),i=n.n(o),c=n(63696),s=n(9055),u=n(5898),d=n(98320),f=n(85817);function v(e){void 0===e&&(e=0);var t=0,n=e%1;return n&&(t=Math.floor(60*n)),d.Ay.getDisplayTime(new Date(2e3,1,1,e,t,0,0))}var m=function(e){var t=e.index,n=e.DayOfWeek,r=e.StartHour,l=e.EndHour,o=e.removeScheduleCallback,i=(0,c.useCallback)((function(){void 0!==t&&void 0!==o&&o(t)}),[t,o]);return(0,a.jsxs)("div",{className:"liSchedule listItem","data-day":n,"data-start":r,"data-end":l,children:[(0,a.jsxs)("div",{className:"listItemBody two-line",children:[(0,a.jsx)("h3",{className:"listItemBodyText",children:u.Ay.translate(n)}),(0,a.jsx)("div",{className:"listItemBodyText secondary",children:v(r)+" - "+v(l)})]}),(0,a.jsx)(f.A,{is:"paper-icon-button-light",className:"btnDelete listItemButton",title:"Delete",icon:"delete",dataIndex:t,onClick:i})]})},b=function(e){var t=e.tag,n=e.tagType,r=e.removeTagCallback,l=(0,c.useCallback)((function(){void 0!==t&&void 0!==r&&r(t)}),[t,r]);return(0,a.jsx)("div",{className:"paperList",children:(0,a.jsxs)("div",{className:"listItem",children:[(0,a.jsx)("div",{className:"listItemBody",children:(0,a.jsx)("h3",{className:"listItemBodyText",children:t})}),(0,a.jsx)(f.A,{is:"paper-icon-button-light",className:"".concat(n," btnDeleteTag listItemButton"),title:"Delete",icon:"delete",dataTag:t,onClick:l})]})})},p=n(50723),h=n(30658),y=n(58702),g=n(8566),x=n(91281),A=n(67692),S=n(65242),k=n(72521),T=n(67430),C=n(45228),N=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,r,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=l.next()).done;)o.push(a.value)}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return o},j=function(){var e=N((0,s.ok)(),1)[0].get("userId"),t=N((0,c.useState)(""),2),o=t[0],d=t[1],f=N((0,c.useState)([]),2),v=f[0],j=f[1],w=N((0,c.useState)([]),2),I=w[0],P=w[1],L=N((0,c.useState)(),2),H=L[0],q=L[1],B=N((0,c.useState)([]),2),D=B[0],E=B[1],O=N((0,c.useState)([]),2),R=O[0],M=O[1],U=N((0,c.useState)([]),2),F=U[0],W=U[1],_=N((0,c.useState)(!1),2),z=_[0],V=_[1],G=(0,c.useMemo)((function(){return e=void 0,t=void 0,r=function(){return function(e,t){var n,a,r,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(l=0)),l;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,a=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){l=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){l.label=i[1];break}if(6===i[0]&&l.label<r[1]){l.label=r[1],r=i;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(i);break}r[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(68603)]).then(n.bind(n,73233))];case 1:return[2,e.sent().default]}}))},new((a=void 0)||(a=Promise))((function(n,l){function o(e){try{c(r.next(e))}catch(e){l(e)}}function i(e){try{c(r.throw(e))}catch(e){l(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}));var e,t,a,r}),[]),Y=(0,c.useRef)(null),$=(0,c.useRef)([]),J=(0,c.useCallback)((function(){V(!1)}),[]),K=(0,c.useCallback)((function(e){var t,n,a,l,o=Y.current;if(o){var i=[{name:u.Ay.translate("Books"),value:r.d.Book},{name:u.Ay.translate("Channels"),value:r.d.ChannelContent},{name:u.Ay.translate("LiveTV"),value:r.d.LiveTvChannel},{name:u.Ay.translate("Movies"),value:r.d.Movie},{name:u.Ay.translate("Music"),value:r.d.Music},{name:u.Ay.translate("Trailers"),value:r.d.Trailer},{name:u.Ay.translate("Shows"),value:r.d.Series}],c=[];try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),d=s.next();!d.done;d=s.next()){var f=d.value,v=-1!=(null===(l=null===(a=e.Policy)||void 0===a?void 0:a.BlockUnratedItems)||void 0===l?void 0:l.indexOf(f.value))?' checked="checked"':"";c.push({value:f.value,name:f.name,checkedAttribute:v})}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}P(c),o.querySelector(".blockUnratedItems").dispatchEvent(new CustomEvent("create"))}else console.error("[userparentalcontrol] Unexpected null page reference")}),[]),Q=(0,c.useCallback)((function(e,t){var n,a,r,l,o,i,c,s,u,f,v=Y.current;if(v){d(e.Name||""),G.then((function(t){return t.setTitle(e.Name)})),K(e),M((null===(n=e.Policy)||void 0===n?void 0:n.AllowedTags)||[]),W((null===(a=e.Policy)||void 0===a?void 0:a.BlockedTags)||[]);for(var m=[],b=0,p=t.length;b<p;b++){var h=t[b];if(m.length){var y=m[m.length-1];if((null===(r=y.RatingScore)||void 0===r?void 0:r.score)===(null===(l=h.RatingScore)||void 0===l?void 0:l.score)&&(null===(o=y.RatingScore)||void 0===o?void 0:o.subScore)==(null===(i=h.RatingScore)||void 0===i?void 0:i.subScore)){y.Name+="/"+h.Name;continue}}m.push(h)}j(m),$.current=m;var x="",A=null===(c=e.Policy)||void 0===c?void 0:c.MaxParentalRating,S=null===(s=e.Policy)||void 0===s?void 0:s.MaxParentalSubRating;null!=A&&(m.forEach((function(e,t){var n,a;(null===(n=e.RatingScore)||void 0===n?void 0:n.score)===A&&(null===(a=e.RatingScore)||void 0===a?void 0:a.subScore)===S&&(x="".concat(t))})),x||m.forEach((function(e,t){var n;null!=(null===(n=e.RatingScore)||void 0===n?void 0:n.score)&&e.RatingScore.score<=A&&(x="".concat(t))}))),q(x),(null===(u=e.Policy)||void 0===u?void 0:u.IsAdministrator)?v.querySelector(".accessScheduleSection").classList.add("hide"):v.querySelector(".accessScheduleSection").classList.remove("hide"),E((null===(f=e.Policy)||void 0===f?void 0:f.AccessSchedules)||[]),g.Ay.hide()}else console.error("[userparentalcontrol] Unexpected null page reference")}),[G,M,W,K]),X=(0,c.useCallback)((function(){if(e){g.Ay.show();var t=window.ApiClient.getUser(e),n=window.ApiClient.getParentalRatings();Promise.all([t,n]).then((function(e){Q(e[0],e[1])})).catch((function(e){console.error("[userparentalcontrol] failed to load data",e)}))}else console.error("[userparentalcontrol.loadData] missing user id")}),[Q,e]);(0,c.useEffect)((function(){var t=Y.current;if(t){X();var a=function(){return Array.prototype.map.call(t.querySelectorAll(".liSchedule"),(function(e){return{DayOfWeek:e.getAttribute("data-day"),StartHour:e.getAttribute("data-start"),EndHour:e.getAttribute("data-end")}}))},r=function(){return Array.prototype.map.call(t.querySelectorAll(".allowedTag"),(function(e){return e.getAttribute("data-tag")}))},o=function(){(0,k.default)({label:u.Ay.translate("LabelTag")}).then((function(e){var t=r();-1==t.indexOf(e)&&(t.push(e),M(t))})).catch((function(){}))},i=function(){return Array.prototype.map.call(t.querySelectorAll(".blockedTag"),(function(e){return e.getAttribute("data-tag")}))},c=function(){(0,k.default)({label:u.Ay.translate("LabelTag")}).then((function(e){var t=i();-1==t.indexOf(e)&&(t.push(e),W(t))})).catch((function(){}))},s=function(e,t,n,a,r){return function(l){var o,i,c=l.Id,s=l.Policy;if(!c||!s)throw new Error("Unexpected null user id or policy");var u=parseInt(e.querySelector("#selectMaxParentalRating").value,10),d=t.current[u],f=null===(o=null==d?void 0:d.RatingScore)||void 0===o?void 0:o.score,v=null===(i=null==d?void 0:d.RatingScore)||void 0===i?void 0:i.subScore;s.MaxParentalRating=Number.isNaN(f)?null:f,s.MaxParentalSubRating=Number.isNaN(v)?null:v,s.BlockUnratedItems=Array.prototype.filter.call(e.querySelectorAll(".chkUnratedItem"),(function(e){return e.checked})).map((function(e){return e.getAttribute("data-itemtype")})),s.AccessSchedules=n(),s.AllowedTags=a(),s.BlockedTags=r(),T.tF.getCurrentApiClientAsync().then((function(e){return e.updateUserPolicy(c,s)})).then((function(){return g.Ay.hide(),void V(!0)})).catch((function(e){console.error("[userparentalcontrol] failed to update user policy",e)}))}}(t,$,a,r,i),d=function(t){if(e)return g.Ay.show(),window.ApiClient.getUser(e).then((function(e){s(e)})).catch((function(e){console.error("[userparentalcontrol] failed to fetch user",e)})),t.preventDefault(),t.stopPropagation(),!1;console.error("[userparentalcontrol.onSubmit] missing user id")},f=function(){var e,t;e={Id:0,UserId:"",DayOfWeek:l.H.Sunday,StartHour:0,EndHour:0},t=-1,e=e||{},n.e(52361).then(n.bind(n,52361)).then((function(n){n.default.show({schedule:e}).then((function(e){var n=a();-1==t&&(t=n.length),n[t]=e,E(n)})).catch((function(){}))})).catch((function(e){console.error("[userparentalcontrol] failed to load access schedule",e)}))};return t.querySelector("#btnAddSchedule").addEventListener("click",f),t.querySelector("#btnAddAllowedTag").addEventListener("click",o),t.querySelector("#btnAddBlockedTag").addEventListener("click",c),t.querySelector(".userParentalControlForm").addEventListener("submit",d),function(){t.querySelector("#btnAddSchedule").removeEventListener("click",f),t.querySelector("#btnAddAllowedTag").removeEventListener("click",o),t.querySelector("#btnAddBlockedTag").removeEventListener("click",c),t.querySelector(".userParentalControlForm").removeEventListener("submit",d)}}console.error("[userparentalcontrol] Unexpected null page reference")}),[M,W,X,e]),(0,c.useEffect)((function(){var e=Y.current;e?e.querySelector("#selectMaxParentalRating").value=String(H):console.error("[userparentalcontrol] Unexpected null page reference")}),[H,v]);var Z,ee=(0,c.useCallback)((function(e){var t=R.filter((function(t){return t!==e}));M(t)}),[R,M]),te=(0,c.useCallback)((function(e){var t=F.filter((function(t){return t!==e}));W(t)}),[F,W]),ne=(0,c.useCallback)((function(e){var t=D.filter((function(t,n){return n!=e}));E(t)}),[D,E]);return(0,a.jsxs)(S.A,{id:"userParentalControlPage",className:"mainAnimatedPage type-interior",children:[(0,a.jsx)(C.A,{open:z,onClose:J,message:u.Ay.translate("SettingsSaved")}),(0,a.jsxs)("div",{ref:Y,className:"content-primary",children:[(0,a.jsx)("div",{className:"verticalSection",children:(0,a.jsx)(h.A,{title:o})}),(0,a.jsx)(y.A,{activeTab:"userparentalcontrol"}),(0,a.jsxs)("form",{className:"userParentalControlForm",children:[(0,a.jsxs)("div",{className:"selectContainer",children:[(0,a.jsx)(A.A,{id:"selectMaxParentalRating",label:"LabelMaxParentalRating",children:(Z="",Z+="<option value=''></option>",v.forEach((function(e,t){null!=e.RatingScore&&(Z+="<option value='".concat(t,"'>").concat(i()(e.Name),"</option>"))})),Z)}),(0,a.jsx)("div",{className:"fieldDescription",children:u.Ay.translate("MaxParentalRatingHelp")})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"blockUnratedItems",children:[(0,a.jsx)("h3",{className:"checkboxListLabel",children:u.Ay.translate("HeaderBlockItemsWithNoRating")}),(0,a.jsx)("div",{className:"checkboxList paperList",style:{padding:".5em 1em"},children:I.map((function(e){return(0,a.jsx)(x.A,{className:"chkUnratedItem",itemType:e.value,itemName:e.name,itemCheckedAttribute:e.checkedAttribute},e.value)}))})]})}),(0,a.jsx)("br",{}),(0,a.jsxs)("div",{className:"verticalSection",style:{marginBottom:"2em"},children:[(0,a.jsx)(h.A,{SectionClassName:"detailSectionHeader",title:u.Ay.translate("LabelAllowContentWithTags"),isBtnVisible:!0,btnId:"btnAddAllowedTag",btnClassName:"fab submit sectionTitleButton",btnTitle:"Add",btnIcon:"add"}),(0,a.jsx)("div",{className:"fieldDescription",children:u.Ay.translate("AllowContentWithTagsHelp")}),(0,a.jsx)("div",{className:"allowedTags",style:{marginTop:".5em"},children:null==R?void 0:R.map((function(e){return(0,a.jsx)(b,{tag:e,tagType:"allowedTag",removeTagCallback:ee},e)}))})]}),(0,a.jsxs)("div",{className:"verticalSection",style:{marginBottom:"2em"},children:[(0,a.jsx)(h.A,{SectionClassName:"detailSectionHeader",title:u.Ay.translate("LabelBlockContentWithTags"),isBtnVisible:!0,btnId:"btnAddBlockedTag",btnClassName:"fab submit sectionTitleButton",btnTitle:"Add",btnIcon:"add"}),(0,a.jsx)("div",{className:"fieldDescription",children:u.Ay.translate("BlockContentWithTagsHelp")}),(0,a.jsx)("div",{className:"blockedTags",style:{marginTop:".5em"},children:F.map((function(e){return(0,a.jsx)(b,{tag:e,tagType:"blockedTag",removeTagCallback:te},e)}))})]}),(0,a.jsxs)("div",{className:"accessScheduleSection verticalSection",style:{marginBottom:"2em"},children:[(0,a.jsx)(h.A,{title:u.Ay.translate("HeaderAccessSchedule"),isBtnVisible:!0,btnId:"btnAddSchedule",btnClassName:"fab submit sectionTitleButton",btnTitle:"Add",btnIcon:"add"}),(0,a.jsx)("p",{children:u.Ay.translate("HeaderAccessScheduleHelp")}),(0,a.jsx)("div",{className:"accessScheduleList paperList",children:D.map((function(e,t){return(0,a.jsx)(m,{index:t,DayOfWeek:e.DayOfWeek,StartHour:e.StartHour,EndHour:e.EndHour,removeScheduleCallback:ne},"".concat(e.DayOfWeek).concat(e.StartHour).concat(e.EndHour))}))})]}),(0,a.jsx)("div",{children:(0,a.jsx)(p.A,{type:"submit",className:"raised button-submit block",title:u.Ay.translate("Save")})})]})]})]})}},85817:function(e,t,n){var a=n(62540),r=(n(63696),n(5898));t.A=function(e){var t=e.is,n=e.id,l=e.className,o=e.title,i=e.icon,c=e.dataIndex,s=e.dataTag,u=e.dataProfileid,d=e.onClick,f=function(e){var t=e.id,n=e.className,a=e.title,r=e.icon,l=e.dataIndex,o=e.dataTag,i=e.dataProfileid;return{__html:'<button\n is="'.concat(e.is,'"\n type="button"\n ').concat(t,'\n class="').concat(n,'"\n ').concat(a,"\n ").concat(l,"\n ").concat(o,"\n ").concat(i,'\n >\n <span class="material-icons ').concat(r,'" aria-hidden="true"></span>\n </button>')}}({is:t,id:n?'id="'.concat(n,'"'):"",className:l,title:o?'title="'.concat(r.Ay.translate(o),'"'):"",icon:i,dataIndex:c||0===c?'data-index="'.concat(c,'"'):"",dataTag:s?'data-tag="'.concat(s,'"'):"",dataProfileid:u?'data-profileid="'.concat(u,'"'):""});return void 0!==d?(0,a.jsx)("button",{style:{all:"unset"},dangerouslySetInnerHTML:f,onClick:d}):(0,a.jsx)("div",{dangerouslySetInnerHTML:f})}},91281:function(e,t,n){var a=n(62540),r=n(22696),l=n.n(r),o=(n(63696),n(5898)),i=function(e){var t=e.labelClassName,n=e.className,a=e.id,r=e.dataFilter,l=e.dataItemType,o=e.dataId,i=e.checkedAttribute,c=e.renderContent;return{__html:"<label ".concat(t,'>\n <input\n is="emby-checkbox"\n type="checkbox"\n class="').concat(n,'"\n ').concat(a,"\n ").concat(r,"\n ").concat(l,"\n ").concat(o,"\n ").concat(i,"\n />\n ").concat(c,"\n </label>")}};t.A=function(e){var t=e.labelClassName,n=e.className,r=e.elementId,c=e.dataFilter,s=e.itemType,u=e.itemId,d=e.itemAppName,f=e.itemCheckedAttribute,v=e.itemName,m=e.title,b=d?"- ".concat(d):"",p=v?"<span>".concat(l()(v||"")," ").concat(b,"</span>"):"<span>".concat(o.Ay.translate(m),"</span>");return(0,a.jsx)("div",{className:"sectioncheckbox",dangerouslySetInnerHTML:i({labelClassName:t?"class='".concat(t,"'"):"",className:n,id:r?"id='".concat(r,"'"):"",dataFilter:c?"data-filter='".concat(c,"'"):"",dataItemType:s?"data-itemtype='".concat(s,"'"):"",dataId:u?"data-id='".concat(u,"'"):"",checkedAttribute:f||"",renderContent:p})})}}}]);