(self.webpackChunk=self.webpackChunk||[]).push([[4201],{84201:function(e,t,n){"use strict";n.r(t),n(61013),n(63238),n(61418),n(5769);var r=n(1115),o=n(78695),l=n(53754),i=n(28978),a=(n(50447),n(21865),n(56561),n(16589),n(78066),n(93462),n(44420)),s=n.n(a);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,r.key,r)}}function u(e){return e.preventDefault(),!1}function d(e,t,r){Promise.resolve().then(n.bind(n,74227)).then((function(n){var o=r?"on":"off";n.centerFocus[o](e,t)}))}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,(n=[{key:"show",value:function(e){return new Promise((function(t,n){var a={removeOnClose:!0,scrollY:!1};o.Z.tv?a.size="fullscreen":a.size="small";var c=r.default.createDialog(a);c.classList.add("formDialog");var f,v,m,y="";y+='<div class="formDialogHeader">',y+='<button is="paper-icon-button-light" class="btnCancel hide-mouse-idle-tv" tabindex="-1"><span class="material-icons arrow_back"></span></button>',y+='<h3 class="formDialogHeaderTitle">${Sort}</h3>',y+="</div>",y+=s(),c.innerHTML=l.ZP.translateHtml(y,"core"),function(e,t){e.querySelector(".selectSortBy").innerHTML=t.map((function(e){return'<option value="'+e.value+'">'+e.name+"</option>"})).join("")}(c,e.sortOptions),f=c,v=e.settings,f.querySelector("form").addEventListener("submit",u),f.querySelector(".selectSortOrder").value=v.sortOrder,f.querySelector(".selectSortBy").value=v.sortBy,c.querySelector(".btnCancel").addEventListener("click",(function(){r.default.close(c)})),o.Z.tv&&d(c.querySelector(".formDialogContent"),!1,!0),c.querySelector("form").addEventListener("change",(function(){m=!0}),!0),r.default.open(c).then((function(){if(o.Z.tv&&d(c.querySelector(".formDialogContent"),!1,!1),m)return function(e,t){i.setFilter(t+"-sortorder",e.querySelector(".selectSortOrder").value),i.setFilter(t+"-sortby",e.querySelector(".selectSortBy").value)}(c,e.settingsKey),void t();n()}))}))}}])&&c(t.prototype,n),e}();t.default=f},44420:function(e){e.exports='<div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered"> <form style="margin:auto"> <div class="verticalSection verticalSection-extrabottompadding" style="margin-top:2em"> <div class="selectContainer"> <select is="emby-select" class="selectSortBy" label="${LabelSortBy}"> </select> </div> <div class="selectContainer"> <select is="emby-select" class="selectSortOrder" label="${LabelSortOrder}"> <option value="Ascending">${Ascending}</option> <option value="Descending">${Descending}</option> </select> </div> </div> </form> </div> </div> '}}]);