webpackJsonp([0],[function(e,t,n){function i(){var e=a.initial(arguments).concat({escape:!0}),t=a.last(arguments).hash;return a.isObject(t)&&!a.isEmpty(t)&&e.splice(1,0,t),new r.SafeString(s.apply(s,e))}var a=n(2),r=n(7),s=n(4).default;e.exports=i},,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(2427),r=i(a),s=n(972),o=i(s);t.default=function(){var e="function"==typeof o.default&&r.default&&(0,r.default)("react.element")||60103
;return function(t,n,i,a){var r=t&&t.defaultProps,s=arguments.length-3;if(n||0===s||(n={}),n&&r)for(var o in r)void 0===n[o]&&(n[o]=r[o]);else n||(n=r||{});if(1===s)n.children=a;else if(s>1){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+3];n.children=l}return{$$typeof:e,type:t,key:void 0===i?null:""+i,ref:null,props:n,_owner:null}}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(362);t.default=function(){return i.a.t.apply(i.a,arguments)}
},,function(e,t,n){"use strict";t.__esModule=!0;var i=n(971),a=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=a.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}},function(e,t,n){e.exports=n(2524)},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){return e===t}
function r(e){var t=arguments.length<=1||void 0===arguments[1]?a:arguments[1],n=null,i=null;return function(){for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return null!==n&&n.length===r.length&&r.every(function(e,i){return t(e,n[i])})?i:(n=r,i=e.apply(void 0,r))}}function s(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return typeof e}).join(", ")
;throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return function(){for(var t=arguments.length,a=Array(t),r=0;r<t;r++)a[r]=arguments[r];var o=0,l=a.pop(),u=s(a),c=e.apply(void 0,[function(){return o++,l.apply(void 0,arguments)}].concat(n)),d=function(e,t){
for(var n=arguments.length,a=Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];var s=u.map(function(n){return n.apply(void 0,[e,t].concat(a))});return c.apply(void 0,i(s))};return d.resultFunc=l,d.recomputations=function(){return o},d.resetRecomputations=function(){return o=0},d}}function l(){return o(r).apply(void 0,arguments)}function u(e){var t=arguments.length<=1||void 0===arguments[1]?l:arguments[1]
;if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce(function(e,t,i){return e[n[i]]=t,e},{})})}t.__esModule=!0,t.defaultMemoize=r,t.createSelectorCreator=o,t.createSelector=l,t.createStructuredSelector=u},function(e,t,n){
"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(2426),r=i(a),s=n(2424),o=i(s),l=n(236),u=i(l);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,u.default)(t)));e.prototype=(0,
o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";t.__esModule=!0;var i=n(236),a=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,a.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict"
;var i=n(38),a=n(55),r=i.a.extend({mixins:a.a});t.a=new r},function(e,t,n){"use strict";function i(e,t){if(!t)return e;var n={};return t.forEach(function(t){n[t]=function(){return e[t].apply(e,arguments)}}),n}function a(e,t,n){p[e]=i(t,n);var a=f[e];a&&(delete f[e],a.resolve(p[e]))}function r(e){c.a.each(e,function(e,t){var n=void 0,i=void 0;c.a.isArray(e)?(n=e[0],i=e[1]):n=e,a(t,n,i)})}function s(e){return o(e)?h.a.Deferred().resolve(p[e]).promise():(f[e]||(f[e]=h.a.Deferred()),f[e].promise())}
function o(e){return p.hasOwnProperty(e)}function l(e){return p[e]}var u=n(2),c=n.n(u),d=n(5),h=n.n(d);n(33);t.c=r,t.d=s,t.b=o,t.a=l;var p={},f={}},function(e,t,n){"use strict";var i=n(3268),a=(n(1068),n(3269));n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return a.a})},function(e,t,n){"use strict";var i=n(113),a=n.n(i),r=n(2),s=n.n(r),o=n(52),l=n(673),u=n.n(l),c=n(33),d=n(28);n(1307),n(1306),n(1308);u.a.isNodeAttached=function(e){return o.a.$.contains(document.documentElement,e)}
;var h=s.a.clone(u.a.View.prototype),p=s.a.clone(u.a.CollectionView.prototype),f=s.a.clone(u.a.Region.prototype),g=s.a.clone(u.a.Region),m=s.a.clone(u.a.Layout.prototype),v={constructor:function(){this.wrapAfterRender(),h.constructor.apply(this,arguments),this.listenViewEvents()},listenViewEvents:function(){var e=this;this.stopListeningViewEvents();var t=s.a.result(this,"viewEvents");t&&(this._viewEventsListeners=s.a.mapObject(t,function(t){return s.a.isString(t)?e[t]:t}),
this.listenTo(this,this._viewEventsListeners))},stopListeningViewEvents:function(){this._viewEventsListeners&&(this.stopListening(this,this._viewEventsListeners),delete this._viewEventsListeners)},_setElement:function(){h._setElement.apply(this,arguments),this.el&&(this.el._viewInstance?this.el._viewInstance!==this&&d.a.warn('Multiple views registered for a single element with class="%s"',this.el.className):this.el._viewInstance=this)},_removeElement:function(){
this.el&&delete this.el._viewInstance,h._removeElement.apply(this,arguments)},bindAllWhenRendered:function(){n.i(c.a)(arguments.length>0,"`bindAllWhenRendered` requires at least one function");var e=s.a.isArray(arguments[0])?arguments[0]:arguments;s.a.each(e,function(e){try{this[e]=this.whenRendered(this[e])}catch(t){n.i(c.a)(!1,"`bindAllWhenRendered` is unable to wrap "+a()(e))}},this)},whenRendered:function(e){
return n.i(c.a)(s.a.isFunction(e),"`whenRendered` must be called with a single function"),s.a.bind(function(){if(!this.isClosed){var t=s.a.toArray(arguments),n=s.a.bind(function(){this.isRendered&&!this.isClosed&&e.apply(this,t)},this);if(this.isRendered)return void s.a.defer(n);this.listenToOnce(this,"render",function(){s.a.defer(n)})}},this)},wrapAfterRender:function(){void 0!==this.onlyAfterRender&&(n.i(c.a)(s.a.isArray(this.onlyAfterRender),"`onlyAfterRender` must be an array"),
this.bindAllWhenRendered.apply(this,this.onlyAfterRender))},bindUIElements:function(){h.bindUIElements.apply(this,arguments),this.bindToModel(),this.isRendered=!0},unbindUIElements:function(){h.unbindUIElements.apply(this,arguments),this.unbindFromModel()},_getImmediateChildren:function(){return[]},_getNestedViews:function(){var e=this._getImmediateChildren();return e.length?s.a.reduce(e,function(e,t){return t._getNestedViews?e.concat(t._getNestedViews()):e},e):e}},y={constructor:function(){
p.constructor.apply(this,arguments)},triggerRendered:function(){return this.isRendered=!0,p.triggerRendered.apply(this,arguments)},rebase:function(e){return this.stopListening(this.collection),this.collection=e,this._initialEvents(),s.a.isFunction(this._renderChildren)?this._renderChildren():this.render(),this},buildItemView:function(){var e=p.buildItemView.apply(this,arguments);return e._parentView=this,e},_getImmediateChildren:function(){return s.a.values(this.children._views)}},b={
constructor:function(){p.constructor.apply(this,arguments)}},S={append:function(e,t,n){var i=e.isClosed||s.a.isUndefined(e.$el),a=e!==this.currentView;return a&&this.close(),e.render(),(a||i)&&(t||(t=this.getEl(this.el)),n?t.prepend(e.el):t.append(e.el)),this.attachView(e),u.a.triggerMethod.call(this,"show",e),u.a.triggerMethod.call(e,"show"),this._updateParentView(e),this._triggerAttached(e,t),this},prepend:function(e,t){return this.append(e,t,!0)},show:function(e){f.show.apply(this,arguments),
this._updateParentView(e),this._triggerAttached(e,this.$el)},_triggerAttached:function(e,t){if(u.a.isNodeAttached(t.get(0))){var n=s.a.union([e],s.a.result(e,"_getNestedViews")||[]);s.a.each(n,function(e){e.triggerMethod&&e.triggerMethod("attached",this)},this)}},_updateParentView:function(e){e&&(e._parentView=this._parentView)}},I={buildRegion:function(e,t){var n=g.buildRegion.apply(this,arguments);return n._parentView=e._parentView,n}},w={_buildRegions:function(e){
var t=this,n=s.a.mapObject(e,function(e){return s.a.isString(e)?{_parentView:t,selector:e}:s.a.defaults(e,{_parentView:t})});return m._buildRegions.call(this,n)},_getImmediateChildren:function(){return s.a.chain(this.regionManager._regions).values().pluck("currentView").compact().value()}};s.a.extend(u.a.View.prototype,v),s.a.extend(u.a.ItemView.prototype,v),s.a.extend(u.a.CollectionView.prototype,v,y),s.a.extend(u.a.CompositeView.prototype,v,b),s.a.extend(u.a.Region.prototype,S),
s.a.extend(u.a.Region,I),s.a.extend(u.a.Layout.prototype,w),u.a.extend=o.a.Model.extend,u.a.Controller.extend=u.a.extend,u.a.Region.extend=u.a.extend,u.a.Application.extend=u.a.extend,u.a.Module.extend=u.a.extend,u.a.View.extend=u.a.extend,u.a.ItemView.extend=u.a.extend,u.a.CollectionView.extend=u.a.extend,u.a.CompositeView.extend=u.a.extend,u.a.Layout.extend=u.a.extend,t.a=u.a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={}
;for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}},function(e,t,n){"use strict";function i(e){return!0}function a(e){return h.a.isObject(e)&&!h.a.isArray(e)}function r(e,t){t||(t={});var n=h.a.defaults(t,{typeName:e,parse:h.a.bind(p.a.parseType,p.a,e),stringify:h.a.bind(p.a.stringifyType,p.a,e)});return n.validate=t.validate?s(t.validate):i,n.isRequired=c()({},n,{validate:function(e){return null!=e&&n.validate(e)},typeName:n.typeName+"<required>"
}),n}function s(e){return function(t){return null==t||e(t)}}var o=n(2420),l=n.n(o),u=n(6),c=n.n(u),d=n(2),h=n.n(d),p=n(61),f=["boolean","integer","float","string","object","array"],g={any:r("any"),boolean:r("boolean",{validate:h.a.isBoolean}),integer:r("integer",{validate:l.a}),float:r("float",{validate:h.a.isNumber}),string:r("string",{validate:h.a.isString}),object:r("object",{validate:a}),array:r("array",{validate:h.a.isArray}),list:r("list",{validate:h.a.isArray}),
encodedString:r("encodedString",{validate:h.a.isString}),queryString:r("queryString",{validate:a}),instanceOf:function(){var e=h.a.toArray(arguments);return r("instanceOf",{validate:function(t){return h.a.some(e,function(e){return t instanceof e})}})},oneOf:function(){var e=h.a.toArray(arguments);return r("oneOf",{validate:function(t){return h.a.contains(e,t)}})},oneOfType:function(){var e=h.a.toArray(arguments);return r("oneOfType",{validate:function(t){return h.a.some(e,function(e){
return e.validate(t)})}})},custom:function(e){return r("custom",{validate:e})},getAttrTypeFor:function(e){if(null==e)return g.any;for(var t=0,n=f.length;t<n;t++){var i=f[t],a=g[i];if(a.validate(e))return a}return g.any}};t.a=g},function(e,t,n){"use strict";var i=n(236),a=n.n(i),r=n(70),s=n.n(r),o=n(113),l=n.n(o),u=n(2),c=n.n(u),d=n(52),h=n(5),p=n.n(h),f=n(13),g=n(12),m=n(61),v=n(751),y=n(33),b=n(19),S=n(364),I=n(17),w=n(65),M=n(41),C=n(56),D=/^change:[\w]+$/,P=d.a.Model.extend({mixins:[S.a],
name:"AbstractModel",responseType:w.a.xml,hasInitialRelations:!1,_context:["parent","skipCache"],cache:null,cacheKey:function(e){return e[this.idAttribute]},constructor:function(e,t){e||(e={}),t||(t={});var i;if(this.initialize!==d.a.Model.prototype.initialize&&(i=this.initialize,this.initialize=function(){}),c.a.each(this.getContext(),function(e){var n=this.findOption(t,e);void 0!==n&&(this[e]=n)},this),
!this.cache||this.findOption(t,"skipCache"))return d.a.Model.prototype.constructor.apply(this,arguments),this._initModel(t),void(i&&(i.apply(this,arguments),this.initialize=i));var a=this.findOption(t,"onlyIfCached"),r=this.cache.getItemCacheKey(this,e),s=this.cache.get(r);if(!s&&this.entityID&&n.i(f.b)("appModel")){var o=n.i(f.a)("appModel");if(o.has("entities")){var l=o.get("entities").get(this.entityType),u=this.entityID(e),h=l.get(u);h&&(s=h.get("model"))}}return s?(this.uninitialize(),
a||(this.mergeStrategy&&(s.isMergingAttributes=!0),t.parse?e=s.parse(e):c.a.extend(e,s._getRelations(this.syncedRelations,e)),s.set(e),s.isMergingAttributes=!1),c.a.each(this.getContext(),function(e){s.setContext(e,this[e]||s[e])},this),t.collection&&(s.collection=t.collection),s.updateEntity(),s):a?{}:(d.a.Model.prototype.constructor.apply(this,arguments),this._initModel(t),i&&(i.apply(this,arguments),this.initialize=i),void this.cache.store(this,r))},uninitialize:function(){
this.stopListening()},_initModel:function(e){C.a.get("shouldCreateStateTree")&&this.entityID&&(this.state=this.toState()),this._initRelations(e),this._initDerived(e),this._initState()},_initRelations:function(e){this._relationListeners={};var t=c.a.extend({},this.sessionRelations,this.syncedRelations);c.a.each(t,function(e,t){this._initRelation(e,t);var n=c.a.bind(this._initRelation,this,e,t);this.on("change:"+t,n)},this),this.hasInitialRelations=!0,
this.set(this._getRelations(this.sessionRelations,this.attributes)),e.parse||this.set(this._getRelations(this.syncedRelations,this.attributes))},_initRelation:function(e,t){var n=this._resolveRelationDefinition(e),i=n.relationClass,a=this.get(t),r=this.previous(t),s=a&&a instanceof i;r&&r instanceof i&&c.a.has(this._relationListeners,t)&&(r.off("all",this._relationListeners[t]),this._relationListeners[t]=null),s&&this._forwardRelationEvents(a,t)},_initDerived:function(){
c.a.each(this.derivedAttrs,this._setDerived,this)},_initState:function(){C.a.get("shouldCreateStateTree")&&(this.state=this.toState(),this.updateState=this.updateState.bind(this),this.updateEntity(),this.on("all",this.onEvent,this))},findOption:function(e,t){return e[t]||e.collection&&e.collection[t]},getContext:function(){if(!this.context)return this._context;var e=c.a.result(this,"context");return this._context.concat(e)},setContext:function(e,t){
if(this.getContext().indexOf(e)!==-1&&this[e]!==t){if(this[e]=t,this.hasDerived(e)){var n=this.derivedAttrs[e],i=n.call(this);this.set(e,i)}if("parent"!==e){var a=c.a.extend({},this.sessionRelations,this.syncedRelations);c.a.each(a,function(n,i){var a=this.get(i);a&&a.setContext(e,t)},this)}}},getScopedKey:function(e){return null!=e&&c.a.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},getState:function(){return this._computedEntityID||this.state},updateState:function(){
var e=this.getState();this.state=this.toState();var t=this.getState();t!==e&&this.updateEntity(),this.trigger("statechange",this,t,e)},updateEntity:function(){this._computedEntityID&&!this.skipCache&&(n.i(y.a)(this.entityType,this.name+" requires an `entityType`"),g.a.trigger("change:entity",{type:this.entityType,id:this._computedEntityID,model:this}))},toState:function(){var e=s()(this.attributes),t=c.a.reduce(e,this.reduceState,{possibleEntityContainers:[]},this)
;return Object.defineProperty(t,"possibleEntityContainers",{enumerable:!1}),this.entityID&&(this._computedEntityID=this.entityID(t)),t},reduceState:function(e,t){var n=this.attributes[t];return n&&n.getState?(e.possibleEntityContainers.push(t),e[t]=n.getState(),e):n&&n.initialize?e:(e[t]=n,e)},shouldUpdateRelationState:function(e,t,n){return t!==n},toJSON:function(){function e(e,i){var a=this.get(i);if(a){var r;r=t.excludeDefaults?a instanceof d.a.Collection?a.map(function(e){
return n.i(v.a)(c.a.result(e,"defaults"),e.toJSON(t))}):n.i(v.a)(c.a.result(a,"defaults"),a.toJSON(t)):a.toJSON(t),g[i]=r}}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this.syncedAttrs,a=this.sessionRelations,r=this.syncedRelations,s=this.attributes,o={};for(var l in s){var u=a&&c.a.has(a,l),h=r&&c.a.has(r,l),f=t.syncedOnly&&(!i||!c.a.has(i,l));u||h||f||(o[l]=s[l])}var g=p.a.extend(!0,{},o);return t.excludeDefaults&&(g=n.i(v.a)(c.a.result(this,"defaults"),g)),
t.syncedOnly||c.a.each(a,e,this),c.a.each(r,e,this),g},clone:function(){var e=c.a.extend(c.a.pick(this,this.getContext()),{skipCache:!0});return new this.constructor(this.toJSON(),e)||null},copy:function(e){n.i(y.a)(e instanceof this.constructor,"Only a model of the same type may be copied");var t=e.toJSON();return c.a.extend(t,this._getRelations(this.sessionRelations,t,{parse:!0}),this._getRelations(this.syncedRelations,t,{parse:!0})),this.set(t)},restoreDefaults:function(e){var t={}
;return c.a.each(this.attributes,function(e,n){this.derivedAttrs&&c.a.has(this.derivedAttrs,n)||(t[n]=void 0)},this),c.a.extend(t,this._getRelations(this.sessionRelations,{},{reset:!0}),this._getRelations(this.syncedRelations,{},{reset:!0}),c.a.result(this,"defaults"),e),this.set(t)},set:function(e,t,n){var i;c.a.isObject(e)?(i=e,n=t):(i={})[e]=t,n||(n={});var a;return!this.isMergingAttributes&&n.merge&&this.mergeStrategy&&(a=!0,this.isMergingAttributes=!0),
this.isMergingAttributes&&(i=this._mergeAttributes(i)),d.a.Model.prototype.set.call(this,i,n),a&&(this.isMergingAttributes=!1),this},hasAttr:function(e){var t=this.sessionAttrs&&c.a.has(this.sessionAttrs,e),n=this.syncedAttrs&&c.a.has(this.syncedAttrs,e);return!(!t&&!n)},hasRelation:function(e){var t=this.sessionRelations&&c.a.has(this.sessionRelations,e),n=this.syncedRelations&&c.a.has(this.syncedRelations,e);return!(!t&&!n)},hasDerived:function(e){
return!(!this.derivedAttrs||!c.a.has(this.derivedAttrs,e))},validate:function(e,t){var i=c.a.extend({},this.sessionAttrs,this.syncedAttrs,this.sessionRelations,this.syncedRelations),a=this._validateTypes(e,i);return a&&n.i(y.a)(!1,a),a},parse:function(e,t){return t&&t.save&&!this.hasResponseOnSave?this.attributes:this.convert(e,t)},convert:function(e,t){var n,i=e,a=c.a.result(this,"responseType");c.a.isString(i)&&(n=!0,c.a.isFunction(this.augmentResponseText)&&(i=this.augmentResponseText(i,a)),
i=a.parse(i),a===w.a.json&&i.MediaContainer&&(i=i.MediaContainer)),c.a.isFunction(this.augmentResponse)&&(i=this.augmentResponse(i,a)),n&&this.rootPropertyName&&c.a.has(i,this.rootPropertyName)&&(i=i[this.rootPropertyName]);var r,s={};c.a.each(this.sessionAttrs,function(e,t){c.a.has(i,t)&&(s[t]=i[t])}),c.a.each(this.syncedAttrs,function(e,t){if(c.a.has(i,t)){var n,a=e;a.typeName||(a=e.type,n=c.a.omit(e,"type")),s[t]=a===I.a.string?i[t]:a.parse(i[t],n)
}else this.has(t)&&(r||(r=c.a.result(this,"defaults")),s[t]=r&&c.a.has(r,t)?r[t]:void 0)},this);var o=c.a.extend({},t,{parse:!0});return c.a.extend(s,this._getRelations(this.syncedRelations,i,o)),s},save:function(e,t,n){var i;null==e||"object"===(void 0===e?"undefined":a()(e))?(i=e,n=t):(i={})[e]=t;var r=c.a.extend({save:!0},n),s=c.a.extend(this.getSaveParams(i),r.data);if(c.a.isEmpty(s))return r.success&&r.success(this),p.a.Deferred().resolve(this);r.data=s;var o=r.success
;return r.success=function(e,t,n){e.cache&&e.cache.store(e),o&&o(e,t,n)},d.a.Model.prototype.save.call(this,i,r)},sync:function(e,t,n){var i=n?c.a.clone(n):{};if("create"===e||"update"===e){var a=i.data,r=i.url||c.a.result(this,"saveUrl")||c.a.result(this,"syncUrl")||c.a.result(this,"url");i.url=b.join(r,a),i.data=""}return d.a.Model.prototype.sync.call(this,e,t,i)},getSaveParams:function(e){var t=this._getSaveAttrs(e);return c.a.reduce(t,function(e,t,n){var i=t.definition,a=t.value,r=n
;if(!i)return e[r]=a,e;var s=i.relationClass;if(s){var o,l=s.prototype.model;i.rootPropertyName?o=i.rootPropertyName:a.rootPropertyName?o=a.rootPropertyName:l&&l.prototype&&(o=l.prototype.rootPropertyName),a=a.getSaveParams(),o&&(r=o)}else{var u,d;c.a.has(i,"type")?(u=i.type,d=c.a.omit(i,"type")):u=i,a=u.stringify(a,d)}return e[r]=a,e},{},this)},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void n.i(y.a)(!1,this.name+" is already capturing events")
;var e=this.set,t=[],i=c.a.clone(this.attributes);this.set=function(n,i,r){var s,o=c.a.extend({},r,{silent:!0});return"object"===(void 0===n?"undefined":a()(n))?(s=n,r=i):(s={})[n]=i,c.a.each(s,function(n,i){this.get(i)!==n&&(t.push({key:i,value:n}),e.call(this,i,n,o))},this),c.a.each(this._derivedListeners,function(n){var i=n.key,a=this.derivedAttrs[i],r=a.call(this);this.get(i)!==r&&(t.push({key:i,value:r}),e.call(this,i,r,o))},this),this},this.releaseCapturedChangeEvents=function(){
this.set=e,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,this._previousAttributes=i,this._changing=!0,c.a.each(t,function(e){this.trigger("change:"+e.key,this,e.value)},this),this._changing=!1,c.a.isEmpty(t)||this.trigger("change",this,{})},this.discardCapturedChangeEvents=function(){this.set=e,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,t.length=0}},spyOnGet:function(e){var t=[],n=this.get;return this.get=function(e){
return t.push("change:"+e),this.hasRelation(e)&&t.push("change:"+e+".change"),n.apply(this,arguments)},e.call(this),this.get=n,t},_mergeAttributes:function(e){var t=this.mergeStrategy;return t?c.a.reduce(e,function(e,n,i){return e[i]=t(i,this.get(i),n),e},{},this):e},_resolveRelationDefinition:function(e){return c.a.isFunction(e)?e.call(this):e},_getRelations:function(e,t,i){t||(t={}),i||(i={});var a={};return c.a.each(e,function(e,r){var s=this._resolveRelationDefinition(e),o=s.relationClass
;n.i(y.a)(o,this.name+" requires a `relationClass` for the "+r+" relation");var l=r;i.parse&&!c.a.has(t,r)&&c.a.has(s,"rootPropertyName")&&(l=s.rootPropertyName);var u=t[l];if(u instanceof o)return void(a[r]=u);if(!u&&s.deferred)return void(a[r]=void 0);var h=i.reset?null:this.get(r),p=h instanceof o,f=o.prototype instanceof d.a.Collection;if(f?u=m.a.parseArray(u):u||(u={}),p&&!f&&(i.parse&&(u=h.parse(u)),p=h.id===u[h.idAttribute||"id"]),p){h.isMergingAttributes=this.isMergingAttributes
;var g=s.setOptions;c.a.isFunction(g)&&(g=g.call(this,i)),f?h.set(u,c.a.extend({parse:i.parse,remove:!this.isMergingAttributes},g)):h.set(u,g),h.isMergingAttributes=!1}else{var v={parse:i.parse};if(c.a.each(this.getContext(),function(e){v[e]=this[e]},this),!f){var b=s.attrs;c.a.isFunction(b)&&(b=b.call(this,t)),u=c.a.extend({},u,b)}var S=s.options;c.a.isFunction(S)&&(S=S.call(this,t)),c.a.extend(v,{parent:this},S),h=new o(u,v)}a[r]=h},this),a},_forwardRelationEvents:function(e,t){function n(){
var n=arguments[0];if("change"!==n){if("statechange"===n)return void(this.shouldUpdateRelationState.apply(this,c.a.rest(arguments,1))&&M.b(this.updateState,this));var a=c.a.toArray(arguments);a[0]="change:"+t+"."+n,this.trigger.apply(this,a),c.a.contains(i,n)||(this.trigger("change:"+t+".change",this,e),this.trigger("change",this))}}var i=["sync","request","invalid","error","add","remove"];e.on("all",n,this),this._relationListeners[t]=n},_setDerived:function(e,t){
var i,a=this.spyOnGet(function(){var a=this.set;this.set=function(){n.i(y.a)(!1,this.name+" blocked `set` in the "+t+" attribute. Derived attributes are read-only.")},i=e.call(this),this.set=a});this.set(t,i),c.a.each(a,function(n){this._addDerivedListener(t,n,e)},this)},_addDerivedListener:function(e,t,n){this._derivedListeners||(this._derivedListeners=[]);var i={key:e,name:t,callback:c.a.bind(this._setDerived,this,n,e)};c.a.findWhere(this._derivedListeners,{key:e,name:i.name
})||(this._derivedListeners.push(i),this.on(i.name,i.callback))},_getSaveAttrs:function(e){var t;if(e)t=c.a.reduce(e,function(e,t,n){return e[n]={definition:this.syncedAttrs[n],value:t},e},{},this);else{var n=c.a.extend({},this.syncedAttrs,this.syncedRelations);t=c.a.reduce(n,function(e,t,n){var i=this._resolveRelationDefinition(t),a=i.save;return c.a.isFunction(a)&&(a=a.call(this)),a&&(e[n]={definition:i,value:this.get(n)}),e},{},this)}return t},_validateTypes:function(e,t){
var n=s()(e),i=c.a.reduce(n,function(n,i){if(this.hasDerived(i))return n;if(!c.a.has(t,i))return n.push(this.name+" received an unknown attribute: "+i+". All attributes must be defined in `sessionAttrs`, `syncedAttrs`, `sessionRelations`, or `syncedRelations`."),n;var a,r=e[i],s=this._resolveRelationDefinition(t[i]),o=s.relationClass;a=o?this.hasInitialRelations?I.a.instanceOf(o):o.prototype instanceof d.a.Collection?I.a.oneOfType(I.a.array,I.a.object):I.a.object:s.type?s.type:s;var u=a.validate
;return u?u(r)||n.push(i+" of type "+a.typeName+" has an invalid value: "+l()(r)):n.push(i+" has an unknown type. Specify the type in the attribute definition or use attrTypes.any as a wildcard type."),n},[],this);if(i.length>0)return i.join("\n")},onEvent:function(e,t,n){D.test(e)&&(n&&n.updateEntity&&n.updateEntity(),M.b(this.updateState,this))}});t.a=P},function(e,t,n){"use strict";function i(e){return String(e).replace(/^\/|\/$/g,"")}function a(e){
return e?f.a.first(/[^\/\\]+$/.exec(e))||e:""}function r(e,t){return m.a.stringify(e,h()({arrayFormat:"repeat"},t))}function s(e,t){return m.a.parse(e,t)}function o(e,t){v.href=e;var n=f.a.pick(v,"hash","host","hostname","href","origin","pathname","port","protocol","search");return n.isAbsolute=/^[\w:]*\/\//.test(e),n.search&&(n.params=s(n.search.substring(1))),n.origin||(n.origin=n.protocol+"//"+n.host),n}function l(e,t,n){f.a.isString(e)&&(e=[e]),e=e.filter(function(e){return e})
;var a=n&&n.recognizeHash,o=a?y:b,l=e.reduce(function(e,t){var n=i(t).match(o),a=n[1],r=n[2],s=n[3];return a&&(e.path=e.path?e.path+"/"+a:a),r&&(e.params=e.params?e.params+"&"+r:r),s&&(e.hash=s),e},{path:"",params:"",hash:""}),u=void 0;if(n&&n.parseParams)u=r(c()(s(l.params),f.a.isString(t)?s(t):t));else{var d=f.a.isString(t)?t:r(t);u=l.params+(l.params&&d?"&":"")+d}return(e.length&&"/"===e[0].charAt(0)?"/":"")+l.path+(u?"?"+u:"")+l.hash}Object.defineProperty(t,"__esModule",{value:!0})
;var u=n(971),c=n.n(u),d=n(6),h=n.n(d),p=n(2),f=n.n(p),g=n(1029),m=n.n(g);n(33);t.getLastSegment=a,t.stringifyParams=r,t.parseParams=s,t.parseUrl=o,t.join=l;var v=document.createElement("a"),y=/^([^\?#]*)(?:\?([^#]*))?(#.*)?/,b=/([^\?]*)\??(.*)()/},function(e,t){function n(e,t,n){return e===t?n.fn(this):n.inverse(this)}e.exports=n},function(e,t,n){"use strict";var i=n(113),a=(n.n(i),n(2)),r=n.n(a),s=n(52),o=n(5),l=n.n(o),u=(n(33),n(19)),c=n(364),d=n(65),h=n(41),p=n(56),f=s.a.Collection.extend({
mixins:[c.a],responseType:d.a.xml,instanceOptions:["url","path","pageStart","pageSize","persistInCache","skipCache"],_context:["parent"],cache:null,cacheKey:function(){return r.a.result(this,"url")},constructor:function(e,t){t||(t={}),r.a.each(this.getContext(),function(e){var n=t[e];void 0!==n&&this.setContext(e,n)},this);var n=r.a.result(this,"instanceOptions");if(r.a.each(n,function(e){r.a.has(t,e)&&(this[e]=t[e])},this),
null==this.pageStart&&null==this.pageSize||(this.pageStart||(this.pageStart=0),this.pageSize||(this.pageSize=0)),t.populated&&this.resetPopulatePromise(l.a.Deferred().resolve().promise()),!this.cache||this.skipCache)return s.a.Collection.prototype.constructor.apply(this,arguments),void this._initState();this.initialize.apply(this,arguments);var i=this.cache.getItemCacheKey(this),a=this.cache.get(i);return this.uninitialize(),
a?a:t.onlyIfCached?{}:(s.a.Collection.prototype.constructor.apply(this,arguments),this._initState(),void this.cache.store(this,i))},uninitialize:function(){this.stopListening()},_initState:function(){p.a.get("shouldCreateStateTree")&&(this.state=this.toState(),this.updateState=this.updateState.bind(this),this.on("reset update sort",this.onCollectionChange,this),this.on("statechange",this.onStateChange,this))},getContext:function(){if(!this.context)return this._context
;var e=r.a.result(this,"context");return this._context.concat(e)},setContext:function(e,t){this.getContext().indexOf(e)!==-1&&this[e]!==t&&(this[e]=t,this.each(function(n){n.setContext(e,t)}))},getState:function(){return this.state},updateState:function(){var e=this.getState();this.state=this.toState();var t=this.getState();this.trigger("statechange",this,t,e)},toState:function(){return this.reduce(this.reduceState,[])},reduceState:function(e,t){var n=t.getState();return n&&e.push(n),e},
shouldUpdateModelState:function(e,t,n){return t!==n},sync:function(){return this.cache&&this.cache.store(this),s.a.sync.apply(this,arguments)},syncUrl:function(){var e="";if(this.url&&(e=r.a.result(this,"url")),this.path&&(e=u.join([e,r.a.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var t={"X-Plex-Container-Start":this.pageStart||0,"X-Plex-Container-Size":this.pageSize||0};e=u.join(e,t)}return e},parse:function(e,t){return this.convert(e)},convert:function(e){var t=e
;if(r.a.isString(t)){var n=r.a.result(this,"responseType");r.a.isFunction(this.augmentResponseText)&&(t=this.augmentResponseText(t,n)),t=n.parse(t),n===d.a.json&&t.MediaContainer&&(t=t.MediaContainer)}if(r.a.isFunction(this.augmentResponse)&&(t=this.augmentResponse(t)),r.a.isArray(t))return t;var i=this.model.prototype.rootPropertyName;if(!i)return t;var a=t[i];return a?(r.a.isArray(a)||(a=[a]),a):[]},clone:function(e){e||(e=this.models)
;var t=r.a.result(this,"instanceOptions"),n=r.a.extend(r.a.pick(this,t),r.a.pick(this,this.getContext()),{skipCache:!0,persistInCache:!1});return new this.constructor(e,n)||null},cloneDeep:function(e){e||(e=this.models);var t=r.a.map(e,function(e){return e.clone()});return this.clone(t)},clear:function(e){e=r.a.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)},getSaveParams:function(){return this.map(function(e){return e.getSaveParams()})},
onCollectionChange:function(){h.b(this.updateState,this)},onStateChange:function(e,t,n){e!==this&&this.shouldUpdateModelState(e,t,n)&&h.b(this.updateState,this)}});t.a=f},function(e,t,n){"use strict";var i=n(1425);n.d(t,"f",function(){return i});var a=n(82);n.d(t,"b",function(){return a});var r=n(99);n.d(t,"d",function(){return r});var s=n(1426);n.d(t,"a",function(){return s});var o=n(1429);n.d(t,"e",function(){return o});var l=n(2409);n.d(t,"c",function(){return l})},function(e,t,n){
"use strict";var i=n(2),a=n.n(i),r=n(33),s=n(28),o={_map:{},register:function(e,t){n.i(r.a)(a.a.isFunction(t),'The "'+e+'" command must be a function'),this._map[e]=t},registerAll:function(e){var t=this;a.a.each(e,function(e,n){"__esModule"!==n&&t.register(n,e)})},reset:function(){this._map={}},execute:function(e){var t=this._map[e];if(n.i(r.a)(t,'The "'+e+'" command has not been registered'),t){n.i(s.a)("[Commands] Executing",e)
;for(var i=arguments.length,a=Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.apply(void 0,a)}}};t.a=o},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.metadataItemEntityID},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(307));t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(48),m=n.n(g),v=n(30),y=n.n(v),b=n(33),S=n(212),I=n(27),w=n(22),M=n(965),C=n(2554),D=n.n(C),P=function(e){function t(i,a){l()(this,t);var r=c()(this,e.call(this,i,a));return r.onTouchStart=function(e){r._isTouch=!0,r._preventFocus=r._shouldPreventFocus(),1===e.touches.length&&r._activate(!0),r.props.onTouchStart&&r.props.onTouchStart(e)},r.onTouchMove=function(e){r._activate(!1),
r.props.onTouchMove&&r.props.onTouchMove(e)},r.onTouchEnd=function(e){var t=r.props,n=t.to,i=t.target,a=t.isDisabled,s=t.onTouchEnd;r._isActive&&!a&&(!n||i&&"_self"!==i||(e.preventDefault(),window.location.href=n),r._press(e)),r._activate(!1),s&&s(e)},r.onTouchCancel=function(e){r._isTouch=!1,r._activate(!1),r.props.onTouchCancel&&r.props.onTouchCancel(e)},r.onMouseDown=function(e){r._isTouch||(r._preventFocus=r._shouldPreventFocus(),0===e.button&&r._activate(!0),
r.props.onMouseDown&&r.props.onMouseDown(e))},r.onMouseUp=function(e){if(!r._isTouch){var t=r.props,n=t.isDisabled,i=t.onMouseUp;r._isActive&&!n&&(r._press(e),r._preventOnClick=!0),r._activate(!1),i&&i(e)}},r.onMouseLeave=function(e){r._isTouch||(r._isActive&&r.setState({isActive:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(e))},r.onClick=function(e){r._preventFocus=!1;var t=r.props.isDisabled;r._preventOnClick||r._isTouch||r._isActive||!r._isFocused||t||r._press(e),r._preventOnClick=!1,
r._isTouch=!1},r.onFocus=function(e){if(r._preventFocus)return void(r._preventFocus=!1);r._focus(!0),r.props.onFocus&&r.props.onFocus(e)},r.onBlur=function(e){r._focus(!1),r.props.onBlur&&r.props.onBlur(e)},n.i(b.a)(!i.onClick,"Use `onPress` instead of `onClick` for reliable behavior on touch screens"),r._preventFocus=!1,r._preventOnClick=!1,r._isTouch=!1,r._isActive=!1,r._isFocused=!1,r.state={isActive:!1,isFocused:!1},r}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){
return n.i(I.a)(this,e,t)},t.prototype._activate=function(e){this._isActive=e,this.setState({isActive:e})},t.prototype._focus=function(e){this._isFocused=e,this.setState({isFocused:e})},t.prototype._shouldPreventFocus=function(){return!this.props.allowFocusOnPress&&!(m.a.findDOMNode(this)===document.activeElement)},t.prototype._press=function(e){var t=this.props.onPress;t&&t(e)},t.prototype._isActiveRoute=function(){var e=window.location.hash,t=this.props.to,i=new RegExp("^"+n.i(S.a)(t)+"\\b")
;return!(!e||!t)&&i.test(e)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.to,i=e.kind,r=e.size,o=e.isSelected,l=e.isDisabled,u=e.component,c=(e.allowFocusOnPress,e.highlightActiveRoute),d=(e.onPress,s()(e,["className","to","kind","size","isSelected","isDisabled","component","allowFocusOnPress","highlightActiveRoute","onPress"])),h=this.state,p=h.isActive,g=h.isFocused,m={},v=u;return n&&(v="a",m.href=n),d.role||(m.role=n?"link":"button"),
m.className=y()(t,D.a.link,D.a[i],r&&D.a[r],o&&D.a.isSelected,p&&M.a,g&&M.b,l&&M.c,c&&this._isActiveRoute()&&D.a.isActiveRoute),"button"!==v&&"input"!==v||(m.type=d.type||"button",m.disabled=l),f.a.createElement(v,a()({},d,m,{onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onTouchCancel:this.onTouchCancel,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur}))},t
}(p.Component);P.defaultProps={component:"button",kind:w.b.DEFAULT,isSelected:!1,isDisabled:!1,allowFocusOnPress:!1,highlightActiveRoute:!1},t.a=P},function(e,t,n){function i(e,t){var n=r.partials[e],i=a.extend({},t.hash.context||this,t.hash);return new r.SafeString(n(i))}var a=n(2),r=n(7);e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i,o){var l=o||a.a,u=l(e.props,t);return u?(u=l(e.state,n),u&&i?(u=l(e.context,i))||r&&s(e,"context",i):r&&s(e,"state",n)):r&&s(e,"props",t),!u}
var a=n(257);t.a=i;var r=!1,s=r&&function(e,t,i){var a=n(1431).default,r=e.constructor.name;/./.test(r)&&a(e[t],i,{name:r+"."+t})}},function(e,t,n){"use strict";var i=n(113),a=n.n(i),r=n(2422),s=n.n(r),o=n(2423),l=n.n(o),u=n(70),c=n.n(u),d=n(12),h={accessToken:1,address:1,auth_token:1,authToken:1,Authorization:1,clientIdentifier:1,email:1,host:1,myPlexAccessToken:1,password:1,uri:1,"X-Plex-Token":1
},p=new RegExp("("+c()(h).join("|")+")(\\s?=\\s?)(['\"]?)[^'\"\n]+(['\"]?)","g"),f=/(error|exception)\]$/i,g={"%s":function(e){return e},"%d":function(e){return l()(e,10)},"%f":function(e){return s()(e)}},m=function(e,t,n){return function(){var i,a=arguments.length;if(t=void 0===t?v.LEVEL_LOG:t,!(v.level<t)){if(0===a&&n)i=n;else if(1===a)i=v.serialize(arguments[0]);else if(a>1){for(var r=Array(a),s=-1;++s<a;)r[s]=v.serialize(arguments[s]);r[0]=r[0].replace(/%[sdif]/g,function(e,t){var n=e
;return r.length>1&&(n=g[e](r[1]),r.splice(1,1)),n}),i=r.join(" ")}return i&&d.a.trigger(e,{type:e,level:t,message:i}),i}}},v=m("log:message");v.LEVEL_NONE=-1,v.LEVEL_ERROR=0,v.LEVEL_WARN=1,v.LEVEL_INFO=2,v.LEVEL_DEBUG=3,v.LEVEL_LOG=4,v.LEVEL_GROUP=v.LEVEL_INFO,v.LEVEL_GROUP_END=v.LEVEL_INFO,v.level=v.LEVEL_LOG,v.redacts=!0,v.setLevel=function(e){v.level=Math.max(v.LEVEL_NONE,Math.min(e,v.LEVEL_LOG))},v.debug=m("log:message",v.LEVEL_DEBUG),v.info=m("log:message",v.LEVEL_INFO),
v.warn=m("log:message",v.LEVEL_WARN),v.error=m("log:message",v.LEVEL_ERROR),v.group=m("log:group",v.LEVEL_GROUP,"Group"),v.groupCollapsed=m("log:groupCollapsed",v.LEVEL_GROUP,"Group"),v.groupEnd=function(){v.level<v.LEVEL_GROUP_END||d.a.trigger("log:groupEnd",{type:"log:groupEnd",level:v.LEVEL_GROUP_END})},v.serialize=function(e){var t=void 0;switch(t=void 0===e?"[object Undefined]":null===e?"[object Null]":Object.prototype.toString.call(e)){case"[object String]":
return v.redacts?e.replace(p,"$1$2$3REDACTED$4"):e;case"[object Object]":case"[object Array]":try{var n=v.redacts?v._jsonReplacer:null;return a()(e,n,2)}catch(e){return"Unable to serialize value"}case"[object Boolean]":case"[object Number]":case"[object Function]":case"[object RegExp]":return e.toString();case"[object Date]":return e.toUTCString();case"[object Undefined]":return"undefined";case"[object Null]":return"null";default:if(f.test(t)){var i=v._getMaxStackLength(),r=e.stacktrace||e.stack
;return r&&r.length>i&&(r=r.substr(0,i-3)+"..."),v.serialize({type:t,stack:r,name:e.name,message:e.message})}return e.toString()}},v._jsonReplacer=function(e,t){return h[e]?"REDACTED":"[object String]"===Object.prototype.toString.call(t)?v.serialize(t):t},v._getMaxStackLength=function(){return 1e3},t.a=v},function(e,t,n){"use strict";function i(e){var t=e["aria-label"],n=e.className,i=e.name,a=e.style;return r()("i",{className:n?i+" "+n:i,"aria-hidden":!t,"aria-label":t,style:a})}
var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){var i,a;/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var a=typeof i;if("string"===a||"number"===a)e.push(i);else if(Array.isArray(i))e.push(n.apply(null,i));else if("object"===a)for(var s in i)r.call(i,s)&&i[s]&&e.push(s)}}return e.join(" ")}var r={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:(i=[],void 0!==(a=function(){return n}.apply(t,i))&&(e.exports=a))}()},function(e,t,n){"use strict";function i(e){var t="",n="";e?(t=e.userAgent,
n=e.platform):null!=window.navigator&&(t=window.navigator.userAgent,n=window.navigator.platform),this.detect({userAgent:t,platform:n})}var a=/\/([^\s]+)\s+\(Vizio/,r=/(?:applewebkit|safari)\/(\d+(\.\d+)?)/i,s=function(e){var t=/\(.* ([^\)]+)\)$/.exec(e);return t&&t[1]||void 0};i.prototype={constructor:i,browsers:[{id:"konvergo",name:"Plex Media Player",webkit:!0,regex:/plexmediaplayer/i,versionRegex:/plexmediaplayer (\d+\.\d+\.\d+)/i},{id:"anvergo",name:"Anvergo",webkit:!0,regex:/anvergo/i,
versionRegex:/anvergo.*-(.*)/i},{id:"wiiu",name:"Wii U",regex:/wiiu/i,versionRegex:r,webkit:!0},{id:"ps3",name:"Unknown Browser",webkit:!0,regex:/\(PLAYSTATION 3 \d\./},{id:"ps4",name:"Unknown Browser",webkit:!0,regex:/\(PlayStation 4 \d\./},{id:"ps3",name:"Mystery 3",webkit:!0,regex:/\(PlayStation 3\)/,versionRegex:r},{id:"ps4",name:"Mystery 4",webkit:!0,regex:/\(PlayStation 4\)/,versionRegex:r},{id:"edge",name:"Microsoft Edge",regex:/edge|(windows phone.+chrome)/i,
versionRegex:/edge\/(\d+(\.\d+)?)/i},{id:"ie",name:"Internet Explorer",msie:!0,regex:/(msie|trident|iemobile)/i,versionRegex:/(msie |rv:)(\d+(\.\d+)?)/i,versionMatchIndex:2},{id:"opera",name:"Opera",presto:!0,regex:/opera/i,versionRegex:/version\/(\d+(\.\d+)?)/i},{id:"opera",name:"Opera",webkit:!0,regex:/OPR\//,versionRegex:/OPR\/\s?(\d+(\.\d+)?)/},{id:"vivaldi",name:"Vivaldi",webkit:!0,regex:/vivaldi/i,versionRegex:/Vivaldi\/\s?(\d+(\.\d+)?)/},{id:"chrome",name:"Chrome",webkit:!0,
regex:/(chrome|crios|gfiber|netbox)/i,versionRegex:/(?:chrome|crios|gfibertv)[\/-](\d+(\.\d+)?)/i},{id:"firefox",name:"Firefox",gecko:!0,regex:/firefox/i,versionRegex:/firefox[ \/](\d+(\.\d+)?)/i},{id:"safari",name:"Safari",webkit:!0,regex:/macintosh.+safari/i,versionRegex:/version\/(\d+(\.\d+)?)/i},{id:"safari",name:"Safari",webkit:!0,regex:/applewebkit/i,versionRegex:r}],platforms:[{id:"metrological",name:"Metrological",tv:!0,regex:/WPE([-\w]+)?$/,version:function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=/WPE(?:-(\w*))?$/.exec(e);if(t&&t[1])return t[1]}},{id:"netgem",name:"Netgem",tv:!0,regex:/^Netbox/,version:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split("/")[1]||e}},{id:"netcast",name:"NetCast",tv:!0,predicate:function(e){return/netcast/i.test(e)&&!/web[o0]s/i.test(e)}},{id:"webos",name:"webOS",tv:!0,predicate:function(e){return/web[o0]s/i.test(e)&&/smarttv/i.test(e)},
version:function(e){try{return JSON.parse(window.PalmSystem.deviceInfo).platformVersion}catch(e){}}},{id:"blackberry",name:"Blackberry",mobile:!0,regex:/BlackBerry|RIM|BB10/,version:function(e){var t=/PlayBook/.test(e)?/Tablet OS (\d+\.\d+)/:/version\/(\d+(\.\d+)?)/i,n=t.exec(e);return n&&n[1]}},{id:"ps3",name:"PlayStation 3",tv:!0,regex:/P(lay)?S(tation )?3/i,version:function(e){return window.WM_devSettings?window.WM_devSettings.version:void 0}},{id:"ps4",name:"PlayStation 4",tv:!0,
regex:/P(lay)?S(tation )?4/i,version:function(e){return window.WM_devSettings?window.WM_devSettings.version:void 0}},{id:"wiiu",name:"Wii U",tv:!0,regex:/Nintendo WiiU/},{id:"tizen",name:"Tizen",tv:!0,predicate:function(e){return!!this.version(e)},version:function(e){var t=/Tizen (\d+(\.\d+)*)/i.exec(e);return t&&t[1]||void 0}},{id:"winvergo",name:"Winvergo",tv:!0,predicate:function(e){return!!window.Windows}},{id:"viera",name:"Viera",tv:!0,predicate:function(e){return!!this.version(e)},
version:function(e){var t=/Viera\/(\d+(\.\d+)*)/i.exec(e);return t&&t[1]||void 0}},{id:"sta",name:"Smart TV Alliance",tv:!0,version:function e(t){var e,n;if(/SmartTvA/.test(t))n=/SmartTvA\/(\d+\.\d+)/.exec(t),e=n&&n[1]||e;else{var i=[/Linux i686.+Chromium\/18/,/nettv\/4.2/i,/toshiba-dtv/i,/viera/i],a=[/nettv\/4/i],r=[/nettv/i],s=function(e){return e.test(t)};i.some(s)?e="2.0":a.some(s)?e="1.0":r.some(s)&&(e="0")}return e},predicate:function(e){return void 0!==this.version(e)}},{id:"tivo",
name:"TiVo",tv:!0,regex:/TiVo/,version:function(e){var t=/TCD[^,]+/.exec(e);return t&&t[0]||void 0}},{id:"viziomtk",name:"Vizio MTK",tv:!0,predicate:function(e){return/opera/i.test(e)&&"undefined"!=typeof iMTK_JSP}},{id:"viziosigma",name:"Vizio Sigma",tv:!0,predicate:function(e){return/opera/i.test(e)&&/vizio/i.test(e)},version:function(e){var t=a.exec(e);return t&&t[1]||void 0}},{id:"viziomtk",name:"Vizio MTK",tv:!0,predicate:function(e){return a.test(e)&&"undefined"!=typeof iMTK_JSP},
version:function(e){var t=a.exec(e);return t&&t[1]||void 0}},{id:"viziosigma",name:"Vizio Sigma",tv:!0,regex:a,version:function(e){var t=a.exec(e);return t&&t[1]||void 0}},{id:"operatvstore",name:"Opera TV Store",tv:!0,predicate:function(e){var t=/Opera TV Store/.test(e),n=/TV Store/.test(e)&&/OMI\//.test(e);return t||n}},{id:"operatv",name:"Opera TV",tv:!0,regex:/opera\/\d+\.\d+ \(linux (mips|arm)/i},{id:"android",name:"Android",tv:!0,regex:/Anvergo-Android/,version:function(e){
var t=/Android (\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"ios",name:"iOS",mobile:!0,regex:/(iphone|ipad|ipod)/i,version:function(e){var t=/OS (\d+_\d+)/.exec(e);return t&&t[1]?t[1].replace("_","."):void 0}},{id:"windowsphone",name:"Windows Phone",mobile:!0,regex:/windows phone/i,version:function(e){var t=/windows phone[ os]*(\d+\.\d+);/i.exec(e);return t&&t[1]}},{id:"android",name:"Android",mobile:!0,regex:/android/i,version:function(e){var t=/Android (\d+\.\d+)/.exec(e);return t&&t[1]}},{
id:"webos",name:"webOS",mobile:!0,predicate:function(e){return/hpwOS/.test(e)||/web[o0]s/i.test(e)&&!/smarttv/i.test(e)},version:function(e){var t=/(?:hpw|web)OS\/(\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"openelec-rpi2",name:"Embedded (Raspberry Pi)",tv:!0,regex:/plexmediaplayer.*openelec-rpi2/i,version:s},{id:"openelec",name:"Embedded",tv:!0,regex:/plexmediaplayer.*openelec/i,version:s},{id:"linuxkonvergo",name:"Linux",tv:!0,regex:/plexmediaplayer.*linux/i,version:s},{id:"osxkonvergo",
name:"OSX",tv:!0,regex:/plexmediaplayer.*mac/i,version:s},{id:"windowskonvergo",name:"Windows",tv:!0,regex:/plexmediaplayer.*win/i,version:s},{id:"linux",name:"Linux",regex:/linux/i},{id:"osx",name:"OSX",regex:/Macintosh/,version:function(e){var t=/OS X (\d+)[_.]?(\d+)?/.exec(e);if(t)return t[2]?t[1]+"."+t[2]:t[1]}},{id:"windows",name:"Windows",regex:/Windows/,version:function(e){var t={"6.0":"Vista / Server 2008",6.1:"7 / Server 2008 R2",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"
},n=/Windows [^\d;\)]*(\d+\.\d+)/.exec(e);if(n)return t[n[1]]}},{id:"chromeos",name:"Chrome OS",regex:/CrOS/,version:function(e){var t=/CrOS [\S]* (\d+)[_.]?(\d+)?/.exec(e);if(t)return t[2]?t[1]+"."+t[2]:t[1]}}],id:"unknown",name:"Unknown Browser",version:"0",platformID:"unknown",platform:"Unknown Platform",platformVersion:"0",webkit:!1,gecko:!1,msie:!1,presto:!1,tv:!1,mobile:!1,detect:function(e){var t,n=this.runTests(this.browsers,e),i=this.runTests(this.platforms,e);n&&(this.id=n.id,
this.name=n.name,this.version=this.getVersion(e.userAgent,n.versionRegex,n.versionMatchIndex||1),this.webkit=!!n.webkit,this.gecko=!!n.gecko,this.msie=!!n.msie,this.presto=!!n.presto),i&&(t="function"==typeof i.version?i.version(e.userAgent):i.version,this.platform=i.name,this.platformID=i.id,this.platformVersion=t||this.platformVersion,this.mobile=!!i.mobile,this.tv=!!i.tv),this.tv||(this.platformModifierKey="osx"===this.platformID||"ios"===this.platformID?"command":"ctrl")},
runTests:function(e,t){for(var n,i,a,r=0;i!==!0&&(a=e[r++]);)n=t[a.context||"userAgent"],a.regex?i=a.regex.test(n):a.predicate&&(i=a.predicate(n));return a},getVersion:function(e,t,n){var i=e.match(t);return i&&i.length>n&&i[n]||"0"},toJSON:function(){var e={};for(var t in this)this[t]&&"browsers"!==t&&"platforms"!==t&&(e[t]=this[t]);return e}},t.a=new i},function(e,t,n){"use strict";var i=n(368);n.d(t,"_183",function(){return i.d}),n.d(t,"_184",function(){return i.e}),n.d(t,"_185",function(){
return i.a}),n.d(t,"_186",function(){return i.b}),n.d(t,"_187",function(){return i.c}),n.d(t,"F",function(){return a}),n.d(t,"G",function(){return r}),n.d(t,"H",function(){return s}),n.d(t,"I",function(){return o}),n.d(t,"J",function(){return l}),n.d(t,"K",function(){return u}),n.d(t,"L",function(){return c}),n.d(t,"_124",function(){return d}),n.d(t,"_125",function(){return h}),n.d(t,"_126",function(){return p}),n.d(t,"_127",function(){return f}),n.d(t,"_128",function(){return g}),
n.d(t,"_129",function(){return m}),n.d(t,"_130",function(){return v}),n.d(t,"_131",function(){return y}),n.d(t,"_132",function(){return b}),n.d(t,"_133",function(){return S}),n.d(t,"_134",function(){return I}),n.d(t,"_135",function(){return w}),n.d(t,"_136",function(){return M}),n.d(t,"_137",function(){return C}),n.d(t,"_138",function(){return D}),n.d(t,"_139",function(){return P}),n.d(t,"_140",function(){return T}),n.d(t,"Z",function(){return x}),n.d(t,"_0",function(){return E}),
n.d(t,"_1",function(){return A}),n.d(t,"_2",function(){return k}),n.d(t,"_3",function(){return L}),n.d(t,"_4",function(){return _}),n.d(t,"_33",function(){return N}),n.d(t,"_34",function(){return R}),n.d(t,"_5",function(){return O}),n.d(t,"_6",function(){return j}),n.d(t,"_7",function(){return z}),n.d(t,"_8",function(){return U}),n.d(t,"_9",function(){return F}),n.d(t,"i",function(){return B}),n.d(t,"j",function(){return V}),n.d(t,"k",function(){return H}),n.d(t,"l",function(){return W}),
n.d(t,"m",function(){return Y}),n.d(t,"n",function(){return Q}),n.d(t,"o",function(){return G}),n.d(t,"p",function(){return K}),n.d(t,"q",function(){return q}),n.d(t,"r",function(){return X}),n.d(t,"s",function(){return Z}),n.d(t,"t",function(){return J}),n.d(t,"u",function(){return $}),n.d(t,"v",function(){return ee}),n.d(t,"w",function(){return te}),n.d(t,"x",function(){return ne}),n.d(t,"y",function(){return ie}),n.d(t,"z",function(){return ae}),n.d(t,"A",function(){return re}),
n.d(t,"B",function(){return se}),n.d(t,"C",function(){return oe}),n.d(t,"D",function(){return le}),n.d(t,"E",function(){return ue}),n.d(t,"_18",function(){return ce}),n.d(t,"_19",function(){return de}),n.d(t,"_20",function(){return he}),n.d(t,"_21",function(){return pe}),n.d(t,"_22",function(){return fe}),n.d(t,"_23",function(){return ge}),n.d(t,"_105",function(){return me}),n.d(t,"_106",function(){return ve}),n.d(t,"_107",function(){return ye}),n.d(t,"_108",function(){return be}),
n.d(t,"_109",function(){return Se}),n.d(t,"_110",function(){return Ie}),n.d(t,"_111",function(){return we}),n.d(t,"_112",function(){return Me}),n.d(t,"_113",function(){return Ce}),n.d(t,"_114",function(){return De}),n.d(t,"_115",function(){return Pe}),n.d(t,"_116",function(){return Te}),n.d(t,"_76",function(){return xe}),n.d(t,"_77",function(){return Ee}),n.d(t,"_78",function(){return Ae}),n.d(t,"_79",function(){return ke}),n.d(t,"_80",function(){return Le}),n.d(t,"_81",function(){return _e}),
n.d(t,"_82",function(){return Ne}),n.d(t,"_83",function(){return Re}),n.d(t,"_84",function(){return Oe}),n.d(t,"_85",function(){return je}),n.d(t,"_86",function(){return ze}),n.d(t,"_87",function(){return Ue}),n.d(t,"_88",function(){return Fe}),n.d(t,"_90",function(){return Be}),n.d(t,"_89",function(){return Ve}),n.d(t,"_91",function(){return He}),n.d(t,"_92",function(){return We}),n.d(t,"_93",function(){return Ye}),n.d(t,"_94",function(){return Qe}),n.d(t,"_95",function(){return Ge}),
n.d(t,"_96",function(){return Ke}),n.d(t,"_97",function(){return qe}),n.d(t,"_98",function(){return Xe}),n.d(t,"_99",function(){return Ze}),n.d(t,"_100",function(){return Je}),n.d(t,"_101",function(){return $e}),n.d(t,"_102",function(){return et}),n.d(t,"_103",function(){return tt}),n.d(t,"_104",function(){return nt}),n.d(t,"_176",function(){return it}),n.d(t,"_177",function(){return at}),n.d(t,"_178",function(){return rt}),n.d(t,"_179",function(){return st}),n.d(t,"_180",function(){return ot}),
n.d(t,"_181",function(){return lt}),n.d(t,"_173",function(){return ut}),n.d(t,"_174",function(){return ct}),n.d(t,"_175",function(){return dt}),n.d(t,"_166",function(){return ht}),n.d(t,"_167",function(){return pt}),n.d(t,"_168",function(){return ft}),n.d(t,"_165",function(){return gt}),n.d(t,"_171",function(){return mt}),n.d(t,"_170",function(){return vt}),n.d(t,"_169",function(){return yt}),n.d(t,"_172",function(){return bt}),n.d(t,"_24",function(){return St}),n.d(t,"_159",function(){return It
}),n.d(t,"_160",function(){return wt}),n.d(t,"_161",function(){return Mt}),n.d(t,"_182",function(){return Ct}),n.d(t,"_141",function(){return Dt}),n.d(t,"_142",function(){return Pt}),n.d(t,"_143",function(){return Tt}),n.d(t,"_144",function(){return xt}),n.d(t,"_145",function(){return Et}),n.d(t,"_146",function(){return At}),n.d(t,"_147",function(){return kt}),n.d(t,"_148",function(){return Lt}),n.d(t,"_149",function(){return _t}),n.d(t,"_150",function(){return Nt}),n.d(t,"_151",function(){
return Rt}),n.d(t,"_152",function(){return Ot}),n.d(t,"_153",function(){return jt}),n.d(t,"_154",function(){return zt}),n.d(t,"_155",function(){return Ut}),n.d(t,"_117",function(){return Ft}),n.d(t,"_118",function(){return Bt}),n.d(t,"_119",function(){return Vt}),n.d(t,"_120",function(){return Ht}),n.d(t,"_121",function(){return Wt}),n.d(t,"_122",function(){return Yt}),n.d(t,"_123",function(){return Qt}),n.d(t,"_156",function(){return Gt}),n.d(t,"_157",function(){return Kt}),
n.d(t,"_158",function(){return qt}),n.d(t,"_71",function(){return Xt}),n.d(t,"_72",function(){return Zt}),n.d(t,"_73",function(){return Jt}),n.d(t,"_74",function(){return $t}),n.d(t,"_75",function(){return en}),n.d(t,"_35",function(){return tn}),n.d(t,"_36",function(){return nn}),n.d(t,"_37",function(){return an}),n.d(t,"_38",function(){return rn}),n.d(t,"_41",function(){return sn}),n.d(t,"_42",function(){return on}),n.d(t,"_39",function(){return ln}),n.d(t,"_40",function(){return un}),
n.d(t,"_43",function(){return cn}),n.d(t,"_44",function(){return dn}),n.d(t,"_45",function(){return hn}),n.d(t,"_46",function(){return pn}),n.d(t,"_47",function(){return fn}),n.d(t,"_48",function(){return gn}),n.d(t,"_61",function(){return mn}),n.d(t,"_62",function(){return vn}),n.d(t,"_49",function(){return yn}),n.d(t,"_50",function(){return bn}),n.d(t,"_51",function(){return Sn}),n.d(t,"_52",function(){return In}),n.d(t,"_53",function(){return wn}),n.d(t,"_54",function(){return Mn}),
n.d(t,"_55",function(){return Cn}),n.d(t,"_56",function(){return Dn}),n.d(t,"_57",function(){return Pn}),n.d(t,"_58",function(){return Tn}),n.d(t,"_59",function(){return xn}),n.d(t,"_60",function(){return En}),n.d(t,"_63",function(){return An}),n.d(t,"_64",function(){return kn}),n.d(t,"_65",function(){return Ln}),n.d(t,"_66",function(){return _n}),n.d(t,"_67",function(){return Nn}),n.d(t,"_68",function(){return Rn}),n.d(t,"_69",function(){return On}),n.d(t,"_70",function(){return jn})
;n.d(t,"P",function(){return zn}),n.d(t,"Q",function(){return Un}),n.d(t,"R",function(){return Fn}),n.d(t,"S",function(){return Bn}),n.d(t,"T",function(){return Vn}),n.d(t,"U",function(){return Hn}),n.d(t,"V",function(){return Wn}),n.d(t,"W",function(){return Yn}),n.d(t,"X",function(){return Qn}),n.d(t,"Y",function(){return Gn}),n.d(t,"a",function(){return Kn}),n.d(t,"b",function(){return qn}),n.d(t,"c",function(){return Xn}),n.d(t,"d",function(){return Zn}),n.d(t,"e",function(){return Jn}),
n.d(t,"f",function(){return $n}),n.d(t,"g",function(){return ei}),n.d(t,"h",function(){return ti}),n.d(t,"_10",function(){return ni}),n.d(t,"_11",function(){return ii}),n.d(t,"_12",function(){return ai}),n.d(t,"_13",function(){return ri}),n.d(t,"_14",function(){return si}),n.d(t,"_16",function(){return oi}),n.d(t,"_15",function(){return li}),n.d(t,"_17",function(){return ui}),n.d(t,"_25",function(){return ci}),n.d(t,"_26",function(){return di}),n.d(t,"_27",function(){return hi}),
n.d(t,"_28",function(){return pi}),n.d(t,"_29",function(){return fi}),n.d(t,"_30",function(){return gi}),n.d(t,"_31",function(){return mi}),n.d(t,"_32",function(){return vi}),n.d(t,"_162",function(){return yi}),n.d(t,"_163",function(){return bi}),n.d(t,"_164",function(){return Si}),n.d(t,"M",function(){return Ii}),n.d(t,"N",function(){return wi}),n.d(t,"O",function(){return Mi})
;var a="SHOW_ALERT",r="SAVE_SETTINGS",s="DOWNLOAD_SERVER",o="DISCOVER_SERVERS",l="REDIRECT_TO_ROUTE",u="REDIRECT_TO_HTTP",c="PREFER_INSECURE",d="SELECT_ITEM",h="SELECT_MODELS",p="DESELECT_ALL_ITEMS",f="DESELECT_MODELS",g="DESELECT_COLLECTION",m="SELECT_RANGE",v="DESELECT_RANGE",y="PLAY_SELECTED_ITEMS",b="ADD_SELECTED_ITEMS_TO_PLAYLIST",S="UPDATE_SELECTED_ITEMS_WATCHED_STATUS",I="EDIT_SELECTED_ITEMS",w="REFRESH_SELECTED_ITEMS",M="ANALYZE_SELECTED_ITEMS",C="SYNC_METADATA_ITEMS",D="OPTIMIZE_METADATA_ITEMS",P="MERGE_SELECTED_ITEMS",T="DELETE_SELECTED_ITEMS",x="FETCH_PLANS",E="POPULATE_PLANS",A="REPOPULATE_UNWATCHED_WATCH_LATER_LIST",k="REPOPULATE_UNWATCHED_RECOMMENDED_LIST",L="UPDATE_USER",_="CLEAR_UPDATE_USER_ERROR",N="UPDATE_USER_PROFILE",R="CLEAR_UPDATE_USER_PROFILE_ERROR",O="FETCH_WEBHOOKS",j="ADD_WEBHOOK",z="REPLACE_WEBHOOK",U="CLEAR_UPDATE_WEBHOOK_ERROR",F="REMOVE_WEBHOOK",B="TEST_SERVER",V="SET_RELAY_REMINDER",H="FETCH_PROVIDERS",W="POPULATE_PROVIDERS",Y="FETCH_LIBRARIES",Q="POPULATE_LIBRARIES",G="ADD_LIBRARY",K="START_LIBRARIES_REFRESH",q="SHARE_LIBRARIES",X="ENABLE_HTTP_FALLBACK",Z="OPTIMIZE_DATABASE",J="CLEAN_BUNDLES",$="EMPTY_TRASH",ee="DELETE_SERVER",te="START_ACTIVITY",ne="UPDATE_ACTIVITY",ie="FINISH_ACTIVITY",ae="START_SYNTHETIC_ACTIVITY",re="FINISH_SYNTHETIC_ACTIVITY",se="EVENT_CONNECTION_OPEN",oe="EVENT_CONNECTION_CLOSE",le="RESTART_PERSONAL_CLOUD_SERVER",ue="DISCOVER_MEDIA_GRABBER_DEVICE",ce="SHARE_LIBRARY",de="START_LIBRARY_REFRESH",he="EDIT_LIBRARY",pe="ANALYZE_LIBRARY",fe="EMPTY_TRASH_LIBRARY",ge="DELETE_LIBRARY",me="FETCH_METADATA_LIST",ve="POPULATE_METADATA_LIST",ye="POPULATE_METADATA_LIST_RANGE",be="REPOPULATE_METADATA_LIST_RANGE",Se="PLAY_METADATA_LIST",Ie="ADD_METADATA_LIST_TO_PLAYLIST",we="SYNC_METADATA_LIST",Me="OPTIMIZE_METADATA_LIST",Ce="SELECT_METADATA_LIST_ITEM",De="DESELECT_METADATA_LIST_ITEM",Pe="DESELECT_ALL_METADATA_LIST_ITEMS",Te="RESET_METADATA_LIST",xe="ADD_METADATA_ITEM_TO_PLAYLIST",Ee="ANALYZE_METADATA_ITEM",Ae="DELETE_METADATA_ITEM",ke="DELETE_METADATA_ITEM_VERSION",Le="DOWNLOAD_METADATA_ITEM_VERSION",_e="EDIT_METADATA_ITEM",Ne="FIX_METADATA_ITEM_MATCH",Re="GET_METADATA_ITEM_INFO",Oe="MARK_METADATA_ITEM_UNWATCHED",je="MARK_METADATA_ITEM_WATCHED",ze="OPTIMIZE_METADATA_ITEM",Ue="PLAY_METADATA_ITEM",Fe="PLAY_METADATA_ITEM_VERSION",Be="PLAY_RELATED_MIX",Ve="PLAY_PRIMARY_EXTRA",He="QUEUE_METADATA_ITEM",We="RATE_METADATA_ITEM",Ye="RECOMMEND_METADATA_ITEM",Qe="REFRESH_METADATA_ITEM",Ge="SHARE_METADATA_ITEM",Ke="SPLIT_METADATA_ITEM_APART",qe="SYNC_METADATA_ITEM",Xe="UNMATCH_METADATA_ITEM",Ze="WATCH_METADATA_ITEM_LATER",Je="CHANGE_METADATA_ITEM_FIELD",$e="SELECT_METADATA_ITEM_STREAM",et="UPDATE_METADATA_ITEM_REFRESHING_STATE",tt="REPOPULATE_METADATA_ITEM",nt="REMOVE_METADATA_ITEM",it="START_PLAYBACK",at="END_PLAYBACK",rt="CLOSE_PLAYER",st="PLAY_NEXT_ITEM",ot="PLAY_PREVIOUS_ITEM",lt="PLAY_ITEM",ut="TOGGLE_SLIDESHOW",ct="TOGGLE_RELATED",dt="PHOTO_PLAYER_TICK",ht="MAKE_VIDEO_DECISION",pt="REMOVE_VIDEO_DECISION",ft="REPORT_PLAYBACK_ERROR",gt="TOGGLE_VIDEO_PLAY_PAUSE",mt="CHANGE_VIDEO_QUALITY",vt="CHANGE_PLAYER_POSITION",yt="UPDATE_PLAYER_POSITION",bt="VIDEO_PLAYER_TICK",St="REPOPULATE_PAGE",It="INIT_DASHBOARD_PAGE",wt="FETCH_HUBS",Mt="POPULATE_HUBS",Ct="INIT_METADATA_LIST_PAGE",Dt="INIT_LIBRARY_PAGE",Pt="INIT_LIBRARY_PAGE_METADATA_LIST",Tt="FETCH_LIBRARY_DETAILS",xt="POPULATE_LIBRARY_DETAILS",Et="FETCH_LIBRARY_FIRST_CHARACTERS",At="POPULATE_LIBRARY_FIRST_CHARACTERS",kt="FETCH_QUERY_PARSE",Lt="POPULATE_QUERY_PARSE",_t="SELECT_LIBRARY_FILTER",Nt="DESELECT_LIBRARY_FILTER",Rt="FETCH_LIBRARY_FILTER_OPTIONS",Ot="POPULATE_LIBRARY_FILTER_OPTIONS",jt="SEARCH_LIBRARY_FILTER_OPTIONS",zt="SELECT_LIBRARY_TABLE_COLUMN",Ut="DESELECT_LIBRARY_TABLE_COLUMN",Ft="INIT_PRE_PLAY_PAGE",Bt="INIT_PRE_PLAY_DESCENDANT_LIST",Vt="INIT_PRE_PLAY_SIBLING_LIST",Ht="PRE_FETCH_PRE_PLAY_METADATA_ITEM",Wt="FETCH_PRE_PLAY_METADATA_ITEM",Yt="FETCH_PRE_PLAY_RELATED_HUBS",Qt="MAKE_PRE_PLAY_VIDEO_DECISION",Gt="INIT_TIMELINE_PAGE",Kt="FETCH_TIMELINE_DETAILS",qt="POPULATE_TIMELINE_DETAILS",Xt="INIT_LIVE_TV_SETTINGS_PAGE",Zt="CLEAR_LIVE_TV_SETTINGS_PAGE",Jt="FETCH_DVRS",$t="REMOVE_DVR",en="RELOAD_GUIDE",tn="CLEAR_DVR_SETUP",nn="DVR_SETUP_NEXT_STEP",an="DVR_SETUP_PREVIOUS_STEP",rn="FETCH_DEVICES",sn="SELECT_DEVICE",on="SELECT_DEVICE_SOURCE",ln="DISCOVER_DEVICES",un="ADD_DEVICE",cn="FETCH_DEVICE_DETAILS",dn="FETCH_DEVICE_CHANNELS",hn="SCAN_DEVICE_CHANNELS",pn="CANCEL_SCAN_DEVICE_CHANNELS",fn="FIND_BEST_EPG_LINEUP",gn="SELECT_EPG_LINEUP",mn="FETCH_LINEUP_CHANNELS",vn="FETCH_CHANNEL_MAP",yn="CLEAR_CHANNEL_MAP_ERROR",bn="SAVE_CHANNEL_MAP",Sn="CLEAR_CHANNEL_MAPPINGS_SAVE_ERROR",In="SAVE_DVR",wn="ADD_DVR_DEVICE",Mn="REMOVE_DVR_DEVICE",Cn="SAVE_DVR_SETTINGS",Dn="CLEAR_DVR_SETTINGS_SAVE_ERROR",Pn="SAVE_DEVICE_SETTINGS",Tn="CLEAR_DEVICE_SETTINGS_SAVE_ERROR",xn="CLEAR_DEVICE_SCAN_PREFS",En="SET_DVR_DEVICE_ENABLED",An="RESET_EPG_SETTINGS",kn="FETCH_EPG_COUNTRIES",Ln="FETCH_EPG_LANGUAGES",_n="SELECT_EPG_COUNTRY",Nn="SELECT_EPG_LANGUAGE",Rn="SELECT_EPG_REGION",On="SET_EPG_POSTAL_CODE",jn="FETCH_EPG_LINEUPS",zn="INIT_RECORDING_SCHEDULE_PAGE",Un="CLEAR_RECORDING_SCHEDULE_PAGE",Fn="FETCH_MEDIA_SUBSCRIPTIONS",Bn="MOVE_MEDIA_SUBSCRIPTION",Vn="SET_VISIBLE_DAYS",Hn="GO_TO_TODAY",Wn="GO_TO_PREVIOUS_RANGE",Yn="GO_TO_NEXT_RANGE",Qn="FETCH_CALENDAR",Gn="PLAY_RECORDING",Kn="INIT_MEDIA_SUBSCRIPTION_MODAL",qn="CLEAR_MEDIA_SUBSCRIPTION_MODAL",Xn="FETCH_MEDIA_SUBSCRIPTION",Zn="SAVE_MEDIA_SUBSCRIPTION",Jn="CHANGE_MEDIA_SUBSCRIPTION_TEMPLATE_MODE",$n="CLEAR_MEDIA_SUBSCRIPTION_MODAL_ERROR",ei="MOVE_MEDIA_SUBSCRIPTION_MODAL",ti="DELETE_MEDIA_SUBSCRIPTION_MODAL",ni="SHOW_PROVISION_PERSONAL_CLOUD_SERVER_MODAL",ii="PROVISION_PERSONAL_CLOUD_SERVER",ai="CONNECT_TO_OWNED_PERSONAL_CLOUD_SERVER",ri="POPULATE_PERSONAL_CLOUD_SERVER_CACHE",si="FETCH_PERSONAL_CLOUD_SERVER_PROVIDERS",oi="FETCH_PERSONAL_CLOUD_SERVER_STATUS",li="UNLINK_PERSONAL_CLOUD_SERVER_PROVIDER",ui="INDICATE_INTEREST_IN_PERSONAL_CLOUD_SERVER",ci="INIT_QUICK_SEARCH",di="RESET_QUICK_SEARCH",hi="FETCH_QUICK_SEARCH",pi="CHANGE_SEARCH_QUERY",fi="CHANGE_SEARCH_SETTINGS",gi="SELECT_SEARCH_RESULT",mi="NAVIGATE_SEARCH_RESULT",vi="PLAY_SEARCH_RESULT",yi="POPULATE_SEARCH_PROVIDERS",bi="FETCH_SEARCH_PAGE",Si="CLEAR_SEARCH_PAGE",Ii="CHANGE_BACKGROUND",wi="CHANGE_THEME_MUSIC",Mi="RESET_BACKGROUND"
},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e)return!0;if(a.a.error(t),n)throw new Error(t);return!1}var a=n(28),r="`assert` requires an error message argument";t.a=i},function(e,t,n){"use strict";function i(e){var t=C.get(e);if(t)return C.get(t.child)}function a(e){var t=C.get(e);if(t){var n=t.child;return null==n?t:a(n)}}function r(e){var t=C.get(e);if(t){var n=t.parent
;return null==n?t:r(n)}}function s(e,t){if(!t){var n=r(e);return n?s(n.id,[]):[]}var a=C.get(e),o=i(e),l=[].concat(t,[a]);return o?s(o.id,l):l}function o(e){return!!i(e)}function l(e){var t=C.get(e);return!!t&&t.mediaType===d.b}var u=n(214),c=n(4),d=n(215);n.d(t,"d",function(){return h}),n.d(t,"e",function(){return p}),n.d(t,"o",function(){return f}),n.d(t,"p",function(){return g}),n.d(t,"f",function(){return m}),n.d(t,"m",function(){return v}),n.d(t,"q",function(){return y}),
n.d(t,"i",function(){return b}),n.d(t,"g",function(){return S}),n.d(t,"h",function(){return I}),n.d(t,"j",function(){return w}),n.d(t,"b",function(){return D}),t.r=i,t.k=a,t.a=r,t.l=s,t.n=o,t.c=l;var h="movie",p="show",f="season",g="episode",m="artist",v="album",y="track",b="clip",S="photo",I="photoalbum",w="playlist",M=["id","typeString"],C=n.i(u.a)(M,[{id:1,typeString:h,title:function(){return n.i(c.default)("Movie")},plural:function(){return n.i(c.default)("Movies")},mediaType:d.a},{id:2,
typeString:p,title:function(){return n.i(c.default)("Show")},plural:function(){return n.i(c.default)("Shows")},mediaType:d.b,child:f},{id:3,typeString:f,title:function(){return n.i(c.default)("Season")},plural:function(){return n.i(c.default)("Seasons")},mediaType:d.b,parent:p,child:g},{id:4,typeString:g,title:function(){return n.i(c.default)("Episode")},plural:function(){return n.i(c.default)("Episodes")},mediaType:d.a,parent:f},{id:5,typeString:"trailer",title:function(){
return n.i(c.default)("Trailer")},plural:function(){return n.i(c.default)("Trailers")},mediaType:d.a},{id:6,typeString:"comic",title:function(){return n.i(c.default)("Comic")},plural:function(){return n.i(c.default)("Comics")},mediaType:d.c},{id:7,typeString:"person",title:function(){return n.i(c.default)("Person")},plural:function(){return n.i(c.default)("People")},mediaType:d.b},{id:8,typeString:m,title:function(){return n.i(c.default)("Artist")},plural:function(){
return n.i(c.default)("Artists")},mediaType:d.b,child:v},{id:9,typeString:v,title:function(){return n.i(c.default)("Album")},plural:function(){return n.i(c.default)("Albums")},mediaType:d.b,parent:m,child:y},{id:10,typeString:y,title:function(){return n.i(c.default)("Track")},plural:function(){return n.i(c.default)("Tracks")},mediaType:d.d,parent:v},{id:11,typeString:"picture",title:function(){return n.i(c.default)("Picture")},plural:function(){return n.i(c.default)("Pictures")},mediaType:d.c},{
id:12,typeString:b,title:function(){return n.i(c.default)("Clip")},plural:function(){return n.i(c.default)("Clips")},mediaType:d.a},{id:13,typeString:S,title:function(){return n.i(c.default)("Photo")},plural:function(){return n.i(c.default)("Photos")},mediaType:d.c,parent:I},{id:14,typeString:I,title:function(){return n.i(c.default)("Photo Album")},plural:function(){return n.i(c.default)("Photo Albums")},mediaType:d.b,child:S},{id:15,typeString:w,title:function(){
return n.i(c.default)("Playlist")},plural:function(){return n.i(c.default)("Playlists")},mediaType:d.b,parent:I},{id:16,typeString:"playlistFolder",title:function(){return n.i(c.default)("Playlist")},plural:function(){return n.i(c.default)("Playlists")},mediaType:d.b,child:w},{id:1001,typeString:"userPlaylistItem",title:function(){return n.i(c.default)("Clip")},plural:function(){return n.i(c.default)("Clips")},mediaType:d.a}]),D=C.get;C.getAll},function(e,t,n){"use strict";var i=n(1);n.n(i)
;n.d(t,"c",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"a",function(){return s}),n.d(t,"d",function(){return o});var a="library",r="continueWatching",s="prePlay",o="search";i.PropTypes.oneOf([a,"timeline",r,s,o,"onlineContent"])},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.containerClassName,a=e.labelClassName,s=e.size,o=e.label,c=l()(t,h.a[s]);return o?r()("div",{className:l()(i,h.a.spinnerContainer)},void 0,r()("div",{className:c}),r()("div",{
className:l()(a,h.a.spinnerLabel)},void 0,o)):r()("div",{className:c,"aria-label":n.i(u.default)("Loading")})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n.n(o),u=n(4),c=n(22),d=n(2548),h=n.n(d);i.defaultProps={size:c.d.MEDIUM},t.a=i},,function(e,t,n){"use strict";function i(){r.a.isFunction(this.initialize)&&this.initialize.apply(this,arguments)}var a=n(2),r=n.n(a),s=function(e,t){var n,i=this;n=e&&r.a.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)||null},
r.a.extend(n,i,t);var a=function(){this.constructor=n};if(a.prototype=i.prototype,n.prototype=new a,e&&e.hasOwnProperty("mixins")){var s=e.mixins;delete e.mixins,r.a.isArray(s)||(s=[s]),r.a.each(s,function(e){r.a.extend(n.prototype,e)})}return e&&r.a.extend(n.prototype,e),n.__super__=i.prototype,n};i.extend=s,t.a=i},,function(e,t,n){"use strict";function i(e,t){var n=r.a.invert(e);return r.a.reduce(e,function(e,i){return e[i]=t[n[i]],e},{})}var a=n(2),r=n.n(a),s=n(38),o={playing:"playing",
paused:"paused",stopped:"paused",error:"paused",buffering:"playing"},l=s.a.extend({types:{VIDEO:"video",MUSIC:"music",PHOTO:"photo"},elements:{VIDEO:"video",MUSIC:"audio",PHOTO:"photo"},streams:{VIDEO:"video",MUSIC:"audio",PHOTO:"photo"},states:{STOPPED:"stopped",PAUSED:"paused",PLAYING:"playing",BUFFERING:"buffering",ERROR:"error"},slideshowStates:{PLAYING:"playing",PAUSED:"paused"},castStates:{ERROR:"IDLE",STOPPED:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING",BUFFERING:"BUFFERING"},mediaStates:{
LOADING:"LOADING",BUFFERING:"BUFFERING",READY:"READY",ERROR:"ERROR"},initialize:function(){this.typeByElement=i(this.elements,this.types),this.elementByType=i(this.types,this.elements),this.typeByStream=i(this.streams,this.types),this.streamByType=i(this.types,this.streams),this.statebyCastState=i(this.castStates,this.states),this.castStateByState=i(this.states,this.castStates)},getTypeByElement:function(e){return this.typeByElement[e]},getElementByType:function(e){return this.elementByType[e]},
getTypeByStream:function(e){return this.typeByStream[e]},getStreamByType:function(e){return this.streamByType[e]},getStateByCastState:function(e){return this.statebyCastState[e]},getCastStateByState:function(e){return this.castStateByState[e]},getSlideshowStateByState:function(e){return o[e]}}),u=new l;t.a=u},function(e,t,n){"use strict";function i(){m&&(m=clearTimeout(m))}function a(){v&&(v=clearTimeout(v))}function r(){var e=y;y=null,e()}function s(){i(),a();var e=n.i(c.a)(),t=void 0
;for(p=!0;d.length&&(!t||t-e<f);)d.pop()(),t=n.i(c.a)();p=!1,d.length?m=setTimeout(s,g):y&&(v=setTimeout(r,g))}function o(e){for(i(),a(),p=!0,h=!0;d.length;)d.pop()();if(e)try{e()}catch(e){n.i(u.a)(!1,e.name+": "+e.message)}y&&r(),p=!1,h=!1}function l(e,t){return t.isStateTreeRoot?(y=e,void(p||v||(v=setTimeout(r,g)))):h?void e():(a(),d[0]!==e&&d.unshift(e),void(p||m||(m=setTimeout(s,g))))}var u=n(33),c=n(780);t.a=o,t.b=l;var d=[],h=!1,p=!1,f=1e3/60,g=1e3/60,m=void 0,v=void 0,y=void 0
},function(e,t,n){"use strict";var i=n(2976),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(57),c=u.a.extend({className:"confirm-modal modal modal-sm fade",template:a.a,ui:{doubleConfirmMessage:".double-confirm-message",confirmBtn:".confirm-btn",confirmLabel:".confirm-btn .btn-label"},events:s.a.extend({"click .confirm-btn":"onConfirm"},u.a.prototype.events),whitelistedOptions:["title","message","confirmLabel","cancelLabel","hasDanger","hideCancel"],initialize:function(e){
u.a.prototype.initialize.apply(this,arguments),this.async=e.async,this.data=s.a.pick(e,this.whitelistedOptions),this.promise=l.a.Deferred()},serializeData:function(){return s.a.defaults(this.data,{confirmLabel:"Yes",cancelLabel:"No"})},onRender:function(){u.a.prototype.onRender.apply(this,arguments),setTimeout(s.a.bind(function(){this.ui.confirmBtn.focus()},this),this.focusDelay)},onHide:function(e){u.a.prototype.onHide.apply(this,arguments),this.promise.reject()},onConfirm:function(e){
if(e.preventDefault(),this.options.requireDoubleConfirm&&!this.hasConfirmedOnce){this.hasConfirmedOnce=!0;var t=this.options.doubleConfirmMessage,n=this.options.doubleConfirmLabel;return t&&this.ui.doubleConfirmMessage.text(t),void(n&&this.ui.confirmLabel.text(n))}this.promise.resolve(),this.async?this.ui.confirmBtn.addClass("active"):this.hide()}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(15),s=r.a.CollectionView.extend({appendHtml:function(e,t,n){
return this.sorted?this.sortedAppendHtml.apply(this,arguments):this.reversed?this.reversedAppendHtml.apply(this,arguments):r.a.CollectionView.prototype.appendHtml.apply(this,arguments)},sortedAppendHtml:function(e,t,n){if(e.isBuffering){var i=e.elBuffer.childNodes;i.length<=n?e.elBuffer.appendChild(t.el):e.elBuffer.insertBefore(t.el,i[n]),e._bufferedChildren.push(t)}else{var a=e.itemViewContainer?e.$(e.itemViewContainer):e.$el,r=a.children();r.size()<=n?a.append(t.el):r.eq(n).before(t.el)}},
reversedAppendHtml:function(e,t,n){if(e.isBuffering)e.elBuffer.insertBefore(t.el,e.elBuffer.firstChild),e._bufferedChildren.push(t);else{(e.itemViewContainer?e.$(e.itemViewContainer):e.$el).prepend(t.el)}},measureList:function(){if(this.children.length){var e=this.children._views,t=e[a.a.first(a.a.keys(e))];a.a.defer(a.a.bind(function(){this.itemWidth=t.$el.outerWidth(!0),this.itemHeight=t.$el.outerHeight(!0),this.itemMarginRight=parseInt(t.$el.css("margin-right"),10),
this.itemMarginBottom=parseInt(t.$el.css("margin-bottom"),10),this.triggerMethod("measure",this)},this))}},getViewForModel:function(e){var t=this.children._indexByModel[e.cid];return this.children._views[t]},reorder:function(){var e=this.children,t=this.collection.models,n=a.a.map(t,function(t,n){var i=e.findByModel(t);return i._index=n,i.el});this.$el.append(n)},onCollectionRendered:function(){this.measure&&this.measureList()}});t.a=s},function(e,t,n){"use strict";function i(e,t){
s.a.isArray(t)?s.a.each(t,e):e(t)}function a(e){return s.a.reduce(e,function(e,t){var n=t.split("="),i=n[0],a=n[1];try{i=decodeURIComponent(i),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]:e[i]=a}catch(e){u.a.warn("Unable to decode query string at "+i)}return e},{})}var r=n(2),s=n.n(r),o=n(636),l=n.n(o),u=n(28),c=new l.a(!1,"",!0),d={parseXML:function(e){if(!e)return{};var t=c.parseXmlString(e)
;if(!t)return u.a.warn("parseXML: No XML document created"),{};if(t.getElementsByTagName("parsererror").length)return u.a.warn("parseXML: Errors found while parsing XML document"),{};try{return c.xml2json(t)}catch(e){return u.a.warn("parseXML: Unable to parse XML: "+e.message),{}}},replaceXMLElementNames:function(e,t,n){s.a.isArray(t)||(t=[t]);var i=t.join("|"),a=new RegExp("<("+i+")","g"),r=new RegExp("</("+i+")>","g");return e=e.replace(a,"<"+n+' elementName="$1"'),e=e.replace(r,"</"+n+">")},
parseEncodedString:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];if(null==n)e[t]="";else try{e[t]=decodeURIComponent(n)}catch(e){}}}e&&i(n,t)},parseInteger:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];e[t]=null==n||""===n?0:parseInt(n,10)}}e&&i(n,t)},parseFloat:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t]
;e[t]=null===n||""===n?0:parseFloat(n)}}e&&i(n,t)}),parseBoolean:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];e[t]=1===Number(n)||"true"===n}}e&&i(n,t)},parseArray:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];s.a.isArray(n)||(e[t]=[n])}else e[t]=[]}e&&i(n,t)},parseQueryString:function(e,t,n){function r(t){if(e.hasOwnProperty(t)){var i=e[t];if(!s.a.isObject(i)){if(!s.a.isString(i))return void(e[t]={});if(!(i=i.trim().replace(/^(\?|#)/,"")))return void(e[t]={})
;e[t]=a(i.split(n))}}}e&&(n||(n="&"),i(r,t))}};t.a=d},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e,t){return e.entities.providers[t]},function(e){return e?{identifier:e.identifier,isLibraryProvider:e.isLibraryProvider,protocols:e.protocols.reduce(function(e,t){return e[t]=!0,e},{}),features:e.features.reduce(function(e,t){return e[t.type]=!0,e},{})}:{}})}function a(e,t){var a=t.providerEntityID,r=o[a];return r||(r=n.i(s.a)(i(),function(e){return e}),o[a]=r),
r(e,a)}var r=n(8),s=(n.n(r),n(721));t.a=a;var o={}},function(e,t,n){"use strict";n.d(t,"z",function(){return i}),n.d(t,"y",function(){return a}),n.d(t,"u",function(){return r}),n.d(t,"A",function(){return s}),n.d(t,"F",function(){return o}),n.d(t,"G",function(){return l}),n.d(t,"m",function(){return u}),n.d(t,"d",function(){return c}),n.d(t,"C",function(){return d}),n.d(t,"E",function(){return h}),n.d(t,"D",function(){return p}),n.d(t,"B",function(){return f}),n.d(t,"I",function(){return g}),
n.d(t,"H",function(){return m}),n.d(t,"r",function(){return v}),n.d(t,"p",function(){return y}),n.d(t,"t",function(){return b}),n.d(t,"s",function(){return S}),n.d(t,"a",function(){return I}),n.d(t,"b",function(){return w}),n.d(t,"c",function(){return M}),n.d(t,"w",function(){return C}),n.d(t,"v",function(){return D}),n.d(t,"x",function(){return P}),n.d(t,"i",function(){return T}),n.d(t,"j",function(){return x}),n.d(t,"k",function(){return E}),n.d(t,"l",function(){return A}),
n.d(t,"e",function(){return k}),n.d(t,"f",function(){return L}),n.d(t,"g",function(){return _}),n.d(t,"h",function(){return N}),n.d(t,"n",function(){return R}),n.d(t,"o",function(){return O}),n.d(t,"q",function(){return j})
;var i="discover",a="library",r="preplay",s="searchResults",o="quickSearchResults",l="metadataList",u="account",c="plexpass",d="plexpassLite",h="cpms",p="signIn",f="setupWizard",g="downloads",m="unclaimedServer",v="dvrSettings",y="dvrSetup",b="dvrManageChannels",S="dvrDeviceSettings",I="subscriptions",w="manageSubscription",M="airingDetails",C="confirmMarkAsWatched",D="confirmMarkAsUnwatched",P="confirmDelete",T="confirmOptimizeDatabase",x="confirmCleanBundles",E="confirmEmptyTrash",A="confirmDeleteServer",k="confirmAnalyzeLibrary",L="confirmForceRefreshLibrary",_="confirmEmptyTrashLibrary",N="confirmDeleteLibrary",R="confirmRemoveWebhook",O="confirmUnlinkCloudProvider",j="confirmRemoveDVR"
},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e,t){return e.entities.servers[t]},function(e){return e?{machineIdentifier:e.machineIdentifier,allowSync:e.allowSync,allowMediaDeletion:e.allowMediaDeletion,backgroundProcessing:e.backgroundProcessing,transcoderVideo:e.transcoderVideo,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer}:{}})}function a(e,t){var a=t.serverEntityID,r=o[a];return r||(r=n.i(s.a)(i(),function(e){return e}),o[a]=r),r(e,a)}
var r=n(8),s=(n.n(r),n(181));t.a=a;var o={}},,,function(e,t,n){"use strict";function i(e,t){var n="function"==typeof t;return function(){var i=n?t.apply(void 0,arguments):arguments[0];return{type:e,payload:i}}}n(33);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.kind,a=e.size,s=o()(e,["className","children","kind","size"]);return u.a.createElement(p.a,r()({className:d()(t,g.a.button,g.a[i],g.a[a])},s),n)}
var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(30),d=n.n(c),h=n(22),p=n(25),f=n(2552),g=n.n(f);i.defaultProps={kind:h.b.DEFAULT,size:h.d.MEDIUM},t.a=i},function(e,t,n){"use strict";function i(e){var t={},n=u.a.result(e,"responseType");return n&&n.accept&&(t.Accept=n.accept),t}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(2),u=n.n(l),c=n(243),d=n.n(c),h=n(38),p=n(19),f=n(1159),g=d.a.noConflict(),m=g.sync;g.sync=function(e,t,n){
var a=n.url,s=n.data,l=n.headers,c=o()(n,["url","data","headers"]),d=c.server||t.server||t,h=a||u.a.result(t,"syncUrl")||u.a.result(t,"url"),f=u.a.isObject(s)?p.stringifyParams(s):s,g=!!f&&f.indexOf("checkFiles=1")>-1,v=g||d.get("isPersonalCloudServer"),y=r()({data:f,dataType:"text",processData:!1,headers:u.a.extend(i(t),l),timeout:v?6e4:15e3},c);return u.a.isFunction(d.getXHROptions)?(y=d.getXHROptions(h,y),"cloudsync"===d.get("platform")&&(y.url=p.join(y.url,{redirect:0}))):y.url=h,m(e,t,y)},
g.wrapError=function(e,t){var n=t.error;t.error=function(i){n&&n(e,i,t),e.trigger("error",e,i,t)}},u.a.extend(g.View.prototype,f.a),g.Model.extend=h.a.extend,g.Collection.extend=h.a.extend,g.Router.extend=h.a.extend,g.View.extend=h.a.extend,g.History.extend=h.a.extend,t.a=g},,function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.serverEntityID},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(246));t.a=i},function(e,t,n){"use strict"
;var i=n(236),a=n.n(i),r=n(2),s=n.n(r),o=/\s+/,l=function(e,t,n,i){if(!n)return!0;if("object"===(void 0===n?"undefined":a()(n))){for(var r in n)e[t].apply(e,[r,n[r]].concat(i));return!1}if(o.test(n)){for(var s=n.split(o),l=0,u=s.length;l<u;l++)e[t].apply(e,[s[l]].concat(i));return!1}return!0},u=function(e,t){var n,i=-1,a=e.length,r=t[0],s=t[1],o=t[2];switch(t.length){case 0:for(;++i<a;)(n=e[i]).callback.call(n.ctx);return;case 1:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r);return;case 2:
for(;++i<a;)(n=e[i]).callback.call(n.ctx,r,s);return;case 3:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r,s,o);return;default:for(;++i<a;)(n=e[i]).callback.apply(n.ctx,t)}},c={on:function(e,t,n){return l(this,"on",e,[t,n])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:n,ctx:n||this}),this):this},once:function e(t,n,i){if(!l(this,"once",t,[n,i])||!n)return this;var a=this,e=s.a.once(function(){a.off(t,e),n.apply(this,arguments)})
;return e._callback=n,this.on(t,e,i)},off:function(e,t,n){var i,a,r,o,u,c,d,h;if(!this._events||!l(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events=void 0,this;for(o=e?[e]:s.a.keys(this._events),u=0,c=o.length;u<c;u++)if(e=o[u],r=this._events[e]){if(this._events[e]=i=[],t||n)for(d=0,h=r.length;d<h;d++)a=r[d],(t&&t!==a.callback&&t!==a.callback._callback||n&&n!==a.context)&&i.push(a);i.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this
;var t=[].slice.call(arguments,1);if(!l(this,"trigger",e,t))return this;var n=this._events[e],i=this._events.all;return n&&u(n,t),i&&u(i,arguments),this},stopListening:function(e,t,n){var i=this._listeningTo;if(!i)return this;var r=!t&&!n;n||"object"!==(void 0===t?"undefined":a()(t))||(n=this),e&&((i={})[e._listenId]=e);for(var o in i)e=i[o],e.off(t,n,this),(r||s.a.isEmpty(e._events))&&delete this._listeningTo[o];return this},hasListener:function(e){var t=this._events&&this._events[e]
;return s.a.isArray(t)&&t.length>0}},d={listenTo:"on",listenToOnce:"once"};s.a.each(d,function(e,t){c[t]=function(t,n,i){return(this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=s.a.uniqueId("l"))]=t,i||"object"!==(void 0===n?"undefined":a()(n))||(i=this),t[e](n,i,this),this}}),c.bind=c.on,c.unbind=c.off,t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(2414).default,o=r.a.Model.extend({defaults:a.a.extend({allowFlash:!1,allowServerUpdates:!1,
testPrivateConnectionsWhenPublicAddressDoesNotMatch:!0,allowHttpsMediaServerConnections:!1,allowMediaServerRelayConnections:!1,allowLoopbackDiscovery:!1,allowSSO:!1,allowMixedContent:!1,allowBaseImagePreloading:!0,allowBaseImageBlobs:!0,emulateCNP:!1,heartbeatInterval:1e4,allowManualServers:!1,allowCloudSyncServers:!1,allowMobileServers:!1,maximumConcurrentConnectionTests:5,shouldCreateFlexModels:!1,shouldCreateStateTree:!1,proxied:!1,requiresSignIn:!0,myPlexScheme:"https",myPlexUrl:"plex.tv",
requiresPlexPass:!1,myPlexAccessToken:null,alerts:null,continueUrl:null,primaryServer:null},s,window.PLEXWEB)}),l=new o;t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(12),u=0,c=[],d=o.a.Layout.extend({className:"modal fade",focusDelay:500,animationDelay:500,events:{"hide.bs.modal":"onHide"},initialize:function(e){this.once("render",function(){u+=1,l.a.trigger("anyModalOpen")}),this.once("close",function(){0===(u-=1)&&l.a.trigger("allModalsClosed")})},
hide:function(){this.isClosed||this.isHidden||this.$el.modal("hide")},onRender:function(){this.rerender||(this.isForced?this.$el.modal({backdrop:"static",keyboard:!1}):(this.listenTo(l.a,"shortcut:escape",a.a.bind(function(){c[0]===this&&this.hide()},this)),this.listenToOnce(this,"close",function(){var e=c.indexOf(this);e!==-1&&c.splice(e,1)}),c.unshift(this),this.$el.modal()),s()(":focus").blur())},onHide:function(e){this.isHidden=!0,a.a.each(this.panes,function(e,t){
var n=e.constructor.onModalClose;n&&n.apply(this)},this),setTimeout(a.a.bind(function(){l.a.trigger("hide:modal",this),this.trigger("close")},this),this.animationDelay)}});t.a=d},function(e,t,n){"use strict";var i=n(320),a=n(379),r=n(143),s=r.a.extend({background:!0,setup:function(e){this.minSize=!0,this.type=e.type,this.modelAttribute=e.modelAttribute||"thumb",
e.placeholder!==!1&&(this.model&&this.model.get("isFolder")?this.placeholderClass=a.a.folder:e.placeholderClass||(this.placeholderClass=a.a[this.type])),r.a.prototype.setup.apply(this,arguments)},setDimensions:function(e){e.width?e.height=i.a.getPosterHeight(this.type,e.width):e.height&&(e.width=i.a.getPosterWidth(this.type,e.height)),r.a.prototype.setDimensions.call(this,e)},setModel:function(e,t){r.a.prototype.setModel.apply(this,arguments),
this.model&&this.model.get("isFolder")&&(this.placeholderClass=a.a.folder)}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(44),u=n(61),c=n(78),d=n(19),h=n(250),p=n(142),f=n(34),g=n(86),m=n(67),v=n(62),y=n(183),b=n(17),S=n(65),I=n(18),w=n(206),M=n(1207),C=n(1196),D=n(695),P=n(1198),T=I.a.extend({name:"MetadataModel",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey","relatedOptions"],
responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:m.b,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(v.a)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"ratingKey",rootPropertyName:"Metadata",cache:new y.a,mergeStrategy:M.a,url:function(){return this.get("key")},urlRoot:function(){return this.get("key")},cacheKey:function(e){
this.isLibraryItem(this.identifier,e.key)||(e=this.normalizeChannelKey(e));var t=this.extractChildrenKey(e.key);return this.server&&this.server.getScopedKey(t.key)},sessionAttrs:{isPreFetched:b.a.boolean,metadataState:b.a.string,mediaState:b.a.string,indirectHttpHeaders:b.a.object},syncedAttrs:{elementName:b.a.string,ratingKey:b.a.string,parentRatingKey:b.a.string,grandparentRatingKey:b.a.string,key:b.a.string,childrenKey:b.a.string,parentKey:b.a.string,grandparentKey:b.a.string,
primaryExtraKey:b.a.string,guid:b.a.string,librarySectionID:b.a.string,librarySectionUUID:b.a.string,librarySectionKey:b.a.string,type:b.a.string,title:b.a.string,titleSort:b.a.string,originalTitle:b.a.string,parentTitle:b.a.string,grandparentTitle:b.a.string,year:b.a.string,tagline:b.a.string,summary:b.a.string,studio:b.a.string,contentRating:b.a.string,originallyAvailableAt:b.a.string,thumb:b.a.string,parentThumb:b.a.string,grandparentThumb:b.a.string,banner:b.a.string,art:b.a.string,
parentArt:b.a.string,grandparentArt:b.a.string,theme:b.a.string,parentTheme:b.a.string,grandparentTheme:b.a.string,chapterSource:b.a.string,ratingImage:b.a.string,audienceRating:b.a.float,audienceRatingImage:b.a.string,rating:b.a.float,userRating:b.a.float,index:b.a.integer,parentIndex:b.a.integer,absoluteIndex:b.a.integer,duration:b.a.integer,viewOffset:b.a.integer,viewCount:b.a.integer,childCount:b.a.integer,leafCount:b.a.integer,viewedLeafCount:b.a.integer,ratingCount:b.a.integer,
extraType:b.a.integer,lastViewedAt:b.a.integer,addedAt:b.a.integer,updatedAt:b.a.integer,deletedAt:b.a.integer,url:b.a.string,playlistID:b.a.integer,playlistType:b.a.string,smart:b.a.boolean,composite:b.a.string,durationInSeconds:b.a.integer,skipChildren:b.a.boolean,skipParent:b.a.boolean,subscriptionID:b.a.string,grandparentSubscriptionID:b.a.string,subscriptionType:b.a.string,grandparentSubscriptionType:b.a.string,Channel:b.a.array,Media:b.a.array,Collection:b.a.array,Director:b.a.array,
Producer:b.a.array,Writer:b.a.array,Genre:b.a.array,Mood:b.a.array,Country:b.a.array,Label:b.a.array,Role:b.a.array,Location:b.a.array},sessionRelations:{children:function(){return{relationClass:n(81).default}}},syncedRelations:{chapters:{relationClass:C.a,rootPropertyName:"Chapter",deferred:!0},overlays:{relationClass:D.a,rootPropertyName:"Overlay",deferred:!0},preferences:{relationClass:w.a,rootPropertyName:"Preferences",deferred:!0},onDeck:function(){return{relationClass:T,
rootPropertyName:"OnDeck",deferred:!0}},related:function(){var e={skipCache:!0};return this.relatedOptions&&a.a.extend(e,this.relatedOptions),{relationClass:n(178).default,rootPropertyName:"RelatedHubs",deferred:!0,options:e}},popularLeaves:function(){return{relationClass:n(81).default,rootPropertyName:"PopularLeaves",deferred:!0}},extras:function(){return{relationClass:n(81).default,rootPropertyName:"Extras",deferred:!0,attrs:function(e){return{containerKey:d.join([e.key,"extras"])}}}},
concerts:{relationClass:P.a,rootPropertyName:"Concert",deferred:!0}},derivedAttrs:{identifier:function(){return this.identifier},mediaTagPrefix:function(){return this.mediaTagPrefix},mediaTagVersion:function(){return this.mediaTagVersion},allowSync:function(){return this.allowSync},containerKey:function(){return this.containerKey},isLibraryItem:function(){return this.isLibraryItem(this.get("identifier"),this.get("key"))},isPlaylist:function(){return this.get("type")===f.j},isFolder:function(){
return/\/folder\?parent\=/.test(this.get("key"))},isExtra:function(){return!!this.get("extraType")},unviewedLeafCount:function(){var e=this.get("leafCount"),t=this.get("viewedLeafCount");if(e)return e-t},downloadUrl:function(){var e=this,t=this.get("Media");if(t&&1===t.length){var n=a.a.first(a.a.first(t).Part),i=n&&n.key;if(i)return function(){var t=d.join(i,{download:1});return e.server.resolveUrl(t,{appendToken:!0})}}}},defaults:{rating:0,Media:[],Collection:[],Director:[],Producer:[],
Writer:[],Genre:[],Mood:[],Country:[],Label:[],Role:[],Location:[]},initialize:function(){this.setChildrenKey(this.get("childrenKey")),this.on("change:childrenKey",this.onChildrenKeyChange,this)},uninitialize:function(){this.off("change:childrenKey",this.onChildrenKeyChange,this),this.stopListening()},fetch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.data&&(this._populatedParams=a.a.extend({},this._populatedParams,e.data)),
e.usePopulatedParams&&(e.data=this._populatedParams),I.a.prototype.fetch.call(this,e)},augmentResponseText:function(e,t){return t===S.a.xml?n.i(c.a)(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var i=e[t];void 0!==i&&n.setContext(t,i)});var i=e[this.rootPropertyName];i&&(i.librarySectionID=e.librarySectionID,i.librarySectionUUID=e.librarySectionUUID);var r=i||e,s=r.Related,o=r.OnDeck,l=r.Preferences,u=this.extractChildrenKey(r.key)
;return u.childrenKey&&(r.childrenKey=u.childrenKey,r.key=u.key),t===S.a.xml&&(r.Media=this.convertMediaItems(r.Media)),s&&(r.RelatedHubs=a.a.compact([].concat(s.Hub,s.Metadata))),o&&(r.OnDeck=o.Metadata),l&&(r.Preferences=l.Setting),this.normalize(r)},extractChildrenKey:function(e){var t=/(.*)\/(children|items)$/.exec(e),n=void 0;return t&&(n=e,e=t[1]),{childrenKey:n,key:e}},setChildrenKey:function(e){e&&("album"===this.get("type")&&(e=d.join(e,{includeRelated:1})),
this.get("children").set("containerKey",e))},convertMediaItems:function(e){var t=u.a.parseArray(e);return a.a.each(t,function(e){l.a.parseBoolean(e,["indirect","optimizedForStreaming","premium","premiere","selected"]),l.a.parseInteger(e,["id","duration","width","height","bitrate","audioChannels","proxyType","beginsAt","endsAt","beginOffset","startOffsetSeconds","endOffsetSeconds"]),l.a.parseArray(e,"Part"),a.a.each(e.Part,function(e){null!=e.exists&&(e.exists=u.a.parseBoolean(e.exists)),
null!=e.accessible&&(e.accessible=u.a.parseBoolean(e.accessible)),l.a.parseInteger(e,["id","duration","size"]),l.a.parseBoolean(e,"optimizedForStreaming"),l.a.parseEncodedString(e,"file"),l.a.parseArray(e,"Stream"),a.a.each(e.Stream,function(e){l.a.parseBoolean(e,["selected","default","forced","timed","cabac","hasScalingMatrix","headerStripping"]),
l.a.parseInteger(e,["id","index","streamType","duration","width","height","bitrate","bitDepth","level","refFrames","samplingRate","channels","minLines"]),l.a.parseFloat(e,"frameRate")})})}),this.addNoneSubtitlesStreams(t)},addNoneSubtitlesStreams:function(e){var t=g.a.get("subtitles");return a.a.each(e,function(e){var i=a.a.first(e.Part);if(i&&i.Stream&&n.i(h.a)(e)){var r=n.i(p.a)(e,{streamType:t.id,selected:!0}),s={id:0,streamType:t.id,language:n.i(o.default)("None")};r.length||(s.selected=!0),
i.Stream.unshift(s)}}),e},normalize:function(e){return this.isLibraryItem(this.identifier,e.key)?e=this.normalizeType(e):(e=this.normalizeChannelKey(e),e=this.normalizeChannelType(e),e=this.normalizeChannelMetadata(e)),e},normalizeType:function(e){return"photo"===e.type&&e.childrenKey&&(e.type="photoalbum"),e},normalizeChannelKey:function(e){var t=e.key&&e.key.split("/");return t&&(1===t.length&&this.containerKey&&(e.hasInvalidKey=!0,e.originalKey=e.key,e.key=this.containerKey+"/"+e.key),
e.ratingKey||(e.ratingKey=e.originalKey||e.key)),e},normalizeChannelType:function(e){return e.type||(e.mediaType?e.type=e.mediaType:e.elementName&&(e.type=e.elementName.toLowerCase())),/image/i.test(e.type)&&(e.type="photo"),n.i(f.b)(e.type)||(e.type="channelDirectory"),e},normalizeChannelMetadata:function(e){return e.label?e.title=e.label:e.artist&&(e.track?(e.title=e.track,e.originalTitle=e.artist,e.parentTitle=e.album,e.grandparentTitle=e.albumArtist):e.album?(e.title=e.album,
e.parentTitle=e.artist):e.title=e.artist),e.totalTime&&(e.duration=e.totalTime),e},refreshChildren:function(){var e=this.get("children");e&&e.populatePromise&&e.fetch().always(function(){e.get("metadataItems").invoke("refreshChildren")})},resolveIndirect:function(e,t){var n=this,i=s.a.Deferred();if(!e||!t)return i.reject(this).promise();if(!e.indirect)return i.resolve(this).promise();if(t.postURL){var r=a.a.find([this.server,this.server.parent.get("primaryServer")],function(e){
return e&&e.get("isConnected")&&e.get("isFullServer")&&!e.get("activeConnection").get("isPossiblyCrossNetworkProtected")});if(r)return this.resolvePostUrl(e,t,r)}var o=t.key;this.server.get("isCloud")&&(o=this.server.swizzleNodeUrl(o));var l=s.a.ajax(this.server.getXHROptions(o));return l.done(function(a){n.mergeIndirectResponse(a,e,t)?i.resolve(n):i.reject(n)}),l.fail(function(){i.reject(n)}),i.promise()},resolvePostUrl:function(e,t,n){
var i=this,a=s.a.Deferred(),r=t.key,o=t.postURL,l=n.getXHROptions("/system/proxy");l.headers=l.headers||{},l.headers["X-Plex-Url"]=o;var u=s.a.ajax(l);return u=u.then(function(e,t,n){var a=d.join(r,{postURL:o});i.server.get("isCloud")&&(a=i.server.swizzleNodeUrl(a));var l=i.server.getXHROptions(a);return l.type="POST",l.headers=l.headers||{},l.data=n.getAllResponseHeaders()+"\r\n"+e,s.a.ajax(l)}),u.done(function(n,r,s){i.mergeIndirectResponse(n,e,t)?a.resolve(i):a.reject(i)}),u.fail(function(){
a.reject(i)}),a.promise()},mergeIndirectResponse:function(e,t,i){var r=u.a.parseXML(n.i(c.a)(e));if(!(r&&r.Metadata&&r.Metadata.Media&&r.Metadata.Media.Part))return!1;var s=a.a.first(this.convertMediaItems(r.Metadata.Media)),o=u.a.parseArray(s.Part),l=a.a.first(o);if(!s||!l)return!1;if(s.indirect=!1,a.a.extend(t,a.a.omit(s,"Part")),a.a.extend(i,l),o.length>1){var d;(d=t.Part).push.apply(d,o.slice(1))}if(r.httpHeaders){
for(var h,p=new RegExp("([^=]+)=([^&]+)&?","g"),f={};h=p.exec(r.httpHeaders);)h[1]in f?(a.a.isArray(f[h[1]])||(f[h[1]]=[f[h[1]]]),f[h[1]].push(h[2])):f[h[1]]=h[2];this.set("indirectHttpHeaders",f)}return!0},batchAdd:function(e,t,n){var i=a.a.map(e,function(e){return e.get("ratingKey")}),r=d.join(["/library/metadata",i.join(","),t,"add"],{tag:n}),o=this.server.getXHROptions(r,{type:"PUT"});return s.a.ajax(o)},getDownloadUrl:function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("Media")[e];if(t){var n=a.a.first(t.Part),i=n&&n.key;if(i){var r=d.join(i,{download:1});return this.server.resolveUrl(r,{appendToken:!0})}}},getFilepath:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("Media")[e];if(t){var n=a.a.first(t.Part);if(n)return n.file}},getLocation:function(){var e=this.get("Location");return e.length?a.a.first(e).path:this.getFilepath()},
getMediaKey:function(){var e=a.a.first(this.get("Media"));if(e){var t=a.a.first(e.Part);if(t)return t.key}return this.get("key")},isLibraryItem:function(e,t){return e?"com.plexapp.plugins.library"===e:/^(\/sync\/[\w\d-\/]*)?\/library\//.test(t)},isPlexMusicItem:function(){var e=this.section;return e&&"com.plexapp.agents.plexmusic"===e.get("agent")},onChildrenKeyChange:function(e,t){this.setChildrenKey(t)}});t.a=T},function(e,t,n){"use strict";function i(e){return e}var a=n(70);n.n(a),n(316),
n(33);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(1326),s=n(777),o=n(1327),l=n(1328),u=n(1329),c=n(1330),d=n(1331),h=n(1332),p=n(1333),f=n(1334),g=n(1337),m=n(1338),v=n(1339),y={parseType:function(e,t,n){var i=this.getByType("parse",e,this._parseTypeMap);return i?i(t,n):t},stringifyType:function(e,t,n){if(a.a.isString(t))return t;if(null==t)return"";var i=this.getByType("stringify",e,this._stringifyTypeMap);return i?i(t,n):t},getByType:function(e,t,n){
if(n&&a.a.has(n,t))return n[t];var i=t.charAt(0).toUpperCase()+t.slice(1),r=e+i;return a.a.has(this,r)?(n[t]=this[r],this[r]):void 0},parseBoolean:s.a,stringifyBoolean:g.a,parseInteger:u.a,parseFloat:l.a,parseString:p.a,parseEncodedString:o.a,parseArray:r.a,parseList:d.a,stringifyList:m.a,parseQueryString:h.a,stringifyQueryString:v.a,parseJSON:c.a,parseXML:f.a,reset:function(){this._parseTypeMap={json:this.parseJSON,xml:this.parseXML},this._stringifyTypeMap={}}};y.reset(),t.a=y},function(e,t,n){
"use strict";function i(e,t){if(t){var n=[];n.push(e);for(var i=arguments.length,a=Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];for(var s=0,o=a.length;s<o;s++){var l=a[s];l&&n.push(l)}return n.push(t),n.join("--")}}t.a=i},function(e,t,n){"use strict";function i(){return"id-"+a++}t.a=i;var a=0},function(e,t,n){"use strict";var i=n(236),a=n.n(i),r=n(2),s=n.n(r),o=n(52),l=n(5),u=n.n(l),c=n(44),d=n(33),h=n(19),p=n(183),f=n(364),g=o.a.Model.extend({mixins:[f.a],cache:new p.a,
constructor:function(e,t){if(e||(e={}),t||(t={}),this.server=this.findOption(t,"server"),this.section=this.findOption(t,"section"),this.channel=this.findOption(t,"channel"),this.device=this.findOption(t,"device"),this.parent=this.findOption(t,"parent"),this.findOption(t,"skipCache"))return void o.a.Model.prototype.constructor.apply(this,arguments);var n=this.cache.getItemCacheKey(this,e),i=this.cache.get(n);return i?(t.parse&&(e=i.parse(e)),
this.preserveCachedAttributes&&this.preserveCachedAttributes(t.url)?s.a.each(e,function(e,t){s.a.isUndefined(i.get(t))&&!s.a.isUndefined(e)&&i.set(t,e)}):i.set(e),i.server=this.server||i.server,i.section=this.section||i.section,i.channel=this.channel||i.channel,i.device=this.device||i.device,i.parent=this.parent||i.parent,t.collection&&(i.collection=t.collection),i):this.findOption(t,"onlyIfCached")?{}:(o.a.Model.prototype.constructor.apply(this,arguments),void this.cache.store(this,n))},
findOption:function(e,t){return e[t]||e.collection&&e.collection[t]},clone:function(){var e={server:this.server,section:this.section,channel:this.channel,parent:this.parent,skipCache:!0};return new this.constructor(this.attributes,e)||null},convert:function(e){return s.a.isObject(e)?e:c.a.parseXML(e)},parse:function(e,t){var n=this.convert(e);return this.whitelistedAttrs&&(n=s.a.pick(n,this.whitelistedAttrs)),n},save:function(e,t,n){var i,r,l,c=this.attributes
;null==e||"object"===(void 0===e?"undefined":a()(e))?(i=e,n=t):(i={})[e]=t,n=s.a.extend({validate:!0},n);var d=this.getSaveParams(i,n);if(s.a.extend(d,n.data),i&&!n.wait){if(!this.set(i,n))return!1}else if(!this._validate(i,n))return!1;if(i&&n.wait&&(this.attributes=s.a.extend({},c,i)),s.a.isEmpty(d)&&!n.force)return n.success&&n.success(this),u.a.Deferred().resolve(this);void 0===n.parse&&(n.parse=!0);var p=this,f=n.success;n.success=function(e){if(p.attributes=c,e){var t=p.parse(e,n)
;if(n.wait&&(t=s.a.extend(i||{},t)),s.a.isObject(t)&&!p.set(t,n))return!1;p.cache.store(p)}f&&f(p,e,n),p.trigger("sync",p,e,n)},o.a.wrapError(this,n),"patch"===(r=this.isNew()?"create":n.patch?"patch":"update")&&(n.attrs=i);var g=s.a.result(this,"saveUrl")||s.a.result(this,"url");return s.a.isEmpty(d)||(n.url=h.join(g,d)),n.data="",l=this.sync(r,this,n),i&&n.wait&&(this.attributes=c),l},getSaveParams:function(e,t){return this.isNew()?e||this.toJSON():this.changedAttributes(e)||{}},
getScopedKey:function(e){return null!=e&&s.a.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},restoreDefaults:function(e){var t=s.a.result(this,"defaults");if(!t)return this.clear(e);var n,i=this.attributes;for(n in i)n in t||this.unset(n,e);return this.set(t,e),this},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void n.i(d.a)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,i,r){var o
;"object"===(void 0===n?"undefined":a()(n))?(o=n,r=i):(o={})[n]=i;var l=s.a.extend({},r,{silent:!0}),u=e.call(this,o,l);return s.a.extend(t,this.changed),u},this.releaseCapturedChangeEvents=function(){s.a.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),s.a.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}}});g.extend=function(){var e=o.a.Model.extend.apply(this,arguments);return e.prototype.cache=new p.a,e},t.a=g},function(e,t,n){
"use strict";function i(e,t){return t||(t={}),r.a.defaults(t,{typeName:e,parse:r.a.bind(s.a.parseType,s.a,e)})}var a=n(2),r=n.n(a),s=n(61),o={xml:i("xml"),json:i("json",{accept:"application/json"}),text:i("text")};t.a=o},function(e,t,n){"use strict";var i=n(31),a={isHostedHttps:"https:"===window.location.protocol,hasConsole:!!(window.console&&window.console.log&&window.console.log.call),hasWebSocket:!!window.WebSocket,hasEventSource:!!window.EventSource,
hasReplaceState:!(!window.history||!window.history.replaceState),hasFileUpload:!!(window.File&&window.FileList&&window.FileReader),hasMediaSource:!(!window.MediaSource&&!window.WebKitMediaSource),hasObjectUrl:function(){return!("ie"===i.a.id&&11===parseInt(i.a.version,10)||i.a.presto||!(window.URL&&window.URL.createObjectURL&&window.URL.revokeObjectURL))}(),hasBlob:function(){try{return!!new window.Blob}catch(e){return!1}}(),hasFullscreen:function(){var e=document.createElement("div")
;return!!(e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen)}(),hasCanvas:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}(),hasTouchScreen:!!("ontouchstart"in window),hasPageVisibility:function(){return document.hidden===!0||document.hidden===!1}(),hasWebKitPageVisibility:function(){return document.webkitHidden===!0||document.webkitHidden===!1}(),hasPassiveEventListeners:function(){var e=!1;try{
var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}(),hasWebSpeech:!!window.speechSynthesis,isChromeApp:!(!window.chrome||!window.chrome.storage)};t.a=a},function(e,t,n){"use strict";n.d(t,"f",function(){return i}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"k",function(){return o}),n.d(t,"l",function(){return l}),n.d(t,"m",function(){return u}),n.d(t,"d",function(){
return c}),n.d(t,"b",function(){return d}),n.d(t,"j",function(){return h}),n.d(t,"h",function(){return p}),n.d(t,"a",function(){return f}),n.d(t,"i",function(){return g});var i="servers",a="providers",r="libraries",s="hubs",o="users",l="resources",u="friends",c="metadataLists",d="metadataItems",h="sessions",p="userPlaylistItems",f="mediaSubscriptions",g="playQueueItems"},function(e,t,n){"use strict";n.d(t,"l",function(){return i}),n.d(t,"g",function(){return a}),n.d(t,"a",function(){return r}),
n.d(t,"f",function(){return s}),n.d(t,"e",function(){return o}),n.d(t,"X",function(){return l}),n.d(t,"i",function(){return u}),n.d(t,"v",function(){return c}),n.d(t,"u",function(){return d}),n.d(t,"w",function(){return h}),n.d(t,"x",function(){return p}),n.d(t,"y",function(){return f}),n.d(t,"z",function(){return g}),n.d(t,"A",function(){return m}),n.d(t,"m",function(){return v}),n.d(t,"o",function(){return y}),n.d(t,"r",function(){return b}),n.d(t,"s",function(){return S}),
n.d(t,"I",function(){return I}),n.d(t,"K",function(){return w}),n.d(t,"p",function(){return M}),n.d(t,"F",function(){return C}),n.d(t,"Y",function(){return D}),n.d(t,"D",function(){return P}),n.d(t,"E",function(){return T}),n.d(t,"t",function(){return x}),n.d(t,"h",function(){return E}),n.d(t,"n",function(){return A}),n.d(t,"C",function(){return k}),n.d(t,"B",function(){return L}),n.d(t,"G",function(){return _}),n.d(t,"q",function(){return N}),n.d(t,"J",function(){return R}),
n.d(t,"H",function(){return O}),n.d(t,"d",function(){return j}),n.d(t,"U",function(){return z}),n.d(t,"V",function(){return U}),n.d(t,"O",function(){return F}),n.d(t,"W",function(){return B}),n.d(t,"T",function(){return V}),n.d(t,"L",function(){return H}),n.d(t,"S",function(){return W}),n.d(t,"Q",function(){return Y}),n.d(t,"R",function(){return Q}),n.d(t,"M",function(){return G}),n.d(t,"N",function(){return K}),n.d(t,"P",function(){return q}),n.d(t,"Z",function(){return X}),
n.d(t,"k",function(){return Z}),n.d(t,"j",function(){return J}),n.d(t,"b",function(){return $}),n.d(t,"c",function(){return ee})
;var i="claim",a="dismiss",r="skip",s="confirm",o="cancel",l="learn",u="complete",c="play",d="shuffle",h="playVersion",p="playPrimaryExtra",f="playRelatedMix",g="playRelatedMix",m="addToQueue",v="addToPlaylist",y="edit",b="markAsWatched",S="markAsUnwatched",I="refresh",w="analyze",M="fixMatch",C="unmatch",D="merge",P="splitApart",T="sync",x="optimize",E="download",A="delete",k="share",L="recommend",_="watchLater",N="getInfo",R="rate",O="selectStream",j="selectServer",z="optimizeDatabase",U="cleanBundles",F="emptyTrash",B="deleteServer",V="addLibrary",H="shareLibrary",W="updateLibrary",Y="cancelLibraryUpdate",Q="forceRefreshLibrary",G="editLibrary",K="analyzeLibrary",q="deleteLibrary",X="downloadServer",Z="whatsThis",J="optOutMetrics",$="subscribe",ee="gift"
},,function(e,t,n){e.exports={default:n(2439),__esModule:!0}},function(e,t,n){"use strict";function i(e,t){return a(t)||r(e)}function a(e){return e===o||e===l}function r(e){return e.length>1}var s=n(1);n.n(s);n.d(t,"e",function(){return o}),n.d(t,"a",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"c",function(){return c}),n.d(t,"d",function(){return d}),t.f=i,t.g=a;var o="poster",l="mosaic",u="table",c="summary",d="epgEpisode";s.PropTypes.oneOf([o,l,u,c,d])},,function(e,t,n){
"use strict";var i=n(67),a=n(62),r=n(17),s=n(18),o=n(702);n.d(t,"a",function(){return l});var l={LIBRARY_PROVIDER_IDENTIFIER:"com.plexapp.plugins.library",CHANNEL_PROVIDER_IDENTIFIER:"tv.plex.providers.channel",EPG_IDENTIFIER:/tv\.plex\.providers\.epg\./},u=s.a.extend({name:"ProviderModel",context:["server"],entityType:i.e,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(a.a)(this.entityType,e.identifier,this.server.entityID())},
idAttribute:"identifier",rootPropertyName:"MediaProvider",syncedAttrs:{identifier:r.a.string,title:r.a.string,types:r.a.list,protocols:r.a.list,subscriptions:r.a.boolean},syncedRelations:{features:{relationClass:o.a,rootPropertyName:"Feature",options:function(){return{provider:this}}}},derivedAttrs:{isLibraryProvider:function(){return this.get("identifier")===l.LIBRARY_PROVIDER_IDENTIFIER}}});t.b=u},function(e,t,n){"use strict"
;var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=n.n(u),d=n(30),h=n.n(d),p=n(1010),f=n.n(p),g=n(1009),m=n.n(g),v=n(800),y=n(27),b=n(22),S=n(2546),I=n.n(S),w=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i));return r.onScroll=function(e){if(e.target===r.refs.scroller){var t=e.target.scrollTop,n=e.target.scrollLeft,i=t!==r._currentScrollTop,a=n!==r._currentScrollLeft;(i||a)&&r._setScrollPosition({scrollTop:t,scrollLeft:n}),r.props.onScroll&&r.props.onScroll(e)
}},r.onScrollPositionChange=function(){r._animationFrameID=null,r.props.onScrollPositionChange({scrollTop:r._currentScrollTop,scrollLeft:r._currentScrollLeft})},r.onScrollTimeout=function(){r.setState({isScrolling:!1})},r.onScrollToUpdate=function(){r._updateScrollPosition(r._scrollToPosition),r.props.onScrollToUpdate&&r.props.onScrollToUpdate(r._scrollToPosition)},r.onScrollToComplete=function(){r._scrollToTween=null,r._scrollToPosition=null,
r.props.onScrollToComplete&&r.props.onScrollToComplete()},r.state={isScrolling:!1},r._currentScrollTop=0,r._currentScrollLeft=0,r}return l()(t,e),t.prototype.componentDidMount=function(){this._scrollTo(this.props)},t.prototype.componentWillReceiveProps=function(e){e.scrollTop===this.props.scrollTop&&e.scrollLeft===this.props.scrollLeft||this.setState({isScrolling:!0})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){
this.state.isScrolling&&(this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID),this._scrollTimeoutID=setTimeout(this.onScrollTimeout,this.props.isScrollingTimeout)),this._scrollTo(this.props)},t.prototype.componentWillUnmount=function(){this._clearTimeouts(),this._cancelScrollTo()},t.prototype._setScrollPosition=function(e){var t=e.scrollTop,n=e.scrollLeft;this._clearTimeouts(),this._currentScrollTop=t,this._currentScrollLeft=n,
this._animationFrameID=window.requestAnimationFrame(this.onScrollPositionChange)},t.prototype._updateScrollPosition=function(e){var t=e.scrollTop,n=e.scrollLeft;null!=t&&(this.refs.scroller.scrollTop=t),null!=n&&(this.refs.scroller.scrollLeft=n)},t.prototype._scrollTo=function(e){var t=e.scrollTop,n=e.scrollLeft;if(null!=t||null!=n){var i=null!=t&&t!==this._currentScrollTop,a=null!=n&&n!==this._currentScrollLeft;if(i||a){if(!this.props.smoothScroll)return this._currentScrollTop=t,
this._currentScrollLeft=n,void this._updateScrollPosition({scrollTop:t,scrollLeft:n});var r=this.props.smoothScrollDuration/1e3,s={ease:m.a.Power3.easeOut,onUpdate:this.onScrollToUpdate,onComplete:this.onScrollToComplete};this._scrollToPosition={},i&&(s.scrollTop=Math.min(t,this.refs.scroller.scrollHeight-this.refs.scroller.clientHeight),this._scrollToPosition.scrollTop=this.refs.scroller.scrollTop),a&&(s.scrollLeft=Math.min(n,this.refs.scroller.scrollWidth-this.refs.scroller.clientWidth),
this._scrollToPosition.scrollLeft=this.refs.scroller.scrollLeft),this._cancelScrollTo(),this._scrollToTween=f.a.to(this._scrollToPosition,r,s)}}},t.prototype._cancelScrollTo=function(){this._scrollToTween&&(this._scrollToTween.kill(),this._scrollToTween=null)},t.prototype._clearTimeouts=function(){this._animationFrameID&&window.cancelAnimationFrame(this._animationFrameID),this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID)},t.prototype.render=function(){
var e=this,t=this.props,i=t.style,a=t.className,r=t.children,s=t.scrollDirection,o=t.autoScroll,l=t.enableChildrenProps,u=t.onScroll,d=t.onScrollPositionChange;return c.a.createElement("div",{style:i,className:h()(a,I.a.scroller,I.a[s],o&&I.a.auto),ref:"scroller",onScroll:d?this.onScroll:u},l?n.i(v.a)(r,function(t){return c.a.cloneElement(t,{isScrolling:e.state.isScrolling,scrollTop:e._currentScrollTop,scrollLeft:e._currentScrollLeft})}):r)},t}(u.Component);w.defaultProps={
scrollDirection:b.a.VERTICAL,autoScroll:!1,smoothScroll:!0,smoothScrollDuration:400,enableChildrenProps:!1,isScrollingTimeout:100},t.a=w},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.innerClassName,a=e.scrollDirection,s=u()(e,["children","className","innerClassName","scrollDirection"]),l=a!==h.a.NONE;return n||(n=l?g.a.modalScroller:g.a.modalBody),d.a.createElement(p.a,r()({className:n,scrollDirection:a,autoScroll:!0},s),l?o()("div",{className:i},void 0,t):t)}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(22),p=n(74),f=n(2587),g=n.n(f);i.defaultProps={innerClassName:g.a.innerModalBody},t.a=i},function(e,t){e.exports={sliderTrackWidth:"60px",sliderThumbSize:"12px",menuSmallWidth:"120px",menuMediumWidth:"180px",menuLargeWidth:"220px",menuPadding:"8px",serverMenuItemHeight:"60px",tooltipArrowSize:"6px",smallArrowWidth:"6px",mediumArrowWidth:"8px",largeArrowWidth:"10px",sidebarWidth:"240px",sidebarLeftGutterWidth:"25px",
searchHubTitleHeight:"18px",searchResultWidth:"346px",searchResultHeight:"50px",posterTitlePadding:"10px",posterTitleHeight:"20px",posterCenterCircleSize:"42px",posterBadgeHeight:"24px",posterHoverSlideDistance:"10px",pageHeaderHeight:"60px",pagePadding:"60px",breadcrumbMargin:"25px",recordingPriorityPaneWidth:"360px",recordingPriorityPaneBorderWidth:"4px",recordingPriorityDragHandleWidth:"62px",breakpointExtraSmall:"480px",breakpointSmall:"768px",breakpointMedium:"992px",
breakpointLarge:"1200px",toolbarButtonWidth:"50px",jumpBarCharacterHeight:"25px",jumpBarGutter:"30px",tableHeaderHeight:"40px",tableRowHeight:"40px",tableCellPadding:"20px",playCellWidth:"42px",actionsCellWidth:"122px",summaryCellHeight:"136px",summaryCellPadding:"20px",mosaicCellPadding:"5px",timelineGutter:"60px",prePlaySummaryMaxWidth:"750px",prePlayPosterMinWidth:"150px",prePlayPosterMaxWidth:"230px",prePlayPosterWidthRatio:"0.15",prePlayContentPadding:"20px",
filterBuilderFooterHeight:"46px",autosuggestSuggestionRadius:"4px",inputBorderRadius:"4px",dvrSetupImageWidth:"193px"}},function(e,t){function n(e,t,n){return e!==t?n.fn(this):n.inverse(this)}e.exports=n},function(e,t,n){"use strict";function i(e){return n.i(a.a)(e,r,"Metadata")}var a=n(1335);n.d(t,"b",function(){return r});var r=["Directory","Video","Track","Photo","Playlist"];t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(499),s=n(50),o=n(32),l=n(492);n.d(t,"b",function(){
return l.a}),n.d(t,"c",function(){return l.b}),n.d(t,"h",function(){return u}),n.d(t,"a",function(){return c}),n.d(t,"f",function(){return d}),n.d(t,"g",function(){return h}),n.d(t,"i",function(){return p}),n.d(t,"d",function(){return f}),n.d(t,"e",function(){return g});var u=n.i(s.a)(o.F,function(e){return a.a.isString(e)?{type:r.a,message:e}:e}),c=n.i(s.a)(o.G),d=n.i(s.a)(o.H),h=n.i(s.a)(o.I),p=n.i(s.a)(o.J),f=n.i(s.a)(o.K),g=n.i(s.a)(o.L)},function(e,t,n){"use strict";function i(e){
return Math.min(window.innerHeight-2*O,e.maxHeight)}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(48),v=n.n(m),y=n(404),b=n(76),S=n.n(b),I=n(27),w=n(63),M=n(800),C=n(393),D=n(166),P=n(799),T=n(349),x=n(22),E=n(204),A=n.n(E),k=n(255),L=n(74),_=n(1998),N=n(2580),R=n.n(N),O=parseInt(S.a.menuPadding,10),j=n.i(D.a)(A.a.menuSpeed),z={appear:R.a.enter,appearActive:R.a.enterActive,enter:R.a.enter,enterActive:R.a.enterActive,leave:R.a.leave,
leaveActive:R.a.leaveActive},U=function(e){function t(a,r){u()(this,t);var s=d()(this,e.call(this,a,r));return s.onResize=function(e){s.setState({maxHeight:i(s.props)})},s.onWindowPress=function(e){var t=s.props.target,n=document.getElementById(s._menuID),i=n&&n.contains(e.target),a=!i&&document.getElementById(t),r=a&&a.contains(e.target);i||r||s.props.onMenuClose()},s.onKeyDown=function(e){var t=e.keyCode;t===y.a?T.a(e):t===y.b&&(e.preventDefault(),e.stopPropagation(),s.props.onMenuClose(),
T.b())},s.onMenuEnable=function(){s.setState({isDisabled:!1})},s.onMenuDisable=function(){s.setState({isDisabled:!0})},s.state={isDisabled:!1,maxHeight:i(a)},s._menuID=n.i(w.a)(),s}return p()(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onResize),this.props.isOpen&&this._enable()},t.prototype.shouldComponentUpdate=function(e,t){return n.i(I.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){
var n=!e.isOpen&&this.props.isOpen,i=this.props.isOpen&&t.isDisabled&&!this.state.isDisabled;if(n||i)this._enable();else{var a=e.isOpen&&!this.props.isOpen,r=this.props.isOpen&&!t.isDisabled&&this.state.isDisabled;(a||r)&&this._disable()}},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onResize),this.props.isOpen&&this._disable()},t.prototype._enable=function(){T.c(v.a.findDOMNode(this.refs.menu)),document.addEventListener("mouseup",this.onWindowPress),
document.addEventListener("touchend",this.onWindowPress),document.addEventListener("keydown",this.onKeyDown)},t.prototype._disable=function(){document.removeEventListener("mouseup",this.onWindowPress),document.removeEventListener("touchend",this.onWindowPress),document.removeEventListener("keydown",this.onKeyDown)},t.prototype.render=function(){var e=this,t=this.props,i=t.children,a=t.className,s=t.target,l=t.options,u=t.isOpen,c=t.size,d=t.scrollerProps,h=t.onMenuClose,p=this.state.maxHeight
;return o()(P.a,{className:R.a.menuPortal,target:s,options:l,isOpen:u,closeTimeout:j},void 0,o()(k.a,{id:this._menuID,transitionName:z,transitionAppearTimeout:j,transitionEnterTimeout:j,transitionLeaveTimeout:j},void 0,u&&o()(_.a,{className:a,size:c,isDisabled:this.state.isDisabled},void 0,g.a.createElement(L.a,r()({style:{maxHeight:p}},d),n.i(M.a)(i,function(t){var i=n.i(C.a)(h,t.props.onPress);return g.a.cloneElement(t,{onPress:i,onMenuEnable:e.onMenuEnable,onMenuDisable:e.onMenuDisable})
})))))},t}(f.Component);U.defaultProps={maxHeight:600,scrollerProps:{className:R.a.menuScroller,scrollDirection:x.a.VERTICAL,autoScroll:!0}},t.a=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n.n(i),r=n(61),s=n(78),o=n(67),l=n(62),u=n(244),c=n(17),d=n(65),h=n(18),p=n(305),f=h.a.extend({mixins:[u.a],name:"MetadataListModel",context:["server","section","metadataItem","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],
responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:o.d,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state,t=e.listIdentifier||e.containerKey||e.key;return n.i(l.a)(this.entityType,t,this.server.entityID(),this.section&&this.section.entityID(),this.metadataItem&&this.metadataItem.entityID())},idAttribute:"containerKey",collectionName:"metadataItems",url:function(){
return this.getPaginatedUrl(this.get("containerKey")||this.get("key"))},sessionAttrs:{isMetadataList:c.a.boolean,listIdentifier:c.a.string,containerKey:c.a.string,containerTitle:c.a.string,currentPageStart:c.a.integer,currentPageSize:c.a.integer,populatedRange:c.a.object,isPending:c.a.boolean,isPopulated:c.a.boolean,error:c.a.object},syncedAttrs:{key:c.a.string,librarySectionID:c.a.string,totalSize:c.a.integer,viewGroup:c.a.string,title:c.a.string,thumb:c.a.string,art:c.a.string,
banner:c.a.string,theme:c.a.string,allowSync:c.a.boolean},syncedRelations:{metadataItems:{relationClass:p.a,rootPropertyName:"Metadata",options:function(e){return{containerKey:e.containerKey||e.key}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},derivedAttrs:{firstItemType:function(){var e=this.getCollection().first();return e?e.get("type"):this.attributes.firstItemType},isFirstItemLibraryItem:function(){var e=this.getCollection().first()
;return e?e.get("isLibraryItem"):this.attributes.isFirstItemLibraryItem}},defaults:function(){return{isMetadataList:!0,populatedRange:{start:0,end:0,size:0},isPending:!0,isPopulated:!1,error:null}},initialize:function(e){this._totalSizeAdjustment=0,this.startPopulatedRangeMonitor(),this.on("change:key change:containerKey",this.onContainerKeyChange,this)},uninitialize:function(){this.off("change:key change:containerKey",this.onContainerKeyChange,this),this.stopListening()},
augmentResponseText:function(e,t){return t===d.a.xml?n.i(s.a)(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var i=e[t];void 0!==i&&n.setContext(t,i)});var i=r.a.parseArray(e.Metadata),s=r.a.parseInteger(e.totalSize);return this.allowAllLeaves||(e.Metadata=a.a.reject(i,function(e){var t=/\/allLeaves$/.test(e.key);return t&&(this._totalSizeAdjustment-=1),t},this)),s&&this._totalSizeAdjustment&&(e.totalSize=s-this._totalSizeAdjustment),
!e.title&&e.title1&&(e.title=e.title1),e},onContainerKeyChange:function(e,t){var n=this.get("metadataItems"),i=this.syncedRelations.metadataItems.options(this.attributes);a.a.each(i,function(e,t){n.setContext(t,e)})}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"DEFAULT",function(){return i}),n.d(t,"PRIMARY",function(){return a}),n.d(t,"SUCCESS",function(){return r}),n.d(t,"DANGER",function(){return s}),n.d(t,"all",function(){return o})
;var i="default",a="primary",r="success",s="danger",o=[i,a,r,s]},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(5),o=n.n(s),l=n(44),u=n(19),c=n(498),d=n(364),h=r.a.Collection.extend({mixins:[d.a],cache:new c.a,constructor:function(e,t){if(t||(t={}),this.server=t.server,this.section=t.section,this.channel=t.channel,this.device=t.device,this.parent=t.parent,this.allowInCache=t.allowInCache,this.persistInCache=t.persistInCache,this.skipCache=t.skipCache,t.url&&(this.url=t.url),
t.path&&(this.path=t.path),null==t.pageStart&&null==t.pageSize||(this.pageStart=t.pageStart||0,this.pageSize=t.pageSize||0),t.populated&&this.resetPopulatePromise(o.a.Deferred().resolve().promise()),!t.allowInCache&&!t.persistInCache)return void r.a.Collection.prototype.constructor.apply(this,arguments);this.initialize.apply(this,arguments);var n=this.cache.getItemCacheKey(this),i=this.cache.get(n);if(this.uninitialize(),t.onlyIfCached&&(i||(i={})),i)return i
;r.a.Collection.prototype.constructor.apply(this,arguments),this.cache.store(this,n)},uninitialize:function(){this.stopListening()},sync:function(){return(this.allowInCache||this.persistInCache)&&this.cache.store(this),r.a.sync.apply(this,arguments)},syncUrl:function(){var e="";if(this.url&&(e=a.a.result(this,"url")),this.path&&(e=u.join([e,a.a.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var t=this.pageStart||0,n=this.pageSize||0,i={};i["X-Plex-Container-Start"]=t,
i["X-Plex-Container-Size"]=n,e=u.join(e,i)}return e},convert:function(e,t){var n=a.a.isObject(e)?e:l.a.parseXML(e);if(!t)return n;var i=n[t];return i?(a.a.isArray(i)||(i=[i]),i):[]},clone:function(e){var t={server:this.server,section:this.section,parent:this.parent,url:this.url};return e||(e=this.models),new this.constructor(e,t)},cloneDeep:function(e){return e||(e=this.map(function(e){return e.clone()})),this.clone(e)},clear:function(e){e=a.a.extend({silent:!0},e),this.abortPendingPopulate(),
this.resetPopulatePromise(null),this.reset([],e)}});h.extend=function(){var e=r.a.Collection.extend.apply(this,arguments);return e.prototype.cache=new c.a,e},t.a=h},function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"i",function(){return a}),n.d(t,"h",function(){return r}),n.d(t,"l",function(){return s}),n.d(t,"k",function(){return o}),n.d(t,"j",function(){return l}),n.d(t,"m",function(){return u}),n.d(t,"e",function(){return c}),n.d(t,"f",function(){return d}),
n.d(t,"d",function(){return h}),n.d(t,"a",function(){return p}),n.d(t,"b",function(){return f}),n.d(t,"g",function(){return g});var i="picker",a="fallback",r="startup",s="server",o="library",l="list",u="selection",c="settings",d="setupWizard",h="serverDownload",p="agenda",f="calendar",g="navBar"},function(e,t){function n(e){return encodeURIComponent(e||"")}e.exports=n},function(e,t,n){"use strict";var i=n(4),a=n(214),r=["id","typeString"],s=n.i(a.a)(r,[{id:1,typeString:"video",
key:"videoStreamID",title:function(){return n.i(i.default)("Video")}},{id:2,typeString:"audio",key:"audioStreamID",title:function(){return n.i(i.default)("Audio")}},{id:3,typeString:"subtitles",key:"subtitleStreamID",title:function(){return n.i(i.default)("Subtitles")}},{id:4,typeString:"lyrics",key:"lyricStreamID",title:function(){return n.i(i.default)("Lyrics")}}]);t.a=s},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=(n(33),n(27)),f=n(2529),g=n.n(f),m=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));v.call(a);var r=n.ignoreWidth,o=n.ignoreHeight,u=n.ignorePosition;return a.state={isMeasured:!1,width:r?void 0:0,scrollWidth:r?void 0:0,height:o?void 0:0,scrollHeight:o?void 0:0,x:u?void 0:0,y:u?void 0:0},a}return c()(t,e),t.prototype.componentDidMount=function(){this._requestFrame()},
t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._cancelFrame(),this._clearTimeout()},t.prototype._cancelFrame=function(){this._frameRequestID&&(this._frameRequestID=window.cancelAnimationFrame(this._frameRequestID))},t.prototype._clearTimeout=function(){this._measureTimeoutID&&(this._measureTimeoutID=clearTimeout(this._measureTimeoutID))},t.prototype._reset=function(){var e=this._expandContainer,t=this._shrinkContainer
;e.scrollTop=1e5,e.scrollLeft=1e5,t.scrollTop=1e5,t.scrollLeft=1e5},t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,i=e.style,r=e.onKey,s=(e.onMeasure,"function"!=typeof n);return h.a.createElement("div",{className:t,style:i,ref:this._setContainerRef,onKey:r},s?n:n(this.state),h.a.createElement("div",{className:g.a.scrollContainer,ref:this._setExpandContainerRef,onScroll:this.onScroll},a()("div",{className:g.a.expandContent})),h.a.createElement("div",{
className:g.a.scrollContainer,ref:this._setShrinkContainerRef,onScroll:this.onScroll},a()("div",{className:g.a.shrinkContent})))},t}(d.Component),v=function(){var e=this;this._requestFrame=function(){e._clearTimeout(),e._cancelFrame(),e._frameRequestID=window.requestAnimationFrame(e._measure)},this._requestTimeout=function(){e._clearTimeout(),e._cancelFrame(),e._measureTimeoutID=setTimeout(e._requestFrame,e.props.resizeTimeout)},this._measure=function(){
var t=e.props,n=t.ignoreWidth,i=t.ignoreHeight,a=t.ignorePosition,r=e.state,s=r.isMeasured,o=r.width,l=r.scrollWidth,u=r.height,c=r.scrollHeight,d=r.x,h=r.y,p=e._container,f=p.getBoundingClientRect(),g=s!==!0,m=!a&&(f.left!==d||f.top!==h),v=!n&&(f.width!==o||p.scrollWidth!==l),y=!i&&(f.height!==u||p.scrollHeight!==c);if(g||m||v||y){var b=window.getComputedStyle(p),S={isMeasured:!0};if(a||(S.x=m?f.left:d,S.y=m?f.top:h),!n){var I=parseInt(b.paddingRight,10)||0,w=parseInt(b.paddingLeft,10)||0
;S.width=v?f.width-w-I:o,S.scrollWidth=v?p.scrollWidth:l}if(!i){var M=parseInt(b.paddingTop,10)||0,C=parseInt(b.paddingBottom,10)||0;S.height=y?f.height-M-C:u,S.scrollHeight=y?p.scrollHeight:c}e.setState(S),e.props.onMeasure&&e.props.onMeasure(S)}e._reset()},this._setContainerRef=function(t){e._container=t;var n=e.props.onContainerRef;n&&n(t)},this._setExpandContainerRef=function(t){e._expandContainer=t},this._setShrinkContainerRef=function(t){e._shrinkContainer=t},this.onScroll=function(t){
e._requestTimeout()}};m.defaultProps={className:g.a.container,ignoreWidth:!1,ignoreHeight:!1,ignorePosition:!1,resizeTimeout:100},t.a=m},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(50),s=n(32);n.d(t,"n",function(){return o}),n.d(t,"x",function(){return l}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return c}),n.d(t,"b",function(){return d}),n.d(t,"c",function(){return h}),n.d(t,"a",function(){return p}),n.d(t,"i",function(){return f}),n.d(t,"h",function(){return g}),
n.d(t,"o",function(){return m}),n.d(t,"k",function(){return v}),n.d(t,"l",function(){return y}),n.d(t,"m",function(){return b}),n.d(t,"g",function(){return S}),n.d(t,"p",function(){return I}),n.d(t,"q",function(){return w}),n.d(t,"r",function(){return M}),n.d(t,"v",function(){return C}),n.d(t,"w",function(){return D}),n.d(t,"t",function(){return P}),n.d(t,"u",function(){return T}),n.d(t,"f",function(){return x}),n.d(t,"s",function(){return E}),n.d(t,"j",function(){return A})
;var o=n.i(r.a)(s.i),l=n.i(r.a)(s.j),u=n.i(r.a)(s.k),c=n.i(r.a)(s.l),d=n.i(r.a)(s.m),h=n.i(r.a)(s.n),p=n.i(r.a)(s.o),f=n.i(r.a)(s.p),g=n.i(r.a)(s.q),m=n.i(r.a)(s.r),v=n.i(r.a)(s.s),y=n.i(r.a)(s.t),b=n.i(r.a)(s.u),S=n.i(r.a)(s.v),I=n.i(r.a)(s.w),w=n.i(r.a)(s.x),M=n.i(r.a)(s.y),C=n.i(r.a)(s.z),D=n.i(r.a)(s.A),P=n.i(r.a)(s.B),T=n.i(r.a)(s.C),x=n.i(r.a)(s.D),E=n.i(r.a)(s.E),A=n.i(r.a)(s.p,function(e){return a()({},e,{cancel:!0})})},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(50),s=n(19),o=n(32);n.d(t,"a",function(){return l}),n.d(t,"j",function(){return u}),n.d(t,"h",function(){return c}),n.d(t,"r",function(){return d}),n.d(t,"q",function(){return h}),n.d(t,"s",function(){return p}),n.d(t,"t",function(){return f}),n.d(t,"n",function(){return g}),n.d(t,"k",function(){return m}),n.d(t,"l",function(){return v}),n.d(t,"o",function(){return y}),n.d(t,"m",function(){return b}),n.d(t,"i",function(){return S}),n.d(t,"d",function(){return I}),
n.d(t,"e",function(){return w}),n.d(t,"z",function(){return M}),n.d(t,"A",function(){return C}),n.d(t,"f",function(){return D}),n.d(t,"g",function(){return P}),n.d(t,"w",function(){return T}),n.d(t,"u",function(){return x}),n.d(t,"v",function(){return E}),n.d(t,"x",function(){return A}),n.d(t,"y",function(){return k}),n.d(t,"p",function(){return L}),n.d(t,"B",function(){return _}),n.d(t,"b",function(){return N}),n.d(t,"c",function(){return R})
;var l=n.i(r.a)(o._35),u=n.i(r.a)(o._36),c=n.i(r.a)(o._37),d=n.i(r.a)(o._38),h=n.i(r.a)(o._39),p=n.i(r.a)(o._40),f=n.i(r.a)(o._41),g=n.i(r.a)(o._42),m=n.i(r.a)(o._43),v=n.i(r.a)(o._44),y=n.i(r.a)(o._45),b=n.i(r.a)(o._46),S=n.i(r.a)(o._47),I=n.i(r.a)(o._48),w=n.i(r.a)(o._49),M=n.i(r.a)(o._50),C=n.i(r.a)(o._51),D=n.i(r.a)(o._52),P=n.i(r.a)(o._53),T=n.i(r.a)(o._54),x=n.i(r.a)(o._55),E=n.i(r.a)(o._56),A=n.i(r.a)(o._57),k=n.i(r.a)(o._58),L=n.i(r.a)(o._59),_=n.i(r.a)(o._60),N=n.i(r.a)(o._61,function(e){
var t=s.join("/livetv/epg/channels",{lineup:e.lineupUUID});return a()({options:{url:t}},e)}),R=n.i(r.a)(o._62,function(e){var t=s.join("/livetv/epg/channelmap",{device:e.deviceUUID,lineup:e.lineupUUID});return a()({options:{url:t}},e)})},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.separator;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2539)),l=n.n(o);i.defaultProps={className:l.a.separator,separator:"\u2014"},t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.children,n=r()(e,["children"]);return o.a.createElement("div",n,t)}var a=n(16),r=n.n(a),s=n(1),o=n.n(s),l=n(2592),u=n.n(l);i.defaultProps={className:u.a.buttonBar},t.a=i},function(e,t,n){"use strict";var i=n(1);n.n(i),i.PropTypes.shape({identifier:i.PropTypes.string.isRequired,isLibraryProvider:i.PropTypes.bool.isRequired,protocols:i.PropTypes.object.isRequired,features:i.PropTypes.object.isRequired})},function(e,t,n){"use strict";var i=n(1);n.n(i),
i.PropTypes.shape({machineIdentifier:i.PropTypes.string.isRequired,allowSync:i.PropTypes.bool,allowMediaDeletion:i.PropTypes.bool,transcoderVideo:i.PropTypes.bool,isFullServer:i.PropTypes.bool.isRequired,isFullOwnedServer:i.PropTypes.bool.isRequired})},function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&t&&n){var r=encodeURIComponent(e.machineIdentifier);if(t.isLibraryProvider){if(e.isCloudSyncServer){
var s=encodeURIComponent(n+"/all");return a.join("#!/server/"+r+"/list?key="+s,i)}var o="/"===String(n).charAt(0),l=o?n:"/library/sections/"+n,u=encodeURIComponent(l);return a.join("#!/server/"+r+"?key="+u,i)}var c=encodeURIComponent(t.identifier),d=encodeURIComponent(n);return a.join("#!/server/"+r+"/provider/"+c+"?key="+d,i)}}var a=n(19);t.a=i},function(e,t,n){"use strict";var i=n(138),a=new i.a({interface:["get","set","remove","clear"]});t.a=a},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(2),l=n.n(o),u=n(52),c=n(13),d=n(33),h=n(19),p=n(66),f=n(508),g=n(67),m=n(62),v=n(183),y=n(309),b=n(298),S=n(28),I=n(530),w=n(23),M=n(56),C=n(17),D=n(477),P=n(484),T=n(18),x=n(687),E=n(480),A=n(1176),k=n(487),L=n(179),_=n(156),N={PENDING:"pending",CONNECTED:"connected",UNAVAILABLE:"unavailable",UNAUTHORIZED:"unauthorized"},R={PENDING:"pending",RESOLVED:"resolved",REJECTED:"rejected"},O={SECONDARY:"secondary"
},j=["camera_upload","cloudsync","content_filter","home","lyrics","music_videos","pass","premium_music_metadata","sync","trailers"],z=T.a.extend({mixins:[P.a],name:"ServerModel",entityType:g.f,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(m.a)(this.entityType,e.machineIdentifier||this.cid)},idAttribute:"machineIdentifier",connectionTestTimeout:1e4,cache:new v.a,persistInCache:!0,sessionAttrs:{
connectionTestResult:C.a.oneOf(N.PENDING,N.CONNECTED,N.UNAVAILABLE,N.UNAUTHORIZED).isRequired,promiseState:C.a.oneOf(R.PENDING,R.RESOLVED,R.REJECTED).isRequired,sections:C.a.instanceOf(E.a).isRequired,playlists:C.a.instanceOf(A.a).isRequired,playQueueManager:C.a.instanceOf(x.a).isRequired,isShared:C.a.boolean.isRequired,isBundled:C.a.boolean.isRequired,isCloud:C.a.boolean.isRequired,isMerged:C.a.boolean.isRequired,superToken:C.a.string,accessToken:C.a.string,sourceTitle:C.a.string,
publicAddressMatches:C.a.boolean,httpsRequired:C.a.boolean,presence:C.a.boolean,home:C.a.boolean,synced:C.a.boolean,createdAt:C.a.integer,lastSeenAt:C.a.integer,ownerId:C.a.integer,hasEventConnection:C.a.boolean,serverClass:C.a.oneOf(O.SECONDARY)},sessionRelations:{activeConnection:{relationClass:L.a,deferred:!0},connections:{relationClass:k.a,options:function(){return{server:this}}}},syncedAttrs:{machineIdentifier:C.a.string,friendlyName:C.a.string,startState:C.a.string,version:C.a.string,
platform:C.a.string,platformVersion:C.a.string,sync:C.a.boolean,backgroundProcessing:C.a.boolean,multiuser:C.a.boolean,transcoderLyrics:C.a.boolean,myPlex:C.a.boolean,myPlexMappingState:C.a.string,myPlexSigninState:C.a.string,myPlexSubscription:C.a.boolean,myPlexUsername:C.a.string,transcoderPhoto:C.a.boolean,transcoderAudio:C.a.boolean,transcoderVideo:C.a.boolean,transcoderVideoRemuxOnly:C.a.boolean,transcoderSubtitles:C.a.boolean,transcoderActiveVideoSessions:C.a.integer,
allowMediaDeletion:C.a.boolean,allowCameraUpload:C.a.boolean,allowChannelAccess:C.a.boolean,allowSync:C.a.boolean,diagnostics:C.a.list,companionProxy:C.a.boolean,updater:C.a.boolean,isDesktop:C.a.boolean,photoAutoTag:C.a.boolean,itemClusters:C.a.boolean,updatedAt:C.a.integer,countryCode:C.a.string,ownerFeatures:C.a.list,mediaProviders:C.a.integer,maxUploadBitrate:C.a.integer,maxUploadBitrateReason:C.a.string,maxUploadBitrateReasonMessage:C.a.string},derivedAttrs:{debugName:function(){
var e=this.get("machineIdentifier"),t=this.get("connections"),n=1===t.length&&t.at(0).get("isLoopback"),i=this.get("friendlyName");return!i&&n&&(i="[Loopback]"),i||(e?"["+e+"]":"[Anonymous]")},shortVersion:function(){return n.i(I.a)(this.get("version"))},isConnected:function(){return this.get("connectionTestResult")===N.CONNECTED},isUnavailable:function(){return this.get("connectionTestResult")===N.UNAVAILABLE},isUnauthorized:function(){return this.get("connectionTestResult")===N.UNAUTHORIZED},
isPending:function(){return this.get("promiseState")===R.PENDING},isResolved:function(){return this.get("promiseState")===R.RESOLVED},isRejected:function(){return this.get("promiseState")===R.REJECTED},isRelayed:function(){var e=this.get("activeConnection");return!(!e||!e.get("relay"))},isSecure:function(){var e=this.get("activeConnection");return!(!e||!e.get("isSecure"))},hasHttpsConnections:function(){return!!this.get("connections").findWhere({isHttps:!0})},hasFallbackConnections:function(){
return!!this.get("connections").findWhere({isFallback:!0})},isCloudSyncServer:function(){return!!this.get("synced")},isPersonalCloudServer:function(){return"Cloud"===this.get("platform")},isMobileServer:function(){return!this.get("synced")&&this.get("serverClass")===O.SECONDARY},isFullServer:function(){return!this.get("isCloud")&&!this.get("isCloudSyncServer")&&!this.get("isMobileServer")},isCloudBased:function(){return this.get("isCloud")||this.get("isCloudSyncServer")},
isFullOwnedServer:function(){return this.get("isFullServer")&&!this.get("isShared")},isPrimaryEligible:function(){return!(!M.a.get("allowCloudSyncServers")&&this.get("isCloudSyncServer"))&&(!(!M.a.get("allowMobileServers")&&this.get("isMobileServer"))&&(!!this.get("machineIdentifier")&&!this.get("isUnauthorized")&&!this.get("isCloud")))},isOutOfDate:function(){return!this.get("isCloudSyncServer")&&(!this.get("isMobileServer")&&!this.isVersionOrNewer("1.3.0"))},isClaimed:function(){
return!!this.get("isPersonalCloudServer")||(this.get("isConnected")?"ok"===this.get("myPlexSigninState"):void 0)},hasManualConnection:function(){return this.get("connections").some(function(e){return e.get("sources").some(function(e){return/^manual/.test(e.id)})})},shared:function(){return this.get("isShared")},bundled:function(){return this.get("isBundled")},cloud:function(){return this.get("isCloud")},merged:function(){return this.get("isMerged")},connected:function(){
return this.get("connectionTestResult")===N.PENDING?null:this.get("isConnected")},available:function(){return this.get("connectionTestResult")===N.PENDING?null:!this.get("isUnavailable")},authorized:function(){return this.get("connectionTestResult")===N.PENDING?null:this.get("isResolved")},relayed:function(){return this.get("isRelayed")}},defaults:function(){return{connectionTestResult:N.PENDING,promiseState:R.PENDING,sections:new E.a([],{server:this}),playlists:new A.a({},{server:this}),
playQueueManager:new x.a({server:this}),isShared:!1,isBundled:!1,isCloud:!1,isMerged:!1,hasEventConnection:!1,sync:!1,backgroundProcessing:!1,allowChannelAccess:!1,updater:!0,ownerFeatures:[]}},url:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.get("activeConnection");n.i(d.a)(t,"An active or manual connection is required for a server url");var e=l.a.result(t,"url");return/\/$/.test(e)||(e+="/"),e},initialize:function(){this._reset(),
this.on("change:machineIdentifier",this.onMachineIdentifierChange,this),this.listenTo(this.get("connections"),{remove:this.onConnectionRemove,reset:this.onConnectionsReset})},uninitialize:function(){this.off("change:machineIdentifier",this.onMachineIdentifierChange,this),this.stopListening()},updateEntity:function(){if(!this.get("isMerged"))return T.a.prototype.updateEntity.apply(this,arguments)},fetch:function(){return u.a.Model.prototype.fetch.apply(this,arguments)},resolveUrl:function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(/^\w+:\/\//.test(e))return e;var n=void 0;n=t.useRelativeUrl?this.get("isMobileServer")?"http://127.0.0.1:"+this.getLoopbackPort()+"/":"":this.url(t.connection);var i=this.get("accessToken"),a=l.a.extend({},t.params);return t.appendHeaders&&l.a.defaults(a,this.getHeaders()),t.appendToken&&i&&(a["X-Plex-Token"]=i),h.join([n,e],a)},swizzleUrl:function(e,t){var n=e.match(/^\w+:\/\/.+?(\/.+)$/),i=n?n[1]:e;return this.resolveUrl(i,t)
},getXHROptions:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.headers,i=s()(t,["headers"]);return a()({url:this.resolveUrl(e),dataType:"text",headers:l.a.extend(this.getHeaders(),n),allowHeadersInUrl:!0,allowBlacklistedMethodHeaders:this.supports("allowBlacklistedMethodHeaders")},i)},getHeaders:function(){var e=b.a.getInstance(),t=l.a.clone(e),i=this.get("accessToken");i&&(t["X-Plex-Token"]=i);var a=n.i(c.a)("appModel").get("settings"),r=a.get("language")
;return r&&(t["Accept-Language"]=r),t},addConnection:function(e){e.sources||(e.sources=[{id:"internal"}]);var t=this.get("connections"),n=new L.a(e),i=t.get(n.id);if(i){return i.get("sources").set(e.sources,{remove:!1}),i}return t.add(e)},hasSource:function(e){return this.get("connections").some(function(t){return t.hasSource(e)})},removeSource:function(e){for(var t=this.get("connections"),n=t.length-1;n>=0;){t.at(n).get("sources").remove(e),n--}},testAllConnections:function(){
var e=this,t=this.get("connections");return n.i(S.a)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName")),this._reset(),t.each(function(t){var n=!t.get("relay"),i=!t.get("isUntested");(n||i)&&e.testConnection(t)}),this.populatePromise},testOnlyUntestedConnections:function(){var e=this;return this.get("connections").each(function(t){var n=!t.get("relay"),i=t.get("isUntested"),a=t.get("isAborted");n&&(i||a)&&e.testConnection(t)}),this.populatePromise},
testOnlyUntestedRelayConnections:function(){var e=this;return this.get("connections").each(function(t){var n=t.get("relay"),i=t.get("isUntested");n&&i&&e.testConnection(t)}),this.populatePromise},testConnection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.server=this,t.connection=e,this.get("promiseState")===R.REJECTED&&this._reset(),
w.a.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this))},abortAllConnectionTests:function(){var e=this,t=this.get("connections");n.i(S.a)("[Connections] Aborting all pending connection tests for",this.get("debugName")),t.each(function(t){e.abortConnectionTest(t)})},abortConnectionTest:function(e){var t={server:this,connection:e};w.a.execute("abortServerConnectionTest",t)},populateIdentity:function(e){var t=this
;if(this._identityPromise)return this._identityPromise;var n=w.a.execute("populateServerIdentity",{server:this,connection:e});return n.done(function(e){t.set("machineIdentifier",e)}),this._identityPromise=n,n},updateCacheKey:function(){var e=this.get("debugName"),t=this.cacheKey(this.attributes),i=this.cache.get(t);if(i){var a=i.get("debugName");S.a.warn("[Identity] %s and %s (cached) collide",e,a),
i.get("isConnected")||!this.get("isConnected")?(n.i(S.a)("[Identity] Merging %s into %s (cached)",e,a),i.merge(this)):(n.i(S.a)("[Identity] Merging %s (cached) into %s",a,e),this.merge(i),this.cache.store(this,t))}else this.cache.store(this,t)},merge:function(e){var t=this;e.set("isMerged",!0),e.get("isBundled")&&this.set("isBundled",!0),e.get("connections").each(function(e){t.addConnection(e.toJSON())}),this.collection&&(this.collection.remove(e.cid,{silent:!0}),
this.collection._byId[this.id]=this,this.collection.trigger("remove",e,this.collection),this.collection.trigger("update",this.collection)),this.cache.remove(e),M.a.get("shouldCreateStateTree")&&this.updateEntity()},hasOwnerFeature:function(e){return this.supports("ownerFeatures")?this.get("ownerFeatures").indexOf(e)>-1:!!this.get("myPlexSubscription")&&j.indexOf(e)>-1},supports:function(e){var t=this.get(e);if(l.a.isBoolean(t))return t;var n=_.a[e];return null!=n&&this.isVersionOrNewer(n)},
isVersionOrNewer:function(e){var t=this.get("shortVersion");return!e||n.i(f.a)(t,e)},hasRegression:function(e){if(!e)return!1;var t=this.isVersionOrNewer(e.introduced),n=e.resolved&&this.isVersionOrNewer(e.resolved);return t&&!n},canAllowHttpFallback:function(){if(!this.get("isFullServer")||this.get("isPersonalCloudServer"))return!1;if(p.a.isHostedHttps&&!M.a.get("allowMixedContent"))return!1
;var e=n.i(c.a)("appModel").get("settings"),t=e.get("allowHttpFallback"),i=t===y.a.ALWAYS,a=t===y.a.SAME_NETWORK;return!!(i||a&&this.get("publicAddressMatches"))},hasOtherLoopbackServer:function(){return!!this.collection&&this.collection.hasLoopbackServer()},getLoopbackPort:function(){var e=this.get("connections").findWhere({isPrivate:!0});return e?e.get("port"):"32400"},hasLocalConnection:function(){var e=this.get("activeConnection");return e&&e.get("isPrivate")},authenticate:function(e){
this._resolve({accessToken:e})},deauthenticate:function(){this._reject({accessToken:null})},_reset:function(){this.startCapturingChangeEvents(),this.set("promiseState",R.PENDING),this._resetPopulate(),this.releaseCapturedChangeEvents()},_resolve:function(e){var t=l.a.extend({connectionTestResult:N.CONNECTED,promiseState:R.RESOLVED},e);this.startCapturingChangeEvents(),this.set(t),this._resolvePopulate(),this.releaseCapturedChangeEvents()},_reject:function(e){var t=this.get("connections")
;t.hasOnlyFailedConnections()&&S.a.warn("[Connections] All connections to %s failed",this.get("debugName"));var n=t.findWhere({isUnauthorized:!0})?N.UNAUTHORIZED:N.UNAVAILABLE,i=l.a.extend({connectionTestResult:n,promiseState:R.REJECTED},e);this.startCapturingChangeEvents(),this.set(i),this._rejectPopulate(),this.releaseCapturedChangeEvents()},_checkActiveConnection:function(){var e=this.get("activeConnection"),t=this.get("connections");if(e&&!t.contains(e)){var n=t.getBestConnection()
;n?this.set(a()({activeConnection:n},n.get("serverAttrs"))):this.testAllConnections()}},onMachineIdentifierChange:function(e,t){this.collection?this.listenToOnce(this.collection,"change:machineIdentifier",function(){this.updateCacheKey()}):this.updateCacheKey()},onConnectionRemove:function(e,t){t.length?this._checkActiveConnection():(this.trigger("change:connections.remove",e,t),this.trigger("change:connections.change",this,t),this.trigger("destroy",this,this.collection))},
onConnectionsReset:function(e,t){e.length?this._checkActiveConnection():(this.trigger("change:connections.reset",e,t),this.trigger("change:connections.change",this,e),this.trigger("destroy",this,this.collection))},onConnectionTestSuccess:function(e){var t=this.get("connections").getBestConnection();if(t!==this.get("activeConnection")&&S.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this._resolve(a()({activeConnection:t},t.get("serverAttrs"))),
M.a.get("allowLoopbackDiscovery")){var i=this.get("connections"),r=this.get("activeConnection"),s=r.get("isPrivate"),o=!!i.findWhere({isLoopback:!0});!s||o||this.hasOtherLoopbackServer()||(n.i(S.a)("[Connections] Adding possible loopback connection for",this.get("debugName")),this.addConnection(r.getLoopbackAttributes()))}},onConnectionTestError:function(e,t){var i=this;if(!e.get("isAborted")){var a=this.get("connections")
;if(e.get("isHttps")&&!e.get("isUnauthorized")&&!e.get("relay"))if(this.canAllowHttpFallback()){var r=this.addConnection({scheme:"http",address:e.get("address"),port:e.get("port"),isFallback:!0});n.i(S.a)("[Connections] Added insecure fallback connection for %s at %s",this.get("debugName"),r.id)}else S.a.warn("[Connections] Prevented fallback to insecure connection for",this.get("debugName"));!this.id&&e.get("isUnauthorized")&&this.populateIdentity(e),
a.hasOnlyFailedConnections()?this.id||!this._identityPromise?this._reject():this._identityPromise.always(function(){a.hasOnlyFailedConnections()&&i._reject()}):a.hasFailedEveryDirectConnection()&&this.testOnlyUntestedRelayConnections()}}},{connectionTestResults:N,promiseStates:R,serverClasses:O});n.i(D.a)(z,function(){return{relationClass:n.i(c.a)("ServerFlexModel"),options:{server:this}}}),t.a=z},function(e,t,n){function i(e){return function(){return e.apply(this,a.initial(arguments))}}
var a=n(2);e.exports=i},function(e,t,n){"use strict";var i=n(1);n.n(i),i.PropTypes.shape({key:i.PropTypes.string.isRequired,value:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.array]).isRequired,operator:i.PropTypes.string.isRequired,type:i.PropTypes.string})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"TINY",function(){return i}),n.d(t,"SMALL",function(){return a}),n.d(t,"MEDIUM",function(){return r}),n.d(t,"LARGE",function(){return s}),
n.d(t,"all",function(){return o});var i="tiny",a="small",r="medium",s="large",o=[i,a,r,s]},function(e,t,n){"use strict";function i(e,t){var i=t.searchResultEntityID;return n.i(a.a)(e,r.SEARCH_RESULT,i)}var a=n(385),r=n(222),s=n(528);n.d(t,"a",function(){return s.a}),n.d(t,"b",function(){return s.b}),n.d(t,"d",function(){return s.d}),n.d(t,"e",function(){return s.e}),n.d(t,"f",function(){return s.f}),n.d(t,"g",function(){return s.g}),n.d(t,"h",function(){return s.h}),t.c=i},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2723)),l=n.n(o);i.defaultProps={className:l.a.leftTitle},t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments[4];if(e&&t&&n){var s=encodeURIComponent(e.machineIdentifier),o=encodeURIComponent(t.identifier),l=encodeURIComponent(n);if("playlist"===r)return"#!/server/"+s+"/playlist/"+l
;var u=t.isLibraryProvider?"#!/server/"+s+"/details?key="+l:"#!/server/"+s+"/provider/"+o+"/details?key="+l;return a.join(u,i)}}var a=n(19);t.a=i},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},,function(e,t,n){"use strict";var i=function(e,t,n,i,a,r,s,o){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,i,a,r,s,o],c=0
;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(250),s=n(519),o=a.a.extend({},s.a,{type:"video",qualities:{bitrate:[64,96,208,320,720,1500,2e3,3e3,4e3,8e3,1e4,12e3,2e4],videoResolution:["220x128","220x128","284x160","420x240","576x320","720x480","1280x720","1280x720","1280x720","1920x1080","1920x1080","1920x1080","1920x1080"],
videoQuality:[10,20,30,30,40,60,60,75,100,60,75,90,100]},getAvailableQualitiesFor:function(e,t,i){if(!e||!t)return[];var s=t.get("transcoderVideo"),o=t.get("transcoderVideoRemuxOnly"),l=n.i(r.a)(e),u=!(!l||!l.bitrate),c=!!e.videoResolution;if(!s||o||!u&&!c)return[];var d,h=t.get("maxUploadBitrate");if(h){var p=u?Math.min(l.bitrate,h):h;if(p===h){var f=a.a.extend({},i,{comparator:function(e){return this.qualities.bitrate[e]>p}});d=this.getAvailableQualities(f)
}else d=this.getAvailableQualitiesBelowBitrate(p,i)}else d=u?this.getAvailableQualitiesBelowBitrate(l.bitrate,i):this.getAvailableQualitiesBelowResolution(e.videoResolution,i);return d},getAvailableQualitiesBelowBitrate:function(e,t){return t||(t={}),t.comparator=function(t){return this.qualities.bitrate[t]>=e},this.getAvailableQualities(t)},getAvailableQualitiesBelowResolution:function(e,t){t||(t={});var n=this.getHeightFromResolution(e);return t.comparator=function(e){
var t=this.qualities.videoResolution[e];return this.getHeightFromResolution(this.getResolutionFromSize(t))>=n},this.getAvailableQualities(t)},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)},getMinimumQuality:function(e,t){return(e===o.ORIGINAL?Number.MAX_VALUE:e)<(t===o.ORIGINAL?Number.MAX_VALUE:t)?e:t},getMaximumQuality:function(e,t){return this.getMinimumQuality(e,t)===e?t:e}});t.a=o},function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n.n(i),r=n(50),s=n(32);n.d(t,"addMetadataItemToPlaylist",function(){return o}),n.d(t,"analyzeMetadataItem",function(){return l}),n.d(t,"deleteMetadataItem",function(){return u}),n.d(t,"deleteMetadataItemVersion",function(){return c}),n.d(t,"downloadMetadataItemVersion",function(){return d}),n.d(t,"editMetadataItem",function(){return h}),n.d(t,"fixMetadataItemMatch",function(){return p}),n.d(t,"getMetadataItemInfo",function(){return f
}),n.d(t,"markMetadataItemUnwatched",function(){return g}),n.d(t,"markMetadataItemWatched",function(){return m}),n.d(t,"optimizeMetadataItem",function(){return v}),n.d(t,"playMetadataItem",function(){return y}),n.d(t,"playMetadataItemVersion",function(){return b}),n.d(t,"playPrimaryExtra",function(){return S}),n.d(t,"playRelatedMix",function(){return I}),n.d(t,"queueMetadataItem",function(){return w}),n.d(t,"rateMetadataItem",function(){return M}),n.d(t,"recommendMetadataItem",function(){
return C}),n.d(t,"refreshMetadataItem",function(){return D}),n.d(t,"shareMetadataItem",function(){return P}),n.d(t,"splitMetadataItemApart",function(){return T}),n.d(t,"syncMetadataItem",function(){return x}),n.d(t,"unmatchMetadataItem",function(){return E}),n.d(t,"watchMetadataItemLater",function(){return A}),n.d(t,"changeMetadataItemField",function(){return k}),n.d(t,"selectMetadataItemStream",function(){return L}),n.d(t,"updateMetadataItemRefreshingState",function(){return _}),
n.d(t,"repopulateMetadataItem",function(){return N}),n.d(t,"removeMetadataItem",function(){return R}),n.d(t,"addMetadataItemToQueue",function(){return O}),n.d(t,"playMetadataItemAll",function(){return j}),n.d(t,"playMetadataItemNext",function(){return z}),n.d(t,"shuffleMetadataItem",function(){return U})
;var o=n.i(r.a)(s._76),l=n.i(r.a)(s._77),u=n.i(r.a)(s._78),c=n.i(r.a)(s._79),d=n.i(r.a)(s._80),h=n.i(r.a)(s._81),p=n.i(r.a)(s._82),f=n.i(r.a)(s._83),g=n.i(r.a)(s._84),m=n.i(r.a)(s._85),v=n.i(r.a)(s._86),y=n.i(r.a)(s._87),b=n.i(r.a)(s._88),S=n.i(r.a)(s._89),I=n.i(r.a)(s._90),w=n.i(r.a)(s._91),M=n.i(r.a)(s._92),C=n.i(r.a)(s._93),D=n.i(r.a)(s._94),P=n.i(r.a)(s._95),T=n.i(r.a)(s._96),x=n.i(r.a)(s._97),E=n.i(r.a)(s._98),A=n.i(r.a)(s._99),k=n.i(r.a)(s._100),L=n.i(r.a)(s._101),_=n.i(r.a)(s._102),N=n.i(r.a)(s._103),R=n.i(r.a)(s._104),O=n.i(r.a)(s._91,function(e){
return a()({},e,{next:!1})}),j=n.i(r.a)(s._87,function(e){return a()({},e,{unwatched:!1})}),z=n.i(r.a)(s._91,function(e){return a()({},e,{next:!0})}),U=n.i(r.a)(s._87,function(e){return a()({},e,{shuffle:!0})})},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return o});var r=n.i(i.a)(a.M),s=n.i(i.a)(a.N),o=n.i(i.a)(a.O)},function(e,t,n){"use strict";function i(e){return e.multiSelect}t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.children,n=e.className,i=e.spinnerSize,a=e.isSpinning,s=u()(e,["children","className","spinnerSize","isSpinning"]);return d.a.createElement(m.a,r()({className:p()(n,y.a.button,a&&y.a.isSpinning),isDisabled:a},s),o()("span",{className:y.a.spinnerContainer},void 0,o()(g.a,{className:y.a.spinner,size:i})),o()("span",{className:y.a.label},void 0,t))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(30),p=n.n(h),f=n(22),g=n(36),m=n(51),v=n(2558),y=n.n(v);i.defaultProps={isSpinning:!1,spinnerSize:f.d.SMALL},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.onModalClose,a=u()(e,["className","children","onModalClose"]);return d.a.createElement("div",r()({className:t},a),o()(p.a,{className:g.a.closeButton,onPress:i},void 0,m),n)}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(29),p=n(25),f=n(2588),g=n.n(f),m=o()(h.a,{name:"plex-icon-remove-560"});i.defaultProps={className:g.a.modalContent},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=o()(e,["className","children"]);return u.a.createElement("div",r()({className:t},i),n)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(2591),d=n.n(c);i.defaultProps={className:d.a.modalFooter},t.a=i},function(e,t,n){
e.exports={default:n(2430),__esModule:!0}},function(e,t,n){"use strict";var i=(n(33),n(17)),a=n(475),r=n(1264),s=a.a.extend({name:"UserStorageModel",storageKey:"users",sessionAttrs:{activeUserID:i.a.integer},syncedRelations:{users:{relationClass:r.a}},initialize:function(){this.debouncedSaveTimeout=null},debouncedSave:function(){var e=this;this.debouncedSaveTimeout&&clearTimeout(this.debouncedSaveTimeout),this.debouncedSaveTimeout=setTimeout(function(){return e.save()},2e3)},
flushDebouncedSave:function(){this.debouncedSaveTimeout&&(clearTimeout(this.debouncedSaveTimeout),this.save())},getActiveUser:function(){var e=this.get("users"),t=this.get("activeUserID");if(t)return e.get(t)},clearActiveUser:function(){var e=this.getActiveUser();return e&&e.clearSensitiveAttributes(),this.unset("activeUserID"),this.save()},getActiveServers:function(){var e=this.getActiveUser();if(e)return e.get("servers")}});t.a=new s},function(e,t,n){"use strict";function i(e){
var t=e.key,i=e.getModel,r=n.i(a.a)(t),s="is"+r+"Pending",o="is"+r+"Populated",l=t?t+"Error":"error";return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i(e,n),r=t?a.get(t):a,u=(a.sessionAttrs,a.get(s));a.set(s,!0),r.fetch(n.options).done(function(){var e;a.set((e={},e[s]=!1,e[o]=!0,e[l]=null,e))}).fail(function(e,t){var n;if(t.aborting)return void a.set(s,u);a.set((n={},n[s]=!1,n[l]=t,n))})}}var a=(n(33),n(321));t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children,i=e.cellX,a=e.cellY,s=e.cellWidth,o=e.cellHeight,l=e.onMouseMove,u=e.onMouseLeave,c=e.onFocus,d=e.onBlur,h="translate3d("+i+"px, "+a+"px, 0)",p={position:"absolute",width:s,height:o,WebkitTransform:h,msTransform:h,transform:h};return r()("div",{className:t,style:p,onMouseMove:l,onMouseLeave:u,onFocus:c,onBlur:d},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";var i=n(18),a=n(65),r=n(17);n.d(t,"a",function(){return s});var s={
GRABBER_GRAB:"grabber.grab",PROVIDER_DEVICE_CHANNELSCAN:"provider.device.channelscan",PROVIDER_EPG_LOAD:"provider.epg.load",PROVIDER_SUBSCRIPTION_PROCESS:"provider.subscriptions.process",OPTIMIZE_DATABASE:"general.db.optimize",CLEAN_BUNDLES:"general.bundle.clean",LIBRARY_DELETE:"library.delete",LIBRARY_REFRESH_ITEMS:"library.refresh.items"},o=i.a.extend({name:"ActivityModel",context:["server"],idAttribute:"uuid",rootPropertyName:"Activity",responseType:function(){
return this.server.supports("json")?a.a.json:a.a.xml},sessionAttrs:{synthetic:r.a.boolean},syncedAttrs:{uuid:r.a.string,userID:r.a.integer,title:r.a.string,subtitle:r.a.string,progress:r.a.integer,event:r.a.string,cancellable:r.a.boolean,type:r.a.string,Context:r.a.object,Response:r.a.object},defaults:function(){return{Context:{},Response:{}}}});t.b=o},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n.i(i.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e){return e.dvrSetup
}));t.a=a},function(e,t,n){"use strict";var i=n(850),a=n(2831),r=n.n(a),s=n(2534),o=n.n(s),l=i.a.extend({template:r.a,ui:{sidebar:".sidebar-container",page:".page-container"},serializeData:function(){return{styles:o.a}}});t.a=l},function(e,t,n){"use strict";function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],i=n.type,a=n.payload;switch(i){case I.CHANGE:var r=a.name,s=a.change;if(null==s){var o=p()({},t);return delete o[r],o}return p()({},t,(e={},e[r]=s,
e));case I.REPLACE_STATE:return a;case I.RESET:return{};case I.SHOW_ERRORS:return g.a.mapObject(t,function(e){return p()({},e,{showErrors:0!==e.errors.length})});default:return t}}var a=n(16),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(6),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(671),b=(n.n(y),n(805)),S=n(50);n.d(t,"b",function(){return w});var I={CHANGE:"CHANGE",REPLACE_STATE:"REPLACE_STATE",RESET:"RESET",SHOW_ERRORS:"SHOW_ERRORS"},w={change:n.i(S.a)(I.CHANGE),
replaceState:n.i(S.a)(I.REPLACE_STATE),reset:n.i(S.a)(I.RESET),showErrors:n.i(S.a)(I.SHOW_ERRORS)},M=function(e){function t(a,r){o()(this,t);var s=u()(this,e.call(this,a,r));return s.onFormStoreChange=function(){var e=s.store.getState();e!==s.prevState&&(s.prevState=e,s.props.onChange(e))},s.onSubmit=function(e){e.preventDefault(),e.nativeEvent.preventDefault();var t=s.store.getState();if(g.a.some(t,function(e,t){return 0!==e.errors.length}))s.actions.showErrors();else{
var n=g.a.mapObject(t,function(e,t){return e.value});s.props.onSubmit(n,t)}},s.store=n.i(y.createStore)(i),s.prevState=s.store.getState(),s.actions=n.i(y.bindActionCreators)(w,s.store.dispatch),s}return d()(t,e),t.prototype.getChildContext=function(){return{formStore:this.store}},t.prototype.componentWillMount=function(){this.unsubscribe=this.store.subscribe(this.onFormStoreChange)},t.prototype.componentWillReceiveProps=function(e){
e.formState&&this.store.getState()!==e.formState&&this.actions.replaceState(e.formState)},t.prototype.componentWillUnmount=function(){this.unsubscribe&&(this.unsubscribe(),this.store.replaceReducer(function(e){return e}))},t.prototype.render=function(){var e=this.props,t=e.children,n=(e.formState,e.onChange,r()(e,["children","formState","onChange"]));return v.a.createElement("form",p()({},n,{onSubmit:this.onSubmit}),t)},t}(m.Component);M.childContextTypes={formStore:b.a},M.defaultProps={
onSubmit:function(){},onChange:function(){}},t.a=M},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.errorClassName,a=e.name,s=e.hasError,l=o()(e,["children","className","errorClassName","name","hasError"]);return u.a.createElement("label",r()({},l,{className:d()(n,s&&i),htmlFor:a}),t)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(30),d=n.n(c),h=n(2564),p=n.n(h);i.defaultProps={className:p.a.label,errorClassName:p.a.hasError},t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.children,i=e.className,a=e.isSelected,s=e.selectedIconName,l=e.selectedIconAriaLabel,c=u()(e,["children","className","isSelected","selectedIconName","selectedIconAriaLabel"]);return d.a.createElement(m.a,r()({className:p()(i,a&&y.a.isSelected)},c),o()("div",{className:y.a.menuItemContainer},void 0,o()("div",{className:y.a.menuLabel},void 0,t),a&&o()("div",{className:y.a.selectedIcon},void 0,o()(g.a,{name:s,"aria-label":l||n.i(f.default)("Selected")}))))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(30),p=n.n(h),f=n(4),g=n(29),m=n(146),v=n(2584),y=n.n(v);i.defaultProps={selectedIconName:"plex-icon-selected-560"},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return u.a.createElement("div",r()({className:d.a.modalHeader},n),t)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(2593),d=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className
;return r()("div",{className:t})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2703)),l=n.n(o);i.defaultProps={className:l.a.divider},t.a=i},function(e,t,n){var i=n(136),a=n(103),r=n(974),s=n(280),o=function(e,t,n){var l,u,c,d=e&o.F,h=e&o.G,p=e&o.S,f=e&o.P,g=e&o.B,m=e&o.W,v=h?a:a[t]||(a[t]={}),y=v.prototype,b=h?i:p?i[t]:(i[t]||{}).prototype;h&&(n=t);for(l in n)(u=!d&&b&&void 0!==b[l])&&l in v||(c=u?b[l]:n[l],v[l]=h&&"function"!=typeof b[l]?n[l]:g&&u?r(c,i):m&&b[l]==c?function(e){var t=function(t,n,i){
if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):f&&"function"==typeof c?r(Function.call,c):c,f&&((v.virtual||(v.virtual={}))[l]=c,e&o.R&&y&&!y[l]&&s(y,l,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,e.exports=o},,function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.providerEntityID
},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(370));t.a=i},function(e,t,n){"use strict";var i=n(4),a=n(214),r=n(34),s=["key","typeID","typeString","rootTypeString"],o=n.i(a.a)(s,[{key:"movies",typeID:"1",typeString:r.d,rootTypeString:r.d,title:function(){return n.i(i.default)("Movies")},defaultAgent:"com.plexapp.agents.imdb",defaultLanguage:"en",defaultScanner:"Plex Movie Scanner",sectionTypeIcon:"plex-icon-movies-560"},{key:"tv",typeID:"2",typeString:r.e,rootTypeString:r.e,
title:function(){return n.i(i.default)("TV Shows")},defaultAgent:"com.plexapp.agents.thetvdb",defaultLanguage:"en",defaultScanner:"Plex Series Scanner",sectionTypeIcon:"plex-icon-shows-560"},{key:"music",typeID:"8",typeString:r.f,rootTypeString:r.f,title:function(){return n.i(i.default)("Music")},defaultAgent:"com.plexapp.agents.lastfm",defaultLanguage:"en",defaultScanner:"Plex Music Scanner",sectionTypeIcon:"plex-icon-music-560",exclusiveAgents:["com.plexapp.agents.plexmusic"],
exclusiveScanners:["Plex Premium Music Scanner"]},{key:"photos",typeID:"13",typeString:r.g,rootTypeString:r.h,title:function(){return n.i(i.default)("Photos")},defaultAgent:"com.plexapp.agents.none",defaultLanguage:"en",defaultScanner:"Plex Photo Scanner",sectionTypeIcon:"plex-icon-photos-560"},{key:"videos",typeID:"1",typeString:r.d,rootTypeString:r.i,title:function(){return n.i(i.default)("Other Videos")},defaultAgent:"com.plexapp.agents.none",defaultLanguage:"xn",
defaultScanner:"Plex Video Files Scanner",sectionTypeIcon:"plex-icon-clips-560"}]);t.a=o},function(e,t,n){"use strict";function i(){var e=l.b.apply(void 0,arguments);return function(t){function n(e,t){var n=t.metricsPage;return o.a.createElement(i,r()({metricsPage:n},e))}var i=e(t);return n.contextTypes={metricsPage:s.PropTypes.string.isRequired},n}}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(14);t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(50),s=n(32);n.d(t,"c",function(){return o}),
n.d(t,"d",function(){return l}),n.d(t,"l",function(){return u}),n.d(t,"g",function(){return c}),n.d(t,"i",function(){return d}),n.d(t,"j",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"a",function(){return f}),n.d(t,"b",function(){return g}),n.d(t,"e",function(){return m}),n.d(t,"f",function(){return v}),n.d(t,"h",function(){return y});var o=(n.i(r.a)(s._105),
n.i(r.a)(s._106)),l=n.i(r.a)(s._107),u=n.i(r.a)(s._108),c=n.i(r.a)(s._109),d=n.i(r.a)(s._110),h=n.i(r.a)(s._111),p=n.i(r.a)(s._112),f=n.i(r.a)(s._113),g=n.i(r.a)(s._114),m=n.i(r.a)(s._115),v=n.i(r.a)(s._116),y=n.i(r.a)(s._109,function(e){return a()({},e,{shuffle:!0})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(50),a=n(32);n.d(t,"initQuickSearch",function(){return r}),n.d(t,"resetQuickSearch",function(){return s}),n.d(t,"fetchQuickSearch",function(){
return o}),n.d(t,"changeQuickSearchQuery",function(){return l}),n.d(t,"changeQuickSearchSettings",function(){return u}),n.d(t,"selectQuickSearchResult",function(){return c}),n.d(t,"navigateQuickSearchResult",function(){return d}),n.d(t,"playQuickSearchItem",function(){return h});var r=n.i(i.a)(a._25),s=n.i(i.a)(a._26),o=n.i(i.a)(a._27),l=n.i(i.a)(a._28),u=n.i(i.a)(a._29),c=n.i(i.a)(a._30),d=n.i(i.a)(a._31),h=n.i(i.a)(a._32)},function(e,t,n){"use strict";function i(e){var t=function(t){
function i(e,a){u()(this,i);var r=d()(this,t.call(this,e,a));return r.onFormStoreChange=function(){var e=r.props.name,t=r.store.getState(),i=t[e];i||r.initializeInputState(r.props),n.i(I.a)(t,r.previousFormState)||(r.previousFormState=t,r.handleStateChange(r.props)),r.state!==i&&null!=i&&r.setState(i)},r.onChange=function(e){r.handleStateChange(r.props,e)},r.onBlur=function(){if(!r.hasBlurred){r.hasBlurred=!0;var e=r.store.getState(),t=r.props.name,n=e[t],i=r.calculateErrors(n.value,e,r.props)
;r.actions.change({name:t,change:o()({},n,{errors:i,showErrors:0!==i.length})})}},r.store=a.formStore,r.actions=n.i(y.bindActionCreators)(C.b,r.store.dispatch),r.state=null,r.hasBlurred=!1,r}return p()(i,t),i.prototype.componentWillMount=function(){this.previousFormState=this.store.getState(),this.unsubscribe=this.store.subscribe(this.onFormStoreChange),this.initializeInputState(this.props)},i.prototype.componentWillReceiveProps=function(e){
n.i(b.a)(e.initialValue)&&n.i(b.a)(this.props.initialValue)?n.i(I.a)(e.initialValue,this.props.initialValue)||this.handleStateChange(e,e.initialValue):e.initialValue!==this.props.initialValue&&this.handleStateChange(e,e.initialValue)},i.prototype.shouldComponentUpdate=function(e,t){return n.i(w.a)(this,e,t)},i.prototype.componentWillUnmount=function(){var e=this.props.name;this.unsubscribe&&this.unsubscribe(),this.actions.change({name:e,change:null})},
i.prototype.initializeInputState=function(e){var t=e.name,n=e.initialValue,i=this.store.getState();i[t]={errors:this.calculateErrors(n,i,e),showErrors:!1,value:n},this.actions.replaceState(i)},i.prototype.handleStateChange=function(e,t){var n=this.store.getState(),i=e.name,a=n[i],r=null!=t?t:a.value,s=this.calculateErrors(r,n,e);a.value===r&&g.a.isEqual(a.errors,s)||this.actions.change({name:i,change:{errors:s,showErrors:this.hasBlurred&&0!==s.length,value:r}})},
i.prototype.calculateErrors=function(e,t,n){return n.validations.map(function(n){return n(e,t)}).filter(function(e){return null!=e})},i.prototype.render=function(){var t=this.props,n=(t.validations,t.errors),i=r()(t,["validations","errors"]);if(!this.state)return null;var a=n.length>0,s=this.state,l=s.value,u=s.errors,c=s.showErrors;return v.a.createElement(e,o()({},i,{showErrors:!!a||c,errors:a?n:u,value:l,onChange:this.onChange,onBlur:this.onBlur}))},i}(m.Component)
;return t.displayName="FormInput("+n.i(S.a)(e)+")",t.WrappedComponent=e,t.contextTypes={formStore:M.a},t.defaultProps={validations:[],errors:[]},t}var a=n(16),r=n.n(a),s=n(6),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(671),b=(n.n(y),n(33),n(316)),S=n(217),I=n(257),w=n(27),M=n(805),C=n(120);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.contentClassName,n=e.iconClassName,i=e.titleClassName,a=e.descriptionClassName,s=e.footerClassName,l=e.children,c=e.kind,h=e.icon,f=e.title,v=e.description,b=e.footer,S=u()(e,["contentClassName","iconClassName","titleClassName","descriptionClassName","footerClassName","children","kind","icon","title","description","footer"]);return d.a.createElement(m.a,r()({className:y.a.emptyPage},S),o()("div",{className:t},void 0,!!h&&o()(g.a,{name:h,className:p()(y.a[c],n)}),!!f&&o()("div",{
className:i},void 0,f),!!v&&o()("div",{className:a},void 0,v),l),!!b&&o()("div",{className:s},void 0,b))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(30),p=n.n(h),f=n(22),g=n(29),m=n(74),v=n(2674),y=n.n(v);i.defaultProps={contentClassName:y.a.content,iconClassName:y.a.icon,titleClassName:y.a.title,descriptionClassName:y.a.description,footerClassName:y.a.footer,kind:f.b.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children
;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2705)),l=n.n(o);i.defaultProps={className:l.a.innerContent},t.a=i},function(e,t,n){"use strict";function i(e,t){return function(n){return o.a.createElement(t,r()({},e,n))}}var a=n(6),r=n.n(a),s=n(1),o=n.n(s);t.a=i},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},,function(e,t,n){
"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(38),l=n(55),u=o.a.extend({mixins:l.a,initialize:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interface&&(this.interface=t.interface),t.props&&(this.props=t.props),a.a.each(this.interface,function(t){e[t]=a.a.bind(e._proxy,e,t)})},_proxy:function(e){for(var t=this.getInstance(),n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return t[e].apply(t,i)},register:function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.hasInstance()&&!t.ignorePrevious&&(this._previousInstance=this.getInstance()),this._instance=e,t.silent||this.trigger("change:instance",e)},registerOnce:function(e){if(!this.hasInstance()){var t=e();this.register(t.instance||t,t.options||void 0)}},restorePrevious:function(){this._previousInstance&&this.register(this._previousInstance)},registered:function(){var e=s.a.Deferred()
;return this.hasInstance()?e.resolve(this.getInstance()):this.listenToOnce(this,"change:instance",e.resolve),e.promise()},getInstance:function(){if(this.hasInstance())return this._instance;throw new Error("Nothing has been registered to this adapter.")},hasInstance:function(){return null!=this._instance},prop:function(e){if(a.a.contains(this.props,e))return this.getInstance()[e];throw new Error("The "+e+" property has not been defined for this adapter")}});t.a=u},function(e,t,n){"use strict"
;var i=n(17),a=n(18),r=n(1220);n.d(t,"a",function(){return s});var s={CONTENT:"content",SUBSCRIBE:"subscribe",SEARCH:"search",MATCH:"match",METADATA:"metadata",TIMELINE:"timeline",PLAY_QUEUE:"playqueue",RATE:"rate",MANAGE:"manage"},o=a.a.extend({name:"ProviderFeatureModel",context:["server","provider"],idAttribute:"type",syncedAttrs:{key:i.a.string,scrobbleKey:i.a.string,unscrobbleKey:i.a.string,type:i.a.string,automaticLibraryFolders:i.a.boolean},syncedRelations:{directories:{relationClass:r.a,
rootPropertyName:"Directory",deferred:!0}}});t.b=o},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.metadataListEntityID},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(1279));t.a=i},function(e,t,n){"use strict";function i(e){if(e){if(e.section)return e.section;if(e.get("isSection"))return e;if(e.get("librarySectionID")){var t=new s.a({key:e.get("librarySectionID")},{server:e.server,onlyIfCached:!0});return r.a.isEmpty(t)?void 0:t}
return e.parent?i(e.parent):void 0}}var a=n(2),r=n.n(a),s=n(304);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=[];if(e){var i=r.a.first(e.Part);i&&i.Stream&&n.push.apply(n,r.a.where(i.Stream,t))}return n}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(13),u=n(66),c=n(322),d=n(732),h=n(315),p=n(56),f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",g=o.a.ItemView.extend({tagName:"img",
background:!1,backgroundSize:"",cache:new d.a,initialize:function(e){e||(e={}),a.a.bindAll(this,"onLoad","onError","loadImage"),this.url=e.url,this.server=e.server,this.placeholder=e.placeholder,this.placeholderClass=e.placeholderClass,this.modelAttribute=e.modelAttribute,this.ignoreAttributeChanges=e.ignoreAttributeChanges,this.exposeUrl=e.exposeUrl,this.resetOnError=e.resetOnError,this.emptyImage=e.explicitEmpty?"url("+f+")":"",e.background&&(this.background=e.background),
e.backgroundSize&&(this.backgroundSize=e.backgroundSize),e.format&&(this.format=e.format),e.quality&&(this.quality=e.quality),a.a.isFunction(e.getUrl)&&(this.getUrl=e.getUrl),this.allowBaseImageBlobs=p.a.get("allowBaseImageBlobs"),this.allowBaseImagePreloading=p.a.get("allowBaseImagePreloading"),this.setup(e)},setup:function(e){this.setDimensions(e),this.setFilters(e.filters),this.setModel(e.model,e)},setDimensions:function(e){e.width&&e.height&&(this.transcode=!0,this.width=e.width,
this.height=e.height)},setFilters:function(e){this.filters=e||void 0},hasFilters:function(){return void 0!==this.filters},setModel:function(e,t){t||(t={}),this.stopListening(),this.src=null,this.model=e,e&&(this.server||(this.server=e.server),t.url||this.modelAttribute&&(this.url=this.getUrl(e.get(this.modelAttribute)),this.ignoreAttributeChanges||this.listenTo(e,"change:"+this.modelAttribute,this.onChange)))},setElement:function(e){o.a.ItemView.prototype.setElement.apply(this,arguments),
this.render({force:!0})},getUrl:function(e){return e},getTranscodeUrl:function(e){if(!this.server||!this.transcode)return e;var t=l.a("appModel"),i=n.i(h.a)();return c.a.image(this.server,e,{fallbackServer:t.get("primaryServer"),width:this.width*i,height:this.height*i,minSize:this.minSize,filters:this.filters,format:this.format,quality:this.quality})},render:function(e){return e||(e={}),this.url||this.placeholder||this.placeholderClass?this.src?(e.force&&this.showImage(this.src),
this):(this.isPlaceholderRendered&&this.url||this.showPlaceholder(),this.url&&this.load(this.url,this.transcode).then(this.onLoad,this.onError,this.onLoad),this):this},showPlaceholder:function(){return this.isPlaceholderRendered=!0,this.$el.removeClass("loaded"),this.placeholderClass?(this.$el.addClass(this.placeholderClass),void this.$el.css("background-image",this.emptyImage)):this.placeholder?void this.showImage(this.placeholder):void this.clearImage()},clearImage:function(){
this.background?this.$el.css("background-image",this.emptyImage):this.showImage(f)},showImage:function(e){if(this.background)return void this.showBackgroundImage(e);this.$el.attr("src",e).removeAttr("width").removeAttr("height")},showBackgroundImage:function(e){this.$el.css("background-image","url("+e+")")},load:function(e){if(!e)return s.a.Deferred().reject().promise();if(e=this.getTranscodeUrl(e),this.exposeUrl&&this.$el.attr("data-image-url",e),
this.allowBaseImageBlobs&&u.a.hasBlob&&u.a.hasObjectUrl){var t=this.loadBlob(e);return t=t.then(this.loadImage,null,this.loadImage)}return this.allowBaseImagePreloading?this.loadImage(e):s.a.Deferred().resolve(e).promise()},loadBlob:function(e){var t=s.a.Deferred();this.cancel();var n=this.cache.getBlobUrl(e);if(n)return t.resolve(n),t.promise();var i=this.cache.getPlaceholder(e);i&&t.notify(i,!0);var r=new window.XMLHttpRequest;return r.open("GET",e,!0),r.responseType="arraybuffer",this.xhr=r,
r.onreadystatechange=a.a.bind(function(){if(4===r.readyState)if(r.onreadystatechange=null,this.xhr=null,200===r.status){var n=new window.Blob([r.response],{type:"image/jpeg"}),i=window.URL.createObjectURL(n);this.cache.store({url:e,blobUrl:i}),t.resolve(i)}else t.reject()},this),r.send(),t.promise()},loadImage:function(e,t){var n=s.a.Deferred(),i=new window.Image;return i.onload=function(){i.onload=i.onabort=i.onerror=null,t?n.notify(e,i.width,i.height):n.resolve(e,i.width,i.height)},
i.onabort=i.onerror=function(){i.onload=i.onabort=i.onerror=null,n.reject()},i.src=e,n.promise()},cancel:function(){this.xhr&&(this.xhr.onreadystatechange=null,this.xhr.abort(),this.xhr=null)},onLoad:function(e,t,n){if(this.backgroundSize){var i=t&&t>this.width||n&&n>this.height?this.backgroundSize:"auto";this.$el[0].style.backgroundSize=i}this.src=e,this.placeholderClass&&this.$el.removeClass(this.placeholderClass),this.$el.addClass("loaded"),this.showImage(e),this.trigger("load",e,t,n)},
onError:function(){this.resetOnError&&this.showPlaceholder(),this.trigger("error")},onClose:function(){this.cancel()},onChange:function(e,t){if(t=this.getUrl(t),this.url===t)return this;this.url=t,this.src=null,this.render()}});t.a=g},function(e,t,n){"use strict";function i(e){var t=function(t){function i(e,n){u()(this,i);var a=d()(this,t.call(this,e,n));return a.onMoveTimeout=function(){a.setState({isMoving:!1})},a.state={isMoving:!1},a}return p()(i,t),i.prototype.componentDidMount=function(){
this._setRenderedItem(),this._setVisibleItem()},i.prototype.componentWillReceiveProps=function(e,t){var n=this.props[this.props.keyPropName],i=e[e.keyPropName];null!=n&&n===i?this.props.cellIndex!==e.cellIndex&&(this.setState({isMoving:!0}),this._clearMoveTimeout(),this._moveTimeoutID=setTimeout(this.onMoveTimeout,this.props.moveTimeout)):(this._renderedItem=null,this._visibleItem=null,this.setState({isMoving:!1}),this._clearMoveTimeout())},i.prototype.shouldComponentUpdate=function(e,t){
return n.i(b.a)(this,e,t)},i.prototype.componentDidUpdate=function(){this._setRenderedItem(),this._setVisibleItem()},i.prototype.componentWillUnmount=function(){this._clearMoveTimeout()},i.prototype._setRenderedItem=function(){this.props.isScrolling||(this._renderedItem=this.props[this.props.keyPropName])},i.prototype._setVisibleItem=function(){this.props.isVisible&&(this._visibleItem=this.props[this.props.keyPropName])},i.prototype._clearMoveTimeout=function(){
this._moveTimeoutID&&(this._moveTimeoutID=clearTimeout(this._moveTimeoutID))},i.prototype.render=function(){var t=this.props,n=t.className,i=t.keyPropName,a=t.isScrolling,s=t.isVisible,l=(t.moveTimeout,o()(t,["className","keyPropName","isScrolling","isVisible","moveTimeout"])),u=l[i],c=a&&u!==this._renderedItem,d=!s&&u!==this._visibleItem;return g.a.createElement(e,r()({className:v()(n,I.a.cell,this.state.isMoving&&I.a.isMoving),showScrollPlaceholder:c,showOffscreenPlaceholder:d},l))},i
}(f.Component);return t.displayName="Virtualized("+n.i(y.a)(e)+")",t.WrappedComponent=e,t.defaultProps={moveTimeout:400},t}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(30),v=n.n(m),y=n(217),b=n(27),S=n(2531),I=n.n(S);t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(30),m=n.n(g),v=n(99),y=n(2574),b=n.n(y),S=function(e){function t(){var n,i,a
;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onChange=function(e){i.props.onChange(e.target.value)},i.onRef=function(e){i.inputElement=e},a=n,c()(i,a)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.focusOnMount&&this.inputElement.focus()},t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,r=e.isDisabled,o=(e.initialValue,
e.value),l=e.size,u=e.type,c=e.name,d=e.placeholder,h=e.hasError,p=(e.errors,e.validations,e.focusOnMount),g=s()(e,["className","errorClassName","disabledClassName","isDisabled","initialValue","value","size","type","name","placeholder","hasError","errors","validations","focusOnMount"]);return f.a.createElement("input",a()({},g,{id:c,name:c,type:u,disabled:r,value:o,placeholder:d,className:m()(t,b.a[l],r&&i,h&&n),ref:p?this.onRef:null,onChange:this.onChange}))},t}(p.Component);S.defaultProps={
className:b.a.input,errorClassName:b.a.hasError,disabledClassName:b.a.isDisabled,isDisabled:!1,size:v.LARGE,type:"text",hasError:!1,focusOnMount:!1},t.a=S},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.kind,a=e.isDisabled,s=(e.onMenuEnable,e.onMenuDisable,o()(e,["className","children","kind","isDisabled","onMenuEnable","onMenuDisable"]));return u.a.createElement(p.a,r()({className:d()(t,g.a.menuItem,g.a[i],a&&g.a.isDisabled),role:"menuitem"},s),n)}
var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(30),d=n.n(c),h=n(22),p=n(25),f=n(2582),g=n.n(f);i.defaultProps={kind:h.b.DEFAULT,isDisabled:!1},t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(48),m=n.n(g),v=n(404),y=n(27),b=n(22),S=n(166),I=n(349),w=n(204),M=n.n(w),C=n(536),D=n(255),P=n(256),T=n(2586),x=n.n(T),E=n.i(S.a)(M.a.modalSpeed),A={appear:x.a.enter,appearActive:x.a.enterActive,
enter:x.a.enter,enterActive:x.a.enterActive,leave:x.a.leave,leaveActive:x.a.leaveActive},k=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onBackdropBeginPress=function(e){i._isBackdropPressed=i._isBackdropTarget(e)},i.onBackdropEndPress=function(e){!i.props.preventCloseOnBackdropPress&&i._isBackdropPressed&&i._isBackdropTarget(e)&&i.props.onModalClose(),
i._isBackdropPressed=!1},i.onTouchMove=function(e){i._isBackdropPressed=!1},i.onTouchCancel=function(e){i._isBackdropPressed=!1},i.onKeyDown=function(e){var t=e.keyCode;t===v.a?I.a(e):t===v.b&&(e.preventDefault(),e.stopPropagation(),i.props.onModalClose(),I.b())},a=n,c()(i,a)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.isOpen&&this._openModal()},t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){
!e.isOpen&&this.props.isOpen?this._openModal():e.isOpen&&!this.props.isOpen&&this._closeModal()},t.prototype.componentWillUnmount=function(){this.props.isOpen&&this._closeModal()},t.prototype._openModal=function(){I.c(m.a.findDOMNode(this.refs.modal)),this._autoFocusTimeoutID=setTimeout(I.d,E),document.addEventListener("keydown",this.onKeyDown)},t.prototype._closeModal=function(){clearTimeout(this._autoFocusTimeoutID),document.removeEventListener("keydown",this.onKeyDown)},
t.prototype._isBackdropTarget=function(e){var t=this._findEventTarget(e);if(t){var n=m.a.findDOMNode(this.refs.modal);return!n||!n.contains(t)}return!1},t.prototype._findEventTarget=function(e){var t=e.changedTouches;if(!t)return e.target;if(1===t.length){var n=t[0];return document.elementFromPoint(n.clientX,n.clientY)}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.backdropClassName,i=e.children,r=e.size,o=e.metricsPage,l=e.metricsProperties,u=e.isOpen;return s()(C.a,{
isOpen:u,closeTimeout:E},void 0,s()(D.a,{className:x.a.modalContainer,transitionName:A,transitionAppearTimeout:E,transitionEnterTimeout:E,transitionLeaveTimeout:E},void 0,u&&f.a.createElement(P.a,a()({},l,{page:o}),s()("div",{className:n,onMouseDown:this.onBackdropBeginPress,onMouseUp:this.onBackdropEndPress,onTouchStart:this.onBackdropBeginPress,onTouchEnd:this.onBackdropEndPress,onTouchMove:this.onTouchMove,onTouchCancel:this.onTouchCancel},void 0,f.a.createElement("div",{className:t||x.a[r],
ref:"modal"},i)))))},t}(p.Component);k.defaultProps={backdropClassName:x.a.modalBackdrop,size:b.d.MEDIUM,preventCloseOnBackdropPress:!1},t.a=k},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(22),m=n(569),v=n(25),y=n(2594),b=n.n(y),S=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.render=function(){
var e=this.props,t=e.children,n=e.tooltip,i=e.tooltipAttachment,r=e.hideOnPress,o=e.onPress,l=s()(e,["children","tooltip","tooltipAttachment","hideOnPress","onPress"]);return f.a.createElement(m.a,a()({className:b.a.toolbarButton,"aria-label":n,component:v.a,tooltip:n,tooltipClassName:b.a[i],hideOnPress:r,onPress:o},l),t)},t}(p.Component);S.defaultProps={tooltipAttachment:g.e.BOTTOM_CENTER},t.a=S},function(e,t,n){"use strict";function i(){return n.i(b.createSelector)(function(e,t){
return t.columnAdjustment},n.i(I.a)(),w.a,M.a,function(e,t,n,i){var a=g.a.pick(t,"totalSize","populatedRange","allowSync","isPending","isPopulated","error","firstItemType","isFirstItemLibraryItem");return p()({metadataItemEntityIDs:t.metadataItems,disableReloadThreshold:!!n.activeSelectionType,columnAdjustment:e||i.columnAdjustment},a)})}var a=n(16),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(6),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(14),b=n(8),S=(n.n(b),
n(41)),I=n(140),w=n(109),M=n(168),C=n(130),D={dispatchPopulateMetadataList:C.c,dispatchPopulateMetadataListRange:C.d,dispatchDeselectAllMetadataListItems:C.e,dispatchResetMetadataList:C.f},P=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onPageRequest=function(e){var t=i.props,n=t.metadataListEntityID,a=t.disableReloadThreshold;(0,t.dispatchPopulateMetadataListRange)(p()({
metadataListEntityID:n,disableReloadThreshold:a},e))},a=n,u()(i,a)}return d()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){e.metadataListEntityID!==this.props.metadataListEntityID&&this._populate(e)},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.metadataListEntityID,n=e.shouldResetOnUnmount;this.props.dispatchDeselectAllMetadataListItems({metadataListEntityID:t}),n&&this.props.dispatchResetMetadataList({
metadataListEntityID:t})},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.metadataListEntityID,i=e.initialSize,a=e.dispatchPopulateMetadataList,r=e.dispatchPopulateMetadataListRange;i&&n.i(S.a)(function(){i===1/0?a({metadataListEntityID:t}):r({metadataListEntityID:t,startIndex:0,endIndex:i})})},t.prototype.render=function(){var e=this.props,t=e.component,n=(e.dispatchPopulateMetadataListRange,e.dispatchDeselectAllMetadataListItems,
e.dispatchResetMetadataList,r()(e,["component","dispatchPopulateMetadataListRange","dispatchDeselectAllMetadataListItems","dispatchResetMetadataList"]));return v.a.createElement(t,p()({},n,{onPageRequest:this.onPageRequest}))},t}(m.Component);P.defaultProps={disableReloadThreshold:!1,shouldResetOnUnmount:!1},t.a=n.i(y.b)(i,D)(P)},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({iconClassName:c.a.icon,icon:"plex-icon-alert-560"},e))}
var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(133),u=n(2675),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.serverEntityID,a=e.providerEntityID,s=e.metadataItemEntityID,l=e.showPoster,u=e.posterType,m=e.attribution,v=e.metadataKey,y=e.type,b=e.thumb,S=e.art,I=e.pageWidth,w=e.pageHeight,M=e.scrollTop,C=e.posterWidth,D=e.posterTop,P=!!S,T=D,x=void 0;if(P){x=Math.min(Math.round(I/c.d),w-g);var E=n.i(c.a)(C,y,o.a),A=D+x-M,k=w+f-E;T=Math.min(Math.max(A,D),k)}
return r()("div",{},void 0,P&&r()(d.a,{serverEntityID:i,width:I,height:x,url:S}),m&&r()(m,{pageHeight:w,posterTop:D}),l&&r()(h.a,{serverEntityID:i,providerEntityID:a,metadataItemEntityID:s,metadataKey:v,type:y,posterType:u,pageHeight:w,posterWidth:C,posterTop:T,posterUrl:b}),l?r()(p.a,{posterWidth:C},void 0,t):r()("div",{},void 0,t))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(35)),l=n(76),u=n.n(l),c=n(203),d=n(2230),h=n(2234),p=n(2233),f=parseInt(u.a.pageHeaderHeight,10),g=246;i.defaultProps={
showPoster:!0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=n.split("\n");return r()(o.a,{className:t},void 0,i.length>1?i.map(function(e,t){return r()("p",{},t,e)}):n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1973)),l=n(2711),u=n.n(l);i.defaultProps={className:u.a.summary,children:""},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2724)),l=n.n(o)
;i.defaultProps={className:l.a.primaryTitle},t.a=i},,,function(e,t,n){"use strict";var i={itemClusters:"1.5.4",optimizeDatabaseActivity:"1.4.2",asyncCheckFiles:"1.4.0",json:"1.3.0",libraryDeleteActivity:"1.2.1",cleanBundlesActivity:"1.2.1",allowBlacklistedMethodHeaders:"1.2.1",decisionEndpoint:"1.0.3",defaultSections:"0.9.17.3",ownerFeatures:"0.9.17.0",replaceTranscodeTarget:"0.9.17.0",quickSearch:"0.9.16.0",relay:"0.9.15.0",claimServer:"0.9.14.2",searchSpecificType:"0.9.14.2",
linkedYearMetadata:"0.9.14.0",streamReady:"0.9.14.0",syncOriginalQuality:"0.9.14.0",allPartsStreamSelection:"0.9.12.5",sharedChannels:"0.9.12.5",shortenTranscodeURL:"0.9.12.5",companionProxy:"0.9.12.5",editSimilarArtists:"0.9.12.2",neuterRedirect:"0.9.12.0",audioAsVideo:"0.9.12.0",compositeDelete:"0.9.12.0",batchEdit:"0.9.12.0",premiumMusic:"0.9.12.0",transientToken:"0.9.12.0",softSubtitles:"0.9.12.0",sharedSyncStatus:"0.9.11.14",reachability:"0.9.11.14",photoPlayQueues:"0.9.11.12",
publicNowPlaying:"0.9.11.3",labels:"0.9.11.2",updater:"0.9.11.1",playItemsBatchAdd:"0.9.9.16",playlists:"0.9.9.13",imageFilters:"0.9.9.13",hubFilterSigns:"0.9.9.12",cancelAllUpdates:"0.9.9.10",playQueues:"0.9.9.6",sectionSettings:"0.9.9.6",hubFilters:"0.9.9.2",streamingMKV:"0.9.9.16",chunkedHTTP:"0.9.9.3",sharedSync:"0.9.9.3",dash:"0.9.8.6",specificMediaDeletion:"0.9.7.23",sharedSettings:"0.9.7.23",syncNotifications:"0.9.7.23",universalMusicTranscoder:"0.9.8.3",universalTranscoder:"0.9.7.17",
sync:"0.9.7.10",artworkUpload:"0.9.7.9",firstRunPref:"0.9.7.3",timelineState:"0.9.7.2",cleanBundles:"0.9.7.0",advancedFilters:"0.9.7.0",search:"0.9.7.0",merge:"0.9.7.0",splitApart:"0.9.7.0"};t.a=i},function(e,t,n){"use strict";var i,a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(15),u=n(13),c=n(12),d=n(187),h=n(59),p=n(685),f=n(207),g=(n(178),!1),m=l.a.Controller.extend({populateView:function(e){e||(e={}),e.showLoading!==!1&&c.a.trigger("show:loading",{navigating:!0}),this.abortPendingPopulate();var t={
options:e},n=o.a.Deferred().resolve(t).promise(),a=this.populateUser(n,t);return a=this.populateServer(a,e.serverID,t),e.primaryServer&&(a=this.populatePrimaryServer(a,t)),e.sectionID&&(a=this.populateSection(e,a,t)),e.key&&(a=this.populateMetadata(e,a,t)),e.channelID&&(a=this.populateChannel(e,a,t)),e.channelKey&&(a=this.populateChannelMetadata(e,a,t)),a=a.then(function(){return o.a.Deferred().resolve(t).promise()},function(e){return g?g=!1:c.a.trigger("navigate","unauthorized",{result:t,
silent:!0}),o.a.Deferred().reject(t).promise()}),i=a,a},abortPendingPopulate:function(){i&&"pending"===i.state()&&(g=!0),d.a.abortAll("page")},populateUser:function(e,t){var n=u.a("appModel"),i=n.get("user"),a=function(){var e=i.get("isLocked"),n=o.a.Deferred();return e?n.reject(t):n.resolve(t),n.promise()};return(i.get("lockState")===f.a.lockStates.PENDING?i.server.populate():o.a.Deferred().resolve().promise()).then(a,a)},populateServer:function(e,t,n){var i=u.a("appModel")
;return e=e.then(function(){var e=i.get("servers"),a=void 0;if(!t)return e.populateAnyServer();if(/^transient/.test(t)){var r=i.get("transientServer");if(!r||r.id!==t)return c.a.trigger("navigate:refresh:dashboard"),o.a.Deferred().reject().promise();a=o.a.Deferred().resolve(r).promise()}else a=e.populateServer(t);return a.done(function(e){n.server=e}),a.fail(function(){n.server=e.get(t)}),a})},populatePrimaryServer:function(e,t){var n=u.a("appModel");return e=e.then(function(){function e(r,s){
s||(n.off("change:isWaitingForPrimaryServer",e),a=n.get("primaryServer"),a?(t.server=a,a.populate().done(i.resolve).fail(i.reject)):i.reject())}var i=o.a.Deferred(),a=n.get("primaryServer");return a?(t.server=a,i.resolve().promise()):n.get("isWaitingForPrimaryServer")?(n.on("change:isWaitingForPrimaryServer",e),i.promise()):i.reject().promise()})},populateSection:function(e,t,n){return t=t.then(function(){var e=n.server.get("sections");return e.find(function(e){return e.isNew()
})?e.fetch():e.populate()}),t=t.then(function(t){var i=n.item,a=e.sectionID;if(i&&(!(a=i.get("librarySectionID"))||!n.server.get("isFullServer")))return o.a.Deferred().resolve();var r=t.get(a);return r?(n.section=r,i&&i.setContext("section",r),o.a.Deferred().resolve(r)):o.a.Deferred().reject()})},populateMetadata:function(e,t,n){return t=t.then(function(){var t=new h.a({key:e.key},{server:n.server,relatedOptions:e.relatedOptions});return n.item=t,t.fetch({scope:"page",data:r.a.extend({
checkFiles:"1",includeExtras:"1",includeRelated:"1",includeRelatedCount:"0",includeOnDeck:"1",includeChapters:"1"},e.populateData)})}),t=this.populateSection(e,t,n)},populateChannel:function(e,t,n){return t=t.then(function(){var t=e.channelID,i={};/^\/\w+\//.test(t)?i.key=t:i.identifier=t;var a=new p.a(i,{server:n.server});return n.channel=a,a.fetch({scope:"page"})})},populateChannelMetadata:function(e,t,n){return t=t.then(function(){var t=new p.a({key:e.channelKey},{server:n.server,
channel:n.channel});return n.channelItem=t,t.fetch({scope:"page"})})}});t.a=m},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(15),o=n(13),l=n(12),u=s.a.AppRouter.extend({initialize:function(){this.uniqueRoutes=a.a.uniq(a.a.values(this.appRoutes)),this.fragments=a.a.invert(this.appRoutes),this.listenTo(this,"route",this.onRoute),this.listenTo(l.a,"navigate",this.onNavigate)},resolveUrlFragment:function(e,t){var n=e.match(/:\w+/g);return n&&a.a.each(n,function(n){
var i=n.slice(1),a=t[i];if(null==a){var r=new RegExp("\\([^\\)]*"+n+"[^\\)]*\\)","g");e=e.replace(r,"")}else e=e.replace(n,encodeURIComponent(a))}),e.replace(/\(|\)/g,"")},onRoute:function(e){var t=o.a("appModel"),n=t.get("history"),i=t.get("forwardHistory"),s=r.a.history.getFragment();s===i[0]?n.push(i.shift()):s!==a.a.last(n)&&(n.push(s),i.splice(0)),t.trigger("change:history",t,n)},onNavigate:function(e,t){if(a.a.indexOf(this.uniqueRoutes,e)!==-1){t||(t={});var n=!1
;if(null!=t.silent&&(n=t.silent,delete t.silent),null==t.trigger&&(t.trigger=!0),n)this.controller[e].apply(this.controller,a.a.values(t));else{var i=this.resolveUrlFragment(this.fragments[e],t);this.navigate(i,{trigger:t.trigger,replace:t.replace})}}}});t.a=u},function(e,t,n){"use strict";function i(e){return e.entities}t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMMM D, YYYY";return e?r()(e).format(t):""}
Object.defineProperty(t,"__esModule",{value:!0});var a=n(37),r=n.n(a);t.default=i},function(e,t,n){"use strict";function i(e){if(e<=0||!r.a.isNumber(e))return"0:00";var t=o.a.duration(e),n=t.seconds(),i=t.minutes(),a=t.hours()+24*t.days(),s="";return s=n<10?":0"+n:":"+n,s=i<10&&a>0?"0"+i+s:i+s,a>0&&(s=a+":"+s),s}var a=n(2),r=n.n(a),s=n(37),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.seasonIndex,i=e.episodeIndex;if((i>0||0===i)&&t<1e3){e.noLeadingZero||(t=n.i(o.a)(t),
i=n.i(o.a)(i));var a=e.separator;if(e.useLongName){var l=n.i(s.default)("Season {seasonNumber}",{seasonNumber:t}),u=n.i(s.default)("Episode {episodeNumber}",{episodeNumber:i});return""+l+(a||" ")+u}var c=n.i(s.default)("S{seasonNumber}",{seasonNumber:t}),d=n.i(s.default)("E{episodeNumber}",{episodeNumber:i});return""+c+(a||"")+d}if(e.date){var h=r()(e.date);return n.i(s.default)("{monthNumber}/{dayNumber}/{shortYear}",{monthNumber:h.month()+1,dayNumber:h.date(),shortYear:h.format("YY")})}
return""}var a=n(37),r=n.n(a),s=n(4),o=n(517);t.a=i},function(e,t,n){"use strict";function i(e){var t=r.a.Deferred(),n=function(){t.resolve.apply(t,arguments)};return e.then?e.then(n,n):n(e),t.promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(19),a=n(315),r=n(58),s=r.a.extend({getUrl:function(e){if(e){var t=n.i(a.a)();return i.join(e,{size:Math.round(this.width*t)})}return e}});t.a=s},function(e,t,n){"use strict";function i(){
return n.i(r.createSelector)(n.i(s.a)(),n.i(o.a)(),function(e,t){return{allowServerFilters:!!e&&!e.isPersonalCloudServer,url:t}})}var a=n(14),r=n(8),s=(n.n(r),n(54)),o=n(722),l=n(797);t.a=n.i(a.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){var t=parseFloat(e,10),n=e.match(/m?s/);switch(n&&(n=n[0]),n){case"s":return 1e3*t;case"ms":return t}return 0}t.a=i},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){
return o}),n.d(t,"c",function(){return l}),n.d(t,"e",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return h});var r=n.i(i.a)(a._10),s=n.i(i.a)(a._11),o=n.i(i.a)(a._12),l=n.i(i.a)(a._13),u=n.i(i.a)(a._14),c=n.i(i.a)(a._15),d=n.i(i.a)(a._16),h=n.i(i.a)(a._17)},function(e,t,n){"use strict";function i(e){return e.experienceSettings}t.a=i},function(e,t,n){"use strict"
;var i=n(2943),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),u=n(15),c=n(4),d=n(12),h=n(162),p=n(160),f=n(312),g=n(184),m=n(252),v=n(510),y=n(23),b=n(810),S=n(218),I=n(1826),w=n(190),M=n(405),C=n(333),D=u.a.Layout.extend({mixins:[b.a],tagName:"li",className:"striped-list-item media-list-item",template:a.a,visible:!1,ui:{container:".media-list-inner-item",actions:".media-actions",dropdown:".media-actions-dropdown"},regions:{rating:".media-rating",progress:".media-progress"},events:{
"mouseenter > a":"onMouseEnter","mouseleave > a":"onMouseLeave","mousedown > a":"onMouseDown","click > a":"onClick","click .play-btn":"onPlayClick","click .play-unwatched-btn":"onPlayUnwatchedClick","click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","click .media-title-link":"onTitleClick","hide.bs.dropdown .media-actions-dropdown":"onDropdownHide"},onlyAfterRender:["select","deselect"],initialize:function(e){l.a.bindAll(this,"onResize"),this.skipFirstRender=e.skipFirstRender,
this.continuousPlay=e.continuousPlay;var t;this.model&&(t=this.model.get("type")),t||(t=e.type),this.type=t,this.isPhotoSection="photo"===n.i(v.a)(this.model&&this.model.section),"clip"===this.type&&this.isPhotoSection&&(this.type="photo"),this.sort=e.sort,this.$el.addClass(this.type),this.sort&&/^(?:addedAt|originallyAvailableAt|rating|mediaHeight|duration)$/.test(this.sort)&&this.$el.addClass("show-sort"),this.parentMediaActions=e.mediaActions
;var i=this.model&&this.model.server||this.parentMediaActions&&this.parentMediaActions.server;this.mediaActions=new S.a({},{item:this.model,type:t,server:i}),this.listenTo(this.mediaActions,{"change:showPlay":this.onActionsChange,"change:showEdit":this.onActionsChange,"change:showListDropdown":this.onActionsChange}),d.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),
this.multiuser=this.model.server.get("multiuser");var e=this.model.toJSON(),t="#!/server/"+encodeURIComponent(this.model.server.id);if(e.isFolder)t+="/section/"+encodeURIComponent(this.model.section.id)+"/folder/"+encodeURIComponent(e.key);else if(!e.isLibraryItem&&this.model.channel){var n=this.model.channel,i=n.id?n.id:n.get("identifier");t+="/channel/"+encodeURIComponent(i),"clip"===e.type?t+="/details/"+encodeURIComponent(e.key):t+="/"+encodeURIComponent(e.key)
}else"userPlaylistItem"===e.type?t="#!/playlist/"+this.model.userPlaylistKey+"/details/"+e.id:t+="/details?key="+encodeURIComponent(e.key);return{item:e,url:t,selected:this.model.selected,showActions:this.showActions(),sort:this.sort}},render:function(){return this.model?this.skipFirstRender?(this.skipFirstRender=!1,this):(this.visible=!0,void u.a.Layout.prototype.render.apply(this,arguments)):this},show:function(){this.model&&!this.visible&&(this.image&&this.image.setModel(this.model),
this.mediaActions&&this.mediaActions.setParent({item:this.model}),this.visible=!0,this.render())},hide:function(){this.model&&this.visible&&(this.image&&this.image.cancel(),this.visible=!1,this.stopListening(this.model),this.$el.empty())},select:function(){this.ui.container.addClass("selected")},deselect:function(){this.ui.container.removeClass("selected")},getPosterUrl:function(e){
return"show"===this.type?this.model.get("grandparentThumb")||this.model.get("parentThumb")||e:e||this.model.get("parentThumb")||this.model.get("grandparentThumb")},showActions:function(){return this.mediaActions&&(this.mediaActions.get("showPlay")||this.mediaActions.get("showEdit")||this.mediaActions.get("showListDropdown"))},canPlaySiblings:function(){return!this.model.get("isExtra")&&(!/^\/search\/?/.test(this.model.get("containerKey"))&&/^(track|photo|clip|userPlaylistItem)$/.test(this.type))
},bindings:{".play-btn":{model:"mediaActions",modelAttribute:"showPlay",manual:!0,autohide:!0},".play-unwatched-btn":{model:"mediaActions",modelAttribute:"showPlayUnwatched",manual:!0,autohide:!0},".edit-btn":{model:"mediaActions",modelAttribute:"showEdit",manual:!0,autohide:!0},".more-btn":{model:"mediaActions",modelAttribute:"showListDropdown",manual:!0,autohide:!0},".unwatched-icon":{modelAttribute:"viewCount",modelListeners:["viewCount","viewOffset"],manual:!0,autohide:function(){
if(!this.bypassShowUnwatchedIconsSetting)return!1;if(!/^(movie|episode|userPlaylistItem)$/.test(this.model.get("type")))return!1;if(this.model.get("isFolder"))return!1;if(this.shared&&!this.multiuser)return!1;var e=this.model.get("viewCount"),t=this.model.get("viewOffset");return!e||t},formatter:function(e,t){this.model.get("viewOffset")&&t.toggleClass("unwatched-icon-partial",!0)}},".media-title":{modelAttribute:"title",modelListeners:["title","parentTitle","grandparentTitle"],isHtml:!0,
formatter:function(e){var t=this.model.get("grandparentTitle")||this.model.get("parentTitle")||e,n=this.model.get("type");return/^(season|episode|album|track)$/.test(n)&&this.model.get("isLibraryItem")?'<span class="btn-metadata-link media-title-link">'+l.a.escape(t)+"</span>":l.a.escape(t)}},".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","parentTitle","grandparentTitle","year"],autohide:!0,formatter:function(e){var t
;if("userPlaylistItem"===this.model.get("type"))this.model.get("recommender")&&(t=n.i(c.default)("from {1}",this.model.get("recommender")));else{t=this.model.get("grandparentTitle")||this.model.get("parentTitle")?this.model.get("title"):e}return this.$el.toggleClass("show-subtitle",!!t),t}},".media-subtitle-2":{modelAttribute:"index",modelListeners:["index","message"],autohide:!0,formatter:function(e){var t=this.model.get("type")
;return"userPlaylistItem"===t?this.model.get("message"):"episode"===t?n.i(h.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "}):void 0}},".media-added-at":{modelAttribute:"addedAt",autohide:!0,formatter:function(e){return n.i(g.a)(e)}},".media-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return n.i(p.default)(e)}},".media-resolution":{modelAttribute:"Media",
autohide:!0,formatter:function(e){return e&&e.length?n.i(m.default)(e[0].videoResolution):""}},".media-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return n.i(f.a)(e)}},".video-badge":{modelAttribute:"type",manual:!0,autohide:function(e){return"clip"===e&&this.isPhotoSection}}},onRender:function(){this.image&&this.image.setElement(this.ui.poster),("rating"===this.sort||this.showRating)&&this.rating.show(new w.a({model:this.model,disabled:!0})),
this.progress&&this.progress.show(new I.a({model:this.model}))},onClose:function(){this.image&&this.image.close(),this.dropdown&&this.dropdown.close(),d.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e,this.mediaActions&&this.mediaActions.stopListening()},onActionsChange:function(e){if(this.isRendered){var t=!this.showActions();this.ui.container.toggleClass("hide-actions",t),this.ui.actions.toggleClass("hidden",t)}},onClick:function(e){
this.stopTrackingSelecting(e,function(){var t=this.model.get("type"),n=/^(track|photo)$/;if(this.isPhotoSection&&(n=/^(track|photo|clip)$/),n.test(t)){e.preventDefault();var i={item:this.model,siblings:this.canPlaySiblings()};"photo"===t&&(i.autoplay=!1),y.a.execute("playMedia",i)}})},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),y.a.execute("playMedia",{item:this.model,continuous:this.continuousPlay,siblings:this.canPlaySiblings()})},onPlayUnwatchedClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),y.a.execute("playMedia",{item:this.model,unwatched:!0,siblings:this.canPlaySiblings()})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=s()(e.currentTarget),n=t.hasClass("btn-loading")?t:this.$el;if(!n.hasClass("active")){n.addClass("active");var i=this.model.fetch({data:{includePreferences:"1"}});i.done(l.a.bind(function(){d.a.trigger("show:modal",new C.a({mediaActions:this.mediaActions}))},this)),
i.always(l.a.bind(function(){n.removeClass("active")},this))}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),s()(".media-actions-dropdown").trigger("hide.bs.dropdown"),this.dropdown=new M.a({model:this.model,mediaActions:this.mediaActions}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover on-top")
;var t=s()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},onTitleClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),d.a.trigger("navigate","details",{serverID:this.model.server.id,key:this.model.get("grandparentKey")||this.model.get("parentKey")})},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover on-top"))}});t.a=D},function(e,t,n){
"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return u.a.createElement("div",r()({className:d.a.pageHeader},n),t)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(2661),d=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2666)),l=n.n(o);i.defaultProps={className:l.a.pageHeaderLeft},t.a=i},function(e,t,n){"use strict";function i(e){
return o.a.createElement(u.a,r()({className:d.a.innerEmptyPage,contentClassName:d.a.innerEmptyPageContent,scrollDirection:l.a.NONE},e))}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(22),u=n(133),c=n(1e3),d=n.n(c);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.prePlayPage},function(e){var t=e.relatedHubs,n=e.isRelatedHubsPending;return{relatedHubEntityIDs:t,showSpinner:!t.length&&n}})}var a=n(14),r=n(8),s=(n.n(r),n(2251));t.a=n.i(a.b)(i)(s.a)
},function(e,t,n){"use strict";function i(e){return r()(l.a,{},void 0,o.a.createElement(u.a,e))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(950),u=n(949);t.a=i},function(e,t,n){function i(e){if(!s(e)||a(e)!=o)return!1;var t=r(e);if(null===t)return!0;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==h}var a=n(454),r=n(3131),s=n(356),o="[object Object]",l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,h=c.call(Object);e.exports=i
},,function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(762),s=n(759),o=n(160),l=n(312),u=n(1393),c={tagsRenderer:u.a,tagsRendererOptions:{},defaultBindings:{".item-title":{modelAttribute:"title"},".item-year":{modelAttribute:"year"},".item-progress":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var i=this.model.get("duration"),a=n.i(r.a)(e,i);a&&t.css("width",a+"%"),t.parent().toggleClass("hidden",!a)}},".item-duration":{modelAttribute:"duration",autohide:!0,
formatter:function(e){return e?n.i(l.a)(e):0}},".item-unwatched-label":{modelAttribute:"viewCount",modelListeners:["viewCount","viewOffset"],manual:!0,autohide:function(e){if(this.shared&&!this.multiuser)return!1;var t=this.model.get("viewOffset");return!e&&!t}},".item-unavailable-btn":{modelAttribute:"Media",manual:!0,autohide:function(e){return!!n.i(s.a)(e).length}},".item-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return n.i(o.default)(e)}},
".item-tagline":{modelAttribute:"tagline",autohide:!0},".item-genre":{modelAttribute:"Genre",autohide:!0,isHtml:!0,formatter:function(e){return e&&e.length?this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"genre",tags:e,maxLen:50,maxTags:2})):""}},".item-director":{modelAttribute:"Director",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";var n=this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"director",tags:e,
maxLen:50,maxTags:3}));return t.find(".metadata-tag-list").html(n),n}},".item-writer":{modelAttribute:"Writer",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";var n=this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"writer",tags:e,maxLen:50,maxTags:3}));return t.find(".metadata-tag-list").html(n),n}},".item-cast":{modelAttribute:"Role",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return""
;var n=this.tagsRenderer(a.a.extend({},this.tagsRendererOptions,{model:this.model,key:"actor",tags:e,maxLen:50,maxTags:5}));return t.find(".metadata-tag-list").html(n),n}},".item-summary":{modelAttribute:"summary",autohide:!0},".item-content-rating":{modelAttribute:"contentRating",autohide:!0},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e.length},autohide:function(e){return e>1}},".details-unwatched-count-badge":{modelAttribute:"unviewedLeafCount",
autohide:function(e){return!(this.shared&&!this.multiuser)&&!!e}},".content-rating-flag-container":{modelAttribute:"contentRating",manual:!0,autohide:!0},".studio-flag-container":{modelAttribute:"studio",manual:!0,autohide:!0}}};t.a=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n.n(i),r=n(12),s=n(78),o=n(19),l=n(498),u=n(321),c=n(65),d=n(21),h=n(694),p=d.a.extend({name:"HubCollection",
context:["server","section","metadataItem","hubKey","hubCount","count","includeEmpty","libraryHubsOnly","includeLibraryPlaylists","excludes","allowSync","maxLength"],responseContext:["allowSync"],model:h.a,cache:new l.a,url:function(){var e="/hubs";this.hubKey?e=this.hubKey:this.section&&(e="/hubs/sections/"+encodeURIComponent(this.section.id));var t={excludeFields:"summary"};return this.count&&(t.count=this.count),this.hubCount&&(t.hubCount=this.hubCount),this.includeEmpty&&(t.includeEmpty=1),
this.libraryHubsOnly&&(t.libraryHubsOnly=1),this.includeLibraryPlaylists&&(t.includeLibraryPlaylists=1),this.excludes&&this.excludes.length&&this.excludes.forEach(function(e){t["exclude"+n.i(u.a)(e)]=1}),o.join(e,t)},initialize:function(){this.section&&this.listenTo(r.a,"clear:sections:hubs",this.clear)},fetch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=a.a.clone(e);return e.onlyTransient&&this.populatePromise&&(t.remove=!1,t.url=o.join(a.a.result(this,"url"),{
onlyTransient:1})),d.a.prototype.fetch.call(this,t)},augmentResponseText:function(e,t){return t===c.a.xml?n.i(s.a)(e):e},augmentResponse:function(e){var t=this,n=this.model.prototype.rootPropertyName;if(e&&n){if(a.a.isArray(e)){var i;i={},i[n]=e,e=i}else if(e[n]&&!a.a.isArray(e[n])){var r;r={},r[n]=[e[n]],e=r}var s=e[n],o=s&&s.length;if(o){if(!this.includeEmpty)for(;o&&o--;)s[o].size<=0&&s.splice(o,1);this.maxLength&&s.splice(this.maxLength),e.size>s.length&&(e.size=String(s.length))}}
return this.responseContext.forEach(function(n){var i=e[n];void 0!==i&&t.setContext(n,i)}),e}});t.default=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(33),s=n(532),o=n(19),l=n(17),u=n(18),c=n(1223),d={UNTESTED:"untested",PENDING:"pending",CONNECTED:"connected",UNAUTHORIZED:"unauthorized",UNAVAILABLE:"unavailable",ABORTED:"aborted"},h=l.a.boolean.isRequired,p=u.a.extend({name:"ConnectionModel",context:["server"],idAttribute:"uri",sessionAttrs:{currentTest:l.a.custom(function(e){
return a.a.isFunction(e.abort)}),testState:l.a.oneOf(d.UNTESTED,d.PENDING,d.CONNECTED,d.UNAUTHORIZED,d.UNAVAILABLE,d.ABORTED).isRequired,isBundled:h,isFallback:h,serverAttrs:l.a.object,currentReachabilityTest:l.a.custom(function(e){return a.a.isFunction(e.abort)}),isPossiblyCrossNetworkProtected:l.a.boolean.isRequired},sessionRelations:{sources:{relationClass:c.a}},syncedAttrs:{uri:l.a.string,scheme:l.a.string,address:l.a.string,port:l.a.string,relay:l.a.boolean},derivedAttrs:{
isUntested:function(){return this.get("testState")===d.UNTESTED},isPending:function(){return this.get("testState")===d.PENDING},isConnected:function(){return this.get("testState")===d.CONNECTED},isUnauthorized:function(){return this.get("testState")===d.UNAUTHORIZED},isUnavailable:function(){return this.get("testState")===d.UNAVAILABLE},isFailed:function(){return this.get("isUnauthorized")||this.get("isUnavailable")},isAborted:function(){return this.get("testState")===d.ABORTED},
isLoopback:function(){var e=this.get("address");return"localhost"===e||s.a.isLoopbackAddress(e)},isPrivate:function(){return this.get("isLoopback")||s.a.isPrivateAddress(this.get("address"))},isHttps:function(){return"https"===this.get("scheme")},isSecure:function(){return this.get("isLoopback")||this.get("isHttps")},isPlexDirect:function(){return/\.plex\.direct:/.test(this.get("uri"))}},defaults:{testState:d.UNTESTED,isBundled:!1,isFallback:!1,relay:!1,isPossiblyCrossNetworkProtected:!1},
url:function(){return this.get("uri")},constructor:function(e,t){var i=a.a.clone(e);a.a.isObject(e)&&!e.uri&&(n.i(r.a)(e.scheme&&e.address,"A server connection requires either a uri or a scheme and address. "+e.scheme+"://"+e.address),i.uri=e.scheme+"://"+e.address,e.port&&(i.uri+=":"+e.port)),u.a.prototype.constructor.call(this,i,t)},initialize:function(){this.listenTo(this.get("sources"),"remove reset",this.onSourcesChange)},augmentResponse:function(e){var t=e.protocol
;return t?a.a.extend({},e,{scheme:t}):e},getAddressFromUri:function(){return n.i(o.parseUrl)(this.get("uri")).hostname},getIpAddressFromPlexDirectAddress:function(){var e=this.get("address");if(/\.plex\.direct$/.test(e)){var t=e.indexOf(".");t>0&&(e=e.substring(0,t),e=e.replace(/\-/g,"."))}return e},getLoopbackAttributes:function(){return{scheme:"http",address:"127.0.0.1",port:this.get("port")}},hasSource:function(e){return this.get("sources").some(function(t){return e&&t.get("id")===e})},
onSourcesChange:function(){this.get("sources").length||this.trigger("destroy",this,this.collection)}},{testStates:d});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(83),s=n(1232),o=r.a.extend({model:s.a,url:"/:/prefs",initialize:function(e,t){this.server.on("socket:setting",function(e){var t=this.get(e.id);t&&(e=t.parse(e),t.set("value",e.value),
"FriendlyName"===e.id&&e.value?this.server.set("friendlyName",e.value):"allowMediaDeletion"===e.id&&this.server.set("allowMediaDeletion",e.value))},this)},parse:function(e){var t=this.convert(e,"Setting");return a.a.filter(t,function(e){return e.id})}});t.a=o},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(257)),r=n.i(i.createSelectorCreator)(i.defaultMemoize,a.a);t.a=r},function(e,t,n){"use strict";function i(e){return e.user}t.a=i},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(497),s=r.a.extend({maxCycles:5,maxSize:100,getItemCacheKey:function(e,t){if(a.a.isFunction(e.cacheKey))return t||(t=e.toJSON()),e.cacheKey(t)}});t.a=s},function(e,t,n){"use strict";function i(e){return n.i(a.a)(e,{limit:"past"})}var a=n(1296);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a});var i="boolean",a="other"},function(e,t,n){var i=n(770).default,a=n(97);e.exports=a(i)},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(13),l=n(19),u=n(38),c=n(28),d=n(756),h=u.a.extend({initialize:function(){a.a.bindAll(this,"onAjaxSend","onAjaxComplete"),this.requests=[],this.byId={}},startListening:function(){var e=s()(document);e.on("ajaxSend",this.onAjaxSend),e.on("ajaxComplete",this.onAjaxComplete)},stopListening:function(){var e=s()(document);e.off("ajaxSend",this.onAjaxSend),e.off("ajaxComplete",this.onAjaxComplete)},abortAll:function(e){for(var t=this.requests.length-1;t>-1;t--){
var n=this.requests[t];null!=e&&e!==n.settings.scope||this.abort(n)}},abort:function(e){var t=a.a.isString(e)?this.byId[e]:e;t&&(t.xhr.aborting=!0,t.xhr.abort(),this.remove(t))},store:function(e,t){var n=a.a.uniqueId("r");e.rid=n;var i={xhr:e,settings:t};return this.requests.push(i),this.byId[n]=i,i},remove:function(e){var t=a.a.indexOf(this.requests,e);t>-1&&this.requests.splice(t,1),this.byId.hasOwnProperty(e.xhr.rid)&&delete this.byId[e.xhr.rid]},onAjaxSend:function(e,t,n){var i=this
;if(!n.skipCorsWithRedirect){var a=this.store(t,n);t.always(function(){t.aborting||i.remove(a)})}},onAjaxComplete:function(e,t,i){var r=n.i(d.a)(t);if(!t.aborting&&r){var s=n.i(l.parseUrl)(i.url);if(!r||"/log"!==s.pathname){var u=n.i(o.a)("appModel").get("servers").find(function(e){var t=e.get("activeConnection"),n=t&&t.get("isConnected"),r=a.a.result(t,"url");return!!n&&0===i.url.indexOf(r)});u&&(n.i(c.a)('[Connections] Active connection to "%s" lost authorization',u.get("debugName")),
u.trigger("error:connection",u))}}}});t.a=new h},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=(n.n(g),n(30)),v=n.n(m),y=n(257),b=n(804),S=(n(538),n(1417)),I=function(e){function t(i,a){l()(this,t);var r=c()(this,e.call(this,i,a));return r.state=r._getListState(i),r._keyPool=n.i(S.a)("cell"),r._shouldRequestPage=!1,r}return h()(t,e),t.prototype.componentWillMount=function(){
this.props.onListUpdate&&this.props.onListUpdate(this.state)},t.prototype.componentDidMount=function(){this._checkForPageRequest()},t.prototype.componentWillReceiveProps=function(e){var t=this._getListState(e);n.i(y.a)(this.state,t)||this.setState(t)},t.prototype.shouldComponentUpdate=function(e,t){var n=this.props,i=this.state
;return e.items!==n.items||e.size!==n.size||(e.viewportWidth!==n.viewportWidth||e.viewportHeight!==n.viewportHeight||(e.listTop!==n.listTop||e.listLeft!==n.listLeft||(e.isScrolling!==n.isScrolling||(e.skipRenderCells!==n.skipRenderCells||(e.layout!==n.layout||(t.visibleStartIndex!==i.visibleStartIndex||(t.visibleEndIndex!==i.visibleEndIndex||(t.partiallyVisibleStartIndex!==i.partiallyVisibleStartIndex||(t.partiallyVisibleEndIndex!==i.partiallyVisibleEndIndex||(t.renderStartIndex!==i.renderStartIndex||t.renderEndIndex!==i.renderEndIndex))))))))))
},t.prototype.componentWillUpdate=function(e,t){this.props.onListUpdate&&t!==this.state&&this.props.onListUpdate(t)},t.prototype.componentDidUpdate=function(){this._checkForPageRequest()},t.prototype._getListState=function(e){var t=this._getListStyle(e),n=e.layout.getLandmarks&&e.layout.getLandmarks(),i=e.layout.getRangesForPosition(e.scrollTop,e.scrollLeft,e.size);return{listStyle:t,landmarks:n,visibleStartIndex:i.visibleStartIndex,visibleEndIndex:i.visibleEndIndex,
partiallyVisibleStartIndex:i.partiallyVisibleStartIndex,partiallyVisibleEndIndex:i.partiallyVisibleEndIndex,renderStartIndex:i.renderStartIndex,renderEndIndex:i.renderEndIndex}},t.prototype._getListStyle=function(e){var t=e.items,n=e.size,i=e.layout,a=e.viewportWidth,r=e.viewportHeight,s=e.listTop,o=e.listLeft,l={viewportWidth:a,viewportHeight:r,listTop:s,listLeft:o};return i.getListStyle(l,n,t)},t.prototype._checkForPageRequest=function(){var e=this.state
;this._shouldRequestPage&&(this._shouldRequestPage=!1,this.props.onPageRequest({startIndex:e.renderStartIndex,endIndex:e.renderEndIndex}))},t.prototype.renderCells=function(){
var e=this.props,t=e.keyPropName,n=e.items,i=e.itemsOffset,a=e.size,r=e.layout,o=e.hasNestedList,l=e.viewportWidth,u=e.viewportHeight,c=e.scrollLeft,d=e.scrollTop,h=e.cellRenderer,p=e.isScrolling,g=e.onPageRequest,m=this.state,v=m.renderStartIndex,y=m.renderEndIndex,b=m.partiallyVisibleStartIndex,S=m.partiallyVisibleEndIndex,I=a>n.length&&y===n.length-1,w=this._keyPool.getKeys(v,y,n,i,t),M=[];return f.a.each(w,function(e,i){var g=e.index,m=e.item,v=g>=b&&g<=S,y=r.getPositionForIndex(g,a,n)
;(null===m||o)&&(I=!0);var w={key:i,keyPropName:t,isVisible:v,isScrolling:p,viewportWidth:l,viewportHeight:u,cellIndex:g,cellX:y.cellX,cellY:y.cellY,cellWidth:y.cellWidth,cellHeight:y.cellHeight};o&&(w.scrollLeft=c,w.scrollTop=d),f.a.isString(m)?w[t]=m:w=s()({},m,w),M.push(h(w))}),this._shouldRequestPage=!!g&&(I&&!p),M},t.prototype.render=function(){var e=this._getListStyle(this.props);return a()("div",{className:v()(this.props.className,this.props.isScrolling&&b.a),style:e
},void 0,!this.props.skipRenderCells&&this.renderCells())},t}(g.Component);I.defaultProps={keyPropName:"entityID",items:[],itemsOffset:0,hasNestedList:!1,viewportWidth:0,viewportHeight:0,listTop:0,listLeft:0,isScrolling:!1,skipRenderCells:!1},t.a=I},function(e,t,n){"use strict";function i(e){if(u===e)return c;var t=e.split("?"),n=t.length>1?t[1]:void 0,i=n?o.parseParams(n):{};return u=e,c={url:t[0],params:i}}function a(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.hash,a=i(t);return o.join(a.url,s()({},a.params,{type:void 0,typeKey:e.typeKey,filters:n.i(l.a)(e.filters),limit:e.limit,filterLabel:e.filterLabel,customFilter:e.customFilter,sort:e.sort,folderKey:e.folderKey,folderTitle:e.folderTitle,parentFolderKey:e.parentFolderKey,parentFolderTitle:e.parentFolderTitle,save:1}))}var r=n(6),s=n.n(r),o=n(19),l=n(750);t.a=a;var u=void 0,c=void 0},function(e,t,n){"use strict"
;var i=n(2850),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),u=n(409),c=n(23),d=u.a.extend({tagName:"span",className:"rating star-rating",template:a.a,disabled:!0,modelEvents:{"change:rating":"onRatingChange","change:userRating":"onRatingChange"},events:l.a.extend({mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},u.a.prototype.events),initialize:function(e){u.a.prototype.initialize.apply(this,arguments)
;var t=this.model.server.get("shared")&&!this.model.server.get("multiuser");this.disabled=e.disabled||t,this.passive=e.passive,this.updateRating()},updateRating:function(){this.metadataRating=this.model.get("rating")||0,this.userRating=this.model.get("userRating"),this.setValue(this.userRating>0?this.userRating:this.metadataRating)},normalizeRating:function(e){return Math.round(e/2)},serializeData:function(){var e=this.normalizeRating(this.currentValue);return{stars:[e>0,e>1,e>2,e>3,e>4]}},
getValueForPosition:function(e){var t=this.$el,n=e-t.offset().left,i=n/t.width();return i=Math.min(Math.max(i,0),1),i=2*Math.ceil(5*i)},persistValue:function(){var e=this.currentValue||-1;c.a.execute("rate",{item:this.model,rating:e,passive:this.passive}),this.updateRating(),this.render()},displayValue:function(e){this.$el.data("value",e);var t=this.normalizeRating(e);this.$(".star-icon").each(function(e){var n=t>e;s()(this).toggleClass("star",n).toggleClass("dislikes",!n)}),
this.$el.toggleClass("unrated",!e)},onRender:function(){u.a.prototype.onRender.apply(this,arguments),this.$el.toggleClass("unrated",!this.currentValue),this.$el.toggleClass("user-rating",this.userRating>0),this.$el.toggleClass("disabled",this.disabled)},onRatingChange:function(e,t){this.updateRating(),this.render()},onMouseEnter:function(e){this.disabled||(this.$el.addClass("user-rating"),this.$el.removeClass("unrated"))},onMouseLeave:function(e){this.disabled||this.render()},
onMouseMove:function(e){if(!this.disabled)if(this.dragging)this.updateForPosition(e.pageX);else{var t=this.getValueForPosition(e.pageX);this.displayValue(t)}},onDragComplete:function(){this.disabled||this.persistValue()}});t.a=d},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(15),o=n(13),l=n(4),u=n(12),c=n(40),d=n(215),h=n(34),p=n(106),f=n(319),g=n(251),m=n(299),v=n(300),y=n(23),b=n(177),S=n(335),I=s.a.Layout.extend({mixins:b.a,posterWidth:250,ui:{poster:".item-poster"},regions:{
rating:".rating-container",summary:".summary-container",audio:".item-audio",subtitles:".item-subtitles",studio:".studio-flag-container",contentRating:".content-rating-flag-container",videoResolution:".video-audio-flags-container",audioCodec:".video-audio-flags-container",audioChannels:".video-audio-flags-container",poster:".details-poster-container",list:".details-list-region"},events:{"click .details-poster-container > .play-btn":"onPlayClick","click .item-unavailable-btn":"onUnavailableClick"
},initialize:function(e){a.a.bindAll(this,"onResize","onScroll");var t=n.i(o.a)("appModel");this.mediaActions=e.mediaActions,this.children=this.model.get("children"),this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.multiuser=this.model.server.get("multiuser"),this.progress=new r.a.Model({loading:!1,failed:!1}),this.listenTo(t,"change:primaryPlayer",this.onPrimaryPlayerChange),this.pageSize&&(u.a.trigger("content.subscribe:resize",this.onResize),
u.a.trigger("content.subscribe:scroll",this.onScroll)),this.mirror()},serializeData:function(){var e=this.model.server.get("playQueueManager"),t=this.model.get("grandparentKey"),n=this.model.get("parentKey");return{serverID:this.model.server.id,grandparentKey:n?encodeURIComponent(t):null,parentKey:n?encodeURIComponent(n):null,canPlay:e.canCreateFor(this.model),limited:this.shared||this.synced}},mirror:function(){var e=n.i(o.a)("appModel");if(this.allowMirror&&e.get("primaryPlayer")){var t
;t=this.model.get("isPlaylist")?this.model.get("playlistType"):n.i(h.k)(this.model.get("type")).mediaType;var i=c.a.getTypeByElement(t),a=m.a.getInstance(i,{isPassive:!0});a&&a.mirror({item:this.model})}},populatePage:function(){this.progress.set("loading",!0);var e=this.children.populateRange({start:0,end:this.children.get("populatedRange").end+this.pageSize,scope:"page"});return e.always(a.a.bind(function(){this.progress.set("loading",!1)},this)),e},getPreferredMedia:function(){
var e=n.i(o.a)("appModel"),t=e.get("settings"),i=n.i(h.k)(this.model.get("type")).mediaType,a={item:this.model,type:i,profile:v.a.prop(i),transcodeServer:f.a.resolveTranscodeServer({type:i,item:this.model,fallbackServer:e.get("primaryServer")}),allowDirectPlay:t.get("directPlay"),allowedAC3Containers:t.get("allowAC3")?"mp4":null,subtitlesBurnLevel:t.get("subtitlesBurnLevel")};return i===d.a&&(a.quality=p.a.getCurrentQuality(this.model,t)),g.a.getMediaDecision(a).media},onRender:function(){
if(this.children&&this.ListConstructor){var e;e=this.pageSize?this.populatePage():this.children.fetch({scope:"page"}),e.fail(a.a.bind(function(){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem loading these items.")}),this.progress.set("failed",!0)},this)),this.list.append(new this.ListConstructor({model:this.model,mediaActions:this.mediaActions,listModel:this.children,collection:this.children.get("metadataItems"),itemViewOptions:this.listItemViewOptions}))}
this.starRatingView&&this.rating.show(this.starRatingView),this.audioDropdown&&this.audio.append(this.audioDropdown),this.subtitlesDropdown&&this.subtitles.append(this.subtitlesDropdown),this.posterImage&&this.posterImage.setElement(this.ui.poster),this.studioFlag&&this.studio.show(this.studioFlag),this.contentRatingFlag&&this.contentRating.show(this.contentRatingFlag),this.videoResolutionFlag&&this.videoResolution.append(this.videoResolutionFlag),
this.audioCodecFlag&&this.audioCodec.append(this.audioCodecFlag),this.audioChannelsFlag&&this.audioChannels.append(this.audioChannelsFlag),this.summaryView&&this.summary.append(this.summaryView)},onClose:function(){this.posterImage&&this.posterImage.close(),this.pageSize&&(u.a.trigger("content.unsubscribe:resize",this.onResize),u.a.trigger("content.unsubscribe:scroll",this.onScroll))},onPrimaryPlayerChange:function(e,t){t&&this.mirror()},onPlayClick:function(e){e.preventDefault(),
y.a.execute("playMedia",{item:this.model})},onUnavailableClick:function(e){e.preventDefault(),u.a.trigger("show:modal",new S.a({model:this.model}))},onResize:function(e){this.containerSize=e},onScroll:function(e){if(!this.progress.get("loading")){var t=this.model.get("children"),n=e.scrollHeight-this.containerSize.innerHeight,i=n-e.scrollTop<10,a=t.get("populatedRange").end<t.get("totalSize");i&&a&&this.populatePage()}}});t.a=I},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(57),l=o.a.extend({className:"select-modal modal modal-sm fade",events:a.a.extend({"click a":"onClick"},o.a.prototype.events),initialize:function(){o.a.prototype.initialize.apply(this,arguments),this.promise=s.a.Deferred()},onRender:function(){o.a.prototype.onRender.apply(this,arguments)},onHide:function(e){o.a.prototype.onHide.apply(this,arguments),this.promise.reject()},onClick:function(e){e.preventDefault(),
this.promise.resolve(s()(e.currentTarget).data("value")),this.hide()}});t.a=l},function(e,t,n){"use strict";function i(e){var t=e.children,n=r()(e,["children"]);return o.a.createElement("div",n,t)}var a=n(16),r=n.n(a),s=n(1),o=n.n(s),l=n(2562),u=n.n(l);i.defaultProps={className:u.a.group},t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(30),S=n.n(b),I=n(99),w=n(2571),M=n.n(w),C=function(e){function t(){var n,i,a;c()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.onChange=function(e){i.props.onChange(e.target.value)},a=n,h()(i,a)}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,r=e.isDisabled,o=e.size,u=e.name,c=(e.initialValue,e.value),d=e.values,h=e.hasError,p=(e.errors,e.validations,l()(e,["className","errorClassName","disabledClassName","isDisabled","size","name","initialValue","value","values","hasError","errors","validations"]));return s()("div",{className:S()(t,M.a[o],r&&i,h&&n)},void 0,y.a.createElement("select",a()({},p,{disabled:r,className:M.a.select,id:u,name:u,value:c,
onChange:this.onChange}),d.map(function(e){if(m.a.isString(e))return s()("option",{value:e},e,e);var t=m.a.keys(e),n=t[0];return s()("option",{value:n},n,e[n])})))},t}(v.Component);C.defaultProps={className:M.a.input,errorClassName:M.a.hasError,disabledClassName:M.a.isDisabled,isDisabled:!1,size:I.LARGE,hasError:!1},t.a=C},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(13),m=n(4),v=n(68),y=n(27),b=n(22),S=n(392),I=n(51),w=n(110),M=n(147),C=n(111),D=n(123),P=n(75),T=n(112),x=n(91),E=n(2585),A=n.n(E),k=function(e){function t(i,a){l()(this,t);var r=c()(this,e.call(this,i,a));return r.onCancel=function(){n.i(g.a)("metrics").trackClick(s()({},r.props.metricsProperties,{page:r.props.metricsPage,action:v.e})),r.props.onCancel()},r.onAccordChange=function(e){
r.setState({isAccordGiven:e.target.checked})},r.state={isAccordGiven:!1},r}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isCancelButtonDisabled,i=e.isConfirmButtonSpinning,r=e.isOpen,o=e.metricsPage,l=e.metricsProperties,u=e.kind,c=e.title,d=e.message,h=e.accordMessage,p=e.confirmLabel,g=e.cancelLabel,y=e.hideCancelButton,E=e.onConfirm,k=!!h,L=i||k&&!this.state.isAccordGiven;return a()(M.a,{
size:b.d.SMALL,isOpen:r,metricsPage:o,metricsProperties:l,onModalClose:this.onCancel},void 0,a()(C.a,{onModalClose:this.onCancel},void 0,a()(D.a,{},void 0,c),a()(P.a,{className:A.a.confirmBody},void 0,d,k&&a()("label",{className:A.a.accordLabel},void 0,a()("input",{type:"checkbox",className:A.a.accordInput,checked:this.state.isAccordGiven,onChange:this.onAccordChange}),h)),a()(T.a,{},void 0,a()(x.a,{},void 0,!y&&a()(I.a,{className:A.a.cancelButton,kind:b.b.DEFAULT,isDisabled:t,
onPress:this.onCancel},void 0,g||n.i(m.default)("Cancel")),f.a.createElement(S.a,s()({},l,{action:v.f}),a()(w.a,{className:A.a.confirmButton,"data-autofocus":!0,kind:u,isDisabled:L,isSpinning:i,onPress:E},void 0,p||n.i(m.default)("OK")))))))},t}(p.Component);k.defaultProps={isConfirmButtonSpinning:!1,kind:b.b.PRIMARY},t.a=k},function(e,t,n){"use strict";var i=n(16),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(14),f=n(79),g=n(108),m=n(2140),v={
dispatchChangeBackground:g.a,dispatchResetBackground:g.b,dispatchGarbageCollectEntities:f.b},y=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentDidMount=function(){this.props.disableBackgroundPreset||this.props.dispatchChangeBackground({allowLightPreset:this.props.allowBackgroundLightPreset})},t.prototype.componentWillUnmount=function(){this.props.dispatchResetBackground(),this.props.dispatchGarbageCollectEntities()},
t.prototype.render=function(){var e=this.props,t=(e.dispatchChangeBackground,e.dispatchResetBackground,e.dispatchGarbageCollectEntities,a()(e,["dispatchChangeBackground","dispatchResetBackground","dispatchGarbageCollectEntities"]));return h.a.createElement(m.a,t)},t}(d.Component);y.defaultProps={disableBackgroundPreset:!1,allowBackgroundLightPreset:!1},t.a=n.i(p.b)(null,v)(y)},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(22),y=n(25),b=n(412),S=n(2663),I=n.n(S),w=function(e){function t(){return c()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.linkClassName,n=e.buttonClassName,i=e.title,r=e.to,o=e.hasMenu,u=e.isMenuOpen,c=e.isSelected,d=e.isDisabled,h=l()(e,["linkClassName","buttonClassName","title","to","hasMenu","isMenuOpen","isSelected","isDisabled"]);return o||r?o?m.a.createElement(b.a,a()({className:n,isSelected:c,isDisabled:d,direction:u?v.f.UP:v.f.DOWN},h),i):s()(y.a,{className:t,to:r,isDisabled:d},void 0,i):s()("span",{className:t},void 0,i)},t}(g.Component);w.defaultProps={linkClassName:I.a.link,
buttonClassName:I.a.button,hasMenu:!1,isMenuOpen:!1,isSelected:!1,isDisabled:!1},t.a=w},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2667)),l=n.n(o);i.defaultProps={className:l.a.pageHeaderRight},t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t,n){var i=n.librarySectionKey
;return!i&&n.librarySectionID&&(i="/library/sections/"+n.librarySectionID),{server:e,provider:t,librarySectionKey:i,roles:n.Role}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(2244);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.maxLines;return i?r()(o.a,{className:n,maxLines:i},void 0,t):r()("div",{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2418)),l=n(2727),u=n.n(l);i.defaultProps={className:u.a.secondaryTitle},
t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2729)),l=n.n(o);i.defaultProps={className:l.a.tertiaryTitle},t.a=i},function(e,t,n){"use strict";var i=n(14),a=n(8),r=(n.n(a),n(373)),s=n(79),o=n(2366),l=n.i(a.createStructuredSelector)({primaryServerEntityID:function(e){return e.primaryServer},serverEntityIDs:function(e){return e.servers},canProvisionPersonalCloudServer:r.a}),u={
onServerMenuOpen:s.g},c=n.i(i.b)(l,u)(o.a);t.a=c},function(e,t,n){"use strict";function i(e,t){if(t)switch(t){case s.a:switch(e){case"episode":return u}break;case s.b:return u}switch(e){case"movie":return o;case"show":return o;case"season":return o;case"episode":return o;case"artist":return l;case"album":return l;case"track":return l;case"photo":return l;case"photoalbum":return l;case"clip":return u;case"extra":return u;case"musicVideo":return u;case"mixed":return o;default:return l}}
function a(e,t,n){var a=i(t,n);return Math.round(e*a)}function r(e,t,n){var a=i(t,n);return Math.round(e/a)}var s=n(35);n.d(t,"e",function(){return o}),n.d(t,"d",function(){return u}),t.c=i,t.b=a,t.a=r;var o=1/1.5,l=1,u=16/9},function(e,t){e.exports={defaultSpeed:"0.2s",slowSpeed:"0.6s",fastSpeed:"0.1s",motionEasing:"cubic-bezier(0.6, 0.4, 0.2, 1.4)",menuSpeed:"0.15s",modalSpeed:"0.2s",tooltipSpeed:"0.15s",starSpeed:"0.3s",starPulseSpeed:"0.15s",posterFlipSpeed:"0.8s",overlaySpeed:"0.3s"}
},,function(e,t,n){"use strict";var i=n(21),a=n(707),r=i.a.extend({name:"MediaSettingCollection",context:["server"],model:a.b,getSaveParams:function(){return this.reduce(function(e,t){return e[t.id]=t.get("value"),e},{})}});t.a=r},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(52),c=n(2525),d=n.n(c),h=n(13),p=n(95),f=n(533),g=n(484),m=n(56),v=n(17),y=n(477),b=n(18),S=n(114),I=n(756),w=n(491),M=n(715),C=n(712),D=n(714),P=n(711),T=n(1250),x=n(1261),E={
PENDING:"pending",LOCKED:"locked",UNLOCKED:"unlocked"},A={EMPTY:"",UNSUBSCRIBED:"unsubscribed",ACTIVE:"active",ERROR:"error",REMOVED:"removed"},k=b.a.extend({mixins:[g.a],name:"UserModel",context:["server"],url:"/api/v2/user",sessionAttrs:{isSignedIn:v.a.boolean.isRequired,hasInvalidToken:v.a.boolean.isRequired,lastPrimaryServerID:v.a.string,lockState:v.a.oneOf(E.PENDING,E.LOCKED,E.UNLOCKED).isRequired,homeUsers:v.a.instanceOf(P.a).isRequired,homeDetails:v.a.instanceOf(T.a).isRequired},
syncedAttrs:{id:v.a.integer,uuid:v.a.string,authToken:v.a.string,username:v.a.string,email:v.a.string,emailOnlyAuth:v.a.boolean,title:v.a.string,locale:v.a.string,thumb:v.a.string,pin:v.a.string,home:v.a.boolean,restricted:v.a.boolean,guest:v.a.boolean,homeSize:v.a.integer,maxHomeSize:v.a.integer,queueUid:v.a.string,queueEmail:v.a.string,hasAllEntitlements:v.a.boolean,mailingListActive:v.a.boolean,mailingListStatus:v.a.oneOf(A.EMPTY,A.UNSUBSCRIBED,A.ACTIVE,A.ERROR,A.REMOVED)},syncedRelations:{
subscription:{relationClass:w.a},roles:{relationClass:M.a},entitlements:{relationClass:C.a},providers:{relationClass:D.a},profile:{relationClass:x.a}},derivedAttrs:{isLocked:function(){return this.get("lockState")===E.LOCKED},isUnlocked:function(){return this.get("lockState")===E.UNLOCKED},isFullUser:function(){return!!this.get("username")},isEmployee:function(){return!!this.get("roles").get("employee")},isNinja:function(){return this.get("isEmployee")||!!this.get("roles").get("ninja")},
hasPlexPass:function(){return!!this.get("subscription").get("active")},canGoPremium:function(){var e=this.get("homeSize")>1;return this.get("signedIn")&&!this.get("restricted")&&!this.get("hasPlexPass")&&!e},signedIn:function(){return this.get("isSignedIn")},locked:function(){var e=this.get("lockState");return e===E.LOCKED||e!==E.UNLOCKED&&null}},defaults:function(){var e={server:this.server,parent:this};return{isSignedIn:!1,hasInvalidToken:!1,lockState:E.PENDING,homeUsers:new P.a([],e),
homeDetails:new T.a({},e)}},initialize:function(e,t){this._resetPopulate(),this.onHomeUsersChange(this,this.get("homeUsers")),this.on("change:homeUsers",this.onHomeUsersChange,this),this.listenTo(this.server,{"change:isConnected":this.onServerConnectedChange,"change:isUnavailable":this.onServerUnavailableChange})},uninitialize:function(){this.off("change:homeUsers",this.onHomeUsersChange,this),this.stopListening()},fetch:function(){return u.a.Model.prototype.fetch.apply(this,arguments)},
augmentResponse:function(e){var t=e.roles,n=e.entitlements,i=e.providers;return s.a.extend({},e,{roles:t&&t.role,hasAllEntitlements:n&&n.all,entitlements:n&&n.entitlement,providers:i&&i.provider})},_getTokenPromise:function(){var e=this,t=p.a.get("myPlexAccessToken");return m.a.get("allowSSO")?t.then(null,function(){return e._getSSOTokenPromise()}):t},_getSSOTokenPromise:function(){return n.i(f.a)(this.server.getXHROptions("/api/v2/users/signin",{method:"POST",xhrFields:{withCredentials:!0},
data:{skipAuthentication:!0},dataType:"json"})).then(function(e){return e.authToken})},_getManualUserPromise:function(e){return l.a.ajax(this.server.getXHROptions(s.a.result(this,"url"),{headers:{"X-Plex-Token":e}}))},signInUnsupervised:function(){var e=this;if(!this._isSigningIn){this._isSigningIn=!0;var t=this._getTokenPromise();t.done(function(t){var i=e._getManualUserPromise(t);i.done(function(i){var a=e.get("homeDetails");a.fetch({headers:{"X-Plex-Token":t}}).always(function(){
var t=e.parse(i),r=e.get("lockState");if(r!==E.UNLOCKED){var s=n.i(h.a)("appModel").get("settings"),o=m.a.get("proxied")||s.get("autoLogin"),l=!!t.guest&&!a.get("guestEnabled");r=!t.home||o&&!l?E.UNLOCKED:E.LOCKED}e.signIn(t,{lockState:r}),e._isSigningIn=!1})}),i.fail(function(t){if(t.aborting)return void(e._isSigningIn=!1);var i=n.i(I.a)(t);e.signOut({hasInvalidToken:i}),e.server.testAllConnections(),i&&e.clearAccessToken(),e._isSigningIn=!1})}),t.fail(function(){e.signOut(),e._isSigningIn=!1})
}},signIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=s.a.isString(e)?this.parse(e):e,r=i.authToken,o=a()({isSignedIn:!0},i,t);return this._resolve(o,n),p.a.set("myPlexAccessToken",r)},signOut:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._reject(e),l.a.Deferred().resolve().promise()},activateStoredUser:function(e){S.a.set("activeUserID",e)
;var t=S.a.getActiveUser();if(t){var n=t.get("lastPrimaryServerID");this.set("lastPrimaryServerID",n)}},clearAccessToken:function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken&&delete window.PLEXWEB.myPlexAccessToken;var e=p.a.remove("myPlexAccessToken");return e=e.then(function(){return S.a.clearActiveUser()})},hashPIN:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.get("authToken");return d.a.SHA256_hash(e+t)},hasEntitlement:function(e){
var t=this.get("hasAllEntitlements"),n=this.get("entitlements");return!(!t&&!n.get(e))},hasHome:function(){return!!this.get("pin")||this.get("homeUsers").length>1},isFullUser:function(){return this.get("isFullUser")},isEmployee:function(){return this.get("isEmployee")},isNinja:function(){return this.get("isNinja")},hasPlexPass:function(){return this.get("hasPlexPass")},_resolve:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.startCapturingChangeEvents(),
this.activateStoredUser(e.id),this.set(e),this._resolvePopulate(),this.server.authenticate(e.authToken),t.silent?this.discardCapturedChangeEvents():this.releaseCapturedChangeEvents()},_reject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.startCapturingChangeEvents(),this.restoreDefaults(e),this._rejectPopulate(),this.server.deauthenticate(),t.silent?this.discardCapturedChangeEvents():this.releaseCapturedChangeEvents()},onHomeUsersChange:function(e,t){
var n=e.previous("homeUsers");n&&this.stopListening(n),this.listenTo(this.get("homeUsers"),"reset add remove",this.onHomeUsersUpdate)},onHomeUsersUpdate:function(){this.set("homeSize",this.get("homeUsers").length),this.get("homeDetails").fetch()},onServerConnectedChange:function(e,t){t&&this.signInUnsupervised()},onServerUnavailableChange:function(e,t){t&&this.signOut({lockState:this.get("lockState")})}},{lockStates:E,mailingListStates:A});n.i(y.a)(k,function(){return{
relationClass:n.i(h.a)("UserFlexModel")}}),t.a=k},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.selectedDirectory},function(e){if(e){var t=e.key;return"/"===t.charAt(0)?t:"/library/sections/"+t}})}var a=n(8);n.n(a);t.a=i},function(e,t,n){"use strict";t.a={NORMAL:0,LOCAL:42,CLOUD:43}},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(19),s=n(52),o=n(162),l=n(141),u=n(34),c=n(788),d=n(694),h={uri:function(e,t){var n=t&&t.items;if(n&&n.length){
if(n.length>1)return this.getBatchLibraryMetadataURI(n,t);e||(e=a.a.first(n))}if(e instanceof s.a.Model){if(e.get("isSection"))return this.getSectionURI(e,t);if(e.get("isMetadataList"))return this.getMetadataListURI(e,t);if(e.get("isPlaylist"))return this.getPlaylistURI(e,t);if(e.channel)return this.getChannelURI(e,t)}return this.getLibraryMetadataURI(e,t)},getSectionURI:function(e,t){var i,s=a.a.result(e,"url"),o=e.get("currentSubset"),l=e.get("currentFolderKey"),c=e.get("currentType")
;if("folder"===o.id)i=l?l:r.join([s,"all"]);else{var d=e.get("items"),h=d.getParams();if(h.type&&delete h.type,h.timelineState&&delete h.timelineState,h.unwatchedLeaves){h[n.i(u.k)(e.get("type")).typeString+".unwatched"]=1,delete h.unwatchedLeaves}c&&(h.sourceType=c.id),i=r.join([s,o.id],h),i=d.replaceSpecialFilterOperators(i)}return this._resolveURI({prefix:"library",parts:[e.get("uuid"),"directory",i]})},getBatchLibraryMetadataURI:function(e,t){
var n=this._getSectionInfo(a.a.first(e)),i=a.a.map(e,function(e){return e.get("ratingKey")}),r="/library/metadata/"+i.join(",");return this._resolveURI({prefix:"library",parts:[n.sectionUUID,"directory",r]})},getLibraryMetadataURI:function(e,t){t||(t={});var n,i=this._getSectionInfo(e),s=a.a.result(e,"url");return t.excludeSeedItem&&(s=r.join(s,{excludeSeedItem:1})),n=e.models||e.collectionName||e instanceof d.a?"directory":"item",this._resolveURI({prefix:"library",parts:[i.sectionUUID,n,s]})},
getMetadataListURI:function(e,t){var n=this._getSectionInfo(e);return this._resolveURI({prefix:"library",parts:[n.sectionUUID,"directory",e.get("containerKey")]})},getPlaylistURI:function(e,t){return this._resolveURI({prefix:"playlist",parts:["",e.get("guid")]})},getChannelURI:function(e,t){t||(t={});var n=a.a.result(e,"url"),i=e.get("items"),r=i&&i.length?"directory":"item";return this._resolveURI({prefix:"channel",parts:[e.channel.get("identifier"),r,n]})},title:function(e,t){var n=t&&t.items
;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataTitle(n,t);e=a.a.first(n)}return e.get("isSection")?this.getSectionTitle(e,t):e.get("isMetadataList")?this.getMetadataListTitle(e,t):this.getLibraryMetadataTitle(e,t)},getSectionTitle:function(e){var t=e.get("title"),n=e.get("currentSubset"),i=e.get("currentFilters");return"all"!==n.id?t+": "+n.get("title"):i.length?t+": "+a.a.flatten(a.a.map(i,function(e){return e.titles})).join(", "):t},getMetadataListTitle:function(e){
return e.get("containerTitle")||e.get("title")},getBatchLibraryMetadataTitle:function(e){var t=a.a.map(e,function(e){return e.get("title")});return n.i(c.a)(t)},getLibraryMetadataTitle:function(e){var t=e.get("grandparentTitle")||e.get("parentTitle"),i=e.get("title");if(t&&(i=t+" - "+i),"episode"===e.get("type")){i+=" ("+n.i(o.a)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" "})+")"}return i},
_resolveURI:function(e){var t=e.parts,n=a.a.map(t,function(e){return e?encodeURIComponent(e):""});return e.prefix+"://"+n.join("/")},_getSectionInfo:function(e){var t=e.get("librarySectionUUID"),i=e.get("librarySectionID");if(!t||!i){var r=n.i(l.a)(e);a.a.isEmpty(r)||(t=r.get("uuid"),i=r.id)}return{sectionUUID:t,sectionID:i}}};t.a=h},function(e,t,n){"use strict";function i(e,t){if(!e)return t;var n=a.a.parseXML(e.responseText);return n&&n.message?n.message:t}var a=n(61);t.a=i},function(e,t,n){
"use strict";function i(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}t.a=i},function(e,t,n){"use strict";var i={waitingRegex:/^(transcoded|downloaded|directplay|processed)$/,processingRegex:/^(pending|transcoding|downloading)$/,failedRegex:/^(failed|error)$/,addVersionHeader:function(e,t){return t||(t={}),t.headers||(t.headers={}),t.headers["X-Plex-Sync-Version"]=e,t},addVersionHeaderForDevice:function(e,t){var n=e&&e.get("syncList")
;return n&&n.get("version")?this.addVersionHeader(n.get("version"),t):t},getSyncStateFromPart:function(e){return e.transcodeState||e.syncState},getSyncStateContextFromPart:function(e){return e.transcodeStateContext||e.syncStateContext}};t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.clone(e);return t.hasOwnProperty("title")?(t.title=s.a.result(t,"title"),t.hasOwnProperty("plural")&&(t.plural=s.a.result(t,"plural")),t):t}function a(e,t){function n(e){for(var t in r){var n=r[t],a=n[e]
;if(a)return i(a)}o.a.warn("No type was found for "+e)}function a(){return t.map(function(e){return i(e)})}var r={};return e.forEach(function(e){r[e]=t.reduceRight(function(t,n){var i=n[e];return null!=i&&(t[i]=n),t},{})}),{get:n,getAll:a}}var r=n(2),s=n.n(r),o=n(28);t.a=a},function(e,t,n){"use strict";var i=n(214);n.d(t,"b",function(){return a}),n.d(t,"a",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return o})
;var a="none",r="video",s="audio",o="photo",l=["id","typeString"],u=n.i(i.a)(l,[{id:0,typeString:a},{id:1,typeString:r},{id:2,typeString:s},{id:3,typeString:o}]);u.get,u.getAll},function(e,t,n){"use strict";function i(e){var t=e.identifiers;for(var n in t)if(t[n]!==e[n])return!1;return!0}function a(e,t,a,r){var o=n.i(b.a)(t,function(e){return{identifiers:e}}),u=function(t){function o(e,n){c()(this,o);var i=h()(this,t.call(this,e,n));return i.onRepopulate=function(){i._repopulate()},
i._isPopulated=!1,i._component=null,i}return f()(o,t),o.prototype.componentDidMount=function(){this._populate()},o.prototype.componentDidUpdate=function(){this._isPopulated||this._populate()},o.prototype._populate=function(){var e=this.props,t=(e.identifiers,e.dispatch),i=l()(e,["identifiers","dispatch"]);n.i(y.a)(function(){a(t,i)})},o.prototype._repopulate=function(){if(!r)return this._populate();var e=this.props,t=(e.identifiers,e.dispatch),n=l()(e,["identifiers","dispatch"]);r(t,n)},
o.prototype.render=function(){if(this._isPopulated=i(this.props),this._isPopulated){var t=this.props,n=(t.identifiers,t.dispatch,l()(t,["identifiers","dispatch"]));this._component=m.a.createElement(e,s()({onRepopulate:this.onRepopulate},n))}return this._component},o}(g.Component);return u.displayName="Populatable("+n.i(S.a)(e)+")",u.WrappedComponent=e,n.i(v.b)(function(e){return o})(u)}
var r=n(6),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(14),y=(n(316),n(33),n(41)),b=n(181),S=n(217);t.a=a},function(e,t,n){"use strict";function i(e){return e.displayName||e.name||"Component"}t.a=i},function(e,t,n){"use strict";function i(e){return e.get("unviewedLeafCount")>0}function a(e){var t=e.get("viewCount"),n=e.get("viewOffset");return!(t&&!n)}function r(e){return!i(e)}function s(e){return!a(e)}
var o=n(2),l=n.n(o),u=n(13),c=n(4),d=n(215),h=n(34),p=n(773),f=n(64),g={movie:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDeleteVersions:!0,showDownload:!0,showEdit:!0,showFixMatch:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMatch:!0,showPlay:!0,showPlayVersion:!0,showPlayTrailer:!0,showQueue:!0,showRefresh:!0,showSplitApart:!0,showSync:!0,showConvert:!0,showUnmatch:!0,showShare:!0,showWatchLater:!0},show:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,
showMarkUnwatched:!0,showMarkWatched:!0,showMatch:!0,showPlayAll:!0,showPlayUnwatched:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showConvert:!0,showUnmatch:!0},season:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlayAll:!0,showPlayUnwatched:!0,showQueue:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0},episode:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDeleteVersions:!0,
showDownload:!0,showEdit:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showPlayVersion:!0,showQueue:!0,showRefresh:!0,showSync:!0,showConvert:!0,showShare:!0,showWatchLater:!0},artist:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,showMerge:!0,showMatch:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showUnmatch:!0},album:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,showMatch:!0,
showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showUnmatch:!0},track:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDownload:!0,showEdit:!0,showInfo:!0,showPlayMix:!0,showPlayMusicVideo:!0,showQueue:!0,showSelect:!0,showSync:!0},photoalbum:{showAddToPlaylist:!0,showEdit:!0,showPlay:!0,showQueue:!0,showShuffle:!0,showSync:!0},photo:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDownload:!0,showEdit:!0,showInfo:!0,showSync:!0},
clip:{showEdit:!0,showInfo:!0,showPlay:!0,showPlayVersion:!0,showShare:!0,showWatchLater:!0},userPlaylistItem:{showDeleteFromUserPlaylist:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showShare:!0,showSync:!0,showWatchLater:!0},playlist:{showDelete:!0,showEdit:!0,showPlay:!0,showQueue:!0,showShuffle:!0,showSync:!0},movieSection:{showAddToCollection:!0,showAddToPlaylist:!0,showAnalyze:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,
showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},showSection:{showAddToCollection:!0,showAddToPlaylist:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},seasonSection:{showAddToPlaylist:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,
showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},episodeSection:{showAddToPlaylist:!0,showAnalyze:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},artistSection:{showAddToCollection:!0,showAddToPlaylist:!0,showEdit:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},albumSection:{showAddToPlaylist:!0,showEdit:!0,showMerge:!0,
showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},trackSection:{showAddToPlaylist:!0,showEdit:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},photoSection:{showAddToPlaylist:!0,showAnalyze:!0,showPlay:!0,showQueue:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0}},m={showListDropdown:["showShuffle","showQueue","showRefresh","showSync","showDownload","showWatchLater","showShare","showInfo"]
},v=f.a.extend({initialize:function(e,t){t||(t={});var n=u.a("appModel");this.item=t.item,this.playQueue=t.playQueue,this.parent=this.item||this.section,this.showAdvanced=t.showAdvanced,this.user=n.get("user"),this.signedIn=this.user.get("signedIn"),this.devices=this.user.get("desktop").get("devices"),this.setDefaults(t.type),this.listenToParent(),this.listenTo(this.user,{"change:signedIn":this.onSignedInChange,"change:providers.change":this.onUserProvidersChange}),
this.listenTo(this.devices,"reset",this.onDevicesChange),this.listenTo(this,{"change:selecting":this.onSelectingChange,"change:selectedItems":this.onSelectedItemsChange})},setDefaults:function(e){e&&e!==this.type&&(this.type=e,this.section&&(e+="Section"),this.defaults=l.a.clone(g[e]||{}),this.defaults.selecting=!1,this.defaults.selectedItems=[],this.clear().set(this.defaults))},setParent:function(e){this.parent&&this.stopListening(this.parent),this.server&&this.stopListening(this.server),
this.item=e.item,this.section=e.section,this.parent=this.item||this.section,this.listenToParent()},listenToParent:function(){if(this.section){var e=this.parent.get("currentType");e&&this.setDefaults(e.get("typeString")),this.listenTo(this.parent,{"change:currentType":this.onCurrentTypeChange,"change:allowSync":this.onAllowSyncChange})}else this.item&&(this.setDefaults(this.item.get("type")),this.listenTo(this.parent,{"change:primaryExtraKey":this.onPrimaryExtraChange,
"change:unviewedLeafCount":this.onViewStateChange,"change:viewOffset":this.onViewStateChange,"change:viewCount":this.onViewStateChange}),this.showAdvanced&&this.listenTo(this.parent,{"change:guid":this.onGuidChange,"change:Media":this.onMediaChange}));this.parent&&(this.server=this.parent.server,this.shared=this.server.get("shared"),this.synced=!this.server.get("isFullServer"),this.multiuser=this.server.get("multiuser"),this.playQueues=this.server.get("playQueueManager"),
this.listenTo(this.server,"change:shared",this.onServerSharedChange)),this.updateAll()},updateAll:function(){this.updateSelectionStates(),this.updateAction("showPlay",this.canPlay),this.updateAction("showPlayAll",this.canPlay),this.updateAction("showPlayUnwatched",this.canPlay),this.updateAction("showPlayVersion",this.canPlayVersion),this.updateAction("showPlayMix",this.canPlayMix),this.updateAction("showPlayTrailer",this.canPlayPrimaryExtra),
this.updateAction("showPlayMusicVideo",this.canPlayPrimaryExtra),this.updateAction("showShuffle",this.canPlay,{shuffle:!0}),this.updateAction("showQueue",this.canQueue),this.updateAction("showEdit",this.canEdit),this.updateAction("showRefresh",this.canRefresh),this.updateAction("showSync",this.canSync),this.updateAction("showConvert",this.canConvert),this.updateAction("showDownload",this.canDownload),this.updateAction("showAddToPlaylist",this.canAddToPlaylist),
this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),this.updateAction("showDelete",this.canDelete),this.updateAction("showDeleteVersions",this.canDeleteVersions),this.updateAction("showInfo",this.isMedia),this.updateAction("showMarkWatched",this.canMarkWatched),this.updateAction("showMarkUnwatched",this.canMarkUnwatched),this.showAdvanced&&(this.updateAction("showSelect",this.canMultiSelect),this.updateAction("showAnalyze",this.canMultiAction),
this.updateAction("showMerge",this.canMerge),this.updateAction("showAddToCollection",this.canMultiAction),this.updateAction("showMatch",this.canMatch),this.updateAction("showFixMatch",this.canFixMatch),this.updateAction("showUnmatch",this.canUnmatch),this.updateAction("showSplitApart",this.canSplitApart)),this.updateDropdown("showListDropdown")},updateAction:function(e,t,n){var i=!!this.defaults&&this.defaults[e];this.set(e,t.call(this,i,n))},updateDropdown:function(e){
var t=m[e],n=l.a.map(t,function(e){return this.get(e)},this);this.set(e,l.a.some(n))},updateSelectionStates:function(){var e=this.getActionTargets();if(e){var t=e[0].get("type"),n="show"===t||"season"===t,o=this.get("selectedItems"),u=!(!o||!o.length),c=l.a.some(o,function(e){return e.get("isFolder")}),d=!!l.a.some(e,n?i:a),h=!!l.a.some(e,n?r:s);this.set({selecting:u,hasSelectedFolder:c,hasUnwatched:d,hasWatched:h})}},canPlay:function(e,t){
return!!e&&(!(this.parent&&!this.playQueues.canCreateFor(this.parent,t))&&(!this.item||!this.item.get("isFolder")&&!this.item.get("hasInvalidKey")))},canQueue:function(e){return!(this.item&&!this.item.get("isLibraryItem"))&&(this.isMedia(e)&&this.canPlay(e))},canPlayVersion:function(e,t){return!(!e||!this.item)&&this.item.get("Media").length>1},canPlayMix:function(e){if(!e||!this.item)return!1;var t=this.item.get("related");return!(!t||!t.findWhere({browse:!1}))},canPlayPrimaryExtra:function(e){
return!(!e||!this.item)&&!!this.item.get("primaryExtraKey")},canAddToPlaylist:function(e){if(!e||!this.server)return!1;if(this.playQueue&&this.playQueue.get("isRadio"))return!1;var t,n=this.server.supports("playlists"),i=this.parent&&this.parent.get("currentSubset");if(i){var a=this.get("selectedItems"),r=l.a.some(a,function(e){return e.get("isFolder")});t=("all"===i.id||a&&a.length>0)&&!r}else t=this.item&&this.item.get("isLibraryItem");return n&&t},canRefresh:function(e){
if(!e||this.synced)return!1;var t=this.getActionTargets();return l.a.every(t,function(e){var t=this.shared&&e.get("isPlaylist"),n=e.get("isSection"),i=!this.shared&&(n||e.get("isLibraryItem")&&!e.get("isFolder"));return t||i},this)},canDownload:function(e){return(!this.playQueue||!this.playQueue.get("isRadio"))&&this.canRefresh(e)},canEdit:function(e){if(!e||!this.canRefresh(e))return!1;var t=this.getActionTargets();return!(t&&t.length>1&&!t[0].server.supports("batchEdit"))},
canMultiSelect:function(e){return!!e&&(!this.shared||this.multiuser)},canMultiAction:function(e){return!!e&&(this.item?this.canEdit(e):!this.shared&&!this.synced&&this.section)},canMarkWatched:function(e){if(!e)return!1;if(!this.item&&!this.section)return!1;if(!this.canMultiSelect(e)&&!n.i(p.a)(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;var i=t[0];return!(i.get("isSection")||i.get("isFolder")||!i.get("isLibraryItem"))&&this.get("hasUnwatched")},canMarkUnwatched:function(e){
if(!e)return!1;if(!this.canMultiSelect(e)&&!n.i(p.a)(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;var i=t[0];return!(i.get("isSection")||i.get("isFolder")||!i.get("isLibraryItem"))&&this.get("hasWatched")},canMatch:function(e){return this.canEdit(e)&&!this.canUnmatch(e)},canFixMatch:function(e){return this.canEdit(e)&&this.canUnmatch(e)},canUnmatch:function(e){if(!e||!this.item||this.shared||this.synced)return!1;var t=this.item.get("guid")
;return!(!t||/(local|none)\:\/\//.test(t))},canSplitApart:function(e){if(!e||!this.item||this.shared||this.synced)return!1;var t;if("movie"===this.type){var n=this.item.get("Media");t=l.a.filter(n,function(e){return!e.proxyType})}else t=this.item.get("Location");return t.length>1&&this.server.supports("splitApart")},canMerge:function(e){if(!e)return!1;if(!this.canEdit(e))return!1;if(!this.server.supports("merge"))return!1;var t=this.get("selectedItems");return!(!t||t.length<2)},
canSync:function(e){if(!e||!this.parent||this.synced)return!1;if(!this.devices.filterSyncDevices(this.item||this.section).length)return!1;var t=this.shared?"sharedSync":"sync";if(!this.server.supports(t)||this.parent.get("isFolder"))return!1;var n;if(this.shared){var i=this.section||this.item.section;n=i&&i.get("allowSync")}else n=this.parent.get("allowSync")||this.parent.collection&&this.parent.collection.allowSync;return!!n},canConvert:function(e){
if(!e||!this.parent||this.shared||this.synced)return!1;if(this.item&&!this.item.get("isLibraryItem"))return!1;var t=this.server.supports("streamReady"),n=this.server.get("transcoderVideo")&&this.server.get("backgroundProcessing");return!(!t||!n||this.parent.get("isFolder"))},canWatchLater:function(e){if(!e||!this.item)return!1;var t=n.i(h.k)(this.type).mediaType===d.a,i=!!this.item.get("url"),a=!this.item.userPlaylistKey||"queue"!==this.item.userPlaylistKey
;return this.signedIn&&this.user.get("queueUid")&&t&&i&&a},canShare:function(e){return!!e&&(!(this.item&&this.item.get("isLibraryItem"))&&this.signedIn&&!this.user.get("restricted"))},canDelete:function(e){if(!e)return!1;if(this.item&&!this.item.get("isSection"))return this.canDeleteSingleItem(this.item);if(!this.canMultiSelect(e))return!1;var t=this.getActionTargets();return!!t&&l.a.every(t,this.canDeleteSingleItem,this)},canDeleteSingleItem:function(e){
if(!e||this.synced||e.get("isSection"))return!1;if(!n.i(p.a)(e)&&!e.server.supports("compositeDelete"))return!1;var t=!(!e.get("isLibraryItem")||!this.server.get("allowMediaDeletion")||this.shared),i=e.get("playlistType");return t||i},canDeleteVersions:function(e){if(!e||!this.item||this.shared||this.synced)return!1;if(!this.server.get("allowMediaDeletion"))return!1;var t=this.item.get("Media");return!!l.a.filter(t,function(e){return!!e.proxyType}).length},isMedia:function(e){
return!!e&&((!this.playQueue||!this.playQueue.get("isRadio"))&&(!this.item||!("photo"===this.type&&!this.item.get("isLibraryItem")||this.item.get("isFolder"))))},shouldStartTrackingSelecting:function(e){var t=this.canMultiSelect(this.get("showSelect")),n=e.metaKey||e.ctrlKey||e.shiftKey;return t&&(n||this.get("selecting"))},selectItems:function(e,t){if(0!==e.length){var n=this.get("selectedItems"),i=l.a.bind(this.updateAll,this),a=l.a.filter(e,function(e){return!l.a.contains(n,e)})
;l.a.each(a,function(e){e.selected=!0,n.push(e),this.listenTo(e,{"change:viewCount":i,"change:viewOffset":i,"change:unviewedLeafCount":i,"change:viewedLeafCount":i})},this);var r=this.sortSelectedItems(n,t);this.set("selectedItems",r),this.trigger("change:selectedItems",this,r)}},sortSelectedItems:function(e,t){var n=t&&t.superset;return n?l.a.sortBy(e,function(e){return n.indexOf(e)}):l.a.clone(e)},deselectItems:function(e,t){if(0!==e.length){var n=this.get("selectedItems")
;l.a.each(e,function(e){var t=l.a.indexOf(n,e);t!==-1&&(e.selected=!1,n.splice(t,1),this.stopListening(e))},this),n.length||this.set("selecting",!1),this.trigger("change:selectedItems",this,n)}},selectItem:function(e,t){this.selectItems([e],t)},deselectItem:function(e,t){this.deselectItems([e],t)},deselectAll:function(){var e=this.get("selectedItems");e&&0!==e.length&&(l.a.each(e,function(e){e.selected=!1}),e.length=0,this.trigger("change:selectedItems",this,e))},getActionTargets:function(){
var e=this.get("selectedItems");return e&&e.length>0?e:this.parent?[this.parent]:void 0},getActionTargetsTitle:function(){var e=this.getActionTargets();if(1===e.length){var t=e[0];return t.get("isSection")?t.getSyncTitle():t.get("title")}
return 2===e.length?n.i(c.default)("{1} and {2}",e[0].get("title"),e[1].get("title")):3===e.length?n.i(c.default)("{1}, {2}, and {3}",e[0].get("title"),e[1].get("title"),e[2].get("title")):n.i(c.default)("{1}, {2}, and {3} others",e[0].get("title"),e[1].get("title"),e.length-2)},onSignedInChange:function(e,t){this.signedIn=t,this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),this.updateDropdown("showListDropdown")},
onCurrentTypeChange:function(e,t){this.deselectAll(),this.setDefaults(t.get("typeString")),this.updateAll()},onAllowSyncChange:function(){this.updateAction("showSync",this.canSync)},onPrimaryExtraChange:function(){this.updateAction("showPlayTrailer",this.canPlayPrimaryExtra),this.updateAction("showPlayMusicVideo",this.canPlayPrimaryExtra)},onViewStateChange:function(){this.updateSelectionStates(),this.updateAction("showMarkWatched",this.canMarkWatched),
this.updateAction("showMarkUnwatched",this.canMarkUnwatched)},onGuidChange:function(){this.updateAction("showUnmatch",this.canUnmatch),this.updateAction("showMatch",this.canMatch),this.updateAction("showFixMatch",this.canFixMatch)},onMediaChange:function(){this.updateAction("showDeleteVersions",this.canDeleteVersions)},onServerSharedChange:function(e,t){this.shared=t,this.updateAll()},onDevicesChange:function(){this.updateAction("showSync",this.canSync)},onSelectingChange:function(e,t){
t||this.deselectAll()},onSelectedItemsChange:function(e,t){this.updateAll()}});t.a=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(50),a=n(32);n.d(t,"initLibraryPage",function(){return r}),n.d(t,"initLibraryPageMetadataList",function(){return s}),n.d(t,"fetchLibraryDetails",function(){return o}),n.d(t,"populateLibraryDetails",function(){return l}),n.d(t,"fetchLibraryFirstCharacters",function(){return u}),n.d(t,"populateLibraryFirstCharacters",function(){
return c}),n.d(t,"fetchQueryParse",function(){return d}),n.d(t,"populateQueryParse",function(){return h}),n.d(t,"selectLibraryFilter",function(){return p}),n.d(t,"deselectLibraryFilter",function(){return f}),n.d(t,"fetchLibraryFilterOptions",function(){return g}),n.d(t,"populateLibraryFilterOptions",function(){return m}),n.d(t,"searchLibraryFilterOptions",function(){return v}),n.d(t,"selectLibraryTableColumn",function(){return y}),n.d(t,"deselectLibraryTableColumn",function(){return b})
;var r=n.i(i.a)(a._141),s=n.i(i.a)(a._142),o=n.i(i.a)(a._143),l=n.i(i.a)(a._144),u=n.i(i.a)(a._145),c=n.i(i.a)(a._146),d=n.i(i.a)(a._147),h=n.i(i.a)(a._148),p=n.i(i.a)(a._149),f=n.i(i.a)(a._150),g=n.i(i.a)(a._151),m=n.i(i.a)(a._152),v=n.i(i.a)(a._153),y=n.i(i.a)(a._154),b=n.i(i.a)(a._155)},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r});var r=n.i(i.a)(a._24)},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){
return e.desktop.activities})}var a=n(8),r=(n.n(a),n(54));t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(67);n.d(t,"SERVER",function(){return i.f}),n.d(t,"PROVIDER",function(){return i.e}),n.d(t,"LIBRARY",function(){return i.g}),n.d(t,"HUB",function(){return i.c}),n.d(t,"USER",function(){return i.k}),n.d(t,"RESOURCE",function(){return i.l}),n.d(t,"FRIEND",function(){return i.m}),n.d(t,"METADATA_LIST",function(){return i.d}),
n.d(t,"METADATA_ITEM",function(){return i.b}),n.d(t,"SESSION",function(){return i.j}),n.d(t,"USER_PLAYLIST_ITEM",function(){return i.h}),n.d(t,"MEDIA_SUBSCRIPTION",function(){return i.a}),n.d(t,"PLAY_QUEUE_ITEM",function(){return i.i}),n.d(t,"SEARCH_RESULT",function(){return a}),n.d(t,"SYNC_METADATA_ITEM",function(){return r});var a="searchResults",r="syncMetadataItems"},function(e,t,n){"use strict"
;var i=n(2883),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(4),d=n(12),h=u.a.ItemView.extend({className:"summary",template:a.a,ui:{summary:".metadata-summary",divider:".summary-divider",dividerBtn:".summary-divider-btn"},events:{"click .summary-divider-btn":"onMoreSummaryClick"},onlyAfterRender:["onDeferredRender","updateDividerBtnVisibility"],bindings:{".item-summary":{modelAttribute:"summary",autohide:!0,isHtml:!0,formatter:function(e){if(this.$el.toggleClass("hidden",!e),
this.updateDividerBtnVisibility(),e){var t=s.a.map(s.a.compact(e.split("\n")),function(e){return l.a.trim(s.a.escape(e))});if(t.length)return"<p>"+t.join("</p><p>")+"</p>"}}}},initialize:function(){this.listenTo(d.a,"resize",this.onResize),this.listenTo(this.model,"change:summary",this.onSummaryChange)},updateDividerBtn:function(e){var t=e?n.i(c.default)("More"):n.i(c.default)("Less");this.ui.dividerBtn.html(t)},updateDividerBtnVisibility:function(){if(this.originalHeight){
this.ui.summary.prop("scrollHeight")<=this.originalHeight?this.ui.divider.addClass("hidden"):(this.updateDividerBtn(!this.expanded),this.ui.divider.removeClass("hidden"))}},onRender:function(){s.a.defer(s.a.bind(this.onDeferredRender,this))},onDeferredRender:function(){this.expanded=!1;var e=this.ui.summary.prop("scrollHeight"),t=this.ui.summary.prop("clientHeight");this.originalHeight=t,e>t&&(this.ui.summary.css("max-height",t+"px"),this.ui.divider.removeClass("hidden"))},onResize:function(){
this.isClosed||this.updateDividerBtnVisibility()},onMoreSummaryClick:function(){var e=this.ui.summary.prop("scrollHeight")+100;this.expanded?(this.ui.summary.css("max-height",this.originalHeight+"px"),this.expanded=!1):(this.ui.summary.css("max-height",e+"px"),this.expanded=!0),this.updateDividerBtn(!this.expanded)},onSummaryChange:function(){this.originalHeight&&(this.expanded&&this.ui.summary.css("max-height",this.originalHeight+"px"),this.onDeferredRender())}});t.a=h},function(e,t,n){
"use strict";var i=n(289),a=n.n(i),r=n(1405),s=r.a.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2972),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(52),c=n(4),d=n(12),h=n(34),p=n(141),f=n(696),g=n(483),m=n(1834),v=n(192),y=v.a.extend({name:"addToPlaylistModal",className:"add-to-playlist-modal select-modal modal modal-sm fade",template:a.a,ui:{addBtn:".add-btn",newPlaylist:".message"},regions:{list:".playlists-container"},events:s.a.extend({
"click .playlist":"onPlaylistClick","keyup .message":"onNewPlaylistKeyUp","click .message":"onNewPlaylistClick","click .add-btn":"onAddClick"},v.a.prototype.events),initialize:function(e){v.a.prototype.initialize.apply(this,arguments),this.items=e.items,this.title=e.title,this.smart=e.smart,(!this.items||1===this.items.length&&this.items[0]===this.model)&&(this.ignoreTargets=!0);var t=n.i(p.a)(this.model)
;this.model.get("isMetadataList")?this.mediaType=n.i(h.k)(this.model.get("firstItemType")).mediaType:this.model.get("playQueueID")?this.mediaType=this.model.get("mediaType"):s.a.isEmpty(t)?this.mediaType=n.i(h.k)(this.model.get("type")).mediaType:this.mediaType=n.i(h.k)(t.get("type")).mediaType,this.playlistList=new f.a({},{server:this.model.server,section:new u.a.Model({currentType:this.mediaType,onlyDumb:!0})}),this.playlists=this.playlistList.getCollection(),this.loading=!0,
this.playlistList.populate().always(this.whenRendered(this.onPopulated))},serializeData:function(){return{loading:this.loading,showExisting:!this.smart,hasPlaylists:this.playlists.length>0}},toggleAddButton:function(){var e=this.ui.newPlaylist.val().trim();this.ui.addBtn.toggleClass("disabled",!e)},suggestTitleIfEmpty:function(){""===this.ui.newPlaylist.val()&&(this.ui.newPlaylist.val(this.title),this.ui.newPlaylist.select(),this.toggleAddButton())},_addToPlaylist:function(e){
this.ui.addBtn.addClass("active");var t,i=this.model.server;this.ignoreTargets||(t=i.supports("playItemsBatchAdd")?this.items:s.a.first(this.items));var a=e.addContent(this.model,{items:t});return a.done(this.whenRendered(this.hide)),a.fail(this.whenRendered(function(){this.ui.addBtn.removeClass("active"),d.a.trigger("show:alert",{type:"error",message:n.i(c.default)("There was a problem adding to the playlist.")})})),a},_createPlaylist:function(){var e=this.ui.newPlaylist.val().trim();if(e){
var t=new g.a({title:e,playlistType:this.mediaType,smart:this.smart},{server:this.model.server});this._addToPlaylist(t).then(s.a.bind(function(){d.a.trigger("navigate","playlist",{serverID:t.server.id,key:t.get("ratingKey")})},this))}},onRender:function(){v.a.prototype.onRender.apply(this,arguments),this.smart&&setTimeout(this.whenRendered(function(){this.ui.newPlaylist.focus(),this.suggestTitleIfEmpty()}),this.focusDelay)},onPopulated:function(){this.loading=!1,this.render(),
this.list.show(new m.a({collection:this.playlists}))},onNewPlaylistKeyUp:function(e){this.toggleAddButton(),13===e.keyCode&&this._createPlaylist()},onNewPlaylistClick:function(){this.suggestTitleIfEmpty()},onPlaylistClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id"),i=this.playlists.get(n);this._addToPlaylist(i)},onAddClick:function(e){e.preventDefault(),this.ui.addBtn.isDisabled()||this._createPlaylist()}});t.a=y},function(e,t,n){"use strict"
;var i=n(3074),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(4),u=o.a.Layout.extend({className:"form-group",template:a.a,isDisabled:!0,isActive:!1,ui:{submitBtn:".submit-btn",message:".form-message"},events:{"change #server-settings-form input[name]":"onInputChange","input #server-settings-form input[type=text]":"onInputChange","change #server-settings-form select[name]":"onInputChange","submit #server-settings-form":"onSubmit"},initialize:function(e){this.changes=e.changes},serializeData:function(){
return s.a.where(this.collection.toJSON(),{group:this.options.group,hidden:!1})},enable:function(){this.isDisabled=!1,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},updateModel:function(e,t){var n=this.collection.get(e);if(n)return n.set("value",t)},onRender:function(){s.a.isEmpty(this.changes)||this.enable()},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value,a=t.value;if(n){"checkbox"===t.type&&((a=t.checked)||(i="0"))
;this.updateModel(n,a)&&(this.changes[t.name]=i,this.enable())}},onSubmit:function(e){e.preventDefault(),this.trigger("save")},onBeforeSave:function(){this.isActive=!0,this.ui.submitBtn.addClass("active")},onAfterSave:function(e){var t;this.isActive=!1,this.ui.submitBtn.removeClass("active"),e?(this.isDisabled=!0,this.ui.submitBtn.addClass("disabled"),t=n.i(l.default)("Your changes have been saved.")):t=n.i(l.default)("Your changes could not be saved."),this.ui.message.text(t)}});t.a=u
},function(e,t,n){"use strict";function i(e){var t=e.onErrorDismiss,i=e.errorMessage;return r()("div",{className:d.a.sectionError},void 0,r()(l.a,{name:"plex-icon-alert-560",className:d.a.sectionErrorIcon}),i?i:n.i(o.default)("There was a problem saving your changes."),r()(u.a,{className:d.a.sectionErrorDismiss,onPress:t},void 0,h))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(29),u=n(25),c=n(2565),d=n.n(c),h=r()(l.a,{name:"plex-icon-remove-560"});t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(14),f=n(8),g=(n.n(f),n(41)),m=(n(35),n(168)),v=n(79),y=n(2064),b=n.i(f.createSelector)(m.a,function(e){return{columnAdjustment:e.columnAdjustment,listStyles:e.listStyles}}),S=function(e){function t(){var i,r,o;s()(this,t);for(var u=arguments.length,c=Array(u),d=0;d<u;d++)c[d]=arguments[d];return i=r=l()(this,e.call.apply(e,[this].concat(c))),r.onColumnAdjustmentChange=function(e){n.i(g.a)(function(){
r.props.saveSettings({name:"experienceSettings",settings:{columnAdjustment:e}})})},r.onListStyleChange=function(e){var t,i,s=r.props,o=s.listStyles,l=s.listType,u=s.listContext,c=a()({},o,(i={},i[u]=a()({},o[u]||{},(t={},t[l]=e,t)),i));n.i(g.a)(function(){r.props.saveSettings({name:"experienceSettings",settings:{listStyles:c}})})},o=i,l()(r,o)}return c()(t,e),t.prototype.render=function(){return h.a.createElement(y.a,a()({},this.props,{onColumnAdjustmentChange:this.onColumnAdjustmentChange,
onListStyleChange:this.onListStyleChange}))},t}(d.Component);t.a=n.i(p.b)(function(e){return b},{saveSettings:v.a})(S)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.innerClassName,i=u()(e,["children","innerClassName"]);return d.a.createElement(h.a,r()({className:f.a.pageContent},i),o()("div",{className:n},void 0,t))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(74),p=n(2660),f=n.n(p);i.defaultProps={innerClassName:f.a.innerPageContent},t.a=i
},function(e,t,n){"use strict";function i(e){return{isWaitingForPrimaryServer:e.isWaitingForPrimaryServer,primaryServerEntityID:e.primaryServer}}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(1),d=n.n(c),h=n(14),p=n(84),f=n(41),g=n(79),m=n(2141),v=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){
e.machineIdentifier&&e.machineIdentifier!==this.props.machineIdentifier&&this._populate(e)},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(f.a)(function(){e.machineIdentifier&&e.changePrimaryServer({machineIdentifier:e.machineIdentifier,metricsProperties:{context:p.c}})})},t.prototype.render=function(){return d.a.createElement(m.a,this.props)},t}(c.Component);t.a=n.i(h.b)(i,{changePrimaryServer:g.c})(v)},function(e,t,n){"use strict"
;function i(){return n.i(v.createSelector)(function(e,t){return t.providerEntityID},n.i(w.a)(),function(e,t){var i=t.desktop,a=i.providers,r=i.isProvidersPending,s=i.isProvidersPopulated,o=i.providersError,l=i.libraries,u=i.isLibrariesPending,c=i.isLibrariesPopulated,d=i.librariesError,h=t.isPersonalCloudServer,p=!s&&!o,f=!c&&!d,g=e||n.i(b.a)(y.PROVIDER,I.a.LIBRARY_PROVIDER_IDENTIFIER,t.entityID);return{providerEntityID:g,hasProvider:a.indexOf(g)>-1,isPersonalCloudServer:h,isRetrying:r||u,
showSpinner:p||f,showError:!!d&&!l.length}})}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(8),y=(n.n(v),n(222)),b=n(62),S=n(41),I=n(73),w=n(54),M=n(88),C=n(2143),D={dispatchFetchLibraries:M.b,dispatchPopulateLibraries:M.c,dispatchFetchProviders:M.d,dispatchPopulateProviders:M.e},P=function(e){function t(){var i,a,r;u()(this,t);for(var s=arguments.length,o=Array(s),l=0;l<s;l++)o[l]=arguments[l]
;return i=a=d()(this,e.call.apply(e,[this].concat(o))),a.onPopulate=function(e){var t=e.serverEntityID;n.i(S.a)(function(){a.props.dispatchPopulateProviders({serverEntityID:t}),a.props.dispatchPopulateLibraries({serverEntityID:t})})},a.onRepopulate=function(e){var t=e.serverEntityID;n.i(S.a)(function(){a.props.dispatchFetchProviders({serverEntityID:t}),a.props.dispatchFetchLibraries({serverEntityID:t})})},r=i,d()(a,r)}return p()(t,e),t.prototype.componentWillMount=function(){this.onPopulate({
serverEntityID:this.props.serverEntityID})},t.prototype.componentWillReceiveProps=function(e){e.serverEntityID!==this.props.serverEntityID&&this.onRepopulate({serverEntityID:e.serverEntityID})},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchLibraries,e.dispatchPopulateLibraries,e.dispatchFetchProviders,e.dispatchPopulateProviders,o()(e,["dispatchFetchLibraries","dispatchPopulateLibraries","dispatchFetchProviders","dispatchPopulateProviders"]))
;return g.a.createElement(C.a,r()({},t,{onRetry:this.onRepopulate}))},t}(f.Component);t.a=n.i(m.b)(i,D)(P)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),n.i(u.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],Director:n.Director,Writer:n.Writer,studio:n.studio}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(306),c=n(2235);t.a=n.i(a.b)(i)(c.a)
},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID;return r()(u.a,{className:d.a.ratingRightTitle},void 0,r()(l.a,{className:d.a.starRating,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(o.a,{className:d.a.criticRating,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(582)),l=n(428),u=n(347),c=n(2725),d=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.message,n=e.children;return r()("div",{},void 0,r()("p",{className:l.a.sidebarMessage},void 0,t),n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1001)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=n.hasInvalidKey,a=n.deletedAt,r=n.isFolder;return!(!t.protocols.stream||i||a||r)}function a(e,t,n){return!!i(e,t,n)&&(n.Media&&n.Media.length>1)}function r(e,t,n){return i(e,t,n)}function s(e,t,n){return i(e,t,n)&&!!t.features.playqueue}function o(e,t,n){
return!!n.primaryExtraKey}function l(e,t,n){return!!k.a.findWhere(n.related,{browse:!1})}function u(e,t,n){return!!n.isLibraryItem}function c(e,t,i){return!!t.features.timeline&&(n.i(_.n)(i.type)?i.unviewedLeafCount>0:!i.viewCount||!!i.viewOffset)}function d(e,t,i){return!!t.features.timeline&&(n.i(_.n)(i.type)?i.viewedLeafCount>0:!!i.viewCount||!!i.viewOffset)}function h(e,t,n){var i=n.isLibraryItem,a=n.isExtra,r=n.isFolder,s=i&&!a&&!r;return!(!t.features.manage||!s)}function p(e,t,n){
return h(e,t,n)}function f(e,t,n){return h(e,t,n)}function g(e,t,n){return!!h(e,t,n)&&!(!n.guid||/(local|none)\:\/\//.test(n.guid))}function m(e,t,n){return!!h(e,t,n)&&(!!n.guid&&!g(e,t,n))}function v(e,t,n){return g(e,t,n)}function y(e,t,i){if(!h(e,t,i))return!1;var a=void 0;return a=n.i(_.n)(i.type)?i.Location:k.a.filter(i.Media,function(e){return!e.proxyType}),a.length>1}function b(e,t,n){return!(!e.isFullServer||!n.isLibraryItem)&&!(!e.allowSync||!n.allowSync)}function S(e,t,n){
return!!h(e,t,n)&&!(!e.transcoderVideo||!e.backgroundProcessing)}function I(e,t,n){return!!t.protocols.download}function w(e,t,n){return!1}function M(e,t,n){return!1}function C(e,t,n){return!1}function D(e,t,n){return!!h(e,t,n)&&!!e.allowMediaDeletion}function P(e,t,n){return!!h(e,t,n)&&(!!e.allowMediaDeletion&&k.a.filter(n.Media,function(e){return!!e.proxyType}).length>0)}function T(e,t,n){return!("photo"===n.type&&!n.isLibraryItem||n.isExtra)}function x(e,t,n){return!n.isFolder}
function E(e,t,i){var a=i.type,r=R[a];return n.i(L.a)(k.a.isArray(r),"getMetadataActionProps: Invalid type, "+a+", provided"),r.reduce(function(r,s){var o=N[s];return n.i(L.a)(k.a.isFunction(o),"getMetadataActionProps: Invalid action, "+s+", for "+a),r[s]=o(e,t,i),r},{})}var A=n(2),k=n.n(A),L=n(33),_=n(34);t.a=i,t.e=u,t.f=c,t.g=d,t.b=h,t.h=p,t.i=f,t.j=b,t.k=S,t.l=D,t.c=x,t.d=E;var N={showPlay:i,showPlayVersion:a,showPlayAll:i,showShuffle:r,showQueue:s,showPlayTrailer:o,showPlayPlexMix:l,
showPlayMusicVideo:o,showAddToPlaylist:u,showMarkWatched:c,showMarkUnwatched:d,showEdit:h,showRefresh:p,showAnalyze:f,showFixMatch:g,showMatch:m,showUnmatch:v,showSplitApart:y,showSync:b,showOptimize:S,showDownload:I,showWatchLater:w,showShare:M,showRecommend:C,showDelete:D,showDeleteVersion:P,showGetInfo:T,showSelect:x},R={
movie:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],
show:["showPlay","showPlayAll","showShuffle","showQueue","showPlayTrailer","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDelete","showSelect"],season:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showAnalyze","showSync","showOptimize","showDelete","showSelect"],
episode:["showPlay","showPlayVersion","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],artist:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],
album:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],track:["showPlay","showQueue","showPlayPlexMix","showPlayMusicVideo","showAddToPlaylist","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],photoalbum:["showPlay","showShuffle","showAddToPlaylist","showEdit","showSync","showSelect"],
photo:["showPlay","showAddToPlaylist","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],clip:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo","showSelect"],
playlist:["showDelete","showPlay","showQueue","showShuffle","showSync","showSelect"]}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(2428),r=i(a),s=n(972),o=i(s),l="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e}
;t.default="function"==typeof o.default&&"symbol"===l(r.default)?function(e){return void 0===e?"undefined":l(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":l(e)}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(977),a=n(441);e.exports=function(e){return i(a(e))}
},function(e,t){var n=Array.isArray;e.exports=n},,,,function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(384),l=n(19),u={getCollectionName:function(){return this.collectionName||"items"},getCollection:function(){return this.get(this.getCollectionName())},getTotalSize:function(){return this.get("totalSize")||this.get("populatedRange").size},getPaginatedUrl:function(e){var t=this.get("currentPageStart"),n=this.get("currentPageSize");if(null!=t||null!=n){var i={
"X-Plex-Container-Start":t||0,"X-Plex-Container-Size":n||0};return l.join(e,i)}return e},getCollectionChangeEvents:function(){var e=this.getCollectionName();return["change:"+e+".update","change:"+e+".reset"].join(" ")},startPopulatedRangeMonitor:function(){var e=this.getCollectionName();this.updatePopulatedRange(),this.on(this.getCollectionChangeEvents(),this.updatePopulatedRange,this),this.on("change:"+e+".destroy",this.decrementTotalSize,this)},stopPopulatedRangeMonitor:function(){
var e=this.getCollectionName();this.off(this.getCollectionChangeEvents(),this.updatePopulatedRange,this),this.off("change:"+e+".destroy",this.decrementTotalSize,this)},fetchRange:function(e){var t=a.a.extend({},e,{remove:!1});return e.prepend&&(t.at=0),this.set({currentPageStart:e.start,currentPageSize:e.size}),this.fetch(t).promise()},populateRange:function(e){var t=this.getCollection(),n=this.get("populatedRange"),i=o.a.difference(e,n)[0];if(!i)return s.a.Deferred().resolve().promise()
;if(i=o.a.degap(i,n),this.isPopulating()){var r=this.get("currentPageStart")!==i.start,l=this.get("currentPageSize")!==i.size;if(!r&&!l)return this.populatePromise;this.abortPendingPopulate()}if(e.reloadThreshold&&i.size>e.reloadThreshold)return t.reset(),this.populateRange(a.a.omit(e,"reloadThreshold"));var u=a.a.extend({},e,i,{prepend:i.start<n.start});return this.fetchRange(u)},repopulateRange:function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("populatedRange").end;return this.set({currentPageStart:0,currentPageSize:Math.max(t,e)}),this.abortPendingPopulate(),this.fetch()},updatePopulatedRange:function(){var e=this.get("currentPageStart"),t=this.get("populatedRange").start,n=this.get("populatedRange").size,i=this.getCollection().length,a=void 0;a=i?n?Math.min(t,null==e?1/0:e):e||t:0,this.set("populatedRange",{start:a,end:a+i,size:i})},
decrementTotalSize:function(){var e=this.get("totalSize");e>0&&this.set("totalSize",e-1)}};t.a=u},function(e,t,n){"use strict";function i(e){var t=e.key,i=e.actionSuffix,s=e.getModel,o=n.i(a.a)(i||t),l=n.i(r.a)(t),u="is"+l+"Populated";return function(e,t,n){s(e,t).get(u)||n({type:"FETCH_"+o,payload:t})}}var a=(n(33),n(1387)),r=n(321);t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.servers});t.a=r},function(e,t,n){"use strict"
;function i(e){return e?(0,r.a.find(c,function(t){var n=t[0];return e<=n})[1])(e):""}var a=n(2),r=n.n(a),s=n(1295),o=n(312),l=n(1294),u=n(1293),c=[[54e5,s.a],[864e5,o.a],[6048e5,l.a],[1/0,u.a]];t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return r}),n.d(t,"f",function(){return s}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return l}),n.d(t,"g",function(){return u}),n.d(t,"h",function(){return c})
;var i="=",a="!=",r="==",s="!==",o=">>=",l="<<=",u=">>=-",c="<<=-",d=[i,a,r,s,">=","<=",o,l,u,c];t.i=d},function(e,t,n){"use strict";function i(e,t){switch(t){case s.SUBSCRIPTION:switch(e){case"1003":return n.i(r.default)("Subscriptions have been temporarily disabled: too many failed attempts. Please try again later.")}}switch(e){case"1001":return n.i(r.default)("The username or password is incorrect");case"1003":
return n.i(r.default)("Sign in has been temporarily disabled: too many failed attempts. Please try again later.");case"1010-login":return n.i(r.default)("Login is required");case"1010-password":return n.i(r.default)("Password is required");case"1010-email":return n.i(r.default)("Email is required");case"1011-username":return n.i(r.default)("Username has already been taken");case"1011-email":return n.i(r.default)("email has already been taken");case"1030":
return n.i(r.default)("This account only allows signing in with an email address");case"1031":return n.i(r.default)("The username or password is incorrect. Repeated attempts may temporarily disable sign in.");case"1032-password":return n.i(r.default)("Password must be at least 8 characters");case"1033-password":return n.i(r.default)("Password is too weak");case"1034-password":return n.i(r.default)("Password must be different from username or email address");case"1035-email":
return n.i(r.default)("Email is not a valid email address");case"1036-username":return n.i(r.default)("Username must not be an email address");case"1037-username":return n.i(r.default)("Username contains invalid characters");case"1038-pin":return n.i(r.default)("Pin must be 4 digits");case"1039-passwordConfirmation":return n.i(r.default)("Confirm Password must match Password");case"1040":return n.i(r.default)("Invalid Password")}}function a(e,t){if(e){var a=String(e.code)
;return i(e.code+"-"+e.field,t)||i(a,t)||e.message||n.i(r.default)("An unknown error occurred")}}var r=n(4);t.a=a;var s={SUBSCRIPTION:"subscription"}},function(e,t,n){"use strict";function i(e){var t=s.a.get("video").id,i=n.i(o.a)(e,{streamType:t});return r.a.first(i)}var a=n(2),r=n.n(a),s=n(86),o=n(142);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(250),u=n(511),c=n(512),d=n(142),h=n(759),p=n(40),f=n(106),g=n(86),m=n(209),v=n(310),y=n(28),b={
getMediaDecision:function(e){var t=this.augmentProfile(e);if(y.a.info("[MDE] Augmented profile:",t),e.media)return this.analyzeMedia(e.media,t,e);var n=e.item,i=n.get("Media");if(!i.length)return{transcodeServer:e.transcodeServer,canPlay:!0,canDirectPlay:!0};if(1===i.length)return this.analyzeMedia(a.a.first(i),t,e);var r=a.a.map(i,function(n){return this.analyzeMedia(n,t,e)},this);return this.getBestDecision(r)},augmentProfile:function(e){var t=e.profile
;if(!t)throw new Error("MDE: No player profile provided for "+e.type);var n=e.type===p.a.types.VIDEO,i=s.a.extend(!0,{},t.directPlay),r=s.a.extend(!0,{},t.directStream),o=i.generic;o&&delete i.generic;var l=e.allowedAC3Containers,u="*"===l;!u&&l&&(l=a.a.isArray(l)?l:[l]);var c=e.allowedEAC3Containers,d="*"===c;!d&&c&&(c=a.a.isArray(c)?c:[c]);var h=e.allowedDCAContainers,f="*"===h;return!f&&h&&(h=a.a.isArray(h)?h:[h]),a.a.each(i,function(t,i){this.mergeGenericOptions(t,o),
this.mergeMaxQualityOptions(t,e),(u||l&&a.a.contains(l,i))&&this.addAudioCodec("ac3",t,e),(d||c&&a.a.contains(c,i))&&this.addAudioCodec("eac3",t,e),(f||h&&a.a.contains(h,i))&&this.addAudioCodec("dca",t,e);var r=p.a.getStreamByType(e.type),s=t[r];if(s){var g=s.codecs;a.a.each(g,function(t,n){this.mergeMaxQualityOptions(t,e,!0),e.videoCodecOptions&&e.videoCodecOptions[n]&&this.mergeCodecOptions(t,e.videoCodecOptions[n])},this)}var m=n&&t.audio;if(m&&e.audioCodecOptions){var v=m.codecs
;a.a.each(v,function(t,n){e.audioCodecOptions[n]&&this.mergeCodecOptions(t,e.audioCodecOptions[n])},this)}},this),this.mergeMaxQualityOptions(r,e),n&&(e.videoCodecOptions&&r.video&&a.a.each(r.video.codecs,function(t,n){e.videoCodecOptions[n]&&this.mergeCodecOptions(t,e.videoCodecOptions[n])},this),e.audioCodecOptions&&r.audio&&a.a.each(r.audio.codecs,function(t,n){e.audioCodecOptions[n]&&this.mergeCodecOptions(t,e.audioCodecOptions[n])},this)),{directPlay:i,directStream:r}},
mergeGenericOptions:function(e,t){t&&(a.a.defaults(e,a.a.omit(t,"video","audio")),a.a.each(["audio","video"],function(n){var i=t[n],r=e[n];i&&(r||(r={},e[n]=r),a.a.defaults(r,a.a.omit(i,"codecs")),i.codecs&&a.a.each(i.codecs,function(e,t){a.a.defaults(this.ensureCodecs(t,r),e)},this))},this))},mergeCodecOptions:function(e,t){a.a.each(t,function(t,n){e[n]=t},this)},ensureCodecs:function(e,t){return t.codecs||(t.codecs={}),t.codecs[e]||(t.codecs[e]={}),t.codecs[e]},
mergeMaxQualityOptions:function(e,t,n){var i=[{option:"bitrate",setting:"maxBitrate"},{option:"videoResolution",setting:"maxVideoResolution"}];a.a.each(i,function(i){if("videoResolution"!==i.option||t.type===p.a.types.VIDEO){var a=this.getMaxQualityOption(e,i.option,t);if(null!=a){var r=i.setting,s=p.a.getStreamByType(t.type);e.hasOwnProperty(r)?e[r]=a:e.hasOwnProperty(s)?e[s][r]=a:n||(e[s]={},e[s][r]=a)}}},this)},getMaxQualityOption:function(e,t,n){
var i=n.quality||{},a="max"+t.charAt(0).toUpperCase()+t.slice(1),r=i[t],s=this.getPrimaryStreamProperty(e,a,n);if("videoResolution"===t&&r&&(r=f.a.getResolutionFromSize(r)),"bitrate"===t){var o=n.item.server,l=o.get("maxUploadBitrate");l&&(!r||l<r)&&(r=l)}if(r||s){return r&&s?Math.min(r,s):r||s}},addAudioCodec:function(e,t,n){t.audio||(t.audio={}),this.ensureCodecs(e,t.audio)},analyzeMedia:function(e,t,i){y.a.info("[MDE] Starting analysis of",this.getMediaTitle(e)),
n.i(y.a)("[MDE] Analyzing direct play");var r=this.canDirectPlay(e,t.directPlay,i),s={finalProfile:t,transcodeServer:i.transcodeServer,item:i.item,media:e,canDirectPlay:r.result,canDirectPlayFailedCheck:r.failedCheck},o=i.transcoderOptions||{};if(a.a.isFunction(o)&&(o=o(s)),i.type===p.a.types.VIDEO){n.i(y.a)("[MDE] Analyzing video direct stream");var d=n.i(l.a)(e);if(d){var h=this.canDirectStream(d,t.directStream.video,i,o);s.canDirectStreamVideo=h.result,
s.canDirectStreamVideoFailedCheck=h.failedCheck}}if(i.type!==p.a.types.PHOTO){n.i(y.a)("[MDE] Analyzing audio direct stream");var f=n.i(u.a)(e);if(f){var g=this.canDirectStream(f,t.directStream.audio,i,o);s.canDirectStreamAudio=g.result,s.canDirectStreamAudioFailedCheck=g.failedCheck}}var m=n.i(c.a)(s.media);return m&&(n.i(y.a)("[MDE] Analyzing subtitles"),a.a.extend(s,this.analyzeSubtitles(m,i))),n.i(y.a)("[MDE] Analyzing playability"),a.a.extend(s,this.canPlay(s,i)),
a.a.extend(s,this.getEffectiveQuality(e,t.directStream,i)),y.a.group("[MDE] Finished analysis of",this.getMediaTitle(e)),this.getDecisionLogs(s).forEach(function(e){return y.a.info(e)}),y.a.groupEnd(),s},canDirectPlay:function(e,t,i){if(i.forceDirectPlay)return n.i(y.a)("[MDE] Direct play forced"),{result:!0};if(i.allowDirectPlay===!1)return y.a.warn("[MDE] Direct play failed; option is disabled"),{result:!1,failedCheck:"allowDirectPlay"}
;if(i.type===p.a.types.VIDEO&&!this.canDirectPlayVideo(e,i))return{result:!1,failedCheck:"canDirectPlayVideo"};var r=t[e.container];if(!r)return y.a.warn("[MDE] Direct play failed; unsupported container:",e.container),{result:!1,failedCheck:"containerProfile"};var s=a.a.keys(r);if(s&&s.length){for(var o=0,c=s.length;o<c;o++){var h=s[o],f=r[h];if("mimeType"===h){
if(!i.skipCanPlayTypeTest&&!this.canPlayType(p.a.getElementByType(i.type),f))return y.a.warn("[MDE] Direct play failed; canPlayType test, %s: %s",h,f),{result:!1,failedCheck:"canPlayType"}}else if("video"===h||"audio"===h){var m=g.a.get(h),v=n.i(d.a)(e,{streamType:m.id}),b="video"===h?n.i(l.a)(e):n.i(u.a)(e);if(!b){y.a.warn("[MDE] No stream selected; will not be able to analyze stream codecs");continue}var S="audio"===h&&b!==v[0]
;if(S&&!i.allowMultiTrackAudio)return y.a.warn("[MDE] Direct play failed; multi-track audio is required"),{result:!1,failedCheck:"allowMultiTrackAudio"};var I=this.analyzeStream(b,f,i);if(!I.result)return{result:!1,failedCheck:I.failedCheck}}else if("photo"===h){var w=this.analyzeStream(a.a.first(e.Part),f,i);if(!w.result)return{result:!1,failedCheck:w.failedCheck}}else if(!this.validateProfileProperty(h,f,e))return{result:!1,failedCheck:"validateProfileProperty:"+h}}return{result:!0}}return{
result:!0}},canDirectPlayVideo:function(e,t){if(!t.allowDirectPlay)return y.a.warn("[MDE] Direct play failed; option is disabled"),!1;if("hls"===e.protocol&&!t.hasNativeHLS)return y.a.warn("[MDE] Direct play failed; cannot play HLS"),!1;if("flv"===e.container&&!t.hasFlash)return y.a.warn("[MDE] Direct play failed; cannot play FLV"),!1;var n=a.a.first(e.Part);return t.allowSecureDirectPlay!==!1||!n||!/^https:\/\//.test(n.key)||(y.a.warn("[MDE] Direct play prevented; cannot play via HTTPS"),!1)},
canPlayType:function(e,t){if(e===p.a.elements.PHOTO)return!0;var n=document.createElement(e);return!(!n.canPlayType||!n.canPlayType(t).replace(/^no$/,""))},canDirectStream:function(e,t,n,i){return i.directStream?this.analyzeStream(e,t,n):(y.a.warn("[MDE] Direct stream failed; option is disabled"),{result:!1,failedCheck:"options:directStream"})},analyzeStream:function e(t,n,i){var a=n&&n.codecs&&n.codecs[t.codec];for(var r in n){var s=n[r];if("codecs"===r){var o=s[t.codec];if(!o)return{result:!1,
failedCheck:"noCodecInProfile:"+t.codec};var e=this.analyzeStream(t,o,i);if(!e.result)return{result:!1,failedCheck:e.failedCheck}}else if(!(a&&r in a||this.validateProfileProperty(r,s,t)))return{result:!1,failedCheck:"validateProfileProperty:"+r}}return{result:!0}},validateProfileProperty:function(e,t,n){var i,r=e.match(/^(min|max)(\w)(\w*)/);if(r){var s="min"===r[1],o="max"===r[1];if(e=r[2].toLowerCase()+r[3],i=n[e],
null==i&&y.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),null!=i&&"videoResolution"===e&&(i=f.a.getHeightFromResolution(i),t=f.a.getHeightFromResolution(t)),null!=i){if(s&&i<t)return y.a.warn("[MDE] Invalid profile property; %s: %s < %s",e,i,t),!1;if(o&&i>t)return y.a.warn("[MDE] Invalid profile property; %s: %s > %s",e,i,t),!1}}else if(i=n[e],null==i&&y.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),
i!==t&&!a.a.contains(t,i))return y.a.warn("[MDE] Invalid profile property; %s: %s !== %s",e,i,t),!1;return!0},analyzeSubtitles:function(e,t){var i=t.subtitlesBurnLevel||v.a.ALWAYS,a=e.codec;return n.i(y.a)("[MDE] Subtitle codec:",a),n.i(y.a)("[MDE] Burn level:",i),i===v.a.NEVER?{useSoftSubtitles:!1}:i===v.a.ALWAYS?(y.a.warn("[MDE] Direct play failed; asked to always burn subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:burnLevelAlways",canDirectStreamVideo:!1
}):t.transcodeServer.supports("softSubtitles")?(y.a.warn("[MDE] Direct play failed; %s subtitles",a),/^(pgs|vobsub)$/i.test(a)?(y.a.warn("[MDE] Soft subtitles failed; bitmap subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):/^(ass|ssa)$/i.test(a)&&i===v.a.AUTO?(y.a.warn("[MDE] Soft subtitles failed; ASS subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):{
useSoftSubtitles:!0,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles"}):(y.a.warn("[MDE] Direct play failed; server support requires burn subtitles"),y.a.warn("[MDE] Soft subtitles failed; server version"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:softSubtitlesUnsupported",canDirectStreamVideo:!1})},canPlay:function(e,t){var n=this.validateParts(e,t)||this.validateTranscoder(e,t);return n?{canPlay:!1,errorMessage:n}:{canPlay:!0}},validateParts:function(e,t){
var i=n.i(h.a)(e.media);if(i.length){y.a.warn("[MDE] Unable to play; missing parts");var r=a.a.first(i);return 1===Number(r.exists)?n.i(o.default)("Please check the permissions for this file."):n.i(o.default)("Please check that the file exists and the necessary drive is mounted.")}},validateTranscoder:function(e,t){if(!e.canDirectPlay){var i,r=t.type,s=r===p.a.types.MUSIC,l=r===p.a.types.VIDEO,u=t.transcodeServer,c=u.get("transcoderAudio"),d=u.get("transcoderVideo")
;if(s||"track"===t.item.get("type")){if(i=n.i(o.default)("This server is not powerful enough to convert music."),l&&!d)return y.a.warn("[MDE] Unable to play; server unable to transcode music using video transcoder"),i;if(s&&!c)return y.a.warn("[MDE] Unable to play; server unable to transcode music using audio transcoder"),i}else if(l){
var h=n.i(o.default)("This server is not powerful enough to convert video. You may be able to enable playback by increasing your quality setting."),g=n.i(o.default)("This server is not powerful enough to convert video. Playback qualities are limited because an indirect connection is being used."),m=e.canDirectStreamVideo||!u.get("transcoderVideoRemuxOnly");if(i=n.i(o.default)("This server is not powerful enough to convert video."),!d||!m){
if(y.a.warn("[MDE] Unable to play; server unable to transcode video"),u.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"validateProfileProperty:maxLevel":return n.i(o.default)("Synced media cannot be converted to a lower H.264 level.");case"validateProfileProperty:maxBitrate":return n.i(o.default)("Synced media cannot be converted to a lower quality.");case"allowDirectPlay":default:return n.i(o.default)("Converting is not supported for synced media.")}if(t.quality){
if(t.quality.index===f.a.ORIGINAL)return i;var v=a.a.clone(t);return v.quality=a.a.extend({index:f.a.ORIGINAL},a.a.pick(t.quality,"attribute")),this.getMediaDecision(v).canDirectPlay?h:"relay"===u.get("maxUploadBitrateReason")?g:i}return h}}}},getEffectiveQuality:function(e,t,i){var a=i.quality,r={},s={};if(e.bitrate||y.a.warn("[MDE] Unable to determine effective quality; re-analyze the media if possible"),i.type===p.a.types.VIDEO){r.bitrate=e.bitrate,
r.videoResolution=f.a.getHeightFromResolution(e.videoResolution);var o=this.getPrimaryStreamProperty(t,"maxBitrate",i);if(o){var u=n.i(l.a)(e),c=u?u.bitrate:e.bitrate;r.bitrate=Math.min(c,o),s.maxVideoBitrate=o}if(a){if(a.videoResolution){var d=f.a.getResolutionFromSize(a.videoResolution),h=f.a.getHeightFromResolution(d);r.videoResolution=Math.min(r.videoResolution,h)}s.videoQuality=a.videoQuality,s.videoResolution=a.videoResolution}}else if(i.type===p.a.types.MUSIC){r.bitrate=e.bitrate
;var g=this.getPrimaryStreamProperty(t,"maxBitrate",i);g&&(r.bitrate=Math.min(e.bitrate,g),s.maxAudioBitrate=g)}return r.transcoderQualityOptions=s,r},getPrimaryStreamProperty:function(e,t,n){var i=p.a.getStreamByType(n.type),a=e[i],r=e[t];return null==r&&a&&(r=a[t]),r},getMediaTitle:function(e){var t=e.title||e.videoResolution||e.bitrate,i=a.a.compact([e.container,e.videoCodec,e.audioCodec]),r=n.i(l.a)(e);return r&&i.push(r.level,r.profile),i.length&&(t+=" ("+i.join(", ")+")"),t},
getDecisionLogs:function(e){var t=["canPlay: "+e.canPlay,"canDirectPlay: "+e.canDirectPlay],n=e.canDirectStreamVideo;null!=n&&t.push("canDirectStreamVideo: "+n);var i=e.canDirectStreamAudio;null!=i&&t.push("canDirectStreamAudio: "+i);var r=e.useSoftSubtitles;null!=r&&t.push("useSoftSubtitles: "+r);var s=e.bitrate;null==s||a.a.isNaN(s)||t.push("bitrate: "+s);var o=e.videoResolution;return null==o||a.a.isNaN(o)||t.push("videoResolution: "+o),t},getBestDecision:function(e){
var t=a.a.last(this.sortDecisions(e));return y.a.group("[MDE] Selected %s to play",this.getMediaTitle(t.media)),this.getDecisionLogs(t).forEach(function(e){return y.a.info(e)}),y.a.groupEnd(),t},sortDecisions:function(e){
return a.a.chain(e).reverse().sortBy(this.preferHigherBitrate,this).sortBy(this.preferMoreAudioChannels,this).sortBy(this.preferDirectStreamAudio,this).sortBy(this.preferHigherResolution,this).sortBy(this.preferDirectStreamVideo,this).sortBy(this.preferDirectPlay,this).sortBy(this.preferHigherResolutionIfCapable,this).sortBy(this.preferCloudIfRemote,this).sortBy(this.preferPlayable,this).value()},preferPlayable:function(e){return void 0===e.canPlay?null:e.canPlay},
preferCloudIfRemote:function(e){var t=e.media.proxyType===m.a.CLOUD;return e.transcodeServer.hasLocalConnection()?!t:t},preferHigherResolutionIfCapable:function(e){var t=e.transcodeServer,n=t.get("transcoderVideo"),i=t.get("transcoderVideoRemuxOnly");return n&&!i&&(e.canDirectPlay||e.canDirectStreamVideo)?this.preferHigherResolution(e):null},preferDirectPlay:function(e){return void 0===e.canDirectPlay?null:e.canDirectPlay},preferDirectStreamVideo:function(e){
return void 0===e.canDirectStreamVideo?null:e.canDirectStreamVideo},preferHigherResolution:function(e){return void 0===e.videoResolution?null:e.videoResolution},preferDirectStreamAudio:function(e){return void 0===e.canDirectStreamAudio?null:e.canDirectStreamAudio},preferMoreAudioChannels:function(e){var t=e.media.audioChannels;return void 0===t?null:t},preferHigherBitrate:function(e){return void 0===e.bitrate?null:e.bitrate}};t.a=b},function(e,t,n){"use strict";function i(e,t){if(!e)return""
;if("8k"===e)return"8K";if("4k"===e)return"4K";var n=parseInt(e,10);return r.a.isNaN(n)?e.toUpperCase():e+(t&&t.length?t[0]:"p")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),r=n.n(a);t.default=i},function(e,t,n){"use strict";function i(e){return e?e.toUpperCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";var i=n(15),a=i.a.Layout.extend({regions:{content:".content"}});t.a=a},function(e,t,n){"use strict"
;var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=n.n(u),d=n(3279),h=n.n(d),p=n(27),f=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){return c.a.createElement(h.a,this.props)},t}(u.Component);f.defaultProps={component:"div",transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionEnter:!0,
transitionLeave:!0},t.a=f},function(e,t,n){"use strict";var i=n(16),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(13),f=(n(33),n(257)),g=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.page=n.page,a}return c()(t,e),t.prototype.getChildContext=function(){return{metricsPage:this.page}},t.prototype.componentDidMount=function(){var e=this.props,t=(e.children,e.isDelegated),i=a()(e,["children","isDelegated"])
;t||n.i(p.a)("metrics").trackView(i)},t.prototype.componentWillReceiveProps=function(e){},t.prototype.componentDidUpdate=function(e){var t=(e.children,e.isDelegated),i=a()(e,["children","isDelegated"]),r=this.props,s=(r.children,r.isDelegated),o=a()(r,["children","isDelegated"]),l=t!==s||!n.i(f.a)(i,o);!s&&l&&n.i(p.a)("metrics").trackView(o)},t.prototype.render=function(){return h.a.Children.only(this.props.children)},t}(d.Component);g.childContextTypes={metricsPage:d.PropTypes.string.isRequired
},t.a=g},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=r()(e),i=r()(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,s=0;s<n.length;s++)if(!a.call(t,n[s])||e[n[s]]!==t[n[s]])return!1;return!0}var a=n(70),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(15),s=n(384),o={selectable:!0,events:{mousedown:"onMouseDown",mouseup:"onMouseUp",mouseleave:"onMouseUp"},itemEvents:{select:"onItemSelect",autoselect:"onItemAutoselect"},
itemViewOptions:function(){return{mediaActions:this.parentMediaActions||this.mediaActions}},initialize:function(e){e.listModel&&e.mediaActions&&(this.listModel=e.listModel,this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,{"change:selectedItems":this.onMediaActionsSelectedItemsChange,"change:selecting":this.onMediaActionsSelectingChange}),this.shiftRange={start:-1,end:-1})},isViewSelected:function(e){var t=this.mediaActions.get("selectedItems");if(0===t.length)return!1
;var n=e.model;if(a.a.indexOf(t,n)!==-1)return!0;var i=n.get("children");return!!(i&&i.length&&i.every(function(e){return e.selected}))},singleSelect:function(e){this.shiftRange.end=-1;var t=e.model;this.isViewSelected(e)?(this.shiftRange.start=-1,this.deselectItem(t),e.deselect()):(this.shiftRange.start=this.collection.indexOf(t),this.previousCollectionOffset=this.listModel.get("populatedRange").start,this.selectItem(t),e.select())},multiSelect:function(e){if(this.getViewForModel){
var t=this.collection.indexOf(e.model),n=this.listModel.get("populatedRange").start,i=this.previousCollectionOffset-n,r=[],o=[];if(this.previousCollectionOffset=n,this.shiftRange.start<0)this.shiftRange.start=t,r.push(e.model),e.select();else if(this.shiftRange.end<0)this.shiftRange.start+=i,this.shiftRange.end=t,s.a.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){r.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);else{s.a.each(this.shiftRange,function(e){
var t=this.collection.at(e);t&&o.push(t)},this),this.shiftRange.start+=i,this.shiftRange.end=t,s.a.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){r.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);var l=[o].concat(r);o=a.a.without.apply(a.a,l),a.a.each(o,function(e){var t=this.getViewForModel(e);t&&t.deselect()},this)}this.mediaActions.selectItems(r,{superset:this.collection}),this.mediaActions.deselectItems(o,{superset:this.collection})}},selectItem:function(e){
this.mediaActions.selectItem(e,{superset:this.collection})},deselectItem:function(e){this.mediaActions.deselectItem(e,{superset:this.collection})},forwardItemViewEvents:function(e){this.stopListening(e,"all"),this.listenTo(e,"all",function(t){var n=Array.prototype.slice.call(arguments);n[0]="itemview:"+t,n.splice(1,0,e);var i=r.a.normalizeMethods.call(this,this.itemEvents);void 0!==i&&a.a.isFunction(i[t])&&i[t].apply(this,n),r.a.triggerMethod.apply(this,n)},this)},
onMediaActionsSelectedItemsChange:function(e,t){this.getViewForModel&&(t&&t.length||(this.shiftRange.start=-1,this.shiftRange.end=-1,this.collection.each(function(e){var t=this.getViewForModel(e);t&&t.deselect&&t.deselect()},this)))},onMediaActionsSelectingChange:function(e){this.$el.toggleClass("hide-actions",e)},onClose:function(){this.mediaActions&&this.mediaActions.deselectAll()},onMouseDown:function(e,t){this.isMouseDown=!0},onMouseUp:function(e,t){this.isMouseDown=!1},
onItemSelect:function(e,t,n){this.selectable&&(n||(n={}),n.multiSelect?this.multiSelect(t):this.singleSelect(t))},onItemAutoselect:function(e,t,n){this.isMouseDown&&this.onItemSelect.apply(this,arguments)},onItemRemoved:function(e){e&&e.model.selected&&(this.deselectItem(e.model),e.deselect())}};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={currentState:null,enterState:function(e){if(e!==this.currentState){var t=this.currentState,n=this.states[e]
;if(!n)throw new Error("The state machine is unable to enter undefined state: "+e);if(t){var i=this.states[t];if(a.a.isFunction(i.onExit)){if(i.onExit.call(this)===!1)return}}if(this.currentState=e,a.a.isFunction(n.onEnter)){if(n.onEnter.apply(this,a.a.rest(arguments))===!1)return void(this.currentState=t)}this.triggerMethod("stateMachineChange",{from:t,to:e})}},enterNextState:function(){var e;if(this.currentState){e=this.states[this.currentState].nextState}else{
if(!this.initialState)throw new Error("An initial state must be defined for the state machine");e=this.initialState}e?this.enterState(e):this.triggerMethod("stateMachineComplete")}};t.a=r},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"f",function(){return o}),n.d(t,"g",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"c",function(){return c}),n.d(t,"e",function(){return d})
;var r=n.i(i.a)(a._117),s=n.i(i.a)(a._118),o=n.i(i.a)(a._119),l=n.i(i.a)(a._120),u=n.i(i.a)(a._121),c=n.i(i.a)(a._122),d=n.i(i.a)(a._123)},function(e,t,n){"use strict";function i(e){var t=e.ui.libraryPage.details;return t?t.types:void 0}t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n.i(i.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e){var t=e.dvrSetup.setupErrorMessages;return t.length?t[0].message:null}));t.a=a},function(e,t,n){"use strict";function i(){
return n.i(a.createSelector)(r.a,function(e,t){return t.searchResultEntityID},function(e,t){return e[t]})}var a=n(8),r=(n.n(a),n(1701));t.a=i},function(e,t,n){"use strict";var i=n(2859),a=n.n(i),r=n(15),s=n(12),o={success:!0,error:!0,notify:!0},l=r.a.ItemView.extend({className:"alert-bar",template:a.a,events:{"click .close-btn":"onCloseClick"},initialize:function(e){var t=e.alert;if(this.alert=t,t){var n=t.type;n&&o[n]&&this.$el.addClass(n)}},hide:function(){s.a.trigger("hide:bar","alertbar")},
serializeData:function(){return this.alert},onCloseClick:function(e){e.preventDefault(),this.hide()}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(4),u=n(19),c=n(128),d=n(395),h=n(1608),p=n(828),f=n(1601),g=n(180),m=o.a.Layout.extend({ui:{formGroup:".form-group"},onlyAfterRender:["showValidationResult"],serializeData:function(){var e={};return this.model.isNew()?e.add=!0:e.edit=!0,e.section=this.model.toJSON(),e},showValidationResult:function(e){
var t=this.ui.formGroup;t.removeClass("has-error"),a.a.each(e,function(e){t.filter("."+e+"-group").addClass("has-error")}),this.trigger(e.length?"invalid":"valid")},createMenuOptions:function(e,t){return a.a.map(e,function(e){return'<option value="'+e.value+'"'+(e.value===t?" selected":"")+">"+e.label+"</option>"}).join("\n")},getSectionType:function(){if(this.model.sectionType)return this.model.sectionType;var e=this.model.get("type"),t=c.a.get(e)
;return"movie"===e&&"com.plexapp.agents.none"===this.model.get("agent")&&(t=c.a.get("videos")),this.model.sectionType=t,t},setSectionType:function(e){this.model.sectionType=e},populateAgents:function(){var e=this.getSectionType();return e?(this.model.agents||(this.model.agents=new d.a([],{server:this.model.server,mediaTypeID:e.typeID})),this.model.agents.populate().then(function(e){return e})):s.a.Deferred().reject().promise()},populateScanners:function(){var e=this.getSectionType()
;return e?(this.model.scanners||(this.model.scanners=new h.a([],{server:this.model.server,sectionTypeID:e.typeID})),this.model.scanners.populate().then(function(e){return e})):s.a.Deferred().reject().promise()},populateAgentsProxy:function(){var e=this.getSectionType().exclusiveAgents,t=new p.a(this.model.agents,e,this.model.get("agent"));return this.model.agentsProxy=t,s.a.Deferred().resolve(t).promise()},populateScannersProxy:function(){
var e=this.getSectionType().exclusiveScanners,t=new f.a(this.model.scanners,e,this.model.get("scanner"));return this.model.scannersProxy=t,s.a.Deferred().resolve(t).promise()},populateSectionSettings:function(){var e=this;if(!this.model.server.supports("sectionSettings"))return s.a.Deferred().resolve().promise();if(!this.model.settings){var t=new g.a([],{server:this.model.server});if(this.model.isNew()){var i=this.getSectionType(),a=this.model.server.hasOwnerFeature("photo_autotags")
;"photos"===i.key&&a&&this.model.set("enableAutoPhotoTags",!0);var r={type:i.typeID,agent:this.model.get("agent"),enableAutoPhotoTags:this.model.get("enableAutoPhotoTags")};t.url=u.join(["/library/sections/prefs"],r)}else t.url=u.join(["/library/sections/",this.model.id,"/prefs"]);this.model.settings=t}return this.model.settings.populate().then(function(){return!(!e.model.isNew()||"music"!==e.model.get("type")||!e.model.server.supports("premiumMusic")||e.model.settings.findWhere({
id:"importFromiTunes"})||!e.model.server.get("desktop").get("settings").findWhere({id:"iTunesLibraryXmlPath"}))&&e.model.settings.unshift({type:"bool",id:"importFromiTunes",value:!1,label:n.i(l.default)("Import from iTunes"),summary:n.i(l.default)("Importing from iTunes will import your music playlists. It will also import your ratings, the date you added the music, as well as play and skip counts for tracks in your library.")}),e.model.settings})},populateSectionAgentSettings:function(){
if(!this.model.agentSettings){var e=new g.a([],{server:this.model.server,url:u.join(["/:/plugins/",this.model.get("agent"),"/prefs"])});this.model.agentSettings=e}return this.model.agentSettings.populate()},onModalClose:function(){this.model.scanners=null,this.model.scannersProxy=null,this.model.agents=null,this.model.agentsProxy=null,this.model.settings=null}});t.a=m},function(e,t,n){"use strict"
;var i=n(3003),a=n.n(i),r=n(5),s=n.n(r),o=n(259),l=n(540),u=n(1568),c=n(1559),d=n(57),h=n(1890),p=n(1889),f=n(1891),g=n(1886),m=d.a.extend({mixins:[o.a],name:"convertModal",className:"convert-modal modal fade",template:a.a,regions:{bodyRegion:".modal-body-region"},initialize:function(e){d.a.prototype.initialize.apply(this,arguments),this.server=this.model?this.model.server:e.item.server;var t={server:this.server,allowInCache:!0};this.playlists=new l.a([],t),this.targets=new u.a([],t),
this.profiles=new c.a([],t)},initialState:"loading",states:{loading:{nextState:"form",onEnter:function(){this.bodyRegion.show(new h.a),this.listenForStateRequests();var e=this.options.item,t=e&&!e.get("isMetadataList"),n=s.a.when(t?e.populate():null,this.playlists.populate(),this.targets.populate(),this.profiles.populate(),this.server.get("sections").populate());n.done(this.whenRendered(function(){this.playlist=this.playlists.first(),this.playlist?this.enterNextState():this.enterState("error")
})),n.fail(this.whenRendered(function(){this.enterState("error")}))}},form:{nextState:"success",onEnter:function(){this.bodyRegion.show(new p.a({model:this.model,item:this.options.item,items:this.options.items,playlist:this.playlist,targets:this.targets,profiles:this.profiles})),this.listenForStateRequests()}},success:{onEnter:function(){this.model?this.hide():(this.bodyRegion.show(new f.a({server:this.server})),this.listenForStateRequests())}},error:{onEnter:function(e){
this.bodyRegion.show(new g.a({status:e})),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){d.a.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.a=m},function(e,t,n){"use strict"
;var i=n(3011),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(13),c=n(4),d=n(12),h=n(44),p=n(23),f=n(710),g=n(489),m=n(1613),v=n(57),y=n(1898),b=n(1906),S=n(1897),I=n(1901),w=n(1905),M=n(1902),C=n(164),D=v.a.extend({name:"editFriendModal",className:"edit-friend-modal modal modal-lg fade",template:a.a,panes:{username:b.a,general:S.a,ownedServer:I.a,sharedServer:w.a,restrictions:M.a},ui:{poster:".modal-poster",title:".modal-title",message:".form-message",nextBtn:".next-btn",submitBtn:".submit-btn"},
regions:{nav:".modal-nav-pane",body:".modal-body-pane"},events:s.a.extend({"submit #share-server-form":"onSubmit"},v.a.prototype.events),initialize:function(e){v.a.prototype.initialize.apply(this,arguments),e||(e={}),this.type=e.type||"friend",this.isAdmin=e.isAdmin,this.defaultPaneType=e.defaultPaneType,this.defaultPaneID=e.defaultPaneID,"home"===this.type&&this.initHomeUser(e),this.initModel(e),this.initServerOverviews(e),this.initServerShares(e),this.image=new C.a({model:this.model,
type:"friend",width:40}),this.listenTo(this.body,"show",this.onShowPane)},initHomeUser:function(e){var t=u.a("appModel");if(this.homeUser=e.homeUser,this.homeUser){var n=t.get("user"),i=n.get("desktop").get("friends");this.model=i.findWhere({id:e.homeUser.id}),this.tempHomeUser=this.homeUser.clone()}else this.tempHomeUser=new g.a({admin:!1},{server:t.get("user").server})},initModel:function(e){var t=u.a("appModel");this.model?this.tempModel=this.model.cloneDeep():(this.tempModel=new f.a({},{
server:t.get("user").server}),this.tempModel.parseServers({Server:[]}))},initServerOverviews:function(e){var t=u.a("appModel"),n=t.get("servers"),i=t.get("user"),a=this.tempModel.get("serverOverviews");a||(a=new m.a([],{server:i.server,parent:this.tempModel}),this.tempModel.set("serverOverviews",a));var r=n.filter(function(e){var t=!e.get("shared")&&!e.get("cloud"),n=e.get("isFullServer")||e.get("isCloudSyncServer");return e.id&&t&&n});s.a.each(r,function(e){a.add({machineIdentifier:e.id,
name:e.get("friendlyName")}).populate()})},initServerShares:function(e){this.tempModel.get("serverShares").each(function(e){e.populate()})},serializeData:function(){return{type:this.type,title:this.tempModel.get("title")}},showNextPane:function(e){var t,n={};if(e||(e=this.tempModel.isNew()?"username":this.defaultPaneType||"general"),"ownedServer"===e||"sharedServer"===e){var i,a;if("ownedServer"===e?(i=this.tempModel.get("serverOverviews"),
a="serverOverview"):(i=this.tempModel.get("serverShares"),a="serverShare"),i.length){var r;this.defaultPaneID&&(r=i.findWhere({machineIdentifier:this.defaultPaneID})),r||(r=i.first()),t=r.id,n[a]=r}else e="general"}t||(t=e),this.showPane(e,t,n)},showPane:function(e,t,n){this.currentPane&&(this.currentPane.flushChanges(),this.stopListening(this.currentPane),"username"===this.currentPane.paneID&&(this.ui.title.text(this.tempModel.get("username")||this.tempModel.get("title")),
this.findExistingFriend()));var i=this.panes[e],a=new i(s.a.extend({paneID:t,model:this.tempModel,homeUser:this.tempHomeUser,type:this.type,isAdmin:this.isAdmin},n));return this.listenTo(a,{"change:pane":this.onChangePane,"change:errorMessage":this.onErrorMessageChange,"enable:submit":this.onEnableSubmit,"destroy:homeUser":this.onHomeUserDestroy,"destroy:friend":this.onFriendDestroy,"destroy:serverShare":this.onServerShareDestroy,"disable:guest":this.onGuestDisable}),this.currentPane=a,
this.nav.currentView.selectItem(t),this.body.show(a),a},getSubmitBtn:function(){return this.currentPane&&"username"===this.currentPane.paneID?this.ui.nextBtn:this.ui.submitBtn},findExistingFriend:function(){var e,t=u.a("appModel"),n=t.get("user"),i=n.get("desktop").get("friends"),a=this.tempModel.get("username");if(this.tempModel.get("restricted")?e=i.findWhere({restricted:!0,title:a}):(e=i.findWhere({username:a}))||(e=i.findWhere({email:a})),e){var r=this.tempModel.get("serverOverviews")
;this.model=e,this.tempModel=e.cloneDeep(),this.tempModel.set("serverOverviews",r),this.initServerShares(),this.image.setModel(this.model),this.image.render(),this.nav.currentView.setModel(this.tempModel)}},sendRequests:function(){var e=this.tempHomeUser&&this.tempHomeUser.isNew(),t=!e&&this.tempModel.isNew(),i=[];i.push(this.sendFriendInvite()),i.push(this.sendHomeInvite());var a=l.a.when.apply(l.a,i);return a=a.then(s.a.bind(function(){
return Array.prototype.push.apply(i,this.sendServerShareInvites()),this.tempModel.isNew()||i.push(this.tempModel.save({},{parse:!1})),this.tempHomeUser&&!e&&i.push(this.tempHomeUser.save()),l.a.when.apply(l.a,i)},this)),a.done(s.a.bind(function(){var e=u.a("appModel"),t=e.get("user");t.get("desktop").get("friends").fetch(),"home"===this.type&&t.get("homeUsers").fetch(),this.tempModel.get("restricted")||t.get("desktop").get("sentInvites").fetch(),this.hide()},this)),a.fail(s.a.bind(function(i){
var a=h.a.parseXML(i.responseText),r=a&&a.status;s.a.isString(r)||(r=e?n.i(c.default)("This user could not be added to your home."):t?n.i(c.default)("An invite could not be sent to this user."):n.i(c.default)("Your changes could not be saved.")),d.a.trigger("show:alert",{type:"error",message:r})},this)),a},sendFriendInvite:function(){if("friend"===this.type){var e=this.tempModel.get("serverShares").getActiveCount();return this.tempModel.isNew()&&!e?this.tempModel.save({
user:this.tempModel.get("username")}):void 0}},sendHomeInvite:function(){if("home"===this.type&&this.tempHomeUser.isNew()){var e=this.tempHomeUser.save();return e.done(s.a.bind(function(){if(this.tempHomeUser.get("restricted")){this.tempModel.set("id",this.tempHomeUser.id);u.a("appModel").get("user").set("home",!0)}this.showHomeWarnings()},this)),e}},showHomeWarnings:function(){p.a.execute("showHomeWarningsModal")},sendServerShareInvites:function(){
var e=this.model&&this.model.get("serverShares").filterByOwned(),t=this.tempModel.get("serverShares").filterByOwned(),n=e?e.pluck("machineIdentifier"):[],i=t?t.pluck("machineIdentifier"):[],a=s.a.union(n,i),r=[];return s.a.each(a,function(n){var i=e&&e.findWhere({machineIdentifier:n}),a=t&&t.findWhere({machineIdentifier:n}),s=i&&i.isActive();a&&a.isActive()?r.push(p.a.execute("shareServer",{user:this.tempModel,serverShare:a})):s&&r.push(i.destroy({wait:!0}))},this),r},onRender:function(){
v.a.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster);var e=new y.a({model:this.tempModel});this.listenTo(e,"change:pane",this.onChangePane),this.nav.show(e),this.showNextPane()},onClose:function(){this.image.close()},onChangePane:function(e,t,n){t||(t=e),this.showPane(e,t,n)},onShowPane:function(){var e="username"===this.currentPane.paneID;this.nav.currentView.toggleDisabled(e),this.ui.nextBtn.toggleClass("hidden",!e),this.ui.submitBtn.toggleClass("hidden",e)},
onErrorMessageChange:function(e){this.ui.message.text(e)},onEnableSubmit:function(e){this.getSubmitBtn().toggleClass("disabled",!e)},onHomeUserDestroy:function(){if(this.homeUser){p.a.execute("removeHomeUser",{homeUser:this.homeUser}).done(s.a.bind(this.hide,this))}},onFriendDestroy:function(){if(this.model){p.a.execute("removeFriend",{friend:this.model}).done(s.a.bind(this.hide,this))}},onServerShareDestroy:function(e){p.a.execute("removeServerShare",{serverShare:e}).done(s.a.bind(function(){
this.model.get("serverShares").remove(e.id),this.showNextPane("general")},this))},onGuestDisable:function(){var e=u.a("appModel");p.a.execute("toggleGuest",{user:e.get("user"),enable:!1}).done(s.a.bind(this.hide,this))},onSubmit:function(e){e.preventDefault();var t=this.getSubmitBtn();if(!t.isDisabled()){if("username"===this.currentPane.paneID)return void this.showNextPane("ownedServer");t.addClass("active"),this.currentPane.flushChanges(),this.sendRequests().fail(s.a.bind(function(){
this.ui.submitBtn.removeClass("active")},this))}}});t.a=D},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(1010)),p=n.n(h),f=n(1009),g=n.n(f),m=n(970),v=n.n(m),y=n(2537),b=n.n(y),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onProgressToUpdate=function(){a.setState({progress:a._progressPosition.progress})},a.onProgressToComplete=function(){a._progressToTween=null},a.state={progress:0},a}
return c()(t,e),t.prototype.componentDidMount=function(){this._progressTo(this.props)},t.prototype.componentDidUpdate=function(e){this._progressTo(this.props)},t.prototype.componentWillUnmount=function(){this._cancelProgressTo()},t.prototype._progressTo=function(e){var t=e.progress,n=this.props.smoothProgressDuration/1e3,i={progress:t,ease:g.a.Power3.easeOut,onUpdate:this.onProgressToUpdate,onComplete:this.onProgressToComplete};this._progressPosition={progress:this.state.progress},
this._cancelProgressTo(),this._progressToTween=p.a.to(this._progressPosition,n,i)},t.prototype._cancelProgressTo=function(){this._progressToTween&&(this._progressToTween.kill(),this._progressToTween=null)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.containerClassName,i=e.backgroundClassName,r=e.size,s=e.lineWidth,o=e.strokeColor,l=e.showProgressText,u=this.state.progress,c=r/2,d=c-s,h=Math.PI*(2*d),p=r+"px",f=r-3*s+"px",g=(100-u)/100*h,m=Math.round(u)+"%";return a()("div",{
className:n,style:{width:p,height:p,lineHeight:p}},void 0,a()("svg",{className:t,version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:r,height:r},void 0,a()("circle",{fill:"transparent",r:d,cx:c,cy:c,strokeDasharray:h,style:{strokeWidth:s,stroke:o,strokeDashoffset:g}})),a()("div",{className:i,style:{width:f,height:f}}),l&&a()("div",{className:b.a.circularProgressBarText},void 0,m))},t}(d.Component);S.defaultProps={className:b.a.circularProgressBar,
containerClassName:b.a.circularProgressBarContainer,backgroundClassName:b.a.circularProgressBarBackground,size:60,lineWidth:5,strokeColor:v.a.primaryColor,showProgressText:!0,smoothProgressDuration:1e3},t.a=S},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.errorMessage,a=e.onModalClose;return r()(u.a,{onModalClose:a},void 0,r()(c.a,{},void 0,n.i(o.default)("DVR Setup")),i&&r()("div",{className:h.a.errorMessage},void 0,r()(l.a,{name:"plex-icon-alert-560",className:h.a.errorIcon
}),i),t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(29),u=n(111),c=n(123),d=n(2607),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,a=u()(e,["isOpen","metricsProperties","onModalClose"]);return o()(p.a,{isOpen:t,metricsPage:h.b,metricsProperties:n,onModalClose:i},void 0,d.a.createElement(f.a,r()({},a,{onModalClose:i})))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(46),p=n(147),f=n(2078);t.a=i
},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{grandparentTitle:i.grandparentTitle,grandparentRoute:n.i(u.a)(e,t,i.grandparentKey)}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(102),c=n(2092);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){
var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{title:i.title,index:i.index,route:n.i(u.a)(e,t,i.key),parentTitle:i.parentTitle,parentIndex:i.parentIndex,parentRoute:n.i(u.a)(e,t,i.parentKey),originallyAvailableAt:i.originallyAvailableAt}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(102),c=n(587);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return u.a.createElement(d.a,r()({
className:p.a.innerEmptyPage,contentClassName:p.a.innerEmptyPageContent,scrollDirection:c.a.NONE},n),t)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(22),d=n(274),h=n(1e3),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=u()(e,["children"]);return d.a.createElement(m.a,r()({title:n.i(h.default)("There was an unexpected error"),description:n.i(h.default)("Please visit our forums if you continue to experience problems")},i),o()(g.a,{to:p.a,target:"_blank",
kind:f.b.PRIMARY},void 0,n.i(h.default)("Go to Forums")),t)}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(500),f=n(22),g=n(25),m=n(150);t.a=i},function(e,t,n){"use strict";function i(e,t){switch(e){case f.a:return S.a;case f.b:return I.a;case f.c:return w.a;case f.d:return y.a;default:return b.a}}function a(e){
var t=e.serverEntityID,a=e.providerEntityID,r=e.metadataListEntityID,o=e.metadataItemEntityIDs,y=e.populatedRange,b=e.isPopulated,S=e.isPending,I=e.error,w=e.totalSize,C=e.showArtwork,D=e.viewportWidth,P=e.viewportHeight,A=e.contentHeight,k=e.scrollTop,L=e.columnAdjustment,_=e.listType,N=e.listStyle,R=e.onPageRequest,O=w||o.length;if(b&&O){var j=i(N),z=n.i(h.a)(_,O),U=N===f.b||N===f.c||N===f.d;return s()("div",{className:T.a.descendantHubCell},void 0,!!z&&s()(m.a,{
className:T.a.descendantHubCellHeader},void 0,s()(v.a,{},void 0,n.i(l.a)(z))),U&&x,s()(M.a,{showArtwork:C,contentHeight:A,scrollTop:k},void 0,s()(j,{serverEntityID:t,providerEntityID:a,metadataListEntityID:r,keyPropName:"metadataItemEntityID",items:o,itemsOffset:y.start,size:O,viewportWidth:D,viewportHeight:P,columnAdjustment:L,listType:_,listContext:p.a,onPageRequest:R})),U&&E)}return S?s()("div",{className:T.a.emptyContainer},void 0,s()(g.a,{label:n.i(d.a)(_)})):I?s()("div",{
className:T.a.emptyMessage},void 0,n.i(c.a)(_)):s()("div",{className:T.a.emptyMessage},void 0,n.i(u.a)(_))}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(387)),u=n(1421),c=n(1422),d=n(1423),h=n(1424),p=n(35),f=n(71),g=(n(539),n(36)),m=n(574),v=n(421),y=n(2239),b=n(2248),S=n(2247),I=n(2250),w=n(2249),M=n(933),C=n(934),D=n(932),P=n(2718),T=n.n(P),x=s()(C.a,{}),E=s()(D.a,{});t.a=a},function(e,t,n){"use strict";function i(e,t){if("mixed"===e)return[];switch(t){case s.a:switch(e){case"season":return[l.a,g.a]
;case"episode":return[l.a,y.a];case"album":return[l.a,d.a];case"actor":return[M.a,C.a]}break;case s.b:switch(e){case"movie":return[l.a,b.a,d.a];case"clip":return[l.a,b.a];case"episode":return[c.a,b.a,v.a]}break;case s.d:switch(e){case"artist":return[l.a,p.a];case"photo":return[o.a,S.a];case"photoalbum":return[l.a,S.a];case"clip":return[l.a,S.a];case"playlist":return[l.a,h.a];case"actor":return[T.a];case"genre":return[T.a];case"director":return[T.a];case"autotag":return[T.a];case"collection":
return[T.a]}}switch(e){case"movie":return[l.a,d.a];case"show":return[l.a,f.a];case"season":return[u.a,l.a];case"episode":return[c.a,l.a,m.a];case"artist":return[l.a];case"album":return[u.a,l.a];case"track":return[c.a,o.a];case"photo":return[o.a];case"photoalbum":return[l.a];case"clip":return[l.a];case"extra":return[o.a,w.a];case"musicVideo":return[c.a,o.a]}return[o.a]}function a(e,t){
var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=a.activeSort,o=a.isSearch,l=a.isSearchAll,u=a.providerEntityID,c=i(e,t);if(o&&(c.push(D.a),l&&c.push(P.a)),r.a.EPG_IDENTIFIER.test(u)&&("movie"!==e&&"episode"!==e&&"mixed"!==e||c.push(I.a)),s){var d=n.i(x.a)(s);d&&c.push(d)}return c}
var r=n(73),s=n(35),o=n(581),l=n(2115),u=n(343),c=n(271),d=n(429),h=n(908),p=n(904),f=n(589),g=n(586),m=n(914),v=n(272),y=n(2109),b=n(910),S=n(583),I=n(903),w=n(2111),M=n(2089),C=n(2090),D=n(947),P=n(2362),T=n(948),x=n(2408);t.a=a},function(e,t,n){"use strict";function i(e,t,n){return r()({},e,n,t)}var a=n(6),r=n.n(a);t.a=i},function(e,t,n){"use strict";var i=n(166),a=n(204),r=n.n(a),s=n(2805),o=n.n(s),l=n.i(i.a)(r.a.slowSpeed),u={appear:o.a.appear,appearActive:o.a.appearActive,enter:o.a.enter,
enterActive:o.a.enterActive,leave:o.a.leave,leaveActive:o.a.leaveActive},c={transitionName:u,transitionAppear:!0,transitionAppearTimeout:l,transitionEnterTimeout:l,transitionLeaveTimeout:2*l};t.a=c},function(e,t,n){e.exports=!n(237)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(282),a=n(443);e.exports=n(279)?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){
return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var i=n(350),a=n(976),r=n(624),s=Object.defineProperty;t.f=n(279)?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),a)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(982),a=n(614);e.exports=Object.keys||function(e){return i(e,a)}},function(e,t,n){
var i=n(621)("wks"),a=n(445),r=n(136).Symbol,s="function"==typeof r;(e.exports=function(e){return i[e]||(i[e]=s&&r[e]||(s?r:a)("Symbol."+e))}).store=i},,,,,function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){var i,a,r="";return r+=' <h2 class="text-muted">',(a=n.subtitle)?i=a.call(e,{hash:{},data:t}):(a=e&&e.subtitle,i=typeof a===c?a.call(e,{hash:{},data:t}):a),(i||0===i)&&(r+=i),r+="</h2> "}function s(e,t){var i,a,r="";return r+=" <p>",
(a=n.message)?i=a.call(e,{hash:{},data:t}):(a=e&&e.message,i=typeof a===c?a.call(e,{hash:{},data:t}):a),(i||0===i)&&(r+=i),r+="</p> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",c="function",d=this;return u+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>',(l=n.title)?o=l.call(t,{hash:{},data:a}):(l=t&&t.title,o=typeof l===c?l.call(t,{hash:{},data:a}):l),(o||0===o)&&(u+=o),u+="</h1> ",o=n.if.call(t,t&&t.subtitle,{hash:{},
inverse:d.noop,fn:d.program(1,r,a),data:a}),(o||0===o)&&(u+=o),u+=" ",o=n.if.call(t,t&&t.message,{hash:{},inverse:d.noop,fn:d.program(3,s,a),data:a}),(o||0===o)&&(u+=o),u+=" </div> </div>"})},function(e,t,n){function i(e,t){return s(r(e,t,a),e+"")}var a=n(1022),r=n(3158),s=n(3161);e.exports=i},,,,,,,,function(e,t,n){"use strict";var i=n(138),a=new i.a({
props:["X-Plex-Client-Identifier","X-Plex-Device","X-Plex-Device-Name","X-Plex-Device-Screen-Resolution","X-Plex-Device-Vendor","X-Plex-Model","X-Plex-Platform","X-Plex-Platform-Version","X-Plex-Product","X-Plex-Version"]});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(138),o=n(4),l=n(12),u=n(28),c=s.a.extend({initialize:function(){this.controllers=[]},register:function(e){this.controllers.push(e)},getInstance:function(e,t){t||(t={})
;var i,s=r.a("appModel"),c=s.get("primaryPlayer");i=c&&!t.forceLocal?c.get("protocol")||"legacy":"local";var d=a.a.find(this.controllers,function(t){var n=i===t.protocol,a=e===t.type||"*"===t.type;return n&&a});if(d)return d.create(e,t);if(t.forceLocal)throw new Error("No player controller found for: "+e);return u.a.warn("A player did not match the protocol ("+i+") and type ("+e+")."),l.a.trigger("show:alert",{type:"error",
message:n.i(o.default)("Playback of this media is not supported with the selected player.")}),this.getInstance(e,{forceLocal:!0})}});t.a=new c},function(e,t,n){"use strict";var i=n(138),a=new i.a({props:["capabilities","video","music","photo"]});t.a=a},function(e,t,n){"use strict";var i=n(21),a=n(302),r=i.a.extend({name:"PlayQueueItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(70),a=n.n(i),r=n(2),s=n.n(r),o=n(61),l=n(86),u=n(67),c=n(62),d=n(183),h=n(17),p=n(18),f=n(59),g=n(1212),m=p.a.extend({name:"PlayQueueItemModel",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],entityType:u.i,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(c.a)(this.entityType,e.playQueueItemID,this.server.entityID())},idAttribute:"playQueueItemID",cache:new d.a,cacheKey:function(e){
return this.server&&this.server.getScopedKey(e.playQueueItemID)},sessionAttrs:{isPlayQueueItem:h.a.boolean},syncedAttrs:{playQueueItemID:h.a.string,queueIndex:h.a.integer,key:h.a.string,ratingKey:h.a.string,type:h.a.string,advertisement:h.a.boolean,allowSkipAfter:h.a.integer,librarySectionID:h.a.string,syncItemId:h.a.integer,generatorID:h.a.integer,generatorType:h.a.integer,clientIdentifier:h.a.string,target:h.a.string},syncedRelations:{metadataItem:{relationClass:f.a,deferred:!0},
lyricsStreams:{relationClass:g.a,deferred:!0}},defaults:{isPlayQueueItem:!0},augmentResponse:function(e){var t=s.a.pick(e,a()(this.syncedAttrs));t.metadataItem=e;var n=s.a.first(o.a.parseArray(e.Media));if(n){var i=s.a.first(o.a.parseArray(n.Part));if(i){var r=o.a.parseArray(i.Stream);if(r){var u=l.a.get("lyrics");t.lyricsStreams=s.a.filter(r,function(e){return o.a.parseInteger(e.streamType)===u.id})}}}return t}});t.a=m},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(12),l=n(210),u=n(44),c=n(19),d=n(64),h=n(301),p={audio:["Track"],photo:["Photo","Video"],video:["Video"]},f=d.a.extend({idAttribute:"playQueueID",defaults:{selectedItem:null,mediaType:null,collection:null,server:null,owned:!0,hasUserAdditions:!1,repeatAll:!1,shuffled:!1,hasUpNext:!1,playQueueID:null,playQueueVersion:0,playQueueSelectedItemID:null,message:null},url:function(){return"/playQueues/"+this.id},initialize:function(e,t){
this.set("server",t.server),this.set("collection",new h.a([],{server:t.server}))},_fetch:function(){var e=a.a.result(this,"url");return this._ajax("GET",e)},convert:function(e){var t=a.a.isObject(e)?e:u.a.parseXML(e);return u.a.parseInteger(t,["playQueueVersion","playQueueSelectedItemOffset"]),u.a.parseArray(t,"Metadata"),u.a.parseBoolean(t,"playQueueShuffled"),t.stationService?(u.a.parseBoolean(t,"allowRepeat"),u.a.parseBoolean(t,"allowSeek"),u.a.parseBoolean(t,"allowShuffle"),
u.a.parseBoolean(t,"allowSkipPrevious"),u.a.parseInteger(t,"stationSkipsPerHour"),u.a.parseInteger(t,"serviceSkipsPerDay"),t.isRadio=!0):t.isRadio=!1,t},parse:function(e){var t=p[this.get("mediaType")].concat("Directory");e=u.a.replaceXMLElementNames(e,t,"Metadata")
;var n=this.convert(e),i=["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","message","isRadio","stationTitle","stationThumb","stationService","allowRepeat","allowSeek","allowShuffle","allowSkipPrevious","stationSkipsPerHour","serviceSkipsPerDay"];n.playQueueVersion>this.get("playQueueVersion")&&i.push("playQueueID","playQueueVersion");var r=a.a.pick(n,i);return r.shuffled=!!n.playQueueShuffled,r.hasUpNext=!!n.playQueueLastAddedItemID,this.set(r),
this.parseElementCollection(n)},parseElementCollection:function(e){var t=e.Metadata,n=a()(t).pluck("playQueueItemID").indexOf(e.playQueueSelectedItemID.toString()),i=parseInt(e.playQueueSelectedItemOffset,10),r=i-n,s=this.get("collection");return e.identifier&&s.setContext("identifier",e.identifier),e.mediaTagPrefix&&s.setContext("mediaTagPrefix",e.mediaTagPrefix),e.mediaTagVersion&&s.setContext("mediaTagVersion",e.mediaTagVersion),a.a.each(t,function(e,t){e.queueIndex=r+t}),t.message=e.message,
t.totalSize=parseInt(e.playQueueTotalCount,10),t.availableRange={start:r,end:r+t.length},t},_ajax:function(e,t){var n={repeat:this.get("repeatAll")?1:0,includeChapters:1};"audio"===this.get("mediaType")&&(n.includeRelated=1),t=c.join(t,n);var i=a.a.extend(this.get("server").getXHROptions(t),{type:e}),r=this._$ajax(i),s=a.a.bind(function(e){var t=this.parse(e);t.message&&o.a.trigger("show:alert",{type:"error",message:t.message});var n=this.get("collection");n.totalSize=t.totalSize,
n.availableRange=t.availableRange,n.reset(t,{parse:!0}),this.set("selectedItem",this.getCurrentItem())},this);return r.done(s,this)},_$ajax:function(e){return s.a.ajax(e)},getCurrentItem:function(){var e=this.get("playQueueSelectedItemID");return this.get("collection").findWhere({playQueueItemID:e})||null},queueContent:function(e,t){t||(t={});var n={type:this.get("mediaType")};if(e.get("playlistType"))n.playlistID=e.get("ratingKey");else{var i=a.a.pick(t,"unwatched","items","excludeSeedItem")
;n.uri=l.a.uri(e,i)}return t.firstItemKey&&(n.key=t.firstItemKey),t.extrasPrefixCount&&(n.extrasPrefixCount=t.extrasPrefixCount),n.shuffle=t.shuffle?1:0,t.continuous&&"episode"===e.get("type")&&(n.continuous=1),this.isNew()?this._addContentPromise=this._ajax("POST",c.join("/playQueues",n)):(n.next=t.next?1:0,this.set("hasUserAdditions",!0),this._addContentPromise=this._ajax("PUT",c.join(a.a.result(this,"url"),n))),this._addContentPromise},addContent:function(e,t){
return this.queueContent(e,t).then(a.a.bind(this._setSelectedItem,this,t))},_setSelectedItem:function(e){var t;if(e&&e.firstItemKey){var n=e.firstItemKey;t=this.get("collection").find(function(e){return e.get("key")===n})}else t=this.get("collection").at(0);this.set("selectedItem",t)},removeItem:function(e){if(e.get("playQueueItemID")===this.get("selectedItem").get("playQueueItemID"))return s.a.Deferred().resolve().promise();this.set("hasUserAdditions",!0)
;var t=c.join([a.a.result(this,"url"),"/items/",e.get("playQueueItemID")]);return this._ajax("DELETE",t)},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return s.a.Deferred().resolve().promise();var n=t||this.get("selectedItem").get("playQueueItemID");this.set("hasUserAdditions",!0);var i={after:n},r=c.join([a.a.result(this,"url"),"/items/",e,"/move"],i);return this._ajax("PUT",r)},isItemQueueable:function(e){var t=a()(e).result("url")
;if(!e.get("playlistType")&&!/\/(?:library|hubs|services\/gracenote)\//.test(t))return!1;if(/\/sync\//.test(t))return!1;if(/\/folder/.test(t))return!1;if(/\/theme\//.test(t))return!1;var n=e.get("currentSubset")&&e.get("currentSubset").id;if("folder"===n||"recentlyViewedShows"===n)return!1;var i=e.get("type")&&("photoalbum"===e.get("type")||"photo"===e.get("type")),r="photo"===e.viewGroup||i;return e.server.supports("photoPlayQueues")||!r},toggleShuffle:function(){var e=[a.a.result(this,"url")]
;return this.get("shuffled")?e.push("/unshuffle"):e.push("/shuffle"),this._ajax("PUT",c.join(e))},setRepeatAll:function(e){return this.set("repeatAll",e),this.fetch()},yieldOwnership:function(){return this.set("owned",!1),(this._addContentPromise||s.a.Deferred().resolve().promise()).then(a.a.bind(function(){return this.get("playQueueID")&&this.get("collection").length>0?a.a.result(this,"url")+"?own=1&window=200":null},this))},takeOwnership:function(){
if(this.get("owned"))return s.a.Deferred().resolve().promise();this.set("owned",!0);var e=a.a.result(this,"url")+"?own=1";return this._ajax("GET",e)},supports:function(){return!0},getIdFromKey:function(e){var t=/playQueues\/([^\/?]+)/.exec(e);return t&&t[1]||null}});t.a=f},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(19),s=n(128),o=n(1395),l=n(34),u=n(67),c=n(62),d=n(17),h=n(18),p=n(183),f=n(1205),g=n(693),m=n(1195),v=n(1184),y=n(691),b=n(689),S=n(1180),I=n(481),w=n(482),M=n(479),C=n(690),D=n(1182),P=n(180),T=h.a.extend({name:"SectionModel",context:["server"],entityType:u.g,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(c.a)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",rootPropertyName:"Directory",
cache:new p.a,persistInCache:!0,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.key)},url:function(){return this.isNew()?a.a.result(this,"urlRoot")||a.a.result(this.collection,"url"):a.a.isNaN(parseInt(this.id,10))?this.id:"/library/sections/"+this.id},sessionAttrs:{isSection:d.a.boolean,currentFilters:d.a.array,currentFolderKey:d.a.string,settings:d.a.instanceOf(P.a)},syncedAttrs:{key:d.a.oneOfType(d.a.string,d.a.integer),uuid:d.a.string,thumb:d.a.string,art:d.a.string,
createdAt:d.a.integer,updatedAt:d.a.integer,allowAdvancedFilters:d.a.boolean,allowSync:d.a.boolean,refreshing:d.a.boolean,name:{type:d.a.string,save:!0},title:{type:d.a.string,save:!0},type:{type:d.a.string,save:!0},agent:{type:d.a.string,save:!0},scanner:{type:d.a.string,save:!0},language:{type:d.a.string,save:!0},importFromiTunes:{type:d.a.boolean,save:!0},enableAutoPhotoTags:{type:d.a.boolean,save:!0}},syncedRelations:{locations:function(){return{relationClass:D.a,rootPropertyName:"Location",
options:{section:this},save:!0}}},sessionRelations:{items:function(){return{relationClass:f.a,options:{section:this}}},currentSubset:function(){return{relationClass:g.a,options:{section:this}}},currentFirstCharacter:function(){return{relationClass:C.a,deferred:!0}},currentType:function(){return{relationClass:y.a,deferred:!0}},currentSort:function(){return{relationClass:w.a,deferred:!0}},types:function(){return{relationClass:v.a,options:{section:this}}},subsets:function(){return{
relationClass:m.a,options:{section:this}}},filters:function(){return{relationClass:this.get("allowAdvancedFilters")?b.a:S.a,options:{section:this}}},sorts:function(){return{relationClass:I.a,options:{section:this}}},firstCharacters:function(){return{relationClass:M.a,options:{section:this}}}},defaults:function(){var e=this;return{isSection:!0,currentType:null,currentFilters:[],currentSort:null,currentFirstCharacter:null,currentFolderKey:null,currentSubset:o.a.get("all"),settings:new P.a([],{
server:this.server,url:function(){return r.join(["/library/sections/",e.get("key"),"/prefs"])}})}},initialize:function(e){this.updateMediaTypes(this,e.type),this.set({currentType:this.get("types").at(0)}),this.on("change:type",this.updateMediaTypes,this)},uninitialize:function(){this.off("change:type",this.updateMediaTypes,this),this.stopListening()},augmentResponse:function(e){return e.allowAdvancedFilters=!!e.filters,delete e.filters,e},getSectionType:function(){var e=this.get("type")
;return s.a.get(e)},getSaveParams:function(e){var t=h.a.prototype.getSaveParams.apply(this,arguments);if("type"in t){var n=s.a.get(t.type);n&&(t.type=n.typeString)}return"title"in t&&(t.name=t.title,delete t.title),a.a.isObject(t.type)&&(t.type=t.type.typeString),"Location"in t&&(t.location=a.a.pluck(t.Location,"path"),delete t.Location),t},getSyncTitle:function(e){var t=this.get("title"),n=[],i=this.get("currentSubset"),r=this.get("currentFilters");return e?(a.a.each(e,function(e){
n.push(e.get("title"))}),t+": "+n.join(", ")):"all"!==i.id?t+": "+i.get("title"):r.length?(a.a.each(r,function(e){n.push(e.titles.join(", "))}),t+": "+n.join(",")):t},setAgentAndScanner:function(e,t,n,i){var a=e.defaultAgent,r=e.defaultScanner;if(i){var s=e.exclusiveAgents,o=e.exclusiveScanners,l=t.hasExclusiveAgent(s),u=n.hasExclusiveScanner(o);l&&(a=s[0]),u&&(r=o[0])}this.set({agent:a,scanner:r})},updateMediaTypes:function(e,t){var i=n.i(l.l)(t);this.get("types").reset(i)}});t.a=T
},function(e,t,n){"use strict";var i=n(78),a=n(65),r=n(21),s=n(59),o=r.a.extend({name:"MetadataCollection",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey"],model:s.a,url:function(){return this.containerKey},augmentResponseText:function(e,t){return t===a.a.xml?n.i(i.a)(e):e},splitByType:function(){var e={};return this.each(function(t){var n=t.get("type");e.hasOwnProperty(n)?e[n].push(t):e[n]=[t]}),e}});t.a=o
},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){if(e){var t=e.librarySectionKey,n=e.librarySectionID;return t?t:n?"/library/sections/"+n:void 0}})}var a=n(8),r=(n.n(a),n(24));t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.metadataItems});t.a=r},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(h.a)(),n.i(p.a)(),function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.a.findWhere(t.features,{type:d.a.CONTENT});if(i&&i.directories)return i.directories.map(function(e){return t.isLibraryProvider&&"/hubs"===e.hubKey?r()({isHomeDirectory:!0},e):e});if(t.identifier===c.a.LIBRARY_PROVIDER_IDENTIFIER){var a=[{hubKey:"/hubs",isHomeDirectory:!0,title:n.i(u.default)("Home")}];return e.forEach(function(e){var t=e.key,n=e.title;a.push({key:"/library/sections/"+t,hubKey:"/hubs/sections/"+t,title:n})}),a}
return[]})}var a=n(6),r=n.n(a),s=n(2),o=n.n(s),l=n(8),u=(n.n(l),n(4)),c=n(73),d=n(139),h=n(493),p=n(127);t.a=i},function(e,t,n){"use strict";var i={NEVER:"never",SAME_NETWORK:"samenetwork",ALWAYS:"always"};i.settings=[{value:i.NEVER,title:"Never"},{value:i.SAME_NETWORK,title:"On same network as server"},{value:i.ALWAYS,title:"Always"}],t.a=i},function(e,t,n){"use strict";var i={AUTO:"auto",AVOID:"avoid",ALWAYS:"always",NEVER:"never"};i.settings=[{value:i.AUTO,title:"Automatic"},{value:i.AVOID,
title:"Only image formats"},{value:i.ALWAYS,title:"Always"}],t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=n.i(r.a)(1e3*e);return t?n.i(a.default)("{1} left",t):""}var a=n(4),r=n(247);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=r.a.duration(e),i=t.hours()+24*t.days(),a=t.minutes(),o=t.seconds();return i&&a?n.i(s.default)("{1} hr {2} min",i,a):i?n.i(s.default)("{1} hr",i):a?n.i(s.default)("{1} min",a):o>0?n.i(s.default)("{1} sec",o):""
}var a=n(37),r=n.n(a),s=n(4);t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMMM D, YYYY";return e?r.a.unix(e).format(t):""}Object.defineProperty(t,"__esModule",{value:!0});var a=n(37),r=n.n(a);t.default=i},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=r.a.unix(e);return r()().isSame(t,"day")}var a=n(37),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(){
return window.overridePixelRatio||window.devicePixelRatio||1}t.a=i},function(e,t,n){"use strict";function i(e){if(!e||"object"!==(void 0===e?"undefined":o()(e)))return!1;var t="function"==typeof e.constructor?r()(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&l(n)===u}var a=n(2425),r=n.n(a),s=n(236),o=n.n(s);t.a=i;var l=function(e){return Function.prototype.toString.call(e)},u=l(Object)},function(e,t,n){"use strict";n.d(t,"b",function(){
return r});var i,a=(i={aa:"Afaraf",af:"Afrikaans",ab:"Abkhazian",ak:"Akan",sq:"Shqip",am:"Amharic",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",an:"Aragon\xe9s",hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",as:"Assamese",av:"\u0430\u0432\u0430\u0440 \u043c\u0430\u0446\u04c0",ae:"avesta",ay:"aymar aru",az:"az\u0259rbaycan dili",ba:"\u0431\u0430\u0448\u04a1\u043e\u0440\u0442 \u0442\u0435\u043b\u0435",bm:"bamanankan",eu:"euskara",
be:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bn:"Bengali",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",bi:"Bislama",bs:"bosanski jezik",br:"brezhoneg",bg:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a",my:"Burmese",ca:"Catal\xe0",ch:"Chamoru",ce:"\u043d\u043e\u0445\u0447\u0438\u0439\u043d \u043c\u043e\u0442\u0442",cu:"\u0469\u0437\u044b\u043a\u044a \u0441\u043b\u043e\u0432\u0463\u043d\u044c\u0441\u043a\u044a",
cv:"\u0447\u04d1\u0432\u0430\u0448 \u0447\u04d7\u043b\u0445\u0438",kw:"Kernewek",co:"corsu",cr:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",dv:"Divehi",dz:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",en:"English","en-GB":"English (UK)",eo:"Esperanto",et:"eesti",ee:"E\u028begbe",fo:"f\xf8royskt",fj:"vosa Vakaviti",fy:"Frysk",ff:"Fulfulde",ka:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",gd:"G\xe0idhlig",ga:"Gaeilge",gl:"Galego",gv:"Gaelg",gn:"Ava\xf1e&apos;\u1ebd",
gu:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",ht:"Krey\xf2l ayisyen",ha:"\u0647\u064e\u0648\u064f\u0633\u064e",hz:"Otjiherero",hi:"\u0939\u093f\u0928\u094d\u0926\u0940",ho:"Hiri Motu",hr:"hrvatski",ig:"As\u1ee5s\u1ee5 Igbo",is:"\xcdslenska",io:"Ido",ii:"\ua188\ua320\ua4bf Nuosuhxop",iu:"\u1403\u14c4\u1483\u144e\u1450\u1466",ie:"Interlingue",ia:"Interlingua",id:"Bahasa Indonesia",ik:"I\xf1upiaq",jv:"basa Jawa",kl:"kalaallisut",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",
ks:"\u0915\u0936\u094d\u092e\u0940\u0930\u0940",kr:"Kanuri",kk:"\u049a\u0430\u0437\u0430\u049b \u0442\u0456\u043b\u0456",km:"Khmer",ki:"G\u0129k\u0169y\u0169",rw:"Ikinyarwanda",ky:"\u043a\u044b\u0440\u0433\u044b\u0437 \u0442\u0438\u043b\u0438",kv:"\u043a\u043e\u043c\u0438 \u043a\u044b\u0432",kg:"KiKongo",kj:"Kuanyama",ku:"Kurd\xee",lo:"Lao",la:"latine",lv:"latvie\u0161u valoda",li:"Limburgs",ln:"Ling\xe1la",lt:"lietuvi\u0173 kalba",lb:"L\xebtzebuergesch",lu:"Luba-Katanga",lg:"Luganda",
mk:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a",mh:"Kajin M\u0327aje\u013c",ml:"Malayalam",mi:"te reo M\u0101ori",mr:"\u092e\u0930\u093e\u0920\u0940",ms:"bahasa Melayu",mg:"Malagasy fiteny",mt:"Malti",mo:"Moldavian",mn:"\u043c\u043e\u043d\u0433\u043e\u043b",na:"Ekakair\u0169 Naoero",nv:"Din\xe9 bizaad",nr:"isiNdebele (North)",nd:"isiNdebele (South)",ng:"Owambo",ne:"\u0928\u0947\u092a\u093e\u0932\u0940",nn:"Norsk nynorsk",nb:"Norsk bokm\xe5l",
ny:"chiChe\u0175a",oc:"Occitan",oj:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",or:"Oriya",om:"Afaan Oromoo",os:"\u0438\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",pi:"\u092a\u093e\u0934\u093f",ps:"\u067e\u069a\u062a\u0648",qu:"Runa Simi",rm:"rumantsch grischun",ro:"rom\xe2n\u0103",rn:"kiRundi",sg:"y\xe2ng\xe2 t\xee s\xe4ng\xf6",sa:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",
sr:"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",si:"Sinhala",sk:"sloven\u010dina",sl:"Sloven\u0161\u010dina",se:"Davvis\xe1megiella",sm:"gagana fa&apos;a Samoa",sn:"chiShona",sd:"\u0938\u093f\u0928\u094d\u0927\u0940",so:"Soomaaliga",st:"Sesotho",sc:"sardu",ss:"SiSwati",su:"Basa Sunda",sw:"Kiswahili",ty:"Reo Tahiti",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",tt:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",te:"Telugu",tg:"\u0442\u043e\u04b7\u0438\u043a\u04e3",tl:"Wikang Tagalog",
th:"\u0e44\u0e17\u0e22",bo:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",ti:"Tigrinya",to:"faka Tonga",tn:"Setswana",ts:"Xitsonga",tk:"T\xfcrkmen",tw:"Twi",ug:"Uy\u01a3urq\u0259",uk:"\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648",uz:"O&apos;zbek",ve:"Tshiven\u1e13a",vi:"Ti\u1ebfng Vi\u1ec7t",vo:"Volap\xfck",cy:"Cymraeg",wa:"Walon",wo:"Wollof",xh:"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",yo:"Yor\xf9b\xe1",za:"Sa\u026f cue\u014b\u0185",
zu:"isiZulu",pb:"Portugu\xeas (Brasil)",fr:"Fran\xe7ais","fr-CA":"Fran\xe7ais Canadien",de:"Deutsch",sv:"Svenska",no:"Norsk",da:"Dansk",fi:"Suomeksi",nl:"Nederlands",it:"Italiano",es:"Espa\xf1ol","es-419":"Espa\xf1ol (Latinoam\xe9rica)",pl:"Polski",hu:"Magyar",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",tr:"T\xfcrk\xe7e",zh:"\u4e2d\u6587","zh-TW":"\u81fa\u8a9e",ru:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",
ja:"\u65e5\u672c\u8a9e",pt:"Portugu\xeas","pt-BR":"Portugu\xeas Brasileiro",ko:"\ud55c\uad6d\uc5b4",cs:"\u010de\u0161tina",fa:"\u0641\u0627\u0631\u0633\u06cc"},i.xx="Unknown",i.xn="None",i),r=["xx","xn"];t.a=a},function(e,t,n){"use strict";function i(e){var t=e.episodeIndex;if(t>0||0===t)return e.noLeadingZero||(t=n.i(o.a)(t)),e.useLongName?n.i(s.default)("Episode {episodeNumber}",{episodeNumber:t}):n.i(s.default)("E{episodeNumber}",{episodeNumber:t});if(e.date){var i=r()(e.date)
;return n.i(s.default)("{monthNumber}/{dayNumber}/{shortYear}",{monthNumber:i.month()+1,dayNumber:i.date(),shortYear:i.format("YY")})}return""}var a=n(37),r=n.n(a),s=n(4),o=n(517);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(61),u=n(40),c=n(1320),d=n(760),h=n(763),p=n(251),f=n(310),g=n(529),m=n(28),v=n(520),y=n(156),b={getPlayerDecision:function(e){a.a.defaults(e,{offset:0,minVersionForDASH:y.a.dash,minVersionForStreamingMKV:y.a.streamingMKV,
transcoderOptions:{}});var t={playbackSessionID:e.playbackSessionID||n.i(g.a)(),transcodeSessionID:n.i(g.a)(),offset:e.offset},i=this.populateMedia(t,e);return i=i.then(a.a.bind(function(){return this.resolveMedia(t,e)},this)),i=i.then(function(){return s.a.when(t.url)}),i=i.then(function(e){return t.url=e,t})},populateMedia:function(e,t){var i=s.a.Deferred(),r=a.a.bind(i.resolve,i,e);return t.requireAnalysis&&n.i(c.a)(t.item)?t.item.fetch({scope:"player"}).always(r):a.a.defer(r),i.promise()},
resolveMedia:function(e,t){var n=a.a.extend({transcodeServer:this.resolveTranscodeServer(t)},t),i=p.a.getMediaDecision(n),r=i.media,o=s.a.Deferred();return a.a.extend(e,i),r?e.canPlay?"webkit"===r.protocol?(m.a.warn("[PDE] Webkit videos are not supported"),e.redirect=!0,o.reject(e).promise()):"embed"===r.protocol?(m.a.warn("[PDE] An embed is required"),e.embed=!0,e.part=a.a.first(r.Part),o.reject(e).promise()):this.resolvePart(e,t):(m.a.warn("[PDE] Unable to play item;",e.errorMessage),
o.reject(e).promise()):this.resolveUrls(e,t)},resolveTranscodeServer:function(e){var t=e.item.server,n=e.fallbackServer;if(t===n||!n||!n.get("isConnected"))return t;var i;return e.type===u.a.types.VIDEO?i="transcoderVideo":e.type===u.a.types.MUSIC&&(i="transcoderAudio"),i&&!t.get(i)&&n.get(i)?n:t},resolvePart:function(e,t){return t.part?e.part=t.part:t.offset?1===e.media.Part.length?e.part=e.media.Part[0]:(e.part=n.i(d.a)(e.media,t.offset),
e.offset=n.i(h.a)(e.media,e.part,t.offset)):e.part=a.a.first(e.media.Part),e.media.indirect?this.resolveIndirect(e,t):this.resolveUrls(e,t)},resolveIndirect:function(e,t){n.i(m.a)("[PDE] Resolving indirect item");var i=t.item.resolveIndirect(e.media,e.part),r=a.a.bind(function(){return this.resolveMedia(e,t)},this),o=a.a.bind(function(){return s.a.Deferred().reject(e).promise()},this);return i=i.then(r,o)},resolveUrls:function(e,t){var n=s.a.Deferred()
;return this.validatePlayerType(e,t)?(this.validateSoftSubtitles(e,t)?e.subtitlesUrl=this.resolveSubtitlesUrl(e,t):e.useSoftSubtitles&&(e.useSoftSubtitles=!1),m.a.group("[PDE] Player decision"),m.a.info("Player:",e.playerType),m.a.info("Protocol:",e.protocol),m.a.info("Direct Play:",e.canDirectPlay),m.a.groupEnd(),e.canDirectPlay?e.url=this.resolveDirectPlayUrl(e,t):e.url=this.resolveTranscoderUrl(e,t),this.resolveDecision(e,t)):n.reject(e).promise()},validatePlayerType:function(e,t){
return e.media&&t.type&&t.type!==u.a.types.PHOTO?e.canDirectPlay?("hls"===e.media.protocol?(e.protocol="hls",e.playerType=t.hasNativeHLS?"html":"flash"):(e.protocol="http",e.playerType="flv"===e.media.container?"flash":"html"),!0):this.validatePlayerTranscodeProtocol(e,t):(e.protocol="http",e.playerType="html",!0)},validatePlayerTranscodeProtocol:function(e,t){var i,a=e.transcodeServer,r=t.transcodeProtocol,s=!0,l=!0,c=!0;if(r&&(s="dash"===r,l="http"===r,c="hls"===r),
c&&t.hasNativeHLS)return e.protocol="hls",e.playerType="html",!0;if(l&&t.hasStreamingMKV){if(a.isVersionOrNewer(t.minVersionForStreamingMKV))return e.protocol="http",e.playerType="html",!0;i=t.minVersionForStreamingMKV}if(s&&t.hasDASH){if(a.isVersionOrNewer(t.minVersionForDASH))return e.protocol="dash",e.playerType="html",!0;i=t.minVersionForDASH}return t.type===u.a.types.MUSIC?(e.protocol="http",e.playerType="html",!0):c&&t.hasFlash?(e.protocol="hls",e.playerType="flash",
!0):(e.errorMessage=i?n.i(o.default)("Please update Plex Media Server. This feature requires {1} or later.",i):n.i(o.default)("Streaming this media is unsupported."),!1)},validateSoftSubtitles:function(e,t){return e.useSoftSubtitles&&"html"!==e.playerType?(m.a.warn("[PDE] Only the HTML player supports soft subtitles"),!1):e.useSoftSubtitles},resolveDirectPlayUrl:function(e,t){var n=t.item,i=e.part,a={"X-Plex-Session-Identifier":e.playbackSessionID};if(i){
var r=/(googlevideo|youtube).com/.test(i.key);return"flv"===i.container&&r&&i.postURL?i.postURL:n.server.resolveUrl(i.key,{appendHeaders:!0,params:a})}return n.server.resolveUrl(n.get("key"),{appendHeaders:!0,params:a})},resolveTranscoderUrl:function(e,t,i){var r=t.item,s=e.media,o=e.part,l=t.transcoderOptions;a.a.isFunction(l)&&(l=l(e)),l=a.a.extend({},e.transcoderQualityOptions,l,{"X-Plex-Session-Identifier":e.playbackSessionID,session:e.transcodeSessionID,protocol:e.protocol,
directPlay:e.canDirectPlay?1:0,offset:e.offset/1e3});var c=t.subtitlesBurnLevel;t.type===u.a.types.VIDEO&&(c===f.a.NEVER?l.subtitles=e.canDirectPlay?"none":"auto":e.useSoftSubtitles?(l.subtitles="auto",c===f.a.AVOID&&(l.advancedSubtitles="text")):l.subtitles="burn");var d=t.profileExtra;a.a.isFunction(d)&&(d=d(e)),l["X-Plex-Client-Profile-Extra"]=d,("hls"===l.protocol&&!t.useOffsetHLS||"dash"===l.protocol)&&(n.i(m.a)("[PDE] DASH and HLS should seek forward by default, offset=0"),
delete l.offset),"hls"===l.protocol&&t.useOffsetHLS&&(e.useOffsetHLS=!0,l.offset&&(n.i(m.a)("[PDE] HLS started with an offset, copyts=0"),l.copyts=0)),"http"===l.protocol&&(t.type===u.a.types.MUSIC?(e.useOffsetHTTP=!0,l.copyts=0):l.copyts=1),"http"!==l.protocol||e.canDirectPlay||(l["X-Plex-Chunked"]=1),a.a.each(a.a.keys(l),function(e){null==l[e]&&delete l[e]});var h=t.type,p=t.transcoder,g=e.transcodeServer;if(h===u.a.types.VIDEO)return p.video(g,r,s,o,l,i)
;if(h===u.a.types.MUSIC)return p.music(g,r,l,i);if(h===u.a.types.PHOTO){l.fallbackServer=t.fallbackServer;var v="photo"===r.get("type")?r.getMediaKey():r.get("thumb");return p.image(g,v,l)}},resolveSubtitlesUrl:function(e,t){var n=this.resolveTranscoderUrl(e,t),i=n.substring(n.indexOf("?"));return e.transcodeServer.resolveUrl("/video/:/transcode/universal/subtitles"+i)},resolveDecision:function(e,t){var i=e.transcodeServer,r=s.a.Deferred()
;if(t.type===u.a.types.PHOTO||!i.supports("decisionEndpoint"))return r.resolve(e).promise();var o=a.a.clone(e);this.validatePlayerTranscodeProtocol(o,t);var c=this.resolveTranscoderUrl(o,t,"decision"),d=s.a.ajax(i.getXHROptions(c,{timeout:2e3}));return d.done(function(t){var i=l.a.parseXML(t);i.generalDecisionCode&&(e.generalDecisionCode=l.a.parseInteger(i.generalDecisionCode),e.generalDecisionText=i.generalDecisionText),i.mdeDecisionCode&&(e.mdeDecisionCode=l.a.parseInteger(i.mdeDecisionCode),
e.mdeDecisionText=i.mdeDecisionText),i.transcodeDecisionCode&&(e.transcodeDecisionCode=l.a.parseInteger(i.transcodeDecisionCode),e.transcodeDecisionText=i.transcodeDecisionText),n.i(v.a)(e)?r.reject(e):r.resolve(e)}),d.fail(function(){m.a.warn("[PDE] Player decision failed; the transcode server may be a slow or outdated"),r.resolve(e)}),r.promise()}};t.a=b},function(e,t,n){"use strict";var i={sizes:{movie:"portrait",show:"portrait",season:"portrait",episode:"landscape",artist:"square",
album:"square",track:"square",photo:"square",photoalbum:"square",clip:"landscape",playlist:"square",playlistFolder:"square",userPlaylistItem:"landscape",channel:"square",channelDirectory:"square",folder:"portrait",friend:"square",poster:"portrait",art:"landscape",banner:"banner"},ratios:{portrait:1/1.5,square:1,landscape:16/9,banner:5.2},getRatioByType:function(e){return this.ratios[this.sizes[e]]},getPosterWidthUsingRatio:function(e,t){return Math.round(this.ratios[e]*t)},
getPosterHeightUsingRatio:function(e,t){return Math.round(this.ratios[e]&t)},getPosterWidth:function(e,t){return Math.round(t*this.getRatioByType(e))},getPosterHeight:function(e,t){return Math.round(t/this.getRatioByType(e))}};t.a=i},function(e,t,n){"use strict";function i(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(19),s=n(28),o=n(179),l=n(758),u=n(761),c={extensions:{dash:".mpd",hls:".m3u8",http:""},logParams:function(e,t,n){
s.a.group("[Transcoder] %s (%s) options",e,t),a.a.forEach(n,function(e,t){return s.a.info("%s: %s",t,e)}),s.a.groupEnd()},serializeParams:function(e,t){var n={},i={},s=/^X-Plex/;return a.a.each(e,function(e,t){s.test(t)?i[t]=e:n[t]=e}),n=r.stringifyParams(n),i=r.stringifyParams(i),n&&i?n+"&"+i:n||i},image:function(e,t,n){if(!t)return"";var i,r=n.fallbackServer,s=!1;if(r&&r.get("isConnected")){var l=r.get("isFullServer"),u=r.get("activeConnection").get("isPossiblyCrossNetworkProtected")
;i=l&&!u?r:null}if(i)if(e.get("cloud"))s=!0;else if(!e.get("isFullServer")){var c=!e.get("activeConnection").get("isPrivate"),d=i.get("activeConnection").get("isPrivate");s=c||d}var h=s?i:e,p=h.id===e.id;e.get("cloud")&&(t=s?i.resolveUrl(t,{appendToken:!0}):e.resolveUrl(t,{appendToken:!0,connection:new o.a({scheme:"https",address:"node.plexapp.com",port:"32443"})}));var f={url:e.resolveUrl(t,{useRelativeUrl:p,appendToken:!0}),width:n.width&&Math.round(parseFloat(n.width)),
height:n.height&&Math.round(parseFloat(n.height))};n.minSize&&(f.minSize=1),n.format&&(f.format=n.format),n.quality&&(f.quality=n.quality),n.filters&&a.a.each(n.filters,function(e,t){void 0!==e&&(f[t]=e)});var g="/photo/:/transcode?"+this.serializeParams(f,h);return h.resolveUrl(g,{appendToken:!0})},music:function(e,t,n,i){i||(i="start");var r=a.a.first(t.get("Media"));if(r){var s=a.a.first(r.Part);if(s){var o,l;return e.supports("universalMusicTranscoder")?(o=a.a.extend({hasMDE:1,
path:e.resolveUrl(t.get("key"),{useRelativeUrl:!0}),mediaIndex:0,partIndex:0},n),l="/music/:/transcode/universal/"+i):(o={identifier:t.get("identifier"),url:e.resolveUrl(s.key,{useRelativeUrl:!0}),format:"mp3",audioCodec:"libmp3lame",audioBitrate:320,audioSamples:44100},l="/music/:/transcode/generic.mp3"),this.logParams("Music",i,o),o=a.a.extend(o,e.getHeaders()),e.resolveUrl(l+"?"+this.serializeParams(o,e))}}},video:function(e,t,i,r,s,o){s||(s={}),o||(o="start")
;var c=e.id===t.server.id,d=t.server.get("cloud")?e:t.server,h=e.get("activeConnection"),p=h.get("isPrivate"),f=a.a.extend({hasMDE:1,path:d.resolveUrl(t.get("key"),{useRelativeUrl:c,appendToken:!c}),mediaIndex:n.i(l.a)(t,i.id),partIndex:n.i(u.a)(i,r.key),protocol:"hls",fastSeek:1,directPlay:0,directStream:1,subtitleSize:100,audioBoost:100,location:p?"lan":"wan"},s);f.path=f.path.replace(/^http[s]?:\/\/node.plexapp.com:[\d]+\//,e.url()),this.logParams("Video",o,f)
;var g=t.get("indirectHttpHeaders");g&&(f.httpCookies=g.Cookie,f.userAgent=g["User-Agent"]),f=a.a.extend(f,e.getHeaders());var m=this.extensions[f.protocol],v="/video/:/transcode/universal/"+o;return"start"===o&&m&&(v+=m),e.resolveUrl(v+"?"+this.serializeParams(f,e))}};t.a=c},function(e,t,n){"use strict";function i(e,t){var n=t.constructor.prototype.validate;return n?n(e):[]}function a(e){var t=this.panes[e],n=o.call(this,t);return 0===i.call(this,n,t).length}function r(e,t){
var n=this.panes[t].dependentPanes;return"function"==typeof n&&(n=n.call(this)),e.concat(n||[])}function s(){var e=this.$(".change-pane-btn");e.addClass("disabled").removeClass("selected"),u.a.each(this.getReachablePanes(),function(t){e.filter("."+t+"-btn").removeClass("disabled")},this),e.filter("."+this.selectedPane+"-btn").addClass("selected")}function o(e){return this[e.model]||this[this.panesModel]||this.model}var l=n(2),u=n.n(l),c={showPane:function(e){if(e!==this.selectedPane){
var t=this.paneRegion.currentView;t&&(this.stopListening(t,"valid",s),this.stopListening(t,"invalid",s),this.$el.removeClass("pane-"+this.selectedPane),this.onPaneHide&&this.onPaneHide(this.selectedPane,t)),this.selectedPane=e;var n=this.panes[e],i=n.constructor,a=this.paneConstructorArg?this.paneConstructorArg():{},r=new i(u.a.extend(a,{model:o.call(this,n)}));if(r.onModalClose){this._paneOnModalCloseCallbacks||this.listenToOnce(this,"close",function(){
u.a.each(this._paneOnModalCloseCallbacks,function(e){e[1].call(e[0])},this),this._paneOnModalCloseCallbacks=null});var l=this._paneOnModalCloseCallbacks||[];l.push([r,r.onModalClose]),this._paneOnModalCloseCallbacks=u.a.uniq(l,function(e){return e[1]})}this.listenTo(r,"valid",s),this.listenTo(r,"invalid",s),s.call(this),this.onPaneShow&&this.onPaneShow(e,r),this.$el.addClass("pane-"+e),this.paneRegion.show(r),s.call(this)}},getReachablePanes:function(){
for(var e,t,n=u.a.reduce(this.panes,function(e,t){var n=t.dependentPanes;return"function"==typeof n&&(n=n.call(this)),u.a.union(e,n||[])},[],this),i=u.a.filter(u.a.keys(this.panes),function(e){return!u.a.contains(n,e)}),s=i;s.length;)e=u.a.filter(s,a,this),t=t||e.length!==s.length,s=u.a.reduce(e,r,[],this),i=i.concat(s);return i.isAnyInvalid=t,i},onChangePaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"))}};t.a=c},function(e,t,n){
"use strict";var i=n(83),a=n(1558),r=i.a.extend({model:a.a,url:"/status/sessions/background",parse:function(e){return this.convert(e,"TranscodeJob")}});t.a=r},function(e,t,n){"use strict";var i,a,r=n(215),s=n(183),o=n(17),l=n(18),u=n(1567),c=n(1566),d=n(1562),h=n(1564),p=l.a.extend({name:"VersionGeneratorModel",context:["server","section","playlistID"],rootPropertyName:"Item",cache:new s.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.id)},urlRoot:function(){
return"/playlists/"+(this.playlistID||this.parent.id)+"/items"},syncedAttrs:{id:o.a.integer,clientIdentifier:o.a.string,contentType:o.a.string,composite:o.a.string,type:{type:o.a.integer,save:!0},title:{type:o.a.string,save:!0},target:{type:o.a.string,save:!0},targetTagID:{type:o.a.integer,save:!0},locationID:{type:o.a.integer,save:!0},Location:{type:o.a.object,save:!0},Device:{type:o.a.object,save:!0}},sessionRelations:{children:{relationClass:h.a,options:function(){return{generator:this}}}},
syncedRelations:{status:{relationClass:u.a,rootPropertyName:"Status"},policy:{relationClass:c.a,rootPropertyName:"Policy",save:!0},mediaSettings:{relationClass:d.a,rootPropertyName:"MediaSettings",save:!0}},derivedAttrs:{isDirectory:function(){var e=this.get("Location");if(e.uri)return/(playlist\:\/\/|library\:\/\/([\w-]*)\/directory\/)/.test(e.uri)}},defaults:function(){return{type:42,locationID:-1,Location:{},Device:{}}},defaultCounts:(i={},i[r.a]=5,i[r.d]=50,i[r.c]=50,i),warningCounts:(a={},
a[r.a]=10,a[r.d]=100,a[r.c]=100,a),getSaveParams:function(e,t){var n=l.a.prototype.getSaveParams.apply(this,arguments);return n.targetTagID&&(delete n.MediaSettings,delete n.Device),{Item:n}},setPolicyDefaultsFor:function(e){var t=this.get("policy"),n=this.get("isDirectory");return t.has("scope")||t.set("scope",n?"count":"all"),!t.has("value")&&n&&t.set("value",this.defaultCounts[e]),this},shouldShowPolicyWarning:function(e,t){var n=this.get("policy").get("scope")
;return"count"===n?t>this.warningCounts[e]:"all"===n&&this.get("isDirectory")}});t.a=p},function(e,t,n){"use strict";var i=n(18),a=n(17),r=n(206),s=n(826),o=n(1575);n.d(t,"a",function(){return l});var l={DEAD:"dead",ALIVE:"alive"},u=i.a.extend({name:"MediaGrabberDeviceModel",context:["server"],rootPropertyName:"Device",idAttribute:"key",sessionAttrs:{isChannelsPending:a.a.boolean,isChannelsPopulated:a.a.boolean,channelsError:a.a.object,selectedSource:a.a.string,isSaving:a.a.boolean,
saveError:a.a.object},sessionRelations:{channels:{relationClass:o.a}},syncedAttrs:{key:a.a.integer,uuid:a.a.string,parentID:a.a.integer,uri:a.a.string,protocol:a.a.string,status:a.a.string,state:a.a.string,lastSeenAt:a.a.integer,make:a.a.string,model:a.a.string,modelNumber:a.a.string,source:a.a.integer,sources:a.a.list,tuners:a.a.integer,thumb:a.a.string},syncedRelations:{channelMappings:{rootPropertyName:"ChannelMapping",relationClass:s.a},prefs:{relationClass:r.a,rootPropertyName:"Setting",
deferred:!0,save:!0}},defaults:{isChannelsPending:!1,isChannelsPopulated:!1,channelsError:null,isSaving:!1,saveError:null}});t.b=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(50),a=n(32);n.d(t,"initRecordingSchedulePage",function(){return r}),n.d(t,"clearRecordingSchedulePage",function(){return s}),n.d(t,"fetchMediaSubscriptions",function(){return o}),n.d(t,"moveMediaSubscription",function(){return l}),n.d(t,"setVisibleDays",function(){return u}),
n.d(t,"goToToday",function(){return c}),n.d(t,"goToPreviousRange",function(){return d}),n.d(t,"goToNextRange",function(){return h}),n.d(t,"fetchCalendar",function(){return p}),n.d(t,"playRecording",function(){return f});var r=n.i(i.a)(a.P),s=n.i(i.a)(a.Q),o=n.i(i.a)(a.R),l=n.i(i.a)(a.S),u=n.i(i.a)(a.T),c=n.i(i.a)(a.U),d=n.i(i.a)(a.V),h=n.i(i.a)(a.W),p=n.i(i.a)(a.X),f=n.i(i.a)(a.Y)},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){return t.activeType
},function(e,t){return t.typeKey},o.a,function(e,t,n){var i=void 0;return t?i=r.a.find(n,function(e){return e.key===t}):e&&(i=r.a.find(n,function(t){return t.type===e})),i||(i=r.a.first(n)),i})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(261));t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){return t.deviceID},n.i(o.a)(),function(e,t){if(t)return r.a.find(t.devices,{key:e})})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(400));t.a=i},function(e,t,n){"use strict"
;function i(e){if(e){var t=e.split("?"),n=t[1];return n?u.a.parseQueryString(n):void 0}}function a(e){if("now"===e)return{};var t=e.match(/[-+]?\d+[smhdwMy]/),n=t[1],i=t[2];if(n&&i){var a;return a={},a[p[i]]=parseInt(n,10),a}return{}}function r(){return n.i(l.createSelector)(function(e,t){return t.containerKey},n.i(h.a)(),function(e,t){if(t&&t.Media){for(var r=i(e),s=o.a.sortBy(t.Media,"endsAt"),l=Date.now()/1e3,u=0,h=s.length;u<h;u++){var p=s[u];if(r){
var f=r["beginsAt>"],g=r["beginsBefore<"],m=r["endsAt>"],v=r["endsBefore<"];if(f){var y=a(f);if(n.i(d.a)(p.beginsAt,y))continue}if(g){var b=a(g);if(n.i(c.a)(p.beginsAt,b))continue}if(m){var S=a(m);if(n.i(d.a)(p.endsAt,S))continue}if(v){var I=a(v);if(n.i(c.a)(p.endsAt,I))continue}}if(p.endsAt>l)return p}return o.a.first(s)}})}var s=n(2),o=n.n(s),l=n(8),u=(n.n(l),n(61)),c=n(739),d=n(740),h=n(24);t.a=r;var p={s:"seconds",m:"minutes",h:"hours",d:"days",w:"weeks",M:"months",y:"years"}
},function(e,t,n){"use strict";var i=n(2895),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(13),u=o.a.ItemView.extend({id:"primary-server-dropdown",tagName:"span",className:"dropdown",template:a.a,events:{"click .dropdown-menu a":"onServerClick"},initialize:function(e){e||(e={});var t=l.a("appModel");this.showSharedServers=e.showSharedServers,this.model=t.get("primaryServer"),this.collection=t.get("servers"),this.listenTo(t,"change:primaryServer",this.render),this.listenTo(this.collection,{
"change:friendlyName":this.render,"change:authorized":this.onServerAuthorizedChange})},serializeData:function(){var e=this.collection.reduce(function(e,t){var n=t.get("shared"),i=t.get("sections");if(n&&!(this.showSharedServers&&i&&i.findWhere({allowSync:!0})))return e;var a=t.toJSON();return a.authorized&&!(a.cloud||a.synced||a.isOutOfDate)&&e.push(a),e},[],this);return{showDropdown:e.length>1,servers:e,currentServer:this.model?this.model.toJSON():null}},onServerAuthorizedChange:function(e,t){
t&&this.render()},onServerClick:function(e){e.preventDefault();var t=l.a("appModel"),n=s()(e.currentTarget).data("id"),i=this.collection.get(n);i&&t.set("primaryServer",i)}});t.a=u},function(e,t,n){"use strict";var i=n(2945),a=n.n(i),r=n(2),s=n.n(r),o=n(510),l=n(169),u=n(58),c=l.a.extend({className:"poster-item media-tile-list-item",template:a.a,ui:{container:".media-poster-container",poster:".media-poster",actions:".media-poster-actions",dropdown:".media-actions-dropdown",
subtitle1Fill:".media-subtitle-1-fill",subtitle2Fill:".media-subtitle-2-fill"},initialize:function(e){l.a.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=n.i(o.a)(this.model.section),t="photo"===e?e:this.type,i=150;"episode"===t?t="show":"clip"!==t&&"userPlaylistItem"!==t||(i=250),this.image=new u.a({model:this.model,type:t,getUrl:this.getPosterUrl,width:i})},updateDim:function(){
var e=this.model.get("mediaState"),t=this.model.get("metadataState"),n=t&&"created"!==t||e,i=!!this.model.get("deletedAt");n||i?this.$el.addClass("dim"):this.$el.removeClass("dim")},bindings:s.a.extend({},l.a.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=l.a.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments)
;return"userPlaylistItem"!==this.model.get("type")&&this.ui.subtitle1Fill.toggleClass("hidden",!!t),t}},".media-subtitle-2":{modelAttribute:"index",modelListeners:["index","message"],autohide:!0,formatter:function(e){var t=l.a.prototype.bindings[".media-subtitle-2"].formatter.apply(this,arguments);return"episode"===this.model.get("type")&&this.ui.subtitle2Fill.toggleClass("hidden",!!t),t}},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e.length},autohide:function(e){
return!/^(clip|userPlaylistItem)$/.test(this.model.get("type"))&&e>1}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&(!/^(artist|album)$/.test(this.model.get("type"))&&!!e)}},".analyzing-icon":{modelAttribute:"mediaState",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),e}},".matching-icon":{modelAttribute:"metadataState",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),
"matching"===e}},".metadata-icon":{modelAttribute:"metadataState",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),"processing"===e||"loading"===e}},".trash-icon":{modelAttribute:"deletedAt",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),e}}})});t.a=c},function(e,t,n){"use strict"
;var i=n(1006),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(37),c=n.n(u),d=n(13),h=n(4),p=n(12),f=n(19),g=n(141),m=n(23),v=n(220),y=n(1573),b=n(857),S=n(858),I=n(1770),w=n(1767),M=n(1768),C=n(1766),D=n(57),P=n(42),T=n(323),x={movie:["general","tags","sharing","poster","art","info","advanced"],show:["general","tags","sharing","poster","banner","art","advanced"],season:["general","poster","art","info","advanced"],episode:["general","tags","poster","art","info","advanced"],
artist:["general","tags","poster","art","advanced"],album:["general","tags","sharing","poster","art","info","advanced"],track:["general","tags","info","advanced"],photoalbum:["general","poster","art","advanced"],photo:["general","info","advanced"]},E=["poster","art","banner","info","advanced"],A=D.a.extend({mixins:[T.a],name:"editMetadataModal",className:"edit-metadata-modal modal modal-lg fade",template:a.a,panes:{general:{constructor:b.a},tags:{constructor:S.a},poster:{constructor:w.a},art:{
constructor:w.a},banner:{constructor:w.a},sharing:{constructor:I.a},info:{constructor:M.a},advanced:{constructor:C.a}},events:s.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},D.a.prototype.events),ui:{saveBtn:".save-btn",message:".form-message",navPane:".modal-nav-pane",loadingIndicator:".modal-body-pane .loading-inline"},regions:{paneRegion:".pane-region"},onlyAfterRender:["saveChanges","showPane","showNav"],
initialize:function(e){D.a.prototype.initialize.apply(this,arguments);var t=e.mediaActions,i=e.items||(t?t.getActionTargets():[this.model]),a=i[0],r=a.fetch({usePopulatedParams:!0,data:{includePreferences:"1"}});this.model=new y.a({},{server:a.server,metadataItems:i}),r=r.then(s.a.bind(function(){return this.model.setContext("section",n.i(g.a)(a)),this.model.populate()},this)),r.done(s.a.bind(function(){this.model.set("originalSaveParams",this.model.getSaveParams()),this.render(),this.showNav(),
this.showPane(e.selectedPane||"general"),this.listenTo(p.a,"shortcut:save",this.saveChanges)},this)),r.fail(s.a.bind(function(){this.ui.message.text(n.i(h.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=x[this.model.get("type")]||x.movie;this.model.get("isSingleMetadataItem")||(e=s.a.difference(e,E)),this.model.getSingleMetadataItem().has("preferences")||(e=s.a.difference(e,["advanced"]))
;var t=s.a.reduce(e,function(e,t){return e[t]=!0,e},{}),i=n.i(h.default)("Edit {1}",this.model.get("aggregateTitle"),{escape:!0});return{item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:i}},paneConstructorArg:function(){return{type:this.selectedPane}},invalidChangedAttrs:function(e){var t=[];if("track"===this.model.get("type")){
var n=s.a.has(e,"artist.id.value")||s.a.has(e,"artist.title.value")||s.a.has(e,"album.id.value")||s.a.has(e,"album.title.value"),i=e["album.id.value"]||e["album.title.value"],a=e["artist.id.value"]||e["artist.title.value"];!n||a&&i||(a||t.push("grandparentTitle"),i||t.push("parentTitle"))}if(s.a.has(e,"originallyAvailableAt.value")){var r=e["originallyAvailableAt.value"];/^\d{4}$/.test(r)&&(e["originallyAvailableAt.value"]+="-01-01",r=e["originallyAvailableAt.value"]),
""===r||c()(r,"YYYY-MM-DD",!0).isValid()?this.model.set("originallyAvailableAt",r):t.push("originallyAvailableAt")}return t},markInvalid:function(e){this.paneRegion.currentView.markInvalid(e)},showNav:function(){this.ui.navPane.removeClass("hidden")},saveChanges:function(){var e=this.ui.saveBtn,t=this.ui.message;if(!e.isDisabled()){t.text(""),this.paneRegion.currentView.flushChanges();var i=[],a=this.model.getSaveParams(),r=this.invalidChangedAttrs(a);if(r.length)return void this.markInvalid(r)
;e.addClass("active");var o=this.showAdvancedConfirmModal({saving:!0});o.done(s.a.bind(function(){s.a.each(["poster","banner","art"],function(e){var t=this.model.get(e);t&&i.push(m.a.execute("changeArtwork",{item:this.model.getSingleMetadataItem(),artworkType:e,artworkRatingKey:t}))},this),i.push(this.savePreferences()),i.push(this.model.save());var a=l.a.when.apply(l.a,i);a.done(s.a.bind(function(){var e=d.a("appStore").dispatch,t=this.model.server.entityID();t&&e(v.a({serverEntityID:t})),
this.hide()},this)),a.fail(function(){t.text(n.i(h.default)("Your changes could not be saved."))}),a.always(function(){e.removeClass("active")})},this)),o.fail(s.a.bind(function(){e.removeClass("active"),this.showPane("advanced")},this))}},savePreferences:function(){var e=this.model.get("preferences");if(!e.length)return l.a.Deferred().resolve().promise()
;var t=this.model.getSingleMetadataItem(),n=f.join(["/library/metadata",t.get("ratingKey"),"prefs"],e.getSaveParams()),i=this.model.server.getXHROptions(n,{type:"PUT"}),a=l.a.ajax(i);return a.done(function(){var n=t.get("preferences");e.forEach(function(e){n.get(e.id).set("value",e.get("value"))})}),a},showAdvancedConfirmModal:function(){if(!this.model.get("preferences").some(function(e){return/^autoDeletion/.test(e.id)}))return l.a.Deferred().resolve().promise();var e=new P.a({
title:n.i(h.default)("Confirm Deletion Settings"),message:n.i(h.default)("Deletion settings will take effect immediately! Files may be deleted and this can't be undone. Are you sure?"),confirmLabel:n.i(h.default)("Yes"),cancelLabel:n.i(h.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:n.i(h.default)("Multiple files may be deleted."),doubleConfirmLabel:n.i(h.default)("Yes, I'm sure"),hasDanger:!0});return p.a.trigger("show:modal",e),e.promise},onPaneShow:function(e,t){
this.listenTo(t,"focusSubmit",function(){this.ui.saveBtn.focus()})},onPaneHide:function(e,t){t.flushChanges(),this.stopListening(t)},onFormSubmit:function(e){e.preventDefault(),this.saveChanges()}});t.a=A},function(e,t,n){"use strict";var i=n(2983),a=n.n(i),r=n(2),s=n.n(r),o=n(57),l=o.a.extend({name:"libraryFailureModal",className:"confirm-modal modal modal-sm fade",template:a.a,events:s.a.extend({"click .confirm-btn":"hide"},o.a.prototype.events),serializeData:function(){return{
serverID:this.model.id,isSignedIn:"ok"===this.model.get("myPlexSigninState"),hasPlexPass:this.model.get("myPlexSubscription")}}});t.a=l},function(e,t,n){"use strict";function i(e){var t=l.a.reject(e,function(e){return 0===e.id}),n=l.a.sortBy(t,"streamType");return l.a.map(n,function(e){return x(e,"streamType")})}function a(e){return l.a.map(e.get("Media"),function(e){return l.a.extend(x(e,"Part"),{Part:l.a.map(e.Part,function(e){return l.a.extend(x(e,"Stream"),{file:e.file,exists:e.exists!==!1,
accessible:e.accessible!==!1,Stream:i(e.Stream)})})})})}var r=n(2984),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(13),h=n(161),p=n(768),f=n(252),g=n(378),m=n(1323),v=n(253),y=n(787),b=n(1388),S=n(19),I=n(57),w=n(23),M=n(218),C=["id","key","index","videoCodec","audioCodec","audioChannels","default","selected","languageCode","codecID","accessible","exists","provider","lines","minLines","follow","requiredBandwidths","deepAnalysisVersion","deepAnalysisDate"],D={size:p.a,duration:h.a,
codec:v.default,format:v.default,container:v.default,videoResolution:f.default,channels:g.default,bitrateMode:v.default,accessible:y.default,exists:y.default,optimizedForStreaming:y.default,timed:y.default,file:S.getLastSegment},P={optimizedForStreaming:"Web Optimized",has64bitOffsets:"Has 64bit Offsets",cabac:"CABAC",postURL:"URL"},T={frameRate:" fps",dialogNorm:" dB",bitrate:" kbps",samplingRate:" Hz"},x=function(e,t){var i={properties:[]};for(var a in e)if(a!==t&&l.a.indexOf(C,a)===-1){
var r=P[a],s=e[a];"level"===a&&(s=n.i(m.a)(s,e.codec)),D[a]&&(s=D[a](s)),s&&(T[a]&&(s+=T[a]),r||(r=n.i(b.a)(a)),i.properties.push({name:r,value:s}))}return t&&e&&(i[t]=e[t]),i},E=I.a.extend({name:"mediaInfoModal",className:"media-info-modal modal modal-lg fade",template:s.a,ui:{scroller:".modal-body-scroll",files:".files > ul",stickyProps:".media > .props, .part > .props"},events:l.a.extend({"click .delete-btn":"onDeleteClick"},I.a.prototype.events),modelEvents:{"change:Media":"onMediaChange"},
initialize:function(e){I.a.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("onMediaChange","onScroll"),this.loading=!1,this.media=a(this.model),this.mediaActions=new M.a({},{item:this.model}),this.loading=!0,this.model.fetch({usePopulatedParams:!0,data:{checkFiles:1,asyncCheckFiles:0}}).always(this.whenRendered(function(){this.model.changed.hasOwnProperty("Media")||this.updateMedia()}))},serializeData:function(){
var e=this.model.get("key"),t=d.a("appModel"),n=t.get("user"),i=this.model.server;return this.model.get("isLibraryItem")&&(e=S.join(e,{checkFiles:1,includeExtras:1})),{key:e,url:this.model.server.resolveUrl(e,{appendToken:!0}),media:this.media,hasFiles:this.hasFiles(),hasStreams:this.hasStreams()||this.loading,showDeleteFile:i.supports("specificMediaDeletion"),showFilepath:!i.get("shared")||n.isNinja(),loading:this.loading}},updateMedia:function(){this.loading=!1,this.rerender=!0,
this.ui.scroller.off("scroll",this.onScroll),this.media=a(this.model),this.render()},hasFiles:function(){return!!l.a.chain(this.media).pluck("Part").flatten().pluck("file").compact().size().value()},hasStreams:function(){return!!l.a.chain(this.media).pluck("Part").flatten().pluck("Stream").flatten().size().value()},bindingsModel:"mediaActions",bindings:{".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0}},onRender:function(){I.a.prototype.onRender.apply(this,arguments),
this.ui.scroller.on("scroll",this.onScroll),this.$el.tooltip({selector:".files .label",placement:"bottom"})},onClose:function(){this.ui.scroller.off("scroll",this.onScroll)},onMediaChange:function(){if(!this.isHidden)return this.model.get("Media").length?void this.updateMedia():void this.hide()},onDeleteClick:function(e){e.preventDefault(),w.a.execute("deleteMediaItem",{item:this.model,index:c()(e.currentTarget).data("media-item")})},onScroll:function(){
var e=this.ui.scroller.scrollTop(),t=this.ui.scroller.offset().top;if(this.ui.files.length&&(t+=parseInt(this.ui.files.css("margin-bottom"),10)),t<0)return void setTimeout(this.onScroll,500);this.ui.stickyProps.each(function(){var n=c()(this),i=n.parent().height()-n.height(),a=e-this.parentNode.offsetTop,r=Math.min(Math.max(a,0),i);r&&r===a?(n.addClass("sticky"),n.css("top",t)):(n.removeClass("sticky"),n.css("top",r))})}});t.a=E},function(e,t,n){"use strict"
;var i=n(2987),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),u=n(13),c=n(23),d=n(57),h=n(192),p=n(1869),f=h.a.extend({name:"recommendModal",className:"recommend-modal select-modal modal modal-sm fade",template:a.a,playlistIDs:null,ui:{sendBtn:".send-btn",messageContainer:".message-container",message:".message"},regions:{list:".friends-container"},events:l.a.extend({"click .friend":"onFriendClick","click .friends-btn":"onFriendsClick","click .send-btn":"onSendClick"},d.a.prototype.events),
initialize:function(){h.a.prototype.initialize.apply(this,arguments);var e=u.a("appModel"),t=e.get("user");this.collection=t.get("desktop").get("friends").filterByUnrestricted(),this.playlistIDs=[]},serializeData:function(){return{hasFriends:!!this.collection.length}},onRender:function(){h.a.prototype.onRender.apply(this,arguments),this.list.show(new p.a({collection:this.collection}))},onClose:function(){this.collection.destroy()},onFriendClick:function(e){e.preventDefault()
;var t=s()(e.currentTarget),n=t.data("id");t.hasClass("selected")?this.playlistIDs.splice(l.a.indexOf(this.playlistIDs,n),1):this.playlistIDs.push(n),t.toggleClass("selected"),this.playlistIDs.length?(this.ui.sendBtn.removeClass("disabled"),this.ui.messageContainer.removeClass("invisible")):(this.ui.sendBtn.addClass("disabled"),this.ui.messageContainer.addClass("invisible"))},onFriendsClick:function(e){this.hide()},onSendClick:function(e){e.preventDefault();var t=this.ui.sendBtn
;if(!t.isDisabled()){t.addClass("active");var n={item:this.model,playlistIDs:this.playlistIDs,message:this.ui.message.val()},i=c.a.execute("recommend",n);i.done(l.a.bind(this.onSendSuccess,this)),i.fail(l.a.bind(this.onSendError,this))}},onSendSuccess:function(){this.hide()},onSendError:function(){this.ui.sendBtn.removeClass("active")}});t.a=f},function(e,t,n){"use strict";var i=n(2994),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),u=n(13),c=n(23),d=n(57),h=n(192),p=h.a.extend({name:"shareModal",
className:"share-modal select-modal modal modal-sm fade",template:a.a,linkedNetworks:null,networkIDs:null,maxLength:null,ui:{shareBtn:".share-btn",messageContainer:".message-container",charactersRemaining:".characters-remaining",message:".message"},events:l.a.extend({"click .network":"onNetworkClick","keyup .message":"onMessageKeyUp","click .share-btn":"onShareClick"},d.a.prototype.events),initialize:function(){h.a.prototype.initialize.apply(this,arguments);var e=u.a("appModel")
;this.user=e.get("user"),this.socialNetworks=this.user.get("desktop").get("socialNetworks"),this.linkedNetworks=this.socialNetworks.where({linked:!0}),this.autoSelect=1===this.linkedNetworks.length,this.networkIDs=[]},serializeData:function(){for(var e=[],t=0,n=this.linkedNetworks.length;t<n;t++)e.push(this.linkedNetworks[t].toJSON());return{networks:e,accountUrl:this.user.server.get("accountUrl"),autoSelect:this.autoSelect}},calculateMaxLength:function(){var e=null,t=this.socialNetworks
;l.a.each(this.networkIDs,function(n){var i=t.get(n),a=i.get("maxLength")||null;(null===e||e>a)&&(e=a)}),this.maxLength=e,this.calculateCharactersRemaining()},calculateCharactersRemaining:function(){var e=this.ui.message.val(),t=this.maxLength-e.length;if(null===this.maxLength)return void this.ui.charactersRemaining.addClass("hidden");t<0?(this.ui.charactersRemaining.addClass("error").removeClass("hidden"),
this.ui.shareBtn.addClass("disabled")):(this.ui.charactersRemaining.removeClass("error hidden"),this.ui.shareBtn.removeClass("disabled")),this.ui.charactersRemaining.text(this.maxLength-e.length)},onRender:function(){h.a.prototype.onRender.apply(this,arguments),this.autoSelect&&(this.networkIDs.push(this.linkedNetworks[0].id),this.calculateMaxLength())},onNetworkClick:function(e){e.preventDefault();var t=s()(e.currentTarget),n=t.data("id")
;t.hasClass("selected")?this.networkIDs.splice(l.a.indexOf(this.networkIDs,n),1):this.networkIDs.push(n),t.toggleClass("selected"),this.networkIDs.length?(this.ui.shareBtn.removeClass("disabled"),this.ui.messageContainer.removeClass("invisible")):(this.ui.shareBtn.addClass("disabled"),this.ui.messageContainer.addClass("invisible")),this.calculateMaxLength()},onMessageKeyUp:function(e){this.calculateCharactersRemaining()},onShareClick:function(e){e.preventDefault();var t=this.ui.shareBtn
;if(!t.isDisabled()){t.addClass("active");var n={item:this.model,networkIDs:this.networkIDs,message:this.ui.message.val()},i=c.a.execute("share",n);i.done(l.a.bind(this.onShareSuccess,this)),i.fail(l.a.bind(this.onShareError,this))}},onShareSuccess:function(){this.hide()},onShareError:function(){this.ui.shareBtn.removeClass("active")}});t.a=p},function(e,t,n){"use strict";var i=n(3023),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(13),c=n(56),d=n(57),h=n(1910),p=n(1908),f=n(1907),g=d.a.extend({
name:"userSelectModal",className:"user-select-modal modal modal-transparent fade",template:a.a,transparent:!0,panes:{users:h.a,pin:p.a},regions:{content:".modal-content",alertBar:".modal-alert"},initialize:function(e){d.a.prototype.initialize.apply(this,arguments);var t=u.a("appModel");this.options=e,this.isForced=e.isForced,this.user=t.get("user"),this.promise=l.a.Deferred()},showPane:function(e,t){this.currentPane&&this.stopListening(this.currentPane)
;var n=this.panes[e],i=new n(s.a.extend({},this.options,t));return this.listenTo(i,{"change:pane":this.onChangePane,resolve:this.onResolve,reject:this.onReject}),this.currentPane=i,this.content.show(i),i},showAlertBar:function(){var e=c.a.get("alerts");c.a.set("alerts",null);var t=new f.a({alert:s.a.first(e)});this.alertBar.show(t)},onRender:function(){d.a.prototype.onRender.apply(this,arguments),this.model?this.showPane("pin",{focusDelay:this.focusDelay}):this.showPane("users"),
this.showAlertBar()},onHide:function(e){d.a.prototype.onHide.apply(this,arguments),"pending"===this.promise.state()&&this.promise.reject()},onChangePane:function(e,t){this.showPane(e,t)},onResolve:function(e){if(c.a.has("continueUrl")&&!this.options.isEditing)return void(window.location=c.a.get("continueUrl"));this.promise.resolve(e),this.hide()},onReject:function(){this.promise.reject(),this.hide()}});t.a=g},function(e,t,n){"use strict";function i(e){
var t=e.className,i=e.circleClassName,a=e.iconClassName,s=e.title,l=u()(e,["className","circleClassName","iconClassName","title"]);return d.a.createElement(f.a,r()({className:t,"aria-label":n.i(h.default)("Play {title}",{title:s})},l),o()("div",{className:i},void 0,o()(p.a,{name:"plex-icon-play-560",className:a})))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(29),f=n(25),g=n(2555),m=n.n(g);i.defaultProps={className:m.a.playButton,circleClassName:m.a.playCircle,
iconClassName:m.a.playIcon},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(16),s=n.n(r),o=n(6),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(27),y=n(1420),b=(n(538),n(87)),S=n(188),I=n(74),w=n(22),M=n(2579),C=n.n(M),D=function(e){function t(n,i){c()(this,t);var a=h()(this,e.call(this,n,i));return a.onScrollPositionChange=function(e){var t=e.scrollTop,n=e.scrollLeft;a.setState({scrollTop:t,scrollLeft:n})},a.onListUpdate=function(e){
var t=e.visibleStartIndex,n=a.props,i=n.scrollIndex,r=n.onListScrollIndexChange,s=n.onListUpdate;a._currentScrollIndex=t,a.state.isRestoringScrollPosition&&a.setState({isRestoringScrollPosition:!1}),r&&i!==t&&r(t),s&&s(e)},a.onMeasure=function(e){var t=e.width,n=e.height,i=a.props.onMeasure;a.setState({isMeasured:!0,width:t,height:n}),i&&i(e)},a.state={isRestoringScrollPosition:!1,isMeasured:!1,width:null,height:null,scrollTop:0,scrollLeft:0},a._currentScrollIndex=0,
n.scrollPositionStorageKey&&(a._scrollPositionKey=y.a.getPageKey()+"!scrollPosition!"+n.scrollPositionStorageKey),a}return f()(t,e),t.prototype.componentWillMount=function(){this.props.scrollIndex||this._restoreScrollPosition()},t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){var n=this.props.scrollIndex,i=this.state.isMeasured,a=i&&!t.isMeasured&&n>0,r=n!==e.scrollIndex;(a||r)&&this._scrollToIndex(n)},
t.prototype.componentWillUnmount=function(){this._scrollPositionKey&&y.a.set(this._scrollPositionKey,{scrollTop:this.state.scrollTop,scrollLeft:this.state.scrollLeft})},t.prototype._restoreScrollPosition=function(){if(this._scrollPositionKey){var e=y.a.get(this._scrollPositionKey);e&&this.setState(l()({isRestoringScrollPosition:!0},e))}},t.prototype._scrollToIndex=function(e){if(null!=e&&e!==this._currentScrollIndex){
var t=this.props.layout,n=t.options,i=t.getPositionForIndex,a=i(Math.max(e,0)),r=n.outerPaddingTop||0,s=n.outerPaddingLeft||0,o=this.props.scrollDirection===w.a.VERTICAL?0:a.cellX-s,l=this.props.scrollDirection===w.a.HORIZONTAL?0:a.cellY-r;this.setState({scrollLeft:o,scrollTop:l})}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,i=e.scrollerClassName,r=e.ignoreWidth,o=e.ignoreHeight,u=e.scrollDirection,c=(e.scrollIndex,e.scrollPositionStorageKey,e.onListUpdate,
e.onMeasure,s()(e,["className","children","scrollerClassName","ignoreWidth","ignoreHeight","scrollDirection","scrollIndex","scrollPositionStorageKey","onListUpdate","onMeasure"])),d=this.state,h=d.isMeasured,p=d.isRestoringScrollPosition,f=d.width,g=d.height,v=d.scrollTop,y=d.scrollLeft;return a()(b.a,{className:t,ignoreWidth:r,ignoreHeight:o,ignorePosition:!0,onMeasure:this.onMeasure},void 0,h&&a()(I.a,{className:i,smoothScroll:!p,scrollDirection:u,scrollTop:v,scrollLeft:y,
enableChildrenProps:!0,onScrollPositionChange:this.onScrollPositionChange},void 0,m.a.createElement(S.a,l()({viewportWidth:f,viewportHeight:g,skipRenderCells:p,onListUpdate:this.onListUpdate},c)),n))},t}(g.Component);D.defaultProps={scrollDirection:w.a.VERTICAL,scrollerClassName:C.a.scroller},t.a=D},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return r()(o.a,{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(112)),l=n(2608),u=n.n(l);i.defaultProps={
className:u.a.footer},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.onMenuClose,a=o()(e,["target","isOpen","onMenuClose"]);return r()(c.a,{target:t,isOpen:n,onMenuClose:i},void 0,u.a.createElement(d.a,a))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(80),d=n(2062);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{
parentTitle:i.parentTitle,parentRoute:n.i(u.a)(e,t,i.parentKey)}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(102),c=n(2093);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.title,a=e.route;return i?a?r()(o.a,{className:t,tabIndex:n,title:i,to:a},void 0,i):r()("span",{className:t},void 0,i):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(25));t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(27),y=n(29),b=n(148),S=function(e){function t(){return c()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.icon,i=e.label,r=e.isMenuOpen,o=l()(e,["children","icon","label","isMenuOpen"]);return m.a.createElement(b.a,a()({
"aria-haspopup":!0,tooltip:r?void 0:i,hideOnPress:!1},o),s()(y.a,{name:n}),t)},t}(g.Component);t.a=S},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),n.i(u.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],Genre:n.Genre}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(306),c=n(2253);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2726)),l=n.n(o);i.defaultProps={className:l.a.rightTitle},t.a=i},function(e,t,n){"use strict";function i(){return n.i(o.createSelector)(l.a,u.a,c.a,d.a,function(e,t,i,a){var r=t.activeSelectionItems,o=t.activeSelectionType,l=r.map(function(t){return s()({},t,{model:e[t.model]})}),u=n.i(p.a)(i,a,l,o),c=u.showMarkWatched||u.showMarkUnwatched;return s()({activeSelectionItems:l,
activeSelectionType:o,showToggleWatched:c},u)})}function a(e,t){var n={metricsPage:t.metricsPage};return{onPlaySelectedPress:function(){e(h.a(n))},onShufflePress:function(){e(h.b(n))},onAddToPlaylistPress:function(){e(h.c(n))},onMarkWatchedConfirm:function(){e(h.d(n))},onMarkUnwatchedConfirm:function(){e(h.e(n))},onEditPress:function(){e(h.f(n))},onRefreshPress:function(){e(h.g(n))},onAnalyzePress:function(){e(h.h(n))},onMergePress:function(){e(h.i(n))},onSyncPress:function(){e(h.j(n))},
onOptimizePress:function(){e(h.k(n))},onDeleteConfirm:function(){e(h.l(n))},onDeselectAllPress:function(){e(h.m(n))}}}var r=n(6),s=n.n(r),o=n(8),l=(n.n(o),n(307)),u=n(109),c=n(47),d=n(45),h=n(545),p=n(2410),f=n(129),g=n(2364);t.a=n.i(f.a)(i,a)(g.a)},function(e,t,n){"use strict";function i(e){try{e.focus()}catch(e){}}function a(){var e=document.activeElement;e&&e.blur()}function r(e){g=document.activeElement,m=e,a()}function s(e){
n.i(p.a)(m,"Call `startScopedFocus(element)` before `scopeTabEvent`");var t=n.i(f.a)(m);if(t.length){e.preventDefault();var a=document.activeElement,r=a?t.indexOf(a):-1,s=t.length-1,o=void 0;r===-1?o=e.shiftKey?s:0:(o=e.shiftKey?r-1:r+1,o<0?o=s:o>s&&(o=0)),i(t[o])}}function o(){n.i(p.a)(m,"Call `startScopedFocus(element)` before `scopeAutoFocus`");var e=n.i(f.a)(m),t=d.a.find(e,function(e){return n.i(h.a)(e.getAttribute("data-autofocus"))});t&&i(t)}function l(){m=null}function u(){g&&(i(g),
g=null)}var c=n(2),d=n.n(c),h=n(777),p=n(33),f=n(2402);t.e=a,t.c=r,t.a=s,t.d=o,t.f=l,t.b=u;var g=void 0,m=void 0},function(e,t,n){var i=n(281);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},,,,function(e,t,n){var i=n(1019),a="object"==typeof self&&self&&self.Object===Object&&self,r=i||a||Function("return this")();e.exports=r},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e){
return null!=e&&"object"==typeof e}e.exports=n},,,,function(e,t,n){var i,a;/**!
 * Sortable
 * @author	RubaXa   <trash@rubaxa.org>
 * @license MIT
 */
!function(r){"use strict";i=r,void 0!==(a="function"==typeof i?i.call(t,n,t,e):i)&&(e.exports=a)}(function(){"use strict";function e(e,t){this.el=e,this.options=t=m({},t),e[_]=this;var i={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,
dataIdAttr:"data-id",delay:0};for(var a in i)!(a in t)&&(t[a]=i[a]);var s=t.group;s&&"object"==typeof s||(s=t.group={name:s}),["pull","put"].forEach(function(e){e in s||(s[e]=!0)}),t.groups=" "+s.name+(s.put.join?" "+s.put.join(" "):"")+" ";for(var o in this)"_"===o.charAt(0)&&(this[o]=n(this,this[o]));r(e,"mousedown",this._onTapStart),r(e,"touchstart",this._onTapStart),r(e,"dragover",this),r(e,"dragenter",this),V.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function t(e){
b&&b.state!==e&&(l(b,"display",e?"none":""),!e&&b.state&&S.insertBefore(b,v),b.state=e)}function n(e,t){var n=B.call(arguments,2);return t.bind?t.bind.apply(t,[e].concat(n)):function(){return t.apply(e,n.concat(B.call(arguments)))}}function i(e,t,n){if(e){n=n||R,t=t.split(".");var i=t.shift().toUpperCase(),a=new RegExp("\\s("+t.join("|")+")\\s","g");do{if(">*"===i&&e.parentNode===n||(""===i||e.nodeName.toUpperCase()==i)&&(!t.length||((" "+e.className+" ").match(a)||[]).length==t.length))return e
}while(e!==n&&(e=e.parentNode))}return null}function a(e){e.dataTransfer.dropEffect="move",e.preventDefault()}function r(e,t,n){e.addEventListener(t,n,!1)}function s(e,t,n){e.removeEventListener(t,n,!1)}function o(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(L," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(L," ")}}function l(e,t,n){var i=e&&e.style;if(i){
if(void 0===n)return R.defaultView&&R.defaultView.getComputedStyle?n=R.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in i||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function u(e,t,n){if(e){var i=e.getElementsByTagName(t),a=0,r=i.length;if(n)for(;a<r;a++)n(i[a],a);return i}return[]}function c(e){e.draggable=!1}function d(){z=!1}function h(e,t){var n=e.lastElementChild,i=n.getBoundingClientRect();return t.clientY-(i.top+i.height)>5&&n}
function p(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function f(e){for(var t=0;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&t++;return t}function g(e,t){var n,i;return function(){void 0===n&&(n=arguments,i=this,setTimeout(function(){1===n.length?e.call(i,n[0]):e.apply(i,n),n=void 0},t))}}function m(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}
var v,y,b,S,I,w,M,C,D,P,T,x,E,A,k={},L=/\s+/g,_="Sortable"+(new Date).getTime(),N=window,R=N.document,O=N.parseInt,j=!!("draggable"in R.createElement("div")),z=!1,U=function(e,t,n,i,a,r,s){var o=R.createEvent("Event"),l=(e||t[_]).options,u="on"+n.charAt(0).toUpperCase()+n.substr(1);o.initEvent(n,!0,!0),o.item=i||t,o.from=a||t,o.clone=b,o.oldIndex=r,o.newIndex=s,l[u]&&l[u].call(e,o),t.dispatchEvent(o)},F=Math.abs,B=[].slice,V=[],H=g(function(e,t,n){if(n&&t.scroll){
var i,a,r,s,o=t.scrollSensitivity,l=t.scrollSpeed,u=e.clientX,c=e.clientY,d=window.innerWidth,h=window.innerHeight;if(M!==n&&(w=t.scroll,M=n,w===!0)){w=n;do{if(w.offsetWidth<w.scrollWidth||w.offsetHeight<w.scrollHeight)break}while(w=w.parentNode)}w&&(i=w,a=w.getBoundingClientRect(),r=(F(a.right-u)<=o)-(F(a.left-u)<=o),s=(F(a.bottom-c)<=o)-(F(a.top-c)<=o)),r||s||(r=(d-u<=o)-(u<=o),s=(h-c<=o)-(c<=o),(r||s)&&(i=N)),k.vx===r&&k.vy===s&&k.el===i||(k.el=i,k.vx=r,k.vy=s,clearInterval(k.pid),
i&&(k.pid=setInterval(function(){i===N?N.scrollTo(N.pageXOffset+r*l,N.pageYOffset+s*l):(s&&(i.scrollTop+=s*l),r&&(i.scrollLeft+=r*l))},24)))}},30);return e.prototype={constructor:e,_onTapStart:function(e){var t=this,n=this.el,a=this.options,r=e.type,s=e.touches&&e.touches[0],o=(s||e).target,l=o,u=a.filter;if(!("mousedown"===r&&0!==e.button||a.disabled)&&(o=i(o,a.draggable,n))){if(P=f(o),"function"==typeof u){if(u.call(this,e,o,this))return U(t,l,"filter",o,n,P),void e.preventDefault()
}else if(u&&(u=u.split(",").some(function(e){if(e=i(l,e.trim(),n))return U(t,e,"filter",o,n,P),!0})))return void e.preventDefault();a.handle&&!i(l,a.handle,n)||this._prepareDragStart(e,s,o)}},_prepareDragStart:function(e,t,n){var i,a=this,s=a.el,o=a.options,l=s.ownerDocument;n&&!v&&n.parentNode===s&&(E=e,S=s,v=n,I=v.nextSibling,x=o.group,i=function(){a._disableDelayedDrag(),v.draggable=!0,o.ignore.split(",").forEach(function(e){u(v,e.trim(),c)}),a._triggerDragStart(t)},r(l,"mouseup",a._onDrop),
r(l,"touchend",a._onDrop),r(l,"touchcancel",a._onDrop),o.delay?(r(l,"mousemove",a._disableDelayedDrag),r(l,"touchmove",a._disableDelayedDrag),a._dragStartTimer=setTimeout(i,o.delay)):i())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),s(e,"mousemove",this._disableDelayedDrag),s(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){e?(E={target:v,clientX:e.clientX,clientY:e.clientY},
this._onDragStart(E,"touch")):j?(r(v,"dragend",this),r(S,"dragstart",this._onDragStart)):this._onDragStart(E,!0);try{R.selection?R.selection.empty():window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){S&&v&&(o(v,this.options.ghostClass,!0),e.active=this,U(this,S,"start",v,S,P))},_emulateDragOver:function(){if(A){l(y,"display","none");var e=R.elementFromPoint(A.clientX,A.clientY),t=e,n=" "+this.options.group.name,i=V.length;if(t)do{
if(t[_]&&t[_].options.groups.indexOf(n)>-1){for(;i--;)V[i]({clientX:A.clientX,clientY:A.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);l(y,"display","")}},_onTouchMove:function(e){if(E){var t=e.touches?e.touches[0]:e,n=t.clientX-E.clientX,i=t.clientY-E.clientY,a=e.touches?"translate3d("+n+"px,"+i+"px,0)":"translate("+n+"px,"+i+"px)";A=t,l(y,"webkitTransform",a),l(y,"mozTransform",a),l(y,"msTransform",a),l(y,"transform",a),e.preventDefault()}},_onDragStart:function(e,t){
var n=e.dataTransfer,i=this.options;if(this._offUpEvents(),"clone"==x.pull&&(b=v.cloneNode(!0),l(b,"display","none"),S.insertBefore(b,v)),t){var a,s=v.getBoundingClientRect(),o=l(v);y=v.cloneNode(!0),l(y,"top",s.top-O(o.marginTop,10)),l(y,"left",s.left-O(o.marginLeft,10)),l(y,"width",s.width),l(y,"height",s.height),l(y,"opacity","0.8"),l(y,"position","fixed"),l(y,"zIndex","100000"),S.appendChild(y),a=y.getBoundingClientRect(),l(y,"width",2*s.width-a.width),l(y,"height",2*s.height-a.height),
"touch"===t?(r(R,"touchmove",this._onTouchMove),r(R,"touchend",this._onDrop),r(R,"touchcancel",this._onDrop)):(r(R,"mousemove",this._onTouchMove),r(R,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else n&&(n.effectAllowed="move",i.setData&&i.setData.call(this,n,v)),r(R,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(e){var n,a,r,s=this.el,o=this.options,u=o.group,c=u.put,p=x===u,f=o.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),
!o.dragoverBubble&&e.stopPropagation()),x&&!o.disabled&&(p?f||(r=!S.contains(v)):x.pull&&c&&(x.name===u.name||c.indexOf&&~c.indexOf(x.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){if(H(e,o,this.el),z)return;if(n=i(e.target,o.draggable,s),a=v.getBoundingClientRect(),r)return t(!0),void(b||I?S.insertBefore(v,b||I):f||S.appendChild(v));if(0===s.children.length||s.children[0]===y||s===e.target&&(n=h(s,e))){if(n){if(n.animated)return;m=n.getBoundingClientRect()}t(p),s.appendChild(v),
this._animate(a,v),n&&this._animate(m,n)}else if(n&&!n.animated&&n!==v&&void 0!==n.parentNode[_]){C!==n&&(C=n,D=l(n));var g,m=n.getBoundingClientRect(),w=m.right-m.left,M=m.bottom-m.top,P=/left|right|inline/.test(D.cssFloat+D.display),T=n.offsetWidth>v.offsetWidth,E=n.offsetHeight>v.offsetHeight,A=(P?(e.clientX-m.left)/w:(e.clientY-m.top)/M)>.5,k=n.nextElementSibling;z=!0,setTimeout(d,30),t(p),g=P?n.previousElementSibling===v&&!T||A&&T:k!==v&&!E||A&&E,
g&&!k?s.appendChild(v):n.parentNode.insertBefore(v,g?k:n),this._animate(a,v),this._animate(m,n)}}},_animate:function(e,t){var n=this.options.animation;if(n){var i=t.getBoundingClientRect();l(t,"transition","none"),l(t,"transform","translate3d("+(e.left-i.left)+"px,"+(e.top-i.top)+"px,0)"),t.offsetWidth,l(t,"transition","all "+n+"ms"),l(t,"transform","translate3d(0,0,0)"),clearTimeout(t.animated),t.animated=setTimeout(function(){l(t,"transition",""),l(t,"transform",""),t.animated=!1},n)}},
_offUpEvents:function(){var e=this.el.ownerDocument;s(R,"touchmove",this._onTouchMove),s(e,"mouseup",this._onDrop),s(e,"touchend",this._onDrop),s(e,"touchcancel",this._onDrop)},_onDrop:function(t){var n=this.el,i=this.options;clearInterval(this._loopId),clearInterval(k.pid),clearTimeout(this.dragStartTimer),s(R,"drop",this),s(R,"mousemove",this._onTouchMove),s(n,"dragstart",this._onDragStart),this._offUpEvents(),t&&(t.preventDefault(),!i.dropBubble&&t.stopPropagation(),
y&&y.parentNode.removeChild(y),v&&(s(v,"dragend",this),c(v),o(v,this.options.ghostClass,!1),S!==v.parentNode?(T=f(v),U(null,v.parentNode,"sort",v,S,P,T),U(this,S,"sort",v,S,P,T),U(null,v.parentNode,"add",v,S,P,T),U(this,S,"remove",v,S,P,T)):(b&&b.parentNode.removeChild(b),v.nextSibling!==I&&(T=f(v),U(this,S,"update",v,S,P,T),U(this,S,"sort",v,S,P,T))),e.active&&U(this,S,"end",v,S,P,T)),S=v=y=I=b=w=M=E=A=C=D=x=e.active=null,this.save())},handleEvent:function(e){var t=e.type
;"dragover"===t||"dragenter"===t?v&&(this._onDragOver(e),a(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,a=0,r=n.length,s=this.options;a<r;a++)e=n[a],i(e,s.draggable,this.el)&&t.push(e.getAttribute(s.dataIdAttr)||p(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach(function(e,a){var r=n.children[a];i(r,this.options.draggable,n)&&(t[e]=r)},this),e.forEach(function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))})},
save:function(){var e=this.options.store;e&&e.set(this)},closest:function(e,t){return i(e,t||this.options.draggable,this.el)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];n[e]=t},destroy:function(){var e=this.el;e[_]=null,s(e,"mousedown",this._onTapStart),s(e,"touchstart",this._onTapStart),s(e,"dragover",this),s(e,"dragenter",this),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),
V.splice(V.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},e.utils={on:r,off:s,css:l,find:u,bind:n,is:function(e,t){return!!i(e,t,e)},extend:m,throttle:g,closest:i,toggleClass:o,index:f},e.version="1.2.0",e.create=function(t,n){return new e(t,n)},e})},function(e,t,n){!function(t,i){e.exports=i(n(2),n(243))}(0,function(e,t){function n(n){return{underscore:e,backbone:t}[n]}return function(e){function t(e){var n=t.cache[e];if(!n){var i={};n=t.cache[e]={id:e,exports:i},
t.modules[e].call(i,n,i)}return n.exports}return t.cache=[],t.modules=[function(e,i){function a(e,t){this._superset=e,this._filtered=new o(e,t),this._sorted=new l(this._filtered,t),this._paginated=new u(this._sorted,t),c(this._paginated,this),d.call(this,this._filtered,f),d.call(this,this._sorted,m),d.call(this,this._paginated,y),this.initialize(t)}var r=n("underscore"),s=n("backbone"),o=t(2),l=t(5),u=t(4),c=t(1),d=t(7),h={superset:function(){return this._superset},getFilteredLength:function(){
return this._filtered.length},removeTransforms:function(){return this._filtered.resetFilters(),this._sorted.removeSort(),this._paginated.removePagination(),this},destroy:function(){this.stopListening(),this._filtered.destroy(),this._sorted.destroy(),this._paginated.destroy(),this.length=0,this.trigger("obscura:destroy")}
},p=["filterBy","removeFilter","resetFilters","refilter","hasFilter","getFilters"],f=["filtered:add","filtered:remove","filtered:reset"],g=["setSort","reverseSort","removeSort"],m=["sorted:add","sorted:remove"],v=["setPerPage","setPage","getPerPage","getNumPages","getPage","hasNextPage","hasPrevPage","nextPage","prevPage","movePage","removePagination","firstPage","lastPage"],y=["paginated:change:perPage","paginated:change:page","paginated:change:numPages"],b=["add","create","remove","set","reset","sort","parse","sync","fetch","push","pop","shift","unshift"]
;r.each(p,function(e){h[e]=function(){var t=o.prototype[e].apply(this._filtered,arguments);return t===this._filtered?this:t}}),r.each(v,function(e){h[e]=function(){var t=u.prototype[e].apply(this._paginated,arguments);return t===this._paginated?this:t}}),r.each(g,function(e){h[e]=function(){var t=l.prototype[e].apply(this._sorted,arguments);return t===this._sorted?this:t}}),r.each(b,function(e){h[e]=function(){
throw new Error("Backbone.Obscura: Unsupported method: "+e+"called on read-only proxy")}}),r.extend(a.prototype,h,s.Events),a=s.Collection.extend(a.prototype),a.FilteredCollection=o,a.SortedCollection=l,a.PaginatedCollection=u,e.exports=a},function(e,t){function i(e,t){function n(){t.length=e.length}function i(n){var i=a.toArray(arguments),r="change"===n||"change:"===n.slice(0,7);"reset"===n&&(t.models=e.models),
a.contains(o,n)?(a.contains(["add","remove","destroy"],n)?i[2]=t:a.contains(["reset","sort"],n)&&(i[1]=t),t.trigger.apply(this,i)):r&&t.contains(i[1])&&t.trigger.apply(this,i)}var l={};return a.each(a.functions(r.Collection.prototype),function(t){a.contains(s,t)||(l[t]=function(){return e[t].apply(e,arguments)})}),a.extend(t,r.Events,l),t.listenTo(e,"all",n),t.listenTo(e,"all",i),t.models=e.models,n(),t}
var a=n("underscore"),r=n("backbone"),s=["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],o=["add","remove","reset","sort","destroy","sync","request","error"];e.exports=i},function(e,i){function a(){this._filterResultCache={}}function r(e){
for(var t in this._filterResultCache)this._filterResultCache.hasOwnProperty(t)&&delete this._filterResultCache[t][e]}function s(e,t){this._filters[e]&&r.call(this,e),this._filters[e]=t,this.trigger("filtered:add",e)}function o(e){delete this._filters[e],r.call(this,e),this.trigger("filtered:remove",e)}function l(e){this._filterResultCache[e.cid]||(this._filterResultCache[e.cid]={});var t=this._filterResultCache[e.cid]
;for(var n in this._filters)if(this._filters.hasOwnProperty(n)&&(t.hasOwnProperty(n)||(t[n]=this._filters[n].fn(e)),!t[n]))return!1;return!0}function u(e){e||(e={});var t=[];this._superset&&(t=this._superset.filter(v.bind(l,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length}function c(){u.call(this,{reset:!0})}function d(){var e=!(!this._superset||!this._superset.comparator);u.call(this,{reset:e})}function h(e){
if(this._filterResultCache[e.cid]={},l.call(this,e)){if(!this._collection.get(e.cid)){for(var t=this.superset().indexOf(e),n=null,i=t-1;i>=0;i-=1)if(this.contains(this.superset().at(i))){n=this.indexOf(this.superset().at(i))+1;break}n=n||0,this._collection.add(e,{at:n})}}else this._collection.get(e.cid)&&this._collection.remove(e);this.length=this._collection.length}function p(e){this._filterResultCache[e.cid]={},l.call(this,e)||this._collection.get(e.cid)&&this._collection.remove(e)}
function f(e,t,n){"change:"===e.slice(0,7)&&p.call(this,arguments[1])}function g(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length}function m(e){this._superset=e,this._collection=new y.Collection(e.toArray()),b(this._collection,this),this.resetFilters(),this.listenTo(this._superset,"reset",c),this.listenTo(this._superset,"sort",d),this.listenTo(this._superset,"add change",h),this.listenTo(this._superset,"remove",g),this.listenTo(this._superset,"all",f)}
var v=n("underscore"),y=n("backbone"),b=t(1),S=t(3),I={defaultFilterName:"__default",filterBy:function(e,t){return t||(t=e,e=this.defaultFilterName),s.call(this,e,S(t)),u.call(this),this},removeFilter:function(e){return e||(e=this.defaultFilterName),o.call(this,e),u.call(this),this},resetFilters:function(){return this._filters={},a.call(this),this.trigger("filtered:reset"),u.call(this),this},superset:function(){return this._superset},refilter:function(e){
return"object"==typeof e&&e.cid?h.call(this,e):(a.call(this),u.call(this)),this},getFilters:function(){return v.keys(this._filters)},hasFilter:function(e){return v.contains(this.getFilters(),e)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};v.extend(m.prototype,I,y.Events),e.exports=m},function(e,t){function i(e,t){return function(n){return n.get(e)===t}}function a(e,t){return function(n){
return t(n.get(e))}}function r(e,t){return l.isArray(t)||(t=null),{fn:e,keys:t}}function s(e){var t=l.keys(e),n=l.map(t,function(t){var n=e[t];return l.isFunction(n)?a(t,n):i(t,n)});return r(function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0},t)}function o(e,t){return l.isFunction(e)?r(e,t):l.isObject(e)?s(e):void 0}var l=n("underscore");e.exports=o},function(e,i){function a(){var e=this.getPage()*this.getPerPage();return[e,e+this.getPerPage()]}function r(){var e=a.call(this)
;this._collection.reset(this.superset().slice(e[0],e[1]))}function s(){var e=(this._totalPages,this.superset().length),t=this.getPerPage(),n=e%t==0?e/t:Math.floor(e/t)+1,i=this._totalPages!==n;if(this._totalPages=n,i&&this.trigger("paginated:change:numPages",{numPages:n}),this.getPage()>=n)return this.setPage(n-1),!0}function o(){s.call(this)||r.call(this)}function l(e,t){for(var n=d.max([e.length,t.length]),i=0,a=0;i<n;i+=1,a+=1)if(e[i]!==t[a])if(t[i-1]===e[i])a-=1;else{
if(t[i+1]!==e[i])return e[i];a+=1}}function u(e,t,n){if(!s.call(this)){var i=a.call(this),r=i[0],o=i[1],u=l(this.superset().slice(r,o),this._collection.toArray()),c=l(this._collection.toArray(),this.superset().slice(r,o));c&&this._collection.remove(c),u&&this._collection.add(u,{at:this.superset().indexOf(u)-r})}}function c(e,t){this._superset=e,this._collection=new h.Collection(e.toArray()),this._page=0,this.setPerPage(t&&t.perPage?t.perPage:null),p(this._collection,this),
this.listenTo(this._superset,"add remove",u),this.listenTo(this._superset,"reset sort",o)}var d=n("underscore"),h=n("backbone"),p=t(1),f={removePagination:function(){return this.setPerPage(null),this},setPerPage:function(e){return this._perPage=e,o.call(this),this.setPage(0),this.trigger("paginated:change:perPage",{perPage:e,numPages:this.getNumPages()}),this},setPage:function(e){var t=this.getNumPages()-1;return e=e>0?e:0,e=e<t?e:t,e=e<0?0:e,this._page=e,r.call(this),
this.trigger("paginated:change:page",{page:e}),this},getPerPage:function(){return this._perPage||this.superset().length||1},getNumPages:function(){return this._totalPages},getPage:function(){return this._page},hasNextPage:function(){return this.getPage()<this.getNumPages()-1},hasPrevPage:function(){return this.getPage()>0},nextPage:function(){return this.movePage(1),this},prevPage:function(){return this.movePage(-1),this},firstPage:function(){this.setPage(0)},lastPage:function(){
this.setPage(this.getNumPages()-1)},movePage:function(e){return this.setPage(this.getPage()+e),this},superset:function(){return this._superset},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this._page=0,this._totalPages=0,this.length=0,this.trigger("paginated:destroy")}};d.extend(c.prototype,f,h.Events),e.exports=c},function(e,i){function a(e){return d.isFunction(e)?e:function(t){return t.get(e)}}function r(e){
return this._comparator?this._reverse?f(this._collection.toArray(),e,a(this._comparator)):d.sortedIndex(this._collection.toArray(),e,a(this._comparator)):this._superset.indexOf(e)}function s(e){var t=r.call(this,e);this._collection.add(e,{at:t})}function o(e){this.contains(e)&&this._collection.remove(e)}function l(e){this.contains(e)&&this._collection.indexOf(e)!==r.call(this,e)&&(this._collection.remove(e),s.call(this,e))}function u(){
if(!this._comparator)return void this._collection.reset(this._superset.toArray());var e=this._superset.sortBy(this._comparator);this._collection.reset(this._reverse?e.reverse():e)}function c(e){this._superset=e,this._reverse=!1,this._comparator=null,this._collection=new h.Collection(e.toArray()),p(this._collection,this),this.listenTo(this._superset,"add",s),this.listenTo(this._superset,"remove",o),this.listenTo(this._superset,"change",l),this.listenTo(this._superset,"reset",u)}
var d=n("underscore"),h=n("backbone"),p=t(1),f=t(6),g={setSort:function(e,t){return this._reverse="desc"===t,this._comparator=e,u.call(this),e?this.trigger("sorted:add"):this.trigger("sorted:remove"),this},reverseSort:function(){return this._reverse=!this._reverse,u.call(this),this},removeSort:function(){return this.setSort(),this},superset:function(){return this._superset},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,
this.trigger("sorted:destroy")}};d.extend(c.prototype,g,h.Events),e.exports=c},function(e,t){function i(e){return r.isFunction(e)?e:function(t){return t[e]}}function a(e,t,n,a){n=null==n?r.identity:i(n);for(var s=n.call(a,t),o=0,l=e.length;o<l;){var u=o+l>>>1;n.call(a,e[u])<s?l=u:o=u+1}return o}var r=n("underscore");e.exports=a},function(e,t){function i(e,t){a.each(t,function(t){this.listenTo(e,t,function(){var e=a.toArray(arguments);e.unshift(t),this.trigger.apply(this,e)})},this)}
var a=n("underscore");e.exports=i}],t(0)}()})},function(e,t,n){"use strict";var i=n(138),a=new i.a({interface:["getLanguages","load","t"]});t.a=a},function(e,t,n){"use strict";var i=n(138),a=new i.a({interface:["get","set","remove","clear"]});t.a=a},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(52),s=n(187),o={isPopulating:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},isPopulated:function(){
return!!this.populatePromise&&"resolved"===this.populatePromise.state()},populate:function(){return this.populatePromise?this.populatePromise:this.fetch.apply(this,arguments)},fetch:function(){var e=this,t=a.a.Deferred(),n=void 0;if(this.isPopulating())return this.populatePromise;n=this._fetch?this._fetch.apply(this,arguments):this instanceof r.a.Collection?r.a.Collection.prototype.fetch.apply(this,arguments):r.a.Model.prototype.fetch.apply(this,arguments);var i=t.promise();return i.rid=n.rid,
this.populatePromise=i,n.done(function(n){e.populatePromise=a.a.Deferred().resolveWith(e,[e]).promise(),t.resolveWith(e,[e,n])}),n.fail(function(n){e.populatePromise=null,t.rejectWith(e,[e,n])}),i},abortPendingPopulate:function(){return this.isPopulating()&&s.a.abort(this.populatePromise.rid),this.populatePromise},resetPopulatePromise:function(e){return this.isPopulating()||(this.populatePromise=e),this.populatePromise}};t.a=o},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(21),s=n(1179),o=r.a.extend({name:"FilterOptionCollection",context:["server","section","type","standalone"],model:s.a,url:function e(){var t=a.a.result(this.section,"url"),e=t+"/"+this.parent.id;return this.type?e+="?type="+this.type:this.standalone||(e+="?"+this.getUrlParams()),e},getUrlParams:function(){var e=this,t={},n=[],i=this.section.get("currentType"),r=this.section.get("currentFilters");return i&&(t.type=i.id),a.a.each(r,function(n){
n.key!==e.parent.id&&n.values.length&&(t[n.key]=n.values.join(","))}),a.a.each(t,function(e,t){"unviewedLeafCount"===t?n.push(t+">="+e):n.push(t+"="+e)}),n.join("&")},augmentResponse:function(e){return e.Directory&&!a.a.isArray(e.Directory)&&(e.Directory=[e.Directory]),e.Directory=a.a.filter(e.Directory,function(e){return e.title}),e},search:function(e){var t=this.filter(function(t){return t.get("title").toLowerCase().indexOf(e.toLowerCase())>-1});return this.clone(t)}});t.a=o},function(e,t,n){
"use strict";var i=n(19),a=n(17),r=n(18),s=n(1185),o=n(1189),l=n(1187),u=r.a.extend({name:"LibraryDetailsModel",context:["server","includeAdvanced"],url:function(){var e={includeDetails:1};return this.includeAdvanced&&(e.includeAdvanced=1),i.join(this.get("key"),e)},sessionAttrs:{key:a.a.string.isRequired},syncedAttrs:{librarySectionID:a.a.string},syncedRelations:{directories:{relationClass:s.a,rootPropertyName:"Directory"},types:{relationClass:o.a,rootPropertyName:"Type"},fieldTypes:{
relationClass:l.a,rootPropertyName:"FieldType"}}});t.a=u},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(78),l=n(67),u=n(62),c=n(17),d=n(65),h=n(701),p=n(18),f=n(488),g=n(1246),m=n(206),v=p.a.extend({name:"MediaSubscriptionModel",context:["server"],entityType:l.a,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(u.a)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"key",
rootPropertyName:"MediaSubscription",urlRoot:"/media/subscriptions",mergeStrategy:h.a,syncedAttrs:{key:c.a.string,type:c.a.integer,targetLibrarySectionID:{type:c.a.string,save:!0},targetSectionLocationID:{type:c.a.string,save:!0},title:c.a.string,selected:c.a.boolean,parameters:c.a.string},syncedRelations:{target:{relationClass:g.a,rootPropertyName:"Metadata",deferred:!0},grabOperations:{relationClass:f.default,rootPropertyName:"MediaGrabOperation",deferred:!0},prefs:{relationClass:m.a,
rootPropertyName:"Setting",deferred:!0,save:!0}},augmentResponseText:function(e,t){return t===d.a.xml?n.i(o.a)(e):e},getSaveParams:function(){var e=p.a.prototype.getSaveParams.apply(this,arguments),t=e.Setting,n=s()(e,["Setting"]);return a()({prefs:t},n)}});t.a=v},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return r}),n.d(t,"e",function(){return s}),n.d(t,"d",function(){return o})
;var i="RESET_PRIMARY_SERVER",a="CHANGE_PRIMARY_SERVER",r="GARBAGE_COLLECT_ENTITIES",s="CONFIRM_RELAY_CONNECTION",o="CHANGE_ACTIVE_PLAY_QUEUE_ITEM"},function(e,t,n){"use strict";function i(e){return n.i(a.createSelector)(n.i(s.a)(),function(e,t){return t.activeFilters},function(e,t){return t.activeSort},function(e,t){return t.activeLimit},function(e,t){return t.selectedType},function(e,t){return t.selectedDirectory},function(t,i,a,s,o,l){if(t){var u={filters:i,sort:a,limit:s}
;return!(l&&"photo"===l.type)&&o&&o.key?n.i(r.a)([o.key.replace("/all?","/"+e+"?")],u):n.i(r.a)([t,e],u)}})}var a=n(8),r=(n.n(a),n(1396)),s=n(208);t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.providers});t.a=r},function(e,t,n){"use strict";var i=n(246),a=n(8),r=(n.n(a),n.i(a.createSelector)(i.a,function(e){return e.cloudServer},function(e,t){return e[t]}));t.a=r},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),
n(246)),r=n.i(i.createSelector)(a.a,function(e){return e.servers},function(e,t){return t?t.map(function(t){return e[t]}):[]});t.a=r},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(494)),r=n(495),s=n.i(i.createSelector)(r.a,a.a,function(e,t){return!(!e.cpms||t)});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(38),s=r.a.extend({initialize:function(){this._entries=[]},wrapAll:function(e,t,n){a.a.each(e,function(e){this.wrap(e,t,n)},this)},wrap:function(e,t,n){
n[e]=a.a.wrap(n[e],a.a.bind(function(e){var i=a.a.toArray(arguments).slice(1);if(t.call(n))return e.apply(n,i);this.add({fn:e,args:i,context:n})},this))},add:function(e){this._entries.push(e)},process:function(){a.a.each(this._entries,function(e){var t=e.context||this;e.fn.apply(t,e.args)},this),this.clear()},clear:function(){this._entries.length=0}});t.a=s},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=r.a.unix(e);return r()().subtract(1,"day").isSame(t,"day")}
var a=n(37),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t="",n="";e?(t=e.userAgent,n=e.platform):null!=window.navigator&&(t=window.navigator.userAgent,n=window.navigator.platform),this.detect({userAgent:t,platform:n})}var a="undefined"!=typeof window;i.prototype={constructor:i,tests:[{id:"ee",name:"EE",predicate:function(e){return/^Netbox-/.test(e.userAgent)}},{id:"libertyglobal",name:"Liberty Global",tv:!0,predicate:function(e){return/WPE-Horizon$/.test(e.userAgent)}},{
id:"sony",name:"Sony",predicate:function(e){return/playstation|sony/i.test(e.userAgent)}},{id:"nintendo",name:"Nintendo",predicate:function(e){return/nintendo/i.test(e.userAgent)}},{id:"tivo",name:"TiVo",predicate:function(e){return/TiVo/.test(e.userAgent)}},{id:"lg",name:"LG",predicate:function(e){var t=e.userAgent;return/netcast/i.test(t)||/web[o0]s/i.test(t)&&/smarttv/i.test(t)}},{id:"samsung",name:"Samsung",predicate:function(e){return/Samsung|Tizen/i.test(e.userAgent)}},{id:"panasonic",
name:"Panasonic",predicate:function(e){return/viera/i.test(e.userAgent)}},{id:"philips",name:"Philips",predicate:function(e){return/philips/i.test(e.userAgent)}},{id:"toshiba",name:"Toshiba",predicate:function(e){return/toshiba/i.test(e.userAgent)}},{id:"vizio",name:"Vizio",predicate:function(e){var t=/vizio/i.test(e.userAgent),n=/opera/i.test(e.userAgent),i=a&&window.iMTK_JSP;return t||i&&n}},{id:"swisscom",name:"Swisscom",predicate:function(e){return/swisscom/i.test(e.userAgent)}},{id:"humax",
name:"Humax",predicate:function(e){return/humax/i.test(e.userAgent)}},{id:"amazon",name:"Amazon",predicate:function(e){return/-AFT\w-/.test(e.userAgent)}},{id:"generic",name:"Generic Device",predicate:function(e){var t=e.userAgent;return/smarttv/i.test(t)||/large screen/i.test(t)||/hbbtv/i.test(t)}}],id:"unknown",name:"Unknown Manufacturer",detect:function(e){var t=this.runTests(this.tests,e);t&&(this.id=t.id,this.name=t.name)},runTests:function(e,t){for(var n=0,i=e.length;n<i;n++){var a=e[n]
;if(a.predicate(t))return a}},toJSON:function(){var e={};for(var t in this)this.hasOwnProperty(t)&&this[t]&&(e[t]=this[t]);return e}},t.a=new i},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"a",function(){return r}),n.d(t,"c",function(){return s});var i="string",a="boolean",r="date",s="rating"},function(e,t,n){"use strict";function i(e){return e=parseInt(e,10),e?e<2?n.i(a.default)("Mono"):e<3?n.i(a.default)("Stereo"):(e-1).toString()+".1":""}
Object.defineProperty(t,"__esModule",{value:!0});var a=n(4);t.default=i},function(e,t,n){"use strict";var i="placeholder-standard",a="placeholder-square",r="placeholder-widescreen",s={movie:i,show:i,season:i,episode:r,artist:a,album:a,track:a,photo:a,photoalbum:a,clip:r,userPlaylistItem:r,playlist:a,playlistFolder:a,channel:a,channelDirectory:a,folder:"placeholder-folder",friend:"placeholder-friend",device:a,poster:i,art:r,banner:r};t.a=s},function(e,t,n){"use strict";var i=(n(1353),n(781),
n(1354),n(521),n(782),n(1355));n.d(t,"a",function(){return i.a});var a=(n(1356),n(1357),n(1358),n(1359));n.d(t,"b",function(){return a.a});n(1360),n(1361),n(1362),n(1363),n(1364),n(381),n(382),n(1365),n(1366),n(783),n(784),n(1367),n(785),n(1368),n(1369),n(1370),n(522),n(1371),n(1372),n(1373),n(1374),n(1375),n(1376),n(523),n(524),n(1377),n(1378),n(525),n(526),n(1379),n(1380)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a
;return"opera"===e.id&&!e.presto}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"opera"===e.id&&e.presto}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=r.a.Deferred(),i=(new Date).getTime()+t,a=void 0;return e.done(function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];a=function(){return n.resolve.apply(n,t)}}).fail(function(){
for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];a=function(){return n.reject.apply(n,t)}}).always(function(){var e=(new Date).getTime(),t=Math.max(i-e,0);setTimeout(a,t)}),n.promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.clone(e);return void 0!==t.last?(t.end=t.last+1,t.size=t.end-t.start):void 0!==t.size?(t.end=t.start+t.size,t.last=t.end-1):void 0!==t.end&&(t.last=t.end-1,t.size=t.end-t.start),t}function a(e,t){
return s.a.filter(s.a.map(e,i),function(e){return t?e.size>=0:e.size>0})}var r=n(2),s=n.n(r),o={augment:i,difference:function(e,t,n){return e=i(e),t=i(t),a([{start:e.start,last:Math.min(e.last,t.start-1)},{start:Math.max(e.start,t.end),last:e.last}],n)},union:function(e,t,n){if(e=i(e),t=i(t),e.start>t.start){var r=e;e=t,t=r}var s=[e];return t.start<=e.end?s[0].last=Math.max(t.last,e.last):s.push(t),a(s,n)},degap:function(e,t){var n=i(e);return t=i(t),t.size?(n.start>t.end&&(n={start:t.end,
end:n.end}),n.end<t.start&&(n={start:n.start,end:t.start}),i(n)):n},each:function(e,t,n){e=i(e);for(var a=Math.min(e.start,e.end),r=Math.max(e.start,e.end);a<=r;a++)t.call(n,a)},roundByPage:function(e,t){return e=i(e),i({start:Math.floor(e.start/t)*t,end:Math.ceil(e.end/t)*t})}};t.a=o},function(e,t,n){"use strict";function i(e,t,n){var i=e.get("entities").get(t);if(i){var a=i.get(n);if(a)return a.get("model")}}function a(e,t,n){var a=i(e,t,n)
;return a||r.a.warn('An entity does not exist with the type "%s" and id "%s"',t,n),a}var r=n(28);t.b=i,t.a=a},function(e,t,n){"use strict";function i(e,t){return e.get("ui").get(t+"Player")}function a(e,t){var n=e.get("playQueue");if(n){var i=n.get("playQueueItems"),a=t-n.get("firstIndex");if(!(a<0||a>=i.length)){return i.at(a)}}}t.b=i,t.a=a},function(e,t,n){"use strict";function i(e){var t=e.toUpperCase(),n=t.match(/(\d{4})S/);if(n){var i=n[1];t=t.replace(i+"S",i+"s")}return t}t.a=i
},function(e,t,n){"use strict";function i(e,t,n){return null==n&&(n=e+"s"),1===t?e:n}t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(2),s=n.n(r),o=n(13),l=n(38),u=n(40),c=n(34),d=n(469),h=n(28),p=n(55),f=l.a.extend({mixins:[p.a],idleTimelineInterval:1e4,players:{photo:null,video:null,audio:null},textField:{focused:!1,content:"",secure:!1},initialize:function(){s.a.bindAll(this,"_sendTimeline"),this._sendTimelineThrottle=s.a.throttle(this._sendTimeline,1e3)},
registerPlayer:function(e){if(n.i(o.a)("appModel").get("settings").get("companion")){var t=n.i(c.k)(e.currentItem.get("type")).mediaType;n.i(h.a)("[Companion Timeline] registering player. Type %s",t),this.players[t]=e,this.listenTo(e.model,{"change:state change:loaded change:lastSeekPosition":this._sendTimeline,"change:position":this._sendTimelineThrottle}),this._sendTimeline()}},unregisterPlayer:function(e){var t=n.i(c.k)(e.currentItem.get("type")).mediaType
;n.i(h.a)("[Companion Timeline] unregistering player. Type %s",t),this.players[t]=null,this.stopListening(e.model),s.a.defer(this._sendTimeline)},enteredTextField:function(e){this.textField=a()({},e,{focused:!0}),this._sendTimeline()},leavedTextField:function(){this.textField.focused=!1,this._sendTimeline()},updatedTextField:function(e){this.textField.content!==e&&(this.textField.content=e,this._sendTimeline())},start:function(){this.timelineStarted||(this.timelineStarted=!0,
n.i(h.a)("[Companion Timeline] Starting"),this._idleTimelineInterval=setInterval(this._sendTimelineThrottle,this.idleTimelineInterval))},stop:function(e){this.timelineStarted&&(e&&this._sendTimeline({requestDisconnect:!0}),this.timelineStarted=!1,n.i(h.a)("[Companion Timeline] Stopping"),this._idleTimelineInterval=clearInterval(this._idleTimelineInterval))},isPlaybackActive:function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.states||[u.a.states.PLAYING,u.a.states.PAUSED,u.a.states.BUFFERING],n=e.types||s.a.keys(this.players);return!!s.a.find(this.players,function(e,i){return e&&s.a.contains(t,e.model.get("state"))&&s.a.contains(n,i)})},_sendTimeline:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.timelineStarted){
var t=this._buildVideoTimeline(),i=this._buildMusicTimeline(),a=this._buildPhotoTimeline(),r=t._location||a._location||i._location||"navigation",o={MediaContainer:{_location:r,Timeline:[t,i,a]}};e.requestDisconnect&&(o.MediaContainer._disconnected=1),this.textField.focused&&s.a.extend(o.MediaContainer,{_textFieldFocused:this.textField.name,_textFieldContent:this.textField.content,_textFieldSecure:this.textField.secure?1:0}),n.i(h.a)("[Companion Timeline] sending companion timeline"),
d.a.publish(o)}},_buildVideoTimeline:function(){var e=this._buildbaseTimeline(this.players.video,"video");return e._state&&e._state!==u.a.states.STOPPED&&(e._location="fullScreenVideo"),e},_buildPhotoTimeline:function(){var e=this._buildbaseTimeline(this.players.photo,"photo");return e._state&&e._state!==u.a.states.STOPPED&&(e._location="fullScreenPhoto"),e},_buildMusicTimeline:function(){var e=this._buildbaseTimeline(this.players.audio,"music")
;return e._state&&e._state!==u.a.states.STOPPED&&(e._location="fullScreenMusic"),e},_buildbaseTimeline:function(e,t){var i=n.i(o.a)("companionPlayerProfile"),a={_type:t,_seekRange:"0-0",_time:"0",_controllable:i[t]};if(!e||!e.currentItem)return a;var r=e.currentItem,l=e.model,u=r.server,c=u.get("originalMachineIdentifier")||u.get("machineIdentifier"),d=u.get("connections"),h=u.get("activeConnection");h.get("isLoopback")&&(h=d.findWhere({isConnected:!0,isLoopback:!1})||h)
;var p=l.get("duration"),f=0;l.get("repeatAll")?f=2:l.get("repeatItem")&&(f=1),a=s.a.extend(a,{_protocol:h.get("scheme"),_address:h.getAddressFromUri(),_port:h.get("port"),_machineIdentifier:c,_guid:r.get("guid"),_key:r.get("key"),_ratingKey:r.get("ratingKey"),_duration:p,_audioStreamID:l.get("audioStreamID"),_state:l.get("state"),_subtitleStreamID:l.get("subtitleStreamID"),_time:l.get("position"),_repeat:f,_mute:0,_shuffle:0,_volume:l.get("volume")}),p&&(a._seekRange="0-"+p)
;var g=l.get("playQueue");return s.a.result(g,"url")?a=s.a.extend(a,{_containerKey:"/playQueues/"+g.id,_playQueueID:g.id,_playQueueVersion:g.get("playQueueVersion"),_playQueueItemID:r.get("playQueueItemID")}):a._containerKey=s.a.result(g.get("lastAddedItem"),"url"),a}}),g=new f;t.a=g},function(e,t,n){"use strict";var i=n(4),a=n(214),r=["id","typeString"],s=n.i(a.a)(r,[{id:0,typeString:"tag",title:function(){return n.i(i.default)("Tag")}},{id:1,typeString:"genre",title:function(){
return n.i(i.default)("Genre")}},{id:2,typeString:"collection",title:function(){return n.i(i.default)("Collection")}},{id:3,typeString:"bookmark",title:function(){return n.i(i.default)("Bookmark")}},{id:4,typeString:"director",title:function(){return n.i(i.default)("Director")},isPerson:!0},{id:5,typeString:"writer",title:function(){return n.i(i.default)("Writer")},isPerson:!0},{id:6,typeString:"actor",title:function(){return n.i(i.default)("Actor")},isPerson:!0},{id:7,typeString:"producer",
title:function(){return n.i(i.default)("Producer")},isPerson:!0},{id:8,typeString:"country",title:function(){return n.i(i.default)("Country")}},{id:9,typeString:"chapter",title:function(){return n.i(i.default)("Chapter")}},{id:10,typeString:"review",title:function(){return n.i(i.default)("Review")}},{id:11,typeString:"label",title:function(){return n.i(i.default)("Label")}},{id:42,typeString:"versionBackgroundProcessingTarget",title:function(){
return n.i(i.default)("Version Background Processing Target")}},{id:200,typeString:"make",title:function(){return n.i(i.default)("Make")}},{id:201,typeString:"model",title:function(){return n.i(i.default)("Model")}},{id:202,typeString:"aperture",title:function(){return n.i(i.default)("Aperture")}},{id:203,typeString:"exposure",title:function(){return n.i(i.default)("Exposure")}},{id:204,typeString:"iso",title:function(){return n.i(i.default)("ISO")}},{id:205,typeString:"lens",title:function(){
return n.i(i.default)("Lens")}},{id:206,typeString:"device",title:function(){return n.i(i.default)("Device")}},{id:207,typeString:"autotag",title:function(){return n.i(i.default)("Tag")}},{id:300,typeString:"mood",title:function(){return n.i(i.default)("Mood")}},{id:301,typeString:"bpm",title:function(){return n.i(i.default)("BPM")}},{id:302,typeString:"composer",title:function(){return n.i(i.default)("Composer")}},{id:303,typeString:"featuring",title:function(){
return n.i(i.default)("Featuring")}},{id:304,typeString:"trackArtist",title:function(){return n.i(i.default)("Track Artist")}},{id:305,typeString:"similarArtist",title:function(){return n.i(i.default)("Similar Artist")}},{id:306,typeString:"concert",title:function(){return n.i(i.default)("Concert")}}]);t.a=s},function(e,t,n){"use strict";var i=n(143),a=i.a.extend({setup:function(e){if(e.className&&this.$el.addClass(e.className),this.model=e.model,this.server=e.model.server,e.flag){
var t=this.model.get("Media");this.flag=e.flag,t&&t.length&&(this.path=t[0][this.flag]),this.ignoreAttributeChanges||this.listenTo(this.model,"change:Media",this.onMediaChange)}else this.flag=e.modelAttribute,this.path=this.model.get(this.flag),this.ignoreAttributeChanges||this.listenTo(this.model,"change:"+this.flag,this.onChange);this.prefix=this.model.get("mediaTagPrefix"),this.version=this.model.get("mediaTagVersion"),this.path&&(this.url=this.getUrl(this.path)),this.setDimensions(e)},
getUrl:function(e){return this.prefix+this.flag+"/"+encodeURIComponent(e)+"?t="+this.version},onMediaChange:function(e,t){this.onChange(e,t&&t.length?t[0][this.flag]:null)}});t.a=a},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(13),m=n(27),v=n(393),y=function(e){function t(){var i,r,o;l()(this,t);for(var u=arguments.length,d=Array(u),h=0;h<u;h++)d[h]=arguments[h]
;return i=r=c()(this,e.call.apply(e,[this].concat(d))),r.onPress=function(e){var t=r.props,i=(t.children,s()(t,["children"])),o=r.context.metricsPage;n.i(g.a)("metrics").trackClick(a()({},i,{page:o}))},o=i,c()(r,o)}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=f.a.Children.only(this.props.children);return f.a.cloneElement(e,{onPress:n.i(v.a)(this.onPress,e.props.onPress)})},t}(p.Component);y.contextTypes={
metricsPage:p.PropTypes.string.isRequired},t.a=y},function(e,t,n){"use strict";function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=0,n=t.length;e<n;e++){var i=t[e];"function"==typeof i&&i.apply(void 0,arguments)}}}t.a=i},function(e,t,n){"use strict";var i=n(34);n.d(t,"a",function(){return i.o}),n.d(t,"b",function(){return i.p}),n.d(t,"c",function(){return i.m}),n.d(t,"d",function(){return i.q}),n.d(t,"e",function(){return i.g})
},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(498),s=n(21),o=n(1599),l=s.a.extend({name:"AgentCollection",context:["server","mediaTypeID","primaryAgentID","relatedAgentID"],model:o.a,cache:new r.a,cacheKey:function(){var e=a.a.result(this,"url");return this.server&&this.server.getScopedKey(e)},url:function(){var e="/system/agents"
;return this.primaryAgentID?e+"/contributors?mediaType="+this.mediaTypeID+"&primaryAgent="+this.primaryAgentID:this.relatedAgentID?e+"/"+this.relatedAgentID+"/config/"+this.mediaTypeID:this.mediaTypeID?e+"?mediaType="+this.mediaTypeID:e},hasExclusiveAgent:function(e){return!!a.a.intersection(this.pluck("identifier"),e).length}});t.a=l},function(e,t,n){"use strict";var i=n(18),a=n(17),r=n(206),s=n(820),o=n(326),l=n(826),u=n(1586),c=n(541),d=n(1585),h=n(823),p=n(1578),f=n(821)
;n.d(t,"a",function(){return g});var g={DEVICE:"device",DEVICE_CHANNELS:"deviceChannels",EPG:"epg",EPG_MAPPING:"epgMapping",CHANNEL_MAPPING:"channelMapping",EPG_DOWNLOAD:"epgDownload"},m=i.a.extend({name:"DVRSetupModel",context:["server"],sessionAttrs:{isDevicesPending:a.a.boolean,isDevicesPopulated:a.a.boolean,devicesError:a.a.object,isDiscoveringDevices:a.a.boolean,isChannelMappingsPending:a.a.boolean,isChannelMappingsPopulated:a.a.boolean,channelMappingsError:a.a.object,
isChannelMappingsSaving:a.a.boolean,channelMappingsSaveError:a.a.object,isLineupChannelsPending:a.a.boolean,isLineupChannelsPopulated:a.a.boolean,lineupChannelsError:a.a.object,epgLineupActivityID:a.a.string,epgDownloadActivityID:a.a.string,step:a.a.string,selectedLineupUUID:a.a.string,addDevicePending:a.a.boolean,isSavingDVR:a.a.boolean,hasScannedChannels:a.a.boolean},sessionRelations:{devices:{relationClass:s.a},lineupChannels:{relationClass:u.a},epgSettings:{relationClass:d.a},
channelMappings:{relationClass:l.a},selectedDVR:{relationClass:h.a,deferred:!0},selectedDevice:{relationClass:o.b,deferred:!0},selectedLanguage:{relationClass:c.a,deferred:!0},setupErrorMessages:{relationClass:p.a},scanPrefs:{relationClass:r.a,deferred:!0},scanNetworks:{relationClass:f.a,deferred:!0}},defaults:{step:g.DEVICE,isDevicesPending:!1,isDevicesPopulated:!1,isDiscoveringDevices:!1,devicesError:null,isChannelMappingsPending:!1,isChannelMappingsPopulated:!1,channelMappingsError:null,
isChannelMappingsSaving:!1,channelMappingsSaveError:null,isLineupChannelsPending:!1,isLineupChannelsPopulated:!1,lineupChannelsError:null,epgLineupActivityID:"",epgDownloadActivityID:"",addDevicePending:!1,isSavingDVR:!1,hasScannedChannels:!1}});t.b=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(50),a=n(32);n.d(t,"resetEPGSettings",function(){return r}),n.d(t,"fetchEPGCountries",function(){return s}),n.d(t,"fetchEPGLanguages",function(){return o}),
n.d(t,"selectEPGCountry",function(){return l}),n.d(t,"selectEPGLanguage",function(){return u}),n.d(t,"selectEPGRegion",function(){return c}),n.d(t,"setEPGPostalCode",function(){return d}),n.d(t,"fetchEPGLineups",function(){return h});var r=n.i(i.a)(a._63),s=n.i(i.a)(a._64),o=n.i(i.a)(a._65),l=n.i(i.a)(a._66),u=n.i(i.a)(a._67),c=n.i(i.a)(a._68),d=n.i(i.a)(a._69),h=n.i(i.a)(a._70)},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),
n.d(t,"c",function(){return o}),n.d(t,"i",function(){return l}),n.d(t,"j",function(){return u}),n.d(t,"d",function(){return c}),n.d(t,"e",function(){return d}),n.d(t,"h",function(){return h}),n.d(t,"f",function(){return p}),n.d(t,"g",function(){return f});var r=n.i(i.a)(a.Z),s=(n.i(i.a)(a._0),n.i(i.a)(a._1)),o=n.i(i.a)(a._2),l=n.i(i.a)(a._3),u=n.i(i.a)(a._4),c=n.i(i.a)(a._5),d=n.i(i.a)(a._6),h=n.i(i.a)(a._7),p=n.i(i.a)(a._8),f=n.i(i.a)(a._9)},function(e,t,n){"use strict";var i=n(50),a=n(32)
;n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return o}),n.d(t,"g",function(){return l}),n.d(t,"e",function(){return u}),n.d(t,"h",function(){return c}),n.d(t,"a",function(){return d}),n.d(t,"f",function(){return h});var r=n.i(i.a)(a._165),s=n.i(i.a)(a._166),o=n.i(i.a)(a._167),l=n.i(i.a)(a._168),u=n.i(i.a)(a._169),c=n.i(i.a)(a._170),d=n.i(i.a)(a._171),h=n.i(i.a)(a._172)},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e){
return e.ui.liveTVSettingsPage},function(e,t){return t.dvrID},function(e,t){var n=e.dvrs;return r.a.find(n,{key:t})})}var a=n(2),r=n.n(a),s=n(8);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(n.i(l.a)(),n.i(u.a)(),function(e,t){return r.a.find(t,function(t){return t.type===o.a.PROVIDER_EPG_LOAD&&t.Context.identifier===e.identifier})})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(117)),l=n(127),u=n(221);t.a=i},function(e,t,n){"use strict";function i(){
return n.i(a.createSelector)(n.i(r.a)(),s.a,function(e,t){return!!e&&n.i(o.a)(t,e.ratingKey)})}var a=n(8),r=(n.n(a),n(24)),s=n(1702),o=n(2411);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type&&n.i(r.k)(e.type);return t&&t.mediaType})}var a=n(8),r=(n.n(a),n(34)),s=n(24);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"j",function(){return a}),
n.d(t,"c",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"b",function(){return o}),n.d(t,"i",function(){return l}),n.d(t,"h",function(){return u}),n.d(t,"e",function(){return c}),n.d(t,"f",function(){return d}),n.d(t,"g",function(){return h});var i=9,a=13,r=16,s=17,o=27,l=38,u=40,c=91,d=93,h=224},function(e,t,n){"use strict"
;var i=n(2886),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(4),d=n(12),h=n(19),p=n(34),f=n(141),g=n(23),m=n(59),v=n(218),y=n(559),b=n(558),S=n(225),I=n(337),w=n(335),M=n(336),C=n(266),D=u.a.ItemView.extend({tagName:"ul",className:"dropdown-menu",template:a.a,ui:{divider:".divider"},events:{"click .play-version-btn":"onPlayVersionClick","click .play-all-btn":"onPlayAllClick","click .play-shuffled-btn":"onPlayShuffledClick","click .play-next-btn":"onPlayNextClick",
"click .add-to-queue-btn":"onAddToQueueClick","click .play-mix-btn":"onPlayMixClick","click .play-primary-extra-btn":"onPlayPrimaryExtraClick","click .add-to-playlist-btn":"onAddToPlaylistClick","click .refresh-btn":"onRefreshClick","click .sync-btn":"onSyncClick","click .convert-btn":"onConvertClick","click .mark-watched-btn":"onMarkWatchedClick","click .mark-unwatched-btn":"onMarkUnwatchedClick","click .watch-later-btn":"onWatchLaterClick","click .share-btn":"onShareClick",
"click .recommend-btn":"onRecommendClick","click .delete-btn":"onDeleteClick","click .info-btn":"onInfoClick","click .download-btn":"onDownloadClick"},initialize:function(e){this.metadataType=n.i(p.b)(this.model.get("type")),this.mediaActions=new v.a({},{item:this.model}),l()(".dropdown.open .dropdown-toggle").dropdown("toggle")},serializeData:function(){var e,t;if(this.mediaActions.get("showDownload")){e=this.model.getDownloadUrl();var n=this.model.getFilepath();n&&(t=h.getLastSegment(n))}
return{defaultLinkTarget:"_self",downloadUrl:e,downloadName:t}},getPosition:function(e,t,n){var i=e.position().left;return e.offset().top+this.$el.outerHeight()>t.offset.top+t.outerHeight&&(n-=this.$el.height()-e.height()),e.offset().left+this.$el.outerWidth()>t.offset.left+t.width&&(i-=this.$el.width()-e.outerWidth()),{top:n,left:i}},bindingsModel:"mediaActions",bindings:{".play-version-btn":{modelAttribute:"showPlayVersion",manual:!0,autohide:!0},".play-all-btn":{modelAttribute:"showPlayAll",
manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".play-next-btn, .add-to-queue-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".play-mix-btn":{modelAttribute:"showPlayMix",manual:!0,autohide:!0,formatter:function(e,t){if(e){var i=this.model.get("related"),a=i.findWhere({browse:!1}),r=a.get("title");r&&t.text(n.i(c.default)("Play {1}",r))}return e}},".play-trailer-btn":{modelAttribute:"showPlayTrailer",manual:!0,autohide:!0},
".play-music-video-btn":{modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".refresh-btn":{modelAttribute:"showRefresh",manual:!0,autohide:!0},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",
manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".watch-later-btn":{modelAttribute:"showWatchLater",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){
var e=this.ui.divider,t=e.prevAll(":not(:has(.hidden))").length,n=e.nextAll(":not(:has(.hidden))").length;e.toggleClass("hidden",!t||!n)},onClose:function(){this.mediaActions.stopListening()},onPlayVersionClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new y.a({model:this.model}))},onPlayAllClick:function(e){e.preventDefault(),g.a.execute("playMedia",{item:this.model})},onPlayShuffledClick:function(e){e.preventDefault(),g.a.execute("playMedia",{item:this.model,shuffle:!0})},
onPlayPrimaryExtraClick:function(e){e.preventDefault();var t=n.i(f.a)(this.model);if(!s.a.isEmpty(t)){var i=new m.a({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});g.a.execute("playMedia",{item:i})}},onPlayNextClick:function(e){if(e.preventDefault(),l()(e.currentTarget).isDisabled())return void e.stopImmediatePropagation();g.a.execute("queueMedia",{item:this.model,next:!0})},onAddToQueueClick:function(e){
if(e.preventDefault(),l()(e.currentTarget).isDisabled())return void e.stopImmediatePropagation();g.a.execute("queueMedia",{item:this.model,next:!1})},onPlayMixClick:function(e){e.preventDefault();var t=this.model.get("related"),n=t.findWhere({browse:!1});n.set("type","track"),g.a.execute("playMedia",{item:n})},onAddToPlaylistClick:function(e){if(e.preventDefault(),l()(e.currentTarget).isDisabled())return void e.stopImmediatePropagation();d.a.trigger("show:modal",new S.a({model:this.model,
items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onRefreshClick:function(e){e.preventDefault(),g.a.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onMarkWatchedClick:function(e){e.preventDefault(),g.a.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),g.a.execute("markUnwatched",{item:this.model})},onSyncClick:function(e){e.preventDefault(),g.a.execute("showSyncModal",{
item:this.model})},onConvertClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new C.a({item:this.model}))},onWatchLaterClick:function(e){e.preventDefault(),g.a.execute("watchLater",{item:this.model})},onShareClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new I.a({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new M.a({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),
this.model.get("playlistType")?g.a.execute("deletePlaylist",{item:this.model}):g.a.execute("deleteItems",{item:this.model,skipRedirect:!0})},onInfoClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new w.a({model:this.model}))},onDownloadClick:function(e){this.model.get("Media").length>1&&(e.preventDefault(),d.a.trigger("show:modal",new b.a({model:this.model})))}});t.a=D},function(e,t,n){"use strict";var i=n(19),a=n(315),r=n(143),s=n(379),o=r.a.extend({background:!0,setup:function(e){
this.model=e.model,e.noPlaceholder||(this.placeholderClass=s.a.playlist);var t=n.i(a.a)(),r={width:Math.round((e.width||e.height||256)*t),height:Math.round((e.height||e.width||256)*t),rows:e.rows||2,cols:e.columns||2,border:e.border||0,media:e.media||"thumb",repeat:e.unique?0:1},o=this.model.get("composite");o&&(this.url=this.model.server.resolveUrl(i.join(o,r),{appendToken:!0}))}});t.a=o},function(e,t,n){"use strict"
;var i=n(2975),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(12),d=n(19),h=n(57),p=h.a.extend({name:"channelSettingsModal",className:"channel-settings-modal modal fade",template:a.a,ui:{submitBtn:".submit-btn"},events:s.a.extend({"change input[name]":"onInputChange","change select[name]":"onInputChange","submit #channel-settings-form":"onSubmit"},h.a.prototype.events),initialize:function(){h.a.prototype.initialize.apply(this,arguments),this.changes={}},serializeData:function(){
var e=this.model.get("title")||this.model.get("name");return{title:e?e:"Preferences...",settings:this.collection.toJSON()}},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked),this.changes[t.name]=n},onSubmit:function(e){if(e.preventDefault(),s.a.isEmpty(this.changes))return void this.hide();var t=this.ui.submitBtn;if(!t.hasClass("active")){t.addClass("active")
;var i=this.collection.first(),a=i.getSaveParams(this.changes),r=s.a.result(this.collection,"url"),o=d.join([r,"/set"],a),h=l.a.ajax(i.server.getXHROptions(o));h.done(s.a.bind(function(){this.hide()},this)),h.fail(s.a.bind(function(){c.a.trigger("show:alert",{type:"error",message:n.i(u.default)("There was a problem saving these settings.")})},this)),h.always(function(){t.removeClass("active")})}}});t.a=p},function(e,t,n){"use strict"
;var i=n(2978),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(13),c=n(4),d=n(12),h=n(44),p=n(19),f=n(128),g=n(34),m=n(304),v=n(73),y=n(139),b=n(88),S=n(94),I=n(1773),w=n(1776),M=n(1777),C=n(1783),D=n(1775),P=n(57),T=n(334),x=n(323),E=P.a.extend({mixins:[x.a],name:"editSectionModal",className:"edit-section-modal modal modal-lg fade",template:a.a,panes:{type:{constructor:C.a,nextPane:"folders",dependentPanes:function(){return this.showFolders?["folders"]:["options","advanced"]}},folders:{
constructor:w.a,nextPane:"options",dependentPanes:["options","advanced"]},options:{constructor:M.a,nextPane:"advanced"},advanced:{constructor:I.a},error:{constructor:D.a}},panesModel:"tempModel",ui:{sidebar:".modal-nav-list",optionsBtn:".options-btn",saveBtn:".save-btn",message:".form-message",headerSectionType:".section-type-title"},regions:{paneRegion:".pane-region"},events:s.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onSaveClick",
"submit .edit-section-type-form":"onGeneralFormSubmit"},P.a.prototype.events),onlyAfterRender:["showPane","updateMessage","updateSectionTitle","updateSectionTitleDestabilized","updateSaveBtn"],paneConstructorArg:function(){return{isDefaultSection:this.isDefaultSection}},initialize:function(e){var t=this;P.a.prototype.initialize.apply(this,arguments),this.server=e.server,this.redirect=e.redirect,this.isDefaultSection=e.isDefaultSection,this.isLoading=!0,
this.model?(this.tempModel=this.model.clone(),this.tempModel.collection=this.model.collection):this.tempModel=new m.a({},{server:this.server,collection:this.server.get("sections")}),this.listenTo(this.tempModel,"change:type",this.onSectionTypeChange),this.tempModel.isNew()&&e.seedAttrs&&this.tempModel.set(this.tempModel.parse(e.seedAttrs)),this._deferred=l.a.Deferred(),this.promise=this._deferred.promise();var n=this.server.get("desktop").get("providers")
;n.populate().done(this.whenRendered(function(){var i=n.get(v.a.LIBRARY_PROVIDER_IDENTIFIER),a=i.get("features").get(y.a.MANAGE),r=a.get("automaticLibraryFolders");t.showFolders=!r,t.isLoading=!1,t.render(),t.showPane(e.selectedPane||"type")}))},serializeData:function(){var e=this.tempModel,t=e.isNew();return{isLoading:this.isLoading,add:t,edit:!t,section:e&&e.toJSON(),selectedPane:this.selectedPane,showFolders:this.showFolders}},updateMessage:function(e){this.ui.message.text(e||"")},
updateSaveBtn:function e(){var t=this.ui.saveBtn,n=this.panes[this.selectedPane],e=s.a.bind(function(e){var i=n.nextPane,a=this.tempModel.isNew(),r=!n.constructor.prototype.validate||0===n.constructor.prototype.validate(this.tempModel).length,s=!this.getReachablePanes().isAnyInvalid;this.ui.optionsBtn.toggleClass("hidden",!e.showOptions);var o,l=s||a&&r;o=i,e.showOptions||"options"!==i||(o=!1),s&&(o=!1),e.showOptions&&"options"===i&&(o=!0),e.showAdvanced&&"advanced"===i&&(o=!0),
t.toggleClass("save",!o),t.toggleClass("next",!!o),t.toggleClass("disabled",!l)},this),i=this.tempModel.server,a=this.tempModel.sectionType,r=a&&"music"===a.key,o=a&&"photos"===a.key,l=r&&i.supports("premiumMusic"),u=o&&i.get("photoAutoTag")&&i.hasOwnerFeature("photo_autotags"),c=this.tempModel.isNew();l?this.paneRegion.currentView.populateAgents().then(function(t){var n=t.findWhere({identifier:"com.plexapp.agents.plexmusic"}),i=c&&n;e({showOptions:i,showAdvanced:i})
}):u?this.paneRegion.currentView.populateSectionSettings().then(function(){e({showOptions:!0,showAdvanced:!1})}):e({})},updateSectionTitle:function(){var e=f.a.get(this.tempModel.get("type"));if(e){this.updateSectionTitleDestabilized();var t=s.a.escape(e.title);this.ui.headerSectionType.html(t)}},updateSectionTitleDestabilized:function(){this.ui.headerSectionType.addClass("section-type-title-unstable"),this.ui.headerSectionType.triggerReflow(),
this.ui.headerSectionType.removeClass("section-type-title-unstable")},save:function(){var e=this.ui.saveBtn;this.updateMessage(""),e.addClass("active");var t=this.saveModel();t.always(function(){e.removeClass("active")}),t.fail(s.a.bind(function(e){503===e.status?d.a.trigger("show:modal",new T.a({model:this.server})):this.updateMessage(n.i(c.default)("Your changes could not be saved."))},this)),t.then(s.a.bind(function(){var e=this.model.server.entityID(),t=n.i(u.a)("appStore").dispatch
;if(t(n.i(b.d)({serverEntityID:e})),t(n.i(b.b)({serverEntityID:e})),!this.redirect)return this._deferred.resolve(),void this.hide();var i={machineIdentifier:this.model.server.id},a={isLibraryProvider:!0},r={};this.model.get("type")===g.f&&(r.type=n.i(g.b)(g.m).id,r.sort="addedAt:desc"),window.location.hash=n.i(S.a)(i,a,this.model.id,r),this._deferred.resolve(),this.hide()},this))},saveModel:function(){var e;return this.tempModel.isNew()?(e=this.tempModel.save(),e=e.then(s.a.bind(function(e,t,n){
var i=h.a.parseXML(e);if(201===n.status){if(i.Directory&&(i=i.Directory),!i.key){var a=n.getResponseHeader("Location");a&&(i.key=a.substring(a.lastIndexOf("/")+1))}var r=this.server;return r.supports("advancedFilters")&&(i.filters=!0),this.model=new m.a(i,{parse:!0,server:this.server}),r.get("sections").add(this.model),n}},this))):(this.model.copy(this.tempModel),e=this.model.save()),e=e.then(s.a.bind(this.saveSettings,this)),e=e.then(s.a.bind(this.saveAgentSettings,this))},
saveSettings:function(){var e=l.a.Deferred().resolve(this.model).promise();if(!this.server.supports("sectionSettings"))return e;var t=this.tempModel.settings;if(!t)return e;var n=this.getSettingsChanges(t);if(s.a.isEmpty(n))return e;var i=t.first(),a=i.getSaveParams(n),r=p.join(["/library/sections/",this.model.id,"/prefs"],a),o=s.a.extend(this.server.getXHROptions(r),{type:"PUT"});return l.a.ajax(o).promise().then(function(){return e})},saveAgentSettings:function(){
var e=l.a.Deferred().resolve(this.model).promise(),t=this.tempModel.agentSettings;if(!this.tempModel.agentSettings)return e;var n=this.getSettingsChanges(t);if(s.a.isEmpty(n))return e;var i=t.first(),a=i.getSaveParams(n),r=s.a.result(t,"url"),o=p.join([r,"/set"],a),u=i.server.getXHROptions(o);return l.a.ajax(u).promise().then(function(){return e})},getSettingsChanges:function(e){return e.filter(function(e){return e.changedAttributes()}).reduce(function(e,t){var n=t.get("value")
;return"bool"===t.get("type")&&(n=n?"1":"0"),e[t.get("id")]=n,e},{})},onPaneShow:function(e,t){this.listenTo(t,"valid",this.updateSaveBtn),this.listenTo(t,"invalid",this.updateSaveBtn),this.updateSaveBtn()},onPaneHide:function(e,t){this.stopListening(t,"valid",this.updateSaveBtn),this.stopListening(t,"invalid",this.updateSaveBtn)},onChangePaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"))},onSaveClick:function(e){
e.preventDefault();var t=this.ui.saveBtn;if(!t.isDisabled())if(t.hasClass("next")){var n=this.panes[this.selectedPane].nextPane;"folders"!==n||this.showFolders||(n=this.ui.sidebar.find(".options-btn").isDisabled()?"advanced":"options"),n&&!this.ui.sidebar.find("."+n+"-btn").isDisabled()&&this.showPane(n)}else this.save()},onGeneralFormSubmit:function(e){this.onSaveClick(e)},onSectionTypeChange:function(){this.updateSaveBtn()}});t.a=E},function(e,t,n){"use strict"
;var i=n(3045),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=u.a.ItemView.extend({className:"player-slider",template:a.a,dragging:!1,ui:{thumb:".player-slider-thumb",track:".player-slider-track",progress:".player-slider-progress"},events:{mousedown:"onMouseDown",touchstart:"onTouchStart"},onlyAfterRender:["displayValue"],initialize:function(e){s.a.bindAll(this,"onMouseMove","onMouseUp","onTouchMove","onTouchEnd"),this.$document=l()(document),this.currentValue=e.value||0},
startDragging:function(){this.dragging=!0,this.$el.addClass("active")},stopDragging:function(){this.dragging=!1,this.$el.removeClass("active"),this.triggerMethod("dragComplete")},updateForPosition:function(e,t){var n=this.getValueForPosition(e);this.setValue(n)&&this.displayValue(n,t)},getValueForPosition:function(e){var t=this.ui.track,n=e-t.offset().left,i=n/t.width();return i=Math.min(Math.max(i,0),1),i=Math.round(100*i)},setValue:function(e){return this.currentValue=e,
this.trigger("change:value",e),!0},displayValue:function(e,t){this.ui.thumb.css("left",e+"%"),this.ui.progress.css("width",e+"%"),this.$el.data("value",e)},onRender:function(){this.displayValue(this.currentValue)},onClose:function(){this.$document.off("mousemove",this.onMouseMove),this.$document.off("mouseup",this.onMouseUp),this.$document.off("touchmove",this.onTouchMove),this.$document.off("touchend",this.onTouchEnd)},onMouseDown:function(e){e.preventDefault(),
this.$document.on("mousemove",this.onMouseMove),this.$document.on("mouseup",this.onMouseUp),this.startDragging(),this.setValue(this.getValueForPosition(e.pageX))},onTouchStart:function(e){this.$document.on("touchmove",this.onTouchMove),this.$document.on("touchend",this.onTouchEnd),this.startDragging();var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX)},onMouseMove:function(e){e.preventDefault(),this.updateForPosition(e.pageX)},onTouchMove:function(e){e.preventDefault()
;var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX)},onMouseUp:function(e){e.preventDefault(),this.$document.off("mousemove",this.onMouseMove),this.$document.off("mouseup",this.onMouseUp),this.updateForPosition(e.pageX),this.stopDragging()},onTouchEnd:function(e){this.$document.off("touchmove",this.onTouchMove),this.$document.off("touchend",this.onTouchEnd);var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX),this.stopDragging()}});t.a=c},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.children,i=e.kind;return r()("span",{className:u()(t,d.a.badge,d.a[i],!n&&d.a.isHidden)},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(82)),l=n(30),u=n.n(l),c=n(2536),d=n.n(c);i.defaultProps={kind:o.DEFAULT},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(2),h=n.n(d),p=n(1),f=n.n(p),g=n(30),m=n.n(g),v=n(33),y=n(27),b=n(25),S=n(2547),I=n.n(S),w=function(e){function t(n,i){s()(this,t)
;var a=l()(this,e.call(this,n,i));return a.onMouseDown=function(e){e.preventDefault(),0===e.button&&a._startDrag(e.pageX)},a.onMouseMove=function(e){if(!a.state.isDragging){var t=a._getValueForPosition(e.pageX);a.props.onMove({positionValue:t,steppedValue:a._getSteppedValue(t)})}},a.onTouchStart=function(e){e.preventDefault();var t=h.a.first(e.touches);t&&a._startDrag(t.pageX,!0)},a.onDocumentMouseMove=function(e){a._drag(e.pageX)},a.onDocumentTouchMove=function(e){var t=h.a.first(e.touches)
;t&&a._drag(t.pageX)},a.onDocumentMouseUp=function(e){a._stopDrag(e.pageX)},a.onDocumentTouchEnd=function(e){var t=h.a.first(e.changedTouches);t&&a._stopDrag(t.pageX)},a.state={isDragging:!1},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._stopListeningForDrag()},t.prototype._listenForDrag=function(e){e?(document.addEventListener("touchmove",this.onDocumentTouchMove),
document.addEventListener("touchcancel",this.onDocumentTouchEnd),document.addEventListener("touchend",this.onDocumentTouchEnd)):(document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp))},t.prototype._stopListeningForDrag=function(){document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("touchmove",this.onDocumentTouchMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),
document.removeEventListener("touchcancel",this.onDocumentTouchEnd),document.removeEventListener("touchend",this.onDocumentTouchEnd)},t.prototype._startDrag=function(e,t){document.body.classList.add(I.a.isDragging),this.setState({isDragging:!0}),this._changeValue(this._getValueForPosition(e)),this._listenForDrag(t),this.props.onDragStart&&this.props.onDragStart()},t.prototype._drag=function(e){this._changeValue(this._getValueForPosition(e))},t.prototype._stopDrag=function(e){
document.body.classList.remove(I.a.isDragging),this._stopListeningForDrag();var t=this._getValueForPosition(e),n=this._getSteppedValue(t);this._changeValue(t),this.setState({isDragging:!1}),this.props.onDragComplete&&this.props.onDragComplete({positionValue:t,steppedValue:n})},t.prototype._getValueForPosition=function(e){var t=this.props,i=t.min,a=t.max;n.i(v.a)(a>i,"The max, "+a+", must be greater than the min, "+i)
;var r=this.refs.track,s=r.getBoundingClientRect(),o=s.left+document.body.scrollLeft,l=e-o,u=l/r.offsetWidth;return u=Math.min(Math.max(u,0),1),(a-i)*u+i},t.prototype._getSteppedValue=function(e){var t=this.props,i=t.min,a=t.max,r=t.stepSize;if(!r)return e;n.i(v.a)(r>=1,"The step size, "+r+", must be greater or equal to 1");var s=Math.round(e/r)*r;return Math.min(Math.max(s,i),a)},t.prototype._getStickyValue=function(e){var t=this.props,n=t.max,i=t.min,a=t.stepSize,r=t.stickiness
;if(!a||!r)return e;var s=this._getSteppedValue(e);return Math.abs(s-e)/(n-i)<r/100?s:e},t.prototype._changeValue=function(e){e!==this.props.value&&this.props.onChange({positionValue:e,steppedValue:this._getSteppedValue(e)})},t.prototype._getPercent=function(e,t,n){return(e-t)/(n-t)*100},t.prototype.render=function(){
var e=this.props,t=e.style,n=e.className,i=e.trackClassName,r=e.fillClassName,s=e.thumbClassName,o=e.label,l=e.value,u=e.min,c=e.max,d=e.showFill,h=e.autoHideThumb,p=e.onMove,g=this.state.isDragging,v=this._getPercent(this._getStickyValue(l),u,c);return a()("div",{style:t,className:m()(n,g&&I.a.isDragging,h&&I.a.hasAutoHideThumb),onMouseDown:this.onMouseDown,onMouseMove:p&&this.onMouseMove,onTouchStart:this.onTouchStart},void 0,f.a.createElement("div",{className:i,ref:"track"},d&&a()("div",{
className:r,style:{width:v+"%"}})),a()(b.a,{className:s,style:{left:v+"%"},role:"slider","aria-labelledby":o,"aria-valuemin":u,"aria-valuemax":c,"aria-valuenow":l}))},t}(p.Component);w.defaultProps={className:I.a.slider,trackClassName:I.a.track,fillClassName:I.a.fill,thumbClassName:I.a.thumb,min:0,max:100,stepSize:0,stickiness:10,showFill:!1,autoHideThumb:!1},t.a=w},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(30),y=n.n(v),b=n(22),S=n(25),I=n(563),w=n(2553),M=n.n(w),C=function(e){function t(){return c()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.arrowClassName,i=e.children,r=e.direction,o=e.kind,u=e.size,c=e.isSelected,d=l()(e,["className","arrowClassName","children","direction","kind","size","isSelected"]),h=u||b.d.MEDIUM;return m.a.createElement(S.a,a()({className:y()(t,M.a[h],c&&M.a.isSelected),"aria-haspopup":!0,kind:o,size:u,isSelected:c},d),i,s()(I.a,{className:y()(n,M.a[r],M.a[h]),direction:r,kind:o,size:h,isSelected:c}))},t}(g.Component);C.defaultProps={className:M.a.disclosureArrowButton,
arrowClassName:M.a.disclosureArrow,direction:b.f.DOWN,isSelected:!0},t.a=C},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.selectedClassName,a=e.circleClassName,s=e.iconClassName,l=e.title,c=e.isSelected,h=u()(e,["className","selectedClassName","circleClassName","iconClassName","title","isSelected"]);return d.a.createElement(m.a,r()({className:p()(t,c&&i),"aria-label":c?n.i(f.default)("Deselect {title}",{title:l}):n.i(f.default)("Select {title}",{title:l})},h),o()("div",{
className:a},void 0,o()(g.a,{name:"plex-icon-selected-560",className:s})))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(30),p=n.n(h),f=n(4),g=n(29),m=n(25),v=n(2557),y=n.n(v);i.defaultProps={className:y.a.selectButton,selectedClassName:y.a.isSelected,circleClassName:y.a.selectCircle,iconClassName:y.a.selectedIcon},t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(30),y=n.n(v),b=n(99),S=n(2561),I=n.n(S),w=function(e){function t(n,i){c()(this,t);var a=h()(this,e.call(this,n,i));return a.setRef=function(e){a._checkbox=e},a.onChange=function(e){var t=e.target.checked,n=t?a.props.checkedValue:a.props.uncheckedValue;a.props.value!==n&&a.props.onChange(n)},a._checkbox=null,a}return f()(t,e),t.prototype.componentDidMount=function(){
this.setIndeterminate()},t.prototype.componentDidUpdate=function(){this.setIndeterminate()},t.prototype.setIndeterminate=function(){if(this._checkbox){var e=this.props,t=e.value,n=e.uncheckedValue,i=e.checkedValue;this._checkbox.indeterminate=t!==n&&t!==i}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.inputClassName,i=e.errorClassName,r=e.disabledClassName,o=e.isDisabled,u=e.size,c=e.checkboxText,d=e.name,h=(e.initialValue,e.value),p=e.checkedValue,f=(e.uncheckedValue,
e.showErrors,e.hasError),g=(e.errors,e.validations,l()(e,["className","inputClassName","errorClassName","disabledClassName","isDisabled","size","checkboxText","name","initialValue","value","checkedValue","uncheckedValue","showErrors","hasError","errors","validations"]));return s()("label",{className:y()(t,I.a[u],o&&r,f&&i),htmlFor:d},void 0,m.a.createElement("input",a()({},g,{id:d,type:"checkbox",disabled:o,className:n,checked:h===p,ref:this.setRef,onChange:this.onChange})),c)},t}(g.Component)
;w.defaultProps={className:I.a.label,inputClassName:I.a.input,errorClassName:I.a.hasError,disabledClassName:I.a.isDisabled,isDisabled:!1,size:b.LARGE,uncheckedValue:!1,checkedValue:!0,value:!1,hasError:!1},t.a=w},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=o()(e,["children","className"]);return u.a.createElement("p",r()({},i,{className:n}),t)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(2563),d=n.n(c);i.defaultProps={className:d.a.help},t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.name,i=e.labelText,a=e.showErrors,s=e.errors,l=s[0];return r()(o.a,{className:t,hasError:a,name:n},void 0,i,a&&l&&" \u2014 "+l)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(121));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.labelText,i=e.helpText,a=e.showErrors,s=e.errors,l=u()(e,["name","labelText","helpText","showErrors","errors"]);return o()(p.a,{},void 0,o()(f.a,{showErrors:a,errors:s,name:t,labelText:n
}),d.a.createElement(m.a,r()({name:t,hasError:a},l)),i&&o()(g.a,{},void 0,i))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(132),p=n(193),f=n(416),g=n(415),m=n(194);t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){var t,n=e.label,i=e.value;return t={},t[i]=n,t})}function a(e){var t=e.id,n=e.type,a=e.label,r=e.summary,o=e.value,f=e.initialValueModifier,g=e.enumValues,m={name:t,
helpText:r,initialValue:f(o)};if(Array.isArray(g))return l.a.createElement(c.a,s()({labelText:a},m,{values:i(g)}));switch(n){case u.a.TEXT:return l.a.createElement(d.a,s()({labelText:a},m));case u.a.BOOL:return l.a.createElement(p.a,s()({checkboxText:a},m));case u.a.INT:return l.a.createElement(h.a,s()({labelText:a},m));default:return null}}var r=n(6),s=n.n(r),o=n(1),l=n.n(o),u=n(707),c=n(417),d=n(567),h=n(1991),p=n(566);a.defaultProps={initialValueModifier:function(e){return e}},t.a=a
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.component,a=e.width,s=e.height,l=e.url,c=u()(e,["className","children","component","width","height","url"]);return o()("div",{className:t,style:{width:a,height:s}},void 0,d.a.createElement(i,r()({width:a,height:s,url:l},c)),n)}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(2577),p=n.n(h);i.defaultProps={className:p.a.card},t.a=i},function(e,t,n){"use strict";function i(){return r()("div",{
className:l.a.separator})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2583)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return r()("div",{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2623)),l=n.n(o);i.defaultProps={className:l.a.hubCellTitle},t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e,t){return t.listContext},function(e,t){return t.cellWidth
},n.i(d.a)(),n.i(h.a)(),n.i(p.a)(),n.i(f.a)(),g.a,function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r=arguments[4],s=arguments[5],o=arguments[6],l=n.i(c.a)(t,null,a,i,e);return{isContinueWatching:e===u.b,metadataKey:i.key,type:a,selectionType:r,activeSelectionType:o.activeSelectionType,isSelected:s,imageWidth:l.width,imageHeight:l.height,imageUrl:l.url,isFolder:i.isFolder}})}function a(e,t){var i=t.metadataListEntityID;return{onSelectItem:function(t){
e(n.i(m.a)(s()({metadataListEntityID:i},t)))},onDeselectItem:function(t){e(n.i(m.b)(s()({metadataListEntityID:i},t)))}}}var r=n(6),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(35)),c=n(440),d=n(24),h=n(549),p=n(403),f=n(402),g=n(109),m=n(130),v=n(2046);t.a=n.i(o.b)(i,a)(v.a)},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[f.a];case"show":return[f.a];case"episode":return[g.a,m.a];case"playlist":return[f.a];default:return[f.a]}}function a(e){
var t=e.serverEntityID,a=e.target,r=e.useStaticHeight,o=e.children,u=a.type,f=a.thumb,g=a.grandparentThumb,m="playlist"===u?"show":u;return l()("div",{className:S.a.container},void 0,l()("div",{className:S.a.left},void 0,l()(h.a,{serverEntityID:t,component:p.a,type:m,width:I,height:n.i(d.a)(I,m),url:g||f},void 0,l()("div",{className:S.a.subscriptionBadge},void 0,l()(v.a,{type:u})))),l()("div",{className:S.a.right},void 0,l()("div",{className:r?S.a.staticHeightTitleContainer:S.a.titleContainer
},void 0,i(u).map(function(e,t){return c.a.createElement(y.a,s()({key:t,component:e,isSecondary:t>0},a))})),o))}var r=n(6),s=n.n(r),o=n(3),l=n.n(o),u=n(1),c=n.n(u),d=n(203),h=n(419),p=n(425),f=n(427),g=n(580),m=n(587),v=n(577),y=n(2080),b=n(2641),S=n.n(b),I=130;a.defaultProps={useStaticHeight:!1},t.a=a},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(30),y=n.n(v),b=n(27),S=n(166),I=n(204),w=n.n(I),M=n(2084),C=n(2644),D=n.n(C),P="faceFront",T=n.i(S.a)(w.a.posterFlipSpeed),x={transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionAppearTimeout:0,transitionEnterTimeout:0,transitionLeaveTimeout:0},E=function(e){function t(n,i){c()(this,t);var a=h()(this,e.call(this,n,i))
;return a.onImageLoad=function(){a.state.isLoadingFace&&a._flipCard()},a.onImageError=function(){a.state.isLoadingFace&&a._flipCard()},a.onFlipComplete=function(){a.setState({isFlippingFace:!1,previousImageUrl:null})},a.state={visibleFace:P,isLoadingFace:!1,isFlippingFace:!1,previousImageUrl:null},a}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props.imageUrl,n=e.imageUrl&&t!==e.imageUrl;this.props.metadataKey===e.metadataKey&&n&&this._prepareFlip(t)},
t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._cancelFlip()},t.prototype._prepareFlip=function(e){this._cancelFlip(),this.setState({isLoadingFace:!0,isFlippingFace:!0,previousImageUrl:e})},t.prototype._flipCard=function(){this.setState({isLoadingFace:!1,visibleFace:this._getInverseFace(this.state.visibleFace)}),this._flipTimeoutID=setTimeout(this.onFlipComplete,T)},t.prototype._cancelFlip=function(){
this._flipTimeoutID&&(this._flipTimeoutID=clearTimeout(this._flipTimeoutID))},t.prototype._getInverseFace=function(e){return e===P?"faceBack":P},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.cardClassName,i=e.cardFaceClassName,r=e.metadataKey,o=e.imageWidth,u=e.imageHeight,c=e.imageUrl,d=l()(e,["className","cardClassName","cardFaceClassName","metadataKey","imageWidth","imageHeight","imageUrl"]),h=this.state,p=h.visibleFace,f=h.isLoadingFace,g=h.isFlippingFace,v=h.previousImageUrl,b=this._getInverseFace(p),S={width:o,height:u};return s()("div",{className:t,"data-qa-id":"metadataPosterCard--"+r},r,s()("div",{
className:y()(n,"faceBack"===p&&D.a.isFlipped),style:S},void 0,m.a.createElement(M.a,a()({key:p,className:i,visibleFace:p,imageWidth:o,imageHeight:u,imageUrl:f?v:c,imageTransitionProps:g?x:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},d)),g&&m.a.createElement(M.a,a()({key:b,className:i,visibleFace:b,imageWidth:o,imageHeight:u,imageUrl:f?c:v,imageTransitionProps:g?x:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},d))))},t}(g.Component);E.defaultProps={
className:D.a.cardContainer,cardClassName:D.a.card},t.a=E},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.type,i=e.isOffscreen,a=e.url,s=e.width,u=e.height,c=e.isFolder,d=e.transitionProps,h=e.onLoad,p=e.onError;return i?null:a?r()(o.a,{serverEntityID:t,url:a,width:s,height:u,backgroundPosition:"artist"===n?"center top":"center",transitionProps:d,onLoad:h,onError:p}):r()(l.a,{type:n,width:s,height:u,isFolder:c})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(878)),l=n(900);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.imageWidth,n=e.imageHeight,i=e.activeSelectionType,a=e.isSelected,s={width:t,height:n};return r()("div",{className:l()(c.a.placeholder,a&&c.a.isSelected,!!i&&!a&&c.a.isOtherItemSelected),style:s})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n.n(o),u=n(2648),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){
"use strict";function i(e,t){return n.i(c.createSelector)(d.a,n.i(h.a)(),function(e,t){return t.hideUnrated},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=e.features[f.a.RATE],a=i&&!t.isFolder,r=(t.userRating||0)/2,s=n&&0===r;return{showRating:!(!a||s),value:r}})}function a(e,t){return{onRatingChange:function(i){e(n.i(p.rateMetadataItem)({metadataItemEntityID:t.metadataItemEntityID,providerEntityID:t.providerEntityID,rating:0===i?-1:2*i,
metricsPage:t.metricsPage}))}}}function r(e){var t=e.showRating,n=o()(e,["showRating"]);return t?u.a.createElement(m.a,n):null}var s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(8),d=(n.n(c),n(45)),h=n(24),p=n(107),f=n(139),g=n(129),m=n(2132),v=n.i(g.a)(i,a)(r);v.propTypes={hideUnrated:l.PropTypes.bool},t.a=v},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{year:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).year}})}
var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(916);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){return r.a.createElement(s.a,e)}var a=n(1),r=n.n(a),s=n(410),o=n(2662),l=n.n(o);i.defaultProps={className:l.a.badge},t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.machineIdentifier,i=e.providerIdentifier,a=e.isLibraryProvider,s=e.directories,l=e.selectedDirectory,p=o()(e,["machineIdentifier","providerIdentifier","isLibraryProvider","directories","selectedDirectory"]),f=l&&(l.hubKey||l.key),g=encodeURIComponent(t),m=encodeURIComponent(i);return u.a.createElement(d.a,p,s&&s.map(function(e){var t=e.key,i=e.hubKey,s=e.title,o=e.isHomeDirectory;if(a&&!i)return null
;var l=i||t,u=encodeURIComponent(l),d=a?"#!/server/"+g+"/dashboard?key="+u:"#!/server/"+g+"/provider/"+m+"?key="+u;return r()(h.a,{"data-qa-id":"directoriesMenuItem--"+l,to:d,isSelected:f===l},l,o?n.i(c.default)("All Libraries"):s)}))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(80),h=n(122);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.labelClassName,a=e.contentClassName,s=e.label;return r()("div",{className:n},void 0,r()("div",{
className:i},void 0,s),r()("div",{className:a},void 0,t))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2709)),l=n.n(o);i.defaultProps={className:l.a.groupItem,labelClassName:l.a.label,contentClassName:l.a.content},t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),n.i(u.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],contentRating:n.contentRating}})}
var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(306),c=n(2252);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.onPress;return o()(d.a,{className:c()(f.a.sectionWrapper,n),component:"div",onPress:i},void 0,t)}function a(e){var t=e.children,n=e.className;return o()("div",{className:c()(f.a.sectionWrapper,n)},void 0,t)}function r(e){var t=e.errorMessage,n=e.children,r=e.className,s=e.onErrorDismiss,l=e.onPress,u=l?i:a;return o()(u,{
className:r,onPress:l},void 0,t&&o()(h.a,{errorMessage:t,onErrorDismiss:s}),o()("div",{className:f.a.section},void 0,n))}var s=n(3),o=n.n(s),l=n(1),u=(n.n(l),n(30)),c=n.n(u),d=n(25),h=n(227),p=n(2756),f=n.n(p);t.a=r},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.metricsPage,i=e.metricsPane;return r()(o.a,{metricsPage:n,metricsProperties:{pane:i}},void 0,r()("div",{className:u.a.content},void 0,t))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(196)),l=n(2759),u=n.n(l);t.a=i
},function(e,t,n){"use strict";function i(e){return r()("h2",{className:l.a.header},void 0,e.children)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2760)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.selectedKey,n=e.isPlexCloudVisible,i=e.isWebhooksVisible,a=e.isUserUnrestricted,s=e.myPlexUrl,o=e.title;return r()(p.a,{selectedKey:t,isPlexCloudVisible:n,isWebhooksVisible:i,isUserUnrestricted:a,myPlexUrl:s,title:o})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(14)),l=n(8),u=(n.n(l),
n(728)),c=n(182),d=n(495),h=n(496),p=n(2395),f=n.i(l.createSelector)(u.a,c.a,d.a,h.a,function(e,t,n,i){return{isPlexCloudVisible:!!n.cpms,isWebhooksVisible:!!i.webhooks,isUserUnrestricted:!t.restricted,myPlexUrl:e,title:t.title}});t.a=n.i(o.b)(f)(i)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=(n.n(p),n(13)),g=n(46),m=n(68),v=n(22),y=n(27),b=n(147),S=n(2401),I=function(e){function t(){var i,a,r;l()(this,t)
;for(var o=arguments.length,u=Array(o),d=0;d<o;d++)u[d]=arguments[d];return i=a=c()(this,e.call.apply(e,[this].concat(u))),a.onModalClose=function(){n.i(f.a)("metrics").trackClick(s()({},a.props.metricsProperties,{page:g.d,action:m.a})),a.props.onModalClose()},r=i,c()(a,r)}return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=e.metricsProperties;return a()(b.a,{size:v.d.LARGE,isOpen:t,
metricsPage:g.d,metricsProperties:n,onModalClose:this.onModalClose},void 0,a()(S.a,{metricsProperties:n,onModalClose:this.onModalClose}))},t}(p.Component);t.a=I},function(e,t,n){"use strict";function i(e,t,n){return e[n]&&e[n][t]?e[n][t]:e[t]||h}function a(e,t,n){return e?r.a.EPG_IDENTIFIER.test(n.identifier)?i(d,e,t):i(c,e,t):h}var r=n(73),s=n(35),o=n(71);t.a=a;var l,u,c=(l={},l[s.a]={track:[o.b]},l.movie=[o.e,o.b,o.c],l.show=[o.e,o.b,o.c],l.season=[o.e,o.b],l.episode=[o.e,o.b,o.c],
l.artist=[o.e,o.b,o.c],l.album=[o.e,o.b,o.c],l.track=[o.e,o.b],l.photo=[o.a],l.photoalbum=[o.a],l.clip=[o.e,o.b],l),d=(u={},u[s.a]={episode:[o.d]},u.movie=[o.e],u.show=[o.e],u.episode=[o.e],u),h=[o.e]},function(e,t,n){"use strict";function i(e){return e.thumb||e.parentThumb||e.grandparentThumb}function a(e){return e.art||e.parentArt||e.grandparentArt}function r(e,t,n){if(n)switch(n){case o.a:switch(e){case"season":return t.thumb;case"episode":return t.thumb;case"album":return t.thumb
;case"track":return t.thumb}break;case o.b:switch(e){case"movie":return a(t);case"episode":return a(t)||t.thumb}}switch(e){case"movie":return t.thumb;case"show":return t.thumb;case"season":return i(t);case"episode":return t.grandparentThumb;case"artist":return t.thumb;case"album":return i(t);case"track":return i(t);case"photo":return t.thumb;case"photoalbum":return t.thumb;case"clip":return t.thumb;case"playlist":return t.composite;default:return t.thumb}}function s(e,t,i,a,s){
var o=null==e?n.i(l.b)(t,i,s):e,u=null==t?n.i(l.a)(e,i,s):t;return{url:r(i,a,s),width:o,height:u}}var o=n(35),l=n(203);t.a=s},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(441);e.exports=function(e){return Object(i(e))}},function(e,t){var n=0,i=Math.random()
;e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},n=t.publishSource,i=t.clientOffset,a=t.getSourceClientOffset;(0,c.default)((0,h.default)(e),"Expected sourceIds to be an array.");var r=this.getMonitor(),s=this.getRegistry();(0,
c.default)(!r.isDragging(),"Cannot call beginDrag while dragging.");for(var o=0;o<e.length;o++)(0,c.default)(s.getSource(e[o]),"Expected sourceIds to be registered.");for(var l=null,u=e.length-1;u>=0;u--)if(r.canDragSource(e[u])){l=e[u];break}if(null!==l){var d=null;i&&((0,c.default)("function"==typeof a,"When clientOffset is provided, getSourceClientOffset must be a function."),d=a(l));var p=s.getSource(l),g=p.beginDrag(r,l);(0,c.default)((0,f.default)(g),"Item must be an object."),
s.pinSource(l);var m=s.getSourceType(l);return{type:v,itemType:m,item:g,sourceId:l,clientOffset:i,sourceClientOffset:d,isSourcePublic:n}}}function r(){if(this.getMonitor().isDragging())return{type:y}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset,i=void 0===n?null:n;(0,c.default)((0,h.default)(e),"Expected targetIds to be an array.");var a=e.slice(0),r=this.getMonitor(),s=this.getRegistry();(0,
c.default)(r.isDragging(),"Cannot call hover while not dragging."),(0,c.default)(!r.didDrop(),"Cannot call hover after drop.");for(var o=0;o<a.length;o++){var l=a[o];(0,c.default)(a.lastIndexOf(l)===o,"Expected targetIds to be unique in the passed array.");var u=s.getTarget(l);(0,c.default)(u,"Expected targetIds to be registered.")}for(var d=r.getItemType(),p=a.length-1;p>=0;p--){var f=a[p],g=s.getTargetType(f);(0,m.default)(g,d)||a.splice(p,1)}for(var v=0;v<a.length;v++){var y=a[v]
;s.getTarget(y).hover(r,y)}return{type:b,targetIds:a,clientOffset:i}}function o(){var e=this,t=this.getMonitor(),n=this.getRegistry();(0,c.default)(t.isDragging(),"Cannot call drop while not dragging."),(0,c.default)(!t.didDrop(),"Cannot call drop twice during one drag operation.");var i=t.getTargetIds().filter(t.canDropOnTarget,t);i.reverse(),i.forEach(function(i,a){var r=n.getTarget(i),s=r.drop(t,i);(0,c.default)(void 0===s||(0,
f.default)(s),"Drop result must either be an object or undefined."),void 0===s&&(s=0===a?{}:t.getDropResult()),e.store.dispatch({type:S,dropResult:s})})}function l(){var e=this.getMonitor(),t=this.getRegistry();(0,c.default)(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId();return t.getSource(n,!0).endDrag(e,n),t.unpinSource(),{type:I}}Object.defineProperty(t,"__esModule",{value:!0}),t.END_DRAG=t.DROP=t.HOVER=t.PUBLISH_DRAG_SOURCE=t.BEGIN_DRAG=void 0,t.beginDrag=a,
t.publishDragSource=r,t.hover=s,t.drop=o,t.endDrag=l;var u=n(105),c=i(u),d=n(240),h=i(d),p=n(355),f=i(p),g=n(998),m=i(g),v=t.BEGIN_DRAG="dnd-core/BEGIN_DRAG",y=t.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",b=t.HOVER="dnd-core/HOVER",S=t.DROP="dnd-core/DROP",I=t.END_DRAG="dnd-core/END_DRAG"},function(e,t,n){"use strict";function i(e){return{type:o,sourceId:e}}function a(e){return{type:l,targetId:e}}function r(e){return{type:u,sourceId:e}}function s(e){return{type:c,targetId:e}}
Object.defineProperty(t,"__esModule",{value:!0}),t.addSource=i,t.addTarget=a,t.removeSource=r,t.removeTarget=s;var o=t.ADD_SOURCE="dnd-core/ADD_SOURCE",l=t.ADD_TARGET="dnd-core/ADD_TARGET",u=t.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",c=t.REMOVE_TARGET="dnd-core/REMOVE_TARGET"},function(e,t,n){function i(e,t){for(var n=e.length;n--;)if(a(e[n][0],t))return n;return-1}var a=n(458);e.exports=i},function(e,t,n){function i(e){return null==e?void 0===e?l:o:u&&u in Object(e)?r(e):s(e)}
var a=n(642),r=n(3132),s=n(3156),o="[object Null]",l="[object Undefined]",u=a?a.toStringTag:void 0;e.exports=i},function(e,t,n){function i(e,t){var n=e.__data__;return a(t)?n["string"==typeof t?"string":"hash"]:n.map}var a=n(3141);e.exports=i},function(e,t,n){function i(e,t){var n=r(e,t);return a(n)?n:void 0}var a=n(3119),r=n(3133);e.exports=i},function(e,t,n){var i=n(456),a=i(Object,"create");e.exports=a},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){
function i(e){return r(e)&&a(e)}var a=n(648),r=n(356);e.exports=i},function(e,t,n){e.exports=n(3177)()},function(e,t,n){"use strict";function i(e,t){}t.__esModule=!0,t.default=i,e.exports=t.default},,,,,,,,function(e,t,n){"use strict";var i=n(138),a=i.a.extend({interface:["publish","subscribe","unsubscribe","registerPlayer","unregisterPlayer","debugStatus","getDeepLink"]});t.a=new a},function(e,t,n){"use strict";var i=n(138),a=new i.a({interface:["init","enable","disable","set","capture"]})
;t.a=a},function(e,t,n){"use strict";var i=n(138),a=new i.a({props:["shortcuts"]});t.a=a},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(38),s=n(28),o=r.a.extend({getStorage:function(){},get:function(e){var t=this;return this._catchStorageError(function(n){var i=window.PLEXWEB,a=i&&e in i?i[e]:n.getItem(e);if(null==a)throw new Error(e+" is not in "+t.name);return a})},set:function(e,t){var n=this;return this._catchStorageError(function(i){
if(!e)throw new Error("Unable to set value in "+n.name+" without a key");if(null==t)throw new Error("Unable to set null or undefined value for "+e+" in "+n.name+". Use the remove function.");return i.setItem(e,t)})},remove:function(e){return this._catchStorageError(function(t){return t.removeItem(e)})},clear:function(){return this._catchStorageError(function(e){return e.clear()})},_catchStorageError:function(e){var t=a.a.Deferred();try{t.resolve(e(this.getStorage()))}catch(e){
s.a.warn(e.message),t.reject(e)}return t.promise()}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(38),s=n(28),o=r.a.extend({maximumDelay:30,initialize:function(e){var t=e.callback,n=e.logFormat;this._serversBeingRetried={},this.callback=t,this.logFormat=n},start:function(e){this._serversBeingRetried[e.id]||this.supportsRetry(e)&&(this._serversBeingRetried[e.id]={server:e,attempt:1},this._scheduleRetry(e))},stop:function(e){var t=this._serversBeingRetried[e.id]
;t&&(clearTimeout(t.timeout),delete this._serversBeingRetried[e.id])},stopAll:function(){var e=this;a.a.each(this._serversBeingRetried,function(t,n){clearTimeout(t.timeout),delete e._serversBeingRetried[n]})},supportsRetry:function(e){return!0},_scheduleRetry:function(e){var t=this,i=this._serversBeingRetried[e.id],a=Math.min(this.maximumDelay,i.attempt);n.i(s.a)(this.logFormat,e.get("debugName"),a),i.timeout=setTimeout(function(){t.callback(e),i.attempt++,t._scheduleRetry(e)},1e3*a)}});t.a=o
},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(40),l=n(767),u=n(765),c=n(766),d=n(1216),h={modelDefaults:function(){
var e=a.a.omit(a.a.result(this.model,"defaults"),["playQueueItem","metadataItem","playQueue","transcodeServer","state","stopped","paused","playing","buffering","error","volume","shuffled","repeatAll","repeatItem","slideshowState","slideshowPlaying","slideshowPaused"]),t=this.model.get("playQueue"),n=!!this.previousItem,i=!!this.nextItem&&!this.currentItem.get("isAdvertisement");return this.webRadioUsage&&i&&(i=this.webRadioUsage.get("canSkipNext")),a.a.extend(e,{playQueueItem:this.currentItem,
metadataItem:this.currentItem.get("metadataItem"),type:this.type,canRepeat:!0,canSkipPrevious:n,canSkipNext:i,canShuffle:!t.get("hasUpNext"),shuffled:t.get("shuffled")})},modelOverrides:function(){var e={};this.webRadioUsage&&!this.webRadioUsage.get("canSkipNext")&&(e.canSkipNext=!1);var t=this.model.get("playQueue");return t&&t.get("isRadio")&&(t.get("allowSeek")||(e.canSeek=!1),t.get("allowRepeat")||(e.canRepeat=!1,e.showPlayQueue=!1),t.get("allowShuffle")||(e.canShuffle=!1,
e.showPlayQueue=!1),t.get("allowSkipPrevious")||(e.canSkipPrevious=!1,e.showPlayQueue=!1)),this.currentItem.get("advertisement")&&(e.canSkipPrevious=!1,e.canSkipNext=!1,e.canSeek=!1,e.showPlayQueue=!1),this.currentItem.server.get("transcoderLyrics")||(e.showLyrics=!1),e},initialize:function(e){this.stoppedSessions={},this.stop=a.a.wrap(this.stop,a.a.bind(function(e){return!this.model||this.model.get("stopped")?s.a.Deferred().resolve().promise():e.apply(this,[].slice.call(arguments,1))},this)),
this.seekBackward=this.seek.bind(this,-1e4,0,0),this.seekForward=this.seek.bind(this,3e4,0,3e3),this.timeline=this.timeline.bind(this)},request:function(e){return this.pendingRequests||(this.pendingRequests=[]),this.pendingRequests.push(e),e.always(a.a.bind(function(){var t=a.a.indexOf(this.pendingRequests,e);this.pendingRequests.splice(t,1)},this)),e},waitForRequests:function(){return s.a.when.apply(s.a,this.pendingRequests)},reset:function(e){this.currentItem&&(this.timeline({
state:o.a.states.STOPPED,continuing:!0}),this.stopTimeline(),this.stopSession({continuing:!0})),this.currentItem=e,this.previousItem=this.getPreviousItem(e),this.nextItem=this.getNextItem(e),this.setRadioPolicy();var t=a.a.extend(a.a.result(this,"modelDefaults"),this.modelOverrides());return this.model.set(t),e},getItemAtOffset:function(e,t,n){if(t||(t=this.model.get("playQueueItem")),!t||!t.get("ratingKey"))return null;n||(n={})
;var i=this.model.get("playQueue").get("collection"),a=i.indexOf(i.get(t.id)),r=a+e,s=n.loop&&i.length>1||this.model.get("repeatAll");return r>=0&&r<i.length?i.at(r):s?(r=(r+i.length)%i.length,i.at(r)):null},getPreviousItem:function(e,t){return this.getItemAtOffset(-1,e,t)},getNextItem:function(e,t){return this.getItemAtOffset(1,e,t)},mirror:function(){},play:function(){},pause:function(){},playPause:function(){this.model.get("state")===o.a.states.PAUSED?this.play():this.pause()},
setPosition:function(e,t){},canSeek:function(e){return!!this.model.get("canSeek")&&(e!==this.model.get("position")&&e<=this.model.get("duration")&&e>=0)},seek:function(e,t,n,i){var a=this.model.get("position")+e,r=0+(t>=0?t:0),s=this.model.get("duration")-(n>=0?n:0);a=Math.max(r,Math.min(a,s)),this.setPosition(a,i)},setVolume:function(e){},decreaseVolume:function(e){var t=this.model.get("volume");e=e||10,this.setVolume(Math.round(Math.max(t-e,0)))},increaseVolume:function(e){
var t=this.model.get("volume");e=e||10,this.setVolume(Math.round(Math.min(t+e,100)))},skipPrevious:function(){return!!this.model.get("canSkipPrevious")&&(!!this.previousItem&&this.reset(this.previousItem))},skipNext:function(e){if(!e||!e.organic){if(!this.model.get("canSkipNext"))return!1;this.webRadioUsage&&!this.currentItem.get("advertisement")&&this.webRadioUsage.registerSkip()}if(!this.nextItem)return!1;var t=this.model.get("playQueue");if(t&&t.get("isRadio")){
var n=this.nextItem,i=this.getNextItem(n),a=i&&this.getNextItem(i);i&&a||this.refreshPlayQueue()}return this.reset(this.nextItem)},skipTo:function(e){var t=this.model.get("playQueueItem");if(t&&t.get("key")===e)return!1;var n=this.model.get("playQueue"),i=n.get("collection"),a=i.findWhere({key:e});return this.reset(a)},toggleShuffle:function(){var e=this.model.get("playQueue");this.model.get("canShuffle")&&e.toggleShuffle()},nextRepeat:function(){var e=this.model.get("playQueue")
;if(this.model.get("canRepeat")){var t=!this.model.get("repeatAll")&&!this.model.get("repeatItem"),n=this.model.get("repeatAll")&&!this.model.get("repeatItem");e.setRepeatAll(t).done(a.a.bind(function(){this.model.set({repeatAll:t,repeatItem:n})},this))}},removeItem:function(e){return this.model.get("playQueue").removeItem(e)},moveItem:function(e,t){return this.model.get("playQueue").moveItem(e,t)},refreshPlayQueue:function(){this.model.get("playQueue").fetch()},stop:function(e){
this._fadeInterval&&clearInterval(this._fadeInterval),e&&e.silent||this.model.set("state",o.a.states.STOPPED);var t=this.model.get("metadataItem"),n=t.server.get("playQueueManager");if(n){var i=this.model.get("playQueue"),a=n.getFor(t);a&&i&&a===i&&n.remove(i.get("mediaType"))}this.stopListening(),this.webRadioUsage&&(this.stopListening(this.webRadioUsage),this.webRadioUsage.stop())},hardStop:function(){this.stop({async:!1,timeout:2e3})},fadeOut:function(){
this._fadeInterval&&clearInterval(this._fadeInterval),this._fadeInterval=setInterval(a.a.bind(function(){this.model.get("volume")<=0?this.stop():this.decreaseVolume(5)},this),50)},timeline:function(e){var t=this;e||(e={});var i=this.model;if(a.a.defaults(e,i.attributes),this.companion||!e.metadataItem)return s.a.Deferred().resolve().promise();var r=i.get("metadataItem");return this.request(n.i(l.a)(e)).done(function(e){var n=t.model.get("metadataItem")
;r&&n&&r.get("key")!==n.get("key")||i.get("state")!==o.a.states.STOPPED&&e.terminationCode&&i.set({terminationCode:e.terminationCode,terminationText:e.terminationText})})},startTimeline:function(){this.companion||this.serverTimelineInterval||(this.serverTimelineInterval=setInterval(this.timeline,l.a.DELAY))},stopTimeline:function(){this.serverTimelineInterval=clearInterval(this.serverTimelineInterval)},updatePlayQueue:function(){var e=this.model.get("playQueue"),t=this.model.get("playQueueItem")
;return e.get("playQueueSelectedItemID")!==t.get("playQueueItemID")?e.fetch():s.a.Deferred().resolve().promise()},ping:function(){return this.companion?s.a.Deferred().resolve().promise():this.request(n.i(u.a)(this.model.get("transcodeServer"),this.transcodeSessionID))},startPing:function(){var e=this.model.get("directPlay");!(!this.companion&&this.type!==o.a.types.PHOTO)||e||this.pingInterval||(this.pingInterval=setInterval(a.a.bind(this.ping,this),u.a.DELAY))},stopPing:function(){
this.pingInterval=clearInterval(this.pingInterval)},stopSession:function(e){var t=this.transcodeSessionID,i=t||a.a.uniqueId("no-session-"),r=e&&e.xhrOptions||{};if(this.stoppedSessions.hasOwnProperty(i))return this.stoppedSessions[i];this.subcontroller&&this.subcontroller.stop(e);var l;return l=t&&this.type!==o.a.types.PHOTO&&!this.model.get("directPlay")?this.request(n.i(c.a)(this.model.get("transcodeServer"),t,r)):s.a.Deferred().resolve().promise(),this.stoppedSessions[i]=l,l},
setRadioPolicy:function(){var e=this.model.get("playQueue");if(this.webRadioUsage){if(this.webRadioUsage.get("playQueue")===e)return;this.stopListening(this.webRadioUsage),this.webRadioUsage.stop(),this.webRadioUsage=null}if(this.webRadioAdvertisementTimeout&&(this.webRadioAdvertisementTimeout=clearTimeout(this.webRadioAdvertisementTimeout)),e&&e.get("isRadio")){var t=a.a.extend(a.a.pick(e.attributes,d.a.playQueueAttributes),{playQueue:e});this.webRadioUsage=new d.a(t),
this.listenTo(this.webRadioUsage,"change",function(e){var t=e.changedAttributes();t&&this.model.set(t)});var n=this.currentItem;n.get("advertisement")&&n.get("allowSkipAfter")&&(this.webRadioAdvertisementTimeout=setTimeout(a.a.bind(function(){this.model.set("canSkipNext",!!this.nextItem)},this),1e3*n.get("allowSkipAfter")))}},previousChapter:function(){var e=Math.max(this.model.get("lastSeekPosition"),this.model.get("position")),t=this.getPreviousChapterTime(e-5e3)
;void 0!==t&&this.setPosition(t)},nextChapter:function(){var e=Math.max(this.model.get("lastSeekPosition"),this.model.get("position")),t=this.getNextChapterTime(e);void 0!==t&&this.setPosition(t)},getPreviousChapterTime:function(e){var t=this.model.get("metadataItem"),n=t.get("chapters");if(n&&n.length){for(var i=n.length-1;i>=0;i--){var a=n.at(i),r=a.get("startTimeOffset");if(r<e)return r}return 0}},getNextChapterTime:function(e){var t=this.model.get("metadataItem"),n=t.get("chapters")
;if(n&&n.length)for(var i=0;i<n.length;i++){var a=n.at(i),r=a.get("startTimeOffset");if(r>e)return r}},stepBackward:function(){var e=this.model.get("metadataItem"),t=e.get("chapters");t&&t.length?this.previousChapter():this.seek(-6e5,0,0)},stepForward:function(){var e=this.model.get("metadataItem"),t=e.get("chapters");t&&t.length?this.nextChapter():this.seek(6e5,0,3e3)}};t.a=h},function(e,t,n){"use strict";var i=n(113),a=n.n(i),r=n(2),s=n.n(r),o=n(33),l=n(95),u=n(65),c=n(18),d=c.a.extend({
name:"AbstractStorageModel",responseType:u.a.json,save:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this.attributes,r=void 0;if(null==e||s.a.isObject(e)?(r=e,i=t):(r={})[e]=t,i=s.a.extend({validate:!0},i),r&&!i.wait){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;r&&i.wait&&(this.attributes=s.a.extend({},a,r));var o=l.a.getInstance().excludeDefaults,u=this.toJSON({syncedOnly:!0,excludeDefaults:o!==!1
}),c=this._serialize(u),d=l.a.set(this._getStorageKey(),c);return d.done(function(){n.attributes=a,n.trigger("sync",n,a,i)}),d.fail(function(e){n.trigger("error",n,e,i)}),r&&i.wait&&(this.attributes=a),d},destroy:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.wait||this.trigger("destroy",this,this.collection,t);var n=l.a.remove(this._getStorageKey());return n.done(function(n){t.wait&&e.trigger("destroy",e,e.collection,t),e.trigger("sync",e,n,t)}),
n.fail(function(n){e.trigger("error",e,n,t)}),n},sync:function(){this._logError("does not support syncing to a server")},_getStorageKey:function(){var e=s.a.result(this,"storageKey");if(!e)throw new Error(this.name+" requires a `storageKey` property");return e},_fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l.a.get(this._getStorageKey());return n.done(function(n){n&&e.set(e.parse(n)),e.trigger("sync",e,n,t)}),n.fail(function(n){e.trigger("error",e,n,t)
}),n},_serialize:function(e){var t="";try{t=a()(e)}catch(e){this._logError("serialization error: "+e.message)}return t},_warnUnsupportedOptions:function(e){e.parse&&this._logError("does not support the `parse` option. The response from storage is always parsed."),e.success&&this._logError("does not support a `success` callback. Use the returned promise."),e.error&&this._logError("does not support an `error` callback. Use the returned promise.")},_logError:function(e){var t=void 0;try{
t=this._getStorageKey()}catch(e){t="no storageKey"}n.i(o.a)(!1,this.name+" ("+t+") "+e)}});t.a=d},function(e,t,n){"use strict";function i(e,t){return e?c.a.reduce(t,function(t,n,i){return e.indexOf(i)===-1&&(t[i]=n),t},{}):t}function a(e,t){var n;try{n=e._getStorageKey()}catch(e){n="no storageKey"}p.a.error("StorageModel ("+n+") "+t)}var r=n(113),s=n.n(r),o=n(236),l=n.n(o),u=n(2),c=n.n(u),d=n(52),h=n(751),p=n(28),f=n(95),g=n(33),m=d.a.Model.extend({sessionAttrs:[],save:function(e,t,a){
var r,s=this.attributes;if(null==e||"object"===(void 0===e?"undefined":l()(e))?(r=e,a=t):(r={})[e]=t,a=c.a.extend({validate:!0},a),r&&!a.wait){if(!this.set(r,a))return!1}else if(!this._validate(r,a))return!1;r&&a.wait&&(this.attributes=c.a.extend({},s,r)),void 0===a.parse&&(a.parse=!0);var o=this,u=a.success;a.success=function(){o.attributes=s,u&&u(o,s,a),o.trigger("sync",o,s,a)},d.a.wrapError(this,a);var p=this._getStorage(),f=this._getStorageKey(),g=this.attributes
;if(p.getInstance().excludeDefaults!==!1){var m=c.a.result(this,"defaults");g=n.i(h.a)(m,g)}g=i(c.a.result(this,"sessionAttrs"),g);var v=this.serialize(g),y=p.set(f,v);return y.done(a.success).fail(a.error),r&&a.wait&&(this.attributes=s),y},populate:function(){return this.populatePromise||(this.populatePromise=this.fetch.apply(this,arguments)),this.populatePromise},fetch:function(e){e=e?c.a.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,n=e.success;e.success=function(i){
if(!t.set(t.parse(i,e),e))return!1;n&&n(t,i,e),t.trigger("sync",t,i,e)},d.a.wrapError(this,e);var i=this._getStorage().get(this._getStorageKey());return i.done(e.success).fail(e.error),this.populatePromise=i,i},destroy:function e(t){t=t?c.a.clone(t):{};var n=this,i=t.success,e=function(){n.trigger("destroy",n,n.collection,t)};t.success=function(a){t.wait&&e(),i&&i(n,a,t),n.trigger("sync",n,a,t)},d.a.wrapError(this,t);var a=this._getStorage().remove(this._getStorageKey())
;return a.done(t.success).fail(t.error),t.wait||e(),a},serialize:function(e){var t="";try{t=s()(e)}catch(e){a(this,"serialization error: "+e.message)}return t},parse:function(e){var t;if(null==e)return t;if(c.a.isObject(e))return e;try{t=JSON.parse(e);t=i(c.a.result(this,"sessionAttrs"),t)}catch(t){var n=c.a.isString(e)?e.substring(0,50):"no response";a(this,"parse error: "+t.message+" ("+n+")")}return t},sync:function(){throw new Error("storage model doesn`t allow syncing to server")},
startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void n.i(g.a)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,i,a){var r;"object"===(void 0===n?"undefined":l()(n))?(r=n,a=i):(r={})[n]=i;var s=c.a.extend({},a,{silent:!0}),o=e.call(this,r,s);return c.a.extend(t,this.changed),o},this.releaseCapturedChangeEvents=function(){c.a.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),
c.a.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}},_getStorageKey:function(){var e=c.a.result(this,"storageKey");if(!e)throw new Error("storageKey is required");return e},_getStorage:function(){return f.a}});t.a=m},function(e,t,n){"use strict";function i(e,t){if(s.a.get("shouldCreateFlexModels")){var n;e.prototype.sessionRelations=r()({},e.prototype.sessionRelations,(n={},n.desktop=t,n))}return e}var a=n(6),r=n.n(a),s=n(56);t.a=i
},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(365),s=a.a.extend({name:"FilterModel",context:["server","section","type","standalone"],idAttribute:"filter",rootPropertyName:"Directory",defaults:{advanced:!1},syncedAttrs:{filter:i.a.string,filterType:i.a.string,type:i.a.string,key:i.a.string,title:i.a.string,advanced:i.a.boolean},syncedRelations:{options:{relationClass:r.a}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(21),s=n(690),o=r.a.extend({
name:"FirstCharacterCollection",context:["server","section"],model:s.a,url:function(){var e=a.a.result(this.section,"url")+"/firstCharacter",t=this.getUrlParams();return t?e+"?"+t:e},getUrlParams:function(){var e={},t=[],n=this.section.get("currentType");n&&(e.type=n.id);var i=this.section.get("currentFilters");return a.a.each(i,function(t){t.values.length&&(e[t.key]=t.values.join(","))}),a.a.each(e,function(n,i){"unviewedLeafCount"===i?t.push(i+">="+e[i]):t.push(i+"="+e[i])}),t.join("&")}})
;t.a=o},function(e,t,n){"use strict";var i=n(21),a=n(304),r=i.a.extend({name:"SectionCollection",context:["server"],model:a.a,url:"/library/sections"});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(19),s=n(21),o=n(482),l=s.a.extend({name:"SortCollection",context:["server","section","typeID"],model:o.a,url:function(){var e=a.a.result(this.section,"url"),t=this.typeID||this.section.get("currentType").id,n=t?{type:t}:{};return r.join([e,"/sorts"],n)}});t.a=l},function(e,t,n){
"use strict";var i=n(17),a=n(18),r={ASCENDING:"asc",DESCENDING:"desc"},s=a.a.extend({name:"SortModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{selected:i.a.boolean,direction:i.a.string},syncedAttrs:{key:i.a.string,descKey:i.a.string,title:i.a.string,isDefault:i.a.boolean,defaultDirection:i.a.string},defaults:{selected:!1},augmentResponse:function(e){return e.defaultDirection||(e.defaultDirection=e.default||r.ASCENDING),e.isDefault=!!e.default,
e.direction||(e.direction=e.defaultDirection),e},reverseSortDirection:function(){var e=this.get("direction")||this.get("defaultDirection");e=e&&e!==r.ASCENDING?r.ASCENDING:r.DESCENDING,this.set("direction",e)}},{directions:r});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(19),l=n(210),u=n(17),c=n(18),d=n(1203),h=c.a.extend({name:"PlaylistModel",context:["server","containerKey"],idAttribute:"ratingKey",rootPropertyName:"Playlist",urlRoot:"/playlists",
saveUrl:function(){return"/library/metadata/"+this.id},sessionAttrs:{isPlaylist:u.a.boolean,isLibraryItem:u.a.boolean},syncedAttrs:{ratingKey:u.a.string,key:u.a.string,guid:u.a.string,type:u.a.string,playlistType:u.a.string,title:u.a.string,titleSort:u.a.string,composite:u.a.string,summary:u.a.string,smart:u.a.boolean,allowSync:u.a.boolean,duration:u.a.integer,durationInSeconds:u.a.integer,leafCount:u.a.integer,addedAt:u.a.integer,updatedAt:u.a.integer},sessionRelations:{children:{
relationClass:d.a,attrs:function(e){var t={};return"audio"===e.playlistType&&(t.includeRelated=1),{containerKey:o.join(["/playlists",e.ratingKey,"items"],t)}},options:function(){return{playlist:this}}}},defaults:{isPlaylist:!0,isLibraryItem:!0},findItem:function(e){return this.get("children").getCollection().findWhere({playlistItemID:e})},moveItem:function(e,t){if(void 0!==e){var n=t?{after:t}:{},i=o.join([a.a.result(this,"url"),"/items/",e,"/move"],n),r=a.a.extend(this.server.getXHROptions(i),{
type:"PUT"}),l=s.a.ajax(r),u=this.get("children").getCollection(),c=this.findItem(e);u.remove(c);var d=this.findItem(t),h=d?u.indexOf(d)+1:0;return u.add(c,{at:h}),l}},removeItem:function(e){var t=this;if(void 0!==e){var n=o.join([a.a.result(this,"url"),"/items/",e]),i=a.a.extend(this.server.getXHROptions(n),{type:"DELETE"}),r=s.a.ajax(i);r.then(function(e){t.set(t.parse(e))});var l=this.get("children").getCollection(),u=this.findItem(e);return l.remove(u),l.trigger("destroy",u,l),r}},
addContent:function(e,t){var n=this,i=this.isNew()?"POST":"PUT",r=[a.a.result(this,"url")],u={};this.isNew()?(u.type=this.get("playlistType"),u.title=this.get("title"),u.smart=this.get("smart")?1:0):r.push("/items"),e.get("playQueueID")?u.playQueueID=e.get("playQueueID"):u.uri=l.a.uri(e,t);var c=o.join(r,u),d=a.a.extend(e.server.getXHROptions(c),{type:i}),h=s.a.ajax(d);return h.then(function(e){n.set(n.parse(e))}),h.promise()},isLibraryItem:function(e,t){return!0},isPlexMusicItem:function(){
return!1}});t.a=h},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(33),s={fetch:function(){return n.i(r.a)(!1,"A model or collection with a controlled populate promise cannot be fetched directly"),this.populatePromise},isPopulating:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},_resetPopulate:function(){return this.isPopulating()||(this._populateDeferred=a.a.Deferred(),this.populatePromise=this._populateDeferred.promise()),this.populatePromise},
_resolvePopulate:function(){return"resolved"===this.populatePromise.state()?this.populatePromise:("rejected"===this.populatePromise.state()&&this._resetPopulate(),this._populateDeferred.resolveWith(this,[this]),this.populatePromise)},_rejectPopulate:function(){return"rejected"===this.populatePromise.state()?this.populatePromise:("resolved"===this.populatePromise.state()&&this._resetPopulate(),this._populateDeferred.rejectWith(this,[this]),this.populatePromise)}};t.a=s},function(e,t,n){
"use strict";var i=n(18),a=n(17),r=n(59),s=n(302),o=n(303),l=n(686),u=n(96),c=n(40),d=i.a.extend({name:"PlayerModel",sessionAttrs:{playQueueItem:a.a.instanceOf(s.a),metadataItem:a.a.instanceOf(r.a),media:a.a.object,part:a.a.object,url:a.a.string,subtitlesUrl:a.a.string,playQueue:a.a.instanceOf(o.a,l.a),transcodeServer:a.a.instanceOf(u.a),friendlyName:a.a.string,mediaIndex:a.a.integer,partIndex:a.a.integer,partCount:a.a.integer,qualityIndex:a.a.integer,videoStreamID:a.a.integer,
audioStreamID:a.a.integer,subtitleStreamID:a.a.integer,type:a.a.oneOf(c.a.types.VIDEO,c.a.types.MUSIC,c.a.types.PHOTO),state:a.a.oneOf(c.a.states.STOPPED,c.a.states.PAUSED,c.a.states.PLAYING,c.a.states.BUFFERING,c.a.states.ERROR),bufferingMessage:a.a.string,errorMessage:a.a.string,terminationCode:a.a.integer,terminationText:a.a.string,ready:a.a.boolean,loaded:a.a.boolean,ended:a.a.boolean,finished:a.a.boolean,embedHtml:a.a.string,duration:a.a.integer,position:a.a.float,
lastSeekPosition:a.a.integer,offset:a.a.integer,volume:a.a.integer,startBuffer:a.a.integer,endBuffer:a.a.float,percentBuffered:a.a.integer,shuffled:a.a.boolean,repeatAll:a.a.boolean,repeatItem:a.a.boolean,directPlay:a.a.boolean,videoDimensions:a.a.object,playbackSessionID:a.a.string,transcodeSessionID:a.a.string,softSubtitlesFailed:a.a.boolean,forceWebkitVideoFullscreen:a.a.boolean,canPlayPause:a.a.boolean,canStop:a.a.boolean,canSeek:a.a.boolean,canSetVolume:a.a.boolean,
canSetVideoStream:a.a.boolean,canSetAudioStream:a.a.boolean,canSetSubtitleStream:a.a.boolean,canSetQuality:a.a.boolean,canShuffle:a.a.boolean,canRepeat:a.a.boolean,canLyrics:a.a.boolean,canSkipPrevious:a.a.boolean,canSkipNext:a.a.boolean,showSeekBar:a.a.boolean,showAudioStream:a.a.boolean,showSubtitleStream:a.a.boolean,showQuality:a.a.boolean,showPlayQueue:a.a.boolean,showShuffle:a.a.boolean,showRepeat:a.a.boolean,showLyrics:a.a.boolean,showMinimize:a.a.boolean,showMaximize:a.a.boolean,
showEnterFullscreen:a.a.boolean,showExitFullscreen:a.a.boolean},defaults:function(){return{playQueueItem:null,metadataItem:null,media:null,part:null,url:null,subtitlesUrl:null,playQueue:null,transcodeServer:null,mediaIndex:-1,partIndex:-1,partCount:1,qualityIndex:null,videoStreamID:null,audioStreamID:null,subtitleStreamID:null,type:null,state:c.a.states.STOPPED,bufferingMessage:null,errorMessage:null,ready:!1,loaded:!1,ended:!1,finished:!1,embedHtml:null,duration:0,position:0,
lastSeekPosition:null,offset:0,volume:100,startBuffer:0,endBuffer:0,percentBuffered:0,shuffled:!1,repeatAll:!1,repeatItem:!1,directPlay:!1,videoDimensions:null,playbackSessionID:null,transcodeSessionID:null,softSubtitlesFailed:!1,canPlayPause:!1,canStop:!1,canSeek:!1,canSetVolume:!1,canSetVideoStream:!1,canSetAudioStream:!1,canSetSubtitleStream:!1,canSetQuality:!1,canShuffle:!1,canRepeat:!1,canSkipPrevious:!1,canSkipNext:!1,canLyrics:!1,showSeekBar:!1,showAudioStream:!1,showSubtitleStream:!1,
showQuality:!1,showPlayQueue:!1,showShuffle:!1,showRepeat:!1,showMinimize:!1,showMaximize:!1,showEnterFullscreen:!1,showExitFullscreen:!1,showLyrics:!1,forceWebkitVideoFullscreen:!1}},derivedAttrs:{stopped:function(){return this.get("state")===c.a.states.STOPPED},paused:function(){return this.get("state")===c.a.states.PAUSED},playing:function(){return this.get("state")===c.a.states.PLAYING},buffering:function(){return this.get("state")===c.a.states.BUFFERING},error:function(){
return this.get("state")===c.a.states.ERROR},positionPercentage:function(){var e=this.get("duration"),t=this.get("position");return e?Math.min(Math.max(t/e*100,0),100):0}},initialize:function(){this.on("change:state",this.onStateChange)},onStateChange:function(e,t){t!==c.a.states.STOPPED&&e.set("ended",!1)}});t.a=d},function(e,t,n){"use strict";var i=n(34),a=n(83),r=n(302),s=a.a.extend({model:r.a,windowSize:{audio:13,video:8},initialize:function(e,t){
if(e)throw new Error("Models cannot be passed directly to an UpNextCollection.");this.collection=this.parent.get("playQueue").get("collection"),this.listenTo(this.collection,"reset sync",this._filter),this.listenTo(this.parent,"change:playQueueItem",this._filter),this.listenTo(this.parent,"change:repeatAll change:repeatItem",this._filter),this._filter()},_filter:function(){var e=this.parent.get("playQueueItem").get("metadataItem"),t=this.collection.findWhere({ratingKey:e.get("ratingKey")
}),a=this.collection.indexOf(t),r=n.i(i.k)(e.get("type")).mediaType,s=this.windowSize[r],o=this.collection.reject(function(e){return e.get("advertisement")}).slice(a+1,a+s);if(this.parent.get("repeatAll")){var l=Math.max(s-o.length,0),u=this.collection.slice(0,Math.min(a,l));o=o.concat(u)}this.set(o)}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(21),s=n(179),o=n(56),l=n(532),u=function(e,t){
return!e.get("relay")&&t.get("relay")?e:!t.get("relay")&&e.get("relay")?t:!e.get("isLoopback")&&t.get("isLoopback")?t:!t.get("isLoopback")&&e.get("isLoopback")?e:!e.get("isPrivate")&&t.get("isPrivate")?t:!t.get("isPrivate")&&e.get("isPrivate")?e:!e.get("isHttps")&&t.get("isHttps")?t:(!t.get("isHttps")&&e.get("isHttps"),e)},c=r.a.extend({name:"ConnectionCollection",context:["server"],model:s.a,getBestConnection:function(){
var e=o.a.get("allowHttpsMediaServerConnections"),t=!this.server||this.server.get("isCloudBased")||e,n=this.filter(function(e){return e.get("isConnected")&&(t||!e.get("isHttps"))});if(n.length)return a.a.reduce(n,u)},hasBetterConnectionCandidates:function(){var e=this.server&&this.server.get("activeConnection");return this.some(function(t){var n=t.get("isUntested")||t.get("isPending"),i=!e||t!==e&&u(t,e)===t;return n&&i})},hasOnlyFailedConnections:function(){return this.every(function(e){
return e.get("isFailed")})},hasFailedEveryDirectConnection:function(){return this.where({relay:!1}).every(function(e){return e.get("isFailed")})},hasMultiplePrivateV4Subnets:function(){var e=void 0;return this.some(function(t){var n=t.get("address");if(t.get("isPrivate")&&l.a.isValidV4Address(n)){var i=l.a.getV4Subnet(n);return e||(e=i),e!==i}})}});t.a=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),a=n(706),r=i.a.extend({
name:"MediaGrabOperationCollection",context:["server"],model:a.b,comparator:function(e){var t=e.get("mediaItem");if(t){return t.beginsAt-(t.startOffsetSeconds||0)}}});t.default=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({urlRoot:"/api/home/users",whitelistedAttrs:["id","uuid","admin","protected","restricted","guest","title","username","email","thumb"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return t.User&&(t=t.User),
r.a.parseInteger(t,"id"),r.a.parseBoolean(t,["admin","protected","restricted","guest"]),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){if(a.a.isEmpty(e)){var n={};return this.get("restricted")?n.title=this.get("title"):this.isNew()&&(n.invitedEmail=this.get("username")),n}return s.a.prototype.getSaveParams.apply(this,arguments)}});t.a=o},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(4),s=n(78),o=n(19),l=n(244),u=n(17),c=n(65),d=n(18),h=n(1260),p={WATCH_LATER:"queue",RECOMMENDED:"recommendations"},f={ALL:"all",UNWATCHED:"unwatched",WATCHED:"watched"},g=d.a.extend({mixins:[l.a],name:"UserPlaylistModel",context:["server"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(a.a.result(this,"containerKey"))},containerKey:function(){return o.join(["/pms/playlists",this.get("key"),this.get("subset")])},sessionAttrs:{
isUserPlaylist:u.a.boolean,key:u.a.oneOf(p.WATCH_LATER,p.RECOMMENDED).isRequired,subset:u.a.oneOf(f.ALL,f.UNWATCHED,f.WATCHED).isRequired,currentPageStart:u.a.integer,currentPageSize:u.a.integer,populatedRange:u.a.object},syncedAttrs:{totalSize:u.a.integer,identifier:u.a.string,mediaTagPrefix:u.a.string,mediaTagVersion:u.a.string,viewGroup:u.a.string,title:u.a.string},syncedRelations:{metadataItems:{relationClass:h.a,rootPropertyName:"Metadata",options:function(e){return{identifier:e.identifier,
mediaTagPrefix:e.mediaTagPrefix,mediaTagVersion:e.mediaTagVersion,containerKey:a.a.result(this,"containerKey"),userPlaylistKey:e.key}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},derivedAttrs:{label:function(){var e=this.get("key");return e===p.WATCH_LATER?n.i(r.default)("Watch Later"):e===p.RECOMMENDED?n.i(r.default)("Recommended"):void 0},playlistRoute:function(){return"#!/playlist/"+this.get("key")}},defaults:function(){return{isUserPlaylist:!0,subset:f.ALL,populatedRange:{
start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===c.a.xml?n.i(s.a)(e):e},filterWatched:function(){var e=this.get("metadataItems"),t=e.filter(function(e){return!!e.get("viewCount")});return e.clone(t)},filterUnwatched:function(){var e=this.get("metadataItems"),t=e.filter(function(e){return!e.get("viewCount")});return e.clone(t)}},{keys:p,subsets:f});t.a=g},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(17),s=n(18),o=n(1258),l={ACTIVE:"Active",INACTIVE:"Inactive",CANCELED:"Canceled"},u={NONE:"",LIFETIME:"lifetime",YEARLY:"yearly",MONTHLY:"monthly",LITE:"lite",COMPED:"comped",PRO:"pro"},c=s.a.extend({name:"UserSubscriptionModel",syncedAttrs:{active:r.a.boolean,status:r.a.oneOf(l.ACTIVE,l.INACTIVE,l.CANCELED),plan:r.a.oneOf(u.NONE,u.LIFETIME,u.YEARLY,u.MONTHLY,u.LITE,u.COMPED,u.PRO)},syncedRelations:{features:{relationClass:o.a}},augmentResponse:function(e){
var t=e.features;return t&&t.feature?a.a.extend({},e,{features:t.feature}):e}},{statuses:l,plans:u});t.a=c},function(e,t,n){"use strict";var i=n(50),a=n(368);n.d(t,"c",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return o});var r=n.i(i.a)(a.a),s=n.i(i.a)(a.b),o=n.i(i.a)(a.c)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){return e?e.desktop.libraries:void 0})}function a(){
return n.i(r.createSelector)(o.a,i(),function(e,t){return t?t.map(function(t){return e[t]}):[]})}var r=n(8),s=(n.n(r),n(54)),o=n(723);t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(8),s=(n.n(r),n(1281)),o=n.i(r.createSelector)(s.a,function(e){return a.a.find(e,function(e){return e.isFullOwnedServer})});t.a=o},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(181)),r=n(182),s=n.i(a.a)(n.i(i.createSelector)(r.a,function(e){return e.entitlements.reduce(function(e,t){
return e[t.id]=!0,e},{})}),function(e){return e});t.a=s},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(181)),r=n(1284),s=n.i(a.a)(n.i(i.createSelector)(r.a,function(e){return(e.features||[]).reduce(function(e,t){return e[t.id]=!0,e},{})}),function(e){return e});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(38),s=n(12),o=n(28),l=n(55),u=r.a.extend({mixins:l.a,maxCycles:3,maxSize:50,isListening:!1,initialize:function(){this._cache={},this.size=0,this.cycles=[],this.cycle()},
startListening:function(){this.isListening||(this.isListening=!0,this.listenTo(s.a,{"cycle:cache":this.cycle,"clearWhere:cache":this.clearWhere,"clearAll:cache":this.clearAll,"clearCycles:cache":this.clearCycles}))},get:function(e){var t=this._cache[e];return t&&t._cacheCycle&&this.setItemCycle(t,e,a.a.first(this.cycles)),t},store:function(e,t){t||(t=this.getItemCacheKey(e)),this.remove(e),t&&(this.startListening(),e._cacheKey=t,this._cache[t]=e,this.size++,
e.persistInCache||this.setItemCycle(e,t,a.a.first(this.cycles)))},getItemCacheKey:function(e){return a.a.result(e,"cacheKey")},setItemCycle:function(e,t,n){var i=e._cacheCycle;i&&i.hasOwnProperty(t)&&delete i[t],e._cacheCycle=n,n[t]=e},cycle:function(){this.size>this.maxSize&&(o.a.warn("Cache overflow, size: "+this.size),a.a.each(this.cycles.slice(1),this.removeCycle,this)),this.cycles.unshift({}),this.cycles.length>Math.max(this.maxCycles,1)&&this.removeCycle(a.a.last(this.cycles))},
remove:function(e){if(e&&e._cacheKey){var t=e._cacheKey;this._cache.hasOwnProperty(t)&&(delete this._cache[t],this.size--),e._cacheCycle&&(e._cacheCycle.hasOwnProperty(t)&&delete e._cacheCycle[t],delete e._cacheCycle),delete e._cacheKey}},removeCycle:function(e){a.a.each(a.a.values(e),this.remove,this);var t=a.a.indexOf(this.cycles,e);this.cycles.splice(t,1)},clearWhere:function(e){var t=a.a.where(a.a.values(this._cache),e);a.a.each(t,this.remove,this)},clearAll:function(){
a.a.each(a.a.values(this._cache),this.remove,this),this.cycles.length=0,this.cycle(),this.stopListening(),this.isListening=!1},clearCycles:function(){for(var e=this.cycles;e.length;)this.removeCycle(e[e.length-1]);this.cycle()}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(497),s=r.a.extend({maxCycles:3,maxSize:20,get:function(e){var t=r.a.prototype.get.apply(this,arguments);return t&&t.every(function(e){return!(!e.cache||!e.cache.isListening)&&(e.cache.store(e),!0)}),t},
getItemCacheKey:function(e){var t=a.a.result(e,"url");return e.server&&(t=e.server.getScopedKey(t)),t}});t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a});var i="error",a="success"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"e",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return o})
;var i="https://forums.plex.tv",a="https://status.plex.tv",r="https://plex.tv/subscription/about",s="https://plex.tv/gifts",o="https://plex.tv/subscription/new"},function(e,t,n){"use strict";var i={CREATED:0,PROGRESS:1,MATCHING:2,DOWNLOADING_METADATA:3,LOADING_METADATA:4,PROCESSED:5,DELETED:9};t.a=i},function(e,t,n){"use strict";function i(e,t){n.i(a.a)("[MediaElement] Creating element. type:%s allowRecycle:%s",e,t),e=e.toLowerCase();var s=!i.preventRecycle&&t
;if(s&&r[e])return n.i(a.a)("[MediaElement] Found existing element to use."),r[e];var o=document.createElement(e);return s&&(r[e]=o),o}var a=n(28),r={};t.a=i},function(e,t,n){"use strict";function i(e){
var t=[n.i(u.default)("January"),n.i(u.default)("February"),n.i(u.default)("March"),n.i(u.default)("April"),n.i(u.default)("May"),n.i(u.default)("June"),n.i(u.default)("July"),n.i(u.default)("August"),n.i(u.default)("September"),n.i(u.default)("October"),n.i(u.default)("November"),n.i(u.default)("December")],i=t[e];return n.i(l.a)(i,"Unknown month"),i}function a(e){
var t=[n.i(u.default)("Jan"),n.i(u.default)("Feb"),n.i(u.default)("Mar"),n.i(u.default)("Apr"),n.i(u.default)("May"),n.i(u.default)("Jun"),n.i(u.default)("Jul"),n.i(u.default)("Aug"),n.i(u.default)("Sep"),n.i(u.default)("Oct"),n.i(u.default)("Nov"),n.i(u.default)("Dec")],i=t[e];return n.i(l.a)(i,"Unknown month"),i}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.abbreviate,r=void 0!==n&&n;if(!e)return"";var s=o.a.unix(e).month();return r?a(s):i(s)}
var s=n(37),o=n.n(s),l=n(33),u=n(4);t.a=r},function(e,t,n){"use strict";function i(e,t){if(null==e||null==t)return!1;var n=r()().unix();return n>=e&&n<=t}var a=n(37),r=n.n(a);t.a=i},function(e,t,n){var i=n(1322).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(787).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(789).default,a=n(97);e.exports=a(i)},function(e,t,n){"use strict";function i(e,t){
if(n.i(a.a)(null!=t,"No `minVersion` supplied to `isVersionOrNewer`. Have you misspelled a constant?"),!e)return!0;for(var i=t.split("."),r=e.split("."),s=0,o=i.length;s<o;s++)if(s<r.length){var l=parseInt(i[s],10),u=parseInt(r[s],10);if(l<u)return!0;if(l>u)return!1}return!0}var a=n(33);t.a=i},function(e,t,n){"use strict";function i(e,t){if(e===t)return 0;for(var n=e.split("."),i=t.split("."),a=0;a<n.length;a++){if(!i[a])return 1;var r=parseInt(n[a],10),s=parseInt(i[a],10);if(r>s)return 1
;if(r<s)return-1}return 0}t.a=i},function(e,t,n){"use strict";function i(e){return r.a.isEmpty(e)?void 0:e.get("type")}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.get("audio").id,i=n.i(o.a)(e,{streamType:t,selected:!0});return r.a.first(i)}var a=n(2),r=n.n(a),s=n(86),o=n(142);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a.get("subtitles").id,i=n.i(o.a)(e,{streamType:t,selected:!0}),a=r.a.first(i);if(a&&a.id>0)return a}
var a=n(2),r=n.n(a),s=n(86),o=n(142);t.a=i},function(e,t,n){"use strict";function i(e,t,i){if(e){var a=n.i(s.a)(e,{streamType:t.id});r.a.each(a,function(e){e.selected=e.id===i})}}var a=n(2),r=n.n(a),s=n(142);t.a=i},function(e,t,n){"use strict";function i(e,t,n){t<6e4||e.get("isLibraryItem")&&1!==e.get("extraType")&&(t>.9*n?e.set({viewOffset:0,viewCount:1}):e.set("viewOffset",Math.round(t)))}t.a=i},function(e,t,n){"use strict";function i(e){return e?"dca"===e?"DTS":e.toUpperCase():""}
Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e,t){var n=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,n)).toFixed(t)+" "+a[n+1]}Object.defineProperty(t,"__esModule",{value:!0});var a=["bps","kbps","Mbps","Gbps","Tbps"];t.default=i},function(e,t,n){"use strict";function i(e){return e=parseInt(e,10),r.a.isNaN(e)?"":(e<10?"0":"")+e}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){
var i=r.a.pick(t,"type","controller","media","offset","media","autoplay","useMiniPlayer","isSwitchingPlayers","inline","playQueue","isFromCompanion","background"),a=t.playQueue;if(e=a?a.get("selectedItem"):e,i.model=e,i.autoplay=i.autoplay!==!1,e&&"track"===e.get("type")){var l=e.get("metadataItem")||e,u=t.enableTrackOffsets?l.get("viewOffset"):null;r.a.isNumber(u)&&(i.offset=u)}return i.offset&&(i.offset=parseInt(i.offset,10)||0),
i.type||(i.controller?i.type=i.controller.type:i.type=a?s.a.getTypeByElement(a.get("mediaType")):s.a.getTypeByElement(n.i(o.a)(e))),i}var a=n(2),r=n.n(a),s=n(40),o=n(1344);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(28),s={ORIGINAL:-1,qualities:{},getQualityByIndex:function(e){if(e<0)return{index:this.ORIGINAL};var t={index:e};return a.a.each(this.qualities,function(n,i){t[i]=a.a.result(this.qualities,i)[e]},this),t},getQualityCount:function(){
var e=a.a.first(a.a.keys(this.qualities));return a.a.result(this.qualities,e).length},getQualityAttribute:function(e){var t,n=e.get("isLibraryItem"),i=e.get("isExtra")&&!/^file:\/\//.test(e.get("guid"));return t=n&&!i?e.server.hasLocalConnection()?"localQuality":"remoteQuality":"channelQuality","video"!==this.type?this.type+"!"+t:t},getSyncQualityAttribute:function(){return"syncQuality!"+this.type},getCurrentQuality:function(e,t){var n=this.getQualityAttribute(e),i=t.get(n)
;return i>=this.getQualityCount()&&(r.a.warn("Quality index "+i+" is out of bounds"),i=t.defaults[n],t.save(n,i)),a.a.extend(this.getQualityByIndex(i),{attribute:n})},getAvailableQualities:function(e){e||(e={});var t=e.lowestQualityIndex,n=e.highestQualityIndex,i=e.comparator,a=[];n===this.ORIGINAL&&(n=void 0);for(var r=0,s=this.getQualityCount();r<s;r++)if(!(t&&r<t)){if(n&&r>n)return a;if(i&&i.call(this,r))return a;a.push(this.getQualityByIndex(r))}return a},getResolutionFromSize:function(e){
var t=e.split("x"),n=parseInt(t[1],10);return n>2560?"8k":n>1100?"4k":n>720?"1080":n>576?"720":n>480?"576":n>360?"480":"sd"},getHeightFromResolution:function(e){switch(e){case"8k":return 5120;case"4k":return 2560;case"1080":return 1080;case"720":return 720;case"576":return 576;case"480":return 480;case"sd":return 360;default:return 360}},getNearestIndex:function(e,t){if(!t)return this.ORIGINAL;var n=e.indexOf(t);if(n<0){n=0;for(var i=0,a=e.length;i<a;i++){if(e[i]>t)break;n=i}}return n}};t.a=s
},function(e,t,n){"use strict";function i(e){return e>=2e3}function a(e){return i(e.transcodeDecisionCode)?e.transcodeDecisionText:i(e.generalDecisionCode)?e.generalDecisionText:i(e.mdeDecisionCode)?e.mdeDecisionText:e.errorMessage}t.b=i,t.a=a},function(e,t,n){"use strict";function i(){return"edge"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).id}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(){
return"tivo"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).platformID}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"viziomtk"===e.platformID&&n.i(r.a)(e)}var a=n(31),r=n(381);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"viziomtk"===e.platformID&&n.i(r.a)(e)}var a=n(31),r=n(382);t.a=i},function(e,t,n){"use strict"
;function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"viziosigma"===e.platformID&&n.i(r.a)(e)}var a=n(31),r=n(381);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a;return"viziosigma"===e.platformID&&n.i(r.a)(e)}var a=n(31),r=n(382);t.a=i},function(e,t,n){"use strict";function i(e){return e=r.a.isArray(e)?e:r.a.toArray(arguments),o.a.when.apply(o.a,r.a.map(e,l.a))}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(163);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=t.serverEntityID;return n.i(d.a)(e,h.f,i)}function a(e,t){var n=i(e,t);return n&&n.get("desktop")}function r(e,t){var i=t.providerEntityID;return n.i(d.a)(e,h.e,i)}function s(e,t){var i=t.libraryEntityID;return n.i(d.a)(e,h.g,i)}function o(e,t){var i=t.metadataListEntityID;return n.i(d.a)(e,h.d,i)}function l(e,t){var i=t.metadataItemEntityID;return n.i(d.a)(e,h.b,i)}function u(e,t){
var i=t.metadataItemEntityID;return n.i(d.b)(e,h.b,i)}function c(e,t){var i=t.mediaSubscriptionEntityID;return n.i(d.a)(e,h.a,i)}var d=n(385),h=n(67);t.a=i,t.h=a,t.b=r,t.g=s,t.f=o,t.d=l,t.e=u,t.c=c},function(e,t,n){"use strict";function i(e){e=e>0?Math.min(e,1024):24;for(var t="";t.length<e;)t+=Math.random().toString(36).substr(2);return t.substr(0,e)}t.a=i},function(e,t,n){"use strict";function i(e){var t=/(\d+\.){2,3}\d+/.exec(e);return r.a.first(t)||e}var a=n(2),r=n.n(a);t.a=i
},function(e,t,n){"use strict";var i=n(4),a=n(214),r=["id","typeString"],s=n.i(a.a)(r,[{id:1,typeString:"trailer",title:function(){return n.i(i.default)("Trailer")}},{id:2,typeString:"deletedScene",title:function(){return n.i(i.default)("Deleted Scene")}},{id:3,typeString:"interview",title:function(){return n.i(i.default)("Interview")}},{id:4,typeString:"musicVideo",title:function(){return n.i(i.default)("Music Video")}},{id:5,typeString:"behindTheScenes",title:function(){
return n.i(i.default)("Behind the Scenes")}},{id:6,typeString:"scene",title:function(){return n.i(i.default)("Scene")}},{id:7,typeString:"liveMusicVideo",title:function(){return n.i(i.default)("Live Music Video")}},{id:8,typeString:"lyricMusicVideo",title:function(){return n.i(i.default)("Lyric Music Video")}},{id:9,typeString:"concert",title:function(){return n.i(i.default)("Concert")}},{id:10,typeString:"featurette",title:function(){return n.i(i.default)("Featurette")}},{id:11,
typeString:"short",title:function(){return n.i(i.default)("Short")}},{id:12,typeString:"other",title:function(){return n.i(i.default)("Other")}}]);t.a=s},function(e,t,n){"use strict";function i(e){var t=l.exec(e);if(null!=t)return{octets:s.a.map(s.a.rest(t),function(e){return parseInt(e,10)})}}function a(e){if(u.test(e)){var t=e.split("::"),n=t[0].match(c),i={parts:[]};if(null!=n){if(n.length>8)return;i.parts=s.a.map(n,function(e){return parseInt(e,16)})}if(t.length>1){
var a=t[1].match(c),r=s.a.map(a,function(e){return parseInt(e,16)}),o=8-i.parts.length-r.length;if(o<0||8===o)return;s.a.times(o,function(){i.parts.push(0)}),i.parts=i.parts.concat(r)}return i}}
var r=n(2),s=n.n(r),o=/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/,l=/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/,u=/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/i,c=/[a-f0-9]{1,4}/gi,d={
isValidPort:function(e){return o.test(e)},isValidAddress:function(e){return this.isValidV4Address(e)||this.isValidV6Address(e)},isLoopbackAddress:function(e){return"localhost"===e||this.isLoopbackV4Address(e)||this.isLoopbackV6Address(e)},isPrivateAddress:function(e){return this.isPrivateV4Address(e)||this.isPrivateV6Address(e)},isPlexDirectAddress:function(e){return/plex\.direct$/.test(e)},isValidV4Address:function(e){var t=i(e);return!(!t||!s.a.all(t.octets,function(e){return e>=0&&e<=255}))},
isLoopbackV4Address:function(e){var t=i(e);return!(!t||127!==t.octets[0]&&!s.a.all(t.octets,function(e){return 0===e}))},isPrivateV4Address:function(e){var t=i(e);if(t){if(10===t.octets[0])return!0;if(172===t.octets[0]&&t.octets[1]>=16&&t.octets[1]<=31)return!0;if(192===t.octets[0]&&168===t.octets[1])return!0}return!1},isValidV6Address:function(e){var t=a(e);return!(!t||!s.a.all(t.parts,function(e){return e>=0&&e<=65535}))},isLoopbackV6Address:function(e){var t=a(e);if(t){
return s.a.all(s.a.take(t.parts,7),function(e){return 0===e})&&1===s.a.last(t.parts)}return!1},isPrivateV6Address:function(e){var t=a(e);return!!(t&&t.parts[0]>=64512&&t.parts[0]<=65023)},getV4Subnet:function(e){return d.isValidV4Address(e)?e.split(".").slice(0,-1).join("."):""}};t.a=d},function(e,t,n){"use strict";function i(e){var t=e.url,i=r()(e,["url"]),a=n.i(l.a)("appModel"),s=a.get("cloudServer"),u=s.getXHROptions(t,i);return u.xhrFields&&u.xhrFields.withCredentials,o.a.ajax(u)}
var a=n(16),r=n.n(a),s=n(5),o=n.n(s),l=n(13);n(66),n(1397),n(794);t.a=i},function(e,t,n){"use strict";var i=n(2826),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"circle-progress",template:a.a,size:30,lineWidth:5,strokeColor:"#cc7b19",hasSize:!1,ui:{svg:".circle-progress-bar",svgCircle:".circle-progress-bar circle"},bindings:{".circle-progress-text":{modelAttribute:"text"}},modelEvents:{"change:progress":"onProgressChange"},initialize:function(e){this.size=e.size||this.size,
this.lineWidth=e.lineWidth||this.lineWidth,this.strokeColor=e.strokeColor||this.strokeColor,this.size&&(this.$el.width(this.size),this.$el.height(this.size))},drawProgressBar:function(){var e=this.size,t=e/2,n=t-this.lineWidth,i=Math.PI*(2*n);this.hasSize||(this.ui.svg.attr("width",e),this.ui.svg.attr("height",e),this.ui.svgCircle.attr("r",n),this.ui.svgCircle.attr("cx",t),this.ui.svgCircle.attr("cy",t),this.ui.svgCircle.attr("stroke-dasharray",i),
this.ui.svgCircle.css("stroke-width",this.lineWidth),this.ui.svgCircle.css("stroke",this.strokeColor),this.hasSize=!0);var a=this.model.get("progress"),r=(100-a)/100*i;this.ui.svgCircle.css("stroke-dashoffset",r)},onRender:function(){this.drawProgressBar()},onProgressChange:function(){this.drawProgressBar()}});t.a=s},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(70),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=(n.n(p),
n(48)),g=n.n(f),m=n(33),v=n(28),y=n(502),b=n(40),S=n(1411),I=function(e){function t(n,i){l()(this,t);var a=c()(this,e.call(this,n,i));return a.onLoadedMetadata=function(){var e=a._mediaEl,t=e.duration,n=e.videoWidth,i=e.videoHeight;a.props.onStart&&a.props.onStart({duration:Math.round(1e3*t),videoWidth:n,videoHeight:i})},a.onPositionUpdate=function(){a._lastPosition=a._currentPosition,a._currentPosition=Math.floor(1e3*a._mediaEl.currentTime),
a.props.onPositionMillisecondsChange(a._currentPosition);var e=a._lastPosition&&Math.abs(a._currentPosition-a._lastPosition)<100;!a.props.onMediaStateChange||a._mediaEl.paused||e||a.props.onMediaStateChange(b.a.mediaStates.READY)},a.onProgress=function(){var e=a._mediaEl.buffered;if(e.length){var t=1e3*e.start(0),n=1e3*e.end(e.length-1);a.props.onBufferChange&&a.props.onBufferChange({start:t,end:n})}},a.onEnded=function(){a.props.onEnd&&a.props.onEnd()},a.onError=function(e){
var t=e.target.error.code;t&&v.a.warn("[Player] Media element error code: "+t),a.props.onMediaStateChange(b.a.mediaStates.ERROR,{code:t})},a.onWaiting=function(){a.props.onMediaStateChange&&a.props.onMediaStateChange(b.a.mediaStates.BUFFERING)},a.onPlaying=function(){a.props.onMediaStateChange&&a.props.onMediaStateChange(b.a.mediaStates.READY)},a.onSeek=function(e){var t=a._mediaEl.ended;a._mediaEl.currentTime=e,!a.props.paused&&t&&a._mediaEl.play()},a._mediaListeners={
loadedmetadata:a.onLoadedMetadata,progress:a.onProgress,ended:a.onEnded,error:a.onError,waiting:a.onWaiting,playing:a.onPlaying},a}return h()(t,e),t.prototype.componentDidMount=function(){var e=this;this._mediaEl=n.i(y.a)(this.props.type,this.props.allowRecycleElement),this.props.onElementChange?this.props.onElementChange(this._mediaEl):this._mediaEl.src=this.props.src,this._node=g.a.findDOMNode(this),this._node.appendChild(this._mediaEl),this._mediaEl.className=this.props.className,
this._mediaEl.volume=Math.max(0,Math.min(this.props.volume/100,1)),s()(this._mediaListeners).forEach(function(t){e._mediaEl.addEventListener(t,e._mediaListeners[t])}),this._mediaEl.currentTime=this.props.positionSeconds,this.props.isReadyToPlay&&!this.props.paused&&this.props.src&&this._mediaEl.play()},t.prototype.componentWillReceiveProps=function(e){this._mediaEl.src&&e.paused!==this.props.paused&&!this._mediaEl.ended&&(e.paused?this._mediaEl.pause():this._mediaEl.play()),
e.volume!==this.props.volume&&(this._mediaEl.volume=Math.max(0,Math.min(e.volume/100,1))),e.className!==this.props.className&&(this._mediaEl.className=e.className),e.isReadyToPlay&&!this.props.isReadyToPlay&&!e.paused&&this._mediaEl.play(),n.i(m.a)(e.src===this.props.src,"Use a new `key` when changing `src`")},t.prototype.componentWillUnmount=function(){var e=this;this._node.removeChild(this._mediaEl),this._mediaEl.src="",s()(this._mediaListeners).forEach(function(t){
e._mediaEl.removeEventListener(t,e._mediaListeners[t])})},t.prototype.render=function(){var e=this.props,t=e.positionSeconds,n=e.containerClassName,i=e.onTick;return a()("div",{className:n},void 0,a()(S.a,{positionSeconds:t,onPositionUpdate:this.onPositionUpdate,onTick:i,onSeek:this.onSeek}))},t}(p.Component);I.defaultProps={type:b.a.elements.VIDEO,positionSeconds:0,volume:100,allowRecycleElement:!1,isReadyToPlay:!0},t.a=I},function(e,t,n){"use strict"
;var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=n.n(u),d=n(48),h=n.n(d),p=n(1042),f=n.n(p),g=(n(33),n(27)),m=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i));return r.removePortal=function(){var e=r.props.onPortalRef,t=r._portal;t&&(h.a.unmountComponentAtNode(t),document.body.removeChild(t)),r._portal=null,r._portalRef=null,e&&e(null),r._closeTimeoutID=clearTimeout(r._closeTimeoutID)},r._portal=null,r._portalRef=null,r._closeTimeoutID=null,r}
return l()(t,e),t.prototype.componentDidMount=function(){this.props.isOpen&&this.renderPortal(this.props)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){this.props.isOpen?(this._closeTimeoutID=clearTimeout(this._closeTimeoutID),this.renderPortal(this.props)):this._portal&&(this.props.closeTimeout&&this.renderPortal(this.props),this._closeTimeoutID||(this._closeTimeoutID=setTimeout(this.removePortal,this.props.closeTimeout)))
},t.prototype.componentWillUnmount=function(){this.removePortal()},t.prototype._setAttrs=function(e,t){this._setClassName(e,t.className),this._setStyle(e,t.style)},t.prototype._setClassName=function(e,t){null!=t&&(e.className=t)},t.prototype._setStyle=function(e,t){t&&f.a.setValueForStyles(e,t)},t.prototype.renderPortal=function(e){var t=this.props.onPortalRef,n=this._portal||document.createElement("div");this._setAttrs(n,e),this._portal||document.body.appendChild(n)
;var i=c.a.Children.only(e.children);this._portal=n;var a=h.a.unstable_renderSubtreeIntoContainer(this,i,n);this._portalRef!==a&&(this._portalRef=a,t&&(t(null),t(this._portalRef)))},t.prototype.render=function(){return null},t}(u.Component);m.defaultProps={isOpen:!0,closeTimeout:0},t.a=m},function(e,t,n){"use strict";function i(){function e(e,t){var n=e.listTop+":"+e.listLeft+":"+e.viewportWidth+":"+e.viewportHeight+":"+t;if(n===V)return H;R=e.listTop,O=e.listLeft
;var i=e.viewportWidth-x-L,a=e.viewportHeight-P-A;m===r?i-=O:a-=R,j=_({innerViewportWidth:i,innerViewportHeight:a,innerHorizontalPadding:w,innerVerticalPadding:C}),z=N({cellWidth:j,innerViewportWidth:i,innerViewportHeight:a,innerHorizontalPadding:w,innerVerticalPadding:C}),U=v||Math.floor((a+C)/(z+C)),F=y||Math.floor((i+w)/(j+w)),B=F*U;var s=m===r?F*(j+w)-w:Math.ceil(t/U)*(j+w)-w,o=m===r?Math.ceil(t/F)*(z+C)-C:U*(z+C)-C;return W={},V=n,H={width:s+x+L,height:o+P+A}}function t(e){var t=e
;if(W[t])return W[t];var n=u(e),i=l(e),a={column:n,row:i,cellX:n*(j+w)+O+L,cellY:i*(z+C)+R+P,cellWidth:j,cellHeight:z};return W[t]=a,a}function i(e,t,i){var s=m===r?F:U,o=m===r?(e-R)/(z+C):(t-O)/(j+w),l=B+2*s+S*s*2,u=Math.ceil(o)*s,c=u+B-1,d=Math.floor(o)*s,h=u+B+s-1,p=d-s*S,f=n.i(a.a)(p,i)+l-1;return f>=i&&(p=i-l),{visibleStartIndex:n.i(a.a)(u,i),visibleEndIndex:n.i(a.a)(c,i),partiallyVisibleStartIndex:n.i(a.a)(d,i),partiallyVisibleEndIndex:n.i(a.a)(h,i),renderStartIndex:n.i(a.a)(p,i),
renderEndIndex:n.i(a.a)(f,i)}}function o(e,t,i,o){var l=m===i,u=m===r&&1===F||m===s&&1===U;if(l&&u)return n.i(a.a)(e+t,o);var f=void 0,g=void 0,v=void 0;i===r&&(f=l?F*t:t,g=d(e,o),v=p(e,o)),i===s&&(f=l?U*t:t,g=c(e,o),v=h(e,o));var y=e+f;return g||v?Math.max(Math.min(y,v),g):e}function l(e){return m===r?Math.floor(e/F):e%U}function u(e){return m===r?e%F:Math.floor(e/U)}function c(e,t){var n=l(e);return m===r?n*F:n}function d(e,t){var n=u(e);return m===r?n:n*U}function h(e,t){if(m===r){
var i=c(e,t);return n.i(a.a)(i+(F-1),t)}var s=t-1,o=l(e),d=u(s),h=(d+1)*U-(U-o);return h<t?h:s-t%U-(U-1-o)}function p(e,t){if(m===r){var i=t-1,s=u(e),o=l(i),c=(o+1)*F-(F-s);return c<t?c:i-t%F-(F-1-s)}var h=d(e,t);return n.i(a.a)(h+(U-1),t)}
var f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=f.direction,m=void 0===g?r:g,v=f.rows,y=f.columns,b=f.overscan,S=void 0===b?0:b,I=f.innerHorizontalPadding,w=void 0===I?0:I,M=f.innerVerticalPadding,C=void 0===M?0:M,D=f.outerPaddingTop,P=void 0===D?0:D,T=f.outerPaddingRight,x=void 0===T?0:T,E=f.outerPaddingBottom,A=void 0===E?0:E,k=f.outerPaddingLeft,L=void 0===k?0:k,_=f.getCellWidth,N=f.getCellHeight,R=void 0,O=void 0,j=void 0,z=void 0,U=void 0,F=void 0,B=void 0,V=void 0,H=void 0,W=void 0
;return{options:f,getListStyle:e,getRelativeIndex:o,getPositionForIndex:t,getRangesForPosition:i}}var a=(n(33),n(1419));n.d(t,"c",function(){return r}),n.d(t,"b",function(){return s}),t.a=i;var r="vertical",s="horizontal"},function(e,t,n){"use strict";var i=n(1);n.n(i),i.PropTypes.shape({getListStyle:i.PropTypes.func.isRequired,getPositionForIndex:i.PropTypes.func.isRequired,getRangesForPosition:i.PropTypes.func.isRequired,getRelativeIndex:i.PropTypes.func.isRequired})},function(e,t,n){
"use strict";var i=n(1);n.n(i),i.PropTypes.shape({start:i.PropTypes.number.isRequired,end:i.PropTypes.number.isRequired,size:i.PropTypes.number.isRequired})},function(e,t,n){"use strict";var i=n(209),a=n(83),r=n(1556),s=a.a.extend({model:r.a,url:"/playlists?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"Playlist")}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"EPGLanguageModel",context:["server"],rootPropertyName:"Language",idAttribute:"code",
syncedAttrs:{code:a.a.string,title:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(65),r=n(78),s=n(18),o=n(1590),l=s.a.extend({name:"SearchModel",context:["server","provider"],idAttribute:"providerEntityID",url:function(){return this.get("key")},sessionAttrs:{providerEntityID:i.a.string,key:i.a.string,isSearchPending:i.a.boolean,isSearchPopulated:i.a.boolean,searchError:i.a.object},syncedRelations:{hubs:{relationClass:o.a,rootPropertyName:"Hub"}},defaults:{isSearchPending:!0,
isSearchPopulated:!1},augmentResponseText:function(e,t){return t===a.a.xml?n.i(r.a)(e):e},augmentResponse:function(e){return e.Hub=e.Hub.filter(function(e){return"0"!==e.size}),e}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(213),s=n(17),o=n(325),l=o.a.extend({name:"SyncItemModel",context:["server","device"],urlRoot:function(){return"/devices/"+(this.device?this.device.get("clientIdentifier"):this.get("clientIdentifier"))+"/sync_items"},
syncedAttrs:a.a.extend({},o.a.prototype.syncedAttrs,{version:{type:s.a.integer,save:!0},metadataType:{type:s.a.string,save:!0},rootTitle:{type:s.a.string,save:!0},machineIdentifier:{type:s.a.string,save:!0},Server:s.a.object}),defaults:function(){return{Location:{},Device:{},Server:{}}},augmentResponse:function(e){return"photoAlbum"===e.metadataType&&(e.metadataType="photoalbum"),e},sync:function(e,t,n){var i=r.a.addVersionHeaderForDevice(this.device,n);return o.a.prototype.sync.call(this,e,t,i)
},getSaveParams:function(e,t){var n=o.a.prototype.getSaveParams.apply(this,arguments),i=n.Item;return a.a.each(i,function(e,t){""===e&&delete i[t]}),{SyncItem:i}}});t.a=l},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.get("playQueueItem");if(i){var a=i.get("metadataItem"),l=r.a.first(a.get("Media")),u=r.a.first(l&&l.Part),c=s.a.states.PLAYING;e.get("videoPaused")&&e.get("slideshowPaused")&&(c=s.a.states.PAUSED);var d={
playQueueItem:i,metadataItem:a,media:l,part:u,position:1e3*e.get("positionSeconds")||0,duration:Math.floor(e.get("duration")||0),state:t.state||c,continuing:t.continuing};n.i(o.a)(d).done(function(){var t=e.get("playQueue");t&&t.fetch()})}}var a=n(2),r=n.n(a),s=n(40),o=n(767);t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(50),s=n(32);n.d(t,"n",function(){return o}),n.d(t,"q",function(){return l}),n.d(t,"m",function(){return u}),n.d(t,"o",function(){return c}),n.d(t,"p",function(){
return d}),n.d(t,"s",function(){return h}),n.d(t,"r",function(){return p}),n.d(t,"a",function(){return f}),n.d(t,"c",function(){return g}),n.d(t,"f",function(){return m}),n.d(t,"g",function(){return v}),n.d(t,"h",function(){return y}),n.d(t,"j",function(){return b}),n.d(t,"k",function(){return S}),n.d(t,"i",function(){return I}),n.d(t,"l",function(){return w}),n.d(t,"b",function(){return M}),n.d(t,"d",function(){return C}),n.d(t,"e",function(){return D})
;var o=n.i(r.a)(s._124),l=n.i(r.a)(s._125),u=n.i(r.a)(s._126),c=n.i(r.a)(s._127),d=n.i(r.a)(s._128),h=n.i(r.a)(s._129),p=n.i(r.a)(s._130),f=n.i(r.a)(s._131),g=n.i(r.a)(s._132),m=(n.i(r.a)(s._133),n.i(r.a)(s._134)),v=n.i(r.a)(s._135),y=n.i(r.a)(s._136),b=n.i(r.a)(s._137),S=n.i(r.a)(s._138),I=n.i(r.a)(s._139),w=n.i(r.a)(s._140),M=n.i(r.a)(s._131,function(e){return a()({},e,{shuffle:!0})}),C=n.i(r.a)(s._133,function(e){return a()({},e,{watched:!0})}),D=n.i(r.a)(s._133,function(e){return a()({},e,{
watched:!1})})},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return u});var r=n.i(i.a)(a._71),s=n.i(i.a)(a._72),o=n.i(i.a)(a._73),l=n.i(i.a)(a._74),u=n.i(i.a)(a._75)},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){return e.some(function(e){return e.refreshing})})}var a=n(8),r=(n.n(a),n(493));t.a=i
},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.containerKey},function(e,t){return t.containerTitle},n.i(r.a)(),s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r=arguments[4],s=arguments[5];if(i.isFolder){var o=e.match(/(.*?)\/folder/)[1],l={folderKey:s,folderTitle:i.title,parentFolderKey:e,parentFolderTitle:t};return n.i(u.a)(a,r,o,l,i.type)}return n.i(c.a)(a,r,s,{},i.type)})}
var a=n(8),r=(n.n(a),n(24)),s=n(47),o=n(45),l=n(1700),u=n(94),c=n(102);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.listType},n.i(r.a)(),function(e,t){return!t||e&&"mixed"!==e?e:t.extraType?"extra":t.type})}var a=n(8),r=(n.n(a),n(24));t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){if(!e||!e.Media)return{}
;var t=e.entityID,i=e.type,a=e.thumb,r=e.Media,o=r[0],l="clip"===i,u=o&&o.Part&&o.Part[0],c=u&&u.key,d=l||!c?a:c,h=u&&u.orientation,p=h&&n.i(s.a)(h);return{entityID:t,imageWidth:o&&(p?o.height:o.width),imageHeight:o&&(p?o.width:o.height),url:d,isVideo:l}})}var a=n(8),r=(n.n(a),n(24)),s=n(772);t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.listStyles}t.a=i},function(e,t,n){"use strict"
;var i=n(2875),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(12),u=n(13),c=n(131),d=n(23),h=n(59),p=n(218),f=n(1725),g=n(1739),m=n(1752),v=n(1755),y=n(1754),b=n(1751),S=n(1749),I=n(1748),w=n(1750),M=n(1753),C=n(1756),D={movie:m.a,show:v.a,season:y.a,episode:b.a,artist:S.a,album:I.a,clip:w.a,userPlaylistItem:w.a,playlist:M.a},P={playlist:{blur:5,saturation:50}},T=o.a.Layout.extend({className:"details-container",template:a.a,regions:{details:".row"},events:{"click .pivot-link":"onPivotClick"},
onlyAfterRender:["playTheme"],initialize:function(){var e=this.model.get("type"),t={};s()(P).has(e)&&(t=P[e]),this.mediaActions=new p.a({},{item:this.model,type:e,showAdvanced:!0}),n.i(u.a)("appModel").get("primaryServer")===this.model.server&&n.i(u.a)("appStore").dispatch(c.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:this.model.get("librarySectionID")})),this.once("render",s.a.bind(function(){l.a.trigger("show:background",{model:this.model,imageFilters:t}),
l.a.trigger("show:bar","actionbar",new f.a({model:this.model,mediaActions:this.mediaActions})),this.model.get("isLibraryItem")&&l.a.trigger("show:bar","breadcrumbbar",new g.a({model:this.model}))},this)),this.playTheme()},playTheme:function(){if(n.i(u.a)("appModel").get("settings").get("playThemeMusic")){var e=this.model.get("grandparentTheme")||this.model.get("parentTheme")||this.model.get("theme");if(!e)return null;var t=new h.a({theme:e,key:e,parentKey:this.model.get("key"),type:"track",
Media:[]},{server:this.model.server});d.a.execute("playBackgroundMedia",{item:t,volume:50})}},onRender:function(){var e,t=this.model.get("type");if(this.model.get("isLibraryItem")||"movie"!==t&&"episode"!==t||(t="clip"),s()(D).has(t)){e=new(0,D[t])({model:this.model,mediaActions:this.mediaActions})}else e=new C.a({model:this.model});this.details.append(e,this.$el)},onClose:function(){l.a.trigger("hide:bar","actionbar"),
n.i(u.a)("appModel").get("primaryServer")===this.model.server&&n.i(u.a)("appStore").dispatch(c.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:null})),this.model.get("isLibraryItem")&&l.a.trigger("hide:bar","breadcrumbbar")},onPivotClick:function(e){var t=this.model.section;if(t){t.get("items").scrollPosition=0}}});t.a=T},function(e,t,n){"use strict";var i=n(2897),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(142),d=n(86),h=n(23),p=u.a.ItemView.extend({
tagName:"span",className:"dropdown",template:a.a,modelEvents:{"change:Media":"render","change:streams":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=d.a.get(e.type),this.disabled=e.disabled,this.media=e.media},serializeData:function(){var e=this.model.server.get("multiuser"),t=this.model.server.get("shared"),i=n.i(c.a)(this.media,{streamType:this.streamType.id}),a=n.i(c.a)(this.media,{streamType:this.streamType.id,selected:!0}),r=s.a.first(a)
;return{showDropdown:!this.disabled&&i.length>1&&(!t||e),type:this.streamType.typeString,streams:i,selectedStream:r}},onRender:function(){this.$el.attr("id",this.streamType.typeString+"-dropdown")},onStreamClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id");h.a.execute("selectStream",{item:this.model,streamType:this.streamType,streamID:n})}});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(4),u=o.a.Layout.extend({events:{
"click .edit-lock-addon":"onLockClick","keyup .lockable-field:not(.selectized)":"onLockableFieldChange","change .lockable-field:not(.selectized)":"onLockableFieldChange"},ui:{form:".edit-metadata-form"},serializeData:function(){var e=this.model.get("lockedFields"),t={};e&&e.each(function(e){t[e.get("name")]=e.get("locked")});var i=this.model.toJSON(),a=this.model.get("mixedFields"),r={originallyAvailableAt:n.i(l.default)("YYYY-MM-DD")};return a&&a.forEach(function(e){r[e]=n.i(l.default)("MIXED")
}),{item:i,locked:t,placeholders:r,canReparent:this.canReparent,canEditSimilarArtists:this.canEditSimilarArtists,disableIndices:!this.canReparent}},flushChanges:function(){},getLockedFieldsArray:function(){var e=this.ui.form,t=this.model.get("lockedFields").reduce(function(e,t){return e[t.get("name")]=t.get("locked"),e},{});return e.find(".edit-lock-addon").each(function(e,n){var i=s()(n),a=i.data("field");i.hasClass("locked")?t[a]=!0:a in t&&(t[a]=!1)}),a.a.map(t,function(e,t){return{name:t,
locked:e}})},onLockClick:function(e){e.preventDefault(),s()(e.currentTarget).hasClass("disabled")||s()(e.currentTarget).toggleClass("locked")},onLockableFieldChange:function(e){var t=e instanceof s.a?e:s()(e.currentTarget);if(!e.force){var n=t.data("original-value");if(void 0===n&&(n=t.attr("value")||t.val()),t.data("original-value",n),t.val()===n)return}t.siblings(".edit-lock-addon").addClass("locked")}});t.a=u},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(52),s=n(15),o=n(12),l=n(384),u=n(792),c=n(258),d=n(1400),h=n(1097),p=(n.n(h),d.a.extend({mixins:c.a,paginated:!0,scrollPosition:0,scrollDirection:"down",mergeDelay:5e3,viewsByModel:{},initialize:function(e){d.a.prototype.initialize.apply(this,arguments),a.a.bindAll(this,"onResize","onScroll"),this.listModel=e.listModel,this.mediaActions=e.mediaActions,c.a.initialize.apply(this,arguments),null!=e.paginated&&(this.paginated=e.paginated),
this.channelName=e.channelName||"content",this.initializingScrollPosition=!0,this.merge=a.a.throttle(a.a.bind(this.merge,this),this.mergeDelay),this.listModel.scrollPosition&&(this.restoringScrollPosition=!0,this.scrollPosition=this.listModel.scrollPosition),this.listenTo(this.collection,"reset",this.onCollectionReset),this.listenTo(this.collection,"add",this.onCollectionAdd),this.listenTo(this.collection,"remove",this.onCollectionRemove),
o.a.trigger(this.channelName+".subscribe:resize",this.onResize),o.a.trigger(this.channelName+".subscribe:scroll",this.onScroll),o.a.trigger("start:scrollListener")},getLockIndexes:function(){var e,t=this.getVisibleBounds(),n=this.getLockBounds(),i=this.getIndexBounds(),r=a.a.range(t.from,t.to+1),s=a.a.range(t.to+1,n.to+1),o=a.a.range(t.from-1,n.from-1,-1);return"down"===this.scrollDirection?(o.reverse(),e=r.concat(s,o)):(r.reverse(),o.reverse(),e=r.concat(o,s)),a.a.filter(e,function(e){
return e>=i.from&&e<=i.to},this)},getVisibleBounds:function(){if(this.itemHeight&&this.itemsPerRow&&this.itemsPerPage){var e=Math.floor(this.scrollPosition/this.itemHeight)*this.itemsPerRow;return e>this.getTotalSize()&&(this.scrollPosition=0,e=0),{from:e,to:e+this.itemsPerPage-1+2*this.itemsPerRow}}return{from:0,to:0}},getLockBounds:function(){var e=this.getPageSize(),t=this.getVisibleBounds();return{from:t.from-e,to:t.to+e}},prepareCells:function(e){var t=this.getIndexBounds()
;this.pool.filter(function(e){return t.from<=e.id&&t.to>=e.id},this);var n=a.a.reject(e,this.getModelForId,this);if(n.length&&this.paginated){if(this.listModel.populatePromise&&"pending"===this.listModel.populatePromise.state())return void this.listModel.populatePromise.done(a.a.bind(this.prepareCells,this,e));var i=l.a.roundByPage({start:a.a.min(n),last:a.a.max(n)},2*this.getPageSize()),r=this.listModel.populateRange(i);this.trigger("change:loading",!0,{prepend:"up"===this.scrollDirection}),
r.always(a.a.bind(function(){this.trigger("change:loading",!1)},this))}},moveCell:function(e){if(e.updatedCSS||(e.view.$el.css({position:"absolute"}),e.updatedCSS=!0),this.itemWidth&&this.itemsPerRow){var t=e.id%this.itemsPerRow,n=Math.floor(e.id/this.itemsPerRow);e.view.$el.translate(t*this.itemWidth,n*this.itemHeight),e.movedToIndex=e.id}},moveElement:function(){},createCellView:function(e){var t=s.a.getOption(this,"itemViewOptions");a.a.isFunction(t)&&(t=t.call(this,e)),t=a.a.clone(t),
t.model=this.getModelForId(e.id),t.mediaActions=this.mediaActions,e.el&&(t.el=e.el);var n=s.a.getOption(this,"itemView");n._ensureElementExtension||(n._ensureElementExtension=n.extend({_ensureElement:function(){var e=this.el?a.a.result(this,"el"):r.a.$("<"+a.a.result(this,"tagName")+">");this.setElement(e,!1);var t=a.a.extend({},a.a.result(this,"attributes"));this.id&&(t.id=a.a.result(this,"id")),this.className&&(t.class=a.a.result(this,"className")),this.$el.attr(t)}}))
;var i=new n._ensureElementExtension(t);return e.el||(this.$el.append(i.$el),e.el=i.el),this.forwardItemViewEvents(i),i.remove=function(){return this.stopListening(),this.$el.unbind(),this.$el.empty(),this},i},getPageSize:function(){return this.itemsPerPage||1},clearAllReusedCells:function(){this.pool.each(function(e){var t=e.filledWithIndex===e.id,n=e.filledWithIndex===-1;t||n||(this.clearCell(e),e.filledWithIndex=-1)},this)},getTotalSize:function(){return this.listModel.getTotalSize()},
fillCell:function(e){var t=this.getModelForId(e.id);return!(!t||t!==e.view.model||e.view.isClosed)||(this.clearCell(e),!!t&&(e.view=this.createCellView(e),e.view.render(),this.indexViewByModel(e.view),!0))},clearCell:function(e){var t=e.view;t.model&&delete this.viewsByModel[t.model.cid],t.isClosed||t.close()},getIndexBounds:function(){return{from:0,to:this.getTotalSize()-1}},getModelForId:function(e){var t=this.listModel.get("populatedRange"),n=e-t.start;if(!(n<0))return this.collection.at(n)},
getViewForModel:function(e){return this.viewsByModel[e.cid]},indexViewByModel:function(e){this.viewsByModel[e.model.cid]=e},render:function(){this.updateHeight(),this.restoringScrollPosition||(d.a.prototype.render.apply(this,arguments),this.clearAllReusedCells())},updateHeight:function(){this.recalculateHeight&&(this.recalculateHeight=!1,this.listHeight=Math.ceil(this.getIndexBounds().to/this.itemsPerRow)*this.itemHeight-this.itemMarginBottom,this.$el.css("height",this.listHeight),
this.initScrolling())},itemViewOptions:function(){var e,t,n=this.listModel.section;if(n){var i=n.get("currentType"),r=this.listModel.getSort();if(e=i&&i.get("typeString"),r){var s=r.split(":");s.length&&(t=a.a.first(s))}}else e="clip";return{type:e,sort:t}},measureItem:function(){var e=this.createCellView({id:this.listModel.get("populatedRange").start});e.model||(this.remeasureItem=!0),e.render(),e.$el.css("visibility","hidden");var t=e.$el.appendTo(this.$el);a.a.defer(a.a.bind(function(){
this.itemWidth=t.outerWidth(!0),this.itemHeight=t.outerHeight(!0),this.itemMarginRight=parseInt(t.css("margin-right"),10),this.itemMarginBottom=parseInt(t.css("margin-bottom"),10),e.close(),e.$el.remove(),this.measureContainer(),this.render()},this))},measureContainer:function(){var e=parseInt(this.$el.css("margin-top"),10),t=parseInt(this.$el.css("margin-bottom"),10);this.containerWidth=this.$el.width(),this.containerHeight=this.containerSize.height-e-t,
this.itemsPerRow=Math.floor(this.containerWidth/this.itemWidth),this.itemsPerColumn=Math.floor((this.containerHeight+this.itemMarginBottom)/this.itemHeight),this.itemsPerPage=this.itemsPerRow*this.itemsPerColumn,this.itemsPadding=this.itemsPerRow*Math.max(this.itemsPerColumn,2),this.itemsPerPageWithPadding=2*this.itemsPadding+this.itemsPerPage,this.itemHeight&&(this.recalculateHeight=!0)},scrollToIndex:function(e){var t=Math.floor(e/this.itemsPerRow),n=t*this.itemHeight
;this.restrictScrollDirection=!0,o.a.trigger("update:scrollPosition",n)},merge:function(){if(!this.isClosed){var e=this.listModel.get("populatedRange"),t=e.start,n=e.end>this.itemsPerPageWithPadding?e.end:this.itemsPerPageWithPadding;if(n){if(t>0)return this.scrollDirection="up",void this.listModel.populateRange({start:0,size:t});this.listModel.set({currentPageStart:t,currentPageSize:n});this.listModel.fetch().done(a.a.bind(function(){this.listModel.scrollPosition=this.scrollPosition,
this.onCollectionReset()},this))}}},initScrolling:function(){this.initializingScrollPosition&&(this.restrictScrollDirection=!0,this.initializingScrollPosition=!1,this.restoringScrollPosition=!1,this.listModel.scrollPosition?o.a.trigger("update:scrollPosition",this.listModel.scrollPosition):this.containerScrollPosition.scrollTop>0&&o.a.trigger("update:scrollPosition",0))},onDeselectAll:function(e){a.a.each(e,function(e){this.pool.each(function(t){t.view.model===e&&t.view.deselect()},this)},this)
},onClose:function(){d.a.prototype.onClose.apply(this,arguments),c.a.onClose.apply(this,arguments),o.a.trigger("stop:scrollListener"),o.a.trigger(this.channelName+".unsubscribe:resize",this.onResize),o.a.trigger(this.channelName+".unsubscribe:scroll",this.onScroll),this.listModel.scrollPosition=this.scrollPosition},onCollectionReset:function(e,t){this.isRefreshing||(u.a.cancel(this.cid),this.pool.each(function(e){e.id=e.filledWithIndex=this.collection.indexOf(e.view.model)},this),
this.pool.reindex(),t&&t.previousModels&&a.a.each(t.previousModels,this.onCollectionRemove,this),this.initializingScrollPosition=!0,this.measureItem(),this.render(),this.getTotalSize()||this.trigger("change:loading",!1))},onCollectionAdd:function(e){this.remeasureItem&&(this.remeasureItem=!1,this.measureItem(e))},onCollectionRemove:function(e){var t=this.pool.findByModel(e),n=t&&t.view||{model:e,deselect:function(){}};this.triggerMethod("item:removed",n)},onResize:function(e){
this.containerSize=e,this.measureItem(),this.scrollDirection=this.containerWidth>this.$el.width()?"up":"down",this.render()},onScroll:function(e){this.containerScrollPosition=e,this.restoringScrollPosition||(this.itemWidth||this.measureItem(),0!==this.containerScrollPosition.scrollTop&&this.containerScrollPosition.scrollTop<this.scrollPosition?this.scrollDirection="up":this.scrollDirection="down",this.restrictScrollDirection&&(this.scrollDirection="down",this.restrictScrollDirection=!1),
this.scrollPosition=this.containerScrollPosition.scrollTop,this.render())}}));t.a=p},function(e,t,n){"use strict";var i=n(2942),a=n.n(i),r=n(2),s=n.n(r),o=n(169),l=n(58),u=o.a.extend({className:"striped-list-item media-list-item media-details-list-item",template:a.a,ui:s.a.extend({poster:".media-poster"},o.a.prototype.ui),initialize:function(e){o.a.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.type;"episode"===e&&(e="show"),
this.image=new l.a({model:this.model,type:e,getUrl:this.getPosterUrl,height:150})},bindings:s.a.extend({},o.a.prototype.bindings,{".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e&&e.length||0},autohide:function(e){return!/^(clip|userPlaylistItem)$/.test(this.model.get("type"))&&e>1}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&(!/^(artist|album)$/.test(this.model.get("type"))&&!!e)}},
".media-tagline":{modelAttribute:"tagline",autohide:!0},".media-summary":{modelAttribute:"summary",autohide:!0}})});t.a=u},function(e,t,n){"use strict";var i=n(258),a=n(43),r=a.a.extend({mixins:[i.a],onAddChild:function(e){this.forwardItemViewEvents(e)}});t.a=r},function(e,t,n){"use strict";var i=n(2977),a=n.n(i),r=n(2),s=n.n(r),o=n(192),l=n(19),u=o.a.extend({name:"downloadVersionModal",template:a.a,serializeData:function(){var e=this.model;return{defaultLinkTarget:"_self",
mediaItems:s.a.map(this.model.get("Media"),function(t,n){var i=s.a.clone(t);i.downloadUrl=e.getDownloadUrl(n);var a=e.getFilepath(n);return a&&(i.downloadName=l.getLastSegment(a)),i})}},onClick:function(){}});t.a=u},function(e,t,n){"use strict";var i=n(2985),a=n.n(i),r=n(5),s=n.n(r),o=n(23),l=n(192),u=l.a.extend({name:"playVersionModal",template:a.a,serializeData:function(){return{mediaItems:this.model.get("Media")}},onClick:function(e){e.preventDefault()
;var t=s()(e.currentTarget).data("value"),n=this.model.get("Media")[t];o.a.execute("playMedia",{item:this.model,media:n}),this.promise.resolve(n),this.hide()}});t.a=u},function(e,t,n){"use strict";var i=n(2986),a=n.n(i),r=n(13),s=n(57),o=s.a.extend({name:"plexPassModal",template:a.a,serializeData:function(){return{plexPassUrl:r.a("appModel").get("user").server.get("plexPassUrl"),friendlyName:this.model.get("friendlyName"),isClaimed:this.model.get("isClaimed")}}});t.a=o},function(e,t,n){
"use strict";var i=n(2),a=n.n(i),r=n(872),s=r.a.extend({className:"player mini-player",isMini:!0,regions:{controls:".mini-player-controls"},shortcutListeners:function(){var e=r.a.prototype.shortcutListeners.apply(this,arguments);return a.a.omit(e,"shortcut:stop")}});t.a=s},function(e,t,n){"use strict";var i=n(3043),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(161),u=n(4),c=n(58),d=n(190),h=n(1716),p=n(1712),f=n(873),g=n(409),m=n(1761),v=n(855),y=n(1765),b=o.a.Layout.extend({template:a.a,muted:!1,
mutedVolume:0,ui:{poster:".media-poster",previousBtn:".previous-btn",nextBtn:".next-btn",volumeBtn:".volume-btn",shuffleBtn:".shuffle-btn",repeatBtn:".repeat-btn",scrubPreview:".mini-player-scrub-preview",scrubPreviewText:".mini-player-scrub-preview>.tooltip-inner",dropdown:"#player-actions-dropdown"},regions:{rating:".rating-container",dropdown:"#player-actions-dropdown",seekBar:".seek-bar-container",volume:".player-volume-slider-container",playQueue:".player-play-queue-container",
lyrics:".player-lyrics-container"},modelEvents:{"change:metadataItem":"onMetadataItemChange","change:volume":"onVolumeChange","change:canSkipNextMessage":"onCanSkipNextMessageChange","change:canShuffle":"onCanShuffleChange","change:shuffled":"onShuffledChange","change:canRepeat":"onCanRepeatChange","change:repeatAll change:repeatItem":"onRepeatChange"},events:{"click .volume-btn":"onVolumeClick"},triggers:{"click .play-btn":{event:"play",preventDefault:!0},"click .pause-btn":{event:"pause",
preventDefault:!0},"click .previous-btn":{event:"previous",preventDefault:!0},"click .next-btn":{event:"next",preventDefault:!0},"click .shuffle-btn":{event:"toggleShuffle",preventDefault:!0},"click .repeat-btn":{event:"nextRepeat",preventDefault:!0},"click .maximize-btn":{event:"maximize",preventDefault:!0},"click .stop-btn":{event:"stop",preventDefault:!0},"click .media-poster-container":{event:"navigate:item",preventDefault:!0},"click .grandparent-title":{event:"navigate:grandparent",
preventDefault:!0},"click .item-title":{event:"navigate:item",preventDefault:!0}},onlyAfterRender:["onVolumeChange","onCanShuffleChange","onShuffledChange","onCanRepeatChange","onRepeatChange"],initialize:function(e){var t=e.upNextCollection;this.playQueueDropdown=new v.a({model:this.model,collection:t}),this.lyricsDropdown=new y.a({model:this.model}),this.setupPosterImage(),this.seekBarView=new f.a({model:this.model}),this.volumeSlider=new g.a({className:"player-volume-slider player-slider",
value:this.model.get("volume")}),this.listenTo(this.seekBarView,"change:value",this.onSeekBarValueChange),this.listenTo(this.seekBarView,"hover",this.onSeekBarHover),this.listenTo(this.volumeSlider,"change:value",this.onVolumeSliderValueChange),this.listenTo(this.playQueueDropdown,{"itemview:skip":this.onSkip,"itemview:remove":this.onRemove,move:this.onMove})},getPosterUrl:function(e){return e=e||this.model.get("parentThumb")||this.model.get("grandparentThumb"),
e||(this.model.parent?e=this.model.parent.get("thumb"):this.model.channel&&(e=this.model.channel.get("thumb"))),e},setupPosterImage:function(){var e=this.model.get("metadataItem");this.posterImage=new c.a({model:e,type:e.get("type"),getUrl:this.getPosterUrl,height:80,exposeUrl:!0}),this.listenTo(this.posterImage,"load",this.onPosterLoad)},updatePosterTitle:function(e){var t=e.get("parentTitle")||e.get("title");this.ui.poster.attr({"data-image-title":t,"data-title":e.get("title"),
"data-parent-title":e.get("parentTitle"),"data-grandparent-title":e.get("originalTitle")||e.get("grandparentTitle")})},updateVolumeBtn:function(e){var t=this.ui.volumeBtn;e>50?(this.muted=!1,t.addClass("high"),t.removeClass("low mute")):e<=50&&e>0?(this.muted=!1,t.addClass("low"),t.removeClass("high mute")):(this.muted=!0,t.addClass("mute"),t.removeClass("high low"))},updateShuffleBtn:function(){var e=this.model.get("canShuffle"),t=this.model.get("shuffled")
;this.ui.shuffleBtn.toggleClass("disabled",!e),this.ui.shuffleBtn.toggleClass("selected",!!t)},updateRepeatBtn:function(){var e=this.model.get("canRepeat"),t=this.model.get("repeatAll"),n=this.model.get("repeatItem"),i=this.ui.repeatBtn;i.toggleClass("disabled",!e),n&&!t?(i.addClass("one"),i.addClass("selected")):t&&!n?(i.removeClass("one"),i.addClass("selected")):(i.removeClass("one"),i.removeClass("selected"))},updateAncillaryBtns:function(){
var e=this.ui.shuffleBtn.parent(),t=this.model.get("showShuffle")||this.model.get("showRepeat")||this.model.get("showLyrics");s()(e).toggleClass("hidden",!t)},updateRatingView:function(e){var t="track"===e.get("type");if(this.$(this.rating.el).toggleClass("hidden",!t),t){var n,i=e.get("isLibraryItem"),a=this.model.get("playQueueItem"),r=this.model.get("playQueue"),s=r&&r.get("isRadio");a.get("advertisement")?n=p.a:s?n=h.a:i&&(n=d.a),n&&this.rating.show(new n({model:e}))}},
updateMoreActionsDropdown:function(){var e=this.model.get("metadataItem"),t=this.model.get("playQueue");if(t&&t.get("isRadio"))return void this.ui.dropdown.addClass("hidden");this.ui.dropdown.removeClass("hidden"),this.dropdown.append(new m.a({model:e,playQueue:t}))},updateControlTooltips:function(){var e=this.model.get("playQueueItem"),t=e.get("advertisement")?n.i(u.default)("Your mix will resume shortly."):this.model.get("canSkipNextMessage");this.ui.nextBtn.attr({title:t,
"data-original-title":t}),this.$el.tooltip({selector:".next-btn",container:"body",placement:"top"})},updatePosterImages:function(e){this.posterImage.src=null,this.posterImage.setModel(e),this.posterImage.render()},bindings:{".grandparent-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e,t){var n=this.model.get("playQueue");t.toggleClass("clickable",!n.get("isRadio"));var i=e.get("originalTitle")||e.get("grandparentTitle");return i?i:e.channel?e.channel.get("title"):void 0}},
".item-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e,t){var n=this.model.get("playQueue");return t.toggleClass("clickable",!n.get("isRadio")),e.get("title")}},".previous-btn":{modelAttribute:"canSkipPrevious",manual:!0,formatter:function(e,t){t.toggleClass("disabled",!e)}},".play-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),e}},
".pause-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),!e}},".stop-btn":{modelAttribute:"canStop",manual:!0,autohide:!0},".next-btn":{modelAttribute:"canSkipNext",manual:!0,formatter:function(e,t){t.toggleClass("disabled",!e)}},".shuffle-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".repeat-btn":{modelAttribute:"showRepeat",manual:!0,autohide:!0},
".ancillary-btns":{modelAttribute:"showShuffle",modelListeners:["showShuffle","showRepeat","showLyrics"],manual:!0,formatter:function(e,t){var n=this.model.get("showRepeat"),i=this.model.get("showLyrics"),a=e||n||i;return t.toggleClass("hidden",!a),null}},".seek-bar-container":{modelAttribute:"showSeekBar",manual:!0,autohide:!0},".mini-controls-numeric-progress":{modelAttribute:"showSeekBar",manual:!0,autohide:!0},".player-position":{modelAttribute:"position",
modelListeners:["position","duration"],formatter:function(e){return!!this.model.get("duration")&&n.i(l.a)(e)}},".separator":{modelAttribute:"duration",formatter:function(e){return!!e&&"/"}},".player-duration":{modelAttribute:"duration",formatter:function(e){return!!e&&n.i(l.a)(e)}},".volume-btn":{modelAttribute:"canSetVolume",manual:!0,autohide:!0,formatter:function(e,t){return this.$el.toggleClass("show-volume",e),e}},".maximize-btn":{modelAttribute:"showMaximize",manual:!0,autohide:!0},
".minimize-btn":{modelAttribute:"showMinimize",manual:!0,autohide:!0},".media-poster-container":{modelAttribute:"playQueue",manual:!0,formatter:function(e,t){t.toggleClass("clickable",!e.get("isRadio"))}}},onRender:function(){var e=this.model.get("metadataItem");this.updatePosterTitle(e),this.updateRatingView(e),this.posterImage.setElement(this.ui.poster),this.updateControlTooltips(),this.updateMoreActionsDropdown(),this.seekBar.append(this.seekBarView),this.volume.show(this.volumeSlider),
this.playQueue.show(this.playQueueDropdown),this.lyrics.show(this.lyricsDropdown),this.updateAncillaryBtns(),this.updateShuffleBtn(),this.updateRepeatBtn(),this.updateVolumeBtn(this.model.get("volume"))},onClose:function(){this.posterImage.close()},onMetadataItemChange:function(e,t){this.updatePosterImages(t),this.updatePosterTitle(t),this.updateRatingView(t),this.updateControlTooltips(),this.updateMoreActionsDropdown()},onCanSkipNextMessageChange:function(){this.updateControlTooltips()},
onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onCanShuffleChange:function(e,t){this.updateShuffleBtn()},onShuffledChange:function(e,t){this.updateShuffleBtn()},onCanRepeatChange:function(e,t){this.updateRepeatBtn()},onRepeatChange:function(e,t){this.updateRepeatBtn()},onPosterLoad:function(e){this.trigger("load:poster",e)},onSeekBarValueChange:function(e){this.trigger("change:position",e)},onSeekBarHover:function(e){
this.ui.scrubPreview.toggleClass("in",!!e),e&&(this.ui.scrubPreviewText.text(n.i(l.a)(e.time)),this.ui.scrubPreview.css("left",e.position-this.ui.scrubPreview.outerWidth()/2+"px"))},onVolumeSliderValueChange:function(e){this.trigger("change:volume",e)},onVolumeClick:function(e){e.preventDefault(),this.muted?(this.mutedVolume>0?this.trigger("change:volume",this.mutedVolume):this.trigger("change:volume",100),this.muted=!1,this.mutedVolume=0):(this.muted=!0,
this.mutedVolume=this.model.get("volume"),this.trigger("change:volume",0))},onSkip:function(e,t){this.trigger("skip",t)},onRemove:function(e,t){this.trigger("remove",t)},onMove:function(e,t){this.trigger("move",e,t)}});t.a=b},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.kind,i=e.size,a=e.direction,s=e.isSelected;return r()("div",{className:l()(t,d.a[a],d.a[n],d.a[i],s&&d.a.isSelected)})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n.n(o),u=n(22),c=n(2540),d=n.n(c)
;i.defaultProps={className:d.a.disclosureArrow,direction:u.f.DOWN,kind:u.b.DEFAULT,size:u.d.MEDIUM,isSelected:!1},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.circleClassName,a=e.iconClassName,s=e.title,l=u()(e,["className","circleClassName","iconClassName","title"]);return d.a.createElement(p.a,r()({className:t,"aria-label":n.i(h.default)("Record {title}",{title:s})},l),o()("div",{className:i},void 0,o()("span",{className:a})))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(25),f=n(2556),g=n.n(f);i.defaultProps={className:g.a.recordButton,circleClassName:g.a.recordCircle,iconClassName:g.a.recordIcon},t.a=i},function(e,t,n){"use strict";function i(e){for(var t=e.tags,i=e.message,a=[i],s=t.length-1,l=0;s>=0;){
for(var c=t[s],f=c.open,g=c.close,m=c.component,v=void 0===m?p.a:m,y=u()(c,["open","close","component"]),b=new RegExp("(^.*)"+n.i(h.a)("{"+f+"}")+"(.*)"+n.i(h.a)("{"+g+"}")+"(.*$)"),S=[],I=a.length-1;I>=0;I--){var w=a[I];if("string"!=typeof w)S.unshift(w);else{var M=w.match(b);if(M){var C=M[1],D=M[2],P=M[3];S.unshift(C,d.a.createElement(v,o()({key:l},y),D),P),l+=1}else S.unshift(w)}}S.length===a.length?s-=1:a=S}return r()("span",{},void 0,a)}
var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(212),p=(n(33),n(25));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.labelText,n=e.checkboxText,i=e.helpText,a=e.showErrors,s=e.errors,l=u()(e,["labelText","checkboxText","helpText","showErrors","errors"]),c=s[0];return o()(p.a,{},void 0,t&&o()(f.a,{},void 0,t),d.a.createElement(m.a,r()({hasError:a,checkboxText:o()("span",{},void 0,n,a&&c&&" \u2014 "+c)},l)),i&&o()(g.a,{},void 0,i))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(132),p=n(193),f=n(121),g=n(415),m=n(414);i.defaultProps={showErrors:!1,errors:[]},t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.labelText,i=e.helpText,a=e.showErrors,s=e.errors,l=u()(e,["name","labelText","helpText","showErrors","errors"]);return o()(p.a,{},void 0,o()(f.a,{showErrors:a,errors:s,name:t,labelText:n}),d.a.createElement(m.a,r()({name:t,hasError:a},l)),i&&o()(g.a,{},void 0,i))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(132),p=n(193),f=n(416),g=n(415),m=n(145);t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({className:c.a.toolbarMenu},e))}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(80),u=n(2595),c=n.n(u);t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(27),y=n(63),b=n(393),S=n(2003),I=n(2002),w=function(e){function t(i,a){c()(this,t);var r=h()(this,e.call(this,i,a));return r.onMouseEnter=function(e){r.props.showOnHover&&(r._isHovered=!0,r.setState({isOpen:!0}))},r.onMouseLeave=function(e){r.props.showOnHover&&(r._isHovered=!1,r.setState({isOpen:r._isFocused}))},r.onFocus=function(e){r.props.showOnFocus&&(r._isFocused=!0,
r.setState({isOpen:!0}))},r.onBlur=function(e){r.props.showOnFocus&&(r._isFocused=!1,r.setState({isOpen:r._isHovered}))},r.onPress=function(e){r.props.hideOnPress&&(r._isHovered=!1,r._isFocused=!1,r.setState({isOpen:!1}))},r.state={isOpen:!1},r._isHovered=!1,r._isFocused=!1,r._targetID=n.i(y.a)(),r}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.id,i=e.children,r=e.component,o=e.tooltip,u=e.tooltipClassName,c=e.tooltipAttachment,d=e.tooltipTarget,h=e.tooltipOptions,p=(e.showOnHover,e.showOnFocus,e.hideOnPress,e.onMouseEnter),f=e.onMouseLeave,g=e.onFocus,v=e.onBlur,y=e.onPress,S=l()(e,["id","children","component","tooltip","tooltipClassName","tooltipAttachment","tooltipTarget","tooltipOptions","showOnHover","showOnFocus","hideOnPress","onMouseEnter","onMouseLeave","onFocus","onBlur","onPress"]),w=this.state.isOpen
;return m.a.createElement(r,a()({id:t||this._targetID,onMouseEnter:n.i(b.a)(this.onMouseEnter,p),onMouseLeave:n.i(b.a)(this.onMouseLeave,f),onFocus:n.i(b.a)(this.onFocus,g),onBlur:n.i(b.a)(this.onBlur,v),onPress:n.i(b.a)(this.onPress,y)},S),s()(I.a,{className:u,attachment:c,options:h,target:d||t||this._targetID,isOpen:!!o&&w},void 0,o),i)},t}(g.Component);w.defaultProps={component:S.a,showOnHover:!0,showOnFocus:!0,hideOnPress:!0},t.a=w},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.model,a=e.thumb,s=e.width,l=e.height,c=void 0;switch(i){case"HDHomeRun CONNECT":c=u.a;break;case"HDHomeRun EXPAND":c=d.a;break;case"HDHomeRun EXTEND":c=p.a;break;case"HDHomeRun PRIME":c=g.a}var h={width:s,height:l};return r()(o.a,{serverEntityID:n,className:t,style:h,url:a,src:a?void 0:c,background:!0,width:s,height:l,minSize:!0})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(165)),l=n(3330),u=n.n(l),c=n(3331),d=n.n(c),h=n(3332),p=n.n(h),f=n(3333),g=n.n(f),m=n(2599),v=n.n(m);i.defaultProps={className:v.a.image},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.style;return r()("div",{className:t,style:i},void 0,n.i(o.default)("Powered by {provider}",{provider:"Gracenote\xae"}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(2605),u=n.n(l);i.defaultProps={className:u.a.attribution},t.a=i},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(14)),p=n(4),f=n(22),g=n(89),m=n(51),v=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPreviousStepPress=function(){i.props.dvrSetupPreviousStep({dvrID:i.props.dvrID})},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){return a()(m.a,{kind:f.b.DEFAULT,size:f.d.MEDIUM,
onPress:this.onPreviousStepPress},void 0,n.i(p.default)("Previous"))},t}(d.Component);t.a=n.i(h.b)(null,{dvrSetupPreviousStep:g.h})(v)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(4),f=n(387),g=n(22),m=n(27),v=(n(538),n(35),n(29)),y=n(25),b=n(340),S=n(574),I=n(421),w=n(2621),M=n.n(w),C=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onListUpdate=function(e){
var t=e.visibleStartIndex,n=e.visibleEndIndex,i=e.renderEndIndex,r=e.listStyle,s=a.props.onListReady,o=a._isReady?void 0:s;a._isReady=!0,a._visibleStartIndex=t,a._visibleEndIndex=n,a._pageSize=a._visibleEndIndex-a._visibleStartIndex;var l=t>0,u=i>n;a.setState({showActions:l||u,enablePrevious:l,enableNext:u,listHeight:r.height},o)},a.onListScrollIndexChange=function(e){a.setState({scrollIndex:e})},a.onPreviousPress=function(e){a.setState({scrollIndex:a._visibleStartIndex-a._pageSize-1})},
a.onNextPress=function(e){a.setState({scrollIndex:a._visibleEndIndex+1})},a.state={showActions:!1,enablePrevious:!1,enableNext:!1,listHeight:"auto",scrollIndex:0},a._isReady=!1,a}return c()(t,e),t.prototype.componentDidMount=function(){this.props.more&&!this.props.totalSize&&this.props.onPageRequest({startIndex:0,endIndex:this.props.size}),this.props.size||this.props.totalSize||(this._isReady=!0,this.props.onListReady&&this.props.onListReady())},t.prototype.shouldComponentUpdate=function(e,t){
return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,i=e.hubIdentifier,r=e.title,s=e.hubLink,o=e.listType,l=e.listContext,u=e.size,c=e.more,d=e.random,m=e.totalSize,w=e.keyPropName,C=e.itemsOffset,D=e.items,P=e.layout,T=e.cellRenderer,x=e.onPageRequest,E=this.state,A=E.showActions,k=E.enablePrevious,L=E.enableNext,_=E.listHeight;if(!u&&!m)return null;var N=n.i(f.a)(r),R=c?u+1:u,O={visibility:"auto"===_?"hidden":"inherit"},j={height:_,overflow:"hidden"}
;return a()("div",{className:t,style:O,"data-qa-id":"hub--"+i},void 0,a()(S.a,{},void 0,a()(I.a,{},void 0,s?a()(y.a,{to:s},void 0,N):N),A&&a()("div",{className:M.a.hubActions},void 0,a()(y.a,{className:M.a.hubScrollButton,"data-qa-id":"hubPreviousButton",isDisabled:!k,onPress:this.onPreviousPress},void 0,a()(v.a,{name:"plex-icon-hub-prev-560","aria-label":n.i(p.default)("Previous Page")})),a()(y.a,{className:M.a.hubScrollButton,"data-qa-id":"hubNextButton",isDisabled:!L,onPress:this.onNextPress
},void 0,a()(v.a,{name:"plex-icon-hub-next-560","aria-label":n.i(p.default)("Next Page")})))),a()("div",{style:j},void 0,h.a.createElement(b.a,{ignoreHeight:!0,keyPropName:w,items:D,itemsOffset:C,listType:o,listContext:l,scrollDirection:g.a.HORIZONTAL,scrollIndex:this.state.scrollIndex,size:d?u:m||R,layout:P,cellRenderer:T,ref:"list",onListUpdate:this.onListUpdate,onListScrollIndexChange:this.onListScrollIndexChange,onPageRequest:x})))},t}(d.Component);C.defaultProps={className:M.a.hubCell},
t.a=C},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className;return r()("div",{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2622)),l=n.n(o);i.defaultProps={className:l.a.hubCellHeader},t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(m.a)(),I.a,w.a,n.i(M.a)(),n.i(v.a)(),n.i(y.a)(),n.i(b.a)(),n.i(S.a)(),n.i(C.a)(),D.a,function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],i=arguments[2],a=arguments[3],r=arguments[4],s=arguments[5],o=arguments[6],l=arguments[7],u=arguments[8],c=arguments[9];return{activeTableColumns:a,metadataKey:e.key,type:r,title:e.title,selectionID:e.entityID,selectionType:o,activeSelectionType:c.activeSelectionType,isSelected:l,isPlaying:u,route:s,showLink:!!s,showPlay:n.i(A.a)(t,i,e),showEdit:n.i(A.b)(t,i,e),showSelect:n.i(A.c)(t,i,e),showMore:!e.isFolder}})}
function a(e,t){var i=t.serverEntityID,a=t.metadataListEntityID,r=t.metadataItemEntityID,s=t.listType,o=t.metricsPage;return{onPlayPress:function(){e(n.i(T.playMetadataItem)({serverEntityID:i,metadataItemEntityID:r,listType:s,metricsPage:o}))},onEditPress:function(){e(n.i(T.editMetadataItem)({serverEntityID:i,metadataItemEntityID:r,metricsPage:o}))},onSelectItem:function(t){e(n.i(P.a)(h()({metadataListEntityID:a,id:r},t)))},onDeselectItem:function(t){e(n.i(P.b)(h()({metadataListEntityID:a},t)))
},onDeselectAllItems:function(){e(n.i(P.e)({metadataListEntityID:a}))}}}var r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(6),h=n.n(d),p=n(1),f=n.n(p),g=n(8),m=(n.n(g),n(24)),v=n(549),y=n(548),b=n(403),S=n(402),I=n(47),w=n(45),M=n(845),C=n(1705),D=n(109),P=n(130),T=n(107),x=n(608),E=n(277),A=n(235),k=n(129),L=n(2058),_=n(2057),N=n.i(x.a)(_.a),R=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u]
;return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onSelectItem=function(e){i._isDoubleClick()?i._doubleClick():(i._firstClickTime=Date.now(),i.props.onSelectItem(e))},i.onDeselectItem=function(e){i._isDoubleClick()?i._doubleClick():(i._firstClickTime=Date.now(),i.props.onDeselectItem(e))},a=n,l()(i,a)}return c()(t,e),t.prototype._isDoubleClick=function(){return this._firstClickTime&&Date.now()-this._firstClickTime<300},t.prototype._doubleClick=function(){
var e=this.props,t=e.selectionType,n=e.showPlay,i=e.onPlayPress,a=e.onSelectItem,r=e.onDeselectAllItems;this._firstClickTime=0,r(),a({type:t}),n&&i()},t.prototype.render=function(){return this.props.metadataKey?this.props.showSelect?f.a.createElement(N,h()({},this.props,{onSelectItem:this.onSelectItem,onDeselectItem:this.onDeselectItem})):f.a.createElement(_.a,this.props):f.a.createElement(L.a,this.props)},t}(p.Component);t.a=n.i(k.a)(i,a,E.a)(R)},function(e,t,n){"use strict";function i(e){
var t=e.className,i=e.selectedListStyle,a=e.allListStyles;return n.i(o.f)(a,i)?r()(l.a,{className:t}):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(71)),l=n(595),u=n(2634),c=n.n(u);i.defaultProps={className:c.a.divider,allListStyles:[]},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.type;return n.i(o.c)(i)?r()(l.a,{className:t,name:"plex-icon-dvr-series-560"}):r()(l.a,{className:t,name:"plex-icon-dvr-single-560"})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(34)),l=n(29);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.component,i=e.isSecondary,a=e.isSplitLeft,s=e.isSplitRight,l=o()(e,["className","component","isSecondary","isSplitLeft","isSplitRight"]);return u.a.createElement(n,r()({className:d()(t,p.a.title,i&&p.a.isSecondary,a&&p.a.isSplitLeft,s&&p.a.isSplitRight)},l))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(30),d=n.n(c),h=n(2649),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.imageWidth,n=e.imageHeight,i=e.imageUrl,a=o()(e,["imageWidth","imageHeight","imageUrl"]);return u.a.createElement(c.a,r()({className:p.a.card,component:d.a,width:t,height:n,url:i},a))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(419),d=n(2087),h=n(2651),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.grandparentTitle;return r()(o.a,{className:t,title:n})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(427));t.a=i},function(e,t,n){"use strict"
;function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{title:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).title}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(427);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{rating:e.rating,ratingImage:e.ratingImage,audienceRating:e.audienceRating,audienceRatingImage:e.audienceRatingImage}})}
var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2105);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{addedAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).addedAt}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2107);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.duration;return i?r()("span",{className:t},void 0,n.i(o.a)(i)):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(247));t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.leafCount,a=void 0;return null!=i&&(a=1===i?n.i(o.default)("{episodeCount} episode",{episodeCount:i}):n.i(o.default)("{episodeCount} episodes",{episodeCount:i})),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{leafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).leafCount}})}
var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(585);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.title,a=e.index,s=e.route,o=e.parentTitle,d=e.parentIndex,h=e.parentRoute,p=e.originallyAvailableAt;return r()("span",{className:t},void 0,r()(u.a,{tabIndex:n,title:i,index:a,route:s,parentTitle:o,parentIndex:d,parentRoute:h,originallyAvailableAt:p}),i&&c,i&&r()(l.a,{tabIndex:n,title:i,route:s}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(90)),l=n(344),u=n(913),c=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.duration,a=e.viewOffset,s=void 0;if(i&&a){var l=(i-a)/1e3;l&&(s=n.i(o.a)(l))}return r()("span",{className:t},void 0,s)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(311));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{skipChildren:e.skipChildren,childCount:e.childCount,
leafCount:e.leafCount}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2124);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){return n.i(o.createSelector)(function(e,t){return t.listType},u.a,c.a,n.i(l.a)(),function(e,t,i,a){return n.i(f.a)(t,i,a,e)})}function a(e,t){var n={metadataListEntityID:t.metadataListEntityID,metricsPage:t.metricsPage};return{onPlayAllPress:function(){e(d.g(n))},onShufflePress:function(){e(d.h(n))},onAddToPlaylistPress:function(){e(d.i(s()({},n,{options:{
smart:t.isLibraryList}})))},onSyncPress:function(){e(d.j(n))},onOptimizePress:function(){e(d.k(n))}}}var r=n(6),s=n.n(r),o=n(8),l=(n.n(o),n(140)),u=n(47),c=n(45),d=n(130),h=n(129),p=n(277),f=n(2407),g=n(2136);t.a=n.i(h.a)(i,a,p.a)(g.a)},function(e,t,n){"use strict";function i(e){return u.a.createElement(h.a,o()({tooltip:n.i(c.default)("Add to Playlist")},e),p)}var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(29),h=n(148),p=r()(d.a,{name:"plex-icon-toolbar-add-to-playlist-560"})
;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.playLabel,i=void 0===t?n.i(h.default)("Play"):t,a=u()(e,["playLabel"]);return d.a.createElement(f.a,o()({tooltip:i},a),g)}var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(29),f=n(148),g=r()(p.a,{name:"plex-icon-toolbar-play-560"});t.a=i},function(e,t,n){"use strict";function i(e){return u.a.createElement(h.a,o()({tooltip:n.i(c.default)("Shuffle")},e),p)}
var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(29),h=n(148),p=r()(d.a,{name:"plex-icon-toolbar-shuffle-560"});t.a=i},function(e,t,n){"use strict";function i(e){return u.a.createElement(h.a,o()({tooltip:n.i(c.default)("Sync")},e),p)}var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(29),h=n(148),p=r()(d.a,{name:"plex-icon-toolbar-sync-560"});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className;return r()("div",{className:t})}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2665)),l=n.n(o);i.defaultProps={className:l.a.pageHeaderDivider},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=o()(e,["className"]);return u.a.createElement(c.a,r()({className:t},n))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(90),d=n(2668),h=n.n(d);i.defaultProps={className:h.a.pageHeaderSeparator},t.a=i},function(e,t,n){"use strict";function i(){return n.i(y.createSelector)(function(e,t){return t.directoryKey
},n.i(I.a)(),function(e,t){var n=!1,i=void 0;return e?i=f.a.find(t,function(t){return t.hubKey===e?(n=!0,!0):t.key===e}):(i=f.a.first(t),n=!(!i||!i.hubKey)),{isHubKey:n,selectedDirectory:i}})}function a(){return n.i(y.createSelector)(i(),n.i(S.a)(),b.a,function(e,t,n){var i=e.isHubKey,a=e.selectedDirectory,r=t.desktop,s=r.isProvidersPending,o=r.isLibrariesPending;return{isHubKey:i,selectedDirectory:a,libraryRoutes:n,showSpinner:!a&&(s||o)}})}
var r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=n.n(g),v=n(14),y=n(8),b=(n.n(y),n(846)),S=n(54),I=n(308),w=n(79),M=n(2142),C=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.shouldSaveRoute&&this._saveRoute()},t.prototype.componentDidUpdate=function(e){
var t=this.props,n=t.shouldSaveRoute,i=t.selectedDirectory,a=n!==e.shouldSaveRoute,r=i!==e.selectedDirectory;n&&(a||r)&&this._saveRoute()},t.prototype._saveRoute=function(){var e,t=this.props,n=t.serverEntityID,i=t.isHubKey,a=t.selectedDirectory,r=t.libraryRoutes;if(!i&&a){var o=n+"!"+a.key,l=window.location.hash;if(r[o]!==l){var u=s()({},r,(e={},e[o]=l,e));this.props.saveSettings({name:"experienceSettings",settings:{libraryRoutes:u}})}}},t.prototype.render=function(){
return m.a.createElement(M.a,this.props)},t}(g.Component);t.a=n.i(v.b)(a,{saveSettings:w.a})(C)},function(e,t,n){"use strict";function i(e){var t=e.types,i=e.pseudoTypes,a=e.selectedType,s=e.libraryRoute,l=e.activeSort,h=e.activeLimit,g=e.activeFilters,m=e.customFilter,v=o()(e,["types","pseudoTypes","selectedType","libraryRoute","activeSort","activeLimit","activeFilters","customFilter"]),y=t.length>0,b=i.length>0;return u.a.createElement(d.a,v,y&&t.map(function(e){var t=e.key,i=e.title
;return r()(p.a,{to:n.i(c.a)({typeKey:t,filters:m?g:null,sort:m?l:null,limit:m?h:null,customFilter:m},s),isSelected:a.key===t},t,i)}),y&&b&&f,i.map(function(e){var t=e.key,n=e.title,i=e.route;return r()(p.a,{to:i,isSelected:a.key===t},i,n)}))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=(n(98),n(189)),d=n(80),h=n(420),p=n(122),f=r()(h.a,{});t.a=i},function(e,t,n){"use strict";function i(e,t){return e.filter(function(e){return!!t[e]})}function a(e,t,n,i){var a=Math.floor(n/i),r={
showOverflow:a<e.length||t.length>0},s=a-(r.showOverflow?1:0);return e.forEach(function(e){r[e]=s-- >0,r[e]||(r[e+"Overflow"]=!0)}),r}function r(e,t,r){var s=function(n){function s(e,t){d()(this,s);var i=p()(this,n.call(this,e,t));return i.onMeasure=function(e){var t=e.width;i.setState({isMeasured:!0,width:t})},i.state={isMeasured:!1},i}return g()(s,n),s.prototype.render=function(){var n=this.state,s=n.isMeasured,l=n.width,c={};if(s){c=a(i(t,this.props),i(r,this.props),l,C)}return u()(I.a,{
className:M.a.toolbarContainer,ignoreHeight:!0,ignorePosition:!0,onMeasure:this.onMeasure},void 0,s&&v.a.createElement(e,o()({className:M.a.toolbar},this.props,c)))},s}(m.Component);return s.displayName="PageHeaderToolbar("+n.i(y.a)(e)+")",s.WrappedComponent=e,s}var s=n(6),o=n.n(s),l=n(3),u=n.n(l),c=n(9),d=n.n(c),h=n(11),p=n.n(h),f=n(10),g=n.n(f),m=n(1),v=n.n(m),y=n(217),b=n(76),S=n.n(b),I=n(87),w=n(2692),M=n.n(w),C=parseInt(S.a.toolbarButtonWidth,10);t.a=r},function(e,t,n){"use strict"
;function i(e){var t=e.server,n=e.provider,i=e.librarySectionKey,a=e.type,s=e.Genre;return r()(o.a,{server:t,provider:n,librarySectionKey:i,fallbackFilterKey:"genre",type:a,tags:s,limit:2})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(93),n(92),n(601));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.linkClassName,a=e.server,s=e.provider,c=e.librarySectionKey,d=e.fallbackFilterKey,h=e.type,p=e.tags,f=e.limit;if(!p||!p.length)return null;var g=h&&n.i(o.b)(h);return r()("span",{
className:t},void 0,p.map(function(e,t){if(!(t>=f)){var o={filters:e.filter,filterLabel:e.tag};return!o.filter&&d&&e.id&&(o.filters=d+"="+e.id),g&&(o.type=g.id),r()("span",{},t,r()(u.a,{className:i,to:n.i(l.a)(a,s,c,o)},void 0,e.tag),t+1<f&&t+1<p.length&&", ")}}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(34)),l=(n(93),n(92),n(94)),u=n(25),c=n(2707),d=n.n(c);i.defaultProps={linkClassName:d.a.tagsListLink,limit:1/0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className
;return r()("div",{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2708)),l=n.n(o);i.defaultProps={className:l.a.group},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.posterTop,n=e.pageHeight,i=t+n-2*h-f*p;return r()(d.a,{style:{position:"fixed",top:i}})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(76)),l=n.n(o),u=n(2412),c=n.n(u),d=n(571),h=parseInt(l.a.pagePadding,10),p=parseInt(c.a.defaultFontSize,10),f=parseFloat(c.a.lineHeightComputed,10);t.a=i},function(e,t,n){
"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),n.i(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=t.metadataItems.length,i=1===n&&!!e.primaryExtraKey;return{metadataItemEntityIDs:t.metadataItems,containerKey:t.containerKey,size:i?0:n,populatedRange:t.populatedRange}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(140),l=n(2245);t.a=n.i(a.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className
;return r()("div",{className:n},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2757)),l=n.n(o);i.defaultProps={className:l.a.actionLinks},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2758)),l=n.n(o);i.defaultProps={className:l.a.sectionDetails},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.children;return r()("div",{role:"navigation"},void 0,r()("div",{
className:l.a.sidebarListHeader,role:"header"},void 0,t),n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2789)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){var t=function(t){function i(e,n){c()(this,i);var a=h()(this,t.call(this,e,n));return a.onKeyDown=function(e){var t=a.state.pressedModifierKeys;S[e.which]&&t.indexOf(e.which)===-1&&a.setState({pressedModifierKeys:t.concat(e.which)})},a.onKeyUp=function(e){var t=a.state.pressedModifierKeys,n=t.indexOf(e.which);n>-1&&a.setState({
pressedModifierKeys:t.slice(0,n).concat(t.slice(n+1))})},a.onMouseDown=function(e){a._isMouseDown=!0},a.onMouseUp=function(e){a._isMouseDown=!1},a.onFocusChange=function(e){a.state.pressedModifierKeys.length&&a.setState({pressedModifierKeys:[]}),a._isMouseDown=!1},a.onMouseEnter=function(e){var t=a.props,n=t.selectionType,i=t.activeSelectionType;a._isMouseDown&&i&&i===n&&a.onSelectPress(e)},a.onSelectPress=function(e){
var t=a.props,n=t.selectionID,i=t.selectionType,r=t.isSelected,s=t.onSelectItem;r||s({id:n,type:i,isRangeSelect:e.shiftKey})},a.onDeselectPress=function(e){var t=a.props,n=t.selectionID,i=t.isSelected,r=t.onDeselectItem;i&&r({id:n})},a.state={pressedModifierKeys:[]},a}return f()(i,t),i.prototype.componentDidMount=function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mousedown",this.onMouseDown),
document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("dragstart",this.onFocusChange),document.addEventListener("contextmenu",this.onFocusChange),window.addEventListener("blur",this.onFocusChange)},i.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},i.prototype.componentWillUnmount=function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),
document.removeEventListener("mousedown",this.onMouseDown),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("dragstart",this.onFocusChange),document.removeEventListener("contextmenu",this.onFocusChange),window.removeEventListener("blur",this.onFocusChange)},i.prototype.render=function(){var t=this.props,n=t.selectionType,i=t.activeSelectionType,a=t.isSelected,r=l()(t,["selectionType","activeSelectionType","isSelected"]),o=this.state.pressedModifierKeys,u=!!i
;return m.a.createElement(e,s()({hasActiveSelection:u,isSelected:a,isOtherItemSelected:u&&!a,isConflictingTypeSelected:u&&i!==n,isModifierKeyPressed:o.length>0,onMouseEnter:this.onMouseEnter,onSelectPress:this.onSelectPress,onDeselectPress:this.onDeselectPress},r))},i}(g.Component);return t.displayName="Selectable("+n.i(b.a)(e)+")",t.WrappedComponent=e,t.defaultProps={disableSelection:!1},t}
var a,r=n(6),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(404),y=n(27),b=n(217),S=(a={},a[v.c]=!0,a[v.d]=!0,a[v.e]=!0,a[v.f]=!0,a[v.g]=!0,a);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;t===o.b&&i<0&&i++;var l=e+t+i+a;if(p.hasOwnProperty(l))return p[l]
;var f=n.i(c.c)(e,t),g=parseInt(u.a.posterTitleHeight,10),m=parseInt(u.a.posterTitlePadding,10),v=void 0,y=void 0,b=void 0,S=void 0;t===o.b?(v=2,y=300,b=1,S=4,m*=2):(v="mixed"===e?a+3:a,y=f>1?180:120,b=2,S=11);var I=v*g+m,w=n.i(s.a)({direction:s.b,rows:1,overscan:4,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:10,outerPaddingRight:5,outerPaddingBottom:5,outerPaddingLeft:5,getCellWidth:function(e){return n.i(d.a)(r()({},e,{minCellWidth:y,minColumns:b,maxColumns:S,
columnAdjustment:i,aspectRatio:f}))},getCellHeight:function(e){return n.i(h.a)(r()({},e,{aspectRatio:f,titleHeight:I}))}});return w.cellOptions={minCellWidth:y,minColumns:b,maxColumns:S,columnAdjustment:i,aspectRatio:f,titleHeight:I},p[l]=w,w}var a=n(6),r=n.n(a),s=n(537),o=n(35),l=n(76),u=n.n(l),c=n(203),d=n(961),h=n(960);t.a=i;var p={}},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:40,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return n.i(a.a)({direction:a.c,columns:1,overscan:t,getCellWidth:function(e){return e.innerViewportWidth},getCellHeight:function(){return e}})}var a=n(537);t.a=i},function(e,t,n){"use strict";var i=n(610),a=n(76),r=n.n(a),s=parseInt(r.a.tableRowHeight,10),o=n.i(i.a)(s);t.a=o},function(e,t,n){"use strict";function i(e,t,i,r){if(i){var s=n.i(a.a)(i,t,r)
;if(1===s.length)return s[0];var o=void 0;return e[t]&&(o=e[t][i]),o&&s.indexOf(o)>-1?o:s[0]}}var a=n(439);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.type,i=e.server,a=e.provider,u=e.libraryKey,c=e.selectedDirectory,d=e.libraryDirectories,h=void 0===d?[]:d,p=[],f=r.a.some(h,function(e){return"cluster"===e.key}),g=i.ownerFeatures&&i.ownerFeatures.indexOf("item_clusters")!==-1,m=r.a.some(h,function(e){return"folder"===e.key});return"photo"===t&&f&&g&&p.push({key:"timeline",
title:n.i(s.default)("Timeline"),route:n.i(l.a)(i,a,u,{save:1})}),m&&p.push({key:"folder",title:n.i(s.default)("Folders"),route:n.i(o.a)(i,a,u,{folderKey:c.key+"/folder",folderTitle:c.title,save:1})}),p}var a=n(2),r=n.n(a),s=n(4),o=n(94),l=n(968);t.a=i},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){e.exports={}},function(e,t){e.exports=!0},function(e,t,n){
var i=n(350),a=n(2456),r=n(614),s=n(620)("IE_PROTO"),o=function(){},l=function(){var e,t=n(975)("iframe"),i=r.length;for(t.style.display="none",n(2448).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;i--;)delete l.prototype[r[i]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(o.prototype=i(e),n=new o,o.prototype=null,n[s]=e):n=l(),void 0===t?n:a(n,t)}},function(e,t){
t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(282).f,a=n(238),r=n(284)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,r)&&i(e,r,{configurable:!0,value:t})}},function(e,t,n){var i=n(621)("keys"),a=n(445);e.exports=function(e){return i[e]||(i[e]=a(e))}},function(e,t,n){var i=n(136),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});e.exports=function(e){return a[e]||(a[e]={})}},function(e,t){
e.exports="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(281);e.exports=function(e,t){if(!i(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!i(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!i(a=n.call(e)))return a
;if(!t&&"function"==typeof(n=e.toString)&&!i(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var i=n(136),a=n(103),r=n(616),s=n(626),o=n(282).f;e.exports=function(e){var t=a.Symbol||(a.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:s.f(e)})}},function(e,t,n){t.f=n(284)},,,,,,,,,function(e,t,n){"use strict";function i(e){return Boolean(e&&"function"==typeof e.dispose)}t.__esModule=!0,t.default=i,e.exports=t.default
},function(e,t){function n(e,t,n){"use strict";function i(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function a(r){var s,o,l;if(r.nodeType==v.DOCUMENT_NODE){var u,c;for(o=r.firstChild,u=0,c=r.childNodes.length;u<c;u+=1)if(r.childNodes[u].nodeType!==v.COMMENT_NODE){o=r.childNodes[u];break}return n?s=a(o):(s={},l=i(o),s[l]=a(o)),s}if(r.nodeType==v.ELEMENT_NODE){var d=0,h=r.childNodes;s=new Object;for(var p=0;p<h.length;p++)if(o=h.item(p),l=i(o),d++,
null==s[l])s[l]=a(o);else{if(null!=s[l]&&!(s[l]instanceof Array)){var f=s[l];s[l]=[],s[l].push(f)}for(var g=0;null!=s[l][g];)g++;s[l][g]=a(o)}for(var m=0;m<r.attributes.length;m++){var y=r.attributes.item(m);d++;for(var b=y.value,S=0,I=e.length;S<I;S++){var w=e[S];w.test.call(this,y.value)&&(b=w.converter.call(this,y.value))}s[t+y.name]=b}if(null!=s["#text"]){var M=s["#text"];"string"==typeof M?(M=M.replace(/[\r\n]/g,""),s["#text"]=M,1==d&&(s=M)):delete s["#text"]}return s}
return r.nodeType==v.TEXT_NODE||r.nodeType==v.CDATA_SECTION_NODE?r.nodeValue:r.nodeType==v.COMMENT_NODE?null:void 0}function r(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):e}function s(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t+=m?r(e.__text):e.__text),t}function o(e){var t="";return e instanceof Object?t+=s(e):null!=e&&(t+=m?r(e):e),
t}function l(e,t){return e.indexOf(t,e.length-t.length)!==-1}function u(e,t){return!!(l(t.toString(),"_asArray")||0==t.toString().indexOf("_")||e[t]instanceof Function)}function c(e){var t=0;if(e instanceof Object)for(var n in e)u(e,n)||t++;return t}function d(e){var t=[];if(e instanceof Object)for(var n in e){var i=n.toString(),a=i.charAt(0);n.indexOf("__")==-1&&("_"===a||a===a.toLowerCase()&&a!==a.toUpperCase())&&t.push(n)}return t}function h(e,t,n){var i=""
;if(0==e.length)i+=p(e,t,n,!0);else for(var a=0;a<e.length;a++)i+=p(e[a],t,d(e[a]),!1),i+=g(e[a]),i+=f(e[a],t);return i}function p(e,t,n,i){var a="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var s=0;s<n.length;s++){var o=n[s],l=r(e[o]);a+=" "+o.substr(1)+"='"+l+"'"}return a+=i?"/>":">"}function f(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function g(e){var t="";if(c(e)>0)for(var n in e)if(!u(e,n)){var i=e[n],a=d(i)
;if(null==i||void 0==i)t+=p(i,n,a,!0);else if(i instanceof Object)if(i instanceof Array)t+=h(i,n,a);else{var r=c(i);r>0||null!=i.__text||null!=i.__cdata?(t+=p(i,n,a,!1),t+=g(i),t+=f(i,n)):t+=p(i,n,a,!0)}else t+=p(i,n,a,!1),t+=o(i),t+=f(i,n)}return t+=o(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var m=!1,v={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){var t;if(window.DOMParser){
t=(new window.DOMParser).parseFromString(e,"text/xml")}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},this.xml2json=function(e){return a(e.documentElement||e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return this.xml2json(t.documentElement||t)},this.getVersion=function(){return"1.0.11"},this.escapeMode=function(e){m=e},this.json2xml_str=function(e){return g(e)}}e.exports=n
},,function(e,t,n){"use strict";function i(e,t){this.helpers=e||{},this.partials=t||{},a(this)}function a(e){e.registerHelper("helperMissing",function(e){if(2!==arguments.length)throw new o("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var i=n.inverse||function(){},a=n.fn;return c(t)&&(t=t.call(this)),t===!0?a(this):t===!1||null==t?i(this):u(t)?t.length>0?e.helpers.each(t,n):i(this):a(t)}),e.registerHelper("each",function(e,t){var n,i=t.fn,a=t.inverse,r=0,s=""
;if(c(e)&&(e=e.call(this)),t.data&&(n=p(t.data)),e&&"object"==typeof e)if(u(e))for(var o=e.length;r<o;r++)n&&(n.index=r,n.first=0===r,n.last=r===e.length-1),s+=i(e[r],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=r,n.first=0===r),s+=i(e[l],{data:n}),r++);return 0===r&&(s=a(this)),s}),e.registerHelper("if",function(e,t){return c(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||s.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){
return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){if(c(e)&&(e=e.call(this)),!s.isEmpty(e))return t.fn(e)}),e.registerHelper("log",function(t,n){var i=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(i,t)})}function r(e,t){h.log(e,t)}var s=n(640),o=n(639).default;t.VERSION="1.3.0";t.COMPILER_REVISION=4;var l={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};t.REVISION_CHANGES=l
;var u=s.isArray,c=s.isFunction,d=s.toString;t.HandlebarsEnvironment=i,i.prototype={constructor:i,logger:h,log:r,registerHelper:function(e,t,n){if("[object Object]"===d.call(e)){if(n||t)throw new o("Arg not supported with multiple helpers");s.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){"[object Object]"===d.call(e)?s.extend(this.partials,e):this.partials[e]=t}};var h={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,
level:3,log:function(e,t){if(h.level<=e){var n=h.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};t.logger=h,t.log=r;var p=function(e){var t={};return s.extend(t,e),t};t.createFrame=p},function(e,t,n){"use strict";function i(e,t){var n;t&&t.firstLine&&(n=t.firstLine,e+=" - "+n+":"+t.firstColumn);for(var i=Error.prototype.constructor.call(this,e),r=0;r<a.length;r++)this[a[r]]=i[a[r]];n&&(this.lineNumber=n,this.column=t.firstColumn)}
var a=["description","fileName","lineNumber","message","name","number","stack"];i.prototype=new Error,t.default=i},function(e,t,n){"use strict";function i(e){return l[e]||"&amp;"}function a(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof o?e.toString():e||0===e?(e=""+e,c.test(e)?e.replace(u,i):e):""}function s(e){return!e&&0!==e||!(!p(e)||0!==e.length)}var o=n(1007).default,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;",
"'":"&#x27;","`":"&#x60;"},u=/[&<>"'`]/g,c=/[&<>"'`]/;t.extend=a;var d=Object.prototype.toString;t.toString=d;var h=function(e){return"function"==typeof e};h(/x/)&&(h=function(e){return"function"==typeof e&&"[object Function]"===d.call(e)});var h;t.isFunction=h;var p=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===d.call(e)};t.isArray=p,t.escapeExpression=r,t.isEmpty=s},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length
;for(this.__data__=new a;++t<n;)this.add(e[t])}var a=n(1012),r=n(3159),s=n(3160);i.prototype.add=i.prototype.push=r,i.prototype.has=s,e.exports=i},function(e,t,n){var i=n(354),a=i.Symbol;e.exports=a},function(e,t,n){function i(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}var a=n(3115);e.exports=i},function(e,t){function n(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)if(n(t,e[i]))return!0;return!1}e.exports=n},function(e,t){function n(e,t){
for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}e.exports=n},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t){function n(e,t){return e.has(t)}e.exports=n},function(e,t,n){function i(e){return null!=e&&r(e.length)&&!a(e)}var a=n(1024),r=n(1025);e.exports=i},function(e,t,n){"use strict";function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var i=Object.keys(e),r=Object.keys(t)
;if(i.length!==r.length)return!0;var s={},o=void 0,l=void 0;for(o=0,l=n.length;o<l;o++)s[n[o]]=!0;for(o=0,l=i.length;o<l;o++){var u=i[o],c=e[u],d=t[u];if(c!==d){if(!s[u]||null===c||null===d||"object"!==(void 0===c?"undefined":a(c))||"object"!==(void 0===d?"undefined":a(d)))return!0;var h=Object.keys(c),p=Object.keys(d);if(h.length!==p.length)return!0;for(var f=0,g=h.length;f<g;f++){var m=h[f];if(c[m]!==d[m])return!0}}}return!1}Object.defineProperty(t,"__esModule",{value:!0})
;var 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};t.default=i},function(e,t,n){"use strict";t.__esModule=!0;t.FILE="__NATIVE_FILE__";t.URL="__NATIVE_URL__";t.TEXT="__NATIVE_TEXT__"},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var a=n(3198);t.DragDropContext=i(a);var r=n(3199)
;t.DragLayer=i(r);var s=n(3200);t.DragSource=i(s);var o=n(3201);t.DropTarget=i(o)},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,r=0;r<n.length;r++){if(!a.call(t,n[r])||e[n[r]]!==t[n[r]])return!1;if(e[n[r]]!==t[n[r]])return!1}return!0}t.__esModule=!0,t.default=i,e.exports=t.default},,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e){
"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.a=i},,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var a=n(1079),r=i(a),s=n(3296),o=i(s),l=n(3295),u=i(l),c=n(3294),d=i(c),h=n(1078),p=i(h),f=n(1080);i(f);t.createStore=r.default,t.combineReducers=o.default,t.bindActionCreators=u.default,
t.applyMiddleware=d.default,t.compose=p.default},,,,function(e,t){!function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,n){var i=(new Date).getTime(),a=Math.max(0,16-(i-e)),r=window.setTimeout(function(){
t(i+a)},a);return e=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}()},function(e,t,n){(function(i){var a,r,a,s,a,o,l;!function(i,s){a=s,r="function"==typeof a?a.call(t,n,t,e):a}(0,function(){var e=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){if(!(e=a(String(e||"").toLowerCase()))||!e.length)return[];var t,n,i,s,l=[],u=e.split(/ +/);for(t=0,n=u.length;t<n;t++){if(i=r(u[t]),
this.settings.diacritics)for(s in o)o.hasOwnProperty(s)&&(i=i.replace(new RegExp(s,"g"),o[s]));l.push({string:u[t],regex:new RegExp(i,"i")})}return l},e.prototype.iterator=function(e,t){var n;n=s(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;t<n;t++)e(this[t],t,this)}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)},n.apply(e,[t])},e.prototype.getScoreFunction=function(e,t){var n,i,a,r;n=this,e=n.prepareSearch(e,t),a=e.tokens,i=e.options.fields,
r=a.length;var s=function(e,t){var n,i;return e?(e=String(e||""),(i=e.search(t.regex))===-1?0:(n=t.string.length/e.length,0===i&&(n+=.5),n)):0},o=function(){var e=i.length;return e?1===e?function(e,t){return s(t[i[0]],e)}:function(t,n){for(var a=0,r=0;a<e;a++)r+=s(n[i[a]],t);return r/e}:function(){return 0}}();return r?1===r?function(e){return o(a[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,i=0;n<r;n++){if((t=o(a[n],e))<=0)return 0;i+=t}return i/r}:function(e){
for(var t=0,n=0;t<r;t++)n+=o(a[t],e);return n/r}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var i,a,r,s,o,l,u,c,d,h,p;if(r=this,e=r.prepareSearch(e,n),p=!e.query&&n.sort_empty||n.sort,d=function(e,t){return"$score"===e?t.score:r.items[t.id][e]},o=[],p)for(i=0,a=p.length;i<a;i++)(e.query||"$score"!==p[i].field)&&o.push(p[i]);if(e.query){for(h=!0,i=0,a=o.length;i<a;i++)if("$score"===o[i].field){h=!1;break}h&&o.unshift({field:"$score",direction:"desc"})}else for(i=0,
a=o.length;i<a;i++)if("$score"===o[i].field){o.splice(i,1);break}for(c=[],i=0,a=o.length;i<a;i++)c.push("desc"===o[i].direction?-1:1);return l=o.length,l?1===l?(s=o[0].field,u=c[0],function(e,n){return u*t(d(s,e),d(s,n))}):function(e,n){var i,a,r;for(i=0;i<l;i++)if(r=o[i].field,a=c[i]*t(d(r,e),d(r,n)))return a;return 0}:null},e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;t=n({},t);var i=t.fields,a=t.sort,r=t.sort_empty;return i&&!s(i)&&(t.fields=[i]),
a&&!s(a)&&(t.sort=[a]),r&&!s(r)&&(t.sort_empty=[r]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}},e.prototype.search=function(e,t){var n,i,a,r,s=this;return i=this.prepareSearch(e,t),t=i.options,e=i.query,r=t.score||s.getScoreFunction(i),e.length?s.iterator(s.items,function(e,a){n=r(e),(t.filter===!1||n>0)&&i.items.push({score:n,id:a})}):s.iterator(s.items,function(e,t){i.items.push({score:1,id:t})}),a=s.getSortFunction(i,t),a&&i.items.sort(a),
i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i};var t=function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=l(String(e||"")),t=l(String(t||"")),e>t?1:t>e?-1:0)},n=function(e,t){var n,i,a,r;for(n=1,i=arguments.length;n<i;n++)if(r=arguments[n])for(a in r)r.hasOwnProperty(a)&&(e[a]=r[a]);return e},a=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},r=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")
},s=Array.isArray||i&&i.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o={a:"[a\xc0\xc1\xc2\xc3\xc4\xc5\xe0\xe1\xe2\xe3\xe4\xe5\u0100\u0101\u0105\u0104]",c:"[c\xc7\xe7\u0107\u0106\u010d\u010c]",d:"[d\u0111\u0110\u010f\u010e]",e:"[e\xc8\xc9\xca\xcb\xe8\xe9\xea\xeb\u011b\u011a\u0112\u0113\u0119\u0118]",i:"[i\xcc\xcd\xce\xcf\xec\xed\xee\xef\u012a\u012b]",l:"[l\u0142\u0141]",n:"[n\xd1\xf1\u0148\u0147\u0144\u0143]",
o:"[o\xd2\xd3\xd4\xd5\xd5\xd6\xd8\xf2\xf3\xf4\xf5\xf6\xf8\u014c\u014d]",r:"[r\u0159\u0158]",s:"[s\u0160\u0161\u015b\u015a]",t:"[t\u0165\u0164]",u:"[u\xd9\xda\xdb\xdc\xf9\xfa\xfb\xfc\u016f\u016e\u016a\u016b]",y:"[y\u0178\xff\xfd\xdd]",z:"[z\u017d\u017e\u017c\u017b\u017a\u0179]"},l=function(){var e,t,n,i,a="",r={};for(n in o)if(o.hasOwnProperty(n))for(i=o[n].substring(2,o[n].length-1),a+=i,e=0,t=i.length;e<t;e++)r[i.charAt(e)]=n;var s=new RegExp("["+a+"]","g");return function(e){
return e.replace(s,function(e){return r[e]}).toLowerCase()}}();return e}),function(i,r){a=r,s="function"==typeof a?a.call(t,n,t,e):a}(0,function(){var e={};e.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var n,i,a,r=this,s=[];if(r.plugins={names:[],settings:{},requested:{},loaded:{}},t.isArray(e))for(n=0,i=e.length;n<i;n++)"string"==typeof e[n]?s.push(e[n]):(r.plugins.settings[e[n].name]=e[n].options,
s.push(e[n].name));else if(e)for(a in e)e.hasOwnProperty(a)&&(r.plugins.settings[a]=e[a],s.push(a));for(;s.length;)r.require(s.shift())},e.prototype.loadPlugin=function(t){var n=this,i=n.plugins,a=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');i.requested[t]=!0,i.loaded[t]=a.fn.apply(n,[n.plugins.settings[t]||{}]),i.names.push(t)},e.prototype.require=function(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){
if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]},e.define=function(t,n){e.plugins[t]={name:t,fn:n}}};var t={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}};return e}),function(i,u){o=[n(5),r,s],a=u,void 0!==(l="function"==typeof a?a.apply(t,o):a)&&(e.exports=l)}(0,function(e,t,n){"use strict";var i=function(e,t){if("string"!=typeof t||t.length){
var n="string"==typeof t?new RegExp(t,"i"):t,i=function(e){var t=0;if(3===e.nodeType){var a=e.data.search(n);if(a>=0&&e.data.length>0){var r=e.data.match(n),s=document.createElement("span");s.className="highlight";var o=e.splitText(a),l=(o.splitText(r[0].length),o.cloneNode(!0));s.appendChild(l),o.parentNode.replaceChild(s,o),t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName))for(var u=0;u<e.childNodes.length;++u)u+=i(e.childNodes[u]);return t}
;return e.each(function(){i(this)})}},a=function(){};a.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[e]:(this._events=this._events||{},void(e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)))},trigger:function(e){if(this._events=this._events||{},
e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},a.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=a.prototype[t[n]]};var r=/Mac/.test(navigator.userAgent),s=r?91:17,o=r?18:17,l=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,u=function(e){return void 0!==e},c=function(e){
return void 0===e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},d=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},h=function(e){return(e+"").replace(/\$/g,"$$$$")},p={};p.before=function(e,t,n){var i=e[t];e[t]=function(){return n.apply(e,arguments),i.apply(e,arguments)}},p.after=function(e,t,n){var i=e[t];e[t]=function(){var t=i.apply(e,arguments);return n.apply(e,arguments),t}};var f=function(e){var t=!1;return function(){
t||(t=!0,e.apply(this,arguments))}},g=function(e,t){var n;return function(){var i=this,a=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(i,a)},t)}},m=function(e,t,n){var i,a=e.trigger,r={};e.trigger=function(){var n=arguments[0];if(t.indexOf(n)===-1)return a.apply(e,arguments);r[n]=arguments},n.apply(e,[]),e.trigger=a;for(i in r)r.hasOwnProperty(i)&&a.apply(e,r[i])},v=function(e,t,n,i){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode
;return t.currentTarget=n,i.apply(this,[t])})},y=function(e){var t={};if("selectionStart"in e)t.start=e.selectionStart,t.length=e.selectionEnd-t.start;else if(document.selection){e.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t.start=n.text.length-i,t.length=i}return t},b=function(e,t,n){var i,a,r={};if(n)for(i=0,a=n.length;i<a;i++)r[n[i]]=e.css(n[i]);else r=e.css();t.css(r)},S=function(t,n){if(!t)return 0
;var i=e("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");b(n,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var a=i.width();return i.remove(),a},I=function(e){var t=null,n=function(n,i){var a,r,s,o,l,u,c,d;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||e.data("grow")!==!1)&&(a=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(r=n.keyCode,
s=r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||32===r,46===r||8===r?(d=y(e[0]),d.length?a=a.substring(0,d.start)+a.substring(d.start+d.length):8===r&&d.start?a=a.substring(0,d.start-1)+a.substring(d.start+1):46===r&&void 0!==d.start&&(a=a.substring(0,d.start)+a.substring(d.start+1))):s&&(u=n.shiftKey,c=String.fromCharCode(n.keyCode),c=u?c.toUpperCase():c.toLowerCase(),a+=c)),o=e.attr("placeholder"),!a&&o&&(a=o),(l=S(a,e)+4)!==t&&(t=l,e.width(l),e.triggerHandler("resize")))}
;e.on("keydown keyup update blur",n),n()},w=function(n,i){var a,r,s,o,l=this;o=n[0],o.selectize=l;var u=window.getComputedStyle&&window.getComputedStyle(o,null);if(s=u?u.getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction,s=s||n.parents("[dir]:first").attr("dir")||"",e.extend(l,{order:0,settings:i,$input:n,tabIndex:n.attr("tabindex")||"",tagType:"select"===o.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++w.count,highlightedValue:null,isOpen:!1,
isDisabled:!1,isRequired:n.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===i.loadThrottle?l.onSearchChange:g(l.onSearchChange,i.loadThrottle)}),l.sifter=new t(this.options,{
diacritics:i.diacritics}),l.settings.options){for(a=0,r=l.settings.options.length;a<r;a++)l.registerOption(l.settings.options[a]);delete l.settings.options}if(l.settings.optgroups){for(a=0,r=l.settings.optgroups.length;a<r;a++)l.registerOptionGroup(l.settings.optgroups[a]);delete l.settings.optgroups}l.settings.mode=l.settings.mode||(1===l.settings.maxItems?"single":"multi"),"boolean"!=typeof l.settings.hideSelected&&(l.settings.hideSelected="multi"===l.settings.mode),
l.initializePlugins(l.settings.plugins),l.setupCallbacks(),l.setupTemplates(),l.setup()};return a.mixin(w),n.mixin(w),e.extend(w.prototype,{setup:function(){var t,n,i,a,u,c,d,h,p,f=this,g=f.settings,m=f.eventNS,y=e(window),b=e(document),S=f.$input;if(d=f.settings.mode,h=S.attr("class")||"",t=e("<div>").addClass(g.wrapperClass).addClass(h).addClass(d),n=e("<div>").addClass(g.inputClass).addClass("items").appendTo(t),
i=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",S.is(":disabled")?"-1":f.tabIndex),c=e(g.dropdownParent||t),a=e("<div>").addClass(g.dropdownClass).addClass(d).hide().appendTo(c),u=e("<div>").addClass(g.dropdownContentClass).appendTo(a),f.settings.copyClassesToDropdown&&a.addClass(h),t.css({width:S[0].style.width}),f.plugins.names.length&&(p="plugin-"+f.plugins.names.join(" plugin-"),t.addClass(p),a.addClass(p)),
(null===g.maxItems||g.maxItems>1)&&1===f.tagType&&S.attr("multiple","multiple"),f.settings.placeholder&&i.attr("placeholder",g.placeholder),!f.settings.splitOn&&f.settings.delimiter){var w=f.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");f.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}S.attr("autocorrect")&&i.attr("autocorrect",S.attr("autocorrect")),S.attr("autocapitalize")&&i.attr("autocapitalize",S.attr("autocapitalize")),f.$wrapper=t,f.$control=n,f.$control_input=i,
f.$dropdown=a,f.$dropdown_content=u,a.on("mouseenter","[data-selectable]",function(){return f.onOptionHover.apply(f,arguments)}),a.on("mousedown click","[data-selectable]",function(){return f.onOptionSelect.apply(f,arguments)}),v(n,"mousedown","*:not(input)",function(){return f.onItemSelect.apply(f,arguments)}),f.settings.manualInputWidth||I(i),n.on({mousedown:function(){return f.onMouseDown.apply(f,arguments)},click:function(){return f.onClick.apply(f,arguments)}}),i.on({mousedown:function(e){
e.stopPropagation()},keydown:function(){return f.onKeyDown.apply(f,arguments)},keyup:function(){return f.onKeyUp.apply(f,arguments)},keypress:function(){return f.onKeyPress.apply(f,arguments)},resize:function(){f.positionDropdown.apply(f,[])},blur:function(){return f.onBlur.apply(f,arguments)},focus:function(){return f.ignoreBlur=!1,f.onFocus.apply(f,arguments)},paste:function(){return f.onPaste.apply(f,arguments)}}),S.parents().last().find('label[for="'+S.attr("id")+'"]').on("click",function(){
f.onClick.apply(f,arguments)}),b.on("keydown"+m,function(e){f.isCmdDown=e[r?"metaKey":"ctrlKey"],f.isCtrlDown=e[r?"altKey":"ctrlKey"],f.isShiftDown=e.shiftKey}),b.on("keyup"+m,function(e){e.keyCode===o&&(f.isCtrlDown=!1),16===e.keyCode&&(f.isShiftDown=!1),e.keyCode===s&&(f.isCmdDown=!1)}),b.on("mousedown"+m,function(e){if(f.isFocused){if(e.target===f.$dropdown[0]||e.target.parentNode===f.$dropdown[0])return!1;f.$control.has(e.target).length||e.target===f.$control[0]||f.blur(e.target)}}),
y.on(["scroll"+m,"resize"+m].join(" "),function(){f.isOpen&&f.positionDropdown.apply(f,arguments)}),y.on("mousemove"+m,function(){f.ignoreHover=!1}),this.revertSettings={$children:S.children().detach(),tabindex:S.attr("tabindex")},S.attr("tabindex",-1).hide().after(f.$wrapper),e.isArray(g.items)&&(f.setValue(g.items),delete g.items),l&&S.on("invalid"+m,function(e){e.preventDefault(),f.isInvalid=!0,f.refreshState()}),f.updateOriginalInput(),f.refreshItems(),f.refreshState(),f.updatePlaceholder(),
f.isSetup=!0,S.is(":disabled")&&f.disable(),f.on("change",this.onChange),S.data("selectize",f),S.addClass("selectized"),f.trigger("initialize"),g.preload===!0&&f.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,i=t.settings.optgroupLabelField,a={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[i])+"</div>"},option:function(e,t){return'<div class="option">'+t(e[n])+"</div>"
},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){return'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>"}};t.settings.render=e.extend({},a,t.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",
optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in n)n.hasOwnProperty(e)&&(t=this.settings[n[e]])&&this.on(e,t)},onClick:function(e){var t=this;t.isFocused||(t.focus(),e.preventDefault())},onMouseDown:function(t){var n=this,i=t.isDefaultPrevented();e(t.target);if(n.isFocused){
if(t.target!==n.$control_input[0])return"single"===n.settings.mode&&t.target!==n.$control[0]?n.isOpen?n.close():n.open():i||n.setActiveItem(null),!1}else i||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(t){var n=this;n.isFull()||n.isInputHidden||n.isLocked?t.preventDefault():n.settings.splitOn&&setTimeout(function(){for(var t=e.trim(n.$control_input.val()||"").split(n.settings.splitOn),i=0,a=t.length;i<a;i++)n.createItem(t[i])},0)
},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&t===this.settings.delimiter?(this.createItem(),e.preventDefault(),!1):void 0},onKeyDown:function(e){var t=(e.target,this.$control_input[0],this);if(t.isLocked)return void(9!==e.keyCode&&e.preventDefault());switch(e.keyCode){case 65:if(t.isCmdDown)return void t.selectAll();break;case 27:
return void(t.isOpen&&(e.preventDefault(),e.stopPropagation(),t.close()));case 78:if(!e.ctrlKey||e.altKey)break;case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0)}return void e.preventDefault();case 80:if(!e.ctrlKey||e.altKey)break;case 38:if(t.$activeOption){t.ignoreHover=!0;var i=t.getAdjacentOption(t.$activeOption,-1);i.length&&t.setActiveOption(i,!0,!0)}
return void e.preventDefault();case 13:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),e.preventDefault()));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return void(t.settings.selectOnTab&&t.isOpen&&t.$activeOption?(t.onOptionSelect({currentTarget:t.$activeOption}),t.settings.allowCreateEmpty&&1===t.settings.maxItems||t.isFull()||e.preventDefault()):t.settings.create&&t.createItem()&&e.preventDefault())
;case 8:return void t.deleteSelection(e,!0);case 46:return void t.deleteSelection(e)}return!t.isFull()&&!t.isInputHidden||(r?e.metaKey:e.ctrlKey)?void 0:void e.preventDefault()},onKeyUp:function(e){var t=this;if(t.isLocked)return e&&e.preventDefault();var n=t.$control_input.val()||"";t.lastValue!==n&&(t.lastValue=n,t.onSearchChange(n),t.refreshOptions(),t.trigger("type",n))},onSearchChange:function(e){var t=this,n=t.settings.load;n&&(t.loadedSearches.hasOwnProperty(e)||(t.loadedSearches[e]=!0,
t.load(function(i){n.apply(t,[e,i])})))},onFocus:function(e){var t=this,n=t.isFocused;if(t.isDisabled)return t.blur(),e&&e.preventDefault(),!1;t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.onSearchChange(""),n||t.trigger("focus"),t.$activeItems.length||(t.showInput(),t.setActiveItem(null),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())},onBlur:function(e,t){var n=this;if(n.isFocused&&(n.isFocused=!1,
!n.ignoreFocus))return n.ignoreBlur||document.activeElement!==n.$dropdown_content[0]?void setTimeout(function(){var e=function(){n.close(),n.setTextboxValue(""),n.setActiveItem(null),n.setActiveOption(null),n.setCaret(n.items.length),n.refreshState(),(t||document.body).focus(),n.ignoreFocus=!1,n.trigger("blur")};n.ignoreFocus=!0,n.settings.selectOnBlur&&n.$activeOption&&1===n.$activeOption.not(".create").length?(n.addItem(n.$activeOption.not(".create").data("value")),
e()):n.settings.create&&n.settings.createOnBlur?n.createItem(null,!1,e):e()}):(n.ignoreBlur=!0,void n.onFocus(e))},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(t){var n,i,a=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),i=e(t.currentTarget),i.hasClass("create")?a.createItem(null,function(){a.settings.closeAfterSelect&&a.close()}):void 0!==(n=i.attr("data-value"))&&(a.lastQuery=null,a.setTextboxValue(""),
a.addItem(n),a.settings.closeAfterSelect?a.close():!a.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&a.setActiveOption(a.getOption(n)))},onItemSelect:function(e){var t=this;t.isLocked||"multi"===t.settings.mode&&(e.preventDefault(),t.setActiveItem(e.currentTarget,e))},load:function(e){var t=this,n=t.$wrapper.addClass(t.settings.loadingClass);t.loading++,e.apply(t,[function(e){t.loading=Math.max(t.loading-1,0),e&&e.length&&(t.addOption(e),t.refreshOptions(t.isFocused&&!t.isInputHidden)),
t.loading||n.removeClass(t.settings.loadingClass),t.trigger("load",e)}])},setTextboxValue:function(e){var t=this.$control_input;t.val()!==e&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return 1===this.tagType&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){m(this,t?[]:["change"],function(){this.clear(t),this.addItems(e,t)})},setActiveItem:function(t,n){var i,a,r,s,o,l,u,c,d=this
;if("single"!==d.settings.mode){if(t=e(t),!t.length)return e(d.$activeItems).removeClass("active"),d.$activeItems=[],void(d.isFocused&&d.showInput());if("mousedown"===(i=n&&n.type.toLowerCase())&&d.isShiftDown&&d.$activeItems.length){for(c=d.$control.children(".active:last"),s=Array.prototype.indexOf.apply(d.$control[0].childNodes,[c[0]]),o=Array.prototype.indexOf.apply(d.$control[0].childNodes,[t[0]]),s>o&&(u=s,s=o,o=u),a=s;a<=o;a++)l=d.$control[0].childNodes[a],
d.$activeItems.indexOf(l)===-1&&(e(l).addClass("active"),d.$activeItems.push(l));n.preventDefault()}else"mousedown"===i&&d.isCtrlDown||"keydown"===i&&this.isShiftDown?t.hasClass("active")?(r=d.$activeItems.indexOf(t[0]),d.$activeItems.splice(r,1),t.removeClass("active")):d.$activeItems.push(t.addClass("active")[0]):(e(d.$activeItems).removeClass("active"),d.$activeItems=[t.addClass("active")[0]]);d.hideInput(),this.isFocused||d.focus()}},setActiveOption:function(t,n,i){var a,r,s,o,l,c=this
;c.$activeOption&&c.$activeOption.removeClass("active"),c.$activeOption=null,t=e(t),t.length&&(c.$activeOption=t.addClass("active"),!n&&u(n)||(a=c.$dropdown_content.height(),r=c.$activeOption.outerHeight(!0),n=c.$dropdown_content.scrollTop()||0,s=c.$activeOption.offset().top-c.$dropdown_content.offset().top+n,o=s,l=s-a+r,s+r>a+n?c.$dropdown_content.stop().animate({scrollTop:l},i?c.settings.scrollDuration:0):s<n&&c.$dropdown_content.stop().animate({scrollTop:o},i?c.settings.scrollDuration:0)))},
selectAll:function(){var e=this;"single"!==e.settings.mode&&(e.$activeItems=Array.prototype.slice.apply(e.$control.children(":not(input)").addClass("active")),e.$activeItems.length&&(e.hideInput(),e.close()),e.focus())},hideInput:function(){this.setTextboxValue(""),this.$control_input.css({opacity:0}),this.settings.manualInputWidth||this.$control_input.css({position:"absolute",left:this.rtl?1e4:-1e4}),this.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1}),
this.settings.manualInputWidth||this.$control_input.css({position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var e=this;e.isDisabled||(e.ignoreFocus=!0,e.$control_input[0].focus(),window.setTimeout(function(){e.ignoreFocus=!1,e.onFocus()},0))},blur:function(e){this.$control_input[0].blur(),this.onBlur(null,e)},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField
;return"string"==typeof t&&(t=[{field:t}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t}},search:function(t){var n,i,a,r=this,s=r.settings,o=this.getSearchOptions();if(s.score&&"function"!=typeof(a=r.settings.score.apply(this,[t])))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==r.lastQuery?(r.lastQuery=t,i=r.sifter.search(t,e.extend(o,{score:a})),r.currentResults=i):i=e.extend(!0,{},r.currentResults),
s.hideSelected)for(n=i.items.length-1;n>=0;n--)r.items.indexOf(c(i.items[n].id))!==-1&&i.items.splice(n,1);return i},refreshOptions:function(t){var n,a,r,s,o,l,u,d,h,p,f,g,m,v,y,b;void 0===t&&(t=!0);var S=this,I=e.trim(S.$control_input.val()),w=S.search(I),M=S.$dropdown_content,C=S.$activeOption&&c(S.$activeOption.attr("data-value"));for(s=w.items.length,"number"==typeof S.settings.maxOptions&&(s=Math.min(s,S.settings.maxOptions)),o={},l=[],n=0;n<s;n++)for(u=S.options[w.items[n].id],
d=S.render("option",u),h=u[S.settings.optgroupField]||"",p=e.isArray(h)?h:[h],a=0,r=p&&p.length;a<r;a++)h=p[a],S.optgroups.hasOwnProperty(h)||(h=""),o.hasOwnProperty(h)||(o[h]=[],l.push(h)),o[h].push(d);for(this.settings.lockOptgroupOrder&&l.sort(function(e,t){return(S.optgroups[e].$order||0)-(S.optgroups[t].$order||0)}),f=[],n=0,s=l.length;n<s;n++)h=l[n],S.optgroups.hasOwnProperty(h)&&o[h].length?(g=S.render("optgroup_header",S.optgroups[h])||"",g+=o[h].join(""),
f.push(S.render("optgroup",e.extend({},S.optgroups[h],{html:g})))):f.push(o[h].join(""));if(M.html(f.join("")),S.settings.highlight&&w.query.length&&w.tokens.length)for(n=0,s=w.tokens.length;n<s;n++)i(M,w.tokens[n].regex);if(!S.settings.hideSelected)for(n=0,s=S.items.length;n<s;n++)S.getOption(S.items[n]).addClass("selected");m=S.canCreate(I),m&&(M.prepend(S.render("option_create",{input:I})),b=e(M[0].childNodes[0])),S.hasOptions=w.items.length>0||m,
S.hasOptions?(w.items.length>0?(y=C&&S.getOption(C),y&&y.length?v=y:"single"===S.settings.mode&&S.items.length&&(v=S.getOption(S.items[0])),v&&v.length||(v=b&&!S.settings.addPrecedence?S.getAdjacentOption(b,1):M.find("[data-selectable]:first"))):v=b,S.setActiveOption(v),t&&!S.isOpen&&S.open()):(S.setActiveOption(null),t&&S.isOpen&&S.close())},addOption:function(t){var n,i,a,r=this;if(e.isArray(t))for(n=0,i=t.length;n<i;n++)r.addOption(t[n]);else(a=r.registerOption(t))&&(r.userOptions[a]=!0,
r.lastQuery=null,r.trigger("option_add",a,t))},registerOption:function(e){var t=c(e[this.settings.valueField]);return!(!t||this.options.hasOwnProperty(t))&&(e.$order=e.$order||++this.order,this.options[t]=e,t)},registerOptionGroup:function(e){var t=c(e[this.settings.optgroupValueField]);return!!t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)},addOptionGroup:function(e,t){t[this.settings.optgroupValueField]=e,(e=this.registerOptionGroup(t))&&this.trigger("optgroup_add",e,t)},
removeOptionGroup:function(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.renderCache={},this.trigger("optgroup_remove",e))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(t,n){var i,a,r,s,o,l,u,d=this;if(t=c(t),r=c(n[d.settings.valueField]),null!==t&&d.options.hasOwnProperty(t)){if("string"!=typeof r)throw new Error("Value must be set in option data");u=d.options[t].$order,r!==t&&(delete d.options[t],
(s=d.items.indexOf(t))!==-1&&d.items.splice(s,1,r)),n.$order=n.$order||u,d.options[r]=n,o=d.renderCache.item,l=d.renderCache.option,o&&(delete o[t],delete o[r]),l&&(delete l[t],delete l[r]),d.items.indexOf(r)!==-1&&(i=d.getItem(t),a=e(d.render("item",n)),i.hasClass("active")&&a.addClass("active"),i.replaceWith(a)),d.lastQuery=null,d.isOpen&&d.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=c(e);var i=n.renderCache.item,a=n.renderCache.option;i&&delete i[e],a&&delete a[e],
delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)},clearOptions:function(){var e=this;e.loadedSearches={},e.userOptions={},e.renderCache={},e.options=e.sifter.items={},e.lastQuery=null,e.trigger("option_clear"),e.clear()},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(t,n){var i=this.$dropdown.find("[data-selectable]"),a=i.index(t)+n
;return a>=0&&a<i.length?i.eq(a):e()},getElementWithValue:function(t,n){if(void 0!==(t=c(t))&&null!==t)for(var i=0,a=n.length;i<a;i++)if(n[i].getAttribute("data-value")===t)return e(n[i]);return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t,n){for(var i=e.isArray(t)?t:[t],a=0,r=i.length;a<r;a++)this.isPending=a<r-1,this.addItem(i[a],n)},addItem:function(t,n){m(this,n?[]:["change"],function(){var i,a,r,s,o,l=this,u=l.settings.mode
;if(t=c(t),l.items.indexOf(t)!==-1)return void("single"===u&&l.close());l.options.hasOwnProperty(t)&&("single"===u&&l.clear(n),"multi"===u&&l.isFull()||(i=e(l.render("item",l.options[t])),o=l.isFull(),l.items.splice(l.caretPos,0,t),l.insertAtCaret(i),(!l.isPending||!o&&l.isFull())&&l.refreshState(),l.isSetup&&(r=l.$dropdown_content.find("[data-selectable]"),l.isPending||(a=l.getOption(t),s=l.getAdjacentOption(a,1).attr("data-value"),l.refreshOptions(l.isFocused&&"single"!==u),
s&&l.setActiveOption(l.getOption(s))),!r.length||l.isFull()?l.close():l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",t,i),l.updateOriginalInput({silent:n}))))})},removeItem:function(e,t){var n,i,a,r=this;n="object"==typeof e?e:r.getItem(e),e=c(n.attr("data-value")),(i=r.items.indexOf(e))!==-1&&(n.remove(),n.hasClass("active")&&(a=r.$activeItems.indexOf(n[0]),r.$activeItems.splice(a,1)),r.items.splice(i,1),r.lastQuery=null,
!r.settings.persist&&r.userOptions.hasOwnProperty(e)&&r.removeOption(e,t),i<r.caretPos&&r.setCaret(r.caretPos-1),r.refreshState(),r.updatePlaceholder(),r.updateOriginalInput({silent:t}),r.positionDropdown(),r.trigger("item_remove",e,n))},createItem:function(t,n){var i=this,a=i.caretPos;t=t||e.trim(i.$control_input.val()||"");var r=arguments[arguments.length-1];if("function"!=typeof r&&(r=function(){}),"boolean"!=typeof n&&(n=!0),!i.canCreate(t))return r(),!1;i.lock()
;var s="function"==typeof i.settings.create?this.settings.create:function(e){var t={};return t[i.settings.labelField]=e,t[i.settings.valueField]=e,t},o=f(function(e){if(i.unlock(),!e||"object"!=typeof e)return r();var t=c(e[i.settings.valueField]);if("string"!=typeof t)return r();i.setTextboxValue(""),i.addOption(e),i.setCaret(a),i.addItem(t),i.refreshOptions(n&&"single"!==i.settings.mode),r(e)}),l=s.apply(this,[t,o]);return void 0!==l&&o(l),!0},refreshItems:function(){this.lastQuery=null,
this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){var e=this;e.isRequired&&(e.items.length&&(e.isInvalid=!1),e.$control_input.prop("required",void 0)),e.refreshClasses()},refreshClasses:function(){var t=this,n=t.isFull(),i=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl),
t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",i).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!e.isEmptyObject(t.options)).toggleClass("has-items",t.items.length>0),t.$control_input.data("grow",!n&&!i)},isFull:function(){
return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(e){var t,n,i,a,r=this;if(e=e||{},1===r.tagType){for(i=[],t=0,n=r.items.length;t<n;t++)a=r.options[r.items[t]][r.settings.labelField]||"",i.push('<option value="'+d(r.items[t])+'" selected="selected">'+d(a)+"</option>");i.length||this.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),r.$input.html(i.join(""))}else r.$input.val(r.getValue()),
r.$input.attr("value",r.$input.val());r.isSetup&&(e.silent||r.trigger("change",r.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder),e.triggerHandler("update",{force:!0})}},open:function(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.focus(),e.isOpen=!0,e.refreshState(),e.$dropdown.css({visibility:"hidden",display:"block"}),
e.positionDropdown(),e.$dropdown.css({visibility:"visible"}),e.trigger("dropdown_open",e.$dropdown))},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&e.hideInput(),e.isOpen=!1,e.$dropdown.hide(),e.setActiveOption(null),e.refreshState(),t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0),this.$dropdown.css({width:e.outerWidth(),
top:t.top,left:t.left})},clear:function(e){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput({silent:e}),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(t){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(t):e(this.$control[0].childNodes[n]).before(t),this.setCaret(n+1)},deleteSelection:function(t,n){
var i,a,r,s,o,l,u,c,d,h=this;if(r=n||void 0===n&&t&&8===t.keyCode?-1:1,s=y(h.$control_input[0]),h.$activeOption&&!h.settings.hideSelected&&(u=h.getAdjacentOption(h.$activeOption,-1).attr("data-value")),o=[],h.$activeItems.length){for(d=h.$control.children(".active:"+(r>0?"last":"first")),l=h.$control.children(":not(input)").index(d),r>0&&l++,i=0,a=h.$activeItems.length;i<a;i++)o.push(e(h.$activeItems[i]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())
}else(h.isFocused||"single"===h.settings.mode)&&h.items.length&&(r<0&&0===s.start&&0===s.length?o.push(h.items[h.caretPos-1]):r>0&&s.start===h.$control_input.val().length&&o.push(h.items[h.caretPos]));if(!o.length||"function"==typeof h.settings.onDelete&&h.settings.onDelete.apply(h,[o])===!1)return!1;for(void 0!==l&&h.setCaret(l);o.length;)h.removeItem(o.pop());return h.showInput(),h.positionDropdown(),h.refreshOptions(!0),u&&(c=h.getOption(u),c.length&&h.setActiveOption(c)),!0},
advanceSelection:function(e,t){var n,i,a,r,s,o=this;0!==e&&(o.rtl&&(e*=-1),n=e>0?"last":"first",i=y(o.$control_input[0]),o.isFocused&&!o.isInputHidden?(r=o.$control_input.val().length,(e<0?0===i.start&&0===i.length:i.start===r)&&!r&&o.advanceCaret(e,t)):(s=o.$control.children(".active:"+n),s.length&&(a=o.$control.children(":not(input)").index(s),o.setActiveItem(null),o.setCaret(e>0?a+1:a))))},advanceCaret:function(e,t){var n,i,a=this;0!==e&&(n=e>0?"next":"prev",
a.isShiftDown?(i=a.$control_input[n](),i.length&&(a.hideInput(),a.setActiveItem(i),t&&t.preventDefault())):a.setCaret(a.caretPos+e))},setCaret:function(t){var n=this;if(t="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,t)),!n.isPending){var i,a,r,s;for(r=n.$control.children(":not(input)"),i=0,a=r.length;i<a;i++)s=e(r[i]).detach(),i<t?n.$control_input.before(s):n.$control.append(s)}n.caretPos=t},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},
unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var e=this;e.$input.prop("disabled",!0),e.$control_input.prop("disabled",!0).prop("tabindex",-1),e.isDisabled=!0,e.lock()},enable:function(){var e=this;e.$input.prop("disabled",!1),e.$control_input.prop("disabled",!1).prop("tabindex",e.tabIndex),e.isDisabled=!1,e.unlock()},destroy:function(){var t=this,n=t.eventNS,i=t.revertSettings;t.trigger("destroy"),t.off(),t.$wrapper.remove(),t.$dropdown.remove(),
t.$input.html("").append(i.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:i.tabindex}).show(),t.$control_input.removeData("grow"),t.$input.removeData("selectize"),e(window).off(n),e(document).off(n),e(document.body).off(n),delete t.$input[0].selectize},render:function(e,t){var n,i,a="",r=!1,s=this,o=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return"option"!==e&&"item"!==e||(n=c(t[s.settings.valueField]),r=!!n),
r&&(u(s.renderCache[e])||(s.renderCache[e]={}),s.renderCache[e].hasOwnProperty(n))?s.renderCache[e][n]:(a=s.settings.render[e].apply(this,[t,d]),"option"!==e&&"option_create"!==e||(a=a.replace(o,"<$1 data-selectable")),"optgroup"===e&&(i=t[s.settings.optgroupValueField]||"",a=a.replace(o,'<$1 data-group="'+h(d(i))+'"')),"option"!==e&&"item"!==e||(a=a.replace(o,'<$1 data-value="'+h(d(n||""))+'"')),r&&(s.renderCache[e][n]=a),a)},clearCache:function(e){var t=this
;void 0===e?t.renderCache={}:delete t.renderCache[e]},canCreate:function(e){var t=this;if(!t.settings.create)return!1;var n=t.settings.createFilter;return(e.length||t.settings.allowCreateEmpty)&&("function"!=typeof n||n.apply(t,[e]))&&("string"!=typeof n||new RegExp(n).test(e))&&(!(n instanceof RegExp)||n.test(e))}}),w.count=0,w.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,selectOnBlur:!1,createFilter:null,
highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,allowCreateEmpty:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",manualInputWidth:!1,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,
wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},e.fn.selectize=function(t){var n=e.fn.selectize.defaults,i=e.extend({},n,t),a=i.dataAttr,r=i.labelField,s=i.valueField,o=i.optgroupField,l=i.optgroupLabelField,u=i.optgroupValueField,d=function(t,n){var o,l,u,c,d=t.attr(a);if(d)for(n.options=JSON.parse(d),o=0,
l=n.options.length;o<l;o++)n.items.push(n.options[o][s]);else{var h=e.trim(t.val()||"");if(!i.allowEmptyOption&&!h.length)return;for(u=h.split(i.delimiter),o=0,l=u.length;o<l;o++)c={},c[r]=u[o],c[s]=u[o],n.options.push(c);n.items=u}},h=function(t,n){var d,h,p,f,g=n.options,m={},v=function(e){var t=a&&e.attr(a);return"string"==typeof t&&t.length?JSON.parse(t):null},y=function(t,a){t=e(t);var l=c(t.attr("value"));if(l||i.allowEmptyOption)if(m.hasOwnProperty(l)){if(a){var u=m[l][o]
;u?e.isArray(u)?u.push(a):m[l][o]=[u,a]:m[l][o]=a}}else{var d=v(t)||{};d[r]=d[r]||t.text(),d[s]=d[s]||l,d[o]=d[o]||a,m[l]=d,g.push(d),t.is(":selected")&&n.items.push(l)}};for(n.maxItems=t.attr("multiple")?null:1,f=t.children(),d=0,h=f.length;d<h;d++)p=f[d].tagName.toLowerCase(),"optgroup"===p?function(t){var i,a,r,s,o;for(t=e(t),r=t.attr("label"),r&&(s=v(t)||{},s[l]=r,s[u]=r,n.optgroups.push(s)),o=e("option",t),i=0,a=o.length;i<a;i++)y(o[i],r)}(f[d]):"option"===p&&y(f[d])}
;return this.each(function(){if(!this.selectize){var a=e(this),r=this.tagName.toLowerCase(),s=a.attr("placeholder")||a.attr("data-placeholder");s||i.allowEmptyOption||(s=a.children('option[value=""]').text());var o={placeholder:s,options:[],optgroups:[],items:[]};"select"===r?h(a,o):d(a,o),new w(a,e.extend(!0,{},n,o,t))}})},e.fn.selectize.defaults=w.defaults,e.fn.selectize.support={validity:l},w.define("remove_button",function(t){if("single"!==this.settings.mode){t=e.extend({label:"&times;",
title:"Remove",className:"remove",append:!0},t);var n=this,i='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+d(t.title)+'">'+t.label+"</a>",a=function(e,t){var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};this.setup=function(){var r=n.setup;return function(){if(t.append){var s=n.settings.render.item;n.settings.render.item=function(e){return a(s.apply(this,arguments),i)}}r.apply(this,arguments),
this.$control.on("click","."+t.className,function(t){if(t.preventDefault(),!n.isLocked){var i=e(t.currentTarget).parent();n.setActiveItem(i),n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}}),w.define("restore_on_backspace",function(e){var t=this;e.text=e.text||function(e){return e[this.settings.labelField]},this.onKeyDown=function(){var n=t.onKeyDown;return function(t){var i,a
;return 8===t.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(i=this.caretPos-1)>=0&&i<this.items.length?(a=this.options[this.items[i]],this.deleteSelection(t,!0)&&(this.setTextboxValue(e.text.apply(this,[a])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()}),w.define("restore_on_focus",function(e){var t=this;e.text=e.text||function(e){return e[this.settings.labelField]};var n=t.onFocus;this.onFocus=function(t){return function(t){
var i=this.caretPos-1;if(i>=0&&i<this.items.length){var a=this.options[this.items[i]],r=e.text.call(this,a);this.removeItem(a[this.settings.valueField]),this.setTextboxValue(r),this.refreshOptions(!0)}return n.apply(this,arguments)}}()}),w})}).call(t,n(5))},function(e,t,n){"use strict";var i={PLAY:"PLAY",PAUSE:"PAUSE",SEEK:"SEEK",STOP:"STOP",PREVIOUS:"PREVIOUS",NEXT:"NEXT",SKIPTO:"SKIPTO",SHOWDETAILS:"SHOWDETAILS",REFRESHPLAYQUEUE:"REFRESHPLAYQUEUE",SETSTREAM:"SETSTREAM",SETQUALITY:"SETQUALITY"}
;t.a=i},function(e,t,n){"use strict";var i=n(138),a=new i.a({interface:["load","stop","canPause"]});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(38),o=n(40),l=n(142),u=n(374),c=n(502),d=n(86),h=n(28),p=n(678),f=s.a.extend({readyEvent:"loadedmetadata",wrapped:["play","pause","setVolume","setPosition","resume","stop"],initialize:function(e){a.a.bindAll(this,"onReady","onWaiting","onStalled","onPlaying","onProgress","onTime","onPause","onVolume","onEnded","onError"),
this.type=e,this.backlog=new u.a,this.backlog.wrapAll(this.wrapped,function(){return!!this.mediaElement},this)},setMediaSrc:function(e,t){h.a.info("[Player] setting src attribute",e),this.mediaElement.setAttribute("src",e)},removeMediaSrc:function(){h.a.info("[Player] removing src attribute"),this.mediaElement.setAttribute("src","")},addMediaListeners:function(){var e=this.mediaElement;e.addEventListener(this.readyEvent,this.onReady),e.addEventListener("waiting",this.onWaiting),
e.addEventListener("stalled",this.onStalled),e.addEventListener("playing",this.onPlaying),e.addEventListener("progress",this.onProgress),e.addEventListener("timeupdate",this.onTime),e.addEventListener("pause",this.onPause),e.addEventListener("volumechange",this.onVolume),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError)},removeMediaListeners:function(){var e=this.mediaElement;e.removeEventListener(this.readyEvent,this.onReady),
e.removeEventListener("waiting",this.onWaiting),e.removeEventListener("stalled",this.onStalled),e.removeEventListener("playing",this.onPlaying),e.removeEventListener("progress",this.onProgress),e.removeEventListener("timeupdate",this.onTime),e.removeEventListener("pause",this.onPause),e.removeEventListener("volumechange",this.onVolume),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError)},load:function(e){
var t=e.model,n=t.get("url"),i=e.mediaElement||this.createManagedMediaElement();this.backlog.clear(),this.model=t,this.mediaElement=i,this.autoplay=e.autoplay,this.offset=t.get("position"),this.lastOffset=null;var a=!t.get("directPlay")&&"http"===e.protocol;this.useSeekStreamSwitch=a||e.useOffsetHLS,this.useOffset=e.useOffsetHLS||e.useOffsetHTTP,this.useOffset&&this.model.set("offset",this.offset),i.stream_restart=!1,i.autoplay=this.autoplay,this.addMediaListeners(),h.a.group("[Player] Load"),
h.a.info("URL:",n),h.a.info("Autoplay:",this.autoplay),h.a.info("Offset:",this.offset),h.a.groupEnd(),"dash"===e.protocol?(p.a.load(n,i),this.usingDashPlayer=!0):(this.setMediaSrc(n,e.mimeType),i.load())},play:function(){this.mediaElement.play()},pause:function(){this.mediaElement.pause(),this.mediaElement.autoplay=!1},setVolume:function(e){this.mediaElement.volume=e/100},setPosition:function(e){this.mediaElement.readyState>0&&(this.mediaElement.currentTime=e/1e3)},resume:function(){
h.a.info("[Player] Resuming at "+this.offset),this.setPosition(this.offset),this.offset=0},stop:function(){h.a.info("[Player] Stopping playback. DashPlayer:",!!this.usingDashPlayer),this.removeMediaListeners(),this.model.set("ready",!1),this.usingDashPlayer&&(this.usingDashPlayer=!1,p.a.stop()),this.removeMediaSrc(),this.removeManagedMediaElement(),this.mediaElement=null},preferElementDuration:function(){if(!a.a.isFinite(this.mediaElement.duration))return!1
;if(this.model.get("type")!==o.a.types.PHOTO){var e=a.a.first(n.i(l.a)(this.model.get("media"),{streamType:d.a.get("audio").id,selected:!0}));if(e&&"vbr"===e.bitrateMode)return!1}return!0},getErrorMessage:function(e){return n.i(r.default)("There was a problem playing this item.")},beforeStreamSwitch:function(){this.mediaElement&&(this.mediaElement.stream_restart=!0)},createManagedMediaElement:function(){h.a.info("[Player] Creating media element")
;var e=o.a.getElementByType(this.type),t="audio"===e,i=n.i(c.a)(e,t);return i.style.cssText="position:absolute;width:1px;height:1px;",i.managed=!0,i.parentNode||document.body.appendChild(i),i},removeManagedMediaElement:function(){h.a.info("[Player] Removing media element");var e=this.mediaElement;e&&e.managed&&(e.managed=!1,e.parentNode&&e.parentNode.removeChild(e))},onReady:function(){var e=this.model;if(!e.get("ready")){h.a.info("[Player] Playback is ready");var t=this.mediaElement,n={
ready:!0,loaded:!0};if(e.get("type")===o.a.types.VIDEO&&(n.videoDimensions={width:t.videoWidth,height:t.videoHeight}),this.preferElementDuration()){var i=1e3*t.duration;this.useOffset&&(i+=this.offset),n.duration=Math.round(i)}e.set(n);var a=e.get("volume");null!=a&&this.setVolume(a),this.backlog.process()}},onWaiting:function(){this.model.set("state",o.a.states.BUFFERING)},onStalled:function(){},onPlaying:function(){this.model.set("state",o.a.states.PLAYING)},onProgress:function(){
for(var e=this.mediaElement.buffered,t=null,n=null,i=0,a=e.length;i<a;i++){var r=Math.round(1e3*e.start(i)),s=Math.round(1e3*e.end(i));this.useOffset&&(r+=this.offset,s+=this.offset),(null===t||t>r)&&(t=r),(null===n||n<s)&&(n=s)}this.model.set({startBuffer:t,endBuffer:n})},onTime:function(){var e=this.mediaElement,t=this.offset&&!this.useSeekStreamSwitch,n=e.stream_restart;if(t||n)return void(t&&this.resume());var i=1e3*e.currentTime;this.useOffset&&(i+=this.offset)
;var a=this.lastOffset&&Math.abs(i-this.lastOffset)<100;if(!(e.paused||a&&this.model.get("buffering"))){var r=this.model;this.lastOffset=i,r.get("buffering")&&r.set("state",o.a.states.PLAYING),r.set("position",Math.round(i))}},onPause:function(){var e=this.model.get("partIndex")+1<this.model.get("partCount")
;this.mediaElement.ended&&e||(this.mediaElement.resume_pending||this.mediaElement.stream_restart||this.usingDashPlayer&&p.a.canPause(this.mediaElement)?this.model.set("state",o.a.states.BUFFERING):this.model.set("state",o.a.states.PAUSED))},onVolume:function(){this.model.set("volume",Math.round(100*this.mediaElement.volume))},onEnded:function(){this.model.set("ended",!0)},onError:function(e){var t=e.target.error,n=t&&t.code;n&&h.a.warn("[Player] Media element error code: "+n),this.model.set({
state:o.a.states.ERROR,errorMessage:this.getErrorMessage(n)})}});t.a=f},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(13),c=n(4),d=n(247),h=n(38),p=n(250),f=n(511),g=n(512),m=n(758),v=n(761),y=n(1316),b=n(775),S=n(774),I=n(40),w=n(389),M=n(374),C=n(520),D=n(1349),P=n(28),T=n(12),x=n(86),E=n(106),A=n(300),k=n(23),L=n(55),_=n(474),N=n(679),R=h.a.extend({mixins:[L.a,_.a],playerProfileAdapter:A.a,resetStreamDebounce:200,handleSetPositionDebounce:0,
errorSkipTime:2e3,wrapped:["play","pause","playPause","setVolume","setRepeat","setPosition","seekForward","seekBackward","setSubtitleStreamID"],modelDefaults:function(){var e=_.a.modelDefaults.apply(this,arguments);return s.a.extend(e,{state:I.a.states.BUFFERING})},initialize:function(e){e||(e={}),_.a.initialize.apply(this,arguments),s.a.bindAll(this,"onDecisionSuccess","onDecisionError","onMetricsPlaybackInterval"),this.subcontrollersByType={},
this.profile=this.playerProfileAdapter.prop(this.type),this.metricsStartTime=0,this.metricsPlaybackItemTime=0,this.metricsPlaybackSessionTime=0,this.metricsPlaybackCount=0,this.metricsEndedKey=null,this.metricsPlaybackIntervalID=null,this.backlog=new M.a,this.backlog.wrapAll(this.wrapped,function(){return!!this.subcontroller},this),this.useBufferDetection()&&(this.bufferingDetector=new D.a,this.bufferingDetector.on("warn",this.onBufferingDetectorWarn,this),
this.bufferingDetector.on("buffering",this.onBufferingDetected)),this.resetStreamDebounce&&(this.resetStream=s.a.debounce(this.resetStream,this.resetStreamDebounce)),this.handleSetPositionDebounce&&(this.handleSetPosition=s.a.debounce(this.handleSetPosition,this.handleSetPositionDebounce)),this.listenTo(T.a,{"companion:play":this.play,"companion:stop":this.stop,"companion:pause":this.pause,"companion:skipNext":this.skipNext,"companion:skipPrevious":this.skipPrevious,
"companion:setPosition":this.setPosition,"companion:skipTo":this.skipTo,"companion:setVolume":this.setVolume,"companion:setRepeat":this.setRepeat,"companion:stepForward":this.seekForward,"companion:stepBack":this.seekBackward,"companion:setSubtitleStreamID":this.setSubtitleStreamID})},load:function(e){var t=this;this.originalOptions=e,this.model=e.model,this.autoplay=e.autoplay,this.postplay=e.postplay;var n=this.model.get("playQueue"),i=this.model.get("playQueueItem");return this.reset(i),
w.a.registerPlayer(this),this.listenTo(this.model,{"change:state":this.onStateChange,"change:repeatAll change:repeatItem":this.onRepeatChange,"change:qualityIndex":this.onQualityIndexChange,"change:audioStreamID":this.onAudioStreamIDChange,"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:ended":this.onEndedChange,"change:softSubtitlesFailed":this.onSoftSubtitlesFailedChange,"change:terminationCode":this.onTerminationCodeChange}),
n&&(this.listenTo(n.get("collection"),"add remove reset sync",this.onPlayQueueChange),this.listenTo(n,"change:hasUpNext change:shuffled",this.onPlayQueueChange)),this.getPlayerDecision(i.get("metadataItem"),e).then(function(e){t.trackItemStart(e)})},reset:function(e){return this.bufferingDetector&&this.bufferingDetector.stop(),_.a.reset.apply(this,arguments)},populateItem:function(e,t){var n=e.parent,i=n&&n.parent;if(i&&i.channel)return l.a.Deferred().resolve(e).promise();var a=s.a.extend({},t,{
reset:!0,scope:"player"});if(e.get("isLibraryItem")&&(a.data={checkFiles:"1",includeChapters:"1"}),e.server.get("cloud")){var r=e.get("key");a.url=e.server.swizzleNodeUrl(r)}return e.populate(a)},loadMediaElement:function(e){this.subcontroller=this.getSubcontrollerByType(this.playerType),this.backlog.process();var t,n=this.profile&&this.profile.protocols,i=this.protocol;i&&n&&n[i]&&(t=n[i].mimeType),this.subcontroller.load(s.a.extend({},this.originalOptions,{model:this.model,protocol:i,
autoplay:this.autoplay,mimeType:t,useOffsetHLS:e.useOffsetHLS,useOffsetHTTP:e.useOffsetHTTP,canDirectPlay:e.canDirectPlay})),this.bufferingDetector&&(this.bufferingDetector.setModel(this.model),this.bufferingDetector.start())},setSubcontrollerByType:function(e,t){this.subcontrollersByType[e]=t},getSubcontrollerByType:function(e){var t=this.subcontrollersByType[e];return t?new t(this.type):new N.a(this.type)},embed:function(e){
var t=this.model.get("metadataItem"),i=l.a.ajax(t.server.getXHROptions(e.key));i.done(s.a.bind(function(e){this.model.set("embedHtml",e)},this)),i.fail(s.a.bind(function(e){this.model.set({state:I.a.states.ERROR,errorMessage:n.i(c.default)("There was a problem embedding this video.")})},this))},redirect:function(e){var t=this.model.get("metadataItem"),n=t.get("url");if(!n&&e){var i=e.key.match(/\/webkit\?url=([^&]+)/);i&&(n=decodeURIComponent(i[1]))}window.open(n),s.a.defer(s.a.bind(function(){
this.model.set("finished",!0)},this))},play:function(){this.model.get("state")!==I.a.states.PLAYING&&this.subcontroller.play()},pause:function(){this.model.get("state")!==I.a.states.PAUSED&&this.subcontroller.pause()},setPosition:function(e,t){t||(t={}),this.canSeek(e)&&(this.model.set({finished:!1,position:e,lastSeekPosition:e}),this.model.trigger("seeking",this.model),this.bufferingDetector&&this.bufferingDetector.seek(e),
this.subcontroller.useSeekStreamSwitch?(this.resetStreamDebounce&&this.pause(),this.switchStreams(t)):(this.handleSetPositionDebounce&&this.pause(),this.handleSetPosition(e,t)))},handleSetPosition:function(e,t){this.canHandleDebounce()&&(this.subcontroller.setPosition(e),t.autoplay&&this.play())},canHandleDebounce:function(){var e=this.model&&this.model.get("state");return void 0!==e&&e!==I.a.states.STOPPED},setVolume:function(e){this.model.set("volume",e),this.subcontroller.setVolume(e)},
setRepeat:function(e){this.model.set({repeatAll:2===e,repeatItem:1===e})},setSubtitleStreamID:function(e){k.a.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),streamType:x.a.get("subtitles"),streamID:e}).done(s.a.bind(function(){this.model.set("subtitleStreamID",e)},this))},restartCurrent:function(){this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions)},skipPrevious:function(e){
var t=_.a.skipPrevious.apply(this,arguments);return t&&(this.trackItemEnd("skipped"),this.switchStreams({autoplay:!e||e.autoplay!==!1,isItemStart:!0})),t},skipNext:function(e){var t=_.a.skipNext.apply(this,arguments);return t&&(this.trackItemEnd("skipped"),this.switchStreams({autoplay:!e||e.autoplay!==!1,isItemStart:!0})),t},skipNextOrFinish:function(){this.model.get("canSkipNext")?this.skipNext():this.model.set("finished",!0)},skipTo:function(e,t){var n=_.a.skipTo.apply(this,arguments)
;return n&&(this.trackItemEnd("skipped"),this.switchStreams({autoplay:!t||t.autoplay!==!1,isItemStart:!0})),n},switchStreams:function(e){e||(e={}),null==e.autoplay&&(e.autoplay=!this.model.get("paused")),this.subcontroller&&this.subcontroller.beforeStreamSwitch&&this.subcontroller.beforeStreamSwitch(),this.originalOptions.media=this.model.get("media"),this.originalOptions.part=this.model.get("part"),this.originalOptions.offset=this.model.get("position"),this.pause(),this.resetStream(e)},
resetStream:function(e){var t=this;return e||(e={}),e.cancel?l.a.Deferred().reject().promise():this.canHandleDebounce()?this.stopSession().then(function(){t.autoplay=e.autoplay!==!1;var n=t.getPlayerDecision(t.model.get("metadataItem"),t.originalOptions);return(e.isItemStart||e.isItemRestart)&&n.done(function(n){e.isItemStart?t.trackItemStart(n):t.trackItemRestart(n,e.restartReason)}),n}):l.a.Deferred().reject().promise()},stop:function(e,t){
return n.i(P.a)("[PlayerController] Stopping playback"),this.trackSessionEnd(),this._controllerStopped=!0,_.a.stop.apply(this,arguments),this.bufferingDetector&&(this.bufferingDetector.off("warn",this.onBufferingDetectorWarn),this.bufferingDetector.stop()),w.a.unregisterPlayer(this),this.metricsPlaybackIntervalID&&(clearInterval(this.metricsPlaybackIntervalID),this.metricsPlaybackIntervalID=null),e&&e.isSwitchingPlayers||T.a.trigger("hide:player",t),this.resetStream({cancel:!0}),
this.stopSession(e)},setSkipStates:function(e){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem(),this.model.set(s.a.extend({},e,{canSkipPrevious:!!this.previousItem,canSkipNext:!!this.nextItem},this.modelOverrides()))},shouldSkipOnError:function(){return!1},skipOnError:function(){if(this.shouldSkipOnError()){this.abortSkipOnError(),P.a.warn("[PlayerController] Item failed to play, automatically skipping to the next item in",n.i(d.a)(this.errorSkipTime))
;var e=s.a.bind(function(){this.model.get("error")&&this.skipNextOrFinish()},this);this._skipOnErrorTimeout=setTimeout(e,this.errorSkipTime)}},abortSkipOnError:function(){clearTimeout(this._skipOnErrorTimeout)},useBufferDetection:function(){return!0},getErrorMessage:function(e){return n.i(C.a)(e)||n.i(c.default)("There was a problem playing this item.")},getMaxVideoBitrateQualityIndex:function(e){var t=e.transcoderQualityOptions.maxVideoBitrate
;if(t)return t?E.a.getNearestIndexToBitrate(t):void 0},updateMetricsState:function(e){this.metricsPlaybackIntervalID&&(clearInterval(this.metricsPlaybackIntervalID),this.metricsPlaybackIntervalID=null),e===I.a.states.PLAYING?(this.metricsStartTime=Date.now(),this.metricsPlaybackIntervalID=setInterval(this.onMetricsPlaybackInterval,1e4)):this.flushMetricsPlaybackTime(),e===I.a.states.STOPPED&&this.trackItemEnd("stopped"),e===I.a.states.ERROR&&(this.trackItemEnd("failed"),this.trackItemFailure())
},trackItemStart:function(e){var t=n.i(u.a)("metrics"),i=this.getMetricsItemProperties(),r=a()({},i);e.offset&&(r.offset=Math.floor(e.offset/1e3)),t.trackEvent({event:"playback:itemstart",interaction:!0,properties:r}),this.metricsPlaybackItemTime=0,this.metricsPlaybackCount++,this.metricsEndedKey=null,t.incrementPlaybackCount()},trackItemRestart:function(e,t){n.i(u.a)("metrics").trackEvent({event:"playback:itemrestart",interaction:!0,properties:a()({},this.getMetricsItemProperties(),{reason:t})
})},trackItemEnd:function(e){if(this.metricsCurrentDecision){var t=n.i(u.a)("metrics"),i=this.model.get("metadataItem").get("key");this.metricsEndedKey!==i&&(this.metricsEndedKey=i,t.trackEvent({event:"playback:itemend",interaction:!0,properties:a()({},this.getMetricsItemProperties(),{playbackTime:t.millisecondsToSeconds(this.metricsPlaybackItemTime),status:e})}))}},trackItemFailure:function(){n.i(u.a)("metrics").trackEvent({event:"playback:failure",interaction:!0,
properties:a()({},this.getMetricsItemProperties(),{error:this.model.get("errorMessage")})})},trackSessionEnd:function(){var e=n.i(u.a)("metrics"),t=this.model.get("metadataItem");this.flushMetricsPlaybackTime(),e.trackEvent({event:"playback:sessionend",interaction:!0,properties:{serverType:n.i(b.a)(t.server),connectionType:n.i(S.a)(t.server),playbackCount:this.metricsPlaybackCount,playbackTime:e.millisecondsToSeconds(this.metricsPlaybackSessionTime)}})},getMetricsItemProperties:function(){
var e=this.metricsCurrentDecision,t=e.media,i=e.part,a=n.i(p.a)(t),r=n.i(f.a)(t),s=n.i(g.a)(t),o=this.model.get("metadataItem"),l={type:o.get("type"),identifier:o.get("identifier"),origin:"library",serverType:n.i(b.a)(o.server),connectionType:n.i(S.a)(o.server),player:e.playerType};return t&&(l.protocol=t.protocol,l.bitrate=t.bitrate),i&&(l.container=i.container),a&&(l.videoCodec=a.codec),r&&(l.audioCodec=r.codec),s&&(l.subtitleFormat=s.codec),l},flushMetricsPlaybackTime:function(){
if(this.metricsStartTime){var e=n.i(u.a)("metrics"),t=Date.now()-this.metricsStartTime;this.metricsStartTime=0,this.metricsPlaybackItemTime+=t,this.metricsPlaybackSessionTime+=t,e.addPlaybackTime(t)}},onDecisionSuccess:function(e){this.metricsCurrentDecision=e;var t=this.model,i=t.get("metadataItem"),a=t.get("playQueueItem"),r=a.get("lyricsStreams"),o=t.get("state"),l=0;if(o!==I.a.states.STOPPED&&o!==I.a.states.ERROR&&!this._controllerStopped){
e.part&&e.part.duration?l=e.part.duration:i.get("duration")&&(l=i.get("duration")),this.playbackSessionID=e.playbackSessionID,this.transcodeSessionID=e.transcodeSessionID,this.playerType=e.playerType,this.protocol=e.protocol;var u=e.media,c=e.part,d=n.i(f.a)(u),h=n.i(g.a)(u);this.model.set(s.a.extend({media:u,part:c,url:e.url,subtitlesUrl:e.subtitlesUrl,transcodeServer:e.transcodeServer,mediaIndex:u?n.i(m.a)(i,u.id):0,partIndex:c?n.i(v.a)(u,c.key):0,partCount:n.i(y.a)(e.media),
audioStreamID:d?d.id:0,subtitleStreamID:h?h.id:0,state:this.autoplay?I.a.states.BUFFERING:I.a.states.PAUSED,position:e.offset,duration:l,directPlay:e.canDirectPlay,playbackSessionID:e.playbackSessionID,transcodeSessionID:e.transcodeSessionID,softSubtitlesFailed:!1,canLyrics:r&&r.length>0},this.modelOverrides())),this.loadMediaElement(e),this.startTimeline()}},onDecisionError:function(e){this.metricsCurrentDecision=e;var t=this.model,i=t.get("state");if(this.playbackSessionID=e.playbackSessionID,
i!==I.a.states.STOPPED&&i!==I.a.states.ERROR&&!this._controllerStopped){var a=this.playerProfileAdapter.prop("capabilities");if(e.embed&&a.embed)return void this.embed(e.part);if(e.redirect&&a.redirect)return void this.redirect(e.part);if(e.canDirectPlay&&n.i(C.b)(e.mdeDecisionCode)&&!n.i(C.b)(e.transcodeDecisionCode))return P.a.warn("[PlayerController] Forcing transcode;",e.mdeDecisionText),this.originalOptions.decisionOverrides||(this.originalOptions.decisionOverrides={}),
this.originalOptions.decisionOverrides.allowDirectPlay=!1,void this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);var r=this.getErrorMessage(e);P.a.warn("[PlayerController] Decision error",r),t.set({state:I.a.states.ERROR,errorMessage:r})}},onQualityIndexChange:function(e,t){var n=e.previous("qualityIndex");null!=t&&null!=n&&this.switchStreams({isItemRestart:!0,restartReason:"quality"})},onAudioStreamIDChange:function(e,t){var n=e.previous("audioStreamID")
;null!=t&&null!=n&&this.switchStreams({isItemRestart:!0,restartReason:"streams"})},onSubtitleStreamIDChange:function(e,t){var n=e.previous("subtitleStreamID");null!=t&&null!=n&&this.switchStreams({isItemRestart:!0,restartReason:"streams"})},onPlayQueueChange:function(){var e=this.model.get("playQueue");e&&this.model.set({canShuffle:!e.get("hasUpNext"),shuffled:e.get("shuffled")}),this.setSkipStates()},onRepeatChange:function(e,t){this.setSkipStates()},onStateChange:function(e,t){
var i=this.timeline();n.i(P.a)("[PlayerController] State change",t),t===I.a.states.PLAYING&&i.done(s.a.bind(this.updatePlayQueue,this)),t===I.a.states.STOPPED||t===I.a.states.ERROR?this.stopTimeline():this.startTimeline(),t===I.a.states.PAUSED?this.startPing():this.stopPing(),t===I.a.states.ERROR?this.skipOnError():this.abortSkipOnError(),this.updateMetricsState(t)},onEndedChange:function(e,t){if(t){this.trackItemEnd("completed");var n=e.get("partIndex"),i=e.get("partCount")
;if(++n>=i)this.model.get("repeatItem")?this.restartCurrent():this.nextItem&&!this.postplay?this.skipNext():(!this.nextItem&&this.postplay?this.stop():this.pause(),this.model.set("finished",!0));else{var a=e.get("media");this.model.set({part:a.Part[n],position:0}),this.switchStreams({autoplay:!0})}}},onSoftSubtitlesFailedChange:function(e,t){!t||e.get("stopped")||e.get("error")||(T.a.trigger("show:alert",{type:"error",message:n.i(c.default)("Unable to play subtitles without converting video")}),
P.a.warn("[Player] Soft subs have failed, switching to burned subtitles"),this.switchStreams({isItemRestart:!0,restartReason:"subtitlesFailure"}))},onTerminationCodeChange:function(e,t){null!=t&&(this.stop(),T.a.trigger("show:alert",{type:"error",message:e.get("terminationText")}))},onBufferingDetected:function(){this.model.set("state",I.a.states.BUFFERING)},onBufferingDetectorWarn:function(e){
var t,i=this.bufferingDetector.reasons,a=e.reason,r=this.bufferingDetector.recommendations,s=e.recommendation,o=this.type===I.a.types.VIDEO?n.i(c.default)("video"):n.i(c.default)("track")
;t=a===i.TRANSCODER?s===r.ORIGINAL_QUALITY?n.i(c.default)("The server is not powerful enough to convert this {1} for smooth playback. Try playing at the original quality.",o):n.i(c.default)("The server is not powerful enough to convert this {1} for smooth playback.",o):a===i.NETWORK?s===r.LOWER_QUALITY?n.i(c.default)("Your connection to the server is not fast enough to stream this {1}. Check your network or try a lower quality.",o):n.i(c.default)("Your connection to the server is not fast enough to stream this {1}. Check your network.",o):n.i(c.default)("We are having trouble playing this {1}. Please check your playback setup.",o),
this.model.set("bufferingMessage",t)},onMetricsPlaybackInterval:function(){this.flushMetricsPlaybackTime(),this.metricsStartTime=Date.now()}});t.a=R},function(e,t,n){"use strict";var i=n(473),a=i.a.extend({supportsRetry:function(e){return e.get("isCloud")}});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(12),o=n(38),l=n(66),u=n(501),c=n(28),d=n(55),h=o.a.extend({mixins:[d.a],initialize:function(e){this.name=e.name||"ServerEventManager",this.appModel=e.appModel,
this.servers=this.appModel.get("servers"),this.isValidServer=e.isValidServer,this.supportsLongPolling=e.supportsLongPolling,this.showTimelineStatus=e.showTimelineStatus,this.ServerEventConnection=e.ServerEventConnection,this.connections={},this._serverRetryManager=new e.ServerRetryManager({appModel:this.appModel,callback:this.retryServerConnections.bind(this),logFormat:"[Connections] Retrying server events connection for %s in %s seconds"})},start:function(){this.listenTo(this.servers,{
"change:isResolved":this.onServerResolvedChange,"change:isRejected":this.onServerRejectedChange,remove:this.onServerRemove,reset:this.onServersReset}),this.showTimelineStatus&&this.listenTo(s.a,"timeline",this.onTimeline)},stop:function(){this.stopListening(),this._serverRetryManager.stopAll(),this.connections={}},connect:function(e){var t=e.server,i=this.connections[t.id];i||(i=new this.ServerEventConnection({server:t}),this.connections[t.id]=i,this.listenTo(i,{open:this.onOpen,
close:this.onClose,error:this.onClose}));var a=i.open(),r=i.socket?i.socket.url:i.pollUrl;return n.i(c.a)("["+this.name+"] Opening server event connection to "+t.get("debugName")+" at "+r),a},disconnectAll:function(){var e=this;a.a.each(this.connections,function(t){e.disconnect({connection:t})})},disconnect:function(e){var t=e.connection;if(t||(t=this.connections[e.server.id]),t){var i=t.socket?t.socket.url:t.pollUrl,a=t.server
;n.i(c.a)("["+this.name+"] Closing server event connection to "+a.get("debugName")+" at "+i),this.stopListening(t),this._serverRetryManager.stop(t.server),t.close(),delete this.connections[t.server.id]}},retryServerConnections:function(e){this.isValidServer(e)&&e.get("isResolved")&&this.connect({server:e})},onServerResolvedChange:function(e,t){var n=this.connections[e.id];this.isValidServer(e)&&t&&!n&&(l.a.hasWebSocket||this.supportsLongPolling?this.connect({server:e
}):e.trigger("socket:websocket",{error:!0}))},onServerRejectedChange:function(e,t){t&&this.disconnect({server:e})},onServerRemove:function(e){var t=this.connections[e.id];if(t&&(this.disconnect({connection:t}),e.get("isMerged")&&t)){var n=this.servers.get(e.id);this.connect({server:n})}},onServersReset:function(e,t){var n=this,i=t.previousModels;a.a.each(i,function(t){e.contains(t)||n.disconnect({server:t})})},onTimeline:function(e){var t=void 0,i={item:e.title||n.i(r.default)("an item"),
serverName:e.server.get("friendlyName")};switch(e.state){case u.a.CREATED:t=n.i(r.default)("Created {item} on {serverName}",i);break;case u.a.MATCHING:t=n.i(r.default)("Matching {item} on {serverName}",i);break;case u.a.DOWNLOADING_METADATA:t=n.i(r.default)("Downloading metadata for {item} on {serverName}",i);break;case u.a.LOADING_METADATA:t=n.i(r.default)("Loading metadata for {item} on {serverName}",i);break;case u.a.PROCESSED:t=n.i(r.default)("Finished processing {item} on {serverName}",i)
;break;case u.a.DELETED:t=n.i(r.default)("Deleted {item} on {serverName}",i)}t&&e.sectionID>0&&s.a.trigger("show:status",e.server,t)},onOpen:function(e){var t=this.connections[e.id],n=t.socket?t.socket.url:t.pollUrl;c.a.info("["+this.name+"] Opened server event connection to "+e.get("debugName")+" at "+n),this._serverRetryManager.stop(e)},onClose:function(e){c.a.warn("["+this.name+"] Unexpectedly closed server event connection to "+e.get("debugName")),this._serverRetryManager.start(e)}});t.a=h
},function(e,t,n){"use strict";function i(e,t,n){return{commandID:e,body:f.a.writeXml({Response:{_code:t,_status:n}}),responseCode:t}}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(38),c=n(12),d=n(40),h=n(34),p=n(389),f=n(795),g=n(23),m=n(28),v=n(704),y=n(59),b=n(81),S=n(303),I=u.a.extend({initialize:function(){r.a.bindAll(this,"onSignal"),this.handlers={"/player/timeline/subscribe":[this.startTimeline],"/player/timeline/unsubscribe":[this.stopTimeline],
"/player/mirror/details":[this.onMirrorDetails],"/player/playback/playMedia":[this.onPlayMedia],"/player/playback/pause":[this.onPlaybackAction,"pause"],"/player/playback/play":[this.onPlaybackAction,"play"],"/player/playback/stop":[this.onPlaybackAction,"stop"],"/player/playback/skipNext":[this.onPlaybackAction,"skipNext"],"/player/playback/skipPrevious":[this.onPlaybackAction,"skipPrevious"],"/player/playback/stepForward":[this.onPlaybackAction,"stepForward"],
"/player/playback/stepBack":[this.onPlaybackAction,"stepBack"],"/player/playback/skipTo":[this.onSkipTo],"/player/playback/seekTo":[this.onSeekTo],"/player/playback/refreshPlayQueue":[this.onRefreshPlayQueue],"/player/playback/setParameters":[this.onSetParameters],"/player/playback/setStreams":[this.onSetStreams],"/player/navigation/moveLeft":[this.onKey,"moveLeft"],"/player/navigation/moveRight":[this.onKey,"moveRight"],"/player/navigation/moveUp":[this.onKey,"moveUp"],
"/player/navigation/moveDown":[this.onKey,"moveDown"],"/player/navigation/select":[this.onKey,"select"],"/player/navigation/back":[this.onKey,"back"],"/player/navigation/home":[this.onNavigateHome],"/player/application/setText":[this.onSetText]}},startTimeline:function(){var e=l.a("appModel");e.has("primaryPlayer")&&e.set("primaryPlayer",null),p.a.start()},stopTimeline:function(){p.a.stop();var e=l.a("appModel");e.has("transientServer")&&e.unset("transientServer")},onSignal:function(e){
var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o.a.Deferred();this._signalInputActivity();var a=this.handlers[e.path];if(a){e.supportsTimeline!==!1&&this.startTimeline();var s=a[0],l=r.a.rest(a,1);l.push(e.query,t);var u=s.apply(this,l)||o.a.Deferred().resolve().promise();u.done(function(t){var a=i(e.commandID,200,"OK");n.resolve({controllerResponse:a,deferredAction:t})}),u.fail(function(){var a=i(e.commandID,400,"Bad Request"),r=void 0
;(t&&"/player/mirror/details"===e.path||"/player/playback/playMedia"===e.path)&&(r={}),n.resolve({controllerResponse:a,deferredAction:r})})}else m.a.warn("[Companion] controller manager found no handler for",e.path);return n.promise()},_signalInputActivity:function(){var e=l.a("appModel"),t=e.get("inputActivity");t&&t.notice()},_buildTransientServer:function(e){var t=l.a("appModel"),n=t.get("servers"),i=e.machineIdentifier[0],a=n.get(i),s=new v.a({accessToken:r.a.first(e.token),
machineIdentifier:"transient-"+i,originalMachineIdentifier:i,serverClass:a?a.get("serverClass"):void 0}),o=a&&a.get("isConnected")&&a.get("activeConnection"),u=o?{scheme:o.get("scheme"),address:o.get("address"),port:o.get("port"),uri:o.get("uri")}:{scheme:r.a.first(e.protocol),address:r.a.first(e.address),port:r.a.first(e.port)};u.sources=[{id:"companion"}],s.addConnection(u);var c=s.populate();return c.done(function(e){t.set("transientServer",e)}),c.fail(function(){t.unset("transientServer")}),
c},_populatePlayItem:function(e,t){var i=this,a=o.a.Deferred(),s=r.a.first(t.containerKey),l=r.a.first(t.key),u=new y.a({key:l},{server:e});return u.populate().done(function(){var t=void 0,r=e.get("playQueueManager"),o=n.i(h.k)(u.get("type")).mediaType,l=S.a.prototype.getIdFromKey(s);if(null!==l)t=r.populateQueue(l,o);else{var c=new b.default({containerKey:s},{server:e});t=c.populate(),t=t.then(function(){return r.createForType(o,{onServer:!1}).addContent(c.get("metadataItems"))})}
t.done(function(){a.resolve(u)}).fail(function(){a.reject(i)})}).fail(function(){a.reject(i)}),a.promise()},_shouldReplaceRoute:function(){return/\/server\/transient-/.test(window.location.hash)},onMirrorDetails:function(e,t){var n=this;if(!p.a.isPlaybackActive()){var i={server:null,key:decodeURIComponent(e.key[0]).replace("children","")},a=g.a.execute("remoteUnlock");return a=a.then(function(){return n._buildTransientServer(e)}),a=a.then(function(e){return i.server=e,new y.a({key:i.key},{
server:e}).fetch()}),a=a.then(function(e){return"season"===e.get("type")&&(i.key=e.get("parentKey")),o.a.Deferred().resolve().promise()}),a=a.then(function(){var e={serverID:i.server.id,key:i.key,replace:n._shouldReplaceRoute()};if(t)return o.a.Deferred().resolve({route:{name:"details",options:e}}).promise();c.a.trigger("navigate","details",e)})}},onPlayMedia:function(e,t){function n(t){return g.a.execute("playMedia",{item:t,siblings:t.get("type")===d.a.types.PHOTO,offset:r.a.first(e.offset),
isFromCompanion:!0,replace:a})}var i=this,a=this._shouldReplaceRoute(),s=g.a.execute("remoteUnlock");return s=s.then(function(){return i._buildTransientServer(e)}),s=s.then(function(t){return i._populatePlayItem(t,e)}),s=s.then(function(e){return t?{route:{name:"noop"},command:function(){return n(e)}}:n(e)})},onPlaybackAction:function(e){c.a.trigger("companion:"+e)},onSeekTo:function(e){var t=parseInt(e.offset[0],10);c.a.trigger("companion:setPosition",t)},onRefreshPlayQueue:function(e){
var t=l.a("appModel"),n=t.get("transientServer"),i=o.a.Deferred().reject().promise();if(!n)return i;var a=n.get("playQueueManager"),r=a.get(e.playQueueID[0]);return r?r.fetch():i},onSetParameters:function(e){var t=r.a.first(e.volume),n=r.a.first(e.repeat);null!=t&&c.a.trigger("companion:setVolume",parseInt(t,10)),null!=n&&c.a.trigger("companion:setRepeat",parseInt(n,10))},onSetStreams:function(e){var t=r.a.first(e.subtitleStreamID)
;null!=t&&c.a.trigger("companion:setSubtitleStreamID",parseInt(t,10))},onSkipTo:function(e){var t=decodeURIComponent(e.key[0]);c.a.trigger("companion:skipTo",t)},onKey:function(e){c.a.trigger("companion:"+e),c.a.trigger("companion:key",e)},onNavigateHome:function(){var e=g.a.execute("remoteUnlock");return e.done(function(){c.a.trigger("navigate:refresh:dashboard")}),e},onSetText:function(e){c.a.trigger("companion:setText",r.a.first(e.text)||"")}});t.a=new I},function(e,t,n){"use strict"
;var i=n(19),a=n(244),r=n(17),s=n(18),o=n(1168),l=s.a.extend({mixins:[a.a],name:"ChannelListModel",context:["server"],idAttribute:"key",collectionName:"channels",url:function e(){var t=this.get("key"),e=t?t:i.join(["/channels",this.get("subset")]);return this.getPaginatedUrl(e)},sessionAttrs:{key:r.a.string,subset:r.a.oneOf("all","recentlyViewed"),currentPageStart:r.a.integer,currentPageSize:r.a.integer,populatedRange:r.a.object},syncedAttrs:{totalSize:r.a.integer,viewGroup:r.a.string,
title1:r.a.string,title2:r.a.string},syncedRelations:{channels:{relationClass:o.a,rootPropertyName:"Directory",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{subset:"all",populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()}});t.a=l},function(e,t,n){"use strict";var i=n(61),a=n(78),r=n(17),s=n(65),o=n(18),l=n(81),u=o.a.extend({name:"ChannelModel",context:["server","channel"],idAttribute:"key",url:function(){
return this.id?this.id:this.identifierUrl(this.get("identifier"))},identifierUrl:function(e){return"/:/plugins/"+e+"/root"},syncedAttrs:{key:r.a.string,identifier:r.a.string,type:r.a.string,name:r.a.string,title1:r.a.string,title2:r.a.string,message:r.a.string,summary:r.a.string,thumb:r.a.string,art:r.a.string,prefsKey:r.a.string,searchKey:r.a.string,installed:r.a.boolean,noCache:r.a.boolean,allowSync:r.a.boolean,hasPrefs:r.a.boolean,hasStoreServices:r.a.boolean,share:r.a.boolean,
lastAccessedAt:r.a.integer},syncedRelations:{metadataList:{relationClass:l.default,attrs:function(e){return{containerKey:e.key?e.key:this.identifierUrl(e.identifier)}},options:function(e){return{channel:this,skipCache:!0}}}},derivedAttrs:{title:function(){return this.get("name")||this.get("title2")||this.get("title1")}},augmentResponseText:function(e,t){return t===s.a.xml?n.i(a.a)(e):e},augmentResponse:function(e){if(this.has("key")&&(e.key=this.get("key")),"none"===e.key&&delete e.key,e.key){
var t=e.key.match(/^\/(\w+)\//);t&&(e.type=t[1])}e.title&&(e.name=e.title);for(var n=i.a.parseArray(e.Metadata),a=n.length-1;a>=0;a--){var r=n[a];if(r.settings||r.search){e[r.settings?"prefsKey":"searchKey"]=r.key,n.splice(a,1)}}return e.Metadata=n,e.metadataList=e,e}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(64),l=n(1324),u=n(773),c=n(1321),d=n(301),h=o.a.extend({defaults:{selectedItem:null,mediaType:null,collection:null,owned:!0,lastAddedItem:null,
hasUserAdditions:!1},url:"",initialize:function(e){this.set({mediaType:e.mediaType,collection:new d.a([],{type:e.mediaType,server:e.server})})},fetch:function(){return s.a.Deferred().resolve().promise()},queueContent:function(e,t,i){i||(i={});var r=s.a.Deferred().resolve().promise(),o=e.get("isPlayQueueItem")?e.get("metadataItem"):e;return this.isItemQueueable(o)&&(o.get("children")&&a.a.result(o.get("children"),"url")&&(r=r.then(function(){return o.get("children").populate()})),
r=r.done(a.a.bind(function(){this.set({lastAddedItem:o,hasUpNext:!0,hasUserAdditions:this.get("collection").length>0,shuffled:!!i.shuffled});var e=this.get("collection").indexOf(t);e===-1&&(e=0);var r=i.next?{at:e+1}:{},s=n.i(l.a)(o);if(s){var d=s.filter(u.a);i.shuffle&&(d=a()(d).shuffle());var h=a.a.map(d,a.a.bind(c.a,this));this.get("collection").add(h,r)}else this.get("collection").add(c.a.apply(this,[o]),r);this.get("collection").trigger("reset",this.get("collection"))},this))),r},
addContent:function(e,t){return this.queueContent(e,this.get("selectedItem"),t).then(a.a.bind(this._setSelectedItem,this,t))},_setSelectedItem:function(e){var t=null;e&&e.firstItemKey?t=this.get("collection").find(function(t){return t.get("key")===e.firstItemKey}):this.get("collection").length&&(t=this.get("collection").at(0)),this.set("selectedItem",t)},removeItem:function(e){
return e.get("playQueueItemID")===this.get("selectedItem").get("playQueueItemID")?s.a.Deferred().resolve().promise():(this.set("hasUserAdditions",!0),this.get("collection").remove(e),this.get("collection").trigger("reset",this.get("collection")),s.a.Deferred().resolve().promise())},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return s.a.Deferred().resolve().promise();var n=this.get("collection"),i=n.findWhere({playQueueItemID:e});n.remove(i)
;var a=t||this.get("selectedItem").get("playQueueItemID"),r=n.findWhere({playQueueItemID:a}),o=n.indexOf(r)+1;return this.set("hasUserAdditions",!0),n.add(i,{at:o}),n.trigger("reset",n),s.a.Deferred().resolve().promise()},isItemQueueable:function(e){if(e.get("currentSubset")&&"photo"!==e.viewGroup)return!1;if("photoalbum"===e.get("type")&&!e.get("isLibraryItem"))return!1
;var t=["track","episode","movie","photo","clip","userPlaylistItem","photoalbum","album","season"],i=a()(t).contains(e.get("type")),r=n.i(l.a)(e),s=r&&r.any(u.a);return i||s},toggleShuffle:function(){return s.a.Deferred().resolve().promise()},setRepeatAll:function(e){return s.a.Deferred().resolve().promise()},yieldOwnership:function(e){e=e||{};var t,i=this.get("lastAddedItem");return t=i.server.get("synced")||e.absoluteUrl?a.a.result(n.i(l.a)(i),"url"):this.get("selectedItem").get("key"),
s.a.Deferred().resolve(t).promise()},takeOwnership:function(){return s.a.Deferred().resolve().promise()},supports:function(e){return!(e&&(e.unwatched||e.remoteRefresh))}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(38),o=n(55),l=n(34),u=n(1319),c=n(686),d=n(303),h=n(720),p=s.a.extend({mixins:o.a,initialize:function(e){this.server=e.server,this._queues={audio:null,photo:null,video:null},this.listenTo(this,{"change:playQueue":this.onPlayQueueChange,
"remove:playQueue":this.onPlayQueueRemove}),this.canCreateOnLocal=c.a.prototype.isItemQueueable,this.doesLocalSupport=c.a.prototype.supports},_playQueueTypeFor:function(e){if(e.get("isUserPlaylist"))return"video";if(e.get("isPlaylist"))return e.get("playlistType");if(e.get("isMetadataList"))return n.i(l.k)(e.get("firstItemType")).mediaType;var t=n.i(u.a)(e),i="photo"===t?t:e.get("type");return n.i(l.k)(i).mediaType},createFor:function(e,t){t=t||e;var n=this._playQueueTypeFor(t),i=null
;return this.canCreateOnServer(e)?i=new d.a({mediaType:n},{server:this.server}):this.canCreateOnLocal(e)&&(i=new c.a({mediaType:n},{server:this.server})),this._queues[n]=i,this.trigger("change change:playQueue change:playQueue:"+n,i),i},getForType:function(e){return this._queues[e]},createForType:function(e,t){var n=null;return n=t.onServer?new d.a({mediaType:e},{server:this.server}):new c.a({mediaType:e}),this._queues[e]=n,this.trigger("change change:playQueue:"+e,n),n},getFor:function(e){
var t=e.get("type");if(!t||"channelDirectory"===t)return null;var n=this._playQueueTypeFor(e),i=this._queues[n];return i&&i.isItemQueueable(e)?i:null},get:function(e){return a.a.findWhere(this._queues,{id:e})},populateQueue:function(e,t){var n=new d.a({playQueueID:e,mediaType:t},{server:this.server});return this._queues[t]=n,n.populate()},remove:function(e){var t=this._queues[e];t&&(this._queues[e]=null,this.trigger("change remove:playQueue remove:playQueue:"+e,t))},removeAll:function(){
a.a.each(a.a.keys(this._queues),this.remove,this)},canCreateOnServer:function(e){return this.server.supports("playQueues")&&this.server.get("isFullServer")&&d.a.prototype.isItemQueueable(e)},doesServerSupport:function(e){return this.server.supports("playQueues")&&d.a.prototype.supports(e)},canCreateFor:function(e,t){return this.canCreateOnServer(e)&&this.doesServerSupport(t)||this.canCreateOnLocal(e)&&this.doesLocalSupport(t)},_dispatchActivePlayQueueItem:function(e,t){if(n.i(r.b)("appStore")){
(0,n.i(r.a)("appStore").dispatch)(n.i(h.a)({playerType:e,playQueueItem:t}))}},onPlayQueueChange:function(e){var t=this.onPlayQueueSelectedItemChange.bind(this,e.get("mediaType"));this.listenTo(e,"change:selectedItem",t)},onPlayQueueRemove:function(e){this.stopListening(e),this._dispatchActivePlayQueueItem(e.get("mediaType"),null)},onPlayQueueSelectedItemChange:function(e,t,n){this._dispatchActivePlayQueueItem(e,n)}});t.a=p},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(1164),s=r.a.extend({initialize:function(e){this.playQueue=e.playQueue,this.includeSelectedItem=e.includeSelectedItem,this.addFilter(a.a.bind(this.filterUpNext,this)),this.listenForUpNextChanges()},listenForUpNextChanges:function(){var e=a.a.debounce(this.onPlayQueueChange),t=["change:playQueueSelectedItemID","change:playQueueLastAddedItemID"];this.listenTo(this.playQueue,t.join(" "),e),this.listenTo(this.playQueue.get("collection"),"change:queueIndex",e)},
filterUpNext:function(e){var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange(),i=n.start,a=n.end;return this.includeSelectedItem||(i+=1),t>=i&&t<=a},onPlayQueueChange:function(){this.refilter()}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(19),s=n(21),o=n(478),l=s.a.extend({name:"FilterCollection",context:["server","section","includeAdvanced"],model:o.a,comparator:"filterType",includeAdvanced:!0,url:function(){
var e=a.a.result(this.section,"url"),t=this.section.get("currentType"),n={includeAdvanced:this.includeAdvanced?1:0};return t&&(n.type=t.id),r.join([e,"/filters"],n)},findUnwatchedFilter:function(){return this.get("unwatched")||this.get("unwatchedLeaves")}});t.a=l},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"FirstCharacterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.string,title:i.a.string,size:i.a.integer},
urlRoot:function(){return"/library/sections/"+this.section.id+"/firstCharacter"}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"MediaTypeModel",context:["server","section"],sessionAttrs:{id:i.a.integer,typeString:i.a.string,title:i.a.string,plural:i.a.string,mediaType:i.a.string,child:i.a.string,parent:i.a.string,selected:i.a.boolean},defaults:{selected:!1}});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=n(1191),s=i.a.extend({name:"MomentListModel",
context:["server"],url:function(){return this.get("momentKey")},sessionAttrs:{momentKey:a.a.string},syncedAttrs:{key:a.a.string},syncedRelations:{moments:{relationClass:r.a,rootPropertyName:"Directory"}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(17),o=n(18),l=["all","recentlyAdded","recentlyViewed","recentlyViewedShows","onDeck","newest","folder"],u=o.a.extend({name:"SectionSubsetModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",
sessionAttrs:{selected:s.a.boolean},syncedAttrs:{key:s.a.string,title:s.a.string,secondary:s.a.boolean},derivedAttrs:{primary:function(){return!this.get("secondary")&&a.a.contains(l,this.get("key"))}},defaults:{selected:!1},augmentResponse:function(e){return"all"===e.key&&(e.title=n.i(r.default)("All")),e}},{whitelistedPrimaryKeySubsets:l});t.a=u},function(e,t,n){"use strict";var i=n(61),a=n(78),r=n(67),s=n(62),o=n(17),l=n(65),u=n(18),c=n(81),d=u.a.extend({name:"HubModel",
context:["server","section","metadataItem","allowSync"],entityType:r.c,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(s.a)(this.entityType,e.hubIdentifier,this.server.entityID(),this.section&&this.section.entityID(),this.metadataItem&&this.metadataItem.entityID())},idAttribute:"hubIdentifier",rootPropertyName:"Hub",url:function(){return this.get("key")||this.get("hubKey")},sessionAttrs:{isMetadataListPending:o.a.boolean,
isMetadataListPopulated:o.a.boolean,metadataListError:o.a.object},syncedAttrs:{key:o.a.string,hubKey:o.a.string,hubIdentifier:o.a.string,title:o.a.string,summary:o.a.string,icon:o.a.string,thumb:o.a.string,type:o.a.string,size:o.a.integer,totalSize:o.a.integer,more:o.a.boolean,random:o.a.boolean,browse:o.a.boolean},syncedRelations:{metadataList:{relationClass:c.default}},defaults:{isMetadataListPending:!0,isMetadataListPopulated:!1,metadataListError:null},initialize:function(){
this.listenTo(this.get("metadataList"),"change:populatedRange",this.onPopulatedRangeChange)},augmentResponseText:function(e,t){return t===l.a.xml?n.i(a.a)(e):e},augmentResponse:function(e){var t=i.a.parseInteger(e.size)||0;return e.metadataList={listIdentifier:e.hubIdentifier,containerKey:e.key||e.hubKey,Metadata:e.Metadata,size:t},e},onPopulatedRangeChange:function(e,t){var n=t.size,i=e.get("totalSize"),a={size:n};null!=i&&(a.more=i>n),this.set(a)}});t.a=d},function(e,t,n){"use strict"
;var i=n(21),a=n(1200),r=i.a.extend({name:"OverlayCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(213),s=n(19),o=n(244),l=n(17),u=n(18),c=n(1201),d=u.a.extend({mixins:[o.a],name:"PlaylistListModel",context:["server","section"],idAttribute:"key",collectionName:"playlists",url:function(){return this.getPaginatedUrl(a.a.result(this,"containerKey"))},containerKey:function(){
var e=this.section.get("currentType"),t=this.section.get("currentSort"),n={type:15};return n.sort=t?t.id+":"+(t.get("direction")||"asc"):"titleSort:asc",e&&(n.playlistType=e),this.section.get("onlyDumb")&&(n.smart=0),s.join("/playlists/all",n)},sessionAttrs:{isPlaylistList:l.a.boolean,currentPageStart:l.a.integer,currentPageSize:l.a.integer,populatedRange:l.a.object},syncedAttrs:{totalSize:l.a.integer},syncedRelations:{playlists:{relationClass:c.a,rootPropertyName:"Playlist",options:function(e){
return{containerKey:a.a.result(this,"containerKey")}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{isPlaylistList:!0,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},sync:function(e,t,n){var i=r.a.addVersionHeader(2,n);return u.a.prototype.sync.call(this,e,t,i)}});t.a=d},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"TagModel",context:["server","section"],idAttribute:"tag",syncedAttrs:{
id:i.a.integer,tag:{type:i.a.string,save:!0},tagType:i.a.integer,librarySectionID:i.a.string,librarySectionKey:i.a.string,librarySectionType:i.a.integer,filter:i.a.string,role:i.a.string,thumb:i.a.string,count:i.a.integer}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(64),l=n(305),u=o.a.extend({whitelistedAttrs:["friendlyName","label","capabilities"],defaults:{protocolCapabilities:["playback","timeline","mirror","playqueues"]},initialize:function(){
this.set("nowPlaying",new l.a([],{server:this.server}))},parse:function(e){var t=a.a.pick(e,this.whitelistedAttrs);return t.friendlyName=s()("<div/>").html(t.friendlyName).text(),t.protocol=e.receiverType,t.volume=e.volume.level,t.muted=e.volume.muted,t}});t.a=u},function(e,t,n){"use strict";var i=n(95),a=n(1394),r=n(476),s=n(1166),o=r.a.extend({storageKey:"resumePlayQueue",serialize:function(e){return r.a.prototype.serialize.call(this,a.a.augmentDictionary(e,{ttl:2592e5}))},
_getStorage:function(){return i.a}}),l=s.a.extend({initialize:function(e,t){s.a.prototype.initialize.apply(this,arguments),this.user=t.user,this.storage=new o},storageKey:function(){return this.user.id},toJSON:function(){var e=s.a.prototype.toJSON.apply(this,arguments);return a.a.augmentObj(e,2592e5,!0)}});t.a=l},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(2),s=n.n(r),o=n(19),l=n(298),u=n(17),c=n(18),d=n(305),h=c.a.extend({name:"PlexPlayerModel",context:["server"],
idAttribute:"machineIdentifier",rootPropertyName:"Server",sessionAttrs:{nowPlaying:u.a.instanceOf(d.a).isRequired},syncedAttrs:{machineIdentifier:u.a.string,name:u.a.string,address:u.a.string,port:u.a.string,deviceClass:u.a.string,version:u.a.string,product:u.a.string,protocol:u.a.string,protocolVersion:u.a.string,protocolCapabilities:u.a.list},derivedAttrs:{friendlyName:function(){return this.get("name")}},defaults:function(){return{nowPlaying:new d.a([],{server:this.server})}},url:function(){
return"http://"+this.get("address")+":"+this.get("port")+"/"},getXHROptions:function(e,t){return a()({url:this.resolveUrl(e),dataType:"text",headers:this.getHeaders()},t)},resolveUrl:function(e){return/^\w+:\/\//.test(e)?e:o.join([s.a.result(this,"url"),e])},getHeaders:function(){var e=l.a.getInstance();return s.a.clone(e)}});t.a=h},function(e,t,n){"use strict";function i(e,t,n){return void 0===n?t:r.a.isObject(t)?t:n}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict"
;var i=n(21),a=n(139),r=i.a.extend({name:"ProviderFeatureCollection",context:["server","provider"],model:a.b});t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(17),s=n(18),o=s.a.extend({name:"CloudDriveUpdateStatusModel",context:["server"],url:"/services/clouddrive/updatestatus",syncedAttrs:{updating:r.a.boolean},fetchAndNotUpdating:function(){var e=this;return this.fetch().then(function(){return e.get("updating")?a.a.Deferred().rejectWith(e,[e]).promise():e})}});t.a=o
},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(17),s=n(96),o=n(13),l=s.a.prototype,u=s.a.extend({name:"TransientServerModel",cache:null,persistInCache:!1,sessionAttrs:a.a.extend({},s.a.prototype.sessionAttrs,{isTransient:r.a.boolean,originalMachineIdentifier:r.a.string}),defaults:function e(){var e=s.a.prototype.defaults.apply(this,arguments);return a.a.extend({},e,{friendlyName:"Transient Server",isTransient:!0})},initialize:function(e){
var t=e.originalMachineIdentifier,i=n.i(o.a)("appModel"),r=i.get("servers").get(t);r&&a.a.extend(e,r.pick("publicAddressMatches","version")),s.a.prototype.initialize.apply(this,arguments)},addConnection:function(){var e=l.addConnection.apply(this,arguments),t=e.getIpAddressFromPlexDirectAddress();return t&&e.set("address",t),this.testConnection(e),e},updateCacheKey:function(){},onConnectionTestError:function(e,t){e.get("isAborted")||(e.get("isHttps")&&this.addConnection({scheme:"http",
address:e.getIpAddressFromPlexDirectAddress(),port:e.get("port")}),this.get("connections").hasOnlyFailedConnections()&&this._reject())}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(17),s=n(18),o=n(1240),l=s.a.extend({name:"StoredServerModel",idAttribute:"machineIdentifier",syncedAttrs:{machineIdentifier:r.a.string,friendlyName:r.a.string,accessToken:r.a.string,sourceTitle:r.a.string,home:r.a.boolean,synced:r.a.boolean,serverClass:r.a.string,isShared:r.a.boolean,
version:r.a.string,publicAddressMatches:r.a.boolean,ownerId:r.a.integer},syncedRelations:{connections:{relationClass:o.a}},copyFromServer:function(e){var t={};a.a.each(this.syncedAttrs,function(n,i){t[i]=e.get(i)}),this.set(t)}});t.a=l},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(59);n.d(t,"a",function(){return s});var s={INACTIVE:"inactive",SCHEDULED:"scheduled",IN_PROGRESS:"inprogress",COMPLETE:"complete",CANCELLED:"cancelled",ERROR:"error"},o=a.a.extend({
name:"MediaGrabOperationModel",context:["server"],rootPropertyName:"MediaGrabOperation",syncedAttrs:{mediaSubscriptionID:i.a.string,mediaIndex:i.a.integer,channelTitle:i.a.string,status:i.a.string,error:i.a.string,linkedKey:i.a.string},syncedRelations:{metadataItem:{relationClass:r.a,rootPropertyName:"Metadata"},conflicts:function(){return{relationClass:n(488).default,deferred:!0}}},derivedAttrs:{mediaItem:function(){var e=this.get("mediaIndex")
;return(this.get("metadataItem").get("Media")||[])[e]},beginsAt:function(){var e=this.get("mediaItem");return e&&e.beginsAt},endsAt:function(){var e=this.get("mediaItem");return e&&e.endsAt}},augmentResponse:function(e){var t=e;return t[this.rootPropertyName]&&(t=t[this.rootPropertyName]),t.Conflicts&&(t.conflicts=t.Conflicts.MediaGrabOperation,delete t.Conflicts),t}});t.b=o},function(e,t,n){"use strict";function i(e,t){switch(e){case o.INT:case o.ENUM:return a.a.parseInteger(t);case o.BOOL:
return a.a.parseBoolean(t);default:return t}}var a=n(61),r=n(17),s=n(18);n.d(t,"a",function(){return o});var o={INT:"int",TEXT:"text",BOOL:"bool"},l=s.a.extend({name:"MediaSettingModel",context:["server"],idAttribute:"id",rootPropertyName:"Setting",syncedAttrs:{id:r.a.string,advanced:r.a.boolean,default:r.a.oneOfType(r.a.integer,r.a.string,r.a.boolean),hidden:r.a.boolean,group:r.a.string,label:r.a.string,summary:r.a.string,type:r.a.oneOf(o.INT,o.TEXT,o.BOOL,o.ENUM),
value:r.a.oneOfType(r.a.integer,r.a.string,r.a.boolean),enumValues:r.a.array},augmentResponse:function(e){return e.default=i(e.type,e.default),e.value=i(e.type,e.value),e.enumValues&&(e.enumValues=e.enumValues.split("|").map(function(t){var n=t.split(":"),a=n[0],r=n[1],s=void 0===r?a:r;return{label:decodeURIComponent(s),value:i(e.type,a)}})),e},parseAndSetValue:function(e){this.set("value",i(this.get("type"),e))}});t.b=l},function(e,t,n){"use strict"
;var i=n(78),a=n(65),r=n(21),s=n(367),o=r.a.extend({name:"MediaSubscriptionCollection",context:["server"],model:s.a,url:"/media/subscriptions",augmentResponseText:function(e,t){return t===a.a.xml?n.i(i.a)(e):e}});t.a=o},function(e,t,n){"use strict";var i=n(78),a=n(65),r=n(21),s=n(367),o=r.a.extend({name:"MediaSubscriptionTemplateCollection",context:["server"],url:"/media/subscriptions/template",model:s.a,augmentResponseText:function(e,t){return t===a.a.xml?n.i(i.a)(e):e},
augmentResponse:function(e){return e.SubscriptionTemplate}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(44),l=n(64),u=n(1253),c=l.a.extend({whitelistedAttrs:["id","home","protected","restricted","title","username","email","thumb","recommendationsPlaylistId","allowSync","allowCameraUpload","allowChannels","filterMovies","filterTelevision","filterMusic","filterPhotos"],
saveAttrs:["allowSync","allowCameraUpload","allowChannels","filterMovies","filterTelevision","filterMusic","filterPhotos"],filterAttrs:["filterMovies","filterTelevision","filterMusic","filterPhotos"],urlRoot:function(){return this.get("home")?"/api/users":"/api/friends"},convert:function(e){var t=a.a.isObject(e)?e:o.a.parseXML(e);return t.User&&(t=t.User),o.a.parseInteger(t,"id"),o.a.parseBoolean(t,["home","protected","restricted","allowSync","allowCameraUpload","allowChannels"]),
o.a.parseQueryString(t,["filterMovies","filterTelevision","filterMusic","filterPhotos"],"|"),o.a.parseArray(t,"Server"),t},parse:function(e){var t=this.convert(e);return this.parseServers(t),t=a.a.pick(t,this.whitelistedAttrs)},parseServers:function(e){var t=this.get("serverShares"),n=e.Server;t?t.set(n,{parse:!0}):(t=new u.a(n,{server:this.server,parent:this,populated:!0,parse:!0}),this.set("serverShares",t))},cloneDeep:function(){var e=this.toJSON();e.Server=e.serverShares.toJSON(),
e.serverShares=null;var t={server:this.server,section:this.section,channel:this.channel,parent:this.parent,parse:!0,skipCache:!0};return new this.constructor(s.a.extend(!0,{},e),t)||null},getSaveParams:function(e,t){var n=this;if(a.a.isEmpty(e)){var i=this.pick(this.saveAttrs);return a.a.map(i,function(e,t,i){a.a.isBoolean(e)?i[t]=e?"1":"0":a.a.contains(n.filterAttrs,t)&&(i[t]=n.stringifyFilter(e))},this),i}return l.a.prototype.getSaveParams.apply(this,arguments)},stringifyFilter:function(e){
return a.a.map(a.a.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("|")}});t.a=c},function(e,t,n){"use strict";var i=n(83),a=n(489),r=i.a.extend({model:a.a,url:"/api/home/users",parse:function(e){return this.convert(e,"User")}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1257),r=i.a.extend({name:"UserEntitlementCollection",model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(19),s=n(67),o=n(62),l=n(17),u=n(59),c=u.a.prototype,d=u.a.extend({name:"UserPlaylistItemModel",entityType:s.h,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(o.a)(this.entityType,e.id,this.server.entityID())},context:["server","section","channel","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],idAttribute:"id",cache:null,url:function(){
return r.join(["/pms/playlists/",this.userPlaylistKey,"items",this.id])},sessionAttrs:a.a.extend({},c.sessionAttrs,{isUserPlaylistItem:l.a.boolean}),syncedAttrs:a.a.extend({},c.syncedAttrs,{id:l.a.integer,sourceTitle:l.a.string,recommender:l.a.string,message:l.a.string}),defaults:a.a.extend({},c.defaults,{isUserPlaylistItem:!0}),augmentResponse:function(e,t){var n=c.augmentResponse.apply(this,arguments);if(n.type="userPlaylistItem",n.ratingKey=n.url,n.thumb){var i=/\?(\d+)$/.exec(n.thumb)
;i&&(n.addedAt=i[1])}return n}});t.a=d},function(e,t,n){"use strict";var i=n(21),a=n(1262),r=i.a.extend({name:"UserProviderCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1263),r=i.a.extend({name:"UserRoleCollection",model:a.a});t.a=r},function(e,t,n){"use strict";function i(e){var t=e.key,i=e.getModel,r=n.i(a.a)(t),s="is"+r+"Pending",o="is"+r+"Populated",l=t?t+"Error":"error";return function(e){
var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.count,r=i(e,n),u=t?r.get(t):r,c=(r.sessionAttrs,r.get(s));r.set(s,!0),u.repopulateRange(a).done(function(){var e;r.set((e={},e[s]=!1,e[o]=!0,e[l]=null,e))}).fail(function(e,t){var n;if(t.aborting)return void r.set(s,c);r.set((n={},n[s]=!1,n[l]=t,n))})}}var a=(n(33),n(321));t.a=i},function(e,t,n){"use strict";function i(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.allowMetrics,a=t.metricsProperties,s=void 0===a?{}:a,d=e.server,h="/library/metadata/"+e.get("ratingKey")+"/analyze",p=d.getXHROptions(h,{type:"PUT"}),f=e.get("mediaState"),g=u.a;e.set("mediaState",g);var m=o.a.ajax(p).fail(function(t){e.get("mediaState")===g&&e.set("mediaState",f)});return i&&n.i(l.a)("metrics").trackClick(r()({},s,{action:c.K,type:e.get("type")})),m.promise()}
var a=n(6),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(1291),c=n(68);t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.allowMetrics,a=t.metricsProperties,s=void 0===a?{}:a,d=e.server,h="/library/metadata/"+e.get("ratingKey")+"/refresh",p=d.getXHROptions(h,{type:"PUT"}),f=e.get("metadataState"),g=u.d;e.set("metadataState",g);var m=o.a.ajax(p).fail(function(t){e.get("metadataState")===g&&e.set("metadataState",f)})
;return i&&n.i(l.a)("metrics").trackClick(r()({},s,{action:c.I,type:e.get("type")})),m.promise()}var a=n(6),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(734),c=n(68);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.server,i=r.a.result(e,"url"),a=n.getXHROptions(l.join([i,"move"],{after:t}),{type:"PUT"});return o.a.ajax(a).promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(19);t.a=i},function(e,t,n){"use strict";var i=n(50),a=n(368);n.d(t,"a",function(){return r});var r=n.i(i.a)(a.d)
},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(8),s=(n.n(r),n.i(r.createSelectorCreator)(r.defaultMemoize,a.a.isEqual));t.a=s},function(e,t,n){"use strict";function i(e){return/^\w+:\/\//.test(e)}function a(){return n.i(r.createSelector)(function(e,t){return t.url},n.i(o.a)(),l.a,function(e,t,n){if(e&&t&&t.activeConnection){var a=!!n&&!t.isFullServer,r=a?n:t;if(r&&r.activeConnection){var o=r.machineIdentifier===t.machineIdentifier,l=o?"":t.activeConnection.uri,u=i(e)?e:s.join([l,e],{
"X-Plex-Token":t.accessToken});return s.join([r.activeConnection.uri,"/photo/:/transcode"],{url:u,"X-Plex-Token":r.accessToken})}}})}var r=n(8),s=(n.n(r),n(19)),o=n(54),l=n(1280);t.a=a},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.libraries});t.a=r},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.hubEntityID},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(725));t.a=i
},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.hubs});t.a=r},function(e,t,n){"use strict";function i(e){return n.i(o.createSelector)(u.a,n.i(c.a)(),function(t,n){return n?n.reduce(function(n,i){var a=t[i];return a&&s.a.findWhere(a.features,{type:e})&&n.push(i),n},[]):[]})}function a(e){return n.i(l.a)(i(e),function(e){return e})}var r=n(2),s=n.n(r),o=n(8),l=(n.n(o),n(181)),u=n(370),c=n(727);t.a=a},function(e,t,n){"use strict"
;function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){return e?e.desktop.providers:void 0})}var a=n(8),r=(n.n(a),n(54));t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(1283)),r=n.i(i.createSelector)(a.a,function(e){return e.myPlexScheme+"://"+e.myPlexUrl});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(8),s=(n.n(r),n(372)),o=n.i(r.createSelector)(s.a,function(e){return a.a.where(e,{isOutOfDate:!0})});t.a=o},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(8),s=(n.n(r),n(371)),o=n.i(r.createSelector)(s.a,function(e){return e?a.a.pick(e.desktop,["personalCloudServerProviders","isPersonalCloudServerProvidersPending","isPersonalCloudServerProvidersPopulated","personalCloudServerProvidersError"]):{}});t.a=o},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.mediaSubscriptions});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(66),s=n(497),o=s.a.extend({
maxCycles:3,maxSize:50,imageParamsRegex:/&?(width|height|minSize)=([^&]+)/g,initialize:function(){s.a.prototype.initialize.apply(this,arguments),this._infoMemo={}},store:function(e,t){if(t||(t=this.getItemCacheKey(e)),t){var n=e.url,i=this.getImageInfo(n),r={url:n,blobUrl:e.blobUrl,size:i.size},s=this.get(t);if(s){if(!s.images.hasOwnProperty(n)){var o=s.sizes;s.images[n]=r;var l=a.a.sortedIndex(o,r,"size");o.splice(l,0,r)}}else s={images:{},sizes:[r]},s.images[n]=r,this.startListening(),
s._cacheKey=t,this._cache[t]=s,this.size++,e.persistInCache||this.setItemCycle(s,t,a.a.first(this.cycles))}},getItemCacheKey:function(e){return this.getImageInfo(e.url).key},getImageInfo:function(e){if(this._infoMemo.hasOwnProperty(e))return this._infoMemo[e];var t={width:0,height:0,minSize:0},n=e.replace(this.imageParamsRegex,function(e,n,i){return t[n]=parseInt(i,10),""}),i={key:n,size:t.width*t.height+t.minSize};return this._infoMemo[e]=i,i},removeImageInfo:function(e){
this._infoMemo.hasOwnProperty(e)&&delete this._infoMemo[e]},getBlobUrl:function(e){var t=this.getImageInfo(e),n=this.get(t.key);if(n){var i=n.images[e];if(i)return i.blobUrl}},getPlaceholder:function(e){var t=this.getImageInfo(e),n=this.get(t.key);if(n){if(n.images[e])return;return a.a.last(n.sizes).blobUrl}},remove:function(e,t){s.a.prototype.remove.apply(this,arguments),a.a.each(e.sizes,function(e){this.removeImageInfo(e.url),r.a.hasObjectUrl&&window.URL.revokeObjectURL(e.blobUrl)},this)}})
;t.a=o},function(e,t,n){"use strict";var i={DISABLED:0,ENABLED:1,VERBOSE:2};i.settings=[{value:i.DISABLED,title:"Disabled"},{value:i.ENABLED,title:"Enabled"},{value:i.VERBOSE,title:"Verbose"}],t.a=i},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"a",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s});var i="queued",a="matching",r="processing",s="loading"},function(e,t,n){"use strict";var i={TINY:50,SMALL:75,NORMAL:100,LARGE:125,HUGE:200}
;i.settings=[{value:i.TINY,title:"Tiny"},{value:i.SMALL,title:"Small"},{value:i.NORMAL,title:"Normal"},{value:i.LARGE,title:"Large"},{value:i.HUGE,title:"Huge"}],t.a=i},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i.timeFormat,g=void 0===r?"h:mma":r;if(null==e)return"";var m=n.i(h.default)(e,g),v=void 0
;return v=n.i(o.a)(e)?n.i(a.default)("Yesterday"):n.i(l.a)(e)?n.i(u.a)(e)?n.i(a.default)("Tonight"):n.i(a.default)("Today"):n.i(c.a)(e)?n.i(a.default)("Tomorrow"):n.i(d.a)(e)?n.i(p.a)(e):n.i(a.default)("{dayOfWeekAbbreviated}, {monthAbbreviated} {dayNumber}",{dayOfWeekAbbreviated:n.i(p.a)(e,{abbreviate:!0}),monthAbbreviated:n.i(f.a)(e,{abbreviate:!0}),dayNumber:s.a.unix(e).date()}),t?n.i(a.default)("{1} at {2} on {3}",v,m,t):n.i(a.default)("{1} at {2}",v,m)}
var a=n(4),r=n(37),s=n.n(r),o=n(375),l=n(314),u=n(743),c=n(742),d=n(741),h=n(313),p=n(737),f=n(503);t.a=i},function(e,t,n){"use strict";function i(e){var t=[n.i(u.default)("Sunday"),n.i(u.default)("Monday"),n.i(u.default)("Tuesday"),n.i(u.default)("Wednesday"),n.i(u.default)("Thursday"),n.i(u.default)("Friday"),n.i(u.default)("Saturday")],i=t[e];return n.i(l.a)(i,"Unknown day of the week"),i}function a(e){
var t=[n.i(u.default)("Sun"),n.i(u.default)("Mon"),n.i(u.default)("Tue"),n.i(u.default)("Wed"),n.i(u.default)("Thu"),n.i(u.default)("Fri"),n.i(u.default)("Sat")],i=t[e];return n.i(l.a)(i,"Unknown day of the week"),i}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.abbreviate,r=void 0!==n&&n;if(!e)return"";var s=o.a.unix(e).day();return r?a(s):i(s)}var s=n(37),o=n.n(s),l=n(33),u=n(4);t.a=r},function(e,t,n){"use strict";function i(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.includeMinuteZero,a=void 0===i||i,s=n.timeFormat,o=void 0===s?"h:mma":s,l=r.a.unix(e),u=r.a.unix(t),c=l.format("a")===u.format("a"),d=l.minutes(),h=u.minutes(),p=o,f=o;return a||0!==d||(p=p.replace("h:mm","h")),c&&(p=p.replace("a","")),a||0!==h||(f=f.replace("h:mm","h")),l.format(p)+"-"+u.format(f)}var a=n(37),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return!1;var n=o()();return r()(t).forEach(function(e){n.add(t[e],e)}),n.unix()<=e}var a=n(70),r=n.n(a),s=n(37),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return!1;var n=o()();return r()(t).forEach(function(e){n.add(t[e],e)}),n.unix()>=e}var a=n(70),r=n.n(a),s=n(37),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){
if(null==e)return!1;var t=r.a.unix(e);return r()().isSame(t,"week")}var a=n(37),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return!1;var t=r.a.unix(e);return r()().add(1,"day").isSame(t,"day")}var a=n(37),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){return!(null==e||!n.i(a.a)(e))&&parseInt(n.i(r.default)(e,"HH"),10)>16}var a=n(314),r=n(313);t.a=i},function(e,t,n){"use strict"
;var i,a=n(2),r=n.n(a),s=n(3307),o=n.n(s),l=n(3308),u=n.n(l),c=n(3309),d=n.n(c),h=n(3310),p=n.n(h),f=n(3311),g=n.n(f),m=n(3312),v=n.n(m),y=n(3313),b=n.n(y),S=n(3314),I=n.n(S),w=n(3315),M=n.n(w),C=n(3316),D=n.n(C),P=n(3317),T=n.n(P),x=n(3318),E=n.n(x),A=n(3319),k=n.n(A),L=n(3320),_=n.n(L),N=n(3321),R=n.n(N),O=n(3322),j=n.n(O),z=n(3323),U=n.n(z),F=n(3324),B=n.n(F),V=n(3325),H=n.n(V),W=n(3326),Y=n.n(W),Q=n(3327),G=n.n(Q),K=n(3328),q=n.n(K),X=n(3329),Z=n.n(X),J=(i={},i[o.a]=/android/i,
i[u.a]=/plex.*atv|tvos/i,i[d.a]=/chrome/i,i[p.a]=/cloudsync/i,i[v.a]=/dlna/i,i[b.a]=/edge/i,i[I.a]=/firefox/i,i[M.a]=/google.*tv/i,i[D.a]=/internet.*explorer|explorer.*windows/i,i[T.a]=/ios/i,i[E.a]=/linux/i,i[k.a]=/opera/i,i[_.a]=/macosx/i,i[R.a]=/konvergo|plex.*home.*theater|plex.*media.*center/i,i[j.a]=/plex.*media.*server/i,i[U.a]=/roku/i,i[B.a]=/safari/i,i[H.a]=/samsung/i,i[Y.a]=/wii.*u/i,i[G.a]=/windows/i,i[q.a]=/windows.*phone|wince/i,i[Z.a]=/xbox|mystery.*5/i,i),$=r.a.pairs(J),ee={},te={
getIcon:function(e){var t=g.a;return e?ee.hasOwnProperty(e)?ee[e]:(r.a.every($,function(n){var i=n[1].test(e);return i&&(t=n[0],ee[e]=t),!i}),t):t}};t.a=te},function(e,t,n){"use strict";function i(e,t,n){for(var i=[].concat(e),a=i.length-1;a>=0;a--){var s=i[a],l=s.type===o.a,u=n.type===o.a;s&&l!==u||i.splice(a,1)}return i.push(r()({key:t},n)),i}var a=n(6),r=n.n(a),s=n(2),o=(n.n(s),n(33),n(185));t.a=i},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a})
;var i="&",a=","},function(e,t,n){"use strict";function i(e,t){if(!e)return!1;var n="string"==typeof t?decodeURIComponent(t):t;return!!r.a.find(e,function(e){var t=e.value;return r.a.isArray(t)?t.indexOf(n)>-1:t===n})}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){return a.g===e||a.h===e}var a=n(248);t.a=i},function(e,t,n){"use strict";function i(e,t,n){if(null==n)return e.filter(function(e){return e.key!==t});for(var i=[].concat(e),a=i.length;a-- >0;){
var s=i[a],l=s.key,u=s.value;if(t===l&&n===u)i.splice(a,1);else if(t===l&&o.a.isArray(u)){var c=u.indexOf(n);c>-1&&(u.splice(c,1),1===u.length?i.splice(a,1,r()({},s,{value:u[0]})):u.length||i.splice(a,1))}}return i}var a=n(6),r=n.n(a),s=n(2),o=n.n(s);n(33);t.a=i},function(e,t,n){"use strict";function i(e){if(!r.a.isEmpty(e)){if(e===l)return u;var t=e.map(function(e){
var t=e.key,n=e.value,i=e.operator,a=void 0===i?s.a:i,l=r.a.isArray(n)?n.map(encodeURIComponent).join(o.a):encodeURIComponent(n),u=a.lastIndexOf(s.a),c=a.substr(0,u),d=a.substr(u+1,a.lastIndexOf(s.a));return encodeURIComponent(t)+encodeURIComponent(c)+s.a+encodeURIComponent(d)+l},[]);return l=e,u=t.join(o.b)}}var a=n(2),r=n.n(a),s=n(248),o=n(746);n(33);t.a=i;var l=void 0,u=void 0},function(e,t,n){"use strict";function i(e,t){return e?r.a.reduce(t,function(t,n,i){return e[i]!==n&&(t[i]=n),t
},{}):t}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){var i=n(160).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(516).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(252).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(790).default,a=n(97);e.exports=a(i)},function(e,t,n){"use strict";function i(e){return!(!e||!e.status)&&(401===e.status||422===e.status)}t.a=i},function(e,t,n){"use strict";function i(e){return a.a[e]||""}var a=n(317);t.a=i},function(e,t,n){"use strict"
;function i(e,t){var n=e.get("Media");return r.a.indexOf(n,r.a.findWhere(n,{id:t}))}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=[];return r.a.isArray(e)||(e=[e]),r.a.each(e,function(e){var n=e.Part;n&&r.a.each(n,function(e){e.exists!==!1&&e.accessible!==!1||t.push(e)})}),t}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=void 0;if(e.Part.length>1)for(var i=0,a=0,s=e.Part.length;a<s&&(n=e.Part[a],
n.duration)&&!((i+=n.duration)>t);a++);else n=r.a.first(e.Part);return n}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.Part;return r.a.indexOf(n,r.a.findWhere(n,{key:t}))}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){return e>t?50:e<=0||t<=0?0:Math.round(e/t*100)}t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=n;if(e.Part.length>1)for(var a=0,r=e.Part.length;a<r;a++){var s=e.Part[a];if(!s.duration)break
;if(t.key===s.key)break;i-=s.duration}return i}t.a=i},function(e,t,n){"use strict";function i(e,t,i){var o=n.i(a.a)(e,t);if(i=n.i(r.a)(o,i)){var l=n.i(s.a)(e,o,t);return"/library/parts/"+o.id+"/indexes/"+i+"/"+l}}var a=n(760),r=n(1317),s=n(763);t.a=i},function(e,t,n){"use strict";function i(e,t){if(!t)return r.a.Deferred().resolve().promise();n.i(s.a)("[playMedia] ping transcoder")
;var i=e.supports("universalTranscoder")?"/video/:/transcode/universal/ping?session="+t:"/video/:/transcode/segmented/ping?session="+t;return r.a.ajax(e.getXHROptions(i))}var a=n(5),r=n.n(a),s=n(28);i.DELAY=3e4,t.a=i},function(e,t,n){"use strict";function i(e,t,i){if(!t)return o.a.Deferred().resolve().promise();n.i(l.a)("[playMedia] stop transcoder");var a=e.supports("universalTranscoder")?"/video/:/transcode/universal/stop?session="+t:"/video/:/transcode/segmented/stop?session="+t
;return i=r.a.extend(e.getXHROptions(a),i),o.a.ajax(i)}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(28);t.a=i},function(e,t,n){"use strict";function i(e,t){var i=e.playQueueItem,a=e.metadataItem,s=e.media,p=e.part,f=a.get("ratingKey"),g=a.get("type"),m=o.a.Deferred().resolve({}).promise();if(!f)return m;var v={hasMDE:1,ratingKey:f,key:a.get("key"),state:e.state};if(e.continuing&&(v.continuing="1"),i.get("playQueueItemID")&&(v.playQueueItemID=i.get("playQueueItemID")),!("photo"===g||s&&p))return m
;if("photo"!==g){var y=a.get("viewOffset")||0,b=s.duration;if(r.a.isNumber(e.position)&&(y=e.position,y=n.i(d.a)(s,p,y)),b||r.a.isNumber(e.duration)&&(b=e.duration,s.duration=b),!b)return m;y>b&&(y=b),v.time=y,v.duration=b,n.i(h.a)(a,y,b)}var S="[Timeline] "+v.state;null!=v.time&&(S+=", "+v.time+"/"+v.duration),n.i(c.a)(S);var I=u.join("/:/timeline",v);t=r.a.extend(a.server.getXHROptions(I),t),e.playbackSessionID&&(t.headers["X-Plex-Session-Identifier"]=e.playbackSessionID)
;var w=o.a.ajax(t).promise();return w=w.then(function(e){if(!e)return{};var t=l.a.parseXML(e);return t.terminationCode&&(t.terminationCode=l.a.parseInteger(t.terminationCode)),t.generalDecisionCode&&(t.generalDecisionCode=l.a.parseInteger(t.generalDecisionCode)),t.mdeDecisionCode&&(t.mdeDecisionCode=l.a.parseInteger(t.mdeDecisionCode)),t.transcodeDecisionCode&&(t.transcodeDecisionCode=l.a.parseInteger(t.transcodeDecisionCode)),t})}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(61),u=n(19),c=n(28),d=n(1315),h=n(514);i.DELAY=1e4,t.a=i},function(e,t,n){"use strict";function i(e){var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,t)).toFixed(2)+" "+a[t]}var a=["B","KB","MB","GB","TB"];t.a=i},function(e,t,n){"use strict";function i(e){if(!e)return"";var t=e.indexOf("/");return t!==-1?e.substr(t+1):e}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.bitrate||e.maxVideoBitrate,i=e.videoResolution
;if(!t&&!i)return n.i(a.default)("Unknown");var l=[];if(t){var u=t<1e3||t%1e3==0?0:1;l.push(n.i(s.default)(t,u))}if(i&&(!t||t>=1e3)){var c=r.a.getResolutionFromSize(i);l.push(n.i(o.default)(c))}return l.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),r=n(106),s=n(516),o=n(252);t.default=i},function(e,t,n){"use strict";var i={movie:"plex-icon-movies-560",show:"plex-icon-shows-560",season:"plex-icon-shows-560",episode:"plex-icon-shows-560",artist:"plex-icon-artist-560",
album:"plex-icon-music-560",track:"plex-icon-music-560",photo:"plex-icon-photos-560",photoalbum:"plex-icon-photos-560",clip:"plex-icon-clips-560",userPlaylistItem:"plex-icon-clips-560"};t.a=i},function(e,t,n){"use strict";function i(e){return e>=5&&e<9}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.get("type"),i="channelDirectory"===t,r=i||n.i(a.c)(t)||e.get("isFolder");return void 0===e.length&&!r}var a=n(34);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.get("activeConnection");if(t)return t.get("relay")?"relayed":t.get("isLoopback")?"localhost":t.get("isPrivate")?"local":"remote"}t.a=i},function(e,t,n){"use strict";function i(e){return e.get("isShared")?"shared":"owned"}t.a=i},function(e,t,n){"use strict";function i(e,t){if(e=parseInt(e,10),t=t||1,r.a.isNaN(e))return"";if(0===e)return"0 Bytes";var n=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(t)+" "+s[n]}
var a=n(2),r=n.n(a),s=["Bytes","KB","MB","GB","TB"];t.a=i},function(e,t,n){"use strict";function i(e){return 1===Number(e)||"true"===e}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item||e.items[0];if(n.i(p.a)(e))return o.a.Deferred().resolve(n.i(u.a)(t,e)).promise();var i=o.a.Deferred();return e.notify=i.notify,n.i(d.a)(t,e).then(function(i){return e.itemDecision=i,n.i(c.a)(t,e)}).done(i.resolve).fail(function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0;e.silent||(n.i(h.a)(),t="Unable to queue or get next item to play. code: "+e.status,l.a.warn("[PlayMedia]",t)),i.reject(r()({},e,{message:t}))}),i.promise()}var a=n(6),r=n.n(a),s=n(5),o=n.n(s),l=n(28),u=n(518),c=n(1346),d=n(1343),h=n(779),p=n(1348);t.a=i},function(e,t,n){"use strict";function i(e){r.a.trigger("show:alert",{type:"error",message:e||n.i(a.default)("Sorry, there was a problem playing this item.")})}
var a=n(4),r=n(12);t.a=i},function(e,t,n){"use strict";function i(){return o?r.now():Date.now()-l}var a=n(28);t.a=i;var r=window.performance,s=!!r,o=s&&!!r.now,l=void 0;o||(a.a.warn("`performance.now` is not available; a `Date.now()` fallback will be used instead."),l=s&&r.timing&&r.timing.navigationStart?r.timing.navigationStart:Date.now())},function(e,t,n){"use strict";function i(){return"anvergo"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).id}var a=n(31);t.a=i
},function(e,t,n){"use strict";function i(){return"ie"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).id}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(){return"ps3"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).platformID}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(){return"ps4"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).platformID}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(){
return"safari"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).id}var a=n(31);t.a=i},function(e,t,n){"use strict";function i(e){function t(){i<0||e().done(function(){o&&clearTimeout(o),s.resolve.apply(s,arguments)}).fail(function(){i-=1,i<0?(o&&clearTimeout(o),s.reject.apply(s,arguments)):"pending"===s.state()&&setTimeout(t,a)})}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Math.floor(Math.max(n.times||0,0)),a=Math.floor(Math.max(n.delay||0,0))
;n.cancel&&n.cancel.always(function(){i=-1});var s=r.a.Deferred(),o=void 0;return n.maxDuration&&(o=setTimeout(function(){s.reject("maxDuration")},n.maxDuration)),t(),s.promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){return e&&r.a.parseBoolean(e)?n.i(a.default)("Yes"):n.i(a.default)("No")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),r=n(61);t.default=i},function(e,t,n){"use strict";function i(e){if(e&&e.length){var t=e.length
;return 1===t?e[0]:2===t?n.i(a.default)("{1} and {2}",e[0],e[1]):3===t?n.i(a.default)("{1}, {2}, and {3}",e[0],e[1],e[2]):n.i(a.default)("{1}, {2}, and {3} others",e[0],e[1],e.length-2)}}var a=n(4);t.a=i},function(e,t,n){"use strict";function i(e,t){if(!e)return"";if(e.length>t){for(var n=e.substring(0,t-3);/\S/.test(n.charAt(n.length-1))===!1&&n.length>1;)n=n.slice(0,-1);return n+"..."}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict"
;function i(e,t,n){if(!e)return"";if(e.length>t){n=n||Math.floor((t-3)/2);var i=t-3-n;return e.substr(0,n)+"..."+e.substr(e.length-i)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e){r.a.flushDebouncedSave(),a.a.set("main.webMode",e)}var a=n(95),r=n(114);t.a=i},function(e,t,n){"use strict";function i(e,t){p=setTimeout(function(){p=null,a(),o.a.times(t,r),h.length&&i(e,t)},e)}function a(){var e=(new Date).getTime()
;h=o.a.filter(h,function(t){return t.expire>e})}function r(){for(var e=0;e<h.length;e++){var t=h[e],n=!1;try{n=t.fn.call(t.thisArg,t.arg)}catch(e){l.a.error(e.name+": "+e.message),n=!0}if(n){h.splice(e,1);break}}}var s=n(2),o=n.n(s),l=n(28),u=n(13),c=n(675),d=(n.n(c),{defaultWait:10,defaultBatchSize:2,timeout:3e4,enqueue:function(e,t,n,a,r){var s={fn:e,thisArg:t,cancelToken:n,expire:(new Date).getTime()+this.timeout,arg:r};if(void 0===a?h.push(s):h.splice(a,0,s),!p){
var o=u.b("experience")?u.a("experience").taskThrottle:{};i(o.wait||this.defaultWait,o.batchSize||this.defaultBatchSize)}},cancel:function(e){h=o.a.filter(h,function(t){return t.cancelToken!==e})},throttleWithRAF:function(e,t){return function n(){n.rafID&&window.cancelAnimationFrame(n.rafID),n.rafID=window.requestAnimationFrame(function(){delete n.rafID,e.call(t)})}}}),h=[],p=null;t.a=d},function(e,t,n){"use strict";function i(e,t){var n=e.match(/(^[^#]+)?/),i=n[1];return""+(i=i||"")+t}t.a=i
},function(e,t,n){"use strict";function i(e,t){return e.replace(/^\w+:\/\//,t+"//")}t.a=i},function(e,t,n){"use strict";var i=n(636),a=n.n(i),r=new a.a(!1,"_",!0),s={writeXml:function(e){return'<?xml version="1.0"?>'+r.json2xml_str(e)}};t.a=s},function(e,t,n){"use strict";function i(e){var t=e.src,n=e.style,i=e.width,a=e.height,s=e.backgroundSize,l=e.backgroundPosition,c=o()(e,["src","style","width","height","backgroundSize","backgroundPosition"]),d=r()({backgroundImage:"url("+t+")",
backgroundSize:s,backgroundPosition:l,width:i,height:a},n);return u.a.createElement("div",r()({style:d},c))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l);i.defaultProps={backgroundSize:"cover",backgroundPosition:"center"},t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(2),h=n.n(d),p=n(5),f=n.n(p),g=n(1),m=n.n(g),v=n(19),y=n(315),b=n(66),S=n(1381),I=n(732),w=n(27),M=n(278),C=(n(255),
n(798)),D=n(796),P=n(1412),T=new I.a,x="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",E=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.preloadImage=function(e){if(!a.props.allowImagePreloading)return f.a.Deferred().resolve(e).promise();var t=f.a.Deferred(),n=new window.Image,i=e.url,r=e.isPlaceholder;return n.onload=function(){n.onload=n.onabort=n.onerror=null,r?t.notify(e):t.resolve(e)},n.onabort=n.onerror=function(){
n.onload=n.onabort=n.onerror=null,t.reject(e)},n.src=i,t.promise()},a.onLoad=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url;a.setState({isLoaded:!0,src:t}),a.props.onLoad(a.state.url,t)},a.onError=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=e.isCanceled;void 0!==n&&n||(a.setState({isLoaded:!0,src:a.props.fallbackSrc}),a.props.onError(a.state.url,t))},a.state={isLoaded:!1,url:a.getImageUrl(n),src:x,prevSrc:x},a}
return c()(t,e),t.prototype.componentDidMount=function(){this.loadImage(this.props,this.state.url)},t.prototype.componentWillReceiveProps=function(e){var t=this.getImageUrl(e);if(this.state.url!==t){var n=this.state.src;this.setState({isLoaded:!1,url:t,prevSrc:n}),this.loadImage(e,t)}},t.prototype.shouldComponentUpdate=function(e,t){return n.i(w.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this.abortImage()},t.prototype.getImageUrl=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;if(e.src)return e.src;if(e.url){var t=e.allowPixelRatioSize?n.i(y.a)():1,i=a()({width:Math.round(e.width*t),height:Math.round(e.height*t)},e.allowServerFilters?e.filters:{});e.minSize&&(i.minSize=1),e.format&&(i.format=e.format),e.quality&&(i.quality=e.quality),e.upscale&&(i.upscale=1);var r=h.a.result(e,"url"),s=r.indexOf("?"),o=r;return s>-1?(o=v.join(r.substring(0,s),i),o+=o.indexOf("?")===-1?"?":"&",
o+=r.substring(s+1)):o=v.join(o,i),o}},t.prototype.getImageProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.exposeUrl,n=e.backgroundSize,i=e.backgroundPosition,r=e.width,s=e.height,o=e.style,l=e.allowServerFilters,u=e.filters,c=e.className,d=this.state,p=d.src,f=d.url,g=l?o:a()({},o);if(!l&&u){var m=[];h.a.isNumber(u.blur)&&m.push("blur("+u.blur+"px)"),h.a.isNumber(u.saturation)&&m.push("saturate("+u.saturation+"%)"),
h.a.isNumber(u.opacity)&&m.push("opacity("+u.opacity+"%)"),m.length&&(g.filter=m.join(" "))}var v={};return e.background&&(v={backgroundPosition:i,backgroundSize:n}),a()({"data-image-url":t?f:void 0,src:p,style:g,className:c,width:r,height:s},v)},t.prototype.loadImage=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments[1];if(this.abortImage(),!t)return void this.setState({isLoaded:!0,src:x});var i=e.src?this.preloadImage({url:t}):this.loadBlob({url:t})
;this._cancelable=n.i(S.a)(i),this._cancelable.promise.then(this.onLoad,this.onError,this.onLoad)},t.prototype.loadBlob=function(e){var t=this,n=e.url;if(!this.props.allowImageBlobs)return this.preloadImage({url:n});var i=f.a.Deferred(),a=T.getBlobUrl(n);if(a)return i.resolve({url:a}),i.promise();var r=T.getPlaceholder(n);r&&i.notify({url:r,isPlaceholder:!0});var s=new window.XMLHttpRequest;return s.open("GET",n,!0),s.responseType="arraybuffer",this._xhr=s,s.onreadystatechange=function(){
if(4===s.readyState)if(s.onreadystatechange=null,t._xhr=null,200===s.status){var e=new window.Blob([s.response],{type:"image/jpeg"}),a=window.URL.createObjectURL(e);T.store({url:n,blobUrl:a}),i.resolve({url:a})}else i.reject({url:n})},s.send(),i.then(this.preloadImage,this.onError,this.preloadImage),i.promise()},t.prototype.abortImage=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.abort(),this._xhr=null),this._cancelable&&this._cancelable.cancel()},
t.prototype.render=function(){var e=this.props,t=e.background,n=e.transition,i=e.transitionComponent,r=e.transitionProps,s=this.state,o=s.isLoaded,l=s.prevSrc,u=t?D.a:C.a,c=this.getImageProps();return n?m.a.createElement(i,a()({component:u,isLoaded:o,prevSrc:l,transitionProps:r},c)):m.a.createElement(u,a()({},c,{src:o?c.src:l}))},t}(g.Component);E.defaultProps={fallbackSrc:x,exposeUrl:!1,transition:!1,transitionComponent:P.a,background:!1,minSize:!1,upscale:!1,transitionProps:a()({},M.a,{style:{
position:"relative"}}),filters:{},allowServerFilters:!0,allowImageBlobs:b.a.hasBlob&&b.a.hasObjectUrl,allowImagePreloading:!0,allowPixelRatioSize:!0,onLoad:function(){},onError:function(){}},t.a=E},function(e,t,n){"use strict";function i(e){return r.a.createElement("img",e)}var a=n(1),r=n.n(a);t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(48),f=n.n(p),g=n(3304),m=n.n(g),v=n(31),y=n(257),b=n(27),S=n(1427),I=n(1428),w=n(536),M=function(e){function t(i,r){s()(this,t);var o=l()(this,e.call(this,i,r));if(o.onPortalRef=function(e){if(!e)return void o._destroy();var t=o.props,n=t.options,i=t.onReposition,r=t.onPortalRef,s={moveElement:!1};"ie"===v.a.id&&(s.gpu=!1),o._tether=new m.a(a()({element:f.a.findDOMNode(e).parentNode,target:o._getTarget(),
optimizations:s},n)),o._positionTimeout=setTimeout(m.a.position,0),i&&o._addTetherEventListener(),r&&r(e)},o.onTetherUpdate=function(){var e=o._getAttachmentPoints();if(!n.i(y.a)(e,o._lastAttachment)){o._lastAttachment=e;var t=o._getPlacement(e);o.props.onReposition(t)}},o._tether=null,i.onReposition){var u=i.options,c=u.attachment,d=u.targetAttachment;o._lastAttachment={attachment:c,targetAttachment:d,pinned:null}}return o}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){
if(this._tether){var t=!n.i(y.a)(e.options,this.props.options),i=e.onReposition&&!this.props.onReposition,a=this.props.onReposition&&!e.onReposition;i&&this._addTetherEventListener(),a&&this._tether.off("repositioned"),t&&this._updateTetherOptions()}},t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._timeout&&clearTimeout(this._timeout),this._positionTimeout&&clearTimeout(this._positionTimeout),this._destroy()},
t.prototype._destroy=function(){this._tether&&(this._tether.off("repositioned"),this._tether.destroy(),this._tether=null)},t.prototype._addPositionToArray=function(e,t){e===S.a||e===S.b||e===S.c?t.unshift(e):e!==S.d&&e!==S.e&&e!==S.f||t.push(e)},t.prototype._getTarget=function(){return document.getElementById(this.props.target)},t.prototype._getPlacement=function(e){
var t=e.attachment,n=e.targetAttachment,i=e.pinned,a=t.indexOf(S.b)>-1&&n.indexOf(S.a)>-1,r=t.indexOf(S.a)>-1&&n.indexOf(S.b)>-1,s=t.indexOf(S.e)>-1&&n.indexOf(S.d)>-1,o=t.indexOf(S.d)>-1&&n.indexOf(S.e)>-1;return i===S.a||a?I.a:i===S.b||r?I.b:i===S.d||s?I.c:i===S.e||o?I.d:void 0},t.prototype._getAttachmentPoints=function(){var e=this,t=null,n=[],i=[];return this._getTarget().className.split(" ").map(function(a){
var r=a.indexOf("pinned"),s=a.indexOf("element-attached"),o=a.indexOf("target-attached"),l=a.lastIndexOf("-"),u=a.substring(l+1,a.length);r>-1&&l>r?t=u:s>-1?e._addPositionToArray(u,n):o>-1&&e._addPositionToArray(u,i)}),{attachment:n.join(" "),targetAttachment:i.join(" "),pinned:t}},t.prototype._updateTetherOptions=function(){var e=a()({},this._tether.options,this.props.options);this._tether.options=e,m.a.position()},t.prototype._addTetherEventListener=function(){var e=this
;this._tether.on("repositioned",function(){e._timeout=setTimeout(e.onTetherUpdate,0)}),this.onTetherUpdate()},t.prototype.render=function(){return h.a.createElement(w.a,a()({},this.props,{onPortalRef:this.onPortalRef}))},t}(d.Component);M.defaultProps={options:{attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together",pin:!0}]}},t.a=M},function(e,t,n){"use strict";function i(e,t,n){var i=0;return r.a.Children.map(e,function(e){if(r.a.isValidElement(e)){
var a=i;return i++,t.call(n,e,a)}return e})}var a=n(1),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=e.Media;i=void 0===i?[]:i;var r=i[0],s=void 0===r?{}:r,o=s.width,l=s.height,u=s.Part;u=void 0===u?[]:u;var c=u[0],d=void 0===c?{}:c;return o&&l?n.i(a.a)(d.orientation)?l/o:o/l:t}var a=n(772);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.type,n=e.primaryExtraKey;return"track"===t&&!!n}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.type,i=e.isLibraryItem,s=e.isExtra,o=e.Media,l=n.i(r.b)(t);if(!l)return!1;var u=o.length;return i&&!s&&l.mediaType===a.a&&u>1}var a=n(215),r=n(34);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="isScrolling"},function(e,t,n){"use strict";var i=n(1),a=(n.n(i),i.PropTypes.shape({subscribe:i.PropTypes.func.isRequired,dispatch:i.PropTypes.func.isRequired,
getState:i.PropTypes.func.isRequired}));t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(4),o=n(38),l=n(12),u=n(513),c=n(40),d=n(86),h=n(55),p=n(474),f=n(23),g=n(42),m=o.a.extend({mixins:[h.a,p.a],companion:!0,modelDefaults:function(){var e=p.a.modelDefaults.apply(this,arguments),t=this.type===c.a.types.VIDEO,n=this.type===c.a.types.MUSIC,i=this.type===c.a.types.PHOTO;return a.a.extend(e,{state:c.a.states.BUFFERING,showMinimize:!0,showMaximize:t,showSeekBar:!i,showRepeat:n,
showShuffle:n})},modelOverrides:function(){var e=p.a.modelOverrides.apply(this,arguments);return(this.model.get("metadataItem").get("type")===c.a.types.PHOTO||this.model.get("playQueue").get("collection").length<2)&&(e.showPlayQueue=!1),e},initialize:function(e){p.a.initialize.apply(this,arguments),a.a.bindAll(this,"skipPrevious","skipNext"),this.type=e.type,this.manager=e.manager,this.player=this.manager.player},getServerConnection:function(e,t){t||(t={});var n=e.get("activeConnection")
;if(n&&n.get("isLoopback")&&(n=e.get("connections").find(function(e){return e.get("isConnected")&&!e.get("isLoopback")})),n)return{protocol:n.get("scheme")||"http",address:n.getAddressFromUri(),port:n.get("port")};t.isRequired&&this.showLoopbackWarning(e)},showLoopbackWarning:function(e){var t=r.a("appModel"),i=t.get("user");if(!i.get("signedIn")||"ok"!==e.get("myPlexSigninState")){var a
;a=i.get("signedIn")?n.i(s.default)("This server is unavailable to the player. Please sign this server in to your Plex account and try again."):n.i(s.default)("This server is unavailable to the player. Please sign in to your Plex account and try again.");var o=new g.a({title:n.i(s.default)("Unable to Cast"),message:a,confirmLabel:n.i(s.default)("OK"),cancelLabel:n.i(s.default)("Ignore")});o.promise.done(function(){l.a.trigger("hide:player"),
i.get("signedIn")?l.a.trigger("navigate","serverSettings",{serverID:e.id}):l.a.trigger("navigate","login",{silent:!0})}),l.a.trigger("show:modal",o)}},getTransientToken:function(e){return f.a.execute("getTransientToken",{server:e})},reset:function(e){var t={loop:"photo"===this.type};return this.currentItem=e,this.previousItem=this.getPreviousItem(e,t),this.nextItem=this.getNextItem(e,t),this.model.set(a.a.extend(a.a.result(this,"modelDefaults"),this.modelOverrides())),e},stop:function(e,t){
p.a.stop.apply(this,arguments);var n=r.a("appModel"),i=this.model.get("playQueue");i&&!n.get("primaryPlayer")&&i.takeOwnership(),this.manager.resetActiveController(this.type),l.a.trigger("hide:player",t)},setStream:function(e,t){},setRepeat:function(e){},refreshRemotePlayQueue:function(){},onFinishedChange:function(e,t){t&&(this.manager.resetActiveController(this.type),l.a.trigger("hide:player"))},onMetadataItemChange:function(){
var e,t,n=this.model.get("metadataItem"),i=this.model.get("mediaIndex"),r=this.model.get("partIndex"),s=n.get("Media");if(e=i>1&&s.length>i?s[i]:a.a.first(s)){var o=e.Part;t=r>1&&o.length>r?o[r]:a.a.first(o)}this.model.set({media:e,part:t})},onAudioStreamIDChange:function(e,t){var i=e.previous("audioStreamID");if(null!=t&&null!=i){if(this.isTimelineChange){var a=d.a.get("audio");return void n.i(u.a)(e.get("media"),a,t)}this.setStream("audio",t)}},onSubtitleStreamIDChange:function(e,t){
var i=e.previous("subtitleStreamID");if(null!=t&&null!=i){if(this.isTimelineChange){var a=d.a.get("subtitles");return void n.i(u.a)(e.get("media"),a,t)}this.setStream("subtitles",t)}},onPlayQueueChange:function(){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem();var e=a.a.pick(a.a.result(this,"modelDefaults"),["showPlayQueue","canSkipPrevious","canSkipNext","canShuffle","shuffled"]);this.model.set(a.a.extend(e,this.modelOverrides())),this.refreshRemotePlayQueue()},
onRepeatChange:function(e){if(!this.isTimelineChange){var t=0;e.get("repeatAll")&&!e.get("repeatItem")?t=2:e.get("repeatItem")&&!e.get("repeatAll")&&(t=1),this.setRepeat(t)}}});t.a=m},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(38),o=n(40),l=n(34),u=n(23),c=n(55),d=n(28),h=n(389),p=n(179),f=n(96),g=n(59),m=n(81),v=n(303),y=s.a.extend({mixins:[c.a],types:[o.a.types.VIDEO,o.a.types.MUSIC,o.a.types.PHOTO],initialize:function(){var e=r.a("appModel");this.items={},this.containers={},
this.activeControllerTypes={},this.listenTo(e,"change:primaryPlayer",this.onPrimaryPlayerChange)},start:function(e){this.player&&this.stop(),d.a.info("Casting to "+e.get("friendlyName")),this.player=e,e&&this.listenTo(e.get("nowPlaying"),"add",this.onNowPlayingAdd)},stop:function(){if(this.player){n.i(d.a)("Stopped casting to "+this.player.get("friendlyName"));var e=this.player.get("nowPlaying");e.clear(),this.stopListening(e),this.player=null}this.items={},this.containers={},
this.activeControllerTypes={}},resetActiveController:function(e){this.activeControllerTypes[e]=!1},createController:function(e,t){return t.isPassive||(this.activeControllerTypes[e]=!0),new this.controller({type:e,manager:this})},updateNowPlaying:function(e){var t=e.type,n=e.key,i=e.state===o.a.states.STOPPED||e.state===o.a.states.ERROR,r=this.items[t],s=this.containers[t];if(r){if(n===r.get("key")&&!i)return;this.removeFromNowPlaying(r,e)}n&&!i&&this.addToNowPlaying(a.a.extend({},e,{
previousItem:r,previousContainer:s}))},addToNowPlaying:function(e){var t=e.type,n=e.machineIdentifier,i=e.key,r=e.containerKey,s=e.previousContainer;"node"===n&&(n="myPlex");var l=new f.a({machineIdentifier:n},{onlyIfCached:!0});if(!a.a.isEmpty(l)&&l.get("isConnected")){if("myPlex"===n){var u=l.parent.get("primaryServer");i=u?u.resolveUrl(i):l.resolveUrl(i,{connection:new p.a({scheme:"https",address:"node.plexapp.com",port:"32443"})})}var c=new g.a({key:i},{server:l,skipCache:!0}),d=c.populate()
;this.items[t]=c;var h;if(s&&s.key===r)h=s.playQueue;else{var y=c.server.get("playQueueManager"),b=o.a.getElementByType(t),S=v.a.prototype.getIdFromKey(r);if(null!==S)(h=y.getForType(b))&&h.get("playQueueID")===S||(h=y.createForType(b,{onServer:!0}),h.set("playQueueID",S),d=d.then(function(){return h.fetch({reset:!0})}));else{var I;r&&(I=new m.default({containerKey:r},{server:l,skipCache:!0}),d=d.then(function(){return I.populate()})),d=d.then(function(){h=y.createForType(b,{onServer:!1})
;var e=I?I.get("metadataItems"):c;return h.addContent(e)})}d.done(function(){var e=h.get("collection").findWhere({key:i});h.set("selectedItem",e)})}this.containers[t]={key:r,playQueue:h},d.done(a.a.bind(function(){c.set("key",i),this.player.get("nowPlaying").add(c)},this)),d.fail(a.a.bind(function(){this.removeFromNowPlaying(c,e)},this))}},removeFromNowPlaying:function(e,t){this.items[t.type]=null,this.containers[t.type]=null,this.player.get("nowPlaying").remove(e)},
onPrimaryPlayerChange:function(e,t){if(t){h.a.stop(!0);var n=r.a("appModel");n.has("transientServer")&&n.unset("transientServer")}t&&t.get("protocol")===this.protocol?this.start(t):this.stop()},onNowPlayingAdd:function(e){var t=e.get("type");if(t){var i=n.i(l.k)(t),a=o.a.getTypeByElement(i.mediaType);this.activeControllerTypes[a]||u.a.execute("playMedia",{item:e,useMiniPlayer:!0,isFromCompanion:!0})}}});t.a=y},function(e,t,n){"use strict";var i=n(31),a={capabilities:{embed:!0,redirect:!0},
video:{protocols:{hls:{mimeType:"application/x-mpegURL"}},directPlay:{generic:{video:{maxWidth:1920,maxHeight:1280,maxFrameRate:60}},mp4:{mimeType:'video/mp4; codecs="avc1.42E01E"',video:{codecs:{h264:{}}},audio:{codecs:{aac:{}}}},mkv:{mimeType:"video/webm",video:{codecs:{vp8:{}}},audio:{codecs:{vorbis:{}}}},ogg:{mimeType:"video/ogg"},mpegts:{protocol:"hls"},flv:{}},directStream:{video:{codecs:{h264:{}},maxWidth:1920,maxHeight:1280,maxBitDepth:8},audio:{codecs:{aac:{}},maxBitrate:192,
maxChannels:2}}},music:{directPlay:{mp4:{mimeType:'audio/mp4; codecs="mp4a.40.5"',audio:{codecs:{aac:{}}}},mp3:{mimeType:'audio/mpeg; codecs="mp3"',audio:{codecs:{mp3:{}}}},ogg:{mimeType:'audio/ogg; codecs="vorbis"',audio:{codecs:{vorbis:{}}}},wav:{mimeType:"audio/wav",audio:{codecs:{pcm:{}}}},flac:{mimeType:"audio/flac",audio:{codecs:{flac:{}}}}},directStream:{audio:{codecs:{mp3:{}},maxBitrate:320,maxChannels:2}}}}
;"ie"===i.a.id&&"9.0"===i.a.version&&(a.video.directPlay.mp4.optimizedForStreaming=!0),t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(38),o=n(12),l=n(530),u=n(55),c=n(23),d=n(1736);n.d(t,"b",function(){return h});var h="unknown",p=s.a.extend({mixins:[u.a],bundleUpdatesDelay:36e5,initialize:function(e){this.appModel=e.appModel},start:function(){this.stop(),this.listenTo(this.appModel,{"change:primaryServer":this.onPrimaryServerChange,
"change:primaryServer.change:isConnected":this.onPrimaryServerConnectedChange})},stop:function(){this.stopListening()},isLastHistoryEntry:function(e){var t=this.appModel.get("history"),n=a.a.last(t);return!(!n||!n.indexOf("fragment"))},isDismissedUpdate:function(e){return(n.i(l.a)(e.get("version"))||h)===n.i(r.a)("appModel").get("settings").get("serverUpdateDismissedVersion")},checkForServerUpdates:function(e){if(e.get("isConnected")&&e.get("updater")){var t=e.get("desktop").get("update")
;e.supports("updater")?t.fetch().then(function(){c.a.execute("checkForServerUpdates",{server:e,download:!1})}):this.isDismissedUpdate(t)||o.a.trigger("show:bar","alertbar",new d.a({model:t}))}},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");if(n&&this.stopListening(n.get("desktop").get("update")),!t||!t.get("isFullOwnedServer"))return void clearTimeout(this.bundleUpdatesTimeout);this.listenTo(t.get("desktop").get("update"),"change:state",this.onServerUpdateStateChange),
this.checkForServerUpdates(t)},onPrimaryServerConnectedChange:function(e,t){this.checkForServerUpdates(e)},onServerUpdateStateChange:function(e,t){this.isDismissedUpdate(e)||this.isLastHistoryEntry("/settings/server")||/^(available|downloaded|notify)$/.test(t)&&o.a.trigger("show:bar","alertbar",new d.a({model:e}))}});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={triggerAutoselect:function(e){this.trigger("autoselect",{shiftKey:e.shiftKey})},stopTrackingSelecting:function(e,t){
if(this.isTrackingSelecting)return e.preventDefault(),void(this.isTrackingSelecting=!1);t&&t.call(this,e)},onMouseEnter:function(e){this.parentMediaActions&&this.parentMediaActions.get("selecting")&&this.triggerAutoselect(e)},onMouseLeave:function(e){this.stopTrackingSelecting(e)},onMouseDown:function(e){if(this.parentMediaActions&&this.parentMediaActions.shouldStartTrackingSelecting(e)){var t=a.a.bind(function(){this.ignoreOnClick=!0},this)
;this.listenToOnce(this.parentMediaActions,"change:selectedItems",t),this.isTrackingSelecting=!0,this.trigger("select",{multiSelect:e.shiftKey}),this.stopListening(this.parentMediaActions,"change:selectedItems",t)}},onClick:function(e){this.ignoreOnClick&&(this.ignoreOnClick=!1,e.preventDefault())}};t.a=r},function(e,t,n){"use strict";var i=n(13),a={handleCollectUsageData:function(e){var t=n.i(i.a)("appModel");this._appModel=t,this._adapter=e,
this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.onPrimaryServerChange(t,t.get("primaryServer"))},_toggleAdapter:function(e){var t=this._adapter;e===!0?t.enable():e===!1&&t.disable()},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");n&&(this.stopListening(n),this.stopListening(n.get("desktop").get("settings")));var i=void 0;if(t){var a=t.get("desktop").get("settings"),r=a.get("collectUsageData");i=r?r.get("value"):i,
this.listenTo(a,"add change",this.onSettingsModelChange)}this._toggleAdapter(i)},onSettingsModelChange:function(e,t,n){if("collectUsageData"===e.id){var i=this._appModel.get("primaryServer");i&&i.id===e.server.id&&this._toggleAdapter(e.get("value"))}}};t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={collectionEvents:{"update reset sort":"onTracksUpdate"},markDiscNumbers:function(){if(this.collection.server.supports("premiumMusic")){var e=this.collection.reduce(function(e,t,n){
var i=t.get("parentIndex");return i!==e.lastDiscNumber&&(e.markers[n]=i,e.lastDiscNumber=i,e.count+=1),e},{markers:{},lastDiscNumber:null,count:0});return this.discMarkers=e.markers,e.count}},onRender:function(){1!==this.markDiscNumbers()&&a.a.each(this.discMarkers,a.a.bind(function(e,t){this.$("li:eq("+t+") .disc-number").removeClass("hidden")},this))},onTracksUpdate:function(){this.render()}};t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var i=n(18),a=n(1550),r=n(1548),s=n(19),o=i.a.extend({name:"FilePathListModel",context:["server","includeFiles","url"],url:function(){var e={};return this.includeFiles&&(e.includeFiles=1),s.join(["/services/browse"],e)},syncedRelations:{paths:{relationClass:a.a,rootPropertyName:"Path"},files:{relationClass:r.a,rootPropertyName:"File"}}});t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),a=n(1552),r=i.a.extend({name:"MatchResultCollection",
context:["server"],model:a.a,url:function(){return"/library/metadata/"+this.parent.id+"/matches"}});t.default=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(816),s=n(1553),o=a.a.extend({name:"QueryParseModel",context:["server"],url:function(){return this.get("key")},sessionAttrs:{key:i.a.string},syncedAttrs:{type:i.a.string},syncedRelations:{rule:{relationClass:r.a,rootPropertyName:"Rule",deferred:!0},limits:{relationClass:s.a,rootPropertyName:"Limit",deferred:!0}}});t.a=o
},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"QueryRuleModel",syncedAttrs:{field:i.a.string,fieldTitle:i.a.string,value:i.a.string,valueTitle:i.a.string,operator:i.a.string,type:i.a.string},syncedRelations:{rules:function(){return{relationClass:n(1555).default,rootPropertyName:"Rule",deferred:!0}}}});t.a=r},function(e,t,n){"use strict";var i=n(209),a=n(83),r=n(1557),s=a.a.extend({model:r.a,url:"/playQueues?type="+i.a.LOCAL,parse:function(e){
return this.convert(e,"PlayQueue")}});t.a=s},function(e,t,n){"use strict";function i(e,t,i){var a=/!$/.test(i),r=/\.id$/.test(i);if(a||r)return e[i]=t,e;var s=i.match(/^(.+)\.(.+)/);return s&&(e.type=n.i(l.b)(s[1]).id,i=s[2]),e[i+".query"]=t,e}var a=n(2),r=n.n(a),s=n(78),o=n(19),l=n(34),u=n(65),c=n(21),d=n(1572),h=c.a.extend({name:"MetadataAutocompleteResultCollection",context:["server","section","multiMetadataItem","query"],model:d.a,url:function(){var e={
type:n.i(l.b)(this.multiMetadataItem.get("type")).id,limit:10};return e=r.a.reduce(this.query,i,e),o.join([this.multiMetadataItem.sectionUrl(),"autocomplete"],e)},augmentResponseText:function(e,t){return t===u.a.xml?n.i(s.a)(e):e}});t.a=h},function(e,t,n){"use strict";var i=n(222),a=n(62),r=n(183),s=n(59),o=s.a.extend({name:"SyncMetadataModel",entityType:i.SYNC_METADATA_ITEM,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state
;return n.i(a.a)(this.entityType,e.ratingKey,this.syncItemId,this.server.entityID())},context:["server","device","syncItemId"],cache:new r.a,cacheKey:function(){return s.a.prototype.cacheKey.apply(this,arguments)+"!"+this.syncItemId}});t.a=o},function(e,t,n){"use strict";var i=n(21),a=n(326),r=i.a.extend({name:"MediaGrabberDeviceCollection",context:["server"],model:a.b,url:"/media/grabbers/devices"});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1577),r=i.a.extend({
name:"DVRNetworkCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(823),r=i.a.extend({name:"DVRCollection",context:["server"],model:a.a,url:"/livetv/dvrs"});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=n(206),s=n(820),o=i.a.extend({name:"DVRModel",context:["server"],rootPropertyName:"Dvr",idAttribute:"key",sessionAttrs:{isSaving:a.a.boolean,saveError:a.a.object},syncedAttrs:{key:a.a.integer,epgIdentifier:a.a.string,country:a.a.string,language:a.a.string,
lineup:a.a.string,lineupTitle:a.a.string,uuid:a.a.string},syncedRelations:{devices:{relationClass:s.a,rootPropertyName:"Device"},prefs:{relationClass:r.a,rootPropertyName:"Setting",deferred:!0,save:!0}},defaults:{isSaving:!1,saveError:null}});t.a=o},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"EPGCountryModel",context:["server"],idAttribute:"code",rootPropertyName:"Country",syncedAttrs:{key:a.a.string,type:a.a.string,title:a.a.string,code:a.a.string,example:a.a.string,
flavor:a.a.integer,language:a.a.string,languageTitle:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"EPGCountryRegionModel",context:["server"],idAttribute:"key",rootPropertyName:"Region",syncedAttrs:{key:a.a.string,type:a.a.string,title:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1589),r=i.a.extend({name:"ChannelMappingCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(542),r=i.a.extend({
name:"SearchCollection",context:["server","provider"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(361),s=n.n(r),o=s.a.extend({constructor:function(e,t,n,i){this.exclusiveAgents=t,this.agentIdentifier=n,s.a.call(this,e,i),this.filterBy(a.a.bind(this.filterExclusiveAgent,this))},filterExclusiveAgent:function(e){var t=e.get("identifier"),n=this.exclusiveAgents;if(!n)return!0;var i=this.agentIdentifier,a=n.indexOf(i)!==-1,r=n.indexOf(t)!==-1;return a?t===i:!r}});t.a=o
},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(37),s=n.n(r),o=n(78),l=n(17),u=n(65),c=n(18),d=n(488),h=c.a.extend({name:"CalendarModel",context:["server"],url:"/media/subscriptions/scheduled",sessionAttrs:{visibleDays:l.a.integer,time:l.a.integer},syncedRelations:{scheduled:{relationClass:d.default,rootPropertyName:"MediaGrabOperation"}},derivedAttrs:{startTime:function(){var e=this.get("visibleDays"),t=s.a.unix(this.get("time")),n=t.startOf("day")
;return e>1?n.subtract(1,"day").unix():n.unix()},endTime:function(){var e=this.get("visibleDays"),t=s.a.unix(this.get("time")),n=t.endOf("day");return e>1?n.add(e-2,"days").unix():n.unix()},daysOfWeek:function(){var e=s.a.unix(this.get("startTime")),t=s.a.unix(this.get("endTime")),n=t.diff(e,"days");return a.a.times(Math.min(n+1,7),function(t){return e.clone().add(t,"days").unix()})},days:function(){var e=s.a.unix(this.get("startTime")),t=s.a.unix(this.get("endTime")),n=t.diff(e,"days")
;return a.a.times(n+1,function(t){return e.clone().add(t,"days").unix()})},firstEvent:function(){return this.get("scheduled").first()},lastEvent:function(){return this.get("scheduled").last()},hasPastEvents:function(){var e=this.get("firstEvent");return!!e&&s.a.unix(e.get("beginsAt")).isBefore(s.a.unix(this.get("startTime")))},hasFutureEvents:function(){var e=this.get("lastEvent");return!!e&&s.a.unix(e.get("beginsAt")).isAfter(s.a.unix(this.get("endTime")))}},defaults:function(){return{
visibleDays:7,time:s()().unix()}},augmentResponseText:function(e,t){return t===u.a.xml?n.i(o.a)(e):e}});t.a=h},function(e,t,n){"use strict";function i(e,t){var i=t.libraryID,a=t.libraryType,s=t.cancel,d=t.force,h=t.allowMetrics,p=t.metricsProperties,f=void 0===p?{}:p,g=d?{force:1}:void 0,m=n.i(c.join)(["/library/sections",i,"refresh"],g),v=e.getXHROptions(m,{type:s?"DELETE":"GET"});if(h){var y=void 0;y=s?u.Q:d?u.R:u.S,n.i(l.a)("metrics").trackClick(r()({},f,{action:y,type:"all"===i?"all":a}))}
return o.a.ajax(v).promise()}var a=n(6),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(68),c=n(19);t.a=i},function(e,t,n){"use strict";var i=n(50),a=n(32);n(720);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"e",function(){return o}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return u}),n.d(t,"f",function(){return c});var r=n.i(i.a)(a._176),s=n.i(i.a)(a._177),o=n.i(i.a)(a._178),l=n.i(i.a)(a._179),u=n.i(i.a)(a._180),c=n.i(i.a)(a._181)},function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=n(50),a=n(32);n.d(t,"initMediaSubscriptionModal",function(){return r}),n.d(t,"clearMediaSubscriptionModal",function(){return s}),n.d(t,"fetchMediaSubscription",function(){return o}),n.d(t,"saveMediaSubscription",function(){return l}),n.d(t,"changeMediaSubscriptionTemplateMode",function(){return u}),n.d(t,"clearMediaSubscriptionModalError",function(){return c}),n.d(t,"moveMediaSubscriptionModal",function(){return d}),
n.d(t,"deleteMediaSubscriptionModal",function(){return h});var r=n.i(i.a)(a.a),s=n.i(i.a)(a.b),o=n.i(i.a)(a.c),l=n.i(i.a)(a.d),u=n.i(i.a)(a.e),c=n.i(i.a)(a.f),d=n.i(i.a)(a.g),h=n.i(i.a)(a.h)},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return o});var r=n.i(i.a)(a._162),s=n.i(i.a)(a._163),o=n.i(i.a)(a._164)},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){
return t.activeSort},n.i(o.a)(),function(e,t){if(t){var n=e&&r.a.first(e.split(":")),i=r.a.find(t.sorts,function(t){return e?t.key===n||t.descKey===e:t.isDefault});return i||(i=r.a.first(t.sorts)),i}})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(328));t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(261)),r=n.i(i.createSelector)(a.a,function(e){return e.reduce(function(e,t){return e.push.apply(e,t.fields),e},[])});t.a=r},function(e,t,n){"use strict";function i(e){
var t=e.ui.libraryPage.details;return t?t.fieldTypes:void 0}t.a=i},function(e,t,n){"use strict";function i(){return n.i(o.createSelector)(c.a,n.i(d.a)(),function(e,t){var i=t?t.channels:e.selectedDevice.channels,a=t?t.channelMappings:e.channelMappings,r=s.a.pluck(i,"key"),o=s.a.pluck(a,"deviceIdentifier"),u=r.concat(o);return s.a.uniq(u).map(function(e){var t=s.a.find(i,{key:e}),n=s.a.findWhere(a,{deviceIdentifier:e}),r=!!t&&t.drm,o=!(!t||r||!n||!n.enabled);return{key:e,name:t?t.name:"",
deviceIdentifier:t?t.identifier:"",enabled:o,drm:r,isChannelMissing:!t,lineupIdentifier:n&&n.lineupIdentifier?n.lineupIdentifier:""}}).sort(function(e,t){return n.i(l.a)(e.deviceIdentifier,t.deviceIdentifier)})})}function a(){return n.i(u.a)(i(),function(e){return e})}var r=n(2),s=n.n(r),o=n(8),l=(n.n(o),n(509)),u=n(181),c=n(118),d=n(329);t.a=a},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){return t.deviceID},n.i(l.a)(),u.a,function(e,t,n){
var i=n.selectedDevice&&n.selectedDevice.key;return r.a.find(t,function(t){return t.type===o.a.PROVIDER_DEVICE_CHANNELSCAN&&parseInt(t.Context.deviceID,10)===(e||i)})})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(117)),l=n(221),u=n(118);t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){return t.dvrID},n.i(l.a)(),u.a,function(e,t,n){return e?r.a.find(t,function(t){return t.type===o.a.PROVIDER_EPG_LOAD&&parseInt(t.Context.dvrID,10)===e}):r.a.find(t,{
uuid:n.epgDownloadActivityID})})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(117)),l=n(221),u=n(118);t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(181)),r=n(118),s=n.i(i.createSelector)(r.a,function(e){return e.lineupChannels.reduce(function(e,t){var n=t.identifier+" "+t.callSign;return t.title&&(n+=" ("+t.title+")"),e[t.identifier]=n,e},{})}),o=n.i(a.a)(s,function(e){return e});t.a=o},function(e,t,n){"use strict";function i(){
return n.i(s.createSelector)(n.i(o.a)(),n.i(l.a)(),function(e,t){if(e&&t)return r.a.findWhere(e.Channel,{id:t.channelID})})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(24)),l=n(330);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.playQueueItemEntityID},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(843));t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.playQueueItems});t.a=r
},function(e,t,n){"use strict";function i(e){return n.i(u.createSelector)(n.i(d.a)(),function(t){return l.a.find(t,{type:e})})}function a(){return i(c.a.OPTIMIZE_DATABASE)}function r(){return i(c.a.CLEAN_BUNDLES)}function s(){return i(c.a.LIBRARY_DELETE)}var o=n(2),l=n.n(o),u=n(8),c=(n.n(u),n(117)),d=n(221);t.a=a,t.b=r,t.c=s},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.providerEntityID},function(e,t){return t.listType},function(e,t){
return t.listContext},o.a,function(e,t,i,a){return n.i(s.a)(t,i,{providerEntityID:e,keys:i===r.c?a[t]:null})})}var a=n(8),r=(n.n(a),n(35)),s=n(964),o=n(1703);t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.libraryRoutes}t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.showPrePlayArtwork}t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(s.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type,i=e.skipChildren,a=i?n.i(r.k)(t):n.i(r.r)(t);return a&&a.typeString})}var a=n(8),r=(n.n(a),n(34)),s=n(24);t.a=i},function(e,t,n){"use strict";var i={PRODUCTION:"9AC194DC",QA:"4289C4E0",CUSTOM:"custom"};i.settings=[{value:i.PRODUCTION,title:"Production"},{value:i.QA,title:"QA"},{value:i.CUSTOM,title:"Custom"}],t.a=i},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(15),s=n(48),o=n.n(s),l=n(33),u=n(2532),c=n.n(u),d=r.a.Layout.extend({className:"react-page-container",initialize:function(){this.$el.addClass(c.a.wrapper)},mountReact:function(){n.i(l.a)(!1,"`mountReact` must be implemented by a subclass of `AbstractReactPageView`")},unmountReact:function(){this.isRendered&&a.a.each(this.ui,function(e,t){o.a.unmountComponentAtNode(e[0])})},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},
onClose:function(){this.unmountReact()}});t.a=d},function(e,t,n){"use strict";var i=n(2846),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"loading",template:a.a,initialize:function(e){e&&e.inline&&this.$el.addClass("loading-inline")}});t.a=s},function(e,t,n){"use strict";var i=n(2830),a=n.n(i),r=n(2533),s=n.n(r),o=n(850),l=o.a.extend({template:a.a,ui:{page:".page-container"},serializeData:function(){return{styles:s.a}}});t.a=l},function(e,t,n){"use strict"
;var i=n(2849),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(12),h=n(791),p=n(380),f=n(46),g=n(68),m=n(23),v=n(108),y=n(1720),b=u.a.Layout.extend({className:"sign-in-container container",template:a.a,ui:{form:"#user-account-form"},regions:{form:"#user-account-form"},events:{"submit form":"onSubmit","click .why-sign-in-btn":"onWhySignInClick","click .back-to-sign-in-btn":"onBackToSignInClick","click .skip-btn":"onSkipClick","click .tv-mode-btn":"onTVModeClick"},
initialize:function(e){e||(e={}),(0,n.i(c.a)("appStore").dispatch)(n.i(v.a)({allowLightPreset:!1})),this.isFirstRun=!!e.isFirstRun,this.showWhySignIn=!1},serializeData:function(){return{showSkip:this.isFirstRun,showWhySignIn:this.showWhySignIn,showTVMode:n.i(p.a)()}},signIn:function(e){return this.form.currentView.validateAll(this.ui.form[0],["username","password"],e)?m.a.execute("signIn",e):l.a.Deferred().reject().promise()},signUp:function(e){
return this.form.currentView.validateAll(this.ui.form[0],null,e)?m.a.execute("signUp",e):l.a.Deferred().reject().promise()},onRender:function(){this.form.show(new y.a({isFirstRun:this.isFirstRun,showRememberMe:!0}))},onSubmit:function(e){e.preventDefault();var t=e.currentTarget,n=this.form.currentView.ui.submitBtn;if(!n.hasClass("active")){n.addClass("active");var i={isFirstRun:this.isFirstRun,username:t.username.value,email:t.email.value,password:t.password.value,confirm:t.confirm.value,
remember:t.remember.checked},a=this.form.currentView.$el.hasClass("sign-in-form")?this.signIn(i):this.signUp(i);a.done(function(){d.a.trigger("navigate:refresh")}),a.fail(s.a.bind(function(){n.removeClass("active")},this))}},onWhySignInClick:function(e){e.preventDefault(),n.i(c.a)("metrics").trackClick({page:f.D,action:g.k,firstRun:this.isFirstRun}),this.showWhySignIn=!0,this.render()},onBackToSignInClick:function(e){e.preventDefault(),this.showWhySignIn=!1,this.render()},
onSkipClick:function(e){e.preventDefault(),n.i(c.a)("metrics").trackClick({page:f.D,action:g.a,firstRun:this.isFirstRun}),this.trigger("skipSignIn")},onTVModeClick:function(e){e.preventDefault(),n.i(h.a)("tv")}});t.a=b},function(e,t,n){"use strict";var i=n(2860),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(259),u=o.a.ItemView.extend({mixins:[l.a],className:"alert transition-in",template:a.a,alertDuration:2e3,transitionDuration:500,events:{mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",
"click .close-btn":"onCloseClick"},initialState:"transitionIn",states:{transitionIn:{nextState:"visible",onEnter:function(){this.$el.triggerReflow(),this.$el.removeClass("transition-in"),this.startTransition()}},visible:{nextState:"transitionOut",onEnter:function(){this.transitionOutTimeout=setTimeout(this.enterNextState,this.alertDuration)}},transitionOut:{onEnter:function(){this.$el.addClass("transition-out"),this.startTransition()}}},initialize:function(e){
this.bindAllWhenRendered(["enterNextState"]),s.a.isString(e)&&(e={message:e}),this.type=e.type,this.message=e.message,this.type&&this.$el.addClass("has-"+this.type)},serializeData:function(){return{type:this.type,message:this.message}},startTransition:function(){setTimeout(this.enterNextState,this.transitionDuration)},onRender:function(){s.a.defer(this.enterNextState)},onStateMachineComplete:function(){this.close()},onMouseEnter:function(e){clearTimeout(this.transitionOutTimeout)},
onMouseLeave:function(e){"visible"===this.currentState&&(clearTimeout(this.transitionOutTimeout),this.transitionOutTimeout=setTimeout(this.enterNextState,this.alertDuration/2))},onCloseClick:function(e){e.preventDefault(),"visible"===this.currentState&&(clearTimeout(this.transitionOutTimeout),this.enterNextState())}});t.a=u},function(e,t,n){"use strict"
;var i=n(2888),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(360),d=n.n(c),h=n(12),p=n(43),f=n(1827),g=n(1760),m=n(225),v=u.a.CompositeView.extend({id:"player-play-queue-dropdown",tagName:"span",className:"dropup",itemView:f.a,emptyView:g.a,itemViewContainer:"ol",template:a.a,modelEvents:{"change:showPlayQueue":"onShowPlayQueueChange"},events:{"click .save-btn":"onSaveClick","mousewheel .play-queue-list":"onPlayQueueMouseWheel"},serializeData:function(){
var e=this.model.get("playQueue"),t=e.get("isRadio"),n=e.server&&e.server.supports("playlists"),i=e.supports({playlists:!0});return{canEdit:this.model.get("showPlayQueue"),canPlaylist:!t&&i&&n}},appendHtml:function(e,t,n){return p.a.prototype.sortedAppendHtml.apply(this,[e,t,n+1])},onRender:function(){if(this.$el.parent().toggleClass("hidden",!this.model.get("showPlayQueue")),this.model.get("showPlayQueue")){var e=function(e){
var t=l()(e.item).data("play-queue-id"),n=l()(e.item).prev(".play-queue-list-item").data("play-queue-id");this.trigger("move",t,n)},t=this.$el.children(".dropdown-menu")[0];this.sortable=new d.a(t,{draggable:".play-queue-list-item",animation:200,onUpdate:s.a.bind(e,this)})}},onShowPlayQueueChange:function(){this.render()},onSaveClick:function(){h.a.trigger("show:modal",new m.a({model:this.model.get("playQueue")}))},onPlayQueueMouseWheel:function(e){e.stopPropagation()}});t.a=v},function(e,t,n){
"use strict";var i=n(2893),a=n.n(i),r=n(15),s=n(13),o=n(1763),l=r.a.Layout.extend({id:"primary-player-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:a.a,regions:{list:".dropdown-menu"},events:{"click .dropdown-toggle":"onDropdownToggleClick"},initialize:function(e){e||(e={});var t=s.a("appModel");this.showNowPlaying=e.showNowPlaying,this.players=t.get("players"),this.listenTo(t,{"change:primaryPlayer":this.onPrimaryPlayerChange,"change:isCastApiAvailable":this.render,
"change:isCastDeviceAvailable":this.render}),this.listenTo(this.players,"update reset",this.render),this.setup()},setup:function(){var e=s.a("appModel"),t=e.get("primaryPlayer");if(t){var n=t.get("nowPlaying");this.listenTo(n,"update reset",this.render)}},serializeData:function(){return{isActive:!!s.a("appModel").get("primaryPlayer")}},onRender:function(){this.list.append(new o.a({showNowPlaying:this.showNowPlaying}),this.$el)},onPrimaryPlayerChange:function(e,t){
var n=s.a("appModel"),i=n.previous("primaryPlayer");i&&this.stopListening(i.get("nowPlaying")),this.setup(),this.render()},onDropdownToggleClick:function(e){this.players.fetch()}});t.a=l},function(e,t,n){"use strict";function i(e){return D.a.reduce(e,function(e,t){return e[t]=!0,e},{})}
var a=n(2899),r=n.n(a),s=n(2901),o=n.n(s),l=n(2904),u=n.n(l),c=n(2908),d=n.n(c),h=n(2910),p=n.n(h),f=n(2911),g=n.n(f),m=n(2913),v=n.n(m),y=n(2915),b=n.n(y),S=n(2917),I=n.n(S),w=n(2912),M=n.n(w),C=n(2),D=n.n(C),P=n(5),T=n.n(P),x=n(4),E=n(34),A=n(554),k=n(1771),L=n(190),_={movie:d.a,show:b.a,season:v.a,episode:u.a,artist:o.a,album:r.a,track:I.a,photoalbum:p.a,photo:g.a,playlist:M.a},N=A.a.extend({regions:{ratingRegion:".rating-region"},ui:D.a.extend({selectizeInputs:".selectize input[type=text]"
},A.a.prototype.ui),initialize:function(e){var t=this.model.get("type");this.template=_[t]||_.movie;var i=n.i(E.b)(t);this.canSelectize=this.model.server.supports("batchEdit")&&i,this.canReparent=this.model.server.supports("batchEdit")},serializeData:function(){var e=A.a.prototype.serializeData.apply(this,arguments);return e.supportsLinkedYears=this.model.server.supports("linkedYearMetadata"),e},flushChanges:function(){
var e=this.ui.form,t=e.find(".selectize input[tabindex=-1]"),n=i(D.a.pluck(t,"name")),a=i(D.a.pluck(e.find("[type=number]"),"name")),r=D()(e.serializeArray()).reject(function(e){return n[e.name]},this),s=D.a.reduce(r,function(e,t){if(a[t.name]){var n=T.a.trim(t.value);if(n)return e[t.name]=parseFloat(n,10),e;if(!this.model.get(t.name))return e}return e[t.name]=t.value,e},{},this);D.a.each(t,function(e){
var t=T()(e),n=t.data("updateAttr"),i=t.data("altUpdateAttr"),a=t.data("isText"),r=e.selectize.getValue();if(i)if(a)s[n]=r,s[i]=null;else{var o=e.selectize.options[r];if(o){var l=o[t.data("autocompleteAttr")];s[n]=l,s[i]=r}}else s[n]=r});var o=this.model.get("lockedFields");o&&o.set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(s)},markInvalid:function(e){this.$(".form-group").removeClass("has-error"),D()(e).each(function(e){var t=this.$('.form-group[data-attr="'+e+'"]')
;t.addClass("has-error"),t.find(".control-error").text(n.i(x.default)("Required"))},this)},onRender:function(){if(this.$(".rating-region").length>0&&this.ratingRegion.show(new L.a({model:this.model,passive:!0})),this.canSelectize){var e=this;this.ui.selectizeInputs.each(function(t,i){n.i(k.a)(e,i)})}}});t.a=N},function(e,t,n){"use strict"
;var i=n(2909),a=n.n(i),r=n(2916),s=n.n(r),o=n(2905),l=n.n(o),u=n(2902),c=n.n(u),d=n(2900),h=n.n(d),p=n(2918),f=n.n(p),g=n(2),m=n.n(g),v=n(5),y=n.n(v),b=n(304),S=n(554),I=n(1772),w=n(676),M=(n.n(w),S.a.extend({templatesByType:{movie:a.a,show:s.a,episode:l.a,artist:c.a,album:h.a,track:f.a},ui:m.a.extend({tagInputs:".tag-input-hidden"},S.a.prototype.ui),events:m.a.extend({"change .lockable-field":"onLockableFieldChange"},S.a.prototype.events),initialize:function(e){
this.template=this.templatesByType[this.model.get("type")]||this.templatesByType.movie,this.canAutocomplete=this.model.server.supports("batchEdit"),this.canEditSimilarArtists=this.model.server.supports("editSimilarArtists"),this.getSection()},getSection:function(){var e=this.model.section;if(!e){var t=this.model.get("librarySectionID");e=new b.a({key:t},{server:this.model.server})}this.section=e},flushChanges:function(){var e=this.ui.form,t=m.a.reduce(e.serializeArray(),function(e,t){
return e[t.name]=t.value,e},{}),n=m.a.reduce(this.ui.tagInputs,function(e,t){var n=t.selectize,i=y()(t).data("name");return e[y()(t).data("attr")]=m.a.map(n.items,function(e){var t=n.options[e];return{tag:t.tag,id:t.id}}),this.model["original.tag."+i]=m.a.toArray(n.options),e},{},this);m.a.each(n,function(e,t){this.model.get(t).set(e,{parse:!0})},this),this.model.get("lockedFields").set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(t)},onRender:function(){var e=this
;this.ui.tagInputs.each(function(t,i){n.i(I.a)(e,i)})}}));t.a=M},function(e,t,n){"use strict";var i=n(2928),a=n.n(i),r=n(52),s=n(15),o=n(4),l=n(311),u=n(259),c=n(534),d=s.a.Layout.extend({mixins:[u.a],className:"conversion-status",template:a.a,regions:{progressBarRegion:".progress-bar-region"},initialize:function(e){this.initialState=e.initialState,this.initialErrorMessage=e.initialErrorMessage,this.generator=e.generator,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,
this.progressModel=new r.a.Model({progress:0,remaining:0,speed:0})},states:{pending:{onEnter:function(){this.$el.addClass("pending")},onExit:function(){this.$el.removeClass("pending")}},converting:{onEnter:function(){this.$el.addClass("converting")},onExit:function(){this.$el.removeClass("converting")}},processed:{onEnter:function(){this.$el.addClass("processed")},onExit:function(){this.$el.removeClass("processed")}},disabled:{onEnter:function(){this.$el.addClass("disabled")},onExit:function(){
this.$el.removeClass("disabled")}},error:{onEnter:function(){this.$el.addClass("error")},onExit:function(){this.$el.removeClass("error")}}},bindingsModel:"progressModel",bindings:{".conversion-status-converting-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){return e?n.i(o.default)("Paused"):n.i(o.default)("Converting")}},".conversion-status-pending-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){
return e?n.i(o.default)("Paused"):n.i(o.default)("Waiting")}},".conversion-status-converting-speed":{modelAttribute:"speed",autohide:!0,formatter:function(e){if(e){var t=Math.round(10*e)/10;return t>10&&(t=Math.round(t)),"("+t+"x)"}}},".conversion-status-converting-percentage":{modelAttribute:"progress",formatter:function(e){return Math.round(e)+"%"}},".conversion-status-converting-progress-separator":{modelAttribute:"remaining",manual:!0,autohide:function(e){
return e&&this.progressModel.get("speed")}},".conversion-status-converting-remaining":{modelAttribute:"remaining",autohide:!0,formatter:function(e){if(this.progressModel.get("speed"))return n.i(l.a)(e)}}},serializeData:function(){return{initialErrorMessage:this.initialErrorMessage}},findTranscodeJob:function(){return this.transcodeJob=this.transcodeJobs.find(function(e){
var t=this.model.get("ratingKey"),n=this.generator?this.generator.id:this.model.get("generatorID"),i=this.model.get("syncItemId"),a=t&&t===e.get("ratingKey"),r=n&&n===e.get("generatorID"),s=i&&i===e.get("syncItemId");return a&&(r||s)},this),this.transcodeJob&&(this.stopListening(this.transcodeJobs),this.enterState("converting"),this.progressModel.set({progress:this.transcodeJob.get("progress"),speed:this.transcodeJob.get("speed"),remaining:this.transcodeJob.get("remaining")}),
this.listenTo(this.transcodeJob,{remove:this.onTranscodeJobRemove,"change:progress":this.onTranscodeProgressChange,"change:speed":this.onTranscodeSpeedChange,"change:remaining":this.onTranscodeRemainingChange})),this.transcodeJob},onRender:function(){this.enterState(this.initialState||"pending"),this.findTranscodeJob()||this.listenTo(this.transcodeJobs,"reset add",this.findTranscodeJob),this.progressBarRegion.append(new c.a({model:this.progressModel,size:30,lineWidth:3}))},
onTranscodeJobRemove:function(e){this.enterState("pending")},onTranscodeProgressChange:function(e,t){this.progressModel.set("progress",t)},onTranscodeSpeedChange:function(e,t){this.progressModel.set("speed",t)},onTranscodeRemainingChange:function(e,t){this.progressModel.set("remaining",t)}});t.a=d},function(e,t,n){"use strict";var i=n(15),a=n(34),r=n(58),s=i.a.ItemView.extend({ui:{poster:".media-poster"},bindings:{".media-title":{modelAttribute:"title"}},initialize:function(e){
this.type=this.model.get("type");var t=n.i(a.b)(this.type).mediaType,i=this.posterWidth[t]||40,s="movie"===this.type?"art":"thumb",o="movie"===this.type?"art":this.type;this.image=new r.a({model:this.model,type:o,getUrl:this.getPosterUrl,width:i,modelAttribute:s})},getPosterUrl:function(e){return e=e||this.model.get("parentThumb")||this.model.get("grandparentThumb"),e||(this.model.parent?e=this.model.parent.get("thumb"):this.model.channel&&(e=this.model.channel.get("thumb"))),e},
onRender:function(){this.image.setElement(this.ui.poster)}});t.a=s},function(e,t,n){"use strict";var i=n(43),a=n(1819),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list extra-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2963),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(4),h=n(12),p=n(388),f=n(267),g=u.a.ItemView.extend({className:"friend-server-status-container",template:a.a,events:{"click .server-share-edit-btn":"onEditClick"},
initialize:function(){var e=c.a("appModel");this.collection=this.model.get("serverShares"),this.servers=e.get("servers"),this.attachedServers=[],this.collection.each(this.addServerShare,this),this.listenTo(this.collection,{add:this.onServerShareAdd,remove:this.onServerShareRemove,"change:numLibraries":this.render}),this.listenTo(this.servers,"add",this.onServerAdd)},serializeData:function(){var e=c.a("appModel"),t={owned:this.getLibrariesData({owned:!0}),shared:this.getLibrariesData({owned:!1}),
canEdit:!e.get("user").get("restricted")};return t.owned.numLibraries||t.shared.numLibraries||(t.showEmptyMessage=!0),t},getLibrariesData:function(e){var t={friendLabel:this.model.get("restricted")?n.i(d.default)("user"):n.i(d.default)("friend"),status:this.getServerStatus(e),hasActiveShare:!!this.collection.findWhere({pending:!1,owned:e.owned})};return t.numLibraries=this.collection.getLibraryCount({pending:!t.hasActiveShare,owned:e.owned}),
t.libraryLabel=n.i(p.a)(n.i(d.default)("library"),t.numLibraries,n.i(d.default)("libraries")),t},getServerStatus:function(e){for(var t,n=0,i=this.collection.length;n<i;n++){var a=this.collection.at(n);if(a.get("owned")===e.owned){var r=this.servers.get(a.get("machineIdentifier")),s=r&&r.get("connected");if(s===!1)return"unavailable";s&&(t="available")}}return t},addServerShare:function(e){var t=this.servers.get(e.get("machineIdentifier"));t&&this.attachServer(t)},removeServerShare:function(e){
var t=this.servers.get(e.get("machineIdentifier"));t&&!e.get("owned")&&this.detachServer(t)},attachServer:function(e){this.attachedServers.push(e),this.listenTo(e,"change:connected",this.render)},detachServer:function(e){var t=s.a.indexOf(this.attachedServers,e);t>-1&&this.attachedServers.splice(t,1),this.stopListening(e)},onServerShareAdd:function(e){this.addServerShare(e),this.render()},onServerShareRemove:function(e){this.removeServerShare(e),this.render()},onServerAdd:function(e){
this.collection.findWhere({machineIdentifier:e.id})&&(this.attachServer(e),this.render())},onEditClick:function(e){e.preventDefault();var t=l()(e.currentTarget);if(!t.isDisabled()){var n,i=t.hasClass("owned"),a=this.collection.findWhere({owned:i});a&&(n=a.get("machineIdentifier")),h.a.trigger("show:modal",new f.a({model:this.model,defaultPaneType:i?"ownedServer":"sharedServer",defaultPaneID:n}))}}});t.a=g},function(e,t,n){"use strict"
;var i=n(2965),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(13),u=n(4),c=n(12),d=n(23),h=n(164),p=n(862),f=n(267),g=n(338),m=o.a.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:a.a,ui:{poster:".card-poster"},regions:{details:".card-details"},events:{"click .pin-btn":"onPINClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},initialize:function(e){var t=l.a("appModel"),n=t.get("user"),i=n.get("desktop").get("friends"),a=i.get(this.model.id)
;this.isAdmin=e.isAdmin,this.isSignedInUser=this.model.id===n.id,this.image=new h.a({model:this.model,type:"friend",width:80}),a?this.friend=a:this.listenTo(i,"add",this.onFriendAdd)},serializeData:function(){return{isSignedInUser:this.isSignedInUser}},canEditPIN:function(){var e=this.isSignedInUser&&!this.model.get("restricted"),t=this.isAdmin&&this.model.get("restricted")&&!this.model.get("guest");return e||t},showStatusView:function(){this.friend&&this.details.append(new p.a({
model:this.friend}))},bindings:{".username":{modelAttribute:"title"},".admin-icon":{modelAttribute:"admin",autohide:!0,manual:!0},".user-type":{modelAttribute:"restricted",autohide:!0,formatter:function(e){return this.model.get("guest")?n.i(u.default)("Guest User"):e?n.i(u.default)("Managed User"):void 0}},".pin-protected-btn":{modelAttribute:"protected",manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.canEditPIN()),e}},".pin-unprotected-btn":{
modelAttribute:"protected",manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.canEditPIN()),!e}},".edit-btn":{modelAttribute:"admin",manual:!0,autohide:!0,formatter:function(e){var t=l.a("appModel"),n=t.get("user");return(this.isAdmin||!n.get("restricted")&&!this.model.get("restricted"))&&!this.isSignedInUser}},".delete-btn":{modelAttribute:"admin",manual:!0,autohide:!0,formatter:function(e){return this.isAdmin&&!this.isSignedInUser&&!this.model.get("guest")}}},
onRender:function(){this.image.setElement(this.ui.poster),this.showStatusView()},onClose:function(){this.image.close()},onFriendAdd:function(e){e.id===this.model.id&&(this.friend=e,this.showStatusView())},onPINClick:function(e){e.preventDefault(),s()(e.currentTarget).isDisabled()||c.a.trigger("show:modal",new g.a({model:this.model,isEditing:!0}))},onEditClick:function(e){e.preventDefault(),c.a.trigger("show:modal",new f.a({type:"home",homeUser:this.model,isAdmin:this.isAdmin}))},
onDeleteClick:function(e){e.preventDefault(),d.a.execute("removeHomeUser",{homeUser:this.model})}});t.a=m},function(e,t,n){"use strict";var i=n(43),a=n(1864),r=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,sorted:!0});t.a=r},function(e,t,n){"use strict";var i=n(1006),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(12),d=n(857),h=n(57),p=n(323),f={playlist:["general"]},g=h.a.extend({mixins:[p.a],name:"editPlaylistModal",
className:"edit-metadata-modal modal modal-lg fade",template:a.a,panes:{general:{constructor:d.a}},panesModel:"tempModel",events:s.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},h.a.prototype.events),ui:{saveBtn:".save-btn",message:".form-message",navPane:".modal-nav-pane",loadingIndicator:".modal-body-pane .loading-inline"},regions:{paneRegion:".pane-region"},
onlyAfterRender:["saveChanges","showPane","showNav"],initialize:function(e){h.a.prototype.initialize.apply(this,arguments);var t,i,a,r=e.mediaActions;if(r?(a=r.getActionTargets(),t=a[0]):(t=e.model,a=[t]),this.model=t,this.tempModel=t.clone(),!i){var o=l.a.Deferred();o.resolve(),i=o.promise()}i=i.done(s.a.bind(function(){this.tempModel.set(t.attributes),1===a.length&&this.tempModel.set("key",a[0].get("key")),this.showNav(),this.showPane(e.selectedPane||"general"),
this.listenTo(c.a,"shortcut:save",this.saveChanges)},this)),i.fail(s.a.bind(function(){this.ui.message.text(n.i(u.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=f[this.model.get("type")]||f.movie,t=s.a.reduce(e,function(e,t){return e[t]=!0,e},{}),i=s.a.escape(n.i(u.default)("Edit {1}",this.model.get("title")));return{item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:i}},
paneConstructorArg:function(){return{type:this.selectedPane}},showNav:function(){this.ui.navPane.removeClass("hidden")},saveChanges:function(){var e=this.ui.saveBtn,t=this.ui.message;if(!e.isDisabled()){t.text(""),this.paneRegion.currentView.flushChanges();var i=s.a.reduce(this.model.changedAttributes(this.tempModel.attributes),function(e,t,n){return e[n]=t,e},{});e.addClass("active");var a=[];s.a.isEmpty(i)||a.push(this.model.save(i));var r=l.a.when.apply(l.a,a);r.done(s.a.bind(function(){
this.hide()},this)),r.fail(function(){t.text(n.i(u.default)("Your changes could not be saved."))}),r.always(function(){e.removeClass("active")})}},onPaneShow:function(e,t){this.listenTo(t,"focusSubmit",function(){this.ui.saveBtn.focus()})},onPaneHide:function(e,t){t.flushChanges(),this.stopListening(t)},onFormSubmit:function(e){e.preventDefault(),this.saveChanges()}});t.a=g},function(e,t,n){"use strict"
;var i=n(2979),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(57),d=n(1758),h=n(323),p=n(1940),f=n(1941),g=c.a.extend({mixins:[h.a],name:"fixIncorrectMatch",className:"fix-incorrect-match-modal modal modal-lg fade",template:a.a,panes:{form:{constructor:p.a},results:{constructor:f.a}},ui:{searchBtn:".search-btn"},regions:{paneRegion:".pane-region",autoMatchDropdownRegion:".auto-match-dropdown-region"},events:s.a.extend({"click .auto-match-agent":"hide","click .match-result":"hide",
"click .search-options-btn":"onSearchOptionsClick","click .cancel-btn":"onCancelClick","click .search-btn":"onSearchClick","submit #fix-incorrect-match-form":"onSearchSubmit"},c.a.prototype.events),onlyAfterRender:["showPane","updateSearchBtn"],initialize:function(){c.a.prototype.initialize.apply(this,arguments),p.a.prototype.setupAgents.apply(this),f.a.prototype.setupResults.apply(this),this.showPane("results")},serializeData:function(){return{location:this.model.getLocation(),
showNavigation:!this.model.isPlexMusicItem()}},updateSearchBtn:function(e){this.ui.searchBtn.toggleClass("disabled","form"!==e)},fetchResults:function(e){var t=s.a.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e},{manual:1});this.model.results.fetch({reset:!0,data:t,processData:!0,timeout:0})},bindings:{".modal-title-text":{modelAttribute:"guid",formatter:function(e){return/com\.plexapp\.agents\.none\:\/\//.test(e)?n.i(u.default)("Match"):n.i(u.default)("Fix Incorrect Match")}
}},onRender:function(){c.a.prototype.onRender.apply(this,arguments),this.autoMatchDropdownRegion.show(new d.a({model:this.model,collection:this.model.agentsProxy}))},onPaneShow:function(e){this.updateSearchBtn(e)},onSearchOptionsClick:function(e){e.preventDefault(),this.showPane("form")},onCancelClick:function(e){e.preventDefault(),"results"!==this.selectedPane?this.showPane("results"):this.hide()},onSearchClick:function(e){e.preventDefault();var t=l()(e.currentTarget);if(!t.isDisabled()){
var n=t.closest("form");this.fetchResults(n),this.showPane("results")}},onSearchSubmit:function(e){e.preventDefault();var t=l()(e.currentTarget);t.find("search-btn").isDisabled()||(this.fetchResults(t),this.showPane("results"))}});t.a=g},function(e,t,n){"use strict";function i(e){return l.a.reduce(e,function(e,t,n){var i=a(t);if(0===n)return e.concat(i);var r=i.length>1;return e.concat({plain:!0,split:r,s:"or"},i)},[])}function a(e){var t=e.match(/(.+) (.+)/);if(t)return a(t[1]).concat({
plain:!0,s:"then"}).concat(a(t[2]));var n=e.match(/(.+)\+(\S+)/);return n?a(n[1]).concat({plain:!0,s:"+"}).concat(a(n[2])):[{s:l.a.reduce([[/command/,"\u2318"],[/up/,"\u2191"],[/down/,"\u2193"],[/left/,"\u2190"],[/right/,"\u2192"]],function(e,t){return e.replace(t[0],t[1])},e)}]}var r=n(2982),s=n.n(r),o=n(2),l=n.n(o),u=n(57),c=u.a.extend({name:"keyboardShortcutsModal",className:"keyboard-shortcuts-modal modal fade",template:s.a,orderedGroups:[{group:"navigation",label:"Navigation"},{
group:"actions",label:"Actions"},{group:"player",label:"Player"}],initialize:function(e){u.a.prototype.initialize.apply(this,arguments),this.shortcuts=e.shortcuts},serializeData:function(){var e={};return l.a.each(this.shortcuts,function(t){var n=t.group;e[n]||(e[n]=[]),e[n].push(this.humanizeShortcut(t))},this),{groups:l.a.map(this.orderedGroups,function(t){var n=l.a.clone(t);return n.shortcuts=e[t.group],n},this)}},humanizeShortcut:function(e){return e=l.a.clone(e),e.keys=i(e.keys),e}});t.a=c
},function(e,t,n){"use strict";var i=n(2999),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(215),u=n(34),c=o.a.ItemView.extend({className:"convert-policy-container",template:a.a,ui:{policyUnwatchedInput:"#convert-policy-unwatched",policyScopeInput:"#convert-policy-scope",policyValueInput:"#convert-policy-value",policyWarning:".convert-warning"},events:{"change input[name=policyUnwatched]":"onPolicyUnwatchedChange","change input[name=policyScope]":"onPolicyScopeChange",
"keyup input[name=policyValue]":"onPolicyValueChange","change input[name=policyValue]":"onPolicyValueChange"},initialize:function(e){this.type=n.i(u.b)(this.model.get("metadataType")||"movie"),this.leafMediaType=n.i(u.k)(this.type.typeString).mediaType,this.model.setPolicyDefaultsFor(this.leafMediaType)},serializeData:function(){var e={isSync:this.options.isSync,isCloudSync:this.options.isCloudSync,isDirectory:this.model.get("isDirectory"),policy:this.model.get("policy").toJSON()}
;return e.showLimitWarning=this.model.shouldShowPolicyWarning(this.leafMediaType,e.policy.value),e.showUnwatched=e.isDirectory&&this.leafMediaType===l.a,e},updatePolicyValue:function(){var e=this.model.get("policy"),t=Math.abs(parseInt(this.ui.policyValueInput.val(),10));this.ui.policyValueInput.val(s.a.isNaN(t)?"":t),s.a.isNaN(t)&&(t=0),e.set("value","all"===e.scope?null:t);var n=this.model.shouldShowPolicyWarning(this.leafMediaType,t);this.ui.policyWarning.toggleClass("hidden",!n)},
onPolicyUnwatchedChange:function(e){this.model.get("policy").set("unwatched",this.ui.policyUnwatchedInput.prop("checked"))},onPolicyScopeChange:function(e){var t=this.model.get("policy"),n=this.ui.policyScopeInput.prop("checked")?this.ui.policyScopeInput.val():"all";t.set("scope",n),this.updatePolicyValue()},onPolicyValueChange:function(e){this.updatePolicyValue()}});t.a=c},function(e,t,n){"use strict";var i=n(3008),a=n.n(i),r=n(259),s=n(57),o=n(1894),l=n(1895),u=n(1892),c=s.a.extend({
mixins:[r.a],name:"syncModal",className:"convert-modal modal fade",template:a.a,regions:{bodyRegion:".modal-body-region"},initialize:function(e){s.a.prototype.initialize.apply(this,arguments),this.device=this.model?this.model.device:e.device},initialState:"form",states:{form:{nextState:"success",onEnter:function(){this.bodyRegion.show(new o.a({model:this.model,item:this.options.item,items:this.options.items,device:this.device})),this.listenForStateRequests()}},success:{onEnter:function(){
this.model?this.hide():(this.bodyRegion.show(new l.a({server:this.options.item.server,device:this.device})),this.listenForStateRequests())}},error:{onEnter:function(){this.bodyRegion.show(new u.a),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){s.a.prototype.onRender.apply(this,arguments),
this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.a=c},function(e,t,n){"use strict";var i=n(3022),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(12),u=n(57),c=u.a.extend({name:"homeWarningModal",template:a.a,events:s.a.extend({"click .server-settings-btn":"onServerSettingsClick"},u.a.prototype.events),initialize:function(e){u.a.prototype.initialize.apply(this,arguments),this.type=e.type},serializeData:function(){var e
;return e="pin"===this.type?n.i(o.default)("You've added a PIN restriction"):n.i(o.default)("You've joined a Plex Home"),{intro:e}},onServerSettingsClick:function(e){e.preventDefault(),this.hide(),l.a.trigger("navigate","serverSettings")}});t.a=c},function(e,t,n){"use strict";var i=n(3026),a=n.n(i),r=n(15),s=n(13),o=n(164),l=r.a.ItemView.extend({tagName:"li",className:"user-select-list-item",template:a.a,ui:{container:".user-select-container",poster:".user-poster"},events:{"click a":"onClick"},
initialize:function(e){this.disabled=e.disabled,this.posterImage=new o.a({model:this.model,type:"friend",width:80});var t=s.a("appModel"),n=t.get("primaryServer");n&&n.supports("imageFilters")&&(this.backgroundImage=new o.a({model:this.model,type:"friend",width:120,background:!0,filters:{blur:20,opacity:50,background:"000000"}}),this.backgroundImage.placeholderClass=!1)},serializeData:function(){return{disabled:this.disabled}},bindings:{".username":{modelAttribute:"title"},".protected-icon":{
modelAttribute:"protected",autohide:!0,manual:!0},".admin-icon":{modelAttribute:"admin",autohide:!0,manual:!0}},onRender:function(){this.posterImage.setElement(this.ui.poster),this.backgroundImage&&this.backgroundImage.setElement(this.ui.container)},onClose:function(){this.posterImage.close(),this.backgroundImage&&this.backgroundImage.close()},onClick:function(e){e.preventDefault(),this.trigger("selectUser",this.model)}});t.a=l},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(52),l=n(15),u=n(13),c=n(95),d=n(12),h=n(40),p=n(380),f=n(162),g=n(299),m=n(23),v=n(485),y=n(3095),b=(n.n(y),l.a.Layout.extend({events:{fullscreenchange:"onFullscreenChange",webkitfullscreenchange:"onFullscreenChange",mousewheel:"onMouseWheel"},shortcutListeners:function(){return{"shortcut:playPause":this.getListenerFor("playPause"),"shortcut:play":this.getListenerFor("play"),"shortcut:pause":this.getListenerFor("pause"),
"shortcut:seekBackward":this.getListenerFor("seekBackward"),"shortcut:seekForward":this.getListenerFor("seekForward"),"shortcut:stepBackward":this.getListenerFor("stepBackward"),"shortcut:stepForward":this.getListenerFor("stepForward"),"shortcut:decreaseVolume":this.getListenerFor("decreaseVolume"),"shortcut:increaseVolume":this.getListenerFor("increaseVolume"),"shortcut:skipPrevious":this.getListenerFor("skipPrevious"),"shortcut:skipNext":this.getListenerFor("skipNext"),
"shortcut:toggleFullScreen":this.getListenerFor("toggleFullScreen"),"shortcut:stop":this.getListenerFor("stop")}},initialize:function(e){var t=e.playerModelClass||v.a;if(this.controller=e.controller,this.isNew=!e.controller,this.type=e.type,this.media=e.media,this.offset=e.offset,this.autoplay=e.autoplay,this.$el.addClass(this.type),this.isNew){var i=n.i(u.a)("appModel"),r=i.get("settings"),o=i.get("primaryPlayer");this.controller=g.a.getInstance(this.type),
!this.model&&this.playQueue&&(this.model=this.playQueue.get("selectedItem")),this.playQueue=e.playQueue,this.metadataItem=this.model.get("metadataItem"),this.playerModel=new t({playQueueItem:this.model,metadataItem:this.metadataItem,playQueue:this.playQueue,volume:this.volumeSettingsKey?r.get(this.volumeSettingsKey):r.defaults.volume,friendlyName:o?o.get("friendlyName"):null})}else this.model=this.controller.model.get("playQueueItem"),this.metadataItem=this.model.get("metadataItem"),
this.playQueue=this.controller.model.get("playQueue"),this.playerModel=this.controller.model;this.throttledPersistPlayQueue=a.a.throttle(a.a.bind(this.persistPlayQueue,this),1e3),this.$document=s()(document),this.$document.on("MSFullscreenChange",a.a.bind(this.onFullscreenChange,this)),this.$document.on("mozfullscreenchange",a.a.bind(this.onFullscreenChange,this))},addListeners:function(){var e=n.i(u.a)("appModel");this.listenTo(o.a.history,"route",this.onRouteChange),
this.listenTo(e,"change:primaryPlayer",this.onPrimaryPlayerChange),this.listenTo(this.playerModel,{"change:playQueueItem":this.onPlayerPlayQueueItemChange,"change:state":this.onPlayerStateChange,"change:volume":this.onPlayerVolumeChange,"change:finished":this.onPlayerFinishedChange,"change:position":this.onPlayerPositionChange}),this.controlsView&&this.listenTo(this.controlsView,{play:this.getListenerFor("play"),pause:this.getListenerFor("pause"),
"change:position":this.getListenerFor("setPosition"),"change:volume":this.getListenerFor("setVolume"),enterFullscreen:this.enterFullscreen,exitFullscreen:this.exitFullscreen,previous:this.getListenerFor("skipPrevious"),next:this.getListenerFor("skipNext"),skip:this.getListenerFor("skipTo"),remove:this.getListenerFor("removeItem"),move:this.getListenerFor("moveItem"),minimize:this.getListenerFor("minimize"),maximize:this.getListenerFor("maximize"),
toggleShuffle:this.getListenerFor("toggleShuffle"),nextRepeat:this.getListenerFor("nextRepeat"),stop:this.getListenerFor("stop"),"navigate:grandparent":this.getListenerFor("navigateToGrandparent"),"navigate:item":this.getListenerFor("navigateToItem")}),this.listenTo(d.a,a.a.result(this,"shortcutListeners"))},startPlayback:function(e){return e||(e={}),this.controller.load({model:this.playerModel,autoplay:e.autoplay,silent:this.isNowPlaying(),offset:e.offset})},continuePlayback:function(){},
updatePageTitle:function(){var e=this.playerModel.get("state");if(e===h.a.states.STOPPED)return void(document.title="Plex");var t,i=this.playerModel.get("metadataItem"),a=i.get("type");if("episode"===a){var r=n.i(f.a)({seasonIndex:i.get("parentIndex"),episodeIndex:i.get("index"),date:i.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "});t=i.get("grandparentTitle")+" - "+r}else if("track"===a){var s=i.get("originalTitle")||i.get("grandparentTitle")
;t=s?s+" - "+i.get("title"):i.get("title")}else t=i.get("title");e===h.a.states.PLAYING||e===h.a.states.BUFFERING?document.title="\u25b6 "+t:document.title=t},getListenerFor:function(e){return a.a.isFunction(this[e])?this[e]:a.a.bind(this.controller[e],this.controller)},minimize:function(){this.isSwitchingPlayers=!0,m.a.execute("playMedia",{item:this.model,controller:this.controller,useMiniPlayer:!0,isSwitchingPlayers:!0})},maximize:function(){this.isSwitchingPlayers=!0,m.a.execute("playMedia",{
item:this.model,controller:this.controller,isSwitchingPlayers:!0})},enterFullscreen:function(){if(n.i(p.a)())c.a.set("main.fullscreen",!0);else{(this.el.requestFullScreen||this.el.webkitRequestFullScreen||this.el.mozRequestFullScreen||this.el.msRequestFullscreen).call(this.el)}},exitFullscreen:function(){if(n.i(p.a)())c.a.set("main.fullscreen",!1);else{(document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document)}},
toggleFullScreen:function(){this.playerModel.get("showEnterFullscreen")?this.enterFullscreen():this.exitFullscreen()},stop:function(){this.controller.stop({},this)},navigateToGrandparent:function(){var e=this.getNavigationGrandparentKey();this.navigateToLibraryItem(e)||this.navigateToChannelItem()},navigateToItem:function(){var e=this.getNavigationKey();this.navigateToLibraryItem(e)||this.navigateToChannelItem(e)},navigateToLibraryItem:function(e){
return!(!e||!this.metadataItem.get("isLibraryItem"))&&(d.a.trigger("navigate","details",{serverID:this.model.server.id,key:e}),!0)},navigateToChannelItem:function(e){var t=this.model.channel;return!!t&&(d.a.trigger("navigate","channel",{serverID:this.model.server.id,channelID:t.id?t.id:t.get("identifier"),key:e}),!0)},getNavigationGrandparentKey:function(){var e=this.metadataItem.get("grandparentKey");return e?e:this.metadataItem.get("parentKey")},getNavigationKey:function(){
return this.metadataItem.get("key")},isNowPlaying:function(){var e=n.i(u.a)("appModel"),t=e.get("primaryPlayer");return!!t&&!!t.get("nowPlaying").get(this.metadataItem.id)},canAutoplay:function(e){return e!==h.a.states.PAUSED},persistPlayQueue:function(){var e=this.playerModel;if(e&&this.playQueue.get("playQueueID")){if(e.get("state")===h.a.states.STOPPED)return void m.a.execute("persistPlayQueue",null);m.a.execute("persistPlayQueue",{playQueue:this.playQueue,position:e.get("position"),
autoplay:!1})}},onRender:function(){this.isNew?this.startPlayback({autoplay:this.canAutoplay()&&this.autoplay,offset:this.offset}):this.continuePlayback()},onClose:function(){if(this.$document.off("MSFullscreenChange"),this.$document.off("mozfullscreenchange"),!this.isSwitchingPlayers&&(this.controller.stop(),!this.controller.model)){var e=this.metadataItem.server.get("playQueueManager"),t=e.getFor(this.metadataItem);t===this.playQueue&&e.remove(t.get("mediaType"))}},onRouteChange:function(){
this.isMini||d.a.trigger("hide:player",this)},onPrimaryPlayerChange:function(e,t){var n=this.playerModel.get("state"),i=this.playerModel.get("position"),a=this.controller.mediaElement;this.playerModel.set("ready",!1),this.playerModel.set("friendlyName",t?t.get("friendlyName"):null),this.controller.stop({isSwitchingPlayers:!0}),this.controller=g.a.getInstance(this.type),this.stopListening(),this.addListeners(),this.startPlayback({offset:i,autoplay:this.canAutoplay(n),mediaElement:a})},
onPlayerPlayQueueItemChange:function(e,t){this.playQueue.set("selectedItem",t),this.model=this.playQueue.get("selectedItem"),this.metadataItem=this.model.get("metadataItem"),this.updatePageTitle()},onPlayerStateChange:function(e,t){this.updatePageTitle(),this.persistPlayQueue()},onPlayerVolumeChange:function(e,t){if(this.volumeSettingsKey){n.i(u.a)("appModel").get("settings").save(this.volumeSettingsKey,t)}},onPlayerFinishedChange:function(e,t){if(t){var n=h.a.getElementByType(this.type)
;this.model.server.get("playQueueManager").remove(n),d.a.trigger("hide:player",this)}},onPlayerPositionChange:function(e,t){this.throttledPersistPlayQueue()},onFullscreenChange:function(){var e=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement);this.playerModel.set("showEnterFullscreen",!e),this.playerModel.set("showExitFullscreen",e)},onMouseWheel:function(e){
e.deltaY>0?d.a.trigger("shortcut:increaseVolume"):e.deltaY<0&&d.a.trigger("shortcut:decreaseVolume")}}));t.a=b},function(e,t,n){"use strict";var i=n(3044),a=n.n(i),r=n(2),s=n.n(r),o=n(409),l=o.a.extend({className:function(){return"player-seek-bar player-slider"+(this.model.get("canSeek")?"":" disabled")},template:a.a,ui:{thumb:".player-slider-thumb",track:".player-slider-track",progress:".player-slider-progress",buffer:".player-slider-buffer"},modelEvents:{"change:position":"onPositionChange",
"change:startBuffer":"onBufferChange","change:endBuffer":"onBufferChange","change:canSeek":"onCanSeekChange"},events:s.a.extend({mouseenter:"onMouseMove",mousemove:"onMouseMove",mouseleave:"onMouseLeave"},o.a.prototype.events),normalizeValue:function(e){var t=this.model.get("duration");return e=t?e/t*100:0,e=Math.min(Math.max(e,0),100)},getValueForPosition:function(e){var t=this.model.get("duration"),n=this.ui.track,i=e-n.offset().left,a=i/n.width();return a=Math.min(Math.max(a,0),1),a*=t,
Math.round(a)},setValue:function(e){this.model.get("canSeek")&&o.a.prototype.setValue.apply(this,arguments)},displayValue:function(e){e=this.normalizeValue(e),this.dragging&&(e>=100||!this.model.get("canSeek"))||o.a.prototype.displayValue.call(this,e)},onRender:function(){this.displayValue(this.model.get("position"))},onPositionChange:function(e,t){this.displayValue(t)},onBufferChange:function(e,t){var n=this.model.get("endBuffer"),i=this.normalizeValue(n);this.ui.buffer.css("width",i+"%")},
onCanSeekChange:function(e,t){this.$el.toggleClass("disabled",!t)},onMouseMove:function(e){var t=e.pageX,n=this.getValueForPosition(t);this.trigger("hover",{position:t,time:n})},onMouseLeave:function(e){this.trigger("hover",!1)}});t.a=l},function(e,t,n){"use strict";var i=n(3064),a=n.n(i),r=n(15),s=n(13),o=n(12),l=n(864),u=n(1859),c=r.a.Layout.extend({className:"friends-container col-sm-8 col-md-9",template:a.a,ui:{inviteListHeader:".invite-list-header",friendListHeader:".friend-list-header",
pendingListHeader:".pending-list-header"},regions:{inviteList:".invite-list-container",friendList:".friend-list-container",pendingList:".pending-list-container"},initialize:function(){var e=s.a("appModel"),t=e.get("user");if(t.get("restricted"))return void o.a.trigger("navigate","users",{subset:"home"});this.collection=t.get("desktop").get("friends").filterByUnrestricted(),this.invites=t.get("desktop").get("invites").filterByFriends(),
this.sentInvites=t.get("desktop").get("sentInvites").filterByFriends(),this.addListeners()},addListeners:function(){this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.sentInvites,"reset add remove",this.onInvitesChange)},updateHeaders:function(){var e=!!this.invites.length,t=!!this.sentInvites.length,n=e||t;this.ui.friendListHeader.toggleClass("hidden",!n),this.ui.inviteListHeader.toggleClass("hidden",!e),this.ui.pendingListHeader.toggleClass("hidden",!t),
this.ui.friendListHeader.toggleClass("top",!e),this.ui.inviteListHeader.toggleClass("top",e)},onRender:function(){this.friendList.show(new u.a({collection:this.collection})),this.inviteList.show(new l.a({collection:this.invites})),this.pendingList.show(new l.a({collection:this.sentInvites})),this.updateHeaders()},onClose:function(){this.collection.destroy&&this.collection.destroy(),this.invites.destroy(),this.sentInvites.destroy()},onInvitesChange:function(){this.updateHeaders()}});t.a=c
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=o()(e,["className","children"]);return r()("div",{className:t,style:i},void 0,n)}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1);n.n(l);i.defaultProps={flexGrow:1,flexShrink:0},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=o()(e,["className","children"]);return r()("div",{className:c()(h.a.grid,t),style:i},void 0,n)}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=(n.n(l),
n(30)),c=n.n(u),d=n(2542),h=n.n(d);i.defaultProps={flexDirection:"row",justifyContent:"space-between",alignItems:"center",alignContent:"center"},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(6),h=n.n(d),p=n(1),f=(n.n(p),n(27)),g=n(278),m=n(165),v=n(2819),y=n.n(v),b=n(2821),S=n.n(b),I=n(2820),w=n.n(I),M={position:"absolute",width:"100%",height:"100%"},C=h()({},M,{background:"url("+y.a+")",zIndex:2}),D={opacity:30,format:"png",
background:"36383b"},P=a()("div",{style:C}),T=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.url,i=e.allowPreset,r=e.allowLightPreset,s=window.innerWidth,o=window.innerHeight,l=s/o,u=l>1?640:640*l,c=l>1?640/l:640,d=Math.max(s/u,o/c),p=Math.round(100/d),f=void 0;return!n&&i&&(f=r?S.a:w.a),
a()("div",{},void 0,a()(m.a,{serverEntityID:t,url:n,src:f,width:u,height:c,minSize:!0,upscale:!0,style:M,background:!0,transition:!0,transitionProps:g.a,filters:f?null:h()({},D,{blur:p}),allowPixelRatioSize:!1}),P)},t}(p.Component);t.a=T},function(e,t,n){"use strict";function i(e){var t=e.transitionProps,n=o()(e,["transitionProps"]);return u.a.createElement(d.a,r()({style:f,background:!0,minSize:!0,transition:!0,transitionProps:r()({className:p.a.imageContainer},c.a,t)},n))}
var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(278),d=n(165),h=n(2578),p=n.n(h),f={width:"100%",height:"100%"};t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=o()(e,["children"]);return u.a.createElement(c.a,n,r()(d.a,{className:p.a.modalScroller,innerClassName:p.a.innerModalBody},void 0,t))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(111),d=n(75),h=n(2589),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.iconClassName,n=e.messageClassName,i=e.kind,a=e.message,s=o()(e,["iconClassName","messageClassName","kind","message"]);return u.a.createElement(f.a,s,r()(p.a,{name:"plex-icon-alert-560",className:d()(m.a[i],t)}),r()("div",{className:n},void 0,a))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(30),d=n.n(c),h=n(22),p=n(29),f=n(879),g=n(2590),m=n.n(g);i.defaultProps={iconClassName:m.a.icon,messageClassName:m.a.message,kind:h.b.DEFAULT},t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.uri,i=n.replace(/^https?\:\/\//,"");return r()("div",{className:t},void 0,i)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(u.a)(),n.i(c.a)(),function(e,t){return{machineIdentifier:e.machineIdentifier,isRefreshing:!!t}})}function a(e){return s.a.createElement(d.a,e)}var r=n(1),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(54)),c=n(401),d=n(2024);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict"
;function i(){return n.i(h.createSelector)(n.i(p.a)(),function(e){return{isRefreshing:!!e}})}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(1),d=(n.n(c),n(14)),h=n(8),p=(n.n(h),n(401)),f=n(88),g=n(220),m={fetchProviders:f.d,repopulatePage:g.a},v=function(e){function t(){var n,i,a;r()(this,t);for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return n=i=o()(this,e.call.apply(e,[this].concat(l))),i._repopulateProgramGuide=function(){var e=i.props,t=e.serverEntityID
;e.isRefreshing&&i.props.fetchProviders({serverEntityID:t}),i.props.repopulatePage({serverEntityID:t}),i._setRepopulateTimeout()},a=n,o()(i,a)}return u()(t,e),t.prototype.componentWillMount=function(){this._setRepopulateTimeout()},t.prototype.componentWillReceiveProps=function(e){e.isRefreshing!==this.props.isRefreshing&&this._setRepopulateTimeout()},t.prototype.componentWillUnmount=function(){this._clearRepopulateTimeout()},t.prototype._setRepopulateTimeout=function(){
this._clearRepopulateTimeout();var e=15e3;this.props.isRefreshing||(e=18e5*Math.ceil(Date.now()/18e5)-Date.now()),this._repopulateTimeoutID=setTimeout(this._repopulateProgramGuide,e)},t.prototype._clearRepopulateTimeout=function(){this._repopulateTimeoutID&&clearTimeout(this._repopulateTimeoutID)},t.prototype.render=function(){return null},t}(c.Component);t.a=n.i(d.b)(i,m)(v)},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=(n.n(p),n(13)),g=n(46),m=n(68),v=n(27),y=n(147),b=n(2025),S=n(2606),I=n.n(S),w=function(e){function t(){var i,a,r;l()(this,t);for(var o=arguments.length,u=Array(o),d=0;d<o;d++)u[d]=arguments[d];return i=a=c()(this,e.call.apply(e,[this].concat(u))),a.onModalClose=function(){n.i(f.a)("metrics").trackClick(s()({},a.props.metricsProperties,{page:g.p,action:m.g})),a.props.onModalClose()},r=i,c()(a,r)}
return h()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.isOpen,r=e.metricsProperties;return a()(y.a,{className:I.a.modal,isOpen:i,metricsPage:g.p,metricsProperties:r,preventCloseOnBackdropPress:!0,onModalClose:this.onModalClose},void 0,a()(b.a,{serverEntityID:t,dvrID:n,onModalClose:this.onModalClose}))},t}(p.Component);t.a=w},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(14)),p=n(4),f=n(22),g=n(89),m=n(51),v=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onNextStepPress=function(){i.props.dvrSetupNextStep({dvrID:i.props.dvrID})},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){return a()(m.a,{kind:f.b.PRIMARY,size:f.d.MEDIUM,
isDisabled:this.props.isDisabled,onPress:this.onNextStepPress},void 0,n.i(p.default)("Continue"))},t}(d.Component);v.defaultProps={isDisabled:!1},t.a=n.i(h.b)(null,{dvrSetupNextStep:g.j})(v)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.networks,a=i.reduce(function(e,t){var n;return e.push((n={},n[t.key]=t.title,n)),e},[{"":n.i(s.default)("Select Network")}]);return r()("div",{className:t},void 0,r()(l.a,{name:"network",labelText:"Network",initialValue:"",values:a}))}
var a=n(3),r=n.n(a),s=n(4),o=n(1),l=(n.n(o),n(417));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.prefs;return o()("div",{className:t},void 0,i.map(function(e){var t=e.id,i=e.value,a=e.enumValues,s=e.label,o=Array.isArray(a)?[{label:n.i(l.default)("Select {label}",{label:s}),value:""}].concat(a):void 0;return c.a.createElement(d.a,r()({key:t},e,{value:null==i?"":i,enumValues:o}))}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(4),u=n(1),c=n.n(u),d=n(418);t.a=i
},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(76),f=n.n(p),g=n(25),m=n(413),v=n(570),y=n(881),b=n(2609),S=n.n(b),I=parseInt(f.a.dvrSetupImageWidth,10),w=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onSelectDevicePress=function(){i.props.onSelectDevice(i.props.deviceID)},a=n,l()(i,a)}
return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,i=e.serverEntityID,r=e.model,s=e.uri,o=e.thumb,l=e.channelCount,u=e.isSelectable,c=e.isSelected,d=e.includeUri,p=e.includeChannelCount,f=void 0;return f=1===l?n.i(h.default)("1 channel"):l>1?n.i(h.default)("{channelCount} channels",{channelCount:l}):n.i(h.default)("No channels"),a()("div",{className:t},void 0,u&&a()(g.a,{onPress:this.onSelectDevicePress},void 0,a()("div",{className:S.a.deviceImageContainer
},void 0,a()(v.a,{serverEntityID:i,model:r,thumb:o,width:I,height:100}),c&&a()(m.a,{className:S.a.selectButton,component:"div",title:r,isSelected:!0,isDisabled:!0}))),!u&&a()(v.a,{serverEntityID:i,model:r,thumb:o,width:I,height:100}),a()("div",{className:S.a.details},void 0,a()("div",{className:S.a.model},void 0,r),d&&a()(y.a,{className:S.a.uri,uri:s}),p&&a()("div",{className:S.a.channelCount},void 0,f)))},t}(d.Component);w.defaultProps={includeUri:!1,includeChannelCount:!1,isSelectable:!1},
t.a=w},function(e,t,n){"use strict";function i(e){return p()(e).sort(y.a).reduce(function(t,n){var i;return t.push((i={},i[n]=e[n],i)),t},[{"":n.i(v.default)("Select Channel")}])}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(70),p=n.n(h),f=n(1),g=(n.n(f),n(30)),m=n.n(g),v=n(4),y=n(509),b=n(22),S=n(410),I=n(132),w=n(414),M=n(194),C=n(2618),D=n.n(C),P=function(e){function t(n,i){o()(this,t);var a=u()(this,e.call(this,n,i));return a.onSelectPress=function(e){a.setState({
showSelectOptions:!0})},a.onEnabledChange=function(e){a.setState({enabled:e},function(){a.props.onChange({enabled:e,lineupIdentifier:a.state.lineupIdentifier})})},a.onLineupChannelChange=function(e){a.setState({lineupIdentifier:e},function(){a.props.onChange({enabled:a.state.enabled,lineupIdentifier:e})})},a.state={enabled:n.initialValue.enabled,lineupIdentifier:n.initialValue.lineupIdentifier,showSelectOptions:!1},a}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){
var t=this.state,n=t.enabled,i=t.lineupIdentifier,a=e.value,r=a.enabled,s=a.lineupIdentifier;n===r&&i===s||this.setState(this.props.value)},t.prototype.shouldComponentUpdate=function(e,t){
return t.enabled!==this.state.enabled||(t.lineupIdentifier!==this.state.lineupIdentifier||(t.showSelectOptions!==this.state.showSelectOptions||(e.deviceIdentifier!==this.props.deviceIdentifier||(e.channelName!==this.props.channelName||(e.initialValue.enabled!==this.props.initialValue.enabled||(e.initialValue.lineupIdentifier!==this.props.initialValue.lineupIdentifier||(e.value.enabled!==this.props.value.enabled||(e.value.lineupIdentifier!==this.props.value.lineupIdentifier||e.lineupChannels!==this.props.lineupChannels))))))))
},t.prototype.render=function(){var e,t=this.props,a=t.name,s=t.deviceIdentifier,o=t.channelName,l=t.drm,u=t.isChannelMissing,c=t.lineupChannels,d=this.state,h=d.enabled,p=d.lineupIdentifier;return u?null:r()("div",{className:D.a.channelMapping},void 0,r()("div",{className:D.a.deviceInfo},void 0,r()("div",{className:D.a.channelEnabled},void 0,!l&&r()(w.a,{name:a+"Check",value:h,onChange:this.onEnabledChange})),r()("label",{className:m()(D.a.deviceIdentifier,!h&&D.a.mappingDisabled),
htmlFor:a+"Check"},void 0,s),r()("div",{className:m()(D.a.channelName,!h&&D.a.mappingDisabled)},void 0,o)),l?r()("div",{className:D.a.drmChannel},void 0,r()(S.a,{className:D.a.drmChannelBadge},void 0,n.i(v.default)("Protected"))):r()("div",{className:D.a.epgChannel},void 0,r()(M.a,{name:a+"Select",value:p,values:this.state.showSelectOptions?i(c):[(e={},e[p]=c[p],e)],size:b.d.SMALL,isDisabled:!h,onMouseDown:this.onSelectPress,onTouchStart:this.onSelectPress,onChange:this.onLineupChannelChange})))
},t}(f.Component);f.PropTypes.shape({enabled:f.PropTypes.bool.isRequired,lineupIdentifier:f.PropTypes.string});t.a=n.i(I.a)(P)},function(e,t,n){"use strict";function i(e){var t=e.allChannelMappingsEnabled,i=e.allChannelMappingsDisabled,a=e.onAllChannelMappingsEnabledChange,s=null;return t?s=!0:i&&(s=!1),r()("div",{className:c.a.container},void 0,r()("div",{className:c.a.deviceChannels},void 0,r()(l.a,{name:"toggleAll",value:s,onChange:a}),r()("div",{className:c.a.deviceChannelsPadding
}),r()("div",{},void 0,n.i(o.default)("Device Channels"))),r()("div",{className:c.a.guideChannels},void 0,n.i(o.default)("Guide Channels")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(414),u=n(2620),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){u()(this,n);var a=d()(this,t.call(this,e,i));return a.onFormStateChange=function(e){var t=!0,n=!0;o()(e).forEach(function(i){e[i].value.enabled?n=!1:t=!1}),a.setState({formState:e,
allChannelMappingsEnabled:t,allChannelMappingsDisabled:n})},a.onAllChannelMappingsEnabledChange=function(e){a.setState(function(t){var n={};return o()(t.formState).forEach(function(i){var a=t.formState[i].value;a.enable===e?n[i]=t.formState[i]:n[i]=r()({},t.formState[i],{value:{enabled:e,lineupIdentifier:a.lineupIdentifier}})}),{formState:n,allChannelMappingsEnabled:e,allChannelMappingsDisabled:!e}})},a.state={formState:{},allChannelMappingsEnabled:!1,allChannelMappingsDisabled:!1},a}
return p()(n,t),n.prototype.render=function(){var t=this.state,n=t.allChannelMappingsEnabled,i=t.allChannelMappingsDisabled;return g.a.createElement(e,r()({formState:this.state.formState,allChannelMappingsEnabled:n,allChannelMappingsDisabled:i,onFormStateChange:this.onFormStateChange,onAllChannelMappingsEnabledChange:this.onAllChannelMappingsEnabledChange},this.props))},n}(f.Component);return t.displayName="DeviceChannelMappingsForm("+n.i(m.a)(e)+")",t.WrappedComponent=e,t}
var a=n(6),r=n.n(a),s=n(70),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(217);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(27)),p=n(2043),f={visibility:"hidden"},g={visibility:"visible"},m=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onListReady=function(){++a._readyCount===a._initialCount&&a.setState({isReady:!0})},a.state={isReady:!1},
a._readyCount=0,a}return c()(t,e),t.prototype.componentWillMount=function(){this._initialCount=this.props.hubEntityIDs.length},t.prototype.componentWillReceiveProps=function(e){var t=e.hubEntityIDs.length,n=this.props.hubEntityIDs.length;this.state.isReady||t===n||(this._initialCount=t,this._readyCount===t&&this.setState({isReady:!0}))},t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){
var e=this,t=this.props,n=t.className,i=t.serverEntityID,r=t.providerEntityID,s=t.hubEntityIDs,o=t.columnAdjustment,l=this.state.isReady;return a()("div",{className:n,style:l?g:f},void 0,s.map(function(t){return a()(p.a,{serverEntityID:i,providerEntityID:r,hubEntityID:t,columnAdjustment:o,onListReady:e.onListReady},t)}))},t}(d.Component);t.a=m},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.metadataItemEntityIDs,l=e.containerKey,g=e.listType,m=e.listContext,v=e.columnAdjustment,y=e.populatedRange,b=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","containerKey","listType","listContext","columnAdjustment","populatedRange"]),S=n.i(c.a)(g,m,{providerEntityID:i});return u.a.createElement(p.a,r()({},b,{containerKey:l,listType:g,listContext:m,
keyPropName:"metadataItemEntityID",items:s,itemsOffset:y.start,layout:n.i(d.a)(g,m,v,S.length),cellRenderer:n.i(h.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,containerKey:l,listType:g,listContext:m,titleComponents:S},f.a)}))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=(n(539),n(35),n(276)),d=n(609),h=n(135),p=n(573),f=n(422);t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e,t){return t.listContext},function(e,t){
return t.cellHeight},n.i(m.a)(),I.a,w.a,n.i(v.a)(),n.i(y.a)(),n.i(b.a)(),n.i(S.a)(),M.a,function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r=arguments[4],s=arguments[5],o=arguments[6],l=arguments[7],u=arguments[8],c=arguments[9],d=t-2*R,h=n.i(k.a)(null,d,s,i,e);return{metadataKey:i.key,grandparentKey:i.grandparentKey,type:s,index:i.index,title:i.title,summary:i.summary,isFolder:i.isFolder,selectionID:i.entityID,selectionType:l,
activeSelectionType:c.activeSelectionType,isSelected:u,route:o,showLink:!!o,showEdit:n.i(A.b)(a,r,i),showSelect:n.i(A.c)(a,r,i),showMore:!i.isFolder,imageWidth:h.width,imageHeight:h.height,imageUrl:h.url}})}function a(e,t){var i=t.serverEntityID,a=t.metadataListEntityID,r=t.metadataItemEntityID,s=t.metricsPage;return{onEditPress:function(){e(n.i(D.editMetadataItem)({serverEntityID:i,metadataItemEntityID:r,metricsPage:s}))},onSelectItem:function(t){e(n.i(C.a)(h()({metadataListEntityID:a,id:r
},t)))},onDeselectItem:function(t){e(n.i(C.b)(h()({metadataListEntityID:a},t)))}}}var r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(6),h=n.n(d),p=n(1),f=n.n(p),g=n(8),m=(n.n(g),n(24)),v=n(549),y=n(548),b=n(403),S=n(402),I=n(47),w=n(45),M=n(109),C=n(130),D=n(107),P=n(76),T=n.n(P),x=n(608),E=n(277),A=n(235),k=n(440),L=n(129),_=n(2049),N=n(2050),R=parseInt(T.a.summaryCellPadding,10),O=n.i(x.a)(_.a),j=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}
return c()(t,e),t.prototype.render=function(){return this.props.metadataKey?this.props.showSelect?f.a.createElement(O,this.props):f.a.createElement(_.a,this.props):f.a.createElement(N.a,this.props)},t}(p.Component);t.a=n.i(L.a)(i,a,E.a)(j)},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),n.i(u.a)(),n.i(h.a)(),n.i(p.a)(),f.a,function(e){
var t=e.machineIdentifier,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[2],a=arguments[3],r=arguments[4];return{machineIdentifier:t,metadataKey:n.key,type:n.type,title:n.title,thumb:n.thumb,selectionType:i,activeSelectionType:r.activeSelectionType,isSelected:a}})}function a(e,t){return{onSelectItem:function(i){e(n.i(d.a)(s()({metadataListEntityID:t.metadataListEntityID},i)))},onDeselectItem:function(i){e(n.i(d.b)(s()({metadataListEntityID:t.metadataListEntityID},i)))}}}
var r=n(6),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(24)),c=n(54),d=n(130),h=n(403),p=n(402),f=n(109),g=n(2060);t.a=n.i(o.b)(i,a)(g.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(122)),p=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(e){i.props.onStreamSelect(i.props.stream.id),
i.props.onMenuClose()},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.stream;return a()(h.a,{isSelected:!!n.selected,onPress:this.onPress},void 0,t)},t}(d.Component);t.a=p},function(e,t,n){"use strict";function i(e){return"show"!==e&&"season"!==e}function a(e){var t=(e.type,e.title),i=e.leafCount;return e.markUnwatched?1===i?n.i(f.default)('Are you sure you want to mark 1 episode in "{showTitle}" as unwatched?',{showTitle:t
}):n.i(f.default)('Are you sure you want to mark {numEpisodes} episodes in "{showTitle}" as unwatched?',{numEpisodes:i,showTitle:t}):1===i?n.i(f.default)('Are you sure you want to mark 1 episode in "{showTitle}" as watched?',{showTitle:t}):n.i(f.default)('Are you sure you want to mark {numEpisodes} episodes in "{showTitle}" as watched?',{numEpisodes:i,showTitle:t})}var r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=(n.n(p),n(4)),g=n(46),m=n(195),v=function(e){
function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this._checkAutoConfirm()},t.prototype.componentDidUpdate=function(){this._checkAutoConfirm()},t.prototype._checkAutoConfirm=function(){i(this.props.type)&&this.props.isOpen&&this.props.onConfirm()},t.prototype.render=function(){var e=this.props,t=e.isOpen,r=e.type,o=e.markUnwatched,l=e.onConfirm,u=e.onCancel;return i(r)?null:s()(m.a,{isOpen:t,metricsPage:o?g.v:g.w,
title:o?n.i(f.default)("Mark Unwatched"):n.i(f.default)("Mark Watched"),message:a(this.props),onConfirm:l,onCancel:u})},t}(p.Component);t.a=v},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.metadataItemEntityID,a=e.onRecordingModify,s=e.onModalClose,l=u()(e,["isOpen","metricsProperties","metadataItemEntityID","onRecordingModify","onModalClose"]);return o()(p.a,{isOpen:t,metricsPage:h.c,metricsProperties:n,onModalClose:s},void 0,d.a.createElement(f.a,r()({
metadataItemEntityID:i,onRecordingModify:a,onModalClose:s},l)))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(46),p=n(147),f=n(2069);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.name,n=(e.initialValue,e.labelText),i=(e.showErrors,e.errors,e.validations,u()(e,["name","initialValue","labelText","showErrors","errors","validations"]));return o()("div",{},void 0,o()(f.a,{name:t},void 0,n),d.a.createElement(g.a,r()({name:t,size:h.d.SMALL},i)))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(22),p=n(132),f=n(121),g=n(194);t.a=n.i(p.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type,i=e.width,a=e.height,s=e.isFolder;return r()(u.a,{className:l()(t,d.a.placeholderIcon),type:n,width:i,height:a,isFolder:s})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n.n(o),u=n(2083),c=n(2646),d=n.n(c);t.a=i},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(2650)),p=n.n(h),f=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.state={progress:n.progress},a}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){this.setState({progress:e.progress})},t.prototype.render=function(){var e=this.props.className,t=this.state.progress;return a()("div",{className:e},void 0,a()("div",{className:p.a.progressTrack}),a()("div",{style:{
transform:"translate3d(-"+(100-t)+"%, 0, 0)"},className:p.a.progressBar}))},t}(d.Component);f.defaultProps={progress:p.a.progress},t.a=f},function(e,t,n){"use strict";function i(e){var t=e.beginsAt,i=e.endsAt,a=e.channel,r=e.showChannel,s=e.showFullTime,o=e.timeFormat;if(!t)return n.i(p.default)("No upcoming airings");if(n.i(m.a)(t,i)){var l=i-Date.now()/1e3;return l<=60?n.i(p.default)("About to end"):n.i(b.a)(l)}if(n.i(f.a)(t)&&n.i(g.a)(t,{minutes:60})){var u=1e3*t-Date.now()
;if(u<=D)return r&&a?n.i(p.default)("Starting now on {channel}",{channel:a}):n.i(p.default)("Starting now");var c=n.i(S.a)(u);return r&&a?n.i(p.default)("Starting in {duration} on {channel}",{duration:c,channel:a}):n.i(p.default)("Starting in {duration}",{duration:c})}return(s?v.a:y.a)(t,r&&a,{timeFormat:o})}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),
n(4)),f=n(739),g=n(740),m=n(504),v=n(736),y=n(1292),b=n(311),S=n(247),I=n(27),w=n(90),M=n(2654),C=n.n(M),D=6e4,P=function(e){function t(n,i){o()(this,t);var a=u()(this,e.call(this,n,i));return a.tick=function(){a.setState(a.getState(a.props)),a.setTickTimeout()},a.state=a.getState(n),a}return d()(t,e),t.prototype.componentWillMount=function(){this.setTickTimeout()},t.prototype.componentWillReceiveProps=function(e,t){this.setState(this.getState(e))},
t.prototype.shouldComponentUpdate=function(e,t){return n.i(I.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this.tickTimeout&&clearTimeout(this.tickTimeout)},t.prototype.getState=function(e){return{title:i(e)}},t.prototype.setTickTimeout=function(){this.tickTimeout=setTimeout(this.tick,D-Date.now()%D)},t.prototype.render=function(){var e=this.props,t=e.className,i=e.beginsAt,a=e.endsAt,s=e.channel,o=e.showChannel,l=this.state.title,u=o&&!!s&&n.i(m.a)(i,a);return r()("span",{
className:t},void 0,u?r()("span",{},void 0,n.i(p.default)("Now on {channel}",{channel:s}),r()(w.a,{className:C.a.separator}),l):l)},t}(h.Component);P.defaultProps={showFullTime:!1,showChannel:!1},t.a=P},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.experienceSettings.timeFormat},n.i(s.a)(),n.i(o.a)(),function(e,t,n){return{beginsAt:t&&t.beginsAt,endsAt:t&&t.endsAt,channel:n&&n.tag,timeFormat:e}})}var a=n(14),r=n(8),s=(n.n(r),n(330)),o=n(841),l=n(902)
;t.a=n.i(a.b)(i)(l.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{skipChildren:e.skipChildren,childCount:e.childCount,leafCount:e.leafCount}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2098);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.iconClassName,i=e.name;return r()("span",{className:t},void 0,r()(o.a,{className:n,name:i}))}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(29)),l=n(2656),u=n.n(l);i.defaultProps={className:u.a.decoratorIconContainer,iconClassName:u.a.decoratorIcon},t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){return{duration:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).duration}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(584);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.index;return r()("span",{
className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{leafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).leafCount}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2113);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){return{
lastViewedAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).lastViewedAt}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2114);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(588);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){
return n.i(r.createSelector)(n.i(s.a)(),function(){return{duration:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).duration}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2118);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){return{originallyAvailableAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).originallyAvailableAt}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2121);t.a=n.i(a.b)(i)(o.a)
},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.tabIndex,a=e.title,s=e.index,u=e.route,p=e.parentTitle,f=e.parentIndex,g=e.parentRoute,m=e.originallyAvailableAt,v=n.i(o.a)({seasonIndex:f,noLeadingZero:!0}),y=n.i(l.a)({episodeIndex:s,date:m,noLeadingZero:!0});return u&&g?r()("span",{className:t},void 0,s>0&&!!v&&r()(c.a,{tabIndex:i,title:p,to:g},void 0,v),s>0&&!!v&&h,r()(c.a,{tabIndex:i,title:a,to:u},void 0,y)):r()("span",{className:t
},void 0,s>0&&!!v&&r()("span",{},void 0,v),s>0&&!!v&&d,r()("span",{},void 0,y))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1318)),l=n(318),u=n(90),c=n(25),d=r()(u.a,{separator:"\xb7"}),h=r()(u.a,{separator:"\xb7"});t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{title:i.title,index:i.index,route:n.i(u.a)(e,t,i.key),parentTitle:i.parentTitle,parentIndex:i.parentIndex,
parentRoute:n.i(u.a)(e,t,i.parentKey),originallyAvailableAt:i.originallyAvailableAt}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(102),c=n(913);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e,t){var n=Math.abs(Date.now()-1e3*e);return n<36e5?setTimeout(t,6e4):n<864e5?setTimeout(t,36e5):void 0}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),n(184)),f=function(e){function t(a,r){o()(this,t);var s=u()(this,e.call(this,a,r))
;g.call(s);var l=s.props.timestamp,c=n.i(p.a)(l);return s.state={title:c},s.timeoutID=i(l,s.trackTime),s}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){if(e.timestamp!==this.props.timestamp){var t=n.i(p.a)(e.timestamp);this.setState({title:t})}},t.prototype.componentWillUnmount=function(){this.timeoutID&&(this.timeoutID=clearTimeout(this.timeoutID))},t.prototype.render=function(){var e=this.props.className,t=this.state.title;return r()("span",{className:e},void 0,t)},t
}(h.Component),g=function(){var e=this;this.trackTime=function(){var t=e.props.timestamp,a=n.i(p.a)(t);e.setState({title:a}),e.timeoutID=i(t,e.trackTime)}};t.a=f},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.year;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.audioStream;if(!t)return r()("span",{},void 0,n.i(o.default)("None"));var i=[];return t.codec&&i.push(n.i(l.default)(t.codec)),
t.channels&&i.push(n.i(u.default)(t.channels)),r()("span",{},void 0,t.language||n.i(o.default)("Unknown"),!!i.length&&d,i.join(" "))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(515),u=n(378),c=n(90),d=r()(c.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.subtitlesStream;if(!t)return r()("span",{},void 0,n.i(o.default)("None"));var i=[];return t.codec&&i.push(n.i(l.default)(t.codec)),t.key&&i.push(n.i(o.default)("External")),t.forced&&i.push(n.i(o.default)("Forced")),
r()("span",{},void 0,r()("span",{},void 0,t.language||n.i(o.default)("Unknown"),!!i.length&&c,i.join(" ")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(253),u=n(90),c=r()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(e){return u.a.createElement(h.a,o()({tooltip:n.i(c.default)("Edit")},e),p)}var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(29),h=n(148),p=r()(d.a,{name:"plex-icon-toolbar-edit-560"});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2664)),l=n.n(o);i.defaultProps={className:l.a.pageHeaderCenter},t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createStructuredSelector)({server:n.i(c.a)(),outOfDateServers:d.a,isDownForMaintenance:m,hasFailedResources:v,hasPlexPass:function(e){return e.user.hasPlexPass},isUserRestricted:function(e){return!!e.user.restricted},canProvisionPersonalCloudServer:h.a})}
function a(e){return{onDownloadServer:function(t){e(n.i(p.f)(t))},onLinkPersonalCloudServerPress:function(t){e(n.i(f.a)({open:!0}))}}}var r=n(2),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(372)),c=n(54),d=n(729),h=n(373),p=n(79),f=n(167),g=n(2163),m=n.i(l.createSelector)(u.a,function(e){return!!s.a.findWhere(e,{isDownForMaintenance:!0})}),v=n.i(l.createSelector)(u.a,function(e){return!!s.a.findWhere(e,{hasFailedResources:!0})});t.a=n.i(o.b)(i,a)(g.a)},function(e,t,n){"use strict";function i(e){
return o.a.createElement(l.a,r()({iconClassName:c.a.icon,icon:"plex-icon-alert-560"},e))}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(172),u=n(2676),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(){return r()(c.a,{title:n.i(o.default)("You must be lost"),description:n.i(o.default)("We can't find the page you're looking for")},void 0,r()(u.a,{to:"#",kind:l.b.PRIMARY},void 0,n.i(o.default)("Go Home")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(25),c=n(150);t.a=i},function(e,t,n){
"use strict";function i(e){switch(e){case h.b:return g.a;case h.c:return m.a;default:return f.a}}function a(e){
var t=e.children,a=e.serverEntityID,r=e.providerEntityID,o=e.metadataListEntityID,l=e.containerKey,d=e.containerTitle,h=e.listTitle,f=e.listType,g=e.listContext,m=e.listStyle,S=e.activeSort,w=e.selectedSort,M=e.metadataItemEntityIDs,C=e.totalSize,D=e.populatedRange,P=e.firstItemType,T=e.isPending,x=e.isPopulated,E=e.error,A=e.columnAdjustment,k=e.hasGutter,L=e.onPageRequest,_=e.onListScrollIndexChange,N=e.onListUpdate,R=e.onMeasure,O=e.scrollIndex,j=C||M.length;if(x&&j){var z=f||P,U=i(m)
;return s()(U,{className:I.a.metadataListPageContent,scrollerClassName:u()(I.a.metadataListScroller,k&&I.a.hasGutter),serverEntityID:a,providerEntityID:r,metadataListEntityID:o,containerKey:l,containerTitle:d,listType:z,listContext:g,activeSort:S,selectedSort:w,scrollIndex:O,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:"metadataItemEntityID",items:M,itemsOffset:D.start,size:j,columnAdjustment:A,onPageRequest:L,onListScrollIndexChange:_,onListUpdate:N,onMeasure:R},void 0,t)}
return T?s()(v.a,{},void 0,s()(y.a,{},void 0,s()(p.a,{label:h?n.i(c.default)("Loading {listTitle}",{listTitle:h}):n.i(c.default)("Loading list")}))):E?s()(v.a,{},void 0,s()(b.a,{title:h?n.i(c.default)("There was an unexpected error loading {listTitle}",{listTitle:h}):n.i(c.default)("There was an unexpected error loading this list")})):s()(v.a,{},void 0,s()(y.a,{title:n.i(c.default)("Nothing to see here"),description:h?n.i(c.default)("There are no items in {listTitle}",{listTitle:h
}):n.i(c.default)("There are no items in this list")}))}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(30)),u=n.n(l),c=n(4),d=(n(539),n(35)),h=n(71),p=n(36),f=n(2059),g=n(2052),m=n(2051),v=n(229),y=n(172),b=n(273),S=n(2690),I=n.n(S);a.defaultProps={listContext:d.c,listStyle:h.e},t.a=a},function(e,t,n){"use strict";function i(){return n.i(m.createSelector)(function(e){return e.ui.prePlayPage.mediaDecision},n.i(v.a)(),function(e,t){return{mediaItem:e&&e.media,mediaItems:t.Media}})}
var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(8),v=(n.n(m),n(24)),y=n(260),b=n(107),S=n(129),I=n(2236),w={dispatchMakePrePlayVideoDecision:y.e,dispatchSelectMetadataItemStream:b.selectMetadataItemStream},M=function(e){function t(){var n,i,a;u()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.onAudioStreamSelect=function(e){
i.props.dispatchSelectMetadataItemStream({metadataItemEntityID:i.props.metadataItemEntityID,streamTypeString:"audio",streamID:e,allParts:!0,metricsPage:i.props.metricsPage})},i.onSubtitlesStreamSelect=function(e){i.props.dispatchSelectMetadataItemStream({metadataItemEntityID:i.props.metadataItemEntityID,streamTypeString:"subtitles",streamID:e,allParts:!0,metricsPage:i.props.metricsPage})},a=n,d()(i,a)}return p()(t,e),t.prototype.componentDidMount=function(){
this.props.dispatchMakePrePlayVideoDecision()},t.prototype.componentDidUpdate=function(e){e.mediaItems!==this.props.mediaItems&&e.dispatchMakePrePlayVideoDecision()},t.prototype.render=function(){var e=this.props,t=(e.metricsPage,e.dispatchMakePrePlayVideoDecision,e.dispatchSelectMetadataItemStream,o()(e,["metricsPage","dispatchMakePrePlayVideoDecision","dispatchSelectMetadataItemStream"]));return g.a.createElement(I.a,r()({},t,{onAudioStreamSelect:this.onAudioStreamSelect,
onSubtitlesStreamSelect:this.onSubtitlesStreamSelect}))},t}(f.Component);t.a=n.i(S.a)(i,w)(M)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=n(22),g=n(51),m=n(577),v=n(270),y=n(2712),b=n.n(y),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRecordPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1})
},a.state={isSubscribeModalOpen:n.isSubscribeModalOpen},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.metadataItemEntityID,r=e.type,s=e.isSubscribed,o=e.subscriptionType,l=e.grandparentSubscriptionType,u=this.state.isSubscribeModalOpen;return a()(g.a,{className:b.a.recordButton,size:f.d.SMALL,onPress:this.onRecordPress},void 0,a()(m.a,{className:s?b.a.recordingIcon:b.a.recordIcon,
type:l||o||r}),s?n.i(h.default)("Recording Scheduled"):n.i(h.default)("Record"),a()(v.a,{serverEntityID:t,metadataItemEntityID:i,isOpen:u,subscriptionType:r,onModalClose:this.onSubscribeModalClose}))},t}(d.Component);S.defaultProps={isSubscribeModalOpen:!1},t.a=S},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.mediaItem,a=i&&i.videoResolution,s=!1,c=void 0;if(a){var d=parseInt(a,10);s=!0,c=d>=720||4===d||8===d}return t||s?r()(l.a,{},void 0,t,s&&r()(u.a,{
label:n.i(o.default)("Video")},void 0,c?n.i(o.default)("HD"):n.i(o.default)("SD"))):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(602),u=n(432);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){return{mediaItem:e}})}var a=n(14),r=n(8),s=(n.n(r),n(330)),o=n(927);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.beginsAt,a=e.endsAt,s=e.channel,c=e.timeFormat;if(!i||!a)return null
;var d=Date.now()/1e3,h=void 0;return h=a<d?n.i(o.default)("Aired"):i<=d&&a>=d?n.i(o.default)("Airing"):n.i(o.default)("Airs"),r()(u.a,{label:h},void 0,r()(l.a,{beginsAt:i,endsAt:a,channel:s,showFullTime:!0,showChannel:!0,timeFormat:c}),t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(902),u=n(432);t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e){return e.experienceSettings.timeFormat},n.i(o.a)(),n.i(l.a)(),function(e,t,n){return{beginsAt:t&&t.beginsAt,
endsAt:t&&t.endsAt,channel:n&&n.tag,timeFormat:e}})}var a=n(1),r=(n.n(a),n(14)),s=n(8),o=(n.n(s),n(330)),l=n(841),u=n(929);t.a=n.i(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:e.type,duration:e.duration,isSubscribed:null!=e.subscriptionID||null!=e.grandparentSubscriptionID,subscriptionType:e.subscriptionType,
grandparentSubscriptionType:e.grandparentSubscriptionType}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2242);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){return r()(o.a,{className:u.a.bottomDivider})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(124)),l=n(2720),u=n.n(l);t.a=i},function(e,t,n){"use strict";var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=n.n(u),d=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i))
;return r.onListContainerRef=function(e){r._setOffsetTop(e)},r._hasOffsetChanged=!1,r.state={listOffsetTop:null},r}return l()(t,e),t.prototype.componentWillUpdate=function(e){this._hasOffsetChanged=e.showArtwork!==this.props.showArtwork||e.contentHeight!==this.props.contentHeight},t.prototype._setOffsetTop=function(e){e&&e.offsetTop!==this.state.listOffsetTop&&this.setState({listOffsetTop:e.offsetTop})},t.prototype.render=function(){
var e=this.props,t=e.children,n=e.scrollTop,i=this.state.listOffsetTop,a=c.a.Children.only(t);return c.a.createElement("div",{ref:this._hasOffsetChanged?this._setOffsetTop.bind(this):this.onListContainerRef},null!=i&&c.a.cloneElement(a,{scrollTop:n-i}))},t}(u.Component);t.a=d},function(e,t,n){"use strict";function i(){return r()(o.a,{className:u.a.topDivider})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(124)),l=n(2721),u=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){
return r.a.createElement(o.a,e)}var a=n(1),r=n.n(a),s=n(22),o=n(51),l=n(2728),u=n.n(l);i.defaultProps={className:u.a.statusButton,size:s.d.SMALL},t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(n.i(o.a)(),n.i(l.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{duration:e.duration,viewCount:e.viewCount,viewOffset:e.viewOffset,isFileUnavailable:t}})}function a(e,t){return{onUnavailablePress:function(i){
e(n.i(u.getMetadataItemInfo)({metadataItemEntityID:t.metadataItemEntityID}))}}}var r=n(14),s=n(8),o=(n.n(s),n(24)),l=n(1706),u=n(107),c=n(2254);t.a=n.i(r.b)(i,a)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2730)),l=n.n(o);i.defaultProps={className:l.a.tertiaryTitleSpacer},t.a=i},function(e,t,n){"use strict";function i(){return r()(l.a,{className:c.a.badge
},void 0,n.i(o.default)("New"))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(410),u=n(2733),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(){return n.i(S.createSelector)(function(e,t){return t.linkedKey},D.a,function(e,t){var i={isLibraryProvider:!0,identifer:M.a.LIBRARY_PROVIDER_IDENTIFIER};return n.i(E.a)(t,i,e)})}function a(){return n.i(S.createSelector)(function(e,t){return t.serverEntityID},function(e,t){return t.mediaSubscriptionID},function(e,t){return t.status},function(e){
return e.experienceSettings.timeFormat},i(),n.i(P.a)(),n.i(T.a)(),function(e,t,i,a,r,s,o){var l=n.i(I.a)(w.a,t,e),u=i===C.a.COMPLETE,c=i===C.a.ERROR,d=m.a.pick(s,"type","title","grandparentTitle","index","parentIndex","originallyAvailableAt");return f()({mediaSubscriptionEntityID:l,prePlayRoute:r,isRecording:!!o,recordingProgress:o&&o.progress,isComplete:u,hasError:c,hasSubscription:!!t,showPlay:u&&!!r,timeFormat:a},d)})}
var r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(6),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(14),S=n(8),I=(n.n(S),n(62)),w=n(67),M=n(73),C=n(706),D=n(47),P=n(24),T=n(1699),x=n(327),E=n(102),A=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onPlayPress=function(e){i.props.playRecording({serverEntityID:i.props.serverEntityID,
linkedKey:i.props.linkedKey})},a=n,c()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.component,n=(e.mediaSubscriptionID,e.status,e.linkedKey,s()(e,["component","mediaSubscriptionID","status","linkedKey"]));return y.a.createElement(t,f()({},n,{onPlayPress:this.onPlayPress}))},t}(v.Component);t.a=n.i(b.b)(a,{playRecording:x.playRecording})(A)},function(e,t,n){"use strict";function i(e){var t=e.subscriptionCount;return r()(l.a,{icon:"plex-icon-calendar-560",
title:n.i(o.default)("You have no recordings scheduled"),description:1===t?n.i(o.default)("There are no upcoming airings of the item in your list"):n.i(o.default)("There are no upcoming airings of the {subscriptionCount} items in your list",{subscriptionCount:t})})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(172);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.error,n=e.onPress;return r()(c.a,{className:h.a.errorButton,component:u.a,tooltip:t,tooltipClassName:h.a.errorTooltip,
tooltipAttachment:o.e.MIDDLE_RIGHT,onPress:n},void 0,r()(l.a,{name:"plex-icon-alert-560","aria-label":t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(22)),l=n(29),u=n(25),c=n(569),d=n(2742),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=u.a.unix(e);return n.i(d.default)("{month} {dayNumber}",{month:n.i(h.a)(e),dayNumber:t.date()})}function a(e){var t=u.a.unix(e);return n.i(d.default)("{month} {dayNumber}, {year}",{month:n.i(h.a)(e),dayNumber:t.date(),year:t.year()})}function r(e){
var t=e.startTime,n=e.endTime,r=u.a.unix(t),s=u.a.unix(n),l=r.isSame(s,"day")?a(t):i(t)+" \u2013 "+a(n);return o()("span",{className:f.a.title},void 0,l)}var s=n(3),o=n.n(s),l=n(37),u=n.n(l),c=n(1),d=(n.n(c),n(4)),h=n(503),p=n(2745),f=n.n(p);t.a=r},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar.scheduled},n.i(f.a)(),function(e,t){return o.a.find(e,function(e){
return u.a.unix(e.beginsAt).isAfter()&&e.mediaSubscriptionID===t.key})})}function a(){return n.i(p.createSelector)(function(e){return e.experienceSettings.timeFormat},n.i(f.a)(),i(),function(e,t,n){var i=o.a.pick(t.target,"title","grandparentTitle","type","year","index","parentIndex","originallyAvailableAt","thumb","grandparentThumb");return n&&(i.beginsAt=n.beginsAt,i.endsAt=n.endsAt),i.timeFormat=e,i})}function r(e){return d.a.createElement(g.a,e)}
var s=n(2),o=n.n(s),l=n(37),u=n.n(l),c=n(1),d=n.n(c),h=n(14),p=n(8),f=(n.n(p),n(1282)),g=n(2297);t.a=n.i(h.b)(a)(r)},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.className,a=e.closedNode,s=e.errorMessage,o=e.isOpen,f=e.onErrorDismiss,m=e.onTogglePress;return r()(d.a,{className:l()(o?g.a.isOpen:g.a.isClosed,i),errorMessage:s,onErrorDismiss:f,onPress:o?null:m},void 0,r()(h.a,{},void 0,o&&r()(p.a,{kind:c.PRIMARY,onPress:m},void 0,n.i(u.default)("Cancel")),!o&&r()(p.a,{
kind:c.PRIMARY},void 0,n.i(u.default)("Edit"))),o?t:a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n.n(o),u=n(4),c=n(82),d=n(434),h=n(605),p=n(25),f=n(2755),g=n.n(f);t.a=i},function(e,t,n){"use strict";function i(e){return r()("div",{className:u.a.spinnerContainer},void 0,c)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(36)),l=n(2761),u=n.n(l),c=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(n.i(d.a)(),function(e){var t=e.metadataItem;return{
metadataItemEntityID:t,isMetadataItem:!!t}})}function a(e){var t=e.component,n=s()(e,["component"]);return l.a.createElement(t,n)}var r=n(16),s=n.n(r),o=n(1),l=n.n(o),u=n(14),c=n(8),d=(n.n(c),n(263));t.a=n.i(u.b)(i)(a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),n.i(u.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],a=i||n.tagItem;return{server:e,provider:t,reasonID:n.reasonID,reason:n.reason,
reasonTitle:n.reasonTitle,originalTitle:a.originalTitle,filter:a.filter,librarySectionID:a.librarySectionID,librarySectionKey:a.librarySectionKey,librarySectionType:a.librarySectionType}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(263),u=n(24),c=n(2357);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(p.a,f.a,n.i(g.a)(),function(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=l.a.pick(n.tagItem,"id","tag","tagType","librarySectionType","librarySectionKey");return s()({server:e,provider:t,reasonID:n.reasonID},i)})}function a(e){return c.a.createElement(m.a,e)}var r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(1),c=n.n(u),d=n(14),h=n(8),p=(n.n(h),n(47)),f=n(45),g=n(263),m=n(2360);t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children,i=e.icon,a=e.title,s=e.showSpinner,l=u()(e,["className","children","icon","title","showSpinner"]);return d.a.createElement(f.a,r()({className:t},l),o()("div",{className:m.a.container},void 0,o()("div",{className:m.a.icon},void 0,s?o()(p.a,{className:m.a.spinner}):o()(h.a,{name:i})),o()("div",{className:m.a.title},void 0,a),n&&o()("div",{className:m.a.children},void 0,n)))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(29),p=n(36),f=n(25),g=n(2788),m=n.n(g);i.defaultProps={className:m.a.sidebarLink},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children;return r()("div",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2790)),l=n.n(o);i.defaultProps={className:l.a.sidebarListItem},t.a=i},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(4),g=n(27),m=n(29),v=n(2794),y=n.n(v),b=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,i=e.isConnected,r=e.isUnavailable,s=e.isSecure;return e.isRelayed?a()(m.a,{className:p()(t,y.a.warningIcon),
name:"plex-icon-alert-round-560","aria-label":n.i(f.default)("Indirect")}):r?a()(m.a,{className:p()(t,y.a.alertIcon),name:"plex-icon-alert-560","aria-label":n.i(f.default)("Unavailable")}):s&&i?a()(m.a,{className:p()(t,y.a.secureIcon),name:"plex-icon-lock-560","aria-label":n.i(f.default)("Secure")}):null},t}(d.Component);t.a=b},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(30)),p=n.n(h),f=n(27),g=n(146),m=n(1002),v=n.n(m),y=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=e.to,r=e.isDisabled,s=e.machineIdentifier,o=e.title,l=e.details,u=e.onPress;return a()(g.a,{className:p()(n,v.a.serverMenuItem),"data-qa-id":"serverMenuItem--"+s,to:i,isDisabled:r,onPress:u
},void 0,a()("div",{className:v.a.serverMenuItemContainer},void 0,a()("div",{className:v.a.serverMenuTitle},void 0,a()("div",{className:v.a.serverMenuFriendlyName},void 0,o),a()("div",{className:v.a.serverMenuDetails},void 0,l)),a()("div",{className:v.a.serverMenuIconContainer},void 0,t)))},t}(d.Component);t.a=y},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(25),m=n(29),v=n(2795),y=n.n(v),b=function(e){
function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.icon,n=e.title,i=s()(e,["icon","title"]);return f.a.createElement(g.a,i,a()(m.a,{name:t,label:n}))},t}(p.Component);b.defaultProps={className:y.a.sidebarIconButton},t.a=b},function(e,t,n){"use strict";function i(e){var t=e.img,n=e.title,i=e.description;return r()("div",{className:l.a.feature},void 0,r()("div",{className:l.a.featurePadding},void 0,r()("img",{
className:l.a.featureImage,src:t}),r()("div",{className:l.a.featureContainer},void 0,r()("div",{className:l.a.featureTitle},void 0,n),r()("div",{className:l.a.featureDescription},void 0,i))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2802)),l=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,i){o()(this,n);var a=u()(this,t.call(this,e,i));return a.onMouseMove=function(e){a._setHoveredState(!0),a.props.onMouseMove&&a.props.onMouseMove(e)},
a.onMouseLeave=function(e){a._setHoveredState(!1),a.props.onMouseLeave&&a.props.onMouseLeave(e)},a.onFocus=function(e){a._setHoveredState(!0),a.props.onFocus&&a.props.onFocus(e)},a.onBlur=function(e){a._setHoveredState(!1),a.props.onBlur&&a.props.onBlur(e)},a.state={isHovered:!1},a._hoverableProps={onMouseMove:a.onMouseMove,onMouseLeave:a.onMouseLeave,onFocus:a.onFocus,onBlur:a.onBlur},a}return d()(n,t),n.prototype._setHoveredState=function(e){this.state.isHovered!==e&&this.setState({isHovered:e
})},n.prototype.render=function(){return p.a.createElement(e,r()({},this.props,{isHovered:this.state.isHovered,hoverableProps:this._hoverableProps}))},n}(h.Component);return t.displayName="Hoverable("+n.i(f.a)(e)+")",t.WrappedComponent=e,t}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(217);h.PropTypes.shape({onMouseMove:h.PropTypes.func.isRequired,onMouseLeave:h.PropTypes.func.isRequired,onFocus:h.PropTypes.func.isRequired,
onBlur:h.PropTypes.func.isRequired}).isRequired,h.PropTypes.bool.isRequired;t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="RECORDING_PRIORITY_SUBSCRIPTION"},function(e,t,n){"use strict";function i(e){if(!e)return n.i(d.default)("Username is required")}function a(e){if(!e)return n.i(d.default)("Email address is required")}function r(e){if(!e)return n.i(d.default)("Password is required")}function s(e){if(!e)return n.i(d.default)("Password confirmation is required")}
function o(e){if(!e)return n.i(d.default)("Current password is required")}function l(e){if(e&&e.length<8)return n.i(d.default)("Password must be at least 8 characters")}function u(e,t){if(e!==t.password.value)return n.i(d.default)("Passwords must match")}function c(e){if(!e)return n.i(d.default)("URL is required")}var d=n(4);t.b=i,t.c=a,t.d=r,t.f=s,t.h=o,t.e=l,t.g=u,t.a=c},function(e,t,n){"use strict";function i(e){return e===o.a?s()({},y,{outerPaddingTop:10,outerPaddingRight:m,
outerPaddingBottom:5,outerPaddingLeft:m}):y}function a(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=e+t+a+r;if(v.hasOwnProperty(o))return v[o];var u=n.i(d.c)(e,t),c="mixed"===e?r+3:r,m=c*f+g,y=u>1?180:120,b=i(t),S=n.i(l.a)(s()({direction:l.c},b,{getCellWidth:function(e){return n.i(h.a)(s()({},e,{minCellWidth:y,minColumns:2,maxColumns:11,columnAdjustment:a,aspectRatio:u}))},getCellHeight:function(e){
return n.i(p.a)(s()({},e,{aspectRatio:u,titleHeight:m}))}}));return S.cellOptions={minCellWidth:y,minColumns:2,maxColumns:11,columnAdjustment:a,aspectRatio:u,titleHeight:m},v[o]=S,S}var r=n(6),s=n.n(r),o=n(35),l=n(537),u=n(76),c=n.n(u),d=n(203),h=n(961),p=n(960);t.a=a;var f=parseInt(c.a.posterTitleHeight,10),g=parseInt(c.a.posterTitlePadding,10),m=parseInt(c.a.prePlayContentPadding,10),v={},y={innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:30,outerPaddingRight:60,
outerPaddingBottom:30,outerPaddingLeft:60}},function(e,t,n){"use strict";function i(e){function t(e){var t=e.viewportWidth+":"+e.viewportHeight;if(t===P)return T;x=e.viewportHeight;var n=e.viewportWidth-2*m,i=h.reduce(function(e,t){return e+t.height},0);E=n/c,A=S?(S-m)/i:E;var a=A*i;return P=t,T={height:a,width:n}}function i(e){n.i(l.a)(void 0!==x,"`getListStyle` must be called before `getPositionForIndex`");var t=o.a.find(M,function(t){var n=t.last;return e<=n
}),i=o.a.find(t.cellLayouts,function(t){return t.cellIndex===e});return{cellX:Math.round(i.left*E)+y+m,cellY:Math.round(t.top*A)+y+m,cellWidth:Math.round(i.width*E)-2*y,cellHeight:Math.round(t.height*A)-2*y}}function a(e){return e<0?M[0]:o.a.find(M,function(t){var n=t.bottom;return e<m+(n+1)*A})||o.a.last(M)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;n.i(l.a)(void 0!==x,"`getListStyle` must be called before `getRangesForPosition`")
;var t=e+x-1,i=e-f*x,r=t+f*x,s=a(i).first,o=a(r).last,u=a(e).first,c=a(t).last;return{renderStartIndex:s,renderEndIndex:o,visibleStartIndex:u,visibleEndIndex:c,partiallyVisibleStartIndex:u,partiallyVisibleEndIndex:c}}var u=e.columns,c=void 0===u?1:u,d=e.rows,h=void 0===d?[]:d,p=e.overscan,f=void 0===p?0:p,g=e.outerPadding,m=void 0===g?0:g,v=e.innerPadding,y=void 0===v?0:v,b=e.maximumHeight,S=void 0===b?0:b,I=e.offset,w=void 0===I?0:I,M=[],C=0,D=w;h.forEach(function(e){var t=C;C+=e.height
;var n=C-1,i=D;D+=e.widths.length;var a=D-1,s=[],o=0;e.widths.forEach(function(e,t){var n=o;o+=e,s.push({width:e,left:n,cellIndex:i+t})}),M.push(r()({},e,{top:t,bottom:n,first:i,last:a,cellLayouts:s}))});var P=void 0,T=void 0,x=void 0,E=void 0,A=void 0;return{getListStyle:t,getPositionForIndex:i,getRangesForPosition:s}}var a=n(6),r=n.n(a),s=n(2),o=n.n(s),l=n(33);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.cellWidth,n=e.aspectRatio,i=e.titleHeight,a=void 0===i?0:i
;return Math.floor(t/n+a)}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.innerViewportWidth,n=e.innerHorizontalPadding,i=void 0===n?0:n,a=e.minCellWidth,r=e.minColumns,s=void 0===r?0:r,o=e.maxColumns,l=void 0===o?1/0:o,u=e.columnAdjustment,c=void 0===u?0:u,d=Math.floor((t+i)/(a+i)),h=void 0;return h=d<s?s:d>l?l:d,h=Math.max(h+c,1),Math.max(Math.floor((t+i)/h)-i,0)}t.a=i},function(e,t,n){"use strict";function i(e){return Math.abs(e.actual-e.desired)/e.actual}function a(e){
return 0===e.cells.length?1/0:e.cells.reduce(function(e,t){return e+i(t)},0)/e.cells.length+Math.abs(e.scale-1)}function r(e,t){var n=e.cells,i=n.reduce(function(e,t){return e+t.desired},0),a=t/i;return{scale:a,cells:n.map(function(e){var t=e.desired;return{desired:t,actual:t*a}})}}function s(e){var t=e.aspectRatios,n=e.columns,i=void 0===n?4:n,s=e.minAspectRatio,o=void 0===s?.4:s,l=e.maxAspectRatio,u=void 0===l?5:l,c=t.map(function(e){return Math.max(o,Math.min(u,e))}),d=[],h={scale:null,
cells:[]};c.forEach(function(e){var t={desired:e},n={scale:0,cells:h.cells.slice(0)};n.cells.push(t),n=r(n,i),a(n)<=a(h)?h=n:(d.push(h),h=r({scale:0,cells:[t]},i))});var p=1/Math.max(1,h.scale);return h.scale=Math.min(1,h.scale),h.cells=h.cells.map(function(e){return{desired:e.desired,actual:e.actual*p}}),d.push(h),d.map(function(e){return{height:e.scale,widths:e.cells.map(function(e){return e.actual})}})}t.a=s},function(e,t,n){"use strict"
;var i=n(610),a=n(76),r=n.n(a),s=parseInt(r.a.summaryCellHeight,10),o=n.i(i.a)(s,5);t.a=o},function(e,t,n){"use strict";function i(e){return ie[e]}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.keys;if(a&&a.length){return i(e).reduce(function(e,t){return a.indexOf(t.key)!==-1&&e.push(t),e},[])}switch(t){case s.a:switch(e){case"season":return[k,U,q,B];case"episode":return[G,k,B];case"album":return[k,U,B];case"track":return[j,V]}}switch(e){case"movie":
return[k,U,W,Q];case"show":return[k,U,K,X];case"season":return[k,L];case"episode":return[k,_,Q];case"artist":return[k];case"album":return[k,N,U];case"track":return[k,R,z,Y];case"photo":return[k];case"photoalbum":return[k];case"clip":return[k]}return[]}var r=n(4),s=n(35),o=n(2095),l=n(343),u=n(271),c=n(2126),d=n(2102),h=n(429),p=n(582),f=n(428),g=n(2104),m=n(906),v=n(911),y=n(2120),b=n(2117),S=n(589),I=n(586),w=n(2131),M=n(2134),C=n(583),D=n(909),P=n(912),T=n(2123),x=n(2100);t.b=i,t.a=a;var E={
flex:"2 1 350px"},A={flex:"0 1 200px"},k={key:"title",ascKey:"titleSort",descKey:"titleSort:desc",title:function(e){switch(e){case"movie":return n.i(r.default)("Movie Title");case"show":return n.i(r.default)("Show Title");case"season":return n.i(r.default)("Season");case"episode":return n.i(r.default)("Episode Title");case"artist":return n.i(r.default)("Artist Title");case"album":return n.i(r.default)("Album Title");case"track":return n.i(r.default)("Track Title");default:
return n.i(r.default)("Title")}},component:o.a,style:E},L={key:"seasonShow",ascKey:"show.titleSort,index",descKey:"show.titleSort:desc,index",title:function(){return n.i(r.default)("Show")},component:l.a,style:E},_={key:"episodeShow",ascKey:"show.titleSort,season.index,episode.index",descKey:"show.titleSort:desc,season.index,episode.index",title:function(){return n.i(r.default)("Show")},component:u.a,style:E},N={key:"albumArtist",ascKey:"artist.titleSort,album.year",
descKey:"artist.titleSort:desc,album.year",title:function(){return n.i(r.default)("Album Artist")},component:l.a,style:E},R={key:"trackAlbumArtist",ascKey:"artist.titleSort,album.titleSort,track.index",descKey:"artist.titleSort:desc,album.titleSort,track.index",title:function(){return n.i(r.default)("Album Artist")},component:u.a,style:E},O={key:"trackArtist",title:function(){return n.i(r.default)("Artist")},ascKey:"track.originalTitle,album.titleSort,track.index",
descKey:"track.originalTitle:desc,album.titleSort,track.index",component:c.a,style:E},j={key:"combinedTitleTrackArtist",ascKey:"titleSort",descKey:"titleSort:desc",title:function(){return n.i(r.default)("Track Title")},component:d.a,style:E},z={key:"trackAlbum",ascKey:"album.titleSort,track.index",descKey:"album.titleSort:desc,track.index",title:function(){return n.i(r.default)("Album")},component:l.a,style:E},U={key:"year",ascKey:"year",descKey:"year:desc",title:function(){
return n.i(r.default)("Year")},component:h.a,style:{flex:"0 1 150px"}},F={key:"criticRating",ascKey:"rating",descKey:"rating:desc",title:function(){return n.i(r.default)("Critic Rating")},component:p.a,style:{flex:"0 0 150px"}},B={key:"userRating",ascKey:"userRating",descKey:"userRating:desc",title:function(){return n.i(r.default)("Rating")},component:f.a,style:{flex:"0 0 115px"}},V={key:"miniUserRating",ascKey:"userRating",descKey:"userRating:desc",title:function(){
return n.i(r.default)("Rating")},component:f.a,style:{flex:"0 0 75px",padding:0}},H={key:"contentRating",ascKey:"contentRating",descKey:"contentRating:desc",title:function(){return n.i(r.default)("Content Rating")},component:g.a,style:{flex:"0 0 150px"}},W={key:"duration",ascKey:"duration",descKey:"duration:desc",title:function(){return n.i(r.default)("Duration")},component:m.a,style:{flex:"0 1 150px"}},Y={key:"playerDuration",ascKey:"duration",descKey:"duration:desc",title:function(){
return n.i(r.default)("Duration")},component:v.a,style:{flex:"0 1 150px"}},Q={key:"progress",ascKey:"viewOffset",descKey:"viewOffset:desc",title:function(){return n.i(r.default)("Progress")},component:y.a,style:{flex:"0 1 150px"}},G={key:"miniProgress",ascKey:"viewOffset",descKey:"viewOffset:desc",title:function(){return n.i(r.default)("Progress")},component:b.a,style:{flex:"0 0 25px",paddingLeft:"10px",paddingRight:0}},K={key:"seasonCount",ascKey:"childCount",descKey:"childCount:desc",
title:function(){return n.i(r.default)("Seasons")},component:S.a,style:{flex:"0 1 150px"}},q={key:"seasonCount",ascKey:"childCount",descKey:"childCount:desc",title:function(){return n.i(r.default)("Episodes")},component:I.a,style:{flex:"0 1 150px"}},X={key:"unwatchedCount",ascKey:"unviewedLeafCount",descKey:"unviewedLeafCount:desc",title:function(){return n.i(r.default)("Unwatched")},component:w.a,style:{flex:"0 1 150px"}},Z={key:"playCount",ascKey:"viewCount",descKey:"viewCount:desc",
title:function(){return n.i(r.default)("Plays")},component:M.a,style:{flex:"0 1 150px"}},J={key:"dateAdded",ascKey:"addedAt",descKey:"addedAt:desc",title:function(){return n.i(r.default)("Date Added")},component:C.a,style:A},$={key:"dateViewed",ascKey:"lastViewedAt",descKey:"lastViewedAt:desc",title:function(){return n.i(r.default)("Date Viewed")},component:D.a,style:A},ee={key:"releaseDate",ascKey:"originallyAvailableAt",descKey:"originallyAvailableAt:desc",title:function(e){switch(e){
case"movie":return n.i(r.default)("Release Date");case"show":return n.i(r.default)("Air Date");case"episode":return n.i(r.default)("Air Date");case"album":return n.i(r.default)("Release Date");default:return n.i(r.default)("Release Date")}},component:P.a,style:A},te={key:"resolution",ascKey:"mediaHeight",descKey:"mediaHeight:desc",title:function(){return n.i(r.default)("Resolution")},component:T.a,style:{flex:"0 1 150px"}},ne={key:"bitrate",ascKey:"mediaBitrate",descKey:"mediaBitrate:desc",
title:function(){return n.i(r.default)("Bitrate")},component:x.a,style:{flex:"0 1 150px"}},ie={movie:[k,U,F,B,H,W,Q,Z,J,$,ee,te,ne],show:[k,U,F,B,H,K,X,J,$,ee],season:[k,L,B,J],episode:[k,_,U,F,B,W,Q,Z,J,$,ee,te,ne],artist:[k,B,J],album:[k,N,U,F,B,J,ee],track:[k,R,O,z,U,B,Y,Q,Z,J,ne]}},function(e,t,n){"use strict";n(804);n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return o}),
n.d(t,"f",function(){return l});var i="isActive",a="isFocused",r="isDisabled",s="isDragging",o="isDraggingBefore",l="isDraggingAfter"},function(e,t,n){"use strict";function i(e,t,n){var i=n.key,s=n.title,o=n.type,l=encodeURIComponent(e),u=encodeURIComponent(t),c=t===r.a.LIBRARY_PROVIDER_IDENTIFIER?"server/"+l:"server/"+l+"/provider/"+u;return a.join(["#!",c,"list"],{key:i,type:o,title:s})}var a=n(19),r=n(73);t.a=i},function(e,t,n){"use strict";function i(e,t){
var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i.type,o=i.key;return"track"===s||"photo"===s?o=i.parentKey:"playlist"===s&&(o=i.ratingKey),!o&&i.librarySectionID?n.i(r.a)(e,t,i.librarySectionID):n.i(a.a)(e,t,o,null,s)}var a=n(102),r=n(94);t.a=i},function(e,t,n){"use strict";function i(e,t,n,i){if(e&&t&&t.isLibraryProvider&&n){var r=encodeURIComponent(e.machineIdentifier),s="/"===String(n).charAt(0),o=s?n:"/library/sections/"+n,l=encodeURIComponent(o)
;return a.join("#!/server/"+r+"/timeline?key="+l,i)}}var a=n(19);t.a=i},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a});var i="minor",a="major"},function(e,t){e.exports={defaultColor:"#fff",quietColor:"#a8a8a8",inverseColor:"#222",primaryColor:"#cc7b19",primaryAlternateColor:"#e5a00d",selectedColor:"#f9be03",successColor:"#6b5",dangerColor:"#f53",warningColor:"#f0ad4e",appBackgroundColor:"#3f4245",defaultLinkColor:"rgba(255, 255, 255, 0.7)",
defaultLinkHoverColor:"#fff",defaultLinkDisabledLinkColor:"rgba(255, 255, 255, 0.3)",defaultBackgroundColor:"rgba(255, 255, 255, 0.25)",defaultHoverBackgroundColor:"rgba(255, 255, 255, 0.3)",defaultActiveBackgroundColor:"rgba(255, 255, 255, 0.2)",defaultDisabledBackgroundColor:"rgba(255, 255, 255, 0.15)",primaryBackgroundColor:"#cc7b19",primaryHoverBackgroundColor:"color(#cc7b19 lightness(+5%))",primaryActiveBackgroundColor:"color(#cc7b19 blackness(+10%))",
primaryDisabledBackgroundColor:"color(#cc7b19 blackness(+30%))",quietBackgroundColor:"rgba(255, 255, 255, 0.08)",quietHoverBackgroundColor:"rgba(255, 255, 255, 0.1)",quietActiveBackgroundColor:"rgba(255, 255, 255, 0.06)",successBackgroundColor:"#3d7832",successHoverBackgroundColor:"color(#3d7832 lightness(+5%))",successActiveBackgroundColor:"color(#3d7832 blackness(+10%))",successDisabledBackgroundColor:"color(#3d7832 blackness(+30%))",dangerBackgroundColor:"#b32",
dangerHoverBackgroundColor:"color(#b32 lightness(+5%))",dangerActiveBackgroundColor:"color(#b32 blackness(+10%))",dangerDisabledBackgroundColor:"color(#b32 blackness(+30%))",headerColor:"rgba(255, 255, 255, 0.3)",dimColor:"rgba(255, 255, 255, 0.45)",shadowColor:"rgba(0, 0, 0, 0.35)",dividerColor:"rgba(0, 0, 0, 0.3)",errorBackgroundColor:"rgba(255, 85, 51, 0.3)",inputBackgroundColor:"rgba(255, 255, 255, 0.25)",inputFocusBackgroundColor:"#eee",inputColor:"#eee",inputFocusColor:"#555",
inputDisabledOpacity:"0.5",formSectionBackgroundColor:"rgba(0, 0, 0, 0.3)",formSectionHoverBackgroundColor:"rgba(0, 0, 0, 0.15)",stripeListAlternateBackgroundColor:"rgba(255, 255, 255, 0.02)",stripeListHoverBackgroundColor:"rgba(255, 255, 255, 0.06)",stripeListSelectedBackgroundColor:"rgba(0, 0, 0, 0.15)",dragPreviewBackgroundColor:"rgba(76, 76, 76, 0.7)",dragPreviewOpacity:"0.9",searchInputBackgroundColor:"rgba(255, 255, 255, 0.25)",searchFocusBackgroundColor:"#eee",searchInputColor:"#eee",
searchInputFocusColor:"#555",searchImagePlaceholderBackgroundColor:"rgba(255, 255, 255, 0.1)",searchHoverResultBackgroundColor:"rgba(255, 255, 255, 0.05)",searchSelectedResultBackgroundColor:"rgba(255, 255, 255, 0.08)",searchResultTitleColor:"rgba(255, 255, 255, 0.75)",searchResultTitleSelectedColor:"rgba(255, 255, 255, 1)",searchResultSecondaryTitleColor:"rgba(255, 255, 255, 0.3)",scrollbarBackgroundColor:"rgba(255, 255, 255, 0.2)",scrollbarHoverBackgroundColor:"rgba(255, 255, 255, 0.3)",
scrollbarInactiveBackgroundColor:"rgba(255, 255, 255, 0.05)",menuBackgroundColor:"#191a1c",menuItemHoverBackgroundColor:"rgba(255, 255, 255, 0.08)",menuItemActiveBackgroundColor:"rgba(255, 255, 255, 0.15)",menuSeparatorBackgroundColor:"rgba(200, 200, 200, 0.15)",modalBackdropBackgroundColor:"rgba(102, 102, 102, 0.6)",modalBackgroundColor:"#2d2d2d",sliderTrackBackgroundColor:"rgba(255, 255, 255, 0.2)",sliderThumbBackgroundColor:"#ddd",sliderThumbHoverBackgroundColor:"#fff",
avatarBackgroundColor:"#999",tooltipBackgroundColor:"#191a1c",badgeBackgroundColor:"rgba(0, 0, 0, 0.15)",defaultBadgeColor:"rgba(255, 255, 255, 0.7)",sidebarBackgroundColor:"rgba(0, 0, 0, 0.15)",sidebarMenuButtonBackgroundColor:"rgba(0, 0, 0, 0.3)",sidebarMenuButtonHoverBackgroundColor:"rgba(0, 0, 0, 0.45)",sidebarMenuButtonActiveBackgroundColor:"rgba(0, 0, 0, 0.75)",detailsBackgroundColor:"rgba(0, 0, 0, 0.15)",detailsShadowColor:"#000",playerPlaceholderColor:"rgba(0, 0, 0, 0.3)",
playerOverlayColor:"rgba(0, 0, 0, 0.8)",playerSecondaryOverlayColor:"rgba(0, 0, 0, 0.4)",playerPanelColor:"rgba(0, 0, 0, 0.6)",playerBackgroundColor:"#000",equalizerBarColor:"#f9be03",posterBackgroundColor:"rgba(0, 0, 0, 0.45)",posterHoverBackgroundColor:"radial-gradient(farthest-corner at 50% 50%, rgba(50, 50, 50, 0.5) 50%, rgb(50, 50, 50) 100%)",posterSelectedBackgroundColor:"rgba(30, 30, 30, 0.5)",posterBlendedSelectedBackgroundColor:"rgba(19, 19, 19, 0.78);",
posterPlaceholderIconColor:"rgba(255, 255, 255, 0.15)",posterCenterCircleBackgroundColor:"rgba(0, 0, 0, 0.45)",posterBadgeShadowColor:"rgba(0, 0, 0, 0.6)",posterProgressTrackBackgroundColor:"rgba(0, 0, 0, 0.75)",posterVersionBadgeColor:"#556688",recordColor:"#f53",recordBackgroundColor:"#b32",recordActiveBackgroundColor:"color(#b32 blackness(+10%))",dayOfWeekBackgroundColor:"rgba(255, 255, 255, 0.1)",dayOfWeekColor:"rgba(255, 255, 255, 0.75)",todayBackgroundColor:"rgba(255, 255, 255, 0.3)",
todayColor:"rgba(255, 255, 255, 0.1)",calendarEventSuccessBackgroundColor:"rgba(0, 102, 153, 0.15)",calendarEventSuccessAlternateBackgroundColor:"rgba(31, 120, 165, 0.17)",calendarEventSuccessHoverBackgroundColor:"rgba(76, 148, 183, 0.20)",calendarEventErrorBackgroundColor:"rgba(187, 51, 34, 0.3)",calendarEventErrorAlternateBackgroundColor:"rgba(191, 64, 48, 0.31)",calendarEventErrorHoverBackgroundColor:"rgba(199, 87, 73, 0.34)",recordingIconColor:"#ff5533",playColor:"rgba(255, 255, 255, 0.75)",
filterBuilderInputBackgroundColor:"rgba(0, 0, 0, 0.6)",altFilterBuilderInputBackgroundColor:"rgba(0, 0, 0, 0.3)",dvrBackgroundColor:"rgba(0, 0, 0, 0.15)"}},function(e,t,n){e.exports={default:n(2436),__esModule:!0}},function(e,t,n){e.exports={default:n(2442),__esModule:!0}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var i=n(2444);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)}
;case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,a){return e.call(t,n,i,a)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var i=n(281),a=n(136).document,r=i(a)&&i(a.createElement);e.exports=function(e){return r?a.createElement(e):{}}},function(e,t,n){e.exports=!n(279)&&!n(237)(function(){return 7!=Object.defineProperty(n(975)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(973)
;e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var i=n(616),a=n(125),r=n(984),s=n(280),o=n(238),l=n(615),u=n(2451),c=n(619),d=n(981),h=n(284)("iterator"),p=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,g,m,v,y){u(n,t,g);var b,S,I,w=function(e){if(!p&&e in P)return P[e];switch(e){case"keys":return function(){return new n(this,e)};case"values":return function(){
return new n(this,e)}}return function(){return new n(this,e)}},M=t+" Iterator",C="values"==m,D=!1,P=e.prototype,T=P[h]||P["@@iterator"]||m&&P[m],x=T||w(m),E=m?C?w("entries"):x:void 0,A="Array"==t?P.entries||T:T;if(A&&(I=d(A.call(new e)))!==Object.prototype&&(c(I,M,!0),i||o(I,h)||s(I,h,f)),C&&T&&"values"!==T.name&&(D=!0,x=function(){return T.call(this)}),i&&!y||!p&&!D&&P[h]||s(P,h,x),l[t]=x,l[M]=f,m)if(b={values:C?x:w("values"),keys:v?x:w("keys"),entries:E},
y)for(S in b)S in P||r(P,S,b[S]);else a(a.P+a.F*(p||D),t,b);return b}},function(e,t,n){var i=n(442),a=n(443),r=n(239),s=n(624),o=n(238),l=n(976),u=Object.getOwnPropertyDescriptor;t.f=n(279)?u:function(e,t){if(e=r(e),t=s(t,!0),l)try{return u(e,t)}catch(e){}if(o(e,t))return a(!i.f.call(e,t),e[t])}},function(e,t,n){var i=n(982),a=n(614).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,a)}},function(e,t,n){
var i=n(238),a=n(444),r=n(620)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var i=n(238),a=n(239),r=n(2446)(!1),s=n(620)("IE_PROTO");e.exports=function(e,t){var n,o=a(e),l=0,u=[];for(n in o)n!=s&&i(o,n)&&u.push(n);for(;t.length>l;)i(o,n=t[l++])&&(~r(u,n)||u.push(n));return u}},function(e,t,n){
var i=n(125),a=n(103),r=n(237);e.exports=function(e,t){var n=(a.Object||{})[e]||Object[e],s={};s[e]=t(n),i(i.S+i.F*r(function(){n(1)}),"Object",s)}},function(e,t,n){e.exports=n(280)},function(e,t,n){var i=n(125),a=n(441),r=n(237),s=n(622),o="["+s+"]",l="\u200b\x85",u=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),d=function(e,t,n){var a={},o=r(function(){return!!s[e]()||l[e]()!=l}),u=a[e]=o?t(h):s[e];n&&(a[n]=u),i(i.P+i.F*o,"String",a)},h=d.trim=function(e,t){return e=String(a(e)),
1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(c,"")),e};e.exports=d},function(e,t,n){"use strict"
;var i=n(136),a=n(238),r=n(279),s=n(125),o=n(984),l=n(2454).KEY,u=n(237),c=n(621),d=n(619),h=n(445),p=n(284),f=n(626),g=n(625),m=n(2453),v=n(2447),y=n(2449),b=n(350),S=n(239),I=n(624),w=n(443),M=n(617),C=n(2457),D=n(979),P=n(282),T=n(283),x=D.f,E=P.f,A=C.f,k=i.Symbol,L=i.JSON,_=L&&L.stringify,N=p("_hidden"),R=p("toPrimitive"),O={}.propertyIsEnumerable,j=c("symbol-registry"),z=c("symbols"),U=c("op-symbols"),F=Object.prototype,B="function"==typeof k,V=i.QObject,H=!V||!V.prototype||!V.prototype.findChild,W=r&&u(function(){
return 7!=M(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=x(F,t);i&&delete F[t],E(e,t,n),i&&e!==F&&E(F,t,i)}:E,Y=function(e){var t=z[e]=M(k.prototype);return t._k=e,t},Q=B&&"symbol"==typeof k.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof k},G=function(e,t,n){return e===F&&G(U,t,n),b(e),t=I(t,!0),b(n),a(z,t)?(n.enumerable?(a(e,N)&&e[N][t]&&(e[N][t]=!1),n=M(n,{enumerable:w(0,!1)})):(a(e,N)||E(e,N,w(1,{})),e[N][t]=!0),
W(e,t,n)):E(e,t,n)},K=function(e,t){b(e);for(var n,i=v(t=S(t)),a=0,r=i.length;r>a;)G(e,n=i[a++],t[n]);return e},q=function(e,t){return void 0===t?M(e):K(M(e),t)},X=function(e){var t=O.call(this,e=I(e,!0));return!(this===F&&a(z,e)&&!a(U,e))&&(!(t||!a(this,e)||!a(z,e)||a(this,N)&&this[N][e])||t)},Z=function(e,t){if(e=S(e),t=I(t,!0),e!==F||!a(z,t)||a(U,t)){var n=x(e,t);return!n||!a(z,t)||a(e,N)&&e[N][t]||(n.enumerable=!0),n}},J=function(e){
for(var t,n=A(S(e)),i=[],r=0;n.length>r;)a(z,t=n[r++])||t==N||t==l||i.push(t);return i},$=function(e){for(var t,n=e===F,i=A(n?U:S(e)),r=[],s=0;i.length>s;)!a(z,t=i[s++])||n&&!a(F,t)||r.push(z[t]);return r};B||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(U,n),a(this,N)&&a(this[N],e)&&(this[N][e]=!1),W(this,e,w(1,n))};return r&&H&&W(F,e,{configurable:!0,set:t}),Y(e)},
o(k.prototype,"toString",function(){return this._k}),D.f=Z,P.f=G,n(980).f=C.f=J,n(442).f=X,n(618).f=$,r&&!n(616)&&o(F,"propertyIsEnumerable",X,!0),f.f=function(e){return Y(p(e))}),s(s.G+s.W+s.F*!B,{Symbol:k});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)p(ee[te++]);for(var ee=T(p.store),te=0;ee.length>te;)g(ee[te++]);s(s.S+s.F*!B,"Symbol",{for:function(e){return a(j,e+="")?j[e]:j[e]=k(e)
},keyFor:function(e){if(Q(e))return m(j,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!B,"Object",{create:q,defineProperty:G,defineProperties:K,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:$}),L&&s(s.S+s.F*(!B||u(function(){var e=k();return"[null]"!=_([e])||"{}"!=_({a:e})||"{}"!=_(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Q(e)){
for(var t,n,i=[e],a=1;arguments.length>a;)i.push(arguments[a++]);return t=i[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!Q(t))return t}),i[1]=t,_.apply(L,i)}}}),k.prototype[R]||n(280)(k.prototype,R,k.prototype.valueOf),d(k,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(){var e=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],
arguments[1]),t=arguments[2];switch(e.type){case c.HOVER:break;case d.ADD_SOURCE:case d.ADD_TARGET:case d.REMOVE_TARGET:case d.REMOVE_SOURCE:return h;case c.BEGIN_DRAG:case c.PUBLISH_DRAG_SOURCE:case c.END_DRAG:case c.DROP:default:return p}var n=e.targetIds,i=t.targetIds,a=(0,o.default)(n,i),r=!1;if(0===a.length){for(var s=0;s<n.length;s++)if(n[s]!==i[s]){r=!0;break}}else r=!0;if(!r)return h;var l=i[i.length-1],u=n[n.length-1];return l!==u&&(l&&a.push(l),u&&a.push(u)),a}function r(e,t){
return e!==h&&(e===p||void 0===t||(0,u.default)(t,e).length>0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a,t.areDirty=r;var s=n(3175),o=i(s),l=n(3168),u=i(l),c=n(451),d=n(452),h=[],p=[]},function(e,t,n){"use strict";function i(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1];switch(t.type){case l.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,
initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case l.HOVER:return i(e.clientOffset,t.clientOffset)?e:o({},e,{clientOffset:t.clientOffset});case l.END_DRAG:case l.DROP:return u;default:return e}}function r(e){var t=e.clientOffset,n=e.initialClientOffset,i=e.initialSourceClientOffset;return t&&n&&i?{x:t.x+i.x-n.x,y:t.y+i.y-n.y}:null}function s(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}Object.defineProperty(t,"__esModule",{value:!0})
;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=a,t.getSourceClientOffset=r,t.getDifferenceFromInitialOffset=s;var l=n(451),u={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null}},function(e,t,n){"use strict";function i(e,t){return(0,r.default)(e)?e.some(function(e){return e===t}):e===t}Object.defineProperty(t,"__esModule",{value:!0}),
t.default=i;var a=n(240),r=function(e){return e&&e.__esModule?e:{default:e}}(a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t.default},function(e,t){e.exports={innerEmptyPage:"InnerEmptyPage-innerEmptyPage-1MHKZ EmptyPage-emptyPage-2AM9u",innerEmptyPageContent:"InnerEmptyPage-innerEmptyPageContent-3kRFW EmptyPage-content-10PgB"}},function(e,t){e.exports={
sidebarMessage:"SidebarMessage-sidebarMessage-D9gf1"}},function(e,t){e.exports={serverMenuItem:"ServerMenuItem-serverMenuItem-2djO5",disabledServerMenuItem:"ServerMenuItem-disabledServerMenuItem-22OGf",selectedServerMenuItem:"ServerMenuItem-selectedServerMenuItem-jaUTX",serverMenuItemContainer:"ServerMenuItem-serverMenuItemContainer-1DS9V",serverMenuTitle:"ServerMenuItem-serverMenuTitle-1s5qR",serverMenuFriendlyName:"ServerMenuItem-serverMenuFriendlyName-37Gt7",
serverMenuDetails:"ServerMenuItem-serverMenuDetails-1-Rfq",serverMenuIconContainer:"ServerMenuItem-serverMenuIconContainer-2WtBG",serverMenuIcon:"ServerMenuItem-serverMenuIcon-2zKCW",selectedIcon:"ServerMenuItem-selectedIcon-dhK05",secureIcon:"ServerMenuItem-secureIcon-3-O-_"}},,,,function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <li><a class="btn-gray change-pane-btn general-btn" data-pane="general" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> '+v(i(n(0)).call(e,"General",{hash:{},data:t}))+" </a></li> "}function l(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn tags-btn" data-pane="tags" href="#"> <i class="modal-nav-icon glyphicon tags"></i> '+v(i(n(0)).call(e,"Tags",{hash:{},data:t}))+" </a></li> "}function u(e,t){var a=""
;return a+=' <li><a class="btn-gray change-pane-btn sharing-btn" data-pane="sharing" href="#"> <i class="modal-nav-icon glyphicon parents"></i> '+v(i(n(0)).call(e,"Sharing",{hash:{},data:t}))+" </a></li> "}function c(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn poster-btn" data-pane="poster" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+v(i(n(0)).call(e,"Poster",{hash:{},data:t}))+" </a></li> "}function d(e,t){var a=""
;return a+=' <li><a class="btn-gray change-pane-btn banner-btn" data-pane="banner" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+v(i(n(0)).call(e,"Banner",{hash:{},data:t}))+" </a></li> "}function h(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn art-btn" data-pane="art" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+v(i(n(0)).call(e,"Background",{hash:{},data:t}))+" </a></li> "}function p(e,t){var a=""
;return a+=' <li><a class="btn-gray change-pane-btn info-btn" data-pane="info" href="#"> <i class="modal-nav-icon glyphicon circle-info"></i> '+v(i(n(0)).call(e,"Info",{hash:{},data:t}))+" </a></li> "}function f(e,t){var a="";return a+=' <li><a class="btn-gray change-pane-btn advanced-btn" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+v(i(n(0)).call(e,"Advanced",{hash:{},data:t}))+" </a></li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
s=s||{};var g,m="",v=this.escapeExpression,y=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon pencil"></i> '+v((g=t&&t.paneTitle,
"function"==typeof g?g.apply(t):g))+'</h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar hidden"> <ul class="list modal-nav-list"> ',g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.general),{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.tags),{hash:{},inverse:y.noop,fn:y.program(3,l,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,
null==g||g===!1?g:g.sharing),{hash:{},inverse:y.noop,fn:y.program(5,u,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.poster),{hash:{},inverse:y.noop,fn:y.program(7,c,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.banner),{hash:{},inverse:y.noop,fn:y.program(9,d,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.art),{hash:{},inverse:y.noop,fn:y.program(11,h,s),data:s}),
(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.info),{hash:{},inverse:y.noop,fn:y.program(13,p,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.panes,null==g||g===!1?g:g.advanced),{hash:{},inverse:y.noop,fn:y.program(15,f,s),data:s}),(g||0===g)&&(m+=g),
m+=' </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> <div class="loading loading-inline"></div> </div> </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+v(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+v(i(n(0)).call(t,"Save Changes",{
hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";function i(e){this.string=e}i.prototype.toString=function(){return""+this.string},t.default=i},function(e,t){!function(n){if("object"==typeof t&&void 0!==e)e.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.Hls=n()}}(function(){return function e(t,n,i){
function a(s,o){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return a(n?n:e)},c,c.exports,e,t,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<i.length;s++)a(i[s]);return a}({1:[function(e,t,n){function i(){this._events=this._events||{},
this._maxListeners=this._maxListeners||void 0}function a(e){return"function"==typeof e}function r(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!r(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){
var t,n,i,r,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],o(n))return!1;if(a(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:
r=Array.prototype.slice.call(arguments,1),n.apply(this,r)}else if(s(n))for(r=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,r);return!0},i.prototype.addListener=function(e,t){var n;if(!a(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,a(t.listener)?t.listener:t),
this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(n=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),
"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!a(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},i.prototype.removeListener=function(e,t){var n,i,r,o;if(!a(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],r=n.length,i=-1,
n===t||a(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(o=r;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){i=o;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this
;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],a(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){
return this._events&&this._events[e]?a(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(a(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],2:[function(e,t,n){var i=arguments[3],a=arguments[4],r=arguments[5],s=JSON.stringify;t.exports=function(e,t){function n(e){m[e]=!0;for(var t in a[e][1]){var i=a[e][1][t];m[i]||n(i)}}
for(var o,l=Object.keys(r),u=0,c=l.length;u<c;u++){var d=l[u],h=r[d].exports;if(h===e||h&&h.default===e){o=d;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var p={},u=0,c=l.length;u<c;u++){var d=l[u];p[d]=d}a[o]=[Function(["require","module","exports"],"("+e+")(self)"),p]}var f=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[o]=o,a[f]=[Function(["require"],"var f = require("+s(o)+");(f.default ? f.default : f)(self);"),g];var m={};n(f)
;var v="("+i+")({"+Object.keys(m).map(function(e){return s(e)+":["+a[e][0]+","+s(a[e][1])+"]"}).join(",")+"},{},["+s(f)+"])",y=window.URL||window.webkitURL||window.mozURL||window.msURL,b=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return b;var S=y.createObjectURL(b),I=new Worker(S);return I.objectURL=S,I}},{}],3:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(28),p=i(h),f=e(24),g=e(43),m=e(8),v=i(m),y=function(e){function t(e){a(this,t)
;var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR));return n.lastLoadedFragLevel=0,n._autoLevelCapping=-1,n._nextAutoLevel=-1,n.hls=e,n.onCheck=n.abandonRulesCheck.bind(n),n}return s(t,e),o(t,[{key:"destroy",value:function(){this.clearTimer(),d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag;if("main"===t.type){
if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this.bwEstimator){var n=this.hls,i=e.frag.level,a=n.levels[i].details.live,r=n.config,s=void 0,o=void 0;a?(s=r.abrEwmaFastLive,o=r.abrEwmaSlowLive):(s=r.abrEwmaFastVoD,o=r.abrEwmaSlowVoD),this.bwEstimator=new v.default(n,o,s,r.abrEwmaDefaultEstimate)}this.fragCurrent=t}}},{key:"abandonRulesCheck",value:function(){var e=this.hls,t=e.media,n=this.fragCurrent,i=n.loader
;if(!i||i.stats&&i.stats.aborted)return g.logger.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var a=i.stats;if(t&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var r=performance.now()-a.trequest,s=Math.abs(t.playbackRate);if(r>500*n.duration/s){
var o=e.levels,l=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/r),c=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*o[n.level].bitrate/8)),d=t.currentTime,h=(c-a.loaded)/l,f=(p.default.bufferInfo(t,d,e.config.maxBufferHole).end-d)/s;if(f<2*n.duration/s&&h>f){var m=void 0,v=void 0;for(v=n.level-1;v>=0&&!((m=n.duration*o[v].bitrate/(6.4*l))<f);v--);m<h&&(v=Math.max(0,v),
g.logger.warn("loading too slow, abort fragment loading and switch to level "+v+":fragLoadedDelay["+v+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+m.toFixed(1)+"<"+h.toFixed(1)+":"+f.toFixed(1)),e.nextLoadLevel=v,this.bwEstimator.sample(r,a.loaded),i.abort(),this.clearTimer(),e.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:a}))}}}}},{key:"onFragLoaded",value:function(e){var t=e.frag;if("main"===t.type&&(this.clearTimer(),this.lastLoadedFragLevel=t.level,
this._nextAutoLevel=-1,e.frag.bitrateTest)){var n=e.stats;n.tparsed=n.tbuffered=n.tload,this.onFragBuffered(e)}}},{key:"onFragBuffered",value:function(e){var t=e.stats,n=e.frag;if(t.aborted!==!0&&1===n.loadCounter&&"main"===n.type&&(!n.bitrateTest||t.tload===t.tbuffered)){var i=t.tbuffered-t.trequest
;g.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this.bwEstimator.sample(i,t.loaded),n.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}}},{key:"onError",value:function(e){switch(e.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}}},{
key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"findBestLevel",value:function(e,t,n,i,a,r,s,o,l){for(var u=a;u>=i;u--){var c=l[u],d=c.details,h=d?d.totalduration/d.fragments.length:t,p=!!d&&d.live,f=void 0;f=u<=e?s*n:o*n;var m=l[u].bitrate,v=m*h/f;if(g.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(f)+"/"+m+"/"+h+"/"+r+"/"+v),f>m&&(!v||p||v<r))return u}return-1}},{key:"autoLevelCapping",
get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping=e}},{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator,n=this.hls,i=n.levels,a=n.config.minAutoBitrate;if(!(e===-1||t&&t.canEstimate()))return Math.min(e,this.maxAutoLevel);var r=this.nextABRAutoLevel;if(e!==-1&&(r=Math.min(e,r)),void 0!==a)for(;i[r].bitrate<a;)r++;return r},set:function(e){this._nextAutoLevel=e}},{key:"minAutoLevel",get:function(){
for(var e=this.hls,t=e.levels,n=e.config.minAutoBitrate,i=0;i<t.length;i++)if(t[i].bitrate>n)return i;return 0}},{key:"maxAutoLevel",get:function(){var e=this.hls.levels,t=this._autoLevelCapping;return t===-1&&e&&e.length?e.length-1:t}},{key:"nextABRAutoLevel",get:function(){
var e=this.hls,t=this.maxAutoLevel,n=e.levels,i=e.config,a=this.minAutoLevel,r=e.media,s=this.lastLoadedFragLevel,o=this.fragCurrent?this.fragCurrent.duration:0,l=r?r.currentTime:0,u=r&&0!==r.playbackRate?Math.abs(r.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,d=(p.default.bufferInfo(r,l,i.maxBufferHole).end-l)/u,h=this.findBestLevel(s,o,c,a,t,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor,n);if(h>=0)return h
;g.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var f=i.maxStarvationDelay,m=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(0===d){var y=this.bitrateTestDelay;y&&(f=i.maxLoadingDelay-y,g.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),m=v=1)}return h=this.findBestLevel(s,o,c,a,t,d+f,m,v,n),Math.max(h,0)}}]),t}(d.default);n.default=y},{24:24,25:25,26:26,
28:28,43:43,8:8}],4:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}
}(),l=e(39),u=i(l),c=e(28),d=i(c),h=e(20),p=i(h),f=e(26),g=i(f),m=e(25),v=i(m),y=e(29),b=i(y),S=e(45),I=i(S),w=e(24),M=e(43),C={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR"},D=function(e){function t(e){a(this,t)
;var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.AUDIO_TRACKS_UPDATED,g.default.AUDIO_TRACK_SWITCH,g.default.AUDIO_TRACK_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED));return n.config=e.config,n.audioCodecSwap=!1,n.ticks=0,
n.ontick=n.tick.bind(n),n}return s(t,e),o(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=C.STOPPED}},{key:"startLoad",value:function(e){if(this.tracks){var t=this.media,n=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,t&&n?(M.logger.log("configure startPosition @"+n),
this.state=C.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=C.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=C.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=C.STOPPED}},{key:"tick",value:function(){
1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var e,t,n,i=this.hls,a=i.config;switch(this.state){case C.ERROR:case C.PAUSED:break;case C.STARTING:this.state=C.WAITING_TRACK,this.loadedmetadata=!1;break;case C.IDLE:if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;e=this.loadedmetadata?this.media.currentTime:this.nextLoadPosition
;var r=this.mediaBuffer?this.mediaBuffer:this.media,s=d.default.bufferInfo(r,e,a.maxBufferHole),o=s.len,l=s.end,c=this.fragPrevious;if(o<a.maxMaxBufferLength&&this.trackId<this.tracks.length){if(void 0===(n=this.tracks[this.trackId].details)){this.state=C.WAITING_TRACK;break}if(!n.live&&c&&c.sn===n.endSN&&(!this.media.seeking||this.media.duration-l<c.duration/2)){this.hls.trigger(g.default.BUFFER_EOS,{type:"audio"}),this.state=C.ENDED;break}
var h=n.fragments,p=h.length,f=h[0].start,m=h[p-1].start+h[p-1].duration,v=void 0;if(l<f?v=h[0]:function(){var e=void 0,t=a.maxFragLookUpTolerance;l<m?(l>m-t&&(t=0),e=u.default.search(h,function(e){return e.start+e.duration-t<=l?1:e.start-t>l?-1:0})):e=h[p-1],e&&(v=e,f=e.start,c&&v.level===c.level&&v.sn===c.sn&&(v.sn<n.endSN?(v=h[v.sn+1-n.startSN],M.logger.log("SN just loaded, load next one: "+v.sn)):v=null))}(),
v)if(null!=v.decryptdata.uri&&null==v.decryptdata.key)M.logger.log("Loading key for "+v.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId),this.state=C.KEY_LOADING,i.trigger(g.default.KEY_LOADING,{frag:v});else{if(M.logger.log("Loading "+v.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId+", currentTime:"+e+",bufferEnd:"+l.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,v.loadCounter){v.loadCounter++;var y=a.fragLoadingLoopThreshold
;if(v.loadCounter>y&&Math.abs(this.fragLoadIdx-v.loadIdx)<y)return void i.trigger(g.default.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:v})}else v.loadCounter=1;v.loadIdx=this.fragLoadIdx,this.fragCurrent=v,this.startFragRequested=!0,i.trigger(g.default.FRAG_LOADING,{frag:v}),this.state=C.FRAG_LOADING}}break;case C.WAITING_TRACK:t=this.tracks[this.trackId],t&&t.details&&(this.state=C.IDLE);break;case C.FRAG_LOADING_WAITING_RETRY:
var b=performance.now(),S=this.retryDate;r=this.media;var I=r&&r.seeking;(!S||b>=S||I)&&(M.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=C.IDLE);break;case C.STOPPED:case C.FRAG_LOADING:case C.PARSING:case C.PARSED:case C.ENDED:}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),
t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(M.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.tracks;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),
e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===C.ENDED&&(this.state=C.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{
key:"onAudioTracksUpdated",value:function(e){M.logger.log("audio tracks updated"),this.tracks=e.audioTracks}},{key:"onAudioTrackSwitch",value:function(e){var t=!!e.url;this.trackId=e.id,this.state=C.IDLE,this.fragCurrent=null,this.state=C.PAUSED,t?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),this.tick()}},{
key:"onAudioTrackLoaded",value:function(e){var t=e.details,n=e.id,i=this.tracks[n],a=t.totalduration;if(M.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.PTSKnown=!1,i.details=t,!this.startFragRequested){if(this.startPosition===-1){var r=t.startTimeOffset;isNaN(r)?this.startPosition=0:(M.logger.log("start time offset found in playlist, adjust startPosition to "+r),this.startPosition=r)}this.nextLoadPosition=this.startPosition}
this.state===C.WAITING_TRACK&&(this.state=C.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===C.KEY_LOADING&&(this.state=C.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent;if(this.state===C.FRAG_LOADING&&t&&"audio"===e.frag.type&&e.frag.level===t.level&&e.frag.sn===t.sn){this.state=C.PARSING,this.stats=e.stats;var n=this.tracks[this.trackId],i=n.details,a=i.totalduration,r=t.start,s=t.level,o=t.sn,l=this.config.defaultAudioCodec||n.audioCodec
;this.pendingAppending=0,this.demuxer||(this.demuxer=new p.default(this.hls,"audio")),M.logger.log("Demuxing "+o+" of ["+i.startSN+" ,"+i.endSN+"],track "+s);var u=i.PTSKnown||!i.live;this.demuxer.push(e.payload,l,null,r,t.cc,s,o,a,t.decryptdata,u)}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent;if(t&&"audio"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING){var n=e.tracks,i=void 0;if(i=n.audio){i.levelCodec="mp4a.40.2",i.id=e.id,
this.hls.trigger(g.default.BUFFER_CODECS,n),M.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var a=i.initSegment;a&&(this.pendingAppending++,this.hls.trigger(g.default.BUFFER_APPENDING,{type:"audio",data:a,parent:"audio",content:"initSegment"})),this.tick()}}}},{key:"onFragParsingData",value:function(e){var t=this,n=this.fragCurrent;if(n&&"audio"===e.id&&e.sn===n.sn&&e.level===n.level&&this.state===C.PARSING){
var i=this.tracks[this.trackId],a=this.fragCurrent;M.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),b.default.updateFragPTSDTS(i.details,a.sn,e.startPTS,e.endPTS),[e.data1,e.data2].forEach(function(n){n&&(t.pendingAppending++,t.hls.trigger(g.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"audio",content:"data"}))}),this.nextLoadPosition=e.endPTS,this.tick()}}},{key:"onFragParsed",
value:function(e){var t=this.fragCurrent;t&&"audio"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING&&(this.stats.tparsed=performance.now(),this.state=C.PARSED,this._checkAppendedParsed())}},{key:"onBufferCreated",value:function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0)}},{key:"onBufferAppended",value:function(e){if("audio"===e.parent)switch(this.state){case C.PARSING:case C.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{
key:"_checkAppendedParsed",value:function(){if(this.state===C.PARSED&&0===this.pendingAppending){var e=this.fragCurrent,t=this.stats;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;M.logger.log("audio buffered : "+I.default.toString(n.buffered)),this.state=C.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){
case w.ErrorDetails.FRAG_LOAD_ERROR:case w.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!e.fatal){var n=this.fragLoadError;n?n++:n=1;var i=this.config;if(n<=i.fragLoadingMaxRetry){this.fragLoadError=n,t.loadCounter=0;var a=Math.min(Math.pow(2,n-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);M.logger.warn("audioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=performance.now()+a,this.state=C.FRAG_LOADING_WAITING_RETRY
}else M.logger.error("audioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=C.ERROR}break;case w.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case w.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case w.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case w.ErrorDetails.KEY_LOAD_ERROR:case w.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==C.ERROR&&(this.state=e.fatal?C.ERROR:C.IDLE,
M.logger.warn("audioStreamController: "+e.details+" while loading frag,switch to "+this.state+" state ..."))}}},{key:"onBufferFlushed",value:function(){this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=C.IDLE,this.fragPrevious=null,this.tick()}}]),t}(v.default);n.default=D},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,45:45}],5:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(43),p=function(e){function t(e){return a(this,t),
r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.AUDIO_TRACK_LOADED))}return s(t,e),o(t,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(){this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(e){var t=this,n=e.audioTracks||[],i=!1;this.tracks=n,this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:n});var a=0;n.forEach(function(e){
if(e.default)return t.audioTrack=a,void(i=!0);a++}),i===!1&&n.length&&(h.logger.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)}},{key:"onAudioTrackLoaded",value:function(e){e.id<this.tracks.length&&(h.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*e.details.targetduration)),!e.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))}},{
key:"setAudioTrackInternal",value:function(e){if(e>=0&&e<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=e,h.logger.log("switching to audioTrack "+e);var t=this.tracks[e],n=t.type,i=t.url;this.hls.trigger(u.default.AUDIO_TRACK_SWITCH,{id:e,type:n,url:i});var a=t.details;!i||void 0!==a&&a.live!==!0||(h.logger.log("(re)loading playlist for audioTrack "+e),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:i,id:e}))}}},{key:"audioTracks",get:function(){
return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.trackId===e&&void 0!==this.tracks[e].details||this.setAudioTrackInternal(e)}}]),t}(d.default);n.default=p},{25:25,26:26,43:43}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){
if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{
value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(43),p=e(24),f=function(e){function t(e){a(this,t)
;var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_UPDATED));return n._msDuration=null,n._levelDuration=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n}return s(t,e),o(t,[{key:"destroy",value:function(){
d.default.prototype.destroy.call(this)}},{key:"onManifestParsed",value:function(e){var t=e.audio,n=e.video,i=0;e.altAudio&&(t||n)&&(i=(t?1:0)+(n?1:0),h.logger.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i}},{key:"onMediaAttaching",value:function(e){var t=this.media=e.media;if(t){var n=this.mediaSource=new MediaSource;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),
n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),t.src=URL.createObjectURL(n)}}},{key:"onMediaDetaching",value:function(){h.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){h.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),
e.removeEventListener("sourceclose",this.onmsc),this.media&&(this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(u.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){h.logger.log("media source opened"),this.hls.trigger(u.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource
;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var e=this.pendingTracks,t=Object.keys(e).length;t&&(this.sourceBufferNb<=t||0===this.sourceBufferNb)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){h.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){h.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){
this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1,this.hls.trigger(u.default.BUFFER_APPENDED,{parent:this.parent}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()}},{key:"onSBUpdateError",value:function(e){h.logger.error("sourceBuffer error:"+e),this.hls.trigger(u.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferReset",value:function(){var e=this.sourceBuffer
;for(var t in e){var n=e[t];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(e){if(0===Object.keys(this.sourceBuffer).length){for(var t in e)this.pendingTracks[t]=e[t];var n=this.mediaSource;n&&"open"===n.readyState&&this.checkPendingTracks()}}},{key:"createSourceBuffers",value:function(e){
var t=this.sourceBuffer,n=this.mediaSource;for(var i in e)if(!t[i]){var a=e[i],r=a.levelCodec||a.codec,s=a.container+";codecs="+r;h.logger.log("creating sourceBuffer("+s+")");try{var o=t[i]=n.addSourceBuffer(s);o.addEventListener("updateend",this.onsbue),o.addEventListener("error",this.onsbe),a.buffer=o}catch(e){h.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(u.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_ADD_CODEC_ERROR,
fatal:!1,err:e,mimeType:s})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:e})}},{key:"onBufferAppending",value:function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())}},{key:"onBufferAppendFail",value:function(e){h.logger.error("sourceBuffer error:"+e.event),this.hls.trigger(u.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1,frag:this.fragCurrent})}},{key:"onBufferEos",value:function(e){
var t=this.sourceBuffer,n=e.type;for(var i in t)n&&i!==n||t[i].ended||(t[i].ended=!0,h.logger.log(i+" sourceBuffer now EOS"));this.checkEos()}},{key:"checkEos",value:function(){var e=this.sourceBuffer,t=this.mediaSource;if(!t||"open"!==t.readyState)return void(this._needsEos=!1);for(var n in e){if(!e[n].ended)return;if(e[n].updating)return void(this._needsEos=!0)}h.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment"),t.endOfStream(),
this._needsEos=!1}},{key:"onBufferFlushing",value:function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()}},{key:"onLevelUpdated",value:function(e){var t=e.details;0!==t.fragments.length&&(this._levelDuration=t.totalduration+t.fragments[0].start,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){var e=this.media,t=this.mediaSource,n=this.sourceBuffer,i=this._levelDuration
;if(null!==i&&e&&t&&n&&0!==e.readyState&&"open"===t.readyState){for(var a in n)if(n[a].updating)return;null===this._msDuration&&(this._msDuration=t.duration),i>this._msDuration&&i>e.duration&&(h.logger.log("Updating mediasource duration to "+i.toFixed(3)),this._msDuration=t.duration=i)}}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),
this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;for(var i in n)t+=n[i].buffered.length;this.appended=t,this.hls.trigger(u.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var e=this.hls,t=this.sourceBuffer,n=this.segments;if(Object.keys(t).length){if(this.media.error)return this.segments=[],void h.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){
var i=n.shift();try{var a=i.type;t[a]?(t[a].ended=!1,this.parent=i.parent,t[a].appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(t){h.logger.error("error while trying to append buffer:"+t.message),n.unshift(i);var r={type:p.ErrorTypes.MEDIA_ERROR};if(22===t.code)return this.segments=[],r.details=p.ErrorDetails.BUFFER_FULL_ERROR,void e.trigger(u.default.ERROR,r);if(this.appendError?this.appendError++:this.appendError=1,
r.details=p.ErrorDetails.BUFFER_APPEND_ERROR,r.frag=this.fragCurrent,this.appendError>e.config.appendErrorMaxRetry)return h.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],r.fatal=!0,void e.trigger(u.default.ERROR,r);r.fatal=!1,e.trigger(u.default.ERROR,r)}}}}},{key:"flushBuffer",value:function(e,t,n){var i,a,r,s,o,l,u=this.sourceBuffer;if(Object.keys(u).length){if(h.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime+"/"+e+"/"+t),
this.flushBufferCounter<this.appended){for(var c in u)if(!n||c===n){if(i=u[c],i.ended=!1,i.updating)return h.logger.warn("cannot flush, sb updating in progress"),!1;for(a=0;a<i.buffered.length;a++)if(r=i.buffered.start(a),s=i.buffered.end(a),navigator.userAgent.toLowerCase().indexOf("firefox")!==-1&&t===Number.POSITIVE_INFINITY?(o=e,l=t):(o=Math.max(r,e),l=Math.min(s,t)),Math.min(l,s)-o>.5)return this.flushBufferCounter++,
h.logger.log("flush "+c+" ["+o+","+l+"], of ["+r+","+s+"], pos:"+this.media.currentTime),i.remove(o,l),!1}}else h.logger.warn("abort flushing too many retries");h.logger.log("buffer flushed")}return!0}}]),t}(d.default);n.default=f},{24:24,25:25,26:26,43:43}],7:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){
if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{
value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=function(e){function t(e){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED))}return s(t,e),
o(t,[{key:"destroy",value:function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))}},{key:"onFpsDropLevelCapping",value:function(e){this.restrictedLevels||(this.restrictedLevels=[]),this.isLevelRestricted(e.droppedLevel)||this.restrictedLevels.push(e.droppedLevel)}},{key:"onMediaAttaching",value:function(e){this.media=e.media instanceof HTMLVideoElement?e.media:null}
},{key:"onManifestParsed",value:function(e){this.hls.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=e.levels,this.hls.firstLevel=this.getMaxLevel(e.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"detectPlayerSize",value:function(){if(this.media){var e=this.levels?this.levels.length:0;e&&(this.hls.autoLevelCapping=this.getMaxLevel(e-1),
this.hls.autoLevelCapping>this.autoLevelCapping&&this.hls.streamController.nextLevelSwitch(),this.autoLevelCapping=this.hls.autoLevelCapping)}}},{key:"getMaxLevel",value:function(e){var t=0,n=void 0,i=void 0,a=this.mediaWidth,r=this.mediaHeight,s=0,o=0;for(n=0;n<=e&&(i=this.levels[n],!this.isLevelRestricted(n))&&(t=n,s=i.width,o=i.height,!(a<=s||r<=o));n++);return t}},{key:"isLevelRestricted",value:function(e){return!(!this.restrictedLevels||this.restrictedLevels.indexOf(e)===-1)}},{
key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}},{key:"mediaWidth",get:function(){var e=void 0;return this.media&&(e=this.media.width||this.media.clientWidth||this.media.offsetWidth,e*=this.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e=void 0;return this.media&&(e=this.media.height||this.media.clientHeight||this.media.offsetHeight,e*=this.contentScaleFactor),e}}]),t}(d.default);n.default=h},{25:25,26:26}],8:[function(e,t,n){
"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(42),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(){
function e(t,n,a,r){i(this,e),this.hls=t,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new s.default(n),this.fast_=new s.default(a)}return a(e,[{key:"sample",value:function(e,t){e=Math.max(e,this.minDelayMs_);var n=8e3*t/e,i=e/1e3;this.fast_.sample(i,n),this.slow_.sample(i,n)}},{key:"canEstimate",value:function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_}},{key:"getEstimate",value:function(){
return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"destroy",value:function(){}}]),e}();n.default=o},{42:42}],9:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
;return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
;i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(43),p=function(e){function t(e){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING))}return s(t,e),o(t,[{key:"destroy",value:function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1}},{
key:"onMediaAttaching",value:function(e){this.hls.config.capLevelOnFPSDrop&&(this.video=e.media instanceof HTMLVideoElement?e.media:null,"function"==typeof this.video.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),this.hls.config.fpsDroppedMonitoringPeriod))}},{key:"checkFPS",value:function(e,t,n){var i=performance.now();if(t){if(this.lastTime){
var a=i-this.lastTime,r=n-this.lastDroppedFrames,s=t-this.lastDecodedFrames,o=1e3*r/a;if(this.hls.trigger(u.default.FPS_DROP,{currentDropped:r,currentDecoded:s,totalDroppedFrames:n}),o>0&&r>this.hls.config.fpsDroppedMonitoringThreshold*s){var l=this.hls.currentLevel;h.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(this.hls.autoLevelCapping===-1||this.hls.autoLevelCapping>=l)&&(l-=1,this.hls.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:l,
droppedLevel:this.hls.currentLevel}),this.hls.autoLevelCapping=l,this.hls.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}},{key:"checkFPSInterval",value:function(){if(this.video)if(this.isVideoPlaybackQualityAvailable){var e=this.video.getVideoPlaybackQuality();this.checkFPS(this.video,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(this.video,this.video.webkitDecodedFrameCount,this.video.webkitDroppedFrameCount)}}]),t
}(d.default);n.default=p},{25:25,26:26,43:43}],10:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),
Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(43),p=e(24),f=e(28),g=i(f),m=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.ERROR));return n.ontick=n.tick.bind(n),n._manualLevel=n._autoLevelCapping=-1,n}return s(t,e),o(t,[{key:"destroy",value:function(){this.timer&&(clearTimeout(this.timer),
this.timer=null),this._manualLevel=-1}},{key:"startLoad",value:function(){this.canload=!0,this.timer&&this.tick()}},{key:"stopLoad",value:function(){this.canload=!1}},{key:"onManifestLoaded",value:function(e){var t,n,i=[],a=[],r={},s=!1,o=!1,l=this.hls;if(e.levels.forEach(function(e){e.videoCodec&&(s=!0),(e.audioCodec||e.attrs&&e.attrs.AUDIO)&&(o=!0);var t=r[e.bitrate];void 0===t?(r[e.bitrate]=i.length,e.url=[e.url],e.urlId=0,i.push(e)):i[t].url.push(e.url)}),s&&o?i.forEach(function(e){
e.videoCodec&&a.push(e)}):a=i,a=a.filter(function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||function(e){return MediaSource.isTypeSupported("audio/mp4;codecs="+e)}(t))&&(!n||function(e){return MediaSource.isTypeSupported("video/mp4;codecs="+e)}(n))}),a.length){for(t=a[0].bitrate,a.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=a,n=0;n<a.length;n++)if(a[n].bitrate===t){this._firstLevel=n,h.logger.log("manifest loaded,"+a.length+" level(s) found, first bitrate:"+t);break}
l.trigger(u.default.MANIFEST_PARSED,{levels:this._levels,firstLevel:this._firstLevel,stats:e.stats,audio:o,video:s,altAudio:e.audioTracks.length>0})}else l.trigger(u.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:l.url,reason:"no level with compatible codecs found in manifest"})}},{key:"setLevelInternal",value:function(e){var t=this._levels;if(e>=0&&e<t.length){this.timer&&(clearTimeout(this.timer),this.timer=null),
this._level!==e&&(h.logger.log("switching to level "+e),this._level=e),this.hls.trigger(u.default.LEVEL_SWITCH,{level:e});var n=t[e],i=n.details;if(!i||i.live===!0){var a=n.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:n.url[a],level:e,id:a})}}else this.hls.trigger(u.default.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})}},{key:"onError",value:function(e){if(!e.fatal){
var t=e.details,n=this.hls,i=void 0,a=void 0,r=!1;switch(t){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:i=e.frag.level;break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:i=e.context.level,r=!0}if(void 0!==i)if(a=this._levels[i],a.urlId<a.url.length-1)a.urlId++,a.details=void 0,
h.logger.warn("level controller,"+t+" for level "+i+": switching to redundant stream id "+a.urlId);else{var s=this._manualLevel===-1&&i;if(s)h.logger.warn("level controller,"+t+": emergency switch-down for next fragment"),n.abrController.nextAutoLevel=0;else if(a&&a.details&&a.details.live)h.logger.warn("level controller,"+t+" on live stream, discard"),r&&(this._level=void 0);else if(t===p.ErrorDetails.LEVEL_LOAD_ERROR||t===p.ErrorDetails.LEVEL_LOAD_TIMEOUT){
var o=this.hls,l=o.media,c=l&&g.default.isBuffered(l,l.currentTime)&&g.default.isBuffered(l,l.currentTime+.5);if(c){var d=o.config.levelLoadingRetryDelay;h.logger.warn("level controller,"+t+", but media buffered, retry in "+d+"ms"),this.timer=setTimeout(this.ontick,d)}else h.logger.error("cannot recover "+t+" error"),this._level=void 0,this.timer&&(clearTimeout(this.timer),this.timer=null),e.fatal=!0,o.trigger(u.default.ERROR,e)}}}}},{key:"onLevelLoaded",value:function(e){
if(e.level===this._level){var t=e.details;if(t.live){var n=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),i=this._levels[e.level],a=i.details;a&&t.endSN===a.endSN&&(n/=2,h.logger.log("same live playlist, reload twice faster")),n-=performance.now()-e.stats.trequest,n=Math.max(1e3,Math.round(n)),h.logger.log("live playlist, reload in "+n+" ms"),this.timer=setTimeout(this.ontick,n)}else this.timer=null}}},{key:"tick",value:function(){var e=this._level
;if(void 0!==e&&this.canload){var t=this._levels[e],n=t.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:t.url[n],level:e,id:n})}}},{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this._level},set:function(e){var t=this._levels;t&&t.length>e&&(this._level===e&&void 0!==t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(e){this._manualLevel=e,void 0===this._startLevel&&(this._startLevel=e),
e!==-1&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return this._manualLevel!==-1?this._manualLevel:this.hls.abrController.nextAutoLevel},set:function(e){this.level=e,
this._manualLevel===-1&&(this.hls.abrController.nextAutoLevel=e)}}]),t}(d.default);n.default=m},{24:24,25:25,26:26,28:28,43:43}],11:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),
Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(39),u=i(l),c=e(28),d=i(c),h=e(20),p=i(h),f=e(26),g=i(f),m=e(25),v=i(m),y=e(29),b=i(y),S=e(45),I=i(S),w=e(24),M=e(43),C={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"
},D=function(e){function t(e){a(this,t)
;var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.MANIFEST_LOADING,g.default.MANIFEST_PARSED,g.default.LEVEL_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_LOAD_EMERGENCY_ABORTED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.AUDIO_TRACK_SWITCH,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED))
;return n.config=e.config,n.audioCodecSwap=!1,n.ticks=0,n.ontick=n.tick.bind(n),n}return s(t,e),o(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=C.STOPPED}},{key:"startLoad",value:function(e){if(this.levels){var t=this.media,n=this.lastCurrentTime,i=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,
t&&n>0?(M.logger.log("configure startPosition @"+n.toFixed(3)),this.lastPaused||(M.logger.log("resuming video"),t.play())):this.lastCurrentTime=this.startPosition?this.startPosition:e,!this.startFragRequested){var a=i.startLevel;a===-1&&(a=0,this.bitrateTest=!0),this.level=i.nextLoadLevel=a,this.loadedmetadata=!1}this.state=C.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else M.logger.warn("cannot start loading as manifest not parsed yet"),this.state=C.STOPPED}
},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=C.STOPPED}},{key:"tick",value:function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){switch(this.state){case C.ERROR:break;case C.BUFFER_FLUSHING:this.fragLoadError=0;break;case C.IDLE:if(!this._doTickIdle())return;break
;case C.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=C.IDLE);break;case C.FRAG_LOADING_WAITING_RETRY:var t=performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(M.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=C.IDLE);break;case C.ERROR:case C.PAUSED:case C.STOPPED:case C.FRAG_LOADING:case C.PARSING:case C.PARSED:case C.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",
value:function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&!n&&(this.startFragRequested||!t.startFragPrefetch))return!0;var i=void 0;i=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var a=e.nextLoadLevel,r=this.levels[a],s=r.bitrate,o=void 0;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=d.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,i,t.maxBufferHole),u=l.len;if(u>=o)return!0
;M.logger.trace("buffer length of "+u.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=a;var c=r.details;if(void 0===c||c.live&&this.levelLastLoaded!==a)return this.state=C.WAITING_LEVEL,!0;var h=this.fragPrevious;if(!c.live&&h&&h.sn===c.endSN&&(!n.seeking&&l.len||n.duration-l.end<=h.duration/2)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(g.default.BUFFER_EOS,p),this.state=C.ENDED,!0}return this._fetchPayloadOrEos({
pos:i,bufferInfo:l,levelDetails:c})}},{key:"_fetchPayloadOrEos",value:function(e){var t=e.pos,n=e.bufferInfo,i=e.levelDetails,a=this.fragPrevious,r=this.level,s=i.fragments,o=s.length;if(0===o)return!1;var l=s[0].start,u=s[o-1].start+s[o-1].duration,c=n.end,d=void 0;if(i.live){var h=this.config.initialLiveManifestSize;if(o<h)return M.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+h),!1;if(null===(d=this._ensureFragmentAtLivePoint({levelDetails:i,
bufferEnd:c,start:l,end:u,fragPrevious:a,fragments:s,fragLen:o})))return!1}else c<l&&(d=s[0]);return d||(d=this._findFragment({start:l,fragPrevious:a,fragLen:o,fragments:s,bufferEnd:c,end:u,levelDetails:i})),!d||this._loadFragmentOrKey({frag:d,level:r,levelDetails:i,pos:t,bufferEnd:c})}},{key:"_ensureFragmentAtLivePoint",value:function(e){
var t=e.levelDetails,n=e.bufferEnd,i=e.start,a=e.end,r=e.fragPrevious,s=e.fragments,o=e.fragLen,l=this.hls.config,u=this.media,c=void 0,d=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*t.targetduration;if(n<Math.max(i,a-d)){var h=this.liveSyncPosition=this.computeLivePosition(i,t);M.logger.log("buffer end: "+n.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+h.toFixed(3)),n=h,
u&&u.readyState&&u.duration>h&&(u.currentTime=h)}if(t.PTSKnown&&n>a&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(r){var p=r.sn+1;p>=t.startSN&&p<=t.endSN&&(c=s[p-t.startSN],M.logger.log("live playlist, switching playlist, load frag with next SN: "+c.sn))}c||(c=s[Math.min(o-1,Math.round(o/2))],M.logger.log("live playlist, switching playlist, unknown, load middle frag : "+c.sn))}return c}},{key:"_findFragment",value:function(e){var t=(e.start,
e.fragPrevious),n=e.fragLen,i=e.fragments,a=e.bufferEnd,r=e.end,s=e.levelDetails,o=this.hls.config,l=void 0,c=void 0,d=o.maxFragLookUpTolerance;if(a<r?(a>r-d&&(d=0),c=u.default.search(i,function(e){return e.start+e.duration-d<=a?1:e.start-d>a&&e.start?-1:0})):c=i[n-1],c&&(l=c,c.start,t&&l.level===t.level&&l.sn===t.sn))if(l.sn<s.endSN){var h=t.deltaPTS,p=l.sn-s.startSN;h&&h>o.maxBufferHole&&t.dropped&&p?(l=i[p-1],
M.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),t.loadCounter--):(l=i[p+1],M.logger.log("SN just loaded, load next one: "+l.sn))}else l=null;return l}},{key:"_loadFragmentOrKey",value:function(e){var t=e.frag,n=e.level,i=e.levelDetails,a=e.pos,r=e.bufferEnd,s=this.hls,o=s.config;if(null==t.decryptdata.uri||null!=t.decryptdata.key){
if(M.logger.log("Loading "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+n+", currentTime:"+a.toFixed(3)+",bufferEnd:"+r.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,t.loadCounter){t.loadCounter++;var l=o.fragLoadingLoopThreshold;if(t.loadCounter>l&&Math.abs(this.fragLoadIdx-t.loadIdx)<l)return s.trigger(g.default.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:t}),!1}else t.loadCounter=1
;return t.loadIdx=this.fragLoadIdx,this.fragCurrent=t,this.startFragRequested=!0,t.autoLevel=s.autoLevelEnabled,t.bitrateTest=this.bitrateTest,s.trigger(g.default.FRAG_LOADING,{frag:t}),this.state=C.FRAG_LOADING,!0}M.logger.log("Loading key for "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+n),this.state=C.KEY_LOADING,s.trigger(g.default.KEY_LOADING,{frag:t})}},{key:"getBufferRange",value:function(e){var t,n,i=this.bufferRange;if(i)for(t=i.length-1;t>=0;t--)if(n=i[t],
e>=n.start&&e<=n.end)return n;return null}},{key:"followingBufferRange",value:function(e){return e?this.getBufferRange(e.end+.5):null}},{key:"_checkFragmentChanged",value:function(){var e,t,n=this.media;if(n&&n.readyState&&n.seeking===!1&&(t=n.currentTime,t>n.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=t),d.default.isBuffered(n,t)?e=this.getBufferRange(t):d.default.isBuffered(n,t+.1)&&(e=this.getBufferRange(t+.1)),e)){var i=e.frag;i!==this.fragPlaying&&(this.fragPlaying=i,
this.hls.trigger(g.default.FRAG_CHANGED,{frag:i}))}}},{key:"immediateLevelSwitch",value:function(){if(M.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e=this.media,t=void 0;e?(t=e.paused,e.pause()):t=!0,this.previouslyPaused=t}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=C.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,
endOffset:Number.POSITIVE_INFINITY})}},{key:"immediateLevelSwitchEnd",value:function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,d.default.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())}},{key:"nextLevelSwitch",value:function(){var e=this.media;if(e&&e.readyState){var t=void 0,n=void 0,i=void 0;if(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,n=this.getBufferRange(e.currentTime),n&&n.start>1&&(this.state=C.BUFFER_FLUSHING,
this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:n.start-1})),e.paused)t=0;else{var a=this.hls.nextLoadLevel,r=this.levels[a],s=this.fragLastKbps;t=s&&this.fragCurrent?this.fragCurrent.duration*r.bitrate/(1e3*s)+1:0}if((i=this.getBufferRange(e.currentTime+t))&&(i=this.followingBufferRange(i))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.state=C.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:i.start,
endOffset:Number.POSITIVE_INFINITY})}}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition)}},{
key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(M.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),
this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){var e=this.media,t=e?e.currentTime:void 0,n=this.config;if(M.logger.log("media seeking to "+t.toFixed(3)),this.state===C.FRAG_LOADING){var i=d.default.bufferInfo(e,t,this.config.maxBufferHole),a=this.fragCurrent;if(0===i.len&&a){var r=n.maxFragLookUpTolerance,s=a.start-r,o=a.start+a.duration+r
;t<s||t>o?(a.loader&&(M.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE):M.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===C.ENDED&&(this.state=C.IDLE);e&&(this.lastCurrentTime=t),this.state!==C.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*n.fragLoadingLoopThreshold),this.tick()}},{
key:"onMediaSeeked",value:function(){M.logger.log("media seeked to "+this.media.currentTime.toFixed(3)),this.tick()}},{key:"onMediaEnded",value:function(){M.logger.log("media ended"),this.startPosition=this.lastCurrentTime=0}},{key:"onManifestLoading",value:function(){M.logger.log("trigger BUFFER_RESET"),this.hls.trigger(g.default.BUFFER_RESET),this.bufferRange=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(e){var t,n=!1,i=!1
;e.levels.forEach(function(e){(t=e.audioCodec)&&(t.indexOf("mp4a.40.2")!==-1&&(n=!0),t.indexOf("mp4a.40.5")!==-1&&(i=!0))}),this.audioCodecSwitch=n&&i,this.audioCodecSwitch&&M.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startLevelLoaded=!1,this.startFragRequested=!1;var a=this.config;a.autoStartLoad&&this.hls.startLoad(a.startPosition)}},{key:"onLevelLoaded",value:function(e){
var t=e.details,n=e.level,i=this.levels[n],a=t.totalduration,r=0;if(M.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),this.levelLastLoaded=n,t.live){var s=i.details;s&&t.fragments.length>0?(b.default.mergeDetails(s,t),r=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(r,s),t.PTSKnown?M.logger.log("live playlist sliding:"+r.toFixed(3)):M.logger.log("live playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,
M.logger.log("live playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(i.details=t,this.hls.trigger(g.default.LEVEL_UPDATED,{details:t,level:n}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var o=t.startTimeOffset;isNaN(o)?t.live?(this.startPosition=this.computeLivePosition(r,t),
M.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(o<0&&(M.logger.log("negative start time offset "+o+", count from end of last fragment"),o=r+a+o),M.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o)}this.nextLoadPosition=this.startPosition}this.state===C.WAITING_LEVEL&&(this.state=C.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===C.KEY_LOADING&&(this.state=C.IDLE,this.tick())}},{
key:"onFragLoaded",value:function(e){var t=this.fragCurrent,n=e.frag;if(this.state===C.FRAG_LOADING&&t&&"main"===n.type&&n.level===t.level&&n.sn===t.sn){var i=e.stats,a=this.levels[t.level],r=a.details;if(M.logger.log("Loaded  "+t.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+t.level),this.bitrateTest=!1,n.bitrateTest===!0&&this.hls.nextLoadLevel)this.state=C.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=performance.now(),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:i,frag:t,id:"main"
}),this.tick();else{this.state=C.PARSING,this.stats=i;var s=r.totalduration,o=isNaN(t.startDTS)?t.start:t.startDTS,l=t.level,u=t.sn,c=this.config.defaultAudioCodec||a.audioCodec;this.audioCodecSwap&&(M.logger.log("swapping playlist audio codec"),void 0===c&&(c=this.lastAudioCodec),c&&(c=c.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5")),this.pendingAppending=0,M.logger.log("Parsing "+u+" of ["+r.startSN+" ,"+r.endSN+"],level "+l+", cc "+t.cc);var d=this.demuxer
;d||(d=this.demuxer=new p.default(this.hls,"main"));var h=r.PTSKnown||!r.live;d.push(e.payload,c,a.videoCodec,o,t.cc,l,u,s,t.decryptdata,h)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent;if(t&&"main"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING){var n,i,a=e.tracks;if(a.audio&&this.altAudio&&delete a.audio,i=a.audio){var r=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase()
;r&&this.audioCodecSwap&&(M.logger.log("swapping playlist audio codec"),r=r.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&s.indexOf("firefox")===-1&&(r="mp4a.40.5"),s.indexOf("android")!==-1&&(r="mp4a.40.2",M.logger.log("Android: force audio codec to"+r)),i.levelCodec=r,i.id=e.id}if(i=a.video,i&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=e.id),e.unique){var o={codec:"",levelCodec:""};for(n in e.tracks)i=a[n],
o.container=i.container,o.codec&&(o.codec+=",",o.levelCodec+=","),i.codec&&(o.codec+=i.codec),i.levelCodec&&(o.levelCodec+=i.levelCodec);a={audiovideo:o}}this.hls.trigger(g.default.BUFFER_CODECS,a);for(n in a){i=a[n],M.logger.log("main track:"+n+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.pendingAppending++,this.hls.trigger(g.default.BUFFER_APPENDING,{type:n,data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{
key:"onFragParsingData",value:function(e){var t=this,n=this.fragCurrent;if(n&&"main"===e.id&&e.sn===n.sn&&e.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===C.PARSING){var i=this.levels[this.level],a=this.fragCurrent;M.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0))
;var r=b.default.updateFragPTSDTS(i.details,a.sn,e.startPTS,e.endPTS,e.startDTS,e.endDTS),s=this.hls;s.trigger(g.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:r}),"video"===e.type&&(a.dropped=e.dropped),[e.data1,e.data2].forEach(function(n){n&&(t.pendingAppending++,s.trigger(g.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))}),this.nextLoadPosition=e.endPTS,this.bufferRange.push({type:e.type,start:e.startPTS,end:e.endPTS,frag:a}),this.tick()}}},{
key:"onFragParsed",value:function(e){var t=this.fragCurrent;t&&"main"===e.id&&e.sn===t.sn&&e.level===t.level&&this.state===C.PARSING&&(this.stats.tparsed=performance.now(),this.state=C.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitch",value:function(e){var t=!!e.url;if(t)this.videoBuffer&&this.mediaBuffer!==this.videoBuffer&&(M.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),
this.mediaBuffer=this.videoBuffer);else if(this.mediaBuffer!==this.media){M.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var n=this.fragCurrent;n.loader&&(M.logger.log("switching to main audio track, cancel main fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=C.IDLE}this.altAudio=t}},{key:"onBufferCreated",value:function(e){
var t=e.tracks,n=void 0,i=void 0,a=!1;for(var r in t){var s=t[r];"main"===s.id?(i=r,n=s,"video"===r&&(this.videoBuffer=t[r].buffer)):a=!0}a&&n?(M.logger.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",value:function(e){if("main"===e.parent)switch(this.state){case C.PARSING:case C.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",
value:function(){if(this.state===C.PARSED&&0===this.pendingAppending){var e=this.fragCurrent,t=this.stats;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*t.total/(t.tbuffered-t.tfirst)),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:t,frag:e,id:"main"});var n=this.mediaBuffer?this.mediaBuffer:this.media;M.logger.log("main buffered : "+I.default.toString(n.buffered)),this.state=C.IDLE}this.tick()}}},{key:"onError",value:function(e){
var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=this.media,i=n&&d.default.isBuffered(n,n.currentTime)&&d.default.isBuffered(n,n.currentTime+.5);switch(e.details){case w.ErrorDetails.FRAG_LOAD_ERROR:case w.ErrorDetails.FRAG_LOAD_TIMEOUT:case w.ErrorDetails.KEY_LOAD_ERROR:case w.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal){var a=this.fragLoadError;a?a++:a=1;var r=this.config;if(a<=r.fragLoadingMaxRetry||i||t.autoLevel&&t.level){this.fragLoadError=a,t.loadCounter=0
;var s=Math.min(Math.pow(2,a-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);M.logger.warn("mediaController: frag loading failed, retry in "+s+" ms"),this.retryDate=performance.now()+s,this.state=C.FRAG_LOADING_WAITING_RETRY}else M.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=C.ERROR}break;case w.ErrorDetails.FRAG_LOOP_LOADING_ERROR:e.fatal||(i?(this._reduceMaxBufferLength(t.duration),
this.state=C.IDLE):t.autoLevel&&0!==t.level||(e.fatal=!0,this.hls.trigger(g.default.ERROR,e),this.state=C.ERROR));break;case w.ErrorDetails.LEVEL_LOAD_ERROR:case w.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==C.ERROR&&(e.fatal?(this.state=C.ERROR,M.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):this.state===C.WAITING_LEVEL&&(this.state=C.IDLE));break;case w.ErrorDetails.BUFFER_FULL_ERROR:
this.state!==C.PARSING&&this.state!==C.PARSED||(i?(this._reduceMaxBufferLength(t.duration),this.state=C.IDLE):(M.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.state=C.PAUSED,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY})))}}}},{key:"_reduceMaxBufferLength",value:function(e){var t=this.config;t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,
M.logger.warn("reduce max buffer length to "+t.maxMaxBufferLength+"s and switch to IDLE state"),this.fragLoadIdx+=2*t.fragLoadingLoopThreshold)}},{key:"_checkBuffer",value:function(){var e=this.media;if(e&&e.readyState){var t=e.currentTime,n=e.buffered;if(!this.loadedmetadata&&n.length){this.loadedmetadata=!0;var i=this.startPosition,a=d.default.isBuffered(e,i);t===i&&a||(M.logger.log("target start position:"+i),a||(i=n.start(0),
M.logger.log("target start position not buffered, seek to buffered.start(0) "+i)),M.logger.log("adjust currentTime from "+t+" to "+i),e.currentTime=i)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var r=d.default.bufferInfo(e,t,0),s=!(e.paused||e.ended||0===e.buffered.length),o=.5,l=t>e.playbackRate*this.lastCurrentTime,u=this.config;if(this.stalled&&l&&(this.stalled=!1,M.logger.log("playback not stuck anymore @"+t)),s&&r.len<=o&&(l?(o=0,
this.seekHoleNudgeDuration=0):this.stalled?this.seekHoleNudgeDuration+=u.seekHoleNudgeDuration:(this.seekHoleNudgeDuration=0,M.logger.log("playback seems stuck @"+t),this.hls.trigger(g.default.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1}),this.stalled=!0),r.len<=o)){var c=r.nextStart,h=c-t;if(c&&h<u.maxSeekHole&&h>0){M.logger.log("adjust currentTime from "+e.currentTime+" to next buffered @ "+c+" + nudge "+this.seekHoleNudgeDuration)
;var p=c+this.seekHoleNudgeDuration-e.currentTime;e.currentTime=c+this.seekHoleNudgeDuration,this.hls.trigger(g.default.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:p})}}}}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=C.IDLE,this.loadedmetadata||(this.startFragRequested=!1),this.tick()}},{key:"onBufferFlushed",value:function(){var e=this.mediaBuffer?this.mediaBuffer:this.media,t=this.bufferRange,n=[],i=void 0,a=void 0
;for(a=0;a<t.length;a++)i=t[a],d.default.isBuffered(e,(i.start+i.end)/2)&&n.push(i);this.bufferRange=n,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=C.IDLE,this.fragPrevious=null}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"computeLivePosition",value:function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)}},{
key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,M.logger.log("engine state transition from "+t+" to "+e),this.hls.trigger(g.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferRange(e.currentTime);if(t)return t.frag.level}return-1}},{key:"nextBufferRange",get:function(){var e=this.media
;return e?this.followingBufferRange(this.getBufferRange(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferRange;return e?e.frag.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}]),t}(v.default);n.default=D},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,45:45}],12:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(40),p=i(h),f=function(e){function t(e){a(this,t)
;var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.MANIFEST_LOADING,u.default.FRAG_LOADED,u.default.LEVEL_SWITCH));if(n.hls=e,n.config=e.config,n.enabled=!0,n.Cues=e.config.cueHandler,n.config.enableCEA708Captions){var i=n,s={newCue:function(e,t,n){if(!i.textTrack1){var a=i.getExistingTrack("1");if(a){i.textTrack1=a,i.clearCurrentCues(i.textTrack1);var r=new window.Event("addtrack")
;r.track=i.textTrack1,i.media.dispatchEvent(r)}else i.textTrack1=i.createTextTrack("captions","English","en"),i.textTrack1.textTrack1=!0}i.Cues.newCue(i.textTrack1,e,t,n)}},o={newCue:function(e,t,n){if(!i.textTrack2){var a=i.getExistingTrack("2");if(a){i.textTrack2=a,i.clearCurrentCues(i.textTrack2);var r=new window.Event("addtrack");r.track=i.textTrack2,i.media.dispatchEvent(r)}else i.textTrack2=i.createTextTrack("captions","Spanish","es"),i.textTrack2.textTrack2=!0}
i.Cues.newCue(i.textTrack2,e,t,n)}};n.cea608Parser=new p.default(0,s,o)}return n}return s(t,e),o(t,[{key:"clearCurrentCues",value:function(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}},{key:"getExistingTrack",value:function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var i=t.textTracks[n],a="textTrack"+e;if(i[a]===!0)return i}return null}},{key:"createTextTrack",value:function(e,t,n){if(this.media)return this.media.addTextTrack(e,t,n)}},{key:"destroy",
value:function(){d.default.prototype.destroy.call(this)}},{key:"onMediaAttaching",value:function(e){this.media=e.media}},{key:"onMediaDetaching",value:function(){}},{key:"onManifestLoading",value:function(){this.lastPts=Number.NEGATIVE_INFINITY}},{key:"onLevelSwitch",value:function(){"NONE"===this.hls.currentLevel.closedCaptions?this.enabled=!1:this.enabled=!0}},{key:"onFragLoaded",value:function(e){if("main"===e.frag.type){var t=e.frag.start
;t<=this.lastPts&&(this.clearCurrentCues(this.textTrack1),this.clearCurrentCues(this.textTrack2)),this.lastPts=t}}},{key:"onFragParsingUserdata",value:function(e){if(this.enabled&&this.config.enableCEA708Captions)for(var t=0;t<e.samples.length;t++){var n=this.extractCea608Data(e.samples[t].bytes);this.cea608Parser.addData(e.samples[t].pts,n)}}},{key:"extractCea608Data",value:function(e){for(var t,n,i,a,r,s=31&e[0],o=2,l=[],u=0;u<s;u++)t=e[o++],n=127&e[o++],i=127&e[o++],a=0!=(4&t),r=3&t,
0===n&&0===i||a&&0===r&&(l.push(n),l.push(i));return l}}]),t}(d.default);n.default=f},{25:25,26:26,40:40}],13:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){
return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){i(this,e),this._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],this._precompute();var n,a,r,s,o,l=this._tables[0][4],u=this._tables[1],c=t.length,d=1;if(4!==c&&6!==c&&8!==c)throw new Error("Invalid aes key size="+c);for(s=t.slice(0),o=[],this._key=[s,o],n=c;n<4*c+28;n++)r=s[n-1],(n%c==0||8===c&&n%c==4)&&(r=l[r>>>24]<<24^l[r>>16&255]<<16^l[r>>8&255]<<8^l[255&r],n%c==0&&(r=r<<8^r>>>24^d<<24,d=d<<1^283*(d>>7))),s[n]=s[n-c]^r
;for(a=0;n;a++,n--)r=s[3&a?n:n-4],o[a]=n<=4||a<4?r:u[0][l[r>>>24]]^u[1][l[r>>16&255]]^u[2][l[r>>8&255]]^u[3][l[255&r]]}return a(e,[{key:"_precompute",value:function(){var e,t,n,i,a,r,s,o,l,u=this._tables[0],c=this._tables[1],d=u[4],h=c[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=i||1,n=f[n]||1)for(s=n^n<<1^n<<2^n<<3^n<<4,s=s>>8^255&s^99,d[t]=s,h[s]=t,r=p[a=p[i=p[t]]],l=16843009*r^65537*a^257*i^16843008*t,o=257*p[s]^16843008*s,e=0;e<4;e++)u[e][t]=o=o<<24^o>>>8,
c[e][s]=l=l<<24^l>>>8;for(e=0;e<5;e++)u[e]=u[e].slice(0),c[e]=c[e].slice(0)}},{key:"decrypt",value:function(e,t,n,i,a,r){var s,o,l,u,c=this._key[1],d=e^c[0],h=i^c[1],p=n^c[2],f=t^c[3],g=c.length/4-2,m=4,v=this._tables[1],y=v[0],b=v[1],S=v[2],I=v[3],w=v[4];for(u=0;u<g;u++)s=y[d>>>24]^b[h>>16&255]^S[p>>8&255]^I[255&f]^c[m],o=y[h>>>24]^b[p>>16&255]^S[f>>8&255]^I[255&d]^c[m+1],l=y[p>>>24]^b[f>>16&255]^S[d>>8&255]^I[255&h]^c[m+2],f=y[f>>>24]^b[d>>16&255]^S[h>>8&255]^I[255&p]^c[m+3],m+=4,d=s,h=o,p=l
;for(u=0;u<4;u++)a[(3&-u)+r]=w[d>>>24]<<24^w[h>>16&255]<<16^w[p>>8&255]<<8^w[255&f]^c[m++],s=d,d=h,h=p,p=f,f=s}}]),e}();n.default=r},{}],14:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}
return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(13),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(){function e(t,n){i(this,e),this.key=t,this.iv=n}return a(e,[{key:"ntoh",value:function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}},{key:"doDecrypt",value:function(e,t,n){
var i,a,r,o,l,u,c,d,h,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),f=new s.default(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),m=new Int32Array(g.buffer);for(i=~~n[0],a=~~n[1],r=~~n[2],o=~~n[3],h=0;h<p.length;h+=4)l=~~this.ntoh(p[h]),u=~~this.ntoh(p[h+1]),c=~~this.ntoh(p[h+2]),d=~~this.ntoh(p[h+3]),f.decrypt(l,u,c,d,m,h),m[h]=this.ntoh(m[h]^i),m[h+1]=this.ntoh(m[h+1]^a),m[h+2]=this.ntoh(m[h+2]^r),m[h+3]=this.ntoh(m[h+3]^o),i=l,a=u,r=c,o=d;return g}},{
key:"localDecrypt",value:function(e,t,n,i){var a=this.doDecrypt(e,t,n);i.set(a,e.byteOffset)}},{key:"decrypt",value:function(e){var t=new Int32Array(e),n=new Uint8Array(e.byteLength),i=0,a=this.key,r=this.iv;for(this.localDecrypt(t.subarray(i,i+32e3),a,r,n),i=32e3;i<t.length;i+=32e3)r=new Uint32Array([this.ntoh(t[i-4]),this.ntoh(t[i-3]),this.ntoh(t[i-2]),this.ntoh(t[i-1])]),this.localDecrypt(t.subarray(i,i+32e3),a,r,n);return n}}]),e}();n.default=o},{13:13}],15:[function(e,t,n){"use strict"
;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(14),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=e(24),l=e(43),u=function(){function e(t){
i(this,e),this.hls=t;try{var n=window?window.crypto:crypto;this.subtle=n.subtle||n.webkitSubtle,this.disableWebCrypto=!this.subtle}catch(e){this.disableWebCrypto=!0}}return a(e,[{key:"destroy",value:function(){}},{key:"decrypt",value:function(e,t,n,i){this.disableWebCrypto&&this.hls.config.enableSoftwareAES?this.decryptBySoftware(e,t,n,i):this.decryptByWebCrypto(e,t,n,i)}},{key:"decryptByWebCrypto",value:function(e,t,n,i){var a=this;l.logger.log("decrypting by WebCrypto API"),
this.subtle.importKey("raw",t,{name:"AES-CBC",length:128},!1,["decrypt"]).then(function(r){a.subtle.decrypt({name:"AES-CBC",iv:n.buffer},r,e).then(i).catch(function(r){a.onWebCryptoError(r,e,t,n,i)})}).catch(function(r){a.onWebCryptoError(r,e,t,n,i)})}},{key:"decryptBySoftware",value:function(e,t,n,i){l.logger.log("decrypting by JavaScript Implementation");var a=new DataView(t.buffer),r=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]);a=new DataView(n.buffer)
;var o=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]);i(new s.default(r,o).decrypt(e).buffer)}},{key:"onWebCryptoError",value:function(e,t,n,i,a){this.hls.config.enableSoftwareAES?(l.logger.log("disabling to use WebCrypto API"),this.disableWebCrypto=!0,this.decryptBySoftware(t,n,i,a)):(l.logger.error("decrypting error : "+e.message),this.hls.trigger(Event.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))}
}]),e}();n.default=u},{14:14,24:24,43:43}],16:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){
return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(17),o=i(s),l=e(43),u=e(22),c=i(u),d=function(){function e(t,n,i,r){a(this,e),this.observer=t,this.id=n,this.remuxerClass=i,this.config=r,this.remuxer=new this.remuxerClass(t,n,r),this.insertDiscontinuity()}return r(e,[{key:"insertDiscontinuity",value:function(){this._aacTrack={container:"audio/adts",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0}}},{key:"push",value:function(e,t,n,i,a,r,s,u,d){
var h,p,f,g,m,v,y,b,S,I,w=new c.default(e),M=90*w.timeStamp,C=!1;for(a!==this.lastCC?(l.logger.log(this.id+" discontinuity detected"),this.lastCC=a,this.insertDiscontinuity(),this.remuxer.switchLevel(),this.remuxer.insertDiscontinuity()):r!==this.lastLevel?(l.logger.log("audio track switch detected"),this.lastLevel=r,this.remuxer.switchLevel(),this.insertDiscontinuity()):s===this.lastSN+1&&(C=!0),h=this._aacTrack,this.lastSN=s,this.lastLevel=r,v=w.length,
S=e.length;v<S-1&&(255!==e[v]||240!=(240&e[v+1]));v++);for(h.audiosamplerate||(p=o.default.getAudioConfig(this.observer,e,v,t),h.config=p.config,h.audiosamplerate=p.samplerate,h.channelCount=p.channelCount,h.codec=p.codec,h.duration=u,l.logger.log("parsed codec:"+h.codec+",rate:"+p.samplerate+",nb channel:"+p.channelCount)),m=0,g=9216e4/h.audiosamplerate;v+5<S&&(y=1&e[v+1]?7:9,f=(3&e[v+3])<<11|e[v+4]<<3|(224&e[v+5])>>>5,(f-=y)>0&&v+y+f<=S);)for(b=M+m*g,I={unit:e.subarray(v+y,v+y+f),pts:b,dts:b},
h.samples.push(I),h.len+=f,v+=f+y,m++;v<S-1&&(255!==e[v]||240!=(240&e[v+1]));v++);this.remuxer.remux(r,s,this._aacTrack,{samples:[]},{samples:[{pts:M,dts:M,unit:w.payload}]},{samples:[]},i,C,d)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(e){var t,n,i=new c.default(e);if(i.hasTimeStamp)for(t=i.length,n=e.length;t<n-1;t++)if(255===e[t]&&240==(240&e[t+1]))return!0;return!1}}]),e}();n.default=d},{17:17,22:22,43:43}],17:[function(e,t,n){"use strict";function i(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=e(24),o=function(){function e(){i(this,e)}return a(e,null,[{key:"getAudioConfig",value:function(e,t,n,i){
var a,o,l,u,c,d=navigator.userAgent.toLowerCase(),h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return a=1+((192&t[n+2])>>>6),(o=(60&t[n+2])>>>2)>h.length-1?void e.trigger(Event.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o}):(u=(1&t[n+2])<<2,u|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+o+"["+h[o]+"Hz],channelConfig:"+u),
/firefox|OPR/i.test(d)?o>=6?(a=5,c=new Array(4),l=o-3):(a=2,c=new Array(2),l=o):d.indexOf("android")!==-1?(a=2,c=new Array(2),l=o):(a=5,c=new Array(4),i&&(i.indexOf("mp4a.40.29")!==-1||i.indexOf("mp4a.40.5")!==-1)||!i&&o>=6?l=o-3:((i&&i.indexOf("mp4a.40.2")!==-1&&o>=6&&1===u||!i&&1===u)&&(a=2,c=new Array(2)),l=o)),c[0]=a<<3,c[0]|=(14&o)>>1,c[1]|=(1&o)<<7,c[1]|=u<<3,5===a&&(c[1]|=(14&l)>>1,c[2]=(1&l)<<7,c[2]|=8,c[3]=0),{config:c,samplerate:h[o],channelCount:u,codec:"mp4a.40."+a})}}]),e}()
;n.default=o},{24:24,43:43}],18:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t
}}(),s=e(26),o=i(s),l=e(24),u=e(16),c=i(u),d=e(23),h=i(d),p=e(36),f=i(p),g=e(37),m=i(g),v=function(){function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;a(this,e),this.hls=t,this.id=n,this.config=this.hls.config||r,this.typeSupported=i}return r(e,[{key:"destroy",value:function(){var e=this.demuxer;e&&e.destroy()}},{key:"push",value:function(e,t,n,i,a,r,s,u,d){var p=this.demuxer;if(!p){var g=this.hls,v=this.id
;if(h.default.probe(e))p=this.typeSupported.mp2t===!0?new h.default(g,v,m.default,this.config):new h.default(g,v,f.default,this.config);else{if(!c.default.probe(e))return void g.trigger(o.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,id:v,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});p=new c.default(g,v,f.default,this.config)}this.demuxer=p}p.push(e,t,n,i,a,r,s,u,d)}}]),e}();n.default=v},{16:16,23:23,24:24,26:26,36:36,37:37}],
19:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e(18),r=i(a),s=e(26),o=i(s),l=e(43),u=e(1),c=i(u),d=function(e){var t=new c.default;t.trigger=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t.removeListener.apply(t,[e].concat(i))}
;var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);e.demuxer=new r.default(t,a.id,a.typeSupported,s);try{(0,l.enableLogs)(s.debug)}catch(e){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":e.demuxer.push(new Uint8Array(a.data),a.audioCodec,a.videoCodec,a.timeOffset,a.cc,a.level,a.sn,a.duration,a.accurateTimeOffset)}}),
t.on(o.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(o.default.FRAG_PARSED,n),t.on(o.default.ERROR,n),t.on(o.default.FRAG_PARSING_METADATA,n),t.on(o.default.FRAG_PARSING_USERDATA,n),t.on(o.default.FRAG_PARSING_DATA,function(t,n){var i=n.data1.buffer,a=n.data2.buffer;delete n.data1,delete n.data2,e.postMessage({event:t,data:n,data1:i,data2:a},[i,a])})};n.default=d},{1:1,18:18,26:26,43:43}],20:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(26),o=i(s),l=e(18),u=i(l),c=e(19),d=i(c),h=e(43),p=e(15),f=i(p),g=e(24),m=function(){function t(n,i){a(this,t),
this.hls=n,this.id=i;var r={mp4:MediaSource.isTypeSupported("video/mp4"),mp2t:n.config.enableMP2TPassThrough&&MediaSource.isTypeSupported("video/mp2t")};if(n.config.enableWorker&&"undefined"!=typeof Worker){h.logger.log("demuxing in webworker");var s=void 0;try{var l=e(2);s=this.w=l(d.default),this.onwmsg=this.onWorkerMessage.bind(this),s.addEventListener("message",this.onwmsg),s.onerror=function(e){n.trigger(o.default.ERROR,{type:g.ErrorTypes.OTHER_ERROR,
details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:e.message+" ("+e.filename+":"+e.lineno+")"}})},s.postMessage({cmd:"init",typeSupported:r,id:i,config:JSON.stringify(n.config)})}catch(e){h.logger.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),s&&URL.revokeObjectURL(s.objectURL),this.demuxer=new u.default(n,i,r)}}else this.demuxer=new u.default(n,i,r);this.demuxInitialized=!0}return r(t,[{key:"destroy",value:function(){var e=this.w
;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.decrypter;n&&(n.destroy(),this.decrypter=null)}},{key:"pushDecrypted",value:function(e,t,n,i,a,r,s,o,l){var u=this.w;if(u)u.postMessage({cmd:"demux",data:e,audioCodec:t,videoCodec:n,timeOffset:i,cc:a,level:r,sn:s,duration:o,accurateTimeOffset:l},[e]);else{var c=this.demuxer;c&&c.push(new Uint8Array(e),t,n,i,a,r,s,o,l)}}},{key:"push",
value:function(e,t,n,i,a,r,s,o,l,u){if(e.byteLength>0&&null!=l&&null!=l.key&&"AES-128"===l.method){null==this.decrypter&&(this.decrypter=new f.default(this.hls));var c=this;this.decrypter.decrypt(e,l.key,l.iv,function(e){c.pushDecrypted(e,t,n,i,a,r,s,o,u)})}else this.pushDecrypted(e,t,n,i,a,r,s,o,u)}},{key:"onWorkerMessage",value:function(e){var t=e.data,n=this.hls;switch(t.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case o.default.FRAG_PARSING_DATA:
t.data.data1=new Uint8Array(t.data1),t.data.data2=new Uint8Array(t.data2);default:n.trigger(t.event,t.data)}}}]),t}();n.default=m},{15:15,18:18,19:19,2:2,24:24,26:26,43:43}],21:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),
Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=function(){function e(t){i(this,e),this.data=t,this.bytesAvailable=this.data.byteLength,this.word=0,this.bitsAvailable=0}return a(e,[{key:"loadWord",value:function(){var e=this.data.byteLength-this.bytesAvailable,t=new Uint8Array(4),n=Math.min(4,this.bytesAvailable);if(0===n)throw new Error("no bytes available");t.set(this.data.subarray(e,e+n)),
this.word=new DataView(t.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n}},{key:"skipBits",value:function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,
this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}},{key:"skipLZ",value:function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ()
;return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,n,i=8,a=8;for(t=0;t<e;t++)0!==a&&(n=this.readEG(),a=(i+n+256)%256),i=0===a?i:a}},{
key:"readSPS",value:function(){var e,t,n,i,a,r,s,o=0,l=0,u=0,c=0,d=1;if(this.readUByte(),e=this.readUByte(),this.readBits(5),this.skipBits(3),this.readUByte(),this.skipUEG(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var h=this.readUEG();if(3===h&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(r=3!==h?8:12,s=0;s<r;s++)this.readBoolean()&&(s<6?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG()
;var p=this.readUEG();if(0===p)this.readUEG();else if(1===p)for(this.skipBits(1),this.skipEG(),this.skipEG(),t=this.readUEG(),s=0;s<t;s++)this.skipEG();if(this.skipUEG(),this.skipBits(1),n=this.readUEG(),i=this.readUEG(),a=this.readBits(1),0===a&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(o=this.readUEG(),l=this.readUEG(),u=this.readUEG(),c=this.readUEG()),this.readBoolean()&&this.readBoolean()){var f=void 0;switch(this.readUByte()){case 1:f=[1,1];break;case 2:f=[12,11];break;case 3:
f=[10,11];break;case 4:f=[16,11];break;case 5:f=[40,33];break;case 6:f=[24,11];break;case 7:f=[20,11];break;case 8:f=[32,11];break;case 9:f=[80,33];break;case 10:f=[18,11];break;case 11:f=[15,11];break;case 12:f=[64,33];break;case 13:f=[160,99];break;case 14:f=[4,3];break;case 15:f=[3,2];break;case 16:f=[2,1];break;case 255:f=[this.readUByte()<<8|this.readUByte(),this.readUByte()<<8|this.readUByte()]}f&&(d=f[0]/f[1])}return{width:Math.ceil((16*(n+1)-2*o-2*l)*d),
height:(2-a)*(i+1)*16-(a?2:4)*(u+c)}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),e}();n.default=s},{43:43}],22:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),
Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=function(){function e(t){i(this,e),this._hasTimeStamp=!1;for(var n,a,s,o,l,u,c,d,h=0;;)if(c=this.readUTF(t,h,3),h+=3,"ID3"===c)h+=3,n=127&t[h++],a=127&t[h++],s=127&t[h++],o=127&t[h++],l=(n<<21)+(a<<14)+(s<<7)+o,u=h+l,this._parseID3Frames(t,h,u),h=u;else{if("3DI"!==c)return h-=3,void((d=h)&&(this.hasTimeStamp||r.logger.warn("ID3 tag found, but no timestamp"),this._length=d,
this._payload=t.subarray(0,d)));h+=7,r.logger.log("3DI footer found, end: "+h)}}return a(e,[{key:"readUTF",value:function(e,t,n){var i="",a=t,r=t+n;do{i+=String.fromCharCode(e[a++])}while(a<r);return i}},{key:"_parseID3Frames",value:function(e,t,n){for(var i,a;t+8<=n;)switch(i=this.readUTF(e,t,4),t+=4,e[t++]<<24+e[t++]<<16+e[t++]<<8+e[t++],e[t++]<<8+e[t++],t,i){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(e,t,44)){t+=44,t+=4;var s=1&e[t++];this._hasTimeStamp=!0,
a=((e[t++]<<23)+(e[t++]<<15)+(e[t++]<<7)+e[t++])/45,s&&(a+=47721858.84),a=Math.round(a),r.logger.trace("ID3 timestamp found: "+a),this._timeStamp=a}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),e}();n.default=s},{43:43}],23:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}
function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(17),o=i(s),l=e(26),u=i(l),c=e(21),d=i(c),h=e(43),p=e(24),f=function(){function e(t,n,i,r){a(this,e),
this.observer=t,this.id=n,this.remuxerClass=i,this.config=r,this.lastCC=0,this.remuxer=new this.remuxerClass(t,n,r)}return r(e,[{key:"switchLevel",value:function(){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,sequenceNumber:0,samples:[],len:0,dropped:0},this._aacTrack={container:"video/mp2t",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0},this._id3Track={type:"id3",id:-1,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,
sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.remuxer.switchLevel()}},{key:"insertDiscontinuity",value:function(){this.switchLevel(),this.remuxer.insertDiscontinuity()}},{key:"push",value:function(e,t,n,i,a,r,s,o,l){var c,d,f,g,m,v=e.length,y=this.remuxer.passthrough,b=!1;this.audioCodec=t,this.videoCodec=n,this._duration=o,this.contiguous=!1,this.accurateTimeOffset=l,a!==this.lastCC&&(h.logger.log("discontinuity detected"),
this.insertDiscontinuity(),this.lastCC=a),r!==this.lastLevel?(h.logger.log("level switch detected"),this.switchLevel(),this.lastLevel=r):s===this.lastSN+1&&(this.contiguous=!0),this.lastSN=s;var S=this.pmtParsed,I=this._avcTrack,w=this._aacTrack,M=this._id3Track,C=I.id,D=w.id,P=M.id,T=this._pmtId,x=I.pesData,E=w.pesData,A=M.pesData,k=this._parsePAT,L=this._parsePMT,_=this._parsePES,N=this._parseAVCPES.bind(this),R=this._parseAACPES.bind(this),O=this._parseID3PES.bind(this);for(v-=v%188,
c=0;c<v;c+=188)if(71===e[c]){if(d=!!(64&e[c+1]),f=((31&e[c+1])<<8)+e[c+2],(48&e[c+3])>>4>1){if((g=c+5+e[c+4])===c+188)continue}else g=c+4;switch(f){case C:if(d){if(x&&(m=_(x))&&(N(m,!1),y&&I.codec&&(D===-1||w.codec)))return void this.remux(r,s,e,i);x={data:[],size:0}}x&&(x.data.push(e.subarray(g,c+188)),x.size+=c+188-g);break;case D:if(d){if(E&&(m=_(E))&&(R(m),y&&w.codec&&(C===-1||I.codec)))return void this.remux(r,s,e,i);E={data:[],size:0}}E&&(E.data.push(e.subarray(g,c+188)),E.size+=c+188-g)
;break;case P:d&&(A&&(m=_(A))&&O(m),A={data:[],size:0}),A&&(A.data.push(e.subarray(g,c+188)),A.size+=c+188-g);break;case 0:d&&(g+=e[g]+1),T=this._pmtId=k(e,g);break;case T:d&&(g+=e[g]+1);var j=L(e,g);C=j.avc,C>0&&(I.id=C),D=j.aac,D>0&&(w.id=D),P=j.id3,P>0&&(M.id=P),b&&!S&&(h.logger.log("reparse from beginning"),b=!1,c=-188),S=this.pmtParsed=!0;break;case 17:case 8191:break;default:b=!0}}else this.observer.trigger(u.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,id:this.id,
details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});x&&(m=_(x))?(N(m,!0),I.pesData=null):I.pesData=x,E&&(m=_(E))?(R(m),w.pesData=null):(E&&E.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),w.pesData=E),A&&(m=_(A))?(O(m),M.pesData=null):M.pesData=A,this.remux(r,s,null,i)}},{key:"remux",value:function(e,t,n,i){var a=this._avcTrack,r=a.samples,s=r.reduce(function(e,t){var n=t.units.units.reduce(function(e,t){return{
len:e.len+t.data.length,nbNalu:e.nbNalu+1}},{len:0,nbNalu:0});return t.length=n.len,{len:e.len+n.len,nbNalu:e.nbNalu+n.nbNalu}},{len:0,nbNalu:0});a.len=s.len,a.nbNalu=s.nbNalu,this.remuxer.remux(e,t,this._aacTrack,this._avcTrack,this._id3Track,this._txtTrack,i,this.contiguous,this.accurateTimeOffset,n)}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){return(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",
value:function(e,t){var n,i,a,r,s={aac:-1,avc:-1,id3:-1};for(n=(15&e[t+1])<<8|e[t+2],i=t+3+n-4,a=(15&e[t+10])<<8|e[t+11],t+=12+a;t<i;){switch(r=(31&e[t+1])<<8|e[t+2],e[t]){case 15:s.aac===-1&&(s.aac=r);break;case 21:s.id3===-1&&(s.id3=r);break;case 27:s.avc===-1&&(s.avc=r);break;case 36:h.logger.warn("HEVC stream type found, not supported for now");break;default:h.logger.log("unkown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return s}},{key:"_parsePES",value:function(e){
var t,n,i,a,r,s,o,l,u=0,c=e.data;if(!e||0===e.size)return null;for(;c[0].length<19&&c.length>1;){var d=new Uint8Array(c[0].length+c[1].length);d.set(c[0]),d.set(c[1],c[0].length),c[0]=d,c.splice(1,1)}if(t=c[0],1===(t[0]<<16)+(t[1]<<8)+t[2]){if((i=(t[4]<<8)+t[5])&&i>e.size-6)return null;for(n=t[7],192&n&&(s=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,s>4294967295&&(s-=8589934592),
64&n?(o=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(o-=8589934592):o=s),a=t[8],l=a+9,e.size-=l,r=new Uint8Array(e.size);c.length;){t=c.shift();var h=t.byteLength;if(l){if(l>h){l-=h;continue}t=t.subarray(l),h-=l,l=0}r.set(t,u),u+=h}return i&&(i-=a+3),{data:r,pts:s,dts:o,len:i}}return null}},{key:"pushAccesUnit",value:function(e,t){
e.units.units.length&&(!this.config.forceKeyFrameOnDiscontinuity||e.key===!0||t.sps&&(t.samples.length||this.contiguous)?t.samples.push(e):t.dropped++),e.debug.length&&h.logger.log(e.pts+"/"+e.dts+":"+e.debug+","+e.units.length)}},{key:"_parseAVCPES",value:function(e,t){var n,i,a,r=this,s=this._avcTrack,o=this._parseAVCNALu(e.data),l=this.avcSample;e.data=null,o.forEach(function(t){switch(t.type){case 1:i=!0;break;case 5:i=!0,l||(l=r.avcSample=r._createAVCSample(!0,e.pts,e.dts,"")),l.key=!0
;break;case 6:i=!0,n=new d.default(r.discardEPB(t.data)),n.readUByte();for(var o=0,u=0,c=!1,h=0;!c&&n.bytesAvailable>1;){o=0;do{h=n.readUByte(),o+=h}while(255===h);u=0;do{h=n.readUByte(),u+=h}while(255===h);if(4===o&&0!==n.bytesAvailable){c=!0;if(181===n.readUByte()){if(49===n.readUShort()){if(1195456820===n.readUInt()){if(3===n.readUByte()){var p=n.readUByte(),f=n.readUByte(),g=31&p,m=[p,f];for(a=0;a<g;a++)m.push(n.readUByte()),m.push(n.readUByte()),m.push(n.readUByte())
;r._insertSampleInOrder(r._txtTrack.samples,{type:3,pts:e.pts,bytes:m})}}}}}else if(u<n.bytesAvailable)for(a=0;a<u;a++)n.readUByte()}break;case 7:if(i=!0,!s.sps){n=new d.default(t.data);var v=n.readSPS();s.width=v.width,s.height=v.height,s.sps=[t.data],s.duration=r._duration;var y=t.data.subarray(1,4),b="avc1.";for(a=0;a<3;a++){var S=y[a].toString(16);S.length<2&&(S="0"+S),b+=S}s.codec=b}break;case 8:i=!0,s.pps||(s.pps=[t.data]);break;case 9:i=!1,l&&r.pushAccesUnit(l,s),
l=r.avcSample=r._createAVCSample(!1,e.pts,e.dts,"");break;case 12:i=!1;break;default:i=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}if(l&&i){l.units.units.push(t)}}),t&&l&&(this.pushAccesUnit(l,s),this.avcSample=null)}},{key:"_createAVCSample",value:function(e,t,n,i){return{key:e,pts:t,dts:n,units:{units:[],length:0},debug:i}}},{key:"_insertSampleInOrder",value:function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var i=n-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}
}else e.push(t)}},{key:"_getLastNalUnit",value:function(){var e=this.avcSample,t=void 0;if(!e||0===e.units.units.length){var n=this._avcTrack,i=n.samples;e=i[i.length-1]}if(e){var a=e.units.units;t=a[a.length-1]}return t}},{key:"_parseAVCNALu",value:function(e){for(var t,n,i,a,r,s=0,o=e.byteLength,l=this._avcTrack,u=l.naluState||0,c=u,d=[],h=-1;s<o;)switch(t=e[s++],u){case 0:0===t&&(u=1);break;case 1:u=0===t?2:0;break;case 2:case 3:if(0===t)u=3;else if(1===t){if(h>=0)i={data:e.subarray(h,s-u-1),
type:r},d.push(i);else{var p=this._getLastNalUnit();if(p&&(c&&s<=4-c&&p.state&&(p.data=p.data.subarray(0,p.data.byteLength-c)),(n=s-u-1)>0)){var f=new Uint8Array(p.data.byteLength+n);f.set(p.data,0),f.set(e.subarray(0,n),p.data.byteLength),p.data=f}}s<o?(a=31&e[s],h=s,r=a,u=0):u=-1}else u=0;break;case-1:h=0,r=31&t,u=0}if(h>=0&&u>=0&&(i={data:e.subarray(h,o),type:r,state:u},d.push(i)),0===d.length){var g=this._getLastNalUnit();if(g){var m=new Uint8Array(g.data.byteLength+e.byteLength)
;m.set(g.data,0),m.set(e,g.data.byteLength),g.data=m}}return l.naluState=u,d}},{key:"discardEPB",value:function(e){for(var t,n,i=e.byteLength,a=[],r=1;r<i-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(a.push(r+2),r+=2):r++;if(0===a.length)return e;t=i-a.length,n=new Uint8Array(t);var s=0;for(r=0;r<t;s++,r++)s===a[0]&&(s++,a.shift()),n[r]=e[s];return n}},{key:"_parseAACPES",value:function(e){var t,n,i,a,r,s,l,c,d,f=this._aacTrack,g=e.data,m=e.pts,v=this.aacOverFlow,y=this.aacLastPTS;if(v){
var b=new Uint8Array(v.byteLength+g.byteLength);b.set(v,0),b.set(g,v.byteLength),g=b}for(r=0,c=g.length;r<c-1&&(255!==g[r]||240!=(240&g[r+1]));r++);if(r){var S,I;if(r<c-1?(S="AAC PES did not start with ADTS header,offset:"+r,I=!1):(S="no ADTS header found in AAC PES",I=!0),h.logger.warn("parsing error:"+S),this.observer.trigger(u.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,id:this.id,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:I,reason:S}),I)return}
if(f.audiosamplerate||(t=o.default.getAudioConfig(this.observer,g,r,this.audioCodec),f.config=t.config,f.audiosamplerate=t.samplerate,f.channelCount=t.channelCount,f.codec=t.codec,f.duration=this._duration,h.logger.log("parsed codec:"+f.codec+",rate:"+t.samplerate+",nb channel:"+t.channelCount)),a=0,i=9216e4/f.audiosamplerate,v&&y){var w=y+i;Math.abs(w-m)>1&&(h.logger.log("AAC: align PTS for overlapping frames by "+Math.round((w-m)/90)),m=w)}for(;r+5<c&&(s=1&g[r+1]?7:9,
n=(3&g[r+3])<<11|g[r+4]<<3|(224&g[r+5])>>>5,(n-=s)>0&&r+s+n<=c);)for(l=m+a*i,d={unit:g.subarray(r+s,r+s+n),pts:l,dts:l},f.samples.push(d),f.len+=n,r+=n+s,a++;r<c-1&&(255!==g[r]||240!=(240&g[r+1]));r++);v=r<c?g.subarray(r,c):null,this.aacOverFlow=v,this.aacLastPTS=l}},{key:"_parseID3PES",value:function(e){this._id3Track.samples.push(e)}}],[{key:"probe",value:function(e){return e.length>=564&&71===e[0]&&71===e[188]&&71===e[376]}}]),e}();n.default=f},{17:17,21:21,24:24,26:26,43:43}],
24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",OTHER_ERROR:"otherError"},n.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",
LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",
BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",INTERNAL_EXCEPTION:"internalException"}},{}],25:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var 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},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(43),o=e(24),l=e(26),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=function(){function e(t){i(this,e),this.hls=t,
this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];this.handledEvents=a,this.useGenericHandler=!0,this.registerListeners()}return r(e,[{key:"destroy",value:function(){this.unregisterListeners()}},{key:"isEventHandler",value:function(){return"object"===a(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent}},{key:"registerListeners",value:function(){
this.isEventHandler()&&this.handledEvents.forEach(function(e){if("hlsEventGeneric"===e)throw new Error("Forbidden event name: "+e);this.hls.on(e,this.onEvent)}.bind(this))}},{key:"unregisterListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)}.bind(this))}},{key:"onEvent",value:function(e,t){this.onEventGeneric(e,t)}},{key:"onEventGeneric",value:function(e,t){var n=function(e,t){var n="on"+e.replace("hls","")
;if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)};try{n.call(this,e,t).call()}catch(t){s.logger.error("internal error happened while processing "+e+":"+t.message),this.hls.trigger(u.default.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}}}]),e}();n.default=c},{24:24,26:26,43:43}],26:[function(e,t,n){"use strict";t.exports={
MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",
MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVEL_SWITCH:"hlsLevelSwitch",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",
FRAG_LOADED:"hlsFragLoaded",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",
STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},{}],27:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){
function e(){i(this,e)}return a(e,null,[{key:"getSilentFrame",value:function(e){
return 1===e?new Uint8Array([0,200,0,128,35,128]):2===e?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]):null}}]),e}();n.default=r},{}],28:[function(e,t,n){"use strict"
;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,null,[{key:"isBuffered",value:function(e,t){
if(e)for(var n=e.buffered,i=0;i<n.length;i++)if(t>=n.start(i)&&t<=n.end(i))return!0;return!1}},{key:"bufferInfo",value:function(e,t,n){if(e){var i,a=e.buffered,r=[];for(i=0;i<a.length;i++)r.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(r,t,n)}return{len:0,start:0,end:0,nextStart:void 0}}},{key:"bufferedInfo",value:function(e,t,n){var i,a,r,s,o,l=[];for(e.sort(function(e,t){var n=e.start-t.start;return n?n:t.end-e.end}),o=0;o<e.length;o++){var u=l.length;if(u){var c=l[u-1].end
;e[o].start-c<n?e[o].end>c&&(l[u-1].end=e[o].end):l.push(e[o])}else l.push(e[o])}for(o=0,i=0,a=r=t;o<l.length;o++){var d=l[o].start,h=l[o].end;if(t+n>=d&&t<h)a=d,r=h,i=r-t;else if(t+n<d){s=d;break}}return{len:i,start:a,end:r,nextStart:s}}}]),e}();n.default=r},{}],29:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){
for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=function(){function e(){i(this,e)}return a(e,null,[{key:"mergeDetails",value:function(t,n){var i,a=Math.max(t.startSN,n.startSN)-n.startSN,s=Math.min(t.endSN,n.endSN)-n.startSN,o=n.startSN-t.startSN,l=t.fragments,u=n.fragments,c=0;if(s<a)return void(n.PTSKnown=!1)
;for(var d=a;d<=s;d++){var h=l[o+d],p=u[d];p&&h&&(c=h.cc-p.cc,isNaN(h.startPTS)||(p.start=p.startPTS=h.startPTS,p.endPTS=h.endPTS,p.duration=h.duration,i=p))}if(c)for(r.logger.log("discontinuity sliding from playlist, take drift into account"),d=0;d<u.length;d++)u[d].cc+=c;if(i)e.updateFragPTSDTS(n,i.sn,i.startPTS,i.endPTS,i.startDTS,i.endDTS);else if(o>=0&&o<l.length){var f=l[o].start;for(d=0;d<u.length;d++)u[d].start+=f}n.PTSKnown=t.PTSKnown}},{key:"updateFragPTSDTS",
value:function(t,n,i,a,r,s){var o,l,u,c;if(n<t.startSN||n>t.endSN)return 0;if(o=n-t.startSN,l=t.fragments,u=l[o],!isNaN(u.startPTS)){var d=Math.abs(u.startPTS-i);isNaN(u.deltaPTS)?u.deltaPTS=d:u.deltaPTS=Math.max(d,u.deltaPTS),i=Math.min(i,u.startPTS),a=Math.max(a,u.endPTS),r=Math.min(r,u.startDTS),s=Math.max(s,u.endDTS)}var h=i-u.start;for(u.start=u.startPTS=i,u.endPTS=a,u.startDTS=r,u.endDTS=s,u.duration=a-i,c=o;c>0;c--)e.updatePTS(l,c,c-1);for(c=o;c<l.length-1;c++)e.updatePTS(l,c,c+1)
;return t.PTSKnown=!0,h}},{key:"updatePTS",value:function(e,t,n){var i=e[t],a=e[n],s=a.startPTS;isNaN(s)?a.start=n>t?i.start+i.duration:i.start-a.duration:n>t?(i.duration=s-i.start,i.duration<0&&r.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-s,
a.duration<0&&r.logger.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}}]),e}();n.default=s},{43:43}],30:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
;i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(26),o=i(s),l=e(24),u=e(34),c=i(u),d=e(32),h=i(d),p=e(3),f=i(p),g=e(6),m=i(g),v=e(7),y=i(v),b=e(4),S=i(b),I=e(11),w=i(I),M=e(10),C=i(M),D=e(12),P=i(D),T=e(9),x=i(T),E=e(5),A=i(E),k=e(43),L=e(47),_=i(L),N=e(1),R=i(N),O=e(33),j=i(O),z=e(41),U=i(z),F=function(){function e(){
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e);var n=e.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var i in n)i in t||(t[i]=n[i])
;if(void 0!==t.liveMaxLatencyDurationCount&&t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(t.liveMaxLatencyDuration<=t.liveSyncDuration||void 0===t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');(0,k.enableLogs)(t.debug),this.config=t;var r=this.observer=new R.default
;r.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.emit.apply(r,[e,e].concat(n))},r.off=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.removeListener.apply(r,[e].concat(n))},this.on=r.on.bind(r),this.off=r.off.bind(r),this.trigger=r.trigger.bind(r),this.playlistLoader=new c.default(this),this.fragmentLoader=new h.default(this),this.levelController=new C.default(this),
this.abrController=new t.abrController(this),this.bufferController=new t.bufferController(this),this.capLevelController=new t.capLevelController(this),this.fpsController=new t.fpsController(this),this.streamController=new t.streamController(this),this.audioStreamController=new t.audioStreamController(this),this.timelineController=new t.timelineController(this),this.audioTrackController=new A.default(this),this.keyLoader=new j.default(this)}return r(e,null,[{key:"isSupported",value:function(){
return window.MediaSource=window.MediaSource||window.WebKitMediaSource,window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"version",get:function(){return"0.6.9"}},{key:"Events",get:function(){return o.default}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){
return e.defaultConfig||(e.defaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,seekHoleNudgeDuration:.01,stalledInBufferedNudgeThreshold:10,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxMaxBufferLength:600,enableWorker:!0,
enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,
appendErrorMaxRetry:3,loader:_.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:f.default,bufferController:m.default,capLevelController:y.default,fpsController:x.default,streamController:w.default,audioStreamController:S.default,timelineController:P.default,cueHandler:U.default,enableCEA708Captions:!0,enableMP2TPassThrough:!1,stretchShortVideoTrack:!1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,
abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0}),e.defaultConfig},set:function(t){e.defaultConfig=t}}]),r(e,[{key:"destroy",value:function(){k.logger.log("destroy"),this.trigger(o.default.DESTROYING),this.detachMedia(),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.abrController.destroy(),this.bufferController.destroy(),this.capLevelController.destroy(),
this.fpsController.destroy(),this.streamController.destroy(),this.audioStreamController.destroy(),this.timelineController.destroy(),this.audioTrackController.destroy(),this.keyLoader.destroy(),this.url=null,this.observer.removeAllListeners()}},{key:"attachMedia",value:function(e){k.logger.log("attachMedia"),this.media=e,this.trigger(o.default.MEDIA_ATTACHING,{media:e})}},{key:"detachMedia",value:function(){k.logger.log("detachMedia"),this.trigger(o.default.MEDIA_DETACHING),this.media=null}},{
key:"loadSource",value:function(e){k.logger.log("loadSource:"+e),this.url=e,this.trigger(o.default.MANIFEST_LOADING,{url:e})}},{key:"startLoad",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;k.logger.log("startLoad"),this.levelController.startLoad(),this.streamController.startLoad(e),this.audioStreamController.startLoad(e)}},{key:"stopLoad",value:function(){k.logger.log("stopLoad"),this.levelController.stopLoad(),this.streamController.stopLoad(),
this.audioStreamController.stopLoad()}},{key:"swapAudioCodec",value:function(){k.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){k.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){k.logger.log("set currentLevel:"+e),this.loadLevel=e,
this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){k.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){k.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){
this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return this.levelController.firstLevel},set:function(e){k.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){k.logger.log("set startLevel:"+e),this.levelController.startLevel=e}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(e){k.logger.log("set autoLevelCapping:"+e),
this.abrController.autoLevelCapping=e}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"audioTracks",get:function(){return this.audioTrackController.audioTracks}},{key:"audioTrack",get:function(){return this.audioTrackController.audioTrack},set:function(e){this.audioTrackController.audioTrack=e}},{key:"liveSyncPosition",get:function(){
return this.streamController.liveSyncPosition}}]),e}();n.default=F},{1:1,10:10,11:11,12:12,24:24,26:26,3:3,32:32,33:33,34:34,4:4,41:41,43:43,47:47,5:5,6:6,7:7,9:9}],31:[function(e,t,n){"use strict";t.exports=e(30).default},{30:30}],32:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){
if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{
value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(24),p=e(43),f=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FRAG_LOADING));return n.loaders={},n}return s(t,e),o(t,[{key:"destroy",
value:function(){var e=this.loaders;for(var t in e){var n=e[t];n&&n.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag,n=t.type,i=this.loaders[n],a=this.hls.config;t.loaded=0,i&&(p.logger.warn("abort previous fragment loader for type:"+n),i.abort()),i=this.loaders[n]=t.loader=void 0!==a.fLoader?new a.fLoader(a):new a.loader(a);var r=void 0,s=void 0,o=void 0;r={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1}
;var l=t.byteRangeStartOffset,u=t.byteRangeEndOffset;isNaN(l)||isNaN(u)||(r.rangeStart=l,r.rangeEnd=u),s={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},o={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},i.load(r,s,o)}},{key:"loadsuccess",value:function(e,t,n){var i=e.data,a=n.frag;a.loader=void 0,this.loaders[a.type]=void 0,
this.hls.trigger(u.default.FRAG_LOADED,{payload:i,frag:a,stats:t})}},{key:"loaderror",value:function(e,t){var n=t.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e})}},{key:"loadtimeout",value:function(e,t){var n=t.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,
details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag})}},{key:"loadprogress",value:function(e,t,n){var i=t.frag;i.loaded=e.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e})}}]),t}(d.default);n.default=f},{24:24,25:25,26:26,43:43}],33:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){
if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{
value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(24),p=e(43),f=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}
return s(t,e),o(t,[{key:"destroy",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onKeyLoading",value:function(e){var t=e.frag,n=t.type,i=this.loaders[n],a=t.decryptdata,r=a.uri;if(r!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;i&&(p.logger.warn("abort previous key loader for type:"+n),i.abort()),t.loader=this.loaders[n]=new s.loader(s),this.decrypturl=r,this.decryptkey=null
;var o=void 0,l=void 0,c=void 0;o={url:r,frag:t,responseType:"arraybuffer"},l={timeout:s.fragLoadingTimeOut,maxRetry:s.fragLoadingMaxRetry,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(o,l,c)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:t}))}},{key:"loadsuccess",value:function(e,t,n){
var i=n.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(u.default.KEY_LOADED,{frag:i})}},{key:"loaderror",value:function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})}},{key:"loadtimeout",value:function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),
this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})}}]),t}(d.default);n.default=f},{24:24,25:25,26:26,43:43}],34:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
;return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
;i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(26),u=i(l),c=e(25),d=i(c),h=e(24),p=e(46),f=i(p),g=e(38),m=i(g),v=e(43),y=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING));return n.loaders={},n}return s(t,e),o(t,[{key:"destroy",
value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(e){this.load(e.url,{type:"manifest"})}},{key:"onLevelLoading",value:function(e){this.load(e.url,{type:"level",level:e.level,id:e.id})}},{key:"onAudioTrackLoading",value:function(e){this.load(e.url,{type:"audioTrack",id:e.id})}},{key:"load",value:function(e,t){var n=this.loaders[t.type];if(n){var i=n.context
;if(i&&i.url===e)return void v.logger.trace("playlist request ongoing");v.logger.warn("abort previous loader for type:"+t.type),n.abort()}var a=this.hls.config,r=void 0,s=void 0,o=void 0,l=void 0;"manifest"===t.type?(r=a.manifestLoadingMaxRetry,s=a.manifestLoadingTimeOut,o=a.manifestLoadingRetryDelay,l=a.manifestLoadingMaxRetryTimeOut):(r=a.levelLoadingMaxRetry,s=a.levelLoadingTimeOut,o=a.levelLoadingRetryDelay,l=a.levelLoadingMaxRetryTimeOut,v.logger.log("loading playlist for level "+t.level)),
n=this.loaders[t.type]=t.loader=void 0!==a.pLoader?new a.pLoader(a):new a.loader(a),t.url=e,t.responseType="";var u=void 0,c=void 0;u={timeout:s,maxRetry:r,retryDelay:o,maxRetryDelay:l},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},n.load(t,u,c)}},{key:"resolve",value:function(e,t){return f.default.buildAbsoluteURL(t,e)}},{key:"parseMasterPlaylist",value:function(e,t){
for(var n=[],i=void 0,a=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g;null!=(i=a.exec(e));){var r={},s=r.attrs=new m.default(i[1]);r.url=this.resolve(i[2],t);var o=s.decimalResolution("RESOLUTION");o&&(r.width=o.width,r.height=o.height),r.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),r.name=s.NAME;var l=s.CODECS;if(l){l=l.split(/[ ,]+/);for(var u=0;u<l.length;u++){var c=l[u];c.indexOf("avc1")!==-1?r.videoCodec=this.avc1toavcoti(c):r.audioCodec=c}}n.push(r)}
return n}},{key:"parseMasterPlaylistMedia",value:function(e,t,n){for(var i=void 0,a=[],r=/#EXT-X-MEDIA:(.*)/g;null!=(i=r.exec(e));){var s={},o=new m.default(i[1]);o.TYPE===n&&(s.groupId=o["GROUP-ID"],s.name=o.NAME,s.type=n,s.default="YES"===o.DEFAULT,s.autoselect="YES"===o.AUTOSELECT,s.forced="YES"===o.FORCED,o.URI&&(s.url=this.resolve(o.URI,t)),s.lang=o.LANGUAGE,s.name||(s.name=s.lang),a.push(s))}return a}},{key:"createInitializationVector",value:function(e){
for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}},{key:"fragmentDecryptdataFromLevelkey",value:function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&(n=this.cloneObj(e),n.iv=this.createInitializationVector(t)),n}},{key:"avc1toavcoti",value:function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t}},{key:"cloneObj",value:function(e){
return JSON.parse(JSON.stringify(e))}},{key:"parseLevelPlaylist",value:function(e,t,n,i){var a,r,s,o=0,l=0,u={type:null,version:null,url:t,fragments:[],live:!0,startSN:0},c={method:null,key:null,iv:null,uri:null},d=0,h=null,p=null,f=null,g=null,y=null,b=null,S=[]
;for(s=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF):(\d+(?:\.\d+)?)(?:,(.*))?)|(?:(?!#)()(\S.+))|(?:#EXT-X-(BYTERANGE):(\d+(?:@\d+(?:\.\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\r?\n?/g;null!==(r=s.exec(e));)switch(r.shift(),r=r.filter(function(e){
return void 0!==e}),r[0]){case"PLAYLIST-TYPE":u.type=r[1].toUpperCase();break;case"MEDIA-SEQUENCE":o=u.startSN=parseInt(r[1]);break;case"TARGETDURATION":u.targetduration=parseFloat(r[1]);break;case"VERSION":u.version=parseInt(r[1]);break;case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"DIS":d++,S.push(r);break;case"BYTERANGE":var I=r[1].split("@");b=1===I.length?y:parseInt(I[1]),y=parseInt(I[0])+b;break;case"INF":f=parseFloat(r[1]),g=r[2]?r[2]:null,S.push(r);break;case"":if(!isNaN(f)){
var w=o++;a=this.fragmentDecryptdataFromLevelkey(c,w);p={url:r[1]?this.resolve(r[1],t):null,type:i,duration:f,title:g,start:l,sn:w,level:n,cc:d,decryptdata:a,programDateTime:h,tagList:S},null!==b&&(p.byteRangeStartOffset=b,p.byteRangeEndOffset=y),u.fragments.push(p),l+=f,f=null,g=null,b=null,h=null,S=[]}break;case"KEY":var M=r[1],C=new m.default(M),D=C.enumeratedString("METHOD"),P=C.URI,T=C.hexadecimalInteger("IV");D&&(c={method:null,key:null,iv:null,uri:null},P&&"AES-128"===D&&(c.method=D,
c.uri=this.resolve(P,t),c.key=null,c.iv=T));break;case"START":var x=r[1],E=new m.default(x),A=E.decimalFloatingPoint("TIME-OFFSET");isNaN(A)||(u.startTimeOffset=A);break;case"PROGRAM-DATE-TIME":h=new Date(Date.parse(r[1])),S.push(r);break;case"#":r.shift(),S.push(r);break;default:v.logger.warn("line parsed but not handled: "+r)}return p&&!p.url&&(u.fragments.pop(),l-=p.duration),u.totalduration=l,u.averagetargetduration=l/u.fragments.length,u.endSN=o-1,u}},{key:"loadsuccess",
value:function(e,t,n){var i=e.data,a=e.url,r=n.type,s=n.id,o=n.level,l=this.hls;if(this.loaders[r]=void 0,void 0!==a&&0!==a.indexOf("data:")||(a=n.url),t.tload=performance.now(),0===i.indexOf("#EXTM3U"))if(i.indexOf("#EXTINF:")>0){var c="audioTrack"!==r,d=this.parseLevelPlaylist(i,a,(c?o:s)||0,c?"main":"audio");"manifest"===r&&l.trigger(u.default.MANIFEST_LOADED,{levels:[{url:a,details:d}],audioTracks:[],url:a,stats:t}),t.tparsed=performance.now(),c?l.trigger(u.default.LEVEL_LOADED,{details:d,
level:o||0,id:s||0,stats:t}):l.trigger(u.default.AUDIO_TRACK_LOADED,{details:d,id:s,stats:t})}else{var p=this.parseMasterPlaylist(i,a);if(p.length){var f=this.parseMasterPlaylistMedia(i,a,"AUDIO");if(f.length){var g=!1;f.forEach(function(e){e.url||(g=!0)}),g===!1&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(v.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main"}))}l.trigger(u.default.MANIFEST_LOADED,{levels:p,
audioTracks:f,url:a,stats:t})}else l.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:a,reason:"no level found in manifest"})}else l.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:a,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(e,t){var n,i,a=t.loader;switch(t.type){case"manifest":n=h.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case"level":
n=h.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case"audioTrack":n=h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,i=!1}a&&(a.abort(),this.loaders[t.type]=void 0),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:n,fatal:i,url:a.url,loader:a,response:e,context:t})}},{key:"loadtimeout",value:function(e,t){var n,i,a=t.loader;switch(t.type){case"manifest":n=h.ErrorDetails.MANIFEST_LOAD_TIMEOUT,i=!0;break;case"level":n=h.ErrorDetails.LEVEL_LOAD_TIMEOUT,i=!1;break;case"audioTrack":
n=h.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT,i=!1}a&&(a.abort(),this.loaders[t.type]=void 0),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:n,fatal:i,url:a.url,loader:a,context:t})}}]),t}(d.default);n.default=y},{24:24,25:25,26:26,38:38,43:43,46:46}],35:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){
for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],
stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var t;for(t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:i}
;var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=r,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,s,l,s,o),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,a))}},{
key:"box",value:function(e){for(var t,n=Array.prototype.slice.call(arguments,1),i=8,a=n.length,r=a;a--;)i+=n[a].byteLength;for(t=new Uint8Array(i),t[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),a=0,i=8;a<r;a++)t.set(n[a],i),i+=n[a].byteLength;return t}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}},{key:"mdhd",value:function(t,n){return n*=t,
e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"minf",value:function(t){
return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,n,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,n))}},{key:"moov",value:function(t){for(var n=t.length,i=[];n--;)i[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))}},{key:"mvex",value:function(t){for(var n=t.length,i=[];n--;)i[n]=e.trex(t[n])
;return e.box.apply(null,[e.types.mvex].concat(i))}},{key:"mvhd",value:function(t,n){n*=t;var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,i)}},{key:"sdtp",value:function(t){var n,i,a=t.samples||[],r=new Uint8Array(4+a.length)
;for(i=0;i<a.length;i++)n=a[i].flags,r[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,r)}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))}},{key:"avc1",value:function(t){var n,i,a,r=[],s=[];for(n=0;n<t.sps.length;n++)i=t.sps[n],a=i.byteLength,r.push(a>>>8&255),r.push(255&a),r=r.concat(Array.prototype.slice.call(i))
;for(n=0;n<t.pps.length;n++)i=t.pps[n],a=i.byteLength,s.push(a>>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=e.box(e.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|t.sps.length].concat(r).concat([t.pps.length]).concat(s))),l=t.width,u=t.height
;return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))}},{key:"esds",value:function(e){var t=e.config.length
;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){var n=t.audiosamplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"stsd",value:function(t){return"audio"===t.type?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))}},{key:"tkhd",
value:function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,r=t.height;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,r>>8&255,255&r,0,0]))}},{key:"traf",value:function(t,n){var i=e.sdtp(t),a=t.id
;return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),e.trun(t,i.length+16+16+8+16+8+8),i)}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{
key:"trun",value:function(t,n){var i,a,r,s,o,l,u=t.samples||[],c=u.length,d=12+16*c,h=new Uint8Array(d);for(n+=8+d,h.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),i=0;i<c;i++)a=u[i],r=a.duration,s=a.size,o=a.flags,l=a.cts,
h.set([r>>>24&255,r>>>16&255,r>>>8&255,255&r,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,h)}},{key:"initSegment",value:function(t){e.types||e.init();var n,i=e.moov(t);return n=new Uint8Array(e.FTYP.byteLength+i.byteLength),n.set(e.FTYP),n.set(i,e.FTYP.byteLength),n}}]),e}();n.default=r},{}],
36:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}
}(),s=e(27),o=i(s),l=e(26),u=i(l),c=e(43),d=e(35),h=i(d),p=e(24);e(44);var f=function(){function e(t,n,i){a(this,e),this.observer=t,this.id=n,this.config=i,this.ISGenerated=!1,this.PES2MP4SCALEFACTOR=4,this.PES_TIMESCALE=9e4,this.MP4_TIMESCALE=this.PES_TIMESCALE/this.PES2MP4SCALEFACTOR}return r(e,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){this._initPTS=this._initDTS=void 0}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",
value:function(e,t,n,i,a,r,s,o,l){if(this.level=e,this.sn=t,this.ISGenerated||this.generateIS(n,i,s),this.ISGenerated)if(n.samples.length){var c=this.remuxAudio(n,s,o,l);if(i.samples.length){var d=void 0;c&&(d=c.endPTS-c.startPTS),this.remuxVideo(i,s,o,d)}}else{var h=void 0;i.samples.length&&(h=this.remuxVideo(i,s,o)),h&&n.codec&&this.remuxEmptyAudio(n,s,o,h)}a.samples.length&&this.remuxID3(a,s),r.samples.length&&this.remuxText(r,s),this.observer.trigger(u.default.FRAG_PARSED,{id:this.id,
level:this.level,sn:this.sn})}},{key:"generateIS",value:function(e,t,n){var i,a,r=this.observer,s=e.samples,o=t.samples,l=this.PES_TIMESCALE,d={},f={id:this.id,level:this.level,sn:this.sn,tracks:d,unique:!1},g=void 0===this._initPTS;g&&(i=a=1/0),e.config&&s.length&&(e.timescale=e.audiosamplerate,e.timescale*e.duration>Math.pow(2,32)&&function(){e.timescale=e.audiosamplerate/function e(t,n){return n?e(n,t%n):t}(e.audiosamplerate,1024)}(),c.logger.log("audio mp4 timescale :"+e.timescale),d.audio={
container:"audio/mp4",codec:e.codec,initSegment:h.default.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(i=a=s[0].pts-l*n)),t.sps&&t.pps&&o.length&&(t.timescale=this.MP4_TIMESCALE,d.video={container:"video/mp4",codec:t.codec,initSegment:h.default.initSegment([t]),metadata:{width:t.width,height:t.height}},g&&(i=Math.min(i,o[0].pts-l*n),a=Math.min(a,o[0].dts-l*n))),Object.keys(d).length?(r.trigger(u.default.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,g&&(this._initPTS=i,
this._initDTS=a)):r.trigger(u.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,id:this.id,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})}},{key:"remuxVideo",value:function(e,t,n,i){var a,r,s,o,l,d,p,f=8,g=this.PES_TIMESCALE,m=this.PES2MP4SCALEFACTOR,v=e.samples,y=[],b=v.reduce(function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-18e3)},0);if(b<0){
c.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(b/90)+" ms to overcome this issue");for(var S=0;S<v.length;S++)v[S].dts+=b}var I=void 0;I=n?this.nextAvcDts:t*g;var w=v[0];l=Math.max(this._PTSNormalize(w.dts-this._initDTS,I),0),o=Math.max(this._PTSNormalize(w.pts-this._initDTS,I),0);var M=Math.round((l-I)/90)
;n&&M&&(M>1?c.logger.log("AVC:"+M+" ms hole between fragments detected,filling it"):M<-1&&c.logger.log("AVC:"+-M+" ms overlapping between fragments detected"),l=I,v[0].dts=l+this._initDTS,o=Math.max(o-M,I),v[0].pts=o+this._initDTS,c.logger.log("Video/PTS/DTS adjusted: "+Math.round(o/90)+"/"+Math.round(l/90)+",delta:"+M+" ms")),w=v[v.length-1],p=Math.max(this._PTSNormalize(w.dts-this._initDTS,I),0),d=Math.max(this._PTSNormalize(w.pts-this._initDTS,I),0),d=Math.max(d,p)
;var C=navigator.vendor,D=navigator.userAgent,P=C&&C.indexOf("Apple")>-1&&D&&!D.match("CriOS");P&&(a=Math.round((p-l)/(m*(v.length-1))));for(var T=0;T<v.length;T++){var x=v[T];P?x.dts=l+T*m*a:(x.dts=Math.max(this._PTSNormalize(x.dts-this._initDTS,I),l),x.dts=Math.round(x.dts/m)*m),x.pts=Math.max(this._PTSNormalize(x.pts-this._initDTS,I),x.dts),x.pts=Math.round(x.pts/m)*m}r=new Uint8Array(e.len+4*e.nbNalu+8);var E=new DataView(r.buffer);E.setUint32(0,r.byteLength),r.set(h.default.types.mdat,4)
;for(var A=0;A<v.length;A++){for(var k=v[A],L=0,_=void 0;k.units.units.length;){var N=k.units.units.shift();E.setUint32(f,N.data.byteLength),f+=4,r.set(N.data,f),f+=N.data.byteLength,L+=4+N.data.byteLength}if(P)_=Math.max(0,a*Math.round((k.pts-k.dts)/(m*a)));else{if(A<v.length-1)a=v[A+1].dts-k.dts;else{var R=this.config,O=k.dts-v[A>0?A-1:A].dts;if(R.stretchShortVideoTrack){var j=R.maxBufferHole,z=R.maxSeekHole,U=Math.floor(Math.min(j,z)*g),F=(i?o+i*g:this.nextAacPts)-k.pts;F>U?(a=F-O,a<0&&(a=O),
c.logger.log("It is approximately "+F/90+" ms to the next segment; using duration "+a/90+" ms for the last video frame.")):a=O}else a=O}a/=m,_=Math.round((k.pts-k.dts)/m)}y.push({size:L,duration:a,cts:_,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:k.key?2:1,isNonSync:k.key?0:1}})}this.nextAvcDts=p+a*m;var B=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var V=y[0].flags;V.dependsOn=2,V.isNonSync=0}
e.samples=y,s=h.default.moof(e.sequenceNumber++,l/m,e),e.samples=[];var H={id:this.id,level:this.level,sn:this.sn,data1:s,data2:r,startPTS:o/g,endPTS:(d+m*a)/g,startDTS:l/g,endDTS:this.nextAvcDts/g,type:"video",nb:y.length,dropped:B};return this.observer.trigger(u.default.FRAG_PARSING_DATA,H),H}},{key:"remuxAudio",value:function(e,t,n,i){var a,r,s,l,d,p,f,g,m,v,y,b,S,I,w,M,C=this.PES_TIMESCALE,D=e.timescale,P=C/D,T=1024*e.timescale/e.audiosamplerate,x=T*P,E=8,A=[],k=[]
;if(e.samples.sort(function(e,t){return e.pts-t.pts}),k=e.samples,M=this.nextAacPts,n|=k.length&&M&&(Math.abs(t-M/C)<.1||Math.abs(k[0].pts-M)<20*x),n||(M=t*C),i)for(var L=0,_=M;L<k.length;){var N=k[L],R=this._PTSNormalize(N.pts-this._initDTS,M),O=R-_;if(O<=-x)c.logger.warn("Dropping 1 audio frame @ "+Math.round(_/90)/1e3+"s due to "+Math.round(Math.abs(O/90))+" ms overlap."),k.splice(L,1),e.len-=N.unit.length;else if(O>=x){var j=Math.round(O/x)
;c.logger.warn("Injecting "+j+" audio frame @ "+Math.round(_/90)/1e3+"s due to "+Math.round(O/90)+" ms gap.");for(var z=0;z<j;z++)w=_+this._initDTS,w=Math.max(w,this._initDTS),I=o.default.getSilentFrame(e.channelCount),I||(c.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),I=N.unit.slice(0)),k.splice(L,0,{unit:I,pts:w,dts:w}),e.len+=I.length,_+=x,L+=1;N.pts=N.dts=_+this._initDTS,_+=x,L+=1}else Math.abs(O),_+=x,
N.pts=N.dts=0===L?this._initDTS+M:k[L-1].pts+x,L+=1}for(;k.length;){if(r=k.shift(),l=r.unit,v=r.pts-this._initDTS,y=r.dts-this._initDTS,void 0!==m)b=this._PTSNormalize(v,m),S=this._PTSNormalize(y,m),s.duration=Math.round((S-m)/P);else{b=this._PTSNormalize(v,M),S=this._PTSNormalize(y,M);var U=Math.round(1e3*(b-M)/C),F=0;if(n&&U){if(U>0)F=Math.round((b-M)/x),c.logger.log(U+" ms hole between AAC samples detected,filling it"),F>0&&(I=o.default.getSilentFrame(e.channelCount),I||(I=l.slice(0)),
e.len+=F*I.length);else if(U<-12){c.logger.log(-U+" ms overlapping between AAC samples detected, drop frame"),e.len-=l.byteLength;continue}b=S=M}if(f=Math.max(0,b),g=Math.max(0,S),!(e.len>0))return;d=new Uint8Array(e.len+8),a=new DataView(d.buffer),a.setUint32(0,d.byteLength),d.set(h.default.types.mdat,4);for(var B=0;B<F;B++)w=b-(F-B)*x,I=o.default.getSilentFrame(e.channelCount),I||(c.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),I=l.slice(0)),
d.set(I,E),E+=I.byteLength,s={size:I.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},A.push(s)}d.set(l,E),E+=l.byteLength,s={size:l.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},A.push(s),m=S}var V=0,H=A.length;if(H>=2&&(V=A[H-2].duration,s.duration=V),H){this.nextAacPts=b+P*V,e.len=0,e.samples=A,p=h.default.moof(e.sequenceNumber++,g/P,e),e.samples=[];var W={id:this.id,
level:this.level,sn:this.sn,data1:p,data2:d,startPTS:f/C,endPTS:this.nextAacPts/C,startDTS:g/C,endDTS:(S+P*V)/C,type:"audio",nb:H};return this.observer.trigger(u.default.FRAG_PARSING_DATA,W),W}return null}},{key:"remuxEmptyAudio",value:function(e,t,n,i){var a=this.PES_TIMESCALE,r=e.timescale?e.timescale:e.audiosamplerate,s=a/r,l=this.nextAacPts,u=(void 0!==l?l:i.startDTS*a)+this._initDTS,d=i.endDTS*a+this._initDTS,h=1024*s,p=Math.ceil((d-u)/h),f=o.default.getSilentFrame(e.channelCount)
;if(c.logger.warn("remux empty Audio"),!f)return void c.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var g=[],m=0;m<p;m++){var v=u+m*h;g.push({unit:f.slice(0),pts:v,dts:v}),e.len+=f.length}e.samples=g,this.remuxAudio(e,t,n)}},{key:"remuxID3",value:function(e,t){var n,i=e.samples.length;if(i){for(var a=0;a<i;a++)n=e.samples[a],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE,n.dts=(n.dts-this._initDTS)/this.PES_TIMESCALE
;this.observer.trigger(u.default.FRAG_PARSING_METADATA,{id:this.id,level:this.level,sn:this.sn,samples:e.samples})}e.samples=[],t=t}},{key:"remuxText",value:function(e,t){e.samples.sort(function(e,t){return e.pts-t.pts});var n,i=e.samples.length;if(i){for(var a=0;a<i;a++)n=e.samples[a],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE;this.observer.trigger(u.default.FRAG_PARSING_USERDATA,{id:this.id,level:this.level,sn:this.sn,samples:e.samples})}e.samples=[],t=t}},{key:"_PTSNormalize",
value:function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}},{key:"passthrough",get:function(){return!1}}]),e}();n.default=f},{24:24,26:26,27:27,35:35,43:43,44:44}],37:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
;i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(26),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(){function e(t,n){i(this,e),this.observer=t,this.id=n,this.ISGenerated=!1}return a(e,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",
value:function(e,t,n,i,a,r){var o=this.observer;if(!this.ISGenerated){var l={},u={id:this.id,tracks:l,unique:!0},c=t,d=c.codec;d&&(u.tracks.video={container:c.container,codec:d,metadata:{width:c.width,height:c.height}}),c=e,d=c.codec,d&&(u.tracks.audio={container:c.container,codec:d,metadata:{channelCount:c.channelCount}}),this.ISGenerated=!0,o.trigger(s.default.FRAG_PARSING_INIT_SEGMENT,u)}o.trigger(s.default.FRAG_PARSING_DATA,{id:this.id,data1:r,startPTS:a,startDTS:a,type:"audiovideo",nb:1,
dropped:0})}},{key:"passthrough",get:function(){return!0}}]),e}();n.default=o},{26:26}],38:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),r=function(){function e(t){i(this,e),"string"==typeof t&&(t=e.parseAttrList(t));for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n])}return a(e,[{key:"decimalInteger",value:function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"hexadecimalInteger",value:function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)n[i]=parseInt(t.slice(2*i,2*i+2),16);return n}return null}},{
key:"hexadecimalIntegerAsNumber",value:function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"enumeratedString",value:function(e){return this[e]}},{key:"decimalResolution",value:function(e){var t=/^(\d+)x(\d+)$/.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}}],[{key:"parseAttrList",value:function(e){
for(var t,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,i={};null!==(t=n.exec(e));){var a=t[2];0===a.indexOf('"')&&a.lastIndexOf('"')===a.length-1&&(a=a.slice(1,-1)),i[t[1]]=a}return i}}]),e}();n.default=r},{}],39:[function(e,t,n){"use strict";var i={search:function(e,t){for(var n=0,i=e.length-1,a=null,r=null;n<=i;){a=(n+i)/2|0,r=e[a];var s=t(r);if(s>0)n=a+1;else{if(!(s<0))return r;i=a-1}}return null}};t.exports=i},{}],40:[function(e,t,n){"use strict";function i(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,
133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,
195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},s=function(e){var t=e;return r.hasOwnProperty(e)&&(t=r[e]),String.fromCharCode(t)},o=15,l=32,u={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},c={17:2,18:4,21:6,22:8,23:10,19:13,20:15},d={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f={verboseFilter:{DATA:3,DEBUG:3,
INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},g=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},m=function(){function e(t,n,a,r,s){i(this,e),this.foreground=t||"white",this.underline=n||!1,this.italics=a||!1,this.background=r||"black",this.flash=s||!1}return a(e,[{key:"reset",value:function(){
this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",value:function(e){
return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}},{key:"copy",value:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}},{key:"toString",value:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}]),e
}(),v=function(){function e(t,n,a,r,s,o){i(this,e),this.uchar=t||" ",this.penState=new m(n,a,r,s,o)}return a(e,[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(e,t){this.uchar=e,this.penState.copy(t)}},{key:"setPenState",value:function(e){this.penState.copy(e)}},{key:"equals",value:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}},{key:"copy",value:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)}},{
key:"isEmpty",value:function(){return" "===this.uchar&&this.penState.isDefault()}}]),e}(),y=function(){function e(){i(this,e),this.chars=[];for(var t=0;t<l;t++)this.chars.push(new v);this.pos=0,this.currPenState=new m}return a(e,[{key:"equals",value:function(e){for(var t=!0,n=0;n<l;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<l;t++)this.chars[t].copy(e.chars[t])}},{key:"isEmpty",value:function(){
for(var e=!0,t=0;t<l;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}},{key:"setCursor",value:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(f.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>l&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=l)}},{key:"moveCursor",value:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}},{key:"backSpace",value:function(){
this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}},{key:"insertChar",value:function(e){e>=144&&this.backSpace();var t=s(e);if(this.pos>=l)return void f.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}},{key:"clearFromPos",value:function(e){var t;for(t=e;t<l;t++)this.chars[t].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,
this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos)}},{key:"getTextString",value:function(){for(var e=[],t=!0,n=0;n<l;n++){var i=this.chars[n].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")}},{key:"setPenStyles",value:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}]),e}(),b=function(){function e(){i(this,e),this.rows=[];for(var t=0;t<o;t++)this.rows.push(new y);this.currRow=o-1,
this.nrRollUpRows=null,this.reset()}return a(e,[{key:"reset",value:function(){for(var e=0;e<o;e++)this.rows[e].clear();this.currRow=o-1}},{key:"equals",value:function(e){for(var t=!0,n=0;n<o;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<o;t++)this.rows[t].copy(e.rows[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<o;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}},{key:"backSpace",value:function(){
this.rows[this.currRow].backSpace()}},{key:"clearToEndOfRow",value:function(){this.rows[this.currRow].clearToEndOfRow()}},{key:"insertChar",value:function(e){this.rows[this.currRow].insertChar(e)}},{key:"setPen",value:function(e){this.rows[this.currRow].setPenStyles(e)}},{key:"moveCursor",value:function(e){this.rows[this.currRow].moveCursor(e)}},{key:"setCursor",value:function(e){f.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)}},{key:"setPAC",value:function(e,t){
f.log("INFO","pacData = "+JSON.stringify(e));var n=e.row-1;if(this.nrRollUpRows&&n<this.nrRollUpRows-1&&(n=this.nrRollUpRows-1),this.currRow!==n){for(var i=0;i<o;i++)this.rows[i].clear();var a=this.currRow+1-this.nrRollUpRows,r=t.rows[a].cueStartTime;if(r&&r<f.time)for(i=0;i<this.nrRollUpRows;i++)this.rows[n-this.nrRollUpRows+i+1].copy(t.rows[a+i])}this.currRow=n;var s=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,u=Math.max(l-1,0);s.setCursor(e.indent),
e.color=s.chars[u].penState.foreground}var c={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(c)}},{key:"setBkgData",value:function(e){f.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}},{key:"setRollUpRows",value:function(e){this.nrRollUpRows=e}},{key:"rollUp",value:function(){if(null===this.nrRollUpRows)return void f.log("DEBUG","roll_up but nrRollUpRows not set yet")
;f.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),f.log("INFO","Rolling up")}},{key:"getDisplayText",value:function(e){e=e||!1;for(var t=[],n="",i=-1,a=0;a<o;a++){var r=this.rows[a].getTextString();r&&(i=a+1,e?t.push("Row "+i+": '"+r+"'"):t.push(r.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}},{key:"getTextAndFormat",value:function(){return this.rows}}]),e}(),S=function(){
function e(t,n){i(this,e),this.chNr=t,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new b,this.nonDisplayedMemory=new b,this.lastOutputScreen=new b,this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return a(e,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],
this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(e){this.outputFilter=e}},{key:"setPAC",value:function(e){this.writeScreen.setPAC(e,this.lastOutputScreen)}},{key:"setBkgData",value:function(e){this.writeScreen.setBkgData(e)}},{key:"setMode",value:function(e){e!==this.mode&&(this.mode=e,f.log("INFO","MODE="+e),
"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset(),this.lastOutputScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}},{key:"insertChars",value:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP"
;f.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(f.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}},{key:"ccRCL",value:function(){f.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){f.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{
key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){f.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(e){f.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}},{key:"ccFON",value:function(){f.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){
f.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){f.log("INFO","TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){f.log("INFO","RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){f.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()}},{key:"ccCR",value:function(){f.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()}},{key:"ccENM",
value:function(){f.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){if(f.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,f.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()}},{key:"ccTO",value:function(e){f.log("INFO","TO("+e+") - Tab Offset"),
this.writeScreen.moveCursor(e)}},{key:"ccMIDROW",value:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[n]}f.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}},{key:"outputDataUpdate",value:function(){var e=f.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),
null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(e){
this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}]),e}(),I=function(){function e(t,n,a){i(this,e),this.field=t||1,this.outputs=[n,a],this.channels=[new S(1,n),new S(2,a)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return a(e,[{key:"getHandler",
value:function(e){return this.channels[e].getHandler()}},{key:"setHandler",value:function(e,t){this.channels[e].setHandler(t)}},{key:"addData",value:function(e,t){var n,i,a,r=!1;this.lastTime=e,f.setTime(e);for(var s=0;s<t.length;s+=2)if(i=127&t[s],a=127&t[s+1],0!==i||0!==a){if(f.log("DATA","["+g([t[s],t[s+1]])+"] -> ("+g([i,a])+")"),n=this.parseCmd(i,a),n||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),
!n&&(r=this.parseChars(i,a)))if(this.currChNr&&this.currChNr>=0){var o=this.channels[this.currChNr-1];o.insertChars(r)}else f.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:r?this.dataCounters.char+=2:(this.dataCounters.other+=2,f.log("WARNING","Couldn't parse cleaned data "+g([i,a])+" orig: "+g([t[s],t[s+1]])))}else this.dataCounters.padding+=2}},{key:"parseCmd",value:function(e,t){var n=null,i=(20===e||28===e)&&32<=t&&t<=47,a=(23===e||31===e)&&33<=t&&t<=35
;if(!i&&!a)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+g([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var r=this.channels[n-1]
;return 20===e||28===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"parseMidrow",value:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){
if((n=17===e?1:2)!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;return this.channels[n-1].ccMIDROW(t),f.log("DEBUG","MIDROW ("+g([e,t])+")"),!0}return!1}},{key:"parsePAC",value:function(e,t){var n=null,i=null,a=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,r=(16===e||24===e)&&64<=t&&t<=95;if(!a&&!r)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,i=64<=t&&t<=95?1===n?u[e]:d[e]:1===n?c[e]:h[e]
;var s=this.interpretPAC(i,t);return this.channels[n-1].setPAC(s),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"interpretPAC",value:function(e,t){var n=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,i.underline=1==(1&n),n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((n-16)/2),i}},{key:"parseChars",value:function(e,t){var n=null,i=null,a=null
;if(e>=25?(n=2,a=e-8):(n=1,a=e),17<=a&&a<=19){var r=t;r=17===a?t+80:18===a?t+112:t+144,f.log("INFO","Special char '"+s(r)+"' in channel "+n),i=[r]}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var o=g(i);f.log("DEBUG","Char codes =  "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i}},{key:"parseBackgroundAttributes",value:function(e,t){var n,i,a,r,s=(16===e||24===e)&&32<=t&&t<=47,o=(23===e||31===e)&&45<=t&&t<=47;return!(!s&&!o)&&(n={},16===e||24===e?(i=Math.floor((t-32)/2),
n.background=p[i],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),a=e<24?1:2,r=this.channels[a-1],r.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)}},{key:"reset",value:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null}},{key:"cueSplitAtTime",value:function(e){
for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}}]),e}();n.default=I},{}],41:[function(e,t,n){"use strict";var i={newCue:function(e,t,n,i){for(var a,r,s,o,l,u=window.VTTCue||window.TextTrackCue,c=0;c<i.rows.length;c++)if(a=i.rows[c],s=!0,o=0,l="",!a.isEmpty()){for(var d=0;d<a.chars.length;d++)a.chars[d].uchar.match(/\s/)&&s?o++:(l+=a.chars[d].uchar,s=!1);a.cueStartTime=t,r=new u(t,n,l.trim()),o>=16?o--:o++,
navigator.userAgent.match(/Firefox\//)?r.line=c+1:r.line=c>7?c-2:c+1,r.align="left",r.position=Math.max(0,Math.min(100,o/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(r)}}};t.exports=i},{}],42:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,
i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){i(this,e),this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=0,this.totalWeight_=0}return a(e,[{key:"sample",value:function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",
value:function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_}}]),e}();n.default=r},{}],43:[function(e,t,n){"use strict";function i(){}function a(e,t){return t="["+e+"] > "+t}function r(e){var t=self.console[e];return t?function(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];i[0]&&(i[0]=a(e,i[0])),t.apply(self.console,i)}:i}function s(e){
for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];n.forEach(function(t){u[t]=e[t]?e[t].bind(e):r(t)})}Object.defineProperty(n,"__esModule",{value:!0});var o="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={trace:i,debug:i,log:i,warn:i,info:i,error:i},u=l;n.enableLogs=function(e){
if(e===!0||"object"===(void 0===e?"undefined":o(e))){s(e,"debug","log","info","warn","error");try{u.log()}catch(e){u=l}}else u=l},n.logger=u},{}],44:[function(e,t,n){"use strict";"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(e,t){var n=new Uint8Array(this);void 0===t&&(t=n.length);for(var i=new ArrayBuffer(t-e),a=new Uint8Array(i),r=0;r<a.length;r++)a[r]=n[r+e];return i})},{}],45:[function(e,t,n){"use strict";function i(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,null,[{key:"toString",value:function(e){
for(var t="",n=e.length,i=0;i<n;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}}]),e}();n.default=r},{}],46:[function(e,t,n){"use strict";var i={buildAbsoluteURL:function(e,t){if(t=t.trim(),/^[a-z]+:/i.test(t))return t;var n=null,a=null,r=/^([^#]*)(.*)$/.exec(t);r&&(a=r[2],t=r[1]);var s=/^([^\?]*)(.*)$/.exec(t);s&&(n=s[2],t=s[1]);var o=/^([^#]*)(.*)$/.exec(e);o&&(e=o[1]);var l=/^([^\?]*)(.*)$/.exec(e);l&&(e=l[1])
;var u=/^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(e);if(!u)throw new Error("Error trying to parse base URL.");var c=u[2]||"",d=u[1]||"",h=u[4],p=null;return p=/^\/\//.test(t)?c+"//"+i.buildAbsolutePath("",t.substring(2)):/^\//.test(t)?d+"/"+i.buildAbsolutePath("",t.substring(1)):i.buildAbsolutePath(d+h,t),n&&(p+=n),a&&(p+=a),p},buildAbsolutePath:function(e,t){
for(var n,i,a=t,r="",s=e.replace(/[^\/]*$/,a.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),o=0;(i=s.indexOf("/../",o))>-1;o=i+n)n=/^\/(?:\.\.\/)*/.exec(s.slice(i))[0].length,r=(r+s.substring(o,i)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(n-1)/3+"}$"),"/");return r+s.substr(o)}};t.exports=i},{}],47:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){
for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e(43),s=function(){function e(t){i(this,e),t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}return a(e,[{key:"destroy",value:function(){this.abort(),this.loader=null}},{key:"abort",value:function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),
window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null}},{key:"load",value:function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:performance.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()}},{key:"loadInternal",value:function(){var e,t=this.context;e="undefined"!=typeof XDomainRequest?this.loader=new XDomainRequest:this.loader=new XMLHttpRequest,
e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.open("GET",t.url,!0),t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.responseType=t.responseType;var n=this.stats;n.tfirst=0,n.loaded=0,this.xhrSetup&&this.xhrSetup(e,t.url),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()}},{key:"readystatechange",value:function(e){
var t=e.currentTarget,n=t.readyState,i=this.stats,a=this.context,s=this.config;if(!i.aborted&&(window.clearTimeout(this.requestTimeout),n>=2&&(0===i.tfirst&&(i.tfirst=Math.max(performance.now(),i.trequest),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout-(i.tfirst-i.trequest))),4===n))){var o=t.status;if(o>=200&&o<300){i.tload=Math.max(i.tfirst,performance.now());var l=void 0,u=void 0;"arraybuffer"===a.responseType?(l=t.response,u=l.byteLength):(l=t.responseText,
u=l.length),i.loaded=i.total=u;var c={url:t.responseURL,data:l};this.callbacks.onSuccess(c,i,a)}else i.retry>=s.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+a.url),this.callbacks.onError({code:o,text:t.statusText},a)):(r.logger.warn(o+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),i.retry++)}}},{
key:"loadtimeout",value:function(){r.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context)}},{key:"loadprogress",value:function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total);var n=this.callbacks.onProgress;n&&n(t,this.context,null)}}]),e}();n.default=s},{43:43}]},{},[31])(31)})},function(e,t,n){(function(n){var i={},a=void 0!==e&&e.exports&&void 0!==n?n:this||i;(a._gsQueue||(a._gsQueue=[])).push(function(){
"use strict";a._gsDefine("easing.Back",["easing.Ease"],function(e){var t,n,i,r=a.GreenSockGlobals||a,s=r.com.greensock,o=2*Math.PI,l=Math.PI/2,u=s._class,c=function(t,n){var i=u("easing."+t,function(){},!0),a=i.prototype=new e;return a.constructor=i,a.getRatio=n,i},d=e.register||function(){},h=function(e,t,n,i,a){var r=u("easing."+e,{easeOut:new t,easeIn:new n,easeInOut:new i},!0);return d(r,e),r},p=function(e,t,n){this.t=e,this.v=t,n&&(this.next=n,n.prev=this,this.c=n.v-t,this.gap=n.t-e)
},f=function(t,n){var i=u("easing."+t,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),a=i.prototype=new e;return a.constructor=i,a.getRatio=n,a.config=function(e){return new i(e)},i},g=h("Back",f("BackOut",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),f("BackIn",function(e){return e*e*((this._p1+1)*e-this._p1)}),f("BackInOut",function(e){return(e*=2)<1?.5*e*e*((this._p2+1)*e-this._p2):.5*((e-=2)*e*((this._p2+1)*e+this._p2)+2)
})),m=u("easing.SlowMo",function(e,t,n){t=t||0===t?t:.7,null==e?e=.7:e>1&&(e=1),this._p=1!==e?t:0,this._p1=(1-e)/2,this._p2=e,this._p3=this._p1+this._p2,this._calcEnd=n===!0},!0),v=m.prototype=new e;return v.constructor=m,v.getRatio=function(e){var t=e+(.5-e)*this._p;return e<this._p1?this._calcEnd?1-(e=1-e/this._p1)*e:t-(e=1-e/this._p1)*e*e*e*t:e>this._p3?this._calcEnd?1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t},m.ease=new m(.7,.7),
v.config=m.config=function(e,t,n){return new m(e,t,n)},t=u("easing.SteppedEase",function(e){e=e||1,this._p1=1/e,this._p2=e+1},!0),v=t.prototype=new e,v.constructor=t,v.getRatio=function(e){return e<0?e=0:e>=1&&(e=.999999999),(this._p2*e>>0)*this._p1},v.config=t.config=function(e){return new t(e)},n=u("easing.RoughEase",function(t){t=t||{}
;for(var n,i,a,r,s,o,l=t.taper||"none",u=[],c=0,d=0|(t.points||20),h=d,f=t.randomize!==!1,g=t.clamp===!0,m=t.template instanceof e?t.template:null,v="number"==typeof t.strength?.4*t.strength:.4;--h>-1;)n=f?Math.random():1/d*h,i=m?m.getRatio(n):n,"none"===l?a=v:"out"===l?(r=1-n,a=r*r*v):"in"===l?a=n*n*v:n<.5?(r=2*n,a=r*r*.5*v):(r=2*(1-n),a=r*r*.5*v),f?i+=Math.random()*a-.5*a:h%2?i+=.5*a:i-=.5*a,g&&(i>1?i=1:i<0&&(i=0)),u[c++]={x:n,y:i};for(u.sort(function(e,t){return e.x-t.x}),o=new p(1,1,null),
h=d;--h>-1;)s=u[h],o=new p(s.x,s.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0),v=n.prototype=new e,v.constructor=n,v.getRatio=function(e){var t=this._prev;if(e>t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;return this._prev=t,t.v+(e-t.t)/t.gap*t.c},v.config=function(e){return new n(e)},n.ease=new n,h("Bounce",c("BounceOut",function(e){
return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),c("BounceIn",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),c("BounceInOut",function(e){var t=e<.5;return e=t?1-2*e:2*e-1,
e<1/2.75?e*=7.5625*e:e=e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),h("Circ",c("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),c("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),c("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),i=function(t,n,i){var a=u("easing."+t,function(e,t){this._p1=e>=1?e:1,this._p2=(t||i)/(e<1?e:1),
this._p3=this._p2/o*(Math.asin(1/this._p1)||0),this._p2=o/this._p2},!0),r=a.prototype=new e;return r.constructor=a,r.getRatio=n,r.config=function(e,t){return new a(e,t)},a},h("Elastic",i("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),i("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2))},.3),i("ElasticInOut",function(e){
return(e*=2)<1?-.5*(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(e-=1))*Math.sin((e-this._p3)*this._p2)*.5+1},.45)),h("Expo",c("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),c("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),c("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),h("Sine",c("SineOut",function(e){return Math.sin(e*l)}),c("SineIn",function(e){return 1-Math.cos(e*l)
}),c("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),u("easing.EaseLookup",{find:function(t){return e.map[t]}},!0),d(r.SlowMo,"SlowMo","ease,"),d(n,"RoughEase","ease,"),d(t,"SteppedEase","ease,"),g},!0)}),a._gsDefine&&a._gsQueue.pop()(),t.Power1=Power1,t.Power2=Power2,t.Power3=Power3}).call(t,n(242))},function(e,t,n){(function(i){var a,r,s={};/*!
 * VERSION: 1.18.1
 * DATE: 2015-12-11
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
 * This work is subject to the terms at http://greensock.com/standard-license or for
 * Club GreenSock members, the software agreement that was issued with your membership.
 *
 * @author: Jack Doyle, jack@greensock.com
 */
!function(i,s){"use strict";var o=i.GreenSockGlobals=i.GreenSockGlobals||i;if(!o.TweenLite){var l,u,c,d,h,p=function(e){var t,n=e.split("."),i=o;for(t=0;t<n.length;t++)i[n[t]]=i=i[n[t]]||{};return i},f=p("com.greensock"),g=function(e){var t,n=[],i=e.length;for(t=0;t!==i;n.push(e[t++]));return n},m=function(){},v=function(){var e=Object.prototype.toString,t=e.call([]);return function(n){return null!=n&&(n instanceof Array||"object"==typeof n&&!!n.push&&e.call(n)===t)}}(),y={},b=function(i,s,l,u){
this.sc=y[i]?y[i].sc:[],y[i]=this,this.gsClass=null,this.func=l;var c=[];this.check=function(d){for(var h,f,g,m,v,S=s.length,I=S;--S>-1;)(h=y[s[S]]||new b(s[S],[])).gsClass?(c[S]=h.gsClass,I--):d&&h.sc.push(this);if(0===I&&l)for(f=("com.greensock."+i).split("."),g=f.pop(),m=p(f.join("."))[g]=this.gsClass=l.apply(l,c),u&&(o[g]=m,v=void 0!==e&&e.exports,!v&&n(3345)?(a=[],void 0!==(r=function(){return m}.apply(t,a))&&(e.exports=r)):"TweenLite"===i&&v&&(e.exports=m)),
S=0;S<this.sc.length;S++)this.sc[S].check()},this.check(!0)},S=i._gsDefine=function(e,t,n,i){return new b(e,t,n,i)},I=f._class=function(e,t,n){return t=t||function(){},S(e,[],function(){return t},n),t};S.globals=o;var w=[0,0,1,1],M=[],C=I("easing.Ease",function(e,t,n,i){this._func=e,this._type=n||0,this._power=i||0,this._params=t?w.concat(t):w},!0),D=C.map={},P=C.register=function(e,t,n,i){for(var a,r,s,o,l=t.split(","),u=l.length,c=(n||"easeIn,easeOut,easeInOut").split(",");--u>-1;)for(r=l[u],
a=i?I("easing."+r,null,!0):f.easing[r]||{},s=c.length;--s>-1;)o=c[s],D[r+"."+o]=D[o+r]=a[o]=e.getRatio?e:e[o]||new e};for(c=C.prototype,c._calcEnd=!1,c.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,n=this._power,i=1===t?1-e:2===t?e:e<.5?2*e:2*(1-e);return 1===n?i*=i:2===n?i*=i*i:3===n?i*=i*i*i:4===n&&(i*=i*i*i*i),1===t?1-i:2===t?i:e<.5?i/2:1-i/2},l=["Linear","Quad","Cubic","Quart","Quint,Strong"],
u=l.length;--u>-1;)c=l[u]+",Power"+u,P(new C(null,null,1,u),c,"easeOut",!0),P(new C(null,null,2,u),c,"easeIn"+(0===u?",easeNone":"")),P(new C(null,null,3,u),c,"easeInOut");D.linear=f.easing.Linear.easeIn,D.swing=f.easing.Quad.easeInOut;var T=I("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});c=T.prototype,c.addEventListener=function(e,t,n,i,a){a=a||0;var r,s,o=this._listeners[e],l=0;for(null==o&&(this._listeners[e]=o=[]),s=o.length;--s>-1;)r=o[s],
r.c===t&&r.s===n?o.splice(s,1):0===l&&r.pr<a&&(l=s+1);o.splice(l,0,{c:t,s:n,up:i,pr:a}),this!==d||h||d.wake()},c.removeEventListener=function(e,t){var n,i=this._listeners[e];if(i)for(n=i.length;--n>-1;)if(i[n].c===t)return void i.splice(n,1)},c.dispatchEvent=function(e){var t,n,i,a=this._listeners[e];if(a)for(t=a.length,n=this._eventTarget;--t>-1;)(i=a[t])&&(i.up?i.c.call(i.s||n,{type:e,target:n}):i.c.call(i.s||n))};var x=i.requestAnimationFrame,E=i.cancelAnimationFrame,A=Date.now||function(){
return(new Date).getTime()},k=A();for(l=["ms","moz","webkit","o"],u=l.length;--u>-1&&!x;)x=i[l[u]+"RequestAnimationFrame"],E=i[l[u]+"CancelAnimationFrame"]||i[l[u]+"CancelRequestAnimationFrame"];I("Ticker",function(e,t){var n,i,a,r,s,o=this,l=A(),u=!(t===!1||!x)&&"auto",c=500,p=33,f=function(e){var t,u,d=A()-k;d>c&&(l+=d-p),k+=d,o.time=(k-l)/1e3,t=o.time-s,(!n||t>0||e===!0)&&(o.frame++,s+=t+(t>=r?.004:r-t),u=!0),e!==!0&&(a=i(f)),u&&o.dispatchEvent("tick")};T.call(o),o.time=o.frame=0,
o.tick=function(){f(!0)},o.lagSmoothing=function(e,t){c=e||1e10,p=Math.min(t,c,0)},o.sleep=function(){null!=a&&(u&&E?E(a):clearTimeout(a),i=m,a=null,o===d&&(h=!1))},o.wake=function(e){null!==a?o.sleep():e?l+=-k+(k=A()):o.frame>10&&(k=A()-c+5),i=0===n?m:u&&x?x:function(e){return setTimeout(e,1e3*(s-o.time)+1|0)},o===d&&(h=!0),f(2)},o.fps=function(e){if(!arguments.length)return n;n=e,r=1/(n||60),s=this.time+r,o.wake()},o.useRAF=function(e){if(!arguments.length)return u;o.sleep(),u=e,o.fps(n)},
o.fps(e),setTimeout(function(){"auto"===u&&o.frame<5&&"hidden"!==document.visibilityState&&o.useRAF(!1)},1500)}),c=f.Ticker.prototype=new f.events.EventDispatcher,c.constructor=f.Ticker;var L=I("core.Animation",function(e,t){if(this.vars=t=t||{},this._duration=this._totalDuration=e||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=t.immediateRender===!0,this.data=t.data,this._reversed=t.reversed===!0,Z){h||d.wake();var n=this.vars.useFrames?X:Z;n.add(this,n._time),
this.vars.paused&&this.paused(!0)}});d=L.ticker=new f.Ticker,c=L.prototype,c._dirty=c._gc=c._initted=c._paused=!1,c._totalTime=c._time=0,c._rawPrevTime=-1,c._next=c._last=c._onUpdate=c._timeline=c.timeline=null,c._paused=!1;var _=function(){h&&A()-k>2e3&&d.wake(),setTimeout(_,2e3)};_(),c.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},c.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},c.resume=function(e,t){return null!=e&&this.seek(e,t),
this.paused(!1)},c.seek=function(e,t){return this.totalTime(Number(e),t!==!1)},c.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,t!==!1,!0)},c.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},c.render=function(e,t,n){},c.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},c.isActive=function(){
var e,t=this._timeline,n=this._startTime;return!t||!this._gc&&!this._paused&&t.isActive()&&(e=t.rawTime())>=n&&e<n+this.totalDuration()/this._timeScale},c._enabled=function(e,t){return h||d.wake(),this._gc=!e,this._active=this.isActive(),t!==!0&&(e&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!e&&this.timeline&&this._timeline._remove(this,!0)),!1},c._kill=function(e,t){return this._enabled(!1,!1)},c.kill=function(e,t){return this._kill(e,t),this},c._uncache=function(e){
for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},c._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},c._callback=function(e){var t=this.vars;t[e].apply(t[e+"Scope"]||t.callbackScope||this,t[e+"Params"]||M)},c.eventCallback=function(e,t,n,i){if("on"===(e||"").substr(0,2)){var a=this.vars;if(1===arguments.length)return a[e];null==t?delete a[e]:(a[e]=t,
a[e+"Params"]=v(n)&&n.join("").indexOf("{self}")!==-1?this._swapSelfInParams(n):n,a[e+"Scope"]=i),"onUpdate"===e&&(this._onUpdate=t)}return this},c.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},c.duration=function(e){return arguments.length?(this._duration=this._totalDuration=e,this._uncache(!0),
this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==e&&this.totalTime(this._totalTime*(e/this._duration),!0),this):(this._dirty=!1,this._duration)},c.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},c.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},c.totalTime=function(e,t,n){if(h||d.wake(),
!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!n&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var i=this._totalDuration,a=this._timeline;if(e>i&&!n&&(e=i),this._startTime=(this._paused?this._pauseTime:a._time)-(this._reversed?i-e:e)/this._timeScale,a._dirty||this._uncache(!1),a._timeline)for(;a._timeline;)a._timeline._time!==(a._startTime+a._totalTime)/a._timeScale&&a.totalTime(a._totalTime,!0),a=a._timeline}
this._gc&&this._enabled(!0,!1),this._totalTime===e&&0!==this._duration||(z.length&&$(),this.render(e,t,!1),z.length&&$())}return this},c.progress=c.totalProgress=function(e,t){var n=this.duration();return arguments.length?this.totalTime(n*e,t):n?this._time/n:this.ratio},c.startTime=function(e){return arguments.length?(e!==this._startTime&&(this._startTime=e,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,e-this._delay)),this):this._startTime},c.endTime=function(e){
return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},c.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||1e-10,this._timeline&&this._timeline.smoothChildTiming){var t=this._pauseTime,n=t||0===t?t:this._timeline.totalTime();this._startTime=n-(n-this._startTime)*this._timeScale/e}return this._timeScale=e,this._uncache(!1)},c.reversed=function(e){return arguments.length?(e!=this._reversed&&(this._reversed=e,
this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},c.paused=function(e){if(!arguments.length)return this._paused;var t,n,i=this._timeline;return e!=this._paused&&i&&(h||e||d.wake(),t=i.rawTime(),n=t-this._pauseTime,!e&&i.smoothChildTiming&&(this._startTime+=n,this._uncache(!1)),this._pauseTime=e?t:null,this._paused=e,this._active=this.isActive(),
!e&&0!==n&&this._initted&&this.duration()&&(t=i.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,this.render(t,t===this._totalTime,!0))),this._gc&&!e&&this._enabled(!0,!1),this};var N=I("core.SimpleTimeline",function(e){L.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});c=N.prototype=new L,c.constructor=N,c.kill()._gc=!1,c._first=c._last=c._recent=null,c._sortChildren=!1,c.add=c.insert=function(e,t,n,i){var a,r;if(e._startTime=Number(t||0)+e._delay,
e._paused&&this!==e._timeline&&(e._pauseTime=e._startTime+(this.rawTime()-e._startTime)/e._timeScale),e.timeline&&e.timeline._remove(e,!0),e.timeline=e._timeline=this,e._gc&&e._enabled(!0,!0),a=this._last,this._sortChildren)for(r=e._startTime;a&&a._startTime>r;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=a,this._recent=e,this._timeline&&this._uncache(!0),this},c._remove=function(e,t){
return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},c.render=function(e,t,n){var i,a=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;a;)i=a._next,
(a._active||e>=a._startTime&&!a._paused)&&(a._reversed?a.render((a._dirty?a.totalDuration():a._totalDuration)-(e-a._startTime)*a._timeScale,t,n):a.render((e-a._startTime)*a._timeScale,t,n)),a=i},c.rawTime=function(){return h||d.wake(),this._totalTime};var R=I("TweenLite",function(e,t,n){if(L.call(this,t,n),this.render=R.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:R.selector(e)||e
;var a,r,s,o=e.jquery||e.length&&e!==i&&e[0]&&(e[0]===i||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?q[R.defaultOverwrite]:"number"==typeof l?l>>0:q[l],(o||e instanceof Array||e.push&&v(e))&&"number"!=typeof e[0])for(this._targets=s=g(e),this._propLookup=[],this._siblings=[],a=0;a<s.length;a++)r=s[a],r?"string"!=typeof r?r.length&&r!==i&&r[0]&&(r[0]===i||r[0].nodeType&&r[0].style&&!r.nodeType)?(s.splice(a--,1),
this._targets=s=s.concat(g(r))):(this._siblings[a]=ee(r,this,!1),1===l&&this._siblings[a].length>1&&ne(r,this,null,1,this._siblings[a])):"string"==typeof(r=s[a--]=R.selector(r))&&s.splice(a+1,1):s.splice(a--,1);else this._propLookup={},this._siblings=ee(e,this,!1),1===l&&this._siblings.length>1&&ne(e,this,null,1,this._siblings);(this.vars.immediateRender||0===t&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-1e-10,this.render(-this._delay))},!0),O=function(e){
return e&&e.length&&e!==i&&e[0]&&(e[0]===i||e[0].nodeType&&e[0].style&&!e.nodeType)},j=function(e,t){var n,i={};for(n in e)K[n]||n in t&&"transform"!==n&&"x"!==n&&"y"!==n&&"width"!==n&&"height"!==n&&"className"!==n&&"border"!==n||!(!Y[n]||Y[n]&&Y[n]._autoCSS)||(i[n]=e[n],delete e[n]);e.css=i};c=R.prototype=new L,c.constructor=R,c.kill()._gc=!1,c.ratio=0,c._firstPT=c._targets=c._overwrittenProps=c._startAt=null,c._notifyPluginsOfEnabled=c._lazy=!1,R.version="1.18.1",
R.defaultEase=c._ease=new C(null,null,1,1),R.defaultOverwrite="auto",R.ticker=d,R.autoSleep=120,R.lagSmoothing=function(e,t){d.lagSmoothing(e,t)},R.selector=i.$||i.jQuery||function(e){var t=i.$||i.jQuery;return t?(R.selector=t,t(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var z=[],U={},F=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,B=function(e){
for(var t,n=this._firstPT;n;)t=n.blob?e?this.join(""):this.start:n.c*e+n.s,n.r?t=Math.round(t):t<1e-6&&t>-1e-6&&(t=0),n.f?n.fp?n.t[n.p](n.fp,t):n.t[n.p](t):n.t[n.p]=t,n=n._next},V=function(e,t,n,i){var a,r,s,o,l,u,c,d=[e,t],h=0,p="",f=0;for(d.start=e,n&&(n(d),e=d[0],t=d[1]),d.length=0,a=e.match(F)||[],r=t.match(F)||[],i&&(i._next=null,i.blob=1,d._firstPT=i),l=r.length,o=0;o<l;o++)c=r[o],u=t.substr(h,t.indexOf(c,h)-h),p+=u||!o?u:",",h+=u.length,f?f=(f+1)%5:"rgba("===u.substr(-5)&&(f=1),
c===a[o]||a.length<=o?p+=c:(p&&(d.push(p),p=""),s=parseFloat(a[o]),d.push(s),d._firstPT={_next:d._firstPT,t:d,p:d.length-1,s:s,c:("="===c.charAt(1)?parseInt(c.charAt(0)+"1",10)*parseFloat(c.substr(2)):parseFloat(c)-s)||0,f:0,r:f&&f<4}),h+=c.length;return p+=t.substr(h),p&&d.push(p),d.setRatio=B,d},H=function(e,t,n,i,a,r,s,o){var l,u,c="get"===n?e[t]:n,d=typeof e[t],h="string"==typeof i&&"="===i.charAt(1),p={t:e,p:t,s:c,f:"function"===d,pg:0,n:a||t,r:r,pr:0,
c:h?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2)):parseFloat(i)-c||0};if("number"!==d&&("function"===d&&"get"===n&&(u=t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),p.s=c=s?e[u](s):e[u]()),"string"==typeof c&&(s||isNaN(c))?(p.fp=s,l=V(c,i,o||R.defaultStringFilter,p),p={t:l,p:"setRatio",s:0,c:1,f:2,pg:0,n:a||t,pr:0}):h||(p.s=parseFloat(c),p.c=parseFloat(i)-p.s||0)),p.c)return(p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p,p},W=R._internals={
isArray:v,isSelector:O,lazyTweens:z,blobDif:V},Y=R._plugins={},Q=W.tweenLookup={},G=0,K=W.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,
reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1},q={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},X=L._rootFramesTimeline=new N,Z=L._rootTimeline=new N,J=30,$=W.lazyRender=function(){var e,t=z.length;for(U={};--t>-1;)(e=z[t])&&e._lazy!==!1&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);z.length=0};Z._startTime=d.time,X._startTime=d.frame,Z._active=X._active=!0,setTimeout($,1),L._updateRoot=R.render=function(){var e,t,n;if(z.length&&$(),
Z.render((d.time-Z._startTime)*Z._timeScale,!1,!1),X.render((d.frame-X._startTime)*X._timeScale,!1,!1),z.length&&$(),d.frame>=J){J=d.frame+(parseInt(R.autoSleep,10)||120);for(n in Q){for(t=Q[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);0===t.length&&delete Q[n]}if((!(n=Z._first)||n._paused)&&R.autoSleep&&!X._first&&1===d._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||d.sleep()}}},d.addEventListener("tick",L._updateRoot);var ee=function(e,t,n){var i,a,r=e._gsTweenID
;if(Q[r||(e._gsTweenID=r="t"+G++)]||(Q[r]={target:e,tweens:[]}),t&&(i=Q[r].tweens,i[a=i.length]=t,n))for(;--a>-1;)i[a]===t&&i.splice(a,1);return Q[r].tweens},te=function(e,t,n,i){var a,r,s=e.vars.onOverwrite;return s&&(a=s(e,t,n,i)),s=R.onOverwrite,s&&(r=s(e,t,n,i)),a!==!1&&r!==!1},ne=function(e,t,n,i,a){var r,s,o,l;if(1===i||i>=4){for(l=a.length,r=0;r<l;r++)if((o=a[r])!==t)o._gc||o._kill(null,e,t)&&(s=!0);else if(5===i)break;return s}var u,c=t._startTime+1e-10,d=[],h=0,p=0===t._duration
;for(r=a.length;--r>-1;)(o=a[r])===t||o._gc||o._paused||(o._timeline!==t._timeline?(u=u||ie(t,0,p),0===ie(o,u,p)&&(d[h++]=o)):o._startTime<=c&&o._startTime+o.totalDuration()/o._timeScale>c&&((p||!o._initted)&&c-o._startTime<=2e-10||(d[h++]=o)));for(r=h;--r>-1;)if(o=d[r],2===i&&o._kill(n,e,t)&&(s=!0),2!==i||!o._firstPT&&o._initted){if(2!==i&&!te(o,t))continue;o._enabled(!1,!1)&&(s=!0)}return s},ie=function(e,t,n){for(var i=e._timeline,a=i._timeScale,r=e._startTime;i._timeline;){
if(r+=i._startTime,a*=i._timeScale,i._paused)return-100;i=i._timeline}return r/=a,r>t?r-t:n&&r===t||!e._initted&&r-t<2e-10?1e-10:(r+=e.totalDuration()/e._timeScale/a)>t+1e-10?0:r-t-1e-10};c._init=function(){var e,t,n,i,a,r=this.vars,s=this._overwrittenProps,o=this._duration,l=!!r.immediateRender,u=r.ease;if(r.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),a={};for(i in r.startAt)a[i]=r.startAt[i];if(a.overwrite=!1,a.immediateRender=!0,a.lazy=l&&r.lazy!==!1,
a.startAt=a.delay=null,this._startAt=R.to(this.target,0,a),l)if(this._time>0)this._startAt=null;else if(0!==o)return}else if(r.runBackwards&&0!==o)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(l=!1),n={};for(i in r)K[i]&&"autoCSS"!==i||(n[i]=r[i]);if(n.overwrite=0,n.data="isFromStart",n.lazy=l&&r.lazy!==!1,n.immediateRender=l,this._startAt=R.to(this.target,0,n),l){if(0===this._time)return}else this._startAt._init(),
this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof C?u:"function"==typeof u?new C(u,r.easeParams):D[u]||R.defaultEase:R.defaultEase,r.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,r.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,
this._targets)for(e=this._targets.length;--e>-1;)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null)&&(t=!0);else t=this._initProps(this.target,this._propLookup,this._siblings,s);if(t&&R._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),r.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=r.onUpdate,this._initted=!0},c._initProps=function(e,t,n,a){var r,s,o,l,u,c
;if(null==e)return!1;U[e._gsTweenID]&&$(),this.vars.css||e.style&&e!==i&&e.nodeType&&Y.css&&this.vars.autoCSS!==!1&&j(this.vars,e);for(r in this.vars)if(c=this.vars[r],K[r])c&&(c instanceof Array||c.push&&v(c))&&c.join("").indexOf("{self}")!==-1&&(this.vars[r]=c=this._swapSelfInParams(c,this));else if(Y[r]&&(l=new Y[r])._onInitTween(e,this.vars[r],this)){for(this._firstPT=u={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:r,pg:1,pr:l._priority},
s=l._overwriteProps.length;--s>-1;)t[l._overwriteProps[s]]=this._firstPT;(l._priority||l._onInitAllProps)&&(o=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else t[r]=H.call(this,e,r,"get",c,r,0,null,this.vars.stringFilter);return a&&this._kill(a,e)?this._initProps(e,t,n,a):this._overwrite>1&&this._firstPT&&n.length>1&&ne(e,this,t,this._overwrite,n)?(this._kill(t,e),
this._initProps(e,t,n,a)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(U[e._gsTweenID]=!0),o)},c.render=function(e,t,n){var i,a,r,s,o=this._time,l=this._duration,u=this._rawPrevTime;if(e>=l-1e-7)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(i=!0,a="onComplete",n=n||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||n)&&(this._startTime===this._timeline._duration&&(e=0),
(u<0||e<=0&&e>=-1e-7||1e-10===u&&"isPause"!==this.data)&&u!==e&&(n=!0,u>1e-10&&(a="onReverseComplete")),this._rawPrevTime=s=!t||e||u===e?e:1e-10);else if(e<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&u>0)&&(a="onReverseComplete",i=this._reversed),e<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||n)&&(u>=0&&(1e-10!==u||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=s=!t||e||u===e?e:1e-10)),
this._initted||(n=!0);else if(this._totalTime=this._time=e,this._easeType){var c=e/l,d=this._easeType,h=this._easePower;(1===d||3===d&&c>=.5)&&(c=1-c),3===d&&(c*=2),1===h?c*=c:2===h?c*=c*c:3===h?c*=c*c*c:4===h&&(c*=c*c*c*c),this.ratio=1===d?1-c:2===d?c:e/l<.5?c/2:1-c/2}else this.ratio=this._ease.getRatio(e/l);if(this._time!==o||n){if(!this._initted){if(this._init(),!this._initted||this._gc)return
;if(!n&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=u,z.push(this),void(this._lazy=[e,t]);this._time&&!i?this.ratio=this._ease.getRatio(this._time/l):i&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&e>=0&&(this._active=!0),
0===o&&(this._startAt&&(e>=0?this._startAt.render(e,t,n):a||(a="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||t||this._callback("onStart"))),r=this._firstPT;r;)r.f?r.t[r.p](r.c*this.ratio+r.s):r.t[r.p]=r.c*this.ratio+r.s,r=r._next;this._onUpdate&&(e<0&&this._startAt&&e!==-1e-4&&this._startAt.render(e,t,n),t||(this._time!==o||i)&&this._callback("onUpdate")),a&&(this._gc&&!n||(e<0&&this._startAt&&!this._onUpdate&&e!==-1e-4&&this._startAt.render(e,t,n),
i&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[a]&&this._callback(a),0===l&&1e-10===this._rawPrevTime&&1e-10!==s&&(this._rawPrevTime=0)))}},c._kill=function(e,t,n){if("all"===e&&(e=null),null==e&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:R.selector(t)||t;var i,a,r,s,o,l,u,c,d,h=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline
;if((v(t)||O(t))&&"number"!=typeof t[0])for(i=t.length;--i>-1;)this._kill(e,t[i],n)&&(l=!0);else{if(this._targets){for(i=this._targets.length;--i>-1;)if(t===this._targets[i]){o=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],a=this._overwrittenProps[i]=e?this._overwrittenProps[i]||{}:"all";break}}else{if(t!==this.target)return!1;o=this._propLookup,a=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(o){if(u=e||o,
c=e!==a&&"all"!==a&&e!==o&&("object"!=typeof e||!e._tempKill),n&&(R.onOverwrite||this.vars.onOverwrite)){for(r in u)o[r]&&(d||(d=[]),d.push(r));if((d||!e)&&!te(this,n,t,d))return!1}for(r in u)(s=o[r])&&(h&&(s.f?s.t[s.p](s.s):s.t[s.p]=s.s,l=!0),s.pg&&s.t._kill(u)&&(l=!0),s.pg&&0!==s.t._overwriteProps.length||(s._prev?s._prev._next=s._next:s===this._firstPT&&(this._firstPT=s._next),s._next&&(s._next._prev=s._prev),s._next=s._prev=null),delete o[r]),c&&(a[r]=1)
;!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},c.invalidate=function(){return this._notifyPluginsOfEnabled&&R._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],L.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-1e-10,this.render(-this._delay)),this},c._enabled=function(e,t){if(h||d.wake(),e&&this._gc){
var n,i=this._targets;if(i)for(n=i.length;--n>-1;)this._siblings[n]=ee(i[n],this,!0);else this._siblings=ee(this.target,this,!0)}return L.prototype._enabled.call(this,e,t),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&R._onPluginEvent(e?"_onEnable":"_onDisable",this)},R.to=function(e,t,n){return new R(e,t,n)},R.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new R(e,t,n)},R.fromTo=function(e,t,n,i){return i.startAt=n,
i.immediateRender=0!=i.immediateRender&&0!=n.immediateRender,new R(e,t,i)},R.delayedCall=function(e,t,n,i,a){return new R(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:i,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:a,overwrite:0})},R.set=function(e,t){return new R(e,0,t)},R.getTweensOf=function(e,t){if(null==e)return[];e="string"!=typeof e?e:R.selector(e)||e;var n,i,a,r;if((v(e)||O(e))&&"number"!=typeof e[0]){for(n=e.length,
i=[];--n>-1;)i=i.concat(R.getTweensOf(e[n],t));for(n=i.length;--n>-1;)for(r=i[n],a=n;--a>-1;)r===i[a]&&i.splice(n,1)}else for(i=ee(e).concat(),n=i.length;--n>-1;)(i[n]._gc||t&&!i[n].isActive())&&i.splice(n,1);return i},R.killTweensOf=R.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var i=R.getTweensOf(e,t),a=i.length;--a>-1;)i[a]._kill(n,e)};var ae=I("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],
this._priority=t||0,this._super=ae.prototype},!0);if(c=ae.prototype,ae.version="1.18.0",ae.API=2,c._firstPT=null,c._addTween=H,c.setRatio=B,c._kill=function(e){var t,n=this._overwriteProps,i=this._firstPT;if(null!=e[this._propName])this._overwriteProps=[];else for(t=n.length;--t>-1;)null!=e[n[t]]&&n.splice(t,1);for(;i;)null!=e[i.n]&&(i._next&&(i._next._prev=i._prev),i._prev?(i._prev._next=i._next,i._prev=null):this._firstPT===i&&(this._firstPT=i._next)),i=i._next;return!1},
c._roundProps=function(e,t){for(var n=this._firstPT;n;)(e[this._propName]||null!=n.n&&e[n.n.split(this._propName+"_").join("")])&&(n.r=t),n=n._next},R._onPluginEvent=function(e,t){var n,i,a,r,s,o=t._firstPT;if("_onInitAllProps"===e){for(;o;){for(s=o._next,i=a;i&&i.pr>o.pr;)i=i._next;(o._prev=i?i._prev:r)?o._prev._next=o:a=o,(o._next=i)?i._prev=o:r=o,o=s}o=t._firstPT=a}for(;o;)o.pg&&"function"==typeof o.t[e]&&o.t[e]()&&(n=!0),o=o._next;return n},ae.activate=function(e){
for(var t=e.length;--t>-1;)e[t].API===ae.API&&(Y[(new e[t])._propName]=e[t]);return!0},S.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,i=e.priority||0,a=e.overwriteProps,r={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},s=I("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){ae.call(this,n,i),this._overwriteProps=a||[]},e.global===!0),o=s.prototype=new ae(n)
;o.constructor=s,s.API=e.API;for(t in r)"function"==typeof e[t]&&(o[r[t]]=e[t]);return s.version=e.version,ae.activate([s]),s},l=i._gsQueue){for(u=0;u<l.length;u++)l[u]();for(c in y)y[c].func||i.console.log("GSAP encountered missing dependency: com.greensock."+c)}h=!1}}(void 0!==e&&e.exports&&void 0!==i?i:this||s),e.exports=TweenLite}).call(t,n(242))},function(e,t,n){"use strict";var i=n(3103),a=i.a.Symbol;t.a=a},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length
;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(3149),r=n(3150),s=n(3151),o=n(3152),l=n(3153);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i},function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t,n){function i(e,t,n){"__proto__"==t&&a?a(e,t,{
configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var a=n(1018);e.exports=i},function(e,t,n){function i(e,t,n,i){var d=-1,h=r,p=!0,f=e.length,g=[],m=t.length;if(!f)return g;n&&(t=o(t,l(n))),i?(h=s,p=!1):t.length>=c&&(h=u,p=!1,t=new a(t));e:for(;++d<f;){var v=e[d],y=null==n?v:n(v);if(v=i||0!==v?v:0,p&&y===y){for(var b=m;b--;)if(t[b]===y)continue e;g.push(v)}else h(t,y,i)||g.push(v)}return g}var a=n(641),r=n(643),s=n(644),o=n(645),l=n(646),u=n(647),c=200;e.exports=i},function(e,t,n){
function i(e,t,n,s,o){var l=-1,u=e.length;for(n||(n=r),o||(o=[]);++l<u;){var c=e[l];t>0&&n(c)?t>1?i(c,t-1,n,s,o):a(o,c):s||(o[o.length]=c)}return o}var a=n(3112),r=n(3139);e.exports=i},function(e,t,n){function i(e,t,n){var i=-1,d=r,h=e.length,p=!0,f=[],g=f;if(n)p=!1,d=s;else if(h>=c){var m=t?null:l(e);if(m)return u(m);p=!1,d=o,g=new a}else g=t?[]:f;e:for(;++i<h;){var v=e[i],y=t?t(v):v;if(v=n||0!==v?v:0,p&&y===y){for(var b=g.length;b--;)if(g[b]===y)continue e;t&&g.push(y),f.push(v)
}else d(g,y,n)||(g!==f&&g.push(y),f.push(v))}return f}var a=n(641),r=n(643),s=n(644),o=n(647),l=n(3129),u=n(1021),c=200;e.exports=i},function(e,t,n){var i=n(456),a=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(242))},function(e,t){function n(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||a.test(e))&&e>-1&&e%1==0&&e<t}
var i=9007199254740991,a=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){var i=n(3117),a=n(356),r=Object.prototype,s=r.hasOwnProperty,o=r.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return a(e)&&s.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},function(e,t,n){function i(e){if(!r(e))return!1;var t=a(e)
;return t==o||t==l||t==s||t==u}var a=n(454),r=n(355),s="[object AsyncFunction]",o="[object Function]",l="[object GeneratorFunction]",u="[object Proxy]";e.exports=i},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;e.exports=n},function(e,t){function n(){}e.exports=n},function(e,t,n){var i=n(1015),a=n(290),r=n(459),s=a(function(e,t){return r(e)?i(e,t):[]});e.exports=s},,function(e,t,n){var i=n(3180),a=n(3179);e.exports={stringify:i,parse:a}
},function(e,t){var n={};n.hexTable=new Array(256);for(var i=0;i<256;++i)n.hexTable[i]="%"+((i<16?"0":"")+i.toString(16)).toUpperCase();t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},i=0,a=e.length;i<a;++i)void 0!==e[i]&&(n[i]=e[i]);return n},t.merge=function(e,n,i){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):"object"==typeof e?e[n]=!0:e=[e,n],e;if("object"!=typeof e)return e=[e].concat(n)
;Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e,i));for(var a=Object.keys(n),r=0,s=a.length;r<s;++r){var o=a[r],l=n[o];Object.prototype.hasOwnProperty.call(e,o)?e[o]=t.merge(e[o],l,i):e[o]=l}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;"string"!=typeof e&&(e=""+e);for(var t="",i=0,a=e.length;i<a;++i){var r=e.charCodeAt(i)
;45===r||46===r||95===r||126===r||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122?t+=e[i]:r<128?t+=n.hexTable[r]:r<2048?t+=n.hexTable[192|r>>6]+n.hexTable[128|63&r]:r<55296||r>=57344?t+=n.hexTable[224|r>>12]+n.hexTable[128|r>>6&63]+n.hexTable[128|63&r]:(++i,r=65536+((1023&r)<<10|1023&e.charCodeAt(i)),t+=n.hexTable[240|r>>18]+n.hexTable[128|r>>12&63]+n.hexTable[128|r>>6&63]+n.hexTable[128|63&r])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var i=n.indexOf(e)
;if(i!==-1)return n[i];if(n.push(e),Array.isArray(e)){for(var a=[],r=0,s=e.length;r<s;++r)void 0!==e[r]&&a.push(e[r]);return a}var o=Object.keys(e);for(r=0,s=o.length;r<s;++r){var l=o[r];e[l]=t.compact(e[l],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){"use strict";var i=n(3182),a=window.Raven,r=new i
;r.noConflict=function(){return window.Raven=a,r},r.afterLoad(),e.exports=r},function(e,t,n){"use strict";function i(e){return void 0===e}function a(e){return"function"==typeof e}function r(e){return"[object String]"===m.toString.call(e)}function s(e){return"object"==typeof e&&null!==e}function o(e){for(var t in e)return!1;return!0}function l(e){return s(e)&&"[object Error]"===m.toString.call(e)||e instanceof Error}function u(e,t){var n,a
;if(i(e.length))for(n in e)h(e,n)&&t.call(null,n,e[n]);else if(a=e.length)for(n=0;n<a;n++)t.call(null,n,e[n])}function c(e,t){return t?(u(t,function(t,n){e[t]=n}),e):e}function d(e,t){return!t||e.length<=t?e:e.substr(0,t)+"\u2026"}function h(e,t){return m.hasOwnProperty.call(e,t)}function p(e){for(var t,n=[],i=0,a=e.length;i<a;i++)t=e[i],r(t)?n.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&n.push(t.source);return new RegExp(n.join("|"),"i")}function f(e){var t=[]
;return u(e,function(e,n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.join("&")}function g(){var e=window.crypto||window.msCrypto;if(!i(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var n=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){
var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}var m=Object.prototype;e.exports={isUndefined:i,isFunction:a,isString:r,isObject:s,isEmptyObject:o,isError:l,each:u,objectMerge:c,truncate:d,hasKey:h,joinRegExp:p,urlencode:f,uuid4:g}},function(e,t,n){"use strict";t.__esModule=!0;var i=n(3172),a=function(e){return e&&e.__esModule?e:{default:e}}(i),r=a.default(function(){return/firefox/i.test(navigator.userAgent)});t.isFirefox=r;var s=a.default(function(){
return Boolean(window.safari)});t.isSafari=s},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return new s.default(e)}t.__esModule=!0,t.default=a;var r=n(3192),s=i(r),o=n(3196),l=i(o),u=n(650),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u);t.NativeTypes=c,t.getEmptyImage=l.default},function(e,t,n){"use strict";function i(e,t){
return t===e||null!==t&&null!==e&&r.default(t,e)}t.__esModule=!0,t.default=i;var a=n(652),r=function(e){return e&&e.__esModule?e:{default:e}}(a);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=e.DecoratedComponent,n=e.createHandler,i=e.createMonitor,s=e.createConnector,h=e.registerHandler,f=e.containerDisplayName,m=e.getType,v=e.collect,b=e.options,S=b.arePropsEqual,I=void 0===S?g.default:S,w=t.displayName||t.name||"Component";return function(e){function g(t,r){a(this,g),e.call(this,t,r),
this.handleChange=this.handleChange.bind(this),this.handleChildRef=this.handleChildRef.bind(this),y.default("object"==typeof this.context.dragDropManager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",w,w),this.manager=this.context.dragDropManager,
this.handlerMonitor=i(this.manager),this.handlerConnector=s(this.manager.getBackend()),this.handler=n(this.handlerMonitor),this.disposable=new d.SerialDisposable,this.receiveProps(t),this.state=this.getCurrentState(),this.dispose()}return r(g,e),g.prototype.getHandlerId=function(){return this.handlerId},g.prototype.getDecoratedComponentInstance=function(){return this.decoratedComponentInstance},g.prototype.shouldComponentUpdate=function(e,t){return!I(e,this.props)||!p.default(t,this.state)},
l(g,null,[{key:"DecoratedComponent",value:t,enumerable:!0},{key:"displayName",value:f+"("+w+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:u.PropTypes.object.isRequired},enumerable:!0}]),g.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.disposable=new d.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()},g.prototype.componentWillReceiveProps=function(e){I(e,this.props)||(this.receiveProps(e),this.handleChange())},
g.prototype.componentWillUnmount=function(){this.dispose(),this.isCurrentlyMounted=!1},g.prototype.receiveProps=function(e){this.handler.receiveProps(e),this.receiveType(m(e))},g.prototype.receiveType=function(e){if(e!==this.currentType){this.currentType=e;var t=h(e,this.handler,this.manager),n=t.handlerId,i=t.unregister;this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var a=this.manager.getMonitor(),r=a.subscribeToStateChange(this.handleChange,{
handlerIds:[n]});this.disposable.setDisposable(new d.CompositeDisposable(new d.Disposable(r),new d.Disposable(i)))}},g.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();p.default(e,this.state)||this.setState(e)}},g.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)},g.prototype.handleChildRef=function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)},
g.prototype.getCurrentState=function(){var e=v(this.handlerConnector.hooks,this.handlerMonitor);return e},g.prototype.render=function(){return c.default.createElement(t,o({},this.props,this.state,{ref:this.handleChildRef}))},g}(u.Component)}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
;i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=s;var u=n(1),c=i(u),d=n(2505),h=n(652),p=i(h),f=n(1038),g=i(f),m=n(175),v=(i(m),n(105)),y=i(v);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return"string"==typeof e||"symbol"==typeof e||t&&r.default(e)&&e.every(function(e){return i(e,!1)})}t.__esModule=!0,t.default=i
;var a=n(240),r=function(e){return e&&e.__esModule?e:{default:e}}(a);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,r=0;r<n.length;r++){if(!a.call(t,n[r]))return!1;var s=e[n[r]],o=t[n[r]];if(s!==o||"object"==typeof s||"object"==typeof o)return!1}return!0}t.__esModule=!0,
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors. You can either wrap "+t+" into a <div>, or turn it into a drag source or a drop target itself.")}}function a(e){return function(){
var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],n=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(!l.isValidElement(t)){return void e(t,n)}var a=t;i(a);var r=n?function(t){return e(t,n)}:e;return o.default(a,r)}}function r(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n],r=a(i);t[n]=function(){return r}}),t}t.__esModule=!0,t.default=r;var s=n(3210),o=function(e){return e&&e.__esModule?e:{default:e}}(s),l=n(1);e.exports=t.default
},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{
constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function o(e){var t,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=l.getDisplayName,v=void 0===c?function(e){return"ConnectAdvanced("+e+")"
}:c,y=l.methodName,b=void 0===y?"connectAdvanced":y,S=l.renderCountProp,I=void 0===S?void 0:S,w=l.shouldHandleStateChanges,M=void 0===w||w,C=l.storeKey,D=void 0===C?"store":C,P=l.withRef,T=void 0!==P&&P,x=s(l,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),E=D+"Subscription",A=m++,k=(t={},t[D]=f.a,t[E]=h.PropTypes.instanceOf(p.a),t),L=(o={},o[E]=h.PropTypes.instanceOf(p.a),o);return function(t){
d()("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+t);var s=t.displayName||t.name||"Component",o=v(s),l=g({},x,{getDisplayName:v,methodName:b,renderCountProp:I,shouldHandleStateChanges:M,storeKey:D,withRef:T,displayName:o,wrappedComponentName:s,WrappedComponent:t}),c=function(s){function u(e,t){i(this,u);var n=a(this,s.call(this,e,t));return n.version=A,n.state={},n.renderCount=0,n.store=n.props[D]||n.context[D],n.parentSub=e[E]||t[E],
n.setWrappedInstance=n.setWrappedInstance.bind(n),d()(n.store,'Could not find "'+D+'" in either the context or props of "'+o+'". Either wrap the root component in a <Provider>, or explicitly pass "'+D+'" as a prop to "'+o+'".'),n.getState=n.store.getState.bind(n.store),n.initSelector(),n.initSubscription(),n}return r(u,s),u.prototype.getChildContext=function(){var e;return e={},e[E]=this.subscription,e},u.prototype.componentDidMount=function(){M&&(this.subscription.trySubscribe(),
this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},u.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},u.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},u.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.store=null,this.parentSub=null,this.selector.run=function(){}},u.prototype.getWrappedInstance=function(){
return d()(T,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+b+"() call."),this.wrappedInstance},u.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},u.prototype.initSelector=function(){var t=this.store.dispatch,n=this.getState,i=e(t,l),a=this.selector={shouldComponentUpdate:!0,props:i(n(),this.props),run:function(e){try{var t=i(n(),e);(a.error||t!==a.props)&&(a.shouldComponentUpdate=!0,a.props=t,a.error=null)}catch(e){
a.shouldComponentUpdate=!0,a.error=e}}}},u.prototype.initSubscription=function(){var e=this;M&&function(){var t=e.subscription=new p.a(e.store,e.parentSub),n={};t.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=function(){this.componentDidUpdate=void 0,t.notifyNestedSubs()},this.setState(n)):t.notifyNestedSubs()}.bind(e)}()},u.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},
u.prototype.addExtraProps=function(e){if(!T&&!I)return e;var t=g({},e);return T&&(t.ref=this.setWrappedInstance),I&&(t[I]=this.renderCount++),t},u.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return n.i(h.createElement)(t,this.addExtraProps(e.props))},u}(h.Component);return c.WrappedComponent=t,c.displayName=o,c.childContextTypes=L,c.contextTypes=k,c.propTypes=k,u()(c,t)}}var l=n(3093),u=n.n(l),c=n(105),d=n.n(c),h=n(1),p=(n.n(h),
n(3275)),f=n(1070);t.a=o;var g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m=0},function(e,t,n){"use strict";function i(e){return function(t,n){function i(){return a}var a=e(t,n);return i.dependsOnOwnProps=!1,i}}function a(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function r(e,t){return function(t,n){
var i=(n.displayName,function(e,t){return i.dependsOnOwnProps?i.mapToProps(e,t):i.mapToProps(e)});return i.dependsOnOwnProps=a(e),i.mapToProps=function(t,n){i.mapToProps=e;var r=i(t,n);return"function"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=a(r),r=i(t,n)),r},i}}n(1071);t.b=i,t.a=r},function(e,t,n){"use strict";var i=n(1);n.n(i);t.a=i.PropTypes.shape({subscribe:i.PropTypes.func.isRequired,dispatch:i.PropTypes.func.isRequired,getState:i.PropTypes.func.isRequired})},function(e,t,n){
"use strict";n(3105),n(668)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.")
;if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}}t.__esModule=!0,t.nameShape=void 0,t.transitionTimeout=a;var r=n(1),s=(i(r),n(460)),o=i(s);t.nameShape=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,leave:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterActive:o.default.string,leave:o.default.string,leaveActive:o.default.string,appear:o.default.string,
appearActive:o.default.string})])},,,,,,function(e,t,n){"use strict";function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){if(0===t.length)return arguments.length<=0?void 0:arguments[0];var e=t[t.length-1];return t.slice(0,-1).reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t.default=i},function(e,t,n){"use strict";function i(e,t,n){function a(){f===p&&(f=p.slice())}function o(){return h}function l(e){
if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return a(),f.push(e),function(){if(t){t=!1,a();var n=f.indexOf(e);f.splice(n,1)}}}function u(e){if(!(0,r.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(g)throw new Error("Reducers may not dispatch actions.");try{g=!0,h=d(h,e)
}finally{g=!1}for(var t=p=f,n=0;n<t.length;n++)t[n]();return e}function c(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");d=e,u({type:s.INIT})}if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(i)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var d=e,h=t,p=[],f=p,g=!1;return u({type:s.INIT}),{dispatch:u,
subscribe:l,getState:o,replaceReducer:c}}t.__esModule=!0,t.ActionTypes=void 0,t.default=i;var a=n(175),r=function(e){return e&&e.__esModule?e:{default:e}}(a),s=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";function i(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.__esModule=!0,t.default=i},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ic3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPGNpcmNsZSBpZD0iMCIgY3g9IjUwIiBjeT0iNTAiIHI9IjUwIiBzdHlsZT0iZmlsbDp1cmwoIzMpIi8+CiA8Y2lyY2xlIGlkPSIxIiBjeD0iNTAiIGN5PSI1MCIgcj0iNDciIHN0eWxlPSJmaWxsOnVybCgjNCkiLz4KIDxwYXRoIGlkPSIyIiBkPSJtMzIuOSAxOC44bDE4LjE2MSAwIDIwLjAzOSAzMS4yNS0yMC4wMzkgMzEuMjUtMTguMTYxIDAgMjAuMDM5LTMxLjI1LTIwLjAzOS0zMS4yNSIgc3R5bGU9ImZpbGw6dXJsKCM1KSIvPgogPGRlZnM+CiAgPGxpbmVhckdyYWRpZW50IGlkPSIzIiB4MT0iMTAwIiB4Mj0iMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICA8c3RvcCBvZmZzZXQ9IjAlIiBzdHlsZT0ic3RvcC1jb2xvcjojZjliZTAzIi8+CiAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3R5bGU9InN0b3AtY29sb3I6I2NjN2IxOSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPGxpbmVhckdyYWRpZW50IGlkPSI0IiB4MT0iOTciIHgyPSIzIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgIDxzdG9wIG9mZnNldD0iMCUiIHN0eWxlPSJzdG9wLWNvbG9yOiMyODI4MjgiLz4KICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdHlsZT0ic3RvcC1jb2xvcjojMWYxZjFmIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmFkaWFsR3JhZGllbnQgaWQ9IjUiIGN4PSI2NyIgY3k9IjQ5LjkiIHI9IjU3LjgxMjMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4bGluazpocmVmPSIjMyIvPgogPC9kZWZzPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjdjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjcgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQgMjY3Ljg2Ni0yNjcuODY3LS45MzMtMTQ3LjQ2Ni0xMjAuNC0yNjcuODY2LTI2Ny44NjYtMjY3Ljg2Nm0xMzQuNCAzODcuMzMzbC0yNjkuNzM0IDBjLTMuNzMzIDAtNi41MzMtMi44LTYuNTMzLTYuNTMzbDAtMjI0LjkzNGMwLTMuNzMzIDIuOC02LjUzMyA2LjUzMy02LjUzM2wyNjkuNzM0IDBjMy43MzQgMCA2LjUzNCAyLjggNi41MzQgNi41MzNsMCAyMjQuOTM0YzAgMy43MzMtMi44IDYuNTMzLTYuNTM0IDYuNTMzbS0yNjMuMi03OS4zOTNsMCA2Ni4zMjcgMjU3LjYgMCAwLTMyLjMxN2MtLjkzMy4zNS0xLjg2Ny41ODMtMi44LjU4My0xLjg2NiAwLTIuOC0uOTMzLTMuNzM0LTEuODY2bC01My4yLTQ1LjczNC02MS42IDQxLjA2Ny04MC4yNjYtODUuODY3LTU2IDU3LjgwN20yNTcuNiAyMi43MTlsMC0xNjguMjU4LTI1Ny42IDAgMCAxMjguNTE0IDU2LjkzNC01OC41MTQgODEuMiA4Ny43MzMgNjAuNjY2LTQwLjEzMyA1OC44IDUwLjY1OG0tMTEzLjg2Ni02OS4zMjZjLTIxLjQ2NyAwLTM4LjI2Ny0xNi44LTM4LjI2Ny0zOC4yNjYgMC0yMS40NjYgMTYuOC0zOC4yNjYgMzguMjY3LTM4LjI2NiAyMS40NjYgMCAzOC4yNjYgMTYuOCAzOC4yNjYgMzguMjY2IDAgMjAuNTM0LTE3LjczNCAzOC4yNjYtMzguMjY2IDM4LjI2Nm0wLTY0LjRjLTE0IDAtMjYuMTM0IDExLjItMjYuMTM0IDI2LjEzNCAwIDE0IDExLjIgMjYuMTM0IDI2LjEzNCAyNi4xMzQgMTQgMCAyNi4xMzMtMTEuMiAyNi4xMzMtMjYuMTM0LS45MzMtMTQuOTM0LTEyLjEzMy0yNi4xMzQtMjYuMTMzLTI2LjEzNCIvPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjZjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjYgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQwMSAyNjcuODY2LTI2Ny44NjcgMC0xNDcuNDY2LTEyMC40LTI2Ny44NjYtMjY3Ljg2Ni0yNjcuODY2bS0zLjczNCAyMjQuOTMzYzEuMTY3LTEuMTY3IDIuOC0xLjg2NyA0LjY2OC0xLjg2NyAyLjk1MSAwIDUuMzE5IDEuNzUgNi4xODEgNC4zMjdsNjguNDg0IDQ5LjgwN2MyLjggMS44NjYgMy43MzQgNS42LjkzNCA4LjQgMCAxLjg2Ni0xLjg2NiAyLjc5OS0zLjczNCAyLjhsLjAwMSAwLS4wMDEgMGMtLjkzMyAwLTIuNzk5LS4wMDEtMy43MzMtLjkzNGwtNjEuNTk5LTQ0LjcyMyAwIDE0Ni40NTdjLS45MzMgMi44LTMuNzMzIDUuNi02LjUzMyA1LjYtMy43MzQgMC02LjUzNC0yLjgtNi41MzQtNi41MzRsMC0xNDUuNjc2LTYyLjUzNCA0My45NDNjLTIuOCAxLjg2Ny02LjUzMyAxLjg2Ny04LjQtLjkzMy0xLjg2Ni0yLjgtMS44NjYtNi41MzQuOTM0LTguNGw3MS44NjYtNTIuMjY3bS01My4xOTkgMTEwLjEzNGwtMzcuMzMzIDBjLTI4LjkzNCAwLTUyLjI2Ny0yMy4zMzQtNTIuMjY3LTUyLjI2NyAwLTI4LjkzMyAyMy4zMzQtNTIuMjY2IDUyLjI2Ny01Mi4yNjZsNi41MzMgMCAwLTguNGMwLTQ0LjggMzYuNC04MS4yIDgxLjItODEuMiAzOS4yIDAgNzIuOCAyOCA3OS4zMzQgNjUuMzMzIDQuNjY2LS45MzMgOC40LS45MzMgMTMuMDY2LS45MzMgMzUuNDY3IDAgNjQuNCAyOC45MzMgNjQuNCA2NC40IDAgMTcuNzMzLTcuNDY2IDM1LjQ2Ni0yMS40NjYgNDcuNi0xMC4yNjcgMTEuMi0yNS4yIDE3LjczMy0zOS4yIDE3LjczM2wtLjAwMS0uMDAxLTI5Ljg2NiAwYy0zLjczNCAwLTYuNTM0LTIuOC02LjUzNC02LjUzNCAwLTMuNzMzIDIuOC02LjUzMyA2LjUzNC02LjUzM2wyOS44NjYgMGMxMS4yIDAgMjIuNC00LjY2NyAyOS44NjYtMTMuMDY3IDExLjItMTAuMjY2IDE3LjczNC0yNC4yNjYgMTcuNzM0LTM5LjIgMC0yOC45MzMtMjMuMzM0LTUyLjI2Ni01Mi4yNjYtNTIuMjY2LTUuNiAwLTExLjIuOTM0LTE1Ljg2NyAyLjgtMS44NjYuOTM0LTMuNzMzIDAtNS42LS45MzQtMS44NjYtLjkzMy0yLjgtMi44LTIuOC00LjY2Ni0zLjczMy0zNS40NjYtMzIuNjY2LTYxLjYtNjguMTMzLTYxLjYtMzcuMzM0IDAtNjguMTM0IDMwLjgtNjguMTM0IDY4LjEzNCAwIDQuNjY2IDAgOS4zMzMuOTM0IDEzLjA2NiAwIDEuODY2IDAgMy43MzQtLjkzNCA1LjYtLjkzNCAxLjg2Ni0yLjggMS44NjYtNC42NjYgMS44NjZsLTE0IDBjLTIyLjQwMS4wMDEtNDAuMTM0IDE3LjczNC00MC4xMzQgNDAuMTM0IDAgMjIuNCAxNy43MzMgNDAuMTMzIDQwLjEzNCA0MC4xMzRsMzcuMzMzIDBjMy43MzQgMCA2LjUzNCAyLjggNi41MzQgNi41MzMgMCAzLjczNC0yLjggNi41MzQtNi41MzQgNi41MzQiLz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjZjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjYgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQwMSAyNjcuODY2LTI2Ny44NjcgMC0xNDcuNDY2LTEyMC40LTI2Ny44NjYtMjY3Ljg2Ni0yNjcuODY2bTg2LjgwMSA0MTAuNjY2bC0xNzMuNjAxIDBjLTMuNzM0IDAtNi41MzQtMi44LTYuNTM0LTYuNTM0bDAtMjczLjQ2NmMwLTMuNzM0IDIuOC02LjUzNCA2LjUzNC02LjUzNGwxNzQuNTM0IDBjMy43MzMgMCA2LjUzMyAyLjggNi41MzMgNi41MzRsMCAyNzMuNDY2Yy0uOTMzIDMuNzM0LTMuNzMzIDYuNTM0LTcuNDY2IDYuNTM0bS0xNjguMDAxLTEyLjEzNGwxNjEuNDY2IDAgMC0yNjEuMzM0LTE2MS40NjYgMCAwIDI2MS4zMzRtOTYuMTM0LTM0LjUzMmMwIDguMjQ3LTYuNjg3IDE0LjkzMy0xNC45MzQgMTQuOTMzLTguMjQ3IDAtMTQuOTM0LTYuNjg2LTE0LjkzNC0xNC45MzMgMC04LjI0OCA2LjY4Ny0xNC45MzQgMTQuOTM0LTE0LjkzNCA4LjI0NyAwIDE0LjkzNCA2LjY4NiAxNC45MzQgMTQuOTM0bTQ3LjYtMjhsLTEyNS4wNjcgMGMtMy43MzMgMC02LjUzMy0yLjgtNi41MzMtNi41MzRsMC0xNTYuOGMwLTMuNzM0IDIuOC02LjUzNCA2LjUzMy02LjUzNGwxMjQuMTM0IDBjMy43MzMgMCA2LjUzMyAyLjggNi41MzMgNi41MzRsMCAxNTcuNzM0YzAgMi43OTktMi44IDUuNTk5LTUuNiA1LjZtLTExOC41MzQtMTIuMTM0bDExMiAwIDAtMTQ1LjYtMTEyIDAgMCAxNDUuNiIvPgo8L3N2Zz4K"
},,function(e,t,n){"use strict";var i=n(15),a=n(1517),r=n(2415),s=(n(1520),new i.a.Application);s.addInitializer(function(){return n.i(r.a)().then(function(){return n.i(a.a)()})}),t.a=s},,function(e,t){},,,function(e,t,n){(function(e){+function(e){"use strict";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,i=n.is("input")?"val":"html",a=n.data();e+="Text",
a.resetText||n.data("resetText",n[i]()),n[i](a[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons"]');if(e.length){"radio"===this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change").prop("type")&&e.find(".active").removeClass("active")}this.$element.toggleClass("active")};var n=e.fn.button
;e.fn.button=function(n){return this.each(function(){var i=e(this),a=i.data("bs.button"),r="object"==typeof n&&n;a||i.data("bs.button",a=new t(this,r)),"toggle"==n?a.toggle():n&&a.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(e)}).call(t,n(5))},function(e,t,n){
(function(e){+function(e){"use strict";function t(){e(i).remove(),e(a).each(function(t){var i=n(e(this));i.hasClass("open")&&(i.trigger(t=e.Event("hide.bs.dropdown")),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}var i=".dropdown-backdrop",a="[data-toggle=dropdown]",r=function(t){
e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(i){var a=e(this);if(!a.is(".disabled, :disabled")){var r=n(a),s=r.hasClass("open");if(t(),!s){if("ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t),r.trigger(i=e.Event("show.bs.dropdown")),i.isDefaultPrevented())return;r.toggleClass("open").trigger("shown.bs.dropdown"),a.focus()}return!1}},r.prototype.keydown=function(t){
if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var r=n(i),s=r.hasClass("open");if(!s||s&&27==t.keyCode)return 27==t.which&&r.find(a).focus(),i.click();var o=e("[role=menu] li:not(.divider):visible a",r);if(o.length){var l=o.index(o.filter(":focus"));38==t.keyCode&&l>0&&l--,40==t.keyCode&&l<o.length-1&&l++,~l||(l=0),o.eq(l).focus()}}}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){
var n=e(this),i=n.data("dropdown");i||n.data("dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",a,r.prototype.toggle).on("keydown.bs.dropdown.data-api",a+", [role=menu]",r.prototype.keydown)}(e)}).call(t,n(5))},function(e,t,n){
(function(e){+function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,i=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.escape(),
this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var i=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),i&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var a=e.Event("shown.bs.modal",{relatedTarget:t});i?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(a)
}).emulateTransitionEnd(300):n.$element.focus().trigger(a)}))},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),
e.support.transition&&this.$element.hasClass("fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.focus()},this))},t.prototype.escape=function(){
this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){
var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&n;if(this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return
;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,i){return this.each(function(){var a=e(this),r=a.data("bs.modal"),s=e.extend({},t.DEFAULTS,a.data(),"object"==typeof n&&n);r||a.data("bs.modal",r=new t(this,s)),
"string"==typeof n?r[n](i):s.show&&r.show(i)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),a=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),r=a.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},a.data(),n.data());t.preventDefault(),a.modal(r,this).one("hide",function(){n.is(":visible")&&n.focus()})}),
e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,
template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i);for(var a=this.options.trigger.split(" "),r=a.length;r--;){var s=a[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){
var o="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(o+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),
t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show()
;n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type)
;if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(i);r&&(i=i.replace(a,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(i),
this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var s=this.getPosition(),o=n[0].offsetWidth,l=n[0].offsetHeight;if(r){var u=this.$element.parent(),c=i,d=document.documentElement.scrollTop||document.body.scrollTop,h="body"==this.options.container?window.innerWidth:u.outerWidth(),p="body"==this.options.container?window.innerHeight:u.outerHeight(),f="body"==this.options.container?0:u.offset().left
;i="bottom"==i&&s.top+s.height+l-d>p?"top":"top"==i&&s.top-d-l<0?"bottom":"right"==i&&s.right+o>h?"left":"left"==i&&s.left-o<f?"right":i,n.removeClass(c).addClass(i)}var g=this.getCalculatedOffset(i,s,o,l);this.applyPlacement(g,i),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,i=this.tip(),a=i[0].offsetWidth,r=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),o=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(o)&&(o=0),e.top=e.top+s,
e.left=e.left+o,i.offset(e).addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;if("top"==t&&u!=r&&(n=!0,e.top=e.top+r-u),/bottom|top/.test(t)){var c=0;e.left<0&&(c=e.left*-2,e.left=0,i.offset(e),l=i[0].offsetWidth,u=i[0].offsetHeight),this.replaceArrow(c-a+l,l,"left")}else this.replaceArrow(u-r,u,"top");n&&i.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle()
;e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},t.prototype.hide=function(){function t(){"in"!=n.hoverState&&i.detach()}var n=this,i=this.tip(),a=e.Event("hide.bs."+this.type);if(this.$element.trigger(a),!a.isDefaultPrevented())return i.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i.one(e.support.transition.end,t).emulateTransitionEnd(150):t(),this.$element.trigger("hidden.bs."+this.type),this},
t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},
t.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},t.prototype.tip=function(){
return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){
var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),a=i.data("bs.tooltip"),r="object"==typeof n&&n;a||i.data("bs.tooltip",a=new t(this,r)),"string"==typeof n&&a[n]()})},e.fn.tooltip.Constructor=t,
e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one(e.support.transition.end,function(){n=!0})
;var a=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(a,t),this},e(function(){e.support.transition=t()})}(e)}).call(t,n(5))},function(e,t,n){(function(e){/*!
 * jQuery scrollintoview() plugin and :scrollable selector filter
 *
 * Version 1.8 (14 Jul 2011)
 * Requires jQuery 1.4 or newer
 *
 * Copyright (c) 2011 Robert Koritnik
 * Licensed under the terms of the MIT license
 * http://www.opensource.org/licenses/mit-license.php
 */
!function(e){var t={vertical:{x:!1,y:!0},horizontal:{x:!0,y:!1},both:{x:!0,y:!0},x:{x:!0,y:!1},y:{x:!1,y:!0}},n={duration:"fast",direction:"both"},i=/^(?:html)$/i,a=function(t,n){n=n||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle);var i=!(!document.defaultView||!document.defaultView.getComputedStyle),a={top:parseFloat(i?n.borderTopWidth:e.css(t,"borderTopWidth"))||0,
left:parseFloat(i?n.borderLeftWidth:e.css(t,"borderLeftWidth"))||0,bottom:parseFloat(i?n.borderBottomWidth:e.css(t,"borderBottomWidth"))||0,right:parseFloat(i?n.borderRightWidth:e.css(t,"borderRightWidth"))||0};return{top:a.top,left:a.left,bottom:a.bottom,right:a.right,vertical:a.top+a.bottom,horizontal:a.left+a.right}},r=function(t){var n=e(window),r=i.test(t[0].nodeName);return{border:r?{top:0,left:0,bottom:0,right:0}:a(t[0]),scroll:{top:(r?n:t).scrollTop(),left:(r?n:t).scrollLeft()},
scrollbar:{right:r?0:t.innerWidth()-t[0].clientWidth,bottom:r?0:t.innerHeight()-t[0].clientHeight},rect:function(){var e=t[0].getBoundingClientRect();return{top:r?0:e.top,left:r?0:e.left,bottom:r?t[0].clientHeight:e.bottom,right:r?t[0].clientWidth:e.right}}()}};e.fn.extend({scrollIntoView:function(a){a=e.extend({},n,a),a.direction=t["string"==typeof a.direction&&a.direction.toLowerCase()]||t.both;var s="";a.direction.x===!0&&(s="horizontal"),a.direction.y===!0&&(s=s?"both":"vertical")
;var o=this.eq(0),l=o.closest(":scrollable("+s+")");if(l.length>0){l=l.eq(0);var u={e:r(o),s:r(l)};if(a.center){var c=(u.s.rect.bottom-u.s.rect.top-(u.e.rect.bottom-u.e.rect.top))/2,d=(u.s.rect.right-u.s.rect.left-(u.e.rect.right-u.e.rect.left))/2;a.direction.y&&(u.e.rect.top-=c,u.e.rect.bottom+=c),a.direction.x&&(u.e.rect.left-=d,u.e.rect.right+=d)}var h={top:u.e.rect.top-(u.s.rect.top+u.s.border.top),bottom:u.s.rect.bottom-u.s.border.bottom-u.s.scrollbar.bottom-u.e.rect.bottom,
left:u.e.rect.left-(u.s.rect.left+u.s.border.left),right:u.s.rect.right-u.s.border.right-u.s.scrollbar.right-u.e.rect.right},p={};a.direction.y===!0&&(h.top<0?p.scrollTop=u.s.scroll.top+h.top:h.top>0&&h.bottom<0&&(p.scrollTop=u.s.scroll.top+Math.min(h.top,-h.bottom))),a.direction.x===!0&&(h.left<0?p.scrollLeft=u.s.scroll.left+h.left:h.left>0&&h.right<0&&(p.scrollLeft=u.s.scroll.left+Math.min(h.left,-h.right))),
e.isEmptyObject(p)?e.isFunction(a.complete)&&a.complete.call(l[0]):(i.test(l[0].nodeName)&&(l=e("html,body")),l.animate(p,a.duration).eq(0).queue(function(t){e.isFunction(a.complete)&&a.complete.call(l[0]),t()}))}return this}});var s={auto:!0,scroll:!0,visible:!1,hidden:!1};e.extend(e.expr[":"],{scrollable:function(e,n,a,r){
var o=t["string"==typeof a[3]&&a[3].toLowerCase()]||t.both,l=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle,u={x:s[l.overflowX.toLowerCase()]||!1,y:s[l.overflowY.toLowerCase()]||!1,isRoot:i.test(e.nodeName)};if(!u.x&&!u.y&&!u.isRoot)return!1;var c={height:{scroll:e.scrollHeight,client:e.clientHeight},width:{scroll:e.scrollWidth,client:e.clientWidth},scrollableX:function(){
return(u.x||u.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(u.y||u.isRoot)&&this.height.scroll>this.height.client}};return o.y&&c.scrollableY()||o.x&&c.scrollableX()}})}(e)}).call(t,n(5))},function(e,t,n){var i,a;i=[n(5),n(3094)],void 0!==(a=function(e,t){"use strict";e.fn.translate=function(e,n){var i=t.csstransforms3d?"translate3d("+e+"px, "+n+"px, 0)":"translate("+e+"px, "+n+"px)";if(1===this.length){var a=this[0].style
;"webkitTransform"in a?a.webkitTransform=i:"OTransform"in a?a.OTransform=i:a.transform=i}else this.css("transform",i)}}.apply(t,i))&&(e.exports=a)},function(e,t,n){"use strict";function i(){if(l.length)throw l.shift()}function a(e){var t;t=o.length?o.pop():new r,t.task=e,s(t)}function r(){this.task=null}var s=n(1099),o=[],l=[],u=s.makeRequestCallFromTimer(i);e.exports=a,r.prototype.call=function(){try{this.task.call()}catch(e){a.onerror?a.onerror(e):(l.push(e),u())}finally{this.task=null,
o[o.length]=this}}},function(e,t,n){"use strict";(function(t){function n(e){s.length||(r(),o=!0),s[s.length]=e}function i(){for(;l<s.length;){var e=l;if(l+=1,s[e].call(),l>u){for(var t=0,n=s.length-l;t<n;t++)s[t]=s[t+l];s.length-=l,l=0}}s.length=0,l=0,o=!1}function a(e){return function(){function t(){clearTimeout(n),clearInterval(i),e()}var n=setTimeout(t,0),i=setInterval(t,50)}}e.exports=n;var r,s=[],o=!1,l=0,u=1024,c=void 0!==t?t:self,d=c.MutationObserver||c.WebKitMutationObserver
;r="function"==typeof d?function(e){var t=1,n=new d(e),i=document.createTextNode("");return n.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}(i):a(i),n.requestFlush=r,n.makeRequestCallFromTimer=a}).call(t,n(242))},function(e,t,n){"use strict";function i(e){return e&&!e.get("isCloud")&&"iOS"!==e.get("platform")&&e.supports("companionProxy")}function a(e){return e&&e.get("isPrivate")&&e.get("isConnected")&&!e.get("isPossiblyCrossNetworkProtected")}function r(e){e.forEach(function(e){
e.resolve()}),e.length=0}function s(e){e.forEach(function(e){e.reject()}),e.length=0}var o=n(5),l=n.n(o),u=n(2),c=n.n(u),d=n(13),h=n(38),p=n(795),f=n(61),g=n(28),m=n(55),v=n(56),y=h.a.extend({mixins:[m.a],name:"MediaServerCompanionProxy",commandID:0,initialize:function(){c.a.bindAll(this,"_checkPollRequestStatus","_pickProxyServer","_poll","_sendResponse","_unregisterPlayer","_isEligibleForProxy","_isLocallyOwned","onPollSuccess","onPollError"),
this._debounceUnregisterPlayer=c.a.debounce(this._unregisterPlayer,2e3),this._debouncePickProxyServer=c.a.debounce(this._pickProxyServer,2e3),this._deepLinkDeferred=l.a.Deferred().resolve(),this._playerRegistrationDeferreds=[],this._playerUnregistrationDeferreds=[],this._pollErrorCountByServerID={}},getDeepLink:function(){return this._deepLinkDeferred.promise()},publish:function(e){var t=this;if(this.proxyServer){if(this.timelineInflight)return void(this._pendingTimeline=e)
;this.timelineInflight=!0;var n=p.a.writeXml(e),i=c.a.result(this.proxyServer,"url"),a=this.proxyServer.getXHROptions(i+"player/proxy/timeline?commandID="+this.commandID);a.data="timeline="+encodeURIComponent(n),a.method="POST",a.contentType="application/x-www-form-urlencoded",l.a.ajax(a).always(function(){t.timelineInflight=!1;var e=t._pendingTimeline;e&&(delete t._pendingTimeline,t.publish(e))})}},subscribe:function(e){this.started||(this.callback=e,this.started=!0,
this.servers=n.i(d.a)("appModel").get("servers"),this.listenTo(this.servers,"change:connected",this._debouncePickProxyServer),this._debouncePickProxyServer())},unsubscribe:function(){if(this.started){var e=this.proxyServer;this.started=!1,this.stopListening(this.servers,"change:connected",this._debouncePickProxyServer),this.callback=null,this.proxyServer=null,e&&this._debounceUnregisterPlayer(e),this._clearPollRequestStatusCheck(),this.pollRequest&&(this.pollRequest.abort(),
this.pollRequest=null)}},unregisterPlayer:function(e,t){this.cloudServer=e,this.clientID=t;var n=l.a.Deferred();return this._playerUnregistrationDeferreds.push(n),n.promise()},registerPlayer:function(e,t){this.cloudServer=e,this.clientID=t;var n=l.a.Deferred();return this._playerRegistrationDeferreds.push(n),n.promise()},debugStatus:function(){var e=this.proxyServer;return e?"Proxied: "+e.get("debugName"):void 0},_pickProxyServer:function(){
this.started&&(this.proxyServer&&this._isEligibleForProxy(this.proxyServer)||(this.proxyServer=this.servers.find(this._isLocallyOwned)||this.servers.find(this._isEligibleForProxy),this.proxyServer?(this._registerServer(),g.a.info("[Companion] Found proxy",this.proxyServer.get("debugName")),this._poll()):g.a.warn("[Companion] No proxy found")))},_registerServer:function(){var e=this;if(this.proxyServer&&this.cloudServer&&this.clientID){
var t=this.cloudServer.getXHROptions("devices/"+this.clientID,{method:"POST",headers:{"X-Plex-Provides":v.a.get("allowCloudPubSub")?"client,player,pubsub-player":"client,player"},data:{_method:"PUT",proxiedBy:this.proxyServer.id}});l.a.ajax(t).done(function(){r(e._playerRegistrationDeferreds)}).fail(function(){s(e._playerRegistrationDeferreds)})}},_unregisterPlayer:function(e){var t=this;if(e&&this.cloudServer&&this.clientID){var n=this.cloudServer.getXHROptions("/devices/"+this.clientID,{
method:"POST",headers:{"X-Plex-Provides":"client"},data:{_method:"PUT"}});l.a.ajax(n).done(function(){r(t._playerUnregistrationDeferreds)}).fail(function(){s(t._playerUnregistrationDeferreds)})}},_poll:function(){if(this.started){var e=this.proxyServer;if(!e)return void g.a.info("[Companion] No proxy server available to long poll");if(this._isPollRequestPending())return void g.a.info("[Companion] Long poll already open to ",e.get("debugName"));this._clearPollRequestStatusCheck(),
this._checkPollRequestStatusLater();var t=e.getXHROptions("/player/proxy/poll",{data:{deviceClass:"pc",protocolVersion:"1",protocolCapabilities:"timeline,playback,navigation,mirror,playqueues",timeout:1}});g.a.info("[Companion] Opening long poll to %s at %s",e.get("debugName"),t.url),this.pollRequest=l.a.ajax(t).done(this.onPollSuccess).fail(this.onPollError)}},_repoll:function(){this._clearPollRequestStatusCheck(),this._poll()},_isPollRequestPending:function(){
return!!this.pollRequest&&"pending"===this.pollRequest.state()},_checkPollRequestStatus:function(){this._isPollRequestPending()&&(g.a.info("[Companion] Poll connection successfully opened with ",this.proxyServer.get("debugName")),this._resetPollErrorCount(this.proxyServer))},_checkPollRequestStatusLater:function(){this._pollRequestStatusCheckTimeout=setTimeout(this._checkPollRequestStatus,5e3)},_clearPollRequestStatusCheck:function(){
this._pollRequestStatusCheckTimeout=clearTimeout(this._pollRequestStatusCheckTimeout)},_processCommand:function(e){var t=this;if(this.started){var n={path:e.path,commandID:e.commandID,supportsTimeline:!0,query:{key:[e.queryKey],offset:[e.queryOffset],containerKey:[e.queryContainerKey],playQueueID:[e.queryPlayqueueid],type:[e.queryType],volume:[e.queryVolume],repeat:[e.queryRepeat],subtitleStreamID:[e.querySubtitleStreamID],token:[e.queryToken],machineIdentifier:[e.queryMachineIdentifier],
protocol:[e.queryProtocol],address:[e.queryAddress],port:[e.queryPort],text:[e.queryText],field:[e.queryField]}},i="resolved"!==this._deepLinkDeferred.state();this.callback(n,i).always(function(e){i&&e&&e.deferredAction&&t._deepLinkDeferred.resolve(e.deferredAction),t._sendResponse(e.controllerResponse)})}},_sendResponse:function(e){if(this.proxyServer){var t=parseInt(e.commandID,10);this.commandID<t&&(this.commandID=t)
;var n="/player/proxy/response?commandID="+e.commandID,i=this.proxyServer.getXHROptions(n,{method:"POST",contentType:"application/x-www-form-urlencoded",data:{response:e.body}});l.a.ajax(i)}},_incrementPollErrorCount:function(e){var t=e.get("machineIdentifier");t in this._pollErrorCountByServerID||(this._pollErrorCountByServerID[t]=0),this._pollErrorCountByServerID[t]++,g.a.info("[Companion] Server %s has had %s poll errors",e.get("debugName"),this._pollErrorCountByServerID[t])},
_resetPollErrorCount:function(e){var t=e.get("machineIdentifier");this._pollErrorCountByServerID[t]=0},_exceedsPollErrorCount:function(e){return this._pollErrorCountByServerID[e.get("machineIdentifier")]>=3},_isEligibleForProxy:function(e){return i(e)&&a(e.get("activeConnection"))&&!this._exceedsPollErrorCount(e)},_isLocallyOwned:function(e){return this._isEligibleForProxy(e)&&!e.get("isShared")},onPollSuccess:function(e){var t=this,n=e&&f.a.parseXML(e),i=n&&n.Command
;return e?(n?i||g.a.warn("[Companion] Poll succeeded without a Command response",n):g.a.warn("[Companion] Poll succeeded without a parseable response",e),i?(this._resetPollErrorCount(this.proxyServer),this._repoll(),void(c.a.isArray(i)?i:[i]).forEach(function(e){try{g.a.info("[Companion] Received %s from %s",e.path,e.deviceName),t._processCommand(e)}catch(t){g.a.warn("[Companion] encountered %s while processing %s",t.message,e)}},this)):void this.onPollError()):void this._repoll()},
onPollError:function(){var e=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.started){var t=this.proxyServer,n=!!t&&t.get("isConnected"),i=t?t.get("debugName"):"No Proxy Found",a=function(){g.a.warn("[Companion] Poll failed to %s; attempting to pick new proxy",i),e._pickProxyServer()};if(this.proxyServer=null,this._clearPollRequestStatusCheck(),this._incrementPollErrorCount(t),
this._exceedsPollErrorCount(t))return g.a.warn("[Companion] Poll failed to %s; is no longer an eligible proxy",i),void a();n?(g.a.warn("[Companion] Poll failed to %s; testing all connections",i),t.testAllConnections().done(function(){g.a.info("[Companion] Poll failed to %s; server is available",i)}).fail(function(){g.a.warn("[Companion] Poll failed to %s; unable to reconnect",i)}).always(a)):a()}}});t.a=y},function(e,t,n){"use strict";n(28)},function(e,t,n){"use strict"
;var i=n(113),a=n.n(i),r=n(5),s=n.n(r),o={url:"https://metrics.plex.tv/collect/event",trackEvent:function(e){var t=a()(e);window.navigator.sendBeacon?window.navigator.sendBeacon(this.url,t):s.a.ajax({type:"POST",url:this.url,contentType:"application/json",data:t})}};t.a=o},function(e,t,n){"use strict";var i=n(1031),a=n.n(i);a.a.debug=!1;var r={},s={},o={userTitle:"username",userID:"id"},l=!1,u={init:function(e){a.a.config(e)},enable:function(){l||(l=!0,a.a.install())},disable:function(){
l&&(l=!1,a.a.uninstall())},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var n=e[t];"release"===t?a.a.setRelease(n):o[t]?(s[o[t]]=n,a.a.setUserContext(s)):(r[t]=n,a.a.setTagsContext(r))}},capture:function(e,t){a.a.captureException(e,t)}};t.a=u},function(e,t,n){"use strict";var i=["enable","disable","set","start","trackClick","trackEvent","trackView","incrementPlaybackCount","addPlaybackTime","millisecondsToSeconds"];t.a=i},function(e,t,n){
"use strict";var i=["trackEvent"];t.a=i},function(e,t,n){"use strict";var i=n(2526),a=n.n(i),r=n(38),s=r.a.extend({load:function(e,t){this.dashPlayer&&this.stop(),this.dashPlayer=new a.a.BasicPlayer({url:e,mediaElement:t}),this.dashPlayer.init()},stop:function(){var e=this.dashPlayer;this.dashPlayer=null;try{e.destroy()}catch(e){}},canPause:function(e){return e.autopause_pending||e.autopaused}});t.a=s},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(40),s=n(319),o=n(322),l=n(680),u=l.a.extend({type:r.a.types.MUSIC,modelDefaults:function(){var e=l.a.prototype.modelDefaults.apply(this,arguments);return a.a.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!0,showSeekBar:!0,showShuffle:!0,showRepeat:!0,showLyrics:!0,showPlayQueue:!0})},getPlayerDecision:function(e,t){this.backlog.clear();var n=this.getPlayerDecisionPromise(e,t);return n.done(this.onDecisionSuccess),n.fail(this.onDecisionError),n},
getPlayerDecisionPromise:function(e,t){return s.a.getPlayerDecision(a.a.extend({type:this.type,profile:this.profile,playbackSessionID:this.playbackSessionID,item:e,offset:t.offset,fallbackServer:t.fallbackServer,transcoder:o.a},t.decisionOverrides))},shouldSkipOnError:function(){return!0}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(12),l=n(389),u=n(38),c=n(66),d=n(40),h=n(55),p=n(474),f=u.a.extend({mixins:[h.a,p.a],type:d.a.types.PHOTO,slideshowDelay:5e3,
skipTransition:!1,modelDefaults:function(){var e=p.a.modelDefaults.apply(this,arguments),t=a.a.first(e.metadataItem.get("Media")),n=t&&a.a.first(t.Part);return a.a.extend(e,{media:t,part:n,ready:!0,canPlayPause:!0,canStop:!0,showEnterFullscreen:c.a.hasFullscreen})},initialize:function(e){p.a.initialize.apply(this,arguments),this.loop=!(!e||!e.loop),a.a.bindAll(this,"skipPrevious","skipNext"),this.listenTo(o.a,{"companion:pause":this.pause,"companion:play":this.play,"companion:stop":this.stop,
"companion:skipNext":this.skipNext,"companion:skipPrevious":this.skipPrevious,"companion:skipTo":this.skipTo})},load:function(e){return this.model=e.model,e.autoplay?this.play():this.pause(),this.reset(this.model.get("playQueueItem")),this.listenTo(this.model,{"change:state":this.onStateChange,"change:loaded":this.onLoadedChange,"change:error":this.onErrorChange}),l.a.registerPlayer(this),s.a.Deferred().resolve().promise()},reset:function(e){this.currentItem&&this.timeline({
state:d.a.states.STOPPED,continuing:!0});var t={loop:this.loop};return this.currentItem=e,this.previousItem=this.getPreviousItem(e,t),this.nextItem=this.getNextItem(e,t),this.model.set(a.a.result(this,"modelDefaults")),this.timeline().done(a.a.bind(this.updatePlayQueue,this)),e},play:function(){this.model.set({state:d.a.states.PLAYING,slideshowState:d.a.slideshowStates.PLAYING}),this.model.get("loaded")&&(this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay)),
this.model.get("errorMessage")&&(this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2))},pause:function(){this.model.set({state:d.a.states.PAUSED,slideshowState:d.a.slideshowStates.PAUSED}),this.slideshowTimeout=clearTimeout(this.slideshowTimeout)},skipPrevious:function(e){return e||(e={}),this.skipTransition=!!e.manual,this.previousItem&&(this.slideshowTimeout=clearTimeout(this.slideshowTimeout)),this.model.set("state",d.a.states.BUFFERING),p.a.skipPrevious.apply(this,arguments)
},skipNext:function(e){return e||(e={}),this.skipTransition=!!e.manual,this.nextItem&&(this.slideshowTimeout=clearTimeout(this.slideshowTimeout)),this.model.set("state",d.a.states.BUFFERING),p.a.skipNext.apply(this,arguments)},stop:function(e,t){p.a.stop.apply(this,arguments),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),l.a.unregisterPlayer(this),o.a.trigger("hide:player",t)},onStateChange:function(e,t){this.timeline().done(a.a.bind(this.updatePlayQueue,this))},
onLoadedChange:function(e,t){t&&(this.model.get("slideshowState")===d.a.slideshowStates.PLAYING?(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay),this.model.set("state",d.a.states.PLAYING)):this.model.set("state",d.a.states.PAUSED))},onErrorChange:function(e,t){t&&this.model.get("slideshowState")===d.a.slideshowStates.PLAYING&&(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2))}});t.a=f
},function(e,t,n){"use strict";var i=n(472),a=i.a.extend({name:"BasicVolatileStorage",initialize:function(){var e={};this.api={getItem:function(t){return e[t]},setItem:function(t,n){e[t]=n},removeItem:function(t){delete e[t]},clear:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]}}},getStorage:function(){return this.api}});t.a=a},function(e,t,n){"use strict";var i=n(472);try{"string"==typeof window.localStorage.getItem&&delete window.localStorage.getItem,
"string"==typeof window.localStorage.setItem&&delete window.localStorage.setItem,"string"==typeof window.localStorage.removeItem&&delete window.localStorage.removeItem,"string"==typeof window.localStorage.clear&&delete window.localStorage.clear}catch(e){}var a=i.a.extend({name:"PersistentWebStorage",getStorage:function(){return window.localStorage}});t.a=a},function(e,t,n){"use strict";var i=n(472),a=i.a.extend({name:"VolatileWebStorage",getStorage:function(){return window.sessionStorage}})
;t.a=a},function(e,t,n){"use strict";function i(e){return 401===e.status||403===e.status||406===e.status}function a(e){var t=e.server,n=e.connection;return!S.a.get("testPrivateConnectionsWhenPublicAddressDoesNotMatch")&&!t.get("isCloud")&&!t.get("isTransient")&&!t.get("publicAddressMatches")&&n.get("isPrivate")}function r(e,t){var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s because secure connections are disallowed",i,e),u(e,t)}
function s(e,t){var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s because location does not match",i,e),u(e,t)}function o(e,t){var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s due to mixed content prevention",i,e),u(e,t)}function l(e,t){var n=t.server,i=n.get("debugName")
;return b.a.warn("[Connections] Aborting connection test for %s at %s due to reject direct connection debug setting",i,e),u(e,t)}function u(e,t){var n=t.connection,i=m.a.Deferred();return f.a.defer(function(){n.set({currentTest:null,testState:I.a.testStates.UNAVAILABLE}),i.reject(n)}),i.promise()}function c(e){e.url="fail"+e.url}function d(e,t){function a(t){n.i(b.a)("[Connections] %s connected at %s",u,e),o.set({currentTest:null,testState:I.a.testStates.CONNECTED,serverAttrs:t}),l.resolve(o)}
function r(t){var a={currentTest:null};if(t.aborting)n.i(b.a)("[Connections] Aborted pending connection test for %s at %s",u,e),a.testState=I.a.testStates.ABORTED;else{var r=i(t)?I.a.testStates.UNAUTHORIZED:I.a.testStates.UNAVAILABLE;b.a.warn("[Connections] %s is %s at %s (Status %s)",u,r,e,t.status),a.testState=r}o.set(a),l.reject(o,t)}var s=t.server,o=t.connection,l=m.a.Deferred(),u=s.get("debugName");n.i(b.a)("[Connections] Testing connection for %s at %s",u,e);var d=s.getXHROptions(e)
;d.timeout=s.connectionTestTimeout,S.a.get("emulateCNP")&&!S.a.get("proxied")&&o.get("isPrivate")&&c(d);var h=S.a.get("emulateBrokenHTTPS");if(h){var p=o.get("isHttps")&&!s.get("isCloudBased"),f="private"!==h||o.get("isPrivate");p&&f&&c(d)}var g=m.a.ajax(d);return o.set({currentTest:g,testState:I.a.testStates.PENDING}),g.done(function(t,n,i){if(s.get("isCloud"))return void a();var o=s.parse(t),l=!!o.machineIdentifier
;s.get("isTransient")&&o.machineIdentifier===s.get("originalMachineIdentifier")&&(o.machineIdentifier=s.get("machineIdentifier")),!l||s.id&&o.machineIdentifier!==s.id?(b.a.warn("[Connections] %s has an unexpected machine identifier at %s",u,e),r(i)):a(o)}),g.fail(r),l.promise()}function h(e){var t=e.server,i=e.connection,u=t.resolveUrl(e.url||"/",{connection:i}),c=n.i(v.a)("appModel").get("settings")
;return S.a.get("allowHttpsMediaServerConnections")||!i.get("isHttps")||t.get("isCloudBased")?S.a.get("allowMixedContent")||!y.a.isHostedHttps||i.get("isHttps")?a(e)?s(u,e):t.get("isCloud")||i.get("relay")||!c.get("rejectDirectConnections")&&!S.a.get("rejectDirectConnections")?d(u,e):l(u,e):o(u,e):r(u,e)}var p=n(2),f=n.n(p),g=n(5),m=n.n(g),v=n(13),y=n(66),b=n(28),S=n(56),I=n(179);t.a=h},function(e,t,n){"use strict";var i=n(1122);n.d(t,"a",function(){return i.a});var a=n(1120)
;n.d(t,"b",function(){return a.a});var r=n(1121);n.d(t,"c",function(){return r.a});var s=n(1126);n.d(t,"d",function(){return s.a});var o=n(1125);n.d(t,"e",function(){return o.a});var l=n(1127);n.d(t,"f",function(){return l.a});var u=n(1124);n.d(t,"g",function(){return u.a});var c=n(1123);n.d(t,"h",function(){return c.a});var d=n(1116);n.d(t,"i",function(){return d.a});var h=n(1117);n.d(t,"j",function(){return h.a});var p=n(1114);n.d(t,"k",function(){return p.a});var f=n(1115)
;n.d(t,"l",function(){return f.a});var g=n(1119);n.d(t,"m",function(){return g.a});var m=n(1118);n.d(t,"n",function(){return m.a})},function(e,t,n){"use strict";function i(e){var t,i=e.item,a=e.media,s=i.server;if(a){var c="/library/metadata/"+i.id+"/media/"+a.id,d=r.a.extend(s.getXHROptions(c),{type:"DELETE"});t=o.a.ajax(d),t.done(function(){var t=e.item.get("Media");t.splice(r.a.indexOf(t,a),1),i.trigger("change:Media",i,i.get("Media"))})}else t=i.destroy({wait:!0});return t.fail(function(e){
var t=403===e.status?n.i(l.default)("Ensure that media deletion is enabled for library content in your server settings."):n.i(l.default)("There was a problem deleting this item.");u.a.trigger("show:alert",{type:"error",message:t})}),t}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12);t.a=i},function(e,t,n){"use strict";function i(e){var t=c.a.execute("deleteFile",e);return t.done(function(){var t=e.item,n=a(t.get("parentKey"),e);if(!n)return void r(e)
;if(n.get("children").getCollection().length)return void s(n.get("key"),e);n.trigger("destroy",n,n.collection);var i=a(t.get("grandparentKey"),e);if(!i)return void r(e);i.get("children").getCollection().length?s(i.get("key"),e):r(e)}),t}function a(e,t){if(!e)return!1;var n=new d.a({key:e},{server:t.item.server,onlyIfCached:!0});return!l.a.isEmpty(n)&&n}function r(e){if(!e.skipRedirect){var t=e.item;t.section?u.a.trigger("navigate","section",{serverID:t.server.id,sectionID:t.section.id,replace:!0
}):u.a.trigger("navigate:back")}}function s(e,t){if(!t.skipRedirect){var n=t.item;u.a.trigger("navigate","details",{serverID:n.server.id,key:e,replace:!0})}}var o=n(2),l=n.n(o),u=n(12),c=n(23),d=n(59);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),i=e.item,a=i.server,s=e.media||r.a.first(i.get("Media")),h=e.part||s&&r.a.first(s.Part),p=e.streamType,f=e.streamID;if(!s||!h)return t.reject().promise();var g={};g[p.key]=f,
!e.media&&a.supports("allPartsStreamSelection")&&(g.allParts=1);var m=d.join(["/library/parts/",h.id],g),v=r.a.extend(a.getXHROptions(m),{type:"PUT"}),y=o.a.ajax(v);return y.done(function(){n.i(c.a)(s,p,f),i.trigger("change:streams"),t.resolve()}),y.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem selecting the stream for this item.")}),t.reject(e)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(513),d=n(19);t.a=i
},function(e,t,n){"use strict";function i(e){var t,i,s=e.watched;e.item?(t=e.item,i=[t]):e.items&&(i=e.items,t=i[0]);var l=o.a.map(i,function(e){var t=s?"scrobble":"unscrobble",n={identifier:e.get("identifier")||"com.plexapp.plugins.library"};e.server.get("isCloudSyncServer")?(n.key=e.get("key"),n.ratingKey=e.get("ratingKey")):n.key=e.get("ratingKey");var i=p.join(["/:/",t],n),o=u.a.ajax(e.server.getXHROptions(i));return o.done(function(){r(e,s),a(e,s)}),o}),h=u.a.when.apply(u.a,l)
;return h.fail(function(){var e;e=s?n.i(c.default)("There was a problem marking this item as watched."):n.i(c.default)("There was a problem marking this item as unwatched."),d.a.trigger("show:alert",{type:"error",message:e})}),h}function a(e,t){if(n.i(h.c)(e.get("type"))){e.set({unviewedLeafCount:t?0:e.get("leafCount"),viewedLeafCount:t?e.get("leafCount"):0});var i=e.get("children")||e.get("items");i&&i.getCollection().each(function(e){a(e,t)})}else e.set({viewOffset:0,viewCount:t?1:0})}
function r(e,t){var i,a=n.i(h.b)(e.get("type")),s=e.parent;if(s&&s.get("isMetadataList")&&(s=s.parent),s&&(i=n.i(h.b)(s.get("type"))),i&&i.typeString===a.parent){var o,l=n.i(h.c)(e.get("type"));t?o=l?e.get("unviewedLeafCount"):1:(o=l?e.get("viewedLeafCount"):1,o*=-1),s.set({unviewedLeafCount:s.get("unviewedLeafCount")-o,viewedLeafCount:s.get("viewedLeafCount")+o}),r(s,t)}}var s=n(2),o=n.n(s),l=n(5),u=n.n(l),c=n(4),d=n(12),h=n(34),p=n(19);t.a=i},function(e,t,n){"use strict";function i(e,t){
var i=t.playQueue;if(!i.get("playQueueID")||!i.server)return u.a.Deferred().reject().promise();var a=h.a.getTypeByElement(i.get("mediaType"));if("music"!==a)return u.a.Deferred().reject().promise();var r=o.a.pick(t,"position","autoplay","inline");return r=o.a.extend(r,{serverID:i.server.id,playQueueID:i.get("playQueueID"),mediaType:a}),n.i(d.a)(e.fetch()).then(o.a.bind(e.save,e,r))}function a(e){return e.destroy()}function r(e){var t=c.a("appModel"),n=t.get("user"),r=new p.a({},{user:n})
;return e?i(r,e):a(r)}var s=n(2),o=n.n(s),l=n(5),u=n.n(l),c=n(13),d=n(163),h=n(40),p=n(699);t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(13),s=n(40),o=n(23),l=n(699),u=function(e){var t=r.a("appModel"),n=new l.a({},{user:e});return n.fetch().then(function(){return t.get("servers").populateServer(n.get("serverID"))}).then(function(e){return e.get("playQueueManager").populateQueue(n.get("playQueueID"),s.a.getElementByType(n.get("mediaType")))}).then(function(e){
return a.a.when(e,n.get("position"),n.get("autoplay"),n.get("mediaType"),n.get("inline"))}).then(function(e,t,n,i,a){return"music"!==i?o.a.execute("persistPlayQueue",null):o.a.execute("playMedia",{type:i,item:e,playQueue:e,offset:t,autoplay:n,inline:a})}).fail(function(){o.a.execute("persistPlayQueue",null)})};t.a=u},function(e,t,n){"use strict";function i(e){return n.i(a.a)("serverConnectionTestManager").abortConnectionTest(e)}var a=n(13);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.server,i=e.connection;if(t.id)return o.a.Deferred().resolve(t.id).promise();var a=t.resolveUrl("/identity",{connection:i}),s=r.a.extend(t.getXHROptions(a),{timeout:t.connectionTestTimeout});n.i(u.a)("[Identity] Requesting the machine identifier of "+t.get("debugName")+" at "+a);var c=o.a.ajax(s).promise();return c=c.then(function(e){var i=o.a.Deferred(),a=l.a.parseXML(e),r=a&&a.machineIdentifier;return r?(n.i(u.a)("[Identity] Machine identifier found for "+t.get("debugName")+": "+r),
!t.collection||t.collection.get(r)?i.resolve(r):(t.collection.populateServer({isCloud:!0}).done(function(e){e.get("resources").populate().always(function(){i.resolve(r)})}),t.collection.findServer({isCloud:!0}).done(function(e){e.populate().fail(function(){i.resolve(r)})}).fail(function(){i.resolve(r)}))):i.reject(),i.promise()}),c.fail(function(){u.a.warn("[Identity] Machine identifier not found for "+t.get("debugName")+" at "+a)}),c}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(61),u=n(28);t.a=i
},function(e,t,n){"use strict";function i(e){return n.i(a.a)("serverConnectionTestManager").queueConnectionTest(e)}var a=n(13);t.a=i},function(e,t,n){"use strict";function i(e){var t=r.a.Deferred().resolve().promise(),i=r.a.Deferred().reject().promise(),a=o.a.getActiveUser();if(!a)return i;var l=a.get("pin"),u=a.get("authToken");return l||e.pin?l===n.i(s.a)("appModel").get("user").hashPIN(e.pin,u)?t:i:t}var a=n(5),r=n.n(a),s=n(13),o=n(114);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.homeUser,i=a.a("appModel"),l=i.get("user"),u=t.get("uuid")||l.get("uuid"),c={pin:e.pin},d=r.join(["/api/v2/home/users/",u,"/switch"],c),h=t.server.getXHROptions(d,{type:"POST",xhrFields:{withCredentials:o.a.get("allowSSO")}});return n.i(s.a)(h)}var a=n(13),r=n(19),s=n(533),o=n(56);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel"),t=e.get("ui"),i=e.get("user"),u=i.server,c=i.clearAccessToken();return c.fail(function(){
l.a.warn("Failed to clear the access token and user storage")}).always(function(){e.set("history",[]),t&&t.restoreDefaults(),o.a.abortAll(),i.signOut(),i.uninitialize(),i.initialize(),r.a.trigger("clearAll:cache"),u.cache.store(u)}),n.i(s.a)(c)}var a=n(13),r=n(12),s=n(163),o=n(187),l=n(28);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.i(s.a)("appModel").get("user"),i=void 0,a=void 0
;e.username&&e.password?(i=t.server.getXHROptions("/api/v2/users/signin",{type:"POST",data:{login:e.username,password:e.password},xhrFields:{withCredentials:f.a.get("allowSSO")}}),a="password"):(i=t.server.getXHROptions("/api/v2/user?X-Plex-Token="+e.accessToken),a="code");var g=n.i(p.a)(i);return g=g.then(function(n){return e.remember?o.a.restorePrevious():o.a.register(l.a.getInstance()),t.signIn(n)}),g.fail(function(t){var i=void 0;if(!e.silent){
var a=t.responseText&&d.a.parseXML(t.responseText),s=a&&a.error,o=r.a.isArray(s)?r.a.first(s):s;i=o?r.a.isObject(o)?n.i(h.a)(o):o:n.i(u.default)("There was a problem signing in to Plex."),c.a.trigger("show:alert",{type:"error",message:i})}}),g.done(function(){n.i(s.a)("metrics").trackEvent({event:"client:signin",interaction:!0,properties:{mode:a,firstRun:!!e.isFirstRun}})}),g}var a=n(2),r=n.n(a),s=n(13),o=n(95),l=n(363),u=n(4),c=n(12),d=n(61),h=n(249),p=n(533),f=n(56);t.a=i},function(e,t,n){
"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.i(r.a)("appModel").get("user"),i=t.get("signedIn"),s=t.id!==e.homeUser.id,u=e.allowGuestLock,c=s||u,d=i?o.a.execute("authenticateWithServer",e):o.a.execute("authenticateWithHash",e);return i&&c?d=d.then(function(t){return a(t,e)}):d.done(function(){t.set("lockState",l.a.lockStates.UNLOCKED)}),d}function a(e,t){var i=n.i(r.a)("appModel").get("user"),a=o.a.execute("resetUser");return a=a.then(function(){
return i.activateStoredUser(t.homeUser.id),s.a.trigger("reset:servers"),i.signIn(e,{lockState:l.a.lockStates.UNLOCKED})}),a.done(function(){n.i(r.a)("metrics").trackEvent({event:"client:switchuser",interaction:!0})}),a}var r=n(13),s=n(12),o=n(23),l=n(207);t.a=i},function(e,t,n){"use strict";function i(){var e=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma","Location"],t=o.a.ajaxSettings.xhr;return o.a.ajaxSettings.xhr=function(){
var n=t(),i=n.getAllResponseHeaders;return n.getAllResponseHeaders=function(){var t=i.apply(n);if(t)return t;var a=[];return r.a.each(e,function(e){var t=n.getResponseHeader(e);t&&a.push(e+": "+t)}),a.join("\n")},n},o.a.ajaxPrefilter(l.a),o.a.ajaxPrefilter(function(e,t,n){if(e.crossDomain&&!e.skipCorsWithRedirect)return"cors_with_redirect"}),o.a.ajaxTransport("cors_with_redirect",u.a),c.a.startListening(),o.a.Deferred().resolve().promise()}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(1399),u=n(1398),c=n(187);t.a=i},function(e,t,n){"use strict";function i(e){return u.a.isString(e)&&e.trim().length>0}function a(e){var t=n.i(f.a)();return n.i(h.a)("[appModelInitializer] Generating new clientID [%s]",t),e.set("clientID",t),d.a.set("clientID",t)}function r(e){var t=void 0,r=e.get("clientID");return i(r)?t=d.a.set("clientID",r):(t=d.a.get("clientID"),t=t.then(function(t){
if(!i(t))return h.a.error("[appModelInitializer] Invalid clientID found in storage [%s]",r),a(e);e.set("clientID",t)},function(){return n.i(h.a)("[appModelInitializer] Failed to read clientID from storage"),a(e)})),t}function s(e){var t=d.a.get("skipSignIn");return t.always(function(t){e.set("skipSignIn","1"===t)}),t}function o(){var e=n.i(c.a)("appModel"),t=r(e),i=s(e);return n.i(p.a)(t,i)}var l=n(2),u=n.n(l),c=n(13),d=n(95),h=n(28),p=n(527),f=n(529);t.a=o},function(e,t,n){"use strict"
;function i(e){return e.get("isCloud")}function a(){return new u.a({name:"CloudServerEventManager",appModel:n.i(o.a)("appModel"),isValidServer:i,supportsLongPolling:!0,showTimelineStatus:!1,ServerEventConnection:l.a,ServerRetryManager:c.a}).start(),s.a.Deferred().resolve().promise()}var r=n(5),s=n.n(r),o=n(13),l=n(1383),u=n(682),c=n(681);t.a=a},function(e,t,n){"use strict";function i(){if(n.i(u.a)("appModel").get("settings").get("companion")){
var e=n.i(u.a)("appModel"),t=e.get("cloudServer"),i=e.get("clientID");t.get("authorized")&&i&&i!==f&&(f=i,c.a.info('[Companion] Registering player with plex.tv, clientID="%s"',i),d.a.registerPlayer(t,i).done(function(){c.a.info('[Companion] Registered player with plex.tv, clientID="%s"',i)}).fail(function(e){e||(e={}),f=null,c.a.warn('[Companion] Couldn\'t register player with plex.tv, status="%s", response="%s"',e.status,e.responseText&&e.responseText.substr(0,100))}))}}function a(){
var e=n.i(u.a)("appModel"),t=e.get("cloudServer"),i=e.get("clientID");if(t.get("authorized")&&i)return c.a.info('[Companion] Unregistering player with plex.tv, clientID="%s"',i),d.a.unregisterPlayer(t,i).done(function(){return c.a.info('[Companion] Unregistered player with plex.tv, clientID="%s"',i)}).fail(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
;return c.a.warn('[Companion] Couldn\'t unregister player with plex.tv, status="%s", response="%s"',e.status,e.responseText&&e.responseText.substr(0,100))})}function r(){var e=n.i(u.a)("appModel").get("settings"),t=e.get("companion");if(g!==t)return g=t,t?(p.a.subscribe(),l.a.when(d.a.subscribe(h.a.onSignal))):(p.a.unsubscribe(),l.a.when(d.a.unsubscribe(),a()))}function s(){var e=n.i(u.a)("appModel"),t=e.get("cloudServer");e.on("change:clientID",i),t.on("change:authorized",i)
;var a=n.i(u.a)("appModel").get("settings"),s=r();return a.on("change:companion",r),a.get("companion")?s.then(function(){return d.a.getDeepLink()}):s}var o=n(5),l=n.n(o),u=n(13),c=n(28),d=n(469),h=n(683),p=n(1149);t.a=s;var f=null,g=null},function(e,t,n){"use strict";function i(){o.a.init("https://8c4060198e6740a9ae888d6a40ba5468@sentry.io/160686");var e={lifecycle:"started",release:"3.9.1-85417e0",version:s.a.prop("X-Plex-Version")};return s.a.props.forEach(function(t){var n=s.a.prop(t)
;n&&(e[t]=n)}),o.a.set(e),o.a.enable(),r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(298),o=n(470);n(1101);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel").get("user"),t=n.i(a.a)("metrics"),i=void 0;return i="bundled",t.set({userId:e.id,deviceIdentifier:s.a.prop("X-Plex-Client-Identifier"),context:{device:{product:s.a.prop("X-Plex-Product"),version:s.a.prop("X-Plex-Version"),platform:s.a.prop("X-Plex-Platform"),
platformVersion:s.a.prop("X-Plex-Platform-Version"),device:s.a.prop("X-Plex-Device"),deviceName:s.a.prop("X-Plex-Device-Name"),model:s.a.prop("X-Plex-Model"),screenResolution:s.a.prop("X-Plex-Device-Screen-Resolution"),layout:n.i(o.a)("desktop","desktop"),environment:i}}}),n.i(r.a)(t.start())}var a=n(13),r=n(163),s=n(298),o=n(1325);t.a=i},function(e,t,n){"use strict";function i(){var e=c.a.get("connections");return e=e.then(function(e){if(e)try{var t=JSON.parse(e),i=t.users;if(!i)return;var a=[]
;return i.forEach(function(e){var n=e.entitlements,i=e.servers,r={id:e.id,authToken:e.accessToken,title:e.title,pin:e.pin,home:e.home,hasAllEntitlements:!!e.entitlements&&e.entitlements.hasOwnProperty("all"),lastPrimaryServerID:t.lastPrimaryServerID,entitlements:[],servers:[]};n&&o.a.each(n,function(e,t){e&&r.entitlements.push({id:t})}),i&&i.forEach(function(e){var t=e.connections,n=e.sources,i=!(!t||!t.length),a=!(!n||!n.length);if(e.machineIdentifier&&i&&a){var s={
machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,sourceTitle:e.shared?e.friendlyName:void 0,accessToken:e.accessToken,synced:e.synced,isShared:e.shared,connections:[]};t.forEach(function(e){var t={uri:e.uri,scheme:e.scheme,address:e.address,port:e.port,sources:[]};o.a.contains(n,"myPlex")?t.sources.push({id:"myPlex"}):t.sources.push({id:"internal"}),s.connections.push(t)}),r.servers.push(s)}}),a.push(r)}),c.a.set("users",r()({users:a}))}catch(e){
n.i(l.a)(!1,"Unable to migrate stored connections: "+e.message)}}),e=e.then(function(){return c.a.remove("connections")}),n.i(u.a)(e)}var a=n(113),r=n.n(a),s=n(2),o=n.n(s),l=n(33),u=n(163),c=n(95);t.a=i},function(e,t,n){"use strict";function i(){n.i(f.a)("[Servers] Resetting...");var e=n.i(g.a)("appStore"),t=n.i(g.a)("appModel"),i=t.get("servers");n.i(g.a)("serverManager").stop(),n.i(g.a)("primaryServerManager").stop(),n.i(g.a)("manualServerManager").stop(),
n.i(g.a)("serverConnectionManager").stop(),n.i(g.a)("serverConnectionTestManager").reset(),i.uninitialize(),i.reset(),i.initialize(),t.unset("primaryServer"),e.dispatch(n.i(b.a)({budget:1/0})),a()}function a(){n.i(f.a)("[Servers] Initializing..."),r(),s(),o(),l(),u(),n.i(g.a)("serverManager").start(),n.i(g.a)("primaryServerManager").start(),n.i(g.a)("manualServerManager").start(),n.i(g.a)("serverConnectionManager").start(),n.i(f.a)("[Servers] Finished initialization")}function r(){
var e=n.i(g.a)("appModel"),t=e.get("servers"),i=e.get("cloudServer"),a=e.get("settings");i.addConnection({scheme:a.get("myPlexScheme")||m.a.get("myPlexScheme"),address:a.get("myPlexUrl")||m.a.get("myPlexUrl")}),t.add(i)}function s(e){var t=n.i(g.a)("appModel"),i=t.get("servers"),a=v.a.getActiveServers();a&&a.each(function(e){if(e.get("connections").length)try{var n=new y.a(e.toJSON(),{parent:t});i.add(n)}catch(e){f.a.warn(e)}})}function o(){
var e=n.i(g.a)("appModel"),t=e.get("servers"),i=m.a.get("primaryServer");if(i){var a=new y.a({machineIdentifier:i.machineIdentifier,friendlyName:i.name,isShared:i.shared,superToken:i.superToken,accessToken:i.accessToken,sourceTitle:i.sourceTitle},{parent:e});a.addConnection({scheme:i.scheme,address:i.address,port:i.port}),t.add(a)}}function l(){var e=n.i(g.a)("appModel"),t=e.get("servers"),i=new y.a({isBundled:!0},{parent:e});i.addConnection({scheme:window.location.protocol.replace(":",""),
address:window.location.hostname,port:window.location.port,isBundled:!0}),t.add(i)}function u(){if(m.a.get("allowLoopbackDiscovery")){var e=n.i(g.a)("appModel"),t=e.get("servers"),i=new y.a({},{parent:e});i.addConnection({scheme:"http",address:"127.0.0.1",port:"32400"}),t.add(i)}}function c(){return a(),p.a.on("reset:servers",i),h.a.Deferred().resolve().promise()}var d=n(5),h=n.n(d),p=n(12),f=n(28),g=n(13),m=n(56),v=n(114),y=n(96),b=n(492);t.a=c},function(e,t,n){"use strict";function i(){
var e=n.i(s.a)("appModel").get("settings"),t=r.a.Deferred();return r.a.when(e.populate(),l.a.populate()).always(function(){var n=e.get("language");o.a.load(n).always(function(){t.resolve()})}),t.promise()}var a=n(5),r=n.n(a),s=n(13),o=n(362),l=n(114);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.a)()}var a=n(1134);t.a=i},function(e,t,n){"use strict";function i(){var e=r.a.Deferred(),t=o.a.get("myPlexAccessToken");return t.done(function(e){
var t=n.i(s.a)("appModel").get("user"),i=l.a.get("users"),a=i.findWhere({authToken:e});a&&t.activateStoredUser(a.id)}),t.always(function(){e.resolve()}),e.promise()}var a=n(5),r=n.n(a),s=n(13),o=n(95),l=n(114);t.a=i},function(e,t,n){"use strict";var i=n(13),a=n(28),r=n(38),s=n(12),o=n(55),l=(n(33),n(114)),u=n(56),c=n(207),d=r.a.extend({mixins:o.a,collectionNames:[],flexCollectionNames:[],initialize:function(e){this.user=e},start:function(){var e=this,t=this.user;this.previousUserID=t.id;var r={
change:this.onUserChange};["isSignedIn","isLocked","isUnlocked","hasInvalidToken"].forEach(function(n){var i=t.get(n),a=n.charAt(0).toUpperCase()+n.slice(1),s=e["on"+a+"Change"];r["change:"+n]=s,i&&s.call(e,t,i)}),this.listenTo(t,r);var s=n.i(i.a)("appModel").get("settings"),o=u.a.get("proxied")||s.get("autoLogin")||t.get("isUnlocked");n.i(a.a)("[UserManager] autoLogin",o),o||this._lockIfInHome()},handleInvalidToken:function(){},_lockIfInHome:function(){var e=l.a.getActiveUser()
;e&&e.get("home")&&this.user.set("lockState",c.a.lockStates.LOCKED)},onHasInvalidTokenChange:function(e,t){t&&this.handleInvalidToken()},onIsUnlockedChange:function(e,t){},onUserChange:function(e){if(this.user.get("isSignedIn")){var t=l.a.getActiveUser();if(t)t.copyFromUser(e);else{l.a.get("users").add(e.toJSON(),{parse:!0})}l.a.debouncedSave()}},onIsSignedInChange:function(e,t){if(this.stopListening(e,"change:hasInvalidToken",this.onHasInvalidTokenChange),
!t)return void(e.get("hasInvalidToken")&&this.handleInvalidToken());t&&e.get("isLocked")&&(this.previousUserID=e.id);var n={reset:!0};this.collectionNames.forEach(function(t){return e.get(t).populate(n)}),this.flexCollectionNames.forEach(function(t){return e.get("desktop").get(t).populate(n)})},onIsLockedChange:function(e,t){t&&(this.previousUserID=e.id,this.listenTo(e,"change:isUnlocked",this.onNextIsUnlockedChange))},onNextIsUnlockedChange:function(e,t){var n=this
;t&&(this.stopListening(e,"change:isUnlocked",this.onNextIsUnlockedChange),setTimeout(function(){var e=n.previousUserID,t=e&&e===n.user.id?"navigate:refresh":"navigate:refresh:dashboard";s.a.trigger(t)},0))}});t.a=d},function(e,t,n){"use strict";var i=n(38),a=n(55),r=i.a.extend({mixins:a.a,start:function(){}});t.a=r},function(e,t,n){"use strict";var i=n(70),a=n.n(i),r=n(38),s=n(12),o=n(55),l=n(96),u=n(1239),c=r.a.extend({mixins:[o.a],initialize:function(e){this.appModel=e.appModel,
this.servers=this.appModel.get("servers")},start:function(){this.listenTo(u.a,"change",this.onManualConnectionChange),this.initManualServer()},stop:function(){this.stopListening()},initManualServer:function(){function e(e){var t=u.a.get("ip"+e),n=u.a.get("port"+e);t&&n&&this.addManualConnection(t,n,e)}e.call(this,1),e.call(this,2)},removeManualConnection:function(e,t,n){var i=this.appModel.get("primaryServer"),a="manualServer"+n,r=this.servers.find(function(e){return e.hasSource(a)});if(r){
r.removeSource("internal"),r.removeSource(a);r.get("connections").findWhere({isConnected:!0})||r!==i||s.a.trigger("navigate","dashboard",{replace:!0})}},addManualConnection:function(e,t,n){var i="manualServer"+n,a={scheme:"http",address:e,port:t.toString(),sources:{id:i}},r=new l.a({friendlyName:e});r.addConnection(a),this.servers.add(r)},onManualConnectionChange:function(e){var t=a()(e.changed)[0],n=t.slice(-1),i="ip"+n,r="port"+n,s=e.previous(i),o=e.previous(r),l=e.get(i),u=e.get(r)
;s&&o&&this.removeManualConnection(s,o,n),l&&u&&this.addManualConnection(l,u,n)}});t.a=c},function(e,t,n){"use strict";var i=n(55),a=n(473),r=a.a.extend({mixins:[i.a],initialize:function(e){var t=e.appModel;a.a.prototype.initialize.apply(this,arguments),this.appModel=t,this.listenTo(this.appModel,"change:primaryServer",this.onPrimaryServerChange)},onPrimaryServerChange:function(e,t){t&&!t.get("hasEventConnection")&&(this.stop(t),this.start(t))}});t.a=r},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(5),s=n.n(r),o=n(1392),l=n(13),u=n(38),c=n(56),d=n(55),h=n(1245),p=u.a.extend({mixins:d.a,initialize:function(){this.defaults={},this.enable()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},set:function(e){this.defaults=a()({},this.defaults,e)},incrementPlaybackCount:function(){var e="playbackCount";h.a.save(e,h.a.get(e)+1)},addPlaybackTime:function(e){var t="playbackTime";h.a.save(t,h.a.get(t)+e)},trackView:function(e,t){this.trackEvent(a()({
event:"client:view",interaction:!0,properties:e},t))},trackClick:function(e,t){this.trackEvent(a()({event:"client:click",interaction:!0,properties:e},t))},trackEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.i(l.a)("metricsReporter");if(this.enabled){var i=h.a.get("sessionId"),a=s.a.extend(!0,{properties:{sessionId:i}},this.defaults,e);return t.trackEvent(a),a}},start:function(){var e=this,t=n.i(l.a)("appModel").get("user")
;this.listenTo(t,"change:id",this.onUserIDChange);var i=h.a.populate();return i.done(function(){e.stopSession()}).always(function(){e.startSession()}),i},startSession:function(){var e=Date.now();this.interval||(this.interval=setInterval(function(){h.a.save("heartbeatTime",Date.now())},c.a.get("heartbeatInterval"))),h.a.save({sessionId:n.i(o.a)(),startTime:e,heartbeatTime:e,playbackCount:0,playbackTime:0}),this.trackEvent({event:"client:start",interaction:!0})},stopSession:function(){
var e=h.a.get("heartbeatTime"),t=h.a.get("playbackCount"),n=h.a.get("playbackTime"),i=h.a.get("startTime");this.trackEvent({event:"client:shutdown",interaction:!1,properties:{sessionLength:this.millisecondsToSeconds(e-i),playbackCount:t,playbackTime:this.millisecondsToSeconds(n)}})},millisecondsToSeconds:function(e){return Math.floor(e/1e3)},onUserIDChange:function(e,t){this.set({userId:t})}});t.a=p},function(e,t,n){"use strict"
;var i=n(5),a=n.n(i),r=n(13),s=n(55),o=n(38),l=n(28),u=n(84),c=n(114),d=n(492),h=n(1271),p=o.a.extend({mixins:[s.a],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(e){this.stop(),this.listenTo(this.appModel,{"change:primaryServer":this.onPrimaryServerChange,"change:primaryServer.change:isPrimaryEligible":this.onPrimaryServerEligibleChange,"change:primaryServer.change:isOutOfDate":this.onPrimaryServerOutOfDateChange,
"change:isWaitingForServers":this.onWaitingForServersChange,"change:primaryServer.change:isRelayed":this.onPrimaryServerIsRelayedChange}),this.listenTo(this.servers,{"update reset":this.onServersUpdate}),this._setPrimaryServer(u.h)},stop:function(){this.stopListening(),this._primaryServerPromise=null},fetchPrimaryRelations:function(e){},_setPrimaryServer:function(e){var t=this;if(this._primaryServerPromise)return this._primaryServerPromise;var i=n.i(r.a)("appStore");i.dispatch(n.i(d.c)())
;var a=this._waitForPrimaryServer();return this._primaryServerPromise=a,a.done(function(r){if(a===t._primaryServerPromise){if(t._primaryServerPromise=null,t.appModel.get("primaryServer"))return;var s=!r.get("version")&&!r.get("isRejected");r.get("isOutOfDate")||s?(n.i(l.a)("[Primary Server] The server, %s, is waiting for a version",r.get("debugName")),t._setPrimaryServer(e)):i.dispatch(n.i(d.b)({machineIdentifier:r.id,metricsProperties:{context:e}}))}}).fail(function(){
a===t._primaryServerPromise&&(t._primaryServerPromise=null,t.appModel.set("isWaitingForPrimaryServer",!1))}),a},_waitForPrimaryServer:function(){var e=this,t=this.appModel.get("user"),i=t.get("lastPrimaryServerID"),r=void 0;return i?(n.i(l.a)("[Primary Server] Waiting for the last primary server, %s, to connect",i),r=this.servers.populateServer({machineIdentifier:i,isPrimaryEligible:!0,isOutOfDate:!1})):r=a.a.Deferred().reject().promise(),r=r.then(null,function(){
return n.i(l.a)("[Primary Server] Waiting for any owned server to connect"),e.servers.populateServer({isFullOwnedServer:!0,isPrimaryEligible:!0,isOutOfDate:!1})}),r=r.then(null,function(){return n.i(l.a)("[Primary Server] Waiting for any eligible server to connect"),e.servers.populateServer({isPrimaryEligible:!0,isOutOfDate:!1})}),r=r.then(null,function(){return n.i(l.a)("[Primary Server] Waiting for any eligible server"),e.servers.findServer({isPrimaryEligible:!0,isOutOfDate:!1})})},
onPrimaryServerChange:function(e,t){c.a.flushDebouncedSave();var i=e.previous("primaryServer");if(i&&this.stopListening(i),t){l.a.info("[Primary Server] %s is now the primary server",t.get("debugName"));if(e.get("user").set("lastPrimaryServerID",t.id),t.get("isConnected")?this.fetchPrimaryRelations(t):this.listenTo(t,"change:isConnected",this.onPrimaryServerConnectedChange),t.get("isRelayed")){n.i(r.a)("appStore").dispatch(n.i(h.a)({machineIdentifier:t.id,serverName:t.get("friendlyName")}))}
}else e.get("isWaitingForPrimaryServer")?n.i(l.a)("[Primary Server] Waiting to set the primary server"):l.a.warn("[Primary Server] No primary server found")},onPrimaryServerEligibleChange:function(e,t){var i=this.appModel.get("user");t||(n.i(l.a)("[Primary Server] The previous primary server, %s, is unauthorized",e.get("debugName")),i.unset("lastPrimaryServerID"),this._setPrimaryServer(u.i))},onPrimaryServerOutOfDateChange:function(e,t){var i=this.appModel.get("user")
;t&&(n.i(l.a)("[Primary Server] The previous primary server, %s, is out of date",e.get("debugName")),i.unset("lastPrimaryServerID"),this._setPrimaryServer(u.i))},onPrimaryServerConnectedChange:function(e,t){t&&this.fetchPrimaryRelations(e)},onWaitingForServersChange:function(e,t){if(t){var n=e.get("primaryServer"),i=!n||!this.servers.get(n.id),a=e.get("isWaitingForPrimaryServer");i&&!a&&this._setPrimaryServer(u.i)}},onPrimaryServerIsRelayedChange:function(e,t){if(t){
n.i(r.a)("appStore").dispatch(n.i(h.a)({machineIdentifier:e.id,serverName:e.get("friendlyName")}))}},onServersUpdate:function(){var e=this.appModel.get("user"),t=this.appModel.get("primaryServer");if(t){t&&!this.servers.get(t.id)&&(n.i(l.a)("[Primary Server] The previous primary server, %s, was removed",t.get("debugName")),e.unset("lastPrimaryServerID"),this._setPrimaryServer(u.i))}else this._setPrimaryServer(u.h)}});t.a=p},function(e,t,n){"use strict";var i=n(55),a=n(473),r=a.a.extend({
mixins:[i.a],initialize:function(e){var t=e.appModel;a.a.prototype.initialize.apply(this,arguments),this.appModel=t,this.listenTo(this.appModel,"change:primaryServer",this.onPrimaryServerChange)},supportsRetry:function(e){var t=this.appModel.get("primaryServer");return!!t&&t.id===e.id},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");n&&this.stop(n),t&&t.get("isUnavailable")&&this.start(t)}});t.a=r},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(12),c=n(38),d=n(681),h=n(1145),p=n(55),f=n(28),g=n(114),m=n(96),v=c.a.extend({mixins:[p.a],browserConnectionChangeDelay:2e3,initialize:function(e){s.a.bindAll(this,"onBrowserConnectionChange"),this.appModel=e.appModel,this.servers=this.appModel.get("servers");var t={callback:this.retryServerConnections.bind(this),logFormat:"[Connections] Retrying connection tests for %s in %s seconds"};this._cloudServerRetryManager=new d.a(t),
this._primaryServerRetryManager=new h.a(a()({},t,{appModel:this.appModel}))},start:function(){this.stop();var e=l()(window);e.on("online",this.onBrowserConnectionChange),e.on("offline",this.onBrowserConnectionChange),this.listenTo(u.a,{"test:servers":this.onTestAllServers,"test:server":this.onTestServer}),this.listenTo(this.servers,{add:this.onServerAdd,remove:this.onServerRemove,reset:this.onServersReset,"error:connection":this.onServerConnectionError,
"change:connections.add":this.onServerConnectionAdd,"change:connections.remove":this.onServerConnectionRemove,"change:connections.reset":this.onServerConnectionsReset,"change:connections.change:isConnected":this.onServerConnectionConnectedChange,"change:connections.change:sources.change":this.onServerConnectionSourcesChange,"change:accessToken":this.onServerAccessTokenChange,"change:isConnected":this.onServerConnectedChange,"change:isUnavailable":this.onServerUnavailableChange,
"change:publicAddressMatches":this.onServerPublicAddressMatchesChange}),this.servers.invoke("testOnlyUntestedConnections")},stop:function(){this.stopListening(),this._cloudServerRetryManager.stopAll(),this._primaryServerRetryManager.stopAll();var e=l()(window);e.off("online",this.onBrowserConnectionChange),e.off("offline",this.onBrowserConnectionChange)},retryServerConnections:function(e){e.testAllConnections()},_startFailedServerRetries:function(e){
e.get("isCloud")?this._cloudServerRetryManager.start(e):this._primaryServerRetryManager.start(e)},_stopFailedServerRetries:function(e){e.get("isCloud")?this._cloudServerRetryManager.stop(e):this._primaryServerRetryManager.stop(e)},_removeConnection:function(e){var t=e.server,i=g.a.getActiveServers();if(n.i(f.a)("[Connections] Removed connection %s from %s",e.id,t.get("debugName")),t.abortConnectionTest(e),i){var a=i.get(t.id),r=a&&a.get("connections");r&&r.get(e.id)&&(r.remove(e.id),
r.length||i.remove(t.id),g.a.debouncedSave())}},onBrowserConnectionChange:function(e){var t=this;n.i(f.a)("[Connections] Browser online status changed to",window.navigator.onLine),clearTimeout(this.browserConnectionChangeTimeout),this.browserConnectionChangeTimeout=setTimeout(function(){t.servers.invoke("testAllConnections")},this.browserConnectionChangeDelay)},onTestAllServers:function(){this.servers.invoke("testAllConnections")},onTestServer:function(e){e.testAllConnections()},
onServerAdd:function(e){e.testOnlyUntestedConnections()},onServerRemove:function(e){var t=g.a.getActiveServers(),n=void 0;if(e.abortAllConnectionTests(),this._stopFailedServerRetries(e),t)if(e.get("isMerged")){var i=e.previous("machineIdentifier");i&&(n=t.get(i))&&(n.set("machineIdentifier",e.id),g.a.debouncedSave())}else(n=t.get(e.id))&&(t.remove(e.id),g.a.debouncedSave())},onServersReset:function(e,t){var n=this,i=t.previousModels;s.a.each(i,function(t){
e.contains(t)||(t.abortAllConnectionTests(),n._stopFailedServerRetries(t))})},onServerConnectionError:function(e){if(f.a.warn("[Connections] Possible connection error for %s, retrying connection tests",e.get("debugName")),e.get("isCloud")){this.appModel.get("user").signInUnsupervised()}else e.testAllConnections()},onServerConnectionAdd:function(e){var t=e.server;n.i(f.a)("[Connections] Added connection %s for %s",e.id,t.get("debugName")),
e.get("relay")&&!t.get("connections").hasFailedEveryDirectConnection()||t.testConnection(e)},onServerConnectionRemove:function(e){this._removeConnection(e)},onServerConnectionsReset:function(e,t){var n=this,i=t.previousModels;s.a.each(i,function(t){e.contains(t)||n._removeConnection(t)})},onServerConnectionConnectedChange:function(e,t){var n=e.server,i=e.get("isBundled"),a=e.get("isFallback"),r=t&&!i&&!a,o=g.a.getActiveServers();if(n.id&&!n.get("isCloud")&&r&&o){var l=o.get(n.id)
;if(l)l.copyFromServer(n);else{var u=s.a.omit(n.toJSON(),"connections");l=o.add(u,{merge:!0,parse:!0})}l.get("connections").add(e.toJSON(),{merge:!0,parse:!0}),g.a.debouncedSave()}},onServerConnectionSourcesChange:function(e,t){var n=e.server,i=g.a.getActiveServers(),a=i&&i.get(n.id);if(a){var r=a.get("connections"),s=r.get(e.id);if(s){s.get("sources").set(t.toJSON()),g.a.debouncedSave()}}},onServerAccessTokenChange:function(e,t){
e.get("isCloud")||(n.i(f.a)("[Connections] Access token for %s changed to %s",e.get("debugName"),t),e.get("isUnauthorized")&&e.set("connectionTestResult",m.a.connectionTestResults.PENDING),e.testAllConnections())},onServerConnectedChange:function(e,t){t&&this._stopFailedServerRetries(e)},onServerUnavailableChange:function(e,t){t&&this._startFailedServerRetries(e)},onServerPublicAddressMatchesChange:function(e,t){void 0!==t&&e.testAllConnections()}});t.a=v},function(e,t,n){"use strict"
;function i(e,t,n){return function(i){return i.server===e&&i.connection.id===t.id&&i.url===n}}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(28),c=n(38),d=n(187),h=n(56),p=c.a.extend({initialize:function(e){this.appModel=e.appModel,this.queued=[],this.executing=[],this.maximumConcurrent=h.a.get("maximumConcurrentConnectionTests"),this.throttledStartProcessing=r.a.throttle(this._startProcessing.bind(this),50,{leading:!1})},queueConnectionTest:function(e){
var t=e.server,n=e.connection,i=e.url,a=this._queuedOrExecuting(t,n,i);if(a)return a.deferred.promise();var r=o.a.Deferred();return this.queued.push({server:t,connection:n,url:i,deferred:r}),this._sortQueue(),this.throttledStartProcessing(),r.promise()},abortConnectionTest:function(e){var t=e.server,n=e.connection,i=e.url;return this._abortCurrentTest(t,n,i),this._removeQueuedOrExecuting(t,n,i),o.a.Deferred().resolve().promise()},reset:function(){this.queued.length=0,this.executing.length=0},
_sortQueue:function(){var e=this,t=this.appModel.get("user").get("lastPrimaryServerID");this.queued.sort(function(n,i){var a=n.server,r=i.server,s=n.connection,o=i.connection,l=e._isManualConnection(s),u=e._isManualConnection(o),c=e._isMatchingLocation(a,s),d=e._isMatchingLocation(r,o)
;return a.id===t&&r.id!==t?-1:r.id===t&&a.id!==t?1:a.get("isCloud")&&!r.get("isCloud")?-1:r.get("isCloud")&&!a.get("isCloud")?1:!s.get("relay")&&o.get("relay")?-1:!o.get("relay")&&s.get("relay")?1:!s.get("isConnected")&&o.get("isConnected")?-1:!o.get("isConnected")&&s.get("isConnected")?1:!a.get("isShared")&&r.get("isShared")?-1:!r.get("isShared")&&a.get("isShared")?1:a.get("isFullServer")&&!r.get("isFullServer")?-1:r.get("isFullServer")&&!a.get("isFullServer")?1:!a.get("isCloudSyncServer")&&r.get("isCloudSyncServer")?-1:!r.get("isCloudSyncServer")&&a.get("isCloudSyncServer")?1:l&&!u?-1:u&&!l?1:s.get("isBundled")&&!o.get("isBundled")?-1:o.get("isBundled")&&!s.get("isBundled")?1:c&&!d?-1:d&&!c?1:0
})},_startProcessing:function(){r.a.times(this.maximumConcurrent-this.executing.length,this._process.bind(this))},_process:function(){var e=this;if(!(this.executing.length>=this.maximumConcurrent)&&this.queued.length){var t=this.queued.shift(),i=t.server,a=t.connection,r=t.url;this._abortCurrentTest(i,a,r);var s=n.i(l.a)("testServerConnection"),o=s({server:i,connection:a,url:r});this.executing.push(t),o.done(function(e,n){t.deferred.resolve(e,n)}),o.fail(function(e,n){t.deferred.reject(e,n)}),
o.always(function(){var n=e.executing.indexOf(t);e.executing.splice(n,1),e._process()})}},_abortCurrentTest:function(e,t,i){var a=t.get("currentTest"),r=e.resolveUrl(i||"/",{connection:t});a&&"pending"===a.state()&&(n.i(u.a)("[Connections] Aborting pending connection test for %s at %s",e.get("debugName"),r),d.a.abort(a.rid),a.abort())},_isManualConnection:function(e){return e.get("sources").some(function(e){return 0===e.id.indexOf("manualServer")})},_isMatchingLocation:function(e,t){
var n=e.get("publicAddressMatches"),i=t.get("isPrivate");return n&&i||!n&&!i},_queuedOrExecuting:function(e,t,n){var a=i(e,t,n);return r.a.find(this.executing,a)||r.a.find(this.queued,a)},_removeQueuedOrExecuting:function(e,t,n){var a=i(e,t,n),s=r.a.findIndex(this.executing,a),o=r.a.findIndex(this.queued,a);s>=0&&this.executing.splice(s,1),o>=0&&this.queued.splice(o,1)}});t.a=p},function(e,t,n){"use strict"
;var i=n(70),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),u=n(38),c=n(12),d=n(28),h=n(55),p=n(96),f=n(705),g=n(114),m=a()(f.a.prototype.syncedAttrs),v=u.a.extend({mixins:[h.a],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(){var e=this;this.stop(),this.listenTo(this.servers,{"change:promiseState":this.onServerPromiseStateChange,remove:this.onServerRemove,"update reset":this.onServersUpdateReset,"change:resources.add":this.onResourceAdd,
"change:resources.remove":this.onResourceRemove,"change:resources.update":this.onResourcesUpdate,"change:resources.reset":this.onResourcesReset,"change:resources.change:presence":this.onResourcesPresenceChange,"change:resources.change:connections.update":this.onResourceConnectionsUpdate}),m.forEach(function(t){e.listenTo(e.servers,"change:"+t,e.onStoredServerAttributeChange.bind(e,t))}),this.listenTo(c.a,"discover:servers",this.onDiscoverServers),this._setAuthorized(),
this._checkFoundAllServers()},stop:function(){this.stopListening()},_checkFoundAllServers:function(){this.servers.shouldWaitForInitialServers()?this._waitForServers():this.servers.shouldWaitForResources()?this._waitForServers():this.servers.shouldWaitForPendingServers()?this._waitForServers():this._foundAllServers()},_waitForServers:function(){this.servers.waitForServers(),this.appModel.set("isWaitingForServers",!0)},_foundAllServers:function(){this.servers.foundAllServers(),
this.appModel.set("isWaitingForServers",!1)},_fetchResources:function(e){var t=this;if(e.get("isRejected"))return s.a.Deferred().reject().promise();if(!e.get("isResolved"))return n.i(d.a)("[Servers] Finding resources through unresolved cloud server %o, resolving",e.get("debugName")),e.populate().then(function(){return t._fetchResources(e)});n.i(d.a)("[Servers] Finding resources through %s",e.get("debugName")),this._waitForServers(),e.set("isResourcesPending",!0);var i=e.get("resources")
;return i.fetch().done(function(){n.i(d.a)("[Servers] Found %s resources through %s",i.length,e.get("debugName")),e.set({isResourcesPending:!1,hasFailedResources:!1,isDownForMaintenance:!1})}).fail(function(t,n){d.a.warn("[Servers] Failed to request resources through %s",e.get("debugName")),e.set({isResourcesPending:!1,hasFailedResources:!0,isDownForMaintenance:503===n.status})}).always(function(){t._checkFoundAllServers()})},_convertResourceToServer:function(e){
n.i(d.a)("[Servers] %s was found through %s",e.get("name"),e.server.get("debugName"));var t="Plex Media Server"===e.get("product"),i="Plex Cloud Server"===e.get("product"),a=new p.a({machineIdentifier:e.id,friendlyName:e.get("name"),version:t?e.get("productVersion"):void 0,isShared:!e.get("owned"),accessToken:e.get("accessToken"),sourceTitle:e.get("sourceTitle"),publicAddressMatches:e.get("publicAddressMatches"),httpsRequired:e.get("httpsRequired"),platform:e.get("platform"),
platformVersion:e.get("platformVersion"),presence:e.get("presence"),home:e.get("home"),synced:e.get("synced"),serverClass:t||i?void 0:p.a.serverClasses.SECONDARY,createdAt:e.get("createdAt"),lastSeenAt:e.get("lastSeenAt"),ownerId:e.get("ownerId")},{parent:this.appModel});return this._addResourceConnectionsToServer(e,a),a},_addResourceConnectionsToServer:function(e,t){e.get("connections").each(function(n){var i=[{id:e.server.id}],a=l.a.extend(n.toJSON(),{sources:i});t.addConnection(a)})},
_removeResource:function(e){n.i(d.a)("[Servers] %s was removed as a resource from %s",e.get("name"),e.server.id);var t=this.servers.get(e.id);t&&t.removeSource(e.server.id)},_pruneStaleSources:function(e){for(var t=e.get("resources"),n=this.servers.length-1;n>=0;){var i=this.servers.at(n),a=t.get(i.id);if(a)for(var r=i.get("connections"),s=r.length-1;s>=0;){var o=r.at(s),l=o.get("sources");if(l.get(e.id)){var u=a.get("connections");u.get(o.id)||o.get("sources").remove(e.id)}s--
}else i.removeSource(e.id);n--}},_setAuthorized:function(){var e=!!this.servers.findWhere({isConnected:!0,isCloud:!1}),t=!!this.servers.findWhere({isResolved:!0,isCloud:!0});this.appModel.set("authorized",e||t)},onServerPromiseStateChange:function(e,t){if(t===p.a.promiseStates.RESOLVED){e.get("resources")&&this._fetchResources(e)}this._setAuthorized(),this._checkFoundAllServers()},onStoredServerAttributeChange:function(e,t,n){var i=g.a.getActiveServers(),a=i&&i.get(t.id)
;a&&null!=n&&a.get(e)!==n&&(a.set(e,n),g.a.debouncedSave())},onServerRemove:function(e){d.a.warn("[Servers] %s was removed",e.get("debugName")),e.cache.remove(e),c.a.trigger("clearWhere:cache",{server:e})},onServersUpdateReset:function(){this._setAuthorized(),this._checkFoundAllServers()},onDiscoverServers:function(){var e=this.appModel.get("cloudServer");this._fetchResources(e)},onResourceAdd:function(e){if(l.a.contains(e.get("provides"),"server")){var t=this._convertResourceToServer(e)
;this.servers.add(t)}},onResourceRemove:function(e){this._removeResource(e)},onResourcesUpdate:function(e){this._pruneStaleSources(e.server),this._checkFoundAllServers()},onResourcesReset:function(e,t){var n=this,i=t.previousModels;l.a.each(i,function(t){e.contains(t)||n._removeResource(t)}),this._checkFoundAllServers()},onResourcesPresenceChange:function(e){var t=this.servers.get(e.id);t&&t.set("presence",e.get("presence"))},onResourceConnectionsUpdate:function(e){
var t=e.parent,n=this.servers.get(t.id);n&&(this._addResourceConnectionsToServer(t,n),this._pruneStaleSources(e.server),this._checkFoundAllServers())}});t.a=v},function(e,t,n){"use strict";var i=n(12),a=n(683),r={subscribe:function(){i.a.on("cloudServer:processRemoteControlCommand",this.onCloudServerCommand,this)},unsubscribe:function(){i.a.off("cloudServer:processRemoteControlCommand",this.onCloudServerCommand,this)},onCloudServerCommand:function(e){var t=e.Command,n={supportsTimeline:!1,
path:t.path,commandID:t.commandID,query:{key:[t.queryKey],offset:[t.queryOffset],containerKey:[t.queryContainerKey],playQueueID:[t.queryPlayqueueid],type:[t.queryType],volume:[t.queryVolume],repeat:[t.queryRepeat],subtitleStreamID:[t.querySubtitleStreamID],token:[t.queryToken],machineIdentifier:[t.queryMachineIdentifier],protocol:[t.queryProtocol],address:[t.queryAddress],port:[t.queryPort],text:[t.queryText],field:[t.queryField]}};a.a.onSignal(n)}};t.a=r},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(177),s={bindings:a.a.extend({".artist-title":{modelAttribute:"parentTitle"},".album-title":{modelAttribute:"title"}},a.a.pick(r.a.defaultBindings,[".item-year",".item-genre"]))};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(177),s={bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-genre"])};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(177),s={
bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-year",".item-duration",".item-tagline",".item-genre",".item-director",".item-writer",".item-cast",".item-content-rating",".content-rating-flag-container",".studio-flag-container"])};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(177),s=n(162),o={bindings:a.a.extend({".show-title":{modelAttribute:"grandparentTitle"},".episode-title":{modelAttribute:"title"},".episode-index":{modelAttribute:"index",formatter:function(e){
return n.i(s.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "})}}},a.a.pick(r.a.defaultBindings,[".item-year",".item-progress",".item-duration",".item-unwatched-label",".item-unavailable-btn",".item-available-at",".item-director",".item-writer",".item-cast",".item-content-rating",".media-count-badge",".content-rating-flag-container"]))};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(177),s={
bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-year",".item-progress",".item-duration",".item-unwatched-label",".item-unavailable-btn",".item-tagline",".item-genre",".item-director",".item-writer",".item-cast",".item-content-rating",".media-count-badge",".content-rating-flag-container",".studio-flag-container"])};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(177),s={
bindings:a.a.pick(r.a.defaultBindings,[".item-title",".item-year",".item-duration",".item-genre",".item-content-rating",".details-unwatched-count-badge",".content-rating-flag-container",".studio-flag-container"])};t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(19),l=n(212),u=n(12),c={},d={languages:{en:"en.json","en-GB":"en-GB.json",af:"af.json",my:"my.json",ca:"ca.json",cs:"cs.json",sr:"sr.json",da:"da.json",de:"de.json",et:"et.json",es:"es.json",
"es-419":"es-419.json",el:"el.json",fr:"fr.json","fr-CA":"fr-CA.json",hr:"hr.json",is:"is.json",it:"it.json",lt:"lt.json",hu:"hu.json",nl:"nl.json",no:"no.json",pl:"pl.json",pt:"pt.json","pt-BR":"pt-BR.json",ru:"ru.json",ro:"ro.json",sk:"sk.json",sl:"sl.json",fi:"fi.json",sv:"sv.json",vi:"vi.json",tr:"tr.json",uk:"uk.json",bg:"bg.json",zh:"zh.json","zh-TW":"zh-TW.json",ja:"ja.json",ko:"ko.json",th:"th.json",fa:"fa.json",ar:"ar.json",he:"he.json"},loadingPromise:null,loadingLanguage:null,
getLanguages:function(){return this.languages},getTranslation:function(e){if(this.translations[this.language])return this.translations[this.language][e]},load:function(e){if(this.loadingLanguage&&this.loadingLanguage===e)return this.loadingPromise;var t,i=this.getLanguages();return t=a.a.has(i,e)?a.a.has(this.translations,e)?s.a.Deferred().resolve().promise():s.a.ajax({dataType:"json",url:n.i(o.join)([this.basePath,i[e]])}):s.a.Deferred().reject().promise(),this.loadingLanguage=e,
this.loadingPromise=t,t.done(a.a.bind(this.onLoadSuccess,this,t)),t.fail(a.a.bind(this.onLoadError,this,t)),t},t:function(e){if(!e)return"";var t,i,r=1,s=arguments.length;a.a.isObject(arguments[s-1])&&(i=arguments[s-1],s-=1);var o=this.getTranslation(e)||e;if(i&&i.escape&&(o=a.a.escape(o)),a.a.isObject(arguments[1])){var u=arguments[1];return o=o.replace(/\{([a-z0-9]+?)\}/gi,function(e,t){return u.hasOwnProperty(t)?u[t]:e})}for(;r<s;)t=c[r],t||(t=new RegExp(n.i(l.a)("{"+r+"}"),"g"),c[r]=t),
o=o.replace(t,arguments[r]),r++;return o},onLoadSuccess:function(e,t){var n=this.loadingLanguage;e===this.loadingPromise&&(this.loadingPromise=null,this.loadingLanguage=null,this.language=n,t&&(this.translations[n]=t),u.a.trigger("change:language",n))},onLoadError:function(e){e===this.loadingPromise&&(this.loadingPromise=null,this.loadingLanguage=null)}};t.a=d},function(e,t,n){"use strict";var i={exclusiveBoolAttr:function(e){var t=this;this.listenTo(this,"change:"+e,function(n,i){
i&&t.each(function(t){t.set(e,t===n&&i)})})}};t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(162),o={ui:{background:".post-play-background",previousPoster:".item-previous .media-poster",nextPoster:".item-next .media-poster",nextTitle:".next-title",nextSubtitle:".next-subtitle",nextIndex:".next-index",countdown:".countdown"},createCountdown:function(e){this.totalSeconds=e,this.secondsLeft=this.totalSeconds,this.progressModel=new r.a.Model({text:this.secondsLeft}),
this.updateCountdown()},serializeData:function(){var e=this.nextMetadataItem.get("title"),t=this.nextMetadataItem.get("grandparentTitle"),n={previous:{title:this.previousMetadataItem.get("title")||this.previousMetadataItem.get("grandparentTitle"),subtitle:this.episodeIndexFor(this.previousMetadataItem)||this.previousMetadataItem.get("year")},next:{title:t||e,summary:this.nextMetadataItem.get("summary")}};return t?(n.next.subtitle=e,
n.next.index=this.episodeIndexFor(this.nextMetadataItem)):n.next.subtitle=this.nextMetadataItem.get("year"),n},episodeIndexFor:function(e){var t="";return"episode"===e.get("type")&&(t=n.i(s.a)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "})),t},updateCountdown:function(){var e=(new Date).getTime(),t=e-(this.startTime||e);this.startTime=e,this.secondsLeft-=t/1e3,
this.secondsLeft>0?(this.progressModel.set("progress",this.secondsLeft/this.totalSeconds*100),this.progressModel.set("text",Math.ceil(this.secondsLeft)),this.countdownAnimator=window.requestAnimationFrame(a.a.bind(this.updateCountdown,this))):this.trigger("next")},onClose:function(){window.cancelAnimationFrame(this.countdownAnimator)}};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={bindToModel:function(){this.bindings&&a.a.each(a.a.keys(this.bindings),function(e){
var t,n=this.bindings[e];if(t=n.model?this[n.model]:this[this.bindingsModel]||this.model){var i=n.modelListeners||[n.modelAttribute];a.a.each(i,function(i){var r={obj:t,name:"change:"+i,callback:a.a.bind(this.renderBinding,this,e,n,t)};this._bindingListeners||(this._bindingListeners=[]),this._bindingListeners.push(r),this.listenTo(r.obj,r.name,r.callback)},this),this.renderBinding(e,n,t)}},this)},unbindFromModel:function(){this.bindings&&(a.a.each(this._bindingListeners,function(e){
this.stopListening(e.obj,e.name,e.callback)},this),this._bindingListeners=null)},renderBinding:function(e,t,n){var i=this.$(e),r=t.formatter,s=!!t.isHtml,o=t.autohide,l=t.hiddenClass||"hidden",u=n.get(t.modelAttribute);if(r&&(u=r.call(this,u,i)),o){var c=a.a.isFunction(o)?o.call(this,u):u;i.toggleClass(l,!c)}t.manual||(!s&&a.a.isString(u)&&(u=a.a.escape(u)),i.html(u))}};t.a=r},function(e,t,n){"use strict";var i=n(476),a=n(1167),r=i.a.extend({defaults:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(12),a=n(33),r=n(17),s=n(18),o=n(1231),l=n(96),u=n(1222),c=n(704),d=n(207),h=s.a.extend({name:"AppModel",isStateTreeRoot:!0,sessionAttrs:{clientID:r.a.string,authorized:r.a.boolean.isRequired,skipSignIn:r.a.boolean.isRequired,isWaitingForServers:r.a.boolean.isRequired,isWaitingForPrimaryServer:r.a.boolean.isRequired,history:r.a.array.isRequired,forwardHistory:r.a.array.isRequired},sessionRelations:{servers:{relationClass:o.a},cloudServer:{relationClass:l.a,deferred:!0},primaryServer:{
relationClass:l.a,deferred:!0},transientServer:{relationClass:c.a,deferred:!0},user:{relationClass:d.a,deferred:!0}},defaults:function(){var e=new u.a({machineIdentifier:"myPlex"},{parent:this});return{authorized:!1,skipSignIn:!1,isWaitingForServers:!1,isWaitingForPrimaryServer:!1,history:[],forwardHistory:[],cloudServer:e,user:new d.a({},{server:e,parent:this})}},constructor:function(){this._pendingEntities=[],this.listenTo(i.a,"change:entity",this.onEntityChange),
s.a.prototype.constructor.apply(this,arguments)},initialize:function(){this._pendingEntities.forEach(this._addEntity.bind(this))},_addEntity:function(e){var t=e.type,i=e.id,r=e.model,s=this.get("entities");n.i(a.a)(s,"Use `createEntitiesModelClass` to create an `entities` session relation in a platform's app model"),s.get(t).add({id:i,model:r},{merge:!0})},onEntityChange:function(e){this.has("entities")?this._addEntity(e):this._pendingEntities.push(e)}});t.a=h},function(e,t,n){"use strict"
;var i=n(21),a=n(1163),r=i.a.extend({name:"EntityCollection",model:a.a,toState:function(){var e=this.reduce(this.reduceState,{possibleEntityContainers:[]});return Object.defineProperty(e,"possibleEntityContainers",{enumerable:!1}),e},reduceState:function(e,t){return e.possibleEntityContainers.push(t.id),e[t.id]=t.getState(),e}});t.a=r},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(17),s=n(18),o=s.a.extend({name:"EntityModel",sessionAttrs:{id:r.a.string.isRequired},sessionRelations:{
model:{relationClass:s.a,deferred:!0}},toState:function(){var e=this.get("model"),t=a()({entityID:this.id},e.state);return Object.defineProperty(t,"possibleEntityContainers",{value:e.state.possibleEntityContainers,enumerable:!1}),t},shouldUpdateRelationState:function(){return!0}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(38),o=n(55),l=s.a.extend({mixins:[o.a],defaultFilterName:"__default",
whitelistedEvents:["add","remove","reset","sort","destroy","sync","request","error"],blacklistedMethods:["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],constructor:function(e,t){this.superset=e,this._collection=new r.a.Collection(e.toArray()),this._proxyCollection(this._collection),
this.resetFilters(),this.listenTo(e,{add:this.onSupersetAdd,remove:this.onSupersetRemove,reset:this.onSupersetReset}),this.initialize(t)},_proxyCollection:function(e){this.models=e.models,this._proxyCollectionMethods(e),this._proxyCollectionLength(e),this._proxyCollectionEvents(e)},_proxyCollectionMethods:function(e){var t={};a.a.each(a.a.functions(r.a.Collection.prototype),function(n){a.a.contains(this.blacklistedMethods,n)||(t[n]=function(){return e[n].apply(e,arguments)})},this),
a.a.extend(this,t)},_proxyCollectionLength:function(e){var t=function(){this.length=e.length};this.listenTo(e,"all",t),t.call(this)},_proxyCollectionEvents:function(e){var t=function(t){var n=a.a.toArray(arguments),i="change"===t||"change:"===t.slice(0,7);"reset"===t&&(this.models=e.models),a.a.contains(this.whitelistedEvents,t)?(a.a.contains(["add","remove","destroy"],t)?n[2]=this:a.a.contains(["reset","sort"],t)&&(n[1]=this),
this.trigger.apply(this,n)):i&&this.contains(n[1])&&this.trigger.apply(this,n)};this.listenTo(e,"all",t)},addFilter:function(e,t){return t||(t=e,e=this.defaultFilterName),a.a.has(this._filters,e)&&this._invalidateCacheForFilter(e),this._filters[e]=this._createFilter(t),this._execFilters(),this.trigger("filtered:add",e),this},removeFilter:function(e){return e||(e=this.defaultFilterName),delete this._filters[e],this._invalidateCacheForFilter(e),this._execFilters(),
this.trigger("filtered:remove",e),this},resetFilters:function(){return this._filters={},this._invalidateCache(),this._execFilters(),this.trigger("filtered:reset"),this},getFilters:function(){return a.a.keys(this._filters)},hasFilter:function(e){return a.a.contains(this.getFilters(),e)},refilter:function(e){return a.a.isObject(e)&&e.cid?this.onSupersetAdd(e):(this._invalidateCache(),this._execFilters()),this},destroy:function(){return this.stopListening(),this.superset=null,
this._collection.reset([]),this.length=0,this.trigger("filtered:destroy"),this},_createFilter:function(e,t){if(a.a.isFunction(e))return e;throw new Error("Unsupported filter type")},_execFilters:function(e){e||(e={});var t=[];this.superset&&(t=this.superset.filter(a.a.bind(this._execFiltersOnModel,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length},_execFiltersOnModel:function(e){
this._filterResultCache[e.cid]||(this._filterResultCache[e.cid]={});var t=this._filterResultCache[e.cid];for(var n in this._filters)if(a.a.has(this._filters,n)&&(a.a.has(t,n)||(t[n]=this._filters[n](e)),!t[n]))return!1;return!0},_invalidateCache:function(){this._filterResultCache={}},_invalidateCacheForFilter:function(e){for(var t in this._filterResultCache)a.a.has(this._filterResultCache,t)&&delete this._filterResultCache[t][e]},onSupersetAdd:function(e){if(this._filterResultCache[e.cid]={},
this._execFiltersOnModel(e)){if(!this._collection.get(e.cid)){for(var t=this.superset.indexOf(e),n=0,i=t-1;i>=0;i-=1)if(this.contains(this.superset.at(i))){n=this.indexOf(this.superset.at(i))+1;break}this._collection.add(e,{at:n})}}else this._collection.get(e.cid)&&this._collection.remove(e);this.length=this._collection.length},onSupersetRemove:function(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length},onSupersetReset:function(){this._execFilters({reset:!0})}})
;t.a=l},function(e,t,n){"use strict";var i=n(83),a=i.a.extend({pageSize:10,pages:function(){return Math.max(Math.ceil(this.length/this.pageSize),1)},page:function(e,t){t||(t={});var n,i=0;return n=t.reverse?this.length-e*this.pageSize:e*this.pageSize-this.pageSize,n<0&&(i=n,n=0),this.models.slice(n,n+this.pageSize+i)}});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(163),l=n(64),u=l.a.extend({fetch:function(){return this.storage.fetch().then(a.a.bind(function(){
var e=this._readFromStorage();return e?(this.set(e),this):s.a.Deferred().reject()},this))},save:function(e){return n.i(o.a)(this.storage.fetch()).then(a.a.bind(function(){return e&&this.set(e),this._saveToStorage(this.toJSON())},this))},destroy:function(){return n.i(o.a)(this.storage.fetch()).then(a.a.bind(function(){return this.storage.unset(a.a.result(this,"storageKey")),this.storage.save()},this))},_readFromStorage:function(){return this.storage.get(a.a.result(this,"storageKey"))},
_saveToStorage:function(e){return this.storage.save(a.a.result(this,"storageKey"),e)}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(1310),s=n(309),o=n(733),l=n(17);n.d(t,"a",function(){return c});var u={allowHttpFallback:{type:l.a.string,defaultValue:s.a.NEVER},companion:{type:l.a.boolean,defaultValue:!0},language:{type:l.a.string,defaultValue:n.i(r.a)()},autoLogin:{type:l.a.boolean,defaultValue:!1},extrasPrefixCount:{type:l.a.integer,defaultValue:0},debugLevel:{type:l.a.integer,
defaultValue:o.a.DISABLED}},c=(a.a.mapObject(u,function(e){return e.type}),a.a.mapObject(u,function(e){return e.defaultValue}))},function(e,t,n){"use strict";var i=n(12),a=n(21),r=n(685),s=a.a.extend({name:"ChannelCollection",context:["server","channel"],model:r.a,url:function(){return this.containerKey},initialize:function(){this.listenTo(i.a,"clear:channels",this.reset)},sortByTitle:function(e){return e.get("title").toLowerCase()},sortByLastAccess:function(e){return-e.get("lastAccessedAt")},
filterByType:function(e){var t=this.filter(function(t){return t.get("type")===e});return this.clone(t)}});t.a=s},function(e,t,n){"use strict";var i=n(113),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(52),c=n(13),d=n(12),h=n(1171),p=n(1170),f=/(auth_token=|accessToken=|X-Plex-Token=)(\"?\w+\"?)/g,g=function(e){return e=e.replace(f,"$1TOKEN"),e.replace(/(password=)([^&]+)/,"$1PASSWORD")},m=function(e){return e&&e.hasOwnProperty("X-Plex-Token")&&(e["X-Plex-Token"]="TOKEN"),
e&&e.hasOwnProperty("Authorization")&&(e.Authorization="BASIC AUTHORIZATION"),e},v=function(e){if(e)return e=e.replace(f,'$1"TOKEN"'),e=e.replace(/(email=)(\"?[^&]+\"?)/g,'$1"EMAIL"'),e=e.replace(/(address=|host=|uri=)(\"?[^&]+\"?)/g,'$1"IP ADRRESS"')},y=u.a.Collection.extend({model:p.a,initialize:function(e,t){s.a.bindAll(this,"onAjaxComplete","onAppModelRegistered"),this.parent=t.parent,h.a.parent=t.parent,n.i(c.d)("appModel").done(this.onAppModelRegistered)},reconfigure:function(){
n.i(c.a)("appModel").get("settings").get("debugLevel")?this.start():this.stop()},start:function(){this.enabled||(this.enabled=!0,this.reset(),this.listenTo(d.a,"log:message",this.onLogMessage),u.a.history.on("route",this.onRoute,this),l()(document).on("ajaxComplete",this.onAjaxComplete))},stop:function(){this.enabled&&(this.enabled=!1,this.reset(),this.stopListening(d.a),u.a.history.off("route",this.onRoute,this),l()(document).off("ajaxComplete",this.onAjaxComplete))},destroy:function(){
this.stop(),this.stopListening()},add:function(){this.length>200&&this.shift(),u.a.Collection.prototype.add.apply(this,arguments)},toJSON:function(){var e=u.a.Collection.prototype.toJSON.apply(this,arguments);return e.unshift(s.a.extend({type:"info"},h.a.toJSON())),e},toJSONString:function(){return a()(this.toJSON(),null,2)},onAppModelRegistered:function(e){var t=e.get("settings");this.listenTo(t,"change:debugLevel",this.reconfigure),this.reconfigure()},onLogMessage:function(e){this.add(e)},
onRoute:function(e,t,n){var i={type:"navigation",route:t,args:n,fragment:window.location.hash};this.add(i)},onAjaxComplete:function(e,t,i){var a=n.i(c.a)("appModel").get("settings"),r={type:"ajax",url:g(i.url),status:t.status};s.a.isEmpty(i.headers)||(r.headers=m(i.headers)),s.a.isEmpty(i.data)||(r.params=g(i.data)),200===t.status?2===a.get("debugLevel")?r.response=v(t.responseText):r.responseLength=t.responseText?t.responseText.length:0:(r.statusText=t.statusText,r.response=v(t.responseText)),
this.add(r)}});t.a=y},function(e,t,n){"use strict";var i=n(52),a=i.a.Model.extend({initialize:function(e,t){this.set("time",new Date)}});t.a=a},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(31),o=r.a.Model.extend({initialize:function(e,t){this.set("host",window.location.host),this.set("userAgent",window.navigator.userAgent),this.set("browser",s.a)},toJSON:function(){var e=this.parent.get("primaryServer"),t=this.parent.get("user"),n=t.get("features")
;return this.set("version","3.9.1"),e&&(e.get("activeConnection")&&this.set("primaryServerUrl",e.url()),this.set("primaryServerAuthToken",!!e.get("accessToken")),this.set("primaryServerVersion",e.get("versionFull"))),this.set("username",t.get("username")),this.set("cloudUrl",t.server.get("connections")),this.set("cloudAccessToken",!!t.server.get("accessToken")),n&&this.set("userFeatures",a.a.keys(n).join(", ")),r.a.Model.prototype.toJSON.apply(this,arguments)}});t.a=new o},function(e,t,n){
"use strict";var i=n(5),a=n.n(i),r=n(17),s=n(18),o=n(301),l=s.a.extend({name:"LocalPlayQueueModel2",context:["server"],sessionAttrs:{type:r.a.string,firstIndex:r.a.integer,lastIndex:r.a.integer,playQueueSelectedItemOffset:r.a.integer,playQueueTotalCount:r.a.integer},sessionRelations:{items:{relationClass:o.a,deferred:!0}},initialize:function(e,t){this.originalPlayQueue=t.originalPlayQueue;var n=this.originalPlayQueue.get("collection"),i=n.indexOf(this.originalPlayQueue.get("selectedItem"))
;this.set({items:n,firstIndex:0,lastIndex:n.length,playQueueSelectedItemOffset:i,playQueueTotalCount:n.length})},fetch:function(){return a.a.Deferred().resolve(this).promise()}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(688),s=r.a.extend({initialize:function(e){this.playQueue=e.playQueue,this.addFilter(a.a.bind(this.filterAfterUpNext,this)),this.listenForUpNextChanges()},filterAfterUpNext:function(e){return this.superset.indexOf(e)>this.playQueue.getUpNextRange().end}});t.a=s
},function(e,t,n){"use strict";var i=n(78),a=n(17),r=n(18),s=n(65),o=n(301),l=r.a.extend({name:"PlayQueueModel2",context:["server"],urlRoot:"/playQueues",hasResponseOnSave:!0,idAttribute:"playQueueID",sessionAttrs:{type:a.a.string},syncedAttrs:{playQueueID:a.a.string,uri:a.a.string,shuffle:a.a.boolean,includeRelated:a.a.boolean,playQueueSelectedItemOffset:a.a.integer,playQueueSelectedItemID:a.a.string,playQueueSelectedMetadataItemID:a.a.string,playQueueShuffled:a.a.boolean,
playQueueSourceURI:a.a.string,playQueueTotalCount:a.a.integer,playQueueVersion:a.a.integer},syncedRelations:{playQueueItems:{relationClass:o.a,rootPropertyName:"Metadata"}},derivedAttrs:{firstIndex:function(){var e=this.get("playQueueItems"),t=this.get("playQueueSelectedItemID"),n=e.get(t),i=e.indexOf(n);return this.get("playQueueSelectedItemOffset")-i},lastIndex:function(){return this.get("firstIndex")+this.get("playQueueItems").length-1}},augmentResponseText:function(e,t){
return t===s.a.xml?n.i(i.a)(e):e}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(19),l=n(210),u=n(213),c=n(64),d=n(305),h=n(44),p=c.a.extend({idAttribute:"ratingKey",whitelistedAttrs:["guid","addedAt","composite","duration","key","leafCount","playlistType","ratingKey","smart","summary","title","type","allowSync"],defaults:function(){return{children:new d.a([],{server:this.server,parent:this,url:function(){var e,t="/playlists/"+this.parent.id+"/items"
;return"audio"===this.parent.get("playlistType")&&(e={includeRelated:1}),o.join(t,e)}})}},urlRoot:"/playlists",saveUrl:function(){return"/library/metadata/"+this.id},cacheKey:function(e){if(e.key)return this.server&&this.server.getScopedKey(e.key)},initialize:function(){this.listenToOnce(this.get("children"),"add",function(e){this.set("art",e.get("art"))})},sync:function(e,t,n){var i=u.a.addVersionHeader(2,n);return c.a.prototype.sync.call(this,e,t,i)},parse:function(e){var t=this.convert(e)
;return t.Playlist&&(t=t.Playlist),h.a.parseInteger(t,["duration","leafCount","addedAt"]),h.a.parseBoolean(t,["smart","allowSync"]),t.isPlaylist=!0,t},findItem:function(e){return this.get("children").findWhere({playlistItemID:e})},moveItem:function(e,t){var n=t?{after:t}:{},i=o.join([a.a.result(this,"url"),"/items/",e,"/move"],n),r=a.a.extend(this.server.getXHROptions(i),{type:"PUT"}),l=s.a.ajax(r),u=this.get("children"),c=this.findItem(e);u.remove(c);var d=this.findItem(t),h=d?u.indexOf(d)+1:0
;return u.add(c,{at:h}),l},removeItem:function(e){e=e.toString();var t=o.join([a.a.result(this,"url"),"/items/",e]),n=a.a.extend(this.server.getXHROptions(t),{type:"DELETE"}),i=s.a.ajax(n);i.then(a.a.bind(function(e){this.set(this.parse(e))},this));var r=this.get("children"),l=this.findItem(e);return r.remove(l),i},addContent:function(e,t){var n=this.isNew()?"POST":"PUT",i=[a.a.result(this,"url")],r={};this.isNew()?(r.type=this.get("playlistType"),r.title=this.get("title"),
r.smart=this.get("smart")?1:0):i.push("/items"),e.get("playQueueID")?r.playQueueID=e.get("playQueueID"):r.uri=l.a.uri(e,t);var u=o.join(i,r),c=a.a.extend(e.server.getXHROptions(u),{type:n}),d=s.a.ajax(c);return d.then(a.a.bind(function(e){this.set(this.parse(e))},this)),d.promise()},isLibraryItem:function(){return!0},isPlexMusicItem:function(){return!1}});t.a=p},function(e,t,n){"use strict";var i=n(64),a=n(481),r=n(696),s=i.a.extend({name:"PlaylistsSectionModel",defaults:function(){return{
pseudo:!0,currentType:0,sorts:new a.a([],{section:this,server:this.server}),items:new r.a({},{section:this,server:this.server})}},url:function(){return"/playlists"}});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1178),r=i.a.extend({name:"FieldCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"FieldModel",context:["server"],idAttribute:"key",rootPropertyName:"Field",syncedAttrs:{key:i.a.string,title:i.a.string,
type:i.a.string,subType:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"FilterOptionModel",context:["server","section","type","standalone"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.encodedString,type:i.a.string,title:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(21),s=n(1181),o=r.a.extend({name:"LinearFilterCollection",context:["server","section"],model:s.a,url:function(){
return a.a.result(this.section,"url")},filterBySecondary:function(){var e=this.filter(function(e){return e.get("secondary")});return this.clone(e)}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(365),s=a.a.extend({name:"LinearFilterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{secondary:i.a.boolean,key:i.a.string,title:i.a.string},syncedRelations:{options:{relationClass:r.a}},defaults:{secondary:!1}});t.a=s},function(e,t,n){
"use strict";var i=n(21),a=n(1183),r=i.a.extend({name:"LocationCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"LocationModel",context:["server","section"],rootPropertyName:"Location",syncedAttrs:{id:i.a.integer,path:{type:i.a.string,save:!0}}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(691),r=i.a.extend({name:"MediaTypeCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(21),a=n(1186),r=i.a.extend({name:"MetadataDirectoryCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"MetadataDirectoryModel",context:["server"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.a.string,title:i.a.string,prompt:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1188),r=i.a.extend({name:"MetadataTypeCollection",context:["server"],model:a.a});t.a=r
},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1193),s=a.a.extend({name:"MetadataFieldTypeModel",context:["server"],idAttribute:"type",rootPropertyName:"FieldType",syncedAttrs:{type:i.a.string.isRequired},syncedRelations:{operators:{relationClass:r.a,rootPropertyName:"Operator"}}});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1190),r=i.a.extend({name:"MetadataTypeCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(17),a=n(18),r=n(689),s=n(481),o=n(1177),l=a.a.extend({name:"MetadataTypeModel",context:["server"],idAttribute:"key",rootPropertyName:"Type",syncedAttrs:{type:i.a.string,key:i.a.string,title:i.a.string},syncedRelations:{filters:{relationClass:r.a,rootPropertyName:"Filter"},sorts:{relationClass:s.a,rootPropertyName:"Sort"},fields:{relationClass:o.a,rootPropertyName:"Field"}}});t.a=l},function(e,t,n){"use strict";var i=n(21),a=n(1192),r=i.a.extend({name:"MomentCollection",
context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"MomentModel",context:["server"],idAttribute:"id",rootPropertyName:"Directory",syncedAttrs:{id:i.a.string,title:i.a.string,size:i.a.integer,avgAR:i.a.float,startsAt:i.a.integer,endsAt:i.a.integer}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1194),r=i.a.extend({name:"OperatorCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(17),a=n(18),r=a.a.extend({name:"OperatorModel",context:["server"],idAttribute:"key",rootPropertyName:"Operator",syncedAttrs:{key:i.a.string,title:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(21),s=n(693),o=r.a.extend({name:"SectionSubsetCollection",context:["server","section"],model:s.a,url:function(){return a.a.result(this.section,"url")},filterPrimaries:function(){var e=this.filter(function(e){return e.get("primary")});return this.clone(e)}});t.a=o
},function(e,t,n){"use strict";var i=n(21),a=n(1197),r=i.a.extend({name:"ChapterCollection",context:["server","section"],model:a.a,modelId:function(e){return e.id+"_"+e.index}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"ChapterModel",context:["server","section"],syncedAttrs:{id:i.a.integer,tag:i.a.string,index:i.a.integer,startTimeOffset:i.a.integer,endTimeOffset:i.a.integer,thumb:i.a.string}});t.a=r},function(e,t,n){"use strict"
;var i=n(21),a=n(1199),r=i.a.extend({name:"ConcertCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"ConcertModel",context:["server","section"],syncedAttrs:{id:i.a.integer,at:i.a.integer,tag:i.a.string,venue:i.a.string,city:i.a.string,country:i.a.string,url:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"OverlayModel",context:["server","section"],syncedAttrs:{key:i.a.string,
marginTop:i.a.integer,marginRight:i.a.integer,marginBottom:i.a.integer,marginLeft:i.a.integer,width:i.a.integer,height:i.a.integer,alignHorizontal:i.a.string,alignVertical:i.a.string,relative:i.a.string,imageScaling:i.a.string,marginScaling:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(483),r=i.a.extend({name:"PlaylistCollection",context:["server","containerKey"],model:a.a,url:function(){return this.containerKey}});t.a=r},function(e,t,n){"use strict"
;var i=n(21),a=n(1204),r=i.a.extend({name:"PlaylistItemCollection",context:["server","playlist"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(78),a=n(244),r=n(17),s=n(65),o=n(18),l=n(1202),u=o.a.extend({mixins:[a.a],name:"PlaylistItemListModel",context:["server","playlist"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey"))},sessionAttrs:{containerKey:r.a.string,currentPageStart:r.a.integer,currentPageSize:r.a.integer,
populatedRange:r.a.object},syncedAttrs:{totalSize:r.a.integer},syncedRelations:{metadataItems:{relationClass:l.a,rootPropertyName:"Metadata",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===s.a.xml?n.i(i.a)(e):e}});t.a=u},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(59),s=a.a.extend({name:"PlaylistItemModel",
context:["server","playlist"],idAttribute:"playlistItemID",syncedAttrs:{playlistItemID:i.a.integer,key:i.a.string,type:i.a.string},syncedRelations:{metadataItem:{relationClass:r.a,deferred:!0}},augmentResponse:function(e){return{playlistItemID:e.playlistItemID,key:e.key,type:e.type,metadataItem:e}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(19),s=n(34),o=n(81),l={unviewedLeafCount:">="},u=o.default.extend({name:"SectionMetadataListModel",
context:["server","section","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],url:function e(){var t=[],n=void 0,i=void 0,s=this.section.get("currentFolderKey");if(s)t.push(s);else if(t.push(a.a.result(this.section,"url")),n=this.section.get("currentSubset").id,this.section.get("allowAdvancedFilters"))"recentlyAdded"!==n&&"newest"!==n||(n="all"),t.push(n),i=this.getParams();else{var o=this.section.get("currentFilters");o.length?t=[o[0].values[0]]:t.push(n)}var e=r.join(t,i)
;return e=this.replaceSpecialFilterOperators(e),this.set("containerKey",e),this.server.get("isFullServer")?this.getPaginatedUrl(e):e},getParams:function(){var e=this.getFilterParams(),t=this.getMetadataTypeID(),i=this.getSort();return t&&t!==n.i(s.b)("photo").id&&(e.type=t),i&&(e.sort=i),this.section.get("refreshing")&&this.server.supports("timelineState")&&(e.timelineState=1),e},getFilterParams:function(){var e=this.section.get("currentFilters"),t={};return a.a.each(e,function(e){
e.values.length&&(t[e.key]=e.values.map(decodeURIComponent).join(","))}),t},getMetadataTypeID:function(){var e=this.section.get("currentSubset").id,t=this.section.get("currentType").id||n.i(s.b)(this.section.get("type")).id;return/^(onDeck|recentlyAdded|recentlyViewed|newest)$/.test(e)?t===n.i(s.b)("show").id||t===n.i(s.b)("season").id?t=n.i(s.b)("episode").id:t!==n.i(s.b)("artist").id&&t!==n.i(s.b)("track").id||(t=n.i(s.b)("album").id):/^recentlyViewedShows$/.test(e)&&(t=n.i(s.b)("show").id),t
},getSort:function(){var e=this.section.get("currentSort"),t=this.section.get("currentSubset").id;return"recentlyAdded"===t?"addedAt:desc":"newest"===t?"originallyAvailableAt:desc":e?e.id+":"+e.get("direction"):void 0},replaceSpecialFilterOperators:function(e){return a.a.each(l,function(t,n){e=e.replace(n+"=",n+t)}),e}});t.a=u},function(e,t,n){"use strict";var i=n(21),a=n(697),r=i.a.extend({name:"TagCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict"
;function i(e){var t=0;if(!e)return t;for(var n=0,i=e.length;n<i;n++){var a=e[n],r=a.Part;if(r)for(var s=0,o=r.length;s<o;s++){var l=r[s],u=l.Stream;u&&(t+=u.length)}}return t}function a(e){var t=0;if(!e)return t;for(var n=0,i=e.length;n<i;n++){var a=e[n],r=a.Part;if(r)for(var s=0,o=r.length;s<o;s++){var l=r[s];null!=l.exists&&null!=l.accessible&&t++}}return t}function r(e,t,r){if(u.hasOwnProperty(e))return r;if(c.hasOwnProperty(e)&&r&&r.length){if(!t||r.length>t.length)return r
;if(r.length===t.length){var s=t&&t[0],d=r&&r[0];if(!s&&d)return r;if(!d&&s)return t;var h=o()(s).length;if(o()(d).length>h)return r}}if("Media"===e){if(r&&!t)return r;var p=i(r),f=i(t);if(p>f)return r;if(p===f){if(a(r)>=a(t))return r}}return n.i(l.a)(e,t,r)}var s=n(70),o=n.n(s),l=n(701);t.a=r;var u={leafCount:!0,viewedLeafCount:!0,viewCount:!0,viewOffset:!0,subscriptionID:!0,grandparentSubscriptionID:!0,subscriptionType:!0,grandparentSubscriptionType:!0},c={Director:!0,Producer:!0,Writer:!0,
Genre:!0,Mood:!0,Country:!0,Label:!0,Role:!0,Location:!0}},function(e,t,n){"use strict";var i=n(21),a=n(1209),r=i.a.extend({name:"LyricsLineCollection",context:["server","section"],model:a.a,eachSpan:function(e){this.each(function(t){t.get("spans").each(e)})}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1210),s=a.a.extend({name:"LyricsLineModel",context:["server","section"],syncedAttrs:{startOffset:i.a.integer,endOffset:i.a.integer},syncedRelations:{spans:{relationClass:r.a,
rootPropertyName:"Span"}},defaults:{startOffset:-1,endOffset:-1}});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1211),r=i.a.extend({name:"LyricsSpanCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"LyricsSpanModel",context:["server","section"],sessionAttrs:{active:i.a.boolean},syncedAttrs:{startOffset:i.a.integer,endOffset:i.a.integer,text:i.a.string},defaults:{startOffset:-1,endOffset:-1},
isPositionWithin:function(e){var t=this.get("startOffset"),n=this.get("endOffset");if(t===-1)return!1;var i=e>=t,a=e<=n||n===-1;return i&&a}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1157),r=n(1213),s=i.a.extend({mixins:[a.a],name:"LyricsStreamCollection",context:["server","section"],model:r.a,initialize:function(){this.exclusiveBoolAttr("selected")}});t.a=s},function(e,t,n){"use strict";var i=n(19),a=n(17),r=n(18),s=n(1208),o=r.a.extend({name:"LyricsStreamModel",
context:["server","section"],rootPropertyName:"Lyrics",url:function(){return i.join(this.get("key"),{format:"xml"})},sessionAttrs:{follow:a.a.boolean},syncedAttrs:{id:a.a.integer,key:a.a.string,streamType:a.a.integer,index:a.a.integer,title:a.a.string,selected:a.a.boolean,codec:a.a.string,provider:a.a.string,format:a.a.string,minLines:a.a.integer,timed:a.a.boolean},syncedRelations:{lines:{relationClass:s.a,rootPropertyName:"Line"}},defaults:{follow:!0,selected:!1}});t.a=o},function(e,t,n){
"use strict";var i=n(2),a=n.n(i),r=n(17),s=n(485),o=n(40),l=s.a.extend({name:"PhotoPlayerModel",sessionAttrs:a.a.extend({},s.a.prototype.sessionAttrs,{slideshowState:r.a.oneOf(o.a.slideshowStates.PLAYING,o.a.slideshowStates.PAUSED)}),defaults:function(){return a.a.extend({},s.a.prototype.defaults.apply(this),{slideshowState:o.a.slideshowStates.PAUSED,slideshowPaused:!0,slideshowPlaying:!1})},derivedAttrs:a.a.extend({},s.a.prototype.derivedAttrs,{slideshowPaused:function(){
return this.get("slideshowState")===o.a.slideshowStates.PAUSED},slideshowPlaying:function(){return this.get("slideshowState")===o.a.slideshowStates.PLAYING}})});t.a=l},function(e,t,n){"use strict";var i=n(13),a=n(21),r=n(700),s=a.a.extend({name:"PlexPlayerCollection",context:["server"],model:r.a,url:"/clients",augmentResponse:function(e){var t=n.i(i.a)("appModel"),a=t.get("clientID"),r=parseInt(e.size,10);return 1===r&&e.Server.machineIdentifier===a?(delete e.Server,
e.size="0"):r>1&&(e.Server=e.Server.filter(function(e){return e.machineIdentifier!==a}),e.size=e.Server.length.toString()),e}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(64),o=s.a.extend({defaults:function(){return{canSkipNext:!0,stationSkipsPerHour:1/0,skips:[]}},initialize:function(){var e=[this.get("stationSkipsPerHour"),0];e=a.a.reject(e,function(e){return e===1/0}),this.maxLength=Math.max.apply(Math,e)},updateTimeout:function(e){
this.timeout&&(this.timeout=clearTimeout(this.timeout));var t=this.get("stationSkipsPerHour");if(t!==1/0){var i=e-36e5,s=a.a.filter(this.get("skips"),function(e){return e>=i}),o=s.length>=t?36e5-(e-a.a.last(s)):null,l=!o,u=l?"":n.i(r.default)("You can skip {1} songs an hour per mix.",this.get("stationSkipsPerHour"));this.set({canSkipNext:l,canSkipNextMessage:u}),o>0&&(this.timeout=setTimeout(a.a.bind(function(){this.updateTimeout((new Date).getTime())},this),o))}},registerSkip:function(){
var e=(new Date).getTime(),t=this.get("skips");t.unshift(e),t.length>this.maxLength&&(t.length=this.maxLength),this.updateTimeout(e)},stop:function(){this.timeout&&clearTimeout(this.timeout)}},{playQueueAttributes:["stationSkipsPerHour"]});t.a=o},function(e,t,n){"use strict";var i=n(4),a=n(73),r=a.b.extend({name:"LegacyChannelProviderModel",defaults:function(){return{identifier:a.a.CHANNEL_PROVIDER_IDENTIFIER,title:n.i(i.default)("Channel"),types:["video","audio","photo"],protocols:["stream"]}}
});t.a=r},function(e,t,n){"use strict";var i=n(4),a=n(73),r=n(702),s=n(139),o=a.b.extend({name:"LegacyLibraryProviderModel",defaults:function(){var e=this.server,t=e.get("isFullServer"),o=e.get("isFullOwnedServer"),l=[{type:s.a.CONTENT,key:"/library/sections"},{type:s.a.MATCH,key:"/library/matches"},{type:s.a.METADATA,key:"/library/metadata"}];return t&&l.push({type:s.a.SEARCH,key:"/hubs/search"},{type:s.a.PLAY_QUEUE,key:"/playQueues"},{type:s.a.RATE,key:"/:/rate"},{type:s.a.TIMELINE,
key:"/:/timeline",scrobbleKey:"/:/scrobble",unscrobbleKey:"/:/unscrobble"}),o&&l.push({type:s.a.MANAGE}),{identifier:a.a.LIBRARY_PROVIDER_IDENTIFIER,title:n.i(i.default)("Library"),types:["video","audio","photo"],protocols:o?["stream","download"]:["stream"],features:new r.a(l,{parse:!0,server:e})}}});t.a=o},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(21),s=n(73),o=n(1218),l=n(1217),u=r.a.extend({name:"ProviderCollection",context:["server"],model:s.b,url:"/media/providers",
fetch:function(){var e=this.server;return e.get("mediaProviders")?r.a.prototype.fetch.apply(this,arguments):(e.get("isCloud")||this.get(s.a.LIBRARY_PROVIDER_IDENTIFIER)||this.add(new o.a({},{server:e})),this.get(s.a.CHANNEL_PROVIDER_IDENTIFIER)||this.add(new l.a({},{server:e})),a.a.Deferred().resolve(this,""))}});t.a=u},function(e,t,n){"use strict";var i=n(21),a=n(1221),r=i.a.extend({name:"ProviderDirectoryCollection",context:["server","provider"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(17),a=n(18),r=a.a.extend({name:"ProviderDirectoryModel",context:["server","provider"],syncedAttrs:{key:i.a.string,hubKey:i.a.string,title:i.a.string,type:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(19),a=n(28),r=n(13),s=n(23),o=n(17),l=n(477),u=n(56),c=n(96),d=n(487),h=n(179),p=n(687),f=n(1225),g=n(1382),m=c.a.connectionTestResults,v=c.a.promiseStates,y=c.a.extend({name:"CloudServerModel",connectionTestUrl:"https://info.plex.tv/pms/:/ip",sessionAttrs:{
connectionTestResult:o.a.oneOf(m.PENDING,m.CONNECTED,m.UNAVAILABLE,m.UNAUTHORIZED).isRequired,promiseState:o.a.oneOf(v.PENDING,v.RESOLVED,v.REJECTED).isRequired,playQueueManager:o.a.instanceOf(p.a).isRequired,isShared:o.a.boolean.isRequired,isBundled:o.a.boolean.isRequired,isCloud:o.a.boolean.isRequired,isMerged:o.a.boolean.isRequired,isDownForMaintenance:o.a.boolean.isRequired,isResourcesPending:o.a.boolean.isRequired,hasFailedResources:o.a.boolean.isRequired,accessToken:o.a.string,
baseUrl:o.a.string.isRequired,plexPassUrl:o.a.string.isRequired,accountUrl:o.a.string.isRequired,cloudSyncUrl:o.a.string.isRequired,appsUrl:o.a.string.isRequired,helpUrl:o.a.string.isRequired,hasEventConnection:o.a.boolean},sessionRelations:{activeConnection:{relationClass:h.a,deferred:!0},connections:{relationClass:d.a,options:function(){return{server:this}}},resources:{relationClass:f.a,options:function(){return{server:this}}}},defaults:function(){
var e=u.a.get("myPlexScheme")+"://"+u.a.get("myPlexUrl");return{connectionTestResult:m.PENDING,promiseState:v.PENDING,playQueueManager:new p.a({server:this}),isShared:!1,isBundled:!1,isCloud:!0,isMerged:!1,isDownForMaintenance:!1,isResourcesPending:!1,hasFailedResources:!1,friendlyName:"plex.tv",baseUrl:e,plexPassUrl:i.join([e,"/subscription/about"]),accountUrl:i.join([e,"/users/edit"]),cloudSyncUrl:i.join([e,"/cloudsync/providers"]),appsUrl:i.join([e,"/downloads"]),
helpUrl:"http://support.plex.tv/hc/en-us",hasEventConnection:!1}},swizzleNodeUrl:function(e){var t=this.parent.get("primaryServer");return t&&t.get("isConnected")&&t.get("isFullServer")&&t.get("allowChannelAccess")?t.swizzleUrl(e):this.swizzleUrl(e,{connection:new h.a({scheme:"https",address:"node.plexapp.com",port:"32443"})})},testAllConnections:function(){var e=this,t=this.get("connections");n.i(a.a)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName"))
;var i=t.map(function(t){return e.testConnection(t)});return n.i(g.a)(i)},testConnection:function(e){var t={server:this,connection:e,url:this.connectionTestUrl};return s.a.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this))},abortConnectionTest:function(e){var t={server:this,connection:e,url:this.connectionTestUrl};s.a.execute("abortServerConnectionTest",t)},deauthenticate:function(){this.get("resources").clear(),
this._reject({connectionTestResult:this.get("connectionTestResult"),accessToken:null})},onConnectionTestSuccess:function(e){var t=this.get("connections").getBestConnection();a.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this.startCapturingChangeEvents(),this.set({isDownForMaintenance:!1,connectionTestResult:m.CONNECTED,activeConnection:t}),this.releaseCapturedChangeEvents()},onConnectionTestError:function(e,t){
e.get("isAborted")||this.get("connections").hasOnlyFailedConnections()&&this._reject({isDownForMaintenance:503===t.status})}});n.i(l.a)(y,function(){return{relationClass:n.i(r.a)("CloudServerFlexModel"),options:{server:this}}}),t.a=y},function(e,t,n){"use strict";var i=n(21),a=n(1224),r=i.a.extend({name:"ConnectionSourceCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"ConnectionSourceModel",context:["server"],sessionAttrs:{
id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(19),a=n(56),r=n(21),s=n(1226),o=r.a.extend({model:s.a,context:["server"],url:function(){var e={};return a.a.get("allowHttpsMediaServerConnections")&&(e.includeHttps=1),a.a.get("allowMediaServerRelayConnections")&&(e.includeRelay=1),i.join("/api/resources",e)}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(487),s=a.a.extend({name:"ResourceModel",context:["server"],idAttribute:"clientIdentifier",rootPropertyName:"Device",
urlRoot:"/api/resources",syncedAttrs:{clientIdentifier:i.a.string,name:i.a.string,sourceTitle:i.a.string,accessToken:i.a.string,product:i.a.string,productVersion:i.a.string,platform:i.a.string,platformVersion:i.a.string,device:i.a.string,provides:i.a.list,owned:i.a.boolean,home:i.a.boolean,synced:i.a.boolean,presence:i.a.boolean,publicAddressMatches:i.a.boolean,httpsRequired:i.a.boolean,createdAt:i.a.integer,lastSeenAt:i.a.integer,ownerId:i.a.integer},syncedRelations:{connections:{
relationClass:r.a,rootPropertyName:"Connection"}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["key","name","defaultAudioLanguage","autoSelectAudio","defaultSubtitleLanguage","subtitleMode"],url:function(){return this.get("key")},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return t.Account&&(t=t.Account),r.a.parseBoolean(t,"autoSelectAudio"),t},parse:function(e){var t=this.convert(e)
;return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(1165),s=n(1229),o=r.a.extend({model:s.a,url:"/servers",pageSize:20,limit:1e3,initialize:function(){this.startTime=new Date,this.listenTo(this.server,"socket:setting",this.onSettingChange),this.listenTo(this.server,"socket:timeline",this.onTimeline),this.listenTo(this.server,"socket:status",this.onStatus),this.listenTo(this.server,"socket:playing",this.onPlaying),
this.listenTo(this.server,"socket:websocket",this.onWebSocket)},add:function(e){this.length+1>this.limit&&this.remove(this.at(0)),r.a.prototype.add.apply(this,arguments)},onSettingChange:function(e){e.label&&this.add(a.a.extend({_type:"setting"},e),{parse:!0})},onTimeline:function(e){1===e.state||e.sectionID<0||this.add(a.a.extend({_type:"timeline"},e),{parse:!0})},onStatus:function(e){"ProgressNotification"!==e._elementType&&this.add(a.a.extend({_type:"status"},e),{parse:!0})},
onPlaying:function(e){this.add(a.a.extend({_type:"playing"},e),{parse:!0})},onWebSocket:function(e){this.add(a.a.extend({_type:"websocket"},e),{parse:!0})}});t.a=o},function(e,t,n){"use strict";var i=n(64),a=0,r=i.a.extend({idAttribute:"id",parse:function(e){var t=e;return t.time=new Date,t.id="evt"+a++,"preference"===t._type&&(t.value=String(t.value)),t}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({url:"/myplex/account",
whitelistedAttrs:["username","mappingState","mappingError","mappingErrorMessage","signInState","publicAddress","publicPort","privateAddress","privatePort","subscriptionActive","subscriptionState"],defaults:{signedIn:!1,remoteAccessState:"",mappingState:"",mappingError:"",mappingErrorMessage:"",signInState:"",publicAddress:"",publicPort:"",privateAddress:"",privatePort:""},isNew:function(){return!this.get("signedIn")},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e)
;return a.a.defaults(t,a.a.result(this,"defaults")),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs),"ok"===t.signInState?t.signedIn=!0:(t.signedIn=!1,t.username=""),t.signedIn&&"mapped"===t.mappingState&&!t.mappingError?t.remoteAccessState="ok":t.signedIn&&!t.mappingError||(t.remoteAccessState="unreachable"),t},isWaiting:function(){var e=this.get("remoteAccessState");return"connecting"===e||"disconnecting"===e}});t.a=o},function(e,t,n){"use strict"
;function i(e){return e.length?r.a.map(e,function(e){return e.get("debugName")}).join(", "):"(none)"}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(28),u=n(484),c=n(21),d=n(96),h=c.a.extend({mixins:[u.a],name:"ServerCollection",model:d.a,initialize:function(){this._resetPopulate()},comparator:function(e){var t=e.get("isFullOwnedServer"),n=e.get("isShared"),i=e.get("friendlyName")||"",a=t?"0":"1";return a+=n?"1":"0",a+=i.toLowerCase()},shouldWaitForInitialServers:function(){
var e=this.filter(function(e){return(!e.id||!!e.get("resources"))&&e.isPopulating()});return!!e.length&&(n.i(l.a)("[Servers] Waiting for initial servers =",i(e)),!0)},shouldWaitForResources:function(){var e=this.reduce(function(e,t){var n=t.get("isResolved"),i=t.get("resources"),a=i&&i.isPopulating();return n&&a&&e.push(t),e},[]);return!!e.length&&(n.i(l.a)("[Servers] Waiting for additional resources from",i(e)),!0)},shouldWaitForPendingServers:function(){if(this.findWhere({isConnected:!0
}))return!1;var e=this.filter(function(e){return e.isPopulating()});return!!e.length&&(n.i(l.a)("[Servers] Waiting for pending servers =",i(e)),!0)},waitForServers:function(){this._resetPopulate()},foundAllServers:function(){var e=this.where({isConnected:!0}),t=i(e);n.i(l.a)("[Servers] Found all servers =",t),e.length?this._resolvePopulate():this._rejectPopulate()},populateAnyServer:function(){function e(e){var t=d.indexOf(e);t>-1&&(d.splice(t,1),this.hasOnlyRejectedServers(d)&&c.reject())}
function t(e,t){r.a.contains(d,e)&&t&&c.resolve(e)}function a(e,t){r.a.contains(d,e)&&t&&this.hasOnlyRejectedServers(d)&&c.reject()}var s=this,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models,c=o.a.Deferred(),d=u.slice(0),h=r.a.find(d,function(e){return e.get("isCloud")?e.get("isResolved"):e.get("isConnected")});return h?(n.i(l.a)("[Servers] Populate any server chose %s where servers = %s",h.get("debugName"),i(d)),
c.resolve(h).promise()):this.hasOnlyRejectedServers(d)?c.reject().promise():(this.on({remove:e,"change:isResolved":t,"change:isRejected":a},this),c.always(function(){s.off("change:isResolved",t,s),s.off("change:isRejected",a,s)}),c.promise())},populateServer:function(e){return this.findServer(e,!0).then(function(e){return e.get("isConnected")&&!e.get("isCloud")?o.a.Deferred().resolve(e):e.populate()})},findServer:function(e,t){function n(){var e=this,i=this.filterServers(a,t);i?(d=i,
i.done(function(e){d===i&&l.resolve(e)}),i.fail(function(){d===i&&(s||!e.isPopulating()?l.reject():e.populate().always(n.bind(e)))})):this.isPopulating()||l.reject()}var i=this,a=r.a.isString(e)?{machineIdentifier:e}:e,s=r.a.has(a,"machineIdentifier"),l=o.a.Deferred(),u=r.a.map(r.a.keys(a),function(e){return"change:"+e}),c="add "+u.join(" "),d=void 0;return n.call(this),this.on(c,n,this),this.populate().always(function(){d||l.reject()}),l.always(function(){i.off(c,n,i)}),l.promise()},
filterServers:function(e,t){var n=this.where(e);if(n.length)return t?this.populateAnyServer(n):o.a.Deferred().resolve(n[0]).promise()},hasOnlyRejectedServers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models;return r.a.every(e,function(e){return e.get("isRejected")})},hasLoopbackServer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models;return!!r.a.find(e,function(e){var t=e.get("activeConnection");return!!t&&t.get("isLoopback")})
}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({idAttribute:"id",url:"/:/prefs",defaults:{type:"string",summary:"",label:"",group:""},whitelistedAttrs:["id","label","default","summary","value","type","group","advanced","option","hidden","enumValues","values"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return"bool"===t.type?r.a.parseBoolean(t,"value"):"int"!==t.type&&"enum"!==t.type||r.a.parseInteger(t,"value"),
r.a.parseBoolean(t,["advanced","hidden"]),t},parse:function(e){var t=this.convert(e);if(t=a.a.pick(t,this.whitelistedAttrs),t.enumValues&&!a.a.isArray(t.enumValues)&&(t.enumValues=a.a.map(t.enumValues.split("|"),function(e){var n=e.indexOf(":"),i=n>0?e.slice(n+1):e,a=n>0?e.slice(0,n):e;return"int"===t.type&&(a=parseInt(a,10)),{label:i,value:a}})),"enum"===t.type&&t.values&&!a.a.isArray(t.values)){var n=0;t.enumValues=a.a.map(t.values.split("|"),function(e){return{label:e,value:n++}})}return t},
getSaveParams:function(e,t){if(a.a.has(e,"FriendlyName")&&this.server.set("friendlyName",e.FriendlyName),a.a.has(e,"allowMediaDeletion")&&this.server.set("allowMediaDeletion","1"===String(e.allowMediaDeletion)),a.a.isEmpty(e)){var n={};return n[this.get("id")]=this.get("value"),n}return"value"in e&&(e[this.get("id")]=e.value,delete e.value),e}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(44),l=n(64),u=l.a.extend({url:"/updater/status",
whitelistedAttrs:["status","canInstall","downloadURL","state","progress","version","error","added","fixed"],defaults:{state:"none",progress:0,version:"",error:"",added:"",fixed:"",shouldInstall:!1},fetch:function(){return this.server.supports("updater")?l.a.prototype.fetch.apply(this,arguments):s.a.Deferred().reject().promise()},convert:function(e){var t=a.a.isObject(e)?e:o.a.parseXML(e);return o.a.parseBoolean(t,"canInstall"),o.a.parseInteger(t,"status"),
t.Release&&o.a.parseInteger(t.Release,"progress"),t},parse:function(e,t){var n=this.convert(e);return n=a.a.extend(n,n.Release),n=a.a.pick(n,this.whitelistedAttrs),0!==n.status&&(n.state="error"),n}});t.a=u},function(e,t,n){"use strict";var i=n(305),a=n(1235),r=i.a.extend({name:"SessionCollection",model:a.a,url:"/status/sessions"});t.a=r},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(67),s=n(62),o=n(183),l=n(17),u=n(59),c=u.a.extend({name:"SessionModel",entityType:r.j,entityID:function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return n.i(s.a)(this.entityType,e.sessionKey,this.server.entityID())},idAttribute:"sessionKey",cache:new o.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.sessionKey)},syncedAttrs:a()({},u.a.prototype.syncedAttrs,{sessionKey:l.a.string,Player:l.a.object,Session:l.a.object,User:l.a.object,TranscodeSession:l.a.object,delegated:l.a.boolean}),defaults:a()({},u.a.prototype.defaults,{delegated:!1})});t.a=c
},function(e,t,n){"use strict";var i=n(83),a=n(1237),r=i.a.extend({model:a.a,url:"/sync/transcodeQueue",parse:function(e){return this.convert(e,"TranscodeJob")}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({idAttribute:"syncItemId",whitelistedAttrs:["syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","title","thumb"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,"syncItemId"),
r.a.parseFloat(t,["progress","speed"]),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["key","progress","throttled","speed","duration","videoDecision","audioDecision","protocol","container","videoCodec","audioCodec","audioChannels","width","height","transcodeHwDecoding","transcodeHwEncoding"],url:function(){
return"/transcode/sessions/"+this.id},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return t.TranscodeSession&&(t=t.TranscodeSession),r.a.parseBoolean(t,"throttled"),r.a.parseInteger(t,["duration","audioChannels"]),t.progress=parseFloat(t.progress),t.speed=parseFloat(t.speed),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(476),a=i.a.extend({storageKey:"manualServers",defaults:{port1:"32400",
port2:"32400"}});t.a=new a},function(e,t,n){"use strict";var i=n(21),a=n(1241),r=i.a.extend({name:"StoredConnectionCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1242),s=a.a.extend({name:"StoredConnectionModel",idAttribute:"uri",syncedAttrs:{uri:i.a.string,scheme:i.a.string,address:i.a.string,port:i.a.string,relay:i.a.boolean},syncedRelations:{sources:{relationClass:r.a}}});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1243),r=i.a.extend({
name:"StoredConnectionSourceCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"StoredConnectionSourceModel",syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(705),r=i.a.extend({name:"StoredServerCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(475),a=n(17),r=i.a.extend({name:"SessionStatsModel",storageKey:"sessionstats",syncedAttrs:{heartbeatTime:a.a.integer,playbackCount:a.a.integer,
playbackTime:a.a.integer,sessionId:a.a.string,startTime:a.a.integer},defaults:{playbackCount:0,playbackTime:0}});t.a=new r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"MediaSubscriptionTargetModel",context:["server"],syncedAttrs:{guid:i.a.string,grandparentGuid:i.a.string,title:i.a.string,type:i.a.string,grandparentTitle:i.a.string,index:i.a.integer,parentIndex:i.a.integer,year:i.a.string,grandparentYear:i.a.integer,originallyAvailableAt:i.a.string,thumb:i.a.string,
parentThumb:i.a.string,grandparentThumb:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1248),r=i.a.extend({name:"AnnouncementCollection",model:a.a,context:["server"],url:"api/announcements"});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"AnnouncementModel",context:["server"],rootPropertyName:"Announcement",syncedAttrs:{id:i.a.integer,title:i.a.string,content:i.a.string,imageUrl:i.a.string,style:i.a.string,url:i.a.string,expireAt:i.a.string,
notifyAt:i.a.string,read:{type:i.a.boolean,save:!0}},markAsRead:function(){this.get("read")||this.save("read",!0)}});t.a=r},function(e,t,n){"use strict";var i=n(361),a=n.n(i),r=n(83),s=n(710),o=r.a.extend({model:s.a,url:"/api/users",parse:function(e){return this.convert(e,"User")},filterByHome:function(){var e=new a.a(this);return e.filterBy(function(e){return e.get("home")}),e},filterByUnrestricted:function(){var e=new a.a(this);return e.filterBy(function(e){return!e.get("restricted")}),e},
filterByServerShares:function(e){var t=new a.a(this);return t.filterBy(function(t){return!!t.get("serverShares").findWhere({machineIdentifier:e})}),t}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({url:"/api/home",whitelistedAttrs:["id","guestUserID","guestEnabled","name"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,"id"),r.a.parseBoolean(t,["guestEnabled"]),t},parse:function(e){var t=this.convert(e)
;return t=a.a.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){return a.a.isEmpty(e)?{guestEnabled:this.get("guestEnabled")?"1":"0"}:s.a.prototype.getSaveParams.apply(this,arguments)}});t.a=o},function(e,t,n){"use strict";var i=n(361),a=n.n(i),r=n(83),s=n(1252),o=r.a.extend({model:s.a,url:function(){return"/api/invites/"+this.subset},initialize:function(e,t){t||(t={}),this.subset=t.subset||"requests"},parse:function(e){return this.convert(e,"Invite")},filterByHome:function(){
var e=new a.a(this);return e.filterBy(function(e){return e.get("home")}),e},filterByFriends:function(){var e=new a.a(this);return e.filterBy(function(e){return!e.get("home")}),e}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(19),o=n(64),l=o.a.extend({whitelistedAttrs:["id","friend","server","home","friendlyName","username","email","thumb","createdAt","Server"],urlRoot:"/api/invites/requests",url:function e(){var e=void 0;if(this.isNew())e=a.a.result(this,"urlRoot");else{
var t=this.pick("friend","server","home");a.a.each(a.a.keys(t),function(e){t[e]=t[e]?"1":"0"}),e=this.collection?a.a.result(this.collection,"url"):a.a.result(this,"urlRoot"),e=e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.get("id")),e=s.join(e,t)}return e},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);r.a.parseInteger(t,"createdAt"),r.a.parseBoolean(t,["friend","server","home"]),r.a.parseArray(t,"Server");var n=t.Server;return a.a.each(n,function(e){
r.a.parseInteger(e,"numLibraries")}),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(83),s=n(1254),o=r.a.extend({model:s.a,filterByOwned:function(e){var t=this.filter(function(e){return e.get("owned")});return this.clone(t)},filterByShared:function(e){var t=this.filter(function(e){return!e.get("owned")&&!e.get("pending")});return this.clone(t)},getLibraryCount:function(e){var t=this.where(e)
;return a.a.reduce(t,function(e,t){return e+=t.get("numLibraries")},0)},getOwnedLibraryCount:function(){return this.getLibraryCount({owned:!0})},getSharedLibraryCount:function(){return this.getLibraryCount({owned:!1})},getActiveCount:function(){return this.reduce(function(e,t){return t.isActive()&&e++,e},0)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({
whitelistedAttrs:["id","serverId","machineIdentifier","name","owned","admin","pending","lastSeenAt","invitedAt","acceptedAt","allLibraries","numLibraries","allowSync","allowCameraUpload","allowChannels","Section"],urlRoot:function(){return"/api/servers/"+this.get("machineIdentifier")+"/shared_servers"},isActive:function(){return!(!this.get("numLibraries")&&!this.get("allLibraries"))},convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);t.SharedServer&&(t=t.SharedServer),
r.a.parseInteger(t,["id","serverId","lastSeenAt","invitedAt","acceptedAt","numLibraries"]),r.a.parseBoolean(t,["owned","admin","pending","allLibraries","allowSync","allowCameraUpload","allowChannels"]),r.a.parseArray(t,"Section");var n=t.Section;return a.a.each(n,function(e){r.a.parseInteger(e,"id"),r.a.parseBoolean(e,"shared")}),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs),!t.numLibraries&&t.Section.length&&(t.numLibraries=a.a.where(t.Section,{shared:!0
}).length),t}});t.a=o},function(e,t,n){"use strict";var i=n(83),a=n(1256),r=i.a.extend({model:a.a,url:"/pms/social/networks",parse:function(e){return this.convert(e,"Directory")}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["key","title","linked","maxLength"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseBoolean(t,["linked","maxLength"]),t},parse:function(e){var t=this.convert(e)
;return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"UserEntitlementModel",syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1259),r=i.a.extend({name:"UserFeatureCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"UserFeatureModel",syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(713),r=i.a.extend({
name:"UserPlaylistItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"UserProfileModel",context:["server"],url:"/api/v2/user/profile",syncedAttrs:{autoSelectAudio:i.a.boolean,autoSelectSubtitle:i.a.integer,defaultAudioLanguage:i.a.string,defaultSubtitleLanguage:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({
name:"UserProviderModel",syncedAttrs:{id:i.a.string,territory:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"UserRoleModel",syncedAttrs:{id:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1265),r=i.a.extend({name:"StoredUserCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(17),s=n(18),o=n(1244),l=n(491),u=n(715),c=n(712),d=n(714),h=s.a.extend({name:"StoredUserModel",additionalRelations:["servers"],
syncedAttrs:{id:r.a.integer,authToken:r.a.string,username:r.a.string,email:r.a.string,title:r.a.string,thumb:r.a.string,pin:r.a.string,home:r.a.boolean,restricted:r.a.boolean,guest:r.a.boolean,hasAllEntitlements:r.a.boolean,lastPrimaryServerID:r.a.string},syncedRelations:{subscription:{relationClass:l.a},roles:{relationClass:u.a},entitlements:{relationClass:c.a},providers:{relationClass:d.a},servers:{relationClass:o.a}},copyFromUser:function(e){var t=this,n={}
;a.a.each(this.syncedAttrs,function(t,i){n[i]=e.get(i)}),a.a.each(this.syncedRelations,function(n,i){if(!a.a.contains(t.additionalRelations,i)){var r=t.get(i),s=e.get(i);if(s){var o=s.toJSON();r.set(r.parse(o))}}}),this.set(n)},clearSensitiveAttributes:function(){this.unset("authToken"),this.unset("pin"),this.get("servers").reset()}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(157),o=n(12),l=n(56),u=s.a.extend({initialize:function(){this.viewFor=this.viewFor.bind(this)},
viewFor:function(e,t){var n=this.viewsByType[e];if(n)return new n(t);throw new Error("No view defined for "+e)},login:function(){var e=this,t=n.i(r.a)("appModel"),i=t.get("servers"),a=i.findWhere({cloud:!0});o.a.trigger("show:loading"),a.populate().done(function(){o.a.trigger("navigate","dashboard")}).fail(function(){var t=a.get("available");if(t!==!0&&t!==!1)return void e.listenToOnce(a,"change:available",e.login);var n=t?e.viewFor("signIn"):e.viewFor("unavailable",{model:a})
;o.a.trigger("show:view",n)})},error:function(){o.a.trigger("show:view",this.viewFor("notFound",{type:"404"}))},unauthorized:function(e){var t=this;a.a.some(this.getUnauthorizedHandlers(),function(n){return n.call(t,e)})||o.a.trigger("show:view",this.viewFor("notFound",{type:"media"}))},getUnauthorizedHandlers:function(){return[this.handleLockState,this.handleAuthorized,this.handlePrimaryServer,this.handleServer,this.handleChannelError]},handleLockState:function(e){
return n.i(r.a)("appModel").get("user").get("isLocked")},handleAuthorized:function(e){var t=n.i(r.a)("appModel"),i=t.get("servers").findWhere({authorized:!0}),a=!i&&!t.get("skipSignIn");return a&&this.populateServersThenRecover(),a},handlePrimaryServer:function(e){var t=e.server,n=e.options;return!(t||!n.primaryServer)&&(o.a.trigger("show:view",this.viewFor("serverRequired")),!0)},handleServer:function(e){
var t=e.server,i=e.options,a=this.viewFor,s=n.i(r.a)("appModel"),l=s.get("cloudServer"),u=void 0,c=void 0;return!(!i.serverID&&!i.primaryServer)&&(t?t.get("available")?t.get("authorized")||"resolved"!==l.populatePromise.state()?t.get("authorized")||(u=this.populateServersThenRecover()):c=a("unauthorized"):c=a("unavailable",{model:t}):c=a("notFound",{type:"server"}),c&&o.a.trigger("show:view",c),!(!c&&!u))},handleChannelError:function(e){var t=e.options,n=!!t.channelID
;return n&&o.a.trigger("show:view",this.viewFor("channelError")),n},populateServersThenRecover:function(){var e=n.i(r.a)("appModel"),t=e.get("skipSignIn"),i=e.get("servers"),a=i.findWhere({cloud:!0}),s=this.viewFor;return i.populate().done(function(){var e=i.filter(function(e){return e.get("hasManualConnection")})[0];a.get("authorized")?o.a.trigger("navigate:refresh"):e?e.get("authorized")?o.a.trigger("navigate","dashboard"):o.a.trigger("show:view",s("unavailable",{model:e
})):t?o.a.trigger("show:view",s("serverRequired")):o.a.trigger("navigate","login",{silent:!0})}).fail(function(){l.a.get("requiresSignIn")?o.a.trigger("show:view",s("unavailable",{model:a})):o.a.trigger("show:view",s("serverRequired"))})}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(52),s=n(13),o=n(12),l=n(158),u=l.a.extend({initialize:function(){l.a.prototype.initialize.apply(this,arguments),this.listenTo(o.a,{"navigate:back":this.onNavigateBack,
"navigate:forward":this.onNavigateForward,"navigate:refresh":this.onNavigateRefresh,"navigate:refresh:dashboard":this.onNavigateRefreshDashboard})},onNavigateBack:function(){var e=s.a("appModel"),t=e.get("history"),n=e.get("forwardHistory");if(t.length<2)return this.navigate("",{trigger:!0});n.unshift(t.pop()),this.navigate(a.a.last(t),{trigger:!0})},onNavigateForward:function(){var e=s.a("appModel"),t=e.get("forwardHistory");t.length&&this.navigate(t[0],{trigger:!0})},
onNavigateRefresh:function(){r.a.history.loadUrl(r.a.history.getFragment())}});t.a=u},function(e,t,n){"use strict";function i(e){var t=e.key,i=e.getModel,r=e.pages,s=void 0===r?1:r,o=e.reloadThreshold,l=void 0===o?4:o,u=n.i(a.a)(t),c="is"+u+"Pending",d="is"+u+"Populated",h=t?t+"Error":"error";return function(e,n){var a=n.startIndex,r=n.endIndex,o=n.disableReloadThreshold,u=r-a,p=i(e,n),f=t?p.get(t):p,g=(p.sessionAttrs,a+u*s+1),m=f.get("populatedRange");if(!(a>=m.start&&g<=m.end)){var v=p.get(c)
;p.set(c,!0),f.populateRange({start:a,end:g,reloadThreshold:o?null:u*l}).done(function(){var e;p.set((e={},e[c]=!1,e[d]=!0,e[h]=null,e))}).fail(function(e,t){var n;if(t.aborting)return void p.set(c,v);p.set((n={},n[c]=!1,n[h]=t,n))})}}}var a=(n(33),n(321));t.a=i},function(e,t,n){"use strict";function i(e,t,i){var a=i.rating,s=i.allowMetrics,h=i.metricsProperties,p=void 0===h?{}:h,f=t.server,g=e.get("features").get(d.a.RATE);if(!g)return o.a.Deferred().reject().promise();var m={
key:t.get("ratingKey"),identifier:t.get("identifier"),rating:a},v=u.join(g.get("key"),m),y=f.getXHROptions(v),b=t.get("userRating"),S=a===-1?void 0:a;t.set("userRating",S);var I=o.a.ajax(y).fail(function(e){t.get("userRating")===S&&t.set("userRating",b)});return s&&n.i(l.a)("metrics").trackClick(r()({},p,{action:c.J,type:t.get("type"),rating:a})),I.promise()}var a=n(6),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(19),c=n(68),d=n(139);t.a=i},function(e,t,n){"use strict";function i(e,t,i,a,r){
var o=s()({},i);o.Stream=i.Stream.map(function(e){return e.streamType!==a.id?e:e.id!==r||e.selected?e.id!==r&&e.selected?s()({},e,{selected:!1}):e:s()({},e,{selected:!0})});var l=s()({},t,{Part:n.i(p.a)(t.Part,i,o)});return n.i(p.a)(e,t,l)}function a(e,t){for(var a,r=t.streamTypeString,o=t.streamID,u=t.allParts,p=t.allowMetrics,m=t.metricsProperties,v=void 0===m?{}:m,y=h.a.get(r),b=e.server,S=e.get("Media"),I=void 0,w=void 0,M=0,C=S.length;M<C;M++){
for(var D=S[M],P=D.Part,T=0,x=P.length;T<x;T++){for(var E=P[T],A=E.Stream,k=0,L=A.length;k<L;k++){var _=A[k];if(_.streamType===y.id&&_.id===o){I=D,w=E;break}}if(w)break}if(w)break}if(!w)return c.a.Deferred().reject().promise();var N=(a={},a[y.key]=o,a);u&&(N.allParts=1);var R=f.join(["/library/parts/",w.id],N),O=l.a.extend(b.getXHROptions(R),{type:"PUT"}),j=i(S,I,w,y,o);e.set("Media",j);var z=c.a.ajax(O).done(function(){u&&e.fetch({usePopulatedParams:!0})}).fail(function(){
e.get("Media")===j&&e.set("Media",S)});return p&&n.i(d.a)("metrics").trackClick(s()({},v,{action:g.H,type:e.get("type"),streamType:r})),z.promise()}var r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(13),h=n(86),p=n(1286),f=n(19),g=n(68);t.a=a},function(e,t,n){"use strict";var i=n(50),a=n(368);n.d(t,"a",function(){return r});var r=n.i(i.a)(a.e)},function(e,t,n){"use strict";function i(e,t){function n(){c===u&&(c=u.slice())}function i(){return t.getState()}function a(e){var t=!0;return n(),
c.push(e),function(){if(t){t=!1,n();var i=c.indexOf(e);c.splice(i,1)}}}function r(e){var n=e.payload,i=e.type,a=i&&d[i];if(Array.isArray(a))for(var s=0,o=a.length;s<o;s++)a[s](t,n,r);else a&&a(t,n,r);return e}function s(e){d=o(e)}function o(e){for(var t={},n=0,i=e.length;n<i;n++){var a=e[n];for(var r in a){var s=t[r],o=a[r];s?Array.isArray(s)?s.push(o):t[r]=[s,o]:t[r]=o}}return t}function l(){for(var e=u=c,t=0,n=e.length;t<n;t++)e[t]()}var u=[],c=u,d=void 0;return s(e),t.on("statechange",l),{
dispatch:r,subscribe:a,getState:i,replaceActionHandlers:s}}n(316),n(33),n(18);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.a)("firstCharacter")}var a=n(369);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.folderKey},n.i(r.a)("all"),function(e,t){return e?e:t})}var a=n(8),r=(n.n(a),n(369));t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.a)("cluster?clusterZoomLevel=1")}var a=n(369);t.a=i},function(e,t,n){
"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.libraryEntityID},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(723));t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(s.a)(),function(e){if(e&&e.childrenKey){var t=e.key,n=e.skipChildren?"grandchildren":"children",i={excludeAllLeaves:1};return("album"===e.type||"artist"===e.type&&e.skipChildren)&&(i.includeRelated=1),r.join([t,n],i)}})}var a=n(8),r=(n.n(a),n(19)),s=n(24);t.a=i
},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(s.a)(),function(e){if(e){var t=e.skipParent,n=t?e.grandparentKey:e.parentKey;if(n){var i=t?"grandchildren":"children";return r.join([n,i],{excludeAllLeaves:1})}}})}var a=n(8),r=(n.n(a),n(19)),s=n(24);t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.metadataLists});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(8),s=(n.n(r),
n(372)),o=n.i(r.createSelector)(s.a,function(e){return a.a.find(e,function(e){var t=e.activeConnection;return!!e.isFullServer&&(!(!e.isConnected||t.isPossiblyCrossNetworkProtected)&&!!t.isPrivate)})});t.a=o},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(372)),r=n.i(i.createSelector)(a.a,function(e){return e.filter(function(e){return e.isPersonalCloudServer})});t.a=r},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e,t){return t.mediaSubscriptionEntityID
},r.a,function(e,t){return t[e]})}var a=n(8),r=(n.n(a),n(731));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.settings||{},n=t.myPlexScheme,i=t.myPlexUrl;return n=n||"https",i=i||"plex.tv",{myPlexScheme:n,myPlexUrl:i}}t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),n(182)),r=n.i(i.createSelector)(a.a,function(e){return e.subscription||{}});t.a=r},function(e,t,n){"use strict";function i(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}
var a=n(9),r=n.n(a),s=n(2),o=n.n(s),l=function(){function e(){r()(this,e),this.pool=[],this.index={}}return e.prototype.lockOrCreate=function(e,t,n){var a=this,r=i(e);e.forEach(function(e){if(!a.find(e)){var i=o.a.find(a.pool,function(e){return!r[e.id]});i||(i={},a.pool.push(i),i.view=t.call(n,i)),a.index[i.id]=void 0,a.index[e]=i,i.id=e}})},e.prototype.each=function(e,t){this.pool.forEach(e,t)},e.prototype.filter=function(e,t){var n=o.a.partition(this.pool,e,t),i=n[0];n[1].forEach(function(e){
e.view.close(),e.view.$el.remove()}),this.pool=i},e.prototype.find=function(e){var t=this.index[e];return t&&t.id===e?t:void 0},e.prototype.findByModel=function(e){return this.pool.find(function(t){return t.view.model===e})},e.prototype.close=function(){this.pool.forEach(function(e){e.view.close()}),this.pool=[],this.index={}},e.prototype.removeCells=function(e){this.filter(e),this.reset()},e.prototype.reset=function(){this.each(function(e,t){e.id=t}),this.reindex()},
e.prototype.reindex=function(){var e=this.index={};this.pool.forEach(function(t){e[t.id]=t})},e}();t.a=l},function(e,t,n){"use strict";function i(e,t,n){var i=e.indexOf(t);if(i<0)return e;var a=e.slice(0);return a[i]=n,a}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.get("metadataList").getCollection(),n=t.length,i=e.get("viewGroup");if("Pictures"===i)return s.tileList;if("List"===i)return s.list;if(t.findWhere({type:"photo"}))return s.tileList
;var a=r.a.compact(t.pluck("summary")),o=r.a.uniq(t.pluck("thumb")),l=t.reduce(function(e,t){var n=t.get("title");return n?e+n.length:e},0),u=l/n;return o.length>n/2&&u<30?s.tileList:a.length>n/2?s.detailsList:s.list}var a=n(2),r=n.n(a),s={tileList:"media-tile-list",detailsList:"media-details-list",list:"media-list"},o={types:s,getListType:i};t.a=o},function(e,t,n){"use strict";function i(e,t){var n=[r.a.first(e),r.a.last(e)],i=r.a.sortBy(e,"size").reverse();return r.a.union(n,i).slice(0,t)}
var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){return e&&e.length&&t>0?r.a.sortBy(n.i(s.a)(e,t),"position"):[]}var a=n(2),r=n.n(a),s=n(1288);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return r});var i="playPause,stop,skipPrevious,skipNext,seekTo,stepBack,stepForward,subtitleStream,volume",a="playPause,stop,skipPrevious,skipNext,seekTo,repeat,volume",r="playPause,stop,skipPrevious,skipNext"
},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="analyzing"},function(e,t,n){"use strict";function i(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.timeFormat,p=void 0===a?"h:mma":a;if(null==e)return"";var f=r.a.unix(e);if(n.i(o.a)(e))return n.i(s.default)("Yesterday");0===f.minutes()&&(p=p.replace("h:mm","h"));var g=n.i(h.default)(e,p),m=void 0
;return m=n.i(l.a)(e)?n.i(u.a)(e)?n.i(s.default)("Tonight"):n.i(s.default)("Today"):n.i(c.a)(e)?n.i(s.default)("Tomorrow"):n.i(d.a)(e)?n.i(h.default)(e,"dddd"):n.i(h.default)(e,"MMM D"),t?n.i(s.default)("{1} at {2} on {3}",m,g,t):n.i(s.default)("{1} at {2}",m,g)}var a=n(37),r=n.n(a),s=n(4),o=n(375),l=n(314),u=n(743),c=n(742),d=n(741),h=n(313);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=r.a.duration(e),i=365*t.years(),a=30*t.months(),o=i+a+t.days()
;return 1!==o?n.i(s.default)("{1} days",o):n.i(s.default)("{1} day",o)}var a=n(37),r=n.n(a),s=n(4);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";var t=r.a.duration(e),i=t.days(),a=t.hours(),o=1!==i;return i&&a?o?n.i(s.default)("{1} days {2} hr",i,a):n.i(s.default)("{1} day {2} hr",i,a):i?o?n.i(s.default)("{1} days",i):n.i(s.default)("{1} day",i):n.i(s.default)("{1} hr",a)}var a=n(37),r=n.n(a),s=n(4);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return""
;var t=r.a.duration(e),i=24*t.days()*60,a=60*t.hours(),o=t.minutes()+a+i,l=t.seconds();return o?n.i(s.default)("{1} min",o):l>0?n.i(s.default)("{1} sec",l):""}var a=n(37),r=n.n(a),s=n(4);t.a=i},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit;return e?("past"===n?e=Math.min(e,r()().unix()):"future"===n&&(e=Math.max(e,r()().add(1,"second").unix())),r.a.unix(e).fromNow()):""}var a=n(37),r=n.n(a);t.a=i},function(e,t,n){"use strict"
;function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=l[e]||r.a.last(l);return{times:e+1,remindAfter:o()().add(t,"days").unix()}}var a=n(2),r=n.n(a),s=n(37),o=n.n(s),l=[7,30,60,90,180];t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=[].concat(e);if(n.type===l.a){var a=o.a.findIndex(i,function(e){return e.key===t}),s=a===-1?0:a,u=r()({key:t},n);a===-1?i.push(u):i.splice(s,1,u)}else{o.a.findWhere(i,{key:t,value:n.value})||i.push(r()({key:t},n))}return i}
var a=n(6),r=n.n(a),s=n(2),o=n.n(s),l=(n(33),n(185));t.a=i},function(e,t,n){"use strict";function i(e){if(!e)return[];var t=decodeURIComponent(e).match(p);return t?t.reduce(function(e,t){var i=t.match(f),a=i[1],s=i[2],o=i[3],d=o?r.a.uniq(o.split(l.a)):"";return 1===d.length&&(d=d[0]),n.i(c.a)(e,a,{value:d,type:g[a]?u.a:u.b,operator:s})},[]):[]}var a=n(2),r=n.n(a),s=n(212),o=n(248),l=n(746),u=n(185),c=n(1298);t.a=i;var d=o.i.sort(function(e,t){return e.length<t.length
}).map(s.a).join("|"),h="([^&!=<>]+)("+d+")([^&!=<>]+)?",p=new RegExp(h,"g"),f=new RegExp(h),g={unwatched:!0,unwatchedLeaves:!0,duplicate:!0}},function(e,t,n){var i=n(313).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(378).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(515).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(253).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(1391).default,a=n(97);e.exports=a(i)},function(e,t,n){var i=n(19).getLastSegment,a=n(97)
;e.exports=a(i)},function(e,t,n){"use strict";var i=n(5);n.n(i).a.fn.isDisabled=function(){return this.hasClass("disabled")||this.hasClass("active")||this.hasClass("hidden")}},function(e,t,n){"use strict";var i=n(5);n.n(i).a.fn.selectText=function(){var e,t=this[0];if(document.body.createTextRange)e=document.body.createTextRange(),e.moveToElementText(t),e.select();else if(window.getSelection){var n=window.getSelection();e=document.createRange(),e.selectNodeContents(t),n.removeAllRanges(),
n.addRange(e)}}},function(e,t,n){"use strict";var i=n(5);n.n(i).a.fn.triggerReflow=function(){var e=this[0];return e&&e.offsetHeight,this}},function(e,t,n){"use strict";function i(e){e=e||[];for(var t=0,n=e.length;t<n;t++){var s=e[t];if("xx"!==s&&"xn"!==s){if(a.a[s])return s;var o=s.match(r),l=o&&i([o[1]]);if(l)return l}}}var a=n(317);t.a=i;var r=/(^[^-]+)\-/},function(e,t,n){"use strict";function i(){var e=window.PLEXWEB_INLINE&&window.PLEXWEB_INLINE.acceptLanguage,t=window.navigator,i=void 0
;return e?i=n.i(r.a)(e):t.languages?i=t.languages:t.language?i=[t.language]:t.userLanguage&&(i=[t.userLanguage]),n.i(a.a)(i)||"en"}var a=n(1309),r=n(1311);t.a=i},function(e,t,n){"use strict";function i(e){return e&&e.match(/[a-zA-Z\-]{2,10}/g)||[]}t.a=i},function(e,t,n){"use strict";function i(){return r()(s.a).filter(function(e){return 2===e.length&&s.b.indexOf(e)===-1}).map(function(e){var t;return t={},t[e]=s.a[e],t})}var a=n(70),r=n.n(a),s=n(317);t.a=i},function(e,t,n){"use strict"
;var i=n(113),a=n.n(i),r=n(38),s=n(12),o=n(55),l=n(66),u=r.a.extend({mixins:o.a,name:"AbstractReporter",enabled:!1,destroyed:!1,_suspended:!1,initialize:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).enabled!==!1&&this.enable()},hasSupport:function(){return!0},enable:function(){this.enabled||this.destroyed||!this.hasSupport()||(this.enabled=!0,this.listenTo(s.a,{"log:message":this.onLog,"log:group":this.onLog,"log:groupCollapsed":this.onLog,"log:groupEnd":this.onLog}),
this.onEnabled())},disable:function(){this.enabled&&(this.enabled=!1,this.stopListening(),this.onDisabled())},destroy:function(){this.destroyed||(this.disable(),this.destroyed=!0,this.onDestroyed())},_suspend:function(){this._suspended||(this._suspended=!0,this.onSuspended())},_resume:function(){this._suspended&&(this._suspended=!1,this.onResumed())},onLog:function(e){if(this._suspended)return void(l.a.hasConsole&&window.console.warn("[Logging] Ignored log reentrancy:",a()(e)))
;switch(this._suspend(),e.type){case"log:message":this.onLogMessage(e);break;case"log:group":this.onLogGroup(e);break;case"log:groupCollapsed":this.onLogGroupCollapsed(e);break;case"log:groupEnd":this.onLogGroupEnd(e)}this._resume()},onLogMessage:function(){},onLogGroup:function(){},onLogGroupCollapsed:function(){this.onLogGroup.apply(this,arguments)},onLogGroupEnd:function(){},onEnabled:function(){},onDisabled:function(){},onResumed:function(){},onSuspended:function(){},onDestroyed:function(){}
});t.a=u},function(e,t,n){"use strict";var i,a=n(1313),r=n(66),s=n(28),o=(i={},i[s.a.LEVEL_LOG]={method:"log",color:"black"},i[s.a.LEVEL_DEBUG]={method:"debug",color:"#d500ff"},i[s.a.LEVEL_INFO]={method:"info",color:"blue"},i[s.a.LEVEL_WARN]={method:"warn",color:"#ff6600"},i[s.a.LEVEL_ERROR]={method:"error",color:"red"},i),l=a.a.extend({name:"ConsoleReporter",hasSupport:function(){return r.a.hasConsole},onLogMessage:function(e){
var t=e.message,n=o[e.level],i=window.console[n&&n.method]||window.console.log;n&&n.color?i.call(window.console,"%c"+t,"color: "+n.color+";"):i.call(window.console,t)},onLogGroup:function(e){(window.console.group||window.console.log).call(window.console,e.message)},onLogGroupCollapsed:function(e){(window.console.groupCollapsed||window.console.log).call(window.console,e.message)},onLogGroupEnd:function(){window.console.groupEnd&&window.console.groupEnd()}});t.a=l},function(e,t,n){"use strict"
;function i(e,t,n){var i=n;if(e.Part.length>1)for(var a=0,r=e.Part.length;a<r;a++){var s=e.Part[a];if(!s.duration)break;if(t.key===s.key)break;i+=s.duration}return i}t.a=i},function(e,t,n){"use strict";function i(e){return e?e.Part.length:0}t.a=i},function(e,t,n){"use strict";function i(e,t){if(e.indexes){var n=e.indexes.split(",");if(n.length)return r.a.indexOf(n,t)>-1?t:n[0]}}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.seasonIndex
;return null==t?"":t>1e3?t:(e.noLeadingZero||(t=n.i(r.a)(t)),e.useLongName?n.i(a.default)("Season {seasonNumber}",{seasonNumber:t}):n.i(a.default)("S{seasonNumber}",{seasonNumber:t}))}var a=n(4),r=n(517);t.a=i},function(e,t,n){"use strict";function i(e){var t=n.i(r.a)(e);return n.i(a.a)(t)}var a=n(510),r=n(141);t.a=i},function(e,t,n){"use strict";function i(e){var t=e?r.a.first(e.get("Media")):null;return!(!t||t.container)}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){
o+=1;var t=o.toString(),n=r.a.extend({},e.attributes,{playQueueItemID:t});return new s.a(n,{server:e.server,parent:e.parent,parse:!0})}var a=n(2),r=n.n(a),s=n(302),o=0;t.a=i},function(e,t,n){"use strict";function i(e){if(!e)return n.i(a.default)("None");var t=e.language||n.i(a.default)("Unknown"),i=r.a.get(e.streamType),l=i&&i.typeString,u=e.codec,c=[];return"subtitles"===l&&u?(c.push(u.toUpperCase()),e.key&&c.push(n.i(a.default)("External")),
e.forced&&c.push(n.i(a.default)("Forced"))):"audio"===l&&u&&(c.push(n.i(s.default)(u)),e.channels&&c.push(n.i(o.default)(e.channels))),c.length?t+" ("+c.join(" ")+")":t}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),r=n(86),s=n(515),o=n(378);t.default=i},function(e,t,n){"use strict";function i(e,t){if(null===e||void 0===e||o()(e))return"";var n=parseInt(e,10),i=l[t||"h264"];return r()(n)&&r()(i)?(n/i).toFixed(1):String(e)}var a=n(2419),r=n.n(a),s=n(2421),o=n.n(s),l={h264:10,hevc:30}
;t.a=i},function(e,t,n){"use strict";function i(e){return e instanceof a.a.Collection?e:e.getCollection?e.getCollection():e.has("childrenKey")?e.get("children").getCollection():void 0}var a=n(52);t.a=i},function(e,t,n){"use strict";function i(e,t){return"anvergo"===t?"Anvergo":"tv-old"===e?"tv":e}t.a=i},function(e,t,n){"use strict";function i(e){return e?r.a.isArray(e)?e:[e]:[]}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){if(null==e)return"";try{
return decodeURIComponent(e)}catch(t){return a.a.warn("[Parser] Unable to parse encoded string"),e}}var a=n(28);t.a=i},function(e,t,n){"use strict";function i(e){return null==e||""===e?0:window.parseFloat(e)}t.a=i},function(e,t,n){"use strict";function i(e){return null==e||""===e?0:parseInt(e,10)}t.a=i},function(e,t,n){"use strict";function i(e){try{return JSON.parse(e)}catch(n){var t=r.a.isString(e)?e.substring(0,50):"no response"
;return s.a.warn("[Parser] Unable to parse JSON: "+n.message+" ("+t+")"),{}}}var a=n(2),r=n.n(a),s=n(28);t.a=i},function(e,t,n){"use strict";function i(e){return e?r.a.isArray(e)?e:e.split(","):[]}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){if(t||(t={}),r.a.isObject(e))return e;if(!r.a.isString(e))return{};if(!(e=e.trim().replace(/^(\?|#)/,"")))return{};var n=t.separator||"&";return e.split(n).reduce(function(e,t){var n=t.split("="),i=n[0],a=n[1];try{
i=decodeURIComponent(i),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]:e[i]=a}catch(e){s.a.warn("[Parser] Unable to decode query string at "+i)}return e},{})}var a=n(2),r=n.n(a),s=n(28);t.a=i},function(e,t,n){"use strict";function i(e){return null==e?"":e.toString()}t.a=i},function(e,t,n){"use strict";function i(){return l?l:l=new s.a(!1,"",!0)}function a(e){if(!e)return o.a.warn("[Parser] Empty XML source"),{}
;var t=i(),n=t.parseXmlString(e);if(!n)return o.a.warn("[Parser] No XML document created"),{};if(n.getElementsByTagName("parsererror").length)return o.a.warn("[Parser] Errors found while parsing XML document"),{};try{return t.xml2json(n)}catch(e){return o.a.warn("[Parser] Unable to parse XML: "+e.message),{}}}var r=n(636),s=n.n(r),o=n(28),l=void 0;t.a=a},function(e,t,n){"use strict";function i(e,t,n){r.a.isArray(t)||(t=[t])
;var i=t.join("|"),a=new RegExp("<("+i+")","g"),s=new RegExp("</("+i+")>","g");return e.replace(a,"<"+n+' elementName="$1"').replace(s,"</"+n+">")}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){if(!e||!e._children)return e;var t=r.a.clone(e),n=t._children;return r.a.isArray(n)&&(n.forEach(function(e){var n=e._elementType;if(e._elementType=null,e.elementName=n,n){var a=o[n]||n,s=t[a],l=i(e);s?r.a.isArray(s)?s.push(l):t[a]=[s,l]:t[a]=l}}),t._children=null),t}
var a=n(2),r=n.n(a),s=n(78),o=r.a.reduce(s.b,function(e,t){return e[t]="Metadata",e},{});t.a=i},function(e,t,n){"use strict";function i(e){return e?"1":"0"}t.a=i},function(e,t,n){"use strict";function i(e){return e.join(",")}t.a=i},function(e,t,n){"use strict";function i(e,t){return r()(e||{}).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join(t&&t.separator||"&")}var a=n(70),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){
var i=t.itemDecision,a=r.a.pick(t,"shuffle","unwatched","continuous","items","excludeSeedItem");if("movie"===e.get("type")&&!e.get("viewOffset")&&t.supportsContinuous){var o=n.i(s.a)("appModel").get("settings");a.extrasPrefixCount=o.get("extrasPrefixCount")}return i.toPlay&&(a.firstItemKey=i.toPlay.get("key")),a}var a=n(2),r=n.n(a),s=n(13);t.a=i},function(e,t,n){"use strict";function i(e,t){
var i=r.a.Deferred(),a=e.server.get("playQueueManager"),o=a.getFor(t.itemDecision.toPlay||t.itemDecision.toAdd),l=n.i(s.a)(e,t);return l.model=o.get("selectedItem"),l.playQueue=o,i.resolve(l).promise()}var a=n(5),r=n.n(a),s=n(518);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.itemDecision,i=e.server.get("playQueueManager"),a=i.getFor(n.toPlay||n.toAdd);return a&&a.get("hasUserAdditions")?t.confirmClearPlayQueue():r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a);t.a=i
},function(e,t,n){"use strict";function i(e,t){var n=r.a.Deferred(),i=e.playlist||e.collection;if(t.siblings&&i){var a=e.get("metadataItem")||e;return n.resolve({toPlay:a,toAdd:i}).promise()}var o=e.get("type"),l="show"===o&&!e.get("isSection"),u="season"===o;if(t.unwatched&&(l||u)){var c=l?e:new s.a({key:e.get("parentKey")},{server:e.server}),d=c.fetch({data:{includeOnDeck:"1"}});d.then(function(){var i=c.get("onDeck"),a=i&&l,r=i&&u&&i.get("parentRatingKey")===e.id
;a||r?(t.offset=i.get("viewOffset"),n.resolve({toPlay:i,toAdd:e})):u?e.get("children").populate().then(function(){var t=e.get("children").get("metadataItems"),i=function(e){return!e.get("viewCount")},a=t.findWhere(i);n.resolve({toPlay:a,toAdd:e})}):n.resolve({toAdd:e})}),d.fail(n.reject)}else n.resolve({toAdd:e});return n.promise()}var a=n(5),r=n.n(a),s=n(59);t.a=i},function(e,t,n){"use strict";function i(e){
return e.get("isUserPlaylist")?"video":e.get("isPlaylist")?e.get("playlistType"):e.section?n.i(a.k)(e.section.get("type")).mediaType:e.get("isMetadataList")?n.i(a.k)(e.get("firstItemType")).mediaType:n.i(a.k)(e.get("type")).mediaType}var a=n(34);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=e.get("selectedItem");if("track"!==n.get("type"))return s.a.Deferred().resolve(e).promise();var i=n.server,a=n.get("librarySectionID")||n.section&&n.section.get("key")
;return i.get("sections").populate().then(function(e){var t=e.findWhere({key:a});return t&&t.get("settings").populate()}).then(function(e){var n=e&&e.findWhere({id:"enableTrackOffsets"});t.enableTrackOffsets=n&&n.get("value")}).then(function(){return e})}function a(e,t){if(t.playQueue)return i(t.playQueue,t);var a=t.itemDecision,r=e.server.get("playQueueManager").createFor(a.toAdd,a.toPlay);if(!r){var c="Couldn't create play queue";return o.a.warn("[PlayMedia]",c),n.i(l.a)(),
s.a.Deferred().reject(c).promise()}var d=r.addContent(a.toAdd,n.i(u.a)(e,t)).then(function(){if(r.get("collection").length)return i(r,t);var e=r.get("message");return s.a.Deferred().reject("Couldn't queue item; empty play queue. "+e).promise()});return d.fail(function(e){o.a.warn("[PlayMedia]",e),n.i(l.a)()}),d}var r=n(5),s=n.n(r),o=n(28),l=n(779),u=n(1340);t.a=a},function(e,t,n){"use strict";function i(e,t){
return n.i(c.a)(e,t)?t.isFromCompanion?n.i(d.a)(e,t):(l.a.warn("[PlayMedia] Ignoring playback command for currently playing item"),o.a.Deferred().reject({isCurrentlyPlaying:!0,silent:!0}).promise()):n.i(h.a)(e,t).then(function(){t.notify(r.a.extend({loading:!0},n.i(p.a)(e,t)))},function(){return o.a.Deferred().reject({silent:!0}).promise()}).then(function(){return n.i(f.a)(e,t)}).then(function(i){return t.playQueue=i,n.i(p.a)(e,t)}).done(function(){u.a.execute("persistPlayQueue",null)})}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(28),u=n(23),c=n(1347),d=n(1341),h=n(1342),p=n(518),f=n(1345);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.itemDecision,i=e.server.get("playQueueManager"),a=i.getFor(n.toPlay||n.toAdd);return a&&a.get("selectedItem")&&a.get("selectedItem").get("key")===e.get("key")}t.a=i},function(e,t,n){"use strict";function i(e){return e.controller}t.a=i},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(38),l=n(106),u=n(1350),c=n(28),d=n(55),h=n(1238),p=o.a.extend({mixins:d.a,warningThreshold:2e3,networkReasonThreshold:3e3,startDelay:1e4,syncDelay:500,resyncDelay:1e4,reasons:{TRANSCODER:"transcoder",NETWORK:"network",UNKNOWN:"unknown"},recommendations:{LOWER_QUALITY:"lowerQuality",ORIGINAL_QUALITY:"originalQuality",NONE:"none"},initialize:function(e){a.a.bindAll(this,"onSyncCheck"),e||(e={}),
this.warningThreshold=e.warningThreshold||this.warningThreshold,this.startDelay=e.startDelay||this.startDelay,this.syncDelay=e.syncDelay||this.syncDelay,this.resyncDelay=e.resyncDelay||this.resyncDelay,this._clock=new u.a,this.setModel(e.model)},setModel:function(e){this.model=e},start:function(){this._hasWarned=!1,this._startedAt=this._clock.now(),this._clock.setPosition(this.model.get("position")),this.listenTo(this.model,{"change:state":this.onStateChange,
"change:position":this.onPositionChange})},stop:function(){this._cancelSyncCheck(),this.stopListening(),this._startedAt=null,this._resyncedAt=null},seek:function(e){this._startedAt=this._clock.now(),this._cancelSyncCheck(),this._clock.pause()},determineReason:function(){var e=s.a.Deferred(),t=this.determineReasonFromBuffer(),n=this.fetchTranscodeSession();return n.done(a.a.bind(function(n){var i=this.determineReasonFromTranscode(n);i===this.reasons.UNKNOWN&&(i=t),e.resolve(i)},this)),
n.fail(a.a.bind(function(){e.resolve(t)},this)),e.promise()},determineReasonFromTranscode:function(e){return!e.get("throttled")&&e.get("speed")<1?this.reasons.TRANSCODER:this.reasons.UNKNOWN},determineReasonFromBuffer:function(){var e=this.model.get("position"),t=this.model.get("endBuffer");return t&&t-e<this.networkReasonThreshold?this.reasons.NETWORK:this.reasons.UNKNOWN},fetchTranscodeSession:function(){if(this.model.get("directPlay"))return s.a.Deferred().reject().promise()
;var e=this.model.get("transcodeSessionID"),t=this.model.get("transcodeServer");return new h.a({key:e},{server:t}).fetch()},determineRecommendation:function(e){var t,n=this.model.get("qualityIndex");if(e===this.reasons.TRANSCODER)n>=0&&(t=this.recommendations.ORIGINAL_QUALITY);else if(e===this.reasons.NETWORK){var i=this.model.get("transcodeServer"),r=this.model.get("media"),s=l.a.getAvailableQualitiesFor(r,i);if(s.length&&this.model.get("canSetQuality")){var o=a.a.reduce(s,function(e,t){
return e&&e.index<t.index?e:t});(n<0||n>o.index)&&(t=this.recommendations.LOWER_QUALITY)}}return t?t:this.recommendations.NONE},_scheduleSyncCheck:function(){this._syncChecker||(this._syncChecker=setTimeout(this.onSyncCheck,this.syncDelay))},_cancelSyncCheck:function(){this._syncChecker=clearTimeout(this._syncChecker)},_shouldPlayClock:function(){return this.model.get("playing")||this.model.get("buffering")},onStateChange:function(e,t){this._shouldPlayClock()||(this._cancelSyncCheck(),
this._clock.pause(),this._clock.setPosition(e.get("position")))},onPositionChange:function(e,t){this._shouldPlayClock()&&(this._clock.play(),this._scheduleSyncCheck())},onSyncCheck:function(){var e=this._clock,t=e.now(),n=e.getPosition(),i=this.model.get("position"),r=n-i;this._startedAt+this.startDelay>t?e.setPosition(i):r>this.warningThreshold?(e.setPosition(i),this.model.get("buffering")||this.trigger("buffering"),this._hasWarned||(this._hasWarned=!0,
this.determineReason().done(a.a.bind(function(e){c.a.warn("Player: Excessive buffering detected; "+e),this.trigger("warn",{reason:e,recommendation:this.determineRecommendation(e)})},this)))):this._resyncedAt?t-this._resyncedAt>this.resyncDelay&&(this._resyncedAt=null,e.setPosition(i)):this._resyncedAt=t,this._syncChecker=null,this._scheduleSyncCheck()}});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(38),s=r.a.extend({_position:0,_timestamp:null,now:function(){return a.a.now()},
play:function(){null==this._timestamp&&(this._timestamp=this.now())},pause:function(){this._position=this.getPosition(),this._timestamp=null},getPosition:function(){return null!=this._timestamp?this.now()-this._timestamp+this._position:this._position},setPosition:function(e){this._position=e,null!=this._timestamp&&(this._timestamp=this.now())}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(519),s=a.a.extend({},r.a,{type:"music",qualities:{bitrate:[96,128,192,320]},
getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(519),o=a.a.extend({},s.a,{type:"photo",qualities:{photoResolution:["720x480","1280x720","1920x1080","3840x2160"],photoQuality:[24,49,74,99],title:function(){return[n.i(r.default)("Low"),n.i(r.default)("Medium"),n.i(r.default)("High"),n.i(r.default)("Highest")]}},getNearestIndexToQuality:function(e){
return this.getNearestIndex(this.qualities.photoQuality,e)}});t.a=o},function(e,t,n){"use strict";n(31),n(376),n(781)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";function i(){return"konvergo"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).id}var a=n(31);t.a=i},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";function i(){
return"windowskonvergo"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a).platformID}var a=n(31);t.a=i},function(e,t,n){"use strict";n(376)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict"},function(e,t,n){"use strict";n(31),n(783),n(784)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(376)
},function(e,t,n){"use strict";n(376)},function(e,t,n){"use strict";n(31),n(522),n(381)},function(e,t,n){"use strict";n(31),n(522),n(382)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31),n(523),n(525)},function(e,t,n){"use strict";n(31),n(523),n(524)},function(e,t,n){"use strict";n(31),n(524),n(526)},function(e,t,n){"use strict";n(31),n(525),n(526)},function(e,t,n){"use strict";n(31)},function(e,t,n){"use strict";n(31)},function(e,t,n){
"use strict";function i(e){var t=r.a.Deferred();return e.then(t.resolve,t.reject,t.notify),{promise:t.promise(),cancel:function(){t.reject({isCanceled:!0})}}}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){if(!e.length)return o.a.Deferred().reject().promise();var t=o.a.Deferred(),n=e.length;return r.a.each(e,function(e){e.done(function(){n--,t.resolveWith(this,arguments)}).fail(function(){0===--n&&t.reject()})}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s);t.a=i
},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(13),l=n(12),u=n(38),c=n(66),d=n(187),h=n(44),p=n(55),f=n(179),g=u.a.extend({lastModified:null,eTag:null,mixins:p.a,url:function(){var e=o.a("appModel"),t=e.get("user"),n="/sub/"+this.requestType+"/"+t.id+"/"+e.get("clientID"),i=new f.a({scheme:"websockets"===this.requestType?"wss":"https",address:"pubsub.plex.tv"});return this.server.resolveUrl(n,{connection:i,appendToken:!0})},initialize:function(e){
a.a.bindAll(this,"onSocketOpen","onSocketClose","onSocketError","onSocketMessage","onPollSuccess","onPollError"),this.server=e.server},open:function(){return(this.socket||this.pollRequest)&&this.close(),c.a.hasWebSocket?(this._deferred=s.a.Deferred(),this.requestType="websockets",this.socket=new window.WebSocket(a.a.result(this,"url")),this.socket.onopen=this.onSocketOpen,this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError,this.socket.onmessage=this.onSocketMessage,
this._deferred.promise()):this.poll()},close:function(){this.pollRequest&&(d.a.abort(this.pollRequest.rid),this.pollRequest=null),this._deferred&&"pending"===this._deferred.state()&&this._deferred.reject(),this.socket&&(this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close(),this.socket=null)},poll:function(){this.requestType="longpolling",this.pollUrl=a.a.result(this,"url");var e=this.server.getXHROptions(this.pollUrl)
;return e.headers["If-Modified-Since"]=this.lastModified?this.lastModified:"Thu, 01 Jan 1970 00:00:00 GMT",this.eTag&&(e.headers["If-None-Match"]=this.eTag),this.pollRequest=s.a.ajax(e).done(this.onPollSuccess).fail(this.onPollError),this.pollRequest.promise()},handleResponse:function(e){if(e){var t=h.a.parseXML(e);if(a.a.isObject(t)){var n=t.command;l.a.trigger("cloudServer:"+n,t)}}},onSocketOpen:function(e){this.server.set("hasEventConnection",!0),this.trigger("open",this.server,e),
this._deferred.resolve(this.server,e)},onSocketClose:function(e){this.close(),this.server.set("hasEventConnection",!1),this.trigger("close",this.server,e),this._deferred.reject(this.server,e)},onSocketError:function(e){this.close(),this.trigger("error",this.server,e),this._deferred.reject(this.server,e)},onSocketMessage:function(e){this.handleResponse(e.data)},onPollSuccess:function(e,t,n){this.trigger("open",this.server,e),this.lastModified=n.getResponseHeader("Last-Modified"),
this.eTag=n.getResponseHeader("ETag"),this.handleResponse(e),this.poll()},onPollError:function(e){this.pollRequest.aborting||this.trigger("error",this.server,e)}});t.a=g},function(e,t,n){"use strict";function i(e){var t={};for(var n in e){t[e[n]]={relationClass:r.a}}return a.a.extend({name:"EntitiesModel",sessionRelations:t})}var a=n(18),r=n(1162);t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(h.a)(e)?a(e,t):d.a.isArray(e)?r(e,t):e===t}function a(e,t){
for(var n=e.possibleEntityContainers,a=n?n.length:0,r=0;r<a;r++){if(i(e[n[r]],t))return!0}return!1}function r(e,t){for(var n=0,a=e.length;n<a;n++){if(i(e[n],t))return!0}return!1}function s(e,t){return e+1>=t?0:e+1}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null!=t.budget?t.budget:f,r=n.i(p.a)(),o=e.entities,l=u()(o),c=l.length,d={};for(v=g,y=m;g<c;){for(var h=l[g],b=o[h],S=u()(b),I=S.length,w=s(g,c);m<I;){var M=S[m],C=s(m,I);if(i(e,M)||(d[h]||(d[h]=[]),
d[h].push(M)),w===v&&C===y)return g=w,m=C,d;if(n.i(p.a)()-r>=a)return g=w,m=C,d;m++}if(g=w,m=0,g===v&&m===y)return d}return d}var l=n(70),u=n.n(l),c=n(2),d=n.n(c),h=n(316),p=n(780);t.a=o;var f=1e3/60,g=0,m=0,v=void 0,y=void 0},function(e,t,n){"use strict";function i(e){return e?e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):""}t.a=i},function(e,t,n){"use strict";function i(e){return n.i(r.default)(n.i(a.a)(e).join("_"))}var a=n(1389),r=n(253);t.a=i
},function(e,t,n){"use strict";function i(e){for(var t="",n=0,i=e.length;n<i;n++){var a=e.charAt(n),r=a.toUpperCase();t+=0===n?r:a===r?" "+r:a}return t}t.a=i},function(e,t,n){"use strict";function i(e){return e?e.match(/^[^A-Z]+|[A-Z]+(?![^A-Z])|[A-Z][^A-Z]+/g)||[]:[]}t.a=i},function(e,t,n){"use strict";function i(e){return e?r()("<p>"+e+"<p>").text():""}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(a.default)(n.i(r.getLastSegment)(e||""),t)}
Object.defineProperty(t,"__esModule",{value:!0});var a=n(790),r=n(19);t.default=i},function(e,t,n){"use strict";function i(){return a.replace(r,s)}var a="00000000-0000-4000-8000-000000000000",r=/0/g,s=function(){return(0|16*Math.random()).toString(16)};t.a=i},function(e,t,n){"use strict";function i(e){var t=r.a.reject(e.tags,function(e){return!e.tag}),i=e.model,a=i.section,l=a&&a.get("allowAdvancedFilters"),u=n.i(o.b)(i.get("type")),c=e.separator||", ",d="";if(t&&t.length){
var h=e.maxTags||t.length;h>t.length&&(h=t.length);for(var p=0;p<h;p++)d+=function(t){var i=r.a.escape(n.i(s.default)(t.tag,e.maxLen));return l&&t.id?'<a class="pivot-link" href="'+["#!/server/"+encodeURIComponent(a.server.id),"/section/"+encodeURIComponent(a.id),"/filter","/"+encodeURIComponent(u.id),"/"+encodeURIComponent(e.key),"/"+encodeURIComponent(t.id),"/"+encodeURIComponent(t.tag)].join("")+'">'+i+"</a>":i}(t[p]),p+1<h&&(d+=c)}return d}var a=n(2),r=n.n(a),s=n(789),o=n(34);t.a=i
},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r={augmentDictionary:function(e,t){return t=t||{},a.a.reduce(e,function(e,n,i){var s=(new Date).getTime(),o=a.a.isFunction(t.ttl)?t.ttl(i,n):t.ttl,l=a.a.isFunction(t.refresh)?t.refresh(i,n):t.refresh,u=a.a.isObject(n)?r.augmentObj(n,o,l,s):null;return u&&(e[i]=u),e},{})},augmentObj:function(e,t,n,i){var a=e._ttl;if(i=i||(new Date).getTime(),a){if(n)a.expireAt=i+t;else if(a.expireAt<=i)return null}else a={expireAt:i+t};return e._ttl=a,e}};t.a=r
},function(e,t,n){"use strict";var i=n(4),a=n(214),r=["key"],s=n.i(a.a)(r,[{key:"all",title:function(){return n.i(i.default)("All")}},{key:"unwatched",title:function(){return n.i(i.default)("Unwatched")}},{key:"newest",title:function(){return n.i(i.default)("Recently Released")}},{key:"recentlyAdded",title:function(){return n.i(i.default)("Recently Added")}},{key:"recentlyViewed",title:function(){return n.i(i.default)("Recently Viewed")}},{key:"recentlyViewedShows",title:function(){
return n.i(i.default)("Recently Viewed Shows")}},{key:"onDeck",title:function(){return n.i(i.default)("On Deck")}},{key:"folder",title:function(){return n.i(i.default)("By Folder")}}]);t.a=s},function(e,t,n){"use strict";function i(e,t){var i=n.i(r.a)(t,!0);if(!i)return e;var a=e.indexOf("?"),s=e.length;return(e+=a>-1?a<s-1?"&":"":"?")+i}function a(e,t){var n=t.type,a=t.filters,r=t.sort,o=t.limit,l=s.join(e),u={};return n&&(u.type=n),r&&(u.sort=r),o&&(u.limit=o),s.join(i(l,a),u)}
var r=n(750),s=n(19);t.a=a},function(e,t,n){"use strict";function i(e){function t(){window.document.body.removeChild(u),window.removeEventListener("message",n),clearTimeout(l)}function n(e){if(e.source===u.contentWindow){var n=void 0;try{n=JSON.parse(e.data)}catch(e){}n&&(s(n),t())}}var i=e.url,a=e.data,s=e.onMessage,o=e.timeout,l=setTimeout(function(){s({success:!1}),t()},o);window.addEventListener("message",n);var u=window.document.createElement("iframe");u.style.display="none",
u.src=i+"#"+encodeURIComponent(r()({data:a})),window.document.body.appendChild(u)}var a=n(113),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e,t,n){e.dataTypes.shift();var i,a=r.a.extend({},t,{skipCorsWithRedirect:!0,complete:null,error:null,success:null});return{send:function(e,s){a.error=function(e,t,i){r.a.extend(n,e),s(e.status,t,{alreadyConverted:e.responseText},e.getAllResponseHeaders())},a.success=function(e,l,u){r.a.extend(n,u);var c=u.getResponseHeader("Location")
;200===u.status&&c&&t&&!t.skipCorsLocationRequest?(a.url=c,i=o.a.ajax(a)):s(u.status,l,{alreadyConverted:u.responseText},u.getAllResponseHeaders())},i=o.a.ajax(a)},abort:function(){i&&i.abort()}}}var a=n(2),r=n.n(a),s=n(5),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.type,n=e.contentType,i=e.headers,a=e.allowHeadersInUrl,p=e.allowBlacklistedMethodHeaders;if(a&&(!l[t]||p)){var f={},g=!1;if(r.a.each(i,function(e,t){u[t]||(d.test(t)?(g=!0,f[t]=e,
delete i[t]):o.a.warn('Did not move header "%s" to query string. This can result in an unnecessary OPTIONS preflight request.',t))}),g){var m=e.url.match(h),v=m||[null,e.url,null],y=v[1],b=v[2],S=b?b.split("&"):[],I=r.a.partition(S,function(e){return d.test(e)}),w=I[0],M=I[1],C=e.data;"GET"===t&&C&&(M.push(r.a.isString(C)?C:s.stringifyParams(C)),delete e.data),w.forEach(function(e){var t=e.match(d);t&&delete f[t[1]]});var D=s.stringifyParams(f);D&&w.push(D),e.url=y+"?"+M.concat(w).join("&")}
n&&!c.test(n)&&o.a.warn('Sending %s request with Content-Type "%s". This can result in an unnecessary OPTIONS preflight request.',t,n)}}var a=n(2),r=n.n(a),s=n(19),o=n(28);t.a=i;var l={PUT:!0,DELETE:!0},u={Accept:!0,"Accept-Language":!0,"Content-Language":!0,"Content-Type":!0},c=/^(text\/plain|multipart\/form-data|application\/x-www-form-urlencoded)/,d=/(^X\-Plex\-[^=]+)/i,h=/(^[^\?]+)\?(.+$)/},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(15),s=n(792),o=n(1285),l=r.a.View.extend({
constructor:function(){r.a.View.prototype.constructor.apply(this,arguments)},initialize:function(){r.a.View.prototype.initialize.apply(this,arguments),this.pool=new o.a(this)},render:function(){this.isRendered||this.triggerMethod("before:render",this),this.isRendered=!0;var e=this.getLockIndexes();this.pool.lockOrCreate(e,this.createCellView,this),this.scheduleFilling(e),this.prepareCells(e),this.pool.each(this.moveCell,this),this.moveElement(),this.clearVisibleReusedCells()},
createCellView:function(e){var t=r.a.getOption(this,"itemView"),n=r.a.getOption(this,"itemViewOptions");a.a.isFunction(n)&&(n=n.call(this,e));var i=new t(n);return i._parentView=this,i.render(),this.$el.append(i.$el),i},scheduleFilling:function(e){s.a.cancel(this.cid),a.a.each(e,function(e){var t=this.pool.find(e);t.filledWithIndex!==t.id&&s.a.enqueue(function(){var e=this.fillCell(t);return e&&(t.filledWithIndex=t.id),e},this,this.cid)},this)},prepareCells:function(){
this.pool.each(this.prepareCell,this)},clearVisibleReusedCells:function(){var e=this.getVisibleBounds();this.pool.each(function(t){var n=t.filledWithIndex===t.id,i=t.filledWithIndex===-1;!(t.id>=e.from&&t.id<=e.to)||n||i||(this.clearCell(t),t.filledWithIndex=-1)},this)},_getImmediateChildren:function(){return a.a.pluck(this.pool.pool,"view")},onClose:function(){s.a.cancel(this.cid),this.pool.close()}});t.a=l},function(e,t,n){"use strict"
;var i=n(2827),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),u=n(15),c=n(3096),d=n.n(c),h=n(28),p=n(40),f=n(735),g=f.a.NORMAL,m=u.a.ItemView.extend({className:"video-subtitles-renderer",template:a.a,initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.i(h.a)("[Subtitles] Initializing"),l.a.bindAll(this,"loadSubtitles","renderSubtitles","resizeSubtitles","getPosition","setClockState","onSubtitleFailure"),d.a.debugMode=!1,this.delay=e.delay||0,
this.subtitleSize=e.subtitleSize||g,this.rendererOptions=l.a.defaults(e.rendererOptions||{},{enableSvg:!1,preciseOutlines:!1}),this.listenTo(this.model,{"change:state":this.onPlayerStateChange,"change:position":this.onPlayerPositionChange,"change:showFullScreen":this.onShowFullScreenChange}),this.debouncedResize=l.a.debounce(this.resizeSubtitles,200),this.errorCount=0},loadSubtitles:function(){var e=this;this.loadTimeout&&(this.loadTimeout=clearTimeout(this.loadTimeout))
;var t=this.model.get("subtitlesUrl");this.positionAtTimeOfRequest=this.model.get("position"),n.i(h.a)("[Subtitles] loading subtitles. position: %s url: %s",this.positionAtTimeOfRequest,t),this.abortStream();var i=this.xhr=new window.XMLHttpRequest,a=new d.a.parser.XhrStream(this.xhr),r=new d.a.parser.StreamParser(a);i.onreadystatechange=function(t){4===t.currentTarget.readyState&&(t.currentTarget.status>=200&&t.currentTarget.status<300?e.errorCount=0:e.onSubtitleFailure())},i.open("GET",t,!0),
i.send(),r.minimalASS.then(this.renderSubtitles,this.onSubtitleFailure)},renderSubtitles:function(e){n.i(h.a)("[Subtitles] Starting to render subtitles"),this.destroySubtitles(),this.clock=new d.a.renderers.AutoClock(this.getPosition,1e3),this.renderer=new d.a.renderers.WebRenderer(e,this.clock,this.el,this.rendererOptions),this.setSubtitleSize(),this.resizeSubtitles(),this.setClockState(),s()(window).on("resize",this.debouncedResize)},destroySubtitles:function(){
this.loadTimeout&&(this.loadTimeout=clearTimeout(this.loadTimeout)),this.clock&&(this.clock.disable(),this.clock=null),this.renderer&&(this.renderer.disable(),this.renderer=null)},abortStream:function(){this.xhr&&(n.i(h.a)("[Subtitles] Aborting existing xhr."),this.xhr.onreadystatechange=null,this.xhr.abort(),this.xhr=null)},setSubtitleSize:function(){var e=this.renderer._ass._properties,t=this.subtitleSize/100;e._resolutionX/=t,e._resolutionY/=t},resizeSubtitles:function(){
n.i(h.a)("[Subtitles] Resizing subtitles"),this.renderer.resize(this.$el.width(),this.$el.height())},getPosition:function(){var e=this.model.get("position"),t=this.model.get("offset")||0,n=(e-t+this.delay)/1e3;if(n%1e3){var i=this.clock.currentTime;if(Math.floor(i)===n)return i}return n},setClockState:function(){var e=this.clock;if(e){var t=p.a.states;switch(this.model.get("state")){case t.BUFFERING:case t.PAUSED:n.i(h.a)("[Subtitles] Clock State: paused"),e.pause();break;case t.PLAYING:
n.i(h.a)("[Subtitles] Clock State: playing"),e.play();break;case t.STOPPED:case t.ERROR:n.i(h.a)("[Subtitles] Clock State: disabled"),e.disable()}}},shouldResetStream:function(e){var t=e.get("position"),n=e.previous("position"),i=this.positionAtTimeOfRequest,a=t-n,r=e.get("state")===p.a.states.PLAYING;if(r&&this._resetLater)return this._resetLater=!1,!0;var s=!1;return(!this.xhr||a>0&&a>1e4||t<i)&&(s=!0),r||(s=!1,this._resetLater=!0),s},onPlayerStateChange:function(e,t){this.setClockState()},
onPlayerPositionChange:function(e,t){this.shouldResetStream(e)&&this.loadSubtitles()},onShowFullScreenChange:function(e,t){this.resizeSubtitles()},onSubtitleFailure:function(){if(!this.model.get("stopped")&&!this.isClosed){var e=this.xhr.readyState,t=this.xhr.status;0!==t&&this.errorCount++,h.a.warn("[Subtitles] Request failed. statusCode:%s state:%s errorCount:%s %s",t,e,this.errorCount,this.xhr.errorString||""),
this.errorCount>3?this.model.set("softSubtitlesFailed",!0):this.loadTimeout=setTimeout(this.loadSubtitles,3e3)}},onClose:function(){n.i(h.a)("[Subtitles] Closing"),s()(window).off("resize",this.debouncedResize),this.destroySubtitles(),this.abortStream()}});t.a=m},function(e,t,n){"use strict";var i=n(2828),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(143),d=u.a.ItemView.extend({className:"video-image-overlay",template:a.a,initialize:function(e){this.videoAspectRatio=e.videoAspectRatio,
this.overscan=e.overscan,this.throttledSetStyles=s.a.throttle(this.whenRendered(this.setStyles),100),this.image=new c.a({model:this.model,modelAttribute:"key",width:this.model.get("width"),height:this.model.get("height"),background:!0}),this.setStyles(),"video"===this.model.get("relative")&&l()(window).on("resize",this.throttledSetStyles)},setStyles:function(){if("video"===this.model.get("relative")&&!this.videoAspectRatio)return void this.$el.addClass("hidden")
;var e=this.model.get("alignHorizontal"),t=this.model.get("alignVertical"),n=this.model.get("width"),i=this.model.get("height"),a=0,r=0,s=this.getOffset(),o={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto",backgroundSize:n+"px "+i+"px",backgroundRepeat:"no-repeat",width:n,height:i};"center"===e?(o.left="50%",a="-50%"):"left"===e?o.left=s.x:"right"===e&&(o.right=s.x),"middle"===t?(o.top="50%",r="-50%"):"top"===t?o.top=s.y:"bottom"===t&&(o.bottom=s.y),
o.transform="translate("+a+", "+r+")",o.marginTop=this.model.get("marginTop")||0,o.marginRight=this.model.get("marginRight")||0,o.marginBottom=this.model.get("marginBottom")||0,o.marginLeft=this.model.get("marginLeft")||0,this.$el.css(o),this.$el.removeClass("hidden")},getOffset:function(){var e={x:0,y:0};if("video"===this.model.get("relative")){var t=l()(window).width(),n=l()(window).height(),i=t/n;if(this.videoAspectRatio>i){var a=t/this.videoAspectRatio;e.y=(n-a)/2}else{
var r=n*this.videoAspectRatio;e.x=(t-r)/2}}return this.overscan&&(e.x+=this.overscan.x,e.y+=this.overscan.y),e},onRender:function(){this.image.setElement(this.$el)},onClose:function(){l()(window).off("resize",this.throttledSetStyles),this.image.close()}});t.a=d},function(e,t,n){"use strict";var i=n(2829),a=n.n(i),r=n(15),s=n(695),o=n(1402),l=r.a.CompositeView.extend({className:"video-image-overlays-container",template:a.a,itemView:o.a,itemViewContainer:".video-player-image-overlays",
itemViewOptions:function(){return{videoAspectRatio:this.getVideoAspectRatio(),overscan:this.overscan}},modelEvents:{"change:media":"onMediaChange","change:videoDimensions":"onVideoDimensionsChange"},overscan:null,initialize:function(e){e||(e={}),this.overscan=e.overscan||this.overscan,this.collection=new s.a,this.populateCollection()},populateCollection:function(){var e=this.model.get("metadataItem"),t=e&&e.get("overlays");t?this.collection.reset(t.models):this.collection.reset()},
getVideoAspectRatio:function(){var e=this.model.get("videoDimensions");if(e)return e.width/e.height},onMediaChange:function(e,t){this.populateCollection()},onVideoDimensionsChange:function(e,t){var n=this.getVideoAspectRatio();n&&this.children.each(function(e){"video"===e.model.get("relative")&&(e.videoAspectRatio=n,e.setStyles())})}});t.a=l},function(e,t,n){"use strict";var i=n(4),a=n(254),r=a.a.extend({serializeData:function(){return{title:n.i(i.default)("This channel is not responding.")}}})
;t.a=r},function(e,t,n){"use strict";var i=n(254),a=i.a.extend({initialize:function(e){this.title=e.title,this.subtitle=e.subtitle,this.message=e.message},serializeData:function(){return{title:this.title,subtitle:this.subtitle,message:this.message}}});t.a=a},function(e,t,n){"use strict";var i=n(4),a=n(254),r=a.a.extend({initialize:function(e){this.type=e.type||"404"},serializeData:function(){var e,t;return"404"===this.type?(e=n.i(i.default)("You must be lost."),
t=n.i(i.default)("This page doesn't exist.")):"server"===this.type?(e=n.i(i.default)("Media server not found."),t=n.i(i.default)("The server you're trying to access doesn't seem to exist.")):(e=n.i(i.default)("Media not found."),t=n.i(i.default)("The media you're trying to access doesn't seem to exist.")),{title:e,subtitle:t}}});t.a=r},function(e,t,n){"use strict";var i=n(254),a=i.a.extend({});t.a=a},function(e,t,n){"use strict";var i=n(4),a=n(254),r=a.a.extend({serializeData:function(){return{
title:n.i(i.default)("No soup for you!"),subtitle:n.i(i.default)("The server you're trying to access doesn't want to let you in. Make sure you're signed in as a user with access to this server.")}}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(12),o=n(254),l=o.a.extend({modelEvents:{"change:isResolved":"onResolvedChange"},serializeData:function(){var e,t,i=this.model,s=i.get("friendlyName")
;return i.get("cloud")?i.get("isDownForMaintenance")?(e=n.i(r.default)("Plex is down for maintenance."),t=n.i(r.default)("Don't worry, it'll be back soon.")):(e=n.i(r.default)("Plex is not reachable."),t=n.i(r.default)("Make sure your server has an internet connection and any firewalls or other programs are set to allow access.")):(e=n.i(r.default)("Server unavailable."),
t=s?n.i(r.default)("We couldn't reach \"{1}\". Make sure it's online and try again.",a.a.escape(s)):n.i(r.default)("We couldn't reach this server. Make sure it's online and try again.")),{title:e,subtitle:t}},onResolvedChange:function(e,t){t&&s.a.trigger("navigate:refresh")}});t.a=l},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(1008),f=n.n(p),g=n(28),m=n(33),v=n(40),y=n(535),b=function(e){function t(i,a){s()(this,t)
;var r=l()(this,e.call(this,i,a));return r.onElementChange=function(e){r._hls.on(f.a.Events.MEDIA_ATTACHED,r.onMediaAttached),r._hls.on(f.a.Events.MANIFEST_PARSED,r.onManifestParsed),r._hls.on(f.a.Events.ERROR,r.onError),r._hls.attachMedia(e)},r.onMediaAttached=function(){r._hls.loadSource(r.props.src)},r.onManifestParsed=function(){r.setState({isReadyToPlay:!0})},r.onError=function(e,t){if(t.fatal){var n=t.type===f.a.ErrorTypes.NETWORK_ERROR,i=t.type===f.a.ErrorTypes.MEDIA_ERROR,a=!n&&!i
;r._failCount+=1,r._failCount>3||a?r.onMediaStateChange(v.a.mediaStates.ERROR):n?(g.a.warn("[Player] HLS Network Error - attempting recovery"),r._hls.startLoad()):i&&(g.a.warn("[Player] HLS Media Error - attempting recovery"),r._failCount>1&&r._hls.swapAudioCodec(),r._hls.recoverMediaError())}},r.onMediaStateChange=function(e){e===v.a.mediaStates.READY&&(r._failCount=0),r.props.onMediaStateChange(e)},n.i(m.a)(f.a.isSupported(),"Attempted to use HLSMedia without hls.js support"),r.state={
isReadyToPlay:!1},r}return c()(t,e),t.prototype.componentWillMount=function(){this._hls=new f.a,this._failCount=0},t.prototype.componentWillUnmount=function(){this._hls.destroy(),this._hls=null},t.prototype.render=function(){return h.a.createElement(y.a,a()({isReadyToPlay:this.state.isReadyToPlay,onElementChange:this.onElementChange},this.props,{onMediaStateChange:this.onMediaStateChange}))},t}(d.Component);t.a=b},function(e,t,n){"use strict"
;var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=(n.n(u),function(e){function t(){var n,i,r;a()(this,t);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return n=i=s()(this,e.call.apply(e,[this].concat(l))),i.onTick=function(){var e=Date.now()-i._initialMilliseconds;i.props.onTick&&i.props.onTick(Math.floor(e/1e3))},r=n,s()(i,r)}return l()(t,e),t.prototype.componentDidMount=function(){this._initialMilliseconds=Date.now(),
this._positionTimer=setInterval(this.props.onPositionUpdate,40),this._tickTimer=setInterval(this.onTick,1e3)},t.prototype.componentWillReceiveProps=function(e){var t=Math.abs(e.positionSeconds-this.props.positionSeconds)>1;this.props.onSeek&&t&&this.props.onSeek(e.positionSeconds)},t.prototype.componentWillUnmount=function(){clearInterval(this._positionTimer),clearInterval(this._tickTimer)},t.prototype.render=function(){return null},t}(u.Component));t.a=c},function(e,t,n){"use strict"
;function i(e){var t=e.component,n=e.transitionProps,i=e.isLoaded,a=e.style,s=e.src,l=e.prevSrc,h=r()(e,["component","transitionProps","isLoaded","style","src","prevSrc"]);return u.a.createElement(c.a,n,i&&u.a.createElement(t,o()({style:d(2,a)},h,{key:s,src:s})),!i&&l&&u.a.createElement(t,o()({style:d(1,a)},h,{key:l,src:l})))}var a=n(16),r=n.n(a),s=n(6),o=n.n(s),l=n(1),u=n.n(l),c=(n(798),n(796),n(255)),d=function(e,t){return o()({position:"absolute",zIndex:e},t)};t.a=i},function(e,t,n){
"use strict";function i(e,t){return Math.random()*(t-e)+e}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),n(166)),f=n(2530),g=n.n(f),m=function(e){function t(n,i){o()(this,t);var a=u()(this,e.call(this,n,i));return a._setBarValues(n),a.state=a._getInitialState(!0),a}return d()(t,e),t.prototype.componentDidMount=function(){for(var e=0,t=this._bars.length;e<t;e++)this._setTransitionTimeout(e)},t.prototype.componentWillReceiveProps=function(e){
var t=e.width!==this.props.width,n=e.barCount!==this.props.barCount,i=e.barGap!==this.props.barGap;(t||n||i)&&(this._clearAllTransitionTimeouts(),this._setBarValues(e),this.setState(this._getInitialState()))},t.prototype.componentDidUpdate=function(e,t){for(var n=0,i=this._bars.length;n<i;n++){var a=this._bars[n];t[a]!==this.state[a]&&this._setTransitionTimeout(n)}},t.prototype.componentWillUnmount=function(){this._clearAllTransitionTimeouts()},t.prototype._setBarValues=function(e){
var t=e.width,n=e.barCount,i=e.barGap,a=i*(n-1);this._barGap=i,this._barWidth=Math.floor((t-a)/n),this._bars=[];for(var r=0,s=n;r<s;r++)this._bars.push("bar"+r)},t.prototype._getInitialState=function(e){var t=this;return this._bars.reduce(function(n,i,a){return n[i]=t._getRandomStyle(a,e),n},{})},t.prototype._getRandomStyle=function(e,t){var n=e*(this._barWidth+this._barGap),a=t?.2:i(.2,1),r="scaleY("+a+")",s=i(300,500);return{left:n,width:this._barWidth,backgroundColor:this.props.barColor,
transitionDuration:s+"ms",WebkitTransform:r,msTransform:r,transform:r}},t.prototype._setTransitionTimeout=function(e){var t=this,i=this._bars[e],a=i+"TimeoutID",r=this.state[i],s=n.i(p.a)(r.transitionDuration)-100;this[a]=setTimeout(function(){var n;t.setState((n={},n[i]=t._getRandomStyle(e),n))},s)},t.prototype._clearAllTransitionTimeouts=function(){for(var e=0,t=this._bars.length;e<t;e++){var n=this._bars[e],i=n+"TimeoutID";clearTimeout(this[i])}},t.prototype.render=function(){
var e=this,t=this.props,n=t.className,i=t.width,a=t.height;return r()("div",{className:n,style:{width:i,height:a}},void 0,this._bars.map(function(t){return r()("div",{className:g.a.bar,style:e.state[t]},t)}))},t}(h.Component);m.defaultProps={className:g.a.equalizer,width:14,height:14,barColor:"#fff",barCount:3,barGap:2},t.a=m},function(e,t,n){"use strict";function i(e){var t=e.children,n=u()(e,["children"]);return d.a.createElement(h.a,r()({},n,{mode:"dropdown"}),o()("div",{},void 0,t))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(256);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.metricsPage;return o.a.createElement(l.a,r()({},e,{page:n}))}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(256);i.contextTypes={metricsPage:s.PropTypes.string.isRequired},t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.bubbles,i=t.captures;if(n||i){var a={};n&&(a.bubbled="on"+e),i&&(a.captured="on"+e+"Capture"),t.phasedRegistrationNames=a
}else t.registrationName="on"+e;t.dependencies||(t.dependencies=[])}function a(e,t,n,i,a,r){var s=e[n];if(s){var o=t.getPooled(s,i,a,r);return(s.bubbles||s.captures?d.a.accumulateTwoPhaseDispatches:d.a.accumulateDirectDispatches)(o),o}}function r(e){var t={eventTypes:o.a.extend(!0,{},e.eventTypes)},n={};for(var r in t.eventTypes){var s=t.eventTypes[r],l=r.charAt(0).toUpperCase()+r.slice(1),c="top"+l;i(l,s),n[c]=s,u.a.topLevelTypes[c]=c}
return t.extractEvents=e.extractEvents||a.bind(null,n,e.Event||p.a),t}var s=n(5),o=n.n(s),l=n(3214),u=n.n(l),c=n(293),d=n.n(c),h=n(155),p=n.n(h);t.a=r},function(e,t,n){"use strict";function i(){function e(){var e=void 0;return i.length?e=i.shift():(e=n+o,o++),e}function t(e){delete a[e]}var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=[],a={},s={},o=0;return{getKeys:function(n,o,l){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments[4]
;r.a.each(a,function(e,t){var a=e.item;if(null===a)i.push(t);else{var d=r.a.isString(a)?a:a[c],h=l.indexOf(a)+u;(h<n||h>o)&&(i.push(t),delete s[d])}});for(var d=n;d<=o;d++){var h=l[d-u]||null,p=h&&(r.a.isString(h)?h:h[c]),f=h&&s[p];f||(f=e(),h&&(s[p]=f)),a[f]={index:d,item:h}}return i.forEach(t),i.length=0,r.a.extend({},a)}}}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.activeConnection,i=!1,r=void 0
;return e.isConnected&&t?r=e.isCloudSyncServer?n.i(a.default)("Cloud"):e.isOutOfDate?n.i(a.default)("Needs Update"):t.relay?n.i(a.default)("Indirect"):t.isPrivate?n.i(a.default)("Nearby"):n.i(a.default)("Remote"):e.isRelayed?r=n.i(a.default)("Indirect"):e.isUnavailable?r=n.i(a.default)("Unavailable"):(i=!0,r=n.i(a.default)("Connecting")),{isConnecting:i,status:r,statusWithSource:e.sourceTitle?r+" ("+e.sourceTitle+")":r}}var a=n(4);t.a=i},function(e,t,n){"use strict";function i(e,t){
return Math.max(Math.min(e,t-1),0)}t.a=i},function(e,t,n){"use strict";var i={},a={getPageKey:function(){return window.location.hash},get:function(e){return i[e]},set:function(e,t){i[e]=t},remove:function(e){delete i[e]},clear:function(){i={}}};t.a=a},function(e,t,n){"use strict";function i(e){switch(e){case r.a:return n.i(a.default)("No seasons");case r.b:return n.i(a.default)("No episodes");case r.c:return n.i(a.default)("No albums");case r.d:return n.i(a.default)("No tracks");case r.e:
return n.i(a.default)("No photos");default:return n.i(a.default)("No items")}}var a=n(4),r=n(394);t.a=i},function(e,t,n){"use strict";function i(e){switch(e){case r.a:return n.i(a.default)("Unable to load seasons");case r.b:return n.i(a.default)("Unable to load episodes");case r.c:return n.i(a.default)("Unable to load albums");case r.d:return n.i(a.default)("Unable to load tracks");case r.e:return n.i(a.default)("Unable to load photos");default:return n.i(a.default)("Unable to load items")}}
var a=n(4),r=n(394);t.a=i},function(e,t,n){"use strict";function i(e){switch(e){case r.a:return n.i(a.default)("Loading seasons");case r.b:return n.i(a.default)("Loading episodes");case r.c:return n.i(a.default)("Loading albums");case r.d:return n.i(a.default)("Loading tracks");case r.e:return n.i(a.default)("Loading photos");default:return n.i(a.default)("Loading items")}}var a=n(4),r=n(394);t.a=i},function(e,t,n){"use strict";function i(e,t){switch(e){case r.a:return n.i(a.default)("Seasons")
;case r.b:return 1===t?n.i(a.default)("1 Episode"):n.i(a.default)("{episodeCount} Episodes",{episodeCount:t});case r.c:return 1===t?n.i(a.default)("1 Album"):n.i(a.default)("{albumCount} Albums",{albumCount:t});case r.d:return 1===t?n.i(a.default)("1 Track"):n.i(a.default)("{trackCount} Tracks",{trackCount:t})}}var a=n(4),r=n(394);t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"UP",function(){return i}),n.d(t,"RIGHT",function(){return a}),
n.d(t,"DOWN",function(){return r}),n.d(t,"LEFT",function(){return s}),n.d(t,"all",function(){return o});var i="up",a="right",r="down",s="left",o=[i,a,r,s]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"NONE",function(){return i}),n.d(t,"VERTICAL",function(){return a}),n.d(t,"HORIZONTAL",function(){return r}),n.d(t,"OMNI",function(){return s}),n.d(t,"all",function(){return o});var i="none",a="vertical",r="horizontal",s="omni",o=[i,a,r,s]},function(e,t,n){
"use strict";n.d(t,"a",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return o}),n.d(t,"f",function(){return l});var i="top",a="middle",r="bottom",s="left",o="right",l="center"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"d",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s});var i="top",a="right",r="bottom",s="left"},function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"TOP_LEFT",function(){return i}),n.d(t,"TOP_CENTER",function(){return a}),n.d(t,"TOP_RIGHT",function(){return r}),n.d(t,"BOTTOM_LEFT",function(){return s}),n.d(t,"BOTTOM_CENTER",function(){return o}),n.d(t,"BOTTOM_RIGHT",function(){return l}),n.d(t,"MIDDLE_LEFT",function(){return u}),n.d(t,"MIDDLE_RIGHT",function(){return c}),n.d(t,"all",function(){return d})
;var i="topLeft",a="topCenter",r="topRight",s="bottomLeft",o="bottomCenter",l="bottomRight",u="middleLeft",c="middleRight",d=[i,a,r,s,o,l,u,c]},function(e,t,n){"use strict";function i(e,t,n){return e.reduce(function(e,i){return e[i]={current:t[i],next:n[i]},e},{})}function a(e,t){var n=s()(e,t);return o.reduce(function(a,r){return n[r].length&&(a[r]=i(n[r],e,t)),a},{})}var r=n(3298),s=n.n(r);t.a=a;var o=["added","deleted","updated"]},function(e,t,n){"use strict";function i(e,t,i){var a=r()({
collapsed:!1,name:""},i),o=a.name,l=a.collapsed,u="shallowCompare()"+(o?": "+o:""),c=window.console;l&&c.groupCollapsed?c.groupCollapsed(u):c.group(u);var d=n.i(s.a)(e,t,i);for(var h in d)c.debug(h+":",d[h]);c.groupEnd()}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),r=n.n(a),s=n(1430);t.default=i},function(e,t,n){"use strict";var i=n(12),a=n(38),r=n(867),s=a.a.extend({shortcuts:[{keys:["?"],fn:"help",group:"navigation",label:"Open Keyboard Shortcuts"},{keys:["esc"],fn:"escape",
group:"navigation",label:"Close Modal or Close Player"},{keys:["g d"],fn:"dashboard",group:"navigation",label:"Navigate to Dashboard"},{keys:["g s"],fn:"settings",group:"navigation",label:"Navigate to Settings"},{keys:["g a"],fn:"activity",group:"navigation",label:"Navigate to Activity"},{keys:["g w"],fn:"watchLater",group:"navigation",label:"Navigate to Watch Later"},{keys:["g r"],fn:"recommendations",group:"navigation",label:"Navigate to Recommended"},{keys:["g u"],fn:"users",
group:"navigation",label:"Navigate to Users"},{keys:["/"],fn:"search",group:"actions",label:"Focus Search"},{keys:["p"],fn:"playSelected",group:"actions",label:"Open Player"},{keys:["w"],fn:"toggleWatched",group:"actions",label:"Toggle as Watched/Unwatched"},{keys:["e"],fn:"edit",group:"actions",label:"Edit Metadata"},{keys:["i"],fn:"info",group:"actions",label:"Get Info"},{keys:["shift+s"],fn:"save",group:"actions",label:"Save Changes"},{keys:["space","play_pause"],fn:"playPause",
group:"player",label:"Play or Pause"},{keys:["play"],fn:"play",group:"player",label:"Play"},{keys:["pause"],fn:"pause",group:"player",label:"Pause"},{keys:["\\"],fn:"toggleFullScreen",group:"player",label:"Toggle FullScreen"},{keys:["down"],fn:"decreaseVolume",group:"player",label:"Decrease Volume"},{keys:["up"],fn:"increaseVolume",group:"player",label:"Increase Volume"},{keys:[",","shift+left"],fn:"seekBackward",group:"player",label:"Seek Backward (10 seconds)"},{keys:[".","shift+right"],
fn:"seekForward",group:"player",label:"Seek Forward (30 seconds)"},{keys:["[","alt+left"],fn:"stepBackward",group:"player",label:"Step Backward (10 minutes)"},{keys:["]","alt+right"],fn:"stepForward",group:"player",label:"Step Forward (10 minutes)"},{keys:["left","step_backward"],fn:"skipPrevious",group:"player",label:"Skip to Previous Item"},{keys:["right","step_forward"],fn:"skipNext",group:"player",label:"Skip to Next Item"}],triggerShortcut:function(e){var t="shortcut:"+e
;if(i.a.hasListener(t))return i.a.trigger(t),!1},help:function(e){i.a.trigger("show:modal",new r.a({shortcuts:this.shortcuts}))},escape:function(e){i.a.hasListener("shortcut:escape")?i.a.trigger("shortcut:escape"):i.a.hasListener("shortcut:stop")&&i.a.trigger("shortcut:stop")},dashboard:function(e){i.a.trigger("navigate","dashboard")},settings:function(e){i.a.trigger("navigate","settings")},activity:function(e){i.a.trigger("navigate","activity")},watchLater:function(e){
i.a.trigger("navigate","userPlaylist",{key:"queue"})},recommendations:function(e){i.a.trigger("navigate","userPlaylist",{key:"recommendations"})},users:function(e){i.a.trigger("navigate","users")},search:function(e){return this.triggerShortcut("search")},playSelected:function(e){return this.triggerShortcut("playSelected")},toggleWatched:function(e){return this.triggerShortcut("toggleWatched")},edit:function(e){return this.triggerShortcut("edit")},info:function(e){
return this.triggerShortcut("info")},save:function(e){return this.triggerShortcut("save")},playPause:function(e){return this.triggerShortcut("playPause")},play:function(e){return this.triggerShortcut("play")},pause:function(e){return this.triggerShortcut("pause")},toggleFullScreen:function(e){return this.triggerShortcut("toggleFullScreen")},decreaseVolume:function(e){return this.triggerShortcut("decreaseVolume")},increaseVolume:function(e){return this.triggerShortcut("increaseVolume")},
seekBackward:function(e){return this.triggerShortcut("seekBackward")},seekForward:function(e){return this.triggerShortcut("seekForward")},stepBackward:function(e){return this.triggerShortcut("stepBackward")},stepForward:function(e){return this.triggerShortcut("stepForward")},skipPrevious:function(e){return this.triggerShortcut("skipPrevious")},skipNext:function(e){return this.triggerShortcut("skipNext")}});t.a=s},function(e,t,n){"use strict";var i=n(13),a=n(19),r=n(38),s=n(1156),o=r.a.extend({
mixins:s.a,constructor:function(){this.basePath=n.i(a.join)(["/web/","translations"]),this.translations={},n.i(i.d)("appModel").done(this.onAppModelRegistered.bind(this))},onAppModelRegistered:function(e){e.get("settings").on("change:language",function(e,t){this.load(t)},this)}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(1031),s=n.n(r),o=n(1103),l=n(212),u=a.a.extend({},o.a,{init:function(e){var t=new RegExp(n.i(l.a)("-plex-3.9.1-85417e0"));s.a.config(e,{
shouldSendCallback:function(e){return t.test(e.culprit)}})}});t.a=u},function(e,t,n){"use strict";var i=n(470),a=n(1434),r=n(678),s=n(1106),o=n(40),l=n(299),u=n(1444),c=n(1438),d=n(1108),h={registerAll:function(){i.a.register(a.a),r.a.register(new s.a);var e=new u.a,t=new c.a;l.a.register({protocol:"plex",type:"*",create:function(t,n){return e.createController(t,n)}}),l.a.register({protocol:"cast",type:"*",create:function(e,n){return t.createController(e,n)}}),l.a.register({protocol:"local",
type:o.a.types.PHOTO,create:function(e){return new d.a({type:e})}})}};t.a=h},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(13),s=n(31),o={init:function(){var e=n.i(r.a)("appModel"),t=window.innerWidth+"x"+window.innerHeight,i=window.screen.width+"x"+window.screen.height,o={"X-Plex-Product":"Plex Web","X-Plex-Version":"3.9.1","X-Plex-Client-Identifier":e.get("clientID"),"X-Plex-Platform":s.a.name,"X-Plex-Platform-Version":s.a.version,"X-Plex-Device":s.a.platform,
"X-Plex-Device-Name":"Plex Web ("+s.a.name+")","X-Plex-Device-Screen-Resolution":t+","+i};return e.on("change:clientID",function(e,t){o["X-Plex-Client-Identifier"]=t}),a.a.Deferred().resolve(o).promise()}};t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(13),l=n(40),u=n(106),c=n(514),d=n(527),h=n(532),p=n(677),f=n(806),g=f.a.extend({modelDefaults:function(){var e=f.a.prototype.modelDefaults.apply(this,arguments),t=this.model.get("playQueue");return a.a.extend(e,{
canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:this.type!==l.a.types.PHOTO,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showPlayQueue:t.supports({remoteRefresh:!0})&&"photo"!==t.get("mediaType")})},load:function(e){this.model=e.model,this.mediaElement=e.mediaElement||document.createElement(this.type),this.reset(this.model.get("playQueueItem")),this.listenTo(this.manager,{timeline:this.onTimeline,progress:this.onProgress,error:this.onError,volume:this.onVolumeUpdate}),
this.listenTo(this.model,{"change:metadataItem":this.onMetadataItemChange,"change:mediaIndex":this.onMetadataItemChange,"change:partIndex":this.onMetadataItemChange,"change:qualityIndex":this.onQualityIndexChange,"change:audioStreamID":this.onAudioStreamIDChange,"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:finished":this.onFinishedChange});var t=this.model.get("playQueue");if(this.listenTo(t.get("collection"),"reset",this.onPlayQueueChange),
e.silent)return this.manager.updatePlayer(),s.a.Deferred().resolve().promise();var i=this.model.get("metadataItem"),r=i.server,l=n.i(o.a)("appModel"),c=l.get("settings"),h=l.get("primaryServer"),p=e.offset/1e3||0,f=u.a.getCurrentQuality(i,c),g=l.get("user"),m={offset:p,directPlay:c.get("directPlay"),directStream:c.get("directStream"),bitrate:f.bitrate,subtitleSize:c.get("subtitleSize"),audioBoost:c.get("audioBoost"),server:this.getServerInfo(r,{isRequired:!0}),user:{username:g.get("username")}}
;if(!m.server)return s.a.Deferred().reject().promise();var v=[];v.push(this.getTransientTokenFor(r,m.server)),h&&r.id!==h.id&&(m.primaryServer=this.getServerInfo(h),m.primaryServer&&v.push(this.getTransientTokenFor(h,m.primaryServer)));var y=s.a.Deferred().resolve().promise();return y=t.yieldOwnership({absoluteUrl:!0}).then(function(e){m.containerKey=e}),y=y.then(function(){return n.i(d.a)(v)}),y.done(a.a.bind(function(){var e=new chrome.cast.media.MediaInfo(i.get("key"),this.type)
;e.customData=m;var t=new chrome.cast.media.LoadRequest(e);t.currentTime=p,t.autoplay=!0,this.manager.loadMedia(t)},this)),y},mirror:function(e){var t=e.item,i=t.server,r=n.i(o.a)("appModel"),l=r.get("primaryServer"),u=r.get("user"),c={server:this.getServerInfo(i,{isRequired:!0}),user:{username:u.get("username")}};if(!c.server)return s.a.Deferred().reject().promise();var h=[];h.push(this.getTransientTokenFor(i,c.server)),l&&i.id!==l.id&&(c.primaryServer=this.getServerInfo(l),
c.primaryServer&&h.push(this.getTransientTokenFor(l,c.primaryServer)));var f=n.i(d.a)(h);return f.done(a.a.bind(function(){var e=new chrome.cast.media.MediaInfo(t.get("key"),this.type);e.customData=c;var n={type:p.a.SHOWDETAILS};n.media=e,this.manager.sendCustomMessage(n)},this)),f},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);if(n){return a.a.extend({machineIdentifier:e.get("originalMachineIdentifier")||e.get("machineIdentifier"),transcoderVideo:e.get("transcoderVideo")||!1,
transcoderVideoRemuxOnly:e.get("transcoderVideoRemuxOnly")||!1,transcoderAudio:e.get("transcoderAudio")||!1,version:e.get("shortVersion"),myPlexSubscription:e.get("myPlexSubscription"),isVerifiedHostname:"https"===n.protocol&&!h.a.isValidAddress(n.address)},n)}},getTransientTokenFor:function(e,t){return this.getTransientToken(e).then(function(e){t.accessToken=e})},play:function(){this.model.set("state",l.a.states.PLAYING),this.manager.sendCustomMessage({type:p.a.PLAY})},pause:function(){
this.model.set("state",l.a.states.PAUSED),this.manager.sendCustomMessage({type:p.a.PAUSE})},setPosition:function(e){if(this.canSeek(e)){this.model.set({state:l.a.states.BUFFERING,position:e});var t=e/1e3;this.manager.startSeek(t),this.sendPositionRequest(t)}},sendPositionRequest:a.a.debounce(function(e){this.manager.sendCustomMessage({type:p.a.SEEK,currentTime:e})},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e/100)},sendVolumeRequest:a.a.debounce(function(e){
this.manager.sendSessionCommand("setReceiverVolumeLevel",e),e||this.manager.sendSessionCommand("setReceiverMuted",!0)},200),skipPrevious:function(){this.manager.sendCustomMessage({type:p.a.PREVIOUS})},skipNext:function(){this.manager.sendCustomMessage({type:p.a.NEXT})},skipTo:function(e){this.manager.sendCustomMessage({type:p.a.SKIPTO,key:e})},stop:function(e){f.a.prototype.stop.apply(this,arguments),this.manager.sendCustomMessage({type:p.a.STOP})},refreshRemotePlayQueue:function(){
this.manager.sendCustomMessage({type:p.a.REFRESHPLAYQUEUE})},setStream:function(e,t){this.manager.sendCustomMessage({type:p.a.SETSTREAM,stream:{type:e,id:t}})},setQualityIndex:function(){var e=this.model.get("metadataItem"),t=n.i(o.a)("appModel").get("settings"),i=u.a.getCurrentQuality(e,t);this.manager.sendCustomMessage({type:p.a.SETQUALITY,bitrate:i.bitrate})},onTimeline:function(e){var t=this.model.get("playQueue"),i=this.model.get("playQueueItem");if(e.containerKey){
var r=e.containerKey.split("?")[0],s=a.a.result(t,"url");if(s&&s!==r)return}if(e.key&&e.key!==i.get("key")){if(!(i=t.get("collection").findWhere({key:e.key})))return;this.reset(i)}var c=null;if(e.transcodeServerID){c=n.i(o.a)("appModel").get("servers").get(e.transcodeServerID)}var d=u.a.getNearestIndexToBitrate(e.bitrate),h=a.a.isNumber(e.audioStreamID)?e.audioStreamID:null,p=a.a.isNumber(e.subtitleStreamID)?e.subtitleStreamID:null;this.isTimelineChange=!0,this.model.set({
mediaIndex:e.mediaIndex,partIndex:e.partIndex,qualityIndex:d,audioStreamID:h,subtitleStreamID:p,transcodeServer:c,state:e.state,ready:!0,loaded:"photo"!==this.type,finished:e.state===l.a.states.STOPPED,errorMessage:e.errorMessage,duration:Math.round(1e3*e.duration),volume:Math.round(e.volume)}),this.model.hasAttr("slideshowState")&&this.model.set("slideshowState",l.a.getSlideshowStateByState(e.state)),this.isTimelineChange=!1,this.onProgress(e.position)},onProgress:function(e){
var t=this.model.get("metadataItem"),i=this.model.get("duration"),a=Math.round(1e3*e);n.i(c.a)(t,a,i),this.model.set("position",a)},onError:function(e){this.model.set({state:l.a.states.ERROR,errorMessage:e})},onQualityIndexChange:function(e,t){var n=e.previous("qualityIndex");null==t||null==n||this.isTimelineChange||this.setQualityIndex()},onVolumeUpdate:function(e){this.model.set("volume",Math.round(e))}});t.a=g},function(e,t,n){"use strict"
;var i=n(113),a=n.n(i),r=n(2),s=n.n(r),o=n(13),l=n(4),u=n(12),c=n(31),d=n(374),h=n(40),p=n(849),f=n(677),g=n(28),m=n(807),v=n(698),y=n(1437),b=m.a.extend({protocol:"cast",namespace:"urn:x-cast:plex",progressDelay:100,controller:y.a,sessionWrapped:["loadMedia","sendSessionCommand","sendCustomMessage"],mediaSessionWrapped:["sendMediaCommand","startSeek"],appID:function(){var e=n.i(o.a)("appModel").get("settings"),t=e.get("chromecastAppID"),i=e.get("chromecastCustomAppID")
;return t===p.a.CUSTOM&&i?i:t||p.a.PRODUCTION},initialize:function(){if("chrome"===c.a.id){s.a.bindAll(this,"onApiAvailable","onApiLoadSuccess","onApiLoadError","onReceiverAvailable","onSessionAvailable","onSessionError","onSessionUpdate","onMediaSessionDiscovered","onMediaSessionError","onMediaSessionUpdate"),m.a.prototype.initialize.apply(this,arguments),this.sessionBacklog=new d.a,this.sessionBacklog.wrapAll(this.sessionWrapped,function(){return!!this.session},this),
this.mediaSessionBacklog=new d.a,this.mediaSessionBacklog.wrapAll(this.mediaSessionWrapped,function(){return!!this.mediaSession},this),this.listenTo(u.a,"cast:launch",this.onLaunch),window.__onGCastApiAvailable=this.onApiAvailable;var e=document.createElement("script");e.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js",document.head.appendChild(e)}},load:function(){n.i(o.a)("appModel").get("settings").populate({reset:!0}).always(s.a.bind(function(){
var e=s.a.result(this,"appID"),t=new chrome.cast.SessionRequest(e),n=new chrome.cast.ApiConfig(t,this.onSessionAvailable,this.onReceiverAvailable);chrome.cast.initialize(n,this.onApiLoadSuccess,this.onApiLoadError)},this))},stop:function(){this.session&&this.session.stop(null,this.onSessionStopError),m.a.prototype.stop.apply(this,arguments)},loadMedia:function(e){n.i(g.a)("[Cast] Load media command"),this.session.loadMedia(e,this.onMediaSessionDiscovered,this.onMediaSessionError)},
sendSessionCommand:function(e,t){n.i(g.a)("[Cast] Sending session command: "+e),this.session[e](t,null,this.onMessageError)},sendMediaCommand:function(e,t){n.i(g.a)("[Cast] Sending media command: "+e),this.mediaSession[e](t,null,this.onMessageError)},sendCustomMessage:function(e){n.i(g.a)("[Cast] Sending custom message: "+e.type),e.type===f.a.SEEK&&(this.seeking=!1),this.session.sendMessage(this.namespace,e,null,this.onMessageError)},startSeek:function(e){this.seeking=!0,
this.mediaSession.playerState=chrome.cast.media.PlayerState.BUFFERING,this.mediaSession.currentTime=e},error:function(){var e=n.i(o.a)("appModel");u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem connecting to this player.")}),e.set("primaryPlayer",null)},updatePlayer:function(){clearInterval(this.progressInterval);var e=this.mediaSession.media,t=this.mediaSession.customData;if(e&&t){var n=s.a.extend({machineIdentifier:t.server.machineIdentifier,
state:h.a.getStateByCastState(this.mediaSession.playerState),duration:e.duration,position:this.mediaSession.currentTime,volume:this.getVolumeLevel(this.session.receiver.volume)},s.a.omit(t,["server","primaryServer","user"]));n.state===h.a.states.PLAYING&&"photo"!==e.contentType&&(this.progressInterval=setInterval(s.a.bind(this.onProgress,this),this.progressDelay)),this.mediaSession.idleReason===chrome.cast.media.IdleReason.ERROR&&(n.state=h.a.states.ERROR,n.errorMessage=t.errorMessage),
this.trigger("timeline",n),this.updateNowPlaying(n)}},updateVolumeState:function(){this.session&&this.trigger("volume",this.getVolumeLevel(this.session.receiver.volume))},getVolumeLevel:function(e){return e.muted?0:100*e.level},resetSession:function(){this.session&&(this.session.removeUpdateListener(this.onSessionUpdate),this.session=null),this.sessionBacklog.clear()},resetMediaSession:function(){this.mediaSession&&(this.mediaSession.removeUpdateListener(this.onMediaSessionUpdate),
this.mediaSession=null),clearInterval(this.progressInterval),this.mediaSessionBacklog.clear()},onApiAvailable:function(e,t){e?this.load():g.a.warn("[Cast] "+t)},onApiLoadSuccess:function(){var e=n.i(o.a)("appModel");n.i(g.a)("[Cast] Loaded the cast api"),e.set("isCastApiAvailable",!0)},onApiLoadError:function(e){var t=n.i(o.a)("appModel");g.a.error("[Cast] Unable to load the cast api: "+a()(e)),t.set("isCastApiAvailable",!1)},onReceiverAvailable:function(e){var t=n.i(o.a)("appModel")
;e===chrome.cast.ReceiverAvailability.AVAILABLE?(n.i(g.a)("[Cast] Receivers are available"),t.set("isCastDeviceAvailable",!0)):(g.a.warn("[Cast] No receivers are available"),t.set("isCastDeviceAvailable",!1))},onLaunch:function(){this.sessionBacklog.clear(),this.mediaSessionBacklog.clear(),chrome.cast.requestSession(this.onSessionAvailable,this.onSessionError)},onSessionAvailable:function(e){n.i(g.a)("[Cast] Session: "+a()(e));var t=n.i(o.a)("appModel");this.session=e,
t.set("primaryPlayer",new v.a(e.receiver,{parse:!0})),e.addUpdateListener(this.onSessionUpdate),e.addMediaListener(this.onMediaSessionDiscovered),e.media.length&&(n.i(g.a)("[Cast] Found existing media sessions."),this.onMediaSessionDiscovered(e.media[0])),this.sessionBacklog.process()},onSessionError:function(e){"cancel"!==e.code&&g.a.error("[Cast] Unable to launch new session: "+a()(e))},onSessionUpdate:function(e){if(e)return void this.updateVolumeState();n.i(g.a)("[Cast] Session ended"),
this.resetSession(),this.resetMediaSession(),n.i(o.a)("appModel").set("primaryPlayer",null)},onSessionStopError:function(e){g.a.error("[Cast] Unable to stop session: "+a()(e))},onMediaSessionDiscovered:function(e){if(n.i(g.a)("[Cast] Media session discovered: "+a()(e)),e.playerState===h.a.castStates.STOPPED)return void this.resetMediaSession();this.mediaSession=e,e.addUpdateListener(this.onMediaSessionUpdate),this.updatePlayer(),this.mediaSessionBacklog.process()},
onMediaSessionError:function(e){g.a.error("[Cast] Media session error: "+a()(e)),this.resetMediaSession(),e.details&&e.details.customData&&this.trigger("error",e.details.customData.errorMessage)},onMediaSessionUpdate:function(e){if(this.seeking)return void(this.mediaSession.playerState=chrome.cast.media.PlayerState.BUFFERING);this.updatePlayer()},onMessageError:function(e){g.a.warn("[Cast] Message error: "+a()(e))},onProgress:function(){
this.trigger("progress",this.mediaSession.getEstimatedTime())}});t.a=b},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(2527),s=n.n(r),o=n(4),l=n(38),u=n(40),c=n(374),d=n(28);s.a.key="fv2ELs9q2gEZxE9uuiAGfhbE9Qhc4DyhZjt1j0GaxUI=";var h=l.a.extend({wrapped:["play","pause","playPause","getState","setVolume","setPosition","resume","stop"],initialize:function(e){a.a.bindAll(this,"onReady","onPlay","onTime","onBuffer","onPause","onVolume","onComplete","onError"),this.type=e,this.backlog=new c.a,
this.backlog.wrapAll(this.wrapped,function(){return!!this.video},this)},load:function(e){this.model=e.model,this.offset=this.model.get("position"),this.backlog.clear(),a.a.defer(a.a.bind(function(){var t=s()("flash-video-placeholder"),i=this.model.get("url");if(!a.a.isFunction(t.setup))return void this.model.set({state:u.a.states.ERROR,errorMessage:n.i(o.default)("Your browser does not support video streaming.")});d.a.group("Flash Player"),n.i(d.a)("URL: "+i),n.i(d.a)("Autoplay: true"),
n.i(d.a)("Offset: "+this.offset),d.a.groupEnd(),this.model.set("ready",!0),this.video=t.setup({file:i,skin:"swf/jwplayer/plex.xml",flashplayer:"swf/jwplayer/jwplayer.swf",stretching:"uniform",width:"100%",height:"100%",volume:100,mute:!1,autostart:e.autoplay,analytics:{enabled:!1},events:{onReady:this.onReady,onPlay:this.onPlay,onTime:this.onTime,onBuffer:this.onBuffer,onPause:this.onPause,onVolume:this.onVolume,onComplete:this.onComplete,onError:this.onError}})},this))},play:function(){
this.video.play(!0)},pause:function(){this.video.pause(!0)},setVolume:function(e){this.video.setVolume(e)},setPosition:function(e){this.video.seek(e/1e3)},resume:function(){n.i(d.a)("resuming at "+this.offset);var e=this.offset;this.offset=null,this.setPosition(e)},stop:function(){this.model.get("loaded")&&this.video.remove(),this.video=null},onReady:function(){this.model.set("loaded",!0),this.setVolume(this.model.get("volume")),this.backlog.process()},onPlay:function(e){
this.model.set("state",u.a.states.PLAYING)},onTime:function(e){if(this.offset)return void this.resume();this.model.set("duration",Math.round(1e3*e.duration)),this.model.set("position",Math.round(1e3*e.position))},onBuffer:function(){this.model.set("state",u.a.states.BUFFERING)},onPause:function(){this.model.set("state",u.a.states.PAUSED)},onVolume:function(e){this.model.set("volume",e.volume)},onComplete:function(){this.model.set("ended",!0)},onError:function(e){this.model.set({
state:u.a.states.ERROR,errorMessage:e.message})}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(31),s=n(28),o=n(679),l=o.a.extend({load:function(e){o.a.prototype.load.apply(this,arguments),r.a.mobile&&this.model.set("ready",!0)},resume:function(){n.i(s.a)("resuming at "+this.offset);var e=this.offset;this.offset=0,this.autoplay&&(this.mediaElement.resume_pending=!0,this.pause()),this.resumePositionTimeout=setTimeout(a.a.bind(function(){this.setPosition(e)},this),1e3),
this.autoplay&&(this.resumePlayTimeout=setTimeout(a.a.bind(function(){this.mediaElement.resume_pending=!1,this.play()},this),1500))},stop:function(){o.a.prototype.stop.apply(this,arguments),this.resumePositionTimeout=clearTimeout(this.resumePositionTimeout),this.resumePlayTimeout=clearTimeout(this.resumePlayTimeout)},onReady:function(){o.a.prototype.onReady.apply(this,arguments),
!(this.model.get("showEnterFullscreen")||this.model.get("showExitFullscreen"))&&this.mediaElement.webkitSupportsFullscreen&&this.model.set({showEnterFullscreen:!0,forceWebkitVideoFullscreen:!0})}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(31),o=n(40),l=n(319),u=n(251),c=n(322),d=n(1107),h=d.a.extend({type:o.a.types.MUSIC,modelDefaults:function(){var e=d.a.prototype.modelDefaults.apply(this,arguments);return a.a.extend(e,{canPlayPause:!0,canStop:!0,
canSetVolume:!s.a.mobile,showSeekBar:!0,showShuffle:!0,showRepeat:!0,showLyrics:!0,showPlayQueue:!0})},getPlayerDecision:function(e,t){this.errorTimeout&&(this.errorTimeout=clearTimeout(this.errorTimeout)),this.backlog.clear();var n=this.getPlayerDecisionPromise(e,t);return n.done(this.onDecisionSuccess),n.fail(this.onDecisionError),n},getPlayerDecisionPromise:function(e,t){t=t||{};var n=r.a("appModel");return l.a.getPlayerDecision(a.a.extend({type:this.type,profile:this.profile,
playbackSessionID:this.playbackSessionID,item:e,offset:t.offset,fallbackServer:n.get("primaryServer"),transcoder:c.a,profileExtra:function(e){
if(e.transcodeServer.supports("replaceTranscodeTarget"))return u.a.canPlayType("audio",'audio/ogg; codecs="opus"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=opus)":u.a.canPlayType("audio",'audio/ogg; codecs="vorbis"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=vorbis)":void 0}},t.decisionOverrides))}});t.a=h},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(2528),s=n.n(r),o=n(13),l=n(4),u=n(66),c=n(31),d=n(40),h=n(508),p=n(106),f=n(319),g=n(251),m=n(310),v=n(322),y=n(680),b=n(1440),S=n(1439),I=n(156),w=y.a.extend({type:d.a.types.VIDEO,modelDefaults:function(){var e=y.a.prototype.modelDefaults.apply(this,arguments);return a.a.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!c.a.mobile,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showSeekBar:!0,showPlayQueue:!0,
showEnterFullscreen:u.a.hasFullscreen})},modelOverrides:function(){var e=y.a.prototype.modelOverrides.apply(this,arguments);return this.model.get("playQueue").get("collection").length<1&&(e.showPlayQueue=!1),e},getPlayerDecision:function(e,t){this.backlog.clear();var i=this.populateItem(e);return i=i.then(a.a.bind(function(){var i=n.i(o.a)("appModel"),r=i.get("settings"),s=p.a.getCurrentQuality(e,r),l=f.a.getPlayerDecision(a.a.extend({type:this.type,profile:this.profile,
playbackSessionID:this.playbackSessionID,item:e,media:t.media,part:t.part,offset:t.offset,fallbackServer:i.get("primaryServer"),allowDirectPlay:r.get("directPlay"),allowedAC3Containers:r.get("allowAC3")?"mp4":null,subtitlesBurnLevel:this.model.get("softSubtitlesFailed")?m.a.ALWAYS:r.get("subtitlesBurnLevel"),hasFlash:this.canPlayFlash(),hasNativeHLS:this.canPlayHLS(),useOffsetHLS:!1,hasDASH:this.canPlayDASH(),hasStreamingMKV:this.canPlayStreamingMKV(),minVersionForStreamingMKV:I.a.streamingMKV,
quality:s,transcoder:v.a,transcoderOptions:{directStream:r.get("directStream")?1:0,subtitleSize:r.get("subtitleSize"),audioBoost:r.get("audioBoost")},profileExtra:function(e){var t=[];return r.get("preferAAC")&&t.push("add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=aac)"),
"safari"===c.a.id&&"osx"===c.a.platformID&&n.i(h.a)(c.a.platformVersion,"10.11")&&t.push("append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)"),t.length?t.join("+"):null}},t.decisionOverrides));return l.done(this.onDecisionSuccess),l.fail(this.onDecisionError),l},this),a.a.bind(function(){this.model.set({state:"error",errorMessage:n.i(l.default)("Plex Media Server is not responding.")})},this))},getSubcontrollerByType:function(e){
return"flash"===e?new S.a(this.type):new b.a(this.type)},canPlayFlash:function(){return s.a.hasFlashPlayerVersion("10")},canPlayHLS:function e(){var t=this.profile.protocols;if(!t||!t.hls)return!1;var e=g.a.canPlayType("video",t.hls.mimeType),n="Android"===c.a.platform;return e||n},canPlayDASH:function(){var e=this.profile.directPlay;if(!e.hasOwnProperty("mp4"))return!1;var t=n.i(o.a)("appModel").get("settings"),i=g.a.canPlayType("video",e.mp4.mimeType)
;return t.get("dash")&&i&&u.a.hasMediaSource},canPlayStreamingMKV:function(){var e=n.i(o.a)("appModel").get("settings"),t=this.profile.directPlay,i=g.a.canPlayType("video",t.mp4.mimeType);return e.get("dash")&&"chrome"===c.a.id&&!c.a.mobile&&i},getErrorMessage:function(e){var t=y.a.prototype.getErrorMessage.apply(this,arguments);if(e.transcodeServer&&e.transcodeServer.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"allowDirectPlay":
t+=" "+n.i(l.default)("Please allow Direct Play in Settings > Web > Player > Show Advanced.");break;case"validateProfileProperty:maxBitrate":default:t+=" "+n.i(l.default)("Please increase the Streaming Quality in Settings > Web > Player.")}return t},onDecisionSuccess:function(e){var t=this.getMaxVideoBitrateQualityIndex(e);if(!t){var i=n.i(o.a)("appModel").get("settings");t=p.a.getCurrentQuality(e.item,i).index}this.model.set("qualityIndex",t),
y.a.prototype.onDecisionSuccess.apply(this,arguments)}});t.a=w},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(19),l=n(40),u=n(514),c=n(86),d=n(163),h=n(806),p=h.a.extend({modelDefaults:function(){var e=h.a.prototype.modelDefaults.apply(this,arguments),t=this.player.get("protocolCapabilities"),n=a.a.contains(t,"playqueues"),i=this.model.get("playQueue");return a.a.extend(e,{canStop:!0,showPlayQueue:!!(n&&i&&i.supports({remoteRefresh:!0})&&"photo"!==i.get("mediaType"))})},
load:function(e){this.model=e.model,this.mediaElement=e.mediaElement||document.createElement(this.type),this.reset(this.model.get("playQueueItem")),this.listenTo(this.manager,"timeline",this.onTimeline),this.listenTo(this.model,{"change:metadataItem":this.onMetadataItemChange,"change:mediaIndex":this.onMetadataItemChange,"change:partIndex":this.onMetadataItemChange,"change:audioStreamID":this.onAudioStreamIDChange,"change:subtitleStreamID":this.onSubtitleStreamIDChange,
"change:finished":this.onFinishedChange,"change:repeatAll change:repeatItem":this.onRepeatChange});var t=this.model.get("metadataItem"),i=t.server,r=this.getServerInfo(i,{isRequired:!0});if(!r)return s.a.Deferred().reject().promise();var l=this.model.get("playQueue");if(this.listenTo(l.get("collection"),"reset",this.onPlayQueueChange),e.silent)return s.a.Deferred().resolve().promise();var u=a.a.extend({key:t.get("key"),offset:e.offset||0
},r),c=s.a.Deferred().resolve().promise(),h=this.getTransientTokenFor(i,u);return c=l.yieldOwnership().then(function(e){u.containerKey=e}),c=c.then(function(){return n.i(d.a)(h)}),c=c.then(a.a.bind(function(){var e=o.join("/player/playback/playMedia",u);return this.manager.request(this.player,e)},this))},mirror:function(e){if(a.a.contains(this.player.get("protocolCapabilities"),"mirror")){var t=e.item,i=t.server,r=this.getServerInfo(i,{isRequired:!0})
;if(!r)return s.a.Deferred().reject().promise();var l=a.a.extend({type:this.type,key:t.get("key")},r),u=n.i(d.a)(this.getTransientTokenFor(i,l));return u=u.then(a.a.bind(function(){return this.manager.request(this.player,o.join("/player/mirror/details",l))},this))}},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);if(n){var i=a.a.extend({machineIdentifier:e.get("originalMachineIdentifier")||e.get("machineIdentifier")},n)
;return"myPlex"===i.machineIdentifier&&(i.machineIdentifier="node",i.address="node.plexapp.com"),i}},getTransientTokenFor:function(e,t){return this.getTransientToken(e).then(function(e){t.token=e})},reset:function(e){return this.hasStarted=!1,h.a.prototype.reset.apply(this,arguments)},play:function(){return this.model.set("state",l.a.states.PLAYING),this.manager.request(this.player,"/player/playback/play?type="+this.type)},pause:function(){return this.model.set("state",l.a.states.PAUSED),
this.manager.request(this.player,"/player/playback/pause?type="+this.type)},setPosition:function(e){if(this.canSeek(e))return this.model.set("position",e),this.sendPositionRequest(e)},sendPositionRequest:a.a.throttle(function(e){var t={type:this.type,offset:e},n=o.join("/player/playback/seekTo",t);return this.manager.request(this.player,n)},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e)},sendVolumeRequest:a.a.throttle(function(e){var t={type:this.type,volume:e
},n=o.join("/player/playback/setParameters",t);return this.manager.request(this.player,n)},500),setRepeat:a.a.debounce(function(e){var t={type:this.type,repeat:e},n=o.join("/player/playback/setParameters",t);return this.manager.request(this.player,n)},50),setStream:function(e,t){var n=c.a.get(e).key;return this.manager.request(this.player,"/player/playback/setStreams?"+n+"="+t+"&type="+this.type)},refreshRemotePlayQueue:function(){
var e=this.model.get("playQueue"),t=this.manager.player.get("protocolCapabilities");if(a.a.contains(t,"playqueues")){var n=e.get("playQueueID");return this.manager.request(this.player,"/player/playback/refreshPlayQueue?playQueueID="+n)}return s.a.Deferred().resolve().promise()},skipPrevious:function(){return h.a.prototype.skipPrevious.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipPrevious?type="+this.type)},skipNext:function(){
return h.a.prototype.skipNext.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipNext?type="+this.type)},skipTo:function(e){return h.a.prototype.skipTo.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipTo?type="+this.type+"&key="+e)},stop:function(e){return h.a.prototype.stop.apply(this,arguments),this.manager.request(this.player,"/player/playback/stop?type="+this.type)},removeItem:function(){
return h.a.prototype.removeItem.apply(this,arguments).then(a.a.bind(this.refreshRemotePlayQueue,this))},moveItem:function(){return h.a.prototype.moveItem.apply(this,arguments).then(a.a.bind(this.refreshRemotePlayQueue,this))},onTimeline:function(e){if(this.type===e.type&&!e.continuing){var t=this.model.get("playQueue"),i=this.model.get("playQueueItem");if(e.key&&e.key!==i.get("key")){if(!(i=t.get("collection").findWhere({key:e.key})))return;this.reset(i)}var r=parseInt(e.playQueueVersion,10)
;r&&r>t.get("playQueueVersion")&&t.fetch(),e.state!==l.a.states.STOPPED&&(this.hasStarted=!0);var s=parseInt(e.audioStreamID,10),o=parseInt(e.subtitleStreamID,10);this.isTimelineChange=!0,this.model.set({mediaIndex:e.mediaIndex,partIndex:e.partIndex,partCount:e.partCount,audioStreamID:a.a.isNaN(s)?null:s,subtitleStreamID:a.a.isNaN(o)?null:o,state:e.state,ready:!0,loaded:"photo"!==this.type,finished:this.hasStarted&&e.state===l.a.states.STOPPED,duration:e.duration,position:e.time,volume:e.volume,
shuffled:e.shuffle,repeatAll:2===e.repeat,repeatItem:1===e.repeat,canPlayPause:e.controllable.indexOf("playPause")>-1,canStop:e.controllable.indexOf("stop")>-1,canSeek:e.controllable.indexOf("seekTo")>-1,canSetVolume:e.controllable.indexOf("volume")>-1,canSetVideoStream:e.controllable.indexOf("videoStream")>-1,canSetAudioStream:e.controllable.indexOf("audioStream")>-1,canSetSubtitleStream:e.controllable.indexOf("subtitleStream")>-1,canShuffle:e.controllable.indexOf("shuffle")>-1,
canRepeat:e.controllable.indexOf("repeat")>-1,canSkipPrevious:e.controllable.indexOf("skipPrevious")>-1,canSkipNext:e.controllable.indexOf("skipNext")>-1}),this.isTimelineChange=!1,null!=e.time&&n.i(u.a)(i.get("metadataItem"),e.time,e.duration)}}});t.a=p},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(13),l=n(4),u=n(12),c=n(44),d=n(66),h=n(19),p=n(807),f=n(1443),g=p.a.extend({protocol:"plex",controller:f.a,playerRequestedDisconnect:!1,initialize:function(){
a.a.bindAll(this,"error","stop"),p.a.prototype.initialize.apply(this,arguments)},start:function(e){p.a.prototype.start.apply(this,arguments),this.commandID=0,this.stopPolling=!1,this.poll({ignoreDisconnected:!0})},stop:function(){this.stopPolling=!0,this.pollRequest&&this.pollRequest.abort(),this.player&&!this.playerRequestedDisconnect&&this.request(this.player,"/player/timeline/unsubscribe"),this.playerRequestedDisconnect=!1,p.a.prototype.stop.apply(this,arguments)},request:function(e,t,i){
i||(i={}),i.skipIncrement||this.commandID++,t=h.join(t,{commandID:this.commandID});var r=d.a.isHostedHttps?e.server:e,o=r.getXHROptions(t);return o.headers["X-Plex-Target-Client-Identifier"]=e.id,s.a.ajax(o).fail(a.a.bind(function(e){if(!this.stopPolling){var t,i=e.responseText,a=c.a.parseXML(i);t=a&&a.status?a.status:n.i(l.default)("The player is unable to perform this action."),u.a.trigger("show:alert",{type:"error",message:t})}},this))},poll:function(e){e||(e={})
;var t=h.join("/player/timeline/poll",{wait:e.wait?1:0});this.pollRequest=this.request(this.player,t,{skipIncrement:!0}),this.pollRequest.done(a.a.bind(function(t,n,i){if(this.player.id===i.getResponseHeader("X-Plex-Client-Identifier")){var a=c.a.parseXML(t);if(c.a.parseArray(a,"Timeline"),a.commandID>=this.commandID&&(this.onTimeline(a.Timeline),!e.ignoreDisconnected&&a.disconnected)){var r=o.a("appModel");return this.playerRequestedDisconnect=!0,void r.set("primaryPlayer",null)}}this.poll({
wait:!0})},this)),this.pollRequest.fail(a.a.bind(function(e){this.stopPolling||this.error()},this))},error:function(){var e=o.a("appModel");u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem connecting to this player.")}),e.set("primaryPlayer",null),e.get("players").fetch({reset:!0})},onTimeline:function(e){a.a.each(e,function(e){c.a.parseInteger(e,["time","duration","volume","repeat"]),c.a.parseBoolean(e,["shuffle","continuing"]),
e.controllable?e.controllable=e.controllable.split(","):e.controllable=[],this.trigger("timeline",e),this.updateNowPlaying(e)},this)}});t.a=g},function(e,t,n){"use strict";var i=n(1290),a={video:i.a,music:i.b,photo:i.c};t.a=a},function(e,t,n){"use strict";var i=n(535),a=n(1410),r={canRender:function(){return!0},getComponent:function(e){return"hls"===e.protocol?a.a:i.a}};t.a=r},function(e,t,n){"use strict";function i(){var e=g.a.video.protocols;return!(!e||!e.hls)&&o.a.isSupported()}function a(){
var e=g.a.video.directPlay,t=n.i(l.a)("appModel").get("settings"),i=h.a.canPlayType("video",e.mp4.mimeType);return t.get("dash")&&"chrome"===c.a.id&&!c.a.mobile&&i}function r(){var e=n.i(l.a)("appModel").get("settings"),t=[];return e.get("preferAAC")&&t.push("add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=aac)"),
"safari"===c.a.id&&"osx"===c.a.platformID&&n.i(d.a)(c.a.platformVersion,"10.11")&&t.push("append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)"),{profile:u.a.prop("video"),allowDirectPlay:e.get("directPlay"),allowedAC3Containers:e.get("allowAC3")?"mp4":null,subtitlesBurnLevel:e.get("subtitlesBurnLevel"),hasFlash:!1,hasNativeHLS:i(),useOffsetHLS:!1,hasDASH:!1,hasStreamingMKV:a(),minVersionForStreamingMKV:f.a.streamingMKV,transcoder:p.a,
transcoderOptions:{directStream:e.get("directStream")?1:0,subtitleSize:e.get("subtitleSize"),audioBoost:e.get("audioBoost")},profileExtra:t.length?t.join("+"):null}}var s=n(1008),o=n.n(s),l=n(13),u=n(300),c=n(31),d=n(508),h=n(251),p=n(322),f=n(156),g=n(808);t.a=r},function(e,t,n){"use strict";function i(e){var t=e.channel,n=t.get("identifier"),i=n?"/system/appstore/apps/"+n:t.get("key"),a=i+"/install",s=t.server.getXHROptions(a),o=r.a.ajax(s);return o.done(function(){t.set("installed",!0)}),
o.promise()}var a=n(5),r=n.n(a);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.channel,i=t.get("identifier"),a=i?"/system/appstore/apps/"+i:t.get("key"),s=a+"/reset",d=t.server.getXHROptions(s),h=o.a.ajax(d);return h.done(function(e){var t,i=r.a.isObject(e)?e:c.a.parseXML(e);t=i.message?i.message:n.i(l.default)("This channel was successfully reset."),u.a.trigger("show:alert",{type:"success",message:t})}),h.fail(function(){u.a.trigger("show:alert",{type:"error",
message:n.i(l.default)("There was a problem resetting this channel.")})}),h.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(44);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.channel,i=t.get("identifier"),a=i?"/system/appstore/apps/"+i:t.get("key"),s=a+"/restart",d=t.server.getXHROptions(s),h=o.a.ajax(d);return h.done(function(e){var t,i=r.a.isObject(e)?e:c.a.parseXML(e);t=i.message?i.message:n.i(l.default)("This channel was successfully restarted."),
u.a.trigger("show:alert",{type:"success",message:t})}),h.fail(function(){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem restarting this channel.")})}),h.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(44);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=o.a.ajax(f);t.done(function(t){var n=r.a.isObject(t)?t:c.a.parseXML(t);a.set("installed",!1),n.message&&!e.skipConfirmation&&u.a.trigger("show:alert",{type:"success",
message:n.message}),i.resolve()}),t.fail(function(e){if(400===e.status){var t=new d.a({title:n.i(l.default)("Unable to Uninstall Channel"),message:n.i(l.default)("This channel could not be uninstalled, but you can disable it in the server settings."),confirmLabel:n.i(l.default)("OK"),cancelLabel:n.i(l.default)("Ignore")});t.promise.done(function(){u.a.trigger("navigate","serverSettings",{serverID:a.server.id,group:"channels"})}),u.a.trigger("show:modal",t)}else u.a.trigger("show:alert",{
type:"error",message:n.i(l.default)("This channel could not be uninstalled.")});i.reject(e)})}var i=o.a.Deferred(),a=e.channel,s=a.get("identifier"),h=s?"/system/appstore/apps/"+s:a.get("key"),p=h+"/uninstall",f=a.server.getXHROptions(p);if(e.skipConfirmation)t();else{var g=new d.a({title:n.i(l.default)("Uninstall Channel"),message:n.i(l.default)("Are you sure you want to uninstall this channel?")}),m=g.promise;m.done(t),m.fail(function(){i.reject()}),u.a.trigger("show:modal",g)}
return i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(44),d=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(e){var n=r.a.isObject(e)?e:c.a.parseXML(e);if(!n||!n.message&&!n.Directory)return void i();if(n.message)p||u.a.trigger("show:alert",{type:"success",message:n.message}),s.resolve();else{c.a.parseArray(n,"Directory");var a=n.Directory[0].key,l=o.a.ajax(h.getXHROptions(a));l.done(t),l.fail(i)}}function i(e){p||u.a.trigger("show:alert",{type:"error",
message:n.i(l.default)("There was a problem checking for updates.")}),s.reject(e)}var a,s=o.a.Deferred(),d=e.channel,h=d?d.server:e.server,p=e.silent;if(d){var f=d.get("identifier");a=(f?"/system/appstore/apps/"+f:d.get("key"))+"/update"}else a="/system/appstore/updates";var g=o.a.ajax(h.getXHROptions(a));return g.done(t),g.fail(i),s.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(44);t.a=i},function(e,t,n){"use strict";function i(e){
var t=l.a("appModel"),i=t.get("user"),a=i.server,s={url:e.item.get("url")},h=c.join("/pms/playlists/queue/items",s),p=r.a.extend(a.getXHROptions(h),{type:"POST"}),f=o.a.ajax(p).promise();return f.done(function(){d.a.trigger("show:alert",{type:"success",message:n.i(u.default)("{1} added to Watch Later.",e.item.get("title"))})}),f.fail(function(){d.a.trigger("show:alert",{type:"error",message:n.i(u.default)("There was a problem adding to Watch Later.")})}),f}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(4),c=n(19),d=n(12);t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1113);n.d(t,"testServerConnection",function(){return i.a}),n.d(t,"abortServerConnectionTest",function(){return i.b}),n.d(t,"populateServerIdentity",function(){return i.c}),n.d(t,"signIn",function(){return i.d}),n.d(t,"resetUser",function(){return i.e}),n.d(t,"switchUser",function(){return i.f}),n.d(t,"authenticateWithServer",function(){
return i.g}),n.d(t,"authenticateWithHash",function(){return i.h}),n.d(t,"selectStream",function(){return i.i}),n.d(t,"updateWatchedStatus",function(){return i.j}),n.d(t,"deleteFile",function(){return i.k}),n.d(t,"deleteItem",function(){return i.l}),n.d(t,"resumePlayQueue",function(){return i.m}),n.d(t,"persistPlayQueue",function(){return i.n});var a=n(1478);n.d(t,"refreshMetadata",function(){return a.a});var r=n(1455);n.d(t,"analyzeItems",function(){return r.a});var s=n(1456)
;n.d(t,"analyzeSection",function(){return s.a});var o=n(1473);n.d(t,"markWatched",function(){return o.a});var l=n(1472);n.d(t,"markUnwatched",function(){return l.a});var u=n(1480);n.d(t,"unmatch",function(){return u.a});var c=n(1479);n.d(t,"splitApart",function(){return c.a});var d=n(1475);n.d(t,"merge",function(){return d.a});var h=n(1465);n.d(t,"deleteItems",function(){return h.a});var p=n(1466);n.d(t,"deleteMediaItem",function(){return p.a});var f=n(1470);n.d(t,"deleteVersions",function(){
return f.a});var g=n(1468);n.d(t,"deleteSection",function(){return g.a});var m=n(1469);n.d(t,"deleteSectionThumbnails",function(){return m.a});var v=n(1467);n.d(t,"deletePlaylist",function(){return v.a});var y=n(1481);n.d(t,"updateLibrary",function(){return y.a});var b=n(1476);n.d(t,"optimize",function(){return b.a});var S=n(1459);n.d(t,"cleanBundles",function(){return S.a});var I=n(1471);n.d(t,"emptyTrash",function(){return I.a});var w=n(1474);n.d(t,"match",function(){return w.a});var M=n(1457)
;n.d(t,"autoMatch",function(){return M.a});var C=n(1458);n.d(t,"changeArtwork",function(){return C.a});var D=n(1477);n.d(t,"rate",function(){return D.a});var P=n(1463);n.d(t,"enableVersionGenerator",function(){return P.a});var T=n(1462);n.d(t,"disableVersionGenerator",function(){return T.a});var x=n(1464);n.d(t,"reprocessVersionGenerator",function(){return x.a});var E=n(1461);n.d(t,"deleteVersionGenerator",function(){return E.a});var A=n(1460);n.d(t,"deleteAllVersionGenerators",function(){
return A.a});var k=n(1448);n.d(t,"installChannel",function(){return k.a});var L=n(1452);n.d(t,"updateChannel",function(){return L.a});var _=n(1450);n.d(t,"restartChannel",function(){return _.a});var N=n(1449);n.d(t,"resetChannel",function(){return N.a});var R=n(1451);n.d(t,"uninstallChannel",function(){return R.a});var O=n(1453);n.d(t,"watchLater",function(){return O.a});var j=n(1483);n.d(t,"playMedia",function(){return j.a});var z=n(1482);n.d(t,"playBackgroundMedia",function(){return z.a})
;var U=n(1484);n.d(t,"queueMedia",function(){return U.a});var F=n(1485);n.d(t,"stopMedia",function(){return F.a});var B=n(1488);n.d(t,"connectServer",function(){return B.a});var V=n(1490);n.d(t,"reconnectServer",function(){return V.a});var H=n(1492);n.d(t,"signInServer",function(){return H.a});var W=n(1494);n.d(t,"signUpServer",function(){return W.a});var Y=n(1493);n.d(t,"signOutServer",function(){return Y.a});var Q=n(1491);n.d(t,"removeServer",function(){return Q.a});var G=n(1487)
;n.d(t,"checkForServerUpdates",function(){return G.a});var K=n(1489);n.d(t,"installServerUpdates",function(){return K.a});var q=n(1495);n.d(t,"testServerImage",function(){return q.a});var X=n(1486);n.d(t,"getTransientToken",function(){return X.a});var Z=n(1496);n.d(t,"showClaimServerAlertBar",function(){return Z.a});var J=n(1511);n.d(t,"showSyncModal",function(){return J.a});var $=n(1510);n.d(t,"showHomeWarningsModal",function(){return $.a});var ee=n(1498);n.d(t,"deleteSyncItem",function(){
return ee.a});var te=n(1501);n.d(t,"refreshSyncLists",function(){return te.a});var ne=n(1504);n.d(t,"removeDevice",function(){return ne.a});var ie=n(1505);n.d(t,"removeFriend",function(){return ie.a});var ae=n(1497);n.d(t,"acceptInvite",function(){return ae.a});var re=n(1502);n.d(t,"rejectInvite",function(){return re.a});var se=n(1509);n.d(t,"shareServer",function(){return se.a});var oe=n(1507);n.d(t,"removeServerShare",function(){return oe.a});var le=n(1506);n.d(t,"removeHomeUser",function(){
return le.a});var ue=n(1515);n.d(t,"validateUsername",function(){return ue.a});var ce=n(1514);n.d(t,"toggleGuest",function(){return ce.a});var de=n(1499);n.d(t,"lockUser",function(){return de.a});var he=n(1512);n.d(t,"signOut",function(){return he.a});var pe=n(1513);n.d(t,"signUp",function(){return pe.a});var fe=n(1508);n.d(t,"share",function(){return fe.a});var ge=n(1500);n.d(t,"recommend",function(){return ge.a});var me=n(1503);n.d(t,"remoteUnlock",function(){return me.a})},function(e,t,n){
"use strict";function i(e){var t=e.items;return o.a.when.apply(o.a,r.a.map(t,function(e){var t="/library/metadata/"+e.id+"/analyze",n=r.a.extend(e.server.getXHROptions(t),{type:"PUT"});return o.a.ajax(n).promise()}))}var a=n(2),r=n.n(a),s=n(5),o=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(d);e.done(function(){i.resolve()}),e.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem analyzing the library.")}),
i.reject(e)}),e.always(function(e){h.hide()})}var i=o.a.Deferred(),a=e.section,s="/library/sections/"+a.id+"/analyze",d=r.a.extend(a.server.getXHROptions(s),{type:"PUT"}),h=new c.a({title:n.i(l.default)("Analyze Library"),message:n.i(l.default)("Analyzes all the media files in the library. The analysis captures information about the media which helps Plex decide how to optimally play back the media."),confirmLabel:n.i(l.default)("Analyze"),cancelLabel:n.i(l.default)("Cancel"),async:!0
}),p=h.promise;return p.done(t),p.fail(function(){i.reject()}),u.a.trigger("show:modal",h),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),i=e.item,a=e.agent,s={agent:a.id,manual:0},h=d.join(["/library/metadata/",i.id,"/matches"],s),p=r.a.extend(i.server.getXHROptions(h)),f=o.a.ajax(p);return f.done(function(e){var a=r.a.isObject(e)?e:c.a.parseXML(e);if(a.SearchResult){var h=a.SearchResult
;r.a.isArray(a.SearchResult)&&(h=a.SearchResult[0]),s={guid:h.guid,name:h.name};var p=d.join(["/library/metadata/",i.id,"/match"],s),f=r.a.extend(i.server.getXHROptions(p),{type:"PUT"}),g=o.a.ajax(f);g.done(function(){t.resolve()}),g.fail(function(){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem matching this item.")}),t.reject()})}else u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("No matches were found using this agent.")}),t.reject()}),
f.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem searching for matches.")}),t.reject(e)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(44),d=n(19);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,n={url:e.artworkRatingKey},i=l.join(["/library/metadata/",t.id,e.artworkType],n),a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"}),s=o.a.ajax(a);return s.done(function(n){t.set(u[e.artworkType],n)}),s.promise()}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(19),u={poster:"thumb",art:"art",banner:"banner"};t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(s);e.done(function(){u.a.trigger("show:alert",{type:"success",message:n.i(l.default)("Unused bundles are being removed.")}),i.resolve()}),e.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem removing unused bundles.")}),i.reject(e)}),e.always(function(e){d.hide()})}
var i=o.a.Deferred(),a=e.server,s=r.a.extend(a.getXHROptions("/library/clean/bundles"),{type:"PUT"}),d=new c.a({title:n.i(l.default)("Clean Bundles"),message:n.i(l.default)("The media server stores information about your media to disk, as well as posters, artwork, and other media resources from the internet. Running this task deletes any bundles which are no longer in use."),confirmLabel:n.i(l.default)("Clean"),cancelLabel:n.i(l.default)("Cancel"),async:!0}),h=d.promise;return h.done(t),
h.fail(function(){i.reject()}),u.a.trigger("show:modal",d),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=a(),i=t.promise;return i=i.then(function(){var i="/playlists/generators?type="+d.a.LOCAL,a=s.a.extend(e.server.getXHROptions(i),{type:"DELETE"}),r=l.a.ajax(a).promise();return r.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(u.default)("There was a problem deleting all versions.")})}),
r.always(function(){t.hide()}),r.promise()})}function a(){var e=new h.a({title:n.i(u.default)("Delete All Versions"),message:n.i(u.default)("Are you sure you want to delete all versions? This cannot be undone."),confirmLabel:n.i(u.default)("Delete"),cancelLabel:n.i(u.default)("Cancel"),async:!0,hasDanger:!0});return c.a.trigger("show:modal",e),e}var r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(12),d=n(209),h=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,i=a(e)
;return i.promise.then(function(){var e=t.destroy();return e.fail(function(e){s.a.trigger("show:alert",{type:"error",message:n.i(r.default)("Unable to stop generating these versions.")})}),e.always(function(){i.hide()}),e})}function a(e){
var t=e.generator.get("title"),i=t?n.i(r.default)("Removing this item will delete all versions created by {1}. Are you sure you want to continue?",t):n.i(r.default)("Removing this item will delete all related versions. Are you sure you want to continue?"),a=new o.a({title:n.i(r.default)("Delete Versions"),message:i,confirmLabel:n.i(r.default)("Remove"),cancelLabel:n.i(r.default)("Cancel"),async:!0,hasDanger:!0});return s.a.trigger("show:modal",a),a}var r=n(4),s=n(12),o=n(42);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.generator,i=s.a.result(t,"url")+"/"+e.ratingKey+"/disable",r=a();return r.promise.then(function(){var e=s.a.extend(t.server.getXHROptions(i),{type:"PUT"}),a=l.a.ajax(e).promise();return a.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(u.default)("There was a problem disabling this version.")})}),a.always(function(){r.hide()}),a})}function a(){var e=new d.a({title:n.i(u.default)("Remove Version"),
message:n.i(u.default)("Are you sure you want to delete this version? You can enable it again in Optimized Versions Settings."),confirmLabel:n.i(u.default)("Remove"),cancelLabel:n.i(u.default)("Cancel"),async:!0,hasDanger:!0});return c.a.trigger("show:modal",e),e}var r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(12),d=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,i=r.a.result(t,"url")+"/"+e.ratingKey+"/enable",a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"
}),s=o.a.ajax(a).promise();return s.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem enabling this version.")})}),s}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,i=e.ratingKey,a=r.a.result(t,"url");i&&(a+="/"+i),a+="/reprocess";var s=r.a.extend(t.server.getXHROptions(a),{type:"PUT"}),c=o.a.ajax(s).promise();return c.fail(function(e){
var t=i?n.i(l.default)("There was a problem processing this item."):n.i(l.default)("There was a problem processing these items.");u.a.trigger("show:alert",{type:"error",message:t})}),c}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.items,n=e.item;t||(t=[n]),n||(n=s.a.first(t));var i=n.get("Media");if(1===t.length&&i.length>1&&n.server.supports("specificMediaDeletion"))return h.a.execute("deleteMediaItem",{item:n});var r=a({item:n,
items:t});return r.promise.then(function(){var n=s.a.map(t,function(t){return h.a.execute("deleteItem",{item:t,skipRedirect:e.skipRedirect})});return l.a.when.apply(l.a,n).always(function(){r.hide()})})}function a(e){var t,i,a=e.item,r=e.items,s=r.length>1,o=a.get("type"),l=n.i(d.b)(o);s?(t=l.plural,i=n.i(u.default)("Are you sure you want to delete {1} items from your filesystem?",r.length)):(t=l.title,i=n.i(u.default)("Are you sure you want to delete this item from your filesystem?"));var h={
title:n.i(u.default)("Delete {1}",t),message:i,confirmLabel:n.i(u.default)("Delete"),cancelLabel:n.i(u.default)("Cancel"),async:!0,hasDanger:!0};(s||n.i(d.n)(o))&&(h.requireDoubleConfirm=!0,h.doubleConfirmMessage=n.i(u.default)("Multiple files may be deleted."),h.doubleConfirmLabel=n.i(u.default)("Yes, I'm sure"));var f=new p.a(h);return c.a.trigger("show:modal",f),f}var r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(12),d=n(34),h=n(23),p=n(42);t.a=i},function(e,t,n){"use strict";function i(e){
var t=a(e);return t=t.then(function(t){var n=r();return n.promise.then(function(){return c.a.execute("deleteFile",{item:e.item,media:t}).always(function(){n.hide()})})})}function a(e){var t=o.a.Deferred(),n=e.item,i=n.get("Media");if(e.index in i)return t.resolve(i[e.index]).promise();var a=new d.a({model:n}),r=a.promise;return r.done(function(e){t.resolve(i[e])}),r.fail(function(){t.reject()}),u.a.trigger("show:modal",a),t.promise()}function r(){var e=new h.a({
title:n.i(l.default)("Delete File"),message:n.i(l.default)("Are you sure you want to delete this file from your filesystem?"),confirmLabel:n.i(l.default)("Delete"),cancelLabel:n.i(l.default)("Cancel"),async:!0,hasDanger:!0});return u.a.trigger("show:modal",e),e}var s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(23),d=n(1881),h=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=e.item.destroy();t.done(function(){o.a.trigger("navigate","playlists",{serverID:a.id}),i.resolve()}),
t.fail(function(e){o.a.trigger("show:alert",{type:"error",message:n.i(s.default)("There was a problem deleting the playlist.")}),i.reject(e)}),t.always(function(e){u.hide()})}var i=r.a.Deferred(),a=e.item.server,u=new l.a({title:n.i(s.default)("Delete Playlist"),message:n.i(s.default)("Are you sure you want to delete {1}? This cannot be undone.",e.item.get("title")),confirmLabel:n.i(s.default)("Delete"),cancelLabel:n.i(s.default)("Cancel"),async:!0,hasDanger:!0}),c=u.promise;return c.done(t),
c.fail(function(){i.reject()}),o.a.trigger("show:modal",u),i.promise()}var a=n(5),r=n.n(a),s=n(4),o=n(12),l=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=a.destroy({wait:!0});if(!e)return void i.resolve();e.done(function(){var e=s.a("appStore").dispatch,t=this.server.entityID();t&&e(u.a({serverEntityID:t})),i.resolve()}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("There was a problem deleting the library.")}),i.reject(e)})}
var i=r.a.Deferred(),a=e.section,d=new c.a({title:n.i(o.default)("Delete Library"),message:n.i(o.default)("Are you sure you want to delete {1}?",a.get("title")),confirmLabel:n.i(o.default)("Delete"),cancelLabel:n.i(o.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:n.i(o.default)("This cannot be undone."),doubleConfirmLabel:n.i(o.default)("Yes, I'm sure"),async:!0,hasDanger:!0}),h=d.promise;return h.done(t),h.fail(function(){i.reject()}),l.a.trigger("show:modal",d),
i.promise().always(function(){d.hide()}),i.promise()}var a=n(5),r=n.n(a),s=n(13),o=n(4),l=n(12),u=n(220),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(s);return e.done(function(e){u.a.trigger("show:alert",{type:"success",message:n.i(l.default)("The preview thumbnails for items in this library were deleted.")})}),e.fail(function(e){u.a.trigger("show:alert",{type:"error",
message:n.i(l.default)("There was a problem deleting the preview thumbnails for items in this library.")})}),e.always(function(e){d.hide()}),e}var i=e.section,a="/library/sections/"+i.id+"/indexes",s=r.a.extend(i.server.getXHROptions(a),{type:"DELETE"}),d=new c.a({title:n.i(l.default)("Delete Preview Thumbnails"),message:n.i(l.default)("Are you sure you want to delete the preview thumbnails for items in this library? This cannot be undone."),confirmLabel:n.i(l.default)("Delete"),
cancelLabel:n.i(l.default)("Cancel"),async:!0,hasDanger:!0}),h=d.promise;return h=h.then(function(){return t()}),u.a.trigger("show:modal",d),h}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,i=t.server,r=t.get("Media"),o=s.a.filter(r,function(e){return!!e.proxyType}),h=a({item:t,versions:o});return h.promise.then(function(){var e=d.join(["/library/metadata/",t.id],{proxy:1}),a=s.a.extend(i.getXHROptions(e),{type:"DELETE"
}),p=l.a.ajax(a);return p.done(function(){s.a.each(o,function(e){r.splice(s.a.indexOf(r,e),1)}),t.trigger("change:Media",t,t.get("Media"))}),p.fail(function(e){var t=403===e.status?n.i(u.default)("Ensure that media deletion is enabled for library content in your server settings."):n.i(u.default)("There was a problem deleting these versions.");c.a.trigger("show:alert",{type:"error",message:t})}),p.always(function(){h.hide()}),p.promise()})}function a(e){var t,i=e.item,a=e.versions,r=a.length>1
;if(r)t=n.i(u.default)("Are you sure you want to delete {1} versions of {2}?",a.length,i.get("title"));else{var o=s.a.first(a);t=n.i(u.default)("Are you sure you want to delete the {1} version of {2}?",o.title,i.get("title"))}var l=new h.a({title:r?n.i(u.default)("Delete Versions"):n.i(u.default)("Delete Version"),message:t,confirmLabel:n.i(u.default)("Delete"),cancelLabel:n.i(u.default)("Cancel"),async:!0,hasDanger:!0});return c.a.trigger("show:modal",l),l}
var r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(12),d=n(19),h=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){r.a.each(d,function(e){var t="/library/sections/"+e+"/emptyTrash",n=r.a.extend(s.getXHROptions(t),{type:"PUT"});h.push(o.a.ajax(n))});var e=o.a.when.apply(o.a,h);e.done(function(){u.a.trigger("show:alert",{type:"success",message:n.i(l.default)("The trash was emptied.")}),i.resolve()}),e.fail(function(e){u.a.trigger("show:alert",{type:"error",
message:n.i(l.default)("There was a problem emptying the trash.")}),i.reject(e)}),e.always(function(e){p.hide()})}var i=o.a.Deferred(),a=e.section,s=a?a.server:e.server,d=[],h=[];if(a)d.push(a.id);else{s.get("sections").each(function(e){d.push(e.id)})}var p=new c.a({title:n.i(l.default)("Empty Trash"),
message:n.i(l.default)("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),confirmLabel:n.i(l.default)("Empty"),cancelLabel:n.i(l.default)("Cancel"),async:!0}),f=p.promise;return f.done(t),f.fail(function(){i.reject()}),u.a.trigger("show:modal",p),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i
},function(e,t,n){"use strict";function i(e){var t,i,a;e.item?(i=e.item,a=[i]):e.items&&(a=e.items,i=a[0]);var d=r.a.extend({},e,{watched:!1}),h=i.get("type"),p=n.i(l.c)(h),f=(p||a.length>1)&&!e.force,g=1===a.length,m=g&&i.get("isSection")?i.getSyncTitle():i.get("title");if(f){var v;switch(h){case"movie":v=g?n.i(s.default)("Are you sure you want to mark {1} as unwatched?",m):n.i(s.default)("Are you sure you want to mark these movies as unwatched?");break;case"show":case"season":case"episode":
v=g?n.i(s.default)("Are you sure you want to mark all episodes of {1} as unwatched?",m):n.i(s.default)("Are you sure you want to mark these episodes as unwatched?");break;default:v=g?n.i(s.default)("Are you sure you want to mark {1} as unwatched?",m):n.i(s.default)("Are you sure you want to mark these items as unwatched?")}var y=new c.a({title:n.i(s.default)("Mark as Unwatched"),message:v});t=y.promise.then(function(){return u.a.execute("updateWatchedStatus",d)}),o.a.trigger("show:modal",y)
}else t=u.a.execute("updateWatchedStatus",d);return t}var a=n(2),r=n.n(a),s=n(4),o=n(12),l=n(34),u=n(23),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t,i,a;e.item?(i=e.item,a=[i]):e.items&&(a=e.items,i=a[0]);var d=r.a.extend({},e,{watched:!0}),h=i.get("type"),p=n.i(l.c)(h),f=(p||a.length>1)&&!e.force,g=1===a.length,m=g&&i.get("isSection")?i.getSyncTitle():i.get("title");if(f){var v;switch(h){case"movie":
v=g?n.i(s.default)("Are you sure you want to mark {1} as watched?",m):n.i(s.default)("Are you sure you want to mark these movies as watched?");break;case"show":case"season":case"episode":v=g?n.i(s.default)("Are you sure you want to mark all episodes of {1} as watched?",m):n.i(s.default)("Are you sure you want to mark these episodes as watched?");break;default:
v=g?n.i(s.default)("Are you sure you want to mark {1} as watched?",m):n.i(s.default)("Are you sure you want to mark these items as watched?")}var y=new c.a({title:n.i(s.default)("Mark as Watched"),message:v});t=y.promise.then(function(){return u.a.execute("updateWatchedStatus",d)}),o.a.trigger("show:modal",y)}else t=u.a.execute("updateWatchedStatus",d);return t}var a=n(2),r=n.n(a),s=n(4),o=n(12),l=n(34),u=n(23),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,n={
guid:e.guid,name:e.name};"album"===t.get("type")&&e.children&&e.children.reduce(function(e,t){var n=t.get("id");return n&&(e["guid["+n+"]"]=t.get("guid")),e},n);var i=l.join(["/library/metadata/",t.id,"/match"],n),a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"});return o.a.ajax(a).promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(19);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(h);e.done(function(){i.resolve()}),e.fail(function(e){u.a.trigger("show:alert",{
type:"error",message:n.i(l.default)("There was a problem merging these items.")}),i.reject(e)}),e.always(function(e){p.hide()})}var i=o.a.Deferred(),a=e.item,s=r.a.pluck(e.items,"id").join(","),d="/library/metadata/"+a.id+"/merge?ids="+s,h=r.a.extend(a.server.getXHROptions(d),{type:"PUT"}),p=new c.a({title:n.i(l.default)("Merge"),message:n.i(l.default)("Are you sure you want to merge these items together?"),async:!0}),f=p.promise;return f.done(t),f.fail(function(){i.reject()}),
u.a.trigger("show:modal",p),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=o.a.ajax(s);e.done(function(){u.a.trigger("show:alert",{type:"success",message:n.i(l.default)("The database was optimized.")}),i.resolve()}),e.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem optimizing this database.")}),i.reject(e)}),e.always(function(e){d.hide()})}
var i=o.a.Deferred(),a=e.server,s=r.a.extend(a.getXHROptions("/library/optimize"),{type:"PUT"}),d=new c.a({title:n.i(l.default)("Optimize Database"),message:n.i(l.default)("Cleans up the library database and ensures it is operating as quickly as possible. This is especially useful when you've added or removed a large amount of media from the library."),confirmLabel:n.i(l.default)("Optimize"),cancelLabel:n.i(l.default)("Cancel"),async:!0}),h=d.promise;return h.done(t),h.fail(function(){i.reject()
}),u.a.trigger("show:modal",d),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,i=e.rating,a=t.get("userRating");if(i===-1?t.unset("userRating"):t.set("userRating",i),e.passive)return r.a.Deferred().resolve().promise();var u={key:t.get("ratingKey"),identifier:t.get("identifier"),rating:i},c=l.join("/:/rate",u),d=r.a.ajax(t.server.getXHROptions(c));return d.fail(function(){t.set("userRating",a),
o.a.trigger("show:alert",{type:"error",message:n.i(s.default)("There was a problem rating this item.")})}),d.promise()}var a=n(5),r=n.n(a),s=n(4),o=n(12),l=n(19);t.a=i},function(e,t,n){"use strict";function i(e){var t,i;return e.item?(t=e.item,i=[t]):(i=e.items,t=i[0]),o.a.when.apply(o.a,r.a.map(i,function(e){var n="/library/metadata/"+e.id+"/refresh",i=r.a.extend(t.server.getXHROptions(n),{type:"PUT"});return o.a.ajax(i).promise()})).fail(function(e){
503===e.status?u.a.trigger("show:modal",new c.a({model:t.server})):u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem refreshing.")})})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(334);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=r.a.extend(a.server.getXHROptions(s),{type:"PUT"}),c=o.a.ajax(t);c.done(function(){var t,n=a.get("type");t="show"===n||"artist"===n||"album"===n?"Location":"Media",a.set(t,a.get(t).slice(0,1)),
e.skipNavigate||u.a.trigger("navigate:back"),i.resolve()}),c.fail(function(e){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem splitting this item apart.")}),i.reject(e)}),c.always(function(e){d.hide()})}var i=o.a.Deferred(),a=e.item,s="/library/metadata/"+a.id+"/split",d=new c.a({title:n.i(l.default)("Split Apart"),message:n.i(l.default)("Are you sure you want to split this item apart?"),async:!0}),h=d.promise;return h.done(t),h.fail(function(){i.reject()}),
u.a.trigger("show:modal",d),i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,i="/library/metadata/"+t.id+"/unmatch",a=r.a.extend(t.server.getXHROptions(i),{type:"PUT"}),s=o.a.ajax(a);return s.fail(function(){u.a.trigger("show:alert",{type:"error",message:n.i(l.default)("There was a problem unmatching this item.")})}),s.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12);t.a=i},function(e,t,n){
"use strict";function i(e){function t(){var e=o.a.ajax(v);e.done(function(){i.resolve()}),e.fail(function(e){if(503===e.status)u.a.trigger("show:modal",new d.a({model:p}));else{var t=h?n.i(l.default)("There was a problem canceling the update."):n.i(l.default)("There was a problem updating the library.");u.a.trigger("show:alert",{type:"error",message:t})}i.reject(e)})}var i=o.a.Deferred(),a=e.section,s=a?a.id:"all",h=e.cancel,p=a?a.server:e.server,f=e.params||{},g={};f.force&&(g.force=1)
;var m="/library/sections/"+s+"/refresh",v=r.a.extend(p.getXHROptions(m),{data:g});if(h&&(v.type="DELETE",a&&a.set("refreshing",!1)),g.force){var y=new c.a({title:n.i(l.default)("Refresh All"),message:n.i(l.default)("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:n.i(l.default)("Refresh"),cancelLabel:n.i(l.default)("Cancel")}),b=y.promise;b.done(t),b.fail(function(){i.reject()}),
u.a.trigger("show:modal",y)}else t();return i.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42),d=n(334);t.a=i},function(e,t,n){"use strict";function i(){c&&(c.stop(),c.stopListening())}function a(e){i(),c=l.a.getInstance(e.type,{forceLocal:!0});var t=new u.a({playQueueItem:e.model,playQueue:e.playQueue,volume:e.volume}),n=c.load({model:t,autoplay:e.autoplay,offset:e.offset});return c.listenTo(s.a,"audio:fadeOut",function(t){t.exceptKey!==e.model.get("key")&&c.fadeOut()}),
c.listenTo(s.a,"audio:stop",function(){c.stop()}),c.listenTo(t,"change:stopped",function(e,t){t&&i()}),n}function r(e){if(!e)return i();d||n.i(o.a)(e).then(a)}var s=n(12),o=n(778),l=n(299),u=n(485),c=null,d=!1;s.a.on("show:player",function(){d=!0}),s.a.on("hide:player",function(){d=!1}),t.a=r},function(e,t,n){"use strict";function i(e){var t=n.i(s.a)("appModel").get("primaryPlayer");return e=r.a.extend({},e,{confirmClearPlayQueue:function(){var e=new c.a({title:n.i(o.default)("Play Now"),
message:n.i(o.default)("This will clear the contents of Up Next and play the selection instead.")});return l.a.trigger("show:modal",e),e.promise},supportsContinuous:!t||r()(t.get("protocolCapabilities")).contains("playqueues")}),n.i(u.a)(e).progress(function(e){return l.a.trigger("show:playerLoading",e)}).then(function(e){return l.a.trigger("show:player",e)}).fail(function(e){return l.a.trigger("hide:playerLoading",e)})}var a=n(2),r=n.n(a),s=n(13),o=n(4),l=n(12),u=n(778),c=n(42);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.item,i=t.server.get("playQueueManager").getFor(t);if(i){var a=l.a("appModel"),s=a.get("primaryPlayer");if(s){var h=s.get("protocolCapabilities");if(!r.a.contains(h,"playqueues"))return c.a.trigger("show:alert",{type:"error",message:n.i(u.default)("The connected player doesn't support queueing.")}),o.a.Deferred().resolve().promise()}return i.queueContent(t,e)}return d.a.execute("playMedia",{item:t})}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(4),c=n(12),d=n(23);t.a=i},function(e,t,n){"use strict";function i(e){function t(e){if(a&&a.id){var t="/status/sessions/terminate?sessionId="+a.id+"&reason="+e,l=r.a.ajax(u.getXHROptions(t));l.done(function(e){i.trigger("destroy",i,i.collection),c.resolve(e)}),l.fail(function(e){o.a.trigger("show:alert",{type:"error",message:n.i(s.default)("There was a problem stopping playback")}),c.reject(e)}),l.always(function(){return d.hide()})}}
var i=e.model,a=i.get("Session"),u=i.server,c=r.a.Deferred(),d=new l.a,h=d.promise;return h.done(function(e){return t(e)}),h.fail(function(){return c.reject()}),o.a.trigger("show:modal",d),c.promise()}var a=n(5),r=n.n(a),s=n(4),o=n(12),l=n(1884);t.a=i},function(e,t,n){"use strict";function i(e){var t=r.a.Deferred(),n=e.server,i=n.get("accessToken");if(!n.supports("transientToken")||/^transient-/.test(i))return t.resolve(i).promise();var a={type:e.type||"delegation",scope:e.scope||"all"
},l=o.join("/security/token",a),u=r.a.ajax(n.getXHROptions(l));return u.done(function(e){var n=s.a.parseXML(e);t.resolve(n.token)}),u.fail(function(e){t.reject(e)}),t.promise()}var a=n(5),r=n.n(a),s=n(44),o=n(19);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n={download:e.download===!1?"0":"1"},i=l.join("/updater/check",n),a=r.a.extend(t.getXHROptions(i),{type:"PUT"}),s=e.initialState||"checking",u=t.get("desktop").get("update");u.set("state",s);var c=o.a.ajax(a).promise()
;return c.fail(function(){u.set("state","error")}),c}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(19);t.a=i},function(e,t,n){"use strict";function i(e){function t(){a.fetch().done(function(){var n=a.get("mappingState"),r=e.value&&"unknown"===n,s=!e.value&&"mapped"===n;"waiting"===n||r||s?i||(i=setInterval(t,d)):(i=clearInterval(i),a.isWaiting()&&a.set("remoteAccessState",""),c.resolve())})}
var i,a=e.cloudAccount,l=a.server.get("desktop").get("settings"),u=l.get("PublishServerOnPlexOnlineKey"),c=r.a.Deferred(),d=500;if(!a.isWaiting()){var h=e.value?"connecting":"disconnecting";a.set("remoteAccessState",h)}var p=a.previous("remoteAccessState"),f=u.save({PublishServerOnPlexOnlineKey:e.value},{timeout:0});return f.done(t),f.fail(function(t){var i;i=e.value?n.i(s.default)("There was a problem connecting your server."):n.i(s.default)("There was a problem disconnecting your server."),
o.a.trigger("show:alert",{type:"error",message:i}),a.set("remoteAccessState",p),c.reject(t)}),c.promise()}var a=n(5),r=n.n(a),s=n(4),o=n(12);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=a.get("desktop").get("update");e.set("state","installing");var t=o.a.ajax(s).promise();return t.fail(function(){e.set("state","error")}),t}var i,a=e.server,s=r.a.extend(a.getXHROptions("/updater/apply"),{type:"PUT"});a.get("activeConnection").get("isLoopback")||(i=new c.a({
title:n.i(l.default)("Remote Installation"),confirmLabel:n.i(l.default)("Continue"),cancelLabel:n.i(l.default)("Cancel"),message:n.i(l.default)("The installer may display dialogs that require input. Make sure you have desktop access to the computer running Plex Media Server before continuing."),hasDanger:!0}),u.a.trigger("show:modal",i));var d=i?i.promise:o.a.Deferred().resolve().promise();return d=d.then(function(){return t()})}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(42);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.cloudAccount,n={cloudAccount:t,value:!1},i=s.a.execute("connectServer",n);return i=i.then(function(){return n.value=!0,s.a.execute("connectServer",n)}),i=i.then(function(){if(t.get("mappingError"))return r.a.Deferred().reject().promise()})}var a=n(5),r=n.n(a),s=n(23);t.a=i},function(e,t,n){"use strict";function i(e){var t=new f.a({machineIdentifier:e},{onlyIfCached:!0});if(!l.a.isEmpty(t))return t}function a(e){
var t=e.get("desktop").get("cloudAccount"),n=t.destroy();return n.done(function(){e.set({myPlexSigninState:"none",myPlexSubscription:!1})}),n}function r(e){e.trigger("destroy",e,e.collection),e.cache.remove(e)}function s(e){function t(){var e;if(f)e=f.destroy({wait:!0});else{var t="/api/servers/"+m.id,n=l.a.extend(u.server.getXHROptions(t),{type:"DELETE"});e=c.a.ajax(n)}if(m){if(m.get("connected")&&"ok"===m.get("myPlexSigninState")){var i=m.get("desktop").get("cloudAccount");e=e.then(function(){
return i.fetch()}),e=e.then(function(){return a(m)})}m.get("connected")===!1?r(m):e.always(function(){p.a.trigger("test:server",m),m.populate().fail(function(){r(m)})})}return e.always(function(){y.hide()}),e.promise()}var s,o=d.a("appModel"),u=o.get("user"),f=e.device,m=e.server||i(f.get("clientIdentifier"))
;s=f?f.get("isPersonalCloudServer")?n.i(h.default)("If you remove this Plex Cloud server, all your Plex libraries, shares, and metadata will be deleted! Your media files will not be affected. This cannot be undone."):n.i(h.default)("If you remove the server, all syncs and shares associated with the server will be lost and you will need to sign the server in again to restore access to Plex."):n.i(h.default)("Are you sure you want to remove this server?");var v={
title:n.i(h.default)("Remove Server"),message:s,confirmLabel:n.i(h.default)("Remove"),cancelLabel:n.i(h.default)("Cancel"),async:!0,hasDanger:!0};f&&(v.requireDoubleConfirm=!0,v.doubleConfirmMessage=n.i(h.default)("Are you sure you want to remove this server?"),v.doubleConfirmLabel=n.i(h.default)("Yes, I'm sure"));var y=new g.a(v),b=y.promise;return b=b.then(function(){return t()}),p.a.trigger("show:modal",y),b}var o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(13),h=n(4),p=n(12),f=n(96),g=n(42);t.a=s
},function(e,t,n){"use strict";function i(e,t){var n=t.getXHROptions("/api/claim/token"),i=u.a.ajax(n).promise();return i=i.then(function(t){var n=f.a.parseXML(t),i=n.token,a=d.join("/myplex/claim",{token:i}),r=e.getXHROptions(a,{type:"POST"});return u.a.ajax(r).promise()})}function a(e,t,n){var i=d.join("/myplex/account",{username:e,password:t}),a=n.getXHROptions(i,{type:"PUT"});return u.a.ajax(a).promise()}function r(e){
var t=e.cloudAccount,r=e.username,s=e.password,l=e.claim,d=void 0!==l&&l,g=u.a.Deferred(),m=t.server,v=n.i(c.a)("appModel"),y=v.get("user"),b=v.get("cloudServer"),S=m.get("accessToken");m.set("accessToken",y.get("authToken"));var I=d?i(m,b):a(r,s,m);return I.done(function(e){var i=o.a.isObject(e)?e:f.a.parseXML(e);i&&"invalid"===i.signInState?(p.a.trigger("show:alert",{type:"error",message:n.i(h.default)("The username or password is incorrect.")}),g.reject()):(m.set({myPlexSigninState:"ok",
myPlexUsername:y.get("email")}),t.set({signedIn:!0,username:y.get("email")}),g.resolve())}),I.fail(function(e){m.set("accessToken",S),t.get("signedIn")===!0&&t.set("signedIn",!1);var i=void 0;i=401===e.status?n.i(h.default)("The username or password is incorrect."):n.i(h.default)("There was a problem signing in to Plex."),p.a.trigger("show:alert",{type:"error",message:i}),g.reject(e)}),g.promise()}var s=n(2),o=n.n(s),l=n(5),u=n.n(l),c=n(13),d=n(19),h=n(4),p=n(12),f=n(61);t.a=r},function(e,t,n){
"use strict";function i(e){var t=e.cloudAccount,i=t.destroy({timeout:0});return i.done(function(){t.server.set({myPlexSigninState:"none",myPlexSubscription:!1})}),i.fail(function(){r.a.trigger("show:alert",{type:"error",message:n.i(a.default)("There was a problem signing the server out.")})}),i.promise()}var a=n(4),r=n(12);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),i=e.cloudAccount;i.set("signedIn",!1),i.set({username:"",email:"",password:""});var a=i.save({
username:e.username,email:e.email,password:e.password});return a.done(function(e){var a=r.a.isObject(e)?e:c.a.parseXML(e);if(a&&"invalid"===a.signInState){var s;c.a.parseArray(a,"Error"),s=a.Error.length?r.a.first(a.Error).error:n.i(l.default)("This account information is invalid."),u.a.trigger("show:alert",{type:"error",message:s}),t.reject()}else i.set("signedIn",!0),t.resolve()}),a.fail(function(e){u.a.trigger("show:alert",{type:"error",
message:n.i(l.default)("There was a problem signing up for a Plex account.")}),t.reject(e)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12),c=n(44);t.a=i},function(e,t,n){"use strict";function i(e){var t,i=e.server,a=e.connection,o=i.get("friendlyName"),l=(new Date).getTime(),u=i.resolveUrl("/web/img/blank.png?cb="+l,{connection:a}),c=r.a.Deferred();n.i(s.a)("[Servers] Testing image for %s at %s",o,u);var d=new window.Image;return d.onload=function(){
d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),s.a.info("[Servers] Image test for %s at %s was successful",o,u),c.resolve(i,a)},d.onerror=d.onabort=function(){d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),s.a.warn("[Servers] %s at %s unavailable",o,u),c.reject(i,a)},t=setTimeout(function(){d.onload=d.onerror=d.onabort=null,d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.a.warn("[Servers] %s at is unavailable (Timeout)",o,u),c.reject(i,a)},5e3),
d.src=u,c.promise()}var a=n(5),r=n.n(a),s=n(28);t.a=i},function(e,t,n){"use strict";function i(e){var t=n.i(r.a)("appModel").get("settings"),i=t.get("dismissedUnclaimedServers"),l=i.indexOf(e.id)>-1,u=a.a.history.getFragment();l||/^\!\/setup/.test(u)||s.a.trigger("show:bar","alertbar",new o.a({model:e}))}var a=n(52),r=n(13),s=n(12),o=n(1734);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=i.save(null,{force:!0});i.trigger("destroy",i,s),e.done(function(){g.fetch(),
f.get("desktop").get("friends").fetch(),f.get("desktop").get("sentInvites").fetch(),i.get("server")&&h.a.trigger("discover:servers"),m.resolve()}),e.fail(function(e){h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("There was a problem accepting this invite.")}),s.add(i,{at:l}),m.reject(e)})}var i=e.invite,s=i.collection,l=s.indexOf(i),p=c.a("appModel"),f=p.get("user"),g=f.get("homeUsers"),m=u.a.Deferred();o.a.extend(e,{homeUsers:g,signedInHomeUser:g.get(f.id)});var v=a(e)
;return v.done(function(){r(e).always(t)}),v.fail(function(){m.reject()}),m.promise}function a(e){if(!e.invite.get("home"))return u.a.Deferred().resolve().promise();var t
;t=e.homeUsers.length>1?e.signedInHomeUser.get("admin")?n.i(d.default)("You are the admin in your current home. If you leave, the remaining users will be removed and managed users will be deleted."):n.i(d.default)("Are you sure you want to join this home? You will leave your current home."):n.i(d.default)("The admin of this home will have access to your account. Other users of this home will be able to switch to your account by entering your PIN.");var i=new p.a({
title:n.i(d.default)("Join Home"),message:t,confirmLabel:n.i(d.default)("Join"),cancelLabel:n.i(d.default)("Cancel"),hasDanger:!0});return h.a.trigger("show:modal",i),i.promise}function r(e){if(e.invite.get("home")&&!e.signedInHomeUser.get("protected")){var t=new f.a({model:e.signedInHomeUser,isEditing:!0,isEditWarning:!0});return h.a.trigger("show:modal",t),t.promise}return u.a.Deferred().resolve().promise()}var s=n(2),o=n.n(s),l=n(5),u=n.n(l),c=n(13),d=n(4),h=n(12),p=n(42),f=n(338);t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.syncItem,i=e.server;if(!t.server.get("connected"))return l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("Please sign in to remove sync items.")}),s.a.Deferred().reject().promise();var r=a(),c=r.promise.then(function(){var e=t.destroy();return e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("There was a problem removing this sync item.")})}),e.always(function(){r.hide()}),e})
;return c=c.then(function(){return u.a.execute("refreshSyncLists",{server:i,silent:!0,skipContent:!0})})}function a(){var e=new c.a({title:n.i(o.default)("Stop Syncing"),message:n.i(o.default)("Are you sure you want to stop syncing this item? All files created by this job will be removed from the device."),confirmLabel:n.i(o.default)("Remove"),cancelLabel:n.i(o.default)("Cancel"),async:!0,hasDanger:!0});return l.a.trigger("show:modal",e),e}var r=n(5),s=n.n(r),o=n(4),l=n(12),u=n(23),c=n(42);t.a=i
},function(e,t,n){"use strict";function i(){return a().then(r).then(s)}function a(){var e=l.a.Deferred(),t=u.a("appModel"),n=t.get("user");if(!!n.get("subscription").get("features").get("home")||n.get("homeUsers").length>1){var i=n.get("homeUsers").findWhere({guest:!0}),a=n.get("homeDetails");if(i)e.resolve(i);else{var r=a.populate();r.done(function(){i=new d.a({id:a.get("guestUserID"),guest:!0},{server:n.server}),e.resolve(i)}),r.fail(function(){e.reject()})}}else e.reject();return e.promise()}
function r(e){return c.a.execute("authenticateWithServer",{homeUser:e})}function s(e){var t=l.a.Deferred(),n=u.a("appModel"),i=n.get("user");return i.clearAccessToken().always(function(){i.signIn(e).always(function(){t.resolve()})}),t.promise()}var o=n(5),l=n.n(o),u=n(13),c=n(23),d=n(489);t.a=i},function(e,t,n){"use strict";function i(e){var t=l.a("appModel"),i=t.get("user"),a=[],s={url:e.item.get("url"),message:e.message};o.a.each(e.playlistIDs,function(e){
var t=d.join(["/pms/playlists/",e,"/items"],s),n=o.a.extend(i.server.getXHROptions(t),{type:"POST"});a.push(r.a.ajax(n))});var h=r.a.when.apply(r.a,a);return h.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(u.default)("There was a problem recommending this item.")})}),h.promise()}var a=n(5),r=n.n(a),s=n(2),o=n.n(s),l=n(13),u=n(4),c=n(12),d=n(19);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,i=r.a.extend(t.getXHROptions("/sync/refreshSynclists"),{type:"PUT"
}),a=o.a.ajax(i);return e.skipContent||(a=a.then(function(e){var n=r.a.extend(t.getXHROptions("/sync/refreshContent"),{type:"PUT"});return o.a.ajax(n)})),a.done(function(){e.silent||u.a.trigger("show:alert",{type:"success",message:n.i(l.default)("Synced items were refreshed.")})}),a.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(4),u=n(12);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=n.destroy({wait:!0});return t.done(function(){if(n.get("server")){
s.a("appModel").get("user").get("desktop").get("friends").fetch()}}),t.fail(function(){r(e)}),t.always(function(){i.hide()}),t.promise()}var n=e.invite,i=a(e),o=i.promise;return o=o.then(function(){return t()}),l.a.trigger("show:modal",i),o}function a(e){var t,i;return"requests"===e.subset?(t=n.i(o.default)("Reject Invite"),i=n.i(o.default)("Are you sure you want to reject this invite?")):(t=n.i(o.default)("Cancel Invite"),i=n.i(o.default)("Are you sure you want to cancel this invite?")),
new u.a({title:t,message:i,async:!0})}function r(e){var t;t="requests"===e.subset?n.i(o.default)("There was a problem rejecting this invite."):n.i(o.default)("There was a problem canceling this invite."),l.a.trigger("show:alert",{type:"error",message:t})}var s=n(13),o=n(4),l=n(12),u=n(42);t.a=i},function(e,t,n){"use strict";function i(){var e=r.a.Deferred();return n.i(s.a)("appModel").get("user").get("isLocked")?e.reject():e.resolve(),e.promise()}var a=n(5),r=n.n(a),s=n(13);t.a=i
},function(e,t,n){"use strict";function i(e){function t(){var e=o.destroy({wait:!0});return e.fail(function(){r.a.trigger("show:alert",{type:"error",message:n.i(a.default)("There was a problem removing this device.")})}),e.always(function(){l.hide()}),e.promise()}var i,o=e.device
;i=o.get("isCloudSync")?n.i(a.default)("Deleting the Cloud Sync entry will stop Plex from being able to access any existing Cloud Sync content. You will need to create and upload new sync items."):n.i(a.default)("If you remove this device, you will need to sign in again on the device to restore access to Plex.");var l=new s.a({title:n.i(a.default)("Remove Device"),message:i,confirmLabel:n.i(a.default)("Remove"),cancelLabel:n.i(a.default)("Cancel"),async:!0,hasDanger:!0}),u=l.promise
;return u=u.then(function(){return t()}),r.a.trigger("show:modal",l),u}var a=n(4),r=n(12),s=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){l&&i.set("home",!1);var e=i.destroy({wait:!0});return e.done(function(){var e=r.a("appModel"),t=e.get("user"),n=i.get("serverShares");if(t.get("desktop").get("invites").fetch(),t.get("desktop").get("sentInvites").fetch(),l){t.get("homeUsers").fetch()}n.getLibraryCount({owned:!1})&&o.a.trigger("discover:servers")}),e.fail(function(){
l&&i.set("home",!0),o.a.trigger("show:alert",{type:"error",message:n.i(s.default)("There was a problem removing this friend.")})}),e.always(function(){u.hide()}),e.promise()}var i=e.friend,l=i.get("home"),u=a(e),c=u.promise;return c=c.then(function(){return t()}),o.a.trigger("show:modal",u),c}function a(e){var t=e.friend,i=t.get("serverShares"),a=i.getLibraryCount({owned:!0}),o=i.getLibraryCount({owned:!1
}),c=a+o,d=t.get("title"),h=n.i(s.default)("Are you sure you want to remove {1}?",d),p=n.i(l.a)(n.i(s.default)("library"),c,n.i(s.default)("libraries"));if(a&&o?h+=" "+n.i(s.default)("You are sharing {1} {2} with each other.",c,p):a?h+=" "+n.i(s.default)("You are sharing {1} {2} with this friend.",a,p):o&&(h+=" "+n.i(s.default)("This friend is sharing {1} {2} with you.",o,p)),t.get("home")){var f=r.a("appModel"),g=f.get("user")
;g.get("homeUsers").get(g.id).get("admin")?h+=" "+n.i(s.default)("This friend will be removed from your home."):h+=" "+n.i(s.default)("You will be leaving your home.")}return new u.a({title:n.i(s.default)("Remove Friend"),message:h,confirmLabel:n.i(s.default)("Remove"),cancelLabel:n.i(s.default)("Cancel"),async:!0,hasDanger:!0})}var r=n(13),s=n(4),o=n(12),l=n(388),u=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=o.a.extend(n.server.getXHROptions(n.url()),{
type:"DELETE"}),i=u.a.ajax(t);return i.done(function(){var e=d.get(n.id);e?(n.trigger("destroy",n,l),n.get("restricted")?e.trigger("destroy",e,d):e.set("home",!1)):(l.reset([n]),n.set("admin",!0),d.each(function(e){e.set("home",!1)}));var t=s.hasHome();if(s.set("home",t),!t){s.get("homeDetails").clear()}}),i.fail(function(){r(e)}),i.always(function(){p.hide()}),i.promise()}var n=e.homeUser,i=c.a("appModel"),s=i.get("user"),l=s.get("homeUsers"),d=s.get("desktop").get("friends"),p=a(e),f=p.promise
;return f=f.then(function(){return t()}),h.a.trigger("show:modal",p),f}function a(e){var t,i,a,r=e.homeUser;return e.isSignedInUser?(t=n.i(d.default)("Leave Home"),a=n.i(d.default)("Leave"),i=r.get("admin")?n.i(d.default)("You are the admin in this home. If you leave, the remaining users will be removed and managed users will be deleted."):n.i(d.default)("Are you sure you want to leave this home?")):(t=n.i(d.default)("Remove User"),a=n.i(d.default)("Remove"),
i=r.get("restricted")?n.i(d.default)("Removing a managed user from your home will delete the managed user. Watched status for this user will be lost. This cannot be undone."):n.i(d.default)("You will no longer be able to switch to this user.")),new p.a({title:t,message:i,confirmLabel:a,cancelLabel:n.i(d.default)("Cancel"),async:!0,hasDanger:!0})}function r(e){var t
;t=e.isSignedInUser?n.i(d.default)("There was a problem leaving this home."):n.i(d.default)("There was a problem removing this user."),h.a.trigger("show:alert",{type:"error",message:t})}var s=n(2),o=n.n(s),l=n(5),u=n.n(l),c=n(13),d=n(4),h=n(12),p=n(42);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=u.destroy({wait:!0});return e.done(function(){var e=a.a("appModel"),t=e.get("user");t.get("desktop").get("friends").fetch(),t.get("desktop").get("invites").fetch(),
s.a.trigger("discover:servers")}),e.fail(function(){var e;e=u.get("owned")?n.i(r.default)("There was a problem removing this share."):n.i(r.default)("There was a problem leaving this server."),s.a.trigger("show:alert",{type:"error",message:e})}),e.always(function(){c.hide()}),e.promise()}var i,l,u=e.serverShare;u.get("owned")?(i=n.i(r.default)("Stop Sharing"),l=n.i(r.default)("Are you sure you want to stop sharing with this friend?")):(i=n.i(r.default)("Leave Server"),
l=n.i(r.default)("Are you sure you want to leave this server? You can rejoin at any time."));var c=new o.a({title:i,message:l,async:!0,hasDanger:!0}),d=c.promise;return d=d.then(function(){return t()}),s.a.trigger("show:modal",c),d}var a=n(13),r=n(4),s=n(12),o=n(42);t.a=i},function(e,t,n){"use strict";function i(e){var t=l.a("appModel"),i=t.get("user"),a=[],s={url:e.item.get("url"),message:e.message};o.a.each(e.networkIDs,function(e){
var t=d.join(["/pms/social/networks/",e,"/share"],s),n=o.a.extend(i.server.getXHROptions(t),{type:"POST"});a.push(r.a.ajax(n))});var h=r.a.when.apply(r.a,a);return h.fail(function(e){c.a.trigger("show:alert",{type:"error",message:n.i(u.default)("There was a problem sharing this item.")})}),h.promise()}var a=n(5),r=n.n(a),s=n(2),o=n.n(s),l=n(13),u=n(4),c=n(12),d=n(19);t.a=i},function(e,t,n){"use strict";function i(e){var t,n=e.user,i=e.serverShare,a=i.get("Section")
;if(!a||!a.length)return u.a.Deferred().resolve().promise();t=i.get("allLibraries")?[]:o.a.pluck(o.a.where(a,{shared:!0}),"id");var s={server_id:i.get("machineIdentifier"),shared_server:{library_section_ids:t}};n.isNew()&&(s.sharing_settings=n.getSaveParams()),i.isNew()&&(n.isNew()?s.shared_server.invited_email=n.get("username"):s.shared_server.invited_id=n.id);var l=i.url(),c=o.a.extend(n.server.getXHROptions(l),{type:i.isNew()?"POST":"PUT",contentType:"application/json",data:r()(s)})
;return u.a.ajax(c).promise()}var a=n(113),r=n.n(a),s=n(2),o=n.n(s),l=n(5),u=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){var t=n.i(s.a)("appModel").get("user"),i=t.get("homeUsers"),a=i.get(t.id);if(a.get("protected")||i.length>1)return r.a.Deferred().reject().promise();var c=new l.a({model:a,isEditing:!0,isEditWarning:!0});return c.promise.always(function(e){e||o.a.trigger("show:modal",new u.a({type:"home"}))}),o.a.trigger("show:modal",c),c.promise}
var a=n(5),r=n.n(a),s=n(13),o=n(12),l=n(338),u=n(870);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.a("appModel"),i=t.get("user"),a=e.item.server;if("ok"!==a.get("myPlexSigninState")){var h=n.i(o.default)("This server needs to be connected to Plex to sync its content.");return void l.a.trigger("show:alert",{type:"error",message:h})}if(!a.get("allowSync"))return void l.a.trigger("show:modal",new u.a({model:a}))
;var p=i.get("desktop").get("devices"),f=p.filterSyncDevices(e.item),g=r.a.clone(e);if(f.length){var m=new d.a({collection:f});m.promise.done(function(e){g.device=f.get(e),l.a.trigger("show:modal",new c.a(g))}),l.a.trigger("show:modal",m)}else l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("You are not signed in to any sync capable devices.")})}var a=n(2),r=n.n(a),s=n(13),o=n(4),l=n(12),u=n(560),c=n(869),d=n(1880);t.a=i},function(e,t,n){"use strict";function i(){
return n.i(s.a)("metrics").trackEvent({event:"client:signout",interaction:!0}),u.a.execute("resetUser").then(function(){return d.a.restoreDefaults(),d.a.save()}).then(function(){if(c.a.get("allowSSO")){var e=n.i(s.a)("appModel"),t=e.get("cloudServer");return window.location=l.join([t.get("baseUrl"),"/users/sign_out"]),r.a.Deferred().reject().promise()}o.a.trigger("reset:servers")})}var a=n(5),r=n.n(a),s=n(13),o=n(12),l=n(19),u=n(23),c=n(56),d=n(114);t.a=i},function(e,t,n){"use strict"
;function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.i(l.a)("appModel").get("user"),i=r.a.pick(e,"username","email","password"),a=t.server.getXHROptions("/api/v2/users",{type:"POST",data:i}),s=o.a.ajax(a).promise();return s=s.then(function(n){return e.remember?u.a.restorePrevious():u.a.register(c.a.getInstance()),t.signIn(n,{lockState:g.a.lockStates.UNLOCKED})}),s.fail(function(e){var t=void 0;if(422===e.status){
var i=e.responseText&&p.a.parseXML(e.responseText),a=i&&i.error,s=r.a.isArray(a)?r.a.first(a):a;t=s?r.a.isObject(s)?n.i(f.a)(s):s:n.i(d.default)("This account information is invalid.")}else t=n.i(d.default)("There was a problem connecting to Plex.");h.a.trigger("show:alert",{type:"error",message:t})}),s.done(function(){n.i(l.a)("metrics").trackEvent({event:"client:signup",interaction:!0,properties:{firstRun:!!e.isFirstRun}})}),s}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(13),u=n(95),c=n(363),d=n(4),h=n(12),p=n(61),f=n(249),g=n(207);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.user,i=t.get("homeDetails"),a=t.get("homeSize");i.set("guestEnabled",e.enable);var c=i.save();return c.done(function(){t.get("homeUsers").fetch(),t.get("desktop").get("friends").fetch(),t.hasHome()||u.a.execute("showHomeWarningsModal"),e.enable||2!==a||i.clear()}),c.fail(function(t){var i=l.a.parseXML(t.responseText),a=i&&i.status
;r.a.isString(a)||(a=e.enable?n.i(s.default)("Unable to enable guest account"):n.i(s.default)("Unable to disable guest account")),o.a.trigger("show:alert",{type:"error",message:a})}),c}var a=n(2),r=n.n(a),s=n(4),o=n(12),l=n(44),u=n(23);t.a=i},function(e,t,n){"use strict";function i(e){var t=o.a.Deferred(),n="/api/users/validate?invited_email="+encodeURIComponent(e.username),i=r.a.extend(e.server.getXHROptions(n),{type:"POST"}),a=o.a.ajax(i);return a.done(function(){t.resolve()}),
a.fail(function(e){var n=e.responseText,i=l.a.parseXML(n);t.reject(e,i&&i.status)}),t.promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(44);t.a=i},function(e,t,n){"use strict";function i(){if(!o.a.hasReplaceState)return r.a.Deferred().resolve().promise();var e=r.a.Deferred(),t=window.location,n=l.a.parseQueryString(t.search),i=void 0;try{i=JSON.parse(n.alerts),delete n.alerts}catch(e){}if(i){u.a.set("alerts",i);var a=""+s.join([""+t.origin+t.pathname],n)+t.hash
;window.history.replaceState({},"",a)}return e.resolve().promise()}var a=n(5),r=n.n(a),s=n(19),o=n(66),l=n(61),u=n(56);t.a=i},function(e,t,n){"use strict";function i(){r.a.trigger("initialize:app");var e=n.i(h.a)();return e=e.then(p.a),e=e.then(f.a),e=e.then(g.a),e=e.then(m.a),e=e.then(o.a),e=e.then(l.a),e=e.then(u.a),e=e.then(v.a),e=e.then(y.a),s.a.get("allowCloudPubSub")&&(e=e.then(function(){return n.i(c.a)()})),e=e.then(b.a),e=e.then(S.a),a.a.mobile&&(e=e.then(I.a)),e=e.then(d.a),
e=e.then(w.a),e=e.then(M.a)}var a=n(31),r=n(12),s=n(56),o=n(1129),l=n(1128),u=n(1133),c=n(1130),d=n(1131),h=n(1521),p=n(1530),f=n(1519),g=n(1524),m=n(1516),v=n(1523),y=n(1525),b=n(1529),S=n(1522),I=n(1528),w=n(1527),M=n(1531),C=(n(1526),n(1095)),D=(n.n(C),n(1092)),P=(n.n(D),n(1094)),T=(n.n(P),n(1091)),x=(n.n(T),n(1093));n.n(x);t.a=i},function(e,t,n){"use strict";function i(){o.a.register(new l.a),n.i(s.c)({metricsReporter:[d.a,c.a],testServerConnection:h.a}),n.i(s.c)({UserFlexModel:g.a,
ServerFlexModel:m.a,CloudServerFlexModel:v.a});var e=new f.a;return n.i(s.c)({appModel:e,appStore:n.i(p.a)(e),logs:new y.a([],{parent:e})}),n.i(s.c)({metrics:[new D.a,u.a],serverManager:new b.a({appModel:e}),primaryServerManager:new S.a({appModel:e}),manualServerManager:new I.a({appModel:e}),serverConnectionManager:new w.a({appModel:e}),serverConnectionTestManager:new M.a({appModel:e}),serverUpdateManager:new C.a({appModel:e})}),r.a.Deferred().resolve().promise()}
var a=n(5),r=n.n(a),s=n(13),o=n(362),l=n(1433),u=n(1104),c=n(1105),d=n(1102),h=n(1112),p=n(1695),f=n(1538),g=n(1638),m=n(1612),v=n(1600),y=n(1169),b=n(1536),S=n(1535),I=n(1141),w=n(1146),M=n(1147),C=n(809),D=n(1534);t.a=i},function(e,t,n){"use strict";function i(){return s.a.registerAll(o),r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(23),o=n(1454);t.a=i},function(e,t,n){"use strict"
;var i=n(3035),a=n.n(i),r=n(3033),s=n.n(r),o=n(3034),l=n.n(o),u=n(3032),c=n.n(u),d=n(3036),h=n.n(d),p=n(3030),f=n.n(p),g=n(3031),m=n.n(g),v=n(7),y=n.n(v);y.a.registerPartial("setting",a.a),y.a.registerPartial("lockableTagInput",s.a),y.a.registerPartial("lockableTextInput",l.a),y.a.registerPartial("lockableNumericInput",c.a),y.a.registerPartial("textInput",h.a),y.a.registerPartial("autocompleteTextInput",f.a),y.a.registerPartial("connectError",m.a)},function(e,t,n){"use strict";function i(){
var e=n.i(a.a)();return e.done(function(){(new r.a).start()}),e}var a=n(1132),r=n(1533);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(r.a)();return e.done(function(){n.i(a.a)("serverUpdateManager").start()}),e}var a=n(13),r=n(1135);t.a=i},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel");return n.i(s.a)().then(function(){return n.i(r.a)(e.get("experienceSettings").populate())})}var a=n(13),r=n(163),s=n(1136);t.a=i},function(e,t,n){"use strict";function i(){
var e=o.a.Deferred(),t=u.a.get("myPlexAccessToken");return t.done(function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken||l.a.register(u.a.getInstance())}),t.always(function(){e.resolve()}),e.promise()}function a(){var e=o.a.Deferred(),t=l.a.set("plexTestToken",1);return t.done(function(){l.a.remove("plexTestToken")}),t.fail(function(e){var t=new c.a;d.a.warn("Storage module swapped for "+t.name+' due to exception: "'+e+'"'),u.a.register(t),l.a.register(t,{ignorePrevious:!0})}),
t.always(function(){e.resolve()}),e.promise()}function r(){return i().then(a).then(h.a)}var s=n(5),o=n.n(s),l=n(95),u=n(363),c=n(1109),d=n(28),h=n(1137);t.a=r},function(e,t,n){"use strict";function i(){var e=n.i(a.a)("appModel").get("user"),t=n.i(r.a)();return t.done(function(){new s.a(e).start(),(new o.a).start()}),t}var a=n(13),r=n(1138),s=n(1537),o=n(1532);t.a=i},function(e,t,n){"use strict";var i=n(5),a=(n.n(i),n(462)),r=(n.n(a),n(1053)),s=(n.n(r),n(1057)),o=(n.n(s),n(1058)),l=(n.n(o),
n(1044)),u=(n.n(l),n(1047)),c=(n.n(u),n(1040)),d=(n.n(c),n(1046)),h=(n.n(d),n(1416));n.i(h.a)({eventTypes:{key:{}},Event:Function})},function(e,t,n){"use strict";function i(){function e(e){if(i||arguments[1]instanceof window.KeyboardEvent&&"esc"===arguments[2]){if(n.i(c.a)("appModel").get("settings").get("keyboardShortcuts"))return e.apply(t,r.a.toArray(arguments).slice(1))}}var t=d.a.getInstance(),i=!0;return h.a.on("anyModalOpen",function(){i=!1}),h.a.on("allModalsClosed",function(){i=!0}),
r.a.each(t.shortcuts,function(n){u.a.bind(n.keys,r.a.wrap(t[n.fn],e))}),o.a.Deferred().resolve().promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(3176),u=n.n(l),c=n(13),d=n(471),h=n(12);t.a=i},function(e,t,n){"use strict";function i(){function e(){r.a.each(h,function(t){document.body.removeEventListener(t,e,!0)}),t.src.slice(-d.a.length)===d.a&&t.play()}var t=n.i(u.a)("audio",!0);try{t.style.cssText="position:absolute;width:1px;height:1px;",t.setAttribute("src",d.a)}catch(e){
l.a.error("An error occurred trying to initialize the audio element.")}return r.a.each(h,function(t){document.body.addEventListener(t,e,!0)}),o.a.Deferred().resolve().promise()}var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(28),u=n(502),c=n(2825),d=n.n(c);t.a=i;var h=["touchstart","mousedown","mousemove","click","keydown","keypress"]},function(e,t,n){"use strict";function i(e){return e.get("isFullOwnedServer")}function a(){return new u.a({name:"MediaServerEventManager",appModel:n.i(o.a)("appModel"),
isValidServer:i,supportsLongPolling:!1,showTimelineStatus:!0,ServerEventConnection:l.a,ServerRetryManager:c.a}).start(),s.a.Deferred().resolve().promise()}var r=n(5),s=n.n(r),o=n(13),l=n(1710),u=n(682),c=n(1142);t.a=a},function(e,t,n){"use strict";function i(){return new s.a,r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(1314);t.a=i},function(e,t,n){"use strict";function i(){return new o.a,new l.a,new u.a,new c.a,new d.a,new h.a,new p.a,new f.a,new g.a,s.a.history.start(),
r.a.Deferred().resolve().promise()}var a=n(5),r=n.n(a),s=n(52),o=n(1647),l=n(1657),u=n(1649),c=n(1645),d=n(1651),h=n(1655),p=n(1643),f=n(1659),g=n(1653);t.a=i},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(13),s=n(38),o=n(12),l=n(55),u=n(1733),c=s.a.extend({mixins:l.a,announcementsUpdateDelay:36e5,initialize:function(){this.user=n.i(r.a)("appModel").get("user"),a.a.bindAll(this,"updateAnnouncements","onSignedInChange")},start:function(){
var e=a.a.debounce(this.onAnnouncementsChange),t=a.a.debounce(this.onSignedInChange);this.listenTo(this.user,"change:signedIn",t),this.listenTo(this.user.get("desktop"),{"change:announcements":e,"change:announcements.reset":e,"change:announcements.update":e,"change:announcements.change:read":e,"change:announcements.change:priority":e}),this.user.populate().fail(t)},stop:function(){clearTimeout(this.announcementsUpdateTimeout),this.user.get("desktop").get("announcements").reset(),
this.stopListening()},updateAnnouncements:function(){!this.user.get("restricted")&&this.user.server.get("isConnected")&&(this.user.get("desktop").get("announcements").fetch(),this.announcementsUpdateTimeout&&clearTimeout(this.announcementsUpdateTimeout),this.announcementsUpdateTimeout=setTimeout(this.updateAnnouncements,this.announcementsUpdateDelay))},onSignedInChange:function(){this.user.get("desktop").get("announcements").reset(),this.updateAnnouncements()},onAnnouncementsChange:function(){
if(this.user.get("isSignedIn")&&!this.user.get("restricted")){var e=this.user.get("desktop").get("announcements"),t=e.findWhere({style:"priority",read:!1});t&&o.a.trigger("show:bar","alertbar",new u.a({model:t}))}}});t.a=c},function(e,t,n){"use strict";var i=n(470),a=n(1140),r=n(811),s=a.a.extend({mixins:r.a,start:function(){a.a.prototype.start.apply(this,arguments),this.handleCollectUsageData(i.a)}});t.a=s},function(e,t,n){"use strict";var i=n(1143),a=n(811),r=i.a.extend({mixins:a.a,
start:function(){var e=i.a.prototype.start.apply(this,arguments);return this.handleCollectUsageData(this),e}});t.a=r},function(e,t,n){"use strict";var i=n(12),a=n(1144),r=a.a.extend({fetchPrimaryRelations:function(e){var t=this,n=e.get("isFullOwnedServer"),i=e.get("isShared")&&e.supports("sharedSettings"),a=e.get("desktop").get("settings");if(n||i){var r=a.populate();n&&r.done(function(){var n=t.appModel.get("primaryServer");n&&n.id===e.id&&t.handlePrimarySettings(e,a)})}if(n){
e.get("desktop").get("sessions").fetch({reset:!0})}var s=e.get("home");if(e.get("activeConnection").get("isPrivate")||n||s){var o=this.appModel.get("players");o.reset(),o.setContext("server",e),o.fetch()}},handlePrimarySettings:function(e,t){var n=t.get("AcceptedEULA");n&&n.get("value")===!1&&i.a.trigger("navigate","setupBasic",{serverID:e.id})}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(12),s=n(23),o=n(1148),l=n(96),u=n(66),c=o.a.extend({start:function(){
o.a.prototype.start.call(this),this.listenTo(this.servers,"change:isClaimed",this.onClaimedChange),this.listenTo(r.a,"cloudServer:addUnclaimedServer",this.onAddClaimedServer)},onAddClaimedServer:function(e){var t=this.appModel,n=t.get("cloudServer"),i=new l.a({},{parent:t}),r=a.a.isArray(e.Device.Connection)?e.Device.Connection:[e.Device.Connection];a.a.each(r,function(e){var t=e.uri,a=e.port,r=e.address,s=e.protocol;i.addConnection({uri:t,port:a,address:r,scheme:s,sources:[{id:n.id}]})},this),
u.a.isHostedHttps&&!i.get("isSecure")?s.a.execute("showClaimServerAlertBar",i):t.get("servers").add(i)},onClaimedChange:function(e,t){var n=e.get("isFullOwnedServer")&&e.get("isConnected"),i=t===!1&&!e.previous("isClaimed");n&&i&&s.a.execute("showClaimServerAlertBar",e)}});t.a=c},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(5),s=n.n(r),o=n(12),l=n(4),u=n(23),c=n(1139),d=n(42),h=n(338),p=c.a.prototype,f=c.a.extend({collectionNames:["homeDetails","homeUsers"],
flexCollectionNames:["devices","friends","invites","socialNetworks"],handleInvalidToken:function(){var e=new d.a({title:n.i(l.default)("Invalid Credentials"),message:n.i(l.default)("Your credentials have expired. Please sign in again."),confirmLabel:n.i(l.default)("OK"),cancelLabel:n.i(l.default)("Ignore")});e.promise.done(function(){o.a.trigger("navigate","login",{silent:!0})}),o.a.trigger("show:modal",e)},onIsSignedInChange:function(e,t){if(p.onIsSignedInChange.apply(this,arguments),
e.get("isFullUser")&&t){var n=e.server.getXHROptions("/api/claim/subscribe");s.a.ajax(a()({},n,{type:"POST"}))}},onIsLockedChange:function(e,t){p.onIsLockedChange.apply(this,arguments),t&&o.a.trigger("show:modal",new h.a({isForced:!0}))},onIsUnlockedChange:function(e,t){t&&u.a.execute("resumePlayQueue",e)}});t.a=f},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(222),s=n(1384),o=n(17),l=n(1161),u=n(1215),c=n(700),d=n(698),h=n(1596),p=n(1615),f=n(1621),g=n(1539),m=l.a.extend({
name:"DesktopAppModel",sessionAttrs:a()({},l.a.prototype.sessionAttrs,{isFirstRun:o.a.boolean.isRequired,isCastApiAvailable:o.a.boolean.isRequired,isCastDeviceAvailable:o.a.boolean.isRequired,primaryPlayer:o.a.instanceOf(c.a,d.a),settings:o.a.instanceOf(g.a)}),sessionRelations:a()({},l.a.prototype.sessionRelations,{entities:{relationClass:n.i(s.a)(r)},players:{relationClass:u.a},multiSelect:{relationClass:h.a},experienceSettings:{relationClass:p.a},ui:{relationClass:f.a}}),defaults:function(){
var e=l.a.prototype.defaults.apply(this,arguments);return a()({},e,{isFirstRun:!1,isCastApiAvailable:!1,isCastDeviceAvailable:!1,settings:new g.a})}});t.a=m},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(2),s=n.n(r),o=n(31),l=n(310),u=n(309),c=n(1160),d=c.a.extend({storageKey:"settingsv2",defaults:a()({},c.a.prototype.defaults,{keyboardShortcuts:!0,showAdvancedSettings:!1,allowHttpFallback:u.a.NEVER,companion:!0,localQuality:-1,remoteQuality:8,channelQuality:-1,dash:!0,directPlay:!0,
directStream:!0,preferAAC:"wiiu"===o.a.id||"edge"===o.a.id,allowAC3:!1,subtitleSize:100,subtitlesBurnLevel:l.a.ALWAYS,audioBoost:100,"syncQuality!video":8,"syncQuality!music":2,"syncQuality!photo":2,sidebarOpen:!1,videoPlayerVolume:100,musicPlayerVolume:100,announcementsLastReadTimestamp:0,serverUpdateDismissedVersion:"",hasDismissedPremiumMusicAlert:!1,hasSkippedInstallServer:!1,viewedUnclaimedServers:[],dismissedUnclaimedServers:[],listType:"media-tile-list","listType!track":"media-list",
relayConfirmed:!1,suppressLimitedPlaybackMessage:!1}),getListTypeKey:function(e){var t="listType";return e&&(t+="!"+e.get("typeString")),t},getListType:function(e){var t;return e=e||{},s.a.has(e,"mediaType")&&s.a.isObject(e.mediaType)&&(t=this.getListTypeKey(e.mediaType)),this.get(t)||this.get(e.fallbackKey)||this.get("listType")},saveListType:function(e,t){var n=this.getListTypeKey(e);this.save(n,t),s.a.isEqual(n,"listType")||this.trigger("change:listType",this,t)},
getSectionListType:function(e,t){var n;return e&&(t=t||e.get("currentType"),n=e.getScopedKey("listType")),this.getListType({mediaType:t,fallbackKey:n})}});t.a=d},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(19),s=n(21),o=n(1541),l=s.a.extend({name:"DownloadServerCollection",context:["server"],url:function(){var e=a.a.result(this.server,"url");return r.join([e,"api/downloads/1"])},model:o.a});t.a=l},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1542),s=a.a.extend({
name:"DownloadServerModel",context:["server"],rootPropertyName:"Type",idAttribute:"name",syncedAttrs:{name:i.a.string},syncedRelations:{platforms:{rootPropertyName:"Platform",relationClass:r.a,options:function(e){return{type:e.name}}}}});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1543),r=i.a.extend({name:"DownloadServerPlatformCollection",context:["server","type"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(17),l=n(18),u=n(1544),c=l.a.extend({name:"DownloadServerPlatformModel",context:["server","type"],rootPropertyName:"Platform",idAttribute:"id",syncedAttrs:{id:o.a.string,name:o.a.string,version:o.a.string,date:o.a.integer,requirements:o.a.string,fixed:o.a.string,added:o.a.string,info:o.a.string},syncedRelations:{releases:{rootPropertyName:"Release",relationClass:u.a}},derivedAttrs:{type:function(){return this.type}},augmentResponse:function(e){
var t=e.release_date,n=e.extra_info,i=e.items_fixed,r=e.items_added,o=s()(e,["release_date","extra_info","items_fixed","items_added"]);return a()({},o,{info:n,fixed:i,added:r,date:t+"000"})}});t.a=c},function(e,t,n){"use strict";var i=n(21),a=n(1545),r=i.a.extend({name:"DownloadServerReleaseCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"DownloadServerReleaseModel",context:["server"],modelId:function(){
return this.get("build")+"-"+this.get("distro")},syncedAttrs:{label:i.a.string,build:i.a.string,distro:i.a.string,url:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(21),s=n(1547),o=r.a.extend({name:"ArtworkCollection",context:["server","artworkType"],model:s.a,url:function(){return a.a.result(this.parent,"url")+"/"+this.artworkType+"s"}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r={POSTER:"poster",ART:"art",BANNER:"banner"},s=a.a.extend({
name:"ArtworkModel",context:["server","artworkType"],idAttribute:"ratingKey",rootPropertyName:"Photo",syncedAttrs:{key:i.a.string,ratingKey:i.a.string,thumb:i.a.string,selected:i.a.boolean}},{types:r});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1549),r=i.a.extend({name:"FileCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"FileModel",idAttribute:"key",rootPropertyName:"File",syncedAttrs:{key:i.a.string,title:i.a.string,path:i.a.string,
network:i.a.boolean}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1551),r=n(19),s=i.a.extend({name:"FilePathCollection",context:["server","includeFiles"],model:a.a,url:function(){var e={};return this.includeFiles&&(e.includeFiles=1),r.join(["/services/browse"],e)}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(19),s=a.a.extend({name:"FilePathModel",context:["server","includeFiles"],idAttribute:"key",rootPropertyName:"Path",sessionAttrs:{isBackShortcut:i.a.boolean},
sessionRelations:{children:function(){var e={};return this.includeFiles&&(e.includeFiles=1),{relationClass:n(813).default,options:{url:r.join([this.id],e)}}}},syncedAttrs:{key:i.a.string,title:i.a.string,path:i.a.string,home:i.a.boolean,network:i.a.boolean}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"MatchResultModel",context:["server"],idAttribute:"guid",rootPropertyName:"SearchResult",syncedAttrs:{id:i.a.integer,guid:i.a.string,name:i.a.string,
parentGUID:i.a.string,parentName:i.a.string,type:i.a.string,index:i.a.integer,score:i.a.integer,thumb:i.a.string,year:i.a.integer,matched:i.a.boolean},syncedRelations:{children:function(){return{relationClass:n(814).default,rootPropertyName:"SearchResult"}}},derivedAttrs:{normalizedScore:function(){var e=this.get("score");if(null!=e)return Math.min(Math.max(e,0),100)}}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1554),r=i.a.extend({name:"QueryLimitCollection",model:a.a});t.a=r
},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"QueryLimitModel",rootPropertyName:"Limit",syncedAttrs:{limit:i.a.integer,unit:i.a.string}});t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),a=n(816),r=i.a.extend({name:"QueryRuleCollection",model:a.a});t.default=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(19),l=n(1175),u=n(1561),c=l.a.extend({defaults:function(){return{children:new u.a([],{
server:this.server,parent:this})}},findItem:function(e){return this.get("children").get(e)},addContent:function(e){var t=[a.a.result(this,"url"),"items",e.id],n=o.join(t,e.getSaveParams()),i=a.a.extend(e.server.getXHROptions(n),{type:"PUT"}),r=s.a.ajax(i);return r.then(a.a.bind(function(e){this.set(this.parse(e))},this)),r.promise()}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(12),l=n(44),u=n(19),c=n(303),d=n(301),h=c.a.extend({
whitelistedAttrs:["playQueueID","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","playQueueLastAddedItemID","playQueueShuffled","playQueueSourceURI","playQueueTotalCount","playQueueVersion","message"],defaults:function(){return{selectedItem:null,mediaType:null,owned:!0,hasUserAdditions:!1,playQueueVersion:0}},metadataElementNames:["Directory","Video","Track","Photo","Hub"],url:function(){return"/playQueues/"+this.id},initialize:function(){
this.listenTo(this,"change:message",this.onMessageChange)},convert:function(e){var t=a.a.isObject(e)?e:l.a.parseXML(e);return l.a.parseBoolean(t,"playQueueShuffled"),l.a.parseInteger(t,["playQueueSelectedItemOffset","playQueueTotalCount","playQueueVersion"]),l.a.parseArray(t,"Metadata"),t},parse:function(e,t){a.a.isString(e)&&(e=l.a.replaceXMLElementNames(e,this.metadataElementNames,"Metadata"));var n=this.convert(e);n.id&&(n.playQueueID=n.id);var i=a.a.pick(n,this.whitelistedAttrs)
;return this.set(i,{silent:!0}),this.pendingChanges=this.changed,this.parseItems(n),i},parseItems:function(e){var t=this.get("collection"),n=e.Metadata,i=!!n.length,r=a.a.pluck(n,"playQueueItemID").indexOf(e.playQueueSelectedItemID),s=e.playQueueSelectedItemOffset,o=s-r;a.a.each(n,function(t,n){t.queueIndex=o+n,e.identifier&&(t.identifier=e.identifier),e.mediaTagPrefix&&(t.mediaTagPrefix=e.mediaTagPrefix),e.mediaTagVersion&&(t.mediaTagVersion=e.mediaTagVersion)}),t?t.set(n,{parse:i
}):(t=new d.a(n,{server:this.server,parent:this,parse:i}),this.set("collection",t)),t.totalSize=e.playQueueTotalCount,t.availableRange={start:o,end:o+t.length}},moveItem:function(e,t){if(e===this.get("playQueueSelectedItemID"))return s.a.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var n={after:t||-1},i=u.join([a.a.result(this,"url"),"/items/",e,"/move"],n);return this._ajax("PUT",i)},queueContent:function(){throw new Error("Clients cannot queue background processing items.")},
addContent:function(){throw new Error("Clients cannot add background processing items.")},removeItem:function(){throw new Error("Clients cannot remove background processing items directly. Generators (e.g. sync items) should be deleted.")},yieldOwnership:function(){throw new Error("Only the admin owns the background processing queue.")},takeOwnership:function(){throw new Error("Only the admin owns the background processing queue.")},getUpNextRange:function(){
var e=this.get("collection"),t=e.get(this.get("playQueueSelectedItemID")),n=e.indexOf(t),i=Math.max(n,0),a=i,r=this.get("playQueueLastAddedItemID");if(null!=r){var s=e.get(r),o=e.indexOf(s);o>i&&(a=o)}return{start:i,end:a}},_ajax:function(e,t){var n=a.a.extend(this.server.getXHROptions(t),{type:e}),i=s.a.ajax(n);return i.done(a.a.bind(function(e){this.set(this.parse(e)),a.a.isEmpty(this.pendingChanges)||(a.a.each(this.pendingChanges,function(e,t){this.trigger("change:"+t,this,e)},this),
this.trigger("change",this),this.pendingChanges=null),this.set("selectedItem",this.getCurrentItem())},this)),i.promise()},onMessageChange:function(e,t){t&&o.a.trigger("show:alert",{type:"error",message:t})}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({idAttribute:"key",whitelistedAttrs:["queueItemID","generatorID","targetTagID","syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","ratingKey","title","thumb"],
convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,["queueItemID","generatorID","targetTagID","syncItemId","remaining","size"]),r.a.parseFloat(t,["progress","speed"]),t},parse:function(e){var t=this.convert(e);return t=a.a.pick(t,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(209),a=n(83),r=n(1560),s=a.a.extend({model:r.a,url:"/clients/profiles?type="+i.a.LOCAL,parse:function(e){return this.convert(e,"Profile")}});t.a=s},function(e,t,n){
"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({idAttribute:"title",whitelistedAttrs:["title","selected"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseBoolean(t,"selected"),t},parse:function(e,t){var n=this.convert(e);return n=a.a.pick(n,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(19),a=n(209),r=n(21),s=n(325),o=r.a.extend({name:"VersionGeneratorCollection",context:["server"],model:s.a,url:function(){
return i.join(["playlists",this.parent.id,"items"],{type:a.a.LOCAL})}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"VersionGeneratorMediaSettingsModel",context:["server"],syncedAttrs:{videoQuality:{type:i.a.integer,save:!0},videoResolution:{type:i.a.string,save:!0},maxVideoBitrate:{type:i.a.integer,save:!0},audioBoost:{type:i.a.integer,save:!0},subtitleSize:{type:i.a.integer,save:!0},musicBitrate:{type:i.a.integer,save:!0},photoQuality:{type:i.a.integer,save:!0},
photoResolution:{type:i.a.string,save:!0}}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1565),r=i.a.extend({name:"VersionGeneratorMetadataCollection",context:["server","generator"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(78),s=n(19),o=n(244),l=n(17),u=n(65),c=n(18),d=n(1563),h=c.a.extend({mixins:[o.a],name:"VersionGeneratorMetadataListModel",context:["server","generator"],collectionName:"metadataItems",url:function e(){
var e=s.join([a.a.result(this.generator,"url"),"items"]);return this.getPaginatedUrl(e)},sessionAttrs:{currentPageStart:l.a.integer,currentPageSize:l.a.integer,populatedRange:l.a.object},syncedAttrs:{totalSize:l.a.integer,identifier:l.a.string,mediaTagPrefix:l.a.string,mediaTagVersion:l.a.string,viewGroup:l.a.string,title:l.a.string},syncedRelations:{metadataItems:{relationClass:d.a,rootPropertyName:"Metadata",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{
populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===u.a.xml?n.i(r.a)(e):e}});t.a=h},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(17),s=n(18),o=n(59),l=s.a.extend({name:"VersionGeneratorMetadataModel",context:["server","generator"],idAttribute:"ratingKey",syncedAttrs:a.a.extend({},o.a.prototype.syncedAttrs,{processingState:r.a.string,processingStateContext:r.a.string})});t.a=l},function(e,t,n){
"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"VersionGeneratorPolicyModel",context:["server"],syncedAttrs:{scope:{type:i.a.string,save:!0},value:{type:i.a.integer,save:!0},unwatched:{type:i.a.boolean,save:!0}},defaults:{unwatched:!1}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"VersionGeneratorStatusModel",context:["server"],syncedAttrs:{state:i.a.string,failureCode:i.a.string,failure:i.a.string,itemsCount:i.a.integer,itemsCompleteCount:i.a.integer,
itemsSuccessfulCount:i.a.integer,itemsFailedCount:i.a.integer,itemsDisabledCount:i.a.integer,totalSize:i.a.integer}});t.a=r},function(e,t,n){"use strict";var i=n(209),a=n(83),r=n(1569),s=a.a.extend({model:r.a,url:"/library/tags?type="+i.a.LOCAL,comparator:function(e){return e.get("MediaSettings").maxVideoBitrate},parse:function(e){return this.convert(e,"Tag")}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(44),s=n(64),o=s.a.extend({name:"VersionTargetModel",
whitelistedAttrs:["id","tag","tagType","MediaSettings","Device"],convert:function(e){var t=a.a.isObject(e)?e:r.a.parseXML(e);return r.a.parseInteger(t,"id"),t},parse:function(e,t){var n=this.convert(e);return n=a.a.pick(n,this.whitelistedAttrs)}});t.a=o},function(e,t,n){"use strict";var i=n(21),a=n(1571),r=i.a.extend({name:"LockedFieldCollection",context:["server","section"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"LockedFieldModel",
context:["server","section"],idAttribute:"name",syncedAttrs:{name:{type:i.a.string,save:!0},locked:{type:i.a.boolean,save:!0}}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"MetadataAutocompleteResultModel",context:["server","section","multiMetadataItem","query"],idAttribute:"ratingKey",rootPropertyName:"Metadata",syncedAttrs:{elementName:i.a.string,ratingKey:i.a.string,parentRatingKey:i.a.string,grandparentRatingKey:i.a.string,type:i.a.string,title:i.a.string,
parentTitle:i.a.string,grandparentTitle:i.a.string,tag:i.a.string,tagType:i.a.integer}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(210),s=n(19),o=n(34),l=n(17),u=n(18),c=n(1206),d=n(206),h=n(1570),p={album:{title:"title",parentRatingKey:"artist.id",parentTitle:"artist.title"},track:{parentRatingKey:"album.id",parentTitle:"album.title",grandparentRatingKey:"artist.id",grandparentTitle:"artist.title"}},f=u.a.extend({name:"MultiMetadataModel",context:["server","section"],
rootPropertyName:"Common",isNew:function(){return!1},url:function(){return s.join([this.sectionUrl(),"common"],this.getUrlParams())},saveUrl:function(){return s.join([this.sectionUrl(),"all"],this.getUrlParams())},sectionUrl:function(){return a.a.result(this.section,"url")},tagRelations:["Collection","Director","Producer","Writer","Genre","Mood","Country","Label","Similar","Role"],sessionAttrs:{metadataItems:l.a.array.isRequired,originalSaveParams:l.a.object,poster:l.a.string,banner:l.a.string,
art:l.a.string},syncedAttrs:{mixedFields:l.a.list.isRequired,key:{type:l.a.string,save:!0},ratingKey:{type:l.a.string,save:!0},parentRatingKey:{type:l.a.string,save:!0},grandparentRatingKey:{type:l.a.string,save:!0},title:{type:l.a.string,save:!0},titleSort:{type:l.a.string,save:!0},originalTitle:{type:l.a.string,save:!0},parentTitle:{type:l.a.string,save:!0},grandparentTitle:{type:l.a.string,save:!0},year:{type:l.a.string,save:!0},tagline:{type:l.a.string,save:!0},summary:{type:l.a.string,
save:!0},studio:{type:l.a.string,save:!0},contentRating:{type:l.a.string,save:!0},originallyAvailableAt:{type:l.a.string,save:!0},rating:{type:l.a.float,save:!0},userRating:{type:l.a.float,save:!0},index:{type:l.a.integer,save:!0},parentIndex:{type:l.a.integer,save:!0}},sessionRelations:{preferences:{relationClass:d.a}},syncedRelations:{collections:{relationClass:c.a,rootPropertyName:"Collection",save:!0},directors:{relationClass:c.a,rootPropertyName:"Director",save:!0},producers:{
relationClass:c.a,rootPropertyName:"Producer",save:!0},writers:{relationClass:c.a,rootPropertyName:"Writer",save:!0},genres:{relationClass:c.a,rootPropertyName:"Genre",save:!0},moods:{relationClass:c.a,rootPropertyName:"Mood",save:!0},countries:{relationClass:c.a,rootPropertyName:"Country",save:!0},labels:{relationClass:c.a,rootPropertyName:"Label",save:!0},similar:{relationClass:c.a,rootPropertyName:"Similar",save:!0},roles:{relationClass:c.a,rootPropertyName:"Role",save:!0},lockedFields:{
relationClass:h.a,rootPropertyName:"Field",save:!0}},derivedAttrs:{type:function(){var e=this.getSingleMetadataItem();if(e)return e.get("type")},aggregateTitle:function(){if(this.get("metadataItems").length)return r.a.title(null,{items:this.get("metadataItems")})},isSingleMetadataItem:function(){return 1===this.get("metadataItems").length}},defaults:function(){return{metadataItems:[],mixedFields:[]}},initialize:function(e,t){this.set("metadataItems",a.a.clone(t.metadataItems))},
getSingleMetadataItem:function(){return a.a.first(this.get("metadataItems"))},getUrlParams:function(){var e=n.i(o.b)(this.get("type")),t=a.a.map(this.get("metadataItems"),function(e){return e.get("ratingKey")});return{type:e.id,id:t.join(",")}},getSaveParams:function(){var e=this,t=u.a.prototype.getSaveParams.apply(this,arguments),n=this.get("originalSaveParams");if(!n)return t;var i={};if(a.a.each(t,function(t,r){var s=n[r];a.a.isEqual(t,s)||a.a.extend(i,e.getSaveParam(r,t,s))}),
i.isReparenting){delete i.isReparenting;var r=p[this.get("type")];a.a.each(r,function(t,n){var r=t+".value",s=e.getQueryAttrSibling(t),o=s+".value",l=a.a.has(i,r),u=a.a.has(i,o);if(l&&u&&r!==o&&delete i[o],!l&&!u){var c=e.get(n);c&&(i[r]=c)}})}return i},getSaveParam:function(e,t,n){var i;if("Field"===e)return this.getFieldSaveParams(e,t,n);if(this.tagRelations.indexOf(e)!==-1)return this.getTagSaveParams(e,t,n);var r=p[this.get("type")];{if(!r||!a.a.has(r,e))return i={},i[e+".value"]=t,i
;var s=r[e];if(t){var o;return o={isReparenting:!0},o[s+".value"]=t,o}}},getFieldSaveParams:function(e,t,n){return t.reduce(function(e,t){return e[t.name+".locked"]=t.locked,e},{})},getTagSaveParams:function(e,t,n){var i=a.a.map(t,function(e){return e.tag}),r=a.a.map(n,function(e){return e.tag}),s=a.a.without.apply(a.a,[r].concat(i)),o=e.toLowerCase(),l={};return i.forEach(function(e,t){l[o+"["+t+"].tag.tag"]=e}),s.length&&(l[o+"[].tag.tag-"]=a.a.map(s,encodeURIComponent).join(",")),l},
getQueryAttr:function(e){var t=this.get("type"),n=p[t];return n?n[e]||e:e},getQueryAttrSibling:function(e){var t=this.getQueryAttr(e).match(/(^.*\.)(.*$)/);return t?t[1]+("id"===t[2]?"title":"id"):e}});t.a=f},function(e,t,n){"use strict";var i=n(78),a=n(65),r=n(21),s=n(819),o=r.a.extend({name:"SyncMetadataCollection",context:["server","device","syncItemId"],model:s.a,url:function(){return"/sync/items/"+this.syncItemId},augmentResponseText:function(e,t){return t===a.a.xml?n.i(i.a)(e):e}});t.a=o
},function(e,t,n){"use strict";var i=n(509),a=n(21),r=n(1576),s=a.a.extend({name:"MediaGrabberDeviceChannelCollection",context:["server"],model:r.a,comparator:function(e,t){return n.i(i.a)(e.get("identifier"),t.get("identifier"))}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"MediaGrabberDeviceChannelModel",rootPropertyName:"DeviceChannel",idAttribute:"key",syncedAttrs:{key:a.a.string,identifier:a.a.string,name:a.a.string,drm:a.a.boolean,hd:a.a.boolean},
augmentResponse:function(e){return e.key=e.key||e.identifier,e}});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"DVRNetworkModel",sessionAttrs:{key:a.a.string,title:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1579),r=i.a.extend({name:"DVRSetupErrorMessageCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"DVRSetupErrorMessageModel",sessionAttrs:{id:a.a.string,message:a.a.string}});t.a=r
},function(e,t,n){"use strict";var i=n(21),a=n(824),r=i.a.extend({name:"EPGCountryCollection",context:["server"],model:a.a,url:"/livetv/epg/countries"});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(825),r=i.a.extend({name:"EPGCountryRegionCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1584),r=i.a.extend({name:"EPGCountryRegionCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(18),a=n(17),r=n(1582),s=i.a.extend({name:"EPGLineupGroupModel",context:["server"],idAttribute:"uuid",syncedAttrs:{uuid:a.a.string},syncedRelations:{lineups:{relationClass:r.a,rootPropertyName:"Lineup"}}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"EPGLineupModel",context:["server"],idAttribute:"uuid",rootPropertyName:"Lineup",syncedAttrs:{uuid:a.a.string,type:a.a.string,title:a.a.string,lineupType:a.a.integer,location:a.a.string},defaults:{location:""}})
;t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=n(1580),s=n(824),o=n(1588),l=n(541),u=n(1583),c=n(1581),d=n(825),h=i.a.extend({name:"EPGSettingsModel",context:["server"],sessionAttrs:{baseUrl:a.a.string,postalCode:a.a.string,isFetching:a.a.boolean,isPopulated:a.a.boolean},sessionRelations:{countries:{relationClass:r.a},languages:{relationClass:o.a},regions:{relationClass:c.a},lineupGroup:{relationClass:u.a},selectedCountry:{relationClass:s.a,deferred:!0},selectedLanguage:{
relationClass:l.a,deferred:!0},selectedRegion:{relationClass:d.a,deferred:!0}},defaults:{baseUrl:"/livetv/epg/countries",isFetching:!1,isPopulated:!1,postalCode:""}});t.a=h},function(e,t,n){"use strict";var i=n(21),a=n(1587),r=i.a.extend({name:"EPGChannelCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"EPGChannelModel",context:["server"],rootPropertyName:"Channel",idAttribute:"identifier",syncedAttrs:{identifier:a.a.string,
callSign:a.a.string,thumb:a.a.string,title:a.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(541),r=i.a.extend({name:"EPGLanguageCollection",context:["server"],model:a.a,url:"/livetv/epg/languages"});t.a=r},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"ChannelMappingModel",context:["server"],rootPropertyName:"ChannelMapping",idAttribute:"deviceIdentifier",syncedAttrs:{deviceIdentifier:a.a.string,lineupIdentifier:a.a.string,enabled:a.a.boolean},defaults:{
enabled:!1}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1591),r=i.a.extend({name:"SearchHubCollection",context:["server","provider"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1592),s=a.a.extend({name:"SearchHubModel",context:["server","provider"],idAttribute:"hubIdentifier",syncedAttrs:{hubIdentifier:i.a.string,size:i.a.integer,type:i.a.string,title:i.a.string},syncedRelations:{results:{relationClass:r.a,rootPropertyName:"Metadata"}}});t.a=s
},function(e,t,n){"use strict";var i=n(21),a=n(1593),r=i.a.extend({name:"SearchResultCollection",context:["server","provider"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(17),l=n(222),u=n(62),c=n(18),d=n(697),h=n(59),p=c.a.extend({name:"SearchResultModel",context:["server","provider"],entityType:l.SEARCH_RESULT,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state
;return n.i(u.a)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",syncedAttrs:{key:o.a.string,reasonID:o.a.integer,reason:o.a.string,reasonTitle:o.a.string},syncedRelations:{tagItem:{relationClass:d.a,deferred:!0},metadataItem:{relationClass:h.a,deferred:!0}},augmentResponse:function(e){var t,n=e.key,i=e.reason,r=e.reasonTitle,o=e.reasonID,l=s()(e,["key","reason","reasonTitle","reasonID"]),u=l.tag?"tagItem":"metadataItem";return t={key:n,reason:i,reasonTitle:r,reasonID:o},
t[u]=a()({key:n},l),t}});t.a=p},function(e,t,n){"use strict";var i=n(21),a=n(1595),r=i.a.extend({name:"MultiSelectItemCollection",model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"MultiSelectItemModel",sessionAttrs:{id:i.a.any.isRequired,type:i.a.string.isRequired},sessionRelations:{model:{relationClass:a.a,deferred:!0}}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(17),s=n(18),o=n(1594),l=s.a.extend({name:"MultiSelectModel",sessionAttrs:{
activeSelectionRange:r.a.object},sessionRelations:{activeSelectionItems:{relationClass:o.a}},derivedAttrs:{activeSelectionType:function(){var e=this.get("activeSelectionItems").first();if(e)return e.get("type")}},initialize:function(){this.listenTo(this.get("activeSelectionItems"),{remove:this.resetSelectionRange,reset:this.resetSelectionRange})},listenToCollection:function(e){this.stopListening(e),this.listenTo(e,{reset:this.onCollectionReset,remove:this.onCollectionRemove})},
resetSelectionRange:function(){this.set("activeSelectionRange",null)},onCollectionReset:function(e,t){var n=this.get("activeSelectionItems"),i=t.previousModels;a.a.each(i,function(t){e.contains(t)||n.remove(t.id)})},onCollectionRemove:function(e){this.get("activeSelectionItems").remove(e.id)}});t.a=l},function(e,t,n){"use strict";var i=n(21),a=n(65),r=n(117),s=i.a.extend({name:"ActivityCollection",context:["server"],model:r.b,url:"/activities",responseType:function(){
return this.server.supports("json")?a.a.json:a.a.xml}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(65),r=n(18),s=r.a.extend({name:"AgentAttributionModel",context:["server"],responseType:a.a.text,syncedAttrs:{content:i.a.string},url:function(){return"/system/agents/attribution?identifier="+this.parent.id},augmentResponse:function(e){return{content:e}}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1598),s=n(1602),o=a.a.extend({name:"AgentModel",context:["server"],
idAttribute:"identifier",rootPropertyName:"Agent",sessionAttrs:{isPrimary:i.a.boolean,selected:i.a.boolean},sessionRelations:{attribution:{relationClass:r.a}},syncedAttrs:{identifier:i.a.string,name:i.a.string,enabled:i.a.boolean,hasPrefs:i.a.boolean,order:i.a.string},syncedRelations:{languages:{relationClass:s.a,rootPropertyName:"Language"}}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1604),s=n(1607),o=a.a.extend({name:"CloudServerFlexModel",context:["server"],sessionAttrs:{
isPersonalCloudServerRestarting:i.a.boolean,personalCloudServerRestartError:i.a.object,isPersonalCloudServerProvidersPending:i.a.boolean,isPersonalCloudServerProvidersPopulated:i.a.boolean,personalCloudServerProvidersError:i.a.object,isPersonalCloudServerStatusPending:i.a.boolean,isPersonalCloudServerStatusPopulated:i.a.boolean,personalCloudServerStatusError:i.a.object},sessionRelations:{personalCloudServerProviders:{relationClass:r.a},personalCloudServerStatus:{relationClass:s.a}},defaults:{
isPersonalCloudServerRestarting:!1,personalCloudServerRestartError:null,isPersonalCloudServerProvidersPending:!1,isPersonalCloudServerProvidersPopulated:!1,personalCloudServerProvidersError:null,isPersonalCloudServerStatusPending:!1,isPersonalCloudServerStatusPopulated:!1,personalCloudServerStatusError:null}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(361),s=n.n(r),o=s.a.extend({constructor:function(e,t,n,i){this.exclusiveScanners=t,this.scannerName=n,s.a.call(this,e,i),
this.filterBy(a.a.bind(this.filterExclusiveScanner,this))},filterExclusiveScanner:function(e){var t=e.get("name"),n=this.exclusiveScanners;if(!n)return!0;var i=this.scannerName,a=n.indexOf(i)!==-1,r=n.indexOf(t)!==-1;return a?t===i:!r}});t.a=o},function(e,t,n){"use strict";var i=n(21),a=n(1603),r=i.a.extend({name:"LanguageCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(757),a=n(17),r=n(18),s=r.a.extend({name:"LanguageModel",context:["server"],
idAttribute:"code",rootPropertyName:"Language",syncedAttrs:{code:a.a.string},derivedAttrs:{name:function(){return n.i(i.a)(this.get("code"))}}});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1605),r=i.a.extend({name:"PersonalCloudServerProviderCollection",model:a.a,context:["server"],url:"/api/v2/authentications/providers"});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1606),s=a.a.extend({name:"PersonalCloudServerProviderModel",rootPropertyName:"provider",sessionAttrs:{
isUnlinking:i.a.boolean.isRequired,unlinkError:i.a.object},syncedAttrs:{image:i.a.string.isRequired,label:i.a.string.isRequired,linked:i.a.boolean.isRequired,nickname:i.a.string.isRequired,url:i.a.string.isRequired},syncedRelations:{usage:{relationClass:r.a}},defaults:{isUnlinking:!1}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"PersonalCloudServerProviderUsageModel",syncedAttrs:{plexCloud:i.a.boolean,cloudSync:i.a.boolean,other:i.a.boolean}});t.a=r
},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"PersonalCloudServerStatusModel",context:["server"],url:"/api/v2/cloud_server",syncedAttrs:{running:i.a.boolean,startedAt:i.a.integer,finishedAt:i.a.integer,exitCode:i.a.integer,error:i.a.string},defaults:{running:!1}});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(21),s=n(1609),o=r.a.extend({name:"ScannerCollection",context:["server","sectionTypeID"],model:s.a,url:function(){
return"/system/scanners/"+this.sectionTypeID},hasExclusiveScanner:function(e){return!!a.a.intersection(this.pluck("name"),e).length}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"ScannerModel",context:["server"],rootPropertyName:"Scanner",syncedAttrs:{name:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(21),a=n(1611),r=i.a.extend({name:"SectionOverviewCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(17),a=n(18),r=a.a.extend({name:"SectionOverviewModel",context:["server"],rootPropertyName:"Section",syncedAttrs:{id:i.a.integer,key:i.a.string,type:i.a.string,title:i.a.string}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(56),r=n(18),s=n(1219),o=n(480),l=n(1230),u=n(1233),c=n(180),d=n(1228),h=n(1236),p=n(1234),f=n(1597),g=r.a.extend({name:"ServerFlexModel",context:["server"],sessionAttrs:{cloudAccount:i.a.instanceOf(l.a).isRequired,update:i.a.instanceOf(u.a),
settings:i.a.instanceOf(c.a).isRequired,alerts:i.a.instanceOf(d.a).isRequired,transcodeJobs:i.a.instanceOf(h.a).isRequired,isProvidersPending:i.a.boolean.isRequired,isProvidersPopulated:i.a.boolean.isRequired,providersError:i.a.object,isLibrariesPending:i.a.boolean.isRequired,isLibrariesPopulated:i.a.boolean.isRequired,librariesError:i.a.object},sessionRelations:{providers:{relationClass:s.a},libraries:{relationClass:o.a},sessions:{relationClass:p.a},activities:{relationClass:f.a}},
defaults:function(){return{cloudAccount:new l.a({},{server:this.server}),update:a.a.get("allowServerUpdates")?new u.a({},{server:this.server}):null,settings:new c.a([],{server:this.server}),alerts:new d.a([],{server:this.server}),transcodeJobs:new h.a([],{server:this.server}),sessions:new p.a([],{server:this.server}),isProvidersPending:!0,isProvidersPopulated:!1,providersError:null,isLibrariesPending:!0,isLibrariesPopulated:!1,librariesError:null}}});t.a=g},function(e,t,n){"use strict"
;var i=n(21),a=n(1614),r=i.a.extend({name:"ServerOverviewCollection",context:["server"],model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1610),s=a.a.extend({name:"ServerOverviewModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",urlRoot:"/api/servers",syncedAttrs:{machineIdentifier:i.a.string,name:i.a.string,address:i.a.string,port:i.a.string,version:i.a.string,createdAt:i.a.integer,updatedAt:i.a.integer},syncedRelations:{sections:{
relationClass:r.a,rootPropertyName:"Section"}}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(475),r=n(22),s=n(35),o=n(71),l=a.a.extend({name:"ExperienceSettingsModel",storageKey:"experience",syncedAttrs:{columnAdjustment:i.a.integer,searchAllServers:i.a.boolean,relayReminders:i.a.object,calendarViewType:i.a.string,timeFormat:i.a.string,showPrePlayArtwork:i.a.boolean,playThemeMusic:i.a.boolean,libraryRoutes:i.a.object,libraryTableColumns:i.a.object,listStyles:i.a.object,
isNotInterestedInPersonalCloud:i.a.boolean},defaults:function(){var e;return{columnAdjustment:0,searchAllServers:!1,relayReminders:{},calendarViewType:r.c.CALENDAR,timeFormat:"h:mma",showPrePlayArtwork:!1,playThemeMusic:!1,libraryRoutes:{},libraryTableColumns:{},listStyles:(e={},e[s.c]={episode:o.b,track:o.b},e[s.a]={track:o.b},e),isNotInterestedInPersonalCloud:!1}}});t.a=l},function(e,t,n){"use strict";var i=n(21),a=n(543),r=i.a.extend({name:"SyncItemCollection",context:["server","device"],
model:a.a});t.a=r},function(e,t,n){"use strict";var i=n(213),a=n(17),r=n(18),s=n(1616),o={ACTIVE:"active",SNOOZED:"snoozed",DEAD:"dead"},l=r.a.extend({name:"SyncListModel",context:["server","device"],url:function(){return this.device?"/devices/"+this.device.get("clientIdentifier")+"/sync_items":"/servers/"+this.server.id+"/sync_lists"},syncedAttrs:{status:a.a.oneOf("active","snoozed","dead"),clientIdentifier:a.a.string,version:a.a.integer,itemsCompleteCount:a.a.integer,totalSize:a.a.integer},
syncedRelations:{syncItems:{relationClass:s.a,rootPropertyName:"SyncItems"}},derivedAttrs:{isActive:function(){return"active"===this.get("status")}},augmentResponse:function(e){return e.SyncItems&&(e.SyncItems=e.SyncItems.SyncItem),e},sync:function(e,t,n){var a=i.a.addVersionHeaderForDevice(this.get("device"),n);return r.a.prototype.sync.call(this,e,t,a)},getCollection:function(){return this.get("syncItems")},resetToServer:function(e){var t=this.getCollection(),n=t.filter(function(t){
var n=t.get("Server");return n&&n.machineIdentifier===e});t.reset(t.clone(n).models)}},{statuses:o});t.a=l},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({name:"AudioSubtitleSettingsPageModel",sessionAttrs:{isUpdatingUserProfile:a.a.boolean.isRequired,updateUserProfileError:a.a.string},defaults:{isUpdatingUserProfile:!1,updateUserProfileError:null}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(96),s=a.a.extend({name:"BackgroundModel",sessionAttrs:{
imageUrl:i.a.string,themeMusicUrl:i.a.string,allowLightPreset:i.a.boolean,isBackgroundPending:i.a.boolean},sessionRelations:{server:{relationClass:r.a,deferred:!0}},defaults:{allowLightPreset:!1,isBackgroundPending:!1}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(178),s=a.a.extend({name:"DashboardPageModel",sessionAttrs:{serverEntityID:i.a.string,hubKey:i.a.string,isHubsPending:i.a.boolean.isRequired,isHubsPopulated:i.a.boolean.isRequired,hubsError:i.a.object},sessionRelations:{
hubs:{relationClass:r.default,deferred:!0}},defaults:{isHubsPending:!0,isHubsPopulated:!1,hubsError:null}});t.a=s},function(e,t,n){"use strict";var i=n(18),a=n(1619),r=n(1620),s=n(1625),o=n(1622),l=n(1628),u=n(1633),c=n(1623),d=n(1631),h=n(1624),p=n(1629),f=n(1632),g=n(1630),m=n(1626),v=n(1627),y=n(1618),b=i.a.extend({name:"DesktopUIModel",sessionRelations:{background:{relationClass:a.a},dashboardPage:{relationClass:r.a},metadataListPage:{relationClass:s.a},libraryPage:{relationClass:o.a},
prePlayPage:{relationClass:l.a},timelinePage:{relationClass:u.a},liveTVSettingsPage:{relationClass:c.a},recordingSchedulePage:{relationClass:d.a},mediaSubscriptionModal:{relationClass:h.a},provisionPersonalCloudServerPage:{relationClass:p.a},searchPage:{relationClass:f.a},quickSearch:{relationClass:g.a},photoPlayer:{relationClass:m.a},audioPlayer:{relationClass:v.a},videoPlayer:{relationClass:v.a},audioSubtitleSettingsPage:{relationClass:y.a}}});t.a=b},function(e,t,n){"use strict"
;var i=n(17),a=n(18),r=n(81),s=n(366),o=n(479),l=n(365),u=n(815),c=a.a.extend({name:"LibraryPageModel",sessionAttrs:{serverEntityID:i.a.string,libraryKey:i.a.string,containerKey:i.a.string,isDetailsPending:i.a.boolean.isRequired,isDetailsPopulated:i.a.boolean.isRequired,detailsError:i.a.object,isFirstCharactersPending:i.a.boolean.isRequired,isFirstCharactersPopulated:i.a.boolean.isRequired,firstCharactersError:i.a.object,selectedFilterKey:i.a.string,filterOptionQuery:i.a.string,
isSelectedFilterOptionsPending:i.a.boolean.isRequired,isSelectedFilterOptionsPopulated:i.a.boolean.isRequired,selectedFilterOptionsError:i.a.object,isQueryParsePending:i.a.boolean.isRequired,isQueryParsePopulated:i.a.boolean.isRequired,queryParseError:i.a.object,typeKey:i.a.string},sessionRelations:{metadataList:{relationClass:r.default,deferred:!0},details:{relationClass:s.a,deferred:!0},firstCharacters:{relationClass:o.a,deferred:!0},selectedFilterOptions:{relationClass:l.a,deferred:!0},
queryParse:{relationClass:u.a,deferred:!0}},defaults:{isDetailsPending:!0,isDetailsPopulated:!1,detailsError:null,isFirstCharactersPending:!0,isFirstCharactersPopulated:!1,firstCharactersError:null,selectedFilterKey:null,filterOptionQuery:"",isSelectedFilterOptionsPending:!0,isSelectedFilterOptionsPopulated:!1,selectedFilterOptionsError:null,isQueryParsePending:!0,isQueryParsePopulated:!1,queryParseError:null}});t.a=c},function(e,t,n){"use strict"
;var i=n(17),a=n(18),r=n(822),s=n(396),o=a.a.extend({name:"LiveTVSettingsPageModel",sessionAttrs:{isDvrsPending:i.a.boolean,isDvrsPopulated:i.a.boolean,dvrsError:i.a.object,isPagePopulated:i.a.boolean},sessionRelations:{dvrs:{relationClass:r.a,deferred:!0},dvrSetup:{relationClass:s.b,deferred:!0}},defaults:{isDvrsPending:!1,isDvrsPopulated:!1,dvrsError:null,isPagePopulated:!1}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(709),s=n(367),o=a.a.extend({
name:"MediaSubscriptionModalModel",sessionAttrs:{isMediaSubscriptionPending:i.a.boolean,isMediaSubscriptionPopulated:i.a.boolean,mediaSubscriptionError:i.a.object,isMediaSubscriptionSaving:i.a.boolean,mediaSubscriptionSaveError:i.a.object,isMediaSubscriptionMoving:i.a.boolean,mediaSubscriptionMoveError:i.a.object,isMediaSubscriptionDeleting:i.a.boolean,mediaSubscriptionDeleteError:i.a.object},sessionRelations:{templates:{relationClass:r.a,deferred:!0},mediaSubscription:{relationClass:s.a,
deferred:!0}},defaults:{isMediaSubscriptionPending:!0,isMediaSubscriptionPopulated:!1,mediaSubscriptionError:null,isMediaSubscriptionSaving:!1,mediaSubscriptionSaveError:null,isMediaSubscriptionMoving:!1,mediaSubscriptionMoveError:null,isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:null}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(81),s=a.a.extend({name:"MetadataListPageModel",sessionAttrs:{serverEntityID:i.a.string,listKey:i.a.string},sessionRelations:{
metadataList:{relationClass:r.default,deferred:!0}}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(302),s=n(96),o=n(178),l=a.a.extend({name:"PhotoPlayerModel",sessionAttrs:{currentPlayer:i.a.string,decisions:i.a.object,currentIndex:i.a.integer,currentDecision:i.a.object,slideshowPaused:i.a.boolean,relatedVisible:i.a.boolean,positionSeconds:i.a.integer,videoPaused:i.a.boolean,videoQualityIndex:i.a.integer,playbackDuration:i.a.float,errorMessage:i.a.string,
activeMetadataKey:i.a.string},sessionRelations:{playQueue:{relationClass:a.a,deferred:!0},playQueueItem:{relationClass:r.a,deferred:!0},transcodeServer:{relationClass:s.a,deferred:!0},relatedHubs:{relationClass:o.default,deferred:!0}},defaults:function(){return{decisions:{},slideshowPaused:!0,videoPaused:!1,relatedVisible:!1,playbackDuration:0}}});t.a=l},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"PlayerModel",sessionAttrs:{activeMetadataKey:i.a.string}});t.a=r
},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(59),s=n(81),o=n(178),l=a.a.extend({name:"PrePlayPageModel",sessionAttrs:{serverEntityID:i.a.string,metadataKey:i.a.string,descendantKey:i.a.string,siblingKey:i.a.string,isMetadataItemPending:i.a.boolean.isRequired,isMetadataItemPopulated:i.a.boolean.isRequired,metadataItemError:i.a.object,isRelatedHubsPending:i.a.boolean.isRequired,isRelatedHubsPopulated:i.a.boolean.isRequired,relatedHubsError:i.a.object,isFileUnavailable:i.a.boolean,
mediaDecision:i.a.object},sessionRelations:{metadataItem:{relationClass:r.a,deferred:!0},descendantList:{relationClass:s.default,deferred:!0},siblingList:{relationClass:s.default,deferred:!0},relatedHubs:{relationClass:o.default,deferred:!0}},defaults:{isMetadataItemPending:!0,isMetadataItemPopulated:!1,metadataItemError:null,isRelatedHubsPending:!0,isRelatedHubsPopulated:!1,relatedHubsError:null,isFileUnavailable:!1}});t.a=l},function(e,t,n){"use strict";var i=n(18),a=n(17),r=i.a.extend({
name:"ProvisionPersonalCloudServerModel",sessionAttrs:{isPersonalCloudServerModalOpen:a.a.boolean,isProvisionPersonalCloudServerPending:a.a.boolean,isProvisionPersonalCloudServerPopulated:a.a.boolean,provisionPersonalCloudServerError:a.a.object,isConnectToPersonalCloudServerPending:a.a.boolean,isConnectToPersonalCloudServerPopulated:a.a.boolean,connectToPersonalCloudServerError:a.a.object,isPersonalCloudServerDriveCachePending:a.a.boolean,isPersonalCloudServerDriveCachePopulated:a.a.boolean,
personalCloudServerDriveCacheError:a.a.object},defaults:{isPersonalCloudServerModalOpen:!1,isProvisionPersonalCloudServerPending:!1,isProvisionPersonalCloudServerPopulated:!1,provisionPersonalCloudServerError:null,isConnectToPersonalCloudServerPending:!1,isConnectToPersonalCloudServerPopulated:!1,connectToPersonalCloudServerError:null,isPersonalCloudServerDriveCachePending:!1,isPersonalCloudServerDriveCachePopulated:!1,personalCloudServerDriveCacheError:null}});t.a=r},function(e,t,n){
"use strict";var i=n(17),a=n(18),r=n(827),s=a.a.extend({name:"QuickSearchModel",sessionAttrs:{query:i.a.string,providerIdentifier:i.a.string,sectionID:i.a.string,selectedResultEntityID:i.a.string,channelPlaceholder:i.a.string,channelID:i.a.string,channelSearchKey:i.a.string},sessionRelations:{searches:{relationClass:r.a}},defaults:{query:"",selectedResultEntityID:null}});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(708),s=n(829),o=a.a.extend({name:"RecordingSchedulePageModel",
sessionAttrs:{isPagePopulated:i.a.boolean,isMediaSubscriptionsPending:i.a.boolean,isMediaSubscriptionsPopulated:i.a.boolean,mediaSubscriptionsError:i.a.object,isCalendarPending:i.a.boolean,isCalendarPopulated:i.a.boolean,calendarError:i.a.object},sessionRelations:{mediaSubscriptions:{relationClass:r.a,deferred:!0},calendar:{relationClass:s.a,deferred:!0}},defaults:{isPagePopulated:!1,isMediaSubscriptionsPending:!1,isMediaSubscriptionsPopulated:!1,mediaSubscriptionsError:null,
isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null}});t.a=o},function(e,t,n){"use strict";var i=n(18),a=n(827),r=i.a.extend({name:"SearchPageModel",sessionRelations:{searches:{relationClass:a.a}}});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(81),s=n(366),o=n(692),l=a.a.extend({name:"TimelinePageModel",sessionAttrs:{serverEntityID:i.a.string,momentKey:i.a.string,isDetailsPending:i.a.boolean.isRequired,isDetailsPopulated:i.a.boolean.isRequired,detailsError:i.a.object,
isMomentListPending:i.a.boolean.isRequired,isMomentListPopulated:i.a.boolean.isRequired,momentListError:i.a.object},sessionRelations:{metadataList:{relationClass:r.default,deferred:!0},details:{relationClass:s.a,deferred:!0},momentList:{relationClass:o.a,deferred:!0}},defaults:{isDetailsPending:!0,isDetailsPopulated:!1,detailsError:null,isMomentListPending:!0,isMomentListPopulated:!1,momentListError:null}});t.a=l},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(21),s=n(1635),o=r.a.extend({
name:"DeviceCollection",context:["server"],model:s.a,url:"/devices.xml",filterSyncDevices:function(e){var t=!(!e||!e.channel),n=!!e&&e.server.get("isShared"),i=!!e&&e.get("isPlaylist"),r=this.filter(function(e){var a=e.get("syncList"),r=a&&a.get("version")>=2,s=(t||n)&&e.get("isCloudSync"),o=i&&!r;return e.supports("sync-target")&&!s&&!o}),s=a.a.sortBy(r,function(e){return!e.get("isCloudSync")});return this.clone(s)},filterByProducts:function(e){var t=this.filter(function(t){
return a.a.contains(e,t.get("product"))});return this.clone(t)},products:function e(){var e=this.map(function(e){return e.get("product")});return a.a.uniq(e)}});t.a=o},function(e,t,n){"use strict";var i=n(17),a=n(18),r=n(1617),s=a.a.extend({name:"DeviceModel",context:["server"],rootPropertyName:"Device",url:function(){return"/devices/"+this.id+".xml"},syncedAttrs:{id:i.a.string,clientIdentifier:i.a.string,name:i.a.string,product:i.a.string,productVersion:i.a.string,platform:i.a.string,
platformVersion:i.a.string,device:i.a.string,model:i.a.string,provides:i.a.list,screenResolution:i.a.string,screenDensity:i.a.string,lastSeenAt:i.a.integer},syncedRelations:{syncList:{relationClass:r.a,rootPropertyName:"SyncList",deferred:!0,options:function(){return{device:this}}}},derivedAttrs:{isCloudSync:function(){return"cloudsync"===this.get("platform")},isPersonalCloudServer:function(){return"Cloud"===this.get("platform")}},supports:function(e){return this.get("provides").indexOf(e)!==-1}
});t.a=s},function(e,t,n){"use strict";var i=n(21),a=n(1637),r=i.a.extend({name:"SubscriptionPlanCollection",context:["server"],model:a.a,url:"/api/subscriptions/plans"});t.a=r},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"SubscriptionPlanModel",context:["server"],rootPropertyName:"plan",syncedAttrs:{id:i.a.string,name:i.a.string,price:i.a.float,formattedPrice:i.a.string,currency:i.a.string}});t.a=r},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(17),s=n(18),o=n(490),l=n(1249),u=n(1251),c=n(1255),d=n(1247),h=n(1634),p=n(1636),f=n(1639),g=s.a.extend({name:"UserFlexModel",context:["server"],sessionAttrs:{friends:r.a.instanceOf(l.a).isRequired,invites:r.a.instanceOf(u.a).isRequired,sentInvites:r.a.instanceOf(u.a).isRequired,socialNetworks:r.a.instanceOf(c.a).isRequired,isPlansPending:r.a.boolean.isRequired,isPlansPopulated:r.a.boolean.isRequired,plansError:r.a.object,isDeletingAvatar:r.a.boolean.isRequired,
isUpdatingUser:r.a.boolean.isRequired,updateUserError:r.a.object,isUnwatchedWatchLaterListPending:r.a.boolean.isRequired,isUnwatchedWatchLaterListPopulated:r.a.boolean.isRequired,unwatchedWatchLaterListError:r.a.object,isUnwatchedRecommendedListPending:r.a.boolean.isRequired,isUnwatchedRecommendedListPopulated:r.a.boolean.isRequired,unwatchedRecommendedListError:r.a.object,isWebhooksPending:r.a.boolean,isWebhooksPopulated:r.a.boolean,webhooksError:r.a.object,isUpdatingWebhooks:r.a.boolean,
isRemovingWebhooks:r.a.boolean,updateWebhooksError:r.a.object},sessionRelations:{devices:{relationClass:h.a},announcements:{relationClass:d.a},plans:{relationClass:p.a},unwatchedWatchLaterList:{relationClass:o.a,attrs:{key:o.a.keys.WATCH_LATER,subset:o.a.subsets.UNWATCHED}},unwatchedRecommendedList:{relationClass:o.a,attrs:{key:o.a.keys.RECOMMENDED,subset:o.a.subsets.UNWATCHED}},webhooks:{relationClass:f.a}},defaults:function(){var e={server:this.server,parent:this};return{devices:new h.a([],e),
friends:new l.a([],e),invites:new u.a([],e),sentInvites:new u.a([],a.a.extend({subset:"requested"},e)),socialNetworks:new c.a([],e),isPlansPending:!0,isPlansPopulated:!1,plansError:null,isDeletingAvatar:!1,isUpdatingUser:!1,updateUserError:null,isUnwatchedWatchLaterListPending:!0,isUnwatchedWatchLaterListPopulated:!1,unwatchedWatchLaterListError:null,isUnwatchedRecommendedListPending:!0,isUnwatchedRecommendedListPopulated:!1,unwatchedRecommendedListError:null,isWebhooksPending:!1,
isWebhooksPopulated:!1,webhooksError:null,isUpdatingWebhooks:!1,isRemovingWebhooks:!1,updateWebhooksError:null}}});t.a=g},function(e,t,n){"use strict";var i=n(21),a=n(65),r=n(1640),s=i.a.extend({name:"WebhookCollection",context:["server"],model:r.a,url:"/api/v2/user/webhooks",responseType:a.a.json});t.a=s},function(e,t,n){"use strict";var i=n(17),a=n(18),r=a.a.extend({name:"WebhookModel",syncedAttrs:{url:i.a.string},defaults:{url:""}});t.a=r},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(12),u=o.a.Region.extend({resizeSubscribersCallbacks:[],scrollSubscribersCallbacks:[],sidebarDelay:200,scrollDelay:100,initialize:function(e){a.a.bindAll(this,"onResize","onScroll","onScrollEvent","onSidebarChange"),this.$el=s()(this.el),this.channelName=e.channelName;var t={};t[this.channelName+".subscribe:resize"]=this.onResizeSubscribe,t[this.channelName+".unsubscribe:resize"]=this.onResizeUnsubscribe,
t[this.channelName+".subscribe:scroll"]=this.onScrollSubscribe,t[this.channelName+".unsubscribe:scroll"]=this.onScrollUnsubscribe,this.listenTo(l.a,t)},updateSize:function(){this.size={width:this.$el.width(),height:this.$el.height(),innerWidth:this.$el.innerWidth(),innerHeight:this.$el.innerHeight(),outerWidth:this.$el.outerWidth(),outerHeight:this.$el.outerHeight(),offset:this.$el.offset()}},updateScrollPosition:function(){this.scrollPosition={scrollHeight:this.$el[0].scrollHeight,
scrollTop:this.$el[0].scrollTop}},onShow:function(){this.updateSize(),this.updateScrollPosition()},onResizeSubscribe:function(e){this.resizeSubscribersCallbacks.push(e),1===this.resizeSubscribersCallbacks.length&&(this.updateSize(),this.listenTo(l.a,{resize:this.onResize,"show:bar hide:bar":this.onSidebarChange})),e(this.size)},onResizeUnsubscribe:function(e){this.resizeSubscribersCallbacks.splice(a.a.indexOf(this.resizeSubscribersCallbacks,e),1),
0===this.resizeSubscribersCallbacks.length&&this.stopListening(l.a,"resize show:bar hide:bar")},onScrollSubscribe:function(e){this.scrollSubscribersCallbacks.push(e),1===this.scrollSubscribersCallbacks.length&&(this.updateScrollPosition(),this.$el.on("scroll",this.onScroll)),e(this.scrollPosition)},onScrollUnsubscribe:function(e){this.scrollSubscribersCallbacks.splice(a.a.indexOf(this.scrollSubscribersCallbacks,e),1),
0===this.scrollSubscribersCallbacks.length&&this.$el.off("scroll",this.onScroll)},onResize:function(){this.updateSize(),a.a.each(this.resizeSubscribersCallbacks,function(e){e(this.size)},this)},onScroll:function(){this.scrollTimeout=clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(this.onScrollEvent,this.scrollDelay)},onScrollEvent:function(){this.updateScrollPosition(),a.a.each(this.scrollSubscribersCallbacks,function(e){e(this.scrollPosition)},this)},onSidebarChange:function(e){
"sidebar"===e&&a.a.delay(this.onResize,this.sidebarDelay)}});t.a=u},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(13),l=n(4),u=n(12),c=n(157),d=n(817),h=n(324),p=n(540),f=n(1727),g=n(224),m=c.a.extend({activity:function(){this.populateView({primaryServer:!0}).done(a.a.bind(function(e){var t=e.server;t.get("shared")?this.sync(t.id):u.a.trigger("show:view",new f.a({model:t,collection:t.get("desktop").get("alerts"),subset:"alerts"}))},this))},alerts:function(e){var t;t=e?{
serverID:e}:{primaryServer:!0},this.populateView(t).done(function(e){var t=e.server;u.a.trigger("show:view",new f.a({model:t,collection:t.get("desktop").get("alerts"),subset:"alerts"}))})},sync:function(e,t){var i=this.populateView({serverID:"myPlex"});i=i.then(a.a.bind(function(t){var n;return n=e?{serverID:e}:{primaryServer:!0},this.populateView(n)},this)),i.done(function(e){var i=o.a("appModel"),a=i.get("user"),r=a.get("desktop").get("devices"),s=r.populate();s.done(function(){
var n=r.filterSyncDevices(),i=t?n.get(t):null;u.a.trigger("show:view",new f.a({model:e.server,collection:n,selectedDevice:i,subset:"sync"}))}),s.fail(function(){u.a.trigger("show:view",new g.a({title:n.i(l.default)("Sync status is unavailable.")}))})})},conversion:function(e){var t;t=e?{serverID:e}:{primaryServer:!0},this.populateView(t).done(function(e){var t,i,a=e.server,r=new d.a([],{server:a,allowInCache:!0}),o=new h.a([],{server:a,allowInCache:!0}),c=new p.a([],{server:a,allowInCache:!0
}),m=s.a.when(r.populate(),o.fetch(),a.get("desktop").get("settings").fetch(),c.populate()).then(function(){t=r.first();var e=c.first();return t&&e?(i=e.get("children"),s.a.when(t.fetch(),i.fetch())):s.a.Deferred().reject().promise()});m.done(function(){u.a.trigger("show:view",new f.a({model:a,playQueue:t,transcodeJobs:o,generators:i,subset:"conversion"}))}),m.fail(function(){u.a.trigger("show:view",new g.a({title:n.i(l.default)("The conversion queue is unavailable.")}))})})},
nowPlaying:function(e){var t;t=e?{serverID:e}:{primaryServer:!0},this.populateView(t).done(function(e){var t=e.server;u.a.trigger("show:view",new f.a({model:t,collection:t.get("desktop").get("sessions"),subset:"nowPlaying"}))})}});t.a=m},function(e,t,n){"use strict";var i=n(158),a=n(1642),r=i.a.extend({controller:new a.a,appRoutes:{"!/activity":"activity","!/activity/alerts(/:serverID)":"alerts","!/activity/sync(/:serverID)(/:deviceID)":"sync","!/activity/conversion(/:serverID)":"conversion",
"!/activity/playing(/:serverID)":"nowPlaying","!/status":"activity","!/status/alerts(/:serverID)":"alerts","!/status/sync(/:serverID)(/:deviceID)":"sync","!/status/conversion(/:serverID)":"conversion","!/status/playing(/:serverID)":"nowPlaying"}});t.a=r},function(e,t,n){"use strict";var i=n(4),a=n(12),r=n(157),s=n(684),o=n(1742),l=n(1743),u=n(1741),c=n(552),d=n(224),h=r.a.extend({channel:function(e,t,n){this.populateView({serverID:e,channelID:t,channelKey:n}).done(function(e){
var t=e.channelItem?e.channelItem:e.channel;a.a.trigger("show:view",new o.a({model:t,listModel:t.get("metadataList")}))})},channelDetails:function(e,t,n){this.populateView({serverID:e,channelID:t,channelKey:n}).done(function(e){var t=e.channelItem.get("metadataList").getCollection(),n=t.first();a.a.trigger("show:view",new c.a({model:n}))})},channels:function(e){this.populateView({serverID:e}).done(function(e){var t=new s.a({subset:"all"},{server:e.server}),r=t.get("channels")
;r.comparator=r.sortByTitle;var o=t.fetch({scope:"page"});o.done(function(){a.a.trigger("show:view",new l.a({collection:r}))}),o.fail(function(){a.a.trigger("show:view",new d.a({title:n.i(i.default)("Your channels are unavailable.")}))})})},directory:function(e,t,r){this.populateView({serverID:e}).done(function(e){if(e.server.get("shared"))return void a.a.trigger("show:view",new d.a({title:n.i(i.default)("The channel directory is restricted from shared users.")}));var o=new s.a({
key:"/system/appstore"},{server:e.server}),l=o.fetch({scope:"page"});l.done(function(){a.a.trigger("show:view",new u.a({collection:o.get("channels"),currentKey:t,currentPath:r}))}),l.fail(function(){a.a.trigger("show:view",new d.a({title:n.i(i.default)("The channel directory is unavailable.")}))})})}});t.a=h},function(e,t,n){"use strict";var i=n(158),a=n(1644),r=i.a.extend({controller:new a.a,appRoutes:{"!/server/:serverID/channel/:channelID(/:key)":"channel",
"!/server/:serverID/channel/:channelID/details/:key":"channelDetails","!/server/:serverID/channels":"channels","!/server/:serverID/directory(/:key)(/:path)":"directory"}});t.a=r},function(e,t,n){"use strict";var i=n(12),a=n(19),r=n(13),s=n(1266),o=n(1714),l=n(1747),u=n(1746),c=n(1745),d=n(853),h=n(1718),p=n(1717),f=n(1784),g=n(224),m=n(1785),v=n(1786),y=n(1787),b=n(1788),S=s.a.extend({viewsByType:{signIn:d.a,error:g.a,channelError:f.a,notFound:m.a,serverRequired:v.a,unauthorized:y.a,
unavailable:b.a},initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.listenTo(i.a,"initialize:app",this.onAppInitialize)},dashboard:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new l.a({selectedServerID:e,params:a.parseParams(t)}))})},list:function(e,t,n){var r=a.parseParams(n);this.populateView().done(function(){i.a.trigger("show:view",new u.a({selectedServerID:e,selectedProviderID:t,params:r}))})},needsUpdate:function(e){
this.populateView().done(function(){r.a("appModel").get("servers").findWhere({isOutOfDate:!0})?i.a.trigger("show:view",new c.a({selectedServerID:e})):i.a.trigger("navigate","dashboard",{replace:!0})})},logs:function(){i.a.trigger("show:view",new h.a({collection:r.a("logs")}))},info:function(){i.a.trigger("show:view",new p.a)},onAppInitialize:function(){this.appView=new o.a,this.appView.render()}});t.a=S},function(e,t,n){"use strict";var i=n(52),a=n(12),r=n(1267),s=n(1646),o=r.a.extend({
controller:new s.a,appRoutes:{"!/dashboard":"dashboard","!(/server/:serverID)/dashboard":"dashboard","!(/server/:serverID)(/provider/:providerID)/list":"list","!(/server/:serverID)/needsUpdate":"needsUpdate","":"dashboard","!/login":"login","!/unauthorized":"unauthorized","!/logs":"logs","!/info":"info","*404":"error"},onNavigateRefreshDashboard:function(){var e=i.a.history.getFragment();""===e||"!/dashboard"===e?i.a.history.loadUrl(""):a.a.trigger("navigate","dashboard")}});t.a=o
},function(e,t,n){"use strict";var i=n(12),a=n(19),r=n(157),s=n(1719),o=n(1937),l=n(1936),u=n(1938),c=r.a.extend({search:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new s.a({selectedServerID:e,query:t}))})},provider:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new o.a({selectedServerID:e,selectedProviderID:t,params:a.parseParams(n)}))})},timeline:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new u.a({
selectedServerID:e,selectedProviderID:t,params:a.parseParams(n)}))})},prePlay:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new l.a({selectedServerID:e,selectedProviderID:t,params:a.parseParams(n)}))})},section:function(e,t){var n=encodeURIComponent("/library/sections/"+t);this.provider(e,void 0,"key="+n)},details:function(e,t){this.prePlay(e,void 0,"key="+encodeURIComponent(t))}});t.a=c},function(e,t,n){"use strict";var i=n(158),a=n(1648),r=i.a.extend({
controller:new a.a,appRoutes:{"!/server/:serverID/search/:query":"search","!/server/:serverID(/provider/:providerID)":"provider","!/server/:serverID(/provider/:providerID)/timeline":"timeline","!/server/:serverID(/provider/:providerID)/details":"prePlay","!/server/:serverID?key=:sectionID":"section","!/server/:serverID/details?key=:key":"details"}});t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(4),s=n(12),o=n(157),l=n(483),u=n(224),c=n(1935),d=n(552),h=o.a.extend({
playlists:function(e){this.populateView({serverID:e}).done(function(e){var t=e.server.get("playlists"),i=e.server.get("sections").populate({scope:"page"}),o=t.get("items").fetch({scope:"page"}),l=t.get("sorts").populate().then(function(e){var n=e.get("titleSort");n&&(t.set("currentSort",n),n.set("selected",!0))}),d=a.a.when(i,o,l);d.done(function(){s.a.trigger("show:view",new c.a({model:t}))}),d.fail(function(){s.a.trigger("show:view",new u.a({
title:n.i(r.default)("Playlists are unavailable for this server.")}))})})},playlist:function(e,t){this.populateView({serverID:e}).done(function(e){var i=e.server.get("sections").populate({scope:"page"}),o=new l.a({ratingKey:t},{server:e.server}),c=o.fetch({scope:"page"});c.fail(function(){s.a.trigger("show:view",new u.a({title:n.i(r.default)("Playlist not found.")}))}),a.a.when(i,c).done(function(){s.a.trigger("show:view",new d.a({model:o}))})})}});t.a=h},function(e,t,n){"use strict"
;var i=n(158),a=n(1650),r=i.a.extend({controller:new a.a,appRoutes:{"!/server/:serverID/playlists":"playlists","!/server/:serverID/playlist/:key":"playlist"}});t.a=r},function(e,t,n){"use strict";var i=n(12),a=n(19),r=n(157),s=n(1939),o=r.a.extend({schedule:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new s.a({selectedServerID:e,params:a.parseParams(t)}))})}});t.a=o},function(e,t,n){"use strict";var i=n(158),a=n(1652),r=i.a.extend({controller:new a.a,appRoutes:{
"!(/server/:serverID)/schedule":"schedule"}});t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(13),s=n(4),o=n(12),l=n(157),u=n(1227),c=n(180),d=n(1944),h=n(224),p=l.a.extend({settings:function(){return this.webSettings()},webSettings:function(){this.populateView().done(function(){function e(){o.a.trigger("show:view",new d.a({model:i,subset:"web"}))}var t=n.i(r.a)("appModel"),i=t.get("settings"),a=t.get("user"),s=a.get("homeUsers"),l=a.server.populate();l.done(function(){
a.get("signedIn")?s.populate().always(e):e()}),l.fail(e)})},serverSettings:function(e,t){var i;i=e?{serverID:e}:{primaryServer:!0},this.populateView(i).done(function(e){var i=e.server;if(i.get("shared"))return void o.a.trigger("show:view",new h.a({title:n.i(s.default)("Server settings are restricted from shared users.")}));var r=i.get("desktop").get("settings"),l=new u.a({key:"/accounts/1"},{server:i}),p=i.get("desktop").get("cloudAccount"),f=new c.a([],{server:i,url:"/system/:/prefs"
}),g=a.a.when(r.fetch(),l.fetch({scope:"page"}),p.fetch({scope:"page"}),f.fetch({scope:"page"}));g.done(function(){o.a.trigger("show:view",new d.a({model:i,collection:i.get("desktop").get("settings"),account:l,cloudAccount:p,channelSettings:f,subset:"server",group:t}))}),g.fail(function(){o.a.trigger("show:view",new h.a({title:n.i(s.default)("Server settings are unavailable.")}))})})},users:function(e){this.populateView({serverID:"myPlex"}).done(function(t){
var i=n.i(r.a)("appModel"),l=i.get("user"),u=l.get("homeUsers"),c=l.get("homeDetails"),p=l.get("desktop").get("friends"),f=l.get("desktop").get("invites"),g=l.get("desktop").get("sentInvites"),m=a.a.Deferred(),v=c.fetch();v.done(function(){m.resolve()}),v.fail(function(e,t){404===t.status?m.resolve():m.reject()});var y=a.a.when(l.fetch({scope:"page"}),u.fetch({scope:"page"}),p.fetch({scope:"page"}),f.fetch({scope:"page"}),g.fetch({scope:"page"}),m.promise());y.done(function(){var t=!1
;"pin"===e?(e="home",t=!0):e||(e=f.length&&!f.findWhere({home:!0})?"friends":"home"),o.a.trigger("show:view",new d.a({model:i.get("user"),subset:"users",usersSubset:e,promptPIN:t}))}),y.fail(function(){var t;t="friends"===e?n.i(s.default)("Your friends are unavailable."):n.i(s.default)("Your home is unavailable."),o.a.trigger("show:view",new h.a({title:t}))})})},devices:function(){this.populateView({serverID:"myPlex"}).done(function(e){
var t=n.i(r.a)("appModel"),i=t.get("user"),a=i.get("desktop").get("devices"),l=a.fetch({scope:"page"});l.done(function(){o.a.trigger("show:view",new d.a({model:i,collection:a,subset:"devices"}))}),l.fail(function(){o.a.trigger("show:view",new h.a({title:n.i(s.default)("Your devices are unavailable.")}))})})}});t.a=p},function(e,t,n){"use strict";var i=n(158),a=n(1654),r=i.a.extend({controller:new a.a,appRoutes:{"!/settings":"settings","!/settings/web":"webSettings",
"!/settings/server(/:serverID)(/:group)":"serverSettings","!/settings/users":"users","!/settings/users(/:subset)":"users","!/settings/devices":"devices"}});t.a=r},function(e,t,n){"use strict";var i=n(12),a=n(157),r=n(1967),s=a.a.extend({setupBasic:function(e){var t;t=e?{serverID:e}:{primaryServer:!0},this.populateView(t).done(function(e){i.a.trigger("show:view",new r.a({model:e.server,subset:"setupBasic"}))})},setupLibrary:function(){this.populateView({primaryServer:!0}).done(function(e){
i.a.trigger("show:view",new r.a({model:e.server,subset:"setupLibrary"}))})},setupChannels:function(){this.populateView({primaryServer:!0}).done(function(e){i.a.trigger("show:view",new r.a({model:e.server,subset:"setupChannels"}))})},setupComplete:function(){this.populateView({primaryServer:!0}).done(function(e){i.a.trigger("show:view",new r.a({model:e.server,subset:"setupComplete"}))})}});t.a=s},function(e,t,n){"use strict";var i=n(158),a=n(1656),r=i.a.extend({controller:new a.a,appRoutes:{
"!/setup/library":"setupLibrary","!/setup/channels":"setupChannels","!/setup/complete":"setupComplete","!/setup(/:serverID)":"setupBasic"}});t.a=r},function(e,t,n){"use strict";var i=n(13),a=n(4),r=n(12),s=n(41),o=n(157),l=n(1721),u=n(1723),c=n(1722),d=n(1724),h=n(1744),p=n(713),f=n(490),g=n(1971),m=n(1969),v=n(552),y=n(224),b=n(1970),S=o.a.extend({account:function(){this.populateView({serverID:"myPlex"}).done(function(){n.i(s.a)(),r.a.trigger("show:view",new l.a)})},personalCloud:function(){
var e=i.a("appModel"),t=e.get("user");this.populateView({serverID:"myPlex"}).done(function(){n.i(s.a)(),r.a.trigger("show:view",new u.a({model:t}))})},audioSubtitleSettings:function(){this.populateView({serverID:"myPlex"}).done(function(){n.i(s.a)(),r.a.trigger("show:view",new c.a)})},webhooks:function(){var e=i.a("appModel"),t=e.get("user");this.populateView({serverID:"myPlex"}).done(function(){n.i(s.a)(),r.a.trigger("show:view",new d.a({model:t}))})},cpms:function(){this.populateView({
serverID:"myPlex"}).done(function(){r.a.trigger("show:view",new h.a)})},userPlaylist:function(e,t){this.populateView({serverID:"myPlex"}).done(function(s){var o=i.a("appModel"),l=o.get("user"),u=new f.a({key:e},{server:l.server,parent:l}),c=u.fetch({scope:"page"});c.done(function(){r.a.trigger("show:view",new g.a({model:o.get("user"),listModel:u,subset:t}))}),c.fail(function(){r.a.trigger("show:view",new y.a({title:n.i(a.default)("This playlist is unavailable.")}))})})},
userPlaylistDetails:function(e,t){this.populateView({serverID:"myPlex"}).done(function(s){var o=i.a("appModel"),l=o.get("user"),u=new p.a({id:parseInt(t,10)},{server:s.server,parent:l,containerKey:e}),c=u.fetch({scope:"page"});c.done(function(){r.a.trigger("show:view",new v.a({model:u}))}),c.fail(function(){r.a.trigger("show:view",new y.a({title:n.i(a.default)("This playlist item is unavailable.")}))})})},queueHelp:function(){this.populateView({serverID:"myPlex"}).done(function(){
var e=i.a("appModel"),t=e.get("user");r.a.trigger("show:view",new b.a({queueEmail:t.get("queueEmail")}))})},announcements:function(){this.populateView().done(function(){var e=i.a("appModel"),t=e.get("user"),s=t.get("desktop").get("announcements"),o=s.fetch({scope:"page"});o.done(function(){r.a.trigger("show:view",new m.a({collection:s}))}),o.fail(function(){r.a.trigger("show:view",new y.a({title:n.i(a.default)("Announcements are not available.")}))})})}});t.a=S},function(e,t,n){"use strict"
;var i=n(158),a=n(1658),r=i.a.extend({controller:new a.a,appRoutes:{"!/account":"account","!/account/plex-cloud":"personalCloud","!/account/webhooks":"webhooks","!/account/audio-subtitle":"audioSubtitleSettings","!/cpms":"cpms","!/playlist/queue/help":"queueHelp","!/playlist/:key(/:subset)":"userPlaylist","!/playlist/:key/details/:itemID":"userPlaylistDetails","!/announcements":"announcements"}});t.a=r},function(e,t,n){"use strict"
;var i=n(1661),a=n(1675),r=n(1670),s=n(1693),o=n(1674),l=n(1666),u=n(1669),c=n(1668),d=n(1678),h=n(1684),p=n(1681),f=n(1686),g=n(1691),m=n(1687),v=n(1682),y=n(1680),b=n(1662),S=n(1689),I=n(1683),w=n(1688),M=n(1690),C=n(1677),D=n(1673),P=n(1671),T=n(1694),x=[i.a,a.a,r.a,s.a,o.a,l.a,u.a,c.a,d.a,h.a,p.a,f.a,g.a,m.a,v.a,y.a,b.a,S.a,I.a,w.a,M.a,C.a,D.a,P.a,T.a];t.a=x},function(e,t,n){"use strict"
;var i,a=n(6),r=n.n(a),s=n(2),o=n.n(s),l=n(13),u=n(1711),c=n(12),d=n(775),h=n(774),p=n(60),f=n(41),g=n(1385),m=n(1883),v=n(32),y=n(79),b=n.i(p.a)((i={},i[v.F]=function(e,t){c.a.trigger("show:alert",t)},i[v.G]=function(e,t){var n=t.name,i=t.settings;e.get(n).save(i)},i[v.H]=function(e,t){var n=new m.a({downloadType:t});c.a.trigger("show:modal",n)},i[v.I]=function(e){c.a.trigger("discover:servers")},i[v._185]=function(e){e.set({primaryServer:null,isWaitingForPrimaryServer:!0})},
i[v._186]=function(e,t,i){var a=t.machineIdentifier,s=t.metricsProperties,o=void 0===s?{}:s;e.get("servers").findServer(a).done(function(t){t.get("isOutOfDate")?i(n.i(y.i)({route:"needsUpdate",options:{serverID:a,replace:!0}})):t.get("isPrimaryEligible")?(e.get("primaryServer")!==t&&n.i(l.a)("metrics").trackEvent({event:"client:selectserver",properties:r()({serverType:n.i(d.a)(t),serverVersion:t.get("version"),connectionType:n.i(h.a)(t),secure:t.get("isSecure")},o)}),e.set({primaryServer:t,
isWaitingForPrimaryServer:!1})):i(n.i(y.i)({route:"dashboard"}))}).fail(function(){i(n.i(y.i)({route:"dashboard"}))})},i[v.J]=function(e,t){var n=t.route,i=t.options;o.a.defer(function(){c.a.trigger("navigate",n,i)})},i[v.K]=function(){n.i(u.a)()},i[v.L]=function(){window.localStorage.setItem("preferInsecure","1")},i[v._187]=function(e,t){n.i(f.a)();var i=n.i(g.a)(e.getState(),t),a=e.get("entities");o.a.each(i,function(e,t){a.get(t).remove(e)})},i));t.a=b},function(e,t,n){"use strict"
;function i(e,t){var i=t.serverEntityID;return n.i(p.a)(e,h.f,i)}function a(e){return e.get("ui").get("liveTVSettingsPage").get("dvrSetup")}function r(e,t){return a(e,t).get("epgSettings")}function s(e,t,i){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=a(e,t),l=r(e,t),u=l.get(i);return u.abortPendingPopulate(),o.get("setupErrorMessages").remove("programGuideSettings"),l.set("isFetching",!0),u.fetch(s).done(function(){l.set({isFetching:!1,isPopulated:!0})}).fail(function(){
l.set({isFetching:!1,isPopulated:!1}),o.get("setupErrorMessages").add({id:"programGuideSettings",message:n.i(c.default)("Unable to fetch Program Guide settings")})})}var o,l=n(6),u=n.n(l),c=n(4),d=n(19),h=n(67),p=n(385),f=n(60),g=n(397),m=n(32),v=n.i(f.a)((o={},o[m._63]=function(e,t){r(e,t).restoreDefaults()},o[m._64]=function(e,t,a){var r=i(e,t);s(e,t,"countries").done(function(){var e=r.get("countryCode");e&&a(n.i(g.selectEPGCountry)(u()({},t,{countryCode:e})))})},o[m._65]=function(e,t,i){
var a=r(e,t);s(e,t,"languages").done(function(){var e=a.get("selectedCountry");e&&i(n.i(g.selectEPGLanguage)(u()({},t,{languageCode:e.get("language")})))})},o[m._66]=function(e,t,i){var a=r(e,t),o=a.get("countries").get(t.countryCode);if(a.set({selectedCountry:o,postalCode:""}),a.get("regions").reset(),a.get("lineupGroup").get("lineups").reset(),o){var l=o.get("flavor"),c=d.join([a.get("baseUrl"),o.get("key")]);i(n.i(g.fetchEPGLanguages)(u()({},t,{languageCode:o.get("language")}))),
0===l?s(e,t,"regions",{url:c}):2===l&&(a.set("postalCode",o.get("example")),i(n.i(g.fetchEPGLineups)(t)))}},o[m._67]=function(e,t,n){var i=r(e,t),a=i.get("languages").get(t.languageCode);i.set("selectedLanguage",a)},o[m._68]=function(e,t,i){var a=r(e,t),s=a.get("regions").get(t.regionKey);a.set("selectedRegion",s),a.get("lineupGroup").get("lineups").reset(),s&&i(n.i(g.fetchEPGLineups)(t))},o[m._69]=function(e,t,n){var i=r(e,t),a=t.postalCode;i.set("postalCode",a),
i.get("lineupGroup").get("lineups").reset()},o[m._70]=function(e,t,n){var i=r(e,t),a=i.get("selectedCountry"),o=[i.get("baseUrl"),a.get("key")],l={};0===a.get("flavor")?o.push(i.get("selectedRegion").get("key")):l.postalCode=i.get("postalCode"),s(e,t,"lineupGroup",{url:d.join(o,l)})},o));t.a=v},function(e,t,n){"use strict";function i(e,t){if(t!==e.get("currentIndex")){var i=n.i(h.a)(e,t);if(i){
var a=e.get("decisions")[i.get("playQueueItemID")],r=i.get("metadataItem"),s=r.get("key"),o=n.i(c.join)([s.replace("/library/","/hubs/"),"related"]),l=new p.default([],{server:r.server,metadataItem:r,hubKey:o,hubCount:8});e.get("playQueueItem")&&n.i(f.a)(e,{state:d.a.states.STOPPED,continuing:!0}),e.set({currentIndex:t,playQueueItem:i,relatedHubs:l,positionSeconds:0,videoQualityIndex:a&&a.qualityIndex,currentDecision:a||{}}),r.get("isLibraryItem")&&(r.populate(),l.fetch()),n.i(f.a)(e)}}}
function a(e){i(e,e.get("playQueue").get("playQueueSelectedItemOffset")),e.set({playbackDuration:0})}function r(e){var t=e.get("playQueue");if(t){var i=t.get("type"),a=t.server.get("playQueueManager");n.i(u.a)("metrics").incrementPlaybackCount(),n.i(f.a)(e,{state:d.a.states.STOPPED}),a.remove(i),e.set({playQueue:null,currentIndex:null,playQueueItem:null,currentDecision:{}})}}function s(e){var t=e.get("playQueue"),n=e.get("currentIndex")+1;i(e,Math.min(n,t.get("playQueueTotalCount")-1))}
function o(e){var t=e.get("currentIndex")-1;i(e,Math.max(t,0))}function l(e,t){i(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),c=n(19),d=n(40),h=n(386),p=n(178),f=n(544);t.startPlayback=a,t.endPlayback=r,t.playNextItem=s,t.playPreviousItem=o,t.playItem=l},function(e,t,n){"use strict";function i(e){var t={includeConcerts:1,includeExtras:1,includeOnDeck:1,includePopularLeaves:1};return e.server.supports("asyncCheckFiles")?(t.asyncCheckFiles=1,t.asyncRefreshAnalysis=1,
t.asyncRefreshLocalMediaAgent=1):t.checkFiles=1,e.fetch({data:t}).done(function(){e.set("isPreFetched",!0)})}t.a=i},function(e,t,n){"use strict";function i(e,t){var i=e.server,a=i.getXHROptions(r.a.result(e,"url"),{method:"POST",dataType:"json",data:u.a.stringify({urls:t},{arrayFormat:"brackets"})||"urls="});return n.i(c.a)(o.a.ajax(a),400).then(function(t){e.reset(t)},function(e){return o.a.Deferred().reject(e.status&&e.responseJSON.errors||[]).promise()})}
var a=n(2),r=n.n(a),s=n(5),o=n.n(s),l=n(1029),u=n.n(l),c=n(383);t.a=i},function(e,t,n){"use strict";function i(e,t,i){n.i(o.a)("metrics").trackClick({page:i,action:e,type:t.get("type"),context:h.k})}var a,r=n(5),s=n.n(r),o=n(13),l=n(4),u=n(12),c=n(499),d=n(68),h=n(84),p=n(19),f=n(100),g=n(117),m=n(60),v=n(830),y=n(88),b=n(220),S=n(408),I=n(267),w=n(334),M=n(79),C=n(32),D=n.i(m.a)((a={},a[C._18]=function(e,t){var a=n.i(f.a)(e,t),r=n.i(f.g)(e,t);u.a.trigger("show:modal",new I.a({
defaultPaneType:"ownedServer",defaultPaneID:a.id})),i(d.L,r,t.metricsPage)},a[C._19]=function(e,t,i){var a=t.cancel,r=t.force,s=t.metricsPage,o=n.i(f.a)(e,t),c=n.i(f.g)(e,t),d={libraryID:c.id,libraryType:c.get("type"),cancel:a,force:r,allowMetrics:!!s,metricsProperties:{page:s}};c.set("refreshing",!a),n.i(v.a)(o,d).fail(function(e){if(503===e.status)u.a.trigger("show:modal",new w.a({model:o}));else{
var a=t.cancel?n.i(l.default)("There was a problem canceling the update."):n.i(l.default)("There was a problem updating the library.");i(n.i(M.h)(a))}}).always(function(e){i(n.i(y.b)({serverEntityID:t.serverEntityID}))})},a[C._20]=function(e,t){var a=n.i(f.a)(e,t),r=n.i(f.g)(e,t);u.a.trigger("show:modal",new S.a({server:a,model:r})),i(d.M,r,t.metricsPage)},a[C._21]=function(e,t,a){var r=n.i(f.a)(e,t),o=n.i(f.g)(e,t),u=r.getXHROptions("/library/sections/"+o.id+"/analyze",{type:"PUT"})
;s.a.ajax(u).fail(function(e){a(n.i(M.h)(n.i(l.default)("There was a problem analyzing the library.")))}),i(d.N,o,t.metricsPage)},a[C._22]=function(e,t,a){var r=n.i(f.a)(e,t),o=n.i(f.g)(e,t),u=r.getXHROptions("/library/sections/"+o.id+"/emptyTrash",{type:"PUT"});s.a.ajax(u).done(function(){a(n.i(M.h)({type:c.b,message:n.i(l.default)("The trash was emptied.")}))}).fail(function(e){a(n.i(M.h)(n.i(l.default)("There was a problem emptying the trash.")))}),i(d.O,o,t.metricsPage)},
a[C._23]=function(e,t,a){var r=n.i(f.a)(e,t),o=n.i(f.g)(e,t);if(o.isNew())return void o.destroy();var u=r.supports("libraryDeleteActivity"),c=p.join(o.url(),u?{async:1}:{}),h=r.getXHROptions(c,{type:"DELETE"});a(n.i(y.v)({serverEntityID:t.serverEntityID,activityType:g.a.LIBRARY_DELETE})),s.a.ajax(h).done(function(){u||(a(n.i(y.w)({serverEntityID:t.serverEntityID,activityType:g.a.LIBRARY_DELETE})),a(n.i(M.i)({route:"dashboard"})))}).fail(function(e){a(n.i(y.w)({serverEntityID:t.serverEntityID,
activityType:g.a.LIBRARY_DELETE})),a(n.i(M.h)(n.i(l.default)("There was a problem deleting the library.")))}),i(d.P,o,t.metricsPage)},a[C.y]=function(e,t,i){t.activity.type===g.a.LIBRARY_DELETE&&(i(n.i(b.a)({serverEntityID:t.serverEntityID})),i(n.i(M.i)({route:"dashboard"})))},a));t.a=D},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(50),s=n(32);n.d(t,"a",function(){return o}),n.d(t,"b",function(){return l}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return c}),
n.d(t,"g",function(){return d}),n.d(t,"h",function(){return h}),n.d(t,"f",function(){return p}),n.d(t,"c",function(){return f});var o=n.i(r.a)(s._18),l=n.i(r.a)(s._19),u=n.i(r.a)(s._20),c=n.i(r.a)(s._21),d=n.i(r.a)(s._22),h=n.i(r.a)(s._23),p=n.i(r.a)(s._19,function(e){return a()({},e,{force:!0})}),f=n.i(r.a)(s._19,function(e){return a()({},e,{cancel:!0})})},function(e,t,n){"use strict";function i(e,t,i){n.i(u.a)("metrics").trackClick({page:i,action:e,type:t.get("type")})}
var a,r=n(16),s=n.n(r),o=n(6),l=n.n(o),u=n(13),c=n(4),d=n(12),h=n(68),p=n(100),f=n(23),g=n(60),m=n(1269),v=n(718),y=n(717),b=n(1270),S=n(559),I=n(225),w=n(59),M=n(333),C=n(334),D=n(866),P=n(266),T=n(558),x=n(337),E=n(336),A=n(335),k=n(79),L=n(220),_=n(32),N=n.i(g.a)((a={},a[_._76]=function(e,t){var a=n.i(p.d)(e,t),r=new I.a({model:a,title:a.get("title")});d.a.trigger("show:modal",r),i(h.m,a,t.metricsPage)},a[_._77]=function(e,t,i){var a=n.i(p.d)(e,t),r=t.metricsPage,s={allowMetrics:!!r,
metricsProperties:{page:r}};n.i(y.a)(a,s).fail(function(e){i(n.i(k.h)(n.i(c.default)("There was a problem analyzing this item.")))})},a[_._80]=function(e,t){var i=n.i(p.d)(e,t),a=new T.a({model:i});d.a.trigger("show:modal",a)},a[_._78]=function(e,t){var a=n.i(p.d)(e,t),r=t.options||{};f.a.execute("deleteItems",l()({item:a},r)),i(h.n,a,t.metricsPage)},a[_._79]=function(e,t){var a=n.i(p.d)(e,t);f.a.execute("deleteVersions",{item:a}),i(h.n,a,t.metricsPage)},a[_._81]=function(e,t){
var a=n.i(p.d)(e,t),r=new M.a({model:a});d.a.trigger("show:modal",r),i(h.o,a,t.metricsPage)},a[_._82]=function(e,t){var a=n.i(p.d)(e,t),r=new D.a({model:a});d.a.trigger("show:modal",r),i(h.p,a,t.metricsPage)},a[_._83]=function(e,t){var a=n.i(p.d)(e,t),r=new A.a({model:a});d.a.trigger("show:modal",r),i(h.q,a,t.metricsPage)},a[_._85]=function(e,t,a){var r=n.i(p.d)(e,t);f.a.execute("markWatched",{item:r,force:t.skipConfirm}).done(function(){a(n.i(L.a)({serverEntityID:t.serverEntityID}))}),
i(h.r,r,t.metricsPage)},a[_._84]=function(e,t,a){var r=n.i(p.d)(e,t);f.a.execute("markUnwatched",{item:r,force:t.skipConfirm}).done(function(){a(n.i(L.a)({serverEntityID:t.serverEntityID}))}),i(h.s,r,t.metricsPage)},a[_._86]=function(e,t){var a=n.i(p.d)(e,t),r=new P.a({item:a});d.a.trigger("show:modal",r),i(h.t,a,t.metricsPage)},a[_._87]=function(e,t){var a=t.metadataItemEntityID,r=s()(t,["metadataItemEntityID"]),o=n.i(p.d)(e,{metadataItemEntityID:a
}),u=o.get("type"),c={},d=r.listType||u,g="photo"===d&&"photoalbum"!==u;"show"!==u&&"season"!==u||(c.unwatched=!0),"episode"===u&&(c.continuous=!0),("track"===u||g)&&(c.siblings=!0),f.a.execute("playMedia",l()({item:o},c,r)),i(r.shuffle?h.u:h.v,o,r.metricsPage)},a[_._88]=function(e,t){var a=n.i(p.d)(e,t),r=new S.a({model:a});d.a.trigger("show:modal",r),i(h.w,a,t.metricsPage)},a[_._89]=function(e,t){var a=n.i(p.d)(e,t),r=new w.a({key:a.get("primaryExtraKey"),type:"clip"},{server:a.server,
section:a.section});f.a.execute("playMedia",{item:r}),i(h.x,a,t.metricsPage)},a[_._90]=function(e,t){var a=n.i(p.d)(e,t),r=a.get("related"),s=r.findWhere({browse:!1});s.set("type","track"),f.a.execute("playMedia",{item:s}),i(h.y,a,t.metricsPage)},a[_._91]=function(e,t){var a=t.metadataItemEntityID,r=s()(t,["metadataItemEntityID"]),o=n.i(p.d)(e,{metadataItemEntityID:a});f.a.execute("queueMedia",l()({item:o},r)),i(r.next?h.z:h.A,o,r.metricsPage)},a[_._92]=function(e,t,i){
var a=t.rating,r=t.metricsPage,s=n.i(p.b)(e,t),o=n.i(p.d)(e,t),l={rating:a,allowMetrics:!!r,metricsProperties:{page:r}};n.i(m.a)(s,o,l).fail(function(e){i(n.i(k.h)(n.i(c.default)("There was a problem rating this item.")))})},a[_._93]=function(e,t){var a=n.i(p.d)(e,t),r=new E.a({model:a});d.a.trigger("show:modal",r),i(h.B,a,t.metricsPage)},a[_._94]=function(e,t,i){var a=n.i(p.d)(e,t),r=t.metricsPage,s={allowMetrics:!!r,metricsProperties:{page:r}};n.i(v.a)(a,s).fail(function(e){
503===e.status?d.a.trigger("show:modal",new C.a({model:a.server})):i(n.i(k.h)(n.i(c.default)("There was a problem refreshing this item.")))})},a[_._95]=function(e,t){var a=n.i(p.d)(e,t),r=new x.a({model:a});d.a.trigger("show:modal",r),i(h.C,a,t.metricsPage)},a[_._96]=function(e,t,a){var r=n.i(p.d)(e,t);f.a.execute("splitApart",{item:r,skipNavigate:!0}).done(function(){a(n.i(L.a)({serverEntityID:t.serverEntityID}))}),i(h.D,r,t.metricsPage)},a[_._97]=function(e,t){var a=n.i(p.d)(e,t)
;f.a.execute("showSyncModal",{item:a}),i(h.E,a,t.metricsPage)},a[_._98]=function(e,t){var a=n.i(p.d)(e,t);f.a.execute("unmatch",{item:a}),i(h.F,a,t.metricsPage)},a[_._99]=function(e,t){var a=n.i(p.d)(e,t);f.a.execute("watchLater",{item:a}),i(h.G,a,t.metricsPage)},a[_._100]=function(e,t){var i=t.metadataItemEntityID,a=t.name,r=t.value,s=t.save,o=n.i(p.d)(e,{metadataItemEntityID:i});s?o.save(a,r):o.set(a,r)},a[_._101]=function(e,t,i){
var a=t.streamTypeString,r=t.streamID,s=t.allParts,o=t.metricsPage,l=n.i(p.d)(e,t),u={streamTypeString:a,streamID:r,allParts:s,allowMetrics:!!o,metricsProperties:{page:o}};n.i(b.a)(l,u).fail(function(e){i(n.i(k.h)(n.i(c.default)("There was a problem selecting this stream.")))})},a[_._102]=function(e,t){var i=n.i(p.e)(e,t);i&&i.set({metadataState:t.metadataState,mediaState:t.mediaState})},a[_._103]=function(e,t){var i=n.i(p.e)(e,t);i&&i.fetch({data:{skipRefresh:1},usePopulatedParams:!0})},
a[_._104]=function(e,t){var i=n.i(p.e)(e,t);i&&i.trigger("destroy",i,i.collection)},a));t.a=N},function(e,t,n){"use strict";function i(e,t){n.i(u.a)("metrics").trackClick({page:t,action:e,context:h.j})}var a,r=n(6),s=n.n(r),o=n(16),l=n.n(o),u=n(13),c=n(12),d=n(68),h=n(84),p=n(100),f=n(23),g=n(60),m=n(115),v=n(245),y=n(1268),b=n(716),S=n(225),I=n(266),w=n(545),M=n(32),C=n.i(g.a)((a={},a[M._105]=n.i(m.a)({getModel:p.f}),a[M._106]=n.i(v.a)({actionSuffix:"metadataList",getModel:p.f}),
a[M._107]=n.i(y.a)({getModel:p.f}),a[M._108]=n.i(b.a)({getModel:p.f}),a[M._109]=function(e,t){var a=t.metadataListEntityID,r=l()(t,["metadataListEntityID"]),o=n.i(p.f)(e,{metadataListEntityID:a});f.a.execute("playMedia",s()({item:o},r)),i(r.shuffle?d.u:d.v,r.metricsPage)},a[M._110]=function(e,t){var a=n.i(p.f)(e,t),r=t.options||{},o=new S.a(s()({model:a,title:a.get("title")},r));c.a.trigger("show:modal",o),i(d.m,t.metricsPage)},a[M._111]=function(e,t){var a=n.i(p.f)(e,t)
;f.a.execute("showSyncModal",{item:a}),i(d.E,t.metricsPage)},a[M._112]=function(e,t){var a=n.i(p.f)(e,t),r=new I.a({item:a});c.a.trigger("show:modal",r),i(d.t,t.metricsPage)},a[M._113]=function(e,t,i){var a=t.id,r=t.type,s=t.isRangeSelect,o=n.i(p.f)(e,t),l=n.i(p.d)(e,{metadataItemEntityID:a}),u=o.getCollection();l&&i(n.i(w.n)({type:r,model:l,collection:u,isRangeSelect:s}))},a[M._114]=function(e,t,i){var a=n.i(p.d)(e,{metadataItemEntityID:t.id});a&&i(n.i(w.o)([a.id]))},a[M._115]=function(e,t,i){
var a=n.i(p.f)(e,t),r=a.getCollection();i(n.i(w.p)(r))},a[M._116]=function(e,t){var i=n.i(p.f)(e,t);i.abortPendingPopulate(),i.resetPopulatePromise(null),i.restoreDefaults({listIdentifier:i.get("listIdentifier"),containerKey:i.get("containerKey"),containerTitle:i.get("containerTitle")})},a));t.a=C},function(e,t,n){"use strict";function i(e,t,i){n.i(d.a)("metrics").trackClick({page:i,action:e,context:m.m,selectionType:t.get("activeSelectionType"),
selectionCount:t.get("activeSelectionItems").length})}var a,r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(13),h=n(4),p=n(12),f=n(384),g=n(68),m=n(84),v=n(23),y=n(60),b=n(718),S=n(717),I=n(225),w=n(333),M=n(266),C=n(79),D=n(545),P=n(220),T=n(32),x=n.i(y.a)((a={},a[T._124]=function(e,t,i){var a=t.type,r=t.model,s=t.collection,o=t.isRangeSelect,l=void 0!==o&&o,u=e.get("multiSelect"),c=u.get("activeSelectionType"),d=u.get("activeSelectionRange");if(!c||c===a){if(u.listenToCollection(s),
!l||!d||d.collection!==s)return u.set("activeSelectionRange",{collection:s,startModel:r}),void i(n.i(D.q)([{id:r.id,type:a,model:r}]));var h=d.startModel,p=d.endModel,f=s.indexOf(h),g=s.indexOf(r);if(p){var m=s.indexOf(p);i(n.i(D.r)({collection:s,range:{start:f,end:m}}))}u.set("activeSelectionRange",{collection:s,startModel:h,endModel:r}),i(n.i(D.s)({type:a,collection:s,range:{start:f,end:g}}))}},a[T._125]=function(e,t){e.get("multiSelect").get("activeSelectionItems").add(t)},
a[T._126]=function(e){e.get("multiSelect").get("activeSelectionItems").reset()},a[T._127]=function(e,t){e.get("multiSelect").get("activeSelectionItems").remove(t)},a[T._128]=function(e,t,i){var a=e.get("multiSelect"),r=a.get("activeSelectionItems"),s=[];a.stopListening(t),t.each(function(e){r.get(e.id)&&s.push(e.id)}),s.length&&i(n.i(D.o)(s))},a[T._129]=function(e,t,i){var a=t.type,r=t.collection,s=t.range,o=e.get("multiSelect"),l=o.get("activeSelectionItems"),u=[];f.a.each(s,function(e){
var t=r.at(e);t&&!l.get(t.id)&&u.push({id:t.id,type:a,model:t})}),u.length&&i(n.i(D.q)(u))},a[T._130]=function(e,t,i){var a=t.collection,r=t.range,s=e.get("multiSelect"),o=s.get("activeSelectionItems"),l=[];f.a.each(r,function(e){var t=a.at(e);t&&o.get(t.id)&&l.push(t.id)}),l.length&&i(n.i(D.o)(l))},a[T._131]=function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems").pluck("model");v.a.execute("playMedia",s()({items:a},t)),i(t.shuffle?g.u:g.v,n,t.metricsPage)},
a[T._132]=function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems").pluck("model"),r=new I.a({model:l.a.first(a),items:a});p.a.trigger("show:modal",r),i(g.m,n,t.metricsPage)},a[T._133]=function(e,t,a){var r=e.get("multiSelect"),o=r.get("activeSelectionItems").pluck("model"),l=c.a.Deferred().resolve().promise();o.forEach(function(e){l=l.then(function(){return v.a.execute("updateWatchedStatus",s()({item:e},t))})}),l.fail(function(){
var e=t.watched?n.i(h.default)("There was an unexpected error marking an item watched."):n.i(h.default)("There was an unexpected error marking an item unwatched.");a(n.i(C.h)(e))}),l.always(function(){var e={};o.forEach(function(t){var i=t.server.entityID();e[i]||(e[i]=!0,a(n.i(P.a)({serverEntityID:i})))})}),i(t.watched?g.r:g.s,r,t.metricsPage)},a[T._134]=function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems").pluck("model"),r=new w.a({items:a});p.a.trigger("show:modal",r),
i(g.o,n,t.metricsPage)},a[T._135]=function(e,t,a){var r=e.get("multiSelect"),s=r.get("activeSelectionItems").pluck("model"),o=c.a.Deferred().resolve().promise();s.forEach(function(e){o=o.then(function(){return n.i(b.a)(e)})}),o.fail(function(){a(n.i(C.h)(n.i(h.default)("There was an unexpected error refreshing an item.")))}),i(g.I,r,t.metricsPage)},a[T._136]=function(e,t,a){var r=e.get("multiSelect"),s=r.get("activeSelectionItems").pluck("model"),o=c.a.Deferred().resolve().promise()
;s.forEach(function(e){o=o.then(function(){return n.i(S.a)(e)})}),o.fail(function(){a(n.i(C.h)(n.i(h.default)("There was an unexpected error analyzing an item.")))}),i(g.K,r,t.metricsPage)},a[T._137]=function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems").pluck("model");v.a.execute("showSyncModal",{item:l.a.first(a),items:a}),i(g.E,n,t.metricsPage)},a[T._138]=function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems").pluck("model"),r=new M.a({item:l.a.first(a),
items:a});p.a.trigger("show:modal",r),i(g.t,n,t.metricsPage)},a[T._139]=function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems").pluck("model"),r=a[0],s=a.slice(1);v.a.execute("merge",{item:r,items:s}),i(g.Y,n,t.metricsPage)},a[T._140]=function(e,t,a){var r=e.get("multiSelect"),s=r.get("activeSelectionItems").pluck("model"),o=c.a.Deferred().resolve().promise();s.forEach(function(e){o=o.then(function(){return e.destroy({wait:!0})})}),o.fail(function(e){
var t=403===e.status?n.i(h.default)("Ensure that media deletion is enabled for library content in your server settings."):n.i(h.default)("There was an unexpected error deleting an item.");a(n.i(C.h)(t))}),i(g.n,r,t.metricsPage)},a));t.a=x},function(e,t,n){"use strict";var i,a=n(60),r=n(32),s=n(13),o=n(386),l=n(544),u=n.i(a.a)((i={},i[r._173]=function(e){var t=n.i(o.b)(e,"photo"),i=t.get("slideshowPaused");t.set("slideshowPaused",!i),n.i(l.a)(t),
n.i(s.b)("screenSaverManager")&&n.i(s.a)("screenSaverManager").toggle(!i)},i[r._174]=function(e){var t=n.i(o.b)(e,"photo");t.set("relatedVisible",!t.get("relatedVisible"))},i[r._175]=function(e){var t=n.i(o.b)(e,"photo");if(!t.get("slideshowPaused")||!t.get("videoPaused")){var i=t.get("playbackDuration")+1;t.set({playbackDuration:i})}},i));t.a=u},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return o})
;var r=n.i(i.a)(a._173),s=n.i(i.a)(a._174),o=n.i(i.a)(a._175)},function(e,t,n){"use strict";function i(e,t){var i={audio:n.i(o.default)("Unable to load music"),photo:n.i(o.default)("Unable to load photos"),video:n.i(o.default)("Unable to load videos")};e.set({errorMessage:i[t]})}var a,r=n(2),s=n.n(r),o=n(4),l=n(12),u=n(1174),c=n(13),d=n(1172),h=n(67),p=n(385),f=n(386),g=n(60),m=n(1663),v=n(32),y={local:m,cast:m,plex:m},b=n.i(g.a)((a={},a[v._176]=function(e,t,a){
var r=t.serverEntityID,s=t.playerType,o=n.i(f.b)(e,s),l=n.i(p.a)(e,h.f,r),c=e.get("primaryPlayer"),g=c?c.get("protocol"):"local";o.set({currentPlayer:g});var m=l.get("playQueueManager"),v=m.getForType(s),b=v&&v.id,S=b?new u.a({playQueueID:b,type:s},{server:l}):new d.a({type:s},{originalPlayQueue:v,server:l});S.populate().done(function(){o.set({playQueue:S}),y[g].startPlayback(o)}).fail(function(){return i(o,s)})},a[v._177]=function(e,t){var i=n.i(f.b)(e,t)
;y[i.get("currentPlayer")].endPlayback(i)},a[v._179]=function(e,t){var i=n.i(f.b)(e,t);y[i.get("currentPlayer")].playNextItem(i)},a[v._180]=function(e,t){var i=n.i(f.b)(e,t);y[i.get("currentPlayer")].playPreviousItem(i)},a[v._181]=function(e,t){var i=t.playerType,a=t.index,r=n.i(f.b)(e,i);y[r.get("currentPlayer")].playItem(r,a)},a[v._178]=function(e,t){s.a.defer(function(){return l.a.trigger("hide:player")}),n.i(c.b)("screenSaverManager")&&n.i(c.a)("screenSaverManager").toggle(!0)},
a[v._183]=function(e,t){var i=t.playerType,a=t.playQueueItem,r=n.i(f.b)(e,i),s=a?a.get("metadataItem").get("key"):null;r.set("activeMetadataKey",s)},a));t.a=b},function(e,t,n){"use strict";function i(e,t){n.i(d.a)("metrics").trackClick({page:t,action:e,context:g.l})}
var a,r=n(6),s=n.n(r),o=n(5),l=n.n(o),u=n(37),c=n.n(u),d=n(13),h=n(4),p=n(12),f=n(68),g=n(84),m=n(100),v=n(499),y=n(309),b=n(1297),S=n(163),I=n(383),w=n(19),M=n(41),C=n(60),D=n(115),P=n(245),T=n(117),x=n(830),E=n(1878),A=n(408),k=n(267),L=n(1876),_=n(79),N=n(1735),R=n(326),O=n(88),j=n(32),z=n.i(C.a)((a={},a[j.i]=function(e,t){var i=n.i(m.a)(e,t);p.a.trigger("test:server",i)},a[j._184]=function(e,t,n){
var i=t.machineIdentifier,a=t.serverName,r=e.get("experienceSettings"),s=r.get("relayReminders"),o=s[i]||{},l=o.remindAfter;if(!l||!c.a.unix(l).isAfter(c()())){var u=new E.a({serverName:a});p.a.trigger("show:modal",u),n(O.x(i))}},a[j.j]=function(e,t){var i=e.get("experienceSettings"),a=i.get("relayReminders"),r=a[t]||{};a[t]=n.i(b.a)(r.times),i.save("relayReminders",s()({},a))},a[j.k]=n.i(D.a)({key:"providers",getModel:m.h}),a[j.l]=n.i(P.a)({key:"providers",getModel:m.h}),a[j.m]=n.i(D.a)({
key:"libraries",getModel:m.h}),a[j.n]=n.i(P.a)({key:"libraries",getModel:m.h}),a[j.o]=function(e,t){var a=n.i(m.a)(e,t),r=t.options,o=void 0===r?{}:r,l=new A.a(s()({server:a,redirect:!0},o));p.a.trigger("show:modal",l),i(f.T,t.metricsPage)},a[j.p]=function(e,t,i){var a=t.cancel,r=t.force,s=t.metricsPage,o=n.i(m.a)(e,t),l={serverModel:o,libraryID:"all",cancel:a,force:r,allowMetrics:!!s,metricsProperties:{page:s}};if(t.cancel){n.i(m.h)(e,t).get("libraries").each(function(e){
return e.set("refreshing",!1)})}n.i(x.a)(o,l).fail(function(){var e=t.cancel?n.i(h.default)("There was a problem canceling the update."):n.i(h.default)("There was a problem updating libraries.");i(n.i(_.h)(e))}).always(function(){i(O.b({serverEntityID:t.serverEntityID}))})},a[j.q]=function(e,t){var a=n.i(m.a)(e,t);p.a.trigger("show:modal",new k.a({defaultPaneType:"ownedServer",defaultPaneID:a.id})),i(f.L,t.metricsPage)},a[j.r]=function(e,t,i){var a=n.i(m.a)(e,t),r=new L.a({server:a})
;r.promise.then(function(){var t=a.get("publicAddressMatches")?y.a.SAME_NETWORK:y.a.ALWAYS;return e.get("settings").save("allowHttpFallback",t)}).done(function(){i(O.n({serverEntityID:t.serverEntityID}))}),p.a.trigger("show:modal",r)},a[j.s]=function(e,t,a){var r=n.i(m.a)(e,t),s=r.supports("optimizeDatabaseActivity"),o=w.join("/library/optimize",s?{async:1}:{}),u=r.getXHROptions(o,{type:"PUT"});a(O.v({serverEntityID:t.serverEntityID,activityType:T.a.OPTIMIZE_DATABASE})),
l.a.ajax(u).done(function(){s||a(O.w({serverEntityID:t.serverEntityID,activityType:T.a.OPTIMIZE_DATABASE}))}).fail(function(e){a(O.w({serverEntityID:t.serverEntityID,activityType:T.a.OPTIMIZE_DATABASE})),a(n.i(_.h)(n.i(h.default)("There was a problem optimizing the database.")))}),i(f.U,t.metricsPage)},a[j.t]=function(e,t,a){var r=n.i(m.a)(e,t),s=r.supports("cleanBundlesActivity"),o=w.join("/library/clean/bundles",s?{async:1}:{}),u=r.getXHROptions(o,{type:"PUT"});a(O.v({
serverEntityID:t.serverEntityID,activityType:T.a.CLEAN_BUNDLES})),l.a.ajax(u).done(function(){s||a(O.w({serverEntityID:t.serverEntityID,activityType:T.a.CLEAN_BUNDLES}))}).fail(function(e){a(O.w({serverEntityID:t.serverEntityID,activityType:T.a.CLEAN_BUNDLES})),a(n.i(_.h)(n.i(h.default)("There was a problem removing unused bundles.")))}),i(f.V,t.metricsPage)},a[j.u]=function(e,t,a){var r=n.i(m.a)(e,t),s=n.i(m.h)(e,t),o=s.get("libraries"),u=t.libraryID,c=u?[u]:o.map(function(e){return e.id
}),d=c.map(function(e){var t=r.getXHROptions("/library/sections/"+e+"/emptyTrash",{type:"PUT"});return l.a.ajax(t)});l.a.when.apply(l.a,d).done(function(){a(n.i(_.h)({type:v.b,message:n.i(h.default)("The trash was emptied.")}))}).fail(function(e){a(n.i(_.h)(n.i(h.default)("There was a problem emptying the trash.")))}),i(f.O,t.metricsPage)},a[j.v]=function(e,t,a){var r=n.i(m.a)(e,t),s=e.get("cloudServer");if(r){if(s.get("isResolved")){var o=s.getXHROptions("/api/servers/"+r.id,{type:"DELETE"})
;l.a.ajax(o)}var u=s.get("resources"),c=u.get(r.id);if(c&&c.trigger("destroy",c,c.collection),r.get("isFullOwnedServer")&&r.get("isConnected")){r.get("desktop").get("cloudAccount").destroy().done(function(){r.set({myPlexSigninState:"none",myPlexSubscription:!1})}).always(function(){a(O.n({serverEntityID:t.serverEntityID})),r.populate().fail(function(){r.trigger("destroy",r,r.collection),a(n.i(_.i)({route:"dashboard"}))})})}else r.trigger("destroy",r,r.collection),a(n.i(_.i)({route:"dashboard"}))
;i(f.W,t.metricsPage)}},a[j.w]=function(e,t,i){var a=n.i(m.h)(e,t),r=t.activity;a.get("activities").add([r],{parse:!0}),r.synthetic||i(O.w({serverEntityID:t.serverEntityID,activityType:r.type}))},a[j.x]=function(e,t){n.i(m.h)(e,t).get("activities").add([t.activity],{parse:!0,merge:!0})},a[j.y]=function(e,t){n.i(m.h)(e,t).get("activities").remove(t.activity.uuid)},a[j.z]=function(e,t,i){n.i(M.a)(function(){i(O.p({serverEntityID:t.serverEntityID,activity:{type:t.activityType,synthetic:!0,
uuid:t.activityType+"-"+Date.now()}}))})},a[j.A]=function(e,t){var i=n.i(m.h)(e,t),a=i.get("activities"),r=a.findWhere({type:t.activityType,synthetic:!0});r&&a.remove(r)},a[j.B]=function(e,t){var i=n.i(m.a)(e,t),a=n.i(m.h)(e,t),r=a.get("activities");i.set("hasEventConnection",!0),i.get("isFullOwnedServer")&&r.fetch()},a[j.C]=function(e,t){n.i(m.a)(e,t).set("hasEventConnection",!1)},a[j.D]=function(e){var t=e.get("cloudServer"),i=t.get("desktop");i.set("isPersonalCloudServerRestarting",!0)
;var a=t.populate().then(function(){return n.i(S.a)(l.a.ajax(t.getXHROptions("/api/v2/cloud_server",{method:"DELETE"})))}).then(function(){return l.a.ajax(t.getXHROptions("/api/v2/cloud_server",{method:"POST"}))});n.i(I.a)(a,1e3).fail(function(e){i.set("personalCloudServerRestartError",e)}).always(function(){i.set("isPersonalCloudServerRestarting",!1)})},a[j.E]=function(e,t){var i=n.i(m.a)(e,t),a=e.get("ui").get("liveTVSettingsPage"),r=t.device;if(!a.get("isPagePopulated")){var s=new N.a({
model:new R.b(r,{parse:!0}),serverEntityID:t.serverEntityID,machineIdentifier:i.get("machineIdentifier")});p.a.trigger("show:bar","alertbar",s)}},a));t.a=z},function(e,t,n){"use strict";function i(e){return e.get("user").get("profile")}function a(e){return e.get("ui").get("audioSubtitleSettingsPage")}var r,s=n(60),o=n(32),l=n(249),u=n.i(s.a)((r={},r[o._33]=function(e,t){var r=i(e),s=a(e);s.set({isUpdatingUserProfile:!0,updateUserProfileError:null}),r.save(t,{type:"PUT"}).done(function(){s.set({
isUpdatingUserProfile:!1,updateUserProfileError:null})}).fail(function(e){s.set({isUpdatingUserProfile:!1,updateUserProfileError:n.i(l.a)(e)})})},r[o._34]=function(e){a(e).set("updateUserProfileError",null)},r));t.a=u},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s});var r=n.i(i.a)(a._33),s=n.i(i.a)(a._34)},function(e,t,n){"use strict";function i(e){return e.get("ui").get("background")}
var a,r=n(100),s=n(60),o=n(32),l=n.i(s.a)((a={},a[o.M]=function(e,t){var a=t.serverEntityID,s=t.imageUrl,o=t.allowLightPreset,l=void 0!==o&&o,u=i(e),c=a?n.i(r.a)(e,t):void 0;u.set({server:c,imageUrl:s,allowLightPreset:l,isBackgroundPending:!1})},a[o.N]=function(e,t){var a=t.serverEntityID,s=t.theme,o=i(e),l=a?n.i(r.a)(e,t):void 0,u=l&&s?l.resolveUrl(s,{appendHeaders:!0}):void 0;o.set("themeMusicUrl",u)},a[o.O]=function(e){i(e).restoreDefaults({isBackgroundPending:!0})},a));t.a=l
},function(e,t,n){"use strict";function i(e){return e.get("ui").get("dashboardPage")}var a,r=n(100),s=n(178),o=n(115),l=n(245),u=n(60),c=n(130),d=n(32),h=n.i(u.a)((a={},a[d._159]=function(e,t){var a=i(e),o=n.i(r.a)(e,t),l=t.serverEntityID,u=t.hubKey;if(l!==a.get("serverEntityID")||u!==a.get("hubKey")){var c=new s.default([],{server:o,hubKey:u,count:12,includeEmpty:!0,excludes:["playlists"]});c.reset(),c.abortPendingPopulate(),c.resetPopulatePromise(null),a.restoreDefaults({serverEntityID:l,
hubKey:u,hubs:c})}},a[d._160]=n.i(o.a)({key:"hubs",getModel:i}),a[d._161]=n.i(l.a)({key:"hubs",getModel:i}),a[d._24]=function(e,t,a){if(!t.metadataItemEntityID&&!t.containerKeyPattern){var s=n.i(r.a)(e,t),o=i(e),l=o.get("hubs");l&&l.server===s&&l.each(function(e){var t=e.get("metadataList");!e.get("random")&&t.get("containerKey")&&a(n.i(c.l)({metadataListEntityID:t.entityID(),count:l.count}))})}},a));t.a=h},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),
n.d(t,"b",function(){return s});var r=n.i(i.a)(a._159),s=n.i(i.a)(a._160);n.i(i.a)(a._161)},function(e,t,n){"use strict";function i(e){return e.get("ui").get("liveTVSettingsPage").get("dvrSetup")}function a(e){return e.get("ui").get("liveTVSettingsPage").get("dvrs")}function r(e,t){return a(e).get(t.dvrID)}function s(e,t){var n=i(e),a=t.deviceID;if(t.dvrID&&a){var s=r(e,t).get("devices").get(a);if(s)return s}if(a){var o=n.get("devices").get(a);if(o)return o}return n.get("selectedDevice")}
function o(e,t){if(t.country)return t.country;var n=i(e),a=n.get("epgSettings").get("selectedCountry");return a?a.get("code"):void 0}function l(e,t){if(t.dvrID&&t.deviceID){return s(e,t).get("channelMappings")}return i(e).get("channelMappings")}function u(e,t){var a=i(e),r=n.i(C.a)(e,t),o=s(e,t),u=o.get("channels"),c=t.data,d=[],h={};g()(c).forEach(function(e){var t=c[e],n=t.enabled,i=t.lineupIdentifier,a=u.get(e),r=!(!a||!a.get("drm"));n&&i&&!r&&d.push(e),i&&(h["channelMapping["+e+"]"]=i)})
;var f=I.join(["/media/grabbers/devices",t.deviceID,"channelmap"],p()({channelsEnabled:d.toString()},h));a.set("isChannelMappingsSaving",!0);var m=r.getXHROptions(f,{type:"PUT"}),y=v.a.ajax(m);return y.done(function(){a.set({isChannelMappingsSaving:!1,channelMappingsSaveError:null});var n=l(e,t);u.forEach(function(e){var t=e.id,i=d.indexOf(t)!==-1,a=h["channelMapping["+t+"]"];a?n.add([{deviceIdentifier:t,enabled:i,lineupIdentifier:a}],{parse:!0,merge:!0}):n.remove(t)})}),y.fail(function(e){
a.set({isChannelMappingsSaving:!1,channelMappingsSaveError:e})}),y}function c(e,t){var a=n.i(C.a)(e,t),r=t.enabled,o=I.join(["/media/grabbers/devices",t.deviceID],{enabled:r?1:0}),l=a.getXHROptions(o,{type:"PUT"}),u=v.a.ajax(l).promise();return u.done(function(){if(i(e)){var n=s(e,t);n&&n.set("status",r?"enabled":"disabled")}}),u}
var d,h=n(6),p=n.n(h),f=n(70),g=n.n(f),m=n(5),v=n.n(m),y=n(4),b=n(211),S=n(61),I=n(19),w=n(60),M=n(115),C=n(100),D=n(206),P=n(117),T=n(396),x=n(821),E=n(88),A=n(89),k=n(32),L=n.i(w.a)((d={},d[k._35]=function(e){i(e).restoreDefaults()},d[k._36]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),a={};switch(n.get("step")){case T.a.DEVICE:a.step=T.a.DEVICE_CHANNELS;break;case T.a.DEVICE_CHANNELS:t.dvrID?(a.selectedLineupUUID=r(e,t).get("lineup"),
a.step=T.a.CHANNEL_MAPPING):a.step=T.a.EPG;break;case T.a.EPG:n.get("selectedLineupUUID")?a.step=T.a.CHANNEL_MAPPING:a.step=T.a.EPG_MAPPING;break;case T.a.EPG_MAPPING:a.step=T.a.CHANNEL_MAPPING;break;case T.a.CHANNEL_MAPPING:a.step=T.a.EPG_DOWNLOAD}n.get("setupErrorMessages").reset(),n.set(a)},d[k._37]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),a={};switch(n.get("step")){case T.a.DEVICE_CHANNELS:a.hasScannedChannels=!1,a.step=T.a.DEVICE;break;case T.a.EPG:
a.step=T.a.DEVICE_CHANNELS;break;case T.a.CHANNEL_MAPPING:t.dvrID?a.step=T.a.DEVICE_CHANNELS:a.step=T.a.EPG}n.get("setupErrorMessages").reset(),n.set(a)},d[k._38]=function(e,t,a){var r=i(e),s=r.get("devices");r.set("isDevicesPending",!0),s.fetch().done(function(){r.set({isDevicesPending:!1,isDevicesPopulated:!0,devicesError:null});var e=s.filter(function(e){return!e.get("parentID")});1!==e.length||e[0].get("parentID")||a(n.i(A.t)({serverEntityID:t.serverEntityID,deviceID:e[0].id}))
}).fail(function(e,t){r.set({isDevicesPending:!1,devicesError:t})})},d[k._39]=function(e,t,a){var r=n.i(C.a)(e,t),s=i(e),o=r.getXHROptions("/media/grabbers/devices/discover",{type:"POST"});s.get("isDiscoveringDevices")||(s.set("isDiscoveringDevices",!0),v.a.ajax(o).done(function(e){var i=s.get("devices"),r=i.add(e,{parse:!0,merge:!0}),o=r.filter(function(e){return!e.get("parentID")});s.get("setupErrorMessages").remove("discoverDevices"),1!==o.length||r[0].get("parentID")||a(n.i(A.t)({
serverEntityID:t.serverEntityID,deviceID:o[0].id})),s.set("isDiscoveringDevices",!1)}).fail(function(e){s.get("setupErrorMessages").add({id:"discoverDevices",message:n.i(b.a)(e,n.i(y.default)("There was a problem discovering devices"))}),s.set("isDiscoveringDevices",!1)}))},d[k._40]=function(e,t,a){var r=n.i(C.a)(e,t),s=i(e),o=I.join(["/media/grabbers","tv.plex.grabbers.hdhomerun","devices"],{uri:t.uri}),l=r.getXHROptions(o,{type:"POST"});s.set("addDevicePending",!0),
v.a.ajax(l).done(function(e,i){var a=s.get("devices"),r=a.add(e,{parse:!0});if(0===r.length){var o=S.a.parseXML(e),l=o&&o.message||n.i(y.default)("No device found at {1}",t.uri);s.get("setupErrorMessages").add({id:"addDevice",message:l}),s.set("addDevicePending",!1)}else s.get("setupErrorMessages").remove("addDevice"),s.set({addDevicePending:!1,selectedDevice:1===r.length?r[0]:s.get("selectedDevice")})}).fail(function(e){s.get("setupErrorMessages").add({id:"addDevice",
message:n.i(b.a)(e,n.i(y.default)("There was a problem adding the device: {1}",t.uri))}),s.set("addDevicePending",!1)})},d[k._41]=function(e,t){var n=i(e),a=s(e,t);n.set("selectedDevice",a)},d[k._42]=function(e,t){i(e).get("selectedDevice").set("selectedSource",t.source)},d[k._43]=function(e,t){var a=i(e);s(e,t).fetch().fail(function(e){a.get("setupErrorMessages").add({id:"fetchDeviceDetails",message:n.i(b.a)(e,n.i(y.default)("There was a problem getting the details for your device"))})})},
d[k._44]=function(e,t){var a=i(e),r=s(e,t),o=I.join(["/media/grabbers/devices",r.get("key"),"channels"]);r.set("isChannelsPending",!0),r.get("channels").fetch({url:o}).done(function(){r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null})}).fail(function(e){r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null}),a.get("setupErrorMessages").add({id:"fetchDeviceDetails",message:n.i(b.a)(e,n.i(y.default)("There was a problem getting the channels for your device"))})
})},d[k._45]=function(e,t,a){var r=i(e),l=n.i(C.a)(e,t),u=s(e,t),c=o(e,t),d=u.get("selectedSource")||u.get("source"),h=t.prefs,p=t.network,f=I.join(["/media/grabbers/devices",u.get("key"),"scan"],{source:d,country:c,prefs:h,network:p}),g=l.getXHROptions(f,{type:"POST"});v.a.ajax(g).done(function(e,i,s){var o=s.getResponseHeader("X-Plex-Activity");if(u.get("channels").reset(),o)a(n.i(A.p)(t));else{var l=new D.a(e,{parse:!0});r.set("scanPrefs",l)}}).fail(function(e){
r.get("setupErrorMessages").add({id:"scanDeviceChannels",message:n.i(b.a)(e,n.i(y.default)("There was a problem scanning channels"))})})},d[k._46]=function(e,t,a){var r=i(e),s=n.i(C.a)(e,t),o=t.deviceID;if(!o)throw new Error("A device ID is required to cancel a channel scan.");var l=I.join(["/media/grabbers/devices",o,"scan"]),u=s.getXHROptions(l,{type:"DELETE"});v.a.ajax(u).fail(function(e){r.get("setupErrorMessages").add({id:"cancelScanDeviceChannels",
message:n.i(b.a)(e,n.i(y.default)("There was a problem canceling the current channel scan"))})})},d[k._47]=function(e,t,a){var r=n.i(C.a)(e,t),s=i(e),o=s.get("selectedDevice"),l=s.get("epgSettings").get("lineupGroup"),u=I.join("/livetv/epg/lineup",{device:o.get("uuid"),lineupGroup:l.get("uuid")}),c=r.getXHROptions(u);v.a.ajax(c).done(function(e,t,n){var i=n.getResponseHeader("X-Plex-Activity");s.set("epgLineupActivityID",i)}).fail(function(e){s.get("setupErrorMessages").add({
id:"findBestEPGLineup",message:n.i(b.a)(e,n.i(y.default)("There was a problem mapping channels"))})})},d[k._48]=function(e,t){i(e).set("selectedLineupUUID",t.lineupUUID)},d[k._61]=n.i(M.a)({key:"lineupChannels",getModel:i}),d[k._62]=function(e,t){var n=i(e,t),a=n.get("channelMappings");n.set("isChannelMappingsPending",!0),a.fetch(t.options).done(function(){t.forceEnabled&&a.each(function(e){e.set("enabled",e.has("lineupIdentifier"))}),n.set({isChannelMappingsPending:!1,
isChannelMappingsPopulated:!0,channelMappingsError:null})}).fail(function(e,t){n.set({isChannelMappingsPending:!1,channelMappingsError:t})})},d[k._49]=function(e,t){i(e,t).set({channelMappingsError:null,lineupChannelsError:null})},d[k._50]=function(e,t,i){u(e,t).done(function(){i(n.i(A.k)(t))})},d[k._51]=function(e){i(e).set("channelMappingsSaveError",null)},d[k._52]=function(e,t,r){var s=i(e);s.set("isSavingDVR",!0);var l=t.serverEntityID,d=t.deviceID,h=a(e,t);c(e,{serverEntityID:l,deviceID:d,
enabled:!0}).then(function(){return u(e,t)}).then(function(){var i=n.i(C.a)(e,t),a=s.get("selectedDevice"),r=s.get("selectedLineupUUID"),l=s.get("epgSettings").get("selectedLanguage"),u=o(e,t);s.get("setupErrorMessages").remove("saveDVR");var c=I.join("/livetv/dvrs",{device:a.get("uuid"),lineup:r,language:l.get("code"),country:u}),d=i.getXHROptions(c,{type:"POST"});return v.a.ajax(d)}).done(function(e,t,i){var a=i.getResponseHeader("X-Plex-Activity"),o=h.add(e,{parse:!0})[0]
;s.get("setupErrorMessages").remove("saveDVR"),s.set({epgDownloadActivityID:a,selectedDVR:o,isSavingDVR:!1}),r(n.i(A.j)({serverEntityID:l})),r(n.i(E.d)({serverEntityID:l}))}).fail(function(e){s.get("setupErrorMessages").add({id:"saveDVR",message:n.i(b.a)(e,n.i(y.default)("There was a problem saving your DVR. Please try again."))}),s.set("isSavingDVR",!1)})},d[k._53]=function(e,t,a){var s=i(e);s.set("isSavingDVR",!0);var o=t.serverEntityID,l=t.deviceID,d=s.get("selectedDevice"),h=r(e,t);c(e,{
serverEntityID:o,deviceID:l,enabled:!0}).then(function(){return u(e,t)}).then(function(){var i=n.i(C.a)(e,t),a=I.join(["/livetv/dvrs",h.id,"devices",d.id]),r=i.getXHROptions(a,{type:"PUT"});return v.a.ajax(r)}).done(function(e,t,i){var r=i.getResponseHeader("X-Plex-Activity");h.get("devices").add([d]),s.set({epgDownloadActivityID:r,selectedDVR:h,isSavingDVR:!1}),a(n.i(A.j)({serverEntityID:o})),a(n.i(E.d)({serverEntityID:o}))}).fail(function(e){s.get("setupErrorMessages").add({id:"addDVRDevice",
message:n.i(b.a)(e,n.i(y.default)("There was a problem adding a new device to your DVR. Please try again."))}),s.set("isSavingDVR",!1)})},d[k._54]=function(e,t,i){var a=n.i(C.a)(e,t),s=r(e,t),o=t.deviceID,l=I.join(["/livetv/dvrs",s.id,"devices",o]),u=a.getXHROptions(l,{type:"DELETE"});v.a.ajax(u).done(function(e,t,n){s.get("devices").remove(o)})},d[k._55]=function(e,t){var i=n.i(C.a)(e,t),a=r(e,t),s=t.prefs,o=I.join(["/livetv/dvrs",t.dvrID,"prefs"],s);a.set("isSaving",!0)
;var l=i.getXHROptions(o,{type:"PUT"}),u=v.a.ajax(l);u.done(function(){var e=a.get("prefs");g()(s).forEach(function(t){e.get(t).set("value",s[t])}),a.set({isSaving:!1,saveError:null})}),u.fail(function(e){a.set({isSaving:!1,saveError:e})})},d[k._56]=function(e,t){r(e,t).set("saveError",null)},d[k._57]=function(e,t){var i=n.i(C.a)(e,t),a=s(e,t),r=t.prefs,o=I.join(["/media/grabbers/devices",t.deviceID,"prefs"],r);a.set("isSaving",!0);var l=i.getXHROptions(o,{type:"PUT"}),u=v.a.ajax(l)
;u.done(function(){var e=a.get("prefs");g()(r).forEach(function(t){e.get(t).set("value",r[t])}),a.set({isSaving:!1,saveError:null})}),u.fail(function(e){a.set({isSaving:!1,saveError:e})})},d[k._58]=function(e,t){s(e,t).set("saveError",null)},d[k._59]=function(e){i(e).set({scanPrefs:void 0,scanNetworks:void 0})},d[k._60]=function(e,t){c(e,t)},d[k.y]=function(e,t,a){var r=i(e);if(r){var s=r.get("selectedDevice"),o=t.activity
;if(!s||o.type!==P.a.PROVIDER_DEVICE_CHANNELSCAN||parseInt(o.Context.deviceID,10)!==s.id)return o.uuid===r.get("epgLineupActivityID")?(r.set({selectedLineupUUID:o.Response.lineup,epgLineupActivityID:""}),void a(n.i(A.j)({serverEntityID:t.serverEntityID}))):o.uuid===r.get("epgDownloadActivityID")?void r.set("epgDownloadActivityID",""):void 0;var l=o.Response.Network;if(l){var u=new x.a(l,{parse:!0});r.set("scanNetworks",u)}else r.set("hasScannedChannels",!0)}},d));t.a=L},function(e,t,n){
"use strict";function i(e){return e.get("ui").get("libraryPage")}var a,r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(100),c=n(81),d=n(366),h=n(479),p=n(365),f=n(815),g=n(60),m=n(115),v=n(245),y=n(219),b=n(130),S=n(32),I=n.i(g.a)((a={},a[S._141]=function(e,t){var a=i(e),r=a.get("details"),s=n.i(u.a)(e,t),o=t.serverEntityID,l=t.libraryKey;if(o!==a.get("serverEntityID")||l!==a.get("libraryKey")){var c={serverEntityID:o,libraryKey:l};r&&r.get("libraryKey")===l?(c.details=r,
c.isDetailsPending=a.get("isDetailsPending"),c.isDetailsPopulated=a.get("isDetailsPopulated"),c.detailsError=a.get("detailsError")):c.details=new d.a({key:l},{server:s,includeAdvanced:!0}),a.restoreDefaults(c)}},a[S._142]=function(e,t){var a=i(e),r=a.get("queryParse"),s=n.i(u.a)(e,t),o=t.containerKey,l=t.typeKey,d=t.firstCharacterKey,p=t.queryParseKey;if(o!==a.get("containerKey")||l!==a.get("typeKey")){var g=new c.default({containerKey:o},{server:s}),m=new h.a([],{server:s,url:d}),v={
containerKey:o,typeKey:l,firstCharacters:m,metadataList:g,isFirstCharactersPending:!0,isFirstCharactersPopulated:!1,firstCharactersError:null};r&&r.get("key")===p||(v.queryParse=new f.a({key:p},{server:s}),v.isQueryParsePending=!0,v.isQueryParsePopulated=!1,v.queryParseError=null),a.set(v)}},a[S._143]=n.i(m.a)({key:"details",getModel:i}),a[S._144]=n.i(v.a)({key:"details",actionSuffix:"libraryDetails",getModel:i}),a[S._145]=n.i(m.a)({key:"firstCharacters",getModel:i}),a[S._146]=n.i(v.a)({
key:"firstCharacters",actionSuffix:"libraryFirstCharacters",getModel:i}),a[S._147]=n.i(m.a)({key:"queryParse",getModel:i}),a[S._148]=n.i(v.a)({key:"queryParse",getModel:i}),a[S._24]=function(e,t,a){var r=t.metadataItemEntityID,s=t.containerKeyPattern;if(!r){var o=n.i(u.a)(e,t),l=i(e),c=l.get("metadataList");c&&c.server===o&&(s&&!c.get("containerKey").match(s)||(a(n.i(b.l)({metadataListEntityID:c.entityID()})),a(n.i(y.fetchLibraryFirstCharacters)())))}},a[S._149]=function(e,t){
var a=i(e),r=a.get("selectedFilterOptions"),s=n.i(u.a)(e,t),o=t.key,l={selectedFilterKey:o};r&&r.url===o||(l.selectedFilterOptions=new p.a([],{server:s,url:o}),l.isSelectedFilterOptionsPending=!0,l.isSelectedFilterOptionsPopulated=!1,l.selectedFilterOptionsError=null),a.set(l)},a[S._150]=function(e){i(e).set({selectedFilterKey:void 0,selectedFilterOptions:void 0,filterOptionQuery:""})},a[S._151]=n.i(m.a)({key:"selectedFilterOptions",getModel:i}),a[S._152]=n.i(v.a)({key:"selectedFilterOptions",
actionSuffix:"libraryFilterOptions",getModel:i}),a[S._153]=function(e,t){i(e).set("filterOptionQuery",t)},a[S._154]=function(e,t){var n,i=t.type,a=t.activeTableColumns,r=t.key;if(l.a.findIndex(a,function(e){return e.key===r})===-1){var o=e.get("experienceSettings"),u=o.get("libraryTableColumns"),c=a.map(function(e){return e.key}).concat(r);o.save("libraryTableColumns",s()({},u,(n={},n[i]=c,n)))}},a[S._155]=function(e,t){var n,i=t.type,a=t.activeTableColumns,r=t.key;if(!(a.length<=1)){
var o=l.a.findIndex(a,function(e){return e.key===r});if(o!==-1){var u=e.get("experienceSettings"),c=u.get("libraryTableColumns"),d=a.slice(0,o).concat(a.slice(o+1)).map(function(e){return e.key});u.save("libraryTableColumns",s()({},c,(n={},n[i]=d,n)))}}},a));t.a=I},function(e,t,n){"use strict";function i(e){return e.get("ui").get("liveTVSettingsPage")}var a,r=n(5),s=n.n(r),o=n(4),l=n(19),u=n(822),c=n(396),d=n(60),h=n(115),p=n(100),f=n(79),g=n(32),m=n.i(d.a)((a={},a[g._73]=n.i(h.a)({key:"dvrs",
getModel:i}),a[g._71]=function(e,t){var a=i(e),r=a.get("dvrSetup"),s=a.get("dvr"),o=n.i(p.a)(e,t),l={isPagePopulated:!0};s&&s.server===o||(l.dvrs=new u.a([],{server:o})),r&&r.server===o?r.restoreDefaults():l.dvrSetup=new c.b({},{server:o}),a.set(l)},a[g._72]=function(e){i(e).set("isPagePopulated",!1)},a[g._74]=function(e,t,a){var r=i(e),s=r.get("dvrs"),l=s.get(t.dvrID);l&&l.destroy().fail(function(){return a(n.i(f.h)(n.i(o.default)("There was a problem removing your DVR")))})},
a[g._75]=function(e,t,i){var a=n.i(p.a)(e,t),r=l.join(["/livetv/dvrs",t.dvrID,"reloadGuide"]),o=a.getXHROptions(r,{type:"POST"});s.a.ajax(o)},a));t.a=m},function(e,t,n){"use strict";function i(e){return e.get("ui").get("mediaSubscriptionModal")}var a,r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(19),c=n(34),d=n(528),h=n(719),p=n(60),f=n(115),g=n(709),m=n(367),v=n(832),y=n(32),b=n.i(p.a)((a={},a[y.a]=function(e,t,a){var r=i(e);r.set("isMediaSubscriptionPending",!0);var s={};if(t.showConflicts&&(s.options={
data:{includeGrabs:1}}),t.mediaSubscriptionEntityID)return r.set({mediaSubscription:n.i(d.c)(e,t)}),void a(v.fetchMediaSubscription(s));var o=n.i(d.a)(e,t),c=n.i(d.d)(e,t),h=c.get("grandparentSubscriptionID")||c.get("subscriptionID");if(h)return r.set({mediaSubscription:new m.a({key:h},{server:o})}),void a(v.fetchMediaSubscription(s));var p=u.join("/media/subscriptions/template",{guid:c.get("guid")}),f=o.getXHROptions(p);l.a.ajax(f).done(function(e){var t=new g.a(e,{parse:!0,server:o
}),n=t.findWhere({selected:!0});r.set({isMediaSubscriptionPending:!1,isMediaSubscriptionPopulated:!0,mediaSubscriptionError:null,templates:t,mediaSubscription:n})}).fail(function(e){r.set({isMediaSubscriptionPending:!1,mediaSubscriptionError:e})})},a[y.b]=function(e){i(e).restoreDefaults()},a[y.c]=n.i(f.a)({key:"mediaSubscription",getModel:i}),a[y.d]=function(e,t){
var a=i(e),r=n.i(d.a)(e,t),o=a.get("mediaSubscription"),h=t.targetLibrarySectionID,p=t.targetSectionLocationID,f=void 0===p?null:p,g=t.prefs;a.set({isMediaSubscriptionSaving:!0,mediaSubscriptionSaveError:null});var m=o.get("key"),v=o.getSaveParams(),y=l.a.extend(!0,{},v,{includeGrabs:1,targetLibrarySectionID:h,targetSectionLocationID:f,prefs:g}),b=u.join(s.a.result(o,"url"),y);if(!m){var S=n.i(c.b)(o.get("target").get("type"));b=b+"&"+o.get("parameters")+"&type="+S.id}var I=r.getXHROptions(b,{
type:m?"PUT":"POST"});l.a.ajax(I).done(function(i){if(o.set(o.parse(i)),a.set({templates:void 0,isMediaSubscriptionSaving:!1}),t.metadataItemEntityID){var r=n.i(d.d)(e,t);if(r){var s,l=o.get("target").get("type"),u=n.i(c.n)(l),h=u?"grandparentSubscriptionID":"subscriptionID",p=u?"grandparentSubscriptionType":"subscriptionType";r.set((s={},s[h]=o.id,s[p]=l,s))}}}).fail(function(e){a.set({isMediaSubscriptionSaving:!1,mediaSubscriptionSaveError:e})})},a[y.e]=function(e,t){
var n=i(e),a=n.get("templates"),r=t.modeIndex;n.set("mediaSubscription",a.at(r))},a[y.f]=function(e,t){i(e).set({mediaSubscriptionSaveError:null,mediaSubscriptionError:null,mediaSubscriptionMoveError:null,mediaSubscriptionDeleteError:null})},a[y.g]=function(e,t){var a=i(e),r=a.get("mediaSubscription");a.set({isMediaSubscriptionMoving:!0,mediaSubscriptionMoveError:null}),n.i(h.a)(r).done(function(){a.set({isMediaSubscriptionMoving:!1})}).fail(function(e){a.set({isMediaSubscriptionMoving:!1,
mediaSubscriptionMoveError:e})})},a[y.h]=function(e,t,a){var r=i(e),s=r.get("mediaSubscription");r.set({isMediaSubscriptionDeleting:!0,mediaSubscriptionDeleteError:null}),s.destroy({wait:!0}).done(function(){if(r.set({isMediaSubscriptionDeleting:!1}),t.metadataItemEntityID){var i=n.i(d.d)(e,t),a=s.get("key");i.get("subscriptionID")===a?(i.unset("subscriptionID"),i.unset("subscriptionType")):i.get("grandparentSubscriptionID")===a&&(i.unset("grandparentSubscriptionID"),
i.unset("grandparentSubscriptionType"))}}).fail(function(e){r.set({isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:e})})},a));t.a=b},function(e,t,n){"use strict";function i(e){return e.get("ui").get("metadataListPage")}var a,r=n(100),s=n(81),o=n(60),l=n(130),u=n(32),c=n.i(o.a)((a={},a[u._182]=function(e,t){var a=i(e),o=n.i(r.a)(e,t),l=t.serverEntityID,u=t.listKey,c=t.listTitle;if(l!==a.get("serverEntityID")||u!==a.get("listKey")){var d=new s.default({containerKey:u,containerTitle:c
},{server:o});a.restoreDefaults({serverEntityID:l,listKey:u,metadataList:d})}},a[u._24]=function(e,t,a){var s=t.metadataItemEntityID,o=t.containerKeyPattern;if(!s){var u=n.i(r.a)(e,t),c=i(e),d=c.get("metadataList");d&&d.server===u&&(o&&!d.get("containerKey").match(o)||a(n.i(l.l)({metadataListEntityID:d.entityID()})))}},a));t.a=c},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r});var r=n.i(i.a)(a._182)},function(e,t,n){"use strict";function i(e){
return e.get("ui").get("prePlayPage")}function a(e,t){var a=t.metadataItemEntityID;if(t.containerKeyPattern)return!1;var r=n.i(f.a)(e,t),s=i(e),o=s.get("metadataItem");return!(!o||o.server!==r)&&(!a||o.entityID()===a)}function r(e,t,a){var r=i(e),s=r.get("siblingList"),o=r.get("descendantList"),l=r.get("relatedHubs");s&&a(n.i(w.l)({metadataListEntityID:s.entityID()})),o&&a(n.i(w.l)({metadataListEntityID:o.entityID()})),l&&a(n.i(M.c)())}function s(e,t){
var a=n.i(f.a)(e,t),r=i(e),s=r.get("metadataItem");if(s&&s.server===a){var o=t.activity.Context;o&&o.key===s.get("key")&&(null==o.exists&&null==o.accessible||r.set("isFileUnavailable",!o.exists||!o.accessible))}}var o,l=n(6),u=n.n(l),c=n(13),d=n(19),h=n(251),p=n(106),f=n(100),g=n(59),m=n(81),v=n(178),y=n(117),b=n(60),S=n(115),I=n(1664),w=n(130),M=n(260),C=n(32),D=n.i(b.a)((o={},o[C._117]=function(e,t){var a=i(e),r=n.i(f.a)(e,t),s=t.serverEntityID,o=t.metadataKey
;if(s!==a.get("serverEntityID")||o!==a.get("metadataKey")){var l=new g.a({key:o},{server:r}),u=d.join([o.replace(/(\/library)?\/metadata/,"/hubs/metadata"),"related"]),c=new v.default([],{server:r,metadataItem:l,hubKey:u,count:12});c.reset(),c.abortPendingPopulate(),c.resetPopulatePromise(null),a.restoreDefaults({serverEntityID:s,metadataKey:o,metadataItem:l,siblingKey:a.get("siblingKey"),siblingList:a.get("siblingList"),relatedHubs:c})}},o[C._118]=function(e,t){
var a=i(e),r=n.i(f.a)(e,t),s=t.serverEntityID,o=t.descendantKey;if(!o)return void a.set({descendantKey:o,descendantList:void 0});if(s!==a.get("serverEntityID")||o!==a.get("descendantKey")){var l=new m.default({containerKey:o},{server:r});a.set({descendantKey:o,descendantList:l})}},o[C._119]=function(e,t){var a=i(e),r=n.i(f.a)(e,t),s=t.serverEntityID,o=t.siblingKey;if(!o)return void a.set({siblingKey:o,siblingList:void 0});if(s!==a.get("serverEntityID")||o!==a.get("siblingKey")){
var l=new m.default({containerKey:o},{server:r});a.set({siblingKey:o,siblingList:l})}},o[C._120]=function(e,t){var i=n.i(f.d)(e,t);i.get("isPreFetched")||n.i(I.a)(i)},o[C._121]=function(e){var t=i(e),a=t.get("metadataItem"),r=t.get("isMetadataItemPending");t.set("isMetadataItemPending",!0),n.i(I.a)(a).done(function(){t.set({isMetadataItemPending:!1,isMetadataItemPopulated:!0,metadataItemError:null})}).fail(function(e,n){if(n.aborting)return void t.set("isMetadataItemPending",r);t.set({
isMetadataItemPending:!1,metadataItemError:n})})},o[C._122]=n.i(S.a)({key:"relatedHubs",getModel:i}),o[C._123]=function(e){var t=i(e),a=t.get("metadataItem"),r=e.get("settings"),s=n.i(c.a)("getDecisionOptions")(),o=h.a.getMediaDecision(u()({type:"video",item:a,transcodeServer:a.server,quality:p.a.getCurrentQuality(a,r)},s));t.set("mediaDecision",o)},o[C.x]=function(e,t){t.activity.type===y.a.LIBRARY_REFRESH_ITEMS&&s(e,t)},o[C.y]=function(e,t){t.activity.type===y.a.LIBRARY_REFRESH_ITEMS&&s(e,t)},
o[C._103]=function(e,t,n){a(e,t)&&r(e,t,n)},o[C._24]=function(e,t,n){if(a(e,t)){var s=i(e),o=s.get("metadataItem");o&&o.fetch({data:{skipRefresh:1},usePopulatedParams:!0}),r(e,t,n)}},o));t.a=D},function(e,t,n){"use strict";var i,a=n(5),r=n.n(a),s=n(786),o=n(383),l=n(60),u=n(115),c=n(703),d=n(79),h=n(88),p=n(167),f=n(32),g={isFullOwnedServer:!0,isPersonalCloudServer:!0},m=n.i(l.a)((i={},i[f._10]=function(e,t,n){
e.get("ui").get("provisionPersonalCloudServerPage").set("isPersonalCloudServerModalOpen",!!t.open)},i[f._11]=function(e,t,i){function a(){return u.populate().then(function(){return r.a.ajax(u.getXHROptions(c,{type:"POST"}))})}var l=e.get("ui").get("provisionPersonalCloudServerPage");l.set("isProvisionPersonalCloudServerPending",!0);var u=e.get("cloudServer"),c=t.url,d=n.i(s.a)(a,{times:10,delay:2e3,maxDuration:3e4});n.i(o.a)(d,2e3).done(function(){
l.set("isProvisionPersonalCloudServerPopulated",!0)}).fail(function(e){l.set("provisionPersonalCloudServerError",e)}).always(function(){l.set("isProvisionPersonalCloudServerPending",!1)})},i[f._12]=function(e,t,i){function a(){var t=e.get("servers").findWhere(g);return t?t.get("isResolved")||i(n.i(h.n)({serverEntityID:t.entityID()})):i(n.i(d.g)()),e.get("servers").populateServer(g)}var r=e.get("ui").get("provisionPersonalCloudServerPage");r.set("isConnectToPersonalCloudServerPending",!0)
;var l=n.i(s.a)(a,{times:10,delay:2e3,maxDuration:3e4});n.i(o.a)(l,2e3).done(function(){r.set("isConnectToPersonalCloudServerPopulated",!0)}).fail(function(){r.set("connectToPersonalCloudServerError",{})}).always(function(){r.set("isConnectToPersonalCloudServerPending",!1)})},i[f._13]=function(e){var t=e.get("ui").get("provisionPersonalCloudServerPage");t.set("isPersonalCloudServerDriveCachePending",!0);var i=e.get("servers").findWhere(g),a=new c.a({},{server:i}),r=n.i(s.a)(function(){
return a.fetchAndNotUpdating()},{times:30,delay:2e3,maxDuration:6e4});n.i(o.a)(r,2e3).done(function(){t.set("isPersonalCloudServerDriveCachePopulated",!0)}).fail(function(e){t.set("personalCloudServerDriveCacheError",e)}).always(function(){t.set("isPersonalCloudServerDriveCachePending",!1)})},i[f._14]=n.i(u.a)({key:"personalCloudServerProviders",getModel:function(e){return e.get("cloudServer").get("desktop")}}),i[f._16]=n.i(u.a)({key:"personalCloudServerStatus",getModel:function(e){
return e.get("cloudServer").get("desktop")}}),i[f._15]=function(e,t,i){var a=e.get("cloudServer"),s=a.get("desktop").get("personalCloudServerProviders").findWhere(t);s.set("isUnlinking",!0);var l=a.populate().then(function(){return r.a.ajax(a.getXHROptions(t.url,{type:"DELETE"}))});n.i(o.a)(l,1e3).done(function(){s.set("unlinkError",null)}).fail(function(e){s.set("unlinkError",e)}).always(function(){i(n.i(d.g)()),i(n.i(p.e)({options:{data:{type:"plex_cloud"}}})),s.set("isUnlinking",!1)})},
i[f._17]=function(e,t){e.get("experienceSettings").save("isNotInterestedInPersonalCloud",!t.interested)},i));t.a=m},function(e,t,n){"use strict";function i(e){return e.get("ui").get("quickSearch")}function a(e){return e.reduce(function(e,t){var n=t.get("hubs").pluck("results");return e.concat(n.reduce(function(e,t){return e.concat(t.map(function(e){return e.entityID()}))},[]))},[])}
var r,s=n(12),o=n(19),l=n(100),u=n(390),c=n(139),d=n(542),h=n(60),p=n(94),f=n(967),g=n(131),m=n(107),v=n(32),y=n.i(h.a)((r={},r[v._25]=function(e,t,a){var r=n.i(l.a)(e,t),s=i(e),o=s.get("searches"),u=t.providerEntityIDs,h=t.providerIdentifier;o.reset(u.reduce(function(t,i){var a=n.i(l.b)(e,{providerEntityID:i}),s=a.get("identifier"),o=a.get("isLibraryProvider"),u=a.get("features").get(c.a.SEARCH);if(u&&(o||s===h)){t[h===s?"unshift":"push"](new d.a({providerEntityID:i,key:u.get("key")},{server:r,
provider:a}))}return t},[])),s.get("query")&&a(g.fetchQuickSearch())},r[v._26]=function(e){var t=i(e),n=t.get("searches");t.set({query:"",selectedResultEntityID:null}),n.each(function(e){e.restoreDefaults({providerEntityID:e.get("providerEntityID"),key:e.get("key")})})},r[v._27]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e),a=n.get("searches"),r=t.query,s=void 0===r?n.get("query"):r,o=t.limit;a.each(function(e){var t=e.server
;t.supports("quickSearch")&&t.get("isConnected")&&(e.abortPendingPopulate(),e.set("isSearchPending",!0),e.fetch({data:{sectionId:n.get("sectionID"),query:s,limit:o}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:t})}))})},r[v._28]=function(e,t,n){var a=i(e);""===t.trim()?n(g.resetQuickSearch()):(a.get("query").length>1&&t.length<2&&n(g.resetQuickSearch()),a.set("query",t))},r[v._29]=function(e,t){
var n=i(e),a=t.providerIdentifier,r=void 0===a?n.get("providerIdentifier"):a,s=t.sectionID,o=void 0===s?n.get("sectionID"):s,l=t.channelPlaceholder,u=void 0===l?n.get("channelPlaceholder"):l,c=t.channelID,d=void 0===c?n.get("channelID"):c,h=t.channelSearchKey,p=void 0===h?n.get("channelSearchKey"):h;n.set({providerIdentifier:r,sectionID:o,channelPlaceholder:u,channelID:d,channelSearchKey:p})},r[v._30]=function(e,t){var n=i(e),r=t.searchResultEntityID,s=t.offset
;if(r)return void n.set("selectedResultEntityID",r);var o=a(n.get("searches")),l=o.indexOf(n.get("selectedResultEntityID")),u=o.length-1,c=s>0?-1:u,d=l+s,h=d<-1||d>u,p=h?c:d,f=p===-1?null:o[p];n.set("selectedResultEntityID",f)},r[v._31]=function(e,t,a){var r=i(e),c=t.serverEntityID,d=null!=t.searchResultEntityID?t.searchResultEntityID:r.get("selectedResultEntityID"),h=n.i(l.c)(e,{searchResultEntityID:d}),m=n.i(l.a)(e,t),v=m.id;if(!h){
var y=r.pick("query","channelID","channelSearchKey"),b=y.query,S=y.channelID,I=y.channelSearchKey;return null!=S&&null!=I?s.a.trigger("navigate","channel",{serverID:v,channelID:S,key:o.join(I,{query:b})}):s.a.trigger("navigate","search",{serverID:v,query:b}),void a(g.resetQuickSearch({serverEntityID:c}))}var w=h.pick("tagItem","metadataItem"),M=w.tagItem,C=w.metadataItem;if(M){
var D=u.a.get(M.get("tagType")),P=D.typeString,T=h.provider.get("isLibraryProvider")?h.get("reasonID"):M.get("librarySectionKey"),x=n.i(p.a)(m.attributes,h.provider.attributes,T,{filters:M.has("filter")?M.get("filter"):P+"="+M.get("id"),filterLabel:M.get("tag")});return window.location.hash=x,void a(g.resetQuickSearch({serverEntityID:c}))}var E=n.i(f.a)(m.attributes,h.provider.attributes,C.attributes);if(!E)return void a(g.playQuickSearchItem({searchResultEntityID:d}));window.location.hash=E,
a(g.resetQuickSearch())},r[v._32]=function(e,t,a){var r=i(e),s=t.serverEntityID,o=t.shuffle,u=void 0!==o&&o,c=null!=t.searchResultEntityID?t.searchResultEntityID:r.get("selectedResultEntityID"),d=n.i(l.c)(e,{searchResultEntityID:c});if(!d)return void a(g.navigateQuickSearchResult(t.searchResultEntityID));d.get("metadataItem")&&(a(n.i(m.playMetadataItem)({metadataItemEntityID:d.get("metadataItem").entityID(),shuffle:u})),a(g.resetQuickSearch({serverEntityID:s})))},r));t.a=y},function(e,t,n){
"use strict";function i(e){return e.get("ui").get("recordingSchedulePage")}function a(e){return i(e).get("calendar")}function r(e,t,a){var r=i(e),s=n.i(h.a)(e,t);if(r.get("isPagePopulated")){var o=r.get("calendar"),l=r.get("mediaSubscriptions");o&&o.server===s&&a(n.i(y.fetchCalendar)()),l&&l.server===s&&a(n.i(y.fetchMediaSubscriptions)())}}var s,o=n(37),l=n.n(o),u=n(60),c=n(115),d=n(719),h=n(528),p=n(59),f=n(708),g=n(829),m=n(117),v=n(107),y=n(327),b=n(32),S=n.i(u.a)((s={},s[b.P]=function(e,t){
var a=i(e),r=a.get("mediaSubscriptions"),s=a.get("calendar"),o=n.i(h.a)(e,t),l={isPagePopulated:!0,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null};r&&r.server===o||(l.mediaSubscriptions=new f.a([],{server:o})),s&&s.server===o?s.restoreDefaults():l.calendar=new g.a({},{server:o}),a.set(l)},s[b.Q]=function(e){i(e).set("isPagePopulated",!1)},s[b.R]=n.i(c.a)({key:"mediaSubscriptions",getModel:i}),s[b.S]=function(e,t){
var a=i(e),r=a.get("mediaSubscriptions"),s=n.i(h.c)(e,t),o=s&&r.indexOf(s),l=t.moveIndex;if(o!==l&&o!==l-1){var u=l>o?l-1:l;r.remove(s),r.add(s,{at:u});var c=u>0?r.at(u-1).id:void 0;n.i(d.a)(s,c).fail(function(){r.remove(s),r.add(s,{at:o})})}},s[b.T]=function(e,t,n){a(e).set("visibleDays",t.visibleDays)},s[b.U]=function(e,t,n){a(e).set("time",l()().unix())},s[b.V]=function(e,t,n){var i=a(e),r=i.get("visibleDays"),s=l.a.unix(i.get("time")).subtract(r,"days").unix();i.set("time",s)},
s[b.W]=function(e,t,n){var i=a(e),r=i.get("visibleDays"),s=l.a.unix(i.get("time")).add(r,"days").unix();i.set("time",s)},s[b.X]=n.i(c.a)({key:"calendar",getModel:i}),s[b.Y]=function(e,t,i){var a=t.serverEntityID,r=t.linkedKey,s=n.i(h.a)(e,t),o=new p.a({key:r},{server:s});o.populate().done(function(){i(n.i(v.playMetadataItem)({serverEntityID:a,metadataItemEntityID:o.entityID()}))})},s[b.y]=function(e,t,n){var i=t.activity;if(i.type===m.a.PROVIDER_SUBSCRIPTION_PROCESS&&r(e,t,n),
i.type===m.a.GRABBER_GRAB){"error"===i.Response.status&&r(e,t,n)}},s));t.a=S},function(e,t,n){"use strict";function i(e){return e.get("ui").get("searchPage")}var a,r=n(70),s=n.n(r),o=n(100),l=n(139),u=n(542),c=n(60),d=n(88),h=n(32),p=n.i(c.a)((a={},a[h._162]=function(e,t,i){t.forEach(function(e){i(n.i(d.e)({serverEntityID:e}))})},a[h._163]=function(e,t,a){var r=i(e),c=r.get("searches"),d=t.availableProviders,h=t.query,p=t.limit;s()(d).forEach(function(t){var i=d[t],a=n.i(o.a)(e,{
serverEntityID:i.serverEntityID}),r=n.i(o.b)(e,{providerEntityID:t}),s=r.get("features").get(l.a.SEARCH);s&&!c.get(t)&&c.add(new u.a({providerEntityID:t,key:s.get("key")},{server:a,provider:r}))}),c.each(function(e){e.populatePromise||(e.set("isSearchPending",!0),e.fetch({data:{query:h,limit:p}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:t})}))})},a[h._164]=function(e,t,n){var a=i(e)
;a.get("searches").each(function(e){e.abortPendingPopulate()}),a.restoreDefaults()},a));t.a=p},function(e,t,n){"use strict";function i(e){return e.get("ui").get("timelinePage")}function a(e,t){var a=i(e),r=n.i(s.a)(e,t),o=a.get("momentList");o.fetch().done(function(){var e=o.get("key"),t=a.get("metadataList"),n=void 0;n=t&&t.server===r&&t.get("containerKey")===e?t:new h.default({containerKey:e},{server:r}),a.set({isMomentListPending:!1,isMomentListPopulated:!!e,momentListError:null,
metadataList:n})}).fail(function(e,t){a.set({isMomentListPending:!1,momentListError:t})})}var r,s=n(100),o=n(366),l=n(692),u=n(60),c=n(115),d=n(245),h=n(81),p=n(32),f=n.i(u.a)((r={},r[p._156]=function(e,t,r){var u=i(e),c=n.i(s.a)(e,t),d=t.serverEntityID,h=t.libraryKey,p=t.momentKey;if(d!==u.get("serverEntityID")||p!==u.get("momentKey")){var f=new o.a({key:h},{server:c}),g=new l.a({momentKey:p},{server:c});u.restoreDefaults({serverEntityID:d,details:f,momentKey:p,momentList:g}),a(e,t)}},
r[p._157]=n.i(c.a)({key:"details",getModel:i}),r[p._158]=n.i(d.a)({key:"details",actionSuffix:"timelineDetails",getModel:i}),r[p._24]=function(e,t){var r=t.metadataItemEntityID,o=t.containerKeyPattern,l=n.i(s.a)(e,t),u=i(e),c=u.get("metadataList");r||c&&c.server===l&&(o&&!c.get("containerKey").match(o)||a(e,t))},r));t.a=f},function(e,t,n){"use strict";var i=n(50),a=n(32);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s});var r=n.i(i.a)(a._156),s=(n.i(i.a)(a._157),n.i(i.a)(a._158))
},function(e,t,n){"use strict";function i(e){return e.get("user").get("desktop")}var a,r=n(16),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(61),h=n(60),p=n(115),f=n(245),g=n(716),m=n(1665),v=n(32),y=n.i(h.a)((a={},a[v.Z]=n.i(p.a)({key:"plans",getModel:i}),a[v._0]=n.i(f.a)({key:"plans",getModel:i}),a[v._1]=n.i(g.a)({key:"unwatchedWatchLaterList",getModel:i}),a[v._2]=n.i(g.a)({key:"unwatchedRecommendedList",getModel:i}),a[v._4]=function(e){i(e).set("updateUserError",null)},a[v._3]=function(e,t,n){
var a=i(e),r=e.get("user"),o=t.avatar,u=s()(t,["avatar"]);if(a.set({isUpdatingUser:!0,updateUserError:null}),o){for(var h=o.split(","),p=h[0],f=h[1],g=p.substr(5),m=window.atob(f),v=[],y=0;y<m.length;y++)v.push(m.charCodeAt(y));var b=new Uint8Array(v),S=new window.Blob([b],{type:g});u.avatar=S}var I=new window.FormData;l.a.each(u,function(e,t){I.append(t,e)});var w=r.server.getXHROptions(l.a.result(r,"url"),{type:"PUT",processData:!1,contentType:!1,data:I});c.a.ajax(w).done(function(e){
t.avatar&&r.fetch();var n=l.a.reduce(t,function(e,t,n){return r.hasAttr(n)&&(e[n]=t),e},{});r.set(n),a.set({isUpdatingUser:!1,updateUserError:null})}).fail(function(e){var t=d.a.parseXML(e.responseText),n=l.a.isArray(t)?t:[t.error],i=l.a.groupBy(n,function(e){return e.field?e.field:"request"});a.set({isUpdatingUser:!1,updateUserError:i})})},a[v._5]=n.i(p.a)({key:"webhooks",getModel:i}),a[v._6]=function(e){var t=i(e);t.get("webhooks").add({}),t.set("updateWebhooksError",null)},
a[v._7]=function(e,t){var a=t.oldUrl,r=t.newUrl,s=i(e),o=s.get("webhooks");if(o.findWhere({url:a})){var l=o.map(function(e){var t=e.get("url");return t===a?r:t});s.set({isUpdatingWebhooks:!0,updateWebhooksError:null}),n.i(m.a)(o,l).always(function(){s.set("isUpdatingWebhooks",!1)}).fail(function(e){s.set("updateWebhooksError",e[0])})}},a[v._8]=function(e){i(e).set("updateWebhooksError",null)},a[v._9]=function(e,t){var a=i(e),r=a.get("webhooks");if(!t){var s=r.filter(function(e){
return e.get("url")!==t});return void r.reset(s)}a.set({isRemovingWebhooks:!0,updateWebhooksError:null});var o=r.map(function(e){return e.get("url")}).filter(function(e){return e!==t});n.i(m.a)(r,o).always(function(){a.set("isRemovingWebhooks",!1)}).fail(function(e){a.set("updateWebhooksError",e[0])})},a));t.a=y},function(e,t,n){"use strict";function i(e,t,i){var a,r=n.i(b.a)(e,t),o=r.get("playQueueItemID"),l=e.get("decisions");e.set("decisions",s()({},l,(a={},a[o]=i,a))),
t===e.get("currentIndex")&&e.set({positionSeconds:Math.floor(i.position||0),videoQualityIndex:i.qualityIndex,currentDecision:i})}var a,r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(4),c=n(60),d=n(41),h=n(32),p=n(13),f=n(765),g=n(319),m=n(766),v=n(106),y=n(520),b=n(386),S=n(529),I=n(544),w=n(399),M=n.i(S.a)(),C=n.i(c.a)((a={},a[h._165]=function(e,t){var i=t.playerType,a=(t.playQueueItem,n.i(b.b)(e,i)),r=a.get("videoPaused");a.set("videoPaused",!r),n.i(I.a)(a),
n.i(p.b)("screenSaverManager")&&n.i(p.a)("screenSaverManager").toggle(!r)},a[h._166]=function(e,t){var a,r=t.playerType,o=t.index,c=n.i(b.b)(e,r),d=n.i(b.a)(c,o),h=d.get("playQueueItemID"),f=c.get("decisions"),S=f[h];S&&S.transcodeSessionID&&!S.canDirectPlay&&n.i(m.a)(S.transcodeServer,S.transcodeSessionID),c.set("decisions",s()({},f,(a={},a[h]={},a)));var I=d.get("metadataItem"),w=e.get("settings"),C=v.a.getCurrentQuality(I,w),D=n.i(p.a)("getDecisionOptions")(),P={};g.a.getPlayerDecision(s()({
playbackSessionID:M,type:"video",item:I,quality:C,offset:0,fallbackServer:e.get("primaryServer")},D)).done(function(e){var t=(e.offset,0),n=v.a.getAvailableQualitiesFor(e.media,e.transcodeServer),i=l.a.findWhere(n,{index:C.index})?C.index:-1,a=e.part&&e.part.duration||I.get("duration");P={media:e.media,part:e.part,url:e.url,urlPosition:e.offset,offset:t,position:e.offset+t,duration:a,availableQualities:n,qualityIndex:i,subtitlesUrl:e.subtitlesUrl,canDirectPlay:e.canDirectPlay,
protocol:e.protocol,playbackSessionID:e.playbackSessionID,transcodeSessionID:e.transcodeSessionID,transcodeServer:e.transcodeServer}}).fail(function(e){var t=n.i(y.a)(e)||n.i(u.default)("There was a problem playing this item.");P={error:t}}).always(function(){i(c,o,P)})},a[h._167]=function(e,t){var i=t.playerType,a=t.playQueueItem,r=n.i(b.b)(e,i),s=r.get("decisions");if(a){var o=a.playQueueItemID,u=s[o];u.transcodeSessionID&&!u.canDirectPlay&&n.i(m.a)(u.transcodeServer,u.transcodeSessionID),
r.set({decisions:l.a.omit(s,o)})}},a[h._168]=function(e,t){var a=t.playerType,r=t.index,s=t.error,o=void 0===s?n.i(u.default)("There was a problem playing this item."):s;i(n.i(b.b)(e,a),r,{error:o})},a[h._169]=function(e,t){var i=t.playerType,a=t.index,r=t.positionSeconds,s=n.i(b.b)(e,i),o=a===s.get("currentIndex"),l=r!==s.get("positionSeconds");o&&l&&s.set({positionSeconds:r})},a[h._170]=function(e,t,i){var a=t.playerType,r=t.index,s=t.positionSeconds,o=n.i(b.b)(e,a)
;r===o.get("currentIndex")&&n.i(d.a)(function(){o.set("positionSeconds",s)})},a[h._171]=function(e,t,i){var a=t.playerType,r=t.index,s=t.qualityIndex,o=n.i(b.b)(e,a),l=n.i(b.a)(o,r),u=l.get("metadataItem");o.set("videoQualityIndex",s);var c=v.a.getQualityAttribute(u);e.get("settings").save(c,s),i(n.i(w.c)({playerType:a,index:r}))},a[h._172]=function(e,t){
var i=t.playerType,a=t.index,r=t.secondsElapsed,s=n.i(b.b)(e,i),o=s.get("currentDecision"),l=a===s.get("currentIndex"),u=s.get("videoPaused")||!l,c=o.canDirectPlay,d=!(r%10),h=!(r%30);d&&l&&n.i(I.a)(s),h&&u&&!c&&n.i(f.a)(o.transcodeServer,o.transcodeSessionID)},a));t.a=C},function(e,t,n){"use strict";function i(e){var t=n.i(a.a)(r.a,e);return t}var a=n(1272),r=n(1660);t.a=i},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e,t){return t.activeFilters
},function(e,t){return t.selectedType},function(e){return e.ui.libraryPage.selectedFilterKey},function(e){return e.ui.libraryPage.filterOptionQuery},function(e){return e.ui.libraryPage.selectedFilterOptions},function(e,t,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=t&&t.filters,c=o.a.findWhere(l,{key:i}),d=s;if(a){var h=a.trim().toLowerCase();d=d.filter(function(e){return e.title.toLowerCase().indexOf(h)>-1})}if(c){var p=e.filter(function(e){return e.key===c.filter
}),f=d.reduce(function(e,t){var i=n.i(u.a)(p,t.key);return(i?e.selected:e.unselected).push(r()({},t,{isSelected:i})),e},{selected:[],unselected:[]});d=f.selected.concat(f.unselected)}return d})}var a=n(6),r=n.n(a),s=n(2),o=n.n(s),l=n(8),u=(n.n(l),n(747));t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){return t.activeFilters},function(e,t){return t.activeFilterLabel},n.i(u.a)(),function(e,t,i){if(r.a.isEmpty(e)||!i)return n.i(o.default)("All")
;var a=[],s=e.reduce(function(e,t){return(t.type===l.a?e.boolean:e.other).push(t),e},{boolean:[],other:[]}),u=s.boolean,c=s.other;if(1===u.length){var d=u[0],h=r.a.findWhere(i.filters,{filter:d.key,filterType:l.a});h&&a.push(h.title)}return 1===c.length&&t&&a.push(t),a.length?a.join(" "):n.i(o.default)("Filtered")})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(4)),l=n(185),u=n(328);t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),
n(4)),r=n(377),s=n(248),o=n(836),l=n.i(i.createSelector)(o.a,function(e){return e.reduce(function(e,t){if(t.type===r.a){var i=t.operators.filter(function(e){var t=e.key;return t!==s.a&&t!==s.d});i.push({key:s.g,title:n.i(a.default)("in the last")},{key:s.h,title:n.i(a.default)("in not the last")}),e[t.type]=i}else e[t.type]=t.operators;return e},{})});t.a=l},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(n.i(u.a)(),n.i(l.a)(),function(e,t){return r.a.find(e,function(e){
return e.type===o.a.GRABBER_GRAB&&e.Context.itemKey&&e.Context.itemKey===t.key})})}var a=n(2),r=n.n(a),s=n(8),o=(n.n(s),n(117)),l=n(24),u=n(221);t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(n.i(r.a)(),function(e){if(e&&!e.isExtra&&"photo"!==e.type)return"playlist"===e.type?e.ratingKey:"track"===e.type?e.skipParent?e.grandparentKey:e.parentKey:e.key})}var a=n(8),r=(n.n(a),n(24));t.a=i},function(e,t,n){"use strict";var i=n(8),a=(n.n(i),
n(159)),r=n.i(i.createSelector)(a.a,function(e){return e.searchResults});t.a=r},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(8),s=(n.n(r),n(109)),o=void 0,l=n.i(r.createSelector)(s.a,function(e){var t=a.a.pluck(e.activeSelectionItems,"id");return o&&a.a.isEqual(o,t)?o:(o=t,t)});t.a=l},function(e,t,n){"use strict";function i(e){return e.experienceSettings.libraryTableColumns}t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.playThemeMusic}t.a=i
},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e){return e.ui},n.i(r.a)(),function(e,t){if(!t)return!1;var n=e.photoPlayer,i=e.audioPlayer,a=e.videoPlayer,r=t.key;return r===n.activeMetadataKey||r===i.activeMetadataKey||r===a.activeMetadataKey})}var a=n(8),r=(n.n(a),n(24));t.a=i},function(e,t,n){"use strict";function i(){return n.i(a.createSelector)(function(e){return e.ui.prePlayPage},n.i(r.a)(),function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.isFileUnavailable)return!0;var n=t.Media;if(!n||!n.length)return!1;for(var i=0,a=n.length;i<a;i++){var r=n[i],s=r.Part;if(s&&s.length)for(var o=0,l=s.length;o<l;o++){var u=s[o];if(u.exists===!1||u.accessible===!1)return!0}}return!1})}var a=n(8),r=(n.n(a),n(24));t.a=i},function(e,t,n){"use strict";var i={NONE:100,SMALL:150,LARGE:200,HUGE:250};i.settings=[{value:i.NONE,title:"None"},{value:i.SMALL,title:"Small"},{value:i.LARGE,
title:"Large"},{value:i.HUGE,title:"Huge"}],t.a=i},function(e,t,n){"use strict";var i={PENDING:"pending",ERROR:"error",PROCESSED:"processed",contexts:{OK:"ok",FILE_UNAVAILABLE:"sourceFileUnavailable",METADATA_ERROR:"sourceFileMetadataError",PROFILE_ERROR:"clientProfileError",IO_ERROR:"ioError",TRANSCODER_ERROR:"transcoderError",UNKNOWN_ERROR:"unknownError",ANALYSIS_ERROR:"mediaAnalysisError",DOWNLOAD_FAILED:"downloadFailed",CANNOT_TRANSCODE:"cannotTranscode"}};t.a=i},function(e,t,n){"use strict"
;var i={PENDING:"pending",FAILED:"failed",COMPLETE:"complete",failureCodes:{INVALID_PATH:"invalidPath",DISK_FULL:"diskFull",DISK_UNWRITABLE:"diskUnwritable"}};t.a=i},function(e,t,n){"use strict";function i(e){switch(e.type){case A.PREFERENCE:return e.Setting;case A.TIMELINE:return e.TimelineEntry;case A.STATUS:return e.StatusNotification;case A.PROGRESS:return e.ProgressNotification;case A.PLAYING:return e.PlaySessionStateNotification;case A.SYNC_STATE:return e.SyncStateNotification
;case A.BACKGROUND_GENERATOR_STATE:return e.BackgroundGeneratorStateNotification;case A.VERSION_STATE:return e.VersionStateNotification;case A.BACKGROUND_PROCESSING_QUEUE:return e.BackgroundProcessingQueueEventNotification;case A.TRANSCODE_START:case A.TRANSCODE_UPDATE:case A.TRANSCODE_END:return e.TranscodeSession;case A.UPDATE_STATE_CHANGE:return e.AutoUpdateNotification;case A.REACHABILITY:return e.ReachabilityNotification;case A.ACCOUNT:return e.AccountUpdateNotification;case A.ACTIVITY:
return e.ActivityNotification;case A.GRABBER_DEVICE:return e.MediaGrabberDeviceNotification;default:return[]}}var a,r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(38),d=n(12),h=n(40),p=n(213),f=n(1336),g=n(501),m=n(212),v=n(67),y=n(62),b=n(55),S=n(13),I=n(88),w=n(107),M=n(220),C=n(73),D=n(179),P=n(819),T=n(325),x=n(817),E=n(324),A={PREFERENCE:"preference",TIMELINE:"timeline",STATUS:"status",PROGRESS:"progress",PLAYING:"playing",SYNC_STATE:"syncState",
BACKGROUND_GENERATOR_STATE:"backgroundGeneratorState",VERSION_STATE:"versionState",BACKGROUND_PROCESSING_QUEUE:"backgroundProcessingQueue",TRANSCODE_START:"transcodeSession.start",TRANSCODE_UPDATE:"transcodeSession.update",TRANSCODE_END:"transcodeSession.end",UPDATE_STATE_CHANGE:"update.statechange",REACHABILITY:"reachability",ACCOUNT:"account",ACTIVITY:"activity",GRABBER_DEVICE:"grabber.device"},k=0,L=void 0,_=void 0,N=c.a.extend((a={mixins:b.a,url:function(){
var e=this.server.get("activeConnection"),t=e.id.replace(/^http/,"ws");return this.server.resolveUrl("/:/websockets/notifications",{connection:new D.a({uri:t}),appendToken:!0})},initialize:function(e){s.a.bindAll(this,"onOpen","onClose","onError","onMessage"),this.server=e.server},open:function(){return this.socket&&this.close(),this._deferred=l.a.Deferred(),this.socket=new window.WebSocket(s.a.result(this,"url")),this.socket.onopen=this.onOpen,this.socket.onclose=this.onClose,
this.socket.onerror=this.onError,this.socket.onmessage=this.onMessage,this._deferred.promise()},close:function(){this._deferred&&"pending"===this._deferred.state()&&this._deferred.reject(),this.socket&&(this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close(),this.socket=null)},testConnection:function(){if(this.server.get("connected")){var e=this.server.get("desktop").get("update")
;e&&"installing"===e.get("state")&&this.server.set("connected",null),this.server.trigger("error:connection",this.server)}}},a[A.PREFERENCE]=function(e){e.key=e.id,e.server=this.server,this.server.trigger("socket:setting",e)},a[A.TIMELINE]=function(e){function t(){k=Date.now(),L=a,_=null,c(M.a({serverEntityID:h,containerKeyPattern:new RegExp("^"+n.i(m.a)("/library/sections/"+a)+"\\b")}))}if(!C.a.EPG_IDENTIFIER.test(e.identifier)){
var i=e.state,a=e.sectionID,r=e.rootItemID,s=e.parentItemID,o=e.itemID,l=e.metadataState,u=e.mediaState,c=S.a("appStore").dispatch,h=this.server.entityID(),p="/library/metadata/"+o,f=n.i(y.a)(v.b,p,h);if(c(w.updateMetadataItemRefreshingState({serverEntityID:h,metadataItemEntityID:f,metadataState:l,mediaState:u})),i===g.a.PROCESSED&&c(w.repopulateMetadataItem({serverEntityID:h,metadataItemEntityID:f})),i===g.a.DELETED&&c(w.removeMetadataItem({serverEntityID:h,metadataItemEntityID:f})),
i===g.a.CREATED||i===g.a.DELETED){if(a>0){var b=Date.now()-k;a===L&&b<5e3?_||(_=setTimeout(t,5e3-b)):t()}if(r>0){var I="/library/metadata/"+r,D=n.i(y.a)(v.b,I,h);c(M.a({serverEntityID:h,metadataItemEntityID:D}))}if(s>0){var P="/library/metadata/"+s,T=n.i(y.a)(v.b,P,h);c(M.a({serverEntityID:h,metadataItemEntityID:T}))}}e.server=this.server,this.server.trigger("socket:timeline",e),d.a.trigger("timeline",e)}},a[A.STATUS]=function(e){var t=e.title+(e.description?": "+e.description:"")
;if(d.a.trigger("show:status",this.server,t),this.server.trigger("socket:status",e),"LIBRARY_UPDATE"===e.notificationName){var n=S.a("appStore").dispatch,i=this.server.entityID();i&&(n(I.b({serverEntityID:i})),n(M.a({serverEntityID:i})))}},a[A.PROGRESS]=function(e){d.a.trigger("show:status",this.server,e.message),this.server.trigger("socket:status",e)},a[A.PLAYING]=function(e){var t=this;if(e.sessionKey&&!this.server.get("shared")){
var i=this.server.get("desktop").get("sessions"),a=i.get(e.sessionKey);if(a&&a.get("key")===e.key)if(e.state===h.a.states.STOPPED){a.trigger("destroy",a,a.collection),a.cache.remove(a);var r=S.a("appStore").dispatch,o=this.server.entityID();o&&r(M.a({serverEntityID:o}))}else{var l=a.get("Player");l&&(l.state=e.state,a.trigger("change:Player",a,l)),a.set("viewOffset",e.viewOffset)}else{if(i.isPopulating())return;i.fetch().done(function(){if(a=i.get(e.sessionKey)){
var r=S.a("appModel"),o=r.get("user"),l=a.get("Player").title,c=a.get("User").title,h=a.get("grandparentTitle"),p=a.get("title");h&&(p=h+" - "+p);var f=n.i(u.default)("{1} started playing {2} on {3}.",c,p,l);c&&c!==o.get("username")&&d.a.trigger("show:status",t.server,f),t.server.trigger("socket:playing",s.a.extend(e,{username:c||n.i(u.default)("Unknown"),title:p,player:l}))}})}}},a[A.SYNC_STATE]=function(e){var t=new P.a({key:e.key},{server:this.server,syncItemId:e.syncItemId,onlyIfCached:!0})
;if(!s.a.isEmpty(t)){t.get("Media").forEach(function(n){n.Part.forEach(function(n){n.transcodeState=e.syncFileState,n.transcodeStateContext=e.syncFileStateContext,n.syncState=e.syncState,n.syncStateContext=e.syncStateContext;var i=p.a.getSyncStateFromPart(n);p.a.waitingRegex.test(i)&&(n.key="placeholder"),t.trigger("change:Media",t,t.get("Media"))})})}},a[A.BACKGROUND_GENERATOR_STATE]=function(e){var t={server:this.server,onlyIfCached:!0},n=new T.a({id:e.generatorID},t);s.a.isEmpty(n)||n.fetch()
},a[A.VERSION_STATE]=function(e){var t={server:this.server,onlyIfCached:!0},n=new T.a({id:e.generatorID},t);if(!s.a.isEmpty(n)){var i=n.get("children").getCollection(),a=i.get(e.metadataItemID);a&&a.set({processingState:e.state,processingStateContext:e.stateContext})}},a[A.BACKGROUND_PROCESSING_QUEUE]=function(e){var t=new x.a([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.a.isEmpty(t)){var n=t.first();n&&n.fetch()}},a[A.TRANSCODE_START]=function(e){if("static"===e.context){
var t=new E.a([],{server:this.server,allowInCache:!0,onlyIfCached:!0});s.a.isEmpty(t)||t.fetch()}else{this.server.get("desktop").get("sessions").fetch()}},a[A.TRANSCODE_UPDATE]=function(e){if("static"===e.context){var t=new E.a([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.a.isEmpty(t)){var n=t.get(e.key);n?n.set(n.parse(e)):t.fetch()}}},a[A.TRANSCODE_END]=function(e){this["transcodeSession.start"].apply(this,arguments)},a[A.UPDATE_STATE_CHANGE]=function(e){
var t=this.server.get("desktop").get("update"),n=s.a.pick(e,t.whitelistedAttrs);s.a.defaults(n,s.a.result(t,"defaults")),"downloading"===t.get("state")&&"available"===n.state&&(n.state="downloading"),t.set(n)},a[A.REACHABILITY]=function(e){this.server.get("desktop").get("cloudAccount").fetch()},a[A.ACCOUNT]=function(e){if(this.server.set("myPlexSubscription",e.hasPlexPass),this.server.supports("reachability")){var t=s.a.extend(this.server.getXHROptions("/myplex/refreshReachability"),{type:"PUT"
});l.a.ajax(t)}S.a("appModel").get("user").get("isSignedIn")&&d.a.trigger("discover:servers")},a[A.ACTIVITY]=function(e){var t=n.i(f.a)(e),i=S.a("appStore"),a=this.server.entityID(),r=t.Activity||t;r.Context=r.Context||{},r.Response=r.Response||{},a&&("started"===t.event?i.dispatch(I.p({serverEntityID:a,activity:r})):"updated"===t.event?i.dispatch(I.q({serverEntityID:a,activity:r})):"ended"===t.event&&i.dispatch(I.r({serverEntityID:a,activity:r})))},a[A.GRABBER_DEVICE]=function(e){
var t=S.a("appStore"),n=this.server.entityID();n&&"appeared"===e.event&&t.dispatch(I.s({serverEntityID:n,device:e.Device}))},a.onOpen=function(e){var t=S.a("appStore"),n=this.server.entityID();n&&t.dispatch(I.t({serverEntityID:n,event:e})),this.server.trigger("socket:websocket",{opened:!0}),this.trigger("open",this.server,e),this._deferred.resolve(this.server,e)},a.onClose=function(e){this.close();var t=S.a("appStore"),n=this.server.entityID();n&&t.dispatch(I.u({serverEntityID:n,event:e})),
this.server.trigger("socket:websocket",{closed:!0}),this.trigger("close",this.server,e),this._deferred.reject(this.server,e),this.testConnection()},a.onError=function(e){this.close(),this.server.trigger("socket:websocket",{error:!0}),this.trigger("error",this.server,e),this._deferred.reject(this.server,e),this.testConnection()},a.onMessage=function(e){var t=this,n=void 0;try{n=JSON.parse(e.data)}catch(e){return}var a=!!n._elementType,r=a?s.a.first(n._children):n.NotificationContainer;if(r){
var o=a?n.type:r.type,l=this[o],u=void 0;u=a?s.a.isArray(r)?r:[r]:i(r),u.forEach(function(e){t.trigger("message",e),s.a.isFunction(l)&&l.call(t,e)})}},a));t.a=N},function(e,t,n){"use strict";function i(){var e=n.i(r.a)(window.location.href,"http:");s.a.get("allowSSO")?window.location=a.join(e,{secure:0},{parseParams:!0,recognizeHash:!0}):window.location=e}var a=n(19),r=n(794),s=n(56);t.a=i},function(e,t,n){"use strict";var i=n(2840),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"span",
template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(15),s=n(1),o=(n.n(s),n(48)),l=n.n(o),u=n(14),c=n(13),d=n(1982),h=n(2001),p=n(2841),f=n.n(p),g=a()("div",{},void 0,a()(d.a,{}),a()(h.a,{})),m=r.a.ItemView.extend({className:"background-container",template:f.a,mountReact:function(){var e=n.i(c.a)("appStore");l.a.render(a()(u.a,{store:e},void 0,g),this.el)},unmountReact:function(){this.isRendered&&l.a.unmountComponentAtNode(this.el)},onBeforeRender:function(){
this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.a=m},function(e,t,n){"use strict";var i=n(2842),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(12),h=n(40),p=n(56),f=n(851),g=n(1713),m=n(854),v=n(1737),y=n(1919),b=n(1918),S=n(1914),I=n(1913),w=n(1916),M=n(1915),C=n(1911),D=n(264),P=n(1641),T=u.a.Layout.extend({el:"#plex",template:a.a,resizeDelay:200,ui:{content:"#content",shadow:".scroll-shadow"},customRegions:{background:{
prepend:!0,global:!0},content:{selector:"#content",global:!0,scrollable:!0,channelName:"content"},status:{prepend:!0,global:!0},player:{append:!0,global:!0},miniPlayer:{append:!0,global:!0},navbar:{modifier:"show-nav-bar",prepend:!0,global:!0},sidebar:{modifier:"show-side-bar",append:!0},actionbar:{modifier:"show-action-bar",append:!0},breadcrumbbar:{modifier:"show-breadcrumb-bar",append:!0},filterbar:{modifier:"show-filter-bar",append:!0},alphabar:{modifier:"show-alpha-bar",append:!0},
alertbar:{modifier:"show-alert-bar",append:!0,global:!0}},openAlerts:{},initialize:function(){s.a.bindAll(this,"triggerResizeEvent","onResize","onScroll");var e=c.a("appModel");this.user=e.get("user"),this.modals=[],this.playerConstructors={full:{},mini:{}},this.playerConstructors.full[h.a.types.VIDEO]=y.a,this.playerConstructors.full[h.a.types.PHOTO]=w.a,this.playerConstructors.mini[h.a.types.VIDEO]=b.a,this.playerConstructors.mini[h.a.types.MUSIC]=S.a,
this.playerConstructors.mini[h.a.types.PHOTO]=M.a,s.a.each(s.a.keys(this.customRegions),function(e){var t=this.customRegions[e],n=t.selector||s.a.uniqueId("r");t.scrollable?this.addRegion(e,new P.a({el:n,channelName:t.channelName})):this.addRegion(e,n)},this),this.listenTo(e,{"change:authorized":this.onAuthorizedChange,"change:isFirstRun":this.onFirstRunChange}),this.listenTo(this.user,{"change:locked":this.onUserLockedChange}),this.listenTo(d.a,{"show:loading":this.showLoading,
"show:view":this.showView,"show:alert":this.showAlert,"show:bar":this.showBar,"hide:bar":this.hideBar,"show:modal":this.showModal,"hide:modal":this.hideModal,"show:player":this.showPlayer,"hide:player":this.hidePlayer,"show:playerLoading":this.showPlayerLoading,"hide:playerLoading":this.hidePlayerLoading,"start:scrollListener":this.onStartScrollListener,"stop:scrollListener":this.onStopScrollListener,"update:scrollPosition":this.onUpdateScrollPosition}),l()(window).on("resize",this.onResize)},
showCustomRegion:function(e,t){var n=this.customRegions[e],i=this[e];if(this.user.get("locked"))return i.lockedView=t,void t.close();n.append?i.append(t,this.$el):n.prepend?i.prepend(t,this.$el):i.show(t)},showLoading:function(){this.hideBar("alertbar"),this.user.get("locked")&&this.resetContentLockedRegions(),this.showCustomRegion("content",new f.a)},showView:function(e){l()(".tooltip").remove(),this.hideBackground(this.currentView,e),d.a.trigger("cycle:cache"),this.currentView=e,
this.showCustomRegion("content",e),this.ui.content.scrollTop(0)},showAlert:function(e){var t=e.message;if(!this.openAlerts[t]){var n=new m.a(e);this.openAlerts[t]=!0,this.listenToOnce(n,"close",function(){delete this.openAlerts[t]}),this.$el.append(n.render().el)}},showAlertBar:function(){var e=p.a.get("alerts");e&&e.length&&(p.a.set("alerts",null),this.showBar("alertbar",new D.a({alert:s.a.first(e)})))},showBar:function(e,t){
this.customRegions[e].modifier&&this.$el.addClass(this.customRegions[e].modifier),t&&this.showCustomRegion(e,t)},hideBar:function(e,t){t||(t={});var n=this.customRegions[e],i=n.modifier;i&&this.$el.removeClass(i),t.preserve||(this[e].lockedView=null,this[e].close())},showModal:function(e){this.modals.push(e);var t=l()("body");e.transparent&&t.addClass("show-modal-transparent"),t.append(e.render().el)},hideModal:function(e){var t=s.a.indexOf(this.modals,e)
;t>-1&&this.modals.splice(t,1)[0].close(),e.transparent&&!s.a.findWhere(this.modals,{transparent:!0})&&l()("body").removeClass("show-modal-transparent")},showPlayer:function(e){this.hideLoadingMiniPlayerView(),l()(".tooltip").remove();var t=this.player.currentView,n=this.miniPlayer.currentView,i=!!t&&t.playQueue===e.playQueue,a=!!n&&n.playQueue===e.playQueue;if(e.controller||!i&&!a){
var r=c.a("appModel"),s=r.get("primaryPlayer"),o=s&&"cast"===s.get("protocol"),u=e.type===h.a.types.VIDEO,d=t&&t.type===h.a.types.VIDEO,p=n&&n.type===h.a.types.VIDEO;(o||u||d||p||e.isSwitchingPlayers)&&this.hidePlayer();var f=e.type===h.a.types.MUSIC,g=e.type===h.a.types.PHOTO&&s,m=e.useMiniPlayer||f||g,v=this.playerConstructors[m?"mini":"full"][e.type],y=new v(e);m?(this.showCustomRegion("miniPlayer",y),this.$el.addClass("show-mini-player")):(this.showCustomRegion("player",y),
e.type!==h.a.types.MUSIC&&this.$el.addClass("show-video-player"))}},showPlayerLoading:function(){this.showCustomRegion("miniPlayer",new I.a)},hidePlayer:function(e){e?(this.miniPlayer.currentView===e&&(this.miniPlayer.close(),this.$el.removeClass("show-mini-player")),this.player.currentView===e&&(this.player.close(),this.$el.removeClass("show-video-player"))):(this.miniPlayer.close(),this.$el.removeClass("show-mini-player"),this.player.close(),this.$el.removeClass("show-video-player"))},
hideBackground:function(e,t){var n=t.model?t.model.get("grandparentTheme")||t.model.get("parentTheme")||t.model.get("theme")||t.model.get("key"):null;d.a.trigger("audio:fadeOut",{exceptKey:n}),e&&e.model&&d.a.trigger("hide:background",this.currentView.model)},hideLoadingMiniPlayerView:function(){this.miniPlayer.currentView instanceof I.a&&(this.miniPlayer.currentView.$el.remove(),this.miniPlayer.close())},lockAll:function(){this._isLocked=!0
;var e=s.a.map(s.a.keys(this.customRegions),function(e){return this[e]},this);s.a.each(e,function(e){e.close()},this)},resetContentLockedRegions:function(){s.a.each(s.a.keys(this.customRegions),function(e){if(!this.customRegions[e].global){var t=this[e];t.lockedView&&(t.lockedView=null)}},this)},restoreAll:function(){this._isLocked=!1;var e=c.a("appModel");e.get("authorized")&&this.showBar("navbar",new C.a({model:e}),{prepend:!0}),this.showCustomRegion("background",this.backgroundView),
this.showCustomRegion("status",new v.a)},triggerResizeEvent:function(){d.a.trigger("resize")},onRender:function(){this.backgroundView=new g.a,this.restoreAll()},onAuthorizedChange:function(e,t){if(t){var n=c.a("appModel");this.showBar("navbar",new C.a({model:n}),{prepend:!0});var i=this.user.get("locked");i!==!1&&null!==i||this.showAlertBar()}else this.hideBar("navbar"),this.hidePlayer(),d.a.trigger("navigate:refresh")},onFirstRunChange:function(e,t){this.$el.toggleClass("show-first-run",t)},
onUserLockedChange:function(e,t){t?this.lockAll():!this._isLocked||t!==!1&&null!==t||(null===t&&(this.backgroundView=new g.a),this.restoreAll())},onResize:function(){this.resizeTimeout=clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.triggerResizeEvent,this.resizeDelay)},onStartScrollListener:function(){this.ui.content.on("scroll",this.onScroll)},onStopScrollListener:function(){this.ui.content.off("scroll",this.onScroll),this.ui.shadow.addClass("transition-out")},
onScroll:function(){var e=this.ui.content.scrollTop();this.ui.shadow.toggleClass("transition-out",e<10)},onUpdateScrollPosition:function(e){this.ui.content[0].scrollTop=e}});t.a=T},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(2843),s=n.n(r),o=n(15),l=o.a.ItemView.extend({template:s.a,className:"download-server-pane",serializeData:function(){var e=this.model.toJSON();return a()({shouldUseDropup:e.releases.length>4},e)}});t.a=l},function(e,t,n){"use strict"
;var i=n(2844),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(12),u=n(23),c=o.a.ItemView.extend({tagName:"span",className:"rating heart-rating",template:a.a,disabled:!0,events:{"click .like-meh-btn":"onLikeMehClick","click .dislike-btn":"onDislikeClick"},bindings:{".like-meh-btn":{modelAttribute:"userRating",formatter:function(e,t){var n=10===this.model.get("userRating");t.toggleClass("user-rating",n)}},".like-meh-btn > i":{modelAttribute:"userRating",formatter:function(e,t){
var n=10===this.model.get("userRating");t.toggleClass("plex-icon-heart",n),t.toggleClass("plex-icon-heart-empty",!n)}},".dislike-btn":{modelAttribute:"userRating",formatter:function(e,t){var n=1===this.model.get("userRating");t.toggleClass("user-rating",n)}}},persistRating:function(e){return u.a.execute("rate",{item:this.model,rating:e})},onUserRatingChange:function(e,t){this.render()},onLikeMehClick:function(e){this.persistRating(10===this.model.get("userRating")?-1:10)},
onDislikeClick:function(){if(1===this.model.get("userRating"))return void this.persistRating(-1);this.persistRating(1).done(s.a.bind(function(){this.model.server.get("playQueueManager").getFor(this.model).fetch().then(function(){l.a.trigger("shortcut:skipNext")})},this))}});t.a=c},function(e,t,n){"use strict";var i=n(2845),a=n.n(i),r=n(15),s=n(13),o=n(31),l=r.a.ItemView.extend({template:a.a,initialize:function(){var e=s.a("appModel");this.listenTo(e,"change:primaryServer",this.render),
this.listenTo(e.get("user"),"change:signedIn",this.render)},serializeData:function(){var e=s.a("appModel"),t=e.get("user"),n=e.get("primaryServer"),i={host:window.location.host,userAgent:window.navigator.userAgent,browser:o.a,user:t.toJSON(),hasPlexPass:t.hasPlexPass(),cloudServer:t.server.toJSON(),cloudServerUrl:t.server.url()};return n&&(i.primaryServer=n.toJSON(),i.primaryServerUrl=n.url()),i}});t.a=l},function(e,t,n){"use strict";var i=n(2847),a=n.n(i),r=n(15),s=r.a.ItemView.extend({
className:"logs-container",template:a.a,ui:{textarea:"textarea"},collectionEvents:{add:"onAdd"},onlyAfterRender:["onAdd"],serializeData:function(){return{logs:this.collection.toJSONString()}},onAdd:function(e,t){this.ui.textarea.text(this.collection.toJSONString())}});t.a=s},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(67),d=n(62),h=n(119),p=n(230),f=n(231),g=n(2304),m=n(202),v=h.a.extend({mountReact:function(){
var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=this.options.query,r=n.i(d.a)(c.f,this.options.serverID);o.a.render(a()(l.a,{store:e},void 0,a()(m.a,{serverEntityID:r})),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(p.a,{machineIdentifier:this.options.selectedServerID},void 0,a()(f.a,{},void 0,a()(g.a,{machineIdentifier:t,serverEntityID:r,query:i})))),this.ui.page[0])}});t.a=v},function(e,t,n){"use strict"
;var i=n(2848),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=o.a.ItemView.extend({className:"sign-in-form",template:a.a,validationFields:["username","email","password","confirm"],ui:{submitBtn:"[type=submit]",signInBtn:".sign-in-btn",signUpBtn:".sign-up-btn",username:".username-group",email:".email-group",password:".password-group",confirm:".confirm-group"},events:{"click .sign-in-btn":"onSignInClick","click .sign-up-btn":"onSignUpClick","blur input":"onInputBlur","submit form":"onSubmit"},
initialize:function(e){this.isFirstRun=e.isFirstRun,this.showRememberMe=e.showRememberMe,l.a("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},serializeData:function(){return{showRememberMe:this.showRememberMe}},validateAll:function(e,t,n){var i=!0;return t||(t=this.validationFields),s.a.each(t,s.a.bind(function(t){var a=e[t];this.validate(a,n[t],n)||(i=!1)},this)),i},validate:function(e,t,n){var i,a=e.id;if(s.a.indexOf(this.validationFields,a)<0)return!0;var r=this.ui[a]
;return i="confirm"===e.id?t===e.form.password.value:!!t,r.toggleClass("has-error",!i),i},onSignInClick:function(e){e.preventDefault(),this.ui.signInBtn.addClass("selected"),this.ui.signUpBtn.removeClass("selected"),this.$el.addClass("sign-in-form"),this.$el.removeClass("sign-up-form"),l.a("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},onSignUpClick:function(e){e.preventDefault(),this.ui.signInBtn.removeClass("selected"),this.ui.signUpBtn.addClass("selected"),
this.$el.removeClass("sign-in-form"),this.$el.addClass("sign-up-form"),l.a("metrics").trackView({page:"signup",firstRun:this.isFirstRun})},onInputBlur:function(e){var t=e.target,n="checkbox"===t.type?t.checked:t.value;this.validate(t,n)}});t.a=u},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(119),d=n(437),h=n(2148),p=a()(d.a,{selectedKey:"account"}),f=a()(h.a,{}),g=c.a.extend({mountReact:function(){var e=n.i(u.a)("appStore")
;o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,f),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(119),d=n(437),h=n(2153),p=a()(d.a,{selectedKey:"audio-subtitle-settings"}),f=a()(h.a,{}),g=c.a.extend({mountReact:function(){var e=n.i(u.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,f),this.ui.page[0])}})
;t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(119),d=n(437),h=n(2199),p=a()(d.a,{selectedKey:"plex-cloud"}),f=a()(h.a,{}),g=c.a.extend({mountReact:function(){var e=n.i(u.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,f),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),
n(48)),o=n.n(s),l=n(14),u=n(13),c=n(119),d=n(437),h=n(2317),p=a()(d.a,{selectedKey:"webhooks"}),f=a()(h.a,{}),g=c.a.extend({mountReact:function(){var e=n.i(u.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,p),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,f),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict"
;var i=n(2851),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(4),d=n(12),h=n(19),p=n(23),f=n(559),g=n(558),m=n(225),v=n(333),y=n(865),b=n(866),S=n(337),I=n(336),w=n(335),M=n(266),C=["episode","movie","clip","userPlaylistItem"],D={preventDefault:!0,stopPropagation:!1},P=u.a.ItemView.extend({className:"action-bar",template:a.a,ui:{primaryActions:".action-bar-nav",secondaryActions:".dropdown-menu",playBtn:".play-btn",playVersionBtn:".play-version-btn",playAllBtn:".play-all-btn",
playUnwatchedBtn:".play-unwatched-btn",playShuffledBtn:".play-shuffled-btn",playTrailerBtn:".play-trailer-btn",playNextBtn:".play-next-btn",addToQueueBtn:".add-to-queue-btn",addToPlaylistBtn:".add-to-playlist-btn",mergeBtn:".merge-btn",secondaryDivider:".secondary-divider",editBtn:".edit-btn",refreshBtn:".refresh-btn",analyzeBtn:".analyze-btn",markWatchedBtn:".mark-watched-btn",markUnwatchedBtn:".mark-unwatched-btn",syncBtn:".sync-btn",convertBtn:".convert-btn",watchLaterBtn:".watch-later-btn",
shareBtn:".share-btn",recommendBtn:".recommend-btn",deleteBtn:".delete-btn",deleteVersionsBtn:".delete-versions-btn",deleteFromUserPlaylistBtn:".delete-from-user-playlist-btn",infoBtn:".info-btn"},events:{"click .download-btn":"onDownloadClick"},triggers:{"click .play-btn":"play","click .play-version-btn":s.a.extend({event:"playVersion"},D),"click .play-all-btn":s.a.extend({event:"play"},D),"click .play-unwatched-btn":"playUnwatched","click .play-shuffled-btn":"playShuffled",
"click .play-trailer-btn":"playTrailer","click .edit-btn":"edit","click .refresh-btn":"refresh","click .analyze-btn":s.a.extend({event:"analyze"},D),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .match-btn":s.a.extend({event:"fixMatch"},D),"click .select-btn":"select","click .deselect-btn":"deselect","click .fix-match-btn":s.a.extend({event:"fixMatch"},D),"click .unmatch-btn":s.a.extend({event:"unmatch"},D),"click .split-apart-btn":s.a.extend({
event:"splitApart"},D),"click .merge-btn":s.a.extend({event:"merge"},D),"click .sync-btn":"sync","click .convert-btn":s.a.extend({event:"convert"},D),"click .watch-later-btn":s.a.extend({event:"watchLater"},D),"click .share-btn":s.a.extend({event:"share"},D),"click .recommend-btn":s.a.extend({event:"recommend"},D),"click .delete-btn":s.a.extend({event:"delete"},D),"click .delete-versions-btn":s.a.extend({event:"deleteVersions"},D),"click .delete-from-user-playlist-btn":s.a.extend({
event:"deleteFromUserPlaylist"},D),"click .info-btn":s.a.extend({event:"info"},D),"click .play-next-btn":s.a.extend({event:"playNext"},D),"click .add-to-queue-btn":s.a.extend({event:"addToQueue"},D),"click .add-to-playlist-btn":"addToPlaylist"},
onlyAfterRender:["onPlay","onPlayUnwatched","onPlayShuffled","onPlayTrailer","onEdit","onRefresh","onAnalyze","onMarkWatched","onMarkUnwatched","onSync","onWatchLater","onShare","onRecommend","onDelete","onDeleteFromUserPlaylist","onInfo","onPlayNext","onAddToQueue","onAddToPlaylist","onMerge","updateDropdown"],initialize:function(e){this.type=this.model.get("type"),this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,"change",s.a.throttle(this.updateDropdown,50)),
this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(d.a,{"shortcut:play":this.onPlay,"shortcut:edit":this.onEdit,"shortcut:refresh":this.onRefresh,"shortcut:analyze":this.onAnalyze,"shortcut:markWatched":this.onMarkWatched,"shortcut:markUnwatched":this.onMarkUnwatched,"shortcut:sync":this.onSync,"shortcut:delete":this.onDelete,"shortcut:info":this.onInfo}),this.listenTo(d.a,"shortcut:play",this.onPlayUnwatched),
this.listenTo(d.a,"shortcut:delete",this.onDeleteFromUserPlaylist)},serializeData:function(){var e=s.a.extend({},this.mediaActions.attributes);if(e.defaultLinkTarget="_self",e.isSingleItem=s.a.contains(C,this.type),this.mediaActions.get("showDownload")){e.downloadUrl=this.model.getDownloadUrl();var t=this.model.getFilepath();t&&(e.downloadName=h.getLastSegment(t))}return e},updateDropdown:function(){
var e=this.ui.secondaryActions.find("a:not(.hidden)"),t=e.hasClass("secondary-only"),n=e.length>2||t;if(this.$el.toggleClass("show-secondary-actions-dropdown",n),n){var i=this.ui.secondaryDivider,a=i.prevAll(":not(:has(.hidden))").length,r=i.nextAll(":not(:has(.hidden))").length;i.toggleClass("hidden",!a||!r)}},bindingsModel:"mediaActions",bindings:{".play-btn":{modelAttribute:"showPlay",manual:!0,autohide:!0},".play-version-btn":{modelAttribute:"showPlayVersion",manual:!0,autohide:!0},
".play-all-btn":{modelAttribute:"showPlayAll",manual:!0,autohide:!0},".play-unwatched-btn":{modelAttribute:"showPlayUnwatched",manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".play-next-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".add-to-queue-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".play-trailer-btn":{modelAttribute:"showPlayTrailer",manual:!0,autohide:!0},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",
manual:!0,autohide:!0},".edit-btn":{modelAttribute:"showEdit",manual:!0,autohide:!0},".refresh-btn":{modelAttribute:"showRefresh",manual:!0,autohide:!0},".analyze-btn":{modelAttribute:"showAnalyze",manual:!0,autohide:!0},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".match-btn":{modelAttribute:"showMatch",manual:!0,autohide:!0},".select-btn":{modelAttribute:"selecting",manual:!0,
autohide:function(e){return!e&&this.mediaActions.get("showSelect")}},".deselect-btn":{modelAttribute:"selecting",manual:!0,autohide:!0},".fix-match-btn":{modelAttribute:"showFixMatch",manual:!0,autohide:!0},".unmatch-btn":{modelAttribute:"showUnmatch",manual:!0,autohide:!0},".merge-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showMerge"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showMerge")&&!this.model.get("hasSelectedFolder")}},".split-apart-btn":{
modelAttribute:"showSplitApart",manual:!0,autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".watch-later-btn":{modelAttribute:"showWatchLater",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0},".delete-versions-btn":{
modelAttribute:"showDeleteVersions",manual:!0,autohide:!0},".delete-from-user-playlist-btn":{modelAttribute:"showDeleteFromUserPlaylist",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.updateDropdown()},onPlay:function(){this.ui.playBtn.isDisabled()&&this.ui.playAllBtn.isDisabled()||p.a.execute("playMedia",{items:this.mediaActions.getActionTargets()})},
onPlayVersion:function(){this.ui.playVersionBtn.isDisabled()||d.a.trigger("show:modal",new f.a({model:this.model}))},onDownloadClick:function(e){this.model.get("Media").length>1&&(e.preventDefault(),d.a.trigger("show:modal",new g.a({model:this.model})))},onPlayUnwatched:function(){this.ui.playUnwatchedBtn.isDisabled()||p.a.execute("playMedia",{items:this.mediaActions.getActionTargets(),unwatched:!0})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||p.a.execute("playMedia",{
items:this.mediaActions.getActionTargets(),shuffle:!0})},onPlayTrailer:function(){if(!this.ui.playTrailerBtn.isDisabled()){var e=this.model.get("extras"),t=e.get("metadataItems"),n=t.findWhere({key:this.model.get("primaryExtraKey")});p.a.execute("playMedia",{items:[n]})}},onEdit:function(){this.ui.editBtn.isDisabled()||(this.model.get("isPlaylist")?d.a.trigger("show:modal",new y.a({model:this.model})):d.a.trigger("show:modal",new v.a({mediaActions:this.mediaActions})))},onRefresh:function(){
this.ui.refreshBtn.isDisabled()||p.a.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onAnalyze:function(){this.ui.analyzeBtn.isDisabled()||p.a.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||p.a.execute("markWatched",{items:this.mediaActions.getActionTargets()})},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||p.a.execute("markUnwatched",{
items:this.mediaActions.getActionTargets()})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1)},onFixMatch:function(){d.a.trigger("show:modal",new b.a({model:this.model}))},onUnmatch:function(){p.a.execute("unmatch",{item:this.model})},onSplitApart:function(){p.a.execute("splitApart",{item:this.model})},onSync:function(){this.ui.syncBtn.isDisabled()||p.a.execute("showSyncModal",{item:this.model,
items:this.mediaActions.getActionTargets()})},onConvert:function(){d.a.trigger("show:modal",new M.a({item:this.model,items:this.mediaActions.getActionTargets()}))},onWatchLater:function(){this.ui.watchLaterBtn.isDisabled()||p.a.execute("watchLater",{item:this.model})},onShare:function(){this.ui.shareBtn.isDisabled()||d.a.trigger("show:modal",new S.a({model:this.model}))},onRecommend:function(){this.ui.recommendBtn.isDisabled()||d.a.trigger("show:modal",new I.a({model:this.model}))},
onDelete:function(){this.ui.deleteBtn.isDisabled()||(this.model.get("playlistType")?p.a.execute("deletePlaylist",{item:this.model}):p.a.execute("deleteItems",{items:this.mediaActions.getActionTargets()}))},onDeleteVersions:function(){this.ui.deleteBtn.isDisabled()||p.a.execute("deleteVersions",{item:this.model})},onDeleteFromUserPlaylist:function(){if(!this.ui.deleteFromUserPlaylistBtn.isDisabled()){this.model.destroy().done(s.a.bind(function(){l()(".tooltip").remove(),
d.a.trigger("navigate","userPlaylist",{key:this.model.userPlaylistKey})},this))}},onInfo:function(){this.ui.infoBtn.isDisabled()||d.a.trigger("show:modal",new w.a({model:this.model}))},onPlayNext:function(){this.ui.playNextBtn.isDisabled()||p.a.execute("queueMedia",{item:this.model,next:!0})},onAddToQueue:function(){this.ui.addToQueueBtn.isDisabled()||p.a.execute("queueMedia",{item:this.model,next:!1})},onAddToPlaylist:function(){
this.ui.addToPlaylistBtn.isDisabled()||d.a.trigger("show:modal",new m.a({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),t=s.a.first(e),n=e.slice(1);p.a.execute("merge",{item:t,items:n})}},onSelectedItemsChange:function(e,t){var i=t&&t.length?n.i(c.default)("Play selected"):n.i(c.default)("Play All")
;this.ui.playBtn.attr("data-original-title",i)}});t.a=P},function(e,t,n){"use strict";var i=n(2852),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(12),u=n(1968),c=o.a.Layout.extend({className:"playlists-side-bar-container",template:a.a,regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar"},onlyAfterRender:["onToggleSidebar"],initialize:function(){this.listenTo(l.a,{"shortcut:sidebar":this.onToggleSidebar})},onRender:function(){this.$el.tooltip({selector:".nav > li > a",
container:"body",placement:"right"}),this.sidebar.append(new u.a({model:this.model}),this.$el)},onToggleSidebar:function(){s()(".tooltip").remove();var e=this.sidebar.currentView;e.hidden?e.open():e.hide()}});t.a=c},function(e,t,n){"use strict";var i=n(2853),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(108),c=n(324),d=n(1728),h=n(1732),p=n(1729),f=n(1730),g={alerts:d.a,sync:h.a,conversion:p.a,nowPlaying:f.a},m=o.a.Layout.extend({className:"container",template:a.a,ui:{
conversionBadge:".conversion-btn > .badge",nowPlayingBadge:".now-playing-btn > .badge"},regions:{container:".activity-container"},bindings:{".sync-btn":{autohide:function(){return this.model.get("sync")}},".conversion-btn":{autohide:function(){return this.model.get("backgroundProcessing")}}},initialize:function(e){this.options=e,this.subset=e.subset||"alerts",(0,n.i(l.a)("appStore").dispatch)(n.i(u.a)({allowLightPreset:!1}));var t=new c.a([],{server:this.model,persistInCache:!0});this.subsets={
conversion:t,nowPlaying:this.model.get("desktop").get("sessions")},this.listenTo(this.subsets.conversion,"reset add remove",this.updateBadges),this.listenTo(this.subsets.nowPlaying,"reset add remove",this.updateBadges)},serializeData:function(){return{subset:this.subset}},updateBadges:function(){var e={conversion:this.subsets.conversion.length,nowPlaying:this.subsets.nowPlaying.length};s.a.each(s.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)
},onRender:function(){var e=g[this.subset];this.container.show(new e(this.options)),this.updateBadges()}});t.a=m},function(e,t,n){"use strict";var i=n(2854),a=n.n(i),r=n(15),s=n(13),o=n(4),l=n(12),u=n(331),c=n(1789),d=r.a.Layout.extend({className:"alerts-container",template:a.a,ui:{pageCount:".page-count",previousBtn:".previous-btn",nextBtn:".next-btn"},regions:{serverDropdown:".filter-bar",list:".alert-list-container"},modelEvents:{"change:shared":"onSharedChange"},collectionEvents:{
add:"onAlertAdd"},events:{"click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick"},onlyAfterRender:["onAlertAdd"],initialize:function(){var e=s.a("appModel");this.shared=this.model.get("shared"),this.page=1,this.listCollection=this.collection.clone(this.collection.page(this.page,{reverse:!0})),this.listCollection.stopListening(),e.set("primaryServer",this.model),this.listenTo(e,"change:primaryServer",this.onPrimaryServerChange)},serializeData:function(){
var e=this.collection.pages();return{shared:this.shared,page:this.page,pages:e,enablePrevious:this.page>1,enableNext:this.page<e}},updatePages:function(){var e=this.collection.pages();this.ui.pageCount.text(n.i(o.default)("{1} of {2}",this.page,e)),this.ui.previousBtn.toggleClass("disabled",this.page<2),this.ui.nextBtn.toggleClass("disabled",this.page>=e)},updateList:function(){this.listCollection.reset(this.collection.page(this.page,{reverse:!0}))},onRender:function(){
this.serverDropdown.append(new u.a),this.shared||this.list.append(new c.a({collection:this.listCollection}))},onPrimaryServerChange:function(e,t){t&&l.a.trigger("navigate","alerts",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onAlertAdd:function(e,t){this.shared||(this.updatePages(),this.updateList())},onPreviousClick:function(e){e.preventDefault(),this.ui.previousBtn.isDisabled()||(this.page--,this.updatePages(),this.updateList())},onNextClick:function(e){
e.preventDefault(),this.ui.nextBtn.isDisabled()||(this.page++,this.updatePages(),this.updateList())}});t.a=d},function(e,t,n){"use strict";var i=n(2855),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(4),c=n(12),d=n(156),h=n(688),p=n(1173),f=n(331),g=n(1798),m=n(1799),v=o.a.Layout.extend({className:"conversion-container",template:a.a,ui:{filterBar:".filter-bar",pauseBtn:".pause-btn",resumeBtn:".resume-btn",divider:".conversion-queue-divider"},regions:{filterBar:".filter-bar",
upNextList:".conversion-queue-up-next-list-region",afterUpNextList:".conversion-queue-after-up-next-list-region",emptyRegion:".conversion-queue-empty-region"},events:{"click .pause-btn":"onTogglePauseClick","click .resume-btn":"onTogglePauseClick"},initialize:function(e){var t=l.a("appModel");this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,this.generators=e.generators,this.items=this.playQueue.get("collection"),this.upNextItems=new h.a(this.items,{playQueue:this.playQueue,
includeSelectedItem:!0}),this.afterUpNextItems=new p.a(this.items,{playQueue:this.playQueue}),this.settings=this.model.get("desktop").get("settings"),this.pausedSetting=this.settings.get("BackgroundQueueIdlePaused"),t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.upNextItems,"reset add remove",this.onUpNextChange),this.listenTo(this.afterUpNextItems,"reset add remove",this.onAfterUpNextChange)},serializeData:function(){
return{serverID:this.model.id,shouldShowList:this.model.supports("streamReady"),shouldShowDivider:!!this.afterUpNextItems.length,minServerVersion:d.a.streamReady,hasPausedSetting:!!this.pausedSetting,isPaused:this.pausedSetting&&this.pausedSetting.get("value"),errorMessage:this.getErrorMessage()}},toggleEmptyView:function(){var e=this.upNextItems.length+this.afterUpNextItems.length>0;e?this.emptyRegion.close():this.emptyRegion.show(new m.a({model:this.model})),
this.$el.toggleClass("is-empty",!e),this.ui.filterBar.toggleClass("hide-actions",!e)},getErrorMessage:function(){var e=this.generators.reduce(function(e,t){var n=t.get("status");return"failed"===n.get("state")?e+=Math.max(n.get("itemsCount"),1):n.get("itemsFailedCount")&&(e+=n.get("itemsFailedCount")),e},0);if(e)return 1===e?n.i(u.default)("There was a problem converting 1 item."):n.i(u.default)("There were problems converting {1} items.",e)},onRender:function(){this.filterBar.append(new f.a)
;var e={playQueue:this.playQueue},t={playQueue:this.playQueue,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting};this.upNextList.show(new g.a(s.a.extend({},e,{collection:this.upNextItems,itemViewOptions:t,sortableOptions:{sort:!0,group:{name:"upNext",pull:!1,put:["afterUpNext"]}}}))),this.afterUpNextList.show(new g.a(s.a.extend({},e,{collection:this.afterUpNextItems,itemViewOptions:s.a.extend({},t,{hideDragHandle:!0}),sortableOptions:{sort:!1,group:{name:"afterUpNext",pull:!0,
put:!1}}}))),this.toggleEmptyView()},onClose:function(){this.upNextItems.destroy(),this.afterUpNextItems.destroy()},onPrimaryServerChange:function(e,t){t&&c.a.trigger("navigate","conversion",{serverID:t.id})},onUpNextChange:function(){this.toggleEmptyView()},onAfterUpNextChange:function(){this.ui.divider.toggleClass("hidden",!this.afterUpNextItems.length),this.toggleEmptyView()},onTogglePauseClick:function(e){e.preventDefault();var t=this.pausedSetting.get("value")
;this.ui.pauseBtn.toggleClass("hidden",!t),this.ui.resumeBtn.toggleClass("hidden",t),this.pausedSetting.set("value",!t),this.settings.first().save(this.pausedSetting.id,t?0:1)}});t.a=v},function(e,t,n){"use strict";var i=n(2856),a=n.n(i),r=n(15),s=n(13),o=n(12),l=n(156),u=n(331),c=n(1791),d=r.a.Layout.extend({className:"now-playing-container",template:a.a,regions:{filterBar:".filter-bar",list:".sessions-list-container"},modelEvents:{"change:shared":"onSharedChange"},shouldShowList:function(){
return!this.shared&&!this.synced&&this.supported},initialize:function(e){var t=s.a("appModel");this.shared=this.model.get("shared"),this.synced=!this.model.get("isFullServer"),this.supported=this.model.supports("publicNowPlaying")||this.model.get("myPlexSubscription"),t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange)},serializeData:function(){return{shouldShowList:this.shouldShowList(),shared:this.shared,synced:this.synced,
minServerVersion:l.a.publicNowPlaying}},poll:function(){this.pollTimeoutID=setTimeout(this.whenRendered(this.refreshList),5e3)},refreshList:function(){this.collection.length&&this.collection.fetch(),this.poll()},onRender:function(){clearTimeout(this.pollTimeoutID),this.filterBar.append(new u.a),this.shouldShowList()&&(this.list.show(new c.a({collection:this.collection})),this.refreshList())},onPrimaryServerChange:function(e,t){t&&o.a.trigger("navigate","nowPlaying",{serverID:t.id})},
onSharedChange:function(e,t){this.shared=t,this.render()}});t.a=d},function(e,t,n){"use strict";var i=n(2857),a=n.n(i),r=n(15),s=n(4),o=n(184),l=n(1794),u=r.a.Layout.extend({className:"sync-device-items-container",template:a.a,ui:{loading:".row-loading",empty:".sync-empty-message",deviceMessage:".sync-device-message",deviceMessageText:".sync-device-message-text"},regions:{list:".sync-item-list-container"},
onlyAfterRender:["updateLoading","updateEmptyMessage","updateStatusMessage","updateSyncList"],initialize:function(e){var t=this;this.server=e.server;var n=this.model.get("syncList");n?n.fetch({scope:"page"}).done(function(){t.onSyncItemsReset()}):this.onSyncItemsReset()},updateLoading:function(){this.ui.loading.addClass("hidden")},updateEmptyMessage:function(){var e=this.syncList,t=!e||0===e.getCollection().length;this.ui.empty.toggleClass("hidden",!t)},updateStatusMessage:function(){
var e=this.syncList,t=!e||e.get("isActive");if(this.ui.deviceMessage.toggleClass("hidden",t),!t){var i=this.syncList.device,a=i.get("lastSeenAt");if(!a)return;this.ui.deviceMessageText.text(n.i(s.default)("{1} was last seen {2}. Syncing will resume next time you launch Plex on this device.",i.get("name"),n.i(o.a)(a)))}},updateSyncList:function(){var e=this.syncList;e&&this.list.show(new l.a({collection:e.getCollection(),itemViewOptions:{server:this.server}}))},onSyncItemsReset:function(){
var e=this.model.get("syncList");e&&(this.syncList=e.clone(),this.syncList.resetToServer(this.server.id),this.listenTo(this.syncList,"reset update",this.onSyncItemsChange)),this.updateLoading(),this.updateEmptyMessage(),this.updateStatusMessage(),this.updateSyncList()},onSyncItemsChange:function(){this.updateEmptyMessage()}});t.a=u},function(e,t,n){"use strict"
;var i=n(2858),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(4),h=n(12),p=n(66),f=n(23),g=n(331),m=n(1731),v=u.a.Layout.extend({className:"sync-container",template:a.a,transcodeJobDelay:2e3,ui:{devices:".nav a"},regions:{filterBar:".filter-bar",container:".sync-device-container"},modelEvents:{"change:shared":"onSharedChange"},events:{"click .nav a":"onDeviceClick","click .edit-btn":"onEditClick","click .refresh-btn":"onRefreshClick",
"click .cloud-sync-settings-btn":"onCloudSyncSettingsClick"},initialize:function(e){var t=c.a("appModel");this.selectedDevice=e.selectedDevice,this.user=t.get("user"),this.shared=this.model.get("shared"),this.transcodeJobs=this.model.get("desktop").get("transcodeJobs"),this.allowSync=this.model.get("allowSync"),this.signedIn="ok"===this.model.get("myPlexSigninState"),t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),
this.collection.length&&(this.selectedDevice||(this.selectedDevice=this.collection.first()),this.fetchTranscodeJobs())},serializeData:function(){return{shared:this.shared,hasTouchScreen:p.a.hasTouchScreen,signedIn:this.signedIn,allowSync:this.allowSync,sync:this.model.get("sync"),selectedDevice:this.selectedDevice?this.selectedDevice.toJSON():null,devices:this.collection.toJSON(),plexPassInfo:this.getPlexPassInfo()}},fetchTranscodeJobs:function(){this.transcodeJobs.fetch({reset:!0,scope:"page"
}),this.transcodeJobTimeout=setTimeout(s.a.bind(this.fetchTranscodeJobs,this),this.transcodeJobDelay)},showList:function(){this.selectedDevice?this.container.show(new m.a({model:this.selectedDevice,server:this.model})):this.container.close()},getPlexPassInfo:function(){return this.signedIn||this.shared?{url:this.user.server.get("plexPassUrl"),message:n.i(d.default)("The server needs a Plex Pass to use sync."),buttonText:n.i(d.default)("Learn More"),target:"_blank",showButton:!this.shared}:{
url:"#!/settings/server",message:n.i(d.default)("The server needs to be signed in with a Plex Pass to use sync."),buttonText:n.i(d.default)("Sign In"),target:"_self",showButton:!0}},onRender:function(){this.filterBar.append(new g.a({showSharedServers:!0})),this.allowSync&&this.showList()},onClose:function(){clearTimeout(this.transcodeJobTimeout)},onPrimaryServerChange:function(e,t){t&&h.a.trigger("navigate","sync",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},
onDeviceClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id");this.ui.devices.removeClass("selected"),t.addClass("selected"),this.selectedDevice=this.collection.get(n),this.showList()},onEditClick:function(e){e.preventDefault(),l()(e.currentTarget).toggleClass("selected"),this.$el.toggleClass("force-hover")},onRefreshClick:function(e){e.preventDefault();var t=f.a.execute("refreshSyncLists",{server:this.model});this.selectedDevice&&t.always(this.whenRendered(function(){
this.selectedDevice.get("syncList").fetch({reset:!0,scope:"page"})}))},onCloudSyncSettingsClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=c.a("appModel"),n=t.get("user");window.open(n.server.get("cloudSyncUrl"))}});t.a=v},function(e,t,n){"use strict";var i=n(2861),a=n.n(i),r=n(2),s=n.n(r),o=n(1390),l=n(264),u=l.a.extend({className:"alert-bar notify",template:a.a,events:s.a.extend({"click .info-link":"onInfoClick"},l.a.prototype.events),initialize:function(){
this.listenTo(this.model,"change:read",this.hide)},serializeData:function(){var e=this.model.get("content");return{content:n.i(o.a)(e),url:this.model.get("url")}},onInfoClick:function(e){this.hide(),this.model.markAsRead()},onCloseClick:function(e){l.a.prototype.onCloseClick.apply(this,arguments),this.model.markAsRead()}});t.a=u},function(e,t,n){"use strict";var i=n(2862),a=n.n(i),r=n(2),s=n.n(r),o=n(13),l=n(12),u=n(66),c=n(46),d=n(68),h=n(264),p=h.a.extend({name:"ClaimServerAlertBarView",
className:"claim-server-alert-bar alert-bar notify",template:a.a,events:s.a.extend({"click .claim-link":"onClaimClick","click .reload-link":"onReloadClick"},h.a.prototype.events),initialize:function(){h.a.prototype.initialize.apply(this,arguments);var e=n.i(o.a)("appModel").get("settings"),t=e.get("viewedUnclaimedServers");this.model.id&&t.indexOf(this.model.id)===-1&&(n.i(o.a)("metrics").trackView({page:c.H,mode:"banner"},{interaction:!1}),
e.save("viewedUnclaimedServers",t.concat(this.model.id)))},serializeData:function(){return{showInsecureMessage:u.a.isHostedHttps&&!this.model.get("isSecure")}},onClaimClick:function(e){e.preventDefault(),n.i(o.a)("metrics").trackClick({action:d.l,page:c.H,mode:"banner"}),l.a.trigger("navigate","serverSettings",{serverID:this.model.id}),this.hide()},onReloadClick:function(e){e.preventDefault(),window.location=this.model.resolveUrl("/web",{connection:this.model.get("connections").first()}),
this.hide()},onCloseClick:function(e){h.a.prototype.onCloseClick.apply(this,arguments);var t=n.i(o.a)("appModel").get("settings"),i=t.get("dismissedUnclaimedServers");this.model.id&&i.indexOf(this.model.id)===-1&&(n.i(o.a)("metrics").trackClick({action:d.g,page:c.H,mode:"banner"}),t.save("dismissedUnclaimedServers",i.concat(this.model.id)))}});t.a=p},function(e,t,n){"use strict";var i=n(2863),a=n.n(i),r=n(2),s=n.n(r),o=n(13),l=n(89),u=n(264),c=u.a.extend({className:"alert-bar notify",
template:a.a,events:s.a.extend({"click .setup-link":"onSetupClick"},u.a.prototype.events),serializeData:function(){var e=encodeURIComponent(this.options.machineIdentifier);return{model:this.model.get("model"),encodedMachineIdentifier:e}},disableDevice:function(){var e=n.i(o.a)("appStore"),t=this.options.serverEntityID;t&&e.dispatch(n.i(l.B)({serverEntityID:t,deviceID:this.model.id,enabled:!1}))},onSetupClick:function(){this.hide(),this.disableDevice()},onCloseClick:function(e){
u.a.prototype.onCloseClick.apply(this,arguments),this.disableDevice()}});t.a=c},function(e,t,n){"use strict";var i=n(2864),a=n.n(i),r=n(2),s=n.n(r),o=n(13),l=n(4),u=n(12),c=n(530),d=n(23),h=n(809),p=n(264),f=p.a.extend({className:"alert-bar server-update-alert-bar notify",template:a.a,events:s.a.extend({"click .download-link":"onDownloadClick","click .install-link":"onInstallClick","click .skip-version-link":"onSkipThisVersionClick"},p.a.prototype.events),initialize:function(){
this.server=this.model.server},serializeData:function(){var e=n.i(o.a)("appModel"),t=e.get("user").server;return{state:this.model.get("state"),downloadURL:this.model.get("downloadURL")||t.get("appsUrl"),version:n.i(c.a)(this.model.get("version")),serverUpdateAvailableMessage:n.i(l.default)("A Plex Media Server update is available for the server {serverName}!",{serverName:this.model.server.get("friendlyName")})}},onDownloadClick:function(e){e.preventDefault(),d.a.execute("checkForServerUpdates",{
server:this.server,download:!0,initialState:"downloading"}),u.a.trigger("navigate","serverSettings",{serverID:this.server.id})},onInstallClick:function(e){e.preventDefault(),this.model.set("shouldInstall",!0),u.a.trigger("navigate","serverSettings",{serverID:this.server.id})},onSkipThisVersionClick:function(e){p.a.prototype.onCloseClick.apply(this,arguments);var t=n.i(c.a)(this.model.get("version"))||h.b;n.i(o.a)("appModel").get("settings").save("serverUpdateDismissedVersion",t)}});t.a=f
},function(e,t,n){"use strict";var i=n(2865),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(12),u=o.a.ItemView.extend({className:"alert alert-status transition-out",template:a.a,coolDown:!1,alertDuration:5e3,coolDownDuration:5e3,ui:{status:".status"},events:{mouseover:"onMouseOver"},onlyAfterRender:["onShowStatus"],initialize:function(e){s.a.bindAll(this,"hide"),this.listenTo(l.a,"show:status",this.onShowStatus)},hide:function(){this.$el.addClass("transition-out")},onShowStatus:function(e,t){
this.coolDown||(this.server=e,this.ui.status.text(t),this.$el.removeClass("transition-out"),this.inactivityTimeout=clearTimeout(this.inactivityTimeout),this.inactivityTimeout=setTimeout(this.hide,this.alertDuration))},onMouseOver:function(e){this.inactivityTimeout=clearTimeout(this.inactivityTimeout),this.hide(),this.coolDown=!0,setTimeout(s.a.bind(function(){this.coolDown=!1},this),this.coolDownDuration)}});t.a=u},function(e,t,n){"use strict"
;var i=n(2866),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(12),d=n(180),h=n(407),p=u.a.Layout.extend({className:"breadcrumb-bar",template:a.a,ui:{listSelectedIcons:"#channel-list-dropdown .dropdown-selected-icon"},events:{"click .settings-btn":"onSettingsClick","click .list-btn":"onListClick"},initialize:function(e){this.currentListType=e.currentListType,this.prefsKey=this.model.get("prefsKey"),!this.prefsKey&&this.model.channel&&(this.prefsKey=this.model.channel.get("prefsKey")),
this.shared=this.model.server.get("shared")},serializeData:function(){var e=this.model.channel||this.model,t=e?e.get("title"):this.model.get("title"),n=e?e.id:e.get("identifier"),i="#!/server/"+encodeURIComponent(this.model.server.id);return i+="/channel/"+encodeURIComponent(n),{channelTitle:t,channelUrl:i,title:this.model.channel?this.model.get("title"):null,totalSize:this.model.get("metadataList").getCollection().length,showSettings:!!this.prefsKey&&!this.shared,listType:this.currentListType}
},onSettingsClick:function(e){e.preventDefault();var t=new d.a([],{server:this.model.server,url:this.prefsKey});t.fetch().done(s.a.bind(function(){c.a.trigger("show:modal",new h.a({model:this.model.channel||this.model,collection:t}))},this))},onListClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("type");this.trigger("change:listType",n),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")}});t.a=p},function(e,t,n){
"use strict";var i=n(2867),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(13),u=n(12),c=n(59),d=n(1759),h=o.a.Layout.extend({className:"details-breadcrumb-bar breadcrumb-bar",template:a.a,ui:{previousBtn:".previous-btn",nextBtn:".next-btn",listSelectedIcons:"#section-list-dropdown .dropdown-selected-icon"},regions:{currentItem:".current-item",grandparentItem:".grandparent-item",siblingsDropdown:".siblings-dropdown",parentsDropdown:".parents-dropdown"},events:{"click .playlists-btn":"onPlaylistsClick",
"click .section-btn":"onSectionClick","click .list-btn":"onListClick","click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick"},onlyAfterRender:["onSiblingsPopulate","onParentsPopulate"],initialize:function(e){var t=this.model.get("parentKey");if(!t)return void this.onSiblingsPopulate(!1);var n,i={server:this.model.server,section:this.model.section},a=this.parent=new c.a({key:t},i),r=a.populate({scope:"page"});r=r.then(function(){return n=a.get("children"),n.populate({scope:"page"
})}),r.done(this.onSiblingsPopulate);var s=this.model.get("grandparentKey");if(s){var o=this.grandparent=new c.a({key:s},i),l=o.populate({scope:"page"});l=l.then(function(){return o.get("children").populate({scope:"page"})}),l.done(this.onParentsPopulate)}},serializeData:function(){var e=this.model.server,t=this.model.section,n=t||this.model.get("playlistType");return{serverID:e.id,showSectionDropdown:n,showPlaylists:this.model.server.supports("playlists"),sections:e.get("sections").toJSON(),
section:t?t.toJSON():null,item:this.model.toJSON(),parent:this.parent?this.parent.toJSON():null,grandparent:this.grandparent?this.grandparent.toJSON():null,listType:this.getListType()}},getListTypeSettingKey:function(){return(this.model.section||this.model.server).getScopedKey("episodeListType")},getListType:function(){if("season"===this.model.get("type")){return n.i(l.a)("appModel").get("settings").get(this.getListTypeSettingKey())||"episode-tile-list"}return null},previous:function(){
this.previousSibling&&u.a.trigger("navigate","details",{serverID:this.model.server.id,key:this.previousSibling.get("key")})},next:function(){this.nextSibling&&u.a.trigger("navigate","details",{serverID:this.model.server.id,key:this.nextSibling.get("key")})},onSiblingsPopulate:function(e){if(!e)return this.currentItem.show(new d.a({model:this.model,isLeaf:!0})),void this.currentItem.$el.removeClass("hidden");var t=e.get("metadataItems"),n=t.get(this.model.id),i=t.indexOf(n)
;i>0&&(this.previousSibling=t.at(i-1)),i<t.length-1&&(this.nextSibling=t.at(i+1)),this.ui.previousBtn.toggleClass("disabled",!this.previousSibling),this.ui.nextBtn.toggleClass("disabled",!this.nextSibling),this.ui.previousBtn.removeClass("hidden"),this.ui.nextBtn.removeClass("hidden"),this.grandparent||(this.grandparentItem.show(new d.a({model:this.parent})),this.grandparentItem.$el.removeClass("hidden")),this.siblingsDropdown.show(new d.a({id:"siblings-dropdown",model:this.model,collection:t
})),this.siblingsDropdown.$el.removeClass("hidden")},onParentsPopulate:function(e){this.grandparentItem.show(new d.a({model:this.grandparent})),this.grandparentItem.$el.removeClass("hidden"),this.parentsDropdown.show(new d.a({id:"parents-dropdown",model:this.parent,collection:e.get("metadataItems")})),this.parentsDropdown.$el.removeClass("hidden")},onSectionClick:function(e){e.preventDefault();var t=s()(e.currentTarget),n=t.data("key");u.a.trigger("navigate","section",{
serverID:this.model.server.id,sectionID:n})},onPlaylistsClick:function(e){e.preventDefault(),u.a.trigger("navigate","playlists",{serverID:this.model.server.id})},onListClick:function(e){e.preventDefault();var t=s()(e.currentTarget),i=t.data("type");n.i(l.a)("appModel").get("settings").save(this.getListTypeSettingKey(),i),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")},onPreviousClick:function(e){e.preventDefault(),this.previous()},
onNextClick:function(e){e.preventDefault(),this.next()}});t.a=h},function(e,t,n){"use strict";var i=n(2868),a=n.n(i),r=n(15),s=n(4),o=n(12),l=n(1764),u=n(1762),c=n(1877),d=r.a.Layout.extend({className:"breadcrumb-bar",template:a.a,ui:{itemsBadge:".items-badge"},regions:{sectionDropdown:".breadcrumb-dropdown",typeDropdown:".breadcrumb-subset-dropdown"},events:{"click .import-btn":"onImportClick"},initialize:function(){
this.listenTo(this.model.get("items").get("playlists"),"reset update",this.onSizeChange);var e=this.model.server.get("isFullOwnedServer"),t=this.model.server.get("sections").where({type:"artist"}).length>0;this.canImportPlaylists=e&&t},serializeData:function(){return{totalSize:this.model.get("items").get("playlists").length,canImportPlaylists:this.canImportPlaylists}},onRender:function(){this.sectionDropdown.show(new l.a({title:n.i(s.default)("Playlists"),model:this.model,
collection:this.model.server.get("sections")})),this.typeDropdown.show(new u.a({model:this.model}))},onSizeChange:function(){this.ui.itemsBadge.text(this.model.get("items").get("playlists").length)},onImportClick:function(e){this.limited||(e.preventDefault(),o.a.trigger("show:modal",new c.a({server:this.model.server})))}});t.a=d},function(e,t,n){"use strict";var i=n(2869),a=n.n(i),r=n(15),s=n(13),o=n(108),l=n(684),u=n(1801),c=n(1803),d=r.a.Layout.extend({className:"container",template:a.a,
regions:{list:".directory-container"},onlyAfterRender:["onUpdate"],initialize:function(e){(0,n.i(s.a)("appStore").dispatch)(n.i(o.a)({allowLightPreset:!1})),this.currentKey=e.currentKey,this.currentPath=e.currentPath,this.currentKey||(this.currentKey=this.collection.first().get("key")),this.currentPath||(this.currentPath=this.currentKey),this.channelList=new l.a({key:this.currentPath},{server:this.collection.server}),this.channelList.fetch({scope:"page"}).always(this.onUpdate)},
serializeData:function(){return{directories:this.collection.toJSON(),serverID:this.collection.server.id,currentKey:this.currentKey}},onUpdate:function(){var e,t={collection:this.channelList.get("channels"),itemViewOptions:{currentKey:this.currentKey}};e="Store:Info"===this.channelList.get("viewGroup")?new c.a(t):new u.a(t),this.list.show(e)}});t.a=d},function(e,t,n){"use strict"
;var i=n(2870),a=n.n(i),r=n(15),s=n(12),o=n(13),l=n(1287),u=n(108),c=n(131),d=n(1738),h=n(1840),p=n(1838),f=n(1839),g=r.a.Layout.extend({className:"channel-container",template:a.a,regions:{list:".channel-list-container"},initialize:function(e){var t=n.i(o.a)("appStore").dispatch;t(n.i(u.a)({allowLightPreset:!1})),this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems");var i=this.model.get("header"),a=this.model.get("message");(i||a)&&s.a.trigger("show:alert",{message:a||i
}),this.searchKey=this.model.get("searchKey"),this.searchPlaceholder=this.model.get("title"),!this.searchKey&&this.model.channel&&(this.searchKey=this.model.channel.get("searchKey"),this.searchPlaceholder=this.model.channel.get("title"));var r=this.model.channel||this.model,h=r.id?r.id:r.get("identifier");this.searchKey&&t(c.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),channelPlaceholder:this.searchPlaceholder,channelID:h,channelSearchKey:this.searchKey})),
this.listType=l.a.getListType(this.model);var p=new d.a({model:this.model,currentListType:this.listType});this.listenTo(p,"change:listType",this.onListTypeChange),s.a.trigger("show:bar","breadcrumbbar",p),s.a.trigger("show:background",{model:this.model,dim:!0})},getListConstructor:function(){switch(this.listType){case l.a.types.tileList:return h.a;case l.a.types.detailsList:return p.a;default:return f.a}},onRender:function(){var e=this.getListConstructor();this.list.append(new e({
listModel:this.listModel,collection:this.collection,paginated:!1}),this.$el)},onClose:function(){(0,n.i(o.a)("appStore").dispatch)(c.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),channelPlaceholder:null,channelID:null,channelSearchKey:null})),s.a.trigger("hide:bar","breadcrumbbar")},onListTypeChange:function(e){this.listType=e,this.listModel.scrollPosition=0,this.list.currentView.scrollPosition=0,this.render()}});t.a=g},function(e,t,n){"use strict"
;var i=n(2871),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(23),h=n(108),p=n(1805),f=u.a.Layout.extend({className:"container",template:a.a,ui:{navLinks:".nav a",checkUpdatesBtn:".check-updates-btn"},regions:{list:".channels-container"},events:{"click .nav a":"onNavClick","click .all-btn":"onAllClick","click .video-btn":"onVideoClick","click .music-btn":"onMusicClick","click .photo-btn":"onPhotoClick","click .check-updates-btn":"onCheckUpdatesClick"},initialize:function(){(0,
n.i(c.a)("appStore").dispatch)(n.i(h.a)({allowLightPreset:!1})),this.videoCollection=this.collection.filterByType("video"),this.musicCollection=this.collection.filterByType("music"),this.photoCollection=this.collection.filterByType("photos"),this.shared=this.collection.server.get("shared")},serializeData:function(){return{serverID:this.collection.server.id,allCount:this.collection.length,videoCount:this.videoCollection.length,musicCount:this.musicCollection.length,
photoCount:this.photoCollection.length,shared:this.shared}},onRender:function(){this.list.show(new p.a({collection:this.collection}))},onNavClick:function(e){this.ui.navLinks.removeClass("selected"),l()(e.currentTarget).addClass("selected")},onAllClick:function(e){e.preventDefault(),this.list.show(new p.a({collection:this.collection}))},onVideoClick:function(e){e.preventDefault(),this.list.show(new p.a({collection:this.videoCollection}))},onMusicClick:function(e){e.preventDefault(),
this.list.show(new p.a({collection:this.musicCollection}))},onPhotoClick:function(e){e.preventDefault(),this.list.show(new p.a({collection:this.photoCollection}))},onCheckUpdatesClick:function(e){e.preventDefault();var t=this.ui.checkUpdatesBtn;if(!t.hasClass("active")){t.addClass("active");d.a.execute("updateChannel",{server:this.collection.server}).always(s.a.bind(function(){t.removeClass("active")},this))}}});t.a=f},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),
n(48)),o=n.n(s),l=n(14),u=n(13),c=n(852),d=n(2269),h=a()(d.a,{}),p=c.a.extend({mountReact:function(){var e=n.i(u.a)("appStore");o.a.render(a()(l.a,{store:e},void 0,h),this.ui.page[0])}});t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(67),d=n(62),h=n(119),p=n(921),f=n(202),g=a()(f.a,{}),m=h.a.extend({mountReact:function(){var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=n.i(d.a)(c.f,t);o.a.render(a()(l.a,{store:e
},void 0,g),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(p.a,{serverEntityID:i})),this.ui.page[0])}});t.a=m},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(67),d=n(62),h=n(119),p=n(202),f=n(230),g=n(231),m=n(2193),v=a()(p.a,{}),y=h.a.extend({mountReact:function(){var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=this.options.selectedProviderID,r=this.options.params||{},s=n.i(d.a)(c.f,t),h=n.i(d.a)(c.e,i,s)
;o.a.render(a()(l.a,{store:e},void 0,v),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(f.a,{machineIdentifier:t},void 0,a()(g.a,{providerEntityID:h},void 0,a()(m.a,{machineIdentifier:t,serverEntityID:s,providerEntityID:h,listKey:r.key,listTitle:r.title,listType:r.type})))),this.ui.page[0])}});t.a=y},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),
n(48)),o=n.n(s),l=n(14),u=n(13),c=n(222),d=n(62),h=n(119),p=n(230),f=n(231),g=n(597),m=n(202),v=a()(m.a,{}),y=h.a.extend({mountReact:function(){var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=this.options.params||{},r=n.i(d.a)(c.SERVER,t);o.a.render(a()(l.a,{store:e},void 0,v),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(p.a,{machineIdentifier:this.options.selectedServerID},void 0,a()(f.a,{},void 0,a()(g.a,{machineIdentifier:t,serverEntityID:r,directoryKey:i.key
})))),this.ui.page[0])}});t.a=y},function(e,t,n){"use strict";var i=n(2872),a=n.n(i),r=n(1150),s=n(191),o=n(190),l=n(223),u=n(58),c=n(1836),d=s.a.extend({mixins:r.a,className:"album-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.ListConstructor=c.a,this.listItemViewOptions={artistTitle:this.model.get("parentTitle"),mediaActions:this.mediaActions},this.starRatingView=new o.a({model:this.model}),
this.summaryView=new l.a({model:this.model}),this.posterImage=new u.a({model:this.model,type:this.model.get("type"),width:this.posterWidth})}});t.a=d},function(e,t,n){"use strict";var i=n(2873),a=n.n(i),r=n(2),s=n.n(r),o=n(12),l=n(501),u=n(1151),c=n(191),d=n(1757),h=n(223),p=n(58),f=n(1809),g=n(1807),m=n(861),v=c.a.extend({mixins:u.a,className:"artist-details-row details-row",template:a.a,allowMirror:!0,ui:s.a.extend({concertRegion:".concert-region",popularTracksRegion:".popular-tracks-region",
extrasRegion:".extras-region",similarArtistsRegion:".similar-artists-region"},c.a.prototype.ui),regions:s.a.extend({concert:".concert-region",popularTracksList:".popular-tracks-region",extrasList:".extras-region",similarArtistsList:".similar-artists-region"},c.a.prototype.regions),modelEvents:{"socket:timeline":"onTimeline","change:popularLeaves":"showPopularTracks","change:popularLeaves.change:metadataItems.reset change:popularLeaves.change:metadataItems.update":"updatePopularTracks",
"change:extras.change:metadataItems.reset change:extras.change:metadataItems.update":"updateExtras","change:concerts":"showConcert","change:concerts.reset change:concerts.update":"updateConcerts","change:related":"showSimilarArtistsList","change:related.reset change:related.update":"showSimilarArtistsList"},initialize:function(){c.a.prototype.initialize.apply(this,arguments),
this.bindAllWhenRendered("updateConcerts","showConcert","updatePopularTracks","updateExtras","updateSimilarArtists","showSimilarArtistsList"),this.ListConstructor=g.a,this.listItemViewOptions={mediaActions:this.mediaActions},this.summaryView=new h.a({model:this.model}),this.posterImage=new p.a({model:this.model,type:this.model.get("type"),width:this.posterWidth})},showPopularTracks:function(){var e=this.model.get("popularLeaves"),t=e&&e.get("metadataItems")
;t&&this.popularTracksList.append(new f.a({collection:t})),this.updatePopularTracks()},updatePopularTracks:function(){var e=this.model.get("popularLeaves"),t=e&&e.get("metadataItems");this.ui.popularTracksRegion.toggleClass("hidden",!(t&&t.length))},showExtras:function(){var e=this.model.get("extras"),t=e&&e.get("metadataItems");t&&this.extrasList.append(new m.a({collection:t})),this.updateExtras()},updateExtras:function(){var e=this.model.get("extras"),t=e&&e.get("metadataItems")
;this.ui.extrasRegion.toggleClass("hidden",!(t&&t.length))},updateConcerts:function(){var e=this.model.get("concerts");this.ui.concertRegion.toggleClass("hidden",!(e&&e.length))},showConcert:function(){var e=this.model.get("concerts"),t=e&&e.first();t?this.concert.append(new d.a({model:t})):this.concert.close(),this.updateConcerts()},updateSimilarArtists:function(){this.ui.similarArtistsRegion.toggleClass("hidden",!(this.similarArtists&&this.similarArtists.get("metadataItems").length))},
showSimilarArtistsList:function(){this.similarArtists&&(this.stopListening(this.similarArtists),this.similarArtists=null);var e=this.model.get("related");if(e){var t=e.get("artist.similar");t&&(this.similarArtists=t.get("metadataList"),this.similarArtistsList.append(new g.a({collection:this.similarArtists.get("metadataItems")})),this.listenTo(this.similarArtists.get("metadataItems"),"reset update",this.updateSimilarArtists))}this.updateSimilarArtists()},onRender:function(){
c.a.prototype.onRender.apply(this,arguments),this.showPopularTracks(),this.children.populate({scope:"page"}).then(this.whenRendered(function(){this.showExtras(),this.showConcert(),this.showSimilarArtistsList()}))},onTimeline:function(e){e.state===l.a.DELETED&&o.a.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.section.id})}});t.a=v},function(e,t,n){"use strict"
;var i=n(2874),a=n.n(i),r=n(13),s=n(1152),o=n(191),l=n(190),u=n(223),c=n(553),d=n(58),h=n(391),p=o.a.extend({mixins:s.a,className:"clip-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){o.a.prototype.initialize.apply(this,arguments),this.starRatingView=new l.a({model:this.model,disabled:!0}),this.summaryView=new u.a({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new c.a({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new c.a({
type:"subtitles",model:this.model,media:e}),this.posterImage=new d.a({model:this.model,type:this.model.get("type"),width:this.posterWidth});var t=this.model.server.get("isCloud"),n=r.a("appModel"),i=n.get("primaryServer");(!t||i&&!i.get("isCloudSyncServer"))&&(this.contentRatingFlag=new h.a({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new h.a({model:this.model,flag:"videoResolution",className:"media-flag",
width:100,height:20}),this.audioCodecFlag=new h.a({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new h.a({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new h.a({model:this.model,modelAttribute:"studio",className:"studio-flag",width:200,height:40}))}});t.a=p},function(e,t,n){"use strict";var i=n(2876),a=n.n(i),r=n(1153),s=n(191),o=n(190),l=n(223),u=n(553),c=n(58),d=n(391),h=s.a.extend({
mixins:r.a,className:"episode-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.starRatingView=new o.a({model:this.model}),this.summaryView=new l.a({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new u.a({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new u.a({type:"subtitles",model:this.model,media:e}),this.posterImage=new c.a({model:this.model,type:this.model.get("type"),
width:this.posterWidth}),this.contentRatingFlag=new d.a({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new d.a({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new d.a({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new d.a({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20})
}});t.a=h},function(e,t,n){"use strict";var i=n(2877),a=n.n(i),r=n(2),s=n.n(r),o=n(1154),l=n(191),u=n(190),c=n(223),d=n(553),h=n(58),p=n(391),f=n(861),g=l.a.extend({mixins:o.a,className:"movie-details-row details-row",template:a.a,allowMirror:!0,ui:s.a.extend({extrasRegion:".extras-region"},l.a.prototype.ui),regions:s.a.extend({extrasList:".extras-region"},l.a.prototype.regions),initialize:function(){l.a.prototype.initialize.apply(this,arguments);var e=this.model.get("extras")
;this.extras=e&&e.get("metadataItems"),this.extras&&this.listenTo(this.extras,"reset add remove",this.updateExtras),this.starRatingView=new u.a({model:this.model}),this.summaryView=new c.a({model:this.model});var t=this.getPreferredMedia();this.audioDropdown=new d.a({type:"audio",model:this.model,media:t}),this.subtitlesDropdown=new d.a({type:"subtitles",model:this.model,media:t}),this.posterImage=new h.a({model:this.model,type:this.model.get("type"),width:this.posterWidth}),
this.contentRatingFlag=new p.a({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new p.a({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new p.a({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new p.a({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),
this.studioFlag=new p.a({model:this.model,modelAttribute:"studio",className:"studio-flag",width:200,height:40})},updateExtras:function(){this.ui.extrasRegion.toggleClass("hidden",!(this.extras&&this.extras.length))},onRender:function(){l.a.prototype.onRender.apply(this,arguments),this.extras&&(this.extrasList.append(new f.a({collection:this.extras})),this.updateExtras())}});t.a=g},function(e,t,n){"use strict"
;var i=n(2878),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(13),u=n(320),c=n(247),d=n(108),h=n(177),p=n(191),f=n(406),g=n(1829),m=p.a.extend({className:"playlist-details-row details-row",template:a.a,posterWidth:200,pageSize:50,compositeOptions:{audio:{media:"art",stripRatio:u.a.ratios.landscape,posterRatio:u.a.ratios.square},photo:{media:"thumb",stripRatio:u.a.ratios.square,posterRatio:u.a.ratios.square},video:{media:"thumb",stripRatio:u.a.ratios.portrait,posterRatio:u.a.ratios.portrait}},
ui:s.a.extend({sideStrip:".item-side-strip"},p.a.prototype.ui),bindings:s.a.extend(s.a.pick(h.a.defaultBindings,[".item-title",".item-summary"]),{".item-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return e?n.i(c.a)(e):0}},".item-count":{modelAttribute:"leafCount",formatter:function(e){return 0===e?n.i(o.default)("This playlist has no items."):1===e?n.i(o.default)("1 Item"):n.i(o.default)("{1} Items",e)}},".no-items":{modelAttribute:"leafCount",manual:!0,autohide:!0,
formatter:function(e){return 0===e}},".loading-container":{model:"progress",modelAttribute:"loading",manual:!0,autohide:!0},".error-text":{model:"progress",modelAttribute:"failed",manual:!0,autohide:!0}}),serializeData:function(){var e=this.model.get("playlistType");return{smart:this.model.get("smart"),hasComposite:"audio"===e||"photo"===e,type:e}},initialize:function(){p.a.prototype.initialize.apply(this,arguments),(0,n.i(l.a)("appStore").dispatch)(n.i(d.a)({allowLightPreset:!1})),
this.ListConstructor=g.a,this.listItemViewOptions={canEdit:!this.model.get("smart")};var e=this.compositeOptions[this.model.get("playlistType")];this.posterWidth=200,this.sideStripImage=new f.a({model:this.model,media:e.media,width:this.posterWidth,height:this.posterWidth/e.stripRatio*16,columns:1,rows:16,unique:!0,noPlaceholder:!0}),this.posterImage=new f.a({model:this.model,width:this.posterWidth,height:this.posterWidth/e.posterRatio,noPlaceholder:!0})},onRender:function(){
p.a.prototype.onRender.apply(this,arguments),this.sideStripImage.setElement(this.ui.sideStrip)},onClose:function(){return this.posterImage&&this.sideStripImage.close(),p.a.prototype.onClose.apply(this,arguments)}});t.a=m},function(e,t,n){"use strict";var i=n(2879),a=n.n(i),r=n(13),s=n(191),o=n(223),l=n(1817),u=n(1813),c=n(1815),d=s.a.extend({className:"season-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){s.a.prototype.initialize.apply(this,arguments),
this.ListConstructor=this.getListConstructor(),this.summaryView=new o.a({model:this.model});var e=n.i(r.a)("appModel").get("settings");this.listenTo(e,"change:"+this.getListTypeSettingKey(),this.onListTypeChange)},getListTypeSettingKey:function(){return(this.model.section||this.model.server).getScopedKey("episodeListType")},getListConstructor:function(e){var t=n.i(r.a)("appModel").get("settings");switch(e||(e=t.get(this.getListTypeSettingKey())),e){case"episode-details-list":return u.a
;case"episode-list":return c.a;default:return l.a}},bindings:{".show-title":{modelAttribute:"parentTitle"},".season-title":{modelAttribute:"title"}},onListTypeChange:function(e,t){this.ListConstructor=this.getListConstructor(t),this.render()}});t.a=d},function(e,t,n){"use strict";var i=n(2880),a=n.n(i),r=n(1155),s=n(191),o=n(190),l=n(223),u=n(58),c=n(391),d=n(1832),h=s.a.extend({mixins:r.a,className:"show-details-row details-row",template:a.a,allowMirror:!0,initialize:function(){
s.a.prototype.initialize.apply(this,arguments),this.ListConstructor=d.a,this.starRatingView=new o.a({model:this.model}),this.summaryView=new l.a({model:this.model}),this.posterImage=new u.a({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new c.a({model:this.model,modelAttribute:"contentRating",className:"show-content-rating content-rating-flag",width:70,height:30}),this.studioFlag=new c.a({model:this.model,modelAttribute:"studio",
className:"show-studio studio-flag",width:200,height:40})}});t.a=h},function(e,t,n){"use strict";var i=n(2881),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2882),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(37),u=n.n(l),c=o.a.ItemView.extend({className:"concert",template:a.a,bindings:{".concert-link":{modelAttribute:"url",manual:!0,formatter:function(e,t){t.attr("href",e)}},".concert-month":{modelAttribute:"at",
formatter:function(e){return u.a.unix(e).format("MMM")}},".concert-day":{modelAttribute:"at",formatter:function(e){return u.a.unix(e).format("DD")}},".concert-name":{modelAttribute:"tag"},".concert-venue":{modelAttribute:"venue"},".concert-city":{modelAttribute:"city",modelListeners:["city","country"],formatter:function(e){return s.a.compact([e,this.model.get("country")]).join(", ")}}}});t.a=c},function(e,t,n){"use strict"
;var i=n(2884),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(23),u=o.a.ItemView.extend({id:"auto-match-dropdown",tagName:"span",className:"dropdown",template:a.a,collectionEvents:{reset:"render"},events:{"click .auto-match-agent":"onClick"},serializeData:function(){return{agents:this.collection.toJSON()}},onClick:function(e){e.preventDefault();var t=s()(e.currentTarget).data("id"),n=this.model.agents.get(t);l.a.execute("autoMatch",{item:this.model,agent:n})}});t.a=u},function(e,t,n){"use strict"
;var i=n(2885),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(12),u=o.a.ItemView.extend({tagName:"span",className:"details-breadcrumb dropdown",template:a.a,events:{"click .breadcrumb-btn":"onClick"},initialize:function(e){this.listenTo(this.model,"change:title",this.render),this.isLeaf=e&&e.isLeaf||!1},serializeData:function(){var e=this.collection&&this.collection.length>1;return{id:this.id,item:this.model.toJSON(),items:e?this.collection.toJSON():null,hasDetails:this.isLeaf,showDropdown:e}},
onClick:function(e){e.preventDefault();var t=s()(e.currentTarget).data("key");t&&l.a.trigger("navigate","details",{serverID:this.model.server.id,key:t})}});t.a=u},function(e,t,n){"use strict";var i=n(2887),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"li",className:"play-queue-list-item",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2891),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(4),u=n(12),c=n(19),d=n(34),h=n(23),p=n(218),f=n(225),g=n(337),m=n(335),v=n(336),y=o.a.ItemView.extend({
tagName:"ul",className:"dropdown-menu",template:a.a,ui:{divider:".divider"},events:{"click .play-mix-btn":"onPlayMixClick","click .add-to-playlist-btn":"onAddToPlaylistClick","click .sync-btn":"onSyncClick","click .share-btn":"onShareClick","click .recommend-btn":"onRecommendClick","click .info-btn":"onInfoClick"},initialize:function(e){this.metadataType=n.i(d.b)(this.model.get("type")),this.mediaActions=new p.a({},{item:this.model,playQueue:e.playQueue}),
s()(".dropdown.open .dropdown-toggle").dropdown("toggle")},serializeData:function(){var e,t;if(this.mediaActions.get("showDownload")){e=this.model.getDownloadUrl();var n=this.model.getFilepath();n&&(t=c.getLastSegment(n))}return{defaultLinkTarget:"_self",downloadUrl:e,downloadName:t}},bindingsModel:"mediaActions",bindings:{".play-mix-btn":{modelAttribute:"showPlayMix",manual:!0,autohide:!0,formatter:function(e,t){if(e){var i=this.model.get("related"),a=i.findWhere({browse:!1}),r=a.get("title")
;r&&t.text(n.i(l.default)("Queue {1}",r))}return e}},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){
var e=this.ui.divider,t=e.prevAll(":not(:has(.hidden))").length,n=e.nextAll(":not(:has(.hidden))").length;e.toggleClass("hidden",!t||!n)},onClose:function(){this.mediaActions.stopListening()},onPlayMixClick:function(e){e.preventDefault();var t=this.model.get("related"),n=t.findWhere({browse:!1});n.set("type","track"),h.a.execute("queueMedia",{item:n,excludeSeedItem:!0,next:!0})},onAddToPlaylistClick:function(e){if(e.preventDefault(),
s()(e.currentTarget).isDisabled())return void e.stopImmediatePropagation();u.a.trigger("show:modal",new f.a({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onSyncClick:function(e){e.preventDefault(),h.a.execute("showSyncModal",{item:this.model})},onShareClick:function(e){e.preventDefault(),u.a.trigger("show:modal",new g.a({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),u.a.trigger("show:modal",new v.a({
model:this.model}))},onInfoClick:function(e){e.preventDefault(),u.a.trigger("show:modal",new m.a({model:this.model}))}});t.a=y},function(e,t,n){"use strict";var i=n(2892),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=u.a.ItemView.extend({id:"playlist-type-dropdown",tagName:"span",className:"dropdown",template:a.a,events:{"click .type-btn":"onClick"},types:[{key:0,title:"All"},{key:"audio",title:"Music"},{key:"photo",title:"Photo"},{key:"video",title:"Video"}],initialize:function(){
this.listenTo(this.model,"change:currentType",this.render)},serializeData:function(){return{currentType:s()(this.types).findWhere({key:this.model.get("currentType")}),types:this.types}},onClick:function(e){e.preventDefault();var t=l()(e.currentTarget).data("key");this.model.set("currentType",t)}});t.a=c},function(e,t,n){"use strict";var i=n(2894),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(13),u=n(12),c=n(23),d=o.a.ItemView.extend({tagName:"ul",className:"dropdown-menu pull-right",template:a.a,events:{
"click .local-player-btn":"onLocalPlayerClick","click .cast-player-btn":"onCastPlayerClick","click .plex-player-btn":"onPlexPlayerClick","click .now-playing-btn":"onNowPlayingClick"},initialize:function(e){e||(e={});var t=l.a("appModel");this.showNowPlaying=e.showNowPlaying,this.players=t.get("players"),this.listenTo(this.players,"update reset",this.render),this.listenTo(t,"change:isCastApiAvailable",this.render)},serializeData:function(){
var e=l.a("appModel"),t=e.get("isCastApiAvailable"),n=e.get("primaryPlayer");return{showNowPlaying:this.showNowPlaying,showCast:t,showPlayers:t||this.players.length,primaryPlayer:n?n.toJSON():null,nowPlaying:n?n.get("nowPlaying").toJSON():null,players:this.players.toJSON()}},onLocalPlayerClick:function(e){e.preventDefault(),l.a("appModel").set("primaryPlayer",null)},onCastPlayerClick:function(e){e.preventDefault(),u.a.trigger("cast:launch")},onPlexPlayerClick:function(e){e.preventDefault()
;var t=s()(e.currentTarget).data("id"),n=this.players.get(t);l.a("appModel").set("primaryPlayer",n)},onNowPlayingClick:function(e){e.preventDefault();var t=l.a("appModel"),n=t.get("primaryPlayer"),i=n.get("nowPlaying"),a=s()(e.currentTarget).data("id"),r=i.get(a);c.a.execute("playMedia",{item:r})}});t.a=d},function(e,t,n){"use strict";var i=n(2896),a=n.n(i),r=n(15),s=r.a.ItemView.extend({id:"section-dropdown",tagName:"span",className:"dropdown",template:a.a,modelEvents:{"change:title":"render"},
serializeData:function(){var e=this.model.server.supports("playlists");return{showDropdown:this.collection.length>1||e,showPlaylists:e,sections:this.collection.toJSON(),serverID:this.model.server.id,currentSectionTitle:this.options.title||this.model.get("title"),currentSectionKey:this.options.key||this.model.get("key")}}});t.a=s},function(e,t,n){"use strict";var i=n(2832),a=n.n(i),r=n(15),s=n(1932),o=r.a.Layout.extend({template:a.a,id:"lyrics-dropdown",className:"dropup",ui:{
lyricsBtn:".lyrics-btn"},regions:{lyricsRegion:".lyrics-dropdown"},events:{click:"onClick","click .lyrics-btn":"onLyricsClick","mousewheel .lyrics-dropdown":"onLyricsMouseWheel"},modelEvents:{"change:playQueueItem":"onPlayQueueItemChange","change:showLyrics change:canLyrics":"renderLyricsBtn"},onlyAfterRender:["renderLyrics","renderLyricsBtn"],getLyricsStreams:function(){return this.model.get("playQueueItem").get("lyricsStreams")},renderLyrics:function(){if(this.$el.hasClass("open")){
var e=new s.a({model:this.model});this.lyricsRegion.show(e)}},renderLyricsBtn:function(){this.ui.lyricsBtn.toggleClass("hidden",!this.model.get("showLyrics")).toggleClass("disabled",!this.model.get("canLyrics"))},onRender:function(){this.renderLyricsBtn()},onLyricsSelectedChange:function(e,t){t&&this.renderLyrics()},onPlayQueueItemChange:function(){this.$el.removeClass("open"),this.renderLyricsBtn()},onClick:function(e){e.wasLyricsClick||e.stopPropagation()},onLyricsClick:function(e){
e.wasLyricsClick=!0,this.ui.lyricsBtn.isDisabled()||this.renderLyrics()},onLyricsMouseWheel:function(e){e.stopPropagation()}});t.a=o},function(e,t,n){"use strict";var i=n(2898),a=n.n(i),r=n(554),s=r.a.extend({template:a.a,serializeData:function(){var e=this.model.get("preferences"),t=this.model.getSingleMetadataItem().get("preferences");return e.length?t.reduce(function(t,n){var i=e.get(n.id);return i?t.push(i.toJSON()):t.push(n.toJSON()),t},[]):t.toJSON()},flushChanges:function(){
var e=this.ui.form,t=e.serializeArray(),n=this.model.getSingleMetadataItem().get("preferences"),i=this.model.get("preferences");t.forEach(function(e){var t=i.get(e.name)||n.get(e.name),a=t.clone();a.parseAndSetValue(e.value),a.get("value")!==t.get("value")&&i.add(a,{merge:!0})})}});t.a=s},function(e,t,n){"use strict";var i=n(2903),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(66),d=n(59),h=n(1546),p=n(1811),f=u.a.Layout.extend({template:a.a,dragStatus:0,ui:{
upload:".upload-artwork-container",urlInput:"input[name=url]"},regions:{list:".artwork-list-container"},events:{dragenter:"onDragEnter",dragleave:"onDragLeave",dragover:"onDragOver",drop:"onDrop",keydown:"onKeyDown","change .artwork-file-control":"onFileChange","click .upload-url-btn":"onUploadUrlClick","click .cancel-url-btn":"onCancelUrlClick","click .submit-url-btn":"onUrlSubmit","submit #upload-form":"onUrlSubmit","click .upload-back-btn":"onUploadBackClick",
"click .artwork-option":"onArtworkOptionClick"},initialize:function(e){this.type=e.type,this.metadataItem=this.model.getSingleMetadataItem(),this.changes={},this.collection=new h.a([],{server:this.model.server,section:this.model.section,parent:this.metadataItem,artworkType:this.type}),this.collection.fetch()},serializeData:function(){return{showUpload:this.model.server.supports("artworkUpload"),showFileUpload:c.a.hasFileUpload}},flushChanges:function(){this.model.set(this.changes)},
uploadFiles:function(e){if(e&&e.length){this.changes={},this.ui.upload.removeClass("show-success show-error");var t=this.collection.url(),n=s.a.extend(this.model.server.getXHROptions(t),{type:"POST",processData:!1}),i=[],a=s.a.bind(function(e){/image\//.test(e.type)&&(n.data=e,i.push(l.a.ajax(n)))},this);if(s.a.each(e,a),!i.length)return void this.ui.upload.addClass("show-error");this.ui.upload.addClass("show-progress"),this.monitorUpload(l.a.when.apply(l.a,i))}},uploadUrl:function(e){
this.changes={},this.ui.upload.removeClass("show-form"),this.ui.upload.addClass("show-progress"),this.ui.urlInput.val(""),e=this.collection.url()+"?url="+encodeURIComponent(e);var t=s.a.extend(this.model.server.getXHROptions(e),{type:"POST"});this.monitorUpload(l.a.ajax(t))},monitorUpload:function(e){e.done(s.a.bind(function(){this.isClosed||this.ui.upload.addClass("show-success");var e={server:this.model.server,onlyIfCached:!0},t=new d.a({key:this.metadataItem.get("key")},e)
;s.a.isEmpty(t)||t.fetch(),this.collection.fetch()},this)),e.fail(this.whenRendered(function(){this.ui.upload.addClass("show-error")})),e.always(this.whenRendered(function(){this.ui.upload.removeClass("show-progress")}))},onRender:function(){this.list.show(new p.a({collection:this.collection,itemViewOptions:{artworkType:this.type}}))},onDragEnter:function(e){this.dragStatus++,this.ui.upload.addClass("drag-hover")},onDragLeave:function(e){
0===--this.dragStatus&&this.ui.upload.removeClass("drag-hover")},onDragOver:function(e){e.preventDefault()},onDrop:function(e){e.preventDefault(),e.stopPropagation(),this.dragStatus=0,this.ui.upload.removeClass("drag-hover"),this.uploadFiles(e.originalEvent.dataTransfer.files)},onKeyDown:function(e){27===e.which&&this.ui.upload.hasClass("show-form")&&(e.preventDefault(),this.ui.upload.removeClass("show-form"))},onFileChange:function(e){this.uploadFiles(e.target.files)},
onUploadUrlClick:function(e){e.preventDefault(),this.ui.upload.addClass("show-form"),this.ui.urlInput.focus()},onCancelUrlClick:function(e){e.preventDefault(),this.ui.upload.removeClass("show-form")},onUrlSubmit:function(e){e.preventDefault();var t=this.ui.urlInput.val();t?this.uploadUrl(t):this.ui.upload.removeClass("show-form")},onUploadBackClick:function(e){e.preventDefault(),this.ui.upload.removeClass("show-success show-error")},onArtworkOptionClick:function(e){e.preventDefault()
;var t=l()(e.currentTarget),n=t.data("ratingKey");this.$(".artwork-option.selected").removeClass("selected"),t.addClass("selected"),this.changes[this.type]=n}});t.a=f},function(e,t,n){"use strict";var i=n(2906),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(83),d=n(1769),h=u.a.CompositeView.extend({template:a.a,className:"files",itemView:d.a,itemViewContainer:"ul",initialize:function(){this.collection=new c.a,this.populateParts().always(this.whenRendered(function(){
this.$(".loading").addClass("hidden")}))},populateParts:function(){function e(e){var n=e.get("Media");if(n&&n.length)return s.a.each(n,t),n}function t(e){s.a.each(e.Part,n)}function n(e){i.push(e)}var i=this.collection,a=this.model.getSingleMetadataItem();return e(a)?l.a.Deferred().resolve():a.populate().then(function(){if(!e(a)&&a.has("childrenKey")){var t=a.get("children"),n=t.get("metadataItems");if(!n.length)return t.populate().then(function(){n.each(e)});n.each(e)}})},
flushChanges:function(){}});t.a=h},function(e,t,n){"use strict";var i=n(2907),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a,tagName:"li",className:"well",serializeData:function(){return{file:this.model.get("file")}}});t.a=s},function(e,t,n){"use strict";var i=n(2914),a=n.n(i),r=n(2),s=n.n(r),o=n(13),l=n(156),u=n(858),c=u.a.extend({templatesByType:{movie:a.a,show:a.a,album:a.a,photo:a.a},serializeData:function(){
var e=o.a("appModel"),t=e.get("user"),n=u.a.prototype.serializeData.apply(this,arguments);return s.a.extend(n,{showLabels:this.model.server.supports("labels"),labelsMinVersion:l.a.labels,hasContentFilterFeature:t.get("subscription").get("features").get("content_filter"),plexPassUrl:t.server.get("plexPassUrl")}),n}});t.a=c},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(818),u=function(e,t){var i=s()(t),r=i.attr("name"),u=r.replace(/parentTitle$/,"parentRatingKey")
;u===r&&(u=null);var c,d=e.model.getQueryAttr(r),h=e.model.getQueryAttrSibling(r),p=d!==r,f=p?"title":r,g=p?"ratingKey":f,m=e.model.get("type");c=p?d.match(/(^.*)\./)[1]:"title"===f?m:null;var v=i.data("scopeToAttr"),y=i.data("scopeToParam"),b=i.data("ratingKey"),S=!b;b&&(b=b.toString());var I=!p,w={};y&&e.listenTo(e,"reset_selectize:"+y,function(){k.loadedSearches={}});var M,C,D=e.model["original.updateValues."+r];D?(M=D.updateAttr,C=D.altUpdateAttr):(M=e.model.get(r),
u&&(C=parseInt(e.model.get(u),10)),e.model["original.updateValues."+r]={updateAttr:M,altUpdateAttr:C});var P=e.model["original.general."+r];if(!P){P=[];var T={};T[f]=M,T.ratingKey=b,P=[T],e.model["original.general."+r]=P}var x=[e.model.get(u)||e.model.get(r)],E=function(){var e=k.$dropdown_content.children();k.$dropdown.toggleClass("hidden",e.length<=1)},A=function(){a.a.defer(E)};i.data("autocompleteAttr",f),i.data("updateAttr",r),u&&i.data("altUpdateAttr",u);var k=i.selectize({options:P,
items:x,plugins:["restore_on_focus"],delimiter:null,create:!0,maxItems:1,labelField:f,valueField:g,sortField:f,searchField:[f],selectOnTab:!0,hideSelected:!1,highlight:!1,openOnFocus:!0,selectOnBlur:!0,createOnBlur:!0,persist:!0,addPrecedence:!0,allowEmptyOption:!0,allowCreateEmpty:I,manualInputWidth:!0,loadingClass:"",onFocus:function(){k.preloaded||(k.preloaded=!0,k.onSearchChange(k.$control_input.val()))},createFilter:function(e){return w[f]=e,!a()(this.options).findWhere(w)},
load:function(t,n){if(!t.length)return void n();var i={};if(i[d]=t,v){var a=e.model.get(v);if(!a)return void n();i[y]=a}new l.a([],{server:e.model.server,multiMetadataItem:e.model,query:i}).fetch().done(function(e){n(e.map(function(e){return e.toJSON()})),E()})},render:{option:function(e,t){var i,a=u?e.ratingKey===String(C):e[f]===M;return i=a?'<small class="autocomplete-annotate pull-right">('+(c&&!S?n.i(o.default)("this {1}",c):n.i(o.default)("original value"))+")</small>":"",
"<div>"+t(e[f])+i+"</div>"},option_create:function(e,t){return e.input?'<div class="create">'+t(e.input)+"</div>":'<div class="create hidden"></div>'}},onDropdownClose:function(){k.$dropdown.addClass("hidden")},onDropdownOpen:function(){k.$dropdown.addClass("hidden"),A()},onType:a.a.bind(function(e){if(k.canCreate(e)){var t=s()(k.$dropdown_content[0].childNodes[0]);k.setActiveOption(t)}A(),this.onLockableFieldChange({currentTarget:k.$input,force:!0})},e),onOptionAdd:function(e,t){
var n=a.a.pick(t,f,"ratingKey");a.a.findWhere(P,n)||P.splice(P.length,0,t)},onChange:function(t){var n=this.options[t];if(n){if(p){var s=n.ratingKey===n[f];i.data("isText",s)}e.flushChanges();var o=e.model.changedAttributes();a.a.has(o,d)||a.a.has(o,h)?e.trigger("focusSubmit"):a.a.defer(function(){k.onBlur()}),e.trigger("reset_selectize:"+r),E()}}})[0].selectize;k.$dropdown.addClass("hidden")};t.a=u},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(5),s=n.n(r),o=n(4),l=n(34),u=n(478),c=n(818),d=function(e,t){var i=s()(t),r=i.data("name"),d=i.data("query")||i.data("name"),h=i.data("attr"),p=e.model.get(h).toJSON(),f=a.a.pluck(p,"tag"),g=e.model["original.tag."+r];g||(g=a.a.clone(p),e.model["original.tag."+r]=g);var m=a.a.difference(f,a.a.pluck(g,"tag"));if(m.length){var v=a.a.map(m,function(e){return{tag:e}});v.unshift(g.length,0),g.splice.apply(g,v)}var y=function(t){e.model["original.allTagsRequested."+r]=!0,
new u.a({filter:r,filterType:"string"},{server:e.model.server,section:e.section,type:n.i(l.b)(e.model.get("type")).id}).get("options").populate().then(a.a.bind(function(n){e.model["original.allTagsAvailable."+r]=!0,t(n.map(function(e){return{tag:e.attributes.title}}))},e))};i.data("original-value",i.val()),i.selectize({options:g,items:f,plugins:["remove_button"],create:!0,labelField:"tag",valueField:"tag",sortField:"tag",searchField:["tag"],highlight:!1,createFilter:function(e){
return!a()(this.options).findWhere({tag:e})},onChange:function(){e.onLockableFieldChange(i)},onFocus:function(){this.onSearchChange("")},loadingClass:"",load:function(t,n){if(!(d!==r||t.length&&e.canAutocomplete))return void(e.model["original.allTagsRequested."+r]?n():y.call(e,n));if(e.model["original.allTagsAvailable."+r]||0===t.length)return void n();var i={};i[d]=t;var a=d===r?function(e){return e.toJSON()}:function(e){return{tag:e.get(d)}};new c.a([],{server:e.model.server,
multiMetadataItem:e.model,query:i}).fetch().done(function(e){var t=e.map(a);n(t)}).fail(function(){n()})},render:{item:function(e,t){return'<div class="item">'+(e.tag?t(e.tag):'<span class="autocomplete-annotate">('+n.i(o.default)("blank")+")</span>")+"</div>"},option:function(e,t){return'<div class="item">'+(e.tag?t(e.tag):'<small class="autocomplete-annotate">('+n.i(o.default)("blank")+")</small>")+"</div>"}}})};t.a=d},function(e,t,n){"use strict"
;var i=n(3053),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(23),c=n(265),d=n(1782),h=n(1774),p=c.a.extend({template:a.a,ui:s.a.extend({sectionAgent:"#edit-section-agent",sectionScanner:"#edit-section-scanner",thumbnailsCheckbox:'input[name="enableBIFGeneration"]',agentGroup:".agent-group",scannerGroup:".scanner-group"},c.a.prototype.ui),events:{"change #edit-section-agent":"onEditSectionAgentChange","change #edit-section-scanner":"onEditSectionScannerChange",
"click .delete-thumbnails-btn":"onThumbnailsDeleteClick"},regions:{sectionSettingsRegion:".section-settings-region",agentSettingsRegion:".section-agent-settings-region"},onlyAfterRender:["renderSectionAgent","renderSectionScanner","renderSectionSettings","renderSectionAgentSettings"].concat(c.a.prototype.onlyAfterRender),initialize:function(){this.populateCollections()},onRender:function(){this.model.agents.populate(),this.model.scanners.populate()},validate:function(e){var t=[]
;return e.get("agent")||t.push("agent"),e.get("scanner")||t.push("scanner"),t},renderSectionSettings:function(){var e=new d.a({model:this.model,collection:this.model.settings,hideSettings:["enableAutoPhotoTags"]});this.sectionSettingsRegion.show(e)},renderSectionAgentSettings:function(){var e=new h.a({model:this.model,collection:this.model.agentSettings});this.agentSettingsRegion.show(e)},populateCollections:function(){
var e=this.populateAgents(),t=this.populateScanners(),n=this.populateSectionSettings(),i=this.populateSectionAgentSettings();return this.populateAgentsProxy(),this.populateScannersProxy(),e.then(s.a.bind(this.onAgentsPopulate,this)),t.then(s.a.bind(this.onScannersPopulate,this)),n.then(s.a.bind(this.renderSectionSettings,this)),i.then(s.a.bind(this.renderSectionAgentSettings,this)),l.a.when(e,t,n,i).then(s.a.bind(this.validate,this,this.model))},renderSectionAgent:function(){
var e=this.model.agentsProxy,t=this.createMenuOptions(e.map(function(e){return{label:e.get("name"),value:e.get("identifier")}}),this.model.get("agent"));this.ui.sectionAgent.html(t),e.length>1&&this.ui.agentGroup.removeClass("hidden")},renderSectionScanner:function(){var e=this.model.scannersProxy,t=this.createMenuOptions(e.map(function(e){return{label:e.get("name"),value:e.get("name")}}),this.model.get("scanner"));this.ui.sectionScanner.html(t),
e.length>1&&this.ui.scannerGroup.removeClass("hidden")},onEditSectionAgentChange:function(e){var t=l()(e.currentTarget),n=t.val();this.model.set("agent",n),this.agentSettingsRegion.close();var i=this.model.agents.get(n);if(i){var a=i.get("languages"),r=this.model.get("language");a.get(r)||this.model.set("language",a.first().get("code")),this.model.agentSettings=null,this.populateSectionAgentSettings().then(s.a.bind(this.renderSectionAgentSettings,this))}
this.showValidationResult(this.validate(this.model))},onEditSectionScannerChange:function(e){var t=l()(e.currentTarget);this.model.set("scanner",t.val()),this.showValidationResult(this.validate(this.model))},onAgentsPopulate:function(e){this.renderSectionAgent()},onScannersPopulate:function(e){this.renderSectionScanner()},onThumbnailsDeleteClick:function(e){e.preventDefault(),u.a.execute("deleteSectionThumbnails",{section:this.model}).done(this.whenRendered(function(){
this.ui.thumbnailsCheckbox.prop("checked",!1)}))}});t.a=p},function(e,t,n){"use strict";var i=n(2919),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=o.a.ItemView.extend({template:a.a,events:{"change input[name]":"onInputChange","change select[name]":"onInputChange"},initialize:function(){this.changes={}},serializeData:function(){return{settings:this.collection.toJSON(),agentName:this.model.agents.get(this.model.get("agent")).get("name")}},onInputChange:function(e){
var t=s()(e.currentTarget),n=t.is(":checkbox")?t.prop("checked"):t.val();this.collection.findWhere({id:t.attr("name")}).set("value",n)}});t.a=l},function(e,t,n){"use strict";var i=n(2920),a=n.n(i),r=n(265),s=r.a.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3054),s=n.n(r),o=n(5),l=n.n(o),u=n(786),c=n(383),d=n(12),h=n(703),p=n(265),f=n(1779),g=n(1873),m=p.a.extend({template:s.a,fieldNames:["Location"],regions:{pathsRegion:".paths-region"},
ui:a()({},p.a.prototype.ui,{addFolderBtn:".add-folder-btn",addFolderPopulating:".add-folder-populating",addFolderError:".add-folder-error"}),events:{"click .add-folder-btn":"onAddFolderClick","change input[name=path]":"onFolderChange"},onlyAfterRender:["renderSectionLocation","updateAddFolderBtn"].concat(p.a.prototype.onlyAfterRender),initialize:function(){this.listenTo(this.model.get("locations"),{add:this.onCollectionChange,remove:this.onCollectionChange}),this.renderSectionLocation(),
this.startCheckingPersonalCloudServerDriveCacheUpdateStatus(),this.updateAddFolderBtn(),this.showValidationResult(this.validate(this.model))},serializeData:function(){return{isPersonalCloudServerDriveCachePending:this.isPersonalCloudServerDriveCachePending}},validate:function(e){var t=[];return e.get("locations").length||t.push("locations"),t},renderSectionLocation:function(){var e=new f.a({collection:this.model.get("locations")});this.pathsRegion.show(e)},updateAddFolderBtn:function(){
var e=!this.isPersonalCloudServerDriveCachePending,t=!!this.personalCloudServerDriveCacheError;this.ui.addFolderBtn.toggleClass("hidden",!e),this.ui.addFolderError.toggleClass("hidden",e||!t),this.ui.addFolderPopulating.toggleClass("hidden",e||t)},startCheckingPersonalCloudServerDriveCacheUpdateStatus:function(){var e=this;this.isPersonalCloudServerDriveCachePending=null,this.personalCloudServerDriveCacheError=null;var t=this.model.server;if(t.get("isPersonalCloudServer")){
this.isPersonalCloudServerDriveCachePending=!0,this.cancelPersonalCloudServerDriveCacheRetryDeferred=a;var i=new h.a({},{server:t}),a=l.a.Deferred(),r=n.i(u.a)(function(){return i.fetchAndNotUpdating()},{times:100,delay:2e3,maxDuration:18e4,cancel:a.promise()});n.i(c.a)(r,500).done(function(){e.isPersonalCloudServerDriveCachePending=!1}).fail(function(){e.personalCloudServerDriveCacheError=!0}).always(function(){e.cancelPersonalCloudServerDriveCacheRetryDeferred=null,e.updateAddFolderBtn()})}},
onCollectionChange:function(){this.showValidationResult(this.validate(this.model))},onAddFolderClick:function(e){e.preventDefault();var t=new g.a({server:this.model.server});this.listenToOnce(t,"add:folder",this.onAddFolder),d.a.trigger("show:modal",t)},onAddFolder:function(e){if(e){var t={path:e};this.model.get("locations").findWhere(t)||this.model.get("locations").add(t)}},onFolderChange:function(e){var t=l()(e.currentTarget),n=t.prop("defaultValue"),i=t.val();if(!i)return void t.val(n)
;this.model.get("locations").findWhere({path:n}).set("path",i),t.prop("defaultValue",i)},onClose:function(){this.cancelPersonalCloudServerDriveCacheRetryDeferred&&this.cancelPersonalCloudServerDriveCacheRetryDeferred.resolve()}});t.a=m},function(e,t,n){"use strict";var i=n(265),a=n(3055),r=n.n(a),s=n(1780),o=n(1781),l=i.a.extend({template:r.a,regions:{options:".section-options"},onRender:function(){"photos"===this.model.sectionType.key?this.options.show(new o.a({model:this.model
})):this.options.show(new s.a({model:this.model}))}});t.a=l},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3056),s=n.n(r),o=n(15),l=o.a.ItemView.extend({template:s.a,className:"row",events:{"click .remove-path-btn":"onRemovePathClick"},serializeData:function(){return a()({},o.a.ItemView.prototype.serializeData.apply(this,arguments),{canEditPath:!this.model.server.get("isPersonalCloudServer")})},onRemovePathClick:function(e){e.preventDefault(),
this.model.trigger("destroy",this.model,this.model.collection)}});t.a=l},function(e,t,n){"use strict";var i=n(15),a=n(1778),r=i.a.CollectionView.extend({itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(3057),a=n.n(i),r=n(5),s=n.n(r),o=n(13),l=n(12),u=n(265),c=n(560),d=u.a.extend({template:a.a,ui:{chooseLibrary:".choose-library"},events:{"click .choose-library":"onChooseLibraryClick"},modelEvents:{"change:agent":"onSectionAgentChange","change:scanner":"onSectionScannerChange"},
onlyAfterRender:["updateSelectedOffering"],initialize:function(){this.hasPremiumMusic=this.model.server.hasOwnerFeature("premium_music_metadata"),this.updateSelectedOffering()},serializeData:function(){var e=o.a("appModel"),t=e.get("user");return{hasPremiumMusic:this.hasPremiumMusic,plexPassUrl:t.server.get("plexPassUrl"),hasLyrics:this.model.server.get("transcoderLyrics")}},updateSelectedOffering:function(){var e=this.model.get("agent"),t=this.model.get("scanner")
;this.ui.chooseLibrary.find("input").prop("checked",!1);var n=this.ui.chooseLibrary.filter('[data-agent="'+e+'"][data-scanner="'+t+'"]').find("input");n.length||(n=this.ui.chooseLibrary.not("[data-agent][data-scanner]").find("input")),n.prop("checked",!0)},onChooseLibraryClick:function(e){var t=s()(e.currentTarget),n=t.data("agent"),i=t.data("scanner");if((n||i)&&!this.hasPremiumMusic)return void l.a.trigger("show:modal",new c.a({model:this.model.server}));this.model.agentSettings=null,
this.model.set({agent:n||this.getSectionType().defaultAgent,scanner:i||this.getSectionType().defaultScanner})},onSectionAgentChange:function(){this.updateSelectedOffering()},onSectionScannerChange:function(){this.updateSelectedOffering()}});t.a=d},function(e,t,n){"use strict";var i=n(15),a=n(3058),r=n.n(a),s=n(13),o=n(12),l=n(560),u=i.a.Layout.extend({template:r.a,ui:{usePremium:".use-premium-library input",useBasic:".use-basic-library input"},events:{
"click .use-premium-library":"onChoosePremiumClick","click .use-basic-library":"onChooseBasicClick"},onlyAfterRender:["updateSelectedOffering"],initialize:function(){this.hasPremiumPhotos=this.model.server.hasOwnerFeature("photo_autotags"),this.updateSelectedOffering()},serializeData:function(){var e=s.a("appModel"),t=e.get("user");return{hasPremiumPhotos:this.hasPremiumPhotos,plexPassUrl:t.server.get("plexPassUrl")}},updateSelectedOffering:function(){var e=this.model.get("enableAutoPhotoTags")
;this.ui.usePremium.prop("disabled",!1),this.ui.useBasic.prop("disabled",!1),this.ui.usePremium.prop("checked",!!e),this.ui.useBasic.prop("checked",!e)},onChoosePremiumClick:function(e){this.hasPremiumPhotos?this.model.set("enableAutoPhotoTags",!0):o.a.trigger("show:modal",new l.a({model:this.model.server})),this.updateSelectedOffering()},onChooseBasicClick:function(e){this.model.set("enableAutoPhotoTags",!1),this.updateSelectedOffering()}});t.a=u},function(e,t,n){"use strict"
;var i=n(2),a=n.n(i),r=n(3059),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=u.a.ItemView.extend({template:s.a,events:{"change [name]":"onEditSectionSettingInputChange"},initialize:function(e){this.hideSettings=e.hideSettings},serializeData:function(){function e(e){return!a.a.contains(t,e.get("id"))}var t=this.hideSettings;return{settings:this.model.settings.filter(e).map(function(e){return e.toJSON()}),edit:!this.model.isNew()}},onEditSectionSettingInputChange:function(e){
var t=l()(e.currentTarget),n=t.attr("name");if("importFromiTunes"===n)return void this.model.set(n,!0);var i=t.is(":checkbox")?t.prop("checked"):t.val();this.collection.findWhere({id:n}).set("value",i)}});t.a=c},function(e,t,n){"use strict";var i=n(3060),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(128),c=n(184),d=n(265),h=d.a.extend({template:a.a,ui:s.a.extend({sectionTypes:".wizard-block",sectionTitle:"#edit-section-title",sectionLanguage:"#edit-section-language"},d.a.prototype.ui),
modelEvents:{"change:type":"onSectionTypeChange","change:title":"onSectionTitleChange","change:language":"onSectionLanguageChange"},events:{"click .section-type":"onSectionTypeClick","keyup #edit-section-title":"onEditSectionTitleChange","change #edit-section-title":"onEditSectionTitleChange","change #edit-section-language":"onEditSectionLanguageChange"},
onlyAfterRender:["renderSectionLanguage","updateSectionTypesWizardBlocks","updateSectionLanguage","updateSectionTitle"].concat(d.a.prototype.onlyAfterRender),initialize:function(e){this.populateCollections(),this.isDefaultSection=e.isDefaultSection},serializeData:function(){var e=d.a.prototype.serializeData.apply(this,arguments);e.sectionTypes=u.a.getAll();var t=this.getSectionType();t&&(e.currentSectionKey=t.key);var i=this.model.get("updatedAt");return i&&(e.updatedAt=n.i(c.a)(i)),
e.canChangeType=this.model.isNew()&&!this.isDefaultSection,e.hasType=!!this.model.get("type"),e},validate:function(e){var t=[];return e.get("type")||t.push("type"),e.get("title")||t.push("title"),e.get("language")||t.push("language"),t},populateCollections:function(){var e=this.populateAgents(),t=this.populateScanners(),n=this.getSectionType(),i=l.a.when(n,e,t,this.model.server.get("myPlexSubscription")&&this.model.server.supports("premiumMusic"))
;return this.model.isNew()&&(i=i.then(s.a.bind(this.model.setAgentAndScanner,this.model))),i=i.then(e).then(s.a.bind(this.onAgentsPopulate,this)).then(s.a.bind(function(){this.showValidationResult(this.validate(this.model))},this))},renderSectionLanguage:function(){var e=this.model.get("language"),t=this.model.agents.get(this.model.get("agent")),n=t.get("languages");if(!n.get(e)){var i=this.model.get("type"),a=u.a.get(i),r=a.defaultLanguage;this.model.set("language",r,{silent:!0}),e=r}
var s=n.map(function(e){return{label:e.get("name"),value:e.id}});this.updateSectionLanguage(),this.ui.sectionLanguage.html(this.createMenuOptions(s,e))},updateSectionTypesWizardBlocks:function(){this.ui.sectionTypes.removeClass("selected"),this.ui.sectionTypes.filter('[data-key="'+this.model.get("type")+'"]').addClass("selected"),this.$el.addClass("section-type-chosen")},updateSectionLanguage:function(){this.ui.sectionLanguage.val(this.model.get("language"))},updateSectionTitle:function(){
var e=this.ui.sectionTitle.val(),t=this.model.get("title");e!==t&&this.ui.sectionTitle.val(t)},onSectionTypeClick:function(e){e.preventDefault();var t=l()(e.currentTarget);if(t.hasClass("selectable")){var n=t.data("key"),i={type:n},a=u.a.get(n);this.model.get("title")||(i.title=a.title),this.model.set(i)}},onEditSectionTitleChange:function(e){var t=l()(e.currentTarget);this.model.set("title",t.val()),this.showValidationResult(this.validate(this.model))},onEditSectionLanguageChange:function(e){
var t=l()(e.currentTarget);this.model.set("language",t.val()),this.showValidationResult(this.validate(this.model))},onSectionTypeChange:function(e,t){this.updateSectionTypesWizardBlocks();var n=u.a.get(t);if(!this.model.get("language")){var i=n.defaultLanguage;this.model.set("language",i)}var a=this.model.get("title"),r=this.model.previous("type"),s=u.a.get(r),o=s&&s.title;a&&a!==o||this.model.set("title",n.title),this.setSectionType(n),this.model.agents=null,this.model.scanners=null,
this.model.settings=null,this.populateCollections()},onSectionTitleChange:function(e,t){this.updateSectionTitle(),this.showValidationResult(this.validate(this.model))},onSectionLanguageChange:function(e,t){this.updateSectionLanguage()},onAgentsPopulate:function(e){this.renderSectionLanguage()}});t.a=h},function(e,t,n){"use strict";var i=n(289),a=n.n(i),r=n(1404),s=r.a.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(289),a=n.n(i),r=n(1406),s=r.a.extend({
className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(289),a=n.n(i),r=n(4),s=n(1407),o=s.a.extend({className:"container",template:a.a,serializeData:function(){return{title:n.i(r.default)("You don't have any media servers yet."),subtitle:n.i(r.default)("{1}Download and install{2} one and try again.",'<a href="https://plex.tv/downloads" target="_blank">',"</a>")}}});t.a=o},function(e,t,n){"use strict";var i=n(289),a=n.n(i),r=n(1408),s=r.a.extend({className:"container",
template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(289),a=n.n(i),r=n(1409),s=r.a.extend({className:"container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(43),a=n(1790),r=i.a.extend({tagName:"ul",className:"list card-list alert-list",itemView:a.a,reversed:!0});t.a=r},function(e,t,n){"use strict";var i=n(2921),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(4),c=o.a.ItemView.extend({tagName:"li",className:"card-collapsed striped-list-item alert-list-item",template:a.a,
serializeData:function(){var e=n.i(l.a)("appModel"),t=this.model.toJSON(),i={serverID:this.model.server.id,serverName:s.a.escape(this.model.server.get("friendlyName")),itemKey:"/library/metadata/"+this.model.get("itemID"),event:t,timeFormat:e.get("experienceSettings").get("timeFormat")};if(t.label=s.a.escape(t.label),t.value=s.a.escape(t.value),"playing"===t._type&&(t.username=s.a.escape(t.username),t.title=s.a.escape(t.title),t.player=s.a.escape(t.player)),
"timeline"===t._type)switch(t.mediaTitle=this.model.get("title")||"an item",this.model.get("state")){case 0:t.stateString=n.i(u.default)("Created");break;case 1:t.stateString=n.i(u.default)("Progress for");break;case 2:t.stateString=n.i(u.default)("Matching");break;case 3:t.stateString=n.i(u.default)("Downloading metadata for");break;case 4:t.stateString=n.i(u.default)("Loading metadata for");break;case 5:t.stateString=n.i(u.default)("Finished processing");break;case 6:
t.stateString=n.i(u.default)("Analyzing");break;case 9:t.stateString=n.i(u.default)("Deleted")}return i}});t.a=c},function(e,t,n){"use strict";var i=n(43),a=n(1793),r=n(1792),s=i.a.extend({tagName:"ul",className:"tile-list session-tile-list",itemView:a.a,emptyView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2922),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict"
;var i=n(2923),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(744),u=n(40),c=n(764),d=n(1386),h=n(253),p=n(23),f=n(169),g=n(58),m=f.a.extend({className:"poster-item session-tile-list-item",template:a.a,screenshotPreferredIndex:"hd",screenshotInterval:null,screenshotIntervalDelay:2e3,screenshotCount:0,ui:{poster:".media-poster",posterFade:".media-poster-fade",userPoster:".user-poster"},events:s.a.extend({"click .stop-btn":"onStopClick"},f.a.prototype.events),modelEvents:{
"change:viewOffset":"onViewOffsetChange","change:Player":"onPlayerChange"},initialize:function(e){f.a.prototype.initialize.apply(this,arguments);var t=this.getScreenshotUrl(this.model.get("Media"));this.image=new g.a({model:this.model,modelAttribute:"ratingKey",type:"clip",getUrl:this.getPosterUrl,width:350,url:t?t:null}),this.userImage=new g.a({model:this.model,modelAttribute:"User",type:"friend",getUrl:this.getUserPosterUrl,width:44}),this.posterFade=new g.a({model:this.model,
modelAttribute:"Media",type:"clip",getUrl:s.a.bind(this.getScreenshotUrl,this),width:350});var n=this.model.get("Player");n&&n.state===u.a.states.PLAYING&&(this.screenshotInterval=setInterval(s.a.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)),this.listenTo(this.model,"change:Player",this.onPlayerChange)},serializeData:function(){var e=f.a.prototype.serializeData.apply(this,arguments);return e.showStopButton=this.model.server.hasOwnerFeature("session_kick"),e},
getPosterUrl:function(e){var t=this.model;return"photo"===t.get("type")?t.get("thumb"):t.get("art")||t.get("parentArt")||t.get("grandparentArt")||t.get("thumb")},getUserPosterUrl:function(e){return e&&e.thumb},getScreenshotUrl:function(e){var t=s.a.first(e);if(t){var i=this.model.get("viewOffset")||0,a=this.screenshotCount*this.screenshotIntervalDelay+i+4e3;return n.i(c.a)(t,a,this.screenshotPreferredIndex)}},updateScreenshot:function(){if(this.screenshotCount++,this.posterFade){
var e=this.posterFade.screenshotUrl,t=this.getScreenshotUrl(this.model.get("Media"));t&&(this.posterFade.screenshotUrl=t,this.posterFade.load(t).done(this.whenRendered(function(t){this.posterFade.showImage(t),this.ui.posterFade.removeClass("invisible"),this.posterFadeDelay=s.a.delay(this.whenRendered(function(){if(this.image.showImage(t),this.ui.posterFade.addClass("invisible"),e){var n=this.posterFade.cache,i=this.image.getTranscodeUrl(e),a=n.get(n.getItemCacheKey({url:i}));a&&n.remove(a)}
}),800)})))}},bindings:s.a.extend({},f.a.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=f.a.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments),n=f.a.prototype.bindings[".media-subtitle-2"].formatter.call(this,this.model.get("index"));return n?n+" "+t:t}},".device-icon":{modelAttribute:"Player",manual:!0,formatter:function(e,t){var n=l.a.getIcon(e.platform||e.product);t.attr("src",n)}},
".session-player":{modelAttribute:"Player",formatter:function(e){return e.title}},".session-state":{modelAttribute:"Player",formatter:function(e){return n.i(d.a)(e.state)}},".session-transcode":{modelAttribute:"TranscodeSession",formatter:function(e){return e?n.i(o.default)("Transcoding"):n.i(o.default)("Direct Play")}},".session-transcode-throttled":{modelAttribute:"TranscodeSession",autohide:!0,formatter:function(e){return e&&"1"===e.throttled?n.i(o.default)("(throttled)"):""}},
".session-transcode-video-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var i=!(!e||!e.videoCodec);if(t.parent().toggleClass("hidden",!i),i){if("copy"===e.videoDecision)return n.i(o.default)("Direct Stream");var a=this.model.get("Media")[0],r=e.sourceVideoCodec||a.videoCodec,s=n.i(h.default)(r)+(e.transcodeHwDecoding?" (hw)":""),l=n.i(h.default)(e.videoCodec)+(e.transcodeHwEncoding?" (hw)":"");return n.i(o.default)("Transcoding {sourceCodec} to {targetCodec}",{
sourceCodec:s,targetCodec:l})}return""}},".session-transcode-audio-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var i=!(!e||!e.audioCodec);if(t.parent().toggleClass("hidden",!i),i){if("copy"===e.audioDecision)return n.i(o.default)("Direct Stream");var a=this.model.get("Media")[0],r=e.sourceAudioCodec||a.audioCodec,s=n.i(h.default)(r),l=n.i(h.default)(e.audioCodec);return n.i(o.default)("Transcoding {sourceCodec} to {targetCodec}",{sourceCodec:s,targetCodec:l})}return""}},
".session-username":{modelAttribute:"User",formatter:function(e){return e.title}}}),onRender:function(){f.a.prototype.onRender.apply(this,arguments),this.userImage.setElement(this.ui.userPoster),this.posterFade.setElement(this.ui.posterFade)},onClose:function(){f.a.prototype.onClose.call(this),clearTimeout(this.posterFadeDelay),clearInterval(this.screenshotInterval),this.posterFade&&this.posterFade.close()},onViewOffsetChange:function(e,t){this.screenshotCount=0},onPlayerChange:function(e,t){
t&&(t.state!==u.a.states.PLAYING&&this.screenshotInterval?(this.screenshotInterval=clearInterval(this.screenshotInterval),this.screenshotCount=0):t.state!==u.a.states.PLAYING||this.screenshotInterval||(this.screenshotInterval=setInterval(s.a.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)))},onStopClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),p.a.execute("stopMedia",{model:this.model})}});t.a=m},function(e,t,n){"use strict";var i=n(43),a=n(1795),r=i.a.extend({
tagName:"ul",className:"tile-list media-tile-list sync-tile-list show-context",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2924),a=n.n(i),r=n(2),s=n.n(r),o=n(52),l=n(15),u=n(4),c=n(12),d=n(213),h=n(311),p=n(23),f=n(1574),g=n(58),m=n(534),v=n(1885),y=n(869),b=l.a.Layout.extend({tagName:"li",className:"poster-item media-tile-list-item sync-tile-list-item",template:a.a,metadataItemsDelay:5e3,ui:{poster:".media-poster",transcodeStatus:".sync-status-transcode",
transcodeTimeRemaining:".media-context",statusIcons:".sync-status-icon",completeIcon:".sync-complete-icon",waitingIcon:".sync-waiting-icon",processingIcon:".sync-processing-icon",failedIcon:".sync-failed-icon",unknownIcon:".sync-unknown-icon"},regions:{transcodeProgress:".sync-status-transcode"},events:{"click a":"onClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},onlyAfterRender:["onMetadataItemsReset","onMediaChange","onTranscodeJobsReset"],initialize:function(e){
this.server=e.server,this.model.parent=this.server,this.type=this.model.get("metadataType"),this.contentType=this.model.get("contentType");var t=this.type,n=this.contentType,i=150;"episode"===t?t="show":"clip"===t||"userPlaylistItem"===t?i=250:"directory"===t&&(t="audio"===n?"track":"photo"===n?"photo":"movie"),this.$el.addClass(t),this.image=new g.a({server:this.server,type:t,width:i}),this.progressModel=new o.a.Model({current:0});var a=this.server.get("desktop").get("transcodeJobs")
;this.metadataItems=new f.a([],{server:this.server,device:this.model.device,syncItemId:this.model.id}),this.listenTo(this.metadataItems,"reset",this.onMetadataItemsReset),this.listenTo(a,"reset",this.onTranscodeJobsReset),this.metadataItems.fetch({reset:!0}),this.server.supports("syncNotifications")?this.listenTo(this.metadataItems,"change:Media",this.onMediaChange):this.metadataItemsInterval=setInterval(s.a.bind(function(){this.metadataItems.fetch({reset:!0})},this),this.metadataItemsDelay)},
serializeData:function(){return{syncItem:this.model.toJSON(),isCloudSync:this.model.device.get("isCloudSync"),isFailure:!!this.model.get("status").get("failure")}},getPosterUrl:function(e){var t=e.get("thumb");return this.hasMultipleItems?this.hasSameParents?e.get("parentThumb")||e.get("grandparentThumb")||t:this.hasSameGrandparents?e.get("grandparentThumb")||e.get("parentThumb")||t:void 0:t},updatePoster:function(e){if(this.hasPoster=!0,!e){var t=this.metadataItems.first();if(!t)return
;e=this.getPosterUrl(t)}this.image.url!==e&&(this.image.src=null,this.image.url=e,this.image.render())},analyzeParts:function(e){if(this.model.get("status").get("failure"))return"failed";var t=e.models,n=t.length;if(!n)return"unknown";for(var i="complete",a=[],r=[],o=0;o<n;o++){var l=t[o],u=l.get("Media");if(a.push(l.get("grandparentKey")),r.push(l.get("parentKey")),u.length||(i="unknown"),"failed"!==i&&"unknown"!==i)for(var c=0,h=u.length;c<h;c++)for(var p=u[c].Part,f=0,g=p.length;f<g;f++){
var m=p[f],v=d.a.getSyncStateFromPart(m);d.a.failedRegex.test(v)&&(i="failed"),d.a.processingRegex.test(v)&&(i="processing"),d.a.waitingRegex.test(v)&&"processing"!==i&&(i=m.key?"waiting":"processing")}}return this.hasMultipleItems=n>1,this.hasSameGrandparents=1===s.a.compact(s.a.uniq(a)).length,this.hasSameParents=1===s.a.compact(s.a.uniq(r)).length,this.hasPoster||this.updatePoster(),i},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"rootTitle"}},
onRender:function(){this.image.setElement(this.ui.poster),this.transcodeProgress.append(new m.a({model:this.progressModel,size:56}))},onClose:function(){clearInterval(this.metadataItemsInterval)},onMetadataItemsReset:function(e){var t=this.analyzeParts(e);if(this.ui.statusIcons.addClass("hidden"),this.ui.transcodeStatus.hasClass("hidden"))switch(t){case"complete":this.ui.completeIcon.removeClass("hidden");break;case"waiting":this.ui.waitingIcon.removeClass("hidden");break;case"processing":
this.ui.processingIcon.removeClass("hidden");break;case"failed":this.ui.failedIcon.removeClass("hidden");break;default:this.ui.unknownIcon.removeClass("hidden")}},onMediaChange:function(e,t){this.onMetadataItemsReset(this.metadataItems)},onTranscodeJobsReset:function(e){var t=e.where({syncItemId:this.model.id});if(!t.length)return this.ui.transcodeStatus.hasClass("hidden")||(this.ui.transcodeStatus.addClass("hidden"),this.ui.waitingIcon.removeClass("hidden")),
this.ui.transcodeTimeRemaining.text(""),void this.updatePoster();var i=t[0],a=i.get("progress");if(this.ui.statusIcons.addClass("hidden"),a>0){this.ui.transcodeStatus.removeClass("hidden");var r=i.get("type"),s=n.i(h.a)(i.get("remaining"));if(this.progressModel.set("progress",a),"download"===r)this.progressModel.set("text",a.toString()+"%"),this.ui.transcodeTimeRemaining.text(n.i(u.default)("Downloading"));else if("upload"===r)this.progressModel.set("text",a.toString()+"%"),
this.ui.transcodeTimeRemaining.text(n.i(u.default)("Uploading"));else{var o=i.get("speed");if(o){var l=Math.round(10*i.get("speed"))/10;l>10&&(l=Math.round(l)),this.progressModel.set("text",l.toString()+"x")}else this.progressModel.set("text","");this.ui.transcodeTimeRemaining.text(s)}this.updatePoster(i.get("thumb"))}else this.ui.transcodeStatus.addClass("hidden"),this.ui.processingIcon.removeClass("hidden")},onClick:function(e){e.preventDefault(),c.a.trigger("show:modal",new v.a({
model:this.model,collection:this.metadataItems}))},onEditClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),c.a.trigger("show:modal",new y.a({model:this.model}))},onDeleteClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),p.a.execute("deleteSyncItem",{syncItem:this.model,server:this.server})}});t.a=b},function(e,t,n){"use strict";var i=n(43),a=n(1797),r=i.a.extend({tagName:"ul",className:"list sync-status-list",itemView:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(2925),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(4),u=n(213),c=n(311),d=n(58),h=o.a.ItemView.extend({tagName:"li",className:"sync-status-list-item",template:a.a,ui:{poster:".media-poster"},initialize:function(e){this.syncItem=e.syncItem,this.transcodeJobs=this.model.server.get("desktop").get("transcodeJobs"),this.$el.addClass(this.model.get("type")),this.image=new d.a({model:this.model,type:this.model.get("type"),getUrl:this.getPosterUrl,height:50,background:!1}),
this.listenTo(this.transcodeJobs,"reset",function(e){this.model.trigger("change:Media",this.model,this.model.get("Media"))})},serializeData:function(){return{isCloudSync:this.model.device.get("isCloudSync")}},getPosterUrl:function(e){return e||this.model.get("parentThumb")||this.model.get("grandparentThumb")},analyzeTranscodeJobs:function(){var e;if(this.transcodeJobs.each(s.a.bind(function(t){if(this.syncItem.id===t.get("syncItemId")){
var n=this.model.get("thumb"),i=this.model.get("title"),a=t.get("transcodeThumb"),r=t.get("title"),s=r&&r.indexOf(i)>-1,o=!0;if(n&&a){o=new RegExp("(.+)"+t.get("thumb")+"$").exec(n)}s&&o&&(e=t)}},this)),e&&e.get("progress")>0){return{active:!0,speed:Math.round(10*e.get("speed"))/10,remaining:n.i(c.a)(e.get("remaining"))||n.i(l.default)("done"),progress:Math.round(10*e.get("progress"))/10,isUploading:"upload"===e.get("type")}}return{active:!1}},analyzeParts:function(){
var e="complete",t=this.model.get("Media");if(!t.length)return"unknown";for(var n=0,i=t.length;n<i;n++)for(var a=t[n].Part,r=0,s=a.length;r<s;r++){var o=a[r],l=u.a.getSyncStateFromPart(o);u.a.failedRegex.test(l)&&(e=u.a.getSyncStateContextFromPart(o)),u.a.processingRegex.test(l)&&(e="downloading"===l?"downloading":"processing"),u.a.waitingRegex.test(l)&&"processing"!==e&&(e=o.key?"waiting":"processing")}return e},getErrorMessage:function(e){switch(e){case"sourceFileUnavailable":
return n.i(l.default)("This media is inaccessible. Please check that the file exists with the correct permissions.");case"sourceFileMetadataError":return n.i(l.default)("The metadata for this media is invalid. Please reanalyze the media and try again.");case"clientProfileError":return n.i(l.default)("The client profile for the sync target is invalid.");case"ioError":return n.i(l.default)("An error occurred processing this media. Please check that the disk is not full.");case"transcoderError":
return n.i(l.default)("The transcoder was unable to process this media.");case"mediaAnalysisError":return n.i(l.default)("This media was unable to be analyzed.");case"downloadFailed":return n.i(l.default)("This media was unable to be downloaded. Please check that it is still available and try again.");case"unknownError":return n.i(l.default)("An error occurred while syncing this media.")}return n.i(l.default)("An error occurred while syncing this media.")},bindings:{".title":{
modelAttribute:"title"},".subtitle":{modelAttribute:"Media",manual:!0,formatter:function(e){var t=this.analyzeParts(),n=this.analyzeTranscodeJobs();switch(this.$(".subtitle").addClass("hidden"),t){case"complete":this.$(".complete-subtitle").removeClass("hidden");break;case"waiting":this.$(".waiting-subtitle").removeClass("hidden"),n.isUploading&&(this.$(".cloud-sync-waiting").addClass("hidden"),this.$(".cloud-sync-uploading").removeClass("hidden"),this.$(".transcode-progress").text(n.progress))
;break;case"downloading":n.active?(this.$(".downloading-subtitle").removeClass("hidden"),this.$(".transcode-progress").text(n.progress)):this.$(".processing-subtitle").removeClass("hidden");break;case"processing":n.active?(this.$(".converting-subtitle").removeClass("hidden"),this.$(".transcode-progress").text(n.progress),this.$(".transcode-remaining").text(n.remaining)):this.$(".processing-subtitle").removeClass("hidden");break;case"unknown":this.$(".unknown-subtitle").removeClass("hidden")
;break;default:this.$(".failed-subtitle").removeClass("hidden"),this.$(".error-message").text(this.getErrorMessage(t))}}}},onRender:function(){this.image.setElement(this.ui.poster)}});t.a=h},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(2),s=n.n(r),o=n(360),l=n.n(o),u=n(4),c=n(12),d=n(42),h=n(43),p=n(1800),f=h.a.extend({tagName:"ol",className:"list media-list playlist-items",itemView:p.a,sorted:!0,itemEvents:{sort:"onSort"},initialize:function(){s.a.bindAll(this,"onItemMove")},
onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new l.a(this.el,s.a.extend({onAdd:this.onItemMove,onUpdate:this.onItemMove,handle:".sortable-handle",animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2},this.options.sortableOptions))},onClose:function(){this.sortable&&this.sortable.destroy()},onSort:function(){this.render()},onItemMove:function(e){var t=a()(e.item).data("queue-item-id"),i=a()(e.item).prev().data("queue-item-id"),r=this.options.playQueue
;if(i)return void r.moveItem(t,i);var o=r.get("selectedItem").get("title"),l=new d.a({title:n.i(u.default)("Convert Immediately"),message:n.i(u.default)("Do you want to start converting this item immediately? Any conversion progress for '{1}' will be lost.",o)}),h=l.promise;h.done(function(){r.moveItem(t)}),h.fail(s.a.bind(this.render,this)),c.a.trigger("show:modal",l)}});t.a=f},function(e,t,n){"use strict";var i=n(2926),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a,
serializeData:function(){return{serverID:this.model.id}}});t.a=s},function(e,t,n){"use strict";var i=n(2927),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(4),c=n(210),d=n(379),h=n(23),p=n(543),f=n(325),g=n(58),m=n(859),v=o.a.Layout.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:a.a,ui:{poster:".media-poster"},events:{"click .promote-btn":"onPromoteClick","click .delete-btn":"onDeleteClick"},regions:{
statusRegion:".conversion-status-region"},attributes:function(){return{"data-queue-item-id":this.model.id}},initialize:function(e){this.metadataItem=e.model.get("metadataItem"),this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.hideDragHandle=e.hideDragHandle,this.type=this.metadataItem.get("type");var t=d.a[this.type];"movie"===this.type&&(t=d.a.art);var n="episode"===this.type?"show":this.type;this.image=new g.a({model:this.metadataItem,
type:n,placeholderClass:t,height:60,modelAttribute:"thumb",getUrl:this.getPosterUrl})},bindings:{".generator-title":{model:"metadataItem",modelAttribute:"title",formatter:function(e){return c.a.title(this.metadataItem)}},".generator-target":{modelAttribute:"target",formatter:function(e){return this.model.get("syncItemId")?n.i(u.default)("Sync"):e}},".sortable-handle":{model:"playQueue",modelAttribute:"playQueueSelectedItemID",manual:!0,autohide:function(e){
return this.model.get("playQueueItemID")!==e}},".promote-btn":{modelAttribute:"queueIndex",manual:!0,autohide:function(e){var t=this.playQueue.getCurrentItem();return this.hideDragHandle||e-t.get("queueIndex")>1}}},serializeData:function(){return{hideDragHandle:this.hideDragHandle}},getPosterUrl:function(e){return"episode"===this.model.get("type")?this.model.get("grandparentThumb")||this.model.get("parentThumb")||e:e},deleteSyncItem:function(){var e=l.a("appModel"),t=new p.a({
id:this.model.get("syncItemId"),clientIdentifier:this.model.get("clientIdentifier")},{server:e.get("user").server});return h.a.execute("deleteSyncItem",{syncItem:t,server:this.model.server})},deleteGenerator:function(){var e=new f.a({id:this.model.get("generatorID")},{server:this.model.server,playlistID:this.metadataItem.get("playlistID")});return h.a.execute("disableVersionGenerator",{generator:e,ratingKey:this.metadataItem.get("ratingKey")})},onRender:function(){
this.image.setElement(this.ui.poster),this.statusRegion.show(new m.a({model:this.model,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onClose:function(){this.image.close()},onCollectionSort:function(e){this.trigger("sort")},onPromoteClick:function(e){e.preventDefault();var t=this.playQueue.get("collection");this.listenToOnce(t,"sort",s.a.debounce(this.onCollectionSort));var n=this.model.get("playQueueItemID"),i=this.playQueue.get("playQueueSelectedItemID")
;this.playQueue.moveItem(n,i)},onDeleteClick:function(e){e.preventDefault(),this.model.has("syncItemId")?this.deleteSyncItem():this.deleteGenerator()}});t.a=v},function(e,t,n){"use strict";var i=n(43),a=n(1802),r=i.a.extend({tagName:"ul",className:"list card-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2929),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(12),u=n(23),c=n(180),d=n(407),h=o.a.ItemView.extend({tagName:"li",className:"striped-list-item",template:a.a,events:{
"click a":"onClick"},initialize:function(e){this.currentKey=e.currentKey},serializeData:function(){return{channel:this.model.toJSON(),serverID:this.model.server.id,currentKey:this.currentKey}},bindings:{".media-title":{modelAttribute:"title"}},onClick:function(e){if(/\/updates$/.test(this.model.id))e.preventDefault(),u.a.execute("updateChannel",{server:this.model.server});else if(/\/prefs$/.test(this.model.id)){e.preventDefault();var t=new c.a([],{server:this.model.server,url:this.model.id})
;t.fetch().done(s.a.bind(function(){l.a.trigger("show:modal",new d.a({model:this.model,collection:t}))},this))}}});t.a=h},function(e,t,n){"use strict";var i=n(43),a=n(1804),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list channel-directory-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2930),a=n.n(i),r=n(15),s=n(4),o=n(12),l=n(58),u=n(1875),c=r.a.ItemView.extend({tagName:"li",
className:"poster-item media-tile-list-item channel-directory-tile-list-item channel",template:a.a,ui:{poster:".media-poster",subtitle:".media-subtitle-1"},events:{"click a":"onClick"},initialize:function(e){this.closeOnInstall=e.closeOnInstall,this.image=new l.a({model:this.model,type:"channel",width:150})},bindings:{".media-title":{modelAttribute:"title"},".installed-icon":{modelAttribute:"installed",manual:!0,autohide:!0,formatter:function(e,t){var i=e?n.i(s.default)("Installed"):""
;return this.ui.subtitle.text(i),e}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onClick:function(e){e.preventDefault(),o.a.trigger("show:modal",new u.a({model:this.model,closeOnInstall:this.closeOnInstall}))}});t.a=c},function(e,t,n){"use strict";var i=n(43),a=n(1806),r=i.a.extend({tagName:"ul",className:"tile-list media-tile-list channel-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(2931),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(4),u=n(12),c=n(23),d=n(180),h=n(58),p=n(407),f=o.a.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel",template:a.a,ui:{poster:".media-poster"},events:{"click .settings-btn":"onSettingsClick","click .uninstall-btn":"onUninstallClick"},initialize:function(e){this.skipFirstRender=e.skipFirstRender,this.image=new h.a({model:this.model,type:"channel",width:150}),this.shared=this.model.server.get("shared")},
serializeData:function(){return{item:this.model.toJSON(),serverID:this.model.server.id,shared:this.shared}},render:function(){if(this.skipFirstRender)return this.skipFirstRender=!1,this;this.visible=!0,o.a.ItemView.prototype.render.apply(this,arguments)},show:function(){this.visible||(this.visible=!0,this.render())},hide:function(){this.visible&&(this.image.cancel(),this.visible=!1,this.stopListening(this.model),this.$el.empty())},bindings:{".media-title":{modelAttribute:"title"},
".media-subtitle-1":{modelAttribute:"type",autohide:!0,formatter:function(e){return"video"===e?n.i(l.default)("Video"):"music"===e?n.i(l.default)("Music"):"photos"===e?n.i(l.default)("Photo"):n.i(l.default)("Utility")}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onSettingsClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");var t=new d.a([],{server:this.model.server,url:this.model.id+"/:/prefs"
}),n=t.fetch();n.done(s.a.bind(function(){u.a.trigger("show:modal",new p.a({model:this.model,collection:t}))},this)),n.always(s.a.bind(function(){this.$el.removeClass("active")},this))}},onUninstallClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");var t=c.a.execute("uninstallChannel",{channel:this.model});t.done(s.a.bind(function(){this.model.trigger("destroy",this.model,this.model.collection)},this)),t.always(s.a.bind(function(){
this.$el.removeClass("active")},this))}}});t.a=f},function(e,t,n){"use strict";var i=n(258),a=n(43),r=n(1808),s=a.a.extend({mixins:[i.a],tagName:"ul",className:"tile-list media-tile-list album-tile-list",itemView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2932),a=n.n(i),r=n(2),s=n.n(r),o=n(169),l=n(332),u=n(58),c=o.a.extend({className:"poster-item media-tile-list-item",template:a.a,ui:l.a.prototype.ui,initialize:function(e){o.a.prototype.initialize.apply(this,arguments),
this.image=new u.a({model:this.model,type:"album",width:180})},bindings:s.a.extend({},o.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"year"}}),onMoreClick:function(e){l.a.prototype.onMoreClick.apply(this,arguments)}});t.a=c},function(e,t,n){"use strict";var i=n(557),a=n(1810),r=i.a.extend({tagName:"ul",className:"list media-list track-list show-context",itemView:a.a,itemViewOptions:function(){return{collection:this.collection}}});t.a=r
},function(e,t,n){"use strict";var i=n(2933),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(12),d=n(141),h=n(161),p=n(23),f=n(59),g=n(218),m=n(405),v=u.a.ItemView.extend({tagName:"li",className:"striped-list-item",template:a.a,ui:{index:".track-index span",actions:".track-actions",dropdown:".track-actions-dropdown"},events:{"click .track-list-inner-item":"onClick","click .track-music-video-btn":"onMusicVideoClick","click .track-more-btn":"onMoreClick",
"hide.bs.dropdown .track-actions-dropdown":"onDropdownHide"},collectionEvents:{sort:"onCollectionSort"},initialize:function(e){s.a.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new g.a({},{item:this.model}),this.playQueueManager=this.model.server.get("playQueueManager"),this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),
this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),this.onPlayQueueChange(this.playQueueManager.getFor(this.model)),c.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){return{index:this.getIndex(),selected:this.selected}},getIndex:function(){return this.collection.indexOf(this.model)+1},bindings:{".track-parent-index":{modelAttribute:"parentIndex"},".track-title":{modelAttribute:"title"},".track-subtitle-1":{
modelAttribute:"originalTitle",autohide:function(e){var t=e&&this.artistTitle&&e.toLowerCase()!==this.artistTitle.toLowerCase();return this.$el.toggleClass("show-subtitle",!!t),t}},".track-context":{modelAttribute:"duration",autohide:!0,formatter:function(e){return!!e&&n.i(h.a)(e)}},".track-music-video-btn":{model:"mediaActions",modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0}},onRender:function(){var e=this.playQueueManager.getFor(this.model);if(e){var t=e.get("selectedItem")
;t&&this.model.get("key")===t.get("key")&&this.$(".track-list-item").addClass("current-track")}},onClose:function(){this.dropdown&&this.dropdown.close(),c.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onCollectionSort:function(){this.ui.index.text(this.getIndex())},onClick:function(e){e.preventDefault(),p.a.execute("playMedia",{item:this.model,siblings:!0})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation()
;var t=n.i(d.a)(this.model);if(!s.a.isEmpty(t)){var i=new f.a({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});p.a.execute("playMedia",{item:i})}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new m.a({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover")
;var t=l()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"))},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$(".track-list-item").toggleClass("current-track",n)},onPlayQueueChange:function(e){
e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){this.stopListening(e),this.$(".track-list-item").removeClass("current-track")}});t.a=v},function(e,t,n){"use strict";var i=n(43),a=n(1812),r=i.a.extend({className:"artwork-options-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2934),a=n.n(i),r=n(15),s=n(320),o=n(379),l=n(143),u=r.a.Layout.extend({tagName:"span",template:a.a,regions:{poster:".media-poster"},
initialize:function(e){var t=e.artworkType,n=150;"art"===t?n=240:"banner"===t&&(n=520),this.$el.addClass(t),this.image=new l.a({className:"media-poster-image",model:this.model,modelAttribute:"thumb",placeholderClass:o.a[t],width:n,height:s.a.getPosterHeight(t,n)})},bindings:{".artwork-option":{modelAttribute:"selected",manual:!0,formatter:function(e,t){t.toggleClass("selected",e)}}},onRender:function(){this.poster.show(this.image)}});t.a=u},function(e,t,n){"use strict"
;var i=n(1825),a=n(1814),r=i.a.extend({tagName:"ul",className:"list media-list media-details-list episode-details-list show-context",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2935),a=n.n(i),r=n(2),s=n.n(r),o=n(318),l=n(556),u=n(58),c=l.a.extend({className:"striped-list-item media-list-item media-details-list-item episode-details-list-item",template:a.a,showRating:!0,bypassShowUnwatchedIconsSetting:!0,createImageView:function(){this.image=new u.a({model:this.model,type:"episode",
getUrl:this.getPosterUrl,height:110})},getPosterUrl:function(e){return e},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),n.i(o.a)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});t.a=c},function(e,t,n){"use strict";var i=n(557),a=n(1816),r=i.a.extend({tagName:"ul",
className:"list media-list episode-list show-context",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2936),a=n.n(i),r=n(2),s=n.n(r),o=n(318),l=n(169),u=l.a.extend({className:"striped-list-item media-list-item episode-list-item",template:a.a,showRating:!0,bypassShowUnwatchedIconsSetting:!0,regions:{rating:".media-rating"},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){
return t.toggleClass("date",null==e),n.i(o.a)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});t.a=u},function(e,t,n){"use strict";var i=n(258),a=n(43),r=n(1818),s=a.a.extend({mixins:[i.a],tagName:"ul",className:"tile-list media-tile-list episode-tile-list",itemView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2937),a=n.n(i),r=n(2),s=n.n(r),o=n(318),l=n(169),u=n(332),c=n(58),d=l.a.extend({
className:"poster-item media-tile-list-item episode-tile-list-item",template:a.a,ui:u.a.prototype.ui,bypassShowUnwatchedIconsSetting:!0,initialize:function(e){l.a.prototype.initialize.apply(this,arguments),this.image=new c.a({model:this.model,type:"episode",width:250})},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"index",formatter:function(e){return n.i(o.a)({useLongName:!0,episodeIndex:e,
date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e&&e.length||0},autohide:function(e){return e>1}}}),onMoreClick:function(e){u.a.prototype.onMoreClick.apply(this,arguments)}});t.a=d},function(e,t,n){"use strict";var i=n(2938),a=n.n(i),r=n(531),s=n(169),o=n(332),l=n(58),u=s.a.extend({className:"poster-item media-tile-list-item extra-tile-list-item",template:a.a,ui:o.a.prototype.ui,initialize:function(e){
s.a.prototype.initialize.apply(this,arguments),this.image=new l.a({model:this.model,type:"clip",width:250})},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"extraType",formatter:function(e){if(e){var t=r.a.get(e);return t&&t.title}}}}});t.a=u},function(e,t,n){"use strict";var i=n(43),a=n(1821),r=n(812),s=i.a.extend({mixins:[r.a],tagName:"ul",itemView:a.a,className:"list"});t.a=s},function(e,t,n){"use strict"
;var i=n(2939),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"li",template:a.a,className:"striped-list-item",initialize:function(e){this.item=e.item}});t.a=s},function(e,t,n){"use strict";var i=n(43),a=n(1824),r=n(1823),s=i.a.extend({tagName:"ul",className:"list match-result-list",itemView:a.a,emptyView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2940),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict"
;var i=n(2941),a=n.n(i),r=n(15),s=n(23),o=n(1820),l=r.a.Layout.extend({tagName:"li",className:"striped-list-item match-result-list-item row",template:a.a,ui:{matchExtendedInfo:".match-extended-info"},regions:{childrenRegion:".children-region"},events:{"click .match-result":"onClick"},initialize:function(e){this.item=e.item},onRender:function(){var e=this.model.get("children");if(e){var t=e.first();t&&"track"===t.get("type")&&(this.ui.matchExtendedInfo.removeClass("hidden"),
this.childrenRegion.show(new o.a({collection:e})))}},onClick:function(e){e.preventDefault(),s.a.execute("match",{item:this.item,guid:this.model.id,name:this.model.get("name"),children:this.model.get("children")})}});t.a=l},function(e,t,n){"use strict";var i=n(258),a=n(43),r=a.a.extend({mixins:[i.a]});t.a=r},function(e,t,n){"use strict";var i=n(2944),a=n.n(i),r=n(15),s=n(762),o=r.a.ItemView.extend({className:"hidden",template:a.a,bindings:{".media-progress-pct":{modelAttribute:"viewOffset",
manual:!0,formatter:function(e,t){var i=this.model,a="track"===i.get("type")?0:n.i(s.a)(e,i.get("duration"));a&&t.css("width",a+"%"),this.$el.toggleClass("hidden",!a)}}}});t.a=o},function(e,t,n){"use strict";var i=n(2889),a=n.n(i),r=n(15),s=n(1828),o=r.a.Layout.extend({template:a.a,tagName:"li",className:"play-queue-list-item",attributes:function(){return{"data-play-queue-id":this.model.get("playQueueItemID")||this.model.get("ratingKey")}},events:{"click a":"onPlayClick",
"click .delete-btn":"onDeleteClick"},regions:{metadataRegion:".play-queue-metadata-region"},onRender:function(){this.metadataRegion.show(new s.a({model:this.model.get("metadataItem")}))},onPlayClick:function(e){e.preventDefault(),this.trigger("skip",this.model.get("key"))},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model)}});t.a=o},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(2890),s=n.n(r),o=n(162),l=n(312),u=n(860),c=u.a.extend({template:s.a,posterWidth:{video:70},bindings:a()({},u.a.prototype.bindings,{".media-primary-subtitle":{modelAttribute:"grandparentTitle",modelListeners:["grandparentTitle","duration"],formatter:function(e){var t=e;this.model.parent&&(t=t||this.model.parent.get("parentTitle"),this.model.parent.parent&&(t=this.model.parent.parent.get("title")));var i=this.model.get("duration")
;return"movie"===this.type&&i&&(t=n.i(l.a)(i)),t||""}},".media-secondary-subtitle":{modelAttribute:"parentTitle",modelListeners:["parentTitle","index"],formatter:function(e){var t=e;return this.model.parent&&(t=t||this.model.parent.get("title")),"episode"===this.type&&(t=n.i(o.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:this.model.get("index"),date:this.model.get("originallyAvailableAt")})),t&&(t=" - "+t),t||""}}}),serializeData:function(){return{type:this.type}}});t.a=c
},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(2),s=n.n(r),o=n(360),l=n.n(o),u=n(43),c=n(1830),d=u.a.extend({tagName:"ol",className:"list media-list playlist-items",itemView:c.a,sorted:!0,itemEvents:{remove:"onItemRemove"},initialize:function(e){this.canEdit=!this.model.get("smart")},onRender:function(){this.sortable&&this.sortable.destroy(),this.canEdit&&(this.sortable=new l.a(this.el,{onUpdate:s.a.bind(this.onItemMove,this),draggable:".playlist-item",handle:".sortable-handle",
animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2}))},onItemRemove:function(e,t,n){this.model.removeItem(n)},onItemMove:function(e){var t=a()(e.item).data("playlist-id"),n=a()(e.item).prev().data("playlist-id");this.model.moveItem(t,n)},onClose:function(){this.sortable&&this.sortable.destroy()}});t.a=d},function(e,t,n){"use strict";var i=n(2946),a=n.n(i),r=n(15),s=n(23),o=n(1831),l=r.a.Layout.extend({template:a.a,tagName:"li",className:"striped-list-item media-list-item playlist-item",
events:{"click .delete-btn":"onDeleteClick","click .playlist-inner-item":"onClick"},attributes:function(){return{"data-playlist-id":this.model.get("playlistItemID")}},regions:{metadataRegion:".playlist-metadata-region"},initialize:function(e){this.canEdit=e&&e.canEdit},onRender:function(){this.metadataRegion.show(new o.a({model:this.model.get("metadataItem"),canEdit:this.canEdit}))},onClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),s.a.execute("playMedia",{item:this.model,
siblings:!0})},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model.get("playlistItemID"))}});t.a=l},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(2947),s=n.n(r),o=n(12),l=n(162),u=n(160),c=n(312),d=n(161),h=n(860),p=h.a.extend({template:s.a,posterWidth:{video:103,photo:59},events:{"click .media-details":"onDetailsClick","click .media-primary-subtitle":"onGrandparentClick","click .media-secondary-subtitle":"onParentClick"},
bindings:a()({},h.a.prototype.bindings,{".media-primary-subtitle":{modelAttribute:"grandparentTitle",formatter:function(e){return"movie"!==this.type&&e?e:""}},".media-secondary-subtitle":{modelAttribute:"parentTitle",modelListeners:["parentTitle","index","year"],formatter:function(e){var t=e;return"episode"===this.type?t=n.i(l.a)({useLongName:!0,seasonIndex:this.model.get("parentIndex"),episodeIndex:this.model.get("index"),date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,
separator:" - "}):"movie"===this.type&&(t=this.model.get("year")),t||""}},".media-duration":{modelAttribute:"duration",formatter:function(e){return"photo"===this.type?n.i(u.default)(this.model.get("originallyAvailableAt")):"track"===this.type?n.i(d.a)(e):n.i(c.a)(e)}}}),initialize:function(e){h.a.prototype.initialize.apply(this,arguments),this.canEdit=e&&e.canEdit,"track"===this.type&&(this.playQueueManager=this.model.server.get("playQueueManager"),
this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),this.onPlayQueueChange(this.playQueueManager.getFor(this.model)))},serializeData:function(){return{canEdit:this.canEdit,hasDetails:"track"!==this.type&&"photo"!==this.type,type:this.type}},navigateTo:function(e,t){e&&(t.preventDefault(),t.stopPropagation(),o.a.trigger("navigate","details",{serverID:this.model.server.id,key:e}))
},onRender:function(){if(h.a.prototype.onRender.apply(this,arguments),"track"===this.type){var e=this.playQueueManager.getFor(this.model);if(!e)return;var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$el.addClass("current-track")}},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$el.toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},
onRemovePlayQueue:function(e){this.stopListening(e),this.$el.removeClass("current-track")},onDetailsClick:function(e){var t=this.model.get("type");"track"!==t&&"photo"!==t&&this.navigateTo(this.model.get("key"),e)},onParentClick:function(e){this.navigateTo(this.model.get("parentKey"),e)},onGrandparentClick:function(e){this.navigateTo(this.model.get("grandparentKey"),e)}});t.a=p},function(e,t,n){"use strict";var i=n(258),a=n(43),r=n(1833),s=a.a.extend({mixins:[i.a],tagName:"ul",
className:"tile-list media-tile-list season-tile-list",itemView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2948),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(169),u=n(332),c=n(58),d=l.a.extend({className:"poster-item media-tile-list-item",template:a.a,ui:u.a.prototype.ui,initialize:function(e){l.a.prototype.initialize.apply(this,arguments),this.image=new c.a({model:this.model,type:"season",width:150})},bindings:s.a.extend({},l.a.prototype.bindings,{".media-title":{modelAttribute:"title"},
".media-subtitle-1":{modelAttribute:"leafCount",formatter:function(e){return null==e?"":1===e?n.i(o.default)("{1} episode",e):n.i(o.default)("{1} episodes",e)}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){var t=this.model.server.get("shared"),n=this.model.server.get("multiuser");return!(t&&!n)&&("album"!==this.type&&!!e)}}}),onMoreClick:function(e){u.a.prototype.onMoreClick.apply(this,arguments)}});t.a=d},function(e,t,n){"use strict"
;var i=n(43),a=n(1835),r=i.a.extend({tagName:"ul",className:"list select-list select-playlist-list minimal-scroll",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2949),a=n.n(i),r=n(15),s=n(406),o=r.a.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",template:a.a,ui:{poster:".playlist-poster"},initialize:function(){this.image=new s.a({model:this.model,width:40})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()
}});t.a=o},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(812),s=n(557),o=n(1837),l=s.a.extend({mixins:[r.a],initialize:function(){s.a.prototype.initialize.apply(this,arguments),this.listenTo(this.collection,"change:parentIndex",a.a.debounce(this.onParentIndexChange))},tagName:"ul",className:"list media-list track-list show-context",itemView:o.a,onParentIndexChange:function(e,t){null!=e.previous("parentIndex")&&this.listModel.fetch()}});t.a=l},function(e,t,n){"use strict"
;var i=n(2950),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(12),d=n(161),h=n(141),p=n(23),f=n(810),g=n(59),m=n(218),v=n(405),y=n(333),b=u.a.ItemView.extend({mixins:[f.a],tagName:"li",template:a.a,className:"striped-list-item",ui:{actions:".track-actions",container:".track-list-inner-item",dropdown:".track-actions-dropdown"},events:{"mousenter .track-list-inner-item":"onMouseEnter","mouseleave .track-list-inner-item":"onMouseLeave","mousedown .track-list-inner-item":"onMouseDown",
"click .track-list-inner-item":"onClick","click .track-music-video-btn":"onMusicVideoClick","click .track-edit-btn":"onEditClick","click .track-more-btn":"onMoreClick","hide.bs.dropdown .track-actions-dropdown":"onDropdownHide"},onlyAfterRender:["select","deselect"],initialize:function(e){s.a.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new m.a({},{item:this.model}),
this.playQueueManager=this.model.server.get("playQueueManager"),this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),this.onPlayQueueChange(this.playQueueManager.getFor(this.model)),c.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){return this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),{
showEdit:!this.shared&&!this.synced,selected:this.selected}},bindings:{".track-index span":{modelAttribute:"index",formatter:function(e){return e<1?"":e}},".track-parent-index":{modelAttribute:"parentIndex"},".track-title":{modelAttribute:"title"},".track-subtitle-1":{modelAttribute:"originalTitle",autohide:function(e){var t=e&&this.artistTitle&&e.toLowerCase()!==this.artistTitle.toLowerCase();return this.$el.toggleClass("show-subtitle",!!t),t}},".track-context":{modelAttribute:"duration",
autohide:!0,formatter:function(e){return!!e&&n.i(d.a)(e)}},".track-music-video-btn":{model:"mediaActions",modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0}},onRender:function(){var e=this.playQueueManager.getFor(this.model);if(e){var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$(".track-list-item").addClass("current-track")}},onClose:function(){this.dropdown&&this.dropdown.close(),c.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){
this.containerSize=e},onClick:function(e){this.stopTrackingSelecting(e,function(){e.preventDefault(),p.a.execute("playMedia",{item:this.model,siblings:!0})})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=n.i(h.a)(this.model);if(!s.a.isEmpty(t)){var i=new g.a({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});p.a.execute("playMedia",{item:i})}},onEditClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),c.a.trigger("show:modal",new y.a({mediaActions:this.mediaActions}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new v.a({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=l()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},
onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"))},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$(".track-list-item").toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){this.stopListening(e),this.$(".track-list-item").removeClass("current-track")},
select:function(){this.ui.container.addClass("selected")},deselect:function(){this.ui.container.removeClass("selected")}});t.a=b},function(e,t,n){"use strict";var i=n(555),a=n(556),r=i.a.extend({tagName:"ul",className:"list virtual-list media-list media-details-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(555),a=n(169),r=i.a.extend({tagName:"ul",className:"list virtual-list media-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(555),a=n(332),r=i.a.extend({
tagName:"ul",className:"tile-list virtual-list media-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(2),s=n.n(r),o=n(360),l=n.n(o),u=n(43),c=n(1843),d=n(1842),h=u.a.extend({tagName:"ol",className:"list media-list playlist-items",itemView:c.a,emptyView:d.a,sorted:!0,onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new l.a(this.el,{onUpdate:s.a.bind(this.onItemMove,this),handle:".sortable-handle",animation:200,scroll:!0,
scrollSensitivity:100,scrollSpeed:2})},onClose:function(){this.sortable&&this.sortable.destroy()},onItemMove:function(e){var t=a()(e.item).data("generator-id"),n=a()(e.item).prev().data("generator-id");this.collection.parent.moveItem(t,n)}});t.a=h},function(e,t,n){"use strict";var i=n(2951),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict"
;var i=n(2952),a=n.n(i),r=n(15),s=n(4),o=n(12),l=n(320),u=n(1709),c=n(23),d=n(406),h=n(266),p=n(1896),f=r.a.ItemView.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:a.a,ui:{poster:".media-poster",status:".generator-status"},events:{"click .playlist-inner-item":"onClick","click .retry-btn":"onRetryClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},attributes:function(){return{
"data-generator-id":this.model.id}},initialize:function(e){this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.status=this.model.get("status");this.compositeImage=new d.a({model:this.model,width:l.a.getPosterWidth("movie",60),height:60,rows:1,columns:1}),this.listenTo(this.transcodeJobs,"reset add remove",this.onTranscodeJobsChange)},resetState:function(){var e=["converting",u.a.PENDING,u.a.COMPLETE,u.a.FAILED];this.ui.status.removeClass(e.join(" "))},getState:function(e){
return this.transcodeJobs.findWhere({generatorID:this.model.id})?"converting":e.get("itemsFailedCount")>0?u.a.FAILED:e.get("state")},bindings:{".generator-title":{modelAttribute:"title"},".generator-target":{modelAttribute:"target"},".generator-status":{model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,formatter:function(e,t){this.resetState(),t.addClass(this.getState(this.status))}},".generator-status-failed-message":{model:"status",
modelAttribute:"itemsFailedCount",formatter:function(e){return 1===e?n.i(s.default)("1 failed item"):n.i(s.default)("{1} failed items",e)}},".retry-btn":{model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,autohide:function(e){return this.getState(this.status)===u.a.FAILED}}},onRender:function(){this.compositeImage.setElement(this.ui.poster)},onClose:function(){this.compositeImage.close()},onTranscodeJobsChange:function(){var e=this.getState(this.status)
;this.resetState(),this.ui.status.addClass(e)},onClick:function(e){e.preventDefault(),o.a.trigger("show:modal",new p.a({model:this.model,listModel:this.model.get("children"),transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onRetryClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),c.a.execute("reprocessVersionGenerator",{generator:this.model})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),o.a.trigger("show:modal",new h.a({
model:this.model}))},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),c.a.execute("deleteVersionGenerator",{generator:this.model})}});t.a=f},function(e,t,n){"use strict";var i=n(43),a=n(1845),r=i.a.extend({tagName:"ul",className:"list version-generator-metadata-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2953),a=n.n(i),r=n(15),s=n(4),o=n(162),l=n(1708),u=n(23),c=n(58),d=n(859),h=r.a.Layout.extend({tagName:"li",
className:"striped-list-item version-generator-metadata-list-item",template:a.a,ui:{poster:".media-poster"},regions:{statusRegion:".conversion-status-region"},events:{"click .enable-btn":"onEnableClick","click .retry-btn":"onRetryClick"},modelEvents:{"change:processingState":"onProcessingStateChange"},initialize:function(e){this.generator=e.generator,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.type=this.model.get("type"),this.image=new c.a({model:this.model,
type:"movie",height:60,modelAttribute:"episode"===this.type?"grandparentThumb":"thumb"})},bindings:{".generator-metadata-title":{modelAttribute:"title",formatter:function(e){return this.model.get("grandparentTitle")||this.model.get("parentTitle")||e}},".generator-metadata-episode-index":{modelAttribute:"index",autohide:!0,formatter:function(e){if("episode"===this.type)return n.i(o.a)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),
noLeadingZero:!0,separator:" \xb7 "})}},".generator-metadata-year":{modelAttribute:"year",autohide:!0,formatter:function(e){if("movie"===this.type)return e}},".conversion-status-failed-message":{modelAttribute:"processingStateContext",formatter:function(e){return this.getErrorMessage(e)}}},getErrorMessage:function(e){var t=l.a.contexts;switch(e){case t.FILE_UNAVAILABLE:return n.i(s.default)("File unavailable");case t.METADATA_ERROR:return n.i(s.default)("Invalid metadata");case t.PROFILE_ERROR:
return n.i(s.default)("Invalid profile");case t.ANALYSIS_ERROR:return n.i(s.default)("Unable to analyze")}return n.i(s.default)("Unable to convert")},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new d.a({model:this.model,generator:this.generator,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting,initialState:this.model.get("processingState"),initialErrorMessage:this.getErrorMessage(this.model.get("processingStateContext"))}))},
onClose:function(){this.image.close()},onProcessingStateChange:function(e,t){this.statusRegion.currentView&&this.statusRegion.currentView.enterState(t)},onEnableClick:function(e){e.preventDefault(),u.a.execute("enableVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})},onRetryClick:function(e){e.preventDefault(),u.a.execute("reprocessVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})}});t.a=h},function(e,t,n){"use strict"
;var i=n(43),a=n(1847),r=i.a.extend({tagName:"ul",className:"list side-bar-list",itemView:a.a,initialize:function(e){var t=this.collection.section;e.disabled?this.$el.addClass("disabled"):t&&(this.listenTo(t,"change:currentType",this.onCurrentTypeChange),t.get("pseudo")||this.collection.populate({reset:!0,scope:"page"}))},onCurrentTypeChange:function(e,t){this.collection.section.set("currentSort",null,{silent:!0}),e.get("pseudo")||this.collection.fetch({reset:!0,scope:"page"})}});t.a=r
},function(e,t,n){"use strict";var i=n(2954),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"li",template:a.a,events:{"click a":"onClick"},initialize:function(){this.model.section.get("currentSort")||this.model.get("isDefault")&&(this.model.set("selected",!0),this.model.section.set("currentSort",this.model,{silent:!0}),this.model.section.trigger("default:currentSort"));this.listenTo(this.model.section,"change:currentSort",this.onCurrentSortChange)},bindings:{".sort-btn":{
modelAttribute:"selected",manual:!0,formatter:function(e,t){t.toggleClass("selected",e)}},".desc-icon":{modelAttribute:"direction",manual:!0,formatter:function(e,t){t.toggleClass("hidden","desc"!==e)}},".asc-icon":{modelAttribute:"direction",manual:!0,formatter:function(e,t){t.toggleClass("hidden","asc"!==e)}}},onCurrentSortChange:function(e,t){t&&this.model.id!==t.id&&this.model.set({selected:!1})},onClick:function(e){e.preventDefault();var t=this.model.section.get("currentSort")
;t&&t.id===this.model.id?t.reverseSortDirection():this.model.set({selected:!0}),this.model.section.set("currentSort",this.model,{silent:!0}),this.model.section.trigger("change:currentSort",this.model.section,this.model)}});t.a=s},function(e,t,n){"use strict";var i=n(15),a=n(1849),r=i.a.CollectionView.extend({tagName:"ul",className:"list browse-directory-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2955),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"li",
className:"striped-list-item browse-directory-list-item disabled",template:a.a,serializeData:function(){return{filePath:this.model.toJSON()}}});t.a=s},function(e,t,n){"use strict";var i=n(15),a=n(5),r=n.n(a),s=n(1851),o=i.a.CollectionView.extend({tagName:"ul",className:"list browse-directory-list",itemView:s.a,selectedFilePath:null,events:{"click a":"onDirectoryClick"},collectionEvents:{reset:"onReset"},startLoadingItem:function(e){this.selectedFilePath&&this.unselectItem(this.selectedFilePath),
this.selectedFilePath=e;var t=this.children.findByModel(e);t&&t.select(!0)},stopLoadingItem:function(e){var t=this.children.findByModel(e);t&&t.select(!1)},unselectItem:function(e){this.selectedFilePath=null;var t=this.children.findByModel(e);t&&t.unselect()},onReset:function(){this.parentFilePath&&this.collection.add(this.parentFilePath,{at:0})},onDirectoryClick:function(e){e.preventDefault();var t=r()(e.currentTarget),n=t.data("key"),i=this.collection.get(n)||this.parentFilePath
;this.trigger("change:path",i),this.options.isRoot||(i.parent.parent?(this.parentFilePath=i.parent.parent.clone(),this.parentFilePath.set({title:".. [Back]",isBackShortcut:!0})):this.parentFilePath=null)}});t.a=o},function(e,t,n){"use strict";var i=n(2956),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item",template:a.a,ui:{link:"a",spinner:".loading"},serializeData:function(){return{filePath:this.model.toJSON(),isRoot:!this.model.parent}
},select:function(e){this.ui.link.addClass("selected"),this.ui.spinner.toggleClass("hidden",!e)},unselect:function(){this.ui.link.removeClass("selected"),this.ui.spinner.addClass("hidden")}});t.a=s},function(e,t,n){"use strict";var i=n(43),a=n(1853),r=i.a.extend({tagName:"ul",className:"agents-nav nav nav-pills nav-pills-sm",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2957),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"li",template:a.a,bindings:{a:{modelAttribute:"selected",
manual:!0,formatter:function(e){this.$el.toggleClass("active",!!e)}}}});t.a=s},function(e,t,n){"use strict";var i=n(360),a=n.n(i),r=n(43),s=n(1855),o=r.a.extend({tagName:"ul",className:"list contributor-list",itemView:s.a,events:{"change input[type=checkbox]":"save",update:"save"},save:function(){var e=[];this.$(":checked").each(function(t){e.push(this.name)}),this.trigger("save",e.join(","))},onRender:function(){this.sortable=new a.a(this.$el[0],{draggable:".card-sortable",animation:200})},
onClose:function(){this.sortable.destroy()}});t.a=o},function(e,t,n){"use strict";var i=n(2958),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(12),u=n(180),c=n(407),d=n(1874),h=o.a.ItemView.extend({tagName:"li",className:"card card-sortable",template:a.a,events:{"change input[type=checkbox]":"onEnabledChange","click .settings-btn":"onSettingsClick","click .info-btn":"onInfoClick"},initialize:function(){this.attribution=this.model.get("attribution"),this.attribution.fetch()},bindings:{".info-btn":{
model:"attribution",modelAttribute:"content",manual:!0,autohide:!0},".settings-btn":{modelAttribute:"hasPrefs",manual:!0,autohide:!0}},onEnabledChange:function(e){this.model.set("enabled",e.target.checked)},onSettingsClick:function(e){e.preventDefault();var t=new u.a([],{server:this.model.server,url:"/:/plugins/"+this.model.id+"/prefs"});t.fetch().done(s.a.bind(function(){l.a.trigger("show:modal",new c.a({model:this.model,collection:t}))},this))},onInfoClick:function(e){e.preventDefault(),
l.a.trigger("show:modal",new d.a({model:this.model}))}});t.a=h},function(e,t,n){"use strict";var i=n(43),a=n(1858),r=n(1857),s=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a});t.a=s},function(e,t,n){"use strict";var i=n(2959),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2960),a=n.n(i),r=n(15),s=n(744),o=n(388),l=n(184),u=n(776),c=n(23),d=r.a.ItemView.extend({tagName:"li",
className:"card-tile-list-item card-2-col-item",template:a.a,ui:{icon:".device-icon",syncInfo:".sync-info"},events:{"click .remove-device-btn":"onRemoveClick"},isMediaServer:function(){if(null==this.isServer){var e=this.model.get("product").toLowerCase();this.isServer="plex media server"===e||"plex cloud server"===e}return this.isServer},bindings:{".device-icon":{modelAttribute:"platform",manual:!0,formatter:function(e,t){var n=s.a.getIcon(e);t.attr("src",n)}},".name":{modelAttribute:"name",
autohide:!1},".version":{modelAttribute:"productVersion",autohide:!1},".product":{modelAttribute:"product",autohide:!1},".platform":{modelAttribute:"platform",autohide:function(e){return e&&this.isMediaServer()}},".platform-version":{modelAttribute:"platformVersion",autohide:function(e){return e&&this.isMediaServer()}},".device":{modelAttribute:"device",autohide:!1},".last-seen":{modelAttribute:"lastSeenAt",autohide:!0,formatter:function(e,t){return n.i(l.a)(e)}},".sync-count":{
modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,i=e.get("itemsCompleteCount");return i&&i>0&&(t=[i,n.i(o.a)("item",i)].join(" "),this.ui.syncInfo.removeClass("hidden")),t}}},".sync-size":{modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,i=e.get("totalSize");return i&&i>0&&(t=["(",n.i(u.a)(i),")"].join("")),t}}}},onRemoveClick:function(e){e.preventDefault(),this.isMediaServer()?c.a.execute("removeServer",{device:this.model
}):c.a.execute("removeDevice",{device:this.model})}});t.a=d},function(e,t,n){"use strict";var i=n(43),a=n(1861),r=n(1860),s=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a,sorted:!0});t.a=s},function(e,t,n){"use strict";var i=n(2961),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(2962),a=n.n(i),r=n(15),s=n(12),o=n(23),l=n(164),u=n(862),c=n(267),d=r.a.Layout.extend({tagName:"li",
className:"card-tile-list-item card-2-col-item",template:a.a,ui:{poster:".card-poster"},regions:{details:".card-details"},events:{"click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},initialize:function(e){this.serverShares=this.model.get("serverShares"),this.image=new l.a({model:this.model,type:"friend",width:80})},bindings:{".username":{modelAttribute:"title"}},onRender:function(){this.image.setElement(this.ui.poster),this.details.show(new u.a({model:this.model}))},
onClose:function(){this.image.close()},onEditClick:function(e){e.preventDefault(),s.a.trigger("show:modal",new c.a({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),o.a.execute("removeFriend",{friend:this.model})}});t.a=d},function(e,t,n){"use strict";var i=n(43),a=n(863),r=n(1863),s=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a,sorted:!0,isEmpty:function(e){return!this.collection||this.collection.length<2},addChildView:function(e,t,n){
this.isEmpty(this.collection)?this.showEmptyView():this._showingEmptyView?this.render():this.children.findByModel(e)||i.a.prototype.addChildView.apply(this,arguments)},showEmptyView:function(){this._showingEmptyView||this.children.each(function(e){this.removeChildView(e)},this),i.a.prototype.showEmptyView.apply(this,arguments)}});t.a=s},function(e,t,n){"use strict";var i=n(2964),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(863),c=o.a.Layout.extend({template:a.a,regions:{
card:".centered-home-user-container"},initialize:function(e){this.itemViewOptions=e},serializeData:function(){var e=l.a("appModel"),t=e.get("user");return{hasHomeFeature:!!t.get("subscription").get("features").get("home"),plexPassUrl:t.server.get("plexPassUrl")}},onRender:function(){var e=l.a("appModel"),t=e.get("user"),n=t.get("homeUsers");n.length&&this.card.show(new u.a(s.a.extend({},this.itemViewOptions,{model:n.first()})))}});t.a=c},function(e,t,n){"use strict"
;var i=n(2966),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(4),u=n(388),c=n(184),d=n(23),h=n(164),p=o.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:a.a,ui:{poster:".card-poster"},events:{"click .accept-btn":"onAcceptClick","click .delete-btn":"onDeleteClick"},initialize:function(e){this.subset=this.model.collection.subset,this.image=new h.a({model:this.model,type:"friend",width:80})},serializeData:function(){return{showAccept:"requests"===this.subset}},
bindings:{".username":{modelAttribute:"friendlyName"},".user-summary":{modelAttribute:"Server",autohide:!0,formatter:function(e){if("requested"===this.subset){var t=this.model.get("createdAt");return t?n.i(l.default)("invite sent {1}",n.i(c.a)(t)):n.i(l.default)("invite sent to {1}",this.model.get("email"))}var i=this.model.get("friend"),a=this.model.get("server"),r=this.model.get("home");if(a){var o=s.a.reduce(e,function(e,t){return e+=t.numLibraries
},0),d=n.i(u.a)(n.i(l.default)("library"),o,n.i(l.default)("libraries"));return r?n.i(l.default)("wants you to join their home and share {1} {2} with you",o,d):i?n.i(l.default)("wants to be friends and share {1} {2} with you",o,d):n.i(l.default)("wants to share {1} {2} with you",o,d)}return r?n.i(l.default)("wants you to join their home"):n.i(l.default)("wants to be friends")}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},
onAcceptClick:function(e){e.preventDefault(),d.a.execute("acceptInvite",{invite:this.model})},onDeleteClick:function(e){e.preventDefault(),d.a.execute("rejectInvite",{invite:this.model,subset:this.subset})}});t.a=p},function(e,t,n){"use strict";var i=n(43),a=n(1866),r=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2967),a=n.n(i),r=n(15),s=n(12),o=n(23),l=n(408),u={artist:"music",movie:"film",photo:"picture",show:"display"
},c=r.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:a.a,events:{"click .edit-section-btn":"onEditClick","click .delete-section-btn":"onDeleteClick"},serializeData:function(){var e=this.model.server,t=this.model.toJSON();return{section:t,serverID:e.id,icon:u[t.type]}},bindings:{".section-title":{modelAttribute:"title"}},onEditClick:function(e){e.preventDefault();var t=this.model,n=new l.a({model:t,server:t.server,isDefaultSection:t.isNew()})
;t.isNew()&&n.promise.always(function(){t.trigger("destroy",t,t.collection)}),s.a.trigger("show:modal",n)},onDeleteClick:function(e){e.preventDefault(),o.a.execute("deleteSection",{section:this.model})}});t.a=c},function(e,t,n){"use strict";var i=n(43),a=n(1868),r=i.a.extend({className:"list announcement-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2968),a=n.n(i),r=n(15),s=n(143),o=r.a.ItemView.extend({className:"announcement-list-item",template:a.a,ui:{thumb:".thumb",
unread:".unread"},initialize:function(){this.image=new s.a({url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}});t.a=o},function(e,t,n){"use strict";var i=n(43),a=n(1870),r=i.a.extend({tagName:"ul",className:"list select-list select-friends-list dark-scrollbar",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(2969),a=n.n(i),r=n(15),s=n(164),o=r.a.ItemView.extend({tagName:"li",
className:"striped-list-item select-list-item",template:a.a,ui:{poster:".user-poster"},initialize:function(e){this.image=new s.a({model:this.model,type:"friend",width:80})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.a=o},function(e,t,n){"use strict";var i=n(43),a=n(1872),r=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(2970),a=n.n(i),r=n(2),s=n.n(r),o=n(23),l=n(556),u=l.a.extend({template:a.a,className:"card-tile-list-item card-2-col-item",events:{"click .play-btn":"onPlayClick","click .mark-watched-btn":"onMarkWatchedClick","click .mark-unwatched-btn":"onMarkUnwatchedClick","click .delete-btn":"onDeleteClick"},serializeData:function(){return l.a.prototype.serializeData.apply(this,arguments)},bindings:s.a.extend({},l.a.prototype.bindings,{".media-summary":{autohide:!0,formatter:function(){
return this.model.get("message")||this.model.get("summary")}},".mark-unwatched-btn":{modelAttribute:"viewCount",manual:!0,autohide:function(e){return e>0}},".mark-watched-btn":{modelAttribute:"viewCount",manual:!0,autohide:function(e){return 0===e}}}),onPlayClick:function(e){e.preventDefault(),o.a.execute("playMedia",{item:this.model,siblings:this.canPlaySiblings()})},onMarkWatchedClick:function(e){e.preventDefault(),o.a.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){
e.preventDefault(),o.a.execute("markUnwatched",{item:this.model})},onDeleteClick:function(e){e.preventDefault(),this.model.destroy()}});t.a=u},function(e,t,n){"use strict";var i=n(2971),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(12),u=n(187),c=n(813),d=n(57),h=n(1850),p=n(1848),f=d.a.extend({name:"addFolderModal",className:"add-folder-modal modal fade",template:a.a,events:s.a.extend({"submit form":"onSubmitForm"},d.a.prototype.events),ui:{path:'input[name="path"]'},regions:{
rootList:".home-directory-container",childrenList:".path-container",childrenFileList:".file-container"},initialize:function(e){d.a.prototype.initialize.apply(this,arguments),this.rootPathList=new c.default({},{server:e.server,includeFiles:1}),this.childrenPathList=new c.default({},{server:e.server,includeFiles:1}),this.loadRootPaths()},loadRootPaths:function(){this.rootPathList.fetch().done(this.whenRendered(function(){var e=this.rootPathList.get("paths").where({home:!0
}),t=s.a.first(e)||this.rootPathList.get("paths").first();this.rootList.currentView.startLoadingItem(t),this.loadChildrenPaths(t)}))},loadChildrenPaths:function(e){u.a.abortAll("addFolderModal");var t=e.get("children"),i=t.fetch({scope:"addFolderModal"});i.done(this.whenRendered(function(){this.ui.path.val(e.get("path")),this.childrenPathList.get("paths").reset(t.get("paths").models),this.childrenPathList.get("files").reset(t.get("files").models)})),i.fail(this.whenRendered(function(){
this.childrenList.currentView.unselectItem(e),l.a.trigger("show:alert",{type:"error",message:n.i(o.default)("Unable to load contents of '{1}'",e.get("path"))})})),i.always(this.whenRendered(function(){this.rootList.currentView.stopLoadingItem(e)}))},onRender:function(){d.a.prototype.onRender.apply(this,arguments);var e=new h.a({isRoot:!0,collection:this.rootPathList.get("paths")}),t=new h.a({collection:this.childrenPathList.get("paths")}),n=new p.a({collection:this.childrenPathList.get("files")
});this.listenTo(e,"change:path",this.onRootPathChange),this.listenTo(t,"change:path",this.onChildrenPathChange),this.rootList.show(e),this.childrenList.show(t),this.childrenFileList.show(n)},onRootPathChange:function(e){this.childrenList.currentView.parentFilePath=null,this.rootList.currentView.startLoadingItem(e),this.loadChildrenPaths(e)},onChildrenPathChange:function(e){this.childrenList.currentView.startLoadingItem(e),this.loadChildrenPaths(e)},onSubmitForm:function(e){e.preventDefault(),
this.trigger("add:folder",this.ui.path.val()),this.hide()}});t.a=f},function(e,t,n){"use strict";var i=n(2973),a=n.n(i),r=n(57),s=n(143),o=r.a.extend({name:"agentInfoModal",className:"agent-info-modal modal fade",template:a.a,regions:{icon:".agent-icon-container"},serializeData:function(){return{agent:this.model.toJSON(),attribution:this.model.get("attribution").get("content")}},onRender:function(){r.a.prototype.onRender.apply(this,arguments),this.icon.show(new s.a({model:this.model,
url:"/system/agents/attribution/image?identifier="+this.model.id,className:"agent-icon",width:100,height:100}))}});t.a=o},function(e,t,n){"use strict";var i=n(2974),a=n.n(i),r=n(2),s=n.n(r),o=n(12),l=n(23),u=n(57),c=n(58),d=u.a.extend({name:"channelModal",className:"channel-modal modal fade",template:a.a,ui:{poster:".media-poster",installBtn:".install-btn",updateBtn:".update-btn",uninstallBtn:".uninstall-btn"},events:s.a.extend({"click .browse-btn":"onBrowseClick",
"click .install-btn":"onInstallClick","click .update-btn":"onUpdateClick","click .restart-btn":"onRestartClick","click .reset-btn":"onResetClick","click .uninstall-btn":"onUninstallClick"},u.a.prototype.events),initialize:function(e){u.a.prototype.initialize.apply(this,arguments),this.closeOnInstall=e.closeOnInstall,this.image=new c.a({model:this.model,type:"channel",width:200})},serializeData:function(){return{channel:this.model.toJSON(),serverID:this.model.server.id,
agent:/com.plexapp.agents./.test(this.model.id)}},bindings:{".installed-actions-container":{modelAttribute:"installed",manual:!0,autohide:!0},".uninstalled-actions-container":{modelAttribute:"installed",manual:!0,autohide:function(e){return!e}}},onRender:function(){u.a.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onBrowseClick:function(e){e.preventDefault();var t=this.model.get("key"),n=s.a.last(t.split("/"))
;o.a.trigger("navigate","channel",{serverID:this.model.server.id,channelID:n}),this.hide()},onInstallClick:function(e){e.preventDefault();var t=this.ui.installBtn;if(!t.hasClass("active")){t.addClass("active");var n=l.a.execute("installChannel",{channel:this.model});n.done(s.a.bind(function(){this.closeOnInstall&&this.hide()},this)),n.always(function(){t.removeClass("active")})}},onUpdateClick:function(e){e.preventDefault();var t=this.ui.updateBtn;if(!t.hasClass("active")){t.addClass("active")
;l.a.execute("updateChannel",{channel:this.model,skipConfirmation:!0}).always(function(){t.removeClass("active")})}},onRestartClick:function(e){e.preventDefault(),l.a.execute("restartChannel",{channel:this.model})},onResetClick:function(e){e.preventDefault(),l.a.execute("resetChannel",{channel:this.model})},onUninstallClick:function(e){e.preventDefault();var t=this.ui.uninstallBtn;if(!t.hasClass("active")){t.addClass("active");l.a.execute("uninstallChannel",{channel:this.model,
skipConfirmation:!0}).always(function(){t.removeClass("active")})}}});t.a=d},function(e,t,n){"use strict";var i=n(2980),a=n.n(i),r=n(42),s=r.a.extend({template:a.a,initialize:function(e){r.a.prototype.initialize.apply(this,arguments),this.server=e.server},serializeData:function(){return this.server.toJSON()}});t.a=s},function(e,t,n){"use strict";var i=n(2981),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(4),c=n(12),d=n(57),h=d.a.extend({name:"importPlaylistsModal",
className:"import-playlists-modal modal fade",template:a.a,ui:{importBtn:".import-btn",sections:"#section-list",importAll:"#import-all"},events:s.a.extend({"click .import-btn":"onImportClick"},d.a.prototype.events),initialize:function(e){d.a.prototype.initialize.apply(this,arguments),this.server=e.server,this.musicSections=e.server.get("sections").where({type:"artist"})},serializeData:function(){var e=s.a.map(this.musicSections,function(e){return e.pick("key","title")});return{
showSections:e.length>1,sections:e}},onImportClick:function(e){e.preventDefault(),this.ui.importBtn.addClass("active");var t=this.ui.sections.val(),i="/playlists/import/itunes?sectionID="+t;this.ui.importAll[0].checked&&(i+="&force=1");var a=s.a.extend(this.server.getXHROptions(i),{type:"PUT"}),r=l.a.ajax(a);r.done(s.a.bind(function(){c.a.trigger("show:alert",{type:"success",message:n.i(u.default)("Playlists have been imported.")}),this.server.get("playlists").get("items").fetch(),this.hide()
},this)),r.fail(function(){c.a.trigger("show:alert",{type:"error",message:n.i(u.default)("There was a problem importing.")})})}});t.a=h},function(e,t,n){"use strict";var i=n(2988),a=n.n(i),r=n(2),s=n.n(r),o=n(13),l=n(68),u=n(42),c=u.a.extend({template:a.a,events:s.a.extend({"click .learn-more":"onLearnMoreClick"},u.a.prototype.events),onRender:function(){u.a.prototype.onRender.apply(this,arguments),n.i(o.a)("metrics").trackView({page:"relayNotification",mode:"modal",action:l.g},{interaction:!1})
},onHide:function(e){u.a.prototype.onHide.apply(this,arguments),n.i(o.a)("metrics").trackClick({page:"relayNotification",mode:"modal",action:l.g})},onLearnMoreClick:function(){n.i(o.a)("metrics").trackClick({page:"relayNotification",mode:"modal",action:l.X})},serializeData:function(){return{serverName:this.options.serverName}}});t.a=c},function(e,t,n){"use strict";function i(e){return e?e.split("\n"):[]}var a=n(2989),r=n.n(a),s=n(57),o=s.a.extend({name:"releaseNotesModal",template:r.a,
serializeData:function(){var e=this.model.toJSON();return e.version=e.version.replace(/\-.*/gi,""),e.added=i(e.added),e.fixed=i(e.fixed),e}});t.a=o},function(e,t,n){"use strict";var i=n(2990),a=n.n(i),r=n(192),s=r.a.extend({name:"selectDeviceModal",template:a.a,serializeData:function(){return{devices:this.collection.toJSON()}}});t.a=s},function(e,t,n){"use strict";var i=n(2991),a=n.n(i),r=n(192),s=r.a.extend({name:"SelectMediaFileModal",template:a.a,serializeData:function(){return{
medias:this.model.get("Media")}}});t.a=s},function(e,t,n){"use strict";var i=n(2992),a=n.n(i),r=n(161),s=n(192),o=s.a.extend({name:"selectOffsetModal",template:a.a,initialize:function(e){s.a.prototype.initialize.apply(this,arguments),this.offset=e.offset},serializeData:function(){return{offset:this.offset,formattedOffset:n.i(r.a)(this.offset)}}});t.a=o},function(e,t,n){"use strict";var i=n(2993),a=n.n(i),r=n(2),s=n.n(r),o=n(31),l=n(46),u=n(68),c=n(13),d=n(1540),h=n(57),p=n(323),f=n(1715),g={
osx:"mac"},m=h.a.extend({mixins:[p.a],name:"serverDownloadModal",className:"server-download-modal modal modal-lg fade",template:a.a,ui:{downloadBtn:".download-btn",paneTabs:".show-pane-btn",loading:".server-download-loading"},regions:{paneRegion:".pane-region"},events:s.a.extend({"click .show-pane-btn":"onShowPaneClick","click .download-btn":"onDownloadClick"},h.a.prototype.events),panesModel:"selectedModel",onlyAfterRender:["showPane"],initialize:function(e){var t=this
;h.a.prototype.initialize.apply(this,arguments);var n=c.a("appModel");n.get("primaryServer")||this.listenTo(n,"change:primaryServer",function(e,n){n&&n.id&&t.hide()}),this.downloadType=e.downloadType;var i=new d.a([],{server:n.get("cloudServer")});i.populate().done(function(){t.collection=i.get(t.downloadType).get("platforms"),t.paneSetup(),t.render(),t.ui.loading.addClass("hidden")}),c.a("metrics").trackView({page:l.I,firstRun:!0})},serializeData:function(){return{
items:this.collection?this.collection.toJSON():[],selectedPane:this.selectedModel?this.selectedModel.get("id"):null}},selectListItem:function(){var e=this.selectedModel.get("id");this.ui.paneTabs.removeClass("selected"),this.ui.paneTabs.filter('[data-pane="'+e+'"]').addClass("selected")},paneSetup:function(){this.panes=this.collection.reduce(function(e,t){return e[t.get("id")]={constructor:f.a},e},{});var e=o.a.platformID,t=g[e]||e
;this.selectedModel=this.collection.get(t)||this.collection.first(),this.showPane(this.selectedModel.get("id"))},onRender:function(){h.a.prototype.onRender.apply(this,arguments),this.selectedModel&&this.selectListItem()},onShowPaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget),n=t.data("pane");this.selectedModel=this.collection.get(n),this.showPane(n),this.selectListItem()},onDownloadClick:function(e){var t=this.selectedModel.get("id");c.a("metrics").trackClick({page:l.I,
firstRun:!0,action:u.Z,platform:this.downloadType,os:t})}});t.a=m},function(e,t,n){"use strict";var i=n(2995),a=n.n(i),r=n(5),s=n.n(r),o=n(2),l=n.n(o),u=n(57),c=u.a.extend({name:"stopMediaModal",className:"stop-media-modal select-modal modal modal-sm fade",template:a.a,ui:{stopMediaBtn:".stop-media-btn",messageContainer:".message-container",message:".message"},events:l.a.extend({"click .stop-media-btn":"onStopMediaClick"},u.a.prototype.events),initialize:function(){this.promise=s.a.Deferred()},
onHide:function(e){u.a.prototype.onHide.apply(this,arguments),this.promise.reject()},onStopMediaClick:function(e){e.preventDefault();var t=this.ui.message.val();this.promise.resolve(t)}});t.a=c},function(e,t,n){"use strict";var i=n(2996),a=n.n(i),r=n(57),s=n(1796),o=r.a.extend({name:"syncStatusModal",template:a.a,regions:{list:".sync-status-list-container"},onRender:function(){r.a.prototype.onRender.apply(this,arguments),this.list.show(new s.a({collection:this.collection,itemViewOptions:{
syncItem:this.model}}))}});t.a=o},function(e,t,n){"use strict";var i=n(2997),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .try-again-link":"onTryAgainClick"},serializeData:function(){return{status:this.options.status}},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","loading")}});t.a=s},function(e,t,n){"use strict";var i=n(2998),a=n.n(i),r=n(15),s=r.a.ItemView.extend({
className:"convert-location-container form-group",template:a.a,events:{"change select[name=storageLocation]":"onLocationChange"},serializeData:function(){return{disableLocation:!this.model.isNew(),selectedLocationID:this.model.get("locationID"),locations:this.model.section&&this.model.section.get("locations").toJSON()}},onLocationChange:function(e){this.model.set("locationID",parseInt(e.currentTarget.value,10))}});t.a=s},function(e,t,n){"use strict"
;var i=n(3e3),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(106),u=o.a.ItemView.extend({className:"convert-target-container form-group",template:a.a,ui:{targetTitleInput:".convert-target-title"},events:{"change select[name=target]":"onTargetChange","keydown input[name=targetTitle]":"onTitleKeyDown","change input[name=targetTitle]":"onTitleChange","change select[name=targetProfile]":"onProfileChange","change select[name=targetQuality]":"onQualityChange"},initialize:function(e){this.targets=e.targets,
this.profiles=e.profiles;var t=this.model.get("Device").profile;this.selectedProfile=t?this.profiles.get(t):this.profiles.findWhere({selected:!0}),this.availableCustomQualities=l.a.getAvailableQualities().reverse();var n=this.model.get("mediaSettings").get("maxVideoBitrate");if(n){var i=l.a.getNearestIndexToBitrate(n);this.selectedCustomQuality=l.a.getQualityByIndex(i)}else this.selectedCustomQuality=s.a.first(this.availableCustomQualities)
;this.model.isNew()||this.model.get("targetTagID")||this.$el.addClass("show-custom-target")},serializeData:function(){return{item:this.model.toJSON(),targets:this.targets.toJSON(),disableTarget:!this.model.isNew(),profiles:this.profiles.toJSON(),selectedProfile:this.selectedProfile.toJSON(),availableCustomQualities:this.availableCustomQualities,selectedCustomQuality:this.selectedCustomQuality}},updateDeviceProfile:function(e){this.model.get("Device").profile=this.selectedProfile.get("title")},
updateMediaSettings:function(e){this.model.get("mediaSettings").set({videoQuality:e.videoQuality,videoResolution:e.videoResolution,maxVideoBitrate:e.bitrate})},onTargetChange:function(e){var t=parseInt(e.currentTarget.value,10);t>-1?(this.model.unset("target"),this.model.set({targetTagID:t,Device:{}}),this.model.get("mediaSettings").restoreDefaults()):(this.model.set("target",this.ui.targetTitleInput.val()),this.model.unset("targetTagID"),this.updateDeviceProfile(this.selectedProfile),
this.updateMediaSettings(this.selectedCustomQuality)),this.$el.toggleClass("show-custom-target",t===-1)},onTitleKeyDown:function(e){190===e.which&&0===e.currentTarget.selectionStart&&e.preventDefault()},onTitleChange:function(e){this.model.set("target",e.currentTarget.value)},onProfileChange:function(e){this.selectedProfile=this.profiles.findWhere({title:e.currentTarget.value}),this.updateDeviceProfile(this.selectedProfile)},onQualityChange:function(e){var t=parseInt(e.currentTarget.value,10)
;this.selectedCustomQuality=l.a.getQualityByIndex(t),this.updateMediaSettings(this.selectedCustomQuality)}});t.a=u},function(e,t,n){"use strict";var i=n(3001),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(4),u=n(44),c=n(210),d=n(141),h=n(304),p=n(325),f=n(868),g=n(1888),m=n(1887),v=o.a.Layout.extend({template:a.a,ui:{submitBtn:".submit-btn"},regions:{policyRegion:".policy-region",targetsRegion:".targets-region",locationRegion:".location-region"},events:{"change input[name=title]":"onTitleChange",
"submit #convert-form":"onSubmit"},initialize:function(e){if(this.playlist=e.playlist,this.targets=e.targets,this.profiles=e.profiles,this.model){this.tempModel=this.model.clone();var t=this.model.get("Location").librarySectionID;if(t){var i=new h.a({key:t},{server:this.model.server,onlyIfCached:!0});s.a.isEmpty(i)||(this.tempModel.section=i)}}else{var a,r=e.item,o=e.items,l=r.has("childrenKey")?r.get("children"):r,u=r.server;if(r.get("isSection"))a=r;else{var f=n.i(d.a)(r);s.a.isEmpty(f)||(a=f)
}this.tempModel=new p.a({title:c.a.title(r,{items:o}),targetTagID:this.targets.first().id,Location:{uri:c.a.uri(l,{items:o})}},{server:u,section:a})}},serializeData:function(){return{conversionItem:this.tempModel.toJSON(),isNew:this.tempModel.isNew(),showRemuxOnlyWarning:this.tempModel.server.get("transcoderVideoRemuxOnly")}},onRender:function(){this.policyRegion.show(new f.a({model:this.tempModel,isSync:!1,isCloudSync:!1})),this.targetsRegion.show(new g.a({model:this.tempModel,
targets:this.targets,profiles:this.profiles})),this.locationRegion.show(new m.a({model:this.tempModel}))},onTitleChange:function(e){this.tempModel.set("title",e.currentTarget.value)},onSubmit:function(e){e.preventDefault();var t=this.ui.submitBtn;if(!t.hasClass("active")){if(t.addClass("active"),!this.tempModel.get("targetTagID")&&!this.tempModel.get("target")){var i=this.tempModel.get("Device");this.tempModel.set("target",n.i(l.default)("Custom: {1}",i.profile))}
var a=this.playlist.addContent(this.tempModel);a.done(this.whenRendered(function(){if(this.model){var e=s.a.omit(this.tempModel.toJSON(),"children");this.model.set(this.model.parse(e))}this.trigger("request:nextState")})),a.fail(this.whenRendered(function(e){var t=e.responseText,n=u.a.parseXML(t),i=n&&n.status;this.trigger("request:state","error",i)}))}}});t.a=v},function(e,t,n){"use strict";var i=n(3002),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"modal-body loading-container",
template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(3004),a=n.n(i),r=n(15),s=n(12),o=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),s.a.trigger("navigate","conversion",{serverID:this.options.server.id})}});t.a=o},function(e,t,n){"use strict";var i=n(3005),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{
"click .try-again-link":"onTryAgainClick"},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","form")}});t.a=s},function(e,t,n){"use strict";var i=n(3006),a=n.n(i),r=n(15),s=n(13),o=n(34),l=n(106),u=n(1351),c=n(1352),d=r.a.ItemView.extend({className:"sync-quality-container form-group",template:a.a,events:{"change select[name=videoQuality]":"onVideoQualityChange","change select[name=musicQuality]":"onMusicQualityChange",
"change select[name=photoQuality]":"onPhotoQualityChange"},initialize:function(e){var t=n.i(s.a)("appModel").get("settings");this.mediaSettings=this.model.get("mediaSettings"),this.mediaSettings.has("audioBoost")||this.mediaSettings.set("audioBoost",t.get("audioBoost")),this.mediaSettings.has("subtitleSize")||this.mediaSettings.set("subtitleSize",t.get("subtitleSize")),this.initVideoQuality(),this.initMusicQuality(),this.initPhotoQuality()},initVideoQuality:function(){
this.availableVideoQualities=l.a.getAvailableQualities().reverse();var e=n.i(s.a)("appModel").get("settings"),t=this.mediaSettings.get("maxVideoBitrate"),i=t?l.a.getNearestIndexToBitrate(t):e.get(l.a.getSyncQualityAttribute());this.updateVideoQuality(l.a.getQualityByIndex(i))},initMusicQuality:function(){this.availableMusicQualities=u.a.getAvailableQualities().reverse()
;var e=n.i(s.a)("appModel").get("settings"),t=this.mediaSettings.get("musicBitrate"),i=t?u.a.getNearestIndexToBitrate(t):e.get(u.a.getSyncQualityAttribute());this.updateMusicQuality(u.a.getQualityByIndex(i))},initPhotoQuality:function(){this.availablePhotoQualities=c.a.getAvailableQualities().reverse();var e=n.i(s.a)("appModel").get("settings"),t=this.mediaSettings.get("photoQuality"),i=t?c.a.getNearestIndexToQuality(t):e.get(c.a.getSyncQualityAttribute())
;this.updatePhotoQuality(c.a.getQualityByIndex(i))},serializeData:function(){return{typeElement:n.i(o.b)(this.model.get("metadataType")).mediaType,supportsOriginalQuality:this.model.server.supports("syncOriginalQuality"),availableVideoQualities:this.availableVideoQualities,selectedVideoQuality:this.selectedVideoQuality,availableMusicQualities:this.availableMusicQualities,selectedMusicQuality:this.selectedMusicQuality,availablePhotoQualities:this.availablePhotoQualities,
selectedPhotoQuality:this.selectedPhotoQuality}},updateVideoQuality:function(e){this.selectedVideoQuality=e,this.mediaSettings.set({videoQuality:e.videoQuality,videoResolution:e.videoResolution,maxVideoBitrate:e.bitrate})},updateMusicQuality:function(e){this.selectedMusicQuality=e,this.mediaSettings.set({musicBitrate:e.bitrate})},updatePhotoQuality:function(e){this.selectedPhotoQuality=e,this.mediaSettings.set({photoQuality:e.photoQuality,photoResolution:e.photoResolution})},
saveQualityIndex:function(e,t){var i=parseInt(t,10);return n.i(s.a)("appModel").get("settings").save(e.getSyncQualityAttribute(),i),e.getQualityByIndex(i)},onVideoQualityChange:function(e){var t=this.saveQualityIndex(l.a,e.currentTarget.value);this.updateVideoQuality(t)},onMusicQualityChange:function(e){var t=this.saveQualityIndex(u.a,e.currentTarget.value);this.updateMusicQuality(t)},onPhotoQualityChange:function(e){var t=this.saveQualityIndex(c.a,e.currentTarget.value)
;this.updatePhotoQuality(t)}});t.a=d},function(e,t,n){"use strict";var i=n(3007),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(210),c=n(34),d=n(23),h=n(543),p=n(868),f=n(1893),g={video:"movie",audio:"track",photo:"photo"},m=o.a.Layout.extend({template:a.a,ui:{submitBtn:".submit-btn"},regions:{policyRegion:".policy-region",qualityRegion:".quality-region"},events:{"change input[name=title]":"onTitleChange","submit #sync-form":"onSubmit"},initialize:function(e){var t=l.a("appModel")
;if(this.device=e.device,this.model)this.tempModel=this.model.clone();else{var i,a,r=e.item,s=e.items;r.get("isPlaylist")?(i=r,a=g[r.get("playlistType")]):r.get("isMetadataList")?(i=r,a=n.i(c.k)(r.get("firstItemType")).typeString):(i=r.has("childrenKey")?r.get("children"):r,a=n.i(c.k)(r.get("type")).typeString),this.tempModel=new h.a({metadataType:a,title:u.a.title(r,{items:s}),rootTitle:this.getRootTitle(r),machineIdentifier:r.server.id,clientIdentifier:this.device.get("clientIdentifier"),
Location:{uri:u.a.uri(i,{items:s})}},{parent:r.server,server:t.get("user").server,device:this.device})}},serializeData:function(){return{syncItem:this.tempModel.toJSON(),isNew:this.tempModel.isNew()}},getRootTitle:function(e){return e.section?e.section.get("title"):e.channel?e.channel.get("title"):e.get("title")},onRender:function(){this.policyRegion.show(new p.a({model:this.tempModel,isSync:!0,isCloudSync:this.device.get("isCloudSync")})),this.qualityRegion.show(new f.a({model:this.tempModel}))
},onTitleChange:function(e){this.tempModel.set("title",e.currentTarget.value)},onSubmit:function(e){e.preventDefault();var t=this.ui.submitBtn;if(!t.hasClass("active")){t.addClass("active");var n=this.tempModel.save();n.done(s.a.bind(function(){if(this.model){var e=this.model.get("version")||0,t=s.a.omit(this.tempModel.toJSON(),"children");t.version=e+1,this.model.set(this.model.parse(t))}},this)),n=n.then(s.a.bind(function(){return d.a.execute("refreshSyncLists",{server:this.tempModel.parent,
silent:!0})},this)),n.done(this.whenRendered(function(){this.trigger("request:nextState")})),n.fail(this.whenRendered(function(){this.trigger("request:state","error")}))}}});t.a=m},function(e,t,n){"use strict";var i=n(3009),a=n.n(i),r=n(15),s=n(12),o=r.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),s.a.trigger("navigate","sync",{
serverID:this.options.server.id,deviceID:this.options.device.id})}});t.a=o},function(e,t,n){"use strict";var i=n(3010),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(776),u=n(259),c=n(57),d=n(1844),h=c.a.extend({mixins:[u.a],name:"versionGeneratorMetadataModal",className:"version-generator-metadata-modal modal fade",template:a.a,pageSize:20,scrollThreshold:50,ui:{body:".modal-body",loading:".loading",errorMessage:".error-message"},regions:{listRegion:".list-region"},initialize:function(e){
this.status=this.model.get("status"),this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems"),this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.handleScroll=s.a.throttle(this.whenRendered(this.onScroll),100)},states:{base:{},loading:{onEnter:function(){this.ui.loading.removeClass("hidden")},onExit:function(){this.ui.loading.addClass("hidden")}},error:{onEnter:function(){this.ui.errorMessage.removeClass("hidden")},onExit:function(){
this.ui.errorMessage.addClass("hidden")}}},bindings:{".generator-title":{modelAttribute:"title"},".generator-items-count":{model:"status",modelAttribute:"itemsCount",formatter:function(e){return 1===e?n.i(o.default)("{1} item",e):n.i(o.default)("{1} items",e)}},".generator-total-size":{model:"status",modelAttribute:"totalSize",formatter:function(e){return e?n.i(l.a)(e):n.i(o.default)("0 files")}},".generator-failure-container":{model:"status",modelAttribute:"failure",manual:!0,
autohide:function(e){return!!e}},".generator-failure-message":{model:"status",modelAttribute:"failure",formatter:function(e){return e}}},populatePage:function(){this.enterState("loading");var e=this.listModel.populateRange({start:0,end:this.listModel.get("populatedRange").end+this.pageSize});return e.done(this.whenRendered(function(){this.enterState("base")})),e.fail(this.whenRendered(function(){this.enterState("error")})),e},onRender:function(){c.a.prototype.onRender.apply(this,arguments),
this.ui.body.on("scroll",this.handleScroll),this.model.fetch(),this.populatePage(),this.listRegion.show(new d.a({collection:this.collection,itemViewOptions:{generator:this.model,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onClose:function(){this.ui.body.off("scroll",this.handleScroll),this.collection.reset()},onScroll:function(){if("error"!==this.currentState){
this.ui.body.prop("scrollHeight")-this.ui.body.innerHeight()-this.ui.body.scrollTop()<this.scrollThreshold&&this.listModel.get("populatedRange").end<this.listModel.get("totalSize")&&this.populatePage()}}});t.a=h},function(e,t,n){"use strict";var i=n(3012),a=n.n(i),r=n(15),s=n(164),o=r.a.ItemView.extend({template:a.a,ui:{poster:".media-poster"},events:{"change input":"onInputChange","click .remove-home-btn":"onRemoveHomeClick","click .remove-friend-btn":"onRemoveFriendClick",
"click .disable-guest-btn":"onGuestDisableClick"},initialize:function(e){this.paneID=e.paneID,this.homeUser=e.homeUser,this.type=e.type,this.isAdmin=e.isAdmin,this.changes={},this.image=new s.a({model:this.model,type:"friend",width:60})},serializeData:function(){var e=!this.model.isNew(),t=this.homeUser&&!this.homeUser.isNew();return{friend:this.model.toJSON(),homeUser:this.homeUser&&this.homeUser.toJSON(),canRemoveFriend:e,canRemoveHomeUser:t&&this.isAdmin,showActions:e||t}},
flushChanges:function(){this.homeUser&&this.homeUser.set(this.changes)},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked),this.changes[t.name]=n},onRemoveHomeClick:function(e){e.preventDefault(),this.trigger("destroy:homeUser")},onRemoveFriendClick:function(e){e.preventDefault(),this.trigger("destroy:friend")},onGuestDisableClick:function(e){
e.preventDefault(),this.trigger("disable:guest")}});t.a=o},function(e,t,n){"use strict";var i=n(3013),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(1899),u=o.a.Layout.extend({tagName:"ul",className:"list modal-nav-list",template:a.a,ui:{sharedHeader:".shared-list-header"},regions:{ownedServerList:".owned-servers-container",sharedServerList:".shared-servers-container"},events:{"click .change-pane-btn":"onChangePaneClick"},onlyAfterRender:["selectItem","toggleDisabled"],initialize:function(){
this.serverOverviews=this.model.get("serverOverviews"),this.sharedServerShares=this.model.get("serverShares").filterByShared(),this.listenTo(this.sharedServerShares,"reset add remove",this.updateHeaders)},setModel:function(e){this.stopListening(),this.model=e,this.initialize(),this.render()},selectItem:function(e){this.$(".change-pane-btn").removeClass("selected"),this.$('[data-pane-id="'+e+'"]').addClass("selected")},toggleDisabled:function(e){
this.$(".change-pane-btn").toggleClass("disabled",e),this.$(".modal-nav-list-header").toggleClass("disabled",e)},updateHeaders:function(){this.ui.sharedHeader.toggleClass("hidden",!this.sharedServerShares.length)},onRender:function(){this.updateHeaders(),this.ownedServerList.show(new l.a({collection:this.serverOverviews,itemViewOptions:{paneType:"ownedServer"}})),this.sharedServerList.show(new l.a({collection:this.sharedServerShares,itemViewOptions:{paneType:"sharedServer"}}))},
onChangePaneClick:function(e){e.preventDefault();var t=s()(e.currentTarget);if(!t.isDisabled()){var n=t.data("pane"),i=t.data("pane-id"),a={};"ownedServer"===n?a.serverOverview=this.model.get("serverOverviews").get(i):"sharedServer"===n&&(a.serverShare=this.model.get("serverShares").get(i)),this.trigger("change:pane",n,i,a)}}});t.a=u},function(e,t,n){"use strict";var i=n(43),a=n(1900),r=i.a.extend({className:"server-nav-list",itemView:a.a});t.a=r},function(e,t,n){"use strict"
;var i=n(3014),a=n.n(i),r=n(15),s=n(13),o=r.a.ItemView.extend({tagName:"a",className:"btn-gray change-pane-btn disabled",template:a.a,initialize:function(e){this.$el.attr({href:"#","data-pane":e.paneType,"data-pane-id":this.model.id});var t=s.a("appModel"),n=t.get("servers"),i=n.get(this.model.get("machineIdentifier"));i?this.attachServer(i):this.listenTo(n,"add",this.onServerAdd)},serializeData:function(){var e
;return e=this.server&&null!=this.server.get("connected")?this.server.get("connected")?"available":"unavailable":"unknown",{server:this.model.toJSON(),status:e}},attachServer:function(e){this.server=e,this.listenTo(e,"change:connected",this.render)},onServerAdd:function(e){e.id===this.model.get("machineIdentifier")&&(this.attachServer(e),this.render())}});t.a=o},function(e,t,n){"use strict"
;var i=n(3015),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(184),h=n(1904),p=u.a.Layout.extend({template:a.a,ui:{details:".server-details",lastSeenRow:".server-detail-last-seen-row"},regions:{share:".share-details"},events:{"click .server-status-btn":"onServerStatusClick"},initialize:function(e){var t=c.a("appModel");this.paneID=e.paneID,this.serverOverview=e.serverOverview,this.server=t.get("servers").get(this.serverOverview.id);var n=this.model.get("serverShares")
;this.serverShare=n.findWhere({machineIdentifier:this.serverOverview.id}),this.changes={}},serializeData:function(){return{server:this.serverOverview.toJSON()}},flushChanges:function(){var e=this.model.get("serverShares"),t=e.findWhere({machineIdentifier:this.serverOverview.id}),n=this.getServerShareAttributes(this.serverOverview);t?t.set(n):e.add(n)},getServerShareAttributes:function(e){var t=e.get("sections"),n=this.$("#"+e.id+"-section-list"),i=n.find(":checked:visible"),a=[],r={
machineIdentifier:e.id,owned:!0,allLibraries:!1};return i.each(function(){if("all"===this.value)return r.allLibraries=!0,!1;a.push(parseInt(this.value,10))}),r.allLibraries?r.numLibraries=t.length:r.numLibraries=a.length,r.Section=t.map(function(e){var t=e.toJSON();return t.shared=r.allLibraries||s.a.contains(a,t.id),t}),r},bindings:{".server-title":{model:"serverOverview",modelAttribute:"name"},".server-status-btn":{model:"server",modelAttribute:"connected",manual:!0,formatter:function(e,t){
t.removeClass("unknown available unauthorized unavailable"),null==e?t.addClass("unknown"):e?t.addClass("available"):this.server.get("unauthorized")?t.addClass("unauthorized"):t.addClass("unavailable")}},".server-detail-version":{model:"server",modelAttribute:"shortVersion"},".server-detail-last-seen":{model:"serverShare",modelAttribute:"lastSeenAt",formatter:function(e){var t=n.i(d.a)(e);return this.ui.lastSeenRow.toggleClass("hidden",!t),t}},".server-detail-address":{model:"serverOverview",
modelAttribute:"address",formatter:function(e){if(e)return e;var t=this.server.get("activeConnection");return t?t.address:void 0}},".server-detail-port":{model:"serverOverview",modelAttribute:"port",formatter:function(e){if(e)return e;var t=this.server.get("activeConnection");return t?t.port:void 0}}},onRender:function(){this.share.append(new h.a({model:this.model,serverOverview:this.serverOverview,itemViewOptions:this.itemViewOptions}))},onServerStatusClick:function(e){e.preventDefault()
;var t=l()(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"))}});t.a=p},function(e,t,n){"use strict";var i=n(3016),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(128),h=n(478),p=n(676),f=(n.n(p),u.a.ItemView.extend({className:"form-horizontal",template:a.a,filters:{contentRating:{sectionTypes:["movie","show"],presets:{movie:["G","PG","PG-13","R","NC-17","None"],show:["TV-Y","TV-Y7","TV-G","TV-PG","TV-14","TV-MA","None"]}},
label:{sectionTypes:["movie","show","artist"]}},filterByType:{movie:"filterMovies",show:"filterTelevision",artist:"filterMusic"},ui:{tagInputs:".tag-input-hidden"},events:{"change input":"onInputChange"},initialize:function(e){this.paneID=e.paneID,this.type=e.type;var t=c.a("appModel"),n=t.get("user");this.hasContentFilterFeature=n.get("subscription").get("features").get("content_filter"),this.plexPassUrl=n.server.get("plexPassUrl"),this.changes={}},serializeData:function(){return{
user:this.model.toJSON(),hasContentFilterFeature:this.hasContentFilterFeature,plexPassUrl:this.plexPassUrl,moviesIcon:d.a.get("movies").sectionTypeIcon,showsIcon:d.a.get("tv").sectionTypeIcon,musicIcon:d.a.get("music").sectionTypeIcon}},loadPresets:function(){s.a.each(this.filters,function(e,t){s.a.isEmpty(e.presets)||s.a.each(e.presets,function(e,n){var i=this.getSelectizeInputByFilterName(t,n),a=s.a.map(e,function(e){return{title:e,key:e}});i.addOption(a)},this)},this)},
loadSections:function(){var e=c.a("appModel"),t=e.get("servers"),n=this.model.get("serverShares"),i=n.filter(function(e){return e.isActive()&&e.get("owned")}),a=s.a.compact(s.a.map(i,function(e){return t.get(e.get("machineIdentifier"))}));s.a.each(a,function(e){if(e.get("connected")){var t=e.get("sections");t.populate().done(s.a.bind(function(){this.loadFilters(t)},this))}},this)},loadFilters:function(e){e.each(function(e){var t=e.get("type");s.a.each(this.filters,function(n,i){
s.a.contains(n.sectionTypes,t)&&this.loadFilterOptions(e,i)},this)},this)},loadFilterOptions:function(e,t){var n=new h.a({filter:t,filterType:"string"},{server:e.server,section:e}),i=n.get("options");i.populate().done(s.a.bind(function(){this.getSelectizeInputByFilterName(t,e.get("type")).addOption(i.toJSON())},this))},getSelectizeInputByFilterName:function(e,t){var n="#filter-"+t+"-"+e;return this.$(n)[0].selectize},resetAllPlaceholders:function(){var e=[];s.a.each(this.filters,function(t){
e=s.a.union(e,t.sectionTypes)}),s.a.each(e,function(e){var t=this.model.get(this.filterByType[e]);this.resetPlaceholders(e,{restore:s.a.isEmpty(t)})},this)},resetPlaceholders:function(e,t){t||(t={}),this.$("input[data-section-type="+e+"]").each(function(){var e=t.restore?this.placeholder:"";e?(this.selectize.settings.placeholder=e,this.selectize.updatePlaceholder()):this.selectize.$control_input.attr("placeholder","")})},flushChanges:function(){this.model.set(this.changes)},onRender:function(){
if(!this.hasContentFilterFeature)return void this.$el.addClass("no-plex-pass");this.ui.tagInputs.selectize({plugins:["remove_button"],create:!0,labelField:"title",valueField:"title",sortField:"title",searchField:["title"]}),this.resetAllPlaceholders(),this.loadSections(),this.loadPresets()},onInputChange:function(e){var t=e.currentTarget,n=l()(t),i=t.value,a=n.data("filter"),r=n.data("sectionType");if(this.hasContentFilterFeature||"allowChannels"===t.name){if(a){
var o=this.changes[t.name]||this.model.get(t.name)||{};i?o[a]=i:o.hasOwnProperty(a)&&delete o[a],this.resetPlaceholders(r,{restore:s.a.isEmpty(o)}),i=o}else"checkbox"===t.type&&(i=t.checked);this.changes[t.name]=i}}}));t.a=f},function(e,t,n){"use strict";var i=n(3017),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(128),u=o.a.ItemView.extend({tagName:"li",className:"share-section-list-item",template:a.a,initialize:function(e){this.serverShare=e.serverShare},serializeData:function(){var e={
section:this.model.toJSON(),typeIcon:l.a.get(this.model.get("type")).sectionTypeIcon,isChecked:!1};if(this.serverShare&&!this.serverShare.get("allLibraries")){var t=this.serverShare.get("Section");e.isChecked=!!s.a.findWhere(t,{id:this.model.id,shared:!0})}return e}});t.a=u},function(e,t,n){"use strict";var i=n(3018),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(1903),d=u.a.CompositeView.extend({className:"share-server-container",template:a.a,itemView:c.a,
itemViewContainer:".share-section-list",ui:{list:".share-section-list"},events:{"change input[name=share-all-libraries-cb]":"onAllLibrariesChange"},initialize:function(e){s.a.bindAll(this,"render"),this.serverOverview=e.serverOverview,this.collection=this.serverOverview.get("sections");var t=this.model.get("serverShares");this.serverShare=t.findWhere({machineIdentifier:this.serverOverview.id});var n=[];n.push(this.serverOverview.populate()),this.serverShare&&(this.itemViewOptions={
serverShare:this.serverShare},this.serverShare.isNew()||n.push(this.serverShare.populate())),this.listPromise=l.a.when.apply(l.a,n),"pending"===this.listPromise.state()&&this.listPromise.always(this.render)},serializeData:function(){var e=this.listPromise.state(),t=!this.serverShare&&this.model.isNew(),n=this.serverShare&&this.serverShare.get("allLibraries");return{server:this.serverOverview.toJSON(),isPending:"pending"===e,hasFailed:"rejected"===e,
hasSections:!!this.serverOverview.get("sections").length,allLibraries:t||n}},onAllLibrariesChange:function(e){this.ui.list.toggleClass("show-libraries",!e.currentTarget.checked)}});t.a=d},function(e,t,n){"use strict";var i=n(3019),a=n.n(i),r=n(3020),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(15),h=n(13),p=n(4),f=n(184),g=n(128),m=d.a.ItemView.extend({template:a.a,ui:{details:".server-details"},events:{"click .server-status-btn":"onServerStatusClick",
"click .leave-server-btn":"onLeaveServerClick"},initialize:function(e){this.paneID=e.paneID,this.serverShare=e.serverShare,this.serverShare.populate();var t=h.a("appModel"),n=t.get("servers"),i=n.get(this.serverShare.get("machineIdentifier"));i?this.attachServer(i):this.listenTo(n,"add",this.onServerAdd)},flushChanges:function(){},attachServer:function(e){this.server=e,this.listenTo(e,"change:connected",this.render)},bindings:{".server-title":{model:"serverShare",modelAttribute:"name"},
".server-status-btn":{model:"server",modelAttribute:"connected",manual:!0,formatter:function(e,t){t.removeClass("unknown available unauthorized unavailable"),null==e?t.addClass("unknown"):e?t.addClass("available"):this.server.get("unauthorized")?t.addClass("unauthorized"):t.addClass("unavailable")}},".server-detail-version":{model:"server",modelAttribute:"shortVersion"},".server-detail-last-seen":{model:"serverShare",modelAttribute:"lastSeenAt",formatter:function(e){return n.i(f.a)(e)}},
".server-detail-address":{model:"server",modelAttribute:"activeConnection",formatter:function(e){return e&&e.address}},".server-detail-port":{model:"server",modelAttribute:"activeConnection",formatter:function(e){return e&&e.port}},".server-restriction-allow-sync":{model:"serverShare",modelAttribute:"allowSync",manual:!0,autohide:!0},".share-section-list":{model:"serverShare",modelAttribute:"Section",isHtml:!0,formatter:function(e){var t
;return e.length||"pending"!==this.serverShare.populatePromise.state()?(t="",l.a.each(l.a.where(e,{shared:!0}),function(e){var n={section:e,typeIcon:g.a.get(e.type).sectionTypeIcon};t+=s()(n)})):t=s()({section:{title:n.i(p.default)("Loading...")},typeIcon:"hidden"}),t}}},onServerAdd:function(e){e.id===this.serverShare.get("machineIdentifier")&&(this.attachServer(e),this.unbindFromModel(),this.bindToModel())},onServerStatusClick:function(e){e.preventDefault();var t=c()(e.currentTarget)
;t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"))},onLeaveServerClick:function(e){e.preventDefault(),this.trigger("destroy:serverShare",this.serverShare)}});t.a=m},function(e,t,n){"use strict";var i=n(3021),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(23),d=u.a.ItemView.extend({template:a.a,focusDelay:200,validationDelay:500,ui:{existingGroup:".existing-user-group",existingBtn:".add-existing-user-btn",restrictedGroup:".restricted-user-group",
restrictedBtn:".add-restricted-user-btn"},events:{"keyup input":"onInputChange","change input":"onInputChange","click .add-existing-user-btn":"onAddExistingUserClick","click .add-restricted-user-btn":"onAddRestrictedUserClick"},initialize:function(e){this.paneID=e.paneID,this.type=e.type,this.homeUser=e.homeUser,this.changes={},this.validate=s.a.debounce(this.validate,500)},serializeData:function(){return{type:this.type}},flushChanges:function(){this.model.set(this.changes),
this.homeUser&&this.homeUser.set(this.changes)},focusInput:function(){var e;e=this.changes.restricted?this.$("[name=title]"):this.$("[name=username]"),e.removeClass("hidden"),e.focus()},validate:function(e){if(e){var t=c.a.execute("validateUsername",{username:e,server:this.model.server});t.done(s.a.bind(function(){this.$el.addClass("is-valid-username"),this.$el.removeClass("is-invalid-username")},this)),t.fail(s.a.bind(function(e,t){this.$el.removeClass("is-valid-username"),
this.$el.addClass("is-invalid-username"),this.trigger("change:errorMessage",t)},this))}},onRender:function(){"friend"===this.type&&setTimeout(s.a.bind(this.focusInput,this),this.focusDelay)},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value;i!==this.changes[n]&&(this.changes[n]=i,this.trigger("change:errorMessage",""),this.trigger("enable:submit",!!i),"username"===n&&this.validate(i))},onAddExistingUserClick:function(e){e.preventDefault();var t=l()(e.currentTarget)
;t.isDisabled()||(t.addClass("hidden"),this.ui.restrictedGroup.addClass("disabled"),this.ui.restrictedBtn.addClass("disabled"),this.focusInput())},onAddRestrictedUserClick:function(e){e.preventDefault();var t=l()(e.currentTarget);t.isDisabled()||(this.changes.restricted=!0,t.addClass("hidden"),this.ui.existingGroup.addClass("disabled"),this.ui.existingBtn.addClass("disabled"),this.focusInput())}});t.a=d},function(e,t,n){"use strict";var i=n(3024),a=n.n(i),r=n(264),s=r.a.extend({
className:"user-select-alert-bar",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(3025),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(4),h=n(12),p=n(31),f=n(23),g=n(871),m=n(870),v=u.a.Layout.extend({className:"user-select-modal-pin-container",template:a.a,ui:{digitContainer:".pin-digit-container",input:".pin-input",digits:".pin-digit",loading:".loading",removeBtn:".remove-btn",saveBtn:".save-btn"},regions:{userList:".user-select-list"},events:{
"keydown input":"onKeyDown","input input":"onInput","keyup input":"onKeyUp","focus input":"onFocus","blur input":"onBlur","change input":"onChange","animationend .pin-input-container":"onInputsAnimationEnd","webkitAnimationEnd .pin-input-container":"onInputsAnimationEnd","oAnimationEnd .pin-input-container":"onInputsAnimationEnd","click .back-btn":"onBackClick","click .remove-btn":"onRemoveClick","submit #pin-form":"onSubmit","click .pin-digit":"onPINClick","keydown .save-btn":"onSaveKeyDown"},
onlyAfterRender:["confirmUser"],initialize:function(e){var t=c.a("appModel");this.isForced=e.isForced,this.isEditing=e.isEditing,this.isEditWarning=e.isEditWarning,this.showBackButton=e.showBackButton,this.focusDelay=e.focusDelay,this.user=t.get("user"),this.isEditConfirmation=this.isEditing&&this.model.get("protected")&&!this.model.get("restricted")},serializeData:function(){return{isEditing:this.isEditing&&!this.isEditConfirmation,isEditWarning:this.isEditWarning,
isEditConfirmation:this.isEditConfirmation,hasCurrentPIN:this.model.get("protected"),showBackButton:this.showBackButton}},focusInput:function(){this.ui.input.val(""),this.ui.input.focus()},getPIN:function(){return this.ui.input.val()},editPIN:function(e){if(!this.ui.saveBtn.isDisabled()){this.ui.saveBtn.addClass("disabled");this.savePIN(e).fail(this.whenRendered(function(){this.ui.saveBtn.removeClass("disabled"),h.a.trigger("show:alert",{type:"error",
message:n.i(d.default)("This PIN could not be saved.")})}))}},removePIN:function(){if(!this.ui.removeBtn.isDisabled()){this.ui.removeBtn.addClass("disabled");this.savePIN("").fail(this.whenRendered(function(){this.ui.removeBtn.removeClass("disabled"),h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("This PIN could not be removed.")})}))}},savePIN:function(e){this.ui.loading.removeClass("hidden");var t={pin:e};this.currentPin&&(t.currentPin=this.currentPin);var n=this.model.save(t,{
wait:!0});return n.done(s.a.bind(function(){this.model.unset("pin"),this.model.unset("currentPin"),this.model.set("protected",!!e),this.model.id===this.user.id&&(e?this.user.set("pin",this.user.hashPIN(e)):this.user.unset("pin"),this.user.set("home",this.user.hasHome())),this.trigger("resolve",e),e&&this.user.get("homeUsers").length<2&&h.a.trigger("show:modal",new m.a({type:"pin"}))},this)),n.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")})),n},confirmUser:function(e){
this.ui.loading.removeClass("hidden");var t=f.a.execute("switchUser",{homeUser:this.model,pin:e,allowGuestLock:!this.isEditing});t.done(s.a.bind(function(){this.isEditing?(this.isEditConfirmation=!1,this.currentPin=e,this.render()):this.trigger("resolve",e)},this)),t.fail(this.whenRendered(function(){this.ui.digitContainer.addClass("shake"),this.ui.input.val(""),this.focusInput()})),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},renderPIN:function(){
var e=this.getPIN(),t=e.length,n=this.isEditing&&!this.isEditConfirmation;this.ui.digits.each(function(i,a){var r=e[i]||"";r&&!n&&(r="&bull;"),l()(a).toggleClass("current",i===t).html(r)})},onRender:function(){this.userList.show(new g.a({model:this.model,disabled:!0})),p.a.mobile||setTimeout(s.a.bind(this.focusInput,this),this.focusDelay)},onKeyDown:function(e){var t=e.which;if(13!==t&&8!==t&&46!==t&&229!==t){var n=t>=48&&t<=57,i=t>=96&&t<=105;n||i||e.preventDefault()}},onInput:function(e){
var t=l()(e.currentTarget),n=t.val(),i=n.length,a=n.charAt(n.length-1);if(!/[0-9]/.test(a))return void t.val(n.slice(0,i-1));4===n.length&&(!this.isEditing||this.isEditConfirmation?(t.blur(),this.confirmUser(this.getPIN())):this.ui.saveBtn.focus())},onKeyUp:function(e){this.renderPIN()},onFocus:function(e){this.renderPIN()},onBlur:function(e){this.renderPIN(),this.ui.digits.removeClass("current")},onChange:function(e){this.renderPIN()},onInputsAnimationEnd:function(e){
l()(e.currentTarget).removeClass("shake")},onBackClick:function(e){e.preventDefault(),this.trigger("change:pane","users")},onRemoveClick:function(e){e.preventDefault(),this.removePIN()},onSubmit:function(e){e.preventDefault();var t=this.getPIN();if(4!==t.length)return void h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("Please enter a 4 digit PIN.")});this.isEditing&&!this.isEditConfirmation?this.editPIN(t):this.confirmUser(t)},onSaveKeyDown:function(e){var t=e.which
;8!==t&&46!==t||(e.preventDefault(),this.ui.input.val(""),this.focusInput())},onPINClick:function(){this.focusInput()}});t.a=v},function(e,t,n){"use strict";var i=n(43),a=n(871),r=i.a.extend({tagName:"ul",className:"tile-list user-select-list",itemView:a.a});t.a=r},function(e,t,n){"use strict";var i=n(3027),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(23),c=n(114),d=n(207),h=n(711),p=n(1909),f=o.a.Layout.extend({className:"user-select-modal-users-container",template:a.a,ui:{loading:".loading"},
regions:{body:".modal-body"},onlyAfterRender:["onUserPopulated","onHomeUsersPopulated","onError"],initialize:function(e){var t=l.a("appModel");this.user=t.get("user"),this.homeUsers=this.user.get("homeUsers"),this.user.server.populate().done(s.a.bind(this.onUserPopulated,this)).fail(s.a.bind(this.onError,this))},showList:function(e){this.ui.loading.addClass("hidden"),this.body.show(new p.a({collection:e})),this.listenTo(this.body.currentView,"itemview:selectUser",this.onUserSelect)},
selectUser:function(e){this.ui.loading.removeClass("hidden");var t=u.a.execute("switchUser",{homeUser:e,switchUser:!0,allowGuestLock:!0});t.done(s.a.bind(function(){this.trigger("resolve")},this)),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},onUserPopulated:function(){this.homeUsers.fetch().done(s.a.bind(this.onHomeUsersPopulated,this)).fail(s.a.bind(this.onError,this))},onHomeUsersPopulated:function(e){u.a.execute("lockUser").always(s.a.bind(function(){
1===e.length&&e.first().get("protected")?this.trigger("change:pane","pin",{model:e.first(),showBackButton:!1,focusDelay:0}):this.showList(e)},this))},onError:function(){var e=c.a.getActiveUser();if(e&&e.get("home")){var t={id:e.id,title:e.get("title"),protected:!!e.get("pin")};this.showList(new h.a([t],{server:this.user.server,parent:this.user}))}else this.user.set("lockState",d.a.lockStates.UNLOCKED),this.trigger("resolve")},onUserSelect:function(e,t){
t.get("protected")?this.trigger("change:pane","pin",{model:t,showBackButton:!0,focusDelay:0}):this.selectUser(t)}});t.a=f},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(3028),s=n.n(r),o=n(2),l=n.n(o),u=n(15),c=n(1),d=(n.n(c),n(48)),h=n.n(d),p=n(14),f=n(13),g=n(95),m=n(12),v=n(791),y=n(380),b=n(84),S=n(324),I=n(2339),w=n(438),M=n(2398),C=n(1912),D=n(856),P=a()(I.a,{}),T=a()(M.a,{}),x=u.a.Layout.extend({className:"nav-bar",template:s.a,sectionSearchDelay:500,ui:{backBtn:".back-btn",
plexPassBtn:".plex-pass-btn",tvModeBtn:".tv-mode-btn",exitFullscreenBtn:".exit-fullscreen-btn",activityBtn:".activity-btn",activityBadge:".activity-badge",search:".nav-bar-search-container",modalContainer:".modal-container"},regions:{navDropdown:".nav-bar-right",playerDropdown:".nav-bar-right",tvModeButton:".nav-bar-right"},events:{"click .back-btn":"onBackClick","click .tv-mode-btn":"onTVModeClick","click .exit-fullscreen-btn":"onExitFullscreenClick","click .activity-btn":"onActivityClick",
"click .plex-pass-btn":"onPlexPassClick"},modelEvents:{"change:history":"onHistoryChange","change:primaryServer":"onPrimaryServerChange"},onlyAfterRender:["onSignedInChange","onHistoryChange","onPrimaryServerChange","onActivityChange","onFullscreenChange"],initialize:function(){if(l.a.bindAll(this,"onPlexPassModalClose"),this.isPlexPassModalOpen=!1,this.listenTo(this.model.get("user"),{"change:signedIn":this.onSignedInChange,"change:homeSize":this.onHomeSizeChange}),
this.listenTo(m.a,"change:language",this.render),this.setupServerListeners(),n.i(y.b)()){var e=f.a("fullscreenManager");this.unsubscribeFullscreen=e.subscribe(this.onFullscreenChange.bind(this))}},setupServerListeners:function(){this.primaryServer&&(this.stopListening(this.primaryServer),this.stopListening(this.sessions),this.stopListening(this.transcodeJobs),this.sessions=null,this.transcodeJobs=null),this.primaryServer=this.model.get("primaryServer"),
this.primaryServer&&(this.sessions=this.primaryServer.get("desktop").get("sessions"),this.transcodeJobs=new S.a([],{server:this.primaryServer,persistInCache:!0}),this.listenTo(this.sessions,"reset add remove",this.onActivityChange),this.listenTo(this.transcodeJobs,"reset add remove",this.onActivityChange))},serializeData:function(){return{plexPassUrl:this.model.get("user").server.get("plexPassUrl"),hasHistory:this.hasHistory(),canGoPremium:this.canGoPremium(),isKonvergo:n.i(y.a)(),
isOnDashboard:this.isOnDashboard(),isFullscreen:this.isFullscreen(),showActivity:!!this.primaryServer,activityCount:this.getActivityCount()}},mountReact:function(){h.a.render(a()(p.a,{store:f.a("appStore")},void 0,P),this.ui.search[0]),h.a.render(a()(p.a,{store:f.a("appStore")},void 0,a()("div",{},void 0,a()(w.a,{metricsProperties:{context:b.g},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose}),T)),this.ui.modalContainer[0])},unmountReact:function(){
this.isRendered&&(h.a.unmountComponentAtNode(this.ui.search[0]),h.a.unmountComponentAtNode(this.ui.modalContainer[0]))},getActivityCount:function(){return(this.sessions?this.sessions.length:0)+(this.transcodeJobs?this.transcodeJobs.length:0)},hasHistory:function(){return this.model.get("history").length>1},canGoPremium:function(){return this.model.get("user").get("canGoPremium")},showOrHidePremiumNotice:function(){this.ui.plexPassBtn.toggleClass("hidden",!this.canGoPremium())},
isOnDashboard:function(){var e=window.location.hash;return""===e||"#"===e||/\/dashboard($|\?)/.test(e)},isFullscreen:function(){if(n.i(y.a)()){return f.a("fullscreenManager").isFullscreen()}return!1},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact(),this.playerDropdown.append(new D.a({showNowPlaying:!0})),this.navDropdown.append(new C.a({model:this.model})),this.$el.tooltip({selector:'[data-toggle="tooltip"]',container:"body",placement:"bottom"})},
onClose:function(){this.unmountReact(),this.unsubscribeFullscreen&&this.unsubscribeFullscreen()},onSignedInChange:function(e,t){this.showOrHidePremiumNotice()},onHistoryChange:function(e,t){this.ui.backBtn.toggleClass("hidden",!this.hasHistory()),n.i(y.a)()&&this.ui.tvModeBtn.toggleClass("hidden",!this.isOnDashboard()||this.isFullscreen())},onPrimaryServerChange:function(e,t){this.setupServerListeners();var n=!!t;this.ui.activityBtn.toggleClass("hidden",!n),this.onActivityChange(),
this.mountReact()},onActivityChange:function(){var e=this.getActivityCount();this.ui.activityBtn.parent("li").toggleClass("active",!!e),this.ui.activityBadge.toggleClass("hidden",!e),this.ui.activityBadge.text(e)},onBackClick:function(e){e.preventDefault(),m.a.trigger("navigate:back")},onTVModeClick:function(e){e.preventDefault(),n.i(v.a)("tv")},onExitFullscreenClick:function(e){e.preventDefault(),g.a.set("main.fullscreen",!1)},onActivityClick:function(e){e.preventDefault(),
this.transcodeJobs&&this.transcodeJobs.length?m.a.trigger("navigate","conversion"):this.sessions&&this.sessions.length?m.a.trigger("navigate","nowPlaying"):m.a.trigger("navigate","activity")},onPlexPassClick:function(e){e.preventDefault(),this.isPlexPassModalOpen=!0,this.mountReact()},onPlexPassModalClose:function(){this.isPlexPassModalOpen=!1,this.mountReact()},onHomeSizeChange:function(){this.showOrHidePremiumNotice()},onFullscreenChange:function(e){this.ui.tvModeBtn.toggleClass("hidden",e),
this.ui.exitFullscreenBtn.toggleClass("hidden",!e)}});t.a=x},function(e,t,n){"use strict";var i=n(3029),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(12),u=n(23),c=n(164),d=n(207),h=o.a.ItemView.extend({id:"nav-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:a.a,ui:{poster:".dropdown-poster-toggle .media-poster",dropdownMenu:".dropdown-menu",switchUserItem:".switch-user-item",totalBadge:".total-badge",invitesBadge:".invites-badge",announcementsBadge:".announcements-badge",
announcementsItem:".announcements-item"},events:{"click .switch-user-btn":"onSwitchUserClick","click .users-btn":"onUsersClick","click .sign-in-btn":"onSignInClick","click .sign-out-btn":"onSignOutClick"},onlyAfterRender:["onSignedInChange","updateBadges"],bindings:{".username-header":{model:"user",modelAttribute:"title"}},initialize:function(){this.user=this.model.get("user"),this.invites=this.user.get("desktop").get("invites"),this.image=new c.a({model:this.user,type:"friend",width:34})
;var e=s.a.debounce(this.updateBadges),t=s.a.debounce(this.onSignedInChange);this.listenTo(this.user,{"change:signedIn":t,"change:username":this.onUsernameChange,"change:home":this.onHomeChange}),this.listenTo(this.user.get("desktop"),{"change:announcements.reset":e,"change:announcements.update":e,"change:announcements.change:read":e}),this.listenTo(this.invites,"reset add remove",e)},serializeData:function(){var e=this.invites.length,t=this.getUnreadAnnouncementsCount();return{
signedIn:this.user.get("signedIn"),isRestricted:this.user.get("restricted"),home:this.user.get("home"),isFullUser:this.user.isFullUser(),invitesCount:e,unreadAnnouncementsCount:t,totalCount:e+t,appsUrl:this.user.server.get("appsUrl"),helpUrl:this.user.server.get("helpUrl"),defaultTarget:"_self"}},getUnreadAnnouncementsCount:function(){return this.user.get("desktop").get("announcements").where({read:!1}).length},updateBadges:function(){
var e=this.invites.length,t=this.getUnreadAnnouncementsCount(),n=e+t;this.ui.totalBadge.toggleClass("hidden",!n),this.ui.totalBadge.text(n),this.ui.invitesBadge.toggleClass("hidden",!e),this.ui.invitesBadge.text(e),this.ui.announcementsBadge.toggleClass("hidden",!t),this.ui.announcementsBadge.text(t)},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onSignedInChange:function(e,t){this.ui.dropdownMenu.toggleClass("signed-in",!!t),
this.ui.announcementsItem.toggleClass("hidden",!!e.get("restricted"))},onUsernameChange:function(e,t){this.ui.dropdownMenu.toggleClass("full-user",!!t)},onHomeChange:function(e,t){this.ui.switchUserItem.toggleClass("hidden",!e.get("home"))},onSwitchUserClick:function(e){e.preventDefault(),this.user.set("lockState",d.a.lockStates.LOCKED)},onUsersClick:function(e){e.preventDefault(),l.a.trigger("navigate","users")},onSignInClick:function(e){e.preventDefault(),l.a.trigger("navigate","login")},
onSignOutClick:function(e){e.preventDefault(),u.a.execute("signOut").done(s.a.bind(function(){l.a.trigger("navigate:refresh:dashboard")},this))}});t.a=h},function(e,t,n){"use strict";var i=n(3037),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a,className:"player mini-player"});t.a=s},function(e,t,n){"use strict";var i=n(3038),a=n.n(i),r=n(13),s=n(486),o=n(561),l=n(562),u=o.a.extend({template:a.a,volumeSettingsKey:"musicPlayerVolume",initialize:function(e){
o.a.prototype.initialize.apply(this,arguments),this.controlsView=new l.a({model:this.playerModel,upNextCollection:new s.a(null,{parent:this.playerModel})}),this.addListeners()},startPlayback:function(e){e||(e={});var t=r.a("appModel");return this.controller.load({model:this.playerModel,offset:e.offset,autoplay:e.autoplay,fallbackServer:t.get("primaryServer"),silent:this.isNowPlaying()})},getNavigationKey:function(){var e=this.metadataItem.get("parentKey");if(e)return e},onRender:function(){
this.controls.append(this.controlsView,this.$el),o.a.prototype.onRender.apply(this,arguments)}});t.a=u},function(e,t,n){"use strict";var i=n(3039),a=n.n(i),r=n(561),s=n(562),o=n(1214),l=r.a.extend({template:a.a,initialize:function(e){e||(e={}),e.playerModelClass=o.a,r.a.prototype.initialize.apply(this,arguments),this.controlsView=new s.a({model:this.playerModel}),this.addListeners()},addListeners:function(){r.a.prototype.addListeners.apply(this,arguments),
this.listenTo(this.controlsView,"load:poster",this.onPosterLoad)},getNavigationKey:function(){var e=this.metadataItem.get("parentKey");if(e)return e},onRender:function(){this.controls.append(this.controlsView,this.$el),r.a.prototype.onRender.apply(this,arguments)},onPosterLoad:function(e){this.playerModel.set("loaded",!0)}});t.a=l},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(222),d=n(62),h=n(73),p=n(852),f=n(2204),g=p.a.extend({
mountReact:function(){var e=n.i(u.a)("appStore"),t=this.model.server.entityID(),i=n.i(d.a)(c.PROVIDER,h.a.LIBRARY_PROVIDER_IDENTIFIER,t);o.a.render(a()(l.a,{store:e},void 0,a()(f.a,{serverEntityID:t,providerEntityID:i})),this.ui.page[0])}});t.a=g},function(e,t,n){"use strict";var i=n(3040),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(1158),u=n(143),c=n(58),d=n(534),h=n(675),p=(n.n(h),o.a.Layout.extend({mixins:l.a,className:"video-post-play",template:a.a,regions:{countdown:".countdown"},events:{
"click .next-btn":"onNextClick","click .replay-btn":"onReplayClick",mousemove:"onMouseMove"},initialize:function(e){e||(e={}),e.countdown&&this.createCountdown(e.countdown),this.previousPlayQueueItem=this.model,this.previousMetadataItem=this.previousPlayQueueItem.get("metadataItem");var t=this.collection.indexOf(this.previousPlayQueueItem)+1;this.nextPlayQueueItem=this.collection.at(t),this.nextMetadataItem=this.nextPlayQueueItem.get("metadataItem")
;var n="movie"===this.previousMetadataItem.get("type")?"art":"thumb";this.previousPoster=new c.a({model:this.previousMetadataItem,modelAttribute:n,type:this.previousMetadataItem.get("type"),height:140}),this.nextPoster=new c.a({model:this.nextMetadataItem,modelAttribute:n,type:this.nextMetadataItem.get("type"),height:190}),this.backgroundImage=new u.a({model:this.nextMetadataItem,modelAttribute:"art",width:1280,height:720,background:!0})},onRender:function(){
this.previousPoster.setElement(this.ui.previousPoster),this.nextPoster.setElement(this.ui.nextPoster),this.backgroundImage.setElement(this.ui.background),this.totalSeconds&&this.countdown.append(new d.a({model:this.progressModel,size:80}))},onNextClick:function(e){e.preventDefault(),this.trigger("next",{manual:!0})},onReplayClick:function(e){e.preventDefault(),this.trigger("replay")},onMouseMove:function(e){this.lastX===e.clientX&&this.lastY===e.clientY||this.totalSeconds&&(this.startTime=0,
this.lastX=e.clientX,this.lastY=e.clientY,window.cancelAnimationFrame(this.countdownAnimator),clearInterval(this.idleTimer),this.idleTimer=setTimeout(s.a.bind(this.updateCountdown,this),1e3))},onClose:function(){l.a.onClose.apply(this,arguments),clearInterval(this.idleTimer)}}));t.a=p},function(e,t,n){"use strict";var i=n(3041),a=n.n(i),r=n(486),s=n(561),o=n(562),l=s.a.extend({template:a.a,initialize:function(e){s.a.prototype.initialize.apply(this,arguments),this.controlsView=new o.a({
model:this.playerModel,upNextCollection:new r.a(null,{parent:this.playerModel})}),this.addListeners()},startPlayback:function(e){return e||(e={}),this.controller.load({model:this.playerModel,offset:e.offset,autoplay:e.autoplay,silent:this.isNowPlaying(),mediaElement:e.mediaElement})},continuePlayback:function(){},onRender:function(){this.controls.append(this.controlsView,this.$el),s.a.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,t){
s.a.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()}});t.a=l},function(e,t,n){"use strict";var i=n(3042),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(13),c=n(4),d=n(12),h=n(66),p=n(31),f=n(187),g=n(40),m=n(531),v=n(23),y=n(872),b=n(42),S=n(1882),I=n(1922),w=n(1917),M=y.a.extend({className:"video-player dark-scrollbar buffering",template:a.a,volumeSettingsKey:"videoPlayerVolume",controlsDelay:h.a.hasTouchScreen?4e3:2e3,ui:{container:".video-container"},regions:{
controls:".video-controls-container",postPlay:".video-post-play-container"},events:s.a.extend({"click .player-close-btn":"onCloseClick",mousemove:"onMouseMove"},y.a.prototype.events),postPlayDuration:10,awakeTime:72e5,maximumDurationForAutoadvance:12e5,minimumDurationForPostPlay:3e5,initialize:function(e){this.playQueue=e.playQueue,y.a.prototype.initialize.apply(this,arguments),this.controlsView=new I.a({model:this.playerModel}),v.a.execute("playBackgroundMedia"),this.startSleepProtection(),
this.addListeners()},addListeners:function(){y.a.prototype.addListeners.apply(this,arguments),this.listenTo(this.playerModel,{"change:ready":this.onPlayerReadyChange,"change:embedHtml":this.onPlayerEmbedHtmlChange}),this.listenTo(this.controlsView,"toggleControls",this.toggleControls)},startPlayback:function(e){if(e||(e={}),this.isNowPlaying())return this.load(s.a.extend({},e,{silent:!0}));var t=l.a.Deferred(),n=this.resolveOffset(e);return n.done(this.whenRendered(function(n){
this.load(s.a.extend({},e,{offset:n,silent:!1})).done(s.a.bind(t.resolve,t)).fail(s.a.bind(t.reject,t))})),n.fail(s.a.bind(this.stop,this)).fail(s.a.bind(t.reject,t)),t.promise()},continuePlayback:function(){this.controlsView.replaceVideo(this.controller.mediaElement),this.playerModel.get("ready")&&(this.onPlayerReadyChange(this.playerModel,!0),this.onPlayerStateChange(this.playerModel,this.playerModel.get("state")))},resolveOffset:function(e){var t=l.a.Deferred(),n=e.offset||this.offset
;if(s.a.isNumber(n))return t.resolve(n).promise();var i=this.metadataItem.get("viewOffset");if(!i)return t.resolve(0).promise();var a=new S.a({offset:i}),r=a.promise;return r.done(function(e){t.resolve(e)}),r.fail(function(){t.reject()}),d.a.trigger("show:modal",a),t.promise()},load:function(e){var t=u.a("appModel");return this.controller.load({model:this.playerModel,media:this.media,offset:e.offset,autoplay:e.autoplay,postplay:!t.get("primaryPlayer"),silent:e.silent,
mediaElement:e.mediaElement||this.controls.currentView.ui.video[0]})},stop:function(){var e,t,i=l.a.Deferred().resolve().promise(),a=u.a("appModel"),r=!a.get("primaryPlayer");if(this.metadataItem&&r&&(e=this.metadataItem.server.get("playQueueManager"),t=e.getFor(this.metadataItem)),t&&t.get("hasUserAdditions")){var s=new b.a({title:n.i(c.default)("Finish Watching Queue"),message:n.i(c.default)("This will clear the contents of your play queue.")});i=s.promise,d.a.trigger("show:modal",s)}
return i.then(function(){d.a.trigger("hide:player")}),i},canAutoplay:function(e){return!p.a.mobile&&(null==e||e!==g.a.states.PAUSED)},showVideo:function(e){this.$el.toggleClass("show-html-video","html"===e),this.$el.toggleClass("show-flash-video","flash"===e),this.$el.toggleClass("show-placeholder-video",!e)},hideVideo:function(){this.$el.removeClass("show-html-video show-flash-video show-placeholder-video")},toggleControls:function(e){
this.controller.model&&this.controller.model.get("ready")&&"flash"!==this.controller.playerType&&(e||(e={}),this.controlsView.visible||this.controlsView.transitionIn(),this.controlsTimeout=clearTimeout(this.controlsTimeout),e.autohide&&(this.controlsTimeout=setTimeout(this.controlsView.transitionOut,this.controlsDelay)))},startSleepProtection:function(){clearTimeout(this.sleepTimeout),
this.isDefinitelyAwake||(this.isPotentiallyAsleep?this.isDefinitelyAwake=!0:this.sleepTimeout=setTimeout(s.a.bind(this.onSleep,this),this.awakeTime))},onRender:function(){this.controls.show(this.controlsView),y.a.prototype.onRender.apply(this,arguments)},onClose:function(){y.a.prototype.onClose.apply(this,arguments),this.controlsTimeout=clearTimeout(this.controlsTimeout),this.sleepTimeout=clearTimeout(this.sleepTimeout),this.controller.model&&!this.isContinuing&&f.a.abortAll("player")},
onPlayerReadyChange:function(e,t){t?(this.showVideo(this.controller.playerType),this.controller.companion?this.toggleControls():this.toggleControls({autohide:!0})):this.hideVideo()},onPlayerStateChange:function(e,t){y.a.prototype.onPlayerStateChange.apply(this,arguments),this.controller.companion||(t===g.a.states.ERROR&&this.hideVideo(),clearTimeout(this.controlsTimeout),this.controlsTimeout=setTimeout(this.controlsView.transitionOut,this.controlsDelay)),
this.$el.toggleClass("stopped",e.get("stopped")),this.$el.toggleClass("paused",e.get("paused")),this.$el.toggleClass("playing",e.get("playing")),this.$el.toggleClass("buffering",e.get("buffering")),this.$el.toggleClass("error",e.get("error"))},onPlayerEmbedHtmlChange:function(e,t){this.ui.container.html(t)},onPlayerFinishedChange:function(e,t){if(t){var n=this.metadataItem.get("duration")<this.minimumDurationForPostPlay,i=this.metadataItem.get("extraType")===m.a.get("trailer").id
;if(this.model===this.playQueue.get("collection").last())this.model.server.get("playQueueManager").remove("video"),d.a.trigger("hide:player");else if(n||i)this.controller.skipNext();else{this.hideVideo();var a={model:this.model,collection:this.playQueue.get("collection")},r=this.metadataItem.get("duration")<this.maximumDurationForAutoadvance;(!this.isPotentiallyAsleep||this.isDefinitelyAwake||r)&&(a.countdown=this.postPlayDuration);var s=new w.a(a);this.listenTo(s,{replay:this.onPostPlayReplay,
next:this.onPostPlayNext}),this.postPlay.show(s)}}},onPostPlayReplay:function(){this.startSleepProtection(),this.stopListening(this.postPlay.currentView),this.postPlay.close(),this.controller.setPosition(0,{autoplay:!0}),this.showVideo(this.controller.playerType)},onPostPlayNext:function(e){e&&e.manual&&this.startSleepProtection(),this.stopListening(this.postPlay.currentView),this.postPlay.close(),this.controller.skipNext()},onSleep:function(){this.isPotentiallyAsleep=!0},
onCloseClick:function(e){e.preventDefault(),this.stop()},onMouseMove:function(e){this.lastX===e.clientX&&this.lastY===e.clientY||(this.lastX=e.clientX,this.lastY=e.clientY,this.controller.companion||this.playerModel.get("finished")||this.toggleControls({autohide:!0}))}});t.a=M},function(e,t,n){"use strict";var i=n(854),a=i.a.extend({className:"video-player-alert alert alert-sm transition-in",alertDuration:5e3});t.a=a},function(e,t,n){"use strict"
;var i=n(3046),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(764),u=n(320),c=n(161),d=n(143),h=o.a.ItemView.extend({className:"player-scrub-preview",template:a.a,areThumbnailsAvailable:null,thumbnailPreferredIndex:"sd",thumbnailWidth:240,ui:{scrubPreviewThumbnail:".player-scrub-preview-thumbnail",scrubPreviewTooltip:".player-scrub-preview-tooltip",scrubPreviewTime:".player-scrub-preview-time"},modelEvents:{"change:metadataItem":"onMetadataItemChange"},initialize:function(){
this.throttledShowThumbnail=s.a.throttle(this.whenRendered(this.showThumbnail),200),this.thumbnailImage=new d.a({model:this.model.get("metadataItem"),width:this.thumbnailWidth,height:u.a.getPosterHeight("art",this.thumbnailWidth)})},show:function(){this.$el.removeClass("hidden")},hide:function(){this.$el.addClass("hidden"),this.ui.scrubPreviewThumbnail.addClass("hidden")},positionContainer:function(){this.$el.css("left",this.position-this.$el.width()/2+"px")},updatePreview:function(e){
this.position=e.position,this.ui.scrubPreviewTime.text(n.i(c.a)(e.time)),this.positionContainer(),this.areThumbnailsAvailable!==!1&&this.throttledShowThumbnail(e.time)},showThumbnail:function(e){if(this.model.get("media")){var t=this.getScreenshotUrl(e);t?(this.areThumbnailsAvailable=!0,this.thumbnailImage.load(t).done(this.whenRendered(function(e){this.$el.hasClass("hidden")||(this.thumbnailImage.showImage(e),this.ui.scrubPreviewThumbnail.removeClass("hidden"),this.positionContainer())
}))):this.areThumbnailsAvailable=!1}},getScreenshotUrl:function(e){var t=e+6e3;return n.i(l.a)(this.model.get("media"),t,this.thumbnailPreferredIndex)},onRender:function(){this.thumbnailImage.setElement(this.ui.scrubPreviewThumbnail)},onClose:function(){this.thumbnailImage.close()},onMetadataItemChange:function(e,t){this.ui.scrubPreviewThumbnail.addClass("hidden"),this.areThumbnailsAvailable=null,this.thumbnailImage.setModel(t),this.thumbnailImage.src=null}});t.a=h},function(e,t,n){"use strict"
;var i=n(3047),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(4),h=n(521),p=n(782),f=n(785),g=n(12),m=n(66),v=n(161),y=n(40),b=n(486),S=n(143),I=n(58),w=n(1401),M=n(1403),C=n(873),D=n(409),P=n(1924),T=n(1925),x=n(1923),E=n(1921),A=n(1920),k=n(855),L=n(337),_=n(336),N=u.a.Layout.extend({className:"video-controls transition-out",template:a.a,visible:!1,muted:!1,mutedVolume:0,ui:{video:"#html-video",poster:".media-poster",background:".video-background",
backgroundImage:".video-background-image",volumeBtn:".volume-btn",errorMessage:".video-error-message",errorSkipMessage:".video-error-skip-message",dropdowns:".player-dropdowns-container",dropups:".player-dropups-container"},regions:{subtitles:".video-subtitles-container",seekBar:".seek-bar-container",volume:".player-volume-slider-container",playQueueDropdown:"#player-play-queue-dropdown",qualityDropdown:"#player-quality-dropdown",audioDropdown:"#player-subtitles-dropdown",
subtitlesDropdown:"#player-audio-dropdown",playerDropdown:"#player-primary-player-dropdown",scrubPreview:".player-scrub-preview-container",imageOverlaysRegion:".video-image-overlays-region",alertRegion:".video-alert-region"},modelEvents:{"change:metadataItem":"onMetadataItemChange","change:subtitlesUrl":"onPlayerSubtitlesUrlChange","change:volume":"onVolumeChange","change:errorMessage":"onErrorMessageChange","change:bufferingMessage":"onBufferingMessageChange",
"change:showQuality":"onShowQualityChange","change:showAudioStream":"onShowAudioStreamChange","change:showSubtitleStream":"onShowSubtitleStreamChange","change:state":"onStateChange"},events:{"click .volume-btn":"onVolumeClick","click .enter-fullscreen-btn":"onEnterFullscreenClick","click .exit-fullscreen-btn":"onExitFullscreenClick","click .video-overlay-btn":"onOverlayClick","click .share-btn":"onShareClick","click .recommend-btn":"onRecommendClick",
"click .video-error-message-center":"onErrorMessageClick"},triggers:{"click .play-btn":"play","click .pause-btn":"pause","click .previous-btn":"previous","click .next-btn":"next","click .minimize-btn":"minimize"},onlyAfterRender:["onVolumeChange","onErrorMessageChange"],initialize:function(){s.a.bindAll(this,"onMobileVideoClose"),this.bindAllWhenRendered("transitionIn","transitionOut"),this.metadataItem=this.model.get("metadataItem"),this.upNextCollection=new b.a(null,{parent:this.model}),
this.posterImage=new I.a({model:this.metadataItem,type:"movie",getUrl:this.getPosterUrl,width:100}),this.backgroundImage=new S.a({server:this.metadataItem.server,width:1280,height:720}),this.seekBarView=new C.a({model:this.model}),this.playQueueDropdownView=new k.a({model:this.model,collection:this.upNextCollection}),this.volumeSlider=new D.a({className:"player-volume-slider player-slider",value:this.model.get("volume")}),this.showVideoElements=!0,
this.listenTo(this.seekBarView,"change:value",this.onSeekBarValueChange),this.listenTo(this.seekBarView,"hover",this.onSeekBarHover),this.listenTo(this.volumeSlider,"change:value",this.onVolumeSliderValueChange),this.listenTo(this.playQueueDropdownView,"itemview:skip",this.onSkip),this.listenTo(this.playQueueDropdownView,"itemview:remove",this.onRemove),this.listenTo(this.playQueueDropdownView,"move",this.onMove)},serializeData:function(){return{showVideoElements:this.showVideoElements}},
getPosterUrl:function(e){return this.model.get("parentThumb")||this.model.get("grandparentThumb")||e},transitionIn:function(){this.visible=!0,this.$el.removeClass("transition-out")},transitionOut:function(){this.$(".dropdown.open, .dropup.open").length||(this.visible=!1,this.$el.addClass("transition-out"),this.scrubPreview.currentView.hide())},updateDropdownVisibility:function(e,t){var n=e.currentView;n&&n.$el.toggleClass("hidden",!t)},updateVolumeBtn:function(e){var t=this.ui.volumeBtn
;e>50?(this.muted=!1,t.addClass("high"),t.removeClass("low mute")):e<=50&&e>0?(this.muted=!1,t.addClass("low"),t.removeClass("high mute")):(this.muted=!0,t.addClass("mute"),t.removeClass("high low"))},replaceVideo:function(e){var t=l()(e);this.ui.video.off("webkitendfullscreen",this.onMobileVideoClose),t.attr("id",this.ui.video.attr("id")),t.attr("class",this.ui.video.attr("class")),this.ui.video.replaceWith(t),this.ui.video=t,t.on("webkitendfullscreen",this.onMobileVideoClose)},
createErrorSkipInterval:function(){this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.errorSkipCounter=5,this.updateErrorSkipMessage(this.errorSkipCounter),this.errorSkipInterval=setInterval(s.a.bind(this.onErrorSkipInterval,this),1e3)},updateErrorSkipMessage:function(e){this.ui.errorSkipMessage.text(n.i(d.default)("Skipping in {1} seconds...",e))},bindings:{".video-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e){return e.get("title")}},
".video-background-image":{modelAttribute:"metadataItem",manual:!0,formatter:function(e,t){var n=e.get("art")||e.channel&&e.channel.get("art");if(t.css("background-image","none"),t.addClass("transition-out"),!n)return this.currentArt=null,void(this.currentArtSrc=null);var i=s.a.bind(function(e){this.currentArt=n,this.currentArtSrc=e,t.css("background-image","url("+e+")"),t.removeClass("transition-out")},this);this.currentArt===n?i(this.currentArtSrc):this.backgroundImage.load(n,!0).done(i)}},
".play-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),e}},".pause-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),!e}},".previous-btn":{modelAttribute:"canSkipPrevious",manual:!0,autohide:function(){
var e=this.model.get("playQueue");return e&&e.get("collection").length>1},formatter:function(e,t){t.toggleClass("disabled",!e)}},".next-btn":{modelAttribute:"canSkipNext",manual:!0,autohide:function(){var e=this.model.get("playQueue");return e&&e.get("collection").length>1},formatter:function(e,t){t.toggleClass("disabled",!e)}},".player-position":{modelAttribute:"position",formatter:function(e){return n.i(v.a)(e)}},".player-duration":{modelAttribute:"duration",formatter:function(e){
return n.i(v.a)(e)}},".volume-btn":{modelAttribute:"canSetVolume",manual:!0,autohide:!0,formatter:function(e,t){return this.$el.toggleClass("show-volume",e),e}},".minimize-btn":{modelAttribute:"showMinimize",manual:!0,autohide:!0},".enter-fullscreen-btn":{modelAttribute:"showEnterFullscreen",manual:!0,autohide:!0},".exit-fullscreen-btn":{modelAttribute:"showExitFullscreen",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"metadataItem",manual:!0,autohide:function(e){
var t=n.i(c.a)("appModel"),i=t.get("user"),a=s.a.contains(["clip","userPlaylistItem"],e.get("type"));return e.get("url")&&i.get("signedIn")&&a}},".primary-player-name":{modelAttribute:"friendlyName",autohide:!0,formatter:function(e){if(e)return n.i(d.default)("Casting to {1}",e)}}},onRender:function(){this.ui.video.on("webkitendfullscreen",this.onMobileVideoClose),this.posterImage.setElement(this.ui.poster),this.seekBar.append(this.seekBarView),this.volume.show(this.volumeSlider)
;var e=this.model.get("playQueue");e&&e.get("collection").length>1&&this.playQueueDropdown.append(this.playQueueDropdownView,this.ui.dropups),this.updateVolumeBtn(this.model.get("volume")),this.scrubPreview.append(new E.a({model:this.model})),this.qualityDropdown.append(new P.a({model:this.model}),this.ui.dropdowns),this.audioDropdown.append(new T.a({model:this.model,type:"audio"}),this.ui.dropdowns),this.subtitlesDropdown.append(new T.a({model:this.model,type:"subtitles"}),this.ui.dropdowns),
this.playerDropdown.append(new x.a,this.ui.dropdowns),this.imageOverlaysRegion.show(new M.a({model:this.model})),this.updateDropdownVisibility(this.qualityDropdown,this.model.get("showQuality")),this.updateDropdownVisibility(this.audioDropdown,this.model.get("showAudioStream")),this.updateDropdownVisibility(this.subtitlesDropdown,this.model.get("showSubtitleStream"))},onClose:function(){this.ui.video.off("webkitendfullscreen",this.onMobileVideoClose),
this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.posterImage.close(),this.backgroundImage.close()},onMetadataItemChange:function(e,t){this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.posterImage.src=null,this.posterImage.setModel(t),this.posterImage.render(),this.backgroundImage.src=null},onPlayerSubtitlesUrlChange:function(e,t){if(t){var i=n.i(c.a)("appModel").get("settings"),a=n.i(f.a)()||n.i(h.a)()||n.i(p.a)();this.subtitles.show(new w.a({model:e,
subtitleSize:i.get("subtitleSize"),rendererOptions:{enableSvg:!a}}))}else this.subtitles.close()},onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onErrorMessageChange:function(e,t){var i=n.i(c.a)("appModel"),a=i.has("primaryPlayer");if(this.ui.errorMessage.text(t),this.ui.errorSkipMessage.text(""),t&&!a&&!e.get("terminationCode")){var r=e.get("playQueue").get("collection");if(r.length>1){var s=e.get("playQueueItem"),o=r.at(r.length-1)
;s.id!==o.id&&this.createErrorSkipInterval()}}},onErrorSkipInterval:function(){this.errorSkipCounter--,this.updateErrorSkipMessage(this.errorSkipCounter),0===this.errorSkipCounter&&(this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.trigger("next"))},onBufferingMessageChange:function(e,t){t?this.alertRegion.show(new A.a({message:t})):this.alertRegion.close()},onShowQualityChange:function(e,t){this.updateDropdownVisibility(this.qualityDropdown,t)},
onShowAudioStreamChange:function(e,t){this.updateDropdownVisibility(this.audioDropdown,t)},onShowSubtitleStreamChange:function(e,t){this.updateDropdownVisibility(this.subtitlesDropdown,t)},onStateChange:function(e,t){this.showVideoElements||this.ui.background.toggleClass("hidden",t!==y.a.states.STOPPED)},onSeekBarValueChange:function(e){this.trigger("change:position",e)},onSeekBarHover:function(e){e?(this.scrubPreview.currentView.updatePreview(e),
this.scrubPreview.currentView.show()):this.scrubPreview.currentView.hide()},onVolumeSliderValueChange:function(e){this.trigger("change:volume",e)},onVolumeClick:function(e){e.preventDefault(),this.muted?(this.mutedVolume>0?this.trigger("change:volume",this.mutedVolume):this.trigger("change:volume",100),this.muted=!1,this.mutedVolume=0):(this.muted=!0,this.mutedVolume=this.model.get("volume"),this.trigger("change:volume",0))},onEnterFullscreenClick:function(e){e.preventDefault(),
this.model.get("forceWebkitVideoFullscreen")?this.ui.video[0].webkitEnterFullscreen():this.trigger("enterFullscreen")},onExitFullscreenClick:function(e){e.preventDefault(),this.trigger("exitFullscreen")},onMobileVideoClose:function(e){g.a.trigger("hide:player")},onOverlayClick:function(e){e.preventDefault();var t=this.model.get("playing"),n=t?"pause":"play";if("pause"===n&&m.a.hasTouchScreen&&!this.visible)return void this.trigger("toggleControls",{autohide:!0});this.trigger(n)},
onShareClick:function(e){e.preventDefault(),g.a.trigger("show:modal",new L.a({model:this.metadataItem}))},onRecommendClick:function(e){e.preventDefault(),g.a.trigger("show:modal",new _.a({model:this.metadataItem}))},onErrorMessageClick:function(e){e.preventDefault(),this.errorSkipInterval?this.trigger("next"):g.a.trigger("hide:player")},onSkip:function(e,t){this.trigger("skip",t)},onRemove:function(e,t){this.trigger("remove",t)},onMove:function(e,t){this.trigger("move",e,t)}});t.a=N
},function(e,t,n){"use strict";var i=n(3048),a=n.n(i),r=n(856),s=r.a.extend({id:"player-primary-player-dropdown",tagName:"span",className:"dropdown",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(3049),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(106),h=n(300),p=n(250),f=u.a.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:a.a,modelEvents:{"change:transcodeServer":"render","change:qualityIndex":"render",
"change:media":"render"},events:{"click .dropdown-menu a":"onQualityClick"},serializeData:function(){var e=this.model.get("transcodeServer"),t=this.model.get("media"),i=h.a.prop("video"),a=i.lowestQualityIndex,r=d.a.getAvailableQualitiesFor(t,e,{lowestQualityIndex:a});if(!r.length||!this.model.get("canSetQuality"))return void this.model.set("showQuality",!1);this.model.set("showQuality",!0);var o=this.model.get("qualityIndex"),l=s.a.findWhere(r,{index:o
}),u=e.get("maxUploadBitrate"),c=n.i(p.a)(t),f=!(!c||!c.bitrate),g=!u||f&&u>c.bitrate;return l&&(l.selected=!0),{availableQualities:r.reverse(),hasSelectedQuality:!!l,includeOriginal:g}},onQualityClick:function(e){e.preventDefault();var t=l()(e.currentTarget);if(!t.hasClass("selected")){var i=d.a.getQualityAttribute(this.model.get("metadataItem")),a=parseInt(t.data("index"),10);n.i(c.a)("appModel").get("settings").save(i,a),this.model.set("qualityIndex",a)}}});t.a=f},function(e,t,n){"use strict"
;var i=n(3050),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(142),h=n(513),p=n(86),f=n(23),g=u.a.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:a.a,modelEvents:{"change:media":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=p.a.get(e.type);var t=this.streamType.typeString;this.capabilityAttr="audio"===t?"canSetAudioStream":"canSetSubtitleStream",
this.visibilityAttr="audio"===t?"showAudioStream":"showSubtitleStream",this.$el.attr("id",t+"-dropdown-list"),this.listenTo(this.model,"change:"+this.capabilityAttr,this.render),this.listenTo(this.model,"change:"+this.streamType.key,this.render)},serializeData:function(){var e=this.model.get("media"),t=this.streamType.typeString;if(!e||!this.model.get(this.capabilityAttr))return this.model.set(this.visibilityAttr,!1),{type:t}
;this.model.get(this.visibilityAttr)&&this.$el.hasClass("hidden")&&this.$el.removeClass("hidden");var i=n.i(d.a)(e,{streamType:this.streamType.id});if(i.length<2)return this.model.set(this.visibilityAttr,!1),{type:t};this.model.set(this.visibilityAttr,!0);var a,r=n.i(d.a)(e,{streamType:this.streamType.id,selected:!0});return r.length&&(a=r[0]),{type:t,streams:i,selectedStream:a}},onStreamClick:function(e){e.preventDefault();var t=c.a("appModel"),i=l()(e.currentTarget),a=i.data("id")
;if(t.has("primaryPlayer"))n.i(h.a)(this.model.get("media"),this.streamType,a),this.model.set(this.streamType.key,a);else{f.a.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),streamType:this.streamType,streamID:a}).done(s.a.bind(function(){this.model.set(this.streamType.key,a)},this))}}});t.a=g},function(e,t,n){"use strict";var i=n(2833),a=n.n(i),r=n(15),s=r.a.ItemView.extend({initialize:function(e){this.reason=e.reason},
template:a.a,className:"lyrics-error",serializeData:function(){return{reason:this.reason}}});t.a=s},function(e,t,n){"use strict";var i=n(2834),a=n.n(i),r=n(15),s=n(1930),o=r.a.CollectionView.extend({initialize:function(){this.collection=this.model.get("spans")},template:a.a,className:function(){return["lyrics-line",0===this.model.get("spans").length?"lyrics-line-blank":""].join(" ")},itemView:s.a});t.a=o},function(e,t,n){"use strict"
;var i=n(2835),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(1927),u=n(1096),c=(n.n(u),o.a.CollectionView.extend({initialize:function(){this.onPositionChange=s.a.throttle(this.onPositionChange,200),this.listenTo(this.collection.parent,"change:follow",this.onFollowChange)},template:a.a,className:"lyrics-lines dropup-scrollbar",itemView:l.a,modelEvents:{"change:position":"onPositionChange"},onlyAfterRender:["onPositionChange"],activateSpansAtPosition:function(e){if(this.collection.parent.get("timed")){
var t=void 0,n=this.shouldFollow();this.collection.eachSpan(function(i){var a=i.isPositionWithin(e);a&&!i.get("active")&&(t=i),i.set("active",n&&a)}),n&&this.scrollToSpan(t)}},scrollToSpan:function(e){if(e){var t=this.children.findByModel(e.parent);t&&t.$el.scrollIntoView({center:!0})}},scrollToActive:function(){if(this.shouldFollow()){var e=void 0;this.collection.eachSpan(function(t){t.get("active")&&(e=t)}),this.scrollToSpan(e)}},shouldFollow:function(){var e=this.collection.parent
;return e.get("timed")&&e.get("follow")},onRender:function(){var e=this;this.activateSpansAtPosition(this.model.get("position")),setTimeout(function(){return e.scrollToActive()})},onPositionChange:function(e,t){this.activateSpansAtPosition(t)},onFollowChange:function(e,t){t&&this.scrollToActive()}}));t.a=c},function(e,t,n){"use strict";var i=n(2836),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a,className:"lyrics-loading"});t.a=s},function(e,t,n){"use strict"
;var i=n(2837),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a,tagName:"span",className:function(){return["lyrics-span",this.model.get("active")?"highlight":""].join(" ")},modelEvents:{"change:active":"onActiveChange"},onActiveChange:function(e,t){this.$el.toggleClass("highlight",t)}});t.a=s},function(e,t,n){"use strict";var i=n(2838),a=n.n(i),r=n(15),s=r.a.ItemView.extend({template:a.a,tagName:"span",className:"lyrics-streams",ui:{prevLyricsBtn:".prev-lyrics-btn",
nextLyricsBtn:".next-lyrics-btn",timedBtn:".timed-btn",lyricsStreamsControls:".lyrics-controls",lyricsStreamsIndex:".lyrics-streams-index",lyricsStreamsLength:".lyrics-streams-length",lyricfindVendorLogo:".vendor-logo-lyricfind"},events:{"click .prev-lyrics-btn":"onPrevLyricsClick","click .next-lyrics-btn":"onNextLyricsClick","click .timed-btn":"onTimedClick"},modelEvents:{"change:metadataItem":"onMetadataItemChange"},collectionEvents:{"change:selected":"onSelectedChange",
"change:follow":"onFollowChange","change:timed":"onTimedChange"},onlyAfterRender:["renderControls","renderTimedBtn"],initialize:function(){this.collection&&this.listenTo(this.collection,"change:selected",this.onSelectedChange)},getSelectedLyricsIndex:function(){var e=this.collection.findWhere({selected:!0});return this.collection.indexOf(e)},renderControls:function(){var e=this.collection.findWhere({selected:!0}),t=this.collection.indexOf(e);this.ui.prevLyricsBtn.prop("disabled",0===t),
this.ui.nextLyricsBtn.prop("disabled",t===this.collection.length-1),this.ui.lyricsStreamsIndex.text(t+1),this.ui.lyricsStreamsLength.text(this.collection.length),e&&this.ui.lyricfindVendorLogo.toggleClass("hidden","com.plexapp.agents.lyricfind"!==e.get("provider")),this.renderTimedBtn()},renderTimedBtn:function(){var e=this.collection.findWhere({selected:!0}),t=e&&e.get("timed"),n=t&&e&&e.get("follow");this.ui.timedBtn.prop("disabled",!t).toggleClass("activated",!!n)},onRender:function(){
this.renderControls()},onMetadataItemChange:function(){this.renderControls()},onSelectedChange:function(e,t){t&&this.renderControls()},onFollowChange:function(){this.renderTimedBtn()},onPrevLyricsClick:function(){this.ui.prevLyricsBtn.isDisabled()||this.collection.at(this.getSelectedLyricsIndex()-1).set("selected",!0)},onNextLyricsClick:function(){this.ui.nextLyricsBtn.isDisabled()||this.collection.at(this.getSelectedLyricsIndex()+1).set("selected",!0)},onTimedChange:function(){
this.renderTimedBtn()},onTimedClick:function(){if(!this.ui.timedBtn.isDisabled()){var e=this.collection.findWhere({selected:!0});e.set("follow",!e.get("follow"))}}});t.a=s},function(e,t,n){"use strict";var i=n(2839),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(4),u=n(1931),c=n(1928),d=n(1926),h=n(1929),p=o.a.Layout.extend({template:a.a,ui:{lyricsLoading:".lyrics-loading"},regions:{streamsRegion:".lyrics-streams-region",lyricsRegion:".lyrics-region"},
onlyAfterRender:["renderLyrics","renderLyricsLines","renderLyricsError","renderLyricsLoading"],getLyricsStreams:function(){return this.model.get("playQueueItem").get("lyricsStreams")},populateLyricsStream:function(){var e=this,t=s.a.Deferred(),i=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection;i&&this.stopListening(i);var a=this.getLyricsStreams();if(!a)return t.reject(n.i(l.default)("No lyrics available.")).promise();var r=a.findWhere({selected:!0})||a.first()
;return this.populatingLyricsStream&&this.populatingLyricsStream!==r&&this.populatingLyricsStream.abortPendingPopulate(),r.populate().always(function(){r.set("selected",!0),e.listenTo(a,"change:selected",e.onLyricsSelectedChange)}).fail(function(){t.reject(n.i(l.default)("An error occurred loading these lyrics."))}).then(function(){return t.resolve(r)}),this.populatingLyricsStream=r,t.promise()},renderLyrics:function(){
var e=this,t=this.getLyricsStreams(),n=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection,i=t!==n,a=this.populateLyricsStream();"pending"===a.state()&&this.renderLyricsLoading(),a.done(function(t){e.renderLyricsLines(t)}),a.fail(function(t){e.renderLyricsError(t)}),i&&a.always(function(){e.getLyricsStreams()?e.streamsRegion.show(new u.a({model:e.model,collection:e.getLyricsStreams()})):e.streamsRegion.close()})},renderLyricsLines:function(e){var t=new c.a({
model:this.model,collection:e.get("lines")});this.lyricsRegion.show(t),t.scrollToActive()},renderLyricsError:function(e){this.lyricsRegion.show(new d.a({reason:e}))},renderLyricsLoading:function(){this.lyricsRegion.show(new h.a)},onRender:function(){this.renderLyrics()},onLyricsSelectedChange:function(e,t){t&&this.renderLyrics()},onItemChange:function(){this.close()}});t.a=p},function(e,t,n){"use strict";var i=n(43),a=n(1934),r=i.a.extend({tagName:"ul",
className:"tile-list media-tile-list playlist-tile-list",itemView:a.a,modelEvents:{"change:currentSort":"onListRefresh","change:currentType":"onListRefresh"},onListRefresh:function(){var e=this.model.get("items");e.get("playlists").reset(),e.fetch({scope:"page"})}});t.a=r},function(e,t,n){"use strict";var i=n(3051),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(4),d=n(12),h=n(247),p=n(23),f=n(406),g=n(405),m=n(865),v=u.a.ItemView.extend({tagName:"li",
className:"poster-item media-tile-list-item playlist-tile-list-item playlist",template:a.a,events:{"click .play-btn":"onPlayClick","click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","hide.bs.dropdown .playlist-actions-dropdown":"onDropdownHide"},ui:{composite:".media-poster",actions:".media-poster-actions",dropdown:".media-actions-dropdown"},bindings:{".playlist-title":{modelAttribute:"title"},".playlist-duration":{modelAttribute:"duration",modelListeners:["duration","leafCount"],
formatter:function(e){return e?n.i(h.a)(e):1===this.model.get("leafCount")?n.i(c.default)("1 Item"):n.i(c.default)("{1} Items",this.model.get("leafCount"))}}},initialize:function(){s.a.bindAll(this,"onResize"),this.compositeImage=new f.a({model:this.model,width:150}),d.a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){var e="#!/server/"+encodeURIComponent(this.model.server.id);return e+="/playlist/"+this.model.get("ratingKey"),{url:e,smart:this.model.get("smart")}},
onRender:function(){this.compositeImage.setElement(this.ui.composite)},onClose:function(){this.compositeImage.close(),d.a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),p.a.execute("playMedia",{item:this.model})},onEditClick:function(e){e.preventDefault(),d.a.trigger("show:modal",new m.a({model:this.model}))},onMoreClick:function(e){e.preventDefault(),
e.stopImmediatePropagation(),this.dropdown=new g.a({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=l()(e.currentTarget),n=this.ui.actions.position().top,i=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(i)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"))}});t.a=v},function(e,t,n){"use strict"
;var i=n(3052),a=n.n(i),r=n(15),s=n(13),o=n(12),l=n(108),u=n(1726),c=n(1740),d=n(1933),h=r.a.Layout.extend({className:"section-container",template:a.a,regions:{list:".playlists-container"},initialize:function(){(0,n.i(s.a)("appStore").dispatch)(n.i(l.a)({allowLightPreset:!1})),o.a.trigger("show:bar","actionbar",new u.a({model:this.model})),o.a.trigger("show:bar","breadcrumbbar",new c.a({model:this.model}))},onRender:function(){this.list.append(new d.a({model:this.model,
collection:this.model.get("items").get("playlists")}),this.$el)},onClose:function(){o.a.trigger("hide:bar","actionbar"),o.a.trigger("hide:bar","breadcrumbbar")}});t.a=h},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(67),d=n(62),h=n(119),p=n(202),f=n(230),g=n(231),m=n(2208),v=a()(p.a,{}),y=h.a.extend({mountReact:function(){
var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=this.options.selectedProviderID,r=this.options.params||{},s=r.key,h=r.record,p=n.i(d.a)(c.f,t),y=n.i(d.a)(c.e,i,p);o.a.render(a()(l.a,{store:e},void 0,v),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(f.a,{machineIdentifier:t},void 0,a()(g.a,{providerEntityID:y},void 0,a()(m.a,{machineIdentifier:t,serverEntityID:p,providerEntityID:y,metadataKey:s,record:1===parseInt(h,10)})))),this.ui.page[0])}});t.a=y},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(61),d=n(1299),h=n(67),p=n(62),f=n(119),g=n(202),m=n(230),v=n(231),y=n(597),b=a()(g.a,{}),S=f.a.extend({mountReact:function(){
var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=this.options.selectedProviderID,r=this.options.params||{},s=r.key,f=r.typeKey,g=r.type,S=r.filters,I=r.filterLabel,w=r.sort,M=r.folderKey,C=r.folderTitle,D=r.parentFolderKey,P=r.parentFolderTitle,T=r.limit,x=r.save,E=r.customFilter,A=n.i(p.a)(h.f,t),k=n.i(p.a)(h.e,i,A);o.a.render(a()(l.a,{store:e},void 0,b),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(m.a,{machineIdentifier:t},void 0,a()(v.a,{providerEntityID:k
},void 0,a()(y.a,{machineIdentifier:t,serverEntityID:A,providerEntityID:k,directoryKey:s,typeKey:f,activeType:g,activeFilters:n.i(d.a)(S),activeFilterLabel:I,activeSort:w,activeLimit:c.a.parseInteger(T),customFilter:c.a.parseBoolean(E),folderKey:M,folderTitle:C,parentFolderKey:D,parentFolderTitle:P,isTimeline:!1,shouldSaveRoute:c.a.parseBoolean(x)})))),this.ui.page[0])}});t.a=S},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),
n(48)),o=n.n(s),l=n(14),u=n(13),c=n(61),d=n(67),h=n(62),p=n(119),f=n(202),g=n(230),m=n(231),v=n(597),y=a()(f.a,{}),b=p.a.extend({mountReact:function(){var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=this.options.selectedProviderID,r=this.options.params||{},s=r.key,p=r.save,f=n.i(h.a)(d.f,t),b=n.i(h.a)(d.e,i,f);o.a.render(a()(l.a,{store:e},void 0,y),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(g.a,{machineIdentifier:t},void 0,a()(m.a,{providerEntityID:b
},void 0,a()(v.a,{machineIdentifier:t,serverEntityID:f,providerEntityID:b,directoryKey:s,isTimeline:!0,shouldSaveRoute:c.a.parseBoolean(p)})))),this.ui.page[0])}});t.a=b},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(1),s=(n.n(r),n(48)),o=n.n(s),l=n(14),u=n(13),c=n(119),d=n(202),h=n(230),p=n(231),f=n(2271),g=a()(d.a,{}),m=c.a.extend({mountReact:function(){var e=n.i(u.a)("appStore"),t=this.options.selectedServerID,i=this.options.params||{};o.a.render(a()(l.a,{store:e
},void 0,g),this.ui.sidebar[0]),o.a.render(a()(l.a,{store:e},void 0,a()(h.a,{machineIdentifier:t},void 0,a()(p.a,{},void 0,a()(f.a,{machineIdentifier:t,selectedViewType:i.view})))),this.ui.page[0])}});t.a=m},function(e,t,n){"use strict";function i(e){return c.a.map(e,function(e){return'<option value="'+e.value+'"'+(e.selected?" selected":"")+">"+e.label+"</option>"}).join("\n")}function a(e,t){return e.map(function(e){return{label:e.get("name"),value:e.get("identifier"),
selected:t===e.get("identifier")}})}function r(e,t){return e?e.get("languages").map(function(e){return{label:e.get("name"),value:e.id,selected:e.id===t}}):[]}var s=n(3061),o=n.n(s),l=n(15),u=n(2),c=n.n(u),d=n(141),h=n(395),p=n(828),f=l.a.ItemView.extend({template:o.a,ui:{agentSelect:"#match-search-agent",languageSelect:"#match-search-language"},events:{"change #match-search-agent":"onAgentSelectChange"},onlyAfterRender:["updateAgents","updateLanguages"],initialize:function(){
var e=n.i(d.a)(this.model),t=e.get("agent"),i=this.setupAgents(t);i.then(c.a.bind(this.updateAgents,this,t)),i.then(c.a.bind(this.updateLanguages,this,t))},serializeData:function(){var e=n.i(d.a)(this.model),t=e.get("agent"),i=this.model.agentsProxy.findWhere({identifier:t});return{item:this.model.toJSON(),agents:a(this.model.agentsProxy,t),languages:r(i)}},setupAgents:function(e){if(this.model.agentsPromise)return this.model.agentsPromise
;var t=n.i(d.a)(this.model),i=t.getSectionType(),a=new h.a([],{server:this.model.server,mediaTypeID:i.typeID}),r=i.exclusiveAgents,s=new p.a(a,r,e);return this.model.agents=a,this.model.agentsProxy=s,this.model.agentsPromise=this.model.agents.populate({reset:!0,cancelable:!0}),this.model.agentsPromise},updateAgents:function(e){this.ui.agentSelect.html(i(a(this.model.agentsProxy,e)))},updateLanguages:function(e){var t=this.model.agentsProxy.findWhere({identifier:e})
;if(!e)return void this.ui.languageSelect.empty();var a=n.i(d.a)(this.model),s=a.get("language");this.ui.languageSelect.html(i(r(t,s)))},onAgentSelectChange:function(e){this.updateLanguages(e.currentTarget.value)},onModalClose:function(){this.model.agents=null,this.model.agentsProxy=null,this.model.agentsPromise=null}});t.a=f},function(e,t,n){"use strict";var i=n(3062),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(141),u=n(814),c=n(1822),d=o.a.Layout.extend({template:a.a,regions:{
resultRegion:".result-region"},onlyAfterRender:["updateResults"],initialize:function(){this.setupResults();var e=n.i(l.a)(this.model),t={manual:1},i={reset:!0,timeout:0,data:t};/com\.plexapp\.agents\.none\:\/\//.test(this.model.get("guid"))&&s.a.extend(i,{data:s.a.extend(t,{agent:e.get("agent"),language:e.get("language")}),processData:!0}),this.model.results.populate(i).then(s.a.bind(this.updateResults,this))},setupResults:function(){if(!this.model.results){
var e=this.model.results||new u.default([],{server:this.model.server,parent:this.model});this.model.results=e}},updateResults:function(){this.resultRegion.show(new c.a({collection:this.model.results,itemViewOptions:{item:this.model}}))},onModalClose:function(){this.model.results=null}});t.a=d},function(e,t,n){"use strict";var i=n(3063),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(1856),d=u.a.Layout.extend({className:"devices-container row",template:a.a,regions:{
list:".device-list-container"},events:{"click .nav a":"onDeviceTypeClick"},ui:{filters:".nav a"},deviceTypes:[{id:"all",title:"All",ids:["all"]},{id:"web",title:"Web",ids:["Web Client","Plex Web"]},{id:"pht",title:"Home Theater",ids:["Plex Home Theater","Plex for Home Theater","PlexHomeTheater","Plex Media Center"]},{id:"pmp",title:"Media Player",ids:["Plex Media Player"]},{id:"pms",title:"Server",ids:["Plex Media Server","Plex Cloud Server"]},{id:"android",title:"Android",
ids:["Plex for Android","Android"]},{id:"ios",title:"iOS",ids:["Plex/iOS","Plex for iOS"]},{id:"samsung",title:"Samsung",ids:["Plex for Samsung"]},{id:"google-tv",title:"Google TV",ids:["Google TV"]},{id:"windows",title:"Windows",ids:["Plex for Windows"]},{id:"apple-tv",title:"Apple TV",ids:["Plex-ATV","Plex for Apple TV"]},{id:"windows-phone",title:"Windows Phone",ids:["Plex for Windows Phone"]},{id:"plexbmc",title:"PleXBMC",ids:["PleXBMC"]},{id:"cloud-sync",title:"Cloud Sync",
ids:["Cloud Sync"]},{id:"roku",title:"Roku",ids:["Plex for Roku"]},{id:"popcorn-hour",title:"Popcorn Hour",ids:["Plex for Popcorn Hour"]},{id:"xbox",title:"Xbox",ids:["Plex for Xbox One","Plex for Xbox 360"]},{id:"other",title:"Other",ids:[]}],initialize:function(){this.products=this.collection.products(),this.addOtherIds()},serializeData:function(){return{deviceTypes:this.getFilteredDeviceTypes()}},sortDeviceTypes:function(e){return s.a.sortBy(e,function(e){
return"all"===e.id?"":e.title.toLowerCase()})},getFilteredDeviceTypes:function(){var e=this.deviceTypes.filter(function(e){return"all"===e.id||s.a.intersection(this.products,e.ids).length>0},this);return this.sortDeviceTypes(e)},addOtherIds:function(){var e=s.a.flatten(s.a.map(this.deviceTypes,function(e){return e.ids})),t=s.a.difference(this.products,e),n=s.a.find(this.deviceTypes,function(e){return"other"===e.id});s.a.each(t,function(e){n.ids.push(e)})},onRender:function(){
this.list.show(new c.a({collection:this.collection}))},onDeviceTypeClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("id"),i=this.collection;if(this.ui.filters.removeClass("selected"),t.addClass("selected"),"all"!==n){var a=s.a.findWhere(this.deviceTypes,{id:n});i=this.collection.filterByProducts(a.ids)}this.list.show(new c.a({collection:i}))}});t.a=d},function(e,t,n){"use strict";var i=n(3065),a=n.n(i),r=n(13),s=n(874),o=n(864),l=n(1862),u=s.a.extend({template:a.a,
initialize:function(){var e=r.a("appModel"),t=e.get("user");this.collection=t.get("homeUsers"),this.invites=t.get("desktop").get("invites").filterByHome(),this.sentInvites=t.get("desktop").get("sentInvites").filterByHome(),this.signedInHomeUser=this.collection.get(t.id),this.itemViewOptions={isAdmin:!(!this.signedInHomeUser||!this.signedInHomeUser.get("admin"))},this.addListeners()},addListeners:function(){s.a.prototype.addListeners.apply(this,arguments),
this.signedInHomeUser&&this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange)},onRender:function(){this.friendList.show(new l.a({collection:this.collection,itemViewOptions:this.itemViewOptions})),this.inviteList.show(new o.a({collection:this.invites})),this.pendingList.show(new o.a({collection:this.sentInvites})),this.updateHeaders()},onAdminChange:function(e,t){this.friendList.currentView&&(this.itemViewOptions.isAdmin=t)}});t.a=u},function(e,t,n){"use strict"
;var i=n(3066),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(13),u=n(12),c=n(108),d=n(1946),h=n(1960),p=n(1945),f=n(1942),g={web:d.a,server:h.a,users:p.a,devices:f.a},m=o.a.Layout.extend({className:"container",template:a.a,ui:{webNavItem:".web-nav-item",serverNavItem:".server-nav-item",usersNavItem:".users-nav-item",devicesNavItem:".devices-nav-item",usersBadge:".users-btn > .badge"},regions:{container:".settings-container"},onlyAfterRender:["onSignedInChange","onPrimaryServerChange"],
initialize:function(e){this.options=e,this.subset=e.subset||"web";var t=n.i(l.a)("appModel"),i=t.get("user"),a=i.get("desktop").get("invites");(0,n.i(l.a)("appStore").dispatch)(n.i(c.a)({allowLightPreset:!1})),this.subsets={users:a},this.listenTo(i,"change:signedIn",this.onSignedInChange),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(a,"reset add remove",this.onInvitesChange),this.listenTo(u.a,"change:language",this.render)},serializeData:function(){
var e=n.i(l.a)("appModel"),t=e.get("user"),i=e.get("primaryServer");return{subset:this.subset,signedIn:t.get("signedIn"),hasPrimaryServer:i&&!i.get("shared")}},updateBadges:function(){var e={users:this.subsets.users.length};s.a.each(s.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},onRender:function(){var e=g[this.subset];this.container.show(new e(this.options)),this.updateBadges()},onSignedInChange:function(e,t){
this.ui.usersNavItem.toggleClass("hidden",!t),this.ui.devicesNavItem.toggleClass("hidden",!t)},onPrimaryServerChange:function(e,t){var n=t&&!t.get("shared");this.ui.serverNavItem.toggleClass("hidden",!n)},onInvitesChange:function(){this.updateBadges()}});t.a=m},function(e,t,n){"use strict";var i=n(3067),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(4),h=n(12),p=n(28),f=n(23),g=n(1943),m=n(874),v=n(267),y=n(338),b={home:g.a,friends:m.a},S=u.a.Layout.extend({
className:"users-container",template:a.a,ui:{navLinks:".nav-cards a",homeBadge:".home-card > .badge",friendsBadge:".friends-card > .badge",leaveHomeBtn:".leave-home-btn",enableGuestBtn:".enable-guest-btn",disableGuestBtn:".disable-guest-btn",userActions:".user-actions"},regions:{container:".users-row"},events:{"click .nav-cards a":"onNavClick","click .add-user-btn":"onAddUserClick","click .leave-home-btn":"onLeaveHomeClick","click .invite-friend-btn":"onInviteFriendClick",
"click .enable-guest-btn":"onEnableGuestClick","click .disable-guest-btn":"onDisableGuestClick"},shouldShowUserActions:function(){var e=!!this.user.get("subscription").get("features").get("home");return this.signedInHomeUser.get("admin")&&e},shouldShowLeaveHome:function(){return this.home.length>1&&!this.signedInHomeUser.get("restricted")},shouldShowFriends:function(){return!this.signedInHomeUser.get("restricted")},shouldShowEnableGuest:function(){
return!(this.homeDetails&&this.homeDetails.get("guestEnabled"))},initialize:function(e){var t=c.a("appModel");this.subset=e.usersSubset,this.user=t.get("user"),this.home=this.user.get("homeUsers"),this.invites=this.user.get("desktop").get("invites"),this.signedInHomeUser=this.home.get(this.user.id),this.homeDetails=this.user.get("homeDetails"),this.proxies={home:this.invites.filterByHome(),friends:this.invites.filterByFriends()},e.promptPIN&&h.a.trigger("show:modal",new y.a({
model:this.signedInHomeUser,isEditing:!0,isEditWarning:!this.signedInHomeUser.get("protected")})),this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange),this.listenTo(this.home,"reset add remove",this.onHomeChange),this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.homeDetails,"change",this.onHomeDetailsChange)},serializeData:function(){return{subset:this.subset,showUserActions:this.shouldShowUserActions(),
showLeaveHome:this.shouldShowLeaveHome(),showFriends:this.shouldShowFriends(),showEnableGuest:this.shouldShowEnableGuest(),showDisableGuest:!this.shouldShowEnableGuest()}},showSubset:function(e){e&&(this.$el.removeClass("show-"+this.subset),this.subset=e),this.$el.addClass("show-"+this.subset);var t=b[this.subset];t?this.container.append(new t):p.a.warn("Invalid subset: "+this.subset)},updateBadges:function(){var e={home:this.proxies.home.length,friends:this.proxies.friends.length}
;s.a.each(s.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},toggleGuestAccount:function(e,t){e.preventDefault(),f.a.execute("toggleGuest",{user:this.user,enable:t})},onRender:function(){this.showSubset(),this.updateBadges()},onClose:function(){s.a.each(this.proxies,function(e){e.destroy()})},onAdminChange:function(){this.ui.userActions.toggleClass("hidden",!this.shouldShowUserActions())},onHomeChange:function(){
this.ui.leaveHomeBtn.toggleClass("hidden",!this.shouldShowLeaveHome())},onInvitesChange:function(){this.updateBadges()},onHomeDetailsChange:function(){this.ui.enableGuestBtn.toggleClass("hidden",!this.shouldShowEnableGuest()),this.ui.disableGuestBtn.toggleClass("hidden",this.shouldShowEnableGuest())},onNavClick:function(e){e.preventDefault();var t=l()(e.currentTarget);t.hasClass("selected")||(this.ui.navLinks.removeClass("selected"),t.addClass("selected"),
this.showSubset(s.a.last(e.currentTarget.href.split("/"))),h.a.trigger("navigate","users",{subset:this.subset,trigger:!1}))},onAddUserClick:function(e){e.preventDefault();var t=this.user.get("maxHomeSize");t&&this.home.length-1<t?h.a.trigger("show:modal",new v.a({type:"home"})):h.a.trigger("show:alert",{type:"error",message:n.i(d.default)("You have reached the {1} person home limit.",t)})},onLeaveHomeClick:function(e){e.preventDefault(),f.a.execute("removeHomeUser",{
homeUser:this.signedInHomeUser,isSignedInUser:!0})},onInviteFriendClick:function(e){e.preventDefault(),h.a.trigger("show:modal",new v.a({type:"friend"}))},onEnableGuestClick:function(e){this.toggleGuestAccount(e,!0)},onDisableGuestClick:function(e){this.toggleGuestAccount(e,!1)}});t.a=S},function(e,t,n){"use strict"
;var i=n(3068),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(4),h=n(12),p=n(66),f=n(757),g=n(106),m=n(733),v=n(310),y=n(309),b=n(735),S=n(380),I=n(362),w=n(56),M=n(471),C=n(849),D=n(1707),P=n(867),T=[{value:0,title:"None"},{value:1,title:"1"},{value:2,title:"2"},{value:3,title:"3"},{value:4,title:"4"},{value:5,title:"5"}],x=u.a.ItemView.extend({className:"web-settings-container",template:a.a,ui:{chromecastCustomGroup:"#chromecast-custom-group",submitBtn:".submit-btn",
message:".form-message"},events:{"click .toggle-advanced-btn":"onToggleAdvancedClick","click .settings-nav a":"onSettingsGroupClick","click .keyboard-shortcuts-btn":"onKeyboardShortcutsClick","change #chromecastAppID":"onChromecastAppIDChange","change input[id]":"onInputChange","input input[type=text]":"onInputChange","change select[id]":"onInputChange","submit #web-settings-form":"onSubmit"},onlyAfterRender:["saveChanges"],initialize:function(){this.changes={}
;var e=n.i(c.a)("appModel"),t=e.get("settings"),i=e.get("user");this.listenTo(i,"change:signedIn",this.onSignedInChange),this.listenTo(e,"change:primaryServer",this.render),this.listenTo(h.a,"shortcut:save",this.saveChanges);var a=t.get("showAdvancedSettings");this.$el.toggleClass("show-advanced",a)},serializeData:function(){var e=[],t=[{value:"h:mma",title:n.i(d.default)("12 Hour")},{value:"HH:mm",title:n.i(d.default)("24 Hour")
}],i=this.model.toJSON(),a=n.i(c.a)("appModel"),r=a.get("experienceSettings").toJSON(),o=a.get("user"),l=o.hasPlexPass(),u=o.hasHome(),h=o.isNinja();return s.a.each(s.a.keys(I.a.getLanguages()),function(t){e.push({value:t,title:n.i(f.a)(t)})}),{settings:i,experienceSettings:r,hasPlexPass:l,hasHome:u,isNinja:h,isPMPDesktop:n.i(S.a)(),showExperimentalPlayer:p.a.hasMediaSource&&w.a.get("allowFlash"),version:"3.9.1",languages:e,debugLevels:m.a.settings,subtitlesBurnLevels:v.a.settings,
chromecastAppIDs:C.a.settings,availableQualities:g.a.getAvailableQualities().reverse(),subtitleSizes:b.a.settings,audioBoostLevels:D.a.settings,httpFallbackOptions:y.a.settings,extrasPrefixCounts:T,timeFormats:t}},saveChanges:function(){var e=this.ui.submitBtn,t=this.ui.message;if(!e.isDisabled()){e.addClass("active");var i=!!this.changes.language,a=n.i(c.a)("appModel"),r=a.get("experienceSettings"),o=l.a.when(this.model.save(this.changes),this.saveAbstractSettings(r))
;o.done(s.a.bind(function(){this.changes={},i||(e.addClass("disabled"),t.text(n.i(d.default)("Your changes have been saved.")))},this)),o.fail(s.a.bind(function(){t.text(n.i(d.default)("Your changes could not be saved."))},this)),o.always(s.a.bind(function(){i||e.removeClass("active")},this))}},saveAbstractSettings:function(e){var t=s.a.reduce(this.changes,function(t,n,i){return e.hasAttr(i)&&(t[i]=n),t},{});return s.a.isEmpty(t)?l.a.Deferred().resolve().promise():e.save(t)},
onSignedInChange:function(e,t){null!=t&&this.render()},onToggleAdvancedClick:function(e){e.preventDefault();var t=this.$el.hasClass("show-advanced");t&&this.$(".advanced-setting > .selected").length&&this.$(".nav a:first").click();var i=n.i(c.a)("appModel").get("settings");this.$el.toggleClass("show-advanced",!t),i.save("showAdvancedSettings",!t)},onSettingsGroupClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.attr("href");this.$(".settings-group").removeClass("active"),
this.$(n).addClass("active"),this.$(".nav a").removeClass("selected"),t.addClass("selected")},onKeyboardShortcutsClick:function(e){e.preventDefault(),h.a.trigger("show:modal",new P.a({shortcuts:M.a.prop("shortcuts")}))},onChromecastAppIDChange:function(e){var t=e.currentTarget.value===C.a.CUSTOM;this.ui.chromecastCustomGroup.toggleClass("hidden",!t)},onInputChange:function(e){var t=l()(e.currentTarget),n=e.currentTarget,i=n.value;"checkbox"===n.type&&(i=t.prop("checked")),
"int"===t.data("type")&&(i=parseInt(i,10)),this.changes[n.id]=i,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},onSubmit:function(e){e.preventDefault(),this.saveChanges()}});t.a=x},function(e,t,n){"use strict";var i=n(3069),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(34),d=n(395),h=n(1852),p=n(1854),f=u.a.Layout.extend({template:a.a,ui:{agentLabel:".agent-label",typeNavItems:".agent-types-nav li",agentNavItems:".agents-nav li"},regions:{
agentsList:".agents-list-container",contributorsList:".contributors-list-container"},events:{"click .agent-types-nav a":"onAgentTypeClick","click .agents-nav a":"onAgentClick"},initialize:function(){this.bindAllWhenRendered("onAgentsReset","onContributorsReset"),this.agentTypes=[],this.agentTypes.push(n.i(c.b)(c.d)),this.agentTypes.push(n.i(c.b)(c.e)),this.agentTypes.push(n.i(c.b)(c.f)),this.agentTypes.push(n.i(c.b)(c.m)),this.agentTypes.push(n.i(c.b)(c.g)),
this.currentType=s.a.first(this.agentTypes),this.populateAgents()},serializeData:function(){return{currentType:this.currentType,agentTypes:this.agentTypes}},populateAgents:function(){this.agents=new d.a([],{server:this.model,mediaTypeID:this.currentType.id}),this.agents.populate({reset:!0,scope:"page"}).done(s.a.bind(this.onAgentsReset,this))},selectAgent:function(e){this.currentAgent&&this.currentAgent.set("selected",!1),this.currentAgent=e,e.set("selected",!0),
this.ui.agentLabel.text(e.get("name")),this.additionalAgents=new d.a([],{server:this.model,mediaTypeID:this.currentType.id,relatedAgentID:e.id}),this.contributors=new d.a([],{server:this.model,mediaTypeID:this.currentType.id,primaryAgentID:e.id}),this.contributorsList.show(new p.a({collection:this.contributors})),this.listenTo(this.contributorsList.currentView,"save",this.onContributorsSave),this.populateContributors()},populateContributors:function(){var e=[]
;e.push(this.additionalAgents.populate({reset:!0,scope:"page"})),e.push(this.contributors.populate({reset:!0,scope:"page"})),l.a.when.apply(l.a,e).done(s.a.bind(this.onContributorsReset,this))},onAgentsReset:function(){if(this.agentsList.show(new h.a({collection:this.agents})),this.agents.length){var e=this.agents.findWhere({selected:!0})||this.agents.first();this.selectAgent(e)}},onContributorsReset:function(){var e=s.a.bind(function(e){return e.id===this.currentAgent.id?(e.set("isPrimary",!0),
!0):!!this.contributors.get(e.id)},this);this.contributors.reset(this.additionalAgents.filter(e))},onAgentTypeClick:function(e){e.preventDefault();var t=l()(e.currentTarget),i=t.data("type");this.currentType=n.i(c.b)(i),this.populateAgents(),this.ui.typeNavItems.removeClass("active"),t.parent("li").addClass("active")},onAgentClick:function(e){e.preventDefault();var t=l()(e.target),n=t.data("identifier"),i=this.agents.get(n);i&&this.selectAgent(i)},onContributorsSave:function(e){
this.currentAgent.url="system/agents/"+this.currentAgent.id+"/config/"+this.currentType.id,this.currentAgent.save({order:e}).done(s.a.bind(function(){this.additionalAgents.fetch({silent:!0}),this.contributors.fetch({silent:!0})},this))}});t.a=f},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(226),s=r.a.extend({prefix:"channel.",serializeData:function(){var e=r.a.prototype.serializeData.apply(this,arguments),t=this.options.channelSettings.toJSON();return a.a.each(t,function(e){
e.id=this.prefix+e.id},this),e.unshift.apply(e,t),e},updateModel:function(e,t){var n=r.a.prototype.updateModel.apply(this,arguments);if(n)return n;var i=e.replace(this.prefix,""),a=this.options.channelSettings.get(i);return a?a.set("value",t):void 0}});t.a=s},function(e,t,n){"use strict";var i=n(3070),a=n.n(i),r=n(2),s=n.n(r),o=n(4),l=n(226),u=n(1956),c=n(1957),d=l.a.extend({template:a.a,regions:{signIn:".sign-in-region",update:".update-region"},serializeData:function(){
var e=l.a.prototype.serializeData.apply(this,arguments),t=s.a.findWhere(e,{id:"FriendlyName"});return t&&(t.placeholder=this.model.get("friendlyName")),e},bindings:{".version":{modelAttribute:"shortVersion",formatter:function(e){return n.i(o.default)("Version {1}",e)}}},onRender:function(){l.a.prototype.onRender.apply(this,arguments),this.signIn.show(new u.a({model:this.model.get("desktop").get("cloudAccount"),collection:this.collection})),this.model.get("updater")&&this.update.show(new c.a({
model:this.model.get("desktop").get("update"),collection:this.collection}))}});t.a=d},function(e,t,n){"use strict";var i=n(3071),a=n.n(i),r=n(226),s=r.a.extend({template:a.a,serializeData:function(){var e=this.model,t=e.get("diagnostics"),n=t&&t.indexOf("logs")!==-1,i=t&&t.indexOf("databases")!==-1;return{showDownloadLogs:n,showDownloadDatabases:i,showDownloadLogsOrDatabases:n||i,downloadLogsUrl:e.resolveUrl("/diagnostics/logs",{appendToken:!0}),
downloadDatabasesUrl:e.resolveUrl("/diagnostics/databases",{appendToken:!0}),defaultLinkTarget:"_self"}}});t.a=s},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(4),s=n(317),o=n(226),l=o.a.extend({prefix:"account.",serializeData:function(){var e=this.options.account,t=[],i=a.a.map(s.a,function(e,t){return{value:t,label:e}});return t.push({id:this.prefix+"autoSelectAudio",label:n.i(r.default)("Automatically select audio and subtitle tracks"),
summary:n.i(r.default)("Automatically select audio and subtitle tracks in your preferred language when possible."),default:!1,value:e.get("autoSelectAudio"),type:"bool",group:"account.language",advanced:!1,hidden:!1}),t.push({id:this.prefix+"defaultAudioLanguage",label:n.i(r.default)("Prefer audio tracks in"),default:"en",value:e.get("defaultAudioLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:i}),t.push({id:this.prefix+"subtitleMode",
label:n.i(r.default)("Subtitle mode"),default:1,value:parseInt(e.get("subtitleMode"),10),type:"int",group:"account.language",advanced:!1,hidden:!1,enumValues:[{value:0,label:n.i(r.default)("Manually selected")},{value:1,label:n.i(r.default)("Shown with foreign audio")},{value:2,label:n.i(r.default)("Always enabled")}]}),t.push({id:this.prefix+"defaultSubtitleLanguage",label:n.i(r.default)("Prefer subtitles in"),default:"en",value:e.get("defaultSubtitleLanguage"),type:"text",
group:"account.language",advanced:!1,hidden:!1,enumValues:i}),t},updateModel:function(e,t){var n=o.a.prototype.updateModel.apply(this,arguments);if(n)return n;var i=e.replace(this.prefix,""),a=this.options.account;return a.has(i)?a.set(i,t):void 0}});t.a=l},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(3072),s=n.n(r),o=n(15),l=n(1),u=(n.n(l),n(48)),c=n.n(u),d=n(14),h=n(13),p=n(2006),f=a()(p.a,{}),g=o.a.ItemView.extend({className:"livetv-epg-settings",template:s.a,mountReact:function(){
var e=n.i(h.a)("appStore");c.a.render(a()(d.a,{store:e},void 0,f),this.el)},unmountReact:function(){this.isRendered&&c.a.unmountComponentAtNode(this.el)},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.a=g},function(e,t,n){"use strict";var i=n(15),a=n(1954),r=i.a.CollectionView.extend({tagName:"ul",className:"nav nav-cards",itemView:a.a,selectGroup:function(e){this.selectedView&&this.selectedView.deselect()
;var t=this.collection.get(e);t&&(this.selectedView=this.children.findByModel(t),this.selectedView.select())},showDecorator:function(e,t){var n=this.collection.get(e);if(n){this.children.findByModel(n).showDecorator(t)}}});t.a=r},function(e,t,n){"use strict";var i=n(3073),a=n.n(i),r=n(15),s=r.a.ItemView.extend({tagName:"li",className:"server-settings-nav-list-item",template:a.a,ui:{card:".card"},events:{"click .card":"onClick"},select:function(){this.ui.card.addClass("selected")},
deselect:function(){this.ui.card.removeClass("selected")},showDecorator:function(e){this.currentStatus&&this.$el.removeClass(this.currentStatus),this.currentStatus=e,this.$el.addClass(e)},onClick:function(e){e.preventDefault(),this.ui.card.hasClass("selected")||this.trigger("change:pane",this.model.id)}});t.a=s},function(e,t,n){"use strict";var i=n(3075),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(23),c=n(226),d=c.a.extend({className:"remote-access-container",template:a.a,ui:{
manualPortMappingMode:"#ManualPortMappingMode",manualPortMappingPort:"#ManualPortMappingPort",wanTotalMaxUploadRate:"#WanTotalMaxUploadRate",uploadContainer:".remote-access-upload-container",submitBtn:".submit-btn",message:".form-message"},events:{"change .remote-access-error-container input[id]":"onErrorInputChange","click .sign-in-link":"onSignInClick","click .remote-access-enable-btn":"onEnableClick","click .retry-btn":"onRetryClick","click .remote-access-disable-btn":"onDisableClick",
"change input[name=WanTotalMaxUploadRate]":"onTotalRateChange","keyup input[name=WanTotalMaxUploadRate]":"onTotalRateChange","change select[name=WanPerStreamMaxUploadRate]":"onPerStreamRateChange","submit #remote-access-upload-form":"onUploadFormSubmit"},initialize:function(e){this.cloudAccount=e.cloudAccount,this.changes=e.changes,this.listenTo(this.cloudAccount,{"change:signInState":this.render,"change:remoteAccessState":this.render})},serializeData:function(){
var e=this.collection.get("PublishServerOnPlexOnlineKey"),t=this.collection.get("ManualPortMappingMode"),n=this.collection.get("ManualPortMappingPort"),i=this.collection.get("WanTotalMaxUploadRate"),a=this.collection.get("WanPerStreamMaxUploadRate"),r=this.cloudAccount.toJSON(),s=!e.get("value"),o=!r.signedIn,l=s||o,u={forceAdvanced:!s&&!!r.mappingError,isDisabled:s,isSignedOut:o,isUnavailable:l,canEditPort:!l&&t&&t.get("value"),hasPrivateAddress:!(!r.privateAddress||!r.privatePort),
hasPublicAddress:!(!r.publicAddress||!r.publicPort),cloudAccount:r,hasMappingSettings:!(!t||!n),hasUploadLimitSettings:!(!i||!a),mappingModeSetting:t?t.toJSON():null,mappingPortSetting:n?n.toJSON():null,uploadSettings:[]};return i&&(u.totalRateSettingID=i.id,u.totalRateSettingValue=i.get("value")/1e3),a&&u.uploadSettings.push(a.toJSON()),u},enable:function(){},enableUploadForm:function(){this.isDisabled=!1,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},
updateUploadSetting:function(e,t){if(e){this.updateModel(e,t)&&(this.changes[e]=t,this.enable())}},connect:function(){return u.a.execute("connectServer",{cloudAccount:this.cloudAccount,value:!0})},disconnect:function(){return u.a.execute("connectServer",{cloudAccount:this.cloudAccount,value:!1})},reconnect:function(){return u.a.execute("reconnectServer",{cloudAccount:this.cloudAccount})},saveChanges:function(){if(s.a.isEmpty(this.changes))return l.a.Deferred().resolve().promise()
;var e=this.collection.first().save(this.changes);return e.done(s.a.bind(function(){this.changes={}},this)),e},onErrorInputChange:function(e){c.a.prototype.onInputChange.apply(this,arguments),this.ui.manualPortMappingPort.prop("disabled",!this.ui.manualPortMappingMode.prop("checked"))},onSignInClick:function(e){e.preventDefault(),this.trigger("change:pane","general")},onEnableClick:function(e){e.preventDefault(),this.connect()},onDisableClick:function(e){e.preventDefault(),this.disconnect()},
onRetryClick:function(e){e.preventDefault(),this.cloudAccount.set("remoteAccessState","connecting"),this.saveChanges().always(s.a.bind(this.reconnect,this))},onTotalRateChange:function(e){var t=e.currentTarget,n=parseFloat(t.value,10),i=s.a.isNaN(n)?0:Math.max(n,0);this.updateUploadSetting(t.name,1e3*i),this.enableUploadForm()},onPerStreamRateChange:function(e){var t=e.currentTarget;this.updateUploadSetting(t.name,t.value),this.enableUploadForm()},onUploadFormSubmit:function(e){
e.preventDefault(),this.trigger("save");var t=this.collection.get("WanTotalMaxUploadRate").get("value"),n=!t;this.ui.wanTotalMaxUploadRate.val(t/1e3),this.ui.uploadContainer.toggleClass("show-warning",n)}});t.a=d},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3076),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(15),h=(n(4),n(12),n(13)),p=n(23),f=n(164),g=(n(42),d.a.ItemView.extend({className:"server-account-container",template:s.a,ui:{poster:".server-account-poster",
signInBtn:".server-sign-in-btn",signOutBtn:".server-sign-out-btn",claimBtn:".server-claim-btn",username:"input[name=username]",password:"input[name=password]"},events:{"submit #server-sign-in-form":"onSubmit","click .server-claim-btn":"onClaimClick","click .server-sign-out-btn":"onSignOutClick"},modelEvents:{"change:signedIn":"updateSignInState","change:username":"updateUserImage"},initialize:function(){var e=h.a("appModel");this.user=e.get("user"),this.image=new f.a({type:"friend",width:60}),
this.listenTo(this.user,"change:isSignedIn",function(){this.isSigningIn||this.render()}),this.isSigningIn=!1,this.claimServerFailed=!1},serializeData:function(){return{showClaimMessage:!this.claimServerFailed&&this.model.server.supports("claimServer")&&this.user.get("isSignedIn"),showSignOut:!this.model.server.get("isPersonalCloudServer")}},updateSignInState:function(){this.$el.toggleClass("signed-in",this.model.get("signedIn"))},updateUserImage:function(){var e=this.model.get("username")
;e===this.user.get("username")||e===this.user.get("email")?this.image.setModel(this.user):(this.image.setModel(null),this.image.url=null),this.image.render()},signInServer:function(e){var t=a()({cloudAccount:this.model},e),n=p.a.execute("signInServer",t);return n.done(l.a.bind(function(){this.model.fetch()},this)),n},signInUser:function(e){return this.user.get("isSignedIn")?c.a.Deferred().resolve().promise():p.a.execute("signIn",{username:e.username,password:e.password})},signOut:function(){
var e=this,t=void 0;return t=c.a.Deferred().resolve().promise(),t=t.then(function(){return e.ui.username.val(""),e.ui.password.val(""),p.a.execute("signOutServer",{cloudAccount:e.model})})},bindings:{".server-account-username":{modelAttribute:"username"}},onRender:function(){this.image.setElement(this.ui.poster),this.updateSignInState(),this.updateUserImage()},onClose:function(){this.image.close()},onSubmit:function(e){if(e.preventDefault(),!this.ui.signInBtn.isDisabled()){this.isSigningIn=!0,
this.ui.signInBtn.addClass("active");var t={username:e.target.username.value,password:e.target.password.value},n=this.signInUser(t);n=n.then(l.a.bind(function(){return this.signInServer(t)},this)),n.done(l.a.bind(function(){this.model.server.fetch()},this)),n.always(this.whenRendered(function(){this.isSigningIn=!1,this.ui.signInBtn.removeClass("active")},this))}},onSignOutClick:function(e){if(e.preventDefault(),!this.ui.signOutBtn.isDisabled()){this.ui.signOutBtn.addClass("active")
;var t=this.signOut();t.done(l.a.bind(function(){this.model.fetch(),this.model.server.fetch()},this)),t.always(this.whenRendered(function(){this.ui.signOutBtn.removeClass("active")}))}},onClaimClick:function(e){e.preventDefault(),this.ui.claimBtn.addClass("active");var t=h.a("metrics"),n=this.signInServer({claim:!0});n.done(function(){t.trackEvent({event:"client:claimServer",interaction:!0})}),n.fail(this.whenRendered(function(){t.trackEvent({event:"client:claimServerFailure",interaction:!1}),
this.claimServerFailed=!0,this.render()})),n.always(this.whenRendered(function(){this.ui.claimBtn.removeClass("active")}))}}));t.a=g},function(e,t,n){"use strict";var i=n(5),a=n.n(i),r=n(3077),s=n.n(r),o=n(2),l=n.n(o),u=n(15),c=n(13),d=n(4),h=n(12),p=n(23),f=n(1879),g=u.a.ItemView.extend({tagName:"span",className:"check-for-updates-container",template:s.a,ui:{checkForUpdatesBtn:".check-for-updates-btn",downloadUpdatesContainer:".downloading-updates-container",
downloadProgressContainer:".downloading-progress-container",downloadProgressLabel:".downloading-progress-label",updateProgressLabel:".downloading-updates-label",updateErrorMessage:".update-error-message",installManualLink:".install-manual-link"},modelEvents:{"change:state":"onStateChange","change:progress":"onProgressChange"},events:{"click .check-for-updates-btn":"onCheckForUpdatesClick","click .available-updates-btn":"onDownloadUpdatesClick",
"click .install-updates-btn":"onInstallUpdatesClick","click .release-notes-btn":"onInfoClick"},initialize:function(){this.model.fetch().then(this.whenRendered(function(){var e=this.model.get("state");"downloaded"===e&&this.model.get("shouldInstall")?(this.model.set("shouldInstall",!1),this.installUpdates()):this.canCheckForUpdate(e)&&this.checkForUpdates({download:!1})}))},serializeData:function(){return{canCheckForUpdate:this.canCheckForUpdate(this.model.get("state"))}},
checkForUpdates:function(e){p.a.execute("checkForServerUpdates",{server:this.model.server,download:e.download,initialState:e.initialState})},installUpdates:function(){p.a.execute("installServerUpdates",{server:this.model.server})},waitForInstall:function(){this.onWaitingForInstallCheck(),this.listenTo(this.model.server,"change:isConnected",this.onServerConnectedChange)},showUpdateState:function(){var e=this.model.get("state"),t=this.model.previous("state")
;"installing"===t&&this.stopListening(this.model.server,"change:isConnected",this.onServerConnectedChange),this.$el.removeClass(t);var i=e;this.model.get("canInstall")||"available"!==e||(i="notify"),this.$el.addClass(i);var a=!(!this.model.get("added")&&!this.model.get("fixed"));if(this.$el.toggleClass("has-release-notes",a),"installing"===i)this.waitForInstall();else if("error"===i||"notify"===i){var r;this.model.get("error")?(r=this.model.get("error"),
this.ui.installManualLink.addClass("hidden")):this.model.get("canInstall")?(r=n.i(d.default)("Something went wrong."),this.ui.installManualLink.removeClass("hidden")):(r=n.i(d.default)("An update is available."),this.ui.installManualLink.removeClass("hidden"));var s=c.a("appModel"),o=s.get("user").server,l=this.model.get("downloadURL")||o.get("appsUrl");this.ui.installManualLink.attr("href",l),this.ui.updateErrorMessage.text(r)}},canCheckForUpdate:function(e){
return"done"===e||"error"===e||"none"===e},onRender:function(){this.showUpdateState()},onStateChange:function(e,t){this.isRendered&&(this.showUpdateState(),this.ui.checkForUpdatesBtn.toggleClass("active",!this.canCheckForUpdate(t)))},onProgressChange:function(e,t){l.a.isNumber(t)?(this.ui.downloadUpdatesContainer.css({"background-size":t+"% 100%"}),this.ui.downloadProgressContainer.removeClass("hidden"),this.ui.downloadProgressLabel.text(t)):this.ui.downloadProgressContainer.addClass("hidden")},
onServerConnectedChange:function(e,t){t?p.a.execute("checkForServerUpdates",{server:this.model.server}):this._waitingTimeoutID&&(this._waitingTimeoutID=clearTimeout(this._waitingTimeoutID))},onWaitingForInstallCheck:function(){var e=this,t=this.model.server;if(t.get("isConnected")&&"installing"===this.model.get("state")){var n=t.getXHROptions("/updater/check",{type:"PUT"});a.a.ajax(n).promise().always(function(){e._waitingTimeoutID=setTimeout(e.onWaitingForInstallCheck.bind(e),2e3)})}},
onCheckForUpdatesClick:function(e){e.preventDefault(),this.ui.checkForUpdatesBtn.isDisabled()||(this.ui.checkForUpdatesBtn.addClass("active"),this.checkForUpdates({download:!0}))},onDownloadUpdatesClick:function(e){e.preventDefault(),this.checkForUpdates({download:!0,initialState:"downloading"})},onInstallUpdatesClick:function(e){e.preventDefault(),this.installUpdates()},onInfoClick:function(e){e.preventDefault(),h.a.trigger("show:modal",new f.a({model:this.model}))}});t.a=g},function(e,t,n){
"use strict";var i=n(3078),a=n.n(i),r=n(15),s=n(156),o=r.a.ItemView.extend({template:a.a,serializeData:function(){return{isTranscoderRequired:!this.model.get("transcoderVideo"),isUpgradeRequired:!this.model.supports("streamReady"),minServerVersion:s.a.streamReady}}});t.a=o},function(e,t,n){"use strict";var i=n(3079),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(23),c=n(259),d=n(540),h=n(324),p=n(851),f=n(1841),g=n(226),m=n(1958),v=g.a.extend({mixins:[c.a],className:"versions-container",
template:a.a,ui:{message:".versions-status-message"},regions:{listRegion:".background-processing-list-region"},events:{"click .delete-all-btn":"onDeleteAllVersionsClick"},initialize:function(e){this.pausedSetting=this.collection.get("BackgroundQueueIdlePaused"),this.playlists=new d.a([],{server:this.model,allowInCache:!0}),this.transcodeJobs=new h.a([],{server:this.model,allowInCache:!0})},initialState:"loading",states:{loading:{nextState:"list",onEnter:function(){
var e=this.model.supports("streamReady"),t=this.model.get("transcoderVideo");if(this.listRegion.show(new p.a({inline:!0})),!e||!t)return void this.enterState("error");var n=l.a.when(this.playlists.populate(),this.transcodeJobs.fetch());n=n.then(s.a.bind(function(){return this.playlist=this.playlists.first(),this.playlist?(this.generators=this.playlist.get("children"),this.generators.fetch()):l.a.Deferred().reject().promise()},this)),n.done(this.whenRendered(function(){this.enterNextState()})),
n.fail(this.whenRendered(function(){this.enterState("error")}))}},list:{onEnter:function(){this.toggleMessage(),this.listenTo(this.generators,"reset add remove",this.toggleMessage),this.listRegion.show(new f.a({collection:this.generators,itemViewOptions:{transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onExit:function(){this.stopListening(this.generators)}},error:{onEnter:function(){this.listRegion.show(new m.a({model:this.model}))}}},toggleMessage:function(){
this.ui.message.toggleClass("hidden",!this.generators.length)},onRender:function(){this.enterNextState()},onDeleteAllVersionsClick:function(e){e.preventDefault(),u.a.execute("deleteAllVersionGenerators",{server:this.model}).then(s.a.bind(function(){return this.generators.fetch()},this))}});t.a=v},function(e,t,n){"use strict";function i(e){if(!e.hasOwnProperty("isVisible"))return null;var t=e.isVisible;if(u.a.isFunction(t)){
for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return t.apply(void 0,i)}return t}var a=n(70),r=n.n(a),s=n(3080),o=n.n(s),l=n(2),u=n.n(l),c=n(5),d=n.n(c),h=n(52),p=n(15),f=n(13),g=n(4),m=n(23),v=n(12),y=n(19),b=n(331),S=n(1953),I=n(1949),w=n(1950),M=n(1955),C=n(1959),D=n(1947),P=n(1948),T=n(1951),x=n(1952),E=n(226),A=n(224),k=p.a.Layout.extend({className:"server-settings-container",template:o.a,remoteAccessDecorators:{connecting:"unknown",disconnecting:"unknown",
unreachable:"error",ok:"success"},regions:{serverDropdown:".filter-bar",nav:".nav-region",pane:".pane-region"},events:{"click .toggle-advanced-btn":"onToggleAdvancedClick"},panes:{general:{constructor:I.a,group:"general",title:"General",isVisible:!0},remoteAccess:{constructor:M.a,group:"remoteAccess",title:"Remote Access",isVisible:function(e){return!e.get("isPersonalCloudServer")}},versions:{constructor:C.a,group:"versions",title:"Optimized Versions",isVisible:function(e){
return!e.get("isPersonalCloudServer")}},agents:{constructor:D.a,group:"agents",title:"Agents",isVisible:!0},library:{constructor:E.a,group:"library",title:"Library"},channels:{constructor:P.a,group:"channels",title:"Channels",isVisible:!0},network:{constructor:E.a,group:"network",title:"Network"},transcoder:{constructor:E.a,group:"transcoder",title:"Transcoder"},languages:{constructor:T.a,group:"account.language",title:"Languages",isVisible:!0},dlna:{constructor:E.a,group:"dlna",title:"DLNA"},
bonjour:{constructor:E.a,group:"bonjour",title:"Network Discovery"},butler:{constructor:E.a,group:"butler",title:"Scheduled Tasks"},extras:{constructor:E.a,group:"extras",title:"Extras"},dvr:{constructor:x.a,group:"dvr",title:"DVR (Beta)",isVisible:function(e){return!!e.get("mediaProviders")}},help:{constructor:w.a,group:"help",title:"Help",isVisible:!0}},initialize:function(e){this.defaultGroup=e.group||"general",this.account=e.account,this.cloudAccount=e.cloudAccount,
this.channelSettings=e.channelSettings,this.tempSettings=this.collection.cloneDeep(),this.tempAccount=this.account.clone(),this.tempChannelSettings=this.channelSettings.cloneDeep(),this.changes={};var t=n.i(f.a)("appModel"),i=t.get("settings"),a=i.get("showAdvancedSettings");if(this.$el.toggleClass("show-advanced",a),this.initGroups(),this.model.supports("reachability")){var r=u.a.extend(this.model.getXHROptions("/myplex/refreshReachability"),{type:"PUT"});d.a.ajax(r)}
t.set("primaryServer",this.model),this.listenTo(v.a,"shortcut:save",this.saveChanges),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.cloudAccount,"change:remoteAccessState",this.onRemoteAccessStatusChange),this.listenTo(this.model,"change:isClaimed",this.onClaimedChange)},initGroups:function(){var e=this,t=u.a.keys(this.panes),n=u.a.unique(this.collection.filter(function(e){return e.get("group")&&!e.get("hidden")}).map(function(e){return e.get("group")}))
;this.groups=new h.a.Collection,t.forEach(function(t){var a=e.panes[t],r=i(a,e.model,e.tempSettings);(r===!0||r!==!1&&u.a.contains(n,t))&&e.addGroup(t,a)}),u.a.each(n,function(e){if(!u.a.contains(t,e)){var n={constructor:E.a,group:e,title:e};this.panes[e]=n,this.addGroup(e,n)}},this)},addGroup:function(e,t){var n=u.a.omit(t,"constructor");n.id=e,this.groups.add(n)},showPane:function(e){if(this.currentPane){if(this.currentPane.isActive)return this.currentPane;this.stopListening(this.currentPane),
this.flushChanges()}var t=this.panes[e];if(!t||!this.groups.get(e)){var n=r()(this.panes)[0];e=n,t=this.panes[n]}var i=t.constructor,a=new i({model:this.model,collection:this.tempSettings,account:this.tempAccount,cloudAccount:this.cloudAccount,channelSettings:this.tempChannelSettings,group:t.group,changes:this.changes});return this.currentPane=a,this.pane.show(a),this.nav.currentView.selectGroup(e),this.listenTo(this.currentPane,{"change:pane":this.showPane,save:this.saveChanges}),
v.a.trigger("navigate","serverSettings",{serverID:this.model.id,group:e,replace:!0,trigger:!1}),a},flushChanges:function(){this.currentPane.changes&&u.a.extend(this.changes,this.currentPane.changes)},saveChanges:function(){if(this.flushChanges(),!this.currentPane.isDisabled&&!this.currentPane.isActive){this.currentPane.triggerMethod("before:save");var e=[],t=this.getPrefixedChanges("channel."),n=this.getPrefixedChanges("account.");if(!u.a.isEmpty(t)){
var i=this.channelSettings.first().getSaveParams(t),a=u.a.result(this.channelSettings,"url"),r=y.join([a,"/set"],i);e.push(d.a.ajax(this.model.getXHROptions(r)))}u.a.isEmpty(n)||e.push(this.account.save(n)),u.a.isEmpty(this.changes)||e.push(this.collection.first().save(this.changes));var s=d.a.when.apply(d.a,e);s.done(u.a.bind(function(){var e=u.a.keys(this.changes);u.a.each(e,function(e){var t=this.tempSettings.get(e);this.collection.get(e).set("value",t.get("value")),
"ButlerUpdateChannel"===e&&this.onButlerUpdateChannelChange()},this),this.changes={},this.currentPane&&(this.currentPane.changes&&(this.currentPane.changes={}),this.currentPane.triggerMethod("after:save",!0))},this)),s.fail(u.a.bind(function(){this.currentPane&&this.currentPane.triggerMethod("after:save",!1)},this))}},getPrefixedChanges:function(e){var t={};return u.a.each(this.changes,function(n,i){0===i.lastIndexOf(e,0)&&(t[i.substring(e.length)]=n,delete this.changes[i])},this),t},
onRender:function(){this.serverDropdown.append(new b.a);var e=new S.a({collection:this.groups});this.listenTo(e,"itemview:change:pane",this.onNavItemChangePane),this.nav.show(e);var t=this.remoteAccessDecorators[this.cloudAccount.get("remoteAccessState")];t&&this.nav.currentView.showDecorator("remoteAccess",t),this.model.get("isClaimed")||this.nav.currentView.showDecorator("general","warning"),this.showPane(this.defaultGroup)},onClose:function(){this.currentPane=null},
onNavItemChangePane:function(e,t){this.showPane(t)},onPrimaryServerChange:function(e,t){return"installing"===this.model.get("desktop").get("update").get("state")?void this.listenTo(this.model,"change:connected",this.onServerConnectedChange):t?void v.a.trigger("navigate","serverSettings",{serverID:t.id}):void v.a.trigger("show:view",new A.a({title:n.i(g.default)("Server settings are unavailable because the server could not be reached.")}))},onRemoteAccessStatusChange:function(e,t){
var n=this.remoteAccessDecorators[t];n&&this.nav.currentView.showDecorator("remoteAccess",n)},onServerConnectedChange:function(e,t){if(t){this.stopListening(e,"change:connected",this.onServerConnectedChange);n.i(f.a)("appModel").set("primaryServer",e)}},onClaimedChange:function(e,t){t?this.nav.currentView.showDecorator("general",""):this.nav.currentView.showDecorator("general","warning")},onToggleAdvancedClick:function(e){e.preventDefault()
;var t=this.$el.hasClass("show-advanced"),i=n.i(f.a)("appModel").get("settings");this.$el.toggleClass("show-advanced",!t),i.save("showAdvancedSettings",!t)},onButlerUpdateChannelChange:function(){var e=this.collection.get("ButlerTaskCheckForUpdates");e&&e.get("value")&&m.a.execute("checkForServerUpdates",{server:this.model,download:!1})}});t.a=k},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(3081),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(15),h=n(1),p=(n.n(h),
n(48)),f=n.n(p),g=n(14),m=n(13),v=n(4),y=n(12),b=n(84),S=n(23),I=n(438),w=d.a.ItemView.extend({className:"setup-basic-container",template:s.a,ui:{modalContainer:".modal-container",connectCheckbox:"#connect",submitBtn:".submit-btn",nextBtn:".next-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-basic-form":"onSubmit"},initialize:function(){l.a.bindAll(this,"onPlexPassModalClose"),this.collection=this.model.get("desktop").get("settings"),
this.collection.populate({reset:!0}),this.model.isVersionOrNewer("0.9.15.5")?this.changes={PublishServerOnPlexOnlineKey:1}:this.changes={FirstRun:0,PublishServerOnPlexOnlineKey:1};var e=this.model.get("superToken");e&&(this.changes.PlexOnlineToken=e);var t=m.a("appModel"),n=t.get("user").get("hasPlexPass");this.isPlexPassModalOpen=!this.model.get("isDesktop")&&!n},serializeData:function(){
var e=this.model.toJSON(),t=this.collection.get("FriendlyName"),n=this.collection.get("PublishServerOnPlexOnlineKey");return{server:e,friendlyNameSetting:t?t.toJSON():null,publishSetting:n?n.toJSON():null}},mountReact:function(){f.a.render(a()(g.a,{store:m.a("appStore")},void 0,a()(I.a,{metricsProperties:{context:b.f,firstRun:!0},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose})),this.ui.modalContainer[0])},unmountReact:function(){
this.isRendered&&f.a.unmountComponentAtNode(this.ui.modalContainer[0])},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");var t=this.save();t=t.done(l.a.bind(function(){this.ui.nextBtn.click()},this)),t.always(function(){e.removeClass("active")})}},save:function(){var e=this,t=l.a.isEmpty(this.changes)?c.a.Deferred().resolve().promise():this.collection.first().save(this.changes),i=m.a("appModel"),a=i.get("user").get("isSignedIn")
;return this.model.supports("claimServer")&&!this.model.get("superToken")&&a&&(t=t.then(function(){return e.model.get("isClaimed")?c.a.Deferred().resolve().promise():S.a.execute("signInServer",{claim:!0,cloudAccount:e.model.get("desktop").get("cloudAccount")})}),t=t.then(function(){return e.model.fetch()})),t=t.fail(function(){y.a.trigger("show:alert",{type:"error",message:n.i(v.default)("There was a problem saving these settings.")})})},onBeforeRender:function(){this.unmountReact()},
onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked?1:0),this.changes[t.id]=n},onSubmit:function(e){e.preventDefault(),this.submit()},onPlexPassModalClose:function(){this.isPlexPassModalOpen=!1,this.mountReact()}});t.a=w},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(3082),s=n.n(r),o=n(2),l=n.n(o),u=n(5),c=n.n(u),d=n(15),h=n(1),p=(n.n(h),
n(48)),f=n.n(p),g=n(4),m=n(12),v=n(527),y=n(46),b=n(68),S=n(84),I=n(13),w=n(491),M=n(2399),C=n(3334),D=n.n(C),P=d.a.ItemView.extend({className:"setup-complete-container",template:s.a,ui:{modalContainer:".modal-container",submitBtn:".submit-btn",doneBtn:".done-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-complete-form":"onSubmit"},initialize:function(){l.a.bindAll(this,"onPlexPassLiteModalClose"),
this.collection=this.model.get("desktop").get("settings"),this.collection.populate({reset:!0}),this.changes={},this.isPlexPassLiteModalOpen=!1;var e=I.a("appModel"),t=e.get("user");t.get("isSignedIn")&&t.fetch().done(this.whenRendered(function(){t.get("subscription").get("plan")===w.a.plans.LITE&&(this.isPlexPassLiteModalOpen=!0,this.mountReact())}))},serializeData:function(){var e=this.collection.get("collectUsageData");return{devicesImg:D.a,collectUsageDataSetting:e?e.toJSON():null}},
mountReact:function(){f.a.render(a()(M.a,{metricsProperties:{context:S.f,firstRun:!0},isOpen:this.isPlexPassLiteModalOpen,onModalClose:this.onPlexPassLiteModalClose}),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&f.a.unmountComponentAtNode(this.ui.modalContainer[0])},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");this.save().always(this.whenRendered(function(){this.ui.doneBtn.click(),e.removeClass("active")}))}},save:function(){
l.a.has(this.changes,"collectUsageData")&&!this.changes.collectUsageData&&I.a("metrics").trackClick({action:b.j,page:y.B,pane:"complete",firstRun:!0});var e=this.collection.first().save(this.changes),t=this.model.get("sections").filter(function(e){return e.isNew()}).map(function(e){return e.save()}),i=c.a.when(e,n.i(v.a)(t));return i.fail(function(){m.a.trigger("show:alert",{type:"error",message:n.i(g.default)("There was a problem saving these settings.")})}),i},onBeforeRender:function(){
this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked?1:0),this.changes[t.id]=n},onSubmit:function(e){e.preventDefault(),this.submit()},onPlexPassLiteModalClose:function(){this.isPlexPassLiteModalOpen=!1,this.mountReact()}});t.a=P},function(e,t,n){"use strict";var i=n(3083),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"setup-error-container",template:a.a
});t.a=s},function(e,t,n){"use strict";var i=n(3084),a=n.n(i),r=n(15),s=n(3335),o=n.n(s),l=n(3336),u=n.n(l),c=n(3337),d=n.n(c),h=r.a.ItemView.extend({className:"setup-intro-container",template:a.a,events:{"click .next-btn":"onNavClick"},serializeData:function(){return{computerImg:o.a,mediaImg:u.a,playImg:d.a}},onNavClick:function(){this.model.get("desktop").get("settings").get("AcceptedEULA").save({AcceptedEULA:!0})}});t.a=h},function(e,t,n){"use strict"
;var i=n(3085),a=n.n(i),r=n(5),s=n.n(r),o=n(15),l=n(12),u=n(480),c=n(1865),d=n(408),h=o.a.Layout.extend({className:"setup-library-container",template:a.a,regions:{list:".setup-section-list-container"},events:{"click .add-section-btn":"onAddSectionClick"},metricsValue:function(){return this.collection.size()},initialize:function(e){var t=this.model,n=t.get("sections"),i=new u.a([],{server:t,url:"/services/defaultLibraries"});this.collection=n,
this.model.supports("defaultSections")&&e.isFirstVisitToSubset&&s.a.when(i.populate(),n.populate()).done(function(){n.length||i.forEach(function(e){var i=t.hasOwnerFeature("photo_autotags");"photo"===e.get("type")&&i&&e.set("enableAutoPhotoTags",!0),e.collection=n,n.add(e)})})},onRender:function(){this.list.show(new c.a({collection:this.collection}))},onAddSectionClick:function(e){e.preventDefault(),l.a.trigger("show:modal",new d.a({server:this.model}))}});t.a=h},function(e,t,n){"use strict"
;var i=n(3086),a=n.n(i),r=n(15),s=r.a.ItemView.extend({className:"setup-loading-container",template:a.a});t.a=s},function(e,t,n){"use strict";var i=n(3087),a=n.n(i),r=n(2),s=n.n(r),o=n(5),l=n.n(o),u=n(15),c=n(13),d=n(12),h=n(28),p=n(46),f=n(68),g=n(23),m=n(395),v=n(108),y=n(853),b=n(1966),S=n(1963),I=n(1964),w=n(1961),M=n(1965),C=n(1962),D={setupIntro:I.a,setupSignIn:y.a,setupLoading:b.a,setupError:S.a,setupBasic:w.a,setupLibrary:M.a,setupComplete:C.a},P={setupIntro:"intro",setupError:"error",
setupBasic:"name",setupLibrary:"library",setupComplete:"complete"},T=["com.plexapp.agents.imdb","com.plexapp.agents.thetvdb","com.plexapp.agents.lastfm"],x=u.a.Layout.extend({className:"container",template:a.a,maxAttempts:120,ui:{header:".setup-header"},regions:{container:".setup-container"},events:{"click .segment-btn":"onNavClick","click .next-btn":"onNavClick","click .done-btn":"onDoneClick"},onlyAfterRender:["onAgentsSuccess","onAgentsFail","onUpdatesComplete"],initialize:function(e){
s.a.bindAll(this,"start","onAgentsSuccess","onAgentsFail","onUpdatesComplete"),(0,n.i(c.a)("appStore").dispatch)(n.i(v.a)({allowLightPreset:!1})),this.subset=e.subset||"setupIntro",this.attempts=0,this._visitedSubsets={},h.a.info("Starting the setup wizard")},serializeData:function(){return{subset:this.subset}},renderSubset:function(){if(this.model.get("shared"))return void this.navigate("setupError");if(this.hasSkippedSignIn)return void this.navigate("setupIntro")
;var e=n.i(c.a)("appModel"),t=e.get("user").server;t.populate().done(this.whenRendered(function(){this.navigate("setupIntro")})).fail(this.whenRendered(function(){t.get("isConnected")?this.navigate("setupSignIn"):this.navigate("setupIntro")}))},start:function(){if(this.attempts>=this.maxAttempts)return h.a.error("Failed to start the setup wizard after "+this.attempts+" attempts"),void this.navigate("setupError");this.attempts++;var e=this.model.get("startState")
;if(e)n.i(h.a)("Waiting for server to start ("+e+")"),this.model.fetch().done(s.a.delay(this.start,500));else{var t=new m.a([],{server:this.model}),i=t.fetch({scope:"page",timeout:0});i.done(this.onAgentsSuccess),i.fail(this.onAgentsFail)}},navigate:function(e){var t="setupIntro"===e,i="setupSignIn"===e,a="setupLoading"===e,r=D[e],s=P[e];this.previousSubset=this.subset,this.subset=e,s&&n.i(c.a)("metrics").trackView({page:p.B,pane:s,firstRun:!0});var o=!this._visitedSubsets[e]
;this._visitedSubsets[e]=!0;var l=new r({model:this.model,isFirstRun:!0,isFirstVisitToSubset:o});this.container.show(l),i&&this.listenTo(l,"skipSignIn",this.onSignInSkip),this.ui.header.toggleClass("hidden",t||i),this.$el.addClass(e),this.previousSubset!==e&&this.$el.removeClass(this.previousSubset),a&&this.start()},onRender:function(){n.i(c.a)("appModel").set("isFirstRun",!0),this.renderSubset()},onClose:function(){n.i(c.a)("appModel").set("isFirstRun",!1)},onSignInSkip:function(){
this.hasSkippedSignIn=!0,this.renderSubset()},onAgentsSuccess:function(e){n.i(h.a)("Looking for a core agent");for(var t=0,i=T.length;t<i;t++){var a=T[t];if(e.get(a)){n.i(h.a)(a+" found");return void g.a.execute("updateChannel",{server:this.model,silent:!0}).always(this.onUpdatesComplete)}}h.a.error("No core agents found"),this.navigate("setupError")},onAgentsFail:function(){h.a.warn("Unable to request agents"),s.a.delay(this.start,500)},onUpdatesComplete:function(){this.navigate("setupBasic")},
onNavClick:function(e){e.preventDefault();var t=l()(e.currentTarget),n=t.data("subset");t.hasClass("segment-btn")&&"setupBasic"===this.subset&&this.container.currentView?(e.preventDefault(),this.container.currentView.submit()):(this.navigate(n),d.a.trigger("navigate",n,{trigger:!1}))},onDoneClick:function(e){e.preventDefault(),n.i(c.a)("metrics").trackClick({page:p.B,action:f.i,firstRun:!0}),d.a.trigger("navigate","dashboard")}});t.a=x},function(e,t,n){"use strict"
;var i=n(3088),a=n.n(i),r=n(15),s=n(13),o=n(12),l=n(1846),u=r.a.Layout.extend({className:"side-bar",template:a.a,ui:{sortContainer:".section-sort-container"},regions:{sort:".section-sort-list-container"},initialize:function(){var e=n.i(s.a)("appModel").get("settings");this.hidden=!e.get("sidebarOpen"),this.hidden?this.$el.addClass("transition-out"):o.a.trigger("show:bar","sidebar")},open:function(){var e=n.i(s.a)("appModel").get("settings");this.hidden=!1,e.save("sidebarOpen",!0),
this.$el.removeClass("transition-out"),o.a.trigger("show:bar","sidebar")},hide:function(){var e=n.i(s.a)("appModel").get("settings");this.hidden=!0,e.save("sidebarOpen",!1),this.$el.addClass("transition-out"),o.a.trigger("hide:bar","sidebar")},onRender:function(){this.sort.show(new l.a({collection:this.model.get("sorts")}))},onClose:function(){o.a.trigger("hide:bar","sidebar")}});t.a=u},function(e,t,n){"use strict";var i=n(3089),a=n.n(i),r=n(15),s=n(13),o=n(108),l=n(1867),u=r.a.Layout.extend({
className:"container",template:a.a,regions:{list:".announcements-container"},initialize:function(){(0,n.i(s.a)("appStore").dispatch)(n.i(o.a)({allowLightPreset:!1}))},onRender:function(){this.list.show(new l.a({collection:this.collection}))}});t.a=u},function(e,t,n){"use strict";var i=n(3090),a=n.n(i),r=n(2),s=n.n(r),o=n(15),l=n(4),u=n(31),c=n(42),d=n(12),h=n(2822),p=n.n(h),f=n(2823),g=n.n(f),m=n(2824),v=n.n(m),y=o.a.ItemView.extend({className:"container queue-help-container",template:a.a,ui:{
queueEmail:".queue-email",plexitBtn:".btn-plexit"},events:{"focus .queue-email":"onQueueEmailFocus","mouseup .queue-email":"onQueueEmailMouseUp","click .btn-plexit":"onPlexitClick","mousedown .btn-plexit":"onPlexitMouseDown","mouseup .btn-plexit":"onPlexitMouseUp"},initialize:function(e){this.queueEmail=e.queueEmail,"ie"===u.a.id?(this.stepsImgSrc=p.a,this.modalText=n.i(l.default)('Right click the "Plex It!" button and choose Add to Favorites so you can save videos to Watch Later.'),
this.firstStepText=n.i(l.default)("Add the button above to your favorites bar.")):(this.stepsImgSrc=g.a,this.modalText=n.i(l.default)('Drag the "Plex it!" button to your Bookmarks Bar so you can save videos to your Watch Later.'),this.firstStepText=n.i(l.default)("Drag the button above to your bookmarks bar."));var t=["OSX","Windows","Linux"];if(s.a.indexOf(t,u.a.platform)!==-1){var i="OSX"===u.a.platform?n.i(l.default)("\u2318 C"):n.i(l.default)("Ctrl C")
;this.copyCommand=n.i(l.default)("{1} to copy",i)}},serializeData:function(){return{queueEmail:this.queueEmail,copyCommand:this.copyCommand,stepsImgSrc:this.stepsImgSrc,emailImgSrc:v.a,firstStepText:this.firstStepText}},onRender:function(){this.copyCommand&&this.$el.tooltip({selector:".queue-email",placement:"top",trigger:"focus"})},onQueueEmailFocus:function(e){this.ui.queueEmail.selectText()},onQueueEmailMouseUp:function(e){return!1},onPlexitClick:function(e){e.preventDefault();var t=new c.a({
title:n.i(l.default)("Plex It!"),message:this.modalText,confirmLabel:n.i(l.default)("OK"),hideCancel:!0});d.a.trigger("show:modal",t)},onPlexitMouseDown:function(){this.ui.plexitBtn.css("user-select","text")},onPlexitMouseUp:function(){this.ui.plexitBtn.css("user-select","none")}});t.a=y},function(e,t,n){"use strict";function i(e){var t=e.get("key");if(t===m.a.keys.WATCH_LATER){e.server;return"#!/playlist/"+t+"/help"}}
var a=n(3091),r=n.n(a),s=n(2),o=n.n(s),l=n(5),u=n.n(l),c=n(15),d=n(13),h=n(4),p=n(12),f=(n(19),n(108)),g=n(1871),m=n(490),v=c.a.Layout.extend({className:"container",template:r.a,ui:{navLinks:".nav a",allBadge:".all-btn > .badge",unwatchedBadge:".unwatched-btn > .badge",watchedBadge:".watched-btn > .badge"},regions:{list:".user-playlist-container"},events:{"click .nav a":"onNavClick"},initialize:function(e){this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems"),(0,
n.i(d.a)("appStore").dispatch)(n.i(f.a)({allowLightPreset:!1})),this.initSubset(e),this.subsets={all:this.collection,unwatched:this.listModel.filterUnwatched(),watched:this.listModel.filterWatched()},this.listenTo(this.collection,{add:this.onCollectionChange,remove:this.onCollectionChange,"change:viewCount":this.onCollectionChange})},initSubset:function(e){var t=e.subset,i=this.listModel.get("key")+"!subset",a=n.i(d.a)("appModel").get("settings");t||(t=a.get(i)),t||(t="unwatched"),a.save(i,t),
this.subset=t},serializeData:function(){var e=this.listModel.get("key");return{label:this.listModel.get("label"),helpRoute:i(this.listModel),defaultTarget:"_self",filters:[{title:n.i(h.default)("All"),key:e,subset:"all"},{title:n.i(h.default)("Unwatched"),key:e,subset:"unwatched"},{title:n.i(h.default)("Watched"),key:e,subset:"watched"}]}},updateBadges:function(){var e={all:this.subsets.all.length,unwatched:this.subsets.unwatched.length,watched:this.subsets.watched.length}
;o.a.each(o.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},onRender:function(){this.list.show(new g.a({collection:this.subsets[this.subset]})),this.ui.navLinks.filter('[href*="/'+this.subset+'"]').addClass("selected"),this.updateBadges()},onCollectionChange:function(){this.subsets.unwatched.set(this.listModel.filterUnwatched().models),this.subsets.watched.set(this.listModel.filterWatched().models),this.updateBadges()},onNavClick:function(e){
e.preventDefault(),this.ui.navLinks.removeClass("selected"),u()(e.currentTarget).addClass("selected"),this.initSubset({subset:o.a.last(e.currentTarget.href.split("/"))}),this.list.show(new g.a({collection:this.subsets[this.subset]})),p.a.trigger("navigate","userPlaylist",{key:this.listModel.get("key"),subset:this.subset,trigger:!1})}});t.a=v},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.name,i=e.width,a=e.height,s=o()(e,["className","name","width","height"]),l=n.toUpperCase().split(" "),c=l[0].charAt(0),h=l[l.length-1].charAt(0),f=l.length>1?""+c+h:n.charAt(0),g={fontSize:Math.max(14,Math.min(Math.round(i/4),42)),lineHeight:a+"px"};return u.a.createElement("div",r()({style:g,className:d()(t,p.a.anagram)},s),f)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(30),d=n.n(c),h=n(2535),p=n.n(h);i.defaultProps={width:13,height:13},t.a=i},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(4),f=n(22),g=n(27),m=n(87),v=n(412),y=n(2538),b=n.n(y),S=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onLineHeightRef=function(e){e&&a.setState({lineHeight:e.clientHeight})},a.onMeasure=function(e){var t=e.height;a.setState({expandedHeight:t})},a.onTogglePress=function(){a.setState({isCollapsed:!a.state.isCollapsed,allowTransition:!0})},a.state={
isCollapsed:!0,allowTransition:!1,lineHeight:0,expandedHeight:0},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,i=e.children,r=e.maxLines,s=this.state,o=s.isCollapsed,l=s.allowTransition,u=s.expandedHeight,c=s.lineHeight,d=c*r,g=u>d,y={overflow:"hidden",maxHeight:o?d:u};return a()("div",{className:t},void 0,!c&&h.a.createElement("div",{className:b.a.lineHeightMeasure,
ref:this.onLineHeightRef}),a()("div",{className:l&&b.a.contentTransition,style:y},void 0,a()(m.a,{ignoreWidth:!0,ignorePosition:!0,onMeasure:this.onMeasure},void 0,i)),g&&a()(v.a,{className:b.a.readMore,arrowClassName:b.a.readMoreArrow,direction:o?f.f.DOWN:f.f.UP,isSelected:!1,onPress:this.onTogglePress},void 0,o?n.i(p.default)("Read More"):n.i(p.default)("Read Less")))},t}(d.Component);S.defaultProps={maxLines:3},t.a=S},function(e,t,n){"use strict";function i(e){
var t=e.children,n=r()(e,["children"]);return o.a.createElement("div",n,t)}var a=n(16),r=n.n(a),s=n(1),o=n.n(s),l=n(2541),u=n.n(l);i.defaultProps={className:u.a.dragLayer},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(13)),p=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),
i.onFullscreenChange=function(e){i.props.onFullscreenChange(e)},a=n,l()(i,a)}return c()(t,e),t.prototype.componentDidMount=function(){this._manager=n.i(h.a)("fullscreenManager"),this._unsubscribe=this._manager.subscribe(this.onFullscreenChange)},t.prototype.componentWillReceiveProps=function(e){e.isFullscreen&&!this.props.isFullscreen?this._manager.enter():!e.isFullscreen&&this.props.isFullscreen&&this._manager.exit()},t.prototype.componentWillUnmount=function(){this._manager.exit(),
this._unsubscribe()},t.prototype.render=function(){return a()("div",{},void 0,this.props.children)},t}(d.Component);t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(166)),p=n(255),f=n(204),g=n.n(f),m=n(2543),v=n.n(m),y=n.i(h.a)(g.a.overlaySpeed),b={appear:v.a.enter,appearActive:v.a.enterActive,enter:v.a.enter,enterActive:v.a.enterActive,leave:v.a.leave,leaveActive:v.a.leaveActive},S=function(e){function t(n,i){
s()(this,t);var a=l()(this,e.call(this,n,i));return a._noActivity=function(){a.setState({isOpen:!1})},a._seenActivity=function(){a.setState({isOpen:!0}),a._startTimer(a.props)},a.state={isOpen:!1},a}return c()(t,e),t.prototype.componentWillMount=function(){window.addEventListener("mousemove",this._seenActivity),window.addEventListener("mousedown",this._seenActivity),window.addEventListener("keydown",this._seenActivity)},t.prototype.componentWillReceiveProps=function(e){
e.idleTime!==this.props.idleTime&&this._startTimer(e)},t.prototype.componentWillUnmount=function(){window.removeEventListener("mousemove",this._seenActivity),window.removeEventListener("mousedown",this._seenActivity),window.removeEventListener("keydown",this._seenActivity),this._idleTimer=clearTimeout(this._idleTimer)},t.prototype._startTimer=function(e){this._idleTimer=clearTimeout(this._idleTimer),e.idleTime&&(this._idleTimer=setTimeout(this._noActivity,e.idleTime))},
t.prototype.render=function(){return a()(p.a,{transitionName:b,transitionAppearTimeout:y,transitionEnterTimeout:y,transitionLeaveTimeout:y},void 0,this.state.isOpen&&a()("div",{className:v.a.takeOver},void 0,a()("div",{className:v.a.contents},void 0,this.props.children)))},t}(d.Component);S.defaultProps={idleTime:2e3},t.a=S},function(e,t,n){"use strict";function i(e){var t=e.className,n=o()(e,["className"]);return u.a.createElement(h.a,r()({name:"plex-icon-pp-badge-560",
className:d()(f.a.plexPassIcon,t)},n))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(30),d=n.n(c),h=n(29),p=n(2544),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.icon,n=e.title,i=e.text;return r()("div",{className:u.a.upsell},void 0,r()("div",{className:u.a.iconContainer},void 0,r()(o.a,{className:u.a.icon,name:t})),r()("div",{className:u.a.title},void 0,n),r()("div",{className:u.a.text},void 0,i))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(29)),l=n(2545),u=n.n(l)
;t.a=i},function(e,t,n){"use strict";function i(e,t){return e>0?Math.min(Math.floor(e)+1,t):0}function a(e){var t=e.className,n=e.icon,i=e.isVisible,a=e.isPulsing,r=M()(t,!i&&L.a.hidden,a&&L.a.pulsing);return v()(T.a,{name:n,className:r})}function r(e){return I.a.createElement(a,g()({icon:"plex-icon-star-empty-560",className:L.a.emptyStar},e))}function s(e){return I.a.createElement(a,g()({icon:"plex-icon-star-full-560",className:L.a.fullStar},e))}function o(){return v()(T.a,{
name:"plex-icon-star-dot-560",className:L.a.dot})}var l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(6),g=n.n(f),m=n(3),v=n.n(m),y=n(2),b=n.n(y),S=n(1),I=n.n(S),w=n(30),M=n.n(w),C=n(4),D=n(27),P=n(166),T=n(29),x=n(411),E=n(204),A=n.n(E),k=n(2549),L=n.n(k),_=n.i(P.a)(A.a.starPulseSpeed),N=function(e){function t(n,a){u()(this,t);var r=d()(this,e.call(this,n,a));return r.onSliderChange=function(e){var t=e.positionValue,n=r.props.starCount,a=i(t,n);r.setState({currentValue:a})},
r.onSliderMove=function(e){var t=e.positionValue,n=r.props.starCount,a=i(t,n);0!==a&&r.setState({currentValue:a})},r.onSlideComplete=function(e){var t=e.positionValue,n=r.props.starCount,a=i(t,n);r.state.currentRating!==a&&(r._setRating(a),r.props.onRatingChange(a))},r.onMouseLeave=function(e){e.pageX;r.setState({currentValue:r.state.currentRating})},r.state={currentValue:n.value,currentRating:n.value,isPulsing:!1},r}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.value
;t=Math.max(0,Math.min(t,this.props.starCount)),this.state.currentRating!==t&&this._setRating(t)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(D.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){var n=this;this.state.currentRating!==t.currentRating&&(clearTimeout(this._pulseTimeoutID),this._pulseTimeoutID=setTimeout(function(){n.setState({isPulsing:!1})},_))},t.prototype.componentWillUnmount=function(){clearTimeout(this._pulseTimeoutID)},t.prototype._setRating=function(e){
this.setState({currentValue:e,currentRating:e,isPulsing:!0})},t.prototype.render=function(){var e=this.props,t=e.starCount,i=e.className,a=this.state,l=a.currentValue,u=a.currentRating,c=a.isPulsing,d=!this.state.currentValue,h=!this.props.onRatingChange,p=b.a.range(t);return v()("div",{className:M()(i,L.a.starRating,h&&L.a.isReadOnly,d&&L.a.isUnrated),onMouseLeave:this.onMouseLeave},void 0,v()("div",{},void 0,p.map(function(e){return v()(o,{},e)})),v()("div",{className:L.a.stars
},void 0,p.map(function(e){var t=e>l-1;return v()(r,{isVisible:t},e)})),v()("div",{className:L.a.stars},void 0,p.map(function(e){var t=e<=l-1;return v()(s,{isVisible:t,isPulsing:c&&u>e},e)})),!h&&v()(x.a,{className:L.a.slider,trackClassName:L.a.track,label:n.i(C.default)("User Rating"),value:this.state.currentValue,min:0,max:t,stepSize:1,autoHideThumb:!0,onChange:this.onSliderChange,onMove:this.onSliderMove,onDragComplete:this.onSlideComplete}))},t}(S.Component);N.defaultProps={starCount:5,
value:0},t.a=N},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(25),f=n(29),g=n(2550),m=n.n(g),v=a()(f.a,{name:"plex-icon-remove-560"}),y=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(){var e=i.props;(0,e.onRemove)(e.index)},a=n,l()(i,a)}return c()(t,e),
t.prototype.render=function(){var e=this.props,t=e.className,i=e.removeClassName,r=e.tag,s=e.isDisabled,o=e.getTagDisplayValue;return a()("span",{className:t},void 0,!s&&a()(p.a,{className:i,"aria-label":n.i(h.default)("Remove Tag"),onPress:this.onPress},void 0,v),a()("span",{},void 0,o(r)))},t}(d.Component);y.defaultProps={className:m.a.tag,removeClassName:m.a.remove},t.a=y},function(e,t,n){"use strict";function i(e){
var t=e.ticks,i=e.pixelProportion,a=e.majorTickGap,r=e.minorTickGap,s=p.a.where(t,{type:m.a}),o=p.a.where(t,{type:m.b}),l=n.i(g.a)({items:s,gap:i*a});return n.i(g.a)({items:o,existingItems:l,gap:i*r})}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(2),p=n.n(h),f=n(1),g=(n.n(f),n(2405)),m=n(969),v=n(2551),y=n.n(v),b=function(e){function t(n,a){o()(this,t);var r=u()(this,e.call(this,n,a));return r.state={ticks:i(n)},r}return d()(t,e),
t.prototype.componentWillReceiveProps=function(e){var t=e.ticks,n=e.pixelProportion,a=e.majorTickGap,r=e.minorTickGap,s=this.props.ticks!==t,o=this.props.pixelProportion!==n,l=this.props.majorTickGap!==a,u=this.props.minorTickGap!==r;(s||o||l||u)&&this.setState({ticks:i(e)})},t.prototype.render=function(){return r()("div",{className:y.a.container},void 0,r()("div",{className:y.a.ticks},void 0,this.state.ticks.map(function(e){var t=e.type,n=e.position,i=e.label;return r()("div",{className:y.a[t],
style:{top:100*n+"%"}},n,i&&"major"===t&&r()("div",{className:y.a.label},void 0,i))})))},t}(f.Component);b.defaultProps={majorTickGap:20,minorTickGap:5},t.a=b},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(14)),p=n(8),f=(n.n(p),n(877)),g=n.i(p.createSelector)(function(e){return e.ui.background},function(e){return{serverEntityID:e.server,url:e.imageUrl,allowLightPreset:e.allowLightPreset,
isBackgroundPending:e.isBackgroundPending}}),m=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.shouldComponentUpdate=function(e){return!e.isBackgroundPending},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.url,i=e.allowLightPreset;return a()(f.a,{serverEntityID:t,url:n,allowPreset:!0,allowLightPreset:i})},t}(d.Component);t.a=n.i(h.b)(function(e){return g})(m)},function(e,t,n){"use strict";function i(e){
return c.a.createElement("input",l()({type:"text"},e))}function a(e){var t=e.inputComponent,n=e.suggestionsComponent,i=e.theme,a=s()(e,["inputComponent","suggestionsComponent","theme"]);return c.a.createElement(h.a,l()({},a,{renderInputComponent:t,renderSuggestionsContainer:n,theme:l()({},f.a,i)}))}var r=n(16),s=n.n(r),o=n(6),l=n.n(o),u=n(1),c=n.n(u),d=n(3185),h=n.n(d),p=n(2559),f=n.n(p);a.defaultProps={theme:f.a,inputComponent:i},t.a=a},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(6),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(1993),y=n(1983),b=n(2560),S=n.n(b),I=function(e){function t(n,i){c()(this,t);var a=h()(this,e.call(this,n,i));return a.setTagsInputRef=function(e){a.tagsInputRef=e},a.onInputChange=function(e){a.setState({inputValue:e})},a.onSuggestionSelected=function(e,t){var n=t.suggestion;a.tagsInputRef.addTag(a.props.makeTagFromSuggestion(n))},a.renderInputComponent=function(e){
var t=e.ref,n=l()(e,["ref"]),i=a.props,r=i.className,o=i.shouldRenderSuggestions,u=i.tagComponent,c=i.validationRegex,d=i.value,h=i.makeTag,p=i.getTagDisplayValue,f=i.getTagValue,g=i.onChange,y=a.state.inputValue;return m.a.createElement(v.a,{className:r,inputValue:y,inputProps:s()({},n,{inputRef:t}),value:d,validationRegex:c,tagComponent:u,addOnBlur:!o(y),getTagValue:f,getTagDisplayValue:p,makeTag:h,ref:a.setTagsInputRef,onInputChange:a.onInputChange,onChange:g})},a.state={inputValue:""},a}
return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.suggestions,n=e.getSuggestionValue,i=e.renderSuggestion,r=e.suggestionsFilter,s=e.shouldRenderSuggestions,o=e.onSuggestionsClearRequested,l=e.onSuggestionsFetchRequested,u=this.state.inputValue;return a()(y.a,{suggestions:t.filter(function(e){return r(e,u)}),shouldRenderSuggestions:s,getSuggestionValue:n,renderSuggestion:i,focusInputOnSuggestionClick:!1,focusFirstSuggestion:!0,inputProps:{value:u,onChange:function(e,t){t.newValue
;"enter"===t.method&&e.preventDefault()}},theme:{input:S.a.input},inputComponent:this.renderInputComponent,onSuggestionSelected:this.onSuggestionSelected,onSuggestionsClearRequested:o,onSuggestionsFetchRequested:l})},t}(g.Component);I.defaultProps={className:S.a.tagsInput,suggestions:[],value:[],shouldRenderSuggestions:function(){return!1}},t.a=I},function(e,t,n){"use strict";function i(e){return o.a.createElement(u.a,r()({mask:d,pipe:h,keepCharPositions:!0,placeholder:c},e))}
var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(3305),u=(n.n(l),n(1989)),c="yyyy-mm-dd",d=[/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,"-",/\d/,/\d/],h=n.i(l.createAutoCorrectedDatePipe)("yyyy-mm-dd");i.defaultProps={placeholderChar:"\u2000",guide:!1},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=r()(e,["children"]);return o.a.createElement("div",n,t)}var a=n(16),r=n.n(a),s=n(1),o=n.n(s),l=n(2566),u=n.n(l);i.defaultProps={className:u.a.group},t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.name,i=e.labelText,a=e.showErrors,s=e.errors;return r()(o.a,{className:t,showErrors:a,errors:s,name:n,labelText:i})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(416)),l=n(2567),u=n.n(l);i.defaultProps={className:u.a.label},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.inputClassName,n=e.name,i=e.labelText,a=e.showErrors,s=e.errors,l=e.leftLabel,c=u()(e,["inputClassName","name","labelText","showErrors","errors","leftLabel"])
;return o()(p.a,{},void 0,l&&o()(f.a,{hasError:a,errors:s,name:n,labelText:i}),d.a.createElement(g.a,r()({className:t,name:n,type:"number",hasError:a},c)),!l&&o()(f.a,{hasError:a,errors:s,name:n,labelText:i}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(132),p=n(1986),f=n(1987),g=n(145),m=n(2568),v=n.n(m);i.defaultProps={inputClassName:v.a.input,leftLabel:!0},t.a=n.i(h.a)(i)},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(30),m=n.n(g),v=n(3306),y=(n.n(v),n(99)),b=n(2569),S=n.n(b),I=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.setInputRef=function(e){i.inputRef=e},i.onChange=function(e){i.textMaskInputElement.update(),
i.props.onChange(i.textMaskInputElement.state.previousConformedValue)},a=n,c()(i,a)}return h()(t,e),t.prototype.componentDidMount=function(){var e=this.props.value,t=this.props,i=t.mask,a=t.guide,r=t.pipe,s=t.placeholderChar,o=t.keepCharPositions;this.textMaskInputElement=n.i(v.createTextMaskInputElement)({inputElement:this.inputRef,mask:i,guide:a,pipe:r,placeholderChar:s,keepCharPositions:o}),this.textMaskInputElement.update(e)},t.prototype.componentDidUpdate=function(){
this.textMaskInputElement.update(this.props.value)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,r=e.isDisabled,o=e.type,l=e.name,u=(e.initialValue,e.value),c=e.size,d=(e.mask,e.guide,e.pipe,e.placeholderChar,e.keepCharPositions,e.hasError),h=(e.errors,e.validations,e.onChange,
s()(e,["className","errorClassName","disabledClassName","isDisabled","type","name","initialValue","value","size","mask","guide","pipe","placeholderChar","keepCharPositions","hasError","errors","validations","onChange"]));return f.a.createElement("input",a()({},h,{className:m()(t,S.a[c],r&&i,d&&n),id:l,name:l,type:o,disabled:r,defaultValue:u,ref:this.setInputRef,onChange:this.onChange}))},t}(p.Component);I.defaultProps={className:S.a.input,errorClassName:S.a.hasError,
disabledClassName:S.a.isDisabled,isDisabled:!1,size:y.LARGE,type:"text",hasError:!1},t.a=I},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(145),f=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onChange=function(e){var t=e?parseInt(e,10):null;i.props.onChange(t)},a=n,l()(i,a)}return c()(t,e),
t.prototype.render=function(){return h.a.createElement(p.a,a()({type:"number"},this.props,{onChange:this.onChange}))},t}(d.Component);t.a=f},function(e,t,n){"use strict";function i(e){var t=e.inputClassName,n=e.name,i=e.labelText,a=e.helpText,s=e.showErrors,l=e.errors,c=u()(e,["inputClassName","name","labelText","helpText","showErrors","errors"]);return o()(p.a,{},void 0,o()(f.a,{showErrors:s,errors:l,name:n,labelText:i}),d.a.createElement(m.a,r()({className:t,name:n,type:"number",hasError:s
},c)),a&&o()(g.a,{},void 0,a))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(132),p=n(193),f=n(416),g=n(415),m=n(1990),v=n(2570),y=n.n(v);i.defaultProps={inputClassName:y.a.input},t.a=n.i(h.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.value,i=e.labelText,a=e.showErrors,s=e.errors,l=u()(e,["name","value","labelText","showErrors","errors"]),c=""===n?null:b[p()(n).score],h=s[0];return o()(m.a,{},void 0,o()(v.a,{hasError:a,name:t
},void 0,i,c&&!a&&o()("span",{},void 0," \u2014 ",o()("span",{style:{color:c.color}},void 0,c.translateFn())),a&&" \u2014 "+h),d.a.createElement(y.a,r()({name:t,type:"password",value:n,hasError:a},l)))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(674),p=n.n(h),f=n(4),g=n(132),m=n(193),v=n(121),y=n(145),b={0:{color:"#ff5533",translateFn:function(){return n.i(f.default)("Too weak")}},1:{color:"#ee8833",translateFn:function(){return n.i(f.default)("Very weak")}},2:{
color:"#eebb00",translateFn:function(){return n.i(f.default)("Somewhat weak")}},3:{color:"#bbbb33",translateFn:function(){return n.i(f.default)("Somewhat Strong")}},4:{color:"#66bb55",translateFn:function(){return n.i(f.default)("Very Strong")}}};i.defaultProps={showErrors:!1},t.a=n.i(g.a)(i)},function(e,t,n){"use strict";function i(e){return window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData?e.clipboardData.getData("text/plain"):""}function a(e){
var t=e.inputRef,n=(e.addTag,g()(e,["inputRef","addTag"]));return b.a.createElement("input",p()({type:"text",ref:t},n))}function r(e){return e.split(" ").map(function(e){return e.trim()})}var s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(6),p=n.n(h),f=n(16),g=n.n(f),m=n(2),v=n.n(m),y=n(1),b=n.n(y),S=n(30),I=n.n(S),w=n(1980),M=n(2572),C=n.n(M),D=function(e){function t(n,a){o()(this,t);var r=u()(this,e.call(this,n,a));return r.addTag=function(e){return r._addTags([e])},
r.setInputRef=function(e){r.inputRef=e},r.setDivRef=function(e){r.divRef=e},r.onPaste=function(e){var t=r.props,n=t.addOnPaste,a=t.pasteSplit,s=t.makeTag;if(n){e.preventDefault();var o=i(e),l=a(o).map(function(e){return s(e)});r._addTags(l)}},r.onKeyDown=function(e){var t=r.props.inputProps.onKeyDown;if(t&&t(e),!e.defaultPrevented){var n=r.props,i=n.value,a=n.removeKeys,s=n.addKeys,o=n.inputValue,l=o,u=""===l,c=e.keyCode,d=s.indexOf(c)!==-1,h=a.indexOf(c)!==-1;if(d){
(r._accept()||13===c)&&e.preventDefault()}h&&i.length>0&&u&&(e.preventDefault(),r._removeTag(i.length-1))}},r.onClick=function(e){e.target===r.divRef&&(r.inputRef&&"function"==typeof r.inputRef.focus&&r.inputRef.focus(),r.onFocus())},r.onChange=function(e){var t=r.props.onInputChange,n=r.props.inputProps.onChange,i=e.target.value;n&&n(e),t(i)},r.onFocus=function(e){var t=r.props.inputProps.onFocus;t&&t(e),r.setState({isFocused:!0})},r.onBlur=function(e){var t=r.props.inputProps.onBlur
;if(r.setState({isFocused:!1}),null!=e&&(t&&t(e),r.props.addOnBlur)){var n=r.props.makeTag(e.target.value);r._addTags([n])}},r.onRemove=function(e){r._removeTag(e)},r.state={isFocused:!1},r}return d()(t,e),t.prototype._removeTag=function(e){var t=this.props.value.slice(0);if(e>-1&&e<t.length){var n=t.splice(e,1);this.props.onChange(t,n,[e])}},t.prototype._clearInput=function(){this.props.onInputChange("")},t.prototype._addTags=function(e){
var t=this.props,n=t.validationRegex,i=t.onlyUnique,a=t.maxTags,r=t.value,s=t.getTagValue,o=t.onChange,l=t.onValidationReject,u=void 0;if(i&&(e=v.a.uniq(e,function(e){return s(e)})),n&&(u=e.filter(function(e){return!n.test(s(e))}),e=e.filter(function(e){return n.test(s(e))})),e=e.filter(function(e){var t=s(e);return t?t.trim().length>0:t}),a>=0){var c=Math.max(a-r.length,0);e=e.slice(0,c)}if(l&&u&&u.length>0&&l(u),e.length>0){for(var d=r.concat(e),h=[],p=0;p<e.length;p++)h.push(r.length+p)
;i&&(d=v.a.uniq(d,function(e){return s(e)}));var f=d.length!==r.length;return f&&o(d,e,h),this._clearInput(),f}return this._clearInput(),!1},t.prototype._accept=function(){var e=this.props.inputValue;return""!==e&&(e=this.props.makeTag(e),this._addTags([e]))},t.prototype.inputProps=function(){var e=this.props.inputProps,t=(e.onChange,e.onFocus,e.onBlur,g()(e,["onChange","onFocus","onBlur"])),n=p()({className:C.a.input,placeholder:""},t);return this.props.isDisabled&&(n.isDisabled=!0),n},
t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.focusedClassName,a=t.value,r=t.inputValue,s=t.getTagValue,o=t.getTagDisplayValue,l=t.tagProps,u=t.tagComponent,c=t.inputComponent,d=t.isDisabled,h=this.state.isFocused;return b.a.createElement("div",{className:I()(n,h&&i),ref:this.setDivRef,onClick:this.onClick},a.map(function(t,n){return b.a.createElement(u,p()({key:s(t)+"-"+n,index:n,tagCount:a.length,tag:t,isDisabled:d,getTagDisplayValue:o,onRemove:e.onRemove},l))
}),b.a.createElement(c,p()({key:"input",inputRef:this.setInputRef,value:r},this.inputProps(),{addTag:this.addTag,onPaste:this.onPaste,onKeyDown:this.onKeyDown,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur})))},t}(y.Component);D.defaultProps={className:C.a.tagsInput,addKeys:[9,13],addOnBlur:!1,addOnPaste:!1,inputProps:{},removeKeys:[8],inputComponent:a,tagComponent:w.a,pasteSplit:r,tagProps:{},onlyUnique:!0,maxTags:-1,validationRegex:null,isDisabled:!1,
getTagDisplayValue:function(e){return e},getTagValue:function(e){return e},makeTag:function(e){return e}},t.a=D},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(30),m=n.n(g),v=n(99),y=n(2573),b=n.n(y),S=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onChange=function(e){
i.props.onChange(e.target.value)},a=n,c()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.disabledClassName,r=e.isDisabled,o=e.size,l=e.name,u=e.hasError,c=s()(e,["className","errorClassName","disabledClassName","isDisabled","size","name","hasError"]);return f.a.createElement("textarea",a()({},c,{id:l,name:l,disabled:r,className:m()(t,b.a[o],r&&i,u&&n),onChange:this.onChange}))},t}(p.Component);S.defaultProps={className:b.a.textArea,
errorClassName:b.a.hasError,disabledClassName:b.a.isDisabled,isDisabled:!1,size:v.LARGE,hasError:!1,rows:2},t.a=S},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(70),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=(n.n(p),n(99),n(145)),g=n(194),m=n(2575),v=n.n(m),y=function(e){function t(n,i){l()(this,t);var a=c()(this,e.call(this,n,i));return a.onValueChange=function(e){a.setState({inputValue:e},function(){a.props.onChange(""+e+a.state.selectedUnit)})},
a.onUnitChange=function(e){a.setState({selectedUnit:e},function(){a.props.onChange(""+a.state.inputValue+e)})},a.state=a.getStateFromProps(n),a}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.value!==e.value&&this.setState(this.getStateFromProps(e))},t.prototype.getStateFromProps=function(e){var t=e.units,n=t[0],i=e.value.match(/^([0-9]+)?([a-zA-Z]+)?$/)||[],a=i[1],r=void 0===a?"":a,o=i[2];return{inputValue:r,selectedUnit:void 0===o?s()(n)[0]:o}},
t.prototype.render=function(){var e=this.props,t=e.textInputClassName,n=e.selectInputClassName,i=e.units,r=e.size;return a()("span",{className:v.a.inputs},void 0,a()(f.a,{name:"unitValue",className:t,type:"number",value:this.state.inputValue,size:r,onChange:this.onValueChange}),a()(g.a,{name:"unit",className:n,value:this.state.selectedUnit,values:i,size:r,onChange:this.onUnitChange}))},t}(p.Component);t.a=y},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({},e,{
barColor:c.a.equalizerBarColor}))}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(1413),u=n(970),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){return o()("div",{className:h.a.avatar},void 0,u.a.createElement(c.a,r()({},e,{background:!0})))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(165),d=n(2576),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.size,a=e.isDisabled;return r()("div",{role:"menu",
className:l()(n,d.a[i],a&&d.a.isDisabled)},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n.n(o),u=n(22),c=n(2581),d=n.n(c);i.defaultProps={className:d.a.menu,size:u.d.MEDIUM,isDisabled:!1},t.a=i},function(e,t,n){"use strict";function i(e){return o.a.createElement(u.a,e,c)}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(36),u=n(879),c=r()(l.a,{});t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(40)),p=n(535),f=50,g=2,m=1e3,v=m/(f/g),y=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.fadeOut=function(){var e=a.state,t=e.volume;e.currentThemeMusicUrl&&t>0?(a.setState(function(e){return{volume:e.volume-g}}),a._fadeOutTimeoutID=setTimeout(a.fadeOut,v)):a.reset()},a.onStart=function(e){var t=e.duration;a._currentDurationMilliseconds=t},a.onPositionMillisecondsChange=function(e){var t=Math.floor(e/1e3);a.state.positionSeconds!==t&&a.setState({
positionSeconds:t}),a._currentDurationMilliseconds-e<=m&&!a._fadeOutTimeoutID&&a.fadeOut()},a.onEnd=function(){a.reset()},a._fadeOutTimeoutID=null,a.state={currentThemeMusicUrl:n.themeMusicUrl,volume:f,positionSeconds:0},a}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.themeMusicUrl;t?t!==this.props.themeMusicUrl&&this.reset(t):this.state.currentThemeMusicUrl&&!this._fadeOutTimeoutID&&(this._fadeOutTimeoutID=setTimeout(this.fadeOut))},
t.prototype.componentWillUnmount=function(){this.reset()},t.prototype.reset=function(e){this._fadeOutTimeoutID&&clearTimeout(this._fadeOutTimeoutID),this._fadeOutTimeoutID=null,this.setState({currentThemeMusicUrl:e,positionSeconds:0,volume:f})},t.prototype.render=function(){var e=this.state,t=e.currentThemeMusicUrl,n=e.positionSeconds,i=e.volume;return t?a()(p.a,{type:h.a.elements.MUSIC,src:t,positionSeconds:n,volume:i,onStart:this.onStart,
onPositionMillisecondsChange:this.onPositionMillisecondsChange,onEnd:this.onEnd},t):null},t}(d.Component);t.a=y},function(e,t,n){"use strict";function i(e){var t=e.ui,n=t.audioPlayer,i=t.videoPlayer;return!(!n.activeMetadataKey&&!i.activeMetadataKey)}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),n(14)),f=n(8),g=(n.n(f),n(2e3)),m=n.i(f.createSelector)(function(e){return e.ui.background},i,function(e,t){return{isBackgroundPending:e.isBackgroundPending,
themeMusicUrl:e.themeMusicUrl,hasActiveAudioPlayback:t}}),v=function(e){function t(){return o()(this,t),u()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.shouldComponentUpdate=function(e){return!e.isBackgroundPending},t.prototype.render=function(){return this.props.hasActiveAudioPlayback?null:r()(g.a,{themeMusicUrl:this.props.themeMusicUrl})},t}(h.Component);t.a=n.i(p.b)(m)(v)},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.className,i=e.target,a=e.attachment,r=e.options,o=e.isOpen,u=(e.onMenuClose,l()(e,["children","className","target","attachment","options","isOpen","onMenuClose"]));return s()(g.a,{className:S.a.tooltipPortal,target:i,options:r||C[a],isOpen:o,closeTimeout:I},void 0,s()(f.a,{transitionName:w,transitionAppearTimeout:I,transitionEnterTimeout:I,transitionLeaveTimeout:I},void 0,o&&h.a.createElement("div",c()({className:n||S.a[a]},u),t)))}
var a,r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(6),c=n.n(u),d=n(1),h=n.n(d),p=n(166),f=n(255),g=n(799),m=n(204),v=n.n(m),y=n(22),b=n(2596),S=n.n(b),I=n.i(p.a)(v.a.tooltipSpeed),w={appear:S.a.enter,appearActive:S.a.enterActive,enter:S.a.enter,enterActive:S.a.enterActive,leave:S.a.leave,leaveActive:S.a.leaveActive},M={skipMoveElement:!0,constraints:[{to:"window",attachment:"together",pin:!0}]},C=(a={},a[y.e.TOP_LEFT]=c()({},M,{attachment:"bottom left",targetAttachment:"top left"}),
a[y.e.TOP_CENTER]=c()({},M,{attachment:"bottom center",targetAttachment:"top center"}),a[y.e.TOP_RIGHT]=c()({},M,{attachment:"bottom right",targetAttachment:"top right"}),a[y.e.BOTTOM_LEFT]=c()({},M,{attachment:"top left",targetAttachment:"bottom left"}),a[y.e.BOTTOM_CENTER]=c()({},M,{attachment:"top center",targetAttachment:"bottom center"}),a[y.e.BOTTOM_RIGHT]=c()({},M,{attachment:"top right",targetAttachment:"bottom right"}),a[y.e.MIDDLE_LEFT]=c()({},M,{attachment:"middle right",
targetAttachment:"middle left"}),a[y.e.MIDDLE_RIGHT]=c()({},M,{attachment:"middle left",targetAttachment:"middle right"}),a);i.defaultProps={attachment:y.e.BOTTOM_CENTER},t.a=i},function(e,t,n){"use strict";var i=n(16),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=a()(e,["children"])
;return h.a.createElement("div",n,t)},t}(d.Component);t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(84),f=n(22),g=n(51),m=n(1978),v=n(565),y=n(438),b=n(2013),S=n(884),I=n(2597),w=n.n(I),M={context:p.e},C=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onCreateDVRPress=function(){a.setState({isDVRSetupModalOpen:!0})},a.onDVRSetupModalClose=function(){a.setState({
isDVRSetupModalOpen:!1})},a.onPlexPassPress=function(){a.setState({isPlexPassModalOpen:!0})},a.onPlexPassModalClose=function(){a.setState({isPlexPassModalOpen:!1})},a.state={isDVRSetupModalOpen:!1,isPlexPassModalOpen:!1},a}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.isDvrsPending,r=e.hasDVRs,s=e.hasDVRFeature,o=e.machineIdentifier,l=e.isSignedIn,u=e.hasPlexPass,c=this.state,d=c.isDVRSetupModalOpen,p=c.isPlexPassModalOpen,I=!i&&!r,C=encodeURIComponent(o)
;return a()("div",{className:w.a.liveTVSettings},void 0,I&&a()("div",{className:w.a.info},void 0,a()(m.a,{icon:"plex-icon-marketing-dvr-560",title:n.i(h.default)("Introducing Plex DVR"),text:n.i(h.default)("With Plex Pass and a digital tuner, you can record over-the-air broadcast TV and watch your favorite shows, movies, news, and sports on any device, anywhere in the world. Cut the cord and love TV again.")}),a()("div",{className:w.a.moreInfo},void 0,a()("div",{className:w.a.moreInfoText
},void 0,a()(v.a,{message:n.i(h.default)("To get started recording TV, connect a tuner device to your network (here's a {openLink}list of supported devices{closeLink}) and click below."),tags:[{open:"openLink",close:"closeLink",kind:f.b.PRIMARY,to:"https://support.plex.tv/hc/en-us/articles/225877427-Supported-DVR-Devices-and-Antennas",target:"_blank"}]}))),s&&a()(g.a,{kind:f.b.PRIMARY,size:f.d.LARGE,onPress:this.onCreateDVRPress},void 0,n.i(h.default)("Setup Plex DVR")),l&&!s&&u&&a()(g.a,{
kind:f.b.PRIMARY,size:f.d.LARGE,to:"#!/settings/server/"+C},void 0,n.i(h.default)("Claim Server")),l&&!s&&!u&&a()(g.a,{kind:f.b.PRIMARY,size:f.d.LARGE,onPress:this.onPlexPassPress},void 0,n.i(h.default)("Get a Plex Pass")),!l&&!s&&a()(g.a,{kind:f.b.PRIMARY,size:f.d.LARGE,to:"#!/settings/server/"+C},void 0,n.i(h.default)("Sign In"))),a()(b.a,{serverEntityID:t,hasDVRFeature:s}),a()(S.a,{serverEntityID:t,metricsProperties:M,isOpen:d,onModalClose:this.onDVRSetupModalClose}),a()(y.a,{
metricsProperties:{context:"dvrSetup"},isOpen:p,onModalClose:this.onPlexPassModalClose}))},t}(d.Component);t.a=C},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e){return e.user},n.i(m.a)(),function(e,t,n){var i=e.isDvrsPending,a=e.dvrs;return{isPagePopulated:e.isPagePopulated,isDvrsPending:i,hasDVRs:!(!a||!a.length),hasDVRFeature:!!n.ownerFeatures&&n.ownerFeatures.indexOf("dvr")>-1,
machineIdentifier:n.machineIdentifier,isSignedIn:!!t&&t.signedIn,hasPlexPass:!!t&&t.hasPlexPass}})}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(1),d=n.n(c),h=n(14),p=n(8),f=(n.n(p),n(41)),g=n(546),m=n(54),v=n(2004),y={initLiveTVSettingsPage:g.a,clearLiveTVSettingsPage:g.b},b=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){var e=this;n.i(f.a)(function(){e.props.initLiveTVSettingsPage({
serverEntityID:e.props.serverEntityID})})},t.prototype.componentWillUnmount=function(){this.props.clearLiveTVSettingsPage()},t.prototype.render=function(){return this.props.isPagePopulated?d.a.createElement(v.a,this.props):null},t}(c.Component);t.a=n.i(h.b)(i,y)(b)},function(e,t,n){"use strict";function i(){return n.i(p.createSelector)(function(e){return e.primaryServer},function(e){return{serverEntityID:e}})}
var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(1),d=n.n(c),h=n(14),p=n(8),f=(n.n(p),n(2005)),g=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){return this.props.serverEntityID?d.a.createElement(f.a,this.props):null},t}(c.Component);t.a=n.i(h.b)(i)(g)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(4)),p=n(84),f=n(29),g=n(22),m=n(326),v=n(90),y=n(25),b=n(2018),S=n(2009),I=n(570),w=n(881),M=n(2598),C=n.n(M),D={context:p.e},P=a()(f.a,{name:"plex-icon-alert-560"}),T=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onManageChannelsPress=function(){a.setState({isManageChannelsModalOpen:!0})},a.onManageChannelsModalClose=function(){a.setState({isManageChannelsModalOpen:!1})},a.onDeviceSettingsPress=function(){a.setState({isDeviceSettingsModalOpen:!0})},
a.onDeviceSettingsModalClose=function(){a.setState({isDeviceSettingsModalOpen:!1})},a.state={isManageChannelsModalOpen:!1,isDeviceSettingsModalOpen:!1},a}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.dvrID,r=e.deviceID,s=e.model,o=e.uri,l=e.thumb,u=e.tunerCount,c=e.channelCount,d=e.activeRecordingCount,p=e.channelMappings,M=e.hasPrefs,T=e.status,x=e.canRemoveDevice,E=e.onRemoveDevicePress,A=T===m.a.DEAD,k=p.filter(function(e){return e.enabled
}).length,L=void 0;return L=c?1===c?n.i(h.default)("1 channel"):n.i(h.default)("{channelCount} channels",{channelCount:c}):n.i(h.default)("No channels"),a()("div",{className:C.a.device},void 0,a()(I.a,{className:C.a.deviceImage,serverEntityID:t,model:s,thumb:l,width:100,height:100}),a()("div",{className:C.a.details},void 0,a()("div",{},void 0,a()("span",{className:C.a.model},void 0,s),M&&a()(y.a,{kind:g.b.PRIMARY,onPress:this.onDeviceSettingsPress},void 0,a()(f.a,{
className:C.a.deviceSettingsIcon,name:"plex-icon-settings-560","aria-label":n.i(h.default)("Device Settings")}))),a()(w.a,{className:C.a.uri,uri:o}),A&&a()("div",{className:C.a.deviceWarning},void 0,a()("div",{className:C.a.deviceWarningIconContainer},void 0,P),n.i(h.default)("Device not found. Ensure your device is powered on and connected to your network.")),!A&&a()("div",{className:C.a.info},void 0,a()("div",{},void 0,1===u?n.i(h.default)("1 tuner"):n.i(h.default)("{tunerCount} tuners",{
tunerCount:u}),!!d&&a()("span",{},void 0,a()(v.a,{className:C.a.separator}),n.i(h.default)("{activeRecordingCount} recording now",{activeRecordingCount:d}))),a()("div",{},void 0,L,a()(v.a,{className:C.a.separator}),a()(y.a,{kind:g.b.PRIMARY,onPress:this.onManageChannelsPress},void 0,n.i(h.default)("{enabledChannelsCount} enabled",{enabledChannelsCount:k}))))),x&&a()("div",{className:C.a.removeDeviceContainer},void 0,a()(y.a,{className:C.a.removeDevice,onPress:E},void 0,a()(f.a,{
name:"plex-icon-remove-560","aria-label":n.i(h.default)("Remove Device")}))),a()(b.a,{serverEntityID:t,dvrID:i,deviceID:r,metricsProperties:D,isOpen:this.state.isManageChannelsModalOpen,onModalClose:this.onManageChannelsModalClose}),a()(S.a,{serverEntityID:t,dvrID:i,deviceID:r,metricsProperties:D,isOpen:this.state.isDeviceSettingsModalOpen,onModalClose:this.onDeviceSettingsModalClose}))},t}(d.Component);t.a=T},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(function(e,t){
return t.tunerCount},n.i(S.a)(),n.i(I.a)(),function(e,t,n){var i=p.a.filter(n,function(e){return e.type===b.a.GRABBER_GRAB&&parseInt(e.Context.deviceID,10)===t.key});return{hasPrefs:!(!t.prefs||!t.prefs.length),channelCount:t.channels.length,activeRecordingCount:i.length}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(8),y=(n.n(v),n(41)),b=n(117),S=n(329),I=n(221),w=n(89),M=n(2007),C={fetchDeviceChannels:w.l,removeDVRDevice:w.w
},D=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onRemoveDevicePress=function(){var e=i.props,t=e.serverEntityID,n=e.dvrID,a=e.deviceID;i.props.removeDVRDevice({serverEntityID:t,dvrID:n,deviceID:a})},a=n,u()(i,a)}return d()(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props,i=t.serverEntityID,a=t.dvrID,r=t.deviceID;n.i(y.a)(function(){
e.props.fetchDeviceChannels({serverEntityID:i,dvrID:a,deviceID:r})})},t.prototype.render=function(){return g.a.createElement(M.a,r()({onRemoveDevicePress:this.onRemoveDevicePress},this.props))},t}(f.Component);t.a=n.i(m.b)(i,C)(D)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,a=u()(e,["isOpen","metricsProperties","onModalClose"]);return o()(p.a,{isOpen:t,metricsPage:h.s,metricsProperties:n,onModalClose:i},void 0,d.a.createElement(f.a,r()({
onModalClose:i},a)))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(46),p=n(147),f=n(2011);t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(211),v=n(22),y=n(111),b=n(123),S=n(75),I=n(112),w=n(91),M=n(120),C=n(227),D=n(418),P=n(51),T=n(110),x=n(570),E=n(2600),A=n.n(E),k=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),
t.prototype.componentDidUpdate=function(e,t){e.isSaving&&!this.props.isSaving&&null==this.props.saveError&&this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.model,r=e.uri,o=e.thumb,l=e.prefs,u=e.isSaving,c=e.saveError,d=e.onSubmit,h=e.onErrorDismiss,p=e.onModalClose;return s()(M.a,{className:A.a.form,onSubmit:d},void 0,s()(y.a,{onModalClose:p},void 0,s()(b.a,{},void 0,n.i(g.default)("Device Settings")),c&&s()(C.a,{
errorMessage:n.i(m.a)(c,n.i(g.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:h}),s()(S.a,{},void 0,s()("div",{className:A.a.container},void 0,s()(x.a,{className:A.a.deviceImage,serverEntityID:t,model:i,thumb:o,width:150,height:150}),s()("div",{className:A.a.info},void 0,s()("div",{className:A.a.model},void 0,i),s()("div",{},void 0,r),s()("div",{className:A.a.settings},void 0,l.map(function(e){var t=e.id;return f.a.createElement(D.a,a()({key:t},e))
}))))),s()(I.a,{},void 0,s()(w.a,{},void 0,s()(P.a,{kind:v.b.DEFAULT,size:v.d.MEDIUM,onPress:p},void 0,n.i(g.default)("Cancel")),s()(T.a,{type:"submit",isSpinning:u,kind:v.b.PRIMARY,size:v.d.MEDIUM},void 0,n.i(g.default)("Save"))))))},t}(p.Component);t.a=k},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e,t){return t.dvrID},n.i(v.a)(),function(e,t){return{dvrID:e,deviceID:t.key,model:t.model,uri:t.uri,prefs:t.prefs,thumb:t.thumb,isSaving:t.isSaving,
saveError:t.saveError}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(41)),v=n(329),y=n(89),b=n(2010),S=function(e){function t(){var i,a,r;o()(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=a=u()(this,e.call.apply(e,[this].concat(l))),a.onSubmit=function(e){var t=a.props,i=t.serverEntityID,r=t.dvrID,s=t.deviceID;n.i(m.a)(function(){a.props.saveDeviceSettings({serverEntityID:i,dvrID:r,
deviceID:s,prefs:e})})},a.onErrorDismiss=function(){var e=a.props,t=e.dvrID,n=e.deviceID;a.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n})},a.onModalClose=function(){var e=a.props,t=e.dvrID,n=e.deviceID;a.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n}),a.props.onModalClose()},r=i,u()(a,r)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onModalClose:this.onModalClose}))},t
}(h.Component);t.a=n.i(f.b)(i,{saveDeviceSettings:y.x,clearDeviceSettingsSaveError:y.y})(S)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.isDvrsPending,a=e.dvrsError,s=e.dvrs;return a?r()("div",{},void 0,n.i(o.default)("Unable to load DVRs")):i?r()(l.a,{label:n.i(o.default)("Loading DVRs")}):r()("div",{},void 0,s.map(function(e){return r()(u.a,{dvrID:e.key,serverEntityID:t,lineupTitle:e.lineupTitle,devices:e.devices},e.key)}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(36),u=n(2015);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.ui.liveTVSettingsPage;return{isDvrsPending:t.isDvrsPending,dvrsError:t.dvrsError,dvrs:t.dvrs}}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(1),d=n.n(c),h=n(14),p=n(41),f=n(546),g=n(2012),m={fetchDVRs:f.c},v=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){this.props.hasDVRFeature&&this._populate(this.props)},
t.prototype.componentDidUpdate=function(e){this.props.hasDVRFeature&&!e.hasDVRFeature&&this._populate(this.props)},t.prototype._populate=function(e){n.i(p.a)(function(){e.fetchDVRs({serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return d.a.createElement(g.a,this.props)},t}(c.Component);t.a=n.i(h.b)(i,m)(v)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(4)),p=n(46),f=n(84),g=n(22),m=n(27),v=n(29),y=n(25),b=n(90),S=n(195),I=n(2008),w=n(884),M=n(2021),C=n(2601),D=n.n(C),P={context:f.e},T=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRemoveDVRPress=function(){a.setState({isRemoveDVRModalOpen:!0})},a.onRemoveDVRConfirm=function(){a.setState({isRemoveDVRModalOpen:!1}),a.props.onRemoveDVR()},a.onRemoveDVRCancel=function(){a.setState({isRemoveDVRModalOpen:!1})},a.onDVRSettingsPress=function(){a.setState({
isDVRSettingsModalOpen:!0})},a.onDVRSettingsModalClose=function(){a.setState({isDVRSettingsModalOpen:!1})},a.onAddDevicePress=function(){a.setState({isAddDeviceModalOpen:!0})},a.onModalClose=function(){a.setState({isAddDeviceModalOpen:!1})},a.state={isRemoveDVRModalOpen:!1,isDVRSettingsModalOpen:!1,isAddDeviceModalOpen:!1},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.dvrID,r=e.lineupTitle,s=e.devices,o=e.epgDownloadActivity,l=e.onReloadGuidePress,u=this.state,c=u.isRemoveDVRModalOpen,d=u.isDVRSettingsModalOpen;return a()("div",{className:D.a.dvr},void 0,a()("div",{className:D.a.header},void 0,a()("div",{className:D.a.name},void 0,n.i(h.default)("DVR"),a()(b.a,{className:D.a.separator}),r),a()(y.a,{className:D.a.deleteLink,kind:g.b.PRIMARY,onPress:this.onRemoveDVRPress},void 0,n.i(h.default)("Delete DVR"))),a()("div",{
className:D.a.actions},void 0,a()("div",{},void 0,o?a()("div",{},void 0,a()(v.a,{className:D.a.actionIcon,name:"plex-icon-reload-560"}),o.title," (",o.progress,"%)",a()(b.a,{className:D.a.separator}),o.subtitle):a()(y.a,{kind:g.b.PRIMARY,onPress:l},void 0,a()(v.a,{className:D.a.actionIcon,name:"plex-icon-reload-560"}),n.i(h.default)("Refresh Program Guide"))),a()("div",{},void 0,a()(y.a,{kind:g.b.PRIMARY,onPress:this.onDVRSettingsPress},void 0,a()(v.a,{className:D.a.actionIcon,
name:"plex-icon-settings-560","aria-label":n.i(h.default)("DVR Settings")}),n.i(h.default)("DVR Settings")))),a()("div",{className:D.a.devices},void 0,s.map(function(e){return a()(I.a,{serverEntityID:t,dvrID:i,deviceID:e.key,canRemoveDevice:s.length>1,model:e.model,uri:e.uri,channelMappings:e.channelMappings,tunerCount:e.tuners,status:e.status,thumb:e.thumb},e.key)})),a()(y.a,{kind:g.b.PRIMARY,onPress:this.onAddDevicePress},void 0,a()(v.a,{className:D.a.addDeviceIcon,name:"plex-icon-add-560"
}),n.i(h.default)("Add Device")),a()(S.a,{isOpen:c,metricsPage:p.q,title:n.i(h.default)("Delete DVR"),message:n.i(h.default)("Deleting your DVR will remove the Program Guide, and all scheduled recordings will be suspended. Programming you've previously recorded will remain in your library."),confirmLabel:n.i(h.default)("Delete"),kind:g.b.DANGER,onConfirm:this.onRemoveDVRConfirm,onCancel:this.onRemoveDVRCancel}),a()(M.a,{isOpen:d,serverEntityID:t,dvrID:i,metricsProperties:P,
onModalClose:this.onDVRSettingsModalClose}),a()(w.a,{isOpen:this.state.isAddDeviceModalOpen,serverEntityID:t,dvrID:i,metricsProperties:P,onModalClose:this.onModalClose}))},t}(d.Component);t.a=T},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(14),f=n(8),g=(n.n(f),n(839)),m=n(546),v=n(2014),y=n.i(f.createStructuredSelector)({epgDownloadActivity:n.i(g.a)()}),b={removeDVR:m.d,reloadGuide:m.e},S=function(e){function t(){var n,i,a
;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onRemoveDVR=function(){i.props.removeDVR({serverEntityID:i.props.serverEntityID,dvrID:i.props.dvrID})},i.onReloadGuidePress=function(){i.props.reloadGuide({serverEntityID:i.props.serverEntityID,dvrID:i.props.dvrID})},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){return h.a.createElement(v.a,a()({onRemoveDVR:this.onRemoveDVR,
onReloadGuidePress:this.onReloadGuidePress},this.props))},t}(d.Component);t.a=n.i(p.b)(y,b)(S)},function(e,t,n){"use strict";function i(e){var t=e.channelMappings,n=e.lineupChannels,i=e.channelScanActivity,a=e.scanPrefs,s=e.scanNetworks,p=e.allChannelMappingsEnabled,g=e.allChannelMappingsDisabled,m=e.onAllChannelMappingsEnabledChange;return i?r()("div",{className:f.a.progressContainer},void 0,r()(o.a,{size:90,progress:i.progress})):a.length?r()(l.a,{className:f.a.scroller,autoScroll:!0
},void 0,r()(d.a,{prefs:a})):s.length?r()(h.a,{networks:s}):t.length?r()(l.a,{className:f.a.scroller,autoScroll:!0},void 0,r()(u.a,{allChannelMappingsEnabled:p,allChannelMappingsDisabled:g,onAllChannelMappingsEnabledChange:m}),t.map(function(e){var t=e.key,i=e.deviceIdentifier,a=e.name,s=e.enabled,o=e.lineupIdentifier,l=e.drm,u=e.isChannelMissing;return r()(c.a,{name:t,initialValue:{enabled:s,lineupIdentifier:o},deviceIdentifier:i,channelName:a,drm:l,isChannelMissing:u,lineupChannels:n},t)
})):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(268)),l=n(74),u=n(890),c=n(889),d=n(887),h=n(886),p=n(2602),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.dvrID,i=e.deviceID,a=e.metricsProperties,s=e.isOpen,c=e.onModalClose;return r()(l.a,{metricsPage:o.t,metricsProperties:a,isOpen:s,preventCloseOnBackdropPress:!0,onModalClose:c},void 0,r()(u.a,{serverEntityID:t,dvrID:n,deviceID:i,onModalClose:c}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(46)),l=n(147),u=n(2020);t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(m.a)(),n.i(v.a)(),function(e,t){return{dvrID:e.key,deviceID:t.key}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(400)),v=n(329),y=n(89),b=n(2017),S=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=u()(this,e.call.apply(e,[this].concat(s))),
i.onModalClose=function(){i.props.clearDVRSetup({serverEntityID:i.props.serverEntityID}),i.props.onModalClose()},a=n,u()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onModalClose:this.onModalClose}))},t}(h.Component);t.a=n.i(f.b)(i,{clearDVRSetup:y.a})(S)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(4)),p=n(211),f=n(22),g=n(36),m=n(51),v=n(110),y=n(120),b=n(227),S=n(111),I=n(123),w=n(75),M=n(112),C=n(91),D=n(880),P=n(891),T=n(2016),x=n(2603),E=n.n(x),A=a()(g.a,{}),k=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onScanDeviceChannelsButtonPress=function(){var e=a.props,t=e.scanPrefs,n=e.scanNetworks,i=e.channelScanActivity,r=e.onScanDeviceChannels,s=e.onCancelScanDeviceChannels;t.length||n.length||(i?s():r(a.props.country))},a.onSubmit=function(e){
var t=a.props,n=t.scanPrefs,i=t.scanNetworks,r=t.onSubmit;if(n.length||i.length){var s=a.props.scanPrefs.length?{prefs:e}:e;a.props.onScanDeviceChannels(a.props.country,s)}else r(e)},a.state={channelScanningFormState:{}},a}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.channelMappings,i=e.lineupChannels,r=e.isChannelMappingsPending,s=e.isLineupChannelsPending,o=e.isDeviceChannelsPending,l=e.channelMappingsError,u=e.lineupChannelsError,c=e.deviceChannelsError,d=e.isChannelMappingsSaving,g=e.channelMappingsSaveError,P=e.formState,x=e.allChannelMappingsEnabled,k=e.allChannelMappingsDisabled,L=e.isCancellingChannelScan,_=e.scanPrefs,N=e.scanNetworks,R=e.channelScanActivity,O=e.onAllChannelMappingsEnabledChange,j=e.onFormStateChange,z=e.onModalClose,U=e.onDismissSaveError,F=R&&!L,B=r||s||o,V=l||u||c,H=!F&&B,W=R?parseInt(R.Response.channels,10):0,Y=void 0
;Y=1===W?n.i(h.default)("Scanning channels. 1 channel found."):W>1?n.i(h.default)("Scanning channels. {channelCount} channels found.",{channelCount:W}):n.i(h.default)("Scanning channels. No channels found.");var Q=!(!_.length&&!N.length);return V?a()(D.a,{message:n.i(h.default)("Unable to load channel mappings"),onModalClose:z}):a()(y.a,{className:E.a.form,formState:P,onChange:j,onSubmit:this.onSubmit},void 0,a()(S.a,{onModalClose:z
},void 0,a()(I.a,{},void 0,n.i(h.default)("Manage Channels")),H&&a()(w.a,{},void 0,a()("div",{className:E.a.centeredContainer},void 0,A)),!H&&!!g&&a()("div",{},void 0,a()(b.a,{errorMessage:n.i(p.a)(g,n.i(h.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:U})),!H&&a()(w.a,{className:R?void 0:E.a.manageChannelsBody,scrollDirection:R?f.a.VERTICAL:f.a.NONE},void 0,a()("div",{className:E.a.scanChannelsContainer},void 0,a()("div",{className:E.a.scanChannelsMessage
},void 0,R?Y:n.i(h.default)('Click "Scan Channels" to refresh this list, or create a new DVR to use a different lineup.')),a()("div",{},void 0,a()(v.a,{type:Q?"submit":"button",size:f.d.MEDIUM,isSpinning:L,isDisabled:L,onPress:this.onScanDeviceChannelsButtonPress},void 0,F?n.i(h.default)("Stop scanning"):n.i(h.default)("Scan channels")))),a()(T.a,{channelMappings:t,lineupChannels:i,channelScanActivity:R,scanPrefs:_,scanNetworks:N,allChannelMappingsEnabled:x,allChannelMappingsDisabled:k,
onAllChannelMappingsEnabledChange:O})),a()(M.a,{},void 0,a()(C.a,{},void 0,a()(m.a,{kind:f.b.DEFAULT,size:f.d.MEDIUM,onPress:z},void 0,n.i(h.default)("Cancel")),a()(v.a,{type:"submit",kind:f.b.PRIMARY,size:f.d.MEDIUM,isDisabled:H||!!R,isSpinning:d},void 0,n.i(h.default)("Save"))))))},t}(d.Component);k.defaultProps={scanPrefs:[],scanNetworks:[]},t.a=n.i(P.a)(k)},function(e,t,n){"use strict";function i(){
return n.i(y.createSelector)(n.i(S.a)(),n.i(I.a)(),n.i(w.a)(),n.i(M.a)(),C.a,D.a,function(e,t,n,i,a,r){var s=e.country,o=e.lineup,l=a.isChannelMappingsPending,u=a.isLineupChannelsPending,c=a.channelMappingsError,d=a.lineupChannelsError,h=a.isChannelMappingsSaving,p=a.channelMappingsSaveError,f=a.scanPrefs,g=a.scanNetworks;return{country:s,lineupUUID:e.lineup,lineupTitle:o,channelMappings:n,lineupChannels:r,isChannelMappingsPending:l,isLineupChannelsPending:u,
isDeviceChannelsPending:t.isChannelsPending,channelMappingsError:c,lineupChannelsError:d,isChannelMappingsSaving:h,channelMappingsSaveError:p,deviceChannelsError:t.channelsError,scanPrefs:f,scanNetworks:g,channelScanActivity:i}})}function a(e,t){var i=t.serverEntityID,a=t.dvrID,r=t.deviceID;return{dispatchSelectDevice:function(){e(P.k({serverEntityID:i,dvrID:a,deviceID:r}))},dispatchFetchLineupChannels:function(t){e(P.b({serverEntityID:i,lineupUUID:t}))},dispatchFetchDeviceChannels:function(){
e(P.l({serverEntityID:i,dvrID:a,deviceID:r}))},dispatchFetchChannelMap:function(){e(P.c({serverEntityID:i}))},dispatchCancelScanDeviceChannels:function(){e(P.m({serverEntityID:i,deviceID:r}))},dispatchClearDeviceScanPrefs:function(){e(P.p({serverEntityID:i}))},onScanDeviceChannels:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P.o(f()({serverEntityID:i,dvrID:a,deviceID:r,country:t},n)))},onSubmit:function(t){n.i(b.a)(function(){e(P.z({serverEntityID:i,dvrID:a,
deviceID:r,data:t}))})},onDismissSaveError:function(){n.i(b.a)(function(){e(P.A())})}}}var r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(6),f=n.n(p),g=n(1),m=n.n(g),v=n(14),y=n(8),b=(n.n(y),n(41)),S=n(400),I=n(329),w=n(837),M=n(838),C=n(118),D=n(840),P=n(89),T=n(2019),x=function(e){function t(n,i){l()(this,t);var a=c()(this,e.call(this,n,i));return a.onCancelScanDeviceChannels=function(){a.setState({isCancellingChannelScan:!0}),
a.props.dispatchCancelScanDeviceChannels(a.props.deviceID)},a.state={isCancellingChannelScan:!!n.channelScanActivity},a}return h()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.lineupUUID,i=e.dispatchClearDeviceScanPrefs,a=e.dispatchSelectDevice,r=e.dispatchFetchLineupChannels,s=e.dispatchFetchDeviceChannels;n.i(b.a)(function(){i(),a(),r(t),s()})},t.prototype.componentWillReceiveProps=function(e){!e.channelScanActivity&&this.props.channelScanActivity&&this.setState({
isCancellingChannelScan:!1})},t.prototype.componentDidUpdate=function(e,t){var i=this;e.isChannelMappingsSaving&&!this.props.isChannelMappingsSaving&&null==this.props.channelMappingsSaveError&&this.props.onModalClose(),this.props.channelScanActivity||!e.channelScanActivity||this.props.scanNetworks||n.i(b.a)(function(){i.props.dispatchFetchDeviceChannels()})},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,i=e.deviceID
;e.channelScanActivity&&!this.state.isCancellingChannelScan&&this.props.dispatchCancelScanDeviceChannels({serverEntityID:t,dvrID:n,deviceID:i})},t.prototype.render=function(){var e=this.props,t=(e.dispatchSelectDevice,e.dispatchFetchLineupChannels,e.dispatchFetchDeviceChannels,e.dispatchFetchChannelMap,e.dispatchCancelScanDeviceChannels,e.dispatchClearDeviceScanPrefs,
s()(e,["dispatchSelectDevice","dispatchFetchLineupChannels","dispatchFetchDeviceChannels","dispatchFetchChannelMap","dispatchCancelScanDeviceChannels","dispatchClearDeviceScanPrefs"]));return m.a.createElement(T.a,f()({isCancellingChannelScan:this.state.isCancellingChannelScan,onCancelScanDeviceChannels:this.onCancelScanDeviceChannels},t))},t}(g.Component);t.a=n.i(v.b)(i,a)(x)},function(e,t,n){"use strict";function i(e){
var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,a=u()(e,["isOpen","metricsProperties","onModalClose"]);return o()(p.a,{isOpen:t,metricsPage:h.r,metricsProperties:n,onModalClose:i},void 0,d.a.createElement(f.a,r()({onModalClose:i},a)))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(46),p=n(147),f=n(2023);t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(211),v=n(22),y=n(111),b=n(123),S=n(75),I=n(112),w=n(91),M=n(120),C=n(227),D=n(418),P=n(51),T=n(110),x=n(2604),E=n.n(x),A=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidUpdate=function(e,t){e.isSaving&&!this.props.isSaving&&null==this.props.saveError&&this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.prefs,i=e.isSaving,r=e.saveError,o=e.onSubmit,l=e.onErrorDismiss,u=e.onModalClose;return s()(M.a,{className:E.a.form,onSubmit:o},void 0,s()(y.a,{onModalClose:u},void 0,s()(b.a,{},void 0,n.i(g.default)("DVR Settings")),r&&s()(C.a,{errorMessage:n.i(m.a)(r,n.i(g.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:l}),s()(S.a,{},void 0,t.map(function(e){var t=e.id;return f.a.createElement(D.a,a()({key:t},e))
})),s()(I.a,{},void 0,s()(w.a,{},void 0,s()(P.a,{kind:v.b.DEFAULT,size:v.d.MEDIUM,onPress:u},void 0,n.i(g.default)("Cancel")),s()(T.a,{type:"submit",isSpinning:i,kind:v.b.PRIMARY,size:v.d.MEDIUM},void 0,n.i(g.default)("Save"))))))},t}(p.Component);t.a=A},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),function(e){return{prefs:e.prefs,isSaving:e.isSaving,saveError:e.saveError}})}
var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(41)),v=n(400),y=n(89),b=n(2022),S=function(e){function t(){var i,a,r;o()(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=a=u()(this,e.call.apply(e,[this].concat(l))),a.onSubmit=function(e){var t=a.props,i=t.serverEntityID,r=t.dvrID;n.i(m.a)(function(){a.props.saveDVRSettings({serverEntityID:i,dvrID:r,prefs:e})})},a.onErrorDismiss=function(){
a.props.clearDVRSettingsSaveError({dvrID:a.props.dvrID})},a.onModalClose=function(){a.props.clearDVRSettingsSaveError({dvrID:a.props.dvrID}),a.props.onModalClose()},r=i,u()(a,r)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,onModalClose:this.onModalClose}))},t}(h.Component);t.a=n.i(f.b)(i,{saveDVRSettings:y.u,clearDVRSettingsSaveError:y.v})(S)},function(e,t,n){"use strict";function i(e){
var t=e.machineIdentifier;return e.isRefreshing?r()(c.a,{icon:"plex-icon-shows-broadcast-560",title:n.i(o.default)("We're now building your Program Guide"),description:n.i(o.default)("Hang tight while we download all the data for what's on")}):r()(c.a,{icon:"plex-icon-shows-broadcast-560",title:n.i(o.default)("The Program Guide is empty"),description:n.i(o.default)("Please verify your channel mappings and refresh the Program Guide")},void 0,r()(u.a,{
to:"#!/settings/server/"+encodeURIComponent(t)+"/dvr",kind:l.b.PRIMARY},void 0,n.i(o.default)("Go to DVR Settings")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(25),c=n(172);t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(v.a,function(e){return{step:e.step}})}var a=n(16),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),
n(396)),v=n(118),y=n(89),b=n(2038),S=n(2036),I=n(2034),w=n(2042),M=n(2032),C=n(2029),D={clearDVRSetup:y.a},P=function(e){function t(){return o()(this,t),u()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentWillUnmount=function(){this.props.clearDVRSetup()},t.prototype.render=function(){var e=this.props,t=e.step,n=r()(e,["step"]);switch(t){case m.a.DEVICE:return p.a.createElement(M.a,n);case m.a.DEVICE_CHANNELS:return p.a.createElement(C.a,n);case m.a.EPG:
return p.a.createElement(b.a,n);case m.a.EPG_MAPPING:return p.a.createElement(S.a,n);case m.a.CHANNEL_MAPPING:return p.a.createElement(w.a,n);case m.a.EPG_DOWNLOAD:return p.a.createElement(I.a,n)}},t}(h.Component);t.a=n.i(f.b)(i,D)(P)},function(e,t,n){"use strict";function i(e){var t=e.identifier,n=e.name;return r()("div",{className:l.a.channel},void 0,r()("div",{className:l.a.channelIdentifier},void 0,t),r()("div",{},void 0,n))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2610)),l=n.n(o);t.a=i
},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(22),v=n(51),y=n(110),b=n(74),S=n(120),I=n(193),w=n(121),M=n(194),C=n(75),D=n(91),P=n(269),T=n(341),x=n(572),E=n(885),A=n(888),k=n(2028),L=n(2030),_=n(2611),N=n.n(_),R=s()(x.a,{}),O=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),
i.onScanDeviceChannelsPress=function(e){var t=i.props.scanPrefs.length?{prefs:e}:e;i.props.onScanDeviceChannels(t)},i.onDeviceSourceSelect=function(e){i.props.onDeviceSourceSelect(e),i.clearExistingScanPrefs()},i.onCountrySelect=function(e){i.props.onCountrySelect(e),i.clearExistingScanPrefs()},a=n,c()(i,a)}return h()(t,e),t.prototype.clearExistingScanPrefs=function(){var e=this.props,t=e.selectedDevice,n=e.scanPrefs,i=e.scanNetworks,a=e.onScanDeviceChannels,r=e.onClearDeviceScanPrefs
;n.length?(r(),a(t.deviceID)):i.length&&r()},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.dvrID,r=e.selectedDevice,o=e.setupErrorMessage,l=e.isChannelsPending,u=e.sourceOptions,c=e.channelScanActivity,d=e.isCancellingChannelScan,h=e.selectedCountryCode,p=e.countryOptions,x=e.countriesPopulated,_=e.scanPrefs,O=e.scanNetworks,j=e.hasScannedChannels,z=e.onCancelScanDeviceChannels,U=e.onModalClose,F=r.selectedSource||r.sources[0],B=c?parseInt(c.Response.channels,10):r.channels.length,V=!(!B||c||l),H=!!_.length,W=!!O.length,Y=[{
"":n.i(g.default)("Select Country")}].concat(p),Q=!(r&&r.channels.length&&!c&&h);return s()(P.a,{errorMessage:o,onModalClose:U},void 0,s()(C.a,{className:N.a.deviceInfoBody,scrollDirection:m.a.NONE},void 0,s()(S.a,{className:N.a.deviceInfoForm,onSubmit:this.onScanDeviceChannelsPress},void 0,s()("div",{className:N.a.channelInfo},void 0,s()(L.a,{channelCount:B,isChannelsPending:l,channelScanActivity:c,hasScanPrefs:H,hasScanNetworks:W}),s()("div",{},void 0,s()(y.a,{type:c?"button":"submit",
kind:c||B||l?m.b.DEFAULT:m.b.PRIMARY,size:m.d.MEDIUM,isSpinning:d,isDisabled:!h||d,onPress:c?z:null},void 0,c?n.i(g.default)("Stop scanning"):n.i(g.default)("Scan channels")))),s()("div",{className:N.a.channelDetails},void 0,s()("div",{className:N.a.deviceDetails},void 0,f.a.createElement(A.a,a()({serverEntityID:t,deviceID:r.key,channelCount:B,includeChannelCount:!0},r)),s()(I.a,{},void 0,s()(M.a,{className:N.a.channelScanSourceSelect,name:"deviceSource",value:F,values:u,isDisabled:!!c,
onChange:this.onDeviceSourceSelect})),x&&s()(I.a,{className:N.a.countryInputGroup},void 0,s()(w.a,{},void 0,n.i(g.default)("Country")),s()(M.a,{name:"countrySelect",value:h,values:Y,isDisabled:!!c,onChange:this.onCountrySelect}))),s()("div",{className:N.a.deviceChannelsContainer},void 0,s()(b.a,{className:V?N.a.deviceChannels:N.a.deviceChannelsInfo,autoScroll:!0},void 0,s()(k.a,{selectedDevice:r,channelCount:B,isChannelsPending:l,channelScanActivity:c,scanPrefs:_,scanNetworks:O,
hasScannedChannels:j})))))),s()(T.a,{},void 0,s()(D.a,{},void 0,s()(v.a,{kind:m.b.DEFAULT,size:m.d.MEDIUM,onPress:U},void 0,n.i(g.default)("Cancel"))),s()(D.a,{},void 0,R,s()(E.a,{dvrID:i,isDisabled:Q}))))},t}(p.Component);O.defaultProps={scanPrefs:[],scanNetworks:[]},t.a=O},function(e,t,n){"use strict";function i(e){var t=e.selectedDevice,i=e.channelCount,a=e.isChannelsPending,s=e.channelScanActivity,u=e.scanPrefs,m=e.scanNetworks,y=e.hasScannedChannels;return s?o()("div",{
className:v.a.container},void 0,o()(h.a,{size:90,progress:s.progress}),o()("div",{className:v.a.message},void 0,n.i(l.default)("Scanning channels"))):u.length?o()(f.a,{className:v.a.settings,prefs:u}):m.length?o()(g.a,{className:v.a.settings,networks:m}):a?o()("div",{className:v.a.container},void 0,o()("div",{className:v.a.message},void 0,n.i(l.default)("Loading channels"))):i?o()("div",{},void 0,t.channels.map(function(e){return c.a.createElement(p.a,r()({key:e.identifier},e))})):y?o()("div",{
className:v.a.container},void 0,o()("div",{className:v.a.noChannelsIconContainer},void 0,o()("div",{className:v.a.noChannelsIconBackground},void 0,o()(d.a,{className:v.a.noChannelsIcon,name:"plex-icon-alert-560"}))),o()("div",{className:v.a.message},void 0,n.i(l.default)("No channels found. Make sure your device has a signal from your antenna and try scanning again."))):o()("div",{className:v.a.container},void 0,o()("div",{className:v.a.clockContainer},void 0,o()("div",{
className:v.a.clockBackground}),o()(d.a,{className:v.a.clockTime,name:"plex-icon-dvr-clock-hour-560"}),o()(d.a,{className:v.a.clock,name:"plex-icon-dvr-clock-separator-560"}),o()(d.a,{className:v.a.clockTime,name:"plex-icon-dvr-clock-minutes-560"})),o()("div",{className:v.a.message},void 0,n.i(l.default)("Awaiting channel scan")))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(4),u=n(1),c=n.n(u),d=n(29),h=n(268),p=n(2026),f=n(887),g=n(886),m=n(2612),v=n.n(m);t.a=i},function(e,t,n){"use strict"
;function i(){return n.i(y.createSelector)(I.a,M.a,n.i(w.a)(),function(e,t,i){var a=e.selectedDevice,r=a.sources.reduce(function(e,t){var i,a;switch(t){case"0":e.push((i={},i[t]=n.i(b.default)("Antenna"),i));break;case"1":e.push((a={},a[t]=n.i(b.default)("Cable"),a))}return e},[]),s=e.scanPrefs,o=e.scanNetworks,l=e.hasScannedChannels,u=e.epgSettings,c=u.selectedCountry,d=u.countries,h=d.length>0,p=c?c.code:"",f=d.reduce(function(e,t){var n;return e.push((n={},n[t.code]=t.title,n)),e},[]);return{
selectedDevice:a,setupErrorMessage:t,isChannelsPending:a.isChannelsPending,sourceOptions:r,countriesPopulated:h,selectedCountryCode:p,countryOptions:f,scanPrefs:s,scanNetworks:o,hasScannedChannels:l,channelScanActivity:i}})}function a(e,t){var i=t.serverEntityID;return{dispatchFetchDeviceDetails:function(){e(C.k({serverEntityID:i}))},dispatchFetchDeviceChannels:function(){e(C.l({serverEntityID:i}))},dispatchFetchEPGCountries:function(){e(n.i(D.fetchEPGCountries)({serverEntityID:i}))},
dispatchCancelScanDeviceChannels:function(t){e(C.m({serverEntityID:i,deviceID:t}))},onDeviceSourceSelect:function(t){e(C.n({serverEntityID:i,source:t}))},onScanDeviceChannels:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e(C.o(f()({serverEntityID:i},t)))},onCountrySelect:function(t){e(n.i(D.selectEPGCountry)({serverEntityID:i,countryCode:t}))},onClearDeviceScanPrefs:function(){e(C.p({serverEntityID:i}))}}}
var r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(6),f=n.n(p),g=n(1),m=n.n(g),v=n(14),y=n(8),b=(n.n(y),n(4)),S=n(41),I=n(118),w=n(838),M=n(262),C=n(89),D=n(397),P=n(2027),T=function(e){function t(n,i){l()(this,t);var a=c()(this,e.call(this,n,i));return a.onCancelScanDeviceChannels=function(){a.setState({isCancellingChannelScan:!0}),a.props.dispatchCancelScanDeviceChannels(a.props.selectedDevice.key)},a.state={isCancellingChannelScan:!1},a}return h()(t,e),
t.prototype.componentWillMount=function(){this.props.channelScanActivity&&this.setState({isCancellingChannelScan:!0})},t.prototype.componentDidMount=function(){var e=this,t=this.props.selectedDevice,i=t.source>-1?t.source.toString():t.sources[0];n.i(S.a)(function(){e.props.dispatchFetchDeviceDetails(),e.props.dispatchFetchDeviceChannels(),e.props.dispatchFetchEPGCountries(),e.props.onDeviceSourceSelect(i),e.props.onClearDeviceScanPrefs()})},t.prototype.componentWillReceiveProps=function(e){
!e.channelScanActivity&&this.props.channelScanActivity&&this.setState({isCancellingChannelScan:!1})},t.prototype.componentDidUpdate=function(e,t){var i=this;this.props.channelScanActivity||!e.channelScanActivity||this.props.scanNetworks||n.i(S.a)(function(){i.props.dispatchFetchDeviceChannels()})},t.prototype.componentWillUnmount=function(){this.props.channelScanActivity&&!this.state.isCancellingChannelScan&&this.props.dispatchCancelScanDeviceChannels(this.props.selectedDevice.key)},
t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchDeviceDetails,e.dispatchFetchDeviceChannels,e.dispatchFetchEPGCountries,e.dispatchCancelScanDeviceChannels,s()(e,["dispatchFetchDeviceDetails","dispatchFetchDeviceChannels","dispatchFetchEPGCountries","dispatchCancelScanDeviceChannels"]));return m.a.createElement(P.a,f()({isCancellingChannelScan:this.state.isCancellingChannelScan,onCancelScanDeviceChannels:this.onCancelScanDeviceChannels},t))},t}(g.Component);t.a=n.i(v.b)(i,a)(T)
},function(e,t,n){"use strict";function i(e){var t=e.channelCount,i=e.isChannelsPending,a=e.channelScanActivity,r=e.hasScanPrefs,s=e.hasScanNetworks
;return a?n.i(o.default)("Scanning for channels... This may take some time."):r?n.i(o.default)("We need some more information before proceeding with the channel scan."):s?n.i(o.default)("Please select a network before proceeding with the channel scan."):i?n.i(o.default)("Fetching device channels"):t?n.i(o.default)("We found {channelCount} channels. If these don't look right, you can scan again.",{channelCount:t
}):n.i(o.default)("Make sure your device is connected to your antenna or cable and click Scan Channels.")}function a(e){var t=i(e);return s()("div",{className:c.a.message},void 0,t)}var r=n(3),s=n.n(r),o=n(4),l=n(1),u=(n.n(l),n(2613)),c=n.n(u);t.a=a},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(22),v=n(36),y=n(74),b=n(51),S=n(110),I=n(412),w=n(193),M=n(121),C=n(145),D=n(75),P=n(91),T=n(269),x=n(341),E=n(885),A=n(888),k=n(2614),L=n.n(k),_=s()(v.a,{}),N=function(e){function t(n,i){l()(this,t);var a=c()(this,e.call(this,n,i));return a.onShowDeviceAddressPress=function(){a.setState({showManualAddress:!a.state.showManualAddress})},a.onDeviceAddressChange=function(e){a.setState({
manualDeviceAddress:e})},a.onAddDevicePress=function(){a.props.onAddDevice(a.state.manualDeviceAddress)},a.state={showManualAddress:!1,manualDeviceAddress:""},a}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.selectedDevice,r=e.setupErrorMessage,o=e.addDevicePending,l=e.devices,u=e.onSelectDevice,c=e.onModalClose,d=this.state,h=d.showManualAddress,p=d.manualDeviceAddress,v=l.length>0;return s()(T.a,{errorMessage:r,onModalClose:c
},void 0,s()(D.a,{},void 0,v&&s()("div",{className:L.a.message},void 0,s()("div",{},void 0,n.i(g.default)("We found hardware we recognize!"))),!v&&s()("div",{className:L.a.message},void 0,s()("div",{},void 0,n.i(g.default)("Looking for compatible devices on your network..."))),s()("div",{className:L.a.manualDeviceButtonContainer},void 0,s()(I.a,{kind:m.b.PRIMARY,direction:h?m.f.UP:m.f.DOWN,isSelected:!1,onPress:this.onShowDeviceAddressPress
},void 0,n.i(g.default)("Don't see your device? Enter its network address manually"))),s()("div",{className:L.a.manualDeviceContainer},void 0,h&&s()("div",{},void 0,s()(w.a,{},void 0,s()(M.a,{},void 0,n.i(g.default)("Device Address")),s()(C.a,{type:"text",name:"manualDeviceInput",className:L.a.manualDeviceInput,value:this.state.manualDeviceAddress,placeholder:n.i(g.default)("IP address or hostname"),onChange:this.onDeviceAddressChange}),s()(S.a,{className:L.a.addDeviceButton,kind:m.b.PRIMARY,
size:m.d.LARGE,isDisabled:!p,isSpinning:o,onPress:this.onAddDevicePress},void 0,n.i(g.default)("Connect"))))),!v&&s()("div",{className:L.a.spinnerContainer},void 0,_),v&&s()("div",{className:L.a.existingDevices},void 0,s()("div",{className:L.a.deviceCount},void 0,1===l.length?n.i(g.default)("1 device found"):n.i(g.default)("{deviceCount} devices found",{deviceCount:l.length})),s()(y.a,{className:L.a.devices,scrollDirection:m.a.HORIZONTAL},void 0,l.map(function(e){var n=i&&i.key===e.key
;return f.a.createElement(A.a,a()({key:e.key,className:L.a.device,serverEntityID:t,deviceID:e.key,isSelectable:!0,isSelected:n,includeUri:!0,onSelectDevice:u},e))})))),s()(x.a,{},void 0,s()(P.a,{},void 0,s()(b.a,{kind:m.b.DEFAULT,size:m.d.MEDIUM,onPress:c},void 0,n.i(g.default)("Cancel"))),s()(P.a,{},void 0,s()(E.a,{isDisabled:!i}))))},t}(p.Component);t.a=N},function(e,t,n){"use strict";function i(){return n.i(y.createSelector)(I.a,w.a,D,function(e,t,n){return{
isDiscoveringDevices:e.isDiscoveringDevices,selectedDevice:e.selectedDevice,setupErrorMessage:t,addDevicePending:e.addDevicePending,devices:n}})}function a(e,t){var i=t.serverEntityID;return{dispatchDiscoverDevices:function(){e(n.i(M.q)({serverEntityID:i}))},dispatchFetchDevices:function(){e(n.i(M.r)({serverEntityID:i}))},onAddDevice:function(t){e(n.i(M.s)({serverEntityID:i,uri:t}))},onSelectDevice:function(t){e(n.i(M.t)({serverEntityID:i,deviceID:t}))}}}
var r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=n.n(g),v=n(14),y=n(8),b=(n.n(y),n(41)),S=n(326),I=n(118),w=n(262),M=n(89),C=n(2031),D=n.i(y.createSelector)(function(e){return e.ui.liveTVSettingsPage.dvrSetup.devices},function(e){return f.a.filter(e,function(e){return!e.parentID&&e.status===S.a.ALIVE})}),P=function(e){function t(n){l()(this,t);var i=c()(this,e.call(this,n));return i._discoverDevices=function(){i.props.dispatchDiscoverDevices()},
i._discoverTimeoutID=null,i.discoverDelay=2e3,i}return h()(t,e),t.prototype.componentDidMount=function(){var e=this;n.i(b.a)(function(){e.props.dispatchFetchDevices()}),this._discoverTimeoutID=setTimeout(this._discoverDevices,this.discoverDelay)},t.prototype.componentDidUpdate=function(e){!this.props.isDiscoveringDevices&&e.isDiscoveringDevices&&(this._discoverTimeoutID=setTimeout(this._discoverDevices,this.discoverDelay))},t.prototype.componentWillUnmount=function(){
this._discoverTimeoutID&&clearTimeout(this._discoverTimeoutID)},t.prototype.render=function(){var e=this.props,t=(e.dispatchDiscoverDevices,e.dispatchFetchDevices,s()(e,["dispatchDiscoverDevices","dispatchFetchDevices"]));return m.a.createElement(C.a,t)},t}(g.Component);t.a=n.i(v.b)(i,a)(P)},function(e,t,n){"use strict";function i(e){
var t=e.setupErrorMessage,i=e.machineIdentifier,a=e.epgProviderIdentifier,s=e.epgDownloadActivityID,g=e.progress,v=e.message,y=e.onModalClose,b=encodeURIComponent(i),S=encodeURIComponent(a);return r()(p.a,{errorMessage:t,onModalClose:y},void 0,r()(d.a,{},void 0,r()("div",{className:m.a.message
},void 0,r()("div",{},void 0,n.i(o.default)("Setup complete!")),r()("div",{},void 0,n.i(o.default)("You can now find your Program Guide and Recording Schedule in the sidebar under \"Manage\". While we're grabbing the guide data, you can start browsing; it will update automatically as we download what's on."))),s&&r()("div",{},void 0,r()("div",{className:m.a.spinnerContainer},void 0,r()(u.a,{size:90,progress:g}),r()("div",{className:m.a.spinnerMessage
},void 0,v)))),r()(h.a,{},void 0,r()(f.a,{},void 0,r()(c.a,{kind:l.b.DEFAULT,size:l.d.MEDIUM,onPress:y},void 0,n.i(o.default)("Close")),r()(c.a,{kind:l.b.PRIMARY,size:l.d.MEDIUM,to:"#!/server/"+b+"/provider/"+S,isDisabled:!a},void 0,n.i(o.default)("View Program Guide")))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(268),c=n(51),d=n(75),h=n(112),p=n(269),f=n(91),g=n(2615),m=n.n(g);i.defaultProps={progress:0,message:""},t.a=i},function(e,t,n){"use strict";function i(){
return n.i(u.createSelector)(function(e,t){return t.serverEntityID},n.i(p.a)(),f.a,function(e,t,i){var a=i.selectedDVR;if(a&&t){var r=a.epgIdentifier,s=n.i(d.a)(c.e,r,e);return t.indexOf(s)>-1?r:void 0}})}function a(){return n.i(u.createSelector)(f.a,g.a,n.i(h.a)(),n.i(m.a)(),i(),function(e,t,n,i,a){var r=i||{},s=r.progress,o=r.subtitle;return{setupErrorMessage:t,machineIdentifier:n.machineIdentifier,epgProviderIdentifier:a,epgDownloadActivityID:e.epgDownloadActivityID,progress:s,message:o}})}
function r(e){return o.a.createElement(v.a,e)}var s=n(1),o=n.n(s),l=n(14),u=n(8),c=(n.n(u),n(67)),d=n(62),h=n(54),p=n(727),f=n(118),g=n(262),m=n(839),v=n(2033);t.a=n.i(l.b)(a)(r)},function(e,t,n){"use strict";function i(e){var t=e.setupErrorMessage,i=e.progress,a=e.onModalClose;return r()(p.a,{errorMessage:t,onModalClose:a},void 0,r()(d.a,{},void 0,r()("div",{className:m.a.message
},void 0,r()("div",{},void 0,n.i(o.default)("We're finding the best program guide for your channels and location.")),r()("div",{},void 0,n.i(o.default)("This should only take a few moments."))),r()("div",{className:m.a.spinnerContainer},void 0,r()(u.a,{size:90,progress:i}))),r()(f.a,{},void 0,r()(h.a,{},void 0,r()(c.a,{kind:l.b.DEFAULT,size:l.d.MEDIUM,onPress:a},void 0,n.i(o.default)("Cancel")))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(22),u=n(268),c=n(51),d=n(75),h=n(91),p=n(269),f=n(341),g=n(2616),m=n.n(g);i.defaultProps={progress:0},t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(v.a,y.a,n.i(b.a)(),function(e,t,n){return{setupErrorMessage:t,progress:(d.a.find(n,{uuid:e.epgLineupActivityID})||{}).progress}})}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(2),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(41)),v=n(118),y=n(262),b=n(221),S=n(89),I=n(2035),w={
findBestEPGLineup:S.i},M=function(e){function t(){return r()(this,t),o()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){n.i(m.a)(function(){e.findBestEPGLineup({serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return p.a.createElement(I.a,this.props)},t}(h.Component);t.a=n.i(f.b)(i,w)(M)},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(22),f=n(36),g=n(25),m=n(51),v=n(120),y=n(193),b=n(121),S=n(194),I=n(145),w=n(75),M=n(91),C=n(269),D=n(341),P=n(572),T=n(2040),x=n(2617),E=n.n(x),A=a()(P.a,{}),k=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onShowXMLTVEntryPress=function(){r.setState({showXMLTVEntry:!r.state.showXMLTVEntry})},r.onLanguageSelect=function(e){r.props.onLanguageSelect(e)},
r.onRegionSelect=function(e){r.props.onRegionSelect(e)},r.onXMLTVPathChange=function(e){r.setState({xmlTVPath:e},function(){r.props.onXMLTVProgramGuideChange(e,r.state.programGuideTitle)})},r.onProgramGuideTitleChange=function(e){r.setState({programGuideTitle:e},function(){r.props.onXMLTVProgramGuideChange(r.state.xmlTVPath,e)})},r.state={showXMLTVEntry:!1,xmlTVPath:"",programGuideTitle:n.i(h.default)("My Program Guide")},r}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.platform,r=e.setupErrorMessage,s=e.isFetching,o=e.selectedLanguageCode,l=e.selectedRegionCode,u=e.languageOptions,c=e.regionOptions,d=e.languagesPopulated,P=e.regionsPopulated,x=e.canContinue,k=e.postalCodeExample,L=e.onSubmit,_=e.onModalClose,N=this.state,R=N.showXMLTVEntry,O=N.xmlTVPath,j=N.programGuideTitle,z=d,U=!(!d||!k),F=!(!d||!P),B=[{"":n.i(h.default)("Select Language")}].concat(u),V=[{"":n.i(h.default)("Select Region")
}].concat(c),H="Windows"===i?"C:\\path\\to\\your\\xmltv_file.xml":"/path/to/your/xmltv_file.xml";return a()(v.a,{className:E.a.form,onSubmit:L},void 0,a()(C.a,{errorMessage:r,onModalClose:_},void 0,a()(w.a,{},void 0,a()("div",{className:E.a.message},void 0,a()("div",{},void 0,n.i(h.default)("To download an electronic program guide we need to know your location.")),a()(g.a,{kind:p.b.PRIMARY,onPress:this.onShowXMLTVEntryPress
},void 0,R?n.i(h.default)("Don't use XMLTV? Click here to select your location instead."):n.i(h.default)("Have an XMLTV program guide on your server? Click here to use that instead."))),R&&a()("div",{},void 0,d&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Language")),a()(S.a,{name:"languageSelect",values:B,value:o,onChange:this.onLanguageSelect})),a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("XMLTV Program Guide")),a()(I.a,{name:"xmltvPath",placeholder:H,value:O,
onChange:this.onXMLTVPathChange})),a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Program Guide Title")),a()(I.a,{name:"programGuideTitle",value:j,onChange:this.onProgramGuideTitleChange}))),!R&&a()("div",{},void 0,z&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Language")),a()(S.a,{name:"languageSelect",values:B,value:o,onChange:this.onLanguageSelect})),U&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Postal Code")),a()(T.a,{serverEntityID:t,postalCodeExample:k}),s&&a()(f.a,{
className:E.a.fetchingSpinner})),F&&a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Region")),a()(S.a,{className:E.a.regionInput,name:"regionSelect",values:V,value:l,onChange:this.onRegionSelect}),s&&a()(f.a,{className:E.a.fetchingSpinner})))),a()(D.a,{},void 0,a()(M.a,{},void 0,a()(m.a,{kind:p.b.DEFAULT,size:p.d.MEDIUM,onPress:_},void 0,n.i(h.default)("Cancel"))),a()(M.a,{},void 0,A,a()(m.a,{type:"submit",kind:p.b.PRIMARY,size:p.d.MEDIUM,isDisabled:!x||s
},void 0,n.i(h.default)("Continue"))))))},t}(d.Component);t.a=k},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),y.a,b.a,function(e,t,n){var i=t.selectedLineupUUID,a=t.epgSettings,r=a.isFetching,s=a.selectedCountry,o=a.selectedLanguage,l=a.selectedRegion,u=a.languages,c=a.regions,d=a.lineupGroup,h=s&&1===s.flavor?s.example:null,p=o?o.code:"",f=l?l.key:"",g=u.length>0,m=c.length>0,v=u.reduce(function(e,t){var n;return e.push((n={},n[t.code]=t.title,n)),e
},[]),y=c.reduce(function(e,t){var n;return e.push((n={},n[t.key]=t.title,n)),e},[]);return{platform:e.platform,setupErrorMessage:n,selectedLineupUUID:i,selectedLanguageCode:p,selectedRegionCode:f,languagesPopulated:g,regionsPopulated:m,languageOptions:v,regionOptions:y,isFetching:r,postalCodeExample:h,canContinue:!(!d.lineups.length&&!i||!p)}})}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(6),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),
n(41)),v=n(54),y=n(118),b=n(262),S=n(2037),I=n(89),w=n(397),M=d()({dvrSetupNextStep:I.j,selectEPGLineup:I.d},w),C=function(e){function t(){var n,i,a;r()(this,t);for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return n=i=o()(this,e.call.apply(e,[this].concat(l))),i.onLanguageSelect=function(e){i.props.selectEPGLanguage({serverEntityID:i.props.serverEntityID,languageCode:e})},i.onRegionSelect=function(e){i.props.selectEPGRegion({serverEntityID:i.props.serverEntityID,regionKey:e
})},i.onSubmit=function(){i.props.dvrSetupNextStep()},i.onXMLTVProgramGuideChange=function(e,t){if(!e||!t)return void i.props.selectEPGLineup({lineupUUID:null});e=/^[a-z]\:\\|\\\\/i.test(e)?e.replace(/\\/g,"/"):e,e=0===e.indexOf("/")?e.substring(1):e;var n="lineup://tv.plex.providers.epg.xmltv/"+e+"#"+encodeURI(t);i.props.selectEPGLineup({lineupUUID:n})},a=n,o()(i,a)}return u()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype._populate=function(e){
n.i(m.a)(function(){var t=e.serverEntityID;e.fetchEPGLanguages({serverEntityID:t}),e.selectEPGLineup({lineupUUID:null})})},t.prototype.render=function(){return p.a.createElement(S.a,d()({onLanguageSelect:this.onLanguageSelect,onRegionSelect:this.onRegionSelect,onPostalCodeChange:this.onPostalCodeChange,onXMLTVProgramGuideChange:this.onXMLTVProgramGuideChange,onSubmit:this.onSubmit},this.props))},t}(h.Component);t.a=n.i(f.b)(i,M)(C)},function(e,t,n){"use strict"
;var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=n.n(u),d=n(48),h=n.n(d),p=n(145),f=function(e){function t(n,i){a()(this,t);var r=s()(this,e.call(this,n,i));return r.onPostalCodeChange=function(e){r.setState({postalCode:e},function(){r.props.onPostalCodeChange(e)})},r.state={postalCode:""},r}return l()(t,e),t.prototype.componentWillReceiveProps=function(e){this.state.postalCode!==e.postalCode&&this.setState({postalCode:e.postalCode})},t.prototype.focusInput=function(e){
e&&h.a.findDOMNode(e).focus()},t.prototype.render=function(){var e=this.props.postalCodeExample,t=this.state.postalCode;return c.a.createElement(p.a,{name:"postalCodeInput",placeholder:"e.g. "+e,value:t,ref:this.focusInput,onChange:this.onPostalCodeChange})},t}(u.Component);t.a=f},function(e,t,n){"use strict";function i(e){return{postalCode:e.ui.liveTVSettingsPage.dvrSetup.epgSettings.postalCode}}
var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(41),m=n(397),v=n(2039),y=function(e){function t(i,a){o()(this,t);var r=u()(this,e.call(this,i,a));return r._fetchEPGLineups=function(){r.props.fetchEPGLineups({serverEntityID:r.props.serverEntityID})},r.onPostalCodeChange=function(e){r._postalCodeTimeoutID&&clearTimeout(r._postalCodeTimeoutID),n.i(g.a)(function(){r.props.setEPGPostalCode({serverEntityID:r.props.serverEntityID,postalCode:e}),
""!==e.trim()&&(r._postalCodeTimeoutID=setTimeout(r._fetchEPGLineups,200))})},r._postalCodeTimeoutID=null,r}return d()(t,e),t.prototype.componentWillUnmount=function(){this._postalCodeTimeoutID&&clearTimeout(this._postalCodeTimeoutID)},t.prototype.render=function(){return p.a.createElement(v.a,r()({onPostalCodeChange:this.onPostalCodeChange},this.props))},t}(h.Component);t.a=n.i(f.b)(i,m)(y)},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(22),f=n(74),g=n(36),m=n(51),v=n(110),y=n(194),b=n(120),S=n(75),I=n(91),w=n(269),M=n(341),C=n(572),D=n(891),P=n(890),T=n(889),x=n(2619),E=n.n(x),A=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onLineupsMenuButtonPress=function(){a.setState({isLineupsMenuOpen:!a.state.isLineupMenuOpen})},a.onLineupsMenuClose=function(){a.setState({isLineupsMenuOpen:!1})},a.state={
isLineupsMenuOpen:!1},a}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.dvrID,i=e.setupErrorMessage,r=e.selectedLineupUUID,s=e.availableLineups,o=e.lineupChannels,l=e.channelMappings,u=e.isChannelMappingsPending,c=e.isLineupChannelsPending,d=e.isSavingDVR,D=e.channelMappingsErrorMessage,x=e.formState,A=e.allChannelMappingsEnabled,k=e.allChannelMappingsDisabled,L=e.onAllChannelMappingsEnabledChange,_=e.onFormStateChange,N=e.onLineupSelect,R=e.onModalClose,O=e.onSubmit,j=u||c,z=!!s.length,U=[{"":n.i(h.default)("Select Program Guide")
}].concat(s),F=r?decodeURIComponent(r.match(/#(.+?)$/)[1]):void 0;return a()(b.a,{className:E.a.form,formState:x,onChange:_,onSubmit:O},void 0,a()(w.a,{errorMessage:i,onModalClose:R},void 0,D&&a()(S.a,{className:E.a.channelMappingsBody,scrollDirection:p.a.NONE},void 0,a()("div",{className:E.a.centeredContainer},void 0,D)),!D&&a()(S.a,{className:E.a.channelMappingsBody,scrollDirection:p.a.NONE},void 0,z&&a()("div",{},void 0,a()("div",{className:E.a.programGuideLabel
},void 0,n.i(h.default)("Program Guide")),a()("div",{className:E.a.programGuideSelectContainer},void 0,a()(y.a,{name:"programGuide",values:U,value:r,onChange:N}))),!z&&a()("div",{className:E.a.programGuideTitle},void 0,F),j&&a()("div",{className:E.a.centeredContainer},void 0,a()(g.a,{label:n.i(h.default)("Loading channel mappings")})),!j&&r&&a()(f.a,{className:E.a.scroller,autoScroll:!0},void 0,a()(P.a,{allChannelMappingsEnabled:A,allChannelMappingsDisabled:k,onAllChannelMappingsEnabledChange:L
}),l.map(function(e){var t=e.key,n=e.deviceIdentifier,i=e.name,r=e.enabled,s=e.lineupIdentifier,l=e.drm,u=e.isChannelMissing;return a()(T.a,{name:t,initialValue:{enabled:r,lineupIdentifier:s},deviceIdentifier:n,channelName:i,drm:l,isChannelMissing:u,lineupChannels:o},t)}))),a()(M.a,{},void 0,a()(I.a,{},void 0,a()(m.a,{kind:p.b.DEFAULT,size:p.d.MEDIUM,onPress:R},void 0,n.i(h.default)("Cancel"))),a()(I.a,{},void 0,a()(C.a,{dvrID:t}),a()(v.a,{type:"submit",kind:p.b.PRIMARY,size:p.d.MEDIUM,
isSpinning:d},void 0,n.i(h.default)("Continue"))))))},t}(d.Component);t.a=n.i(D.a)(A)},function(e,t,n){"use strict";function i(e,t){if(e){var i=I.a.parseXML(e.responseText);if(i.message)return i.message}else{if(!t)return;var a=I.a.parseXML(t.responseText);if(a.message)return a.message}return n.i(b.default)("Unable to load channel mappings")}function a(){return n.i(y.createSelector)(w.a,M.a,C.a,n.i(D.a)(),function(e,t,n,a){
var r=e.selectedDevice,s=e.selectedLineupUUID,o=e.isChannelMappingsPending,l=e.isLineupChannelsPending,u=e.channelMappingsError,c=e.lineupChannelsError,d=e.isSavingDVR;return{setupErrorMessage:t,selectedDevice:r,selectedLineupUUID:s,availableLineups:f.a.reduce(e.epgSettings.lineupGroup.lineups,function(e,t){var n;return e.push((n={},n[t.uuid]=t.title,n)),e},[]),lineupChannels:n,channelMappings:a,isChannelMappingsPending:o,isLineupChannelsPending:l,isSavingDVR:d,channelMappingsErrorMessage:i(u,c)
}})}var r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=n.n(g),v=n(14),y=n(8),b=(n.n(y),n(4)),S=n(41),I=n(61),w=n(118),M=n(262),C=n(840),D=n(837),P=n(89),T=n(2041),x={fetchLineupChannels:P.b,fetchChannelMap:P.c,selectEPGLineup:P.d,clearChannelMapError:P.e,saveDVR:P.f,addDVRDevice:P.g},E=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),
i.onLineupSelect=function(e){var t=i.props,n=t.serverEntityID,a=t.selectedDevice;i.props.selectEPGLineup({serverEntityID:n,lineupUUID:e}),i.props.fetchLineupChannels({serverEntityID:n,lineupUUID:e}),i.props.fetchChannelMap({serverEntityID:n,deviceUUID:a.uuid,lineupUUID:e,forceEnabled:!0})},i.onAddDeviceSubmit=function(e){var t=i.props,n=t.serverEntityID,a=t.dvrID,r=t.selectedDevice;i.props.addDVRDevice({serverEntityID:n,dvrID:a,deviceID:r.key,data:e})},i.onSaveDVRSubmit=function(e){
var t=i.props,n=t.serverEntityID,a=t.selectedDevice;i.props.saveDVR({serverEntityID:n,deviceID:a.key,data:e})},a=n,c()(i,a)}return h()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype.componentWillUnmount=function(){this.props.clearChannelMapError()},t.prototype._populate=function(e){var t=e.serverEntityID,i=e.selectedDevice.uuid,a=e.selectedLineupUUID;a&&n.i(S.a)(function(){e.fetchLineupChannels({serverEntityID:t,lineupUUID:a}),e.fetchChannelMap({
serverEntityID:t,deviceUUID:i,lineupUUID:a,forceEnabled:!0})})},t.prototype.render=function(){var e=this.props.dvrID;return m.a.createElement(T.a,s()({onLineupSelect:this.onLineupSelect,onSubmit:e?this.onAddDeviceSubmit:this.onSaveDVRSubmit},this.props))},t}(g.Component);t.a=n.i(v.b)(a,x)(E)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(n.i(p.a)(),n.i(f.a)(),n.i(g.a)(),function(e,t,n){var i=l.a.pick(n,"hubIdentifier","title","type","size","more","random");return s()({
machineIdentifier:e.machineIdentifier,providerIdentifier:t.identifier},i,{metadataListEntityID:n.metadataList,containerKey:n.key})})}function a(e){var t=e.title,i=e.hubIdentifier,a=e.type,r=e.containerKey,o=e.machineIdentifier,l=e.providerIdentifier,u=i.indexOf("music.video")!==-1?"musicVideo":a,d="home.continue"===i?v.b:v.c,h=void 0;return r&&d!==v.b&&(h=n.i(m.a)(o,l,{key:r,title:t,type:u})),c.a.createElement(y.a,s()({listType:u,listContext:d,hubLink:h,component:b.a},e))}
var r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(1),c=n.n(u),d=n(14),h=n(8),p=(n.n(h),n(54)),f=n(127),g=n(724),m=n(966),v=n(35),y=n(149),b=n(893);t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(144)),p=n(116),f=n(188),g=n(76),m=n.n(g),v=n(959),y=n(962),b=n(135),S=n(895),I=n(2624),w=n.n(I),M=parseInt(m.a.mosaicCellPadding,10),C=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.state={
layout:a._createLayout(n),cellRenderer:a._createCellRenderer(n)},a}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.aspectRatios!==this.props.aspectRatios,n=e.columns!==this.props.columns,i=e.viewportWidth!==this.props.viewportWidth,a=e.viewportHeight!==this.props.viewportHeight,r=e.serverEntityID!==this.props.serverEntityID,s=e.providerEntityID!==this.props.providerEntityID,o=e.metadataListEntityID!==this.props.metadataListEntityID,l=t||n||a||i,u=r||s||o;if(l||u){
var c={};l&&(c.layout=this._createLayout(e)),u&&(c.cellRenderer=this._createCellRenderer(e)),this.setState(c)}},t.prototype._createLayout=function(e){var t=n.i(y.a)({aspectRatios:e.aspectRatios,columns:e.columns});return n.i(v.a)({columns:e.columns,rows:t,innerPadding:M,maximumHeight:e.cellHeight-(e.footerHeight+e.headerHeight)})},t.prototype._createCellRenderer=function(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID;return n.i(b.a)({serverEntityID:t,providerEntityID:i,
metadataListEntityID:a},S.a)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.className,i=e.cellX,r=e.cellY,s=e.cellWidth,o=e.cellHeight,l=e.title,u=e.items,c=e.size,d=e.viewportHeight,h=e.scrollTop,g=this.state,m=g.layout,v=g.cellRenderer;return a()(p.a,{className:n,cellX:i,cellY:r,cellWidth:s,cellHeight:o},void 0,a()("div",{className:w.a.header},void 0,l),a()(f.a,{serverEntityID:t,items:u,keyPropName:"metadataItemEntityID",size:c,cellRenderer:v,viewportWidth:s,
viewportHeight:d,scrollTop:h-r,layout:m}))},t}(d.Component);C.defaultProps={headerHeight:0,footerHeight:0},t.a=n.i(h.a)(C)},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){return t.start},function(e,t){return t.end},n.i(u.a)(),function(e,t,n){var i=n.populatedRange,a=n.metadataItems;return e<i.start||t>i.end?l.a.times(t-e,function(){return null}):a.slice(e-i.start,t-i.start)})}function a(){return n.i(s.createSelector)(function(e,t){return t.avgAR
},i(),d.a,function(e,t,i){return{aspectRatios:t.map(function(t){return t?n.i(c.a)(i[t],e):e}),items:t}})}var r=n(14),s=n(8),o=(n.n(s),n(2)),l=n.n(o),u=n(140),c=n(801),d=n(307),h=n(2044);t.a=n.i(r.b)(a)(h.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.serverEntityID,a=e.providerEntityID,s=e.metadataItemEntityID,l=e.searchResultEntityID,c=e.containerKey,f=(e.cellIndex,
e.cellX),b=e.cellY,I=e.cellWidth,w=e.cellHeight,M=e.showScrollPlaceholder,C=e.showOffscreenPlaceholder,D=e.listType,P=e.listContext,T=e.titleComponents,x=e.isContinueWatching,E=e.metadataKey,A=e.type,k=e.selectionType,L=e.activeSelectionType,_=e.isSelected,N=e.imageWidth,R=e.imageHeight,O=e.imageUrl,j=e.onSelectItem,z=e.onDeselectItem,U=u()(e,["className","serverEntityID","providerEntityID","metadataItemEntityID","searchResultEntityID","containerKey","cellIndex","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext","titleComponents","isContinueWatching","metadataKey","type","selectionType","activeSelectionType","isSelected","imageWidth","imageHeight","imageUrl","onSelectItem","onDeselectItem"]),F=!E,B=F||M,V="mixed"===D?n.i(p.a)(A,P).concat(T):T
;return o()(g.a,{className:t,cellX:f,cellY:b,cellWidth:I,cellHeight:w},void 0,B?o()(v.a,{imageWidth:N,imageHeight:R,activeSelectionType:L,isSelected:_}):d.a.createElement(m.a,r()({serverEntityID:i,providerEntityID:a,metadataItemEntityID:s,listType:D,listContext:P,containerKey:c,metadataKey:E,type:A,imageWidth:N,imageHeight:R,imageUrl:O,selectionType:k,activeSelectionType:L,isSelected:_,isOffscreen:C,onSelectItem:j,onDeselectItem:z},U)),o()("div",{
className:x?S.a.continueWatchingTitleContainer:S.a.titleContainer},void 0,F?n.i(h.default)("Loading..."):V.map(function(e,t){return o()(y.a,{serverEntityID:i,providerEntityID:a,metadataItemEntityID:s,searchResultEntityID:l,containerKey:c,component:e,isSecondary:t>0,isSplitLeft:x&&0===t,isSplitRight:x&&1===t},t)})))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=(n(35),n(276)),f=n(144),g=n(116),m=n(424),v=n(426),y=n(578),b=n(2625),S=n.n(b);t.a=n.i(f.a)(i)
},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(2404),f=n(340),g=n(135),m=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.state={layout:a._createLayout(n)},a}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.items!==this.props.items,n=e.columns!==this.props.columns;(t||n)&&this.setState({layout:this._createLayout(e)})},t.prototype._createLayout=function(e){
return n.i(p.a)({columns:e.columns,areas:e.items.map(function(e){return e.area}),innerPaddingTop:e.headerHeight,innerPaddingBottom:e.footerHeight,outerPaddingTop:e.listPadding,outerPaddingRight:e.listPadding-e.listGutter,outerPaddingBottom:e.listPadding,outerPaddingLeft:e.listPadding})},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,s=e.columns,o=e.headerHeight,l=e.footerHeight,u=e.cellComponent;return h.a.createElement(f.a,a()({
layout:this.state.layout,cellRenderer:n.i(g.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:r,columns:s,headerHeight:o,footerHeight:l},u)},this.props))},t}(d.Component);t.a=m},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(y.a,function(e){return{disableReloadThreshold:!!e.activeSelectionType}})}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(8),y=(n.n(v),n(109)),b=n(130),S=n(2047),I={
dispatchPopulateMetadataListRange:b.d,dispatchDeselectAllMetadataListItems:b.e},w=function(e){function t(){var n,i,a;u()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.onPageRequest=function(e){var t=e.startIndex,n=e.endIndex,a=i.props,r=a.metadataListEntityID,s=a.disableReloadThreshold,o=a.items;(0,a.dispatchPopulateMetadataListRange)({metadataListEntityID:r,disableReloadThreshold:s,startIndex:o[t].start,
endIndex:o[n].end-1})},a=n,d()(i,a)}return p()(t,e),t.prototype.componentWillUnmount=function(){var e=this.props.metadataListEntityID;this.props.dispatchDeselectAllMetadataListItems({metadataListEntityID:e})},t.prototype.render=function(){var e=this.props,t=(e.dispatchPopulateMetadataListRange,e.dispatchDeselectAllMetadataListItems,o()(e,["dispatchPopulateMetadataListRange","dispatchDeselectAllMetadataListItems"]));return g.a.createElement(S.a,r()({onPageRequest:this.onPageRequest},t))},t
}(f.Component);t.a=n.i(m.b)(i,I)(w)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(4),g=n(144),m=n(63),v=n(35),y=n(116),b=n(29),S=n(90),I=n(25),w=n(413),M=n(342),C=n(424),D=n(426),P=n(907),T=n(271),x=n(428),E=n(2626),A=n.n(E),k=a()(b.a,{name:"plex-icon-edit-560"}),L=a()(b.a,{name:"plex-icon-more-560"}),_=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a))
;return r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1},r._moreButtonID=n.i(m.a)(),r}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,s=e.containerKey,o=e.listType,l=e.listContext,u=e.cellIndex,c=e.cellX,d=e.cellY,h=e.cellWidth,g=e.cellHeight,m=e.showScrollPlaceholder,b=e.showOffscreenPlaceholder,E=e.metadataKey,_=e.type,N=e.index,R=e.title,O=e.grandparentKey,j=e.summary,z=e.isFolder,U=e.route,F=e.showLink,B=e.showEdit,V=e.showSelect,H=e.showMore,W=e.hasActiveSelection,Y=e.isSelected,Q=e.isOtherItemSelected,G=e.isModifierKeyPressed,K=e.imageWidth,q=e.imageHeight,X=e.imageUrl,Z=e.onEditPress,J=e.onSelectPress,$=e.onDeselectPress,ee=this.state.isActionsMenuOpen,te=l===v.c,ne=V&&(G||Q),ie=W?"-1":"0"
;return a()(y.a,{className:p()(u%2?A.a.alternateItem:A.a.item,W&&A.a.hasActiveSelection,ne&&A.a.isForcingSelection,Y&&A.a.isSelected,ee&&A.a.isActionsMenuOpen),cellX:c,cellY:d,cellWidth:h,cellHeight:g},void 0,V&&a()(I.a,{className:A.a.selectCoverButton,"aria-label":Y?n.i(f.default)("Deselect {title}",{title:R}):n.i(f.default)("Select {title}",{title:R}),tabIndex:F&&!W?"-1":"0",onPress:Y?$:J}),F&&a()(I.a,{className:A.a.underlay,tabIndex:ie,to:U,"aria-label":R}),a()("div",{className:A.a.overlay
},void 0,a()("div",{className:A.a.posterContainer},void 0,m?a()(D.a,{imageWidth:K,imageHeight:q}):a()(C.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r,listContext:l,containerKey:s,metadataKey:E,type:_,imageWidth:K,imageHeight:q,imageUrl:X,isOffscreen:b,isFolder:z,showLink:!1,showSelect:!1,showEdit:!1,showMore:!1})),a()("div",{className:te?A.a.librarySummaryContainer:A.a.summaryContainer},void 0,a()("div",{},void 0,a()("div",{className:A.a.titleContainer},void 0,a()("div",{
className:A.a.title},void 0,!!O&&a()("span",{},void 0,te?a()(T.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}):a()(P.a,{index:N}),a()(S.a,{className:A.a.separator})),R),a()("div",{className:A.a.rating},void 0,a()(x.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),a()("div",{className:A.a.actions},void 0,V&&a()(w.a,{className:A.a.selectButton,tabIndex:ie,title:R,isSelected:Y,onPress:J}),B&&a()(I.a,{className:A.a.editButton,tabIndex:ie,
"aria-label":n.i(f.default)("Edit {title}",{title:R}),onPress:Z},void 0,k),H&&a()(I.a,{id:this._moreButtonID,className:A.a.moreButton,tabIndex:ie,"aria-label":n.i(f.default)("More Actions"),"aria-haspopup":!0,onPress:this.onActionsPress},void 0,L,a()(M.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r,listType:o,showPlay:!1,showEdit:!1,target:this._moreButtonID,isOpen:ee,onMenuClose:this.onActionsMenuClose})))),a()("div",{className:A.a.summary},void 0,j)))))},t}(d.Component)
;t.a=n.i(g.a)(_)},function(e,t,n){"use strict";function i(e){var t=e.cellIndex,i=e.cellX,a=e.cellY,s=e.cellWidth,l=e.cellHeight,d=e.imageWidth,p=e.imageHeight;return r()(u.a,{className:t%2?h.a.alternateLoadingItem:h.a.loadingItem,cellX:i,cellY:a,cellWidth:s,cellHeight:l},void 0,r()("div",{className:h.a.posterContainer},void 0,r()(c.a,{imageWidth:d,imageHeight:p})),n.i(o.default)("Loading..."))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(144),u=n(116),c=n(426),d=n(2627),h=n.n(d)
;t.a=n.i(l.a)(i)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.containerKey,l=e.containerTitle,f=e.listType,g=e.listContext,m=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","listType","listContext"]);return u.a.createElement(h.a,r()({listType:f,listContext:g,layout:c.a,cellRenderer:n.i(d.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:f,listContext:g,
containerKey:s,containerTitle:l},p.a)},m))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=(n(35),n(963)),d=n(135),h=n(340),p=n(894);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.containerKey,l=e.containerTitle,f=e.listType,g=e.listContext,m=e.activeSort,v=e.selectedSort,y=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","listType","listContext","activeSort","selectedSort"]);return u.a.createElement(h.a,r()({listType:f,listContext:g,layout:c.a,cellRenderer:n.i(d.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,containerKey:s,
containerTitle:l,listType:f,listContext:g,activeSort:m,selectedSort:v},p.a)},y))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(611),d=(n(35),n(135)),h=n(340),p=n(575);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.style,n=e.component,i=e.isActiveSort,a=u()(e,["style","component","isActiveSort"]);return o()("div",{className:i?p.a.activeTableCell:p.a.tableCell,style:t},void 0,d.a.createElement(n,r()({},a,{className:p.a.title})))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(2628),p=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(122)),p=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(e){(i.props.isSelected?i.props.onColumnDeselect:i.props.onColumnSelect)(i.props.columnKey)
},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.isSelected;return a()(h.a,{isSelected:n,onPress:this.onPress},void 0,t)},t}(d.Component);t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=(n(98),n(63)),f=n(189),g=n(29),m=n(25),v=n(80),y=n(2054),b=n(2629),S=n.n(b),I=a()(g.a,{name:"plex-icon-more-560"}),w=function(e){function t(i,a){s()(this,t)
;var r=l()(this,e.call(this,i,a));return r.onChangeColumnsPress=function(e){r.setState({isColumnsMenuOpen:!r.state.isColumnsMenuOpen})},r.onColumnsMenuClose=function(){r.setState({isColumnsMenuOpen:!1})},r.state={isColumnsMenuOpen:!1},r._columnsButtonID=n.i(p.a)(),r}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.activeTableColumns,i=e.allTableColumns,r=e.typeKey,s=e.activeFilters,o=e.activeFilterLabel,l=e.activeSort,u=e.customFilter,c=e.selectedSort,d=e.isDisabled,p=e.onColumnSelect,b=e.onColumnDeselect,w=this.state.isColumnsMenuOpen;return a()("div",{className:S.a.tableHeader},void 0,a()("div",{className:S.a.playCell}),t.map(function(e,t){var i=e.style,p=e.title,v=e.ascKey,y=e.descKey,b=l===v||l===y||c.key===v,I=l?l===v:c.key===v;return d?a()("div",{style:i,
className:S.a.tableHeaderLink},t,a()("div",{className:S.a.tableHeaderCell},void 0,a()("div",{className:S.a.tableHeaderTitle},void 0,p()))):a()(m.a,{style:i,className:S.a.tableHeaderLink,to:n.i(f.a)({typeKey:r,filters:s,filterLabel:o,sort:I?y:v,customFilter:u})},t,a()("div",{className:b?S.a.activeTableHeaderCell:S.a.tableHeaderCell},void 0,a()("div",{className:S.a.tableHeaderTitle},void 0,p()),b&&I&&a()(g.a,{className:S.a.sortDirectionIcon,name:"plex-icon-sort-ascending-560",
"aria-label":n.i(h.default)("Ascending")}),b&&!I&&a()(g.a,{className:S.a.sortDirectionIcon,name:"plex-icon-sort-descending-560","aria-label":n.i(h.default)("Descending")})))}),a()("div",{className:S.a.actionsCell},void 0,a()(m.a,{id:this._columnsButtonID,className:S.a.columnsButton,"aria-label":n.i(h.default)("Change Columns"),"aria-haspopup":!0,onPress:this.onChangeColumnsPress},void 0,I),a()(v.a,{target:this._columnsButtonID,isOpen:w,onMenuClose:this.onColumnsMenuClose
},void 0,i.map(function(e){return a()(y.a,{columnKey:e.key,isSelected:t.indexOf(e)!==-1,onColumnSelect:p,onColumnDeselect:b},e.key,e.title())}))))},t}(d.Component);t.a=w},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e,t){return t.listType},n.i(m.a)(),function(e,t){return{allTableColumns:n.i(y.b)(e),activeTableColumns:t}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),
n(845)),v=n(219),y=n(964),b=n(2055),S={selectLibraryTableColumn:v.selectLibraryTableColumn,deselectLibraryTableColumn:v.deselectLibraryTableColumn},I=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onColumnSelect=function(e){i.props.selectLibraryTableColumn({type:i.props.listType,activeTableColumns:i.props.activeTableColumns,key:e})},i.onColumnDeselect=function(e){
i.props.deselectLibraryTableColumn({type:i.props.listType,activeTableColumns:i.props.activeTableColumns,key:e})},a=n,u()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onColumnSelect:this.onColumnSelect,onColumnDeselect:this.onColumnDeselect}))},t}(h.Component);t.a=n.i(f.b)(i,S)(I)},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(30),m=n.n(g),v=n(4),y=n(955),b=n(144),S=n(63),I=n(35),w=n(116),M=n(29),C=n(1996),D=n(25),P=n(339),T=n(413),x=n(342),E=n(2112),A=n(911),k=n(910),L=n(2053),_=n(2630),N=n.n(_),R=s()(M.a,{name:"plex-icon-edit-560"}),O=s()(M.a,{name:"plex-icon-more-560"}),j=function(e){function t(i,a){l()(this,t);var r=c()(this,e.call(this,i,a));return r.onActionsPress=function(e){r.setState({
isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1},r._moreButtonID=n.i(S.a)(),r}return h()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,o=e.listType,l=e.listContext,u=e.activeSort,c=e.selectedSort,d=e.cellIndex,h=e.cellX,p=e.cellY,g=e.cellWidth,y=e.cellHeight,b=e.activeTableColumns,S=e.title,M=e.route,_=e.showLink,j=e.showPlay,z=e.showEdit,U=e.showSelect,F=e.showMore,B=e.showPlayIndex,V=e.showPlayCellIndex,H=e.showActionsDuration,W=e.showActionsMinutesLeft,Y=e.hasActiveSelection,Q=e.isSelected,G=e.isOtherItemSelected,K=e.isModifierKeyPressed,q=e.isPlaying,X=e.onPlayPress,Z=e.onEditPress,J=e.onSelectPress,$=e.onDeselectPress,ee=e.hoverableProps,te=e.isHovered,ne=this.state.isActionsMenuOpen,ie=l===I.c,ae=U&&(K||G),re=Y?"-1":"0",se=!te
;return f.a.createElement(w.a,a()({className:m()(d%2?N.a.alternateItem:N.a.item,Y&&N.a.hasActiveSelection,ae&&N.a.isForcingSelection,Q&&N.a.isSelected,ne&&N.a.isActionsMenuOpen),cellX:h,cellY:p,cellWidth:g,cellHeight:y},ee),U&&s()(D.a,{className:N.a.selectCoverButton,"aria-label":Q?n.i(v.default)("Deselect {title}",{title:S}):n.i(v.default)("Select {title}",{title:S}),tabIndex:_&&!Y?"-1":"0",onPress:Q?$:J}),_&&s()(D.a,{className:N.a.underlay,tabIndex:re,to:M,"aria-label":S}),s()("div",{
className:N.a.overlay},void 0,s()("div",{className:N.a.playCell},void 0,B&&!q&&s()(E.a,{className:N.a.transientTitleLeft,serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}),V&&!q&&s()("span",{className:N.a.transientTitleLeft},void 0,d+1),j&&!q&&s()(P.a,{className:N.a.playButton,tabIndex:re,title:S,onPress:X}),q&&s()(C.a,{className:N.a.equalizer})),b.map(function(e,n){var a=e.style,o=e.component,l=e.ascKey,d=e.descKey;return s()(L.a,{style:a,serverEntityID:t,providerEntityID:i,
metadataItemEntityID:r,component:o,isActiveSort:u===l||u===d||!!c&&c.key===l,hideUnrated:se},n)}),s()("div",{className:ie?N.a.libraryActionsCell:N.a.actionsCell},void 0,H&&s()(A.a,{className:N.a.transientTitleRight,serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}),W&&s()(k.a,{className:N.a.transientTitleRight,serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}),U&&s()(T.a,{className:N.a.selectButton,tabIndex:re,title:S,isSelected:Q,onPress:J}),z&&s()(D.a,{
className:N.a.editButton,tabIndex:re,"aria-label":n.i(v.default)("Edit {title}",{title:S}),onPress:Z},void 0,R),F&&s()(D.a,{id:this._moreButtonID,className:N.a.moreButton,tabIndex:re,"aria-label":n.i(v.default)("More Actions"),"aria-haspopup":!0,onPress:this.onActionsPress},void 0,O,s()(x.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r,listType:o,showPlay:!1,showEdit:!1,target:this._moreButtonID,isOpen:ne,onMenuClose:this.onActionsMenuClose})))))},t}(p.Component)
;t.a=n.i(y.a)(n.i(b.a)(j))},function(e,t,n){"use strict";function i(e){var t=e.cellIndex,i=e.cellX,a=e.cellY,s=e.cellWidth,l=e.cellHeight;return r()(u.a,{className:t%2?d.a.alternateLoadingItem:d.a.loadingItem,cellX:i,cellY:a,cellWidth:s,cellHeight:l},void 0,n.i(o.default)("Loading..."))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(144),u=n(116),c=n(2631),d=n.n(c);t.a=n.i(l.a)(i)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.containerKey,l=e.containerTitle,g=e.activeSort,m=e.listType,v=e.listContext,y=e.columnAdjustment,b=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","activeSort","listType","listContext","columnAdjustment"]),S=n.i(h.a)(m,v,{activeSort:g,providerEntityID:i});return u.a.createElement(p.a,r()({listType:m,listContext:v,layout:n.i(c.a)(m,v,y,S.length),cellRenderer:n.i(d.a)({
serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:m,listContext:v,titleComponents:S,containerKey:s,containerTitle:l},f.a)},b))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(958),d=(n(35),n(135)),h=n(276),p=n(340),f=n(422);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(27)),p=n(29),f=n(144),g=n(116),m=n(426),v=n(424),y=n(2632),b=n.n(y),S=a()(p.a,{name:"plex-icon-clips-560"}),I=function(e){
function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.listType,s=e.metadataKey,o=e.type,l=e.title,u=e.thumb,c=e.cellX,d=e.cellY,h=e.cellWidth,p=e.cellHeight,f=e.showOffscreenPlaceholder,y=e.selectionType,I=e.activeSelectionType,w=e.isSelected,M=e.onSelectItem,C=e.onDeselectItem,D="clip"===o,P="photoalbum"===o,T=!s;return a()(g.a,{cellX:c,cellY:d,cellWidth:h,cellHeight:p},void 0,a()("div",{className:b.a.photoContainer},void 0,a()("div",{className:b.a.photo
},void 0,a()("div",{className:b.a.image},void 0,T&&a()(m.a,{imageWidth:h,imageHeight:p,activeSelectionType:I,isSelected:w}),!T&&a()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,listType:r,metadataKey:s,type:o,imageUrl:u,imageWidth:h,imageHeight:p,selectionType:y,activeSelectionType:I,isSelected:w,isOffscreen:f,onSelectItem:M,onDeselectItem:C}),D&&a()("div",{className:b.a.badge},void 0,S),P&&a()("div",{className:b.a.title},void 0,l)))))},t}(d.Component);t.a=n.i(f.a)(I)
},function(e,t,n){"use strict";function i(e,t){return!!p.a.find(e,function(e){return t[e]})}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(2),p=n.n(h),f=n(1),g=(n.n(f),
n(4)),m=n(68),v=n(22),y=n(392),b=n(146),S=n(420),I=n(897),w=["showPlay","showPlayVersion","showPlayAll","showShuffle","showQueue","showPlayPlexMix","showPlayTrailer","showPlayMusicVideo","showAddToPlaylist"],M=["showEdit","showMarkWatched","showMarkUnwatched","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo"],C=r()(S.a,{}),D=function(e){
function t(n,i){o()(this,t);var a=u()(this,e.call(this,n,i));return a.onMarkWatchedPress=function(e){a.setState({isConfirmMarkWatchedModalOpen:!0}),a.props.onMenuDisable()},a.onMarkUnwatchedPress=function(e){a.setState({isConfirmMarkUnwatchedModalOpen:!0}),a.props.onMenuDisable()},a.onMarkWatchedConfirm=function(){var e=a.state.isConfirmMarkWatchedModalOpen;a.setState({isConfirmMarkWatchedModalOpen:!1,isConfirmMarkUnwatchedModalOpen:!1}),
e?a.props.onMarkWatchedConfirm():a.props.onMarkUnwatchedConfirm(),a.props.onMenuEnable()},a.onMarkWatchedCancel=function(){a.setState({isConfirmMarkWatchedModalOpen:!1,isConfirmMarkUnwatchedModalOpen:!1}),a.props.onMenuEnable()},a.state={isConfirmMarkWatchedModalOpen:!1,isConfirmMarkUnwatchedModalOpen:!1},a}return d()(t,e),t.prototype.render=function(){var e=this.props,t=this.state,a=t.isConfirmMarkWatchedModalOpen,s=t.isConfirmMarkUnwatchedModalOpen,o=i(w,e),l=i(M,e),u=o&&l
;return r()("div",{},void 0,e.showPlay&&r()(b.a,{onPress:e.onPlayPress},void 0,e.playLabel||n.i(g.default)("Play")),e.showPlayVersion&&r()(b.a,{onPress:e.onPlayVersionPress},void 0,n.i(g.default)("Play Version...")),e.showPlayAll&&r()(b.a,{onPress:e.onPlayAllPress},void 0,n.i(g.default)("Play All")),e.showShuffle&&r()(b.a,{onPress:e.onShufflePress},void 0,n.i(g.default)("Shuffle")),e.showQueue&&r()(b.a,{onPress:e.onPlayNextPress},void 0,n.i(g.default)("Play Next")),e.showQueue&&r()(b.a,{
onPress:e.onAddToQueuePress},void 0,n.i(g.default)("Add to Queue")),e.showPlayPlexMix&&r()(b.a,{onPress:e.onPlayPlexMixPress},void 0,n.i(g.default)("Play Plex Mix")),e.showPlayTrailer&&r()(b.a,{onPress:e.onPlayPrimaryExtraPress},void 0,n.i(g.default)("Play Trailer")),e.showPlayMusicVideo&&r()(b.a,{onPress:e.onPlayPrimaryExtraPress},void 0,n.i(g.default)("Play Music Video")),e.showAddToPlaylist&&r()(b.a,{onPress:e.onAddToPlaylistPress
},void 0,n.i(g.default)("Add to Playlist...")),u&&C,e.showEdit&&r()(b.a,{onPress:e.onEditPress},void 0,n.i(g.default)("Edit")),e.showMarkWatched&&r()(b.a,{onPress:this.onMarkWatchedPress},void 0,n.i(g.default)("Mark Watched")),e.showMarkUnwatched&&r()(b.a,{onPress:this.onMarkUnwatchedPress},void 0,n.i(g.default)("Mark Unwatched")),e.showRefresh&&r()(b.a,{isDisabled:e.isRefreshing,onPress:e.onRefreshPress},void 0,n.i(g.default)("Refresh Metadata")),e.showAnalyze&&r()(b.a,{
isDisabled:e.isAnalyzing,onPress:e.onAnalyzePress},void 0,n.i(g.default)("Analyze")),e.showFixMatch&&r()(b.a,{onPress:e.onFixMatchPress},void 0,n.i(g.default)("Fix Match...")),e.showMatch&&r()(b.a,{onPress:e.onFixMatchPress},void 0,n.i(g.default)("Match...")),e.showUnmatch&&r()(b.a,{onPress:e.onUnmatchPress},void 0,n.i(g.default)("Unmatch")),e.showSplitApart&&r()(b.a,{onPress:e.onSplitApartPress},void 0,n.i(g.default)("Split Apart")),e.showSync&&r()(b.a,{onPress:e.onSyncPress
},void 0,n.i(g.default)("Sync...")),e.showOptimize&&r()(b.a,{onPress:e.onOptimizePress},void 0,n.i(g.default)("Optimize...")),e.showDownload&&r()(y.a,{action:m.h},void 0,r()(b.a,{to:e.downloadUrl&&e.downloadUrl(),target:e.downloadUrl&&"_self",download:!!e.downloadUrl,onPress:e.downloadUrl?e.onPress:e.onDownloadVersionPress},void 0,n.i(g.default)("Download"))),e.showWatchLater&&r()(b.a,{onPress:e.onWatchLaterPress},void 0,n.i(g.default)("Watch Later")),e.showShare&&r()(b.a,{onPress:e.onSharePress
},void 0,n.i(g.default)("Share...")),e.showRecommend&&r()(b.a,{onPress:e.onRecommendPress},void 0,n.i(g.default)("Recommend...")),e.showDelete&&r()(b.a,{kind:v.b.DANGER,onPress:e.onDeletePress},void 0,n.i(g.default)("Delete")),e.showDeleteVersion&&r()(b.a,{kind:v.b.DANGER,onPress:e.onDeleteVersionPress},void 0,n.i(g.default)("Delete Version")),e.showGetInfo&&r()(b.a,{onPress:e.onGetInfoPress},void 0,n.i(g.default)("Get Info")),r()(I.a,{isOpen:a||s,type:e.type,title:e.title,
leafCount:a?e.unviewedLeafCount:e.viewedLeafCount,markUnwatched:s,onConfirm:this.onMarkWatchedConfirm,onCancel:this.onMarkWatchedCancel}))},t}(f.Component);t.a=D},function(e,t,n){"use strict";function i(){return n.i(o.createSelector)(n.i(l.a)(),u.a,c.a,function(e,t,i){var a=n.i(p.d)(t,i,e);return s()({type:e.type,title:e.title,viewedLeafCount:e.viewedLeafCount,unviewedLeafCount:e.unviewedLeafCount,isRefreshing:!!e.metadataState,isAnalyzing:!!e.mediaState,downloadUrl:e.downloadUrl},a)})}
function a(e,t){var n={serverEntityID:t.serverEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage};return{onPlayPress:function(){e(d.playMetadataItem(s()({},n,{listType:t.listType}))),t.onPress()},onPlayVersionPress:function(){e(d.playMetadataItemVersion(n)),t.onPress()},onPlayAllPress:function(){e(d.playMetadataItemAll(n)),t.onPress()},onShufflePress:function(){e(d.shuffleMetadataItem(n)),t.onPress()},onPlayNextPress:function(){e(d.playMetadataItemNext(n)),t.onPress()
},onAddToQueuePress:function(){e(d.addMetadataItemToQueue(n)),t.onPress()},onPlayPlexMixPress:function(){e(d.playRelatedMix(n)),t.onPress()},onPlayPrimaryExtraPress:function(){e(d.playPrimaryExtra(n)),t.onPress()},onAddToPlaylistPress:function(){e(d.addMetadataItemToPlaylist(n)),t.onPress()},onMarkWatchedConfirm:function(){e(d.markMetadataItemWatched(s()({},n,{skipConfirm:!0}))),t.onPress()},onMarkUnwatchedConfirm:function(){e(d.markMetadataItemUnwatched(s()({},n,{skipConfirm:!0}))),t.onPress()
},onEditPress:function(){e(d.editMetadataItem(n)),t.onPress()},onRefreshPress:function(){e(d.refreshMetadataItem(n)),t.onPress()},onAnalyzePress:function(){e(d.analyzeMetadataItem(n)),t.onPress()},onFixMatchPress:function(){e(d.fixMetadataItemMatch(n)),t.onPress()},onUnmatchPress:function(){e(d.unmatchMetadataItem(n)),t.onPress()},onSplitApartPress:function(){e(d.splitMetadataItemApart(n)),t.onPress()},onSyncPress:function(){e(d.syncMetadataItem(n)),t.onPress()},onOptimizePress:function(){
e(d.optimizeMetadataItem(n)),t.onPress()},onDownloadVersionPress:function(){e(d.downloadMetadataItemVersion(n)),t.onPress()},onWatchLaterPress:function(){e(d.watchMetadataItemLater(n)),t.onPress()},onSharePress:function(){e(d.shareMetadataItem(n)),t.onPress()},onRecommendPress:function(){e(d.recommendMetadataItem(n)),t.onPress()},onDeletePress:function(){e(d.deleteMetadataItem(s()({},n,{options:{skipRedirect:!0}}))),t.onPress()},onDeleteVersionPress:function(){e(d.deleteMetadataItemVersion(n)),
t.onPress()},onGetInfoPress:function(){e(d.getMetadataItemInfo(n)),t.onPress()}}}var r=n(6),s=n.n(r),o=n(8),l=(n.n(o),n(24)),u=n(47),c=n(45),d=n(107),h=n(277),p=n(235),f=n(129),g=n(2061);t.a=n.i(f.a)(i,a,h.a)(g.a)},function(e,t,n){"use strict";function i(e){return r()(l.a,{target:e.target,isOpen:e.isOpen,onMenuClose:e.onMenuClose},void 0,e.showPlayAll&&r()(u.a,{onPress:e.onPlayAllPress},void 0,n.i(o.default)("Play All")),e.showShuffle&&r()(u.a,{onPress:e.onShufflePress
},void 0,n.i(o.default)("Shuffle")),e.showAddToPlaylist&&r()(u.a,{onPress:e.onAddToPlaylistPress},void 0,n.i(o.default)("Add to Playlist...")),e.showSync&&r()(u.a,{onPress:e.onSyncPress},void 0,n.i(o.default)("Sync...")),e.showOptimize&&r()(u.a,{onPress:e.onOptimizePress},void 0,n.i(o.default)("Optimize...")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(568),u=n(146);t.a=i},function(e,t,n){"use strict";function i(e){
return e===g.b?"plex-icon-toolbar-column-560":e===g.c?"plex-icon-toolbar-detail-560":"plex-icon-toolbar-grid-560"}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),n(4)),f=(n(33),n(35),n(22)),g=n(71),m=n(63),v=n(29),y=n(563),b=n(411),S=n(25),I=n(80),w=n(2065),M=n(2633),C=n.n(M),D=function(e){function t(i,a){o()(this,t);var r=u()(this,e.call(this,i,a));return r.onSliderChange=function(e){var t=e.steppedValue;r.setState({sliderValue:t}),r._clearTimeout(),
r._columnAdjustmentTimeoutID=setTimeout(function(){r.props.onColumnAdjustmentChange(t*-1)},r.props.columnAdjustmentTimeout)},r.onStylesPress=function(e){r.setState({isStylesMenuOpen:!r.state.isStylesMenuOpen})},r.onStylesMenuClose=function(){r.setState({isStylesMenuOpen:!1})},r.onListStylePress=function(e){r.props.onListStyleChange(e)},r.state={sliderValue:i.columnAdjustment*-1,isStylesMenuOpen:!1},r._stylesButtonID=n.i(m.a)(),r}return d()(t,e),t.prototype.componentWillReceiveProps=function(e){
e.columnAdjustment!==this.props.columnAdjustment&&this.setState({sliderValue:e.columnAdjustment*-1})},t.prototype.componentWillUnmount=function(){this._clearTimeout()},t.prototype._clearTimeout=function(){this._columnAdjustmentTimeoutID&&clearTimeout(this._columnAdjustmentTimeoutID)},t.prototype.render=function(){var e=this,t=this.props,a=(t.listType,t.listContext,t.selectedListStyle),s=t.allListStyles,o=this.state,l=o.sliderValue,u=o.isStylesMenuOpen,c=g.e,d=g.a,h=g.b,m=g.c,M=[{listStyle:c,
title:n.i(p.default)("Grid View")},{listStyle:d,title:n.i(p.default)("Mosaic View")},{listStyle:h,title:n.i(p.default)("List View")},{listStyle:m,title:n.i(p.default)("Summary View")}],D=g.g(a),P=g.f(s);return D||P?r()("div",{className:C.a.stylesContainer},void 0,D&&r()(b.a,{className:C.a.slider,label:n.i(p.default)("Poster Size"),value:l,min:-1,max:2,stepSize:1,onChange:this.onSliderChange}),r()(S.a,{id:this._stylesButtonID,className:C.a.stylesButton,
"aria-label":n.i(p.default)("Show List Styles"),isDisabled:!P,onPress:this.onStylesPress},void 0,r()(v.a,{className:C.a.stylesIcon,name:i(a)}),P&&r()(y.a,{direction:u?f.f.UP:f.f.DOWN})),r()(I.a,{target:this._stylesButtonID,isOpen:u,onMenuClose:this.onStylesMenuClose},void 0,P&&M.map(function(t){var n=t.listStyle,i=t.title;return s.indexOf(n)>-1&&r()(w.a,{isSelected:a===n,title:i,listStyle:n,onListStylePress:e.onListStylePress},n)}))):null},t}(h.Component);D.defaultProps={selectedListStyle:g.e,
allListStyles:[g.e],allListStyleActions:[],columnAdjustmentTimeout:500},t.a=D},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(122)),p=(n(71),function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onListStylePress=function(e){i.props.onListStylePress(i.props.listStyle),i.props.onPress(e)},a=n,l()(i,a)}
return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.isSelected,n=e.title;return a()(h.a,{isSelected:t,onPress:this.onListStylePress},void 0,n)},t}(d.Component));t.a=p},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.audioStreams,a=e.onMenuClose,s=e.onStreamSelect;return r()(u.a,{target:t,isOpen:n,size:o.d.LARGE,onMenuClose:a},void 0,i.map(function(e){return r()(c.a,{stream:e,onMenuClose:a,onStreamSelect:s},e.id,r()(l.a,{audioStream:e}))}))}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(22)),l=n(917),u=n(80),c=n(896);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.subtitlesStreams,a=e.onMenuClose,s=e.onStreamSelect;return r()(u.a,{target:t,isOpen:n,size:o.d.LARGE,onMenuClose:a},void 0,i.map(function(e){return r()(c.a,{stream:e,onMenuClose:a,onStreamSelect:s},e.id,r()(l.a,{subtitlesStream:e}))}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(22)),l=n(918),u=n(80),c=n(896);t.a=i},function(e,t,n){"use strict"
;function i(e){
var t=e.serverEntityID,i=e.summary,a=e.error,s=e.mediaItem,l=e.hasSubscription,w=e.isComplete,C=e.hasError,D=e.isRecording,P=e.recordingProgress,T=e.timeFormat,x=e.onRecordingModify,E=e.onModalClose,A=o()(e,["serverEntityID","summary","error","mediaItem","hasSubscription","isComplete","hasError","isRecording","recordingProgress","timeFormat","onRecordingModify","onModalClose"]),k=s.beginsAt,L=s.endsAt,_=s.startOffsetSeconds,N=s.endOffsetSeconds,R=s.channelTitle,O=!(!_&&!N),j=_&&Math.round(_/60),z=N&&Math.round(N/60)
;return r()(f.a,{onModalClose:E},void 0,r()(g.a,{},void 0,n.i(u.default)("Airing Details")),r()(m.a,{},void 0,r()(I.a,{serverEntityID:t,target:A},void 0,r()(b.a,{mediaItem:s},void 0,r()(S.a,{beginsAt:k,endsAt:L,channel:R,showFullTime:!0,showChannel:!0,timeFormat:T},void 0,r()("div",{},void 0,w&&r()("span",{},void 0,r()(d.a,{className:M.a.completeIcon,name:"plex-icon-selected-560"}),n.i(u.default)("Recorded successfully")),D&&r()("span",{},void 0,r()(d.a,{className:M.a.recordingIcon,
name:"plex-icon-dvr-single-560"}),n.i(u.default)("Recording"),r()(h.a,{className:M.a.separator}),n.i(u.default)("{recordingProgress}% complete",{recordingProgress:P})),C&&r()("span",{},void 0,r()(d.a,{className:M.a.errorIcon,name:"plex-icon-alert-560"}),a),!w&&!D&&!C&&O&&r()("span",{},void 0,j?r()("span",{},void 0,n.i(u.default)("Recording starts {minuteOffset} min early",{minuteOffset:j}),!!z&&r()("span",{},void 0,r()(h.a,{className:M.a.separator
}),n.i(u.default)("Ends {minuteOffset} min late",{minuteOffset:z}))):r()("span",{},void 0,n.i(u.default)("Recording ends {minuteOffset} min late",{minuteOffset:z})))))),r()("div",{className:M.a.summary},void 0,i))),r()(v.a,{},void 0,r()(y.a,{},void 0,l&&r()(p.a,{kind:c.b.DEFAULT,size:c.d.MEDIUM,onPress:x},void 0,n.i(u.default)("Modify Recording")),r()(p.a,{kind:c.b.PRIMARY,size:c.d.MEDIUM,onPress:E},void 0,n.i(u.default)("Close")))))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=(n.n(l),
n(4)),c=n(22),d=n(29),h=n(90),p=n(51),f=n(111),g=n(123),m=n(75),v=n(112),y=n(91),b=n(927),S=n(929),I=n(423),w=n(2635),M=n.n(w);t.a=i},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(function(e){return e.experienceSettings.timeFormat},n.i(d.a)(),function(e,t){var n=s.a.pick(t,"type","title","parentTitle","grandparentTitle","thumb","parentThumb","grandparentThumb","index","parentIndex","originallyAvailableAt","summary");return n.timeFormat=e,n})}function a(e){
return l.a.createElement(h.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),u=n(14),c=n(8),d=(n.n(c),n(24)),h=n(2068);t.a=n.i(u.b)(i)(a)},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[p.a];case"show":return[p.a];case"episode":return[f.a,g.a];case"playlist":return[p.a];default:return[p.a]}}function a(e){var t=(e.className,e.type),n=c()(e,["className","type"]),a=i(t);return l()("div",{className:y.a.container},void 0,a.map(function(e,t){return h.a.createElement(m.a,s()({key:t,
component:e,isSecondary:t>0},n))}))}var r=n(6),s=n.n(r),o=n(3),l=n.n(o),u=n(16),c=n.n(u),d=n(1),h=n.n(d),p=n(581),f=n(2091),g=n(272),m=n(2072),v=n(2636),y=n.n(v);t.a=a},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(u.a)(),function(){return{type:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type}})}function a(e){return s.a.createElement(c.a,e)}var r=n(1),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(24)),c=n(2070);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict"
;function i(e){var t=e.component,n=e.isSecondary,i=o()(e,["component","isSecondary"]);return u.a.createElement(t,r()({className:n?d.a.secondaryTitle:d.a.title},i))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(2637),d=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.prefs;return o()("div",{},void 0,t.map(function(e){var t=e.id;return u.a.createElement(c.a,r()({key:t},e))}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(418);t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.serverEntityID,i=e.target,a=e.initialMode,s=e.modes,p=e.libraries,f=e.targetLibrarySectionID,g=e.targetSectionLocationID,m=e.selectedLibrarySectionID,v=e.prefs,y=v.onlyNewAirings,b="episode"===i.type||"show"===i.type||"playlist"===i.type;return r()(c.a,{serverEntityID:t,target:i,useStaticHeight:b},void 0,r()(l.a,{flexWrap:"wrap"},void 0,r()(u.a,{flexBasis:230,maxWidth:230},void 0,s&&r()(d.a,{labelText:n.i(o.default)("Record"),name:"mode",initialValue:a,values:s,
isDisabled:s.length<2})),r()(u.a,{flexBasis:230,maxWidth:230},void 0,y&&r()(d.a,{name:y.id,labelText:y.label,initialValue:y.value,values:y.enumValues.map(function(e){var t,n=e.label,i=e.value;return t={},t[i]=n,t})}))),r()(h.a,{libraries:p,targetLibrarySectionID:f,targetSectionLocationID:g,selectedLibrarySectionID:m}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(876),u=n(875),c=n(423),d=n(899),h=n(2077);t.a=i},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(211),f=n(22),g=n(111),m=n(123),v=n(75),y=n(112),b=n(91),S=n(110),I=n(51),w=n(227),M=n(423),C=n(2071),D=n(2638),P=n.n(D),T=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentDidUpdate=function(e,t){
(e.isMediaSubscriptionMoving&&!this.props.isMediaSubscriptionMoving&&null==this.props.mediaSubscriptionMoveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError)&&this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.isRecordingSchedule,i=e.isMediaSubscriptionDeleting,r=e.mediaSubscriptionDeleteError,s=e.isMediaSubscriptionMoving,o=e.mediaSubscriptionMoveError,l=e.serverEntityID,u=e.server,c=e.target,d=e.conflicts,D=e.onDelete,T=e.onMediaMove,x=e.onErrorDismiss,E=e.onModalClose,A=encodeURIComponent(u.machineIdentifier);return a()(g.a,{onModalClose:E},void 0,a()(m.a,{},void 0,n.i(h.default)("Conflict Detected")),o&&a()("div",{},void 0,a()(w.a,{
errorMessage:n.i(p.a)(o,n.i(h.default)("There was a problem saving your changes...")),onErrorDismiss:x})),r&&a()("div",{},void 0,a()(w.a,{errorMessage:n.i(p.a)(r,n.i(h.default)("There was a problem canceling...")),onErrorDismiss:x})),a()(v.a,{autoScroll:!0},void 0,a()(M.a,{serverEntityID:l,target:c},void 0,a()("div",{className:P.a.message},void 0,1===d.length?n.i(h.default)("Conflicts with 1 recording"):n.i(h.default)("Conflicts with {conflictCount} recordings",{conflictCount:d.length
})),a()("div",{className:P.a.conflicts},void 0,d.map(function(e,t){var n=e.metadataItem;return a()(C.a,{metadataItemEntityID:n},t)})))),a()(y.a,{},void 0,a()(b.a,{},void 0,a()(S.a,{isSpinning:i,kind:f.b.DANGER,onPress:D},void 0,n.i(h.default)("Cancel This")),a()(S.a,{isSpinning:s,kind:f.b.PRIMARY,onPress:T},void 0,n.i(h.default)("Prefer This")),t?a()(I.a,{kind:f.b.PRIMARY,onPress:E},void 0,n.i(h.default)("Close")):a()(I.a,{kind:f.b.PRIMARY,to:"#!/server/"+A+"/schedule"
},void 0,n.i(h.default)("Manage")))))},t}(d.Component);T.defaultProps={conflicts:[]},t.a=T},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(4),y=n(211),b=n(22),S=n(111),I=n(123),w=n(75),M=n(112),C=n(91),D=n(29),P=n(25),T=n(110),x=n(120),E=n(227),A=n(2074),k=n(2073),L=n(2639),_=n.n(L),N=function(e){function t(n,i){c()(this,t);var a=h()(this,e.call(this,n,i));return a.onAdvancedPress=function(){
a.setState({isAdvanced:!a.state.isAdvanced})},a.onFormChange=function(e){if(e.targetLibrarySectionID&&(e.targetLibrarySectionID.value!==a.state.selectedLibrarySectionID&&a.setState({selectedLibrarySectionID:e.targetLibrarySectionID.value}),e.mode&&e.mode.value!==a.state.selectedMode)){var t=e.mode.value;a.setState({selectedMode:t}),a.props.onModeChange(t)}},a.state={selectedLibrarySectionID:n.targetLibrarySectionID,selectedMode:n.initialMode,isAdvanced:!1},a}return f()(t,e),
t.prototype.componentDidUpdate=function(e,t){(e.isMediaSubscriptionSaving&&!this.props.isMediaSubscriptionSaving&&null==this.props.mediaSubscriptionSaveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError)&&this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.mediaSubscriptionKey,i=e.isMediaSubscriptionSaving,r=e.mediaSubscriptionSaveError,o=e.isMediaSubscriptionDeleting,u=e.mediaSubscriptionDeleteError,c=e.prefGroups,d=e.onModalClose,h=e.onErrorDismiss,p=e.onSubmit,f=e.onDelete,g=l()(e,["mediaSubscriptionKey","isMediaSubscriptionSaving","mediaSubscriptionSaveError","isMediaSubscriptionDeleting","mediaSubscriptionDeleteError","prefGroups","onModalClose","onErrorDismiss","onSubmit","onDelete"]);return s()(x.a,{
className:this.state.isAdvanced?_.a.advancedForm:_.a.baseForm,onChange:this.onFormChange,onSubmit:p},void 0,s()(S.a,{onModalClose:d},void 0,s()(I.a,{},void 0,n.i(v.default)("Record Options")),r&&s()("div",{},void 0,s()(E.a,{errorMessage:n.i(y.a)(r,n.i(v.default)("There was a problem saving your changes. Please try again.")),onErrorDismiss:h})),u&&s()("div",{},void 0,s()(E.a,{errorMessage:n.i(y.a)(u,n.i(v.default)("There was a problem with canceling this subscription. Please Try again.")),
onErrorDismiss:h})),s()(w.a,{},void 0,s()("div",{className:_.a.baseSettings},"base",m.a.createElement(A.a,a()({selectedLibrarySectionID:this.state.selectedLibrarySectionID,prefs:c.basic},g))),s()("div",{className:_.a.advancedSettings},"advanced",m.a.createElement(k.a,a()({prefs:c.advanced},g)))),s()(M.a,{className:_.a.footer},void 0,s()(C.a,{},void 0,s()(P.a,{kind:b.b.PRIMARY,onPress:this.onAdvancedPress},void 0,s()(D.a,{className:_.a.advancedIcon,name:"plex-icon-settings-560"
}),this.state.isAdvanced?n.i(v.default)("Show Basic"):n.i(v.default)("Show Advanced"))),s()(C.a,{},void 0,s()(T.a,{isSpinning:o,kind:t?b.b.DANGER:b.b.DEFAULT,onPress:t?f:d},void 0,t?n.i(v.default)("Cancel Recording"):n.i(v.default)("Cancel")),s()(T.a,{type:"submit",isSpinning:i,kind:b.b.PRIMARY},void 0,t?n.i(v.default)("Save"):n.i(v.default)("Record"))))))},t}(g.Component);t.a=N},function(e,t,n){"use strict";function i(e,t){var n=u.a.find(e,function(e){return e.librarySectionID===t})
;return n?n.locations.map(function(e){var t,n=e.id,i=e.path;return t={},t[n]=i,t}):[]}function a(e){var t=e[0];if(t){return t[u.a.keys(t)[0]]}}function r(e){var t=e.libraries,r=e.targetLibrarySectionID,s=e.targetSectionLocationID,l=e.selectedLibrarySectionID,u=i(t,l);return o()(f.a,{flexWrap:"wrap"},void 0,o()(g.a,{flexBasis:230,maxWidth:230},void 0,o()(p.a,{labelText:n.i(d.default)("Add to Library"),name:"targetLibrarySectionID",initialValue:r,size:h.d.SMALL,values:t.map(function(e,t){
var n,i=e.title,a=e.librarySectionID;return n={},n[a]=i,n})})),o()(g.a,{flexBasis:230,maxWidth:230},void 0,u.length>1&&o()(p.a,{labelText:n.i(d.default)("Location"),name:"targetSectionLocationID",size:h.d.SMALL,initialValue:null==s?a(u):s,values:u})))}var s=n(3),o=n.n(s),l=n(2),u=n.n(l),c=n(1),d=(n.n(c),n(4)),h=n(22),p=n(899),f=n(876),g=n(875);t.a=r},function(e,t,n){"use strict";function i(){return n.i(M.createSelector)(function(e,t){return t.subscriptionType},function(e){
return"playlist"===e?"show":e})}function a(){return n.i(M.createSelector)(n.i(E.a)(),i(),function(e,t){var i=n.i(P.a)(t);return e.filter(function(e){return n.i(P.b)(e.type).id===i.id}).map(function(e){return{librarySectionID:e.key,locations:e.locations,title:e.title}})})}function r(){return n.i(M.createSelector)(n.i(x.a)(),function(e){return e.ui.mediaSubscriptionModal},z,U,i(),a(),function(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],a=arguments[4],r=arguments[5],s=b.a.omit(t,"templates","mediaSubscription"),o=n.key,l=n.grabOperations,u=void 0===l?[]:l,c=n.prefs,d=v()(n,["key","grabOperations","prefs"]),h=void 0,p=void 0,f=void 0;i.length>1?(p=b.a.findIndex(i,function(e){return e.selected}),h=i.map(function(e,t){var n,i=e.title;return n={},n[t]=i,n})):(p=0,h=d.title?[{0:d.title}]:null),u.length&&(f=u.reduce(function(e,t){
return t.conflicts&&t.conflicts.length?e.concat(t.conflicts):e},[]));var m=b.a.groupBy(c,function(e){return e.advanced?"advanced":"basic"});return m.basic=b.a.indexBy(m.basic,"id"),g()({mediaSubscriptionKey:o,prefGroups:m,metadataType:a,libraries:r,initialMode:p,modes:h,conflicts:f,server:e},s,d)})}var s=n(3),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(6),g=n.n(f),m=n(16),v=n.n(m),y=n(2),b=n.n(y),S=n(1),I=n.n(S),w=n(14),M=n(8),C=(n.n(M),
n(4)),D=n(41),P=n(34),T=n(128),x=n(54),E=n(493),A=n(731),k=n(88),L=n(832),_=n(880),N=n(1999),R=n(2076),O=n(2075),j=n(2079),z=n.i(M.createSelector)(function(e){return e.ui.mediaSubscriptionModal.mediaSubscription},A.a,function(e,t){return t[e]}),U=n.i(M.createSelector)(function(e){return e.ui.mediaSubscriptionModal.templates},A.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];return e.map(function(e){return t[e]})}),F=g()({addLibrary:k.a
},L),B=function(e){function t(i,a){u()(this,t);var r=d()(this,e.call(this,i,a));return r.onSubmit=function(e){var t=r.props,i=t.serverEntityID,a=t.metadataItemEntityID,s=e.targetLibrarySectionID,o=e.targetSectionLocationID,l=(e.mode,v()(e,["targetLibrarySectionID","targetSectionLocationID","mode"]));n.i(D.a)(function(){r.props.saveMediaSubscription({serverEntityID:i,metadataItemEntityID:a,targetLibrarySectionID:s,targetSectionLocationID:o,prefs:l})})},r.onDelete=function(){n.i(D.a)(function(){
r.props.deleteMediaSubscriptionModal({metadataItemEntityID:r.props.metadataItemEntityID})})},r.onModeChange=function(e){n.i(D.a)(function(){r.props.changeMediaSubscriptionTemplateMode({modeIndex:e})})},r.onMediaMove=function(){n.i(D.a)(function(){r.props.moveMediaSubscriptionModal()})},r.onErrorDismiss=function(){r.props.clearMediaSubscriptionModalError()},r.onCreatePress=function(){var e=r.props,t=e.metadataType,i=e.serverEntityID,a=n.i(P.a)(t),s=a.typeString,o=T.a.get(s)
;r.props.onModalClose(),r.props.addLibrary({serverEntityID:i,options:{redirect:!1,seedAttrs:{type:o.typeString,title:o.title,language:o.defaultLanguage}}})},r.state={showConflicts:i.showConflicts},r}return p()(t,e),t.prototype.componentDidMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=this.state.showConflicts;this.props.isMediaSubscriptionSaving&&!e.isMediaSubscriptionSaving&&e.conflicts&&e.conflicts.length&&(t=!0),
t!==this.state.showConflicts&&this.setState({showConflicts:t});var n=this.props.metadataItemEntityID!==e.metadataItemEntityID,i=this.props.mediaSubscriptionEntityID!==e.mediaSubscriptionEntityID;(n||i)&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearMediaSubscriptionModal()},t.prototype._populate=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.serverEntityID,i=e.mediaSubscriptionEntityID,a=e.metadataItemEntityID,r=e.showConflicts;n.i(D.a)(function(){e.initMediaSubscriptionModal({serverEntityID:t,mediaSubscriptionEntityID:i,metadataItemEntityID:a,showConflicts:r})})},t.prototype.render=function(){return this.props.mediaSubscriptionError?o()(_.a,{message:n.i(C.default)("There was an unexpected error"),onModalClose:this.props.onModalClose
}):this.props.isMediaSubscriptionPending||!this.props.isMediaSubscriptionPopulated?o()(N.a,{onModalClose:this.props.onModalClose}):this.props.libraries.length?this.state.showConflicts?I.a.createElement(O.a,g()({},this.props,{onDelete:this.onDelete,onMediaMove:this.onMediaMove,onErrorDismiss:this.onErrorDismiss})):I.a.createElement(R.a,g()({},this.props,{onModeChange:this.onModeChange,onSubmit:this.onSubmit,onDelete:this.onDelete,onErrorDismiss:this.onErrorDismiss
})):I.a.createElement(j.a,g()({},this.props,{onCreatePress:this.onCreatePress,onErrorDismiss:this.onErrorDismiss,onDelete:this.onDelete}))},t}(S.Component);B.defaultProps={showConflicts:!1},t.a=n.i(w.b)(r,F)(B)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(211),f=n(22),g=n(34),m=n(128),v=n(29),y=n(51),b=n(110),S=n(25),I=n(111),w=n(123),M=n(75),C=n(112),D=n(91),P=n(227),T=n(423),x=n(2640),E=n.n(x),A=function(e){
function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentDidUpdate=function(e,t){e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError&&this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.mediaSubscriptionKey,r=e.target,s=e.metadataType,o=e.isMediaSubscriptionDeleting,l=e.mediaSubscriptionDeleteError,u=e.onCreatePress,c=e.onModalClose,d=e.onErrorDismiss,x=e.onDelete,A=n.i(g.a)(s),k=A.typeString,L=m.a.get(k),_=L.title;return a()(I.a,{onModalClose:c},void 0,a()(w.a,{},void 0,n.i(h.default)("Record Options")),l&&a()(P.a,{errorMessage:n.i(p.a)(l,n.i(h.default)("There was a problem with canceling this subscription. Please Try again.")),
onErrorDismiss:d}),a()(M.a,{},void 0,a()(T.a,{serverEntityID:t,target:r},void 0,a()("div",{className:E.a.errorMessage},void 0,n.i(h.default)("{type} Library Required",{type:_})),a()("p",{},void 0,i?n.i(h.default)("This recording cannot be scheduled because you don\u2019t yet have a library for {type}. Please create a library or cancel the recording.",{type:_
}):n.i(h.default)("This recording cannot be scheduled because you don\u2019t yet have a library for {type}. Please try recording again after you have created your library.",{type:_})),a()(S.a,{kind:f.b.PRIMARY,onPress:u},void 0,a()(v.a,{name:"plex-icon-add-560",className:E.a.addIcon})," ",n.i(h.default)("Create Library")))),a()(C.a,{},void 0,a()(D.a,{},void 0,i&&a()(b.a,{isSpinning:o,kind:f.b.DANGER,onPress:x},void 0,n.i(h.default)("Cancel Recording")),a()(y.a,{onPress:c
},void 0,n.i(h.default)("Cancel")))))},t}(d.Component);t.a=A},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=o()(e,["component","isSecondary"]);return u.a.createElement(t,r()({className:n?d.a.secondaryTitle:d.a.title},i))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(2642),d=n.n(c);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(30)),p=n.n(h),f=n(27),g=n(25),m=n(564),v=n(577),y=n(270),b=n(2082),S=n(2643),I=n.n(S),w=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRecordPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1})},a.state={isSubscribeModalOpen:!1},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.serverEntityID,i=e.metadataItemEntityID,r=e.route,s=e.type,o=e.title,l=e.subscriptionType,u=e.grandparentSubscriptionType,c=e.isSubscribed,d=e.showLink,h=e.beginsAt,f=e.endsAt,S=this.state.isSubscribeModalOpen;return a()("div",{className:p()(t,I.a.overlay)},void 0,a()("div",{className:I.a.background}),c&&a()("div",{className:I.a.subscriptionBadge},void 0,a()(v.a,{type:u||l})),d&&a()(g.a,{className:I.a.link,to:r}),a()(b.a,{className:I.a.progress,beginsAt:h,
endsAt:f}),a()(m.a,{className:d?I.a.recordButton:I.a.recordCoverButton,circleClassName:I.a.recordCircle,iconClassName:I.a.recordIcon,tabIndex:"-1",title:o,onPress:this.onRecordPress}),a()(y.a,{serverEntityID:n,metadataItemEntityID:i,isOpen:S,subscriptionType:s,onModalClose:this.onSubscribeModalClose}))},t}(d.Component);t.a=w},function(e,t,n){"use strict";function i(e){var t=e.beginsAt,i=e.endsAt;if(n.i(p.a)(t,i)){var a=i-t;return(Date.now()/1e3-t)/a*100}}
var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),n(504)),f=n(27),g=n(901),m=function(e){function t(n,i){o()(this,t);var a=u()(this,e.call(this,n,i));return a.tick=function(){a.setState(a.getState(a.props)),a.setTickTimeout()},a.state=a.getState(n),a}return d()(t,e),t.prototype.componentWillMount=function(){this.setTickTimeout()},t.prototype.componentWillReceiveProps=function(e,t){this.setState(this.getState(e))},
t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this.tickTimeout&&clearTimeout(this.tickTimeout)},t.prototype.getState=function(e){return{progress:i(e)}},t.prototype.setTickTimeout=function(){this.tickTimeout=setTimeout(this.tick,6e4-Date.now()%6e4)},t.prototype.render=function(){var e=this.props.className,t=this.state.progress;return t?r()(g.a,{className:e,progress:t}):null},t}(h.Component);t.a=m},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.type,i=e.width,a=e.height,s=e.isFolder,u=s?"plex-icon-folder-560":l.a[n];if(!u)return null;var c={fontSize:Math.max(14,Math.min(Math.round(i/4),42)),lineHeight:a+"px"};return r()(o.a,{name:u,className:t,style:c})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(29)),l=n(771);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,s=e.type,l=e.selectionType,c=e.activeSelectionType,h=e.isSelected,m=e.isOffscreen,y=e.visibleFace,b=e.imageWidth,S=e.imageHeight,I=e.imageUrl,w=e.imageTransitionProps,M=e.isFolder,C=e.onImageLoad,D=e.onImageError,P=e.onSelectItem,T=e.onDeselectItem,x=u()(e,["className","serverEntityID","providerEntityID","metadataItemEntityID","type","selectionType","activeSelectionType","isSelected","isOffscreen","visibleFace","imageWidth","imageHeight","imageUrl","imageTransitionProps","isFolder","onImageLoad","onImageError","onSelectItem","onDeselectItem"])
;return o()("div",{className:p()(t,v.a[y],h&&v.a.isSelected,!!c&&!h&&v.a.isOtherItemSelected)},void 0,o()(f.a,{serverEntityID:n,type:s,isOffscreen:m,url:I,width:b,height:S,transitionProps:w,isFolder:M,onLoad:C,onError:D}),d.a.createElement(g.a,r()({serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,type:s,selectionID:a,selectionType:l,activeSelectionType:c,isSelected:h,onSelectItem:P,onDeselectItem:T},x)))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(30),p=n.n(h),f=n(425),g=n(2086),m=n(2645),v=n.n(m);i.defaultProps={className:v.a.face},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(4),g=n(22),m=n(63),v=n(29),y=n(36),b=n(25),S=n(569),I=n(339),w=n(413),M=n(342),C=n(901),D=n(2647),P=n.n(D),T=a()(v.a,{name:"plex-icon-edit-560"}),x=a()(v.a,{name:"plex-icon-more-560"
}),E=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1},r._moreButtonID=n.i(m.a)(),r._selectButtonID=n.i(m.a)(),r}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,i=e.serverEntityID,r=e.providerEntityID,s=e.metadataItemEntityID,o=e.listType,l=e.route,u=e.title,c=e.viewCount,d=e.viewOffset,h=e.viewPercent,m=e.unviewedLeafCount,D=e.mediaCount,E=e.isLibraryVideo,A=e.isLibraryVideoDirectory,k=e.isMultiVersion,L=e.isMatching,_=e.isProcessing,N=e.isAnalyzing,R=e.isRefreshing,O=e.isTrash,j=e.showLink,z=e.showPlay,U=e.showEdit,F=e.showSelect,B=e.showMore,V=e.hasActiveSelection,H=e.isSelected,W=e.isOtherItemSelected,Y=e.isConflictingTypeSelected,Q=e.isModifierKeyPressed,G=e.onMouseEnter,K=e.onPlayPress,q=e.onEditPress,X=e.onSelectPress,Z=e.onDeselectPress,J=this.state.isActionsMenuOpen,$=F&&(Q||W)
;return a()("div",{className:p()(t,P.a.overlay,V&&P.a.hasActiveSelection,H&&P.a.isSelected,W&&P.a.isOtherItemSelected,Y&&P.a.isConflictingTypeSelected,F&&Q&&P.a.isModifierKeyPressed,R&&P.a.isRefreshing,O&&P.a.isTrash,J&&P.a.isActionsMenuOpen),onMouseEnter:G},void 0,a()("div",{className:P.a.background}),E&&!c&&!d&&a()("div",{className:P.a.unwatchedTagContainer},void 0,a()("div",{className:P.a.unwatchedTag})),A&&!!m&&a()("div",{className:p()(P.a.unwatchedBadge)},void 0,m),k&&a()("div",{
className:p()(P.a.versionBadge)},void 0,a()(v.a,{name:"plex-icon-files-560",className:P.a.versionBadgeIcon}),D),!!h&&a()(C.a,{className:P.a.progress,progress:h}),R&&a()("div",{className:P.a.refreshingSpinnerContainer},void 0,a()(y.a,{className:P.a.refreshingSpinner})),L&&a()("div",{className:p()(P.a.refreshingCircle)},void 0,a()(v.a,{name:"plex-icon-search-560","aria-label":n.i(f.default)("Matching")})),_&&a()("div",{className:p()(P.a.refreshingCircle)},void 0,a()(v.a,{
name:"plex-icon-tagging-560","aria-label":n.i(f.default)("Downloading Metadata")})),N&&a()("div",{className:p()(P.a.refreshingCircle)},void 0,a()(v.a,{name:"plex-icon-analyzing-560","aria-label":n.i(f.default)("Analyzing")})),O&&a()("div",{className:p()(P.a.trashCircle)},void 0,a()(v.a,{name:"plex-icon-trash-560","aria-label":n.i(f.default)("In Trash")})),j&&a()(b.a,{className:P.a.link,to:l}),$&&!Y&&a()(b.a,{className:P.a.selectCoverButton,onPress:X}),$&&Y&&a()(S.a,{
className:P.a.selectCoverButton,component:b.a,tooltip:n.i(f.default)("A different type is selected"),tooltipAttachment:g.e.TOP_CENTER,tooltipTarget:this._selectButtonID,showOnFocus:!1,hideOnPress:!1}),z&&a()(I.a,{className:j?P.a.playButton:P.a.playCoverButton,circleClassName:P.a.playCircle,tabIndex:"-1",title:u,"data-qa-id":"metadataPosterPlayButton",onPress:K}),U&&a()(b.a,{className:P.a.editButton,tabIndex:"-1","aria-label":n.i(f.default)("Edit {title}",{title:u}),
"data-qa-id":"metadataPosterEditButton",onPress:q},void 0,T),B&&a()(b.a,{id:this._moreButtonID,className:P.a.moreButton,tabIndex:"-1","aria-label":n.i(f.default)("More Actions"),"aria-haspopup":!0,"data-qa-id":"metadataPosterMoreButton",onPress:this.onActionsPress},void 0,x,a()(M.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:s,listType:o,showPlay:!1,showEdit:!1,target:this._moreButtonID,isOpen:J,onMenuClose:this.onActionsMenuClose})),F&&a()(w.a,{id:this._selectButtonID,
className:P.a.selectButton,circleClassName:P.a.selectCircle,tabIndex:"-1",title:u,isSelected:H,isDisabled:Y,onPress:X}),H&&a()(b.a,{className:P.a.deselectCoverButton,onPress:Z}))},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(function(e,t){return t.type},function(e,t){return t.listType},n.i(g.a)(),m.a,v.a,n.i(y.a)(),n.i(b.a)(),function(e,t,i,a,r,s,o){
var l=i.title,u=i.duration,c=i.viewCount,g=i.viewOffset,m=i.unviewedLeafCount,v=i.metadataState,y=i.mediaState,b=i.deletedAt,S=i.subscriptionID,I=i.subscriptionType,w=i.grandparentSubscriptionID,C=i.grandparentSubscriptionType,D=i.isLibraryItem,P=i.isFolder,T=i.isExtra,x=i.Media,E=n.i(h.b)(e),A=n.i(h.k)(e),k=x.length,L=null!=S||null!=w,_=D&&!P&&!T&&E.mediaType===d.a,N=D&&!T&&n.i(h.c)(e)&&A.mediaType===d.a,R=v===p.a,O=v===p.b||v===p.c,j=!R&&!O&&!!y,z=R||O||j,U=!z&&!!b;return{server:a,provider:r,
route:s,title:l,viewCount:c,viewOffset:g,viewPercent:g&&g/u*100,unviewedLeafCount:m,mediaCount:k,subscriptionType:I,grandparentSubscriptionType:C,isSubscribed:L,isLibraryVideo:_,isLibraryVideoDirectory:N,isMultiVersion:n.i(f.a)(i),isMatching:R,isProcessing:O,isAnalyzing:j,isRefreshing:z,isTrash:U,showLink:!!s,showPlay:n.i(M.a)(a,r,i),showEdit:n.i(M.b)(a,r,i),showSelect:n.i(M.c)(a,r,i),showMore:!P,beginsAt:o&&o.beginsAt,endsAt:o&&o.endsAt}})}function a(e,t){var i={serverEntityID:t.serverEntityID,
metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage};return{onPlayPress:function(){e(n.i(S.playMetadataItem)(o()({},i,{listType:t.listType})))},onEditPress:function(){e(n.i(S.editMetadataItem)(i))}}}function r(e){return e.provider.protocols.livetv?u.a.createElement(P.a,e):e.showSelect?u.a.createElement(T,e):u.a.createElement(D.a,e)}var s=n(6),o=n.n(s),l=n(1),u=n.n(l),c=n(8),d=(n.n(c),
n(215)),h=n(34),p=n(734),f=n(803),g=n(24),m=n(47),v=n(45),y=n(548),b=n(330),S=n(107),I=n(608),w=n(277),M=(n(92),n(235)),C=n(129),D=n(2085),P=n(2081),T=n.i(I.a)(D.a);t.a=n.i(C.a)(i,a,w.a)(r)},function(e,t,n){"use strict";function i(e){switch(e){case"artist":return"track";default:return e}}function a(e){var t=e.serverEntityID,n=e.isOffscreen,a=e.tagType,r=e.librarySectionType,o=e.title,p=e.url,f=e.width,g=e.height,m=e.transitionProps,v=e.onLoad,y=e.onError;if(n)return null;if(p)return s()(h.a,{
serverEntityID:t,url:p,width:f,height:g,transitionProps:m,backgroundPosition:"center center",onLoad:v,onError:y});var b=u.a.get(a);if(b&&b.isPerson)return s()(c.a,{name:o,width:f,height:g});var S=l.a.get(r),I=S&&S.typeString,w=i(I);return s()(d.a,{type:w,width:f,height:g})}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(128)),u=n(390),c=n(1972),d=n(900),h=n(878);t.a=a},function(e,t,n){"use strict";function i(e){var t=e.rating,n=e.ratingImage,i=e.audienceRating,a=e.audienceRatingImage
;return t?g.test(n)?"imdb":m.test(n)||i&&m.test(a)?"rt":"other":"unrated"}function a(e){var t=e.rating;return u()("div",{className:f.a.rating,title:n.i(h.default)("IMDb Rating")},void 0,u()("div",{className:f.a.imdb}),t.toFixed(1))}function r(e){var t=e.rating,i=e.ratingImage,a=e.audienceRating,r=e.audienceRatingImage,s=i&&i.substr(i.lastIndexOf(".")+1),o=a&&r&&r.substr(r.lastIndexOf(".")+1),l={certified:n.i(h.default)("Certified Fresh"),ripe:n.i(h.default)("Fresh"),
rotten:n.i(h.default)("Rotten"),spilled:n.i(h.default)("Audience Rating"),upright:n.i(h.default)("Audience Rating")};return u()("div",{className:f.a.rt},void 0,s&&u()("div",{className:f.a.rating},void 0,u()("div",{className:f.a[s],title:l[s]}),Math.round(10*t)+"%"),o&&u()("div",{className:f.a.rating},void 0,u()("div",{className:f.a[o],title:l[o]}),Math.round(10*a)+"%"))}function s(e){var t=e.rating;return u()("div",{className:f.a.rating},void 0,u()("div",{className:f.a.other,
title:n.i(h.default)("Rating")}),Math.round(10*t)+"%")}function o(e){var t=i(e),n=v[t];return n?u()("div",{className:f.a.container},void 0,d.a.createElement(n,e)):null}var l=n(3),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(2652),f=n.n(p),g=/^imdb\:\/\//,m=/^rottentomatoes\:\/\//,v={imdb:a,rt:r,other:s};t.a=o},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.tabIndex,a=e.server,s=e.provider,u=e.librarySectionKey,c=e.tag,d=e.filter;if(!c)return null;var h={filters:d,filterLabel:c
},p=n.i(o.a)(a,s,u,h);return p&&d?r()(l.a,{className:t,tabIndex:i,title:c,to:p},void 0,c):r()("span",{className:t,title:c},void 0,c)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(94)),l=(n(93),n(92),n(25));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.role;return r()("span",{className:t,title:n},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{
grandparentTitle:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).grandparentTitle}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(580);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.grandparentTitle,a=e.grandparentRoute;return r()(o.a,{className:t,tabIndex:n,title:i,route:a})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(344));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=e.parentTitle,a=e.parentRoute
;return r()(o.a,{className:t,tabIndex:n,title:i,route:a})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(344));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title,i=e.isFolder,a=e.isMultiVersion,s=e.hasMusicVideo;return r()("span",{className:t},void 0,r()("div",{className:u.a.titleContainer},void 0,i&&r()(o.a,{className:u.a.folderIconContainer,iconClassName:u.a.folderIcon,name:"plex-icon-folder-560"}),r()("span",{className:u.a.title},void 0,n),r()("span",{},void 0,a&&r()(o.a,{
iconClassName:u.a.multiVersionIcon,name:"plex-icon-files-560"}),s&&c)))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(905)),l=n(2653),u=n.n(l),c=r()(o.a,{name:"plex-icon-shows-560"});t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(l.a)(),function(e){return e?{title:e.title,isFolder:e.isFolder,isMultiVersion:n.i(s.a)(e),hasMusicVideo:n.i(o.a)(e)}:{}})}var a=n(14),r=n(8),s=(n.n(r),n(803)),o=n(802),l=n(24),u=n(2094);t.a=n.i(a.b)(i)(u.a)},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.addedAt;return r()(o.a,{className:t,timestamp:n})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(915));t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){return{addedAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).addedAt}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2096);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.skipChildren,a=e.childCount,s=e.leafCount
;if(i)return r()(l.a,{className:t,leafCount:s});var u=void 0;return null!=a&&(u=1===a?n.i(o.default)("{albumCount} album",{albumCount:a}):n.i(o.default)("{albumCount} albums",{albumCount:a})),r()("span",{className:t},void 0,u)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(2127);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.bitrate;return r()("span",{className:t},void 0,n.i(o.default)(i))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(516));t.a=i},function(e,t,n){"use strict"
;function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.Media&&e.Media[0];return{bitrate:t&&t.bitrate}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2099);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title,i=e.originalTitle,a=e.hasMusicVideo;return r()("span",{className:t},void 0,r()("span",{className:c.a.titleContainer},void 0,r()("span",{className:c.a.title
},void 0,n,!!i&&r()("span",{className:c.a.trackArtist},void 0,!!n&&d,i)),a&&h))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(90)),l=n(905),u=n(2655),c=n.n(u),d=r()(o.a,{}),h=r()(l.a,{name:"plex-icon-shows-560"});t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(o.a)(),function(e){return e?{title:e.title,originalTitle:e.originalTitle,hasMusicVideo:n.i(s.a)(e)}:{}})}var a=n(14),r=n(8),s=(n.n(r),n(802)),o=n(24),l=n(2101);t.a=n.i(a.b)(i)(l.a)},function(e,t,n){"use strict"
;function i(e){var t=e.className,i=e.contentRating;return r()("span",{className:t},void 0,n.i(o.a)(i))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(769));t.a=i},function(e,t,n){"use strict";function i(e,t){return n.i(r.createSelector)(n.i(s.a)(),function(){return{contentRating:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).contentRating}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2103);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.rating,i=e.ratingImage,a=e.audienceRating,s=e.audienceRatingImage;return n?r()("span",{className:t},void 0,r()(o.a,{rating:n,ratingImage:i,audienceRating:a,audienceRatingImage:s})):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2088));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.date;return i?r()("span",{className:t},void 0,n.i(o.default)(i)):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(160));t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.addedAt;return n?r()(o.a,{className:t,date:1e3*n}):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2106));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.index,a=e.originallyAvailableAt,s=n.i(o.a)({useLongName:!0,episodeIndex:i,date:a,noLeadingZero:!0});return r()("span",{className:t},void 0,s)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(318));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index,originallyAvailableAt:e.originallyAvailableAt}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2108);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.extraType,i=o.a.get(n);return r()("span",{className:t},void 0,i?i.title:"")}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(531));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{
extraType:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).extraType}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2110);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{index:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).index}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(907);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.leafCount,a=void 0
;return null!=i&&(a=1===i?n.i(o.default)("{itemCount} item",{itemCount:i}):n.i(o.default)("{itemCount} items",{itemCount:i})),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.lastViewedAt;return r()(o.a,{className:t,timestamp:n})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(915));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){
var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{title:i.title,route:n.i(u.a)(e,t,i.key)}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(102),c=n(344);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=(e.className,e.duration,e.viewOffset);return e.viewCount||t?t?r()("div",{className:l.a.partiallyWatchedCircle}):null:r()("div",{className:l.a.unwatchedCircle})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2657)),l=n.n(o);t.a=i},function(e,t,n){
"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset,viewCount:e.viewCount}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2116);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.duration;return i?r()("span",{className:t},void 0,n.i(o.a)(i)):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(161));t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.duration,i=e.viewOffset,a=e.viewCount;return e.isFolder?null:a||i?r()(o.a,{className:t,duration:n,viewOffset:i}):r()("div",{className:u.a.unwatchedCircle})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(588)),l=n(2658),u=n.n(l);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{duration:e.duration,viewOffset:e.viewOffset,viewCount:e.viewCount,
isFolder:e.isFolder}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2119);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.originallyAvailableAt;return r()("span",{className:t},void 0,n.i(o.default)(i,"MMM D, YYYY"))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(160));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.videoResolution;return r()("span",{className:t},void 0,n.i(o.default)(i))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(252));t.a=i
},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.Media&&e.Media[0];return{videoResolution:t&&t.videoResolution}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2122);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.skipChildren,a=e.childCount,s=e.leafCount;if(i)return r()(l.a,{className:t,leafCount:s});var u=void 0
;return null!=a&&(u=1===a?n.i(o.default)("{seasonCount} season",{seasonCount:a}):n.i(o.default)("{seasonCount} seasons",{seasonCount:a})),r()("span",{className:t},void 0,u)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(585);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.originalTitle;return r()("span",{className:t,title:n},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){
return{originalTitle:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).originalTitle}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2125);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.leafCount,a=void 0;return null!=i&&(a=1===i?n.i(o.default)("{trackCount} track",{trackCount:i}):n.i(o.default)("{trackCount} tracks",{trackCount:i})),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4));t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.tabIndex,i=e.parentTitle,a=e.parentRoute,s=e.grandparentTitle,o=e.grandparentRoute;return r()("span",{className:t},void 0,r()(l.a,{tabIndex:n,title:s,route:o}),u,r()(l.a,{tabIndex:n,title:i,route:a}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(90)),l=n(344),u=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{
parentTitle:i.parentTitle,parentRoute:n.i(u.a)(e,t,i.parentKey),grandparentTitle:i.grandparentTitle,grandparentRoute:n.i(u.a)(e,t,i.grandparentKey)}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(102),c=n(2128);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.unviewedLeafCount,a=void 0;return i>0&&(a=n.i(o.default)("{numEpisodes} unwatched",{numEpisodes:i})),r()("span",{className:t},void 0,a)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4));t.a=i
},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{unviewedLeafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).unviewedLeafCount}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2130);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.value,i=e.onRatingChange;return r()("span",{className:t},void 0,r()(o.a,{value:n,onRatingChange:i}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(1979));t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.viewCount;return r()("span",{className:t},void 0,n>0?n:null)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{viewCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).viewCount}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2133);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.mediaItem
;if(!t)return r()("span",{},void 0,n.i(o.default)("None"));var i=[];t.videoCodec&&i.push(n.i(l.default)(t.videoCodec));var a=n.i(c.a)(t),s=a?a.scanType:null;return r()("span",{},void 0,n.i(u.default)(t.videoResolution,s)||n.i(o.default)("Unknown"),!!i.length&&h,i.join(" "))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(253),u=n(252),c=n(250),d=n(90),h=r()(d.a,{});t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(12),v=n(63),y=n(599),b=n(2063),S=n(592),I=n(593),w=n(591),M=n(594),C=n(345),D=["showPlayAll","showShuffle","showAddToPlaylist","showSync"],P=["showOptimize"],T=function(e){function t(i,a){l()(this,t);var r=c()(this,e.call(this,i,a));return r.onPlayShortcut=function(){r.props.showPlayAll&&r.props.onPlayAllPress()},r.onActionsPress=function(e){r.setState({
isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1},r._moreButtonID=n.i(v.a)(),r}return h()(t,e),t.prototype.componentDidMount=function(){m.a.on("shortcut:playSelected",this.onPlayShortcut)},t.prototype.componentWillUnmount=function(){m.a.off("shortcut:playSelected",this.onPlayShortcut)},t.prototype.render=function(){
var e=this.props,t=e.className,i=e.showPlayAll,r=e.showPlayAllOverflow,o=e.showShuffle,l=e.showShuffleOverflow,u=e.showAddToPlaylist,c=e.showAddToPlaylistOverflow,d=e.showSync,h=e.showSyncOverflow,p=e.showOverflow,m=e.onPlayAllPress,v=e.onShufflePress,y=e.onAddToPlaylistPress,D=e.onSyncPress,P=this.state.isActionsMenuOpen;return s()("div",{className:t},void 0,i&&s()(S.a,{playLabel:n.i(g.default)("Play All"),onPress:m}),o&&s()(I.a,{onPress:v}),u&&s()(w.a,{onPress:y}),d&&s()(M.a,{onPress:D
}),p&&s()(C.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:n.i(g.default)("More..."),isMenuOpen:P,onPress:this.onActionsPress}),f.a.createElement(b.a,a()({},this.props,{target:this._moreButtonID,isOpen:P,showPlayAll:r,showShuffle:l,showAddToPlaylist:c,showSync:h,onMenuClose:this.onActionsMenuClose})))},t}(p.Component);t.a=n.i(y.a)(T,D,P)},function(e,t,n){"use strict";function i(e){var t=e.markUnwatched,i=e.onPress;return r()(u.a,{icon:"plex-icon-toolbar-watched-toggle-560",
tooltip:t?n.i(o.default)("Mark Unwatched"):n.i(o.default)("Mark Watched"),onPress:i},void 0,c)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(29),u=n(148),c=r()(l.a,{name:"plex-icon-toolbar-watched-toggle-560"});i.defaultProps={markUnwatched:!1},t.a=i},function(e,t,n){"use strict";function i(e){return u.a.createElement(h.a,o()({tooltip:n.i(c.default)("Play Trailer")},e),p)}var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(29),h=n(148),p=r()(d.a,{
name:"plex-icon-toolbar-play-trailer-560"});t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=n(63),g=n(568),m=n(146),v=n(345),y=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onMenuButtonPress=function(e){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(){r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1,isMarkWatchedModalOpen:!1,
isMarkUnwatchedModalOpen:!1},r._toolbarMenuButtonID=n.i(f.a)(),r}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.showMarkWatched,i=e.showMarkUnwatched,r=e.onMarkWatchedPress,s=e.onMarkUnwatchedPress,o=this.state.isMenuOpen;return a()(v.a,{id:this._toolbarMenuButtonID,icon:"plex-icon-toolbar-watched-toggle-560",label:n.i(h.default)("Toggle Watched..."),isMenuOpen:o,onPress:this.onMenuButtonPress
},void 0,a()(g.a,{target:this._toolbarMenuButtonID,isOpen:o,onMenuClose:this.onMenuClose},void 0,t&&a()(m.a,{onPress:r},void 0,n.i(h.default)("Mark Watched")),i&&a()(m.a,{onPress:s},void 0,n.i(h.default)("Mark Unwatched"))))},t}(d.Component);t.a=y},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.metricsPage,i=e.metricsProperties,a=e.isMetricsDelegated,s=o()(e,["children","metricsPage","metricsProperties","isMetricsDelegated"]);return u.a.createElement(c.a,r()({},i,{page:n,
isDelegated:a}),u.a.createElement(d.a,r()({className:p.a.page},s),t))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(256),d=n(74),h=n(2659),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.machineIdentifier,a=e.isWaitingForPrimaryServer,s=e.primaryServerEntityID,l=u()(e,["children","machineIdentifier","isWaitingForPrimaryServer","primaryServerEntityID"]),c=n.i(f.a)(p.f,i),m=!c||c===s;return s&&m?d.a.createElement(y.a,o()({serverEntityID:s
},l),t):a||!m?r()(v.a,{},void 0,r()(g.a,{label:n.i(h.default)("Connecting")})):b}var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(67),f=n(62),g=n(36),m=n(921),v=n(133),y=n(2145),b=r()(m.a,{});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.showSpinner,s=e.isHubKey,c=e.isTimeline,g=e.selectedDirectory,m=e.activeType,v=e.activeFilters,y=e.activeFilterLabel,b=e.activeSort,S=e.activeLimit,I=e.customFilter,w=e.typeKey,M=e.folderKey,C=e.folderTitle,D=e.parentFolderKey,P=e.parentFolderTitle;return a?r()(u.a,{},void 0,r()(l.a,{label:n.i(o.default)("Loading libraries")})):g&&s?r()(d.a,{serverEntityID:t,providerEntityID:i,selectedDirectory:g}):g&&c?r()(p.a,{serverEntityID:t,providerEntityID:i,
selectedDirectory:g}):g?r()(h.a,{serverEntityID:t,providerEntityID:i,selectedDirectory:g,activeType:m,activeFilters:v,activeFilterLabel:y,activeSort:b,activeLimit:S,customFilter:I,typeKey:w,folderKey:M,folderTitle:C?C:g.title,parentFolderKey:D,parentFolderTitle:P}):f}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(36),u=n(133),c=(n(98),n(923)),d=n(2155),h=n(2183),p=n(2311),f=r()(c.a,{});i.defaultProps={isTimeline:!1},t.a=i},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(82),v=n(25),y=n(36),b=n(133),S=n(274),I=n(923),w=a()(I.a,{}),M=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onRetry=function(e){i.props.onRetry({serverEntityID:i.props.serverEntityID})},a=n,c()(i,a)}return h()(t,e),t.prototype.render=function(){
var e=this.props,t=e.children,i=e.hasProvider,r=e.isPersonalCloudServer,o=e.isRetrying,l=e.showSpinner,u=e.showError,c=s()(e,["children","hasProvider","isPersonalCloudServer","isRetrying","showSpinner","showError"]);if(l)return a()(b.a,{},void 0,a()(y.a,{label:n.i(g.default)("Loading libraries")}));if(u)return r?a()(S.a,{title:n.i(g.default)("There was an unexpected error loading libraries"),description:n.i(g.default)("Please retry, or visit our forums if you continue to experience problems")
},void 0,o?n.i(g.default)("Retrying\u2026"):a()(v.a,{kind:m.PRIMARY,onPress:this.onRetry},void 0,n.i(g.default)("Retry"))):a()(S.a,{title:n.i(g.default)("There was an unexpected error loading libraries")});if(!i)return w;var d=f.a.Children.only(t);return f.a.cloneElement(d,c)},t}(p.Component);t.a=M},function(e,t,n){"use strict";function i(e){
var t=e.children,i=e.friendlyName,a=e.isConnected,s=e.isUnavailable,l=e.isUnauthorized,g=e.isFullServer,m=e.isFullOwnedServer,v=e.isHostedHttps,y=e.hasHttpsConnections,b=e.requiresFullServer,S=e.requiresFullOwnedServer,I=o()(e,["children","friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","isHostedHttps","hasHttpsConnections","requiresFullServer","requiresFullOwnedServer"]);if(a){if(b&&!g||S&&!m)return r()(f.a,{
title:n.i(c.default)("You're not supposed to be here"),description:i?n.i(c.default)('This page is restricted from the server "{serverName}"',{serverName:i}):n.i(c.default)("This page is restricted from this server")});var w=u.a.Children.only(t);return u.a.cloneElement(w,I)}if(s)return v&&!y?r()(h.a,{serverEntityID:e.serverEntityID}):r()(f.a,{title:i?n.i(c.default)('The server "{serverName}" is unavailable',{serverName:i}):n.i(c.default)("This server is unavailable"),
description:n.i(c.default)("Plex will automatically try to reconnect to this server")});if(l)return r()(f.a,{title:n.i(c.default)("No soup for you!"),description:n.i(c.default)("You do not have access to this server")});var M=i?n.i(c.default)("Connecting to {serverName}",{serverName:i}):n.i(c.default)("Connecting");return r()(p.a,{},void 0,r()(d.a,{label:M}))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(36),h=n(2165),p=n(133),f=n(150);t.a=i},function(e,t,n){"use strict"
;function i(){return n.i(u.createSelector)(n.i(d.a)(),function(e){var t=o.a.pick(e,"friendlyName","isConnected","isPending","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections");return r()({},t,{isHostedHttps:c.a.isHostedHttps})})}var a=n(6),r=n.n(a),s=n(2),o=n.n(s),l=n(14),u=n(8),c=(n.n(u),n(66)),d=n(54),h=n(2144);t.a=n.i(l.b)(i)(h.a)},function(e,t,n){"use strict";function i(e){
var t=e.children,i=e.closedNode,a=e.title,s=e.isOpen,l=e.updateUserError,v=e.isUpdatingUser,b=e.onSubmit,S=e.onErrorDismiss,I=e.onTogglePress,w=s&&l?n.i(c.a)(o.a.first(l.request)):null;return r()(f.a,{isOpen:s,errorMessage:w,closedNode:r()(g.a,{className:y.a.sectionDetails},void 0,r()(p.a,{className:y.a.label},void 0,a),i),onErrorDismiss:S,onTogglePress:I},void 0,r()(h.a,{onSubmit:b},void 0,t,r()("div",{className:y.a.submitButton},void 0,r()(m.a,{type:"submit",isSpinning:v,kind:d.PRIMARY
},void 0,n.i(u.default)("Save Changes")))))}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),u=(n.n(l),n(4)),c=n(249),d=n(82),h=n(120),p=n(121),f=n(944),g=n(606),m=n(110),v=n(2669),y=n.n(v);t.a=i},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(16),s=n.n(r),o=n(6),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(4),S=n(46),I=n(317),w=n(249),M=n(957),C=n(121),D=n(566),P=n(567),T=n(1992),x=n(417),E=n(435),A=n(436),k=n(1997),L=n(1977),_=n(2146),N=n(2150),R=a()("span",{},void 0," \u2014 ",a()(L.a,{})),O=function(e){function t(n,i){c()(this,t);var a=h()(this,e.call(this,n,i));return a.createToggleHandler=function(e){return function(t){var n;t.preventDefault()
;var i=a.state.AccountFormSections,r=i[e];a.props.updateUserError&&a.props.clearUpdateUserError(),a.setState({AccountFormSections:l()({},m.a.mapObject(i,function(){return!1}),(n={},n[e]=!r,n))})}},a.getAccountFormSectionProps=function(e,t){return{title:e,onTogglePress:a.createToggleHandler(t),isOpen:a.state.AccountFormSections[t],onSubmit:a.onFormSubmit,onErrorDismiss:a.onErrorDismiss,isUpdatingUser:a.props.isUpdatingUser,updateUserError:a.props.updateUserError}},a.onFormSubmit=function(e){
a.props.updateUser(e)},a.onErrorDismiss=function(e){e.preventDefault(),a.props.clearUpdateUserError()},a.state={AccountFormSections:{isUsernameOpen:!1,isEmailOpen:!1,isPasswordOpen:!1,isLocaleOpen:!1,isPhotoOpen:!1,isNewsletterOpen:!1}},a}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){if(this.props.isUpdatingUser&&!e.isUpdatingUser&&!e.updateUserError){var t=this.state.AccountFormSections;this.setState({AccountFormSections:m.a.mapObject(t,function(){return!1})})}},
t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.user,r=s()(e,["serverEntityID","user"]),o=m.a.mapObject(r.updateUserError,function(e){return e.map(function(e){return n.i(w.a)(e)})}),u=n.i(b.default)("System Default"),c=m.a.map(I.a,function(e,t){var n;return n={},n[t]=e,n}),d=!i.restricted;return a()(E.a,{metricsPage:S.m,metricsPane:"account"
},void 0,a()(A.a,{},void 0,n.i(b.default)("Account"),i.hasPlexPass&&R),y.a.createElement(_.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Photo"),"isPhotoOpen"),{closedNode:a()(k.a,{serverEntityID:t,url:this.props.user.thumb,width:80,height:80})}),a()(C.a,{},void 0,n.i(b.default)("Photo")),a()(N.a,{serverEntityID:t,name:"avatar",width:180,height:180,isDeletingAvatar:this.props.isDeletingAvatar,initialValue:this.props.user.thumb,url:this.props.user.thumb
})),y.a.createElement(_.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Language"),"isLocaleOpen"),{closedNode:I.a[i.locale]||u}),a()(x.a,{labelText:n.i(b.default)("Language"),helpText:n.i(b.default)("This sets the default language for Plex applications that do not provide their own language setting."),name:"locale",initialValue:i.locale,values:[{"":u}].concat(c)})),d&&y.a.createElement(_.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Username"),"isUsernameOpen"),{
closedNode:i.username}),a()(P.a,{labelText:n.i(b.default)("Username"),helpText:n.i(b.default)("Your username will be visible to friends with whom you have shared your server."),name:"username",initialValue:i.username,errors:o.username,validations:[M.b]}),a()(D.a,{name:"emailOnlyAuth",checkboxText:n.i(b.default)("Allow username to be used when signing in"),helpText:n.i(b.default)("Your email address will be required to sign in when username sign-in is not allowed."),initialValue:i.emailOnlyAuth,
checkedValue:!1,uncheckedValue:!0})),d&&y.a.createElement(_.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Email Address"),"isEmailOpen"),{closedNode:i.email}),a()(P.a,{labelText:n.i(b.default)("Email Address"),name:"email",initialValue:i.email,errors:o.email,validations:[M.c]}),a()(P.a,{labelText:n.i(b.default)("Password"),type:"password",name:"currentPassword",initialValue:"",validations:[M.d]
})),d&&y.a.createElement(_.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Password"),"isPasswordOpen"),{closedNode:"**********"}),a()(T.a,{labelText:n.i(b.default)("New Password"),name:"password",initialValue:"",errors:o.password,validations:[M.d,M.e]}),a()(P.a,{labelText:n.i(b.default)("Confirm New Password"),type:"password",name:"passwordConfirmation",initialValue:"",validations:[M.f,M.g]}),a()(P.a,{labelText:n.i(b.default)("Current Password"),type:"password",name:"currentPassword",
initialValue:"",validations:[M.h]}),a()(D.a,{checkboxText:n.i(b.default)("Sign out connected devices after password change"),name:"resetDevices",initialValue:!1})),d&&y.a.createElement(_.a,l()({},this.getAccountFormSectionProps(n.i(b.default)("Plex News"),"isNewsletterOpen"),{closedNode:i.mailingListActive?n.i(b.default)("You are currently subscribed"):n.i(b.default)("You are not subscribed")}),a()(D.a,{name:"mailingListActive",initialValue:i.mailingListActive,
labelText:n.i(b.default)("Plex News"),checkboxText:n.i(b.default)("Subscribe to our amazing, but infrequent email newsletter")})))},t}(v.Component);t.a=O},function(e,t,n){"use strict";var i=n(2),a=n.n(i),r=n(14),s=n(8),o=(n.n(s),n(182)),l=n(371),u=n(398),c=n(2147),d=n.i(s.createSelector)(o.a,l.a,function(e,t){var n=e.desktop;return{serverEntityID:t.entityID,user:a.a.pick(e,"username","email","emailOnlyAuth","thumb","locked","locale","hasPlexPass","mailingListActive","restricted"),
isUpdatingUser:n.isUpdatingUser,updateUserError:n.updateUserError}}),h={updateUser:u.i,clearUpdateUserError:u.j};t.a=n.i(r.b)(d,h)(c.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(19),m=n(4),v=n(315),y=n(521),b=n(27),S=n(29),I=n(411),w=n(51),M=n(132),C=n(2670),D=n.n(C),P=a()(S.a,{name:"plex-icon-avatar-crop-min-560"}),T=a()(S.a,{name:"plex-icon-avatar-crop-max-560"}),x=function(e){function t(n,i){
l()(this,t);var a=c()(this,e.call(this,n,i));return a.setCanvasRef=function(e){a.canvas=e},a.onMouseDown=function(e){e.preventDefault(),a.startAvatarDrag(e.clientX,e.clientY)},a.onTouchStart=function(e){e.preventDefault();var t=e.touches.item(0);t&&a.startAvatarDrag(t.clientX,t.clientY,!0)},a.onTouchMove=function(e){var t=e.touches.item(0);t&&a.dragAvatar(t.clientX,t.clientY)},a.onMouseMove=function(e){a.dragAvatar(e.clientX,e.clientY)},a.onMouseUp=function(){a.stopAvatarDrag()},
a.onTouchEnd=function(){a.stopAvatarDrag()},a.onFileDrop=function(e){e.preventDefault(),a.setState({isOverDropTarget:!1}),a.dropTargetEnteredCounter=0;var t=void 0;if(e.dataTransfer&&e.dataTransfer.files.length?t=e.dataTransfer.files[0]:e.target.files&&e.target.files.length&&(t=e.target.files[0]),t){var n=new window.FileReader;n.onload=function(e){return a.loadImage(e.target.result)},n.readAsDataURL(t)}},a.onDragEnter=function(){
(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault(),a.dropTargetEnteredCounter++,a.setOverDropTargetState()},a.onDragLeave=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault(),a.dropTargetEnteredCounter--,a.setOverDropTargetState()},a.onSliderChange=function(e){var t=e.steppedValue;a.setState(function(e){
var n=e.offsetX,i=e.offsetY,r=a.initialWidth*t,o=a.initialHeight*t,l=(a.imageWidth-r)/2,u=(a.imageHeight-o)/2,c=a.props.width-r,d=a.props.height-o,h=Math.max(c,Math.min(n+l,0)),p=Math.max(d,Math.min(i+u,0));return s()({},e,{scale:t,offsetX:h,offsetY:p})},function(){return a.props.onChange(a.getImageDataUrl())})},a.state={drag:!1,dragX:0,dragY:0,minScale:.1,maxScale:1,scale:.1,offsetX:0,offsetY:0,isOverDropTarget:!1},a.dropTargetEnteredCounter=0,a}return h()(t,e),
t.prototype.componentDidMount=function(){window.addEventListener("dragover",this.onWindowDragOver),window.addEventListener("drop",this.onWindowDrop),this.paint(),this.loadImage(this.props.url)},t.prototype.componentWillReceiveProps=function(e){this.props.url!==e.url&&this.loadImage(e.url)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype.componentDidUpdate=function(){this.paint()},t.prototype.componentWillUnmount=function(){
window.removeEventListener("dragover",this.onWindowDragOver),window.removeEventListener("drop",this.onWindowDrop),this.stopListeningForDrag()},t.prototype.listenForDrag=function(e){e?(document.addEventListener("touchmove",this.onTouchMove),document.addEventListener("touchcancel",this.onTouchEnd),document.addEventListener("touchend",this.onTouchEnd)):(document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp))},
t.prototype.stopListeningForDrag=function(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchcancel",this.onTouchEnd),document.removeEventListener("touchend",this.onTouchEnd)},t.prototype.startAvatarDrag=function(e,t,n){this.listenForDrag(n),this.setState({drag:!0,dragX:e,dragY:t})},t.prototype.dragAvatar=function(e,t){var n=this
;this.state.drag&&this.setState(function(i){var a=i.offsetX,r=i.offsetY,o=i.dragX,l=i.dragY,u=n.props.width-n.imageWidth,c=n.props.height-n.imageHeight,d=Math.max(u,Math.min(a+(e-o),0)),h=Math.max(c,Math.min(r+(t-l),0));return s()({},i,{dragX:e,dragY:t,offsetX:d,offsetY:h})})},t.prototype.stopAvatarDrag=function(){var e=this;this.stopListeningForDrag(),this.setState({drag:!1},function(){return e.props.onChange(e.getImageDataUrl())})},t.prototype.loadImage=function(e){
var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props,a=new window.Image;a.onload=function(){return t.onImageLoad(a)},/^https?:\/\//.test(e)&&a.setAttribute("crossOrigin","anonymous");var r=e;if(0!==e.indexOf("data:")){var s=n.i(v.a)(),o={width:Math.round(i.width*s),height:Math.round(i.height*s),minSize:1},l=e.indexOf("?");l>-1?(r=g.join(e.substring(0,l),o),r+=r.indexOf("?")===-1?"?":"&",r+=e.substring(l+1)):r=g.join(r,o)}a.src=r},t.prototype.paint=function(){
var e=this.props,t=e.width,n=e.height,i=this.canvas.getContext("2d");i.clearRect(0,0,t,n),this.image&&this.drawImage(i);var a=document.createElement("canvas"),r=a.getContext("2d");a.width=t,a.height=n,r.fillStyle="rgba(0,0,0,0.6)",r.fillRect(0,0,a.width,a.height),r.globalCompositeOperation="destination-out",r.arc(t/2,n/2,t/2,0,2*Math.PI),r.fill(),i.drawImage(a,0,0)},t.prototype.drawImage=function(e){this.imageWidth=this.initialWidth*this.state.scale,
this.imageHeight=this.initialHeight*this.state.scale,e.drawImage(this.image,this.state.offsetX,this.state.offsetY,this.imageWidth,this.imageHeight)},t.prototype.getImageDataUrl=function(){var e=document.createElement("canvas"),t=e.getContext("2d");return e.height=this.props.height,e.width=this.props.width,this.drawImage(t),e.toDataURL()},t.prototype.setOverDropTargetState=function(){this.state.isOverDropTarget||0===this.dropTargetEnteredCounter||this.setState({isOverDropTarget:!0}),
this.state.isOverDropTarget&&0===this.dropTargetEnteredCounter&&this.setState({isOverDropTarget:!1})},t.prototype.onImageLoad=function(e){var t=this;this.image=e,this.initialWidth=Math.max(this.props.width,e.width),this.initialHeight=Math.max(this.props.height,e.height);var n=e.width>e.height?e.height:e.width,i=n>this.props.width?this.props.width/n:1,a=n<=this.props.width?2:1;this.setState({drag:!1,dragX:0,dragY:0,minScale:i,maxScale:a,scale:i,offsetX:0,offsetY:0},function(){
return t.props.onChange(t.getImageDataUrl())})},t.prototype.onWindowDrop=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault()},t.prototype.onWindowDragOver=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).preventDefault()},t.prototype.onDragStart=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).dataTransfer.effectAllowed="copyMove"},t.prototype.onDragOver=function(){
(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event).dataTransfer.dropEffect="copy"},t.prototype.render=function(){var e=this.state.isOverDropTarget;return a()("div",{className:D.a.avatarContainer,onDrop:this.onFileDrop,onDragOver:this.onDragOver,onDragStart:this.onDragStart,onDragLeave:this.onDragLeave,onDragEnter:this.onDragEnter},void 0,a()("div",{className:D.a.avatarPane},void 0,f.a.createElement("canvas",{className:e?D.a.isOverDropTarget:"",width:this.props.width,
height:this.props.height,ref:this.setCanvasRef,onTouchStart:this.onTouchStart,onMouseDown:this.onMouseDown}),a()("div",{className:D.a.sliderContainer},void 0,a()("span",{className:D.a.sliderEnd},void 0,P),a()("span",{className:D.a.sliderWrapper},void 0,a()(I.a,{className:D.a.slider,min:this.state.minScale,max:this.state.maxScale,step:.1,value:this.state.scale,onChange:this.onSliderChange})),a()("span",{className:D.a.sliderEnd},void 0,T))),a()("div",{className:D.a.avatarTextPane
},void 0,a()("p",{},void 0,n.i(y.a)()?a()("input",{type:"file",accept:"image/*",onChange:this.onFileDrop}):a()(w.a,{className:D.a.avatarActionButtons,component:"label"},void 0,n.i(m.default)("Choose Photo"),a()("input",{className:D.a.avatarFileInput,type:"file",accept:"image/*",onChange:this.onFileDrop}))),a()("p",{className:D.a.help},void 0,n.i(m.default)("You can scale your photo using the slider below, and adjust the crop by dragging it within the circle."))))},t}(p.Component)
;x.defaultProps={height:200,width:200,onChange:function(){}},t.a=n.i(M.a)(x)},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){return{url:e}})}var a=n(14),r=n(8),s=(n.n(r),n(722)),o=n(2149);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(82),f=n(434),g=n(120),m=n(110),v=n(566),y=n(417),b=n(1312),S=n(2671),I=n.n(S),w=function(e){function t(i,a){
s()(this,t);var r=l()(this,e.call(this,i,a));return r.onFormSubmit=function(e){e.autoSelectSubtitle&&(e.autoSelectSubtitle=parseInt(e.autoSelectSubtitle,10)),r.props.onSubmit(e)},r.onFormChange=function(e){var t=e.autoSelectAudio;t.value!==r.state.isAutoSelectAudio&&r.setState({isAutoSelectAudio:t.value})},r.state={isAutoSelectAudio:i.userProfile.autoSelectAudio},r._autoSelectSubtitleOptions=[{0:n.i(h.default)("Manually selected")},{1:n.i(h.default)("Shown with foreign audio")},{
2:n.i(h.default)("Always enabled")}],r._languageOptions=[{"":n.i(h.default)("Select Language")}].concat(n.i(b.a)()),r}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.isUpdatingUserProfile,i=e.updateUserProfileError,r=e.userProfile,s=e.onErrorDismiss,o=this.state.isAutoSelectAudio;return a()(g.a,{onSubmit:this.onFormSubmit,onChange:this.onFormChange},void 0,a()(f.a,{className:I.a.formSection,errorMessage:i,onErrorDismiss:s},void 0,a()(v.a,{name:"autoSelectAudio",
checkboxText:n.i(h.default)("Automatically select audio and subtitle tracks"),initialValue:r.autoSelectAudio}),o&&a()(y.a,{labelText:n.i(h.default)("Preferred audio language"),name:"defaultAudioLanguage",initialValue:r.defaultAudioLanguage,values:this._languageOptions}),o&&a()(y.a,{labelText:n.i(h.default)("Preferred subtitle language"),name:"defaultSubtitleLanguage",initialValue:r.defaultSubtitleLanguage,values:this._languageOptions}),o&&a()(y.a,{
labelText:n.i(h.default)("Auto-select subtitle mode"),name:"autoSelectSubtitle",initialValue:r.autoSelectSubtitle,values:this._autoSelectSubtitleOptions}),a()("div",{className:I.a.submitButton},void 0,a()(m.a,{type:"submit",kind:p.PRIMARY,isSpinning:t},void 0,n.i(h.default)("Save Changes")))))},t}(d.Component);t.a=w},function(e,t,n){"use strict";function i(e){return r()(c.a,{metricsPage:u.m,metricsPane:"audioSubtitleSettings"
},void 0,r()(d.a,{},void 0,n.i(l.default)("Audio & Subtitle Settings")),r()("p",{},void 0,n.i(l.default)("These settings determine how Plex will try to select audio and subtitle tracks when playing media in a Plex app while using your account.")),r()("p",{},void 0,r()(p.a,{kind:h.PRIMARY,to:"https://support.plex.tv/hc/en-us/articles/204985278",target:"_blank"},void 0,n.i(l.default)("Learn more"))),o.a.createElement(f.a,e))}
var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(4),u=n(46),c=n(435),d=n(436),h=n(82),p=n(25),f=n(2151);t.a=i},function(e,t,n){"use strict";var i=n(14),a=n(8),r=(n.n(a),n(1676)),s=n(182),o=n(2152),l=n.i(a.createSelector)(s.a,function(e){return e.ui.audioSubtitleSettingsPage},function(e,t){return{userProfile:e.profile,isUpdatingUserProfile:t.isUpdatingUserProfile,updateUserProfileError:t.updateUserProfileError}}),u={onSubmit:r.a,onErrorDismiss:r.b};t.a=n.i(i.b)(l,u)(o.a)},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(46)),p=n(22),f=n(196),g=n(229),m=n(348),v=n(892),y=n(571),b=n(883),S=n(2160),I=n(2157),w=n(2672),M=n.n(w),C=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentDidMount=function(){this.props.onProviderChange(this.props.providerIdentifier)},t.prototype.componentDidUpdate=function(e){
this.props.providerIdentifier!==e.providerIdentifier&&this.props.onProviderChange(this.props.providerIdentifier)},t.prototype.componentWillUnmount=function(){this.props.onProviderChange(null)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,r=e.isProgramGuide,s=e.selectedDirectory,o=e.activeSelectionType,l=e.hubEntityIDs,u=e.isHubsPending,c=e.hubsError,d=e.isEmpty,w=e.onRepopulate;return a()(f.a,{metricsPage:h.z,metricsProperties:{
provider:i,type:s.type},allowBackgroundLightPreset:!0,scrollDirection:p.a.NONE},void 0,o?a()(m.a,{serverEntityID:t,providerEntityID:n}):a()(I.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:s}),a()(g.a,{innerClassName:M.a.dashboardPageContent},void 0,d?a()(S.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,isPending:u,error:c,onRepopulate:w}):a()(v.a,{serverEntityID:t,providerEntityID:n,hubEntityIDs:l}),r&&!d&&a()(y.a,{className:M.a.attribution})),r&&a()(b.a,{
serverEntityID:t,providerEntityID:n}))},t}(d.Component);t.a=C},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(c.a)(),function(e){return e.ui.dashboardPage},function(e,t){return t.selectedDirectory.hubKey},v,h.a,function(e,t,n,i,a){return{providerIdentifier:e.identifier,isProgramGuide:u.a.EPG_IDENTIFIER.test(e.identifier),hubKey:n,hubEntityIDs:t.hubs||[],isHubsPending:t.isHubsPending,hubsError:t.hubsError,isEmpty:i,activeSelectionType:a.activeSelectionType}})}
function a(e,t){return{onProviderChange:function(i){e(n.i(p.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerIdentifier:i,sectionID:null}))}}}function r(e){var t=e.ui.dashboardPage;return{serverEntityID:t.serverEntityID,hubKey:t.hubKey}}function s(e,t){e(n.i(f.a)({serverEntityID:t.serverEntityID,hubKey:t.hubKey})),e(n.i(f.b)({options:{onlyTransient:!0}}))}var o=n(14),l=n(8),u=(n.n(l),
n(73)),c=n(127),d=n(725),h=n(109),p=n(131),f=n(1679),g=n(216),m=n(2154),v=n.i(l.createSelector)(d.a,function(e){return e.ui.dashboardPage.hubs},function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;n-- >0;){var i=t[n],a=e[i];if(a.size||a.totalSize)return!1}return!0}),y=n.i(g.a)(m.a,r,s),b=n.i(o.b)(i,a)(y);t.a=b},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(4)),p=n(27),f=n(63),g=n(22),m=n(36),v=n(228),y=n(170),b=n(171),S=n(920),I=n(198),w=n(596),M=n(197),C=n(431),D=n(2673),P=n.n(D),T=a()(w.a,{}),x=a()(I.a,{},void 0,a()(v.a,{})),E=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({isDirectoriesMenuOpen:!1})},r.state={isDirectoriesMenuOpen:!1},
r._directoriesMenuButtonID=n.i(f.a)(),r}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,i=e.providerIdentifier,r=e.isLibraryProvider,s=e.directories,o=e.selectedDirectory,l=e.isEPGRefreshing,u=e.epgActivityProgress,c=e.epgActivityTitle,d=this.state.isDirectoriesMenuOpen;return a()(y.a,{},void 0,a()(b.a,{},void 0,r&&a()("span",{},void 0,n.i(h.default)("Discover"),T),a()(M.a,{
id:this._directoriesMenuButtonID,"data-qa-id":"directoriesMenuButton",title:o.isHomeDirectory?n.i(h.default)("All Libraries"):o.title,hasMenu:s.length>1,isMenuOpen:d,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),a()(C.a,{target:this._directoriesMenuButtonID,isOpen:d,machineIdentifier:t,providerIdentifier:i,isLibraryProvider:r,directories:s,selectedDirectory:o,onMenuClose:this.onDirectoriesMenuClose})),l&&a()(S.a,{},void 0,c," (",u,"%)",a()(m.a,{className:P.a.refreshingSpinner,
size:g.d.SMALL})),x)},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(n.i(u.a)(),n.i(c.a)(),n.i(d.a)(),n.i(h.a)(),function(e,t,n,i){var a={machineIdentifier:e.machineIdentifier,providerIdentifier:t.identifier,isLibraryProvider:t.isLibraryProvider,directories:n};return i&&(a.isEPGRefreshing=!0,a.epgActivityProgress=i.progress,a.epgActivityTitle=i.title),a})}function a(e){return s.a.createElement(p.a,e)}var r=n(1),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),
n(54)),c=n(127),d=n(308),h=n(401),p=n(2156);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,i=e.isFullServer,a=e.isFullOwnedServer,s=e.isPending,g=e.error,m=e.hasLibraries,v=e.onAddLibraryPress,y=e.onRetryPress;return s?r()(p.a,{},void 0,r()(c.a,{label:n.i(o.default)("Loading dashboard")})):g&&i?r()(f.a,{title:n.i(o.default)("There was an unexpected error loading the dashboard")},void 0,r()(h.a,{kind:u.PRIMARY,onPress:y
},void 0,n.i(o.default)("Retry"))):g&&!i?r()(p.a,{title:n.i(o.default)('The server "{serverName}" does not support the dashboard',{serverName:t}),description:n.i(o.default)("Browse libraries using the sidebar")}):m&&a?r()(p.a,{title:n.i(o.default)("The dashboard is empty"),description:n.i(o.default)("Browse and manage your libraries using the sidebar"),footer:n.i(o.default)('Tip: The "Include in dashboard" advanced setting for each library allows content to be displayed here')}):!m&&a?r()(p.a,{
title:n.i(o.default)("The dashboard is empty"),description:n.i(o.default)("Add libraries with your media to make the most of Plex Media Server")},void 0,r()(d.a,{kind:u.PRIMARY,size:l.LARGE,onPress:v},void 0,n.i(o.default)("Add Library"))):r()(p.a,{title:n.i(o.default)("The dashboard is empty"),description:n.i(o.default)("Browse libraries using the sidebar")})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(99),u=n(82),c=n(36),d=n(51),h=n(25),p=n(172),f=n(273);t.a=i},function(e,t,n){"use strict"
;function i(){return n.i(v.createSelector)(n.i(y.a)(),function(e){return{friendlyName:e.friendlyName,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer,isPersonalCloudServer:e.isPersonalCloudServer,hasLibraries:!!e.desktop.libraries.length}})}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(8),y=(n.n(v),n(54)),b=n(88),S=n(2158),I=function(e){function t(){var n,i,a;u()(this,t)
;for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.onAddLibraryPress=function(e){i.props.addLibrary({serverEntityID:i.props.serverEntityID})},a=n,d()(i,a)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.onRepopulate,n=o()(e,["onRepopulate"]);return g.a.createElement(S.a,r()({},n,{onAddLibraryPress:this.onAddLibraryPress,onRetryPress:t}))},t}(f.Component);t.a=n.i(m.b)(i,{addLibrary:b.a})(I)
},function(e,t,n){"use strict";function i(e){var t=e.providerIdentifier,n=r()(e,["providerIdentifier"]);return l.a.EPG_IDENTIFIER.test(t)?o.a.createElement(c.a,n):o.a.createElement(u.a,n)}var a=n(16),r=n.n(a),s=n(1),o=n.n(s),l=n(73),u=n(2159),c=n(2161);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.isPending,s=e.error;return a?r()(u.a,{},void 0,r()(l.a,{label:n.i(o.default)("Loading guide")})):s?r()(c.a,{
title:n.i(o.default)("There was an unexpected error loading the Program Guide")}):r()(d.a,{serverEntityID:t,providerEntityID:i})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(36),u=n(172),c=n(273),d=n(882);t.a=i},function(e,t,n){"use strict";function i(e){return u.a.createElement(f.a,r()({title:n.i(c.default)("Plex is down for maintenance"),description:n.i(c.default)("Don't worry, it will be back soon")},e),o()(p.a,{to:d.e,target:"_blank",kind:h.b.PRIMARY},void 0,"status.plex.tv"))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(500),h=n(22),p=n(25),f=n(150);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,i=e.outOfDateServers,a=e.isDownForMaintenance,s=e.hasFailedResources,u=e.hasPlexPass,c=e.isUserRestricted,g=e.canProvisionPersonalCloudServer,m=e.onDownloadServer,v=e.onLinkPersonalCloudServerPress;return i.length?r()(d.a,{selectedServer:t,outOfDateServers:i}):a?p:s?f:c?r()(l.a,{title:n.i(o.default)("No shared libraries"),
description:n.i(o.default)("A user in your home needs to share a library with you")}):r()(h.a,{hasPlexPass:u,canProvisionPersonalCloudServer:g,onDownloadServer:m,onLinkPersonalCloudServerPress:v})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(150),u=n(274),c=n(2162),d=n(2167),h=n(2166),p=r()(c.a,{}),f=r()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,i=e.onReloadHttpPress,a=e.onReloadHttpAlwaysPress;return r()(c.a,{className:f.a.emptyPage},void 0,r()("div",{
className:f.a.content},void 0,r()("img",{className:f.a.pmsLogo,src:m.a}),r()("div",{className:f.a.title},void 0,n.i(o.default)('The server "{serverName}" does not allow secure connections',{serverName:t})),r()("div",{className:f.a.description},void 0,n.i(o.default)('Its "Secure connections" setting may be set to disabled, or you may need to adjust some settings on your network.'),v,r()(h.a,{message:n.i(o.default)("You can {openLink}learn more about secure connections here{closeLink}."),tags:[{
open:"openLink",close:"closeLink",to:"https://support.plex.tv/hc/en-us/articles/206225077-How-to-Use-Secure-Server-Connections",kind:l.PRIMARY,target:"_blank"}]}),y,n.i(o.default)("You can also allow insecure connections now, which will reload the app insecurely.")),r()(d.a,{className:f.a.button,kind:l.PRIMARY,size:u.LARGE,onPress:i},void 0,n.i(o.default)("Allow once")),r()(d.a,{className:f.a.button,kind:l.PRIMARY,size:u.LARGE,onPress:a},void 0,n.i(o.default)("Allow always"))))}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(82),u=n(99),c=n(74),d=n(51),h=n(565),p=n(2677),f=n.n(p),g=n(1081),m=n.n(g),v=r()("br",{}),y=r()("br",{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(n.i(l.a)(),function(e){return{friendlyName:e.friendlyName}})}function a(e){return{onReloadHttpPress:function(t){e(n.i(o.d)())},onReloadHttpAlwaysPress:function(t){e(n.i(o.e)()),e(n.i(o.d)())}}}var r=n(14),s=n(8),o=(n.n(s),n(79)),l=n(54),u=n(2164);t.a=n.i(r.b)(i,a)(u.a)
},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(84),f=n(22),g=n(27),m=n(74),v=n(25),y=n(51),b=n(438),S=n(2678),I=n.n(S),w=n(1081),M=n.n(w),C={context:p.d,firstRun:!0},D=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onDownloadPress=function(e){a.setState({isDownloadStep:!1}),a.props.onDownloadServer(e.currentTarget.dataset.type)},a.onPlexPassModalClose=function(){a.setState({
isPlexPassModalOpen:!1})},a.state={isDownloadStep:!0,isPlexPassModalOpen:!n.hasPlexPass},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){var e=this.state,t=e.isDownloadStep,i=e.isPlexPassModalOpen,r=this.props,s=r.canProvisionPersonalCloudServer,o=r.onLinkPersonalCloudServerPress,l=void 0
;return l=t?s?n.i(h.default)("To get started streaming your media everywhere, set up Plex Cloud or download and install Plex Media Server on the computer or device where you keep your media."):n.i(h.default)("To get started streaming your media everywhere, download and install Plex Media Server on the computer or device where you keep your media."):n.i(h.default)("Excellent. Check your download location for Plex Media Server and install it. Once it's running, check back here and we'll get you set up."),
a()(m.a,{className:I.a.emptyPage},void 0,a()("div",{className:I.a.content},void 0,a()("img",{className:I.a.pmsLogo,src:M.a}),a()("div",{className:I.a.title},void 0,t?n.i(h.default)("Get your Plex Media Server"):n.i(h.default)("Install your new server")),a()("div",{className:I.a.description},void 0,l),t&&s&&a()(y.a,{className:I.a.button,kind:f.b.PRIMARY,size:f.d.LARGE,onPress:o},void 0,n.i(h.default)("Set up Plex Cloud")),t&&a()(y.a,{className:I.a.button,kind:f.b.PRIMARY,size:f.d.LARGE,
"data-type":"computer",onPress:this.onDownloadPress},void 0,n.i(h.default)("Download Plex Media Server")),!t&&a()("div",{className:I.a.downloadMessage},void 0,n.i(h.default)("Need to download different server?")),!t&&a()(v.a,{kind:f.b.PRIMARY,"data-type":"computer",onPress:this.onDownloadPress},void 0,n.i(h.default)("Download for Computer Platforms")),a()(v.a,{kind:f.b.PRIMARY,"data-type":"nas",onPress:this.onDownloadPress},void 0,n.i(h.default)("Download for NAS Platforms"))),a()(b.a,{
metricsProperties:C,isOpen:i,onModalClose:this.onPlexPassModalClose}))},t}(d.Component);t.a=D},function(e,t,n){"use strict";function i(e){var t=e.selectedServer,i=e.outOfDateServers,a=t&&t.isOutOfDate?n.i(o.default)('The server "{serverName}" is out of date and cannot be selected. This version of the web app requires Plex Media Server {version} or higher. Use one of the links below to open an available, out of date server directly.',{serverName:t.friendlyName,version:"1.3.0"
}):n.i(o.default)("This version of the web app requires Plex Media Server {version} or higher. Use one of the links below to open an available, out of date server directly.",{version:"1.3.0"});return r()(d.a,{title:n.i(o.default)("Update your Plex Media Server"),description:a},void 0,r()("div",{},void 0,i.map(function(e){var t=e.activeConnection,i=e.isShared;return t?r()(c.a,{className:p.a.updateLink,to:l.join([t.uri,i?"/web/index.html":"/web/index.html#!/settings/server"]),target:"_self",
kind:u.b.PRIMARY,size:u.d.LARGE},e.machineIdentifier,e.friendlyName):r()("span",{className:p.a.updateDisabledLink},e.machineIdentifier,n.i(o.default)("{serverName} (Unavailable)",{serverName:e.friendlyName}))})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(19),u=n(22),c=n(25),d=n(150),h=n(2679),p=n.n(h);s.PropTypes.shape({friendlyName:s.PropTypes.string.isRequired,isShared:s.PropTypes.bool.isRequired,activeConnection:s.PropTypes.shape({uri:s.PropTypes.string.isRequired})});t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.defaultField,n=e.defaultFieldType,i=n.type,a=n.operators,r=[];return i===w.a&&r.push({value:1}),{key:t.key,value:r,operator:a[0].key,id:m.a.uniqueId()}}function a(e){return(e.activeFilters.length?e.activeFilters:[i(e)]).map(function(e){return f()({},e,{id:m.a.uniqueId(e.key)})})}var r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(6),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=(n.n(v),
n(37)),b=n.n(y),S=n(4),I=n(99),w=n(185),M=n(377),C=n(82),D=n(748),P=(n(98),n(189)),T=n(51),x=n(36),E=n(120),A=n(1988),k=n(414),L=n(132),_=n(2171),N=n(2680),R=n.n(N),O=n.i(L.a)(k.a),j=s()(x.a,{}),z=function(e){function t(r,s){l()(this,t);var o=c()(this,e.call(this,r,s));return o.onFormSubmit=function(e){var t=o.state.activeFilters,i=o.props,a=i.allTypeFieldsByKey,r=i.typeKey,s=i.activeSort,l=t.map(function(t){var i=e[t.id],r=i.key,s=i.value,o=i.operator,l=s.map(function(e){
return m.a.isString(e)?e:e.value}),u=void 0;return u=a[r].type!==M.a||n.i(D.a)(o)?l:[b()(l[0],"YYYY-MM-DD").unix()],{key:r,operator:o,value:u}}).filter(function(e){return e.value.length}),u=void 0;e.enableLimit&&""!==e.limit&&(u=e.limit),window.location.hash=n.i(P.a)({typeKey:r,filters:l,sort:s,limit:u,customFilter:1})},o.onCancelPress=function(){var e=o.props,t=e.typeKey,i=e.activeSort;window.location.hash=n.i(P.a)({typeKey:t,filters:[],sort:i})},o.onAddPress=function(e){
var t=[].concat(o.state.activeFilters);t.splice(e+1,0,i(o.props)),o.setState({activeFilters:t})},o.onRemovePress=function(e){var t=[].concat(o.state.activeFilters);t.splice(e,1),o.setState({activeFilters:t})},o.state={activeFilters:r.activeFilters?a(r):[]},o}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){this.setState({activeFilters:a(e)})},t.prototype.render=function(){
var e=this,t=this.state.activeFilters,i=this.props,a=i.serverEntityID,r=i.activeLimit,o=i.isQueryParsePopulated,l=i.queryParseError;if(!o)return s()("div",{className:R.a.loadingContainer},void 0,l?n.i(S.default)("There was an error trying to load the filters. Reload the page and try again"):j);var u=!!r;return s()(E.a,{className:R.a.container,onSubmit:this.onFormSubmit},void 0,t.map(function(n,i){return s()(_.a,{serverEntityID:a,name:n.id,index:i,initialValue:n,isRemoveDisabled:t.length<2,
onRemovePress:e.onRemovePress,onAddPress:e.onAddPress},n.id)}),s()("div",{className:R.a.footer},void 0,s()("div",{className:R.a.settings},void 0,s()(O,{className:R.a.checkInput,size:I.SMALL,name:"enableLimit",checkboxText:n.i(S.default)("Limit to"),initialValue:u}),s()(A.a,{inputClassName:R.a.numberInput,size:I.SMALL,name:"limit",initialValue:u?r:"",leftLabel:!1,labelText:n.i(S.default)("items")})),s()("div",{className:R.a.buttons},void 0,s()(T.a,{className:R.a.button,onPress:this.onCancelPress
},void 0,n.i(S.default)("Cancel")),s()(T.a,{kind:C.PRIMARY,type:"submit"},void 0,n.i(S.default)("Apply")))))},t}(v.Component);t.a=z},function(e,t,n){"use strict";function i(e,t){var n=e.field,i=e.type,a=e.fieldTitle,r=e.valueTitle,s=null==i?n:i+"."+n,o=void 0,l=void 0;return e.operator!==I.b&&e.operator!==I.c||!E.test(e.value)||t[s].type!==w.a?t[s].type===w.a?(o=e.operator,l=S.a.unix(e.value).format("YYYY-MM-DD")):(o=e.operator,l=e.value):(o=e.operator+"-",l=e.value.substr(1)),{key:s,keyTitle:a,
operator:o,value:[{value:decodeURIComponent(l),valueTitle:r?decodeURIComponent(r):void 0}]}}function a(e,t){var n=[];if("composite"===e.type&&"and"===e.operator){if(e.rules){var r=e.rules.reduce(function(e,n){return e.push.apply(e,a(n,t)),e},[]);n.push.apply(n,r)}}else if("composite"===e.type&&"or"===e.operator){var s=e.rules.reduce(function(e,n){var a=i(n,t);return e.key=a.key,e.keyTitle=a.keyTitle,e.operator=a.operator,null==e.value&&(e.value=[]),e.value.push.apply(e.value,a.value),e},{})
;n.push(s)}else n.push(i(e,t));return n}var r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(2),f=n.n(p),g=n(1),m=n.n(g),v=n(14),y=n(8),b=(n.n(y),n(37)),S=n.n(b),I=n(248),w=n(377),M=n(45),C=n(261),D=n(836),P=n(835),T=n(219),x=n(2168),E=/^\-([0-9]+)([a-zA-Z]+)$/,A=n.i(y.createSelector)(P.a,function(e){return e.reduce(function(e,t){return e[t.key]=t,e},{})}),k=n.i(y.createSelector)(function(e){return e.ui.libraryPage.queryParse},A,function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return e.rule?a(e.rule,t):[]}),L=n.i(y.createSelector)(M.a,C.a,D.a,A,k,function(e){return e.ui.libraryPage.queryParse.key},function(e){return e.ui.libraryPage.queryParseError},function(e){return e.ui.libraryPage.isQueryParsePopulated},function(e,t,n,i,a,r,s,o){var l=t[0],u=l.fields,c=u[0],d=f.a.find(n,function(e){return e.type===c.type});return{supportsQueryParser:!!e.features.queryParser,activeFilters:a,
allTypeFieldsByKey:i,queryParseKey:r,queryParseError:s,isQueryParsePopulated:o,defaultField:c,defaultFieldType:d}}),_={dispatchPopulateQueryParse:T.populateQueryParse},N=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.supportsQueryParser&&this.props.dispatchPopulateQueryParse()},t.prototype.componentWillReceiveProps=function(e){
this.props.queryParseKey!==e.queryParseKey&&this.props.dispatchPopulateQueryParse()},t.prototype.render=function(){var e=this.props,t=(e.dispatchPopulateQueryParse,e.supportsQueryParser),n=s()(e,["dispatchPopulateQueryParse","supportsQueryParser"]);return t?m.a.createElement(x.a,n):null},t}(g.Component);t.a=n.i(v.b)(L,_)(N)},function(e,t,n){"use strict";function i(e){
var t=e.selectedField,i=e.filter,a=e.selectedFilterOptions,r=e.suggestionsFilter,s=e.renderSuggestion,o=e.shouldRenderSuggestions,l=e.getSuggestionValue,u=e.getTagValue,c=e.getTagDisplayValue,d=e.makeTag,h=e.makeTagFromSuggestion,f=e.onSuggestionSelected,v=e.onSuggestionsFetchRequested,S=e.onSuggestionsClearRequested,I=e.onValueChange,T=e.onTagValueChange;return t.type===y.b?null:t.subType===y.c?p()(w.a,{className:x.a.selectInput,name:"value",size:m.SMALL,values:[{"-1":n.i(g.default)("Empty")},{
2:"\u2605"},{4:"\u2605\u2605"},{6:"\u2605\u2605\u2605"},{8:"\u2605\u2605\u2605\u2605"},{10:"\u2605\u2605\u2605\u2605\u2605"}],value:i.value[0]?i.value[0].value:"",onChange:I}):t.type===y.a&&n.i(b.a)(i.operator)?p()(D.a,{textInputClassName:x.a.unitTextInput,selectInputClassName:x.a.selectInput,name:"value",size:m.SMALL,units:[{s:n.i(g.default)("Seconds")},{m:n.i(g.default)("Minutes")},{h:n.i(g.default)("Hours")},{d:n.i(g.default)("Days")},{w:n.i(g.default)("Weeks")},{mon:n.i(g.default)("Months")
},{y:n.i(g.default)("Years")}],value:i.value[0]?i.value[0].value:"",onChange:I}):t.type===y.a?p()(C.a,{className:x.a.textInput,name:"value",size:m.SMALL,value:i.value[0]?i.value[0].value:"",onChange:I}):p()(M.a,{className:x.a.tagsInput,value:i.value,suggestions:a,suggestionsFilter:r,renderSuggestion:s,shouldRenderSuggestions:o,getSuggestionValue:l,getTagValue:u,getTagDisplayValue:c,makeTag:d,makeTagFromSuggestion:h,tagComponent:P.a,validationRegex:k[t.type],onSuggestionSelected:f,
onSuggestionsFetchRequested:v,onSuggestionsClearRequested:S,onChange:T})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(3),p=n.n(h),f=n(1),g=(n.n(f),n(4)),m=n(99),v=n(248),y=n(377),b=n(748),S=n(25),I=n(29),w=n(194),M=n(1984),C=n(1985),D=n(1995),P=n(2172),T=n(2681),x=n.n(T),E=[v.a,v.d],A=[v.e,v.f],k={integer:/^\d+$/},L=p()(I.a,{name:"plex-icon-toolbar-filter-remove-560"}),_=p()(I.a,{name:"plex-icon-toolbar-filter-add-560"}),N=function(e){function t(){var i,a,s
;o()(this,t);for(var l=arguments.length,c=Array(l),d=0;d<l;d++)c[d]=arguments[d];return i=a=u()(this,e.call.apply(e,[this].concat(c))),a.shouldRenderSuggestions=function(e){var t=a.props,n=t.selectedFilter,i=t.selectedField.type,r=t.value.operator;return!!n&&(i===y.d&&A.indexOf(r)>-1||i!==y.d&&E.indexOf(r)>-1)},a.onFieldChange=function(e){var t=a.props.fieldKeyTypes,n=t[e],i=n.defaultOperator,r=n.type,s=[];r===y.b&&s.push({value:1}),e!==a.props.value.key&&a.props.onChange({key:e,operator:i,
value:s})},a.onOperatorChange=function(e){var t=a.props.selectedField,i=void 0;i=t.type===y.a&&n.i(b.a)(e)&&n.i(b.a)(a.props.value.operator)||!n.i(b.a)(e)&&!n.i(b.a)(a.props.value.operator)?a.props.value.value:[],a.props.onChange(r()({},a.props.value,{value:i,operator:e}))},a.onTagValueChange=function(e){a.props.onChange(r()({},a.props.value,{value:Array.isArray(e)?e:[e]}))},a.onValueChange=function(e){a.props.onChange(r()({},a.props.value,{value:[{value:e}]}))},a.onRemovePress=function(){
a.props.onRemovePress(a.props.index)},a.onAddPress=function(){a.props.onAddPress(a.props.index)},s=i,u()(a,s)}return d()(t,e),t.prototype.getSuggestionValue=function(e){return e},t.prototype.getTagValue=function(e){return e.value},t.prototype.getTagDisplayValue=function(e){return e.valueTitle||e.value},t.prototype.makeTag=function(e){return{value:e}},t.prototype.makeTagFromSuggestion=function(e){return{value:e.key,valueTitle:e.title}},t.prototype.suggestionsFilter=function(e,t){
return e.title.toLowerCase().indexOf(t.toLowerCase())>-1},t.prototype.renderSuggestion=function(e){return e.title},t.prototype.render=function(){var e=this.props,t=e.isRemoveDisabled,a=e.value,r=e.operatorValues,s=e.fieldValues,o=e.selectedField,l=e.selectedFilterOptions,u=e.onSuggestionsFetchRequested,c=e.onSuggestionsClearRequested;return p()("div",{className:x.a.container},void 0,p()("div",{className:x.a.rules},void 0,p()("div",{className:x.a.rule},void 0,p()(w.a,{className:x.a.selectInput,
name:"filter",size:m.SMALL,values:s,value:a.key,onChange:this.onFieldChange})),p()("div",{className:x.a.rule},void 0,p()(w.a,{className:x.a.selectInput,name:"operator",size:m.SMALL,values:r,value:a.operator,onChange:this.onOperatorChange})),p()("div",{className:x.a.value},void 0,p()(i,{selectedField:o,filter:a,selectedFilterOptions:l,suggestionsFilter:this.suggestionsFilter,renderSuggestion:this.renderSuggestion,shouldRenderSuggestions:this.shouldRenderSuggestions,
getSuggestionValue:this.getSuggestionValue,getTagValue:this.getTagValue,getTagDisplayValue:this.getTagDisplayValue,makeTag:this.makeTag,makeTagFromSuggestion:this.makeTagFromSuggestion,tagComponent:P.a,onSuggestionSelected:this.onSuggestionSelected,onSuggestionsFetchRequested:u,onSuggestionsClearRequested:c,onTagValueChange:this.onTagValueChange,onValueChange:this.onValueChange})),p()("div",{className:x.a.buttons},void 0,p()(S.a,{className:t?x.a.iconButtonDisabled:x.a.iconButton,
"aria-label":n.i(g.default)("Remove Filter"),isDisabled:t,onPress:this.onRemovePress},void 0,L),p()(S.a,{className:x.a.iconButton,"aria-label":n.i(g.default)("Add Filter"),onPress:this.onAddPress},void 0,_))))},t}(f.Component);N.defaultProps={isRemoveDisabled:!1,isAddEnabled:!0,onRemovePress:function(){},onAddPress:function(){}},t.a=N},function(e,t,n){"use strict";function i(){return n.i(b.createSelector)(function(e,t){return t.value.key},w.a,C.a,M.a,function(e){
return e.ui.libraryPage.selectedFilterOptions},function(e,t,i,a,r){for(var s=void 0,o=void 0,l=[],u={},c=0;c<i.length;c++){var d=i[c],h=d.key,p=d.title,f=d.type,m=d.subType;if(d.key===e&&(s=d),u[h]={type:f,subType:m,defaultOperator:a[f][0].key},!A.test(h)&&!k.test(f)){var v;l.push((v={},v[h]=p,v))}}if(s){var y=s.key.split("."),f=y[0],b=y[1];b||(b=f,f=null);var S=void 0;if(f){var w=n.i(I.b)(f),M=w.id;S=g.a.find(t,function(e){var t=n.i(I.b)(e.type);return!!t&&t.id===M})}else S=t[0]
;S&&(o=g.a.find(S.filters,function(e){return e.filter===b}))}return{selectedField:s,fieldValues:l,selectedFilter:o,selectedFilterOptions:r,operatorValues:a[s.type].map(function(e){var t;return t={},t[e.key]=e.title,t}),fieldKeyTypes:u}})}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(14),b=n(8),S=(n.n(b),
n(41)),I=n(34),w=n(261),M=n(1698),C=n(835),D=n(219),P=n(132),T=n(2170),x=["duration","writer","producer","mediaSize","mediaBitrate","mood","studio","show.director"],E=["language"],A=new RegExp("("+x.join("|")+")$"),k=new RegExp("^("+E.join("|")+")$"),L={dispatchSelectLibraryFilter:D.selectLibraryFilter,dispatchPopulateLibraryFilterOptions:D.populateLibraryFilterOptions,dispatchDeselectLibraryFilter:D.deselectLibraryFilter,dispatchSearchLibraryFilterOptions:D.searchLibraryFilterOptions
},_=function(e){function t(){var i,a,r;u()(this,t);for(var s=arguments.length,o=Array(s),l=0;l<s;l++)o[l]=arguments[l];return i=a=d()(this,e.call.apply(e,[this].concat(o))),a.onSuggestionsFetchRequested=function(){a.props.selectedFilter&&(a.props.dispatchSelectLibraryFilter({serverEntityID:a.props.serverEntityID,key:a.props.selectedFilter.key}),a.props.dispatchPopulateLibraryFilterOptions())},a.onSuggestionsClearRequested=function(){a.props.selectedFilterOptions&&n.i(S.a)(function(){
a.props.dispatchDeselectLibraryFilter()})},r=i,d()(a,r)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=(e.dispatchSelectLibraryFilter,e.dispatchPopulateLibraryFilterOptions,e.dispatchDeselectLibraryFilter,e.dispatchSearchLibraryFilterOptions,o()(e,["dispatchSelectLibraryFilter","dispatchPopulateLibraryFilterOptions","dispatchDeselectLibraryFilter","dispatchSearchLibraryFilterOptions"]));return v.a.createElement(T.a,r()({},t,{
onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested}))},t}(m.Component);t.a=n.i(P.a)(n.i(y.b)(i,L)(_))},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(25),f=n(29),g=n(2682),m=n.n(g),v=a()(f.a,{name:"plex-icon-remove-560"}),y=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u]
;return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onRemovePress=function(){i.props.onRemove(i.props.index)},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.tag,i=e.index,r=e.tagCount,s=e.isDisabled,o=e.getTagDisplayValue;return a()("span",{className:m.a.container},void 0,a()("span",{className:m.a.tag},void 0,!s&&a()(p.a,{className:m.a.remove,"aria-label":n.i(h.default)("Remove Tag"),onPress:this.onRemovePress
},void 0,v),a()("span",{},void 0,o(t))),a()("span",{className:m.a.or},void 0,i!==r-1&&n.i(h.default)("or")))},t}(d.Component);t.a=y},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(63),f=(n(35),n(71),n(228)),g=n(170),m=n(171),v=n(198),y=n(197),b=n(430),S=n(598),I=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onTypesMenuButtonPress=function(e){r.setState({
isTypesMenuOpen:!r.state.isTypesMenuOpen})},r.onTypesMenuClose=function(){r.setState({isTypesMenuOpen:!1})},r.state={isTypesMenuOpen:!1},r._typesMenuButtonID=n.i(p.a)(),r}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.selectedDirectory,i=e.folderTitle,r=e.parentFolderTitle,s=e.parentRoute,o=e.size,l=e.listType,u=e.listContext,c=e.listStyle,d=e.metadataTypes,p=e.metadataPseudoTypes,I=e.selectedType,w=e.allListStyles,M=this.state.isTypesMenuOpen
;return a()(g.a,{},void 0,a()(m.a,{},void 0,a()(y.a,{id:this._typesMenuButtonID,title:n.i(h.default)("Folders"),hasMenu:!0,isMenuOpen:M,onPress:this.onTypesMenuButtonPress}),a()(S.a,{target:this._typesMenuButtonID,isOpen:M,types:d,pseudoTypes:p,selectedType:I,activeFilters:[],onMenuClose:this.onTypesMenuClose}),!!s&&a()(y.a,{title:r||t.title,hasMenu:!1,to:s}),a()(y.a,{title:i}),a()(b.a,{},void 0,o)),a()(v.a,{},void 0,a()(f.a,{listType:l,listContext:u,selectedListStyle:c,allListStyles:w})))},t
}(d.Component);t.a=I},function(e,t,n){"use strict";function i(){return n.i(s.createSelector)(function(e,t){return t.selectedDirectory},function(e,t){return t.folderKey},function(e,t){return t.folderTitle},function(e,t){return t.parentFolderKey},function(e,t){return t.parentFolderTitle},d.a,c.a,function(e,t,i,a,r,s,o){var l=e.key,u={folderKey:a,folderTitle:r};if(!a){var c=l+"/folder";if(c===t)return null;u.folderKey=c,u.folderTitle=e.title}return n.i(p.a)(s,o,l,u)})}function a(){
return n.i(s.createSelector)(function(e,t){return t.listType},function(e,t){return t.selectedDirectory},function(e,t){return t.libraryDirectories},d.a,c.a,n.i(o.a)(),h.a,n.i(l.a)(),i(),function(e,t,i,a,r,s,o,l,c){var d=n.i(f.a)(e,u.c,r),h={key:"folder"},p=n.i(g.a)({type:e,server:a,provider:r,libraryKey:s,selectedDirectory:t,libraryDirectories:i});return{parentRoute:c,size:l.totalSize||l.metadataItems.length,metadataTypes:o,metadataPseudoTypes:p,selectedType:h,allListStyles:d}})}
var r=n(14),s=n(8),o=(n.n(s),n(208)),l=n(140),u=n(35),c=n(45),d=n(47),h=n(261),p=n(94),f=n(439),g=n(613),m=n(2173);t.a=n.i(r.b)(a)(m.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(46),f=(n(98),n(35)),g=n(22),m=n(71),v=n(36),y=n(196),b=n(133),S=n(274),I=n(149),w=n(348),M=n(2056),C=n(571),D=n(883),P=n(2174),T=n(2179),x=n(2169),E=n(2182),A=n(2177),k=n(2683),L=n.n(k),_=function(e){function t(n,i){s()(this,t)
;var a=l()(this,e.call(this,n,i));N.call(a);var r=n.listHeight,o=n.scrollIndex,u=n.viewportHeight;return a.state={listHeight:r,scrollIndex:o,viewportHeight:u},a}return c()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.librarySectionID,n=e.providerIdentifier,i=e.onLibraryChange;t&&i(n,t)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.librarySectionID,i=t.providerIdentifier,a=t.onLibraryChange;n&&n!==e.librarySectionID&&a(i,n)},
t.prototype.componentWillUnmount=function(){this.props.onLibraryChange(null,null)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,s=e.containerKey,o=e.providerIdentifier,l=e.isProgramGuide,u=e.selectedDirectory,c=e.showLibrarySpinner,d=e.showLibraryError,f=e.libraryDirectories,k=e.selectedSort,_=e.listTitle,N=e.listType,R=e.listContext,O=e.listStyle,j=e.activeSelectionType,z=e.typeKey,U=e.activeFilters,F=e.activeFilterLabel,B=e.activeSort,V=e.activeLimit,H=e.customFilter,W=e.folderKey,Y=e.folderTitle,Q=e.parentFolderKey,G=e.parentFolderTitle,K=e.isLibraryRefreshing,q=e.firstCharacterCount,X=this.state,Z=X.listHeight,J=X.scrollIndex,$=X.viewportHeight,ee=/titleSort/i.test(k.key),te=Math.max(Z,1),ne=q>=5,ie=$/te<=.25,ae=!W&&ee&&ne&&ie,re=O===m.b,se=!j&&!!W,oe=!j&&!W
;return c?a()(b.a,{},void 0,a()(v.a,{label:n.i(h.default)("Loading library")})):d?a()(S.a,{title:n.i(h.default)("There was an unexpected error loading this library")}):a()(y.a,{metricsPage:p.y,metricsProperties:{provider:o,mode:W?"folder":"type",type:N,customFilter:H,style:O},allowBackgroundLightPreset:!0,scrollDirection:g.a.NONE},void 0,j&&a()(w.a,{serverEntityID:t,providerEntityID:i}),se&&a()(P.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:r,libraryDirectories:f,listType:N,
listContext:R,listStyle:O,selectedDirectory:u,folderKey:W,folderTitle:Y,parentFolderKey:Q,parentFolderTitle:G}),oe&&a()(T.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:r,libraryDirectories:f,listType:N,listContext:R,listStyle:O,selectedDirectory:u,typeKey:z,activeFilters:U,activeFilterLabel:F,activeSort:B,customFilter:H,showSortsMenu:!re}),H&&a()(x.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:r,providerIdentifier:o,typeKey:z,activeSort:B,activeLimit:V,selectedSort:k
}),re&&a()(M.a,{providerEntityID:i,listType:N,listContext:R,typeKey:z,activeFilters:U,activeFilterLabel:F,activeSort:B,customFilter:H,selectedSort:k,isDisabled:!!W}),a()(I.a,{component:A.a,serverEntityID:t,providerEntityID:i,metadataListEntityID:r,containerKey:s,containerTitle:Y,providerIdentifier:o,hasGutter:ae,scrollIndex:J,listTitle:_,listType:N,listContext:R,listStyle:O,typeKey:z,activeFilters:U,activeSort:B,selectedSort:k,initialSize:50,shouldResetOnUnmount:!0,isLibraryRefreshing:K,
onListScrollIndexChange:this.onListScrollIndexChange,onListUpdate:this.onListUpdate,onMeasure:this.onMeasure},void 0,l&&a()(C.a,{className:L.a.attribution})),ae&&a()(E.a,{activeSort:B,viewportHeight:$,onJumpBarItemPress:this.onJumpBarItemPress}),l&&a()(D.a,{serverEntityID:t,providerEntityID:i}))},t}(d.Component),N=function(){var e=this;this.onListScrollIndexChange=function(t){e.setState({scrollIndex:t})},this.onListUpdate=function(t){var n=t.listStyle.height;e.setState({listHeight:n})},
this.onMeasure=function(t){var n=t.height;e.setState({viewportHeight:n})},this.onJumpBarItemPress=function(t){e.setState({scrollIndex:t})}};_.defaultProps={listContext:f.c,scrollIndex:0,listHeight:0,viewportHeight:0},t.a=_},function(e,t,n){"use strict";function i(e,t){if(e){var i=n.i(y.b)(e.type);return i?t?n.i(y.k)(i.typeString).typeString:i.typeString:"mixed"}}function a(){return n.i(v.createSelector)(function(e){return e.ui.libraryPage},function(e,t){return t.folderKey
},n.i(S.a)(),n.i(w.a)(),n.i(M.a)(),n.i(C.a)(),n.i(I.a)("query/parse"),n.i(T.a)(),n.i(x.a)(),E.a,P.a,n.i(A.a)(),function(e,t,a,r,s,o,l){var u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{},d=arguments[9],h=arguments[10],p=arguments[11],f=e.metadataList,g=e.firstCharacters,m=e.details,v=e.isDetailsPending,y=e.isDetailsPopulated,S=e.detailsError,I=i(u,t),w=n.i(_.a)(d,D.c,I,a);return{libraryKey:r,containerKey:s,
librarySectionID:m&&m.librarySectionID,firstCharacterKey:o,queryParseKey:l,metadataListEntityID:f,providerIdentifier:a.identifier,isProgramGuide:b.a.EPG_IDENTIFIER.test(a.identifier),showLibrarySpinner:!y&&!S||!f,showLibraryError:!v&&!!S,libraryDirectories:m&&m.directories,listTitle:u.title,listType:I,listStyle:w,typeKey:u.key,selectedType:u,selectedSort:c,activeSelectionType:h.activeSelectionType,isLibraryRefreshing:p,firstCharacterCount:g?g.length:0}})}function r(e,t){return{
onLibraryChange:function(i,a){e(n.i(k.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerIdentifier:i,sectionID:a}))},dispatchInitLibraryPageMetadataList:function(t){e(L.initLibraryPageMetadataList(t))},dispatchPopulateLibraryFirstCharacters:function(){e(L.populateLibraryFirstCharacters())}}}var s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(8),y=(n.n(v),
n(34)),b=n(73),S=n(127),I=n(369),w=n(208),M=n(1274),C=n(1273),D=n(35),P=n(109),T=n(328),x=n(834),E=n(551),A=n(547),k=n(131),L=n(219),_=n(612),N=n(2175),R=function(e){function t(){return u()(this,t),d()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.typeKey,n=e.containerKey;t&&n&&this._populate()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.typeKey,i=t.containerKey
;(n&&n!==e.typeKey||i&&i!==e.containerKey)&&this._populate()},t.prototype._populate=function(){var e=this.props,t=e.serverEntityID,n=e.containerKey,i=e.typeKey,a=e.folderKey,r=e.firstCharacterKey,s=e.queryParseKey,o=e.dispatchInitLibraryPageMetadataList,l=e.dispatchPopulateLibraryFirstCharacters;o({serverEntityID:t,containerKey:n,typeKey:i,folderKey:a,firstCharacterKey:r,queryParseKey:s}),l()},t.prototype.render=function(){var e=this.props,t=(e.dispatchInitLibraryPageMetadataList,
e.dispatchPopulateLibraryFirstCharacters,o()(e,["dispatchInitLibraryPageMetadataList","dispatchPopulateLibraryFirstCharacters"]));return g.a.createElement(N.a,t)},t}(f.Component);t.a=n.i(m.b)(a,r)(R)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.providerIdentifier,a=e.metadataItemEntityIDs,s=e.totalSize,d=e.isPending,h=e.isPopulated,p=e.error,f=e.typeKey,g=e.activeFilters,m=e.activeSort,v=e.listType,y=e.isLibraryRefreshing,b=s||a.length
;return d||h&&b?o.a.createElement(u.a,e):r()(l.a,{},void 0,r()(c.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,error:p,typeKey:f,activeFilters:g,activeSort:m,listType:v,isLibraryRefreshing:y}))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=(n(98),n(229)),u=n(924),c=n(2184);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=n(63),g=(n(93),n(92),n(98),n(35),n(71),
n(590)),m=n(576),v=n(228),y=n(170),b=n(171),S=n(198),I=n(197),w=n(430),M=n(431),C=n(2190),D=n(598),P=n(2191),T=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({isDirectoriesMenuOpen:!1})},r.onFiltersMenuButtonPress=function(e){r.setState({isFiltersMenuOpen:!r.state.isFiltersMenuOpen})},
r.onFiltersMenuClose=function(){r.setState({isFiltersMenuOpen:!1})},r.onTypesMenuButtonPress=function(e){r.setState({isTypesMenuOpen:!r.state.isTypesMenuOpen})},r.onTypesMenuClose=function(){r.setState({isTypesMenuOpen:!1})},r.onSortsMenuButtonPress=function(e){r.setState({isSortsMenuOpen:!r.state.isSortsMenuOpen})},r.onSortsMenuClose=function(){r.setState({isSortsMenuOpen:!1})},r.state={isDirectoriesMenuOpen:!1,isFiltersMenuOpen:!1,isTypesMenuOpen:!1,isSortsMenuOpen:!1},
r._directoriesMenuButtonID=n.i(f.a)(),r._filtersMenuButtonID=n.i(f.a)(),r._sortsMenuButtonID=n.i(f.a)(),r._typesMenuButtonID=n.i(f.a)(),r}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,s=e.listType,o=e.listContext,l=e.listStyle,u=e.server,c=e.provider,d=e.directories,p=e.selectedDirectory,f=e.typeKey,T=e.activeFilters,x=e.activeFilterLabel,E=e.activeSort,A=e.activeLimit,k=e.metadataTypes,L=e.metadataPseudoTypes,_=e.selectedType,N=e.selectedFilterTitle,R=e.selectedSort,O=e.customFilter,j=e.totalSize,z=e.showSortsMenu,U=e.allListStyles,F=this.state,B=F.isDirectoriesMenuOpen,V=F.isFiltersMenuOpen,H=F.isTypesMenuOpen,W=F.isSortsMenuOpen,Y=!c.isLibraryProvider&&d.length>1,Q=!!_&&_.filters.length>0,G=!!_&&(k.length>1||L.length>0),K=!!(z&&R&&_.sorts.length>1)
;return a()(y.a,{},void 0,a()(b.a,{},void 0,Y&&a()(I.a,{id:this._directoriesMenuButtonID,title:p.title,hasMenu:!0,isMenuOpen:B,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),Y&&a()(M.a,{target:this._directoriesMenuButtonID,isOpen:B,machineIdentifier:u.machineIdentifier,providerIdentifier:c.identifier,isLibraryProvider:c.isLibraryProvider,directories:d,selectedDirectory:p,onMenuClose:this.onDirectoriesMenuClose}),Q&&a()(I.a,{id:this._filtersMenuButtonID,title:N,hasMenu:!0,isMenuOpen:V,
onPress:this.onFiltersMenuButtonPress}),Q&&a()(C.a,{serverEntityID:t,target:this._filtersMenuButtonID,isOpen:V,typeKey:f,activeFilters:T,activeFilterLabel:x,activeSort:E,selectedType:_,showCustomFilter:!!c.features.queryParser,onMenuClose:this.onFiltersMenuClose}),G&&a()(I.a,{id:this._typesMenuButtonID,title:_.title,hasMenu:!0,isMenuOpen:H,onPress:this.onTypesMenuButtonPress}),G&&a()(D.a,{target:this._typesMenuButtonID,isOpen:H,types:k,pseudoTypes:L,activeFilters:T,activeSort:E,activeLimit:A,
customFilter:O,selectedType:_,onMenuClose:this.onTypesMenuClose}),K&&a()(I.a,{id:this._sortsMenuButtonID,title:n.i(h.default)("By {sortTitle}",{sortTitle:R.title}),hasMenu:!0,isMenuOpen:W,onPress:this.onSortsMenuButtonPress}),K&&a()(P.a,{target:this._sortsMenuButtonID,isOpen:W,typeKey:f,activeFilters:T,activeFilterLabel:x,activeSort:E,activeLimit:A,customFilter:O,sorts:_.sorts,selectedSort:R,onMenuClose:this.onSortsMenuClose}),a()(w.a,{},void 0,j)),a()(S.a,{},void 0,a()(g.a,{serverEntityID:t,
providerEntityID:i,metadataListEntityID:r,listType:s,isLibraryList:!0}),a()(m.a,{selectedListStyle:l,allListStyles:U}),a()(v.a,{listType:s,listContext:o,selectedListStyle:l,allListStyles:U})))},t}(d.Component);T.defaultProps={showSortsMenu:!0},t.a=T},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e,t){return t.listType},function(e,t){return t.listStyle},function(e,t){return t.selectedDirectory},function(e,t){return t.libraryDirectories
},n.i(h.a)(),d.a,n.i(l.a)(),n.i(s.a)(),p.a,n.i(o.a)(),n.i(f.a)(),n.i(g.a)(),n.i(m.a)(),u.a,function(e,t,i,a,r,s,o,l,u,d,h,p,f,g){var m=n.i(v.a)(e,c.c,s);return{server:r,provider:s,directories:l,metadataTypes:u,metadataPseudoTypes:n.i(y.a)({type:e,server:r,provider:s,libraryKey:o,selectedDirectory:i,libraryDirectories:a}),selectedType:h,selectedFilterTitle:p,selectedSort:f,listType:e,listStyle:t,allListStyles:m,totalSize:d.totalSize}})}var a=n(14),r=n(8),s=(n.n(r),
n(308)),o=n(140),l=n(208),u=n(496),c=n(35),d=n(45),h=n(54),p=n(261),f=n(328),g=n(1697),m=n(834),v=n(439),y=n(613),b=n(2178);t.a=n.i(a.b)(i)(b.a)},function(e,t,n){"use strict";function i(e){var t=e.firstCharacters,i=e.viewportHeight,a=e.onJumpBarItemPress,s={height:i+"px"},l=Math.floor(i/m),d=n.i(c.a)(t,l);return o()("div",{className:f.a.jumpBar,style:s},void 0,d.map(function(e,t){return u.a.createElement(g.a,r()({key:t},e,{onPress:a}))}))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(1289),d=n(76),h=n.n(d),p=n(2684),f=n.n(p),g=n(2181),m=parseInt(h.a.jumpBarCharacterHeight,10);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(27)),p=n(25),f=n(2685),g=n.n(f),m=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(e){
i.props.onPress(i.props.scrollIndex)},a=n,l()(i,a)}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){return a()(p.a,{className:g.a.character,onPress:this.onPress},void 0,this.props.title)},t}(d.Component);t.a=m},function(e,t,n){"use strict";function i(e){var t=0;return e.map(function(e,n){var i=s()({},e,{position:n,scrollIndex:t});return t+=e.size,i})}function a(){return n.i(l.createSelector)(function(e,t){return t.activeSort
},function(e){return e.ui.libraryPage.firstCharacters},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{firstCharacters:i(/titleSort:desc/i.test(e)?t.slice().reverse():t)}})}var r=n(6),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(2180));t.a=n.i(o.b)(a)(u.a)},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e){return e.ui.libraryPage},n.i(u.a)(),n.i(c.a)(),n.i(d.a)(),function(e,t,n){
var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.details;return{libraryKey:n,librarySectionID:a&&a.librarySectionID,providerIdentifier:t.identifier,selectedType:i}})}function a(e,t){return{onLibraryChange:function(i,a){e(n.i(h.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerIdentifier:i,sectionID:a}))},dispatchInitLibraryPageMetadataList:function(t){e(p.initLibraryPageMetadataList(t))},dispatchPopulateLibraryFirstCharacters:function(){
e(p.populateLibraryFirstCharacters())}}}function r(e){var t=e.ui.libraryPage;return{serverEntityID:t.serverEntityID,libraryKey:t.libraryKey}}function s(e,t){e(p.initLibraryPage({serverEntityID:t.serverEntityID,libraryKey:t.libraryKey})),e(p.populateLibraryDetails())}var o=n(14),l=n(8),u=(n.n(l),n(127)),c=n(208),d=n(328),h=n(131),p=n(219),f=n(216),g=n(2176),m=n.i(f.a)(g.a,r,s),v=n.i(o.b)(i,a)(m);t.a=v},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.providerIdentifier,s=e.error,l=e.typeKey,y=e.activeFilters,b=e.activeSort,S=e.listType,I=e.isLibraryRefreshing,w=h.a[S];return s?r()(m.a,{title:n.i(u.default)("There was an unexpected error loading this library")}):o.a.isEmpty(y)?c.a.EPG_IDENTIFIER.test(a)?r()(v.a,{serverEntityID:t,providerEntityID:i}):I?r()(g.a,{icon:w,title:n.i(u.default)("Libraries are currently being updated"),
description:n.i(u.default)("Hang tight while we look for your content")}):r()(g.a,{icon:w,title:n.i(u.default)("There are no items in this library")}):r()(g.a,{icon:w,title:n.i(u.default)("The active filter has no matches"),description:n.i(u.default)("Use the menu above to change the active filter")},void 0,r()(f.a,{to:n.i(p.a)({typeKey:l,sort:b}),kind:d.b.PRIMARY},void 0,n.i(u.default)("Clear filter")))}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),u=(n.n(l),n(4)),c=n(73),d=n(22),h=(n(98),
n(771)),p=n(189),f=n(25),g=n(172),m=n(273),v=n(882);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.typeKey,i=e.activeFilters,a=e.activeFilterLabel,s=e.activeSort,p=e.filter,f=e.title,g=i.filter(function(e){return e.key===p}),m=n.i(l.a)(g,"1");return r()(h.a,{to:n.i(d.a)({typeKey:t,filters:m?n.i(c.a)(i,p):n.i(u.a)(i,p,{value:"1",type:o.a}),filterLabel:a,sort:s}),isSelected:m},void 0,f)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(185)),l=(n(98),n(747)),u=n(745),c=n(749),d=n(189),h=n(122)
;t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(2),h=n.n(d),p=n(1),f=(n.n(p),n(4)),g=n(22),m=(n(98),n(27)),v=n(29),y=n(36),b=n(146),S=n(2686),I=n.n(S),w=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onPress=function(e){i.props.onFilterSelect(i.props.filterKey)},a=n,l()(i,a)}return c()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.activeFilters,i=e.filter,r=e.title,s=e.showSpinner,o=!s&&!!h.a.find(t,function(e){return e.key===i});return a()(b.a,{className:o?I.a.isSelected:void 0,onPress:this.onPress},void 0,a()("div",{className:I.a.menuItemContainer},void 0,a()("div",{className:I.a.menuLabel},void 0,r),s&&a()(y.a,{className:I.a.spinner,size:g.d.SMALL}),!s&&o&&a()("div",{className:I.a.selectedIcon
},void 0,a()(v.a,{name:"plex-icon-selected-560","aria-label":n.i(f.default)("Selected")}))))},t}(p.Component);t.a=w},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.style,a=e.typeKey,s=e.activeFilters,g=e.activeSort,y=e.selectedFilter,I=e.filterOptions,w=e.filterOptionQuery,M=e.showError,C=e.showSearchInput,D=e.onFilterDeselect,P=e.onSearch,T=y.filter;return r()("div",{className:t,style:i},void 0,r()("div",{className:b.a.header},void 0,r()("div",{className:b.a.headerTitle
},void 0,r()(f.a,{onPress:D},void 0,r()(p.a,{className:b.a.backIcon,name:"plex-icon-hub-prev-560","aria-label":n.i(o.default)("Back")})),r()("span",{className:b.a.filterText},void 0,y.title)),C&&r()(v.a,{className:b.a.searchInput,name:"filterOptionQuery",placeholder:n.i(o.default)("Filter {filterTitle}",{filterTitle:y.title}),value:w,onChange:P})),S,r()(h.a,{className:C?b.a.filterOptionsWithSearchScroller:b.a.filterOptionsScroller,autoScroll:!0},void 0,M&&r()("div",{className:b.a.emptyText
},void 0,n.i(o.default)("Unable to load options")),!M&&!I.length&&r()("div",{className:b.a.emptyText},void 0,n.i(o.default)("No options")),I.map(function(e){var t=e.key,i=e.title,o=e.isSelected,h=decodeURIComponent(t);return r()(m.a,{className:b.a.filterOptionMenuItem,to:n.i(d.a)({typeKey:a,filters:o?n.i(c.a)(s,T,h):n.i(u.a)(s,T,{value:h,type:l.b}),filterLabel:o?void 0:i,sort:g}),isSelected:o},h,i)})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(185),u=(n(98),
n(745)),c=n(749),d=n(189),h=n(74),p=n(29),f=n(25),g=n(420),m=n(122),v=n(145),y=n(2687),b=n.n(y),S=r()(g.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.typeKey,a=e.activeFilters,s=e.activeFilterLabel,l=e.activeSort,u=e.filters,m=e.selectedFilter,b=e.showSpinner,M=e.showCustomFilter,C=e.onFilterSelect,D=o.a.groupBy(u,function(e){var t=e.filterType;return t===h.a?t:h.b}),P=D[h.a],T=D[h.b];return r()(f.a,{className:c()(t,S.a.filtersScroller),autoScroll:!0
},void 0,r()(g.a,{to:n.i(p.a)({typeKey:i,sort:l}),isSelected:o.a.isEmpty(a)},"all",n.i(d.default)("All")),!!P&&P.map(function(e){return r()(v.a,{typeKey:i,activeFilters:a,activeFilterLabel:s,activeSort:l,filter:e.filter,title:e.title},e.filter)}),!!T&&I,!!T&&T.map(function(e){var t=!(!m||m.filter!==e.filter);return r()(y.a,{typeKey:i,activeFilters:a,activeSort:l,filter:e.filter,filterKey:e.key,title:e.title,showSpinner:b&&t,onFilterSelect:C},e.filter)}),M&&w,M&&r()(g.a,{to:n.i(p.a)({typeKey:i,
customFilter:1})},"customFilter",n.i(d.default)("Custom Filter...")))}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),u=(n.n(l),n(30)),c=n.n(u),d=n(4),h=n(185),p=(n(98),n(189)),f=n(74),g=n(122),m=n(420),v=n(2185),y=n(2186),b=n(2688),S=n.n(b),I=r()(m.a,{}),w=r()(m.a,{});t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(393),g=n(22),m=(n(98),n(87)),v=n(80),y=n(2188),b=n(2187),S=n(2689),I=n.n(S),w={
scrollDirection:g.a.NONE},M=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onFiltersListMeasure=function(e){var t=e.height;a.setState({isMeasured:!0,filterOptionsHeight:Math.max(Math.floor(t),a.props.minHeight)})},a.state={isMeasured:!1,filterOptionsHeight:"auto"},a}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.target,i=e.isOpen,r=e.typeKey,s=e.activeFilters,o=e.activeFilterLabel,l=e.activeSort,u=e.filters,c=e.selectedFilter,d=e.filterOptions,h=e.filterOptionQuery,S=e.showSpinner,M=e.showError,C=e.showSearchInput,D=e.showCustomFilter,P=e.onFilterSelect,T=e.onFilterDeselect,x=e.onSearch,E=e.onMenuClose,A=this.state,k=A.isMeasured,L=A.filterOptionsHeight,_=!!c&&!S&&k;return a()(v.a,{target:t,isOpen:i,size:g.d.LARGE,scrollerProps:w,onMenuClose:n.i(f.a)(T,E)},void 0,a()(m.a,{
className:p()(I.a.panesContainer,_&&I.a.showFilterOptions),onMeasure:this.onFiltersListMeasure},void 0,a()(y.a,{className:I.a.filtersPane,typeKey:r,activeFilters:s,activeFilterLabel:o,activeSort:l,filters:u,selectedFilter:c,showSpinner:S,showCustomFilter:D,onFilterSelect:P}),_&&a()(b.a,{className:I.a.filterOptionsPane,style:{height:L},typeKey:r,activeFilters:s,activeSort:l,selectedFilter:c,filterOptions:d,filterOptionQuery:h,showError:M,showSearchInput:C,onFilterDeselect:T,onSearch:x})))},t
}(d.Component);M.defaultProps={minHeight:385},t.a=M},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(function(e,t){return t.activeFilters},function(e,t){return t.selectedType},function(e){return e.ui.libraryPage},n.i(y.a)(),function(e,t,n,i){var a=n.selectedFilterKey,r=n.filterOptionQuery,s=n.selectedFilterOptions,o=void 0===s?[]:s,l=n.isSelectedFilterOptionsPopulated,u=n.selectedFilterOptionsError,c=t&&t.filters;return{filters:c,selectedFilter:a&&p.a.findWhere(c,{key:a}),
filterOptions:i,filterOptionQuery:r,showSpinner:!l&&!u,showError:!!u,showSearchInput:o.length>12}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(8),y=(n.n(v),n(1696)),b=n(219),S=n(2189),I=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onFilterSelect=function(e){i.props.selectLibraryFilter({
serverEntityID:i.props.serverEntityID,key:e}),i.props.fetchLibraryFilterOptions()},i.onFilterDeselect=function(){i.props.deselectLibraryFilter()},i.onSearch=function(e){i.props.searchLibraryFilterOptions(e)},a=n,u()(i,a)}return d()(t,e),t.prototype.render=function(){return g.a.createElement(S.a,r()({onFilterSelect:this.onFilterSelect,onFilterDeselect:this.onFilterDeselect,onSearch:this.onSearch},this.props))},t}(f.Component);t.a=n.i(m.b)(i,b)(I)},function(e,t,n){"use strict";function i(e){
var t=e.typeKey,i=e.activeFilters,a=e.activeFilterLabel,s=e.activeSort,l=e.activeLimit,d=e.sorts,g=e.selectedSort,y=e.customFilter,b=o()(e,["typeKey","activeFilters","activeFilterLabel","activeSort","activeLimit","sorts","selectedSort","customFilter"]);return u.a.createElement(p.a,b,d.map(function(e){var o=e.key,u=e.descKey,d=e.defaultDirection,p=e.title,b=g.key===o,S=d;b&&(S=s?s===u?m:v:d===m?v:m);var I=S===v;return r()(f.a,{to:n.i(h.a)({typeKey:t,filters:i,filterLabel:a,sort:I?u:o,
limit:y?l:null,customFilter:y}),isSelected:b,selectedIconName:I?"plex-icon-sort-ascending-560":"plex-icon-sort-descending-560",selectedIconAriaLabel:I?n.i(c.default)("Ascending"):n.i(c.default)("Descending")},o,p)}))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=(n(98),n(482)),h=n(189),p=n(80),f=n(122),g=d.a.directions,m=g.ASCENDING,v=g.DESCENDING;t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,a=e.listKey,s=e.listTitle,l=e.activeSelectionType;return o()(h.a,{metricsPage:c.G,allowBackgroundLightPreset:!0,scrollDirection:d.a.NONE},void 0,l?o()(f.a,{serverEntityID:t,providerEntityID:n}):o()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listTitle:s}),u.a.createElement(p.a,r()({component:m.a,initialSize:50,shouldResetOnUnmount:!0,containerKey:a,containerTitle:s},e)))}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(46),d=n(22),h=n(196),p=n(149),f=n(348),g=n(2195),m=n(924);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.ui.metadataListPage;return{serverEntityID:t.serverEntityID,listKey:t.listKey}}function a(e,t){e(n.i(l.a)({serverEntityID:t.serverEntityID,listKey:t.listKey,listTitle:t.listTitle}))}var r=n(14),s=n(8),o=(n.n(s),n(109)),l=n(1685),u=n(216),c=n(2192),d=n.i(s.createSelector)(function(e){return e.ui.metadataListPage
},o.a,function(e,t){return{metadataListEntityID:e.metadataList,activeSelectionType:t.activeSelectionType}}),h=n.i(u.a)(c.a,i,a),p=n.i(r.b)(d)(h);t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(63),f=(n(93),n(92),n(590)),g=n(228),m=n(170),v=n(171),y=n(198),b=n(197),S=n(430),I=n(595),w=n(431),M=n(2691),C=n.n(M),D=a()(g.a,{}),P=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a))
;return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({isDirectoriesMenuOpen:!1})},r.state={isDirectoriesMenuOpen:!1},r._directoriesMenuButtonID=n.i(p.a)(),r}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,s=e.listTitle,o=e.totalSize,l=e.server,u=e.provider,c=e.directories,d=e.selectedDirectory,p=e.isLibraryList,g=this.state.isDirectoriesMenuOpen;return a()(m.a,{},void 0,a()(v.a,{},void 0,a()(b.a,{id:this._directoriesMenuButtonID,title:d.isHomeDirectory?n.i(h.default)("All Libraries"):d.title,hasMenu:c.length>1,isMenuOpen:g,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),a()(w.a,{
target:this._directoriesMenuButtonID,isOpen:g,machineIdentifier:l.machineIdentifier,providerIdentifier:u.identifier,isLibraryProvider:u.isLibraryProvider,directories:c,selectedDirectory:d,onMenuClose:this.onDirectoriesMenuClose}),a()(b.a,{title:s,hasMenu:!1,isSelected:!0}),a()(S.a,{},void 0,o)),a()(y.a,{},void 0,a()(f.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:r,isLibraryList:p}),a()(I.a,{className:C.a.divider}),D))},t}(d.Component);t.a=P},function(e,t,n){"use strict"
;function i(){return n.i(o.createSelector)(c.a,d.a,n.i(u.a)(),n.i(h.a)(),function(e,t,i,a){return{server:e,provider:t,directories:a,selectedDirectory:r.a.find(a,function(e){if(!e.key)return!1;var t=new RegExp("^"+n.i(l.a)(e.key)+"\\b");return i.containerKey.match(t)})||r.a.first(a),totalSize:i.totalSize}})}var a=n(2),r=n.n(a),s=n(14),o=n(8),l=(n.n(o),n(212)),u=n(140),c=n(47),d=n(45),h=n(308),p=n(2194);t.a=n.i(s.b)(i)(p.a)},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(46),f=n(82),g=n(25),m=n(121),v=n(195),y=n(434),b=n(605),S=n(606),I=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onUnlinkPress=function(){a.setState({isUnlinkPersonalCloudServerProviderModalOpen:!0})},a.onUnlinkCancel=function(){a.setState({isUnlinkPersonalCloudServerProviderModalOpen:!1})},a.state={isUnlinkPersonalCloudServerProviderModalOpen:!1},a}
return c()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isUnlinking&&!e.isUnlinking&&this.setState({isUnlinkPersonalCloudServerProviderModalOpen:!1})},t.prototype.render=function(){
var e=this.props,t=e.isLastLinkedProvider,i=e.isUnlinking,r=e.label,s=e.linked,o=e.nickname,l=e.url,u=e.onUnlink,c=this.state.isUnlinkPersonalCloudServerProviderModalOpen,d=t?n.i(h.default)("If you unlink {personalCloudServerProvider}, all of your Plex Cloud libraries, shares, and metadata will be deleted! However, your media files will not be affected. This cannot be undone.",{personalCloudServerProvider:r
}):n.i(h.default)("Plex Cloud will no longer be able to access media stored on this provider and it will be removed from your library."),I=t?n.i(h.default)("Yes, unlink {personalCloudServerProvider}",{personalCloudServerProvider:r}):null;return a()(y.a,{},l,a()(b.a,{},void 0,s&&a()(g.a,{kind:f.PRIMARY,to:l},void 0,n.i(h.default)("Reauthorize")),s&&a()(g.a,{isDisabled:i,kind:f.PRIMARY,onPress:this.onUnlinkPress},void 0,n.i(h.default)("Unlink")),s&&a()(v.a,{isConfirmButtonSpinning:i,
isCancelButtonDisabled:i,isOpen:c,metricsPage:p.o,title:n.i(h.default)("Unlink {personalCloudServerProvider}",{personalCloudServerProvider:r}),message:d,accordMessage:I,confirmLabel:n.i(h.default)("Unlink"),kind:f.DANGER,onConfirm:u,onCancel:this.onUnlinkCancel}),!s&&a()(g.a,{kind:f.PRIMARY,to:l},void 0,n.i(h.default)("Link"))),a()(S.a,{},void 0,a()(m.a,{},void 0,r),o||n.i(h.default)("No account linked")))},t}(d.Component);t.a=I},function(e,t,n){"use strict";function i(e,t){
var i=n.i(y.a)(window.location.href,t?"#!/account/plex-cloud":"#!/cpms");return v.join([e],{origin:i})}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(19),y=n(793),b=n(167),S=n(2196),I={dispatchUnlinkPersonalCloudServerProvider:b.f},w=function(e){function t(){var n,i,a;u()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.onUnlink=function(){
i.props.dispatchUnlinkPersonalCloudServerProvider({url:i.props.url})},a=n,d()(i,a)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.url,n=e.hasOwnedPersonalCloudServer,a=(e.dispatchUnlinkPersonalCloudServerProvider,o()(e,["url","hasOwnedPersonalCloudServer","dispatchUnlinkPersonalCloudServerProvider"]));return g.a.createElement(S.a,r()({},a,{url:i(t,n),onUnlink:this.onUnlink}))},t}(f.Component);t.a=n.i(m.b)(null,I)(w)},function(e,t,n){"use strict";function i(e){
var t=e.hasOwnedPersonalCloudServer,i=e.isUnauthorized,a=e.personalCloudServerProviders,s=e.isPersonalCloudServerProvidersPending,l=e.isPersonalCloudServerProvidersPopulated,h=e.personalCloudServerProvidersError,v=e.lastLinkedProviderUrl;return i?o()(g.a,{title:n.i(c.default)("You're not supposed to be here"),description:n.i(c.default)("You don't have access to Plex Cloud settings")}):o()(p.a,{metricsPage:d.m,metricsPane:"plexCloud"
},void 0,o()(f.a,{},void 0,n.i(c.default)("Plex Cloud")),t&&y,s&&!l&&b,l&&a.map(function(e){return u.a.createElement(m.a,r()({key:e.url,hasOwnedPersonalCloudServer:t,isLastLinkedProvider:e.url===v},e))}),h&&n.i(c.default)("An error occurred retrieving cloud storage providers. Please try again."))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(46),h=n(945),p=n(435),f=n(436),g=n(150),m=n(2197),v=n(2201),y=o()(v.a,{}),b=o()(h.a,{});t.a=i},function(e,t,n){"use strict"
;var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(6),c=n.n(u),d=n(1),h=n.n(d),p=n(14),f=n(8),g=(n.n(f),n(494)),m=n(730),v=n(495),y=n(167),b=n(2198),S=n.i(f.createSelector)(g.a,m.a,v.a,function(e,t,n){var i=t.isPersonalCloudServerProvidersPopulated,a=t.personalCloudServerProviders,r=i&&a.filter(function(e){return e.linked}),s=r&&1===r.length&&r[0];return c()({},t,{lastLinkedProviderUrl:s?s.url:null,hasOwnedPersonalCloudServer:!!e,isUnauthorized:!n.cpms})}),I={
dispatchFetchPersonalCloudServerProviders:y.e},w=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchFetchPersonalCloudServerProviders({options:{data:{type:"plex_cloud"}}})},t.prototype.render=function(){return h.a.createElement(b.a,this.props)},t}(d.Component);t.a=n.i(p.b)(S,I)(w)},function(e,t,n){"use strict";function i(e){
var t=e.isError,i=e.isPending,a=e.isRunning,s=e.isRestarting,l=e.onRestartPress,c=void 0;return c=a?n.i(o.default)("Active"):t?n.i(o.default)("Error checking server status"):n.i(o.default)("Sleeping"),r()(p.a,{},void 0,r()(f.a,{},void 0,s?m:r()(d.a,{kind:u.PRIMARY,onPress:l},void 0,n.i(o.default)("Restart Plex Cloud"))),r()(g.a,{},void 0,r()(h.a,{},void 0,n.i(o.default)("Plex Cloud Server")),i?v:c))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(99),u=n(82),c=n(36),d=n(25),h=n(121),p=n(434),f=n(605),g=n(606),m=r()(c.a,{size:l.SMALL}),v=r()(c.a,{size:l.SMALL});t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(14),m=n(8),v=(n.n(m),n(41)),y=n(371),b=n(167),S=n(88),I=n(2200),w=n.i(m.createSelector)(y.a,function(e){if(!e)return{};var t=e.desktop,n=t.personalCloudServerStatus;return{isError:!!t.personalCloudServerStatusError,
isPending:t.isPersonalCloudServerStatusPending,isRunning:!(!n||!n.running),isRestarting:t.isPersonalCloudServerRestarting}}),M={dispatchFetchPersonalCloudServerStatus:b.g,dispatchRestartPersonalCloudServer:S.f},C=function(e){function t(){var i,a,r;l()(this,t);for(var s=arguments.length,o=Array(s),u=0;u<s;u++)o[u]=arguments[u];return i=a=c()(this,e.call.apply(e,[this].concat(o))),a.onRestartPress=function(e){n.i(v.a)(function(){a.props.dispatchRestartPersonalCloudServer()})},r=i,c()(a,r)}
return h()(t,e),t.prototype.componentDidMount=function(){var e=this;n.i(v.a)(function(){e.props.dispatchFetchPersonalCloudServerStatus()})},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchPersonalCloudServerStatus,e.dispatchRestartPersonalCloudServer,s()(e,["dispatchFetchPersonalCloudServerStatus","dispatchRestartPersonalCloudServer"]));return f.a.createElement(I.a,a()({},t,{onRestartPress:this.onRestartPress}))},t}(p.Component);t.a=n.i(g.b)(w,M)(C)},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(12),f=n(29),g=n(25),m=n(36),v=n(1976),y=n(2332),b=n(2318),S=n(2333),I=n(2693),w=n.n(I),M=function(e){function t(){var n,i,r;s()(this,t);for(var o=arguments.length,u=Array(o),c=0;c<o;c++)u[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(u))),i.onPreviousPress=function(){i.props.onPlayPreviousItem()},i.onNextPress=function(){i.props.onPlayNextItem()},i.onClosePress=function(){
i.props.onPlayerClose()},i.onPlayPausePress=function(){i.props.onVideoSlidePress()},i.onQualityIndexChange=function(e){i.props.onVideoQualityIndexChange(i.props.currentIndex,e)},i.renderSlide=function(e,t,n){var r=i.props,s=r.serverEntityID,o=r.firstIndex,l=r.playQueueItems,u=r.currentIndex,c=r.onVideoEnded,d=r.onPositionMillisecondsChange,h=l[e-o],p=e===u;return a()(S.a,{serverEntityID:s,index:e,playQueueItemEntityID:h,isCurrent:p,maxWidth:t,maxHeight:n,onEnd:c,onPositionMillisecondsChange:d})
},r=n,l()(i,r)}return c()(t,e),t.prototype.componentDidMount=function(){p.a.on("shortcut:skipPrevious",this.onPreviousPress),p.a.on("shortcut:skipNext",this.onNextPress),p.a.on("shortcut:escape",this.onClosePress),p.a.on("shortcut:playPause",this.onPlayPausePress)},t.prototype.componentWillUnmount=function(){p.a.off("shortcut:skipPrevious",this.onPreviousPress),p.a.off("shortcut:skipNext",this.onNextPress),p.a.off("shortcut:escape",this.onClosePress),
p.a.off("shortcut:playPause",this.onPlayPausePress)},t.prototype.render=function(){var e=this.props,t=e.playQueueItems,i=e.currentIndex,r=e.currentItem,s=e.size,o=e.showFooter,l=e.canSkipPrevious,u=e.canSkipNext,c=e.availableVideoQualities,d=e.videoQualityIndex,p=e.isEditing,S=e.videoPaused,I=e.renderFooter,M=e.errorMessage,C=e.onVideoSlidePress,D=e.onPlayNextItem,P=e.onPlayPreviousItem,T=e.onPlayerClose,x=r&&"clip"===r.type,E=c&&c.length>1,A=x&&E;return a()("div",{className:w.a.carousel
},void 0,a()(v.a,{idleTime:p?0:2e3},void 0,a()("div",{className:w.a.header},void 0,A&&a()(y.a,{className:w.a.headerButton,qualities:c,qualityIndex:d,onQualityIndexChange:this.onQualityIndexChange}),a()(g.a,{onPress:T},void 0,a()(f.a,{className:w.a.headerButton,name:"plex-icon-remove-560","aria-label":n.i(h.default)("Close")}))),r&&a()("div",{className:w.a.contents},void 0,a()(g.a,{className:w.a.navigationButton,isDisabled:!l,onPress:P},void 0,a()(f.a,{name:"plex-icon-hub-prev-560",
"aria-label":n.i(h.default)("Previous Photo")})),a()("div",{className:w.a.action},void 0,"clip"===this.props.currentItem.type&&a()(g.a,{className:w.a.playPauseButton,onPress:C},void 0,S&&a()(f.a,{name:"plex-icon-play-560","aria-label":n.i(h.default)("Play Video")}))),a()(g.a,{className:w.a.navigationButton,isDisabled:!u,onPress:D},void 0,a()(f.a,{name:"plex-icon-hub-next-560","aria-label":n.i(h.default)("Next Photo")}))),o&&I()),M&&a()("div",{className:w.a.message
},void 0,a()("span",{},void 0,M)),!t&&!M&&a()("div",{className:w.a.message},void 0,a()(m.a,{label:n.i(h.default)("Loading photos")})),t&&!M&&a()(b.a,{items:t,currentIndex:i,size:s,renderSlide:this.renderSlide}))},t}(d.Component);t.a=M},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(1975)),p=n(536),f=n(2327),g=n(2321),m=n(2326),v=n(2329),y=n(2202),b=n(2694),S=n.n(b),I=function(e){function t(n,i){s()(this,t)
;var r=l()(this,e.call(this,n,i));return r.onPhotoStripTogglePress=function(e){r.setState({isPhotoStripOpen:!r.state.isPhotoStripOpen})},r.onPhotoInformationTogglePress=function(e){r.props.toggleRelated()},r.onEditTogglePress=function(e){r.state.isEditing||r.props.slideshowPaused||r.props.toggleSlideshow(),r.setState({isEditing:!r.state.isEditing})},r.onFullscreenTogglePress=function(e){r.setState({isFullscreen:!r.state.isFullscreen})},r.onFullscreenChange=function(e){r.setState({isFullscreen:e
})},r.onVideoEnded=function(){r.props.slideshowPaused||r.props.onPlayNextItem()},r.onVideoPlayPauseToggle=function(){r.props.videoPaused&&r._stopSlideshow(),r.props.toggleVideoPlayPause()},r.onPositionMillisecondsChange=function(e){r.setState({positionMilliseconds:e})},r.renderFooter=function(){
var e=r.props,t=e.serverEntityID,n=e.providerEntityID,i=e.currentIndex,s=e.currentItem,o=e.relatedVisible,l=e.slideshowPaused,u=e.size,c=e.videoDuration,d=e.toggleSlideshow,h=r.state,p=h.isPhotoStripOpen,f=h.isFullscreen,m=h.isEditing,v=h.positionMilliseconds;if(s)return a()(g.a,{metadataItemEntityID:s.metadataItem,serverEntityID:t,providerEntityID:n,index:i,size:u,positionMilliseconds:v,videoDuration:c,isPhotoStripOpen:p,isPhotoInformationOpen:o,isPaused:l,isFullscreen:f,isEditing:m,
onPlayPausePress:d,onPhotoStripTogglePress:r.onPhotoStripTogglePress,onPhotoInformationTogglePress:r.onPhotoInformationTogglePress,onFullscreenTogglePress:r.onFullscreenTogglePress,onEditTogglePress:r.onEditTogglePress})},r.state={positionMilliseconds:0,isPhotoStripOpen:!1,isFullscreen:!1,isEditing:!1},r}return c()(t,e),t.prototype.componentDidMount=function(){this.props.slideshowPaused||this._startSlideshow(this.props),this._playerTimer=setInterval(this.props.onSlideshowTick,1e3)},
t.prototype.componentWillReceiveProps=function(e){!e.slideshowPaused&&this.props.slideshowPaused?this.props.onPlayNextItem():e.slideshowPaused&&!this.props.slideshowPaused&&this._stopSlideshow(),e.currentIndex!==this.props.currentIndex&&(this._stopSlideshow(),e.slideshowPaused||"photo"!==e.currentItem.type&&!e.videoPaused||this._startSlideshow()),!e.videoPaused||this.props.videoPaused||this.props.slideshowPaused||this._stopSlideshow()},t.prototype.componentWillUnmount=function(){
this._stopSlideshow(),this._playerTimer=clearTimeout(this._playerTimer)},t.prototype._startSlideshow=function(){this._stopSlideshow(),this.setState({isEditing:!1}),this._slideshowTimer=setTimeout(this.props.onPlayNextItem,5e3)},t.prototype._stopSlideshow=function(){this._slideshowTimer&&(this._slideshowTimer=clearTimeout(this._slideshowTimer))},t.prototype.render=function(){
var e=this.state,t=e.isPhotoStripOpen,n=e.isFullscreen,i=e.isEditing,r=this.props,s=r.serverEntityID,o=r.providerEntityID,l=r.playQueueItems,u=r.relatedHubEntityIDs,c=r.currentIndex,d=r.currentItem,g=r.size,b=r.firstIndex,I=r.availableVideoQualities,w=r.videoPaused,M=r.videoQualityIndex,C=r.canSkipPrevious,D=r.canSkipNext,P=r.relatedVisible,T=r.errorMessage,x=r.onPlayNextItem,E=r.onPlayPreviousItem,A=r.onPlayItem,k=r.onVideoQualityIndexChange,L=r.onPlayerClose,_=t||P
;return a()(p.a,{},void 0,a()(h.a,{isFullscreen:n,onFullscreenChange:this.onFullscreenChange},void 0,a()("div",{className:S.a.lightbox},void 0,d&&a()(v.a,{serverEntityID:s,metadataItemEntityID:d.metadataItem}),a()("div",{className:S.a.player},void 0,a()("div",{className:S.a.content},void 0,a()("div",{className:S.a.main},void 0,a()(y.a,{serverEntityID:s,playQueueItems:l,currentItem:d,currentIndex:c,availableVideoQualities:I,firstIndex:b,size:g,videoPaused:w,videoQualityIndex:M,isEditing:i,
showFooter:!_,canSkipNext:D,canSkipPrevious:C,errorMessage:T,renderFooter:this.renderFooter,onVideoEnded:this.onVideoEnded,onVideoSlidePress:this.onVideoPlayPauseToggle,onPositionMillisecondsChange:this.onPositionMillisecondsChange,onPlayNextItem:x,onPlayPreviousItem:E,onVideoQualityIndexChange:k,onPlayerClose:L}),t&&d&&a()(f.a,{className:S.a.mainFooter,serverEntityID:s,playQueueItems:l,firstIndex:b,currentIndex:c,size:g,onPhotoPress:A})),P&&d&&a()(m.a,{className:S.a.aside,serverEntityID:s,
providerEntityID:o,metadataItemEntityID:d.metadataItem,hubEntityIDs:u})),_&&this.renderFooter()))))},t}(d.Component);I.defaultProps={canSkipNext:!1,canSkipPrevious:!1},t.a=I},function(e,t,n){"use strict";function i(){return n.i(v.createSelector)(function(e){return e.ui.photoPlayer},S.a,function(e,t){if(!e.playQueue)return{errorMessage:e.errorMessage}
;var n=p.a.pick(e.playQueue,["playQueueID","playQueueItems","firstIndex"]),i=p.a.pick(e,["currentPlayer","currentIndex","slideshowPaused","relatedVisible","videoPaused","videoQualityIndex"]),a=p.a.pick(e.currentDecision,["availableQualities","duration"]),r=e.playQueue.playQueueTotalCount,s=i.currentIndex<r-1,o=i.currentIndex>n.firstIndex;return d()({},n,i,{canSkipNext:s,canSkipPrevious:o,size:r,currentItem:t[e.playQueueItem],relatedHubEntityIDs:e.relatedHubs,
availableVideoQualities:a.availableQualities,videoDuration:a.duration})})}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(6),d=n.n(c),h=n(2),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(8),y=(n.n(v),n(28)),b=n(41),S=n(843),I=n(831),w=n(1672),M=n(399),C=n(2203),D={startPlayback:I.a,endPlayback:I.b,playNextItem:I.c,playPreviousItem:I.d,onSlideshowTick:function(){return n.i(w.a)()},onPlayerClose:function(){return n.i(I.e)("photo")},onPlayItem:function(e){return n.i(I.f)({playerType:"photo",
index:e})},onVideoQualityIndexChange:function(e,t){return n.i(M.a)({playerType:"photo",index:e,qualityIndex:t})},toggleVideoPlayPause:function(){return n.i(M.b)({playerType:"photo"})},toggleSlideshow:w.b,toggleRelated:w.c},P=function(e){function t(){var i,a,s;r()(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return i=a=o()(this,e.call.apply(e,[this].concat(u))),a.onPlayNextItem=function(){n.i(b.a)(function(){a.props.playNextItem("photo")})},
a.onPlayPreviousItem=function(){n.i(b.a)(function(){a.props.playPreviousItem("photo")})},s=i,o()(a,s)}return u()(t,e),t.prototype.componentWillMount=function(){this.props.startPlayback({serverEntityID:this.props.serverEntityID,playerType:"photo"})},t.prototype.componentWillReceiveProps=function(e){this.props.playQueueItems&&!e.playQueueItems&&(y.a.warn("[Player] Play queue removed - closing player"),this.props.onPlayerClose())},t.prototype.componentWillUnmount=function(){
this.props.endPlayback("photo")},t.prototype.render=function(){return g.a.createElement(C.a,d()({key:this.props.playQueueID},this.props,{onPlayNextItem:this.onPlayNextItem,onPlayPreviousItem:this.onPlayPreviousItem}))},t}(f.Component);t.a=n.i(m.b)(i,D)(P)},function(e,t,n){"use strict";function i(e,t){return e?(y.a.EPG_IDENTIFIER.test(t)?_:L)[e]||A.a:k.a}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(9),d=n.n(c),h=n(11),p=n.n(h),f=n(10),g=n.n(f),m=n(1),v=n.n(m),y=n(73),b=n(1415),S=n(2261),I=n(2260),w=n(2265),M=n(2264),C=n(2263),D=n(2257),P=n(2256),T=n(2223),x=n(2222),E=n(2262),A=n(2221),k=n(2220),L={movie:S.a,show:w.a,season:C.a,episode:D.a,artist:T.a,album:x.a,photoalbum:E.a,clip:S.a},_={movie:I.a,show:M.a,episode:P.a},N=function(e){function t(){return d()(this,t),p()(this,e.apply(this,arguments))}return g()(t,e),
t.prototype.componentDidMount=function(){this.props.onLibraryChange(this.props.providerIdentifier,this.props.librarySectionID),this.props.onBackgroundChange(this.props.backgroundImageUrl),this.props.onThemeMusicChange(this.props.theme)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.librarySectionID,i=t.providerIdentifier,a=t.backgroundImageUrl,r=t.theme,s=t.onLibraryChange,o=t.onBackgroundChange,l=t.onThemeMusicChange;n!==e.librarySectionID&&s(i,n),
e.backgroundImageUrl!==a&&o(a),e.theme!==r&&l(r)},t.prototype.componentWillUnmount=function(){this.props.onLibraryChange(null,null)},t.prototype.render=function(){var e=this.props,t=e.providerIdentifier,n=e.type,a=e.art,s=e.listStyle,l=(e.onBackgroundChange,u()(e,["providerIdentifier","type","art","listStyle","onBackgroundChange"])),c=i(n,t);return o()(b.a,{provider:t,type:n,style:s,showArtwork:!!a},void 0,v.a.createElement(c,r()({type:n,art:a,listStyle:s},l)))},t}(m.Component);t.a=N
},function(e,t,n){"use strict";function i(){return n.i(u.createSelector)(n.i(h.a)(),function(e){return!(!e||!e.isPopulated)})}function a(){return n.i(u.createSelector)(f.a,n.i(c.a)(),n.i(d.a)(),g.a,m.a,v.a,n.i(y.a)(),i(),function(e,t,i,a,r,s,o,l){var u=t.thumb||t.parentThumb||t.grandparentThumb,c=t.grandparentArt||t.parentArt||t.art,d=t.grandparentTheme||t.parentTheme||t.theme,h=a?c||u:u||c,f=n.i(w.a)(s,p.a,o,e);return{librarySectionID:t.librarySectionID,providerIdentifier:e.identifier,
metadataKey:t.key,descendantKey:i,title:t.title,type:t.type,year:t.year,summary:t.summary,thumb:t.thumb,parentThumb:t.parentThumb,grandparentThumb:t.grandparentThumb,art:a?c:void 0,theme:r?d:void 0,backgroundImageUrl:h,isListReady:l,onDeckMetadataItemEntityID:t.onDeck,extrasMetadataListEntityID:t.extras,popularLeavesMetadataListEntityID:t.popularLeaves,listType:o,listStyle:f}})}function r(e,t){return{onLibraryChange:function(i,a){e(n.i(b.changeQuickSearchSettings)({
serverEntityID:t.serverEntityID,providerIdentifier:i,sectionID:a}))},onBackgroundChange:function(i){e(n.i(I.a)({serverEntityID:t.serverEntityID,imageUrl:i}))},onThemeMusicChange:function(i){e(n.i(I.c)({serverEntityID:t.serverEntityID,theme:i}))}}}function s(e){return{descendantKey:e.ui.prePlayPage.descendantKey}}function o(e,t){e(n.i(S.d)({serverEntityID:t.serverEntityID,descendantKey:t.descendantKey}))}var l=n(14),u=n(8),c=(n.n(u),
n(24)),d=n(1277),h=n(140),p=n(35),f=n(45),g=n(847),m=n(1704),v=n(551),y=n(848),b=n(131),S=n(260),I=n(108),w=n(612),M=n(216),C=n(2205),D=n.i(M.a)(C.a,s,o),P=n.i(l.b)(a,r)(D);t.a=P},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,s=e.metadataListEntityID,v=e.showSpinner,y=e.showError,b=e.activeSelectionType,S=e.columnAdjustment,I=e.record;return v?r()(h.a,{},void 0,r()(c.a,{label:n.i(o.default)("Loading details")})):y?r()(p.a,{
title:n.i(o.default)("There was an unexpected error loading this item")}):r()(d.a,{metricsPage:l.u,isMetricsDelegated:!0,disableBackgroundPreset:!0,scrollDirection:u.a.NONE},void 0,b?r()(f.a,{serverEntityID:t,providerEntityID:i}):r()(g.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a}),r()(m.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a,metadataListEntityID:s,columnAdjustment:S,record:I}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(46),u=n(22),c=n(36),d=n(196),h=n(133),p=n(274),f=n(348),g=n(2214),m=n(2209);t.a=i},function(e,t,n){"use strict";function i(){return n.i(o.createSelector)(function(e){return e.ui.prePlayPage},f,u.a,c.a,function(e,t,n,i){var a=e.metadataItem,r=e.descendantList,s=e.isMetadataItemPending,o=e.metadataItemError;return{metadataItemEntityID:a,metadataListEntityID:r,showSpinner:s&&!t,showError:!s&&!!o,activeSelectionType:n.activeSelectionType,columnAdjustment:i.columnAdjustment}})}
function a(e){var t=e.ui.prePlayPage;return{serverEntityID:t.serverEntityID,metadataKey:t.metadataKey}}function r(e,t){e(d.a({serverEntityID:t.serverEntityID,metadataKey:t.metadataKey})),e(d.b()),e(d.c())}var s=n(14),o=n(8),l=(n.n(o),n(307)),u=n(109),c=n(168),d=n(260),h=n(216),p=n(2207),f=n.i(o.createSelector)(function(e){return e.ui.prePlayPage.metadataItem},l.a,function(e,t){var n=t[e]||{};return!(!n||!n.isPreFetched)}),g=n.i(h.a)(p.a,a,r),m=n.i(s.b)(i)(g);t.a=m},function(e,t,n){"use strict"
;function i(e,t){var n=t*-1+1,i=n/30+I,a=e*i;return Math.max(Math.min(a,M+30*n),w)}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),n(76)),f=n.n(p),g=n(27),m=n(87),v=n(229),y=n(2206),b=n(2695),S=n.n(b),I=parseFloat(f.a.prePlayPosterWidthRatio,10),w=parseInt(f.a.prePlayPosterMinWidth,10),M=parseInt(f.a.prePlayPosterMaxWidth,10),C=parseInt(f.a.pagePadding,10),D=function(e){function t(n,i){o()(this,t);var a=u()(this,e.call(this,n,i))
;return a.onScrollPositionChange=function(e){var t=e.scrollTop;a.setState({scrollTop:t})},a.onContentMeasure=function(e){var t=e.width,n=e.height,i=e.y;(t||n)&&a.setState({isMeasured:!0,pageWidth:t,pageHeight:n,pageY:i})},a.state={scrollTop:0,isMeasured:!1,pageWidth:0,pageHeight:0,pageY:0},a}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,a=e.metadataItemEntityID,s=e.metadataListEntityID,o=e.columnAdjustment,l=e.record,u=this.state,c=u.scrollTop,d=u.isMeasured,h=u.pageWidth,p=u.pageHeight,f=u.pageY;return r()(m.a,{className:S.a.prePlayPageContentContainer,onMeasure:this.onContentMeasure},void 0,r()(v.a,{className:S.a.prePlayPageContent,scrollTop:c,onScrollPositionChange:this.onScrollPositionChange},void 0,d&&r()(y.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:a,metadataListEntityID:s,pageWidth:h,pageHeight:p,posterWidth:i(h,o),posterTop:f+C,scrollTop:c,record:l})))},t}(h.Component);t.a=D},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=n(35),g=n(63),m=(n(93),n(92),n(22)),v=n(71),y=n(29),b=n(148),S=n(149),I=n(576),w=n(228),M=n(170),C=n(171),D=n(198),P=n(197),T=n(431),x=n(595),E=n(2215),A=n(2219),k=n(2213),L=n(2696),_=n.n(L),N=a()(y.a,{
name:"plex-icon-toolbar-artwork-560"}),R=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onDirectoriesMenuButtonPress=function(e){r.setState({isDirectoriesMenuOpen:!r.state.isDirectoriesMenuOpen})},r.onDirectoriesMenuClose=function(){r.setState({isDirectoriesMenuOpen:!1})},r.onSiblingsMenuButtonPress=function(e){r.setState({isSiblingsMenuOpen:!r.state.isSiblingsMenuOpen})},r.onSiblingsMenuClose=function(){r.setState({isSiblingsMenuOpen:!1})},
r.onToggleArtworkPress=function(e){r.props.onArtworkToggle(!r.props.isArtworkButtonSelected)},r.state={isDirectoriesMenuOpen:!1,isSiblingsMenuOpen:!1},r._directoriesMenuButtonID=n.i(g.a)(),r._siblingsMenuButtonID=n.i(g.a)(),r}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,s=e.siblingsMetadataListEntityID,o=e.server,l=e.provider,u=e.directories,c=e.selectedDirectory,d=e.metadataKey,p=e.grandparentTitle,g=e.parentTitle,y=e.title,L=e.grandparentRoute,R=e.parentRoute,O=e.showArtworkButton,j=e.isArtworkButtonSelected,z=e.listType,U=e.listStyle,F=e.allListStyles,B=this.state,V=B.isDirectoriesMenuOpen,H=B.isSiblingsMenuOpen;if(!d)return null
;var W=!l.isLibraryProvider&&u.length>1,Y=!!s,Q=z&&v.f(F,U);return a()(M.a,{className:Y||O&&!Q?_.a.altPageHeader:_.a.pageHeader},void 0,a()(C.a,{},void 0,W&&a()(P.a,{id:this._directoriesMenuButtonID,title:c.title,hasMenu:!0,isMenuOpen:V,onPress:this.onDirectoriesMenuButtonPress}),W&&a()(T.a,{target:this._directoriesMenuButtonID,isOpen:V,machineIdentifier:o.machineIdentifier,providerIdentifier:l.identifier,isLibraryProvider:l.isLibraryProvider,directories:u,selectedDirectory:c,
onMenuClose:this.onDirectoriesMenuClose}),!!p&&a()(P.a,{title:p,to:L,hasMenu:!1,isDisabled:!L}),!!g&&a()(P.a,{title:g,to:R,hasMenu:!1,isDisabled:!R}),!!y&&a()(P.a,{id:this._siblingsMenuButtonID,title:y,hasMenu:Y,isMenuOpen:H,isDisabled:!Y,onPress:this.onSiblingsMenuButtonPress}),Y&&a()(S.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:s,component:E.a,initialSize:1/0,target:this._siblingsMenuButtonID,isOpen:H,selectedKey:d,onMenuClose:this.onSiblingsMenuClose
})),a()(D.a,{},void 0,a()(A.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}),O&&a()(x.a,{className:_.a.divider}),O&&a()(b.a,{tooltip:j?n.i(h.default)("Hide Artwork"):n.i(h.default)("Show Artwork"),isSelected:j,hideOnPress:!1,tooltipAttachment:Q||Y?m.e.BOTTOM_CENTER:m.e.BOTTOM_RIGHT,onPress:this.onToggleArtworkPress},void 0,N),Q&&a()(I.a,{selectedListStyle:U,allListStyles:F}),Q&&a()(w.a,{listType:z,listContext:f.a,selectedListStyle:U,allListStyles:F}),Y&&a()(x.a,{
className:Q?_.a.listStylesArrowsDivider:_.a.divider}),Y&&a()(k.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r,metadataListEntityID:s})))},t}(d.Component);t.a=R},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(m.a,v.a,n.i(y.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{to:n.i(S.a)(e,t,i.key),isDisabled:!i.key}})}
var a=n(16),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(47)),v=n(45),y=n(24),b=n(260),S=n(102),I=n(148),w={dispatchPreFetch:b.g},M=function(e){function t(){return o()(this,t),u()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){this._preFetch()},t.prototype.componentDidUpdate=function(e){this.props.metadataItemEntityID!==e.metadataItemEntityID&&this._preFetch()},t.prototype._preFetch=function(){
var e=this.props,t=e.metadataItemEntityID,n=e.isDisabled,i=e.dispatchPreFetch;n||i({metadataItemEntityID:t})},t.prototype.render=function(){var e=this.props,t=(e.serverEntityID,e.providerEntityID,e.metadataItemEntityID,e.dispatchPreFetch,r()(e,["serverEntityID","providerEntityID","metadataItemEntityID","dispatchPreFetch"]));return p.a.createElement(I.a,t)},t}(h.Component);t.a=n.i(f.b)(i,w)(M)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.previousMetadataItemEntityID,a=e.nextMetadataItemEntityID;return r()("div",{},void 0,r()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i},void 0,u),r()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:a},void 0,c))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(29)),l=n(2211),u=r()(o.a,{name:"plex-icon-page-prev-560"}),c=r()(o.a,{name:"plex-icon-page-next-560"});t.a=i},function(e,t,n){"use strict";function i(){
return n.i(r.createSelector)(function(e,t){return t.metadataItemEntityID},n.i(s.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.metadataItems,i=n.indexOf(e),a=i+1,r=i-1,s=void 0,o=void 0;return r>-1&&(s=n[r]),a>0&&a<n.length&&(o=n[a]),{previousMetadataItemEntityID:s,nextMetadataItemEntityID:o}})}var a=n(14),r=n(8),s=(n.n(r),n(140)),o=n(2212);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(function(e){
return e.ui.prePlayPage},g.a,m.a,n.i(d.a)(),n.i(h.a)(),n.i(p.a)(),v.a,y.a,n.i(b.a)(),function(e,t,i,a,r,s,o,u,c){var d=r.librarySectionID,h=new RegExp("/"+d+"$"),p=l.a.find(a,function(e){return!!e.key&&h.test(e.key)}),g=r.grandparentKey,m=r.parentKey,v=r.key,y=r.grandparentTitle,b=r.parentTitle,S=r.title,I=n.i(w.a)(u,f.a,c,i),D=n.i(M.a)(c,f.a,i);return{siblingsMetadataListEntityID:e.siblingList,server:t,provider:i,directories:a,selectedDirectory:p||l.a.first(a),metadataKey:v,siblingKey:s,
grandparentTitle:y,parentTitle:b,title:S,grandparentRoute:n.i(C.a)(t,i,g),parentRoute:n.i(C.a)(t,i,m),showArtworkButton:!!r.art,isArtworkButtonSelected:o,listType:c,listStyle:I,allListStyles:D}})}function a(e,t){return{onArtworkToggle:function(t){e(n.i(I.a)({name:"experienceSettings",settings:{showPrePlayArtwork:t}}))}}}function r(e){return{siblingKey:e.ui.prePlayPage.siblingKey}}function s(e,t){e(n.i(S.f)({serverEntityID:t.serverEntityID,siblingKey:t.siblingKey}))}
var o=n(2),l=n.n(o),u=n(14),c=n(8),d=(n.n(c),n(308)),h=n(24),p=n(1278),f=n(35),g=n(47),m=n(45),v=n(847),y=n(551),b=n(848),S=n(260),I=n(79),w=n(612),M=n(439),C=n(102),D=n(216),P=n(2210),T=n.i(D.a)(P.a,r,s),x=n.i(u.b)(i,a)(T);t.a=x},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityIDs,s=e.isPending,u=e.error,h=e.selectedKey,g=e.target,m=e.isOpen,v=e.onMenuClose,y=!!a.length,b=!y&&s,S=!y&&!s&&!!u,I=!y&&!b&&!S;return r()(c.a,{target:g,
isOpen:m,size:l.d.LARGE,onMenuClose:v},void 0,b&&r()("span",{className:p.a.emptyContainer},void 0,f),S&&r()("span",{className:p.a.emptyContainer},void 0,n.i(o.default)("Unable to load items")),I&&r()("span",{className:p.a.emptyContainer},void 0,n.i(o.default)("No items")),a.map(function(e){return r()(d.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:e,selectedKey:h},e)}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(36),c=n(80),d=n(2217),h=n(2697),p=n.n(h),f=r()(u.a,{})
;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.to,i=e.isSelected;return r()(o.a,{to:n,isSelected:i},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(122));t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e,t){return t.selectedKey},s.a,o.a,n.i(l.a)(),function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{title:a.title,to:n.i(u.a)(t,i,a.key),isSelected:e===a.key}})}var a=n(14),r=n(8),s=(n.n(r),
n(47)),o=n(45),l=n(24),u=n(102),c=n(2216);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(4)),p=n(12),f=n(63),g=n(599),m=n(342),v=n(592),y=n(2138),b=n(593),S=n(591),I=n(2137),w=n(919),M=n(594),C=n(345),D=n(897),P=["showPlay","showPlayTrailer","showShuffle","showAddToPlaylist","showToggleWatched","showEdit","showSync"],T=["showPlayVersion","showPlayAll","showQueue","showPlayPlexMix","showPlayMusicVideo","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo"],x=function(e){
function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onPlayShortcut=function(){var e=r.props,t=e.showPlay,n=e.showPlayOverflow,i=e.onPlayPress;(t||n)&&i()},r.onToggleWatchedShortcut=function(){var e=r.props,t=e.showMarkWatched,n=e.showMarkUnwatched;t?r.setState({isConfirmMarkWatchedModalOpen:!0}):n&&r.setState({isConfirmMarkUnwatchedModalOpen:!0})},r.onEditShortcut=function(){var e=r.props,t=e.showEdit,n=e.showEditOverflow,i=e.onEditPress;(t||n)&&i()},
r.onGetInfoShortcut=function(){var e=r.props,t=e.showGetInfo,n=e.onGetInfoPress;t&&n()},r.onMarkWatchedPress=function(e){r.setState({isConfirmMarkWatchedModalOpen:!0})},r.onMarkWatchedConfirm=function(){r.setState({isConfirmMarkWatchedModalOpen:!1}),r.props.onMarkWatchedConfirm()},r.onMarkWatchedCancel=function(){r.setState({isConfirmMarkWatchedModalOpen:!1})},r.onMarkUnwatchedPress=function(e){r.setState({isConfirmMarkUnwatchedModalOpen:!0})},r.onMarkUnwatchedConfirm=function(){r.setState({
isConfirmMarkUnwatchedModalOpen:!1}),r.props.onMarkUnwatchedConfirm()},r.onMarkUnwatchedCancel=function(){r.setState({isConfirmMarkUnwatchedModalOpen:!1})},r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1,isConfirmMarkWatchedModalOpen:!1,isConfirmMarkUnwatchedModalOpen:!1},r._moreButtonID=n.i(f.a)(),r}return c()(t,e),t.prototype.componentDidMount=function(){
p.a.on("shortcut:playSelected",this.onPlayShortcut),p.a.on("shortcut:toggleWatched",this.onToggleWatchedShortcut),p.a.on("shortcut:edit",this.onEditShortcut),p.a.on("shortcut:info",this.onGetInfoShortcut)},t.prototype.componentWillUnmount=function(){p.a.off("shortcut:playSelected",this.onPlayShortcut),p.a.off("shortcut:toggleWatched",this.onToggleWatchedShortcut),p.a.off("shortcut:edit",this.onEditShortcut),p.a.off("shortcut:info",this.onGetInfoShortcut)},t.prototype.render=function(){
var e=this.props,t=e.className,i=e.serverEntityID,r=e.providerEntityID,s=e.metadataItemEntityID,o=e.type,l=e.title,u=e.viewedLeafCount,c=e.unviewedLeafCount,d=e.showPlay,p=e.showPlayOverflow,f=e.showPlayTrailer,g=e.showPlayTrailerOverflow,P=e.showShuffle,T=e.showShuffleOverflow,x=e.showAddToPlaylist,E=e.showAddToPlaylistOverflow,A=e.showToggleWatched,k=e.showToggleWatchedOverflow,L=e.showMarkWatched,_=e.showMarkUnwatched,N=e.showEdit,R=e.showEditOverflow,O=e.showSync,j=e.showSyncOverflow,z=e.showOverflow,U=e.onPlayPress,F=e.onPlayTrailerPress,B=e.onShufflePress,V=e.onAddToPlaylistPress,H=e.onEditPress,W=e.onSyncPress,Y=this.state,Q=Y.isActionsMenuOpen,G=Y.isConfirmMarkWatchedModalOpen,K=Y.isConfirmMarkUnwatchedModalOpen
;return a()("div",{className:t},void 0,d&&a()(v.a,{playLabel:n.i(h.default)("Play"),onPress:U}),f&&a()(y.a,{onPress:F}),P&&a()(b.a,{onPress:B}),x&&a()(S.a,{onPress:V}),A&&L&&a()(I.a,{onPress:this.onMarkWatchedPress}),A&&_&&!L&&a()(I.a,{markUnwatched:!0,onPress:this.onMarkUnwatchedPress}),N&&a()(w.a,{onPress:H}),O&&a()(M.a,{onPress:W}),z&&a()(C.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:n.i(h.default)("More..."),isMenuOpen:Q,onPress:this.onActionsPress}),a()(m.a,{
serverEntityID:i,providerEntityID:r,metadataItemEntityID:s,showPlay:p,showPlayTrailer:g,showShuffle:T,showAddToPlaylist:E,showEdit:R,showMarkWatched:k&&L,showMarkUnwatched:k&&_,showSync:j,target:this._moreButtonID,isOpen:Q,onMenuClose:this.onActionsMenuClose}),a()(D.a,{isOpen:G,type:o,title:l,leafCount:c,onConfirm:this.onMarkWatchedConfirm,onCancel:this.onMarkWatchedCancel}),a()(D.a,{isOpen:K,type:o,title:l,leafCount:u,markUnwatched:!0,onConfirm:this.onMarkUnwatchedConfirm,
onCancel:this.onMarkUnwatchedCancel}))},t}(d.Component);t.a=n.i(g.a)(x,P,T)},function(e,t,n){"use strict";function i(){return n.i(o.createSelector)(l.a,u.a,n.i(c.a)(),function(e,t,i){var a=i.type,r=i.title,o=i.viewedLeafCount,l=i.unviewedLeafCount,u=n.i(h.d)(e,t,i),c=u.showMarkWatched||u.showMarkUnwatched;return s()({type:a,title:r,viewedLeafCount:o,unviewedLeafCount:l,showToggleWatched:c},u)})}function a(e,t){var n={serverEntityID:t.serverEntityID,metadataItemEntityID:t.metadataItemEntityID,
metricsPage:t.metricsPage};return{onPlayPress:function(){e(d.playMetadataItem(n))},onPlayTrailerPress:function(){e(d.playPrimaryExtra(n))},onShufflePress:function(){e(d.shuffleMetadataItem(n))},onAddToPlaylistPress:function(){e(d.addMetadataItemToPlaylist(n))},onMarkWatchedConfirm:function(){e(d.markMetadataItemWatched(s()({},n,{skipConfirm:!0})))},onMarkUnwatchedConfirm:function(){e(d.markMetadataItemUnwatched(s()({},n,{skipConfirm:!0})))},onEditPress:function(){e(d.editMetadataItem(n))},
onSyncPress:function(){e(d.syncMetadataItem(n))},onGetInfoPress:function(){e(d.getMetadataItemInfo(n))}}}var r=n(6),s=n.n(r),o=n(8),l=(n.n(o),n(47)),u=n(45),c=n(24),d=n(107),h=n(235),p=n(129),f=n(2218);t.a=n.i(p.a)(i,a)(f.a)},function(e,t,n){"use strict";function i(){return r()(c.a,{title:n.i(o.default)("Nothing is here"),description:n.i(o.default)("This item may have been deleted recently")},void 0,r()(u.a,{to:"#",kind:l.b.PRIMARY},void 0,n.i(o.default)("Go Home")))}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(25),c=n(922);t.a=i},function(e,t,n){"use strict";function i(){return r()(c.a,{title:n.i(o.default)("You must be lost"),description:n.i(o.default)("This item does not have its own page")},void 0,r()(u.a,{to:"#",kind:l.b.PRIMARY},void 0,n.i(o.default)("Go Home")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(25),c=n(922);t.a=i},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(27)),p=(n(71),n(87)),f=n(343),g=n(149),m=n(151),v=n(134),y=n(124),b=n(2232),S=n(153),I=n(200),w=n(201),M=n(101),C=n(347),D=n(233),P=n(152),T=n(199),x=n(173),E=n(275),A=a()(y.a,{}),k=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onContentMeasure=function(e){var t=e.width,n=e.height;a.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},a.state={
isContentMeasured:!1,contentWidth:null,contentHeight:null},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataListEntityID,s=e.metadataKey,o=e.title,l=e.type,u=e.year,c=e.summary,d=e.thumb,h=e.art,y=e.listType,k=e.listStyle,L=e.isListReady,_=e.pageWidth,N=e.pageHeight,R=e.scrollTop,O=e.posterWidth,j=e.posterTop,z=this.state,U=z.isContentMeasured,F=z.contentWidth,B=z.contentHeight,V=!(!U||!r);return a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:s,type:l,thumb:d,art:h,
pageWidth:_,pageHeight:N,scrollTop:R,posterWidth:O,posterTop:j},void 0,a()(p.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,a()(v.a,{},void 0,a()(S.a,{},void 0,a()(f.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(I.a,{},void 0,a()(M.a,{},void 0,o),a()(D.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(w.a,{},void 0,a()(M.a,{},void 0,u),a()(C.a,{},void 0,a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
})))),A,!!c&&a()(v.a,{},void 0,a()(P.a,{},void 0,c))),V&&a()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,component:E.a,initialSize:20,showArtwork:!!h,viewportWidth:F,viewportHeight:N,contentHeight:B,scrollTop:R,listType:y,listStyle:k}),L&&a()(v.a,{},void 0,a()(T.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(x.a,{serverEntityID:t,providerEntityID:n})))},t}(d.Component);t.a=k},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=(n(71),n(87)),g=n(149),m=n(151),v=n(134),y=n(124),b=n(153),S=n(101),I=n(233),w=n(232),M=n(152),C=n(604),D=n(173),P=n(275),T=n(2228),x=n(2229),E=n(2226),A=a()(y.a,{}),k=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onContentMeasure=function(e){var t=e.width,n=e.height;a.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},a.state={
isContentMeasured:!1,contentWidth:null,contentHeight:null},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,s=e.metadataListEntityID,o=e.extrasMetadataListEntityID,l=e.popularLeavesMetadataListEntityID,u=e.metadataKey,c=e.title,d=e.type,p=e.summary,y=e.thumb,k=e.art,L=e.listType,_=e.listStyle,N=e.isListReady,R=e.pageWidth,O=e.pageHeight,j=e.scrollTop,z=e.posterWidth,U=e.posterTop,F=this.state,B=F.isContentMeasured,V=F.contentWidth,H=F.contentHeight,W=!(!B||!l),Y=!(!B||!s);return a()(m.a,{serverEntityID:t,
providerEntityID:i,metadataItemEntityID:r,metadataKey:u,type:d,thumb:y,art:k,pageWidth:R,pageHeight:O,scrollTop:j,posterWidth:z,posterTop:U},void 0,a()(f.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,a()(v.a,{},void 0,a()(b.a,{},void 0,a()(S.a,{},void 0,c),a()(I.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),a()(T.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),A,a()(v.a,{},void 0,a()(w.a,{serverEntityID:t,providerEntityID:i,
metadataItemEntityID:r}),a()(M.a,{},void 0,p))),W&&a()(g.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:l,component:x.a,showArtwork:!!k,viewportWidth:V,viewportHeight:O,contentHeight:H,scrollTop:j,listStyle:_}),Y&&a()(g.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:s,component:P.a,initialSize:20,showArtwork:!!k,viewportWidth:V,viewportHeight:O,contentHeight:H,scrollTop:j,listType:L,listStyle:_}),N&&a()(v.a,{},void 0,!!o&&a()(C.a,{serverEntityID:t,providerEntityID:i,
metadataItemEntityID:r,metadataListEntityID:o,title:n.i(h.default)("Music Videos")}),a()(E.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}),a()(D.a,{serverEntityID:t,providerEntityID:i})))},t}(d.Component);t.a=k},function(e,t,n){"use strict";function i(e){var t=e.at,n=e.city,i=e.country,a=e.tag,s=e.url,o=e.venue,c=l.a.unix(t),h=c.format("DD"),p=c.format("MMM");return r()(u.a,{className:d.a.concert,target:"_blank",to:s},void 0,r()("div",{className:d.a.concertCalendar
},void 0,r()("div",{className:d.a.concertMonth},void 0,p),r()("div",{className:d.a.concertDay},void 0,h)),r()("div",{className:d.a.concertDetails},void 0,r()("div",{className:d.a.concertTitle},void 0,a),r()("div",{className:d.a.concertLocation},void 0,o," (",n,", ",i,")")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(37)),l=n.n(o),u=n(25),c=n(2698),d=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.concerts;if(!t||!t.length)return null;var i=n.i(d.a)(n.i(c.default)("On Tour"))
;return o()("div",{className:y.a.concerts},void 0,o()(h.a,{},void 0,o()(p.a,{},void 0,i,o()("img",{className:y.a.concertsLogo,src:m.a}))),t.map(function(e){return u.a.createElement(f.a,r()({key:e.id},e))}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(387),h=n(574),p=n(421),f=n(2224),g=n(3343),m=n.n(g),v=n(2699),y=n.n(v);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{
concerts:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).concerts}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2225);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.provider,i=e.librarySectionKey,a=e.Country,s=e.Genre,h=!(!a||!a.length),p=!(!s||!s.length);return h||p?r()(u.a,{},void 0,h&&r()(c.a,{},void 0,r()(o.a,{server:t,provider:n,librarySectionKey:i,fallbackFilterKey:"country",tags:a,limit:1})),p&&r()(d.a,{},void 0,r()(l.a,{server:t,provider:n,
librarySectionKey:i,Genre:s}))):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(93),n(92),n(601)),l=n(600),u=n(201),c=n(101),d=n(347);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),n.i(u.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],Country:n.Country,Genre:n.Genre}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(306),c=n(2227);t.a=n.i(a.b)(i)(c.a)
},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.metadataItemEntityIDs,l=e.showArtwork,c=e.contentHeight,w=e.scrollTop,M=u()(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","showArtwork","contentHeight","scrollTop"]);if(!s||!s.length)return null;var C=n.i(p.a)(n.i(h.default)("Popular Tracks")),x={serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:"track",listContext:g.a,
activeSort:"titleSort",showLink:!1,showPlayIndex:!1,showPlayCellIndex:!0,showActionsDuration:!0};return o()("div",{className:D.a.popularTracksHubCell},void 0,o()(S.a,{},void 0,o()(y.a,{},void 0,C)),P,o()(I.a,{showArtwork:l,contentHeight:c,scrollTop:w},void 0,d.a.createElement(m.a,r()({layout:f.a,cellRenderer:n.i(v.a)(x,b.a),items:s,size:Math.min(s.length,5),keyPropName:"metadataItemEntityID"},M))),T)}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(387),f=n(611),g=n(35),m=n(188),v=n(135),y=n(421),b=n(575),S=n(134),I=n(933),w=n(934),M=n(932),C=n(2700),D=n.n(C),P=o()(w.a,{}),T=o()(M.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.width,i=e.height,a=e.url;return o()(c.a,{serverEntityID:t,background:!0,backgroundPosition:"top center",minSize:!0,transition:!0,transitionProps:r()({className:h.a.imageContainer,style:{width:n,height:i
}},u.a),width:n,height:i,url:a})}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=(n.n(l),n(278)),c=n(165),d=n(2701),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.separator;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2702)),l=n.n(o);i.defaultProps={className:l.a.separator,separator:"\xb7"},t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(s.a,o.a,n.i(l.a)(),n.i(u.a)(),function(e,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{server:e,provider:t,librarySectionKey:arguments[3],type:n.type,Genre:n.Genre}})}var a=n(14),r=n(8),s=(n.n(r),n(47)),o=n(45),l=n(24),u=n(306),c=n(600);t.a=n.i(a.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.posterWidth;return r()("div",{className:t,style:{paddingLeft:i+60}},void 0,n)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2704)),l=n.n(o);i.defaultProps={className:l.a.content},t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,s=e.metadataKey,l=e.type,u=e.posterType,h=e.pageHeight,f=e.posterWidth,m=e.posterTop,v=e.posterUrl,y=u||l,b=f,S=n.i(c.a)(b,y,o.a);return S>h-g&&(S=h-g,b=n.i(c.b)(S,y,o.a)),r()("div",{style:{position:"fixed",top:m}},void 0,r()(d.a,{cardFaceClassName:p.a.face,serverEntityID:t,providerEntityID:i,metadataItemEntityID:a,metadataKey:s,type:l,imageWidth:b,imageHeight:S,imageUrl:v,
showLink:!1,showSelect:!1,showEdit:!1,showMore:!1}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(35)),l=n(76),u=n.n(l),c=n(203),d=n(424),h=n(2706),p=n.n(h),f=parseInt(u.a.pagePadding,10),g=2*f+40;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,i=e.server,a=e.provider,s=e.librarySectionKey,d=e.type,h=e.Director,p=e.Writer,f=e.studio;return t||h.length||p.length||f?r()(u.a,{},void 0,t,!!h.length&&r()(c.a,{label:n.i(o.default)("Directed by")},void 0,r()(l.a,{server:i,provider:a,
librarySectionKey:s,fallbackFilterKey:"director",type:d,tags:h})),!!p.length&&r()(c.a,{label:n.i(o.default)("Written by")},void 0,r()(l.a,{server:i,provider:a,librarySectionKey:s,fallbackFilterKey:"writer",type:d,tags:p})),!!f&&r()(c.a,{label:n.i(o.default)("Studio")},void 0,r()(l.a,{server:i,provider:a,librarySectionKey:s,type:d,tags:[{filter:"studio="+encodeURIComponent(f),tag:f}]}))):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=(n(93),n(92),n(601)),u=n(602),c=n(432);i.defaultProps={
Director:[],Writer:[]},t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(86),f=n(142),g=n(511),m=n(512),v=n(63),y=n(22),b=n(412),S=n(2135),I=n(917),w=n(918),M=n(2066),C=n(2067),D=n(602),P=n(432),T=n(2710),x=n.n(T),E=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onAudioStreamMenuButtonPress=function(e){r.setState({isAudioStreamMenuOpen:!r.state.isAudioStreamMenuOpen})},
r.onAudioStreamMenuClose=function(){r.setState({isAudioStreamMenuOpen:!1})},r.onSubtitlesStreamMenuButtonPress=function(e){r.setState({isSubtitlesStreamMenuOpen:!r.state.isSubtitlesStreamMenuOpen})},r.onSubtitlesStreamMenuClose=function(){r.setState({isSubtitlesStreamMenuOpen:!1})},r.state={isAudioStreamMenuOpen:!1,isSubtitlesStreamMenuOpen:!1},r._audioStreamMenuButtonID=n.i(v.a)(),r._subtitlesStreamMenuButtonID=n.i(v.a)(),r}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.mediaItem,i=e.onAudioStreamSelect,r=e.onSubtitlesStreamSelect,s=this.state,o=s.isAudioStreamMenuOpen,l=s.isSubtitlesStreamMenuOpen;if(!t)return a()(D.a,{},void 0,a()(P.a,{label:n.i(h.default)("Video")},void 0,a()("span",{className:x.a.loadingMessage},void 0,n.i(h.default)("Loading..."))),a()(P.a,{label:n.i(h.default)("Audio")},void 0,a()("span",{className:x.a.loadingMessage},void 0,n.i(h.default)("Loading..."))),a()(P.a,{label:n.i(h.default)("Subtitles")},void 0,a()("span",{
className:x.a.loadingMessage},void 0,n.i(h.default)("Loading..."))));var u=p.a.get("audio").id,c=n.i(f.a)(t,{streamType:u}),d=n.i(g.a)(t),v=p.a.get("subtitles").id,T=n.i(f.a)(t,{streamType:v}),E=n.i(m.a)(t);return a()(D.a,{},void 0,a()(P.a,{label:n.i(h.default)("Video")},void 0,a()(S.a,{mediaItem:t})),a()(P.a,{label:n.i(h.default)("Audio")},void 0,c.length>1?a()(b.a,{id:this._audioStreamMenuButtonID,direction:o?y.f.UP:y.f.DOWN,onPress:this.onAudioStreamMenuButtonPress},void 0,a()(I.a,{
audioStream:d})):a()(I.a,{audioStream:d})),a()(P.a,{label:n.i(h.default)("Subtitles")},void 0,T.length>1?a()(b.a,{id:this._subtitlesStreamMenuButtonID,direction:l?y.f.UP:y.f.DOWN,onPress:this.onSubtitlesStreamMenuButtonPress},void 0,a()(w.a,{subtitlesStream:E})):a()(w.a,{subtitlesStream:E})),a()(M.a,{target:this._audioStreamMenuButtonID,isOpen:o,audioStreams:c,onMenuClose:this.onAudioStreamMenuClose,onStreamSelect:i}),a()(C.a,{target:this._subtitlesStreamMenuButtonID,isOpen:l,subtitlesStreams:T,
onMenuClose:this.onSubtitlesStreamMenuClose,onStreamSelect:r}))},t}(d.Component);t.a=E},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=n(144),g=n(116),m=n(29),v=n(25),y=n(90),b=n(564),S=n(270),I=n(272),w=n(903),M=n(2713),C=n.n(M),D=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRecordPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){
a.setState({isSubscribeModalOpen:!1})},a.state={isSubscribeModalOpen:!1},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,s=e.cellIndex,o=e.cellX,l=e.cellY,u=e.cellWidth,c=e.cellHeight,d=e.metadataKey,p=e.route,f=e.title,M=e.type,D=e.summary,P=e.hasSingleSubscription,T=this.state.isSubscribeModalOpen;return d?a()(g.a,{
className:s%2?C.a.alternateItem:C.a.item,cellX:o,cellY:l,cellWidth:u,cellHeight:c},void 0,a()(v.a,{className:C.a.underlay,to:p}),a()("div",{className:C.a.overlay},void 0,a()("div",{className:C.a.primaryTitle},void 0,a()(I.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),a()("div",{className:C.a.secondaryTitle},void 0,P&&a()(m.a,{className:C.a.subscriptionIcon,name:"plex-icon-dvr-single-560","aria-label":n.i(h.default)("Recording Scheduled")}),a()(w.a,{
className:C.a.nextAiringDate,metadataItemEntityID:r,showFullTime:!0}),!!D&&a()(y.a,{className:C.a.separator}),D)),a()(b.a,{className:C.a.recordButton,tabIndex:"-1",title:f,onPress:this.onRecordPress}),a()(S.a,{serverEntityID:t,metadataItemEntityID:r,isOpen:T,subscriptionType:M,onModalClose:this.onSubscribeModalClose})):a()(g.a,{className:s%2?C.a.alternateLoadingItem:C.a.loadingItem,cellX:o,cellY:l,cellWidth:u,cellHeight:c},void 0,n.i(h.default)("Loading..."))},t}(d.Component);t.a=n.i(f.a)(D)
},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(u.a,c.a,n.i(d.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{metadataKey:i.key,title:i.title,type:i.type,summary:i.summary,route:n.i(h.a)(e,t,i.key),hasSingleSubscription:!!i.subscriptionID}})}function a(e){return s.a.createElement(p.a,e)}var r=n(1),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(47)),c=n(45),d=n(24),h=n(102),p=n(2237);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(610),f=n(188),g=n(2238),m=n.i(p.a)(96),v=function(e){function t(){var n,i,r;s()(this,t);for(var o=arguments.length,u=Array(o),c=0;c<o;c++)u[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(u))),i.renderCell=function(e){return h.a.createElement(g.a,a()({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,metadataListEntityID:i.props.metadataListEntityID},e))},r=n,
l()(i,r)}return c()(t,e),t.prototype.render=function(){return h.a.createElement(f.a,a()({layout:m,cellRenderer:this.renderCell},this.props))},t}(d.Component);t.a=v},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.type,s=e.leafCount,d=e.isSubscribed,p=e.subscriptionType,f=e.grandparentSubscriptionType,g=e.record;return r()(l.a,{},void 0,r()(o.a,{className:h.a.episodeCount,leafCount:s}),r()(u.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i}),r()(c.a,{serverEntityID:t,metadataItemEntityID:i,type:a,isSubscribed:d,subscriptionType:p,grandparentSubscriptionType:f,isSubscribeModalOpen:g}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(585)),l=n(101),u=n(433),c=n(926),d=n(2714),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:e.type,leafCount:e.leafCount,
isSubscribed:null!=e.subscriptionID||null!=e.grandparentSubscriptionID,subscriptionType:e.subscriptionType,grandparentSubscriptionType:e.grandparentSubscriptionType}})}var a=n(14),r=n(8),s=(n.n(r),n(24)),o=n(2240);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.type,s=e.duration,d=e.isSubscribed,p=e.subscriptionType,f=e.grandparentSubscriptionType,g=e.record;return r()(l.a,{},void 0,r()(o.a,{
className:h.a.duration,duration:s}),r()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(c.a,{serverEntityID:t,metadataItemEntityID:i,type:a,isSubscribed:d,subscriptionType:p,grandparentSubscriptionType:f,isSubscribeModalOpen:g}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(584)),l=n(101),u=n(433),c=n(926),d=n(2715),h=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.listType,i=e.serverEntityID,a=e.server,s=e.provider,o=e.librarySectionKey,p=e.titleComponents,g=e.thumb,m=e.id,v=e.tag,y=e.role,b=e.filter,S=e.cellX,I=e.cellY,w=e.cellWidth,M=e.cellHeight,C=e.showOffscreenPlaceholder,D={filters:b||"actor="+m,filterLabel:v};return r()(c.a,{cellX:S,cellY:I,cellWidth:w,cellHeight:M},void 0,r()(u.a,{className:f.a.cardLink,to:n.i(l.a)(a,s,o,D)},void 0,r()(d.a,{serverEntityID:i,imageWidth:w,imageHeight:w,imageUrl:g,title:v,tagType:t,isOffscreen:C
})),r()("div",{className:f.a.titleContainer},void 0,p.map(function(e,t){return r()(h.a,{server:a,provider:s,librarySectionKey:o,tag:v,role:y,filter:b,component:e,isSecondary:t>0},t)})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(144)),l=(n(93),n(92),n(94)),u=n(25),c=n(116),d=n(579),h=n(578),p=n(2716),f=n.n(p);t.a=n.i(o.a)(i)},function(e,t,n){"use strict";function i(e){return function(t){return c.a.createElement(m.a,l()({},e,t))}}function a(e){
var t=e.listType,a=e.listContext,r=e.serverEntityID,o=e.server,u=e.provider,c=e.librarySectionKey,h=e.roles;if(!h)return null;var m=n.i(p.a)(t,a);return s()("div",{className:y.a.castList},void 0,s()(g.a,{hubIdentifier:"cast",title:n.i(d.default)("Cast"),size:h.length,listType:t,listContext:a,columnAdjustment:1,keyPropName:"uniqueID",items:h.map(function(e){return l()({},e,{uniqueID:e.id+"!"+e.role})}),layout:n.i(f.a)(t,a,1,m.length),cellRenderer:i({listType:t,listContext:a,serverEntityID:r,
server:o,provider:u,librarySectionKey:c,titleComponents:m})}))}var r=n(3),s=n.n(r),o=n(6),l=n.n(o),u=n(1),c=n.n(u),d=n(4),h=n(35),p=n(276),f=n(609),g=(n(93),n(92),n(573)),m=n(2243),v=n(2717),y=n.n(v);a.defaultProps={listType:"actor",listContext:h.a},t.a=a},function(e,t,n){"use strict";function i(e){return o.a.createElement(u.a,r()({className:d.a.extrasHubCell,hubIdentifier:"extras"},e))}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(35),u=n(893),c=n(2719),d=n.n(c);i.defaultProps={listType:"extra",
listContext:l.a,columnAdjustment:1},t.a=i},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(959),m=n(962),v=n(895),y=n(76),b=n.n(y),S=n(135),I=n(188),w=parseInt(b.a.mosaicCellPadding,10),M=function(e){function t(n,i){l()(this,t);var a=c()(this,e.call(this,n,i));return a.state={layout:a._createLayout(n)},a}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){
var t=this.props.aspectRatios!==e.aspectRatios,n=this.props.viewportWidth!==e.viewportWidth,i=this.props.columnAdjustment!==e.columnAdjustment;(t||n||i)&&this.setState({layout:this._createLayout(e)})},t.prototype._createLayout=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.viewportWidth,i=e.columnAdjustment,a=e.aspectRatios,r=Math.ceil(t/400),s=Math.max(1,r+i),o=w,l=w,u=n.i(m.a)({aspectRatios:a,columns:s});return n.i(g.a)({columns:s,rows:u,outerPadding:o,
innerPadding:l})},t.prototype.render=function(){if(!this.state)return null;var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,o=e.listType,l=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","listType"]),u=this.state.layout;return f.a.createElement(I.a,a()({layout:u,cellRenderer:n.i(S.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:r,listType:o},v.a)},l))},t}(p.Component);t.a=M},function(e,t,n){"use strict";function i(){
return n.i(r.createSelector)(function(e,t){return t.items},o.a,function(e,t){return e?{aspectRatios:e.map(function(e){return n.i(s.a)(t[e])})}:{aspectRatios:[]}})}var a=n(14),r=n(8),s=(n.n(r),n(801)),o=n(307),l=n(2246);t.a=n.i(a.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.columnAdjustment,l=e.listType,g=e.listContext,m=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","columnAdjustment","listType","listContext"]),v=n.i(h.a)(l,g,{providerEntityID:i});return u.a.createElement(p.a,r()({layout:n.i(c.a)(l,g,s,v.length),cellRenderer:n.i(d.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:l,listContext:g,titleComponents:v},f.a)},m))}
var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=(n(35),n(958)),d=n(135),h=n(276),p=n(188),f=n(422);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.listType,l=e.listContext,f=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","listType","listContext"]);return u.a.createElement(h.a,r()({layout:c.a,cellRenderer:n.i(d.a)({serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:s,listContext:l
},p.a)},f))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=(n(35),n(963)),d=n(135),h=n(188),p=n(894);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.listType,l=e.listContext,f=o()(e,["serverEntityID","providerEntityID","metadataListEntityID","listType","listContext"]),g={serverEntityID:t,providerEntityID:i,metadataListEntityID:a,listType:s,listContext:l,activeSort:"titleSort"}
;return"episode"===s&&(g.showPlayIndex=!0,g.showActionsMinutesLeft=!0),"track"===s&&(g.showLink=!1,g.showPlayIndex=!0,g.showActionsDuration=!0),u.a.createElement(h.a,r()({layout:c.a,cellRenderer:n.i(d.a)(g,p.a)},f))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=(n(35),n(611)),d=n(135),h=n(188),p=n(575);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.relatedHubEntityIDs;return e.showSpinner?r()("div",{className:c.a.spinnerContainer
},void 0,d):r()(l.a,{className:c.a.relatedList,serverEntityID:t,providerEntityID:n,hubEntityIDs:i,columnAdjustment:1})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(36)),l=n(892),u=n(2722),c=n.n(u),d=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,i=e.provider,a=e.librarySectionKey,s=e.contentRating;if(!s)return null;var c={filters:"contentRating="+encodeURIComponent(s),filterLabel:s};return r()(u.a,{to:n.i(l.a)(t,i,a,c)},void 0,n.i(o.a)(s))}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(769)),l=(n(93),n(92),n(94)),u=n(935);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.provider,i=e.librarySectionKey,a=e.Genre,s=!(!a||!a.length);return r()(l.a,{},void 0,s&&r()(o.a,{server:t,provider:n,librarySectionKey:i,Genre:a}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(93),n(92),n(600)),l=n(347);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,s=e.duration,c=e.viewCount,m=e.viewOffset,v=e.isFileUnavailable,y=e.onUnavailablePress,b=!c&&!m,S=!!m,I=!!s||b||S;return r()(d.a,{},void 0,I&&r()(h.a,{},void 0,r()(l.a,{duration:s}),!!s&&(b||S)&&g,b&&n.i(o.default)("Unwatched"),S&&r()(u.a,{duration:s,viewOffset:m})),r()(p.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a}),v&&r()(f.a,{onPress:y}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(584),u=n(588),c=n(2231),d=n(101),h=n(937),p=n(433),f=n(2255),g=r()(c.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.onPress;return r()(l.a,{className:t,onPress:i},void 0,n.i(o.default)("Unavailable"))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(935),u=n(2731),c=n.n(u);i.defaultProps={className:c.a.unavailableButton},t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataKey,s=e.type,d=e.summary,P=e.grandparentThumb,T=e.art,x=e.pageWidth,E=e.pageHeight,A=e.scrollTop,k=e.posterWidth,L=e.posterTop,_=e.record;return r()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,posterType:"show",attribution:I.a,metadataKey:a,type:s,thumb:P,art:T,pageWidth:x,pageHeight:E,scrollTop:A,posterWidth:k,posterTop:L},void 0,r()(c.a,{},void 0,r()(h.a,{},void 0,r()(g.a,{},void 0,r()(o.a,{
serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),r()(p.a,{},void 0,r()(g.a,{},void 0,r()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),r()(f.a,{},void 0,r()(w.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:_}),r()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),D,r()(c.a,{},void 0,r()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(M.a,{metadataItemEntityID:i},void 0,r()(C.a,{
metadataItemEntityID:i,showFullTime:!0,showChannel:!0})),r()(y.a,{},void 0,d),r()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(S.a,{serverEntityID:t,providerEntityID:n})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(271)),l=n(272),u=n(151),c=n(134),d=n(124),h=n(153),p=n(200),f=n(201),g=n(101),m=n(346),v=n(232),y=n(152),b=n(199),S=n(173),I=n(603),w=n(931),M=n(928),C=n(930),D=r()(d.a,{});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataKey,s=e.type,d=e.summary,D=e.thumb,P=e.art,T=e.pageWidth,x=e.pageHeight,E=e.scrollTop,A=e.posterWidth,k=e.posterTop;return r()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:a,type:s,thumb:D,art:P,pageWidth:T,pageHeight:x,scrollTop:E,posterWidth:A,posterTop:k},void 0,r()(c.a,{},void 0,r()(h.a,{},void 0,r()(g.a,{},void 0,r()(o.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}))),r()(p.a,{},void 0,r()(g.a,{},void 0,r()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(f.a,{},void 0,r()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),C,r()(c.a,{},void 0,r()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,type:s}),r()(b.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}),r()(S.a,{},void 0,d),r()(I.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(w.a,{serverEntityID:t,providerEntityID:n})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(271)),l=n(272),u=n(151),c=n(134),d=n(124),h=n(153),p=n(200),f=n(201),g=n(101),m=n(936),v=n(233),y=n(232),b=n(925),S=n(152),I=n(199),w=n(173),M=n(2259),C=r()(d.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.originallyAvailableAt
;return r()(h.a,{},void 0,!!t&&n.i(u.default)("{monthName} {day}, {year}",{monthName:n.i(d.a)(l()(t).unix()),day:n.i(c.default)(t,"D"),year:n.i(c.default)(t,"YYYY")}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(37)),l=n.n(o),u=n(4),c=n(160),d=n(503),h=n(347);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(){return{originallyAvailableAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).originallyAvailableAt}})}var a=n(14),r=n(8),s=(n.n(r),
n(24)),o=n(2258);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,a=e.metadataKey,s=e.title,u=e.type,C=e.year,D=e.summary,P=e.thumb,T=e.art,x=e.pageWidth,E=e.pageHeight,A=e.scrollTop,k=e.posterWidth,L=e.posterTop,_=e.record;return r()(o.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,attribution:b.a,metadataKey:a,type:u,thumb:P,art:T,pageWidth:x,pageHeight:E,scrollTop:A,posterWidth:k,posterTop:L
},void 0,r()(l.a,{},void 0,r()(c.a,{},void 0,r()(p.a,{},void 0,s)),r()(d.a,{},void 0,r()(p.a,{},void 0,C)),r()(h.a,{},void 0,r()(S.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:_}),r()(f.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),M,r()(l.a,{},void 0,r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(I.a,{metadataItemEntityID:i},void 0,r()(w.a,{metadataItemEntityID:i,showFullTime:!0,showChannel:!0
})),r()(m.a,{},void 0,D),r()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(y.a,{serverEntityID:t,providerEntityID:n})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(151)),l=n(134),u=n(124),c=n(153),d=n(200),h=n(201),p=n(101),f=n(346),g=n(232),m=n(152),v=n(199),y=n(173),b=n(603),S=n(931),I=n(928),w=n(930),M=r()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.providerEntityID,a=e.metadataItemEntityID,s=e.extrasMetadataListEntityID,c=e.metadataKey,D=e.title,P=e.type,T=e.year,x=e.summary,E=e.thumb,A=e.art,k=e.pageWidth,L=e.pageHeight,_=e.posterWidth,N=e.posterTop,R=e.scrollTop;return r()(l.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a,metadataKey:c,type:P,thumb:E,art:A,pageWidth:k,pageHeight:L,scrollTop:R,posterWidth:_,posterTop:N
},void 0,r()(u.a,{},void 0,r()(d.a,{},void 0,r()(f.a,{},void 0,D)),r()(h.a,{},void 0,r()(f.a,{},void 0,T),r()(m.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a})),r()(p.a,{},void 0,r()(g.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a}),r()(v.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a}))),C,r()(u.a,{},void 0,r()(y.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a}),r()(b.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a
}),r()(S.a,{},void 0,x),r()(I.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a}),!!s&&r()(w.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:a,metadataListEntityID:s,title:n.i(o.default)("Extras")}),r()(M.a,{serverEntityID:t,providerEntityID:i})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(151),u=n(134),c=n(124),d=n(153),h=n(200),p=n(201),f=n(101),g=n(936),m=n(233),v=n(346),y=n(232),b=n(925),S=n(152),I=n(199),w=n(604),M=n(173),C=r()(c.a,{});t.a=i},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(27)),p=(n(71),n(87)),f=n(149),g=n(151),m=n(134),v=n(124),y=n(153),b=n(101),S=n(233),I=n(152),w=n(275),M=a()(v.a,{}),C=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onContentMeasure=function(e){var t=e.width,n=e.height;a.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},a.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},a}
return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataListEntityID,s=e.metadataKey,o=e.title,l=e.type,u=e.summary,c=e.art,d=e.listType,h=e.listStyle,v=e.pageWidth,C=e.pageHeight,D=e.scrollTop,P=this.state,T=P.isContentMeasured,x=P.contentWidth,E=P.contentHeight,A=!(!T||!r);return a()(g.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,showPoster:!1,metadataKey:s,type:l,art:c,pageWidth:v,pageHeight:C,scrollTop:D},void 0,a()(p.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,a()(m.a,{},void 0,a()(y.a,{},void 0,a()(b.a,{},void 0,o),a()(S.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),M,!!u&&a()(m.a,{},void 0,a()(I.a,{},void 0,u))),A&&a()(f.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,component:w.a,initialSize:1e3,showArtwork:!!c,viewportWidth:x,
viewportHeight:C,contentHeight:E,scrollTop:D,listType:d,listStyle:h}))},t}(d.Component);t.a=C},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(27)),p=(n(71),n(87)),f=n(343),g=n(149),m=n(151),v=n(134),y=n(124),b=n(153),S=n(200),I=n(101),w=n(233),M=n(152),C=n(199),D=n(173),P=n(275),T=a()(y.a,{}),x=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onContentMeasure=function(e){
var t=e.width,n=e.height;a.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},a.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataListEntityID,s=e.metadataKey,o=e.title,l=e.type,u=e.summary,c=e.thumb,d=e.art,h=e.listType,y=e.listStyle,x=e.isListReady,E=e.pageWidth,A=e.pageHeight,k=e.scrollTop,L=e.posterWidth,_=e.posterTop,N=this.state,R=N.isContentMeasured,O=N.contentWidth,j=N.contentHeight,z=!(!R||!r);return a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:s,type:l,thumb:c,art:d,pageWidth:E,
pageHeight:A,scrollTop:k,posterWidth:L,posterTop:_},void 0,a()(p.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,a()(v.a,{},void 0,a()(b.a,{},void 0,a()(f.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(S.a,{},void 0,a()(I.a,{},void 0,o),a()(w.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),T,!!u&&a()(v.a,{},void 0,a()(M.a,{},void 0,u))),z&&a()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,component:P.a,initialSize:20,
showArtwork:!!d,viewportWidth:O,viewportHeight:A,contentHeight:j,scrollTop:k,listType:h,listStyle:y}),x&&a()(v.a,{},void 0,a()(C.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(D.a,{serverEntityID:t,providerEntityID:n})))},t}(d.Component);t.a=x},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(27)),p=(n(71),
n(87)),f=n(149),g=n(151),m=n(134),v=n(124),y=n(153),b=n(200),S=n(201),I=n(101),w=n(346),M=n(232),C=n(152),D=n(199),P=n(173),T=n(275),x=n(603),E=n(2241),A=a()(v.a,{}),k=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onContentMeasure=function(e){var t=e.width,n=e.height;a.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},a.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},a}return c()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(h.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataListEntityID,s=e.metadataKey,o=e.title,l=e.type,u=e.year,c=e.summary,d=e.thumb,h=e.art,v=e.listType,k=e.listStyle,L=e.isListReady,_=e.pageWidth,N=e.pageHeight,R=e.scrollTop,O=e.posterWidth,j=e.posterTop,z=e.record,U=this.state,F=U.isContentMeasured,B=U.contentWidth,V=U.contentHeight,H=!(!F||!r)
;return a()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,attribution:x.a,metadataKey:s,type:l,thumb:d,art:h,pageWidth:_,pageHeight:N,scrollTop:R,posterWidth:O,posterTop:j},void 0,a()(p.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,a()(m.a,{},void 0,a()(y.a,{},void 0,a()(I.a,{},void 0,o)),a()(b.a,{},void 0,a()(I.a,{},void 0,u)),a()(S.a,{},void 0,a()(E.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:z}),a()(w.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i}))),A,a()(m.a,{},void 0,a()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(C.a,{},void 0,c))),H&&a()(f.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,component:T.a,initialSize:20,showArtwork:!!h,viewportWidth:B,viewportHeight:N,contentHeight:V,scrollTop:R,listType:v,listStyle:k}),L&&a()(m.a,{},void 0,a()(D.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(P.a,{serverEntityID:t,providerEntityID:n})))
},t}(d.Component);t.a=k},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=(n(71),n(914)),g=n(586),m=n(87),v=n(90),y=n(149),b=n(151),S=n(134),I=n(124),w=n(153),M=n(200),C=n(201),D=n(937),P=n(101),T=n(233),x=n(433),E=n(346),A=n(232),k=n(152),L=n(199),_=n(604),N=n(173),R=n(275),O=a()(v.a,{}),j=a()(I.a,{}),z=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onContentMeasure=function(e){
var t=e.width,n=e.height;a.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})},a.state={isContentMeasured:!1,contentWidth:null,contentHeight:null},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,s=e.metadataListEntityID,o=e.onDeckMetadataItemEntityID,l=e.extrasMetadataListEntityID,u=e.metadataKey,c=e.title,d=e.type,p=e.year,v=e.summary,I=e.thumb,z=e.art,U=e.listType,F=e.listStyle,B=e.isListReady,V=e.pageWidth,H=e.pageHeight,W=e.scrollTop,Y=e.posterWidth,Q=e.posterTop,G=this.state,K=G.isContentMeasured,q=G.contentWidth,X=G.contentHeight,Z=!(!K||!s);return a()(b.a,{serverEntityID:t,providerEntityID:i,
metadataItemEntityID:r,metadataKey:u,type:d,thumb:I,art:z,pageWidth:V,pageHeight:H,scrollTop:W,posterWidth:Y,posterTop:Q},void 0,a()(m.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,a()(S.a,{},void 0,a()(w.a,{},void 0,a()(P.a,{},void 0,c)),a()(M.a,{},void 0,a()(P.a,{},void 0,p),a()(T.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),a()(C.a,{},void 0,a()(P.a,{},void 0,a()(D.a,{},void 0,o?a()("span",{},void 0,n.i(h.default)("On Deck")," ",O,a()(f.a,{serverEntityID:t,
providerEntityID:i,metadataItemEntityID:o})):a()(g.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),a()(x.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r})),a()(E.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}))),j,a()(S.a,{},void 0,a()(A.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}),a()(k.a,{},void 0,v))),Z&&a()(y.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:s,component:R.a,initialSize:20,showArtwork:!!z,
viewportWidth:q,viewportHeight:H,contentHeight:X,scrollTop:W,listType:U,listStyle:F}),B&&a()(S.a,{},void 0,a()(L.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r}),!!l&&a()(_.a,{serverEntityID:t,providerEntityID:i,metadataItemEntityID:r,metadataListEntityID:l,title:n.i(h.default)("Extras")}),a()(N.a,{serverEntityID:t,providerEntityID:i})))},t}(d.Component);t.a=z},function(e,t,n){"use strict";function i(e){
var t=e.personalCloudServerProviders,i=e.isPersonalCloudServerProvidersPending,a=e.isPersonalCloudServerProvidersPopulated,s=e.personalCloudServerProvidersError;return r()(p.a,{innerClassName:g.a.innerModalBody},void 0,r()("p",{},void 0,n.i(u.default)("Choose your cloud storage provider. You can use an existing account or create a new one."),m,n.i(u.default)("You'll be able to link additional providers later in settings.")),i&&!a&&r()("div",{className:g.a.providersButtonsSpinner
},void 0,v),a&&r()("div",{className:4===t.length?g.a.providerButtonsContainerNarrow:g.a.providerButtonsContainer},void 0,t.map(function(e){var t=e.image,i=e.label,a=e.url;return r()(d.a,{className:g.a.vendorLogoButton,"aria-label":i,to:o.join([a],{origin:n.i(l.a)(window.location.href,"#!/cpms")})},i,r()(h.a,{className:g.a.vendorLogo,src:t}))})),s&&n.i(u.default)("An error occurred retrieving cloud storage providers. Please try again."))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(19)),l=n(793),u=n(4),c=n(36),d=n(51),h=n(797),p=n(75),f=n(2732),g=n.n(f),m=r()("br",{}),v=r()(c.a,{});t.a=i},function(e,t,n){"use strict";var i=n(14),a=n(730),r=n(2266);t.a=n.i(i.b)(a.a)(r.a)},function(e,t,n){"use strict";function i(e){
var t=e.isProvisionPersonalCloudServerPending,i=e.provisionPersonalCloudServerError,a=e.isConnectToPersonalCloudServerPending,s=e.connectToPersonalCloudServerError,d=e.isPersonalCloudServerDriveCachePending,g=e.isPersonalCloudServerDriveCachePopulated,m=e.personalCloudServerDriveCacheError,v=e.ownedPersonalCloudServerUrl,y=n.i(l.default)("Plex Cloud Setup");return t?r()(u.a,{title:y,description:n.i(l.default)("Creating a new Plex Cloud server just for you!")},void 0,h):i?r()(u.a,{title:y,
description:n.i(l.default)("An error occurred creating your Plex Cloud server.")},void 0,r()(c.a,{to:"#!/dashboard",kind:o.b.PRIMARY},void 0,n.i(l.default)("Continue"))):a?r()(u.a,{title:y,description:n.i(l.default)("Your Plex Cloud server is waking up.")},void 0,p):s?r()(u.a,{title:y,description:n.i(l.default)("Your Plex Cloud server is taking longer than expected to wake up. Check again later.")},void 0,r()(c.a,{to:"#!/dashboard",kind:o.b.PRIMARY
},void 0,n.i(l.default)("Continue"))):d?r()(u.a,{title:y,description:n.i(l.default)("Scanning your cloud storage. If you have lots of data, this may take a while.")},void 0,f):m?r()(u.a,{title:y,description:n.i(l.default)("Scanning your cloud storage is taking longer than expected. Check again later.")},void 0,r()(c.a,{to:"#!/dashboard",kind:o.b.PRIMARY},void 0,n.i(l.default)("Continue"))):g?r()(u.a,{title:y,
description:n.i(l.default)("Success! Plex Cloud is ready to go. This works just like a regular Plex Media Server. Pick it in the location menu of your favorite Plex app and stream away!")},void 0,r()(c.a,{to:v,kind:o.b.PRIMARY},void 0,n.i(l.default)("Continue"))):null}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(22)),l=n(4),u=n(133),c=n(51),d=n(36),h=r()(d.a,{}),p=r()(d.a,{}),f=r()(d.a,{});t.a=i},function(e,t,n){"use strict"
;var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(6),c=n.n(u),d=n(1),h=n.n(d),p=n(14),f=n(8),g=(n.n(f),n(19)),m=n(41),v=n(728),y=n(494),b=n(167),S=n(2268),I=n.i(f.createSelector)(v.a,function(e){return g.join([e,"/api/v2/cloud_server/provision"])}),w=n.i(f.createSelector)(y.a,function(e){return e?"#!/server/"+e.machineIdentifier+"/dashboard":null}),M=n.i(f.createSelector)(function(e){return e.ui.provisionPersonalCloudServerPage},I,w,function(e,t,n){return c()({},e,{
provisionPersonalCloudServerUrl:t,ownedPersonalCloudServerUrl:n})}),C={provisionPersonalCloudServer:b.b,populatePersonalCloudServerCache:b.c,connectToOwnedPersonalCloudServer:b.d},D=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillMount=function(){this._populate(this.props)},t.prototype.componentWillReceiveProps=function(e){
e.isConnectToPersonalCloudServerPopulated&&!this.props.isConnectToPersonalCloudServerPopulated&&this.props.populatePersonalCloudServerCache(),e.isProvisionPersonalCloudServerPopulated&&!this.props.isProvisionPersonalCloudServerPopulated&&this.props.connectToOwnedPersonalCloudServer()},t.prototype._populate=function(e){var t=this;n.i(m.a)(function(){e.provisionPersonalCloudServer({url:t.props.provisionPersonalCloudServerUrl})})},t.prototype.render=function(){
return h.a.createElement(S.a,this.props)},t}(d.Component);t.a=n.i(p.b)(M,C)(D)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(651),f=(n.n(p),n(1034)),g=n.n(f),m=n(46),v=n(27),y=n(22),b=n(196),S=n(2273),I=n(2272),w=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.machineIdentifier,n=e.selectedViewType;return a()(b.a,{metricsPage:m.a,metricsProperties:{pane:n},scrollDirection:y.a.NONE},void 0,a()(S.a,{machineIdentifier:t,selectedViewType:n}),h.a.createElement(I.a,this.props))},t}(d.Component);t.a=n.i(p.DragDropContext)(g.a)(w)},function(e,t,n){"use strict";function i(){return n.i(m.createSelector)(S.a,n.i(I.a)(y.a.SUBSCRIBE),function(e,t){var n=t[0];if(n){var i=e[n];return i&&i.identifier}})}function a(){
return n.i(m.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e,t){return t.selectedViewType},n.i(b.a)(),i(),w.a,function(e,t,n,i,a){var r=e.isPagePopulated,s=e.isCalendarPopulated,o=e.calendarError,l=e.isMediaSubscriptionsPopulated,u=e.mediaSubscriptionsError,c=e.calendar,d=!s&&!o,h=!l&&!u,p=d||h,f=!p&&l&&!e.mediaSubscriptions.length;return{isPagePopulated:r,machineIdentifier:n.machineIdentifier,showSpinner:p,showEmptyState:f,programGuideIdentifier:i,time:c?c.time:void 0,
selectedViewType:t||a.calendarViewType}})}var r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(6),h=n.n(d),p=n(1),f=n.n(p),g=n(14),m=n(8),v=(n.n(m),n(41)),y=n(139),b=n(54),S=n(370),I=n(726),w=n(168),M=n(79),C=n(327),D=n(2270),P=h()({saveSettings:M.a},C),T=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a._updateCalendar=function(){a.props.goToToday(),a.props.fetchCalendar(),a._resetUpdateTimeout()},a._updateTimeoutID=null,a}return c()(t,e),
t.prototype.componentWillMount=function(){this._populate(),this._resetUpdateTimeout(),this._saveViewType()},t.prototype.componentWillReceiveProps=function(e){var t=e.serverEntityID,n=e.time,i=e.selectedViewType;t!==this.props.serverEntityID&&this._populate(e),this._updateTimeoutID&&n!==this.props.time&&this._resetUpdateTimeout(),i!==this.props.selectedViewType&&this._saveViewType(e)},t.prototype.componentWillUnmount=function(){this._updateTimeoutID&&clearTimeout(this._updateTimeoutID),
this.props.clearRecordingSchedulePage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(v.a)(function(){e.initRecordingSchedulePage({serverEntityID:e.serverEntityID}),e.fetchCalendar(),e.fetchMediaSubscriptions()})},t.prototype._resetUpdateTimeout=function(){this._updateTimeoutID&&clearTimeout(this._updateTimeoutID),this._updateTimeoutID=setTimeout(this._updateCalendar,36e5)},t.prototype._saveViewType=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.saveSettings({name:"experienceSettings",settings:{calendarViewType:e.selectedViewType}})},t.prototype.render=function(){return this.props.isPagePopulated?f.a.createElement(D.a,this.props):null},t}(p.Component);t.a=n.i(g.b)(a,P)(T)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.machineIdentifier,a=e.showSpinner,s=e.showEmptyState,m=e.programGuideIdentifier,y=e.selectedViewType
;if(a)return r()(d.a,{},void 0,r()(h.a,{},void 0,r()(c.a,{label:n.i(o.default)("Loading schedule")})));if(s&&m){var b=encodeURIComponent(i),S=encodeURIComponent(m);return r()(d.a,{},void 0,r()(h.a,{icon:"plex-icon-calendar-560",title:n.i(o.default)("You have no recordings scheduled")},void 0,r()("span",{className:v.a.emptyDescription},void 0,r()(u.a,{message:n.i(o.default)("Check out the {openLink}Program Guide{closeLink} to browse available programming"),tags:[{open:"openLink",
close:"closeLink",kind:l.b.PRIMARY,to:"#!/server/"+b+"/provider/"+S,target:"_blank"}]}))))}return s&&!m?r()(d.a,{},void 0,r()(h.a,{icon:"plex-icon-calendar-560",title:n.i(o.default)("You have no recordings scheduled"),description:n.i(o.default)("You need a DVR before you can schedule recordings")})):r()("div",{className:v.a.schedulePageContent},void 0,r()(d.a,{innerClassName:v.a.schedulePageInnerContent},void 0,y===l.c.CALENDAR&&r()(f.a,{serverEntityID:t}),y===l.c.AGENDA&&r()(g.a,{
serverEntityID:t})),r()(p.a,{serverEntityID:t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(565),c=n(36),d=n(229),h=n(172),p=n(2296),f=n(2283),g=n(2276),m=n(2734),v=n.n(m);t.a=i},function(e,t,n){"use strict";function i(e){return e===m.c.AGENDA?n.i(p.default)("Agenda View"):n.i(p.default)("Calendar View")}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),
n(4)),f=n(27),g=n(63),m=n(22),v=n(80),y=n(170),b=n(171),S=n(596),I=n(197),w=n(2274),M=r()(S.a,{}),C=function(e){function t(i,a){o()(this,t);var r=u()(this,e.call(this,i,a));return r.onViewsMenuButtonPress=function(e){r.setState({isViewsMenuOpen:!r.state.isViewsMenuOpen})},r.onViewsMenuClose=function(){r.setState({isViewsMenuOpen:!1})},r.state={isViewsMenuOpen:!1},r._viewsMenuButtonID=n.i(g.a)(),r}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},
t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,a=e.selectedViewType,s=this.state.isViewsMenuOpen;return r()(y.a,{},void 0,r()(b.a,{},void 0,r()("span",{},void 0,n.i(p.default)("Recording Schedule"),M),r()(I.a,{id:this._viewsMenuButtonID,title:i(a),hasMenu:!0,isMenuOpen:s,isSelected:!0,onPress:this.onViewsMenuButtonPress}),r()(v.a,{target:this._viewsMenuButtonID,isOpen:s,onMenuClose:this.onViewsMenuClose},void 0,m.c.all.map(function(e){return r()(w.a,{machineIdentifier:t,
selectedViewType:a,viewType:e},e,i(e))}))))},t}(h.Component);t.a=C},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.machineIdentifier,i=e.selectedViewType,a=e.viewType,s=encodeURIComponent(n);return r()(o.a,{to:"#!/server/"+s+"/schedule?view="+a,isSelected:i===a},void 0,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(122));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.showError,a=e.isEmpty,s=e.subscriptionCount;return i?r()(l.a,{
title:n.i(o.default)("There was an error loading the agenda")}):a?r()(u.a,{subscriptionCount:s}):r()("div",{},void 0,h,r()(d.a,{serverEntityID:t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(273),u=n(940),c=n(2281),d=n(2279),h=r()(c.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,i=e.isCalendarPopulated,a=e.calendarError;return{showError:!i&&!!a,
isEmpty:!n.scheduled.length,subscriptionCount:t.length}})}var a=n(14),r=n(8),s=(n.n(r),n(2275));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e,t,i,a,r,s){return"episode"!==e?i:t+" - "+n.i(w.a)({seasonIndex:a,episodeIndex:r,date:s})+" - "+i}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(4),p=n(37),f=n.n(p),g=n(1),m=(n.n(g),
n(30)),v=n.n(m),y=n(84),b=n(375),S=n(314),I=n(738),w=n(162),M=n(27),C=n(25),D=n(268),P=n(339),T=n(898),x=n(270),E=n(941),A=n(429),k=n(272),L=n(938),_=n(2735),N=n.n(_),R={context:y.a},O=r()(L.a,{}),j=function(e){function t(n,i){o()(this,t);var a=u()(this,e.call(this,n,i));return a.onLinkPress=function(e){a.setState({isAiringDetailsModalOpen:!0})},a.onConflictIconPress=function(e){a.setState({isConflictsModalOpen:!0})},a.onRecordingModify=function(){a.setState({isAiringDetailsModalOpen:!1,
isSubscribeModalOpen:!0})},a.onAiringDetailsModalClose=function(){a.setState({isAiringDetailsModalOpen:!1})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})},a.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1},a}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(M.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,a=e.mediaSubscriptionEntityID,s=e.metadataItemEntityID,o=e.prePlayRoute,l=e.type,u=e.title,c=e.grandparentTitle,d=e.index,p=e.parentIndex,g=e.originallyAvailableAt,m=e.error,y=e.mediaItem,w=e.isRecording,M=e.recordingProgress,L=e.isComplete,_=e.hasError,j=e.hasSubscription,z=e.hasConflicts,U=e.showPlay,F=e.showDate,B=e.timeFormat,V=e.onPlayPress,H=this.state,W=H.isAiringDetailsModalOpen,Y=H.isSubscribeModalOpen,Q=H.isConflictsModalOpen,G=y.beginsAt,K=y.endsAt,q=y.startOffsetSeconds,X=void 0===q?0:q,Z=y.endOffsetSeconds,J=void 0===Z?0:Z,$=y.premiere,ee=f.a.unix(G),te=n.i(I.a)(G-X,K+J,{
timeFormat:B}),ne=n.i(S.a)(G),ie=ee.format("ddd, MMM D");n.i(b.a)(G)?ie=n.i(h.default)("Yesterday"):ne&&(ie=n.i(h.default)("Today"));var ae=c?c:u,re=i(l,c,u,p,d,g);return r()("div",{className:v()(N.a.event,L&&N.a.isComplete,_&&N.a.hasError)},void 0,r()(C.a,{className:N.a.underlay,to:o,onPress:o?void 0:this.onLinkPress}),r()("div",{className:N.a.overlay},void 0,r()("div",{className:v()(N.a.date,ne&&N.a.isToday)},void 0,F&&ie),r()("div",{className:N.a.time},void 0,te),r()("div",{
className:N.a.title,title:re},void 0,$&&O,ae,r()("div",{className:N.a.titleDetails},void 0,"movie"===l&&r()(A.a,{metadataItemEntityID:s}),"episode"===l&&r()(k.a,{metadataItemEntityID:s}))),r()("div",{className:N.a.status},void 0,w&&!_&&r()("div",{className:N.a.recording},void 0,r()(D.a,{size:24,backgroundClassName:N.a.recordingProgressBackground,lineWidth:2,progress:M,showProgressText:!1}),r()("span",{className:N.a.recordingIcon})),U&&r()(P.a,{title:u,onPress:V}),_&&r()(E.a,{error:m,
onPress:z?this.onConflictIconPress:this.onLinkPress}))),r()(T.a,{isOpen:W,metricsProperties:R,serverEntityID:t,metadataItemEntityID:s,error:m,mediaItem:y,hasSubscription:j,isComplete:L,hasError:_,isRecording:w,recordingProgress:M,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}),j&&r()(x.a,{isOpen:Y||Q,metricsProperties:R,serverEntityID:t,mediaSubscriptionEntityID:a,metadataItemEntityID:s,subscriptionType:l,showConflicts:Q,isRecordingSchedule:!0,
onModalClose:this.onSubscribeModalClose}))},t}(g.Component);t.a=j},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.events;return r()("div",{},void 0,n.map(function(e,i){var a=o.a.unix(e.beginsAt),s=0===i||!o.a.unix(n[i-1].beginsAt).isSame(a,"day");return r()(u.a,{component:c.a,serverEntityID:t,metadataItemEntityID:e.metadataItem,mediaSubscriptionID:e.mediaSubscriptionID,eventID:e.metadataItem.key,status:e.status,error:e.error,linkedKey:e.linkedKey,mediaItem:e.mediaItem,
hasConflicts:!(!e.conflicts||!e.conflicts.length),showDate:s},i)}))}var a=n(3),r=n.n(a),s=n(37),o=n.n(s),l=n(1),u=(n.n(l),n(939)),c=n(2277);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e){return{events:e.scheduled}})}var a=n(14),r=n(8),s=(n.n(r),n(2278));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){return r()("div",{className:c.a.agendaHeader},void 0,o.a.createElement(l.a,e))}
var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(942),u=n(2736),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.calendar,n=t.firstEvent,i=t.lastEvent;return{startTime:n?n.beginsAt:void 0,endTime:i?i.beginsAt:void 0}})}var a=n(14),r=n(8),s=(n.n(r),n(2280));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(4)),p=n(87),f=n(273),g=n(2294),m=n(2289),v=n(2287),y=n(940),b=n(2737),S=n.n(b),I=a()(m.a,{}),w=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMeasure=function(e){var t=e.width,n=a.state.visibleDays,i=Math.min(Math.floor(t/120),7);i!==n&&a.props.onVisibleDaysChange(i),a.setState({isMeasured:!0,width:t,visibleDays:i})},a.state={isMeasured:!1,width:null,visibleDays:0},a}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.showError,r=e.isEmpty,s=e.subscriptionCount,o=e.visibleDays,l=e.onGoToPreviousRangePress,u=e.onGoToNextRangePress;return i?a()(f.a,{title:n.i(h.default)("There was an error loading the calendar")}):r?a()(y.a,{subscriptionCount:s}):a()(p.a,{className:S.a.calendar,ignoreHeight:!0,onMeasure:this.onMeasure},void 0,o===this.state.visibleDays&&a()("div",{},void 0,a()(g.a,{onGoToPreviousRangePress:l,onGoToNextRangePress:u}),I,a()(v.a,{serverEntityID:t})))},t
}(d.Component);t.a=w},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,i=e.isCalendarPopulated,a=e.calendarError;return{showError:!i&&!!a,isEmpty:!n.scheduled.length,subscriptionCount:t.length,visibleDays:n.visibleDays}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(41)),v=n(327),y=n(2282),b=function(e){
function t(){var i,a,r;o()(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=a=u()(this,e.call.apply(e,[this].concat(l))),a.onVisibleDaysChange=function(e){n.i(m.a)(function(){a.props.setVisibleDays({visibleDays:e})})},a.onGoToPreviousRangePress=function(){a.props.goToPreviousRange()},a.onGoToNextRangePress=function(){a.props.goToNextRange()},r=i,u()(a,r)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(y.a,r()({
onVisibleDaysChange:this.onVisibleDaysChange,onGoToPreviousRangePress:this.onGoToPreviousRangePress,onGoToNextRangePress:this.onGoToNextRangePress},this.props))},t}(h.Component);t.a=n.i(f.b)(i,v)(b)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.date;return r()("div",{className:u.a.day},void 0,r()(o.a,{serverEntityID:t,date:n}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2292)),l=n(2738),u=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.date,i=l.a.unix(t),a=n.i(f.a)(t),o=void 0;return o=n.i(p.a)(t)?n.i(s.default)("Yesterday"):a?n.i(s.default)("Today"):n.i(s.default)("{dayOfWeek} {monthNumber}/{dayNumber}",{dayOfWeek:n.i(h.a)(t,{abbreviate:!0}),monthNumber:i.month()+1,dayNumber:i.date()}),r()("div",{className:d()(m.a.dayOfWeek,a&&m.a.isToday),title:o},void 0,o)}var a=n(3),r=n.n(a),s=n(4),o=n(37),l=n.n(o),u=n(1),c=(n.n(u),n(30)),d=n.n(c),h=n(737),p=n(375),f=n(314),g=n(2739),m=n.n(g);t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.days,n=u()(e,["days"]);return o()("div",{className:f.a.calendarDays},void 0,t.map(function(e){return d.a.createElement(h.a,r()({key:e,date:e},n))}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(2284),p=n(2740),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){return{days:e.calendar.days}})}var a=n(14),r=n(8),s=(n.n(r),n(2286));t.a=n.i(a.b)(i)(s.a)
},function(e,t,n){"use strict";function i(e){var t=e.daysOfWeek,n=u()(e,["daysOfWeek"]);return o()("div",{className:f.a.container},void 0,t.map(function(e){return d.a.createElement(h.a,r()({key:e,date:e},n))}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(2285),p=n(2741),f=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e){return{daysOfWeek:e.daysOfWeek}})}
var a=n(14),r=n(8),s=(n.n(r),n(2288));t.a=n.i(a.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(84),g=n(738),m=n(27),v=n(25),y=n(268),b=n(339),S=n(898),I=n(270),w=n(938),M=n(941),C=n(2743),D=n.n(C),P={context:f.b},T=a()("div",{},void 0,a()(w.a,{})),x=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onLinkPress=function(e){a.setState({isAiringDetailsModalOpen:!0})},
a.onConflictIconPress=function(e){a.setState({isConflictsModalOpen:!0})},a.onRecordingModify=function(){a.setState({isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!0})},a.onAiringDetailsModalClose=function(){a.setState({isAiringDetailsModalOpen:!1})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})},a.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1},a}return c()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,i=e.mediaSubscriptionEntityID,r=e.metadataItemEntityID,s=e.prePlayRoute,o=e.type,l=e.grandparentTitle,u=e.title,c=e.error,d=e.mediaItem,h=e.isRecording,f=e.recordingProgress,m=e.isComplete,w=e.hasError,C=e.hasSubscription,x=e.hasConflicts,E=e.showPlay,A=e.timeFormat,k=e.onPlayPress,L=this.state,_=L.isAiringDetailsModalOpen,N=L.isSubscribeModalOpen,R=L.isConflictsModalOpen,O=d.beginsAt,j=d.endsAt,z=d.startOffsetSeconds,U=void 0===z?0:z,F=d.endOffsetSeconds,B=void 0===F?0:F,V=d.premiere,H=n.i(g.a)(O-U,j+B,{
includeMinuteZero:!1,timeFormat:A}),W=l?l:u;return a()("div",{className:p()(D.a.event,m&&D.a.isComplete,w&&D.a.hasError)},void 0,a()(v.a,{className:D.a.underlay,to:s,onPress:s?void 0:this.onLinkPress}),a()("div",{className:D.a.overlay},void 0,a()("div",{className:D.a.title,title:W},void 0,W),a()("div",{className:D.a.secondary},void 0,a()("div",{className:D.a.secondaryInfo},void 0,a()("div",{className:D.a.time},void 0,H),V&&T),a()("div",{className:D.a.status},void 0,h&&!w&&a()("div",{
className:D.a.recording},void 0,a()(y.a,{size:24,backgroundClassName:D.a.recordingProgressBackground,lineWidth:2,progress:f,showProgressText:!1}),a()("span",{className:D.a.recordingIcon})),E&&a()(b.a,{title:u,onPress:k}),w&&a()(M.a,{error:c,onPress:x?this.onConflictIconPress:this.onLinkPress})))),a()(S.a,{isOpen:_,metricsProperties:P,serverEntityID:t,metadataItemEntityID:r,error:c,mediaItem:d,hasSubscription:C,isComplete:m,hasError:w,isRecording:h,recordingProgress:f,
onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}),C&&a()(I.a,{isOpen:N||R,metricsProperties:P,serverEntityID:t,mediaSubscriptionEntityID:i,metadataItemEntityID:r,subscriptionType:o,showConflicts:R,isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}))},t}(d.Component);t.a=x},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.events;return r()("div",{},void 0,n.map(function(e,n){return r()(o.a,{component:l.a,serverEntityID:t,
metadataItemEntityID:e.metadataItem,mediaSubscriptionID:e.mediaSubscriptionID,eventID:e.metadataItem.key,status:e.status,error:e.error,linkedKey:e.linkedKey,mediaItem:e.mediaItem,hasConflicts:!(!e.conflicts||!e.conflicts.length)},n)}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(939)),l=n(2290);t.a=i},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e,t){return t.date},function(e,t){var n=h.a.unix(t);return{
events:s.a.filter(e.scheduled,function(e){return h.a.unix(e.beginsAt).isSame(n,"day")})}})}function a(e){return l.a.createElement(p.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),u=n(14),c=n(8),d=(n.n(c),n(37)),h=n.n(d),p=n(2291);t.a=n.i(u.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.hasPastEvents,i=e.hasFutureEvents,a=e.onGoToPreviousRangePress,s=e.onGoToNextRangePress;return r()("div",{className:m.a.calendarHeader},void 0,r()("div",{className:m.a.calendarHeader},void 0,r()(p.a,{
className:u()(m.a.calendarNav,!t&&m.a.calendarNavDisabled),kind:d.b.DEFAULT,size:d.d.MEDIUM,isDisabled:!t,onPress:a},void 0,r()(h.a,{name:"plex-icon-hub-prev-560","aria-label":n.i(c.default)("Previous Page")})),o.a.createElement(f.a,e),r()(p.a,{className:u()(m.a.calendarNav,!i&&m.a.calendarNavDisabled),kind:d.b.DEFAULT,size:d.d.MEDIUM,isDisabled:!i,onPress:s},void 0,r()(h.a,{name:"plex-icon-hub-next-560","aria-label":n.i(c.default)("Next Page")}))))}
var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(30),u=n.n(l),c=n(4),d=n(22),h=n(29),p=n(25),f=n(942),g=n(2744),m=n.n(g);t.a=i},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=l.a.pick(e.calendar,"time","startTime","endTime","hasPastEvents","hasFutureEvents");return s()({},t)})}function a(e){return c.a.createElement(p.a,e)}var r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(1),c=n.n(u),d=n(14),h=n(8),p=(n.n(h),n(2293))
;t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.mediaSubscriptionEntityIDs,a=e.showError,s=e.moveIndex,d=e.onSubscriptionDragMove,p=e.onSubscriptionDragEnd;return r()("div",{className:h.a.pane},void 0,r()("div",{className:h.a.paneHeader},void 0,n.i(o.default)("Recording Priority")),r()(l.a,{className:h.a.paneScroller,autoScroll:!0},void 0,a?r()("div",{className:h.a.error
},void 0,r()("div",{},void 0,n.i(o.default)("There was an error loading recordings.")),r()("div",{},void 0,n.i(o.default)("Please try again."))):i.map(function(e,n){var i=null!=s,a=i&&s===n,o=i&&s===n+1;return r()(u.a,{serverEntityID:t,mediaSubscriptionEntityID:e,isDraggingBefore:a,isDraggingAfter:o,sortIndex:n,onSubscriptionDragMove:d,onSubscriptionDragEnd:p},e)})),r()(c.a,{serverEntityID:t}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(74),u=n(2299),c=n(2298),d=n(2746),h=n.n(d);t.a=i
},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.isMediaSubscriptionsPopulated,i=e.mediaSubscriptionsError;return{mediaSubscriptionEntityIDs:t,showError:!n&&!!i}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(41)),v=n(327),y=n(2295),b=function(e){function t(i,a){o()(this,t);var s=u()(this,e.call(this,i,a))
;return s.onSubscriptionDragMove=function(e){s.setState({moveIndex:e})},s.onSubscriptionDragEnd=function(e,t){var i=s.state.moveIndex;t&&null!=i&&n.i(m.a)(function(){s.props.moveMediaSubscription(r()({},e,{moveIndex:i}))}),s.setState({moveIndex:null})},s.state={moveIndex:null},s}return d()(t,e),t.prototype.render=function(){return p.a.createElement(y.a,r()({moveIndex:this.state.moveIndex,onSubscriptionDragMove:this.onSubscriptionDragMove,onSubscriptionDragEnd:this.onSubscriptionDragEnd
},this.props))},t}(h.Component);t.a=n.i(f.b)(i,{moveMediaSubscription:v.moveMediaSubscription})(b)},function(e,t,n){"use strict";function i(e){var t=void 0;switch(e){case"movie":t=[C.a,P.a];break;case"show":t=[C.a,A.a];break;case"episode":t=[D.a,T.a];break;case"playlist":t=[C.a,A.a];break;default:t=[C.a]}return t.push(k.a),t}
var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(9),d=n.n(c),h=n(11),p=n.n(h),f=n(10),g=n.n(f),m=n(1),v=n.n(m),y=n(27),b=n(203),S=n(29),I=n(25),w=n(419),M=n(425),C=n(427),D=n(580),P=n(916),T=n(587),x=n(270),E=n(2302),A=n(2301),k=n(2300),L=n(2747),_=n.n(L),N=function(e){function t(n,i){d()(this,t);var a=p()(this,e.call(this,n,i));return a.onLinkPress=function(e){a.setState({isSubscribeModalOpen:!0})},a.onSubscribeModalClose=function(){a.setState({isSubscribeModalOpen:!1})},a.state={
isSubscribeModalOpen:!1},a}return g()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,a=e.mediaSubscriptionEntityID,s=e.type,l=e.thumb,c=e.grandparentThumb,d=e.connectDragSource,h=u()(e,["serverEntityID","mediaSubscriptionEntityID","type","thumb","grandparentThumb","connectDragSource"]),p=this.state.isSubscribeModalOpen,f="playlist"===s?"show":s;return o()("div",{className:_.a.subscription
},void 0,o()(I.a,{className:_.a.link,onPress:this.onLinkPress},void 0,o()("div",{className:_.a.linkContainer},void 0,o()(w.a,{className:_.a.posterContainer,serverEntityID:t,component:M.a,type:f,width:48,height:n.i(b.a)(48,f),url:c||l}),o()("div",{className:_.a.titleContainer},void 0,i(s).map(function(e,t){return v.a.createElement(E.a,r()({key:t,component:e,isSecondary:t>0,type:s},h))})))),d(o()("div",{className:_.a.dragHandle},void 0,o()(S.a,{className:_.a.dragIcon,name:"plex-icon-reorder-560"
})),{dropEffect:"copy"}),o()(x.a,{isOpen:p,serverEntityID:t,mediaSubscriptionEntityID:a,subscriptionType:s,onModalClose:this.onSubscribeModalClose}))},t}(m.Component);N.defaultProps={connectDragSource:function(e){return e}},t.a=N},function(e,t,n){"use strict";function i(e){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset()}}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),n(651)),f=(n.n(p),
n(27)),g=n(76),m=n.n(g),v=n(956),y=n(1974),b=n(943),S=n(2748),I=n.n(S),w=parseInt(m.a.recordingPriorityPaneWidth,10),M=parseInt(m.a.recordingPriorityDragHandleWidth,10),C=function(e){function t(){return o()(this,t),u()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.item,i=e.itemType,a=e.currentOffset;if(!a||i!==v.a)return null
;var s=a.x,o=a.y,l=w-M,u="translate3d("+(s-l)+"px, "+o+"px, 0)",c={position:"absolute",WebkitTransform:u,msTransform:u,transform:u};return r()(y.a,{},void 0,r()("div",{className:I.a.dragPreview,style:c},void 0,r()(b.a,{serverEntityID:t,mediaSubscriptionEntityID:n.mediaSubscriptionEntityID})))},t}(h.Component);t.a=n.i(p.DragLayer)(i)(C)},function(e,t,n){"use strict";function i(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}
function a(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}var r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=(n.n(p),n(48)),g=(n.n(f),n(651)),m=(n.n(g),n(1034)),v=(n.n(m),n(30)),y=n.n(v),b=n(27),S=n(956),I=n(965),w=n(943),M=n(2749),C=n.n(M),D={beginDrag:function(e){return{mediaSubscriptionEntityID:e.mediaSubscriptionEntityID}},endDrag:function(e,t,n){e.onSubscriptionDragEnd(t.getItem(),t.didDrop())}},P={hover:function(e,t,i){
var a=n.i(f.findDOMNode)(i).getBoundingClientRect(),r=(a.bottom-a.top)/2,s=t.getClientOffset(),o=s.y-a.top,l=e.sortIndex,u=o>r?l+1:l;e.onSubscriptionDragMove(u)}},T=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.connectDragPreview(n.i(m.getEmptyImage)())},t.prototype.shouldComponentUpdate=function(e,t){return n.i(b.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.mediaSubscriptionEntityID,i=e.isDragging,a=e.isDraggingBefore,r=e.isDraggingAfter,o=e.isOver,l=e.connectDropTarget,u=e.connectDragSource;return l(s()("div",{className:y()(C.a.dragSource,i&&I.d,a&&o&&I.e,r&&o&&I.f)},void 0,s()(w.a,{serverEntityID:t,mediaSubscriptionEntityID:n,connectDragSource:u})))},t}(p.Component);t.a=n.i(g.DropTarget)(S.a,P,a)(n.i(g.DragSource)(S.a,D,i)(T))},function(e,t,n){"use strict";function i(e,t,i){
return e?n.i(c.a)(e,t)?n.i(l.default)("Airing now"):n.i(u.a)(e,null,{timeFormat:i}):n.i(l.default)("No upcoming airings")}function a(e){var t=e.className,n=e.beginsAt,a=e.endsAt,r=e.timeFormat,o=i(n,a,r);return s()("span",{className:t},void 0,o)}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(4)),u=n(736),c=n(504);t.a=a},function(e,t,n){"use strict";function i(e){if("show"===e)return n.i(l.default)("Series")}function a(e){var t=e.className,n=e.type;return s()("span",{className:t},void 0,s()(u.a,{
className:d.a.seriesIcon,name:"plex-icon-dvr-series-560"}),i(n))}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(4)),u=n(29),c=n(2750),d=n.n(c);t.a=a},function(e,t,n){"use strict";function i(e){var t=e.component,n=e.isSecondary,i=o()(e,["component","isSecondary"]);return u.a.createElement(t,r()({className:n?d.a.secondaryTitle:d.a.title},i))}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(2751),d=n.n(c);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityIDs,n=e.query,i=e.isSearchPending,a=e.searchAllServers,s=e.onSearchAllChange;return r()(u.a,{metricsPage:o.A,metricsProperties:{singleServer:!a},allowBackgroundLightPreset:!0,scrollDirection:l.a.NONE},void 0,r()(c.a,{isSearchPending:i,query:n,searchAllServers:a,onSearchAllChange:s}),r()(d.a,{serverEntityIDs:t,query:n}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(46)),l=n(22),u=n(196),c=n(2307),d=n(2306);t.a=i},function(e,t,n){"use strict";function i(){
return n.i(b.createSelector)(function(e){return e.servers},function(e,t){return t.serverEntityID},w.a,M.a,function(e,t,n,i){var a=i.searchAllServers;return e.reduce(function(e,i){if(i!==t&&!a)return e;var r=n[i];return v.a.isMatch(r,{isConnected:!0,isFullServer:!0})?e.concat(i):e},[])})}function a(){return n.i(I.a)(i(),function(e){return e})}function r(){return n.i(b.createSelector)(function(e){return e.ui.searchPage},a(),M.a,function(e,t,n){return{serverEntityIDs:t,
searchAllServers:n.searchAllServers,isSearchPending:!!v.a.findWhere(e.searches,{isSearchPending:!0})}})}var s=n(6),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(2),v=n.n(m),y=n(14),b=n(8),S=(n.n(b),n(41)),I=n(181),w=n(246),M=n(168),C=n(833),D=n(79),P=n(2303),T={populateSearchProviders:C.a,clearSearchPage:C.b,saveSettings:D.a},x=function(e){function t(){var i,a,r;u()(this,t);for(var s=arguments.length,o=Array(s),l=0;l<s;l++)o[l]=arguments[l]
;return i=a=d()(this,e.call.apply(e,[this].concat(o))),a.onSearchAllChange=function(e){n.i(S.a)(function(){a.props.saveSettings({name:"experienceSettings",settings:{searchAllServers:e}})})},r=i,d()(a,r)}return p()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){e.serverEntityIDs!==this.props.serverEntityIDs&&this._populate(e)},t.prototype.componentWillUnmount=function(){this.props.clearSearchPage()},
t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;n.i(S.a)(function(){e.populateSearchProviders(e.serverEntityIDs)})},t.prototype.render=function(){return g.a.createElement(P.a,o()({},this.props,{onSearchAllChange:this.onSearchAllChange}))},t}(f.Component);t.a=n.i(y.b)(r,T)(x)},function(e,t,n){"use strict";function i(e){var t=e.isSearchCapable,i=e.providers,a=e.searchAllServers,s=e.columnAdjustment;return t?o()(h.a,{
innerClassName:g.a.searchPageContent},void 0,i.map(function(e){return u.a.createElement(d.a,r()({key:e.providerEntityID,columnAdjustment:s,searchAllServers:a},e))})):o()(p.a,{title:n.i(c.default)("This server does not support search"),description:n.i(c.default)("Browse libraries using the sidebar")})}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(2308),h=n(229),p=n(150),f=n(2752),g=n.n(f);t.a=i},function(e,t,n){"use strict";function i(){return n.i(S.createSelector)(function(e,t){
return t.serverEntityIDs},M.a,C.a,function(e,t,n){return e.reduce(function(e,i){return t[i].desktop.providers.forEach(function(t){var a=n[t];e[t]={serverEntityID:i,identifier:a.identifier,title:a.title}}),e},{})})}function a(){return n.i(w.a)(i(),function(e){return e})}function r(){return n.i(S.createSelector)(function(e){return e.ui.searchPage.searches},a(),function(e,t){var n=e.reduce(function(e,n){var i=n.providerEntityID,a=t[i];if(!a)return e;var r=e[a.identifier]
;return r||(r=e[a.identifier]={providerEntityID:i,title:a.title,isSearchPending:!1,isSearchPopulated:!1,hubs:{}}),n.isSearchPending&&(r.isSearchPending=!0),n.isSearchPopulated&&(r.isSearchPopulated=!0),n.hubs.forEach(function(e){var t=e.results.map(function(e){return{serverEntityID:a.serverEntityID,providerEntityID:i,searchResultEntityID:e}}),n=r.hubs[e.hubIdentifier];n?(n.size+=e.size,n.results=n.results.concat(t)):r.hubs[e.hubIdentifier]={hubIdentifier:e.hubIdentifier,size:e.size,type:e.type,
title:e.title,results:[].concat(t)}}),e},{});return m.a.map(n,function(e){return{providerEntityID:e.providerEntityID,title:e.title,isSearchPending:e.isSearchPending,isSearchPopulated:e.isSearchPopulated,hubs:m.a.values(e.hubs)}})})}function s(){return n.i(S.createSelector)(a(),r(),D.a,function(e,t,n){return{availableProviders:e,isSearchCapable:!!f()(e).length,searchAllServers:n.searchAllServers,columnAdjustment:n.columnAdjustment,providers:t}})}
var o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(70),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(14),S=n(8),I=(n.n(S),n(41)),w=n(721),M=n(246),C=n(370),D=n(168),P=n(833),T=n(2305),x={fetchSearchPage:P.c,clearSearchPage:P.b},E=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentWillMount=function(){var e=this;n.i(I.a)(function(){e._clear(),e._populate()})},t.prototype.componentWillReceiveProps=function(e){
var t=this,i=e.query!==this.props.query,a=e.availableProviders!==this.props.availableProviders;(i||a)&&n.i(I.a)(function(){i&&t._clear(e),t._populate(e)})},t.prototype._clear=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props).clearSearchPage()},t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.fetchSearchPage({availableProviders:e.availableProviders,query:e.query,limit:30})},t.prototype.render=function(){
return y.a.createElement(T.a,this.props)},t}(v.Component);t.a=n.i(b.b)(s,x)(E)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(27),f=n(63),g=n(22),m=n(36),v=n(228),y=n(170),b=n(171),S=n(920),I=n(198),w=n(197),M=n(596),C=n(2309),D=n(2753),P=n.n(D),T=a()(M.a,{}),x=a()(I.a,{},void 0,a()(v.a,{})),E=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onSearchMenuButtonPress=function(e){
r.setState({isSearchMenuOpen:!r.state.isSearchMenuOpen})},r.onSearchMenuClose=function(){r.setState({isSearchMenuOpen:!1})},r.state={isSearchMenuOpen:!1},r._searchMenuButtonID=n.i(f.a)(),r}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.isSearchPending,i=e.query,r=e.searchAllServers,s=e.onSearchAllChange,o=this.state.isSearchMenuOpen
;return a()(y.a,{},void 0,a()(b.a,{},void 0,n.i(h.default)("Search"),T,a()(w.a,{id:this._searchMenuButtonID,title:r?n.i(h.default)("All Servers"):n.i(h.default)("This Server"),hasMenu:!0,isMenuOpen:o,isSelected:!0,onPress:this.onSearchMenuButtonPress}),a()(C.a,{target:this._searchMenuButtonID,isOpen:o,isSearchAll:r,onMenuClose:this.onSearchMenuClose,onSearchAllChange:s})),a()(S.a,{},void 0,a()("span",{},void 0,t?n.i(h.default)('Searching for "{query}"',{query:i
}):n.i(h.default)('Results for "{query}"',{query:i})),t&&a()(m.a,{className:P.a.spinner,size:g.d.SMALL})),x)},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(e){return function(t){return c.a.createElement(b.a,l()({component:S.a},e,t))}}function a(e){var t=e.title,a=e.hubs,r=e.columnAdjustment,o=e.searchAllServers,u=e.isSearchPending,b=e.isSearchPopulated;return s()("div",{},void 0,s()("div",{role:"heading","aria-level":"2",className:w.a.providerTitle},void 0,t,u&&s()(m.a,{
className:w.a.spinner,size:h.SMALL})),!a.length&&b?s()(y.a,{title:n.i(d.default)("No Results"),description:n.i(d.default)("Try a different query")}):a.map(function(e){var t=e.type,a=p.d,s=n.i(f.a)(t,a,{isSearch:!0,isSearchAll:o});return c.a.createElement(v.a,l()({},e,{key:e.hubIdentifier,listType:t,listContext:a,keyPropName:"searchResultEntityID",size:e.results.length,items:e.results,itemsOffset:0,layout:n.i(g.a)(t,a,r,s.length),cellRenderer:i({listType:t,listContext:a,titleComponents:s})}))}))}
var r=n(3),s=n.n(r),o=n(6),l=n.n(o),u=n(1),c=n.n(u),d=n(4),h=n(99),p=n(35),f=n(276),g=n(609),m=n(36),v=n(573),y=n(133),b=n(946),S=n(2351),I=n(2754),w=n.n(I);t.a=a},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(80),v=n(122),y=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),
i.onThisServerPress=function(){i.props.onSearchAllChange(!1)},i.onAllServersPress=function(){i.props.onSearchAllChange(!0)},a=n,c()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.isSearchAll,i=s()(e,["isSearchAll"]);return f.a.createElement(m.a,i,a()(v.a,{isSelected:!t,onPress:this.onThisServerPress},void 0,n.i(g.default)("This Server")),a()(v.a,{isSelected:t,onPress:this.onAllServersPress},void 0,n.i(g.default)("All Servers")))},t}(p.Component);t.a=y},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(46),f=n(156),g=n(87),m=n(22),v=n(71),y=n(25),b=n(36),S=n(196),I=n(133),w=n(150),M=n(274),C=n(348),D=n(2314),P=n(2312),T=n(2762),x=n.n(T),E=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMeasure=function(e){var t=e.width,n=e.height;a.setState({isMeasured:!0,width:t,height:n})},a.onMomentScrollIndexChange=function(e){a.setState({
currentMomentTitle:a.props.moments[e].title})},a.state={isMeasured:!1,currentMomentTitle:"",width:0,height:0},a}return c()(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.librarySectionID,n=e.providerIdentifier,i=e.onLibraryChange;t&&i(n,t)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.librarySectionID,i=t.providerIdentifier,a=t.onLibraryChange;n&&n!==e.librarySectionID&&a(i,n)},t.prototype.componentWillUnmount=function(){
this.props.onLibraryChange(null,null)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.providerIdentifier,s=e.selectedDirectory,o=e.libraryDirectories,l=e.metadataTypes,u=e.metadataListEntityID,c=e.isMomentListPending,d=e.isMomentListPopulated,T=e.momentListError,E=e.moments,A=e.libraryRoute,k=e.activeSelectionType,L=e.columnAdjustment,_=this.state,N=_.isMeasured,R=_.width,O=_.height,j=_.currentMomentTitle,z=200-100*L,U=12+L,F=Math.min(Math.ceil(R/z),U)
;return d?a()(S.a,{metricsPage:p.y,metricsProperties:{provider:r,mode:"timeline",type:"photo",style:v.a},allowBackgroundLightPreset:!0,scrollDirection:m.a.NONE},void 0,k?a()(C.a,{serverEntityID:t,providerEntityID:i}):a()(D.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:u,metadataTypes:l,libraryRoute:A,libraryDirectories:o,title:j,selectedDirectory:s}),a()(g.a,{className:x.a.measured,ignorePosition:!0,onMeasure:this.onMeasure},void 0,N&&a()(P.a,{serverEntityID:t,providerEntityID:i,
metadataListEntityID:u,moments:E,columns:F,height:O,onMomentScrollIndexChange:this.onMomentScrollIndexChange}))):c?a()(I.a,{},void 0,a()(b.a,{label:n.i(h.default)("Loading library")})):T?a()(M.a,{title:n.i(h.default)("There was an unexpected error loading this library")}):a()(w.a,{title:n.i(h.default)("There was an error loading the timeline for this library"),description:n.i(h.default)("The photos timeline requires Plex Media Server {version} or higher",{version:f.a.itemClusters})
},void 0,a()(y.a,{to:A,kind:m.b.PRIMARY},void 0,n.i(h.default)("Browse by Type")))},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(){return n.i(l.createSelector)(function(e){return e.ui.timelinePage},I,u.a,n.i(c.a)(),n.i(d.a)(),n.i(h.a)(),p.a,n.i(g.a)(),f.a,function(e,t,i,a,r,s,o,l,u){var c=e.details,d=e.containerKey,h=e.isMomentListPending,p=e.isMomentListPopulated,f=e.momentListError,g=n.i(y.a)(i,a,r,{save:1});return{libraryKey:r,metadataListEntityID:e.metadataList,
providerIdentifier:a.identifier,librarySectionID:c&&c.librarySectionID,libraryDirectories:c&&c.directories,libraryRoute:g,metadataTypes:c?c.types:[],moments:t,isMomentListPending:h,isMomentListPopulated:p,momentListError:f,containerKey:d,momentKey:s,activeSelectionType:o.activeSelectionType,disableReloadThreshold:!!o.activeSelectionType,isLibraryRefreshing:l,columnAdjustment:u.columnAdjustment}})}function a(e,t){return{onLibraryChange:function(i,a){e(n.i(m.changeQuickSearchSettings)({
serverEntityID:t.serverEntityID,providerIdentifier:i,sectionID:a}))}}}function r(e){var t=e.ui.timelinePage;return{serverEntityID:t.serverEntityID,momentKey:t.momentKey}}function s(e,t){e(v.a({serverEntityID:t.serverEntityID,libraryKey:t.libraryKey,momentKey:t.momentKey})),e(v.b())}var o=n(14),l=n(8),u=(n.n(l),n(47)),c=n(127),d=n(208),h=n(1275),p=n(109),f=n(168),g=n(547),m=n(131),v=n(1692),y=n(94),b=n(216),S=n(2310),I=n.i(l.createSelector)(function(e){return e.ui.timelinePage.momentList
},function(e){if(!e)return[];var t=0;return e.moments.map(function(e){var n=t;t+=e.size;var i=e.id,a=e.title,r=e.size,s=e.avgAR,o=e.startsAt,l=e.size*(e.avgAR||1);return{start:n,end:t,area:l,id:i,title:a,size:r,avgAR:s,startsAt:o}})}),w=n.i(b.a)(S.a,r,s),M=n.i(o.b)(i,a)(w);t.a=M},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(2),h=n.n(d),p=n(1),f=(n.n(p),
n(4)),g=n(76),m=n.n(g),v=n(172),y=n(229),b=n(1981),S=n(2403),I=n(2048),w=n(2045),M=n(2763),C=n.n(M),D=Math.max(0,parseInt(m.a.timelineGutter,10)-40),P=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onListUpdate=function(e){var t=e.landmarks,i=e.listStyle&&e.listStyle.height;if(t!==r._landmarks){r._landmarks=t;var a=h.a.pluck(r.props.moments,"startsAt"),s=n.i(S.a)(t,a);r.setState({ticks:s,listHeight:i})}},r.state={ticks:null,listHeight:null},r}return c()(t,e),
t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,s=e.moments,o=e.columns,l=e.height,u=e.onMomentScrollIndexChange,c=this.state,d=c.ticks,h=c.listHeight,p=1/l,g=h&&h>l;return s.length?a()("div",{className:C.a.container},void 0,a()(I.a,{className:C.a.stack,scrollerClassName:C.a.scroller,serverEntityID:t,providerEntityID:i,metadataListEntityID:r,scrollPositionStorageKey:"TimelinePageContent",keyPropName:"id",items:s,size:s.length,
columns:o,footerHeight:59,listPadding:55,listGutter:D,hasNestedList:!0,cellComponent:w.a,onListScrollIndexChange:u,onListUpdate:this.onListUpdate}),a()("div",{className:C.a.adornment},void 0,d&&g&&a()(b.a,{pixelProportion:p,ticks:d}))):a()(y.a,{},void 0,a()(v.a,{title:n.i(f.default)("Nothing to see here"),description:n.i(f.default)("There are no events in this library")}))},t}(p.Component);t.a=P},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(63),f=(n(71),n(590)),g=n(576),m=n(228),v=n(170),y=n(171),b=n(198),S=n(430),I=n(197),w=n(598),M=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onTypesMenuButtonPress=function(e){r.setState({isTypesMenuOpen:!r.state.isTypesMenuOpen})},r.onTypesMenuClose=function(){r.setState({isTypesMenuOpen:!1})},r.state={isTypesMenuOpen:!1},r._typesMenuButtonID=n.i(p.a)(),r}
return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.providerEntityID,r=e.metadataListEntityID,s=e.listType,o=e.listStyle,l=e.title,u=e.totalSize,c=e.libraryRoute,d=e.metadataTypes,p=e.metadataPseudoTypes,M=e.selectedType,C=e.allListStyles,D=this.state.isTypesMenuOpen;return a()(v.a,{},void 0,a()(y.a,{},void 0,a()(I.a,{id:this._typesMenuButtonID,title:n.i(h.default)("Timeline"),hasMenu:!0,isMenuOpen:D,onPress:this.onTypesMenuButtonPress}),a()(w.a,{
target:this._typesMenuButtonID,isOpen:D,libraryRoute:c,types:d,pseudoTypes:p,selectedType:M,activeFilters:[],onMenuClose:this.onTypesMenuClose}),a()(I.a,{title:l}),a()(S.a,{},void 0,u)),a()(b.a,{},void 0,a()(f.a,{serverEntityID:t,providerEntityID:i,metadataListEntityID:r,listType:s,isLibraryList:!0}),a()(g.a,{selectedListStyle:o,allListStyles:C}),a()(m.a,{selectedListStyle:o,allListStyles:C})))},t}(d.Component);t.a=M},function(e,t,n){"use strict";function i(){
return n.i(r.createSelector)(function(e,t){return t.selectedDirectory},function(e,t){return t.libraryDirectories},n.i(u.a)(),s.a,n.i(l.a)(),n.i(o.a)(),function(e,t,i,a,r,s){var o={key:"timeline"},l=n.i(d.a)({type:"photo",server:i,provider:a,libraryKey:r,selectedDirectory:e,libraryDirectories:t});return{listType:"photo",listStyle:c.a,totalSize:s.totalSize,libraryKey:r,metadataPseudoTypes:l,selectedType:o,allListStyles:[c.a]}})}var a=n(14),r=n(8),s=(n.n(r),
n(45)),o=n(140),l=n(208),u=n(54),c=n(71),d=n(613),h=n(2313);t.a=n.i(a.b)(i)(h.a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(249),f=n(957),g=n(82),m=n(944),v=n(567),y=n(110),b=n(120),S=n(121),I=n(2764),w=n.n(I),M=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onTogglePress=function(e){
i.props.onToggle(i.props.index)},i.onRemovePress=function(e){i.props.onRemove(i.props.url)},i.onSubmit=function(e){i.props.onSubmit(i.props.url,e.url)},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.isOpen,i=e.isUpdating,r=e.isRemoving,s=e.url,o=e.error,l=e.onErrorDismiss,u=i||r;return a()(m.a,{isOpen:t,closedNode:a()("div",{},void 0,a()(S.a,{className:w.a.label},void 0,n.i(h.default)("URL")),s),errorMessage:n.i(p.a)(o),onErrorDismiss:l,
onTogglePress:this.onTogglePress},void 0,a()(b.a,{onSubmit:this.onSubmit},void 0,a()(v.a,{focusOnMount:!0,labelText:n.i(h.default)("URL"),isDisabled:u,name:"url",initialValue:s,validations:s?[f.a]:[]}),a()("div",{className:w.a.buttons},void 0,s&&a()(y.a,{className:w.a.dangerButton,kind:g.DANGER,isSpinning:r,isDisabled:u,onPress:this.onRemovePress},void 0,n.i(h.default)("Remove")),a()(y.a,{className:w.a.button,type:"submit",kind:g.PRIMARY,isSpinning:i,isDisabled:u
},void 0,n.i(h.default)("Save Changes")))))},t}(d.Component);t.a=M},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(2),h=n.n(d),p=n(1),f=(n.n(p),n(4)),g=n(46),m=n(82),v=n(945),y=n(435),b=n(436),S=n(150),I=n(2315),w=n(51),M=n(25),C=n(195),D=n(2765),P=n.n(D),T=a()(v.a,{}),x=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onToggle=function(e){var t=a.state.openFormSectionIndex===e;a.props.onErrorDismiss(),
a.props.onToggle(),a.setState({openFormSectionIndex:t?null:e})},a.onRemove=function(e){a.setState({removeWebhookModalURL:e,isRemoveWebhookModalOpen:!0})},a.onSubmit=function(e,t){e===t?(a.setState({openFormSectionIndex:null}),a.props.onToggle()):a.props.onSubmit(e,t)},a.onRemoveWebhookConfirmPress=function(e){var t=a.state.removeWebhookModalURL;a.props.onRemove(t)},a.onRemoveWebhookCancelPress=function(e){a.setState({isRemoveWebhookModalOpen:!1})},a.state={openFormSectionIndex:null,
isRemoveWebhookModalOpen:!1},a}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){!e.isRemovingWebhooks&&this.props.isRemovingWebhooks&&this.setState({openFormSectionIndex:null,isRemoveWebhookModalOpen:!1});var t=e.webhooks===this.props.webhooks?-1:h.a.findIndex(e.webhooks,function(e){return""===e.url}),n=t!==-1,i=!e.isUpdatingWebhooks&&!e.updateWebhooksError&&this.props.isUpdatingWebhooks;n?this.setState({openFormSectionIndex:t}):i&&this.setState({openFormSectionIndex:null})},
t.prototype.render=function(){var e=this,t=this.props,i=t.isUnauthorized,r=t.isWebhooksPending,s=t.isWebhooksPopulated,o=t.webhooksError,l=t.isUpdatingWebhooks,u=t.isRemovingWebhooks,c=t.updateWebhooksError,d=t.webhooks,p=t.onAddWebhookPress,v=t.onErrorDismiss,D=this.state,x=D.openFormSectionIndex,E=D.removeWebhookModalURL,A=D.isRemoveWebhookModalOpen;if(i)return a()(S.a,{title:n.i(f.default)("You're not supposed to be here"),
description:n.i(f.default)("You don't have access to webhooks settings")});var k=d&&d.length,L=d&&h.a.find(d,function(e){return""===e.url}),_=s&&d&&k<5&&!L;return a()(y.a,{metricsPage:g.m,metricsPane:"webhooks"},void 0,a()(b.a,{},void 0,n.i(f.default)("Webhooks")),a()("p",{},void 0,n.i(f.default)("Plex Media Server will make requests to these webhooks on various media playback events.")),a()("p",{},void 0,a()(M.a,{kind:m.PRIMARY,to:"https://support.plex.tv/hc/en-us/articles/115002267687",
target:"_blank"},void 0,n.i(f.default)("Learn more"))),r&&!s&&T,s&&!!k&&d.map(function(t,n){var i=x===n;return a()(I.a,{index:n,url:t.url,isOpen:i,isUpdating:i&&l,isRemoving:i&&u,error:i?c:null,onErrorDismiss:v,onRemove:e.onRemove,onToggle:e.onToggle,onSubmit:e.onSubmit},n)}),_&&a()("div",{className:P.a.buttons},void 0,a()(w.a,{kind:m.PRIMARY,onPress:p},void 0,n.i(f.default)("Add webhook"))),o&&n.i(f.default)("An error occurred retrieving webhooks. Please try again."),a()(C.a,{
isConfirmButtonSpinning:u,isCancelButtonDisabled:u,isOpen:A,metricsPage:g.n,title:n.i(f.default)("Remove webhook"),message:n.i(f.default)("Plex will no longer post updates to {url}.",{url:E}),confirmLabel:n.i(f.default)("Remove"),kind:m.DANGER,onConfirm:this.onRemoveWebhookConfirmPress,onCancel:this.onRemoveWebhookCancelPress}))},t}(p.Component);t.a=x},function(e,t,n){"use strict"
;var i=n(16),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(6),h=n.n(d),p=n(1),f=n.n(p),g=n(14),m=n(8),v=(n.n(m),n(182)),y=n(496),b=n(398),S=n(2316),I=n(2),w=n.n(I),M=n.i(m.createSelector)(v.a,y.a,function(e,t){var n=w.a.pick(e.desktop,["webhooks","isWebhooksPending","isWebhooksPopulated","webhooksError","isUpdatingWebhooks","isRemovingWebhooks","updateWebhooksError"]);return h()({},n,{isUnauthorized:!t.webhooks})}),C={dispatchFetchWebhooks:b.d,onAddWebhookPress:function(){
return n.i(b.e)()},onErrorDismiss:b.f,onRemove:function(e){return n.i(b.g)(e)},onSubmit:function(e,t){return n.i(b.h)({oldUrl:e,newUrl:t})},onToggle:function(){return n.i(b.g)("")}},D=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchFetchWebhooks(),this.props.onErrorDismiss()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchWebhooks,a()(e,["dispatchFetchWebhooks"]))
;return f.a.createElement(S.a,t)},t}(p.Component);t.a=n.i(g.b)(M,C)(D)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(2),h=n.n(d),p=n(1),f=(n.n(p),n(87)),g=n(116),m=n(2766),v=n.n(m),y=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMeasure=function(e){var t=e.width,n=e.height;a.setState({isMeasured:!0,width:t,height:n})},a.state={isMeasured:!1,width:null,height:null},a}return c()(t,e),
t.prototype.render=function(){var e=this.props,t=e.items,n=e.currentIndex,i=e.size,r=e.renderSlide;if(!t||!t.length)return null;var s=this.state,o=s.isMeasured,l=s.width,u=s.height,c=h.a.range(Math.max(0,n-1),Math.min(i,n+1+1));return a()(f.a,{className:v.a.magazine,onMeasure:this.onMeasure},void 0,o&&c.map(function(e){var t=n===e;return a()(g.a,{className:t?v.a.currentSlide:v.a.slide,cellY:0,cellX:(e-n)*l,cellWidth:l,cellHeight:u},e,r(e,l,u))}))},t}(p.Component);t.a=y},function(e,t,n){
"use strict";function i(e){return r()("div",{style:u},void 0,r()(o.a,{serverEntityID:e.serverEntityID,url:e.url,width:l,height:l,minSize:!0,background:!0,transition:!0}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(165)),l=110,u={width:l,height:l};t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.title,i=e.summary,a=e.dateTaken,s=e.index,f=e.size,m=e.positionMilliseconds,v=e.videoDuration,y=e.canEdit,b=e.isPhotoStripOpen,S=e.isPhotoInformationOpen,I=e.isPaused,w=e.isEditing,M=e.isFullscreen,C=e.onPhotoStripTogglePress,D=e.onPhotoInformationTogglePress,P=e.onEditTogglePress,T=e.onFullscreenTogglePress,x=e.onPlayPausePress,E=e.onTitleBlur,A=e.onSummaryBlur,k=e.onTitleChange,L=e.onSummaryChange,_=e.onPositionChange,N=t&&t.length,R=i&&i.length,O=!(y&&w);return r()("div",{
className:g.a.controls},void 0,v&&r()(h.a,{className:g.a.seekbar,showFill:!0,value:m,max:v,trackClassName:g.a.seekbarTrack,fillClassName:g.a.seekbarFill,onChange:_}),r()("div",{className:g.a.container},void 0,r()("div",{className:g.a.info},void 0,(w||N)&&r()("div",{className:g.a.title},void 0,r()(d.a,{name:"titleInput",className:g.a.textInput,value:t,placeholder:n.i(o.default)("Title"),isDisabled:O,onChange:k,onBlur:E
})),r()("div",{},void 0,r()("span",{},void 0,!!a&&n.i(l.default)(a)+" - "),r()("span",{},void 0,!!f&&n.i(o.default)("{currentIndex} of {size}",{currentIndex:s+1,size:f})))),(w||R)&&r()("div",{className:g.a.summary},void 0,r()(c.a,{name:"summaryInput",className:g.a.textArea,value:i,placeholder:n.i(o.default)("Description"),isDisabled:O,rows:2,onChange:L,onBlur:A})),r()("div",{className:g.a.actions},void 0,r()(p.a,{isSelected:!I,onPress:x},void 0,I?r()(u.a,{className:g.a.actionButton,
name:"plex-icon-play-560","aria-label":n.i(o.default)("Play")}):r()(u.a,{className:g.a.actionButton,name:"plex-icon-player-pause-560","aria-label":n.i(o.default)("Pause")})),y&&r()(p.a,{isSelected:w,onPress:P},void 0,r()(u.a,{className:g.a.actionButton,name:"plex-icon-edit-560","aria-label":n.i(o.default)("Edit")})),r()(p.a,{isSelected:S,onPress:D},void 0,r()(u.a,{className:g.a.actionButton,name:"plex-icon-info-560","aria-label":n.i(o.default)("Information")})),r()(p.a,{isSelected:b,onPress:C
},void 0,r()(u.a,{className:g.a.actionButton,name:"plex-icon-channels-560","aria-label":n.i(o.default)("Show Photo Strip")})),r()(p.a,{isSelected:M,onPress:T},void 0,M?r()(u.a,{className:g.a.actionButton,name:"plex-icon-player-windowed-560","aria-label":n.i(o.default)("Windowed")}):r()(u.a,{className:g.a.actionButton,name:"plex-icon-player-fullscreen-560","aria-label":n.i(o.default)("Fullscreen")})))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(160),u=n(29),c=n(1994),d=n(145),h=n(411),p=n(25),f=n(2767),g=n.n(f);t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createSelector)(n.i(v.a)(),y.a,b.a,function(e,t,i){var a=e.title,r=e.summary,s=e.originallyAvailableAt,o=e.addedAt;return{title:a,summary:r,dateTaken:s||n.i(m.default)(o,"YYYY-MM-DD"),canEdit:n.i(S.b)(t,i,e)}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),
n(313)),v=n(24),y=n(47),b=n(45),S=n(235),I=n(107),w=n(399),M=n(2320),C={changeMetadataItemField:I.changeMetadataItemField,changePlayerPosition:w.h},D=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onTitleBlur=function(e){i._updateField("title",e.target.value,!0)},i.onSummaryBlur=function(e){i._updateField("summary",e.target.value,!0)},i.onTitleChange=function(e){
i._updateField("title",e,!1)},i.onSummaryChange=function(e){i._updateField("summary",e,!1)},i.onPositionChange=function(e){i.props.changePlayerPosition({index:i.props.index,playerType:"photo",positionSeconds:Math.floor(e.positionValue/1e3)})},a=n,u()(i,a)}return d()(t,e),t.prototype._updateField=function(e,t,n){this.props.changeMetadataItemField({metadataItemEntityID:this.props.metadataItemEntityID,name:e,value:t,save:n})},t.prototype.render=function(){
return p.a.createElement(M.a,r()({},this.props,{onTitleChange:this.onTitleChange,onSummaryChange:this.onSummaryChange,onTitleBlur:this.onTitleBlur,onSummaryBlur:this.onSummaryBlur,onPositionChange:this.onPositionChange}))},t}(h.Component);t.a=n.i(f.b)(i,C)(D)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.summary,i=e.totalSize,a=e.url,s=e.icon,o=e.onPress;return r()("div",{className:h.a.hub},void 0,r()(u.a,{onPress:o},void 0,r()("div",{className:h.a.container
},void 0,r()("div",{className:h.a.overlay},void 0,r()("div",{className:h.a.title},void 0,n),r()("div",{className:h.a.count},void 0,s?r()(l.a,{className:h.a.icon,serverEntityID:t,url:s,width:p,height:p}):f,r()("span",{},void 0," ",i))),r()("div",{className:h.a.body},void 0,r()(c.a,{serverEntityID:t,url:a})))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(29)),l=n(165),u=n(25),c=n(2319),d=n(2768),h=n.n(d),p=14,f=r()(o.a,{name:"plex-icon-tag-auto-560"});t.a=i},function(e,t,n){"use strict";function i(){
return n.i(g.createSelector)(n.i(v.a)(),n.i(b.a)(),n.i(y.a)(),function(e,t,i){return{hubLink:n.i(S.a)(e.machineIdentifier,t.identifier,i),summary:i.summary,totalSize:i.totalSize,url:i.thumb,icon:i.icon}})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(831)),v=n(54),y=n(724),b=n(127),S=n(966),I=n(2322),w=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l]
;return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onPress=function(){window.location.href=i.props.hubLink,i.props.closePlayer("photo")},a=n,u()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(I.a,r()({onPress:this.onPress},this.props))},t}(h.Component);t.a=n.i(f.b)(i,{closePlayer:m.e})(w)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,i=e.providerEntityID,a=e.hubEntityIDs;return a&&a.length?r()("div",{className:c.a.container
},void 0,r()("div",{className:c.a.title},void 0,n.i(o.default)("Related Photos")),r()("div",{className:c.a.list},void 0,a.map(function(e){return r()(l.a,{serverEntityID:t,providerEntityID:i,hubEntityID:e},e)}))):d}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(2323),u=n(2769),c=n.n(u),d=r()("div",{});t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,i=e.serverEntityID,a=e.providerEntityID,s=e.hubEntityIDs,o=e.type,d=e.model,f=e.width,v=e.height,y=e.container,b=e.iso,S=e.aperture,I=e.exposure,w=e.size;return r()(h.a,{className:l()(t,g.a.photoInformation),autoScroll:!0},void 0,r()("div",{className:g.a.exif},void 0,r()("div",{className:g.a.line},void 0,d?r()("div",{},void 0,d):r()("div",{},void 0,"clip"===o?n.i(u.default)("Video"):n.i(u.default)("Photo")),m),r()("div",{className:g.a.line
},void 0,!(!f||!v)&&r()("div",{},void 0,f," x ",v),!!w&&r()("div",{},void 0,n.i(c.a)(w)),y&&r()("div",{className:g.a.format},void 0,y)),!!b&&r()("div",{className:g.a.line},void 0,r()("div",{},void 0,n.i(u.default)("ISO")," ",b),r()("div",{},void 0,S),r()("div",{},void 0,I))),r()(p.a,{serverEntityID:i,providerEntityID:a,hubEntityIDs:s}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(30)),l=n.n(o),u=n(4),c=n(768),d=n(29),h=n(74),p=n(2324),f=n(2770),g=n.n(f),m=r()(d.a,{name:"plex-icon-camera-560"});t.a=i
},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(n.i(d.a)(),function(e){var t=e.Media,n=e.type;if(!t||!t.length)return{};var i=t[0].Part,a=o.a.pick(t[0],["aperture","exposure","iso","model","width","height","container"]);return r()({type:n,size:i&&i[0].size},a)})}var a=n(6),r=n.n(a),s=n(2),o=n.n(s),l=n(1),u=(n.n(l),n(14)),c=n(8),d=(n.n(c),n(24)),h=n(2325),p=n.i(u.b)(i)(h.a);p.propTypes={serverEntityID:l.PropTypes.string.isRequired,
metadataItemEntityID:l.PropTypes.string.isRequired,hubEntityIDs:l.PropTypes.array.isRequired},t.a=p},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(2),h=n.n(d),p=n(1),f=(n.n(p),n(30)),g=n.n(f),m=n(87),v=n(116),y=n(2406),b=n(2331),S=n(2771),I=n.n(S),w=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onMeasure=function(e){var t=e.width,n=e.height;a.setState({isMeasured:!0,width:t,height:n})},a.state={
isMeasured:!1,width:null,height:null},a}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,i=e.serverEntityID,r=e.playQueueItems,s=e.currentIndex,o=e.firstIndex,l=e.size,u=e.onPhotoPress,c=this.state,d=c.isMeasured,p=c.width,f=c.height,S=[],w=[],M=0;if(d){M=Math.ceil(f);var C=Math.ceil(p/M),D=n.i(y.a)({index:s,renderableWindow:C,length:l,cellPadding:2,cellWidth:M,width:p});w=h.a.range(D.renderStartIndex,D.renderEndIndex+1),S=D.positions}return a()("div",{
className:g()(t,I.a.strip)},void 0,a()(m.a,{className:I.a.thumbs,onMeasure:this.onMeasure},void 0,d&&w.map(function(e){var t=S[e],n=e===s,l=r[e-o];return a()(v.a,{className:I.a.cell,cellY:0,cellX:t,cellWidth:M,cellHeight:M},e,a()("div",{className:g()(I.a.thumbContainer,n&&I.a.isSelected)},void 0,l&&a()(b.a,{className:I.a.thumb,serverEntityID:i,playQueueItemEntityID:l,dimension:M-4,index:e,onPlayPress:u})))})))},t}(p.Component);t.a=w},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(63),f=n(29),g=n(80),m=n(146),v=n(345),y=n(2772),b=n.n(y),S=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onMenuButtonPress=function(){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(){r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1},r._toolbarMenuButtonID=n.i(p.a)(),r}return c()(t,e),t.prototype.createOnPress=function(e){var t=this
;return function(){return t.props.onItemIDChange(e)}},t.prototype.render=function(){var e=this,t=this.props,i=t.className,r=t.label,s=t.icon,o=t.items,l=t.currentItemID,u=this.state.isMenuOpen;return a()(v.a,{id:this._toolbarMenuButtonID,className:i,icon:s,label:r,isMenuOpen:u,onPress:this.onMenuButtonPress},void 0,a()(g.a,{isOpen:u,target:this._toolbarMenuButtonID,onMenuClose:this.onMenuClose},void 0,o.map(function(t){return a()(m.a,{onPress:e.createOnPress(t.id)},"menu-item-"+t.id,a()("div",{
className:b.a.menuItemContainer},void 0,a()("div",{className:b.a.menuLabel},void 0,t.title),t.id===l&&a()(f.a,{name:"plex-icon-selected-560",className:b.a.selectedIcon,"aria-label":n.i(h.default)("Selected")})))})))},t}(d.Component);t.a=S},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){var t=e.url;return{url:e.isVideo?null:t}})}var a=n(14),r=n(8),s=(n.n(r),n(550)),o=n(877);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.url,a=e.dimension,s=e.onPlayPress;return o()(c.a,{className:t,onPress:s},void 0,o()(d.a,{serverEntityID:n,url:i,width:a,height:a,minSize:!0,style:h,background:!0,transition:!0,transitionProps:r()({},u.a)}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=(n.n(l),n(278)),c=n(25),d=n(165),h={width:"100%",height:"100%",top:0,position:"absolute",zIndex:0};t.a=i},function(e,t,n){"use strict";function i(){return n.i(m.createSelector)(n.i(v.a)(),function(e){return{
metadataItemEntityID:e.metadataItem}})}function a(){return n.i(m.createSelector)(n.i(y.a)(),function(e){return{url:e.url}})}var r=n(6),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(14),m=n(8),v=(n.n(m),n(842)),y=n(550),b=n(2330),S=function(e){function t(){var n,i,a;l()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.onPlayPress=function(){i.props.onPlayPress(i.props.index)},a=n,
c()(i,a)}return h()(t,e),t.prototype.render=function(){return this.props.url?f.a.createElement(b.a,s()({},this.props,{onPlayPress:this.onPlayPress})):null},t}(p.Component),I=n.i(g.b)(a)(S);t.a=n.i(g.b)(i)(I)},function(e,t,n){"use strict";function i(e){var t={id:-1,title:n.i(u.default)("Original")},i=e.qualities.map(function(e){return{id:e.index,title:n.i(c.default)(e)}}),a=o.a.sortBy(i,function(e){return-e.id}),s=[t].concat(a),l=e.className,h=e.qualityIndex,p=e.onQualityIndexChange
;return r()(d.a,{className:l,label:n.i(u.default)("Quality"),icon:"plex-icon-player-video-settings-560",items:s,currentItemID:h,onItemIDChange:p})}var a=n(3),r=n.n(a),s=n(2),o=n.n(s),l=n(1),u=(n.n(l),n(4)),c=n(770),d=n(2328);t.a=i},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(n.i(d.a)(),function(e){return{playQueueItem:e}})}function a(e){var t=e.playQueueItem,n=t&&"photo"!==t.type?p.a:h.a;return l.a.createElement(n,s()({metadataItemEntityID:t.metadataItem},e))}
var r=n(6),s=n.n(r),o=n(1),l=n.n(o),u=n(14),c=n(8),d=(n.n(c),n(842)),h=n(2335),p=n(2337);t.a=n.i(u.b)(i)(a)},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=(n.n(p),n(4)),g=n(278),m=n(165),v=n(36),y=n(2773),b=n.n(y),S=s()(v.a,{}),I=function(e){function t(){l()(this,t);var n=c()(this,e.call(this));return n.onLoad=function(){n.setState({loading:!1})},n.onError=function(){n.setState({error:!0})},n.state={loading:!0,error:!1
},n}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.serverEntityID,i=e.metadataKey,r=e.url,o=e.maxWidth,l=e.maxHeight,u=e.imageWidth,c=void 0===u?400:u,d=e.imageHeight,h=void 0===d?400:d,p=c/h,v=c/o,y=h/l,I=v>y,w=I?o:l*p,M=I?o/p:l,C={width:w,height:M},D={width:"100%",height:"100%"},P=this.state,T=P.loading,x=P.error;return s()("div",{className:b.a.slideContainer,style:C},void 0,s()("div",{className:b.a.statusContainer
},void 0,T&&!x&&S,x&&s()("div",{},void 0,n.i(f.default)("Unable to load photo"))),s()(m.a,{serverEntityID:t,url:r,width:w,height:M,style:D,minSize:!0,background:!0,transition:!0,transitionProps:a()({},g.a),onError:this.onError,onLoad:this.onLoad},i))},t}(p.Component);t.a=I},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(n.i(p.a)(),function(e){return e&&e.url?l()({isLoading:!1,metadataKey:e.key},e):{isLoading:!0}})}function a(e){
return e.isLoading?m:c.a.createElement(g.a,e)}var r=n(3),s=n.n(r),o=n(6),l=n.n(o),u=n(1),c=n.n(u),d=n(14),h=n(8),p=(n.n(h),n(550)),f=n(36),g=n(2334),m=s()(f.a,{});t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(13)),p=n(36),f=n(40),g=n(2774),m=n.n(g),v={width:"100%",height:"100%"},y=a()(p.a,{}),b=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onStart=function(){
r.setState({loading:!1})},r.onMediaStateChange=function(e){e===f.a.mediaStates.ERROR&&r.props.onError(r.props.index)},r._mediaComponent=n.i(h.a)("mediaComponent"),r.state={loading:!0},r}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.url,n=e.positionSeconds,i=e.paused,r=e.error,s=e.protocol,o=e.isCurrent,l=e.maxWidth,u=e.maxHeight,c=e.onPositionMillisecondsChange,d=e.onTick,h=e.onEnd,p=this.state.loading,f=this._mediaComponent.canRender({isOnscreen:o
}),g=this._mediaComponent.getComponent({protocol:s});return a()("div",{className:m.a.slideContainer},void 0,a()("div",{className:m.a.statusContainer},void 0,p&&!r&&y,r&&a()("div",{},void 0,r)),!r&&f&&a()(g,{style:v,className:m.a.videoElement,containerClassName:m.a.videoContainer,src:t,positionSeconds:n,paused:i,maxWidth:l,maxHeight:u,onStart:this.onStart,onPositionMillisecondsChange:c,onTick:d,onMediaStateChange:this.onMediaStateChange,onEnd:h},t))},t}(d.Component);t.a=b},function(e,t,n){
"use strict";function i(){return n.i(b.createSelector)(function(e,t){return t.index},function(e,t){return t.isCurrent},function(e){return e.ui.photoPlayer},function(e,t){var n=t.playQueueItem;return e.ui.photoPlayer.decisions[n.playQueueItemID]},function(e,t,n,i){return i&&(i.url||i.error)?{currentIndex:n.currentIndex,isCurrent:t,isLoading:!1,url:i.url,error:i.error,protocol:i.protocol,paused:!t||n.videoPaused||!1,positionSeconds:n.positionSeconds}:{isLoading:!0}})}
var a=n(3),r=n.n(a),s=n(6),o=n.n(s),l=n(16),u=n.n(l),c=n(9),d=n.n(c),h=n(11),p=n.n(h),f=n(10),g=n.n(f),m=n(1),v=n.n(m),y=n(14),b=n(8),S=(n.n(b),n(399)),I=n(36),w=n(2336),M={dispatchMakeVideoDecision:S.c,dispatchRemoveVideoDecision:S.d,dispatchUpdatePlayerPosition:S.e,dispatchVideoPlayerTick:S.f,onError:function(e){return n.i(S.g)({index:e,playerType:"photo"})}},C=r()(I.a,{}),D=function(e){function t(){var n,i,a;d()(this,t);for(var r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=arguments[o]
;return n=i=p()(this,e.call.apply(e,[this].concat(s))),i.onPositionMillisecondsChange=function(e){i.props.isCurrent&&(i.props.onPositionMillisecondsChange(e),i.props.dispatchUpdatePlayerPosition({positionSeconds:Math.floor(e/1e3),index:i.props.index,playerType:"photo"}))},i.onTick=function(e){i.props.dispatchVideoPlayerTick({secondsElapsed:e,index:i.props.index,playerType:"photo"})},a=n,p()(i,a)}return g()(t,e),t.prototype.componentWillMount=function(){this.props.dispatchMakeVideoDecision({
playerType:"photo",index:this.props.index})},t.prototype.componentWillUnmount=function(){this.props.dispatchRemoveVideoDecision({playerType:"photo",playQueueItem:this.props.playQueueItem})},t.prototype.render=function(){var e=this.props,t=e.isLoading,n=e.positionSeconds,i=(e.onPositionMillisecondsChange,e.dispatchMakeVideoDecision,e.dispatchRemoveVideoDecision,e.dispatchUpdatePlayerPosition,e.dispatchVideoPlayerTick,
u()(e,["isLoading","positionSeconds","onPositionMillisecondsChange","dispatchMakeVideoDecision","dispatchRemoveVideoDecision","dispatchUpdatePlayerPosition","dispatchVideoPlayerTick"]));return t&&!this.props.error?C:v.a.createElement(w.a,o()({key:this.props.url,positionSeconds:n,onPositionMillisecondsChange:this.onPositionMillisecondsChange,onTick:this.onTick},i))},t}(m.Component);t.a=n.i(y.b)(i,M)(D)},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(48),f=n.n(p),g=n(30),m=n.n(g),v=n(31),y=n(41),b=n(404),S=n(27),I=n(349),w=n(76),M=n.n(w),C=n(2341),D=n(2350),P=n(2775),T=n.n(P),x=parseInt(M.a.searchResultHeight,10),E=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onScrollIntoView=function(e){var t=e.scrollTop,n=f.a.findDOMNode(r.refs.results),i=n.clientHeight,a=i+r.state.scrollTop,s=t+x>a||t<r.state.scrollTop
;r.setState({scrollTop:s?t:r.state.scrollTop})},r.onWindowPress=function(e){if(r.state.isOpen){var t=f.a.findDOMNode(r.refs.search);t&&t.contains(e.target)||r.setState({isOpen:!1})}},r.onKeyDown=function(e){var t=r.props.serverEntityID,n=r.state.isOpen;switch(e.keyCode){case b.h:case b.i:n&&(e.stopPropagation(),e.preventDefault(),e.keyCode===b.i?r.props.selectQuickSearchResult({offset:-1}):r.props.selectQuickSearchResult({offset:1}),r.isTabScoped&&(I.b(),r.isTabScoped=!1));break;case b.j:if(n){
var i=v.a.platformID,a="osx"===i?e.metaKey:e.ctrlKey,s=e.shiftKey;I.e(),r.isTabScoped=!1,a?s?r.props.playQuickSearchItem({serverEntityID:t,shuffle:!0}):r.props.playQuickSearchItem({serverEntityID:t}):r.props.navigateQuickSearchResult({serverEntityID:t})}break;case b.b:e.nativeEvent.stopImmediatePropagation(),r.isTabScoped&&(I.b(),r.isTabScoped=!1),n?r.setState({isOpen:!1}):r.props.changeQuickSearchQuery("");break;case b.a:if(n){if(!r.isTabScoped){var o=f.a.findDOMNode(r.refs.results);I.c(o),
r.isTabScoped=!0}I.a(e)}}},r.onInputClick=function(e){r.isTabScoped&&(I.b(),r.isTabScoped=!1),r.state.isOpen||""===r.props.query||r.setState({isOpen:!0})},r.onScrollPositionChange=function(e){var t=e.scrollTop;r.setState({scrollTop:t})},r.onSearch=function(){n.i(y.a)(function(){r.props.fetchQuickSearch()})},r.onInputChange=function(e){n.i(y.a)(function(){r.props.changeQuickSearchQuery(e)})},r.isTabScoped=!1,r.state={scrollTop:0,isOpen:!1},r}return c()(t,e),
t.prototype.componentWillMount=function(){this._listenForPress()},t.prototype.componentWillReceiveProps=function(e,t){var n=e.selectedResultEntityID,i=e.query,a=this.props.query!==i,r=i.trim().length,s=this.state.isOpen;r&&!s&&a?this.setState({isOpen:!0}):!r&&s&&(this.setState({isOpen:!1}),this.isTabScoped&&(I.f(),this.isTabScoped=!1)),null==n&&this.setState({scrollTop:0})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(S.a)(this,e,t)},t.prototype.componentWillUnmount=function(){
this._stopListeningForPress()},t.prototype._listenForPress=function(){window.addEventListener("mouseup",this.onWindowPress),window.addEventListener("touchend",this.onWindowPress)},t.prototype._stopListeningForPress=function(){window.removeEventListener("mouseup",this.onWindowPress),window.removeEventListener("touchend",this.onWindowPress)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.query;return h.a.createElement("div",{className:m()(T.a.container),ref:"search",
onKeyDown:this.onKeyDown},a()(C.a,{query:n,onChange:this.onInputChange,onSearch:this.onSearch,onClick:this.onInputClick}),this.state.isOpen&&h.a.createElement(D.a,{serverEntityID:t,scrollTop:this.state.scrollTop,ref:"results",onScrollIntoView:this.onScrollIntoView,onScrollPositionChange:this.onScrollPositionChange}))},t}(d.Component);t.a=E},function(e,t,n){"use strict";function i(){return n.i(b.createSelector)(function(e){return e.ui.quickSearch},D,function(e,t){if(!t)return{}
;var n=g.a.pick(e,"query","providerIdentifier","selectedResultEntityID");return p()({serverEntityID:t.entityID,isConnected:t.isConnected,providerEntityIDs:t.desktop.providers},n)})}var a=n(16),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(6),p=n.n(h),f=n(2),g=n.n(f),m=n(1),v=n.n(m),y=n(14),b=n(8),S=(n.n(b),n(41)),I=n(246),w=n(88),M=n(131),C=n(2338),D=n.i(b.createSelector)(function(e){return e.primaryServer},I.a,function(e,t){return e?t[e]:void 0}),P=p()({populateProviders:w.e
},M),T=function(e){function t(){return o()(this,t),u()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){var t=e.isConnected!==this.props.isConnected,n=e.providerEntityIDs!==this.props.providerEntityIDs,i=e.providerIdentifier!==this.props.providerIdentifier;(t||n||i)&&this._populate(e)},t.prototype._populate=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.serverEntityID,i=e.isConnected,a=e.providerEntityIDs,r=e.providerIdentifier;t&&i&&e.populateProviders({serverEntityID:t}),a&&a.length&&n.i(S.a)(function(){e.initQuickSearch({serverEntityID:t,providerEntityIDs:a,providerIdentifier:r})})},t.prototype.render=function(){var e=this.props,t=e.providerEntityIDs,n=r()(e,["providerEntityIDs"]);return t&&t.length?v.a.createElement(C.a,n):null},t}(m.Component);t.a=n.i(y.b)(i,P)(T)
},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(27),y=n(946),b=n(2349),S=n(2776),I=n.n(S),w=function(e){function t(){return c()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.title,n=e.selectedResultEntityID,i=e.results,r=l()(e,["title","selectedResultEntityID","results"]);return s()("div",{},void 0,s()("h5",{className:I.a.hubTitle},void 0,t),i.map(function(e,t){return m.a.createElement(y.a,a()({key:e,searchResultEntityID:e,component:b.a,isSelected:n===e},r))}))},t}(g.Component);t.a=w},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(30),f=n.n(p),g=n(12),m=n(27),v=n(29),y=n(25),b=n(2777),S=n.n(b),I=function(e){function t(n){s()(this,t);var i=l()(this,e.call(this,n));return i.focusInput=function(){i.refs.input.focus()},i.onClick=function(e){i.focusInput(),i.props.onClick()},i.onFocus=function(){i.setState({isFocused:!0})},i.onBlur=function(){i.setState({isFocused:!1})},i.onChange=function(e){var t=e.target.value
;i.searchTimeout&&clearTimeout(i.searchTimeout),i.setState({query:t},function(){i.props.onChange(t),""!==t.trim()&&(i.searchTimeout=setTimeout(i.props.onSearch,200))})},i.onClearPress=function(e){e.stopPropagation(),i.searchTimeout&&clearTimeout(i.searchTimeout),i.setState({query:""},function(){i.props.onChange(""),i.focusInput()})},i.state={isFocused:!1,query:n.query},i.searchTimeout=null,i}return c()(t,e),t.prototype.componentDidMount=function(){g.a.on("shortcut:search",this.focusInput)},
t.prototype.componentWillReceiveProps=function(e){this.state.query!==e.query&&this.setState({query:e.query})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(m.a)(this,e,t)},t.prototype.componentWillUnmount=function(){g.a.off("shortcut:search",this.focusInput),this.searchTimeout&&clearTimeout(this.searchTimeout)},t.prototype.render=function(){var e=this.state,t=e.query,n=e.isFocused;return a()("div",{className:f()(S.a.container,n&&S.a.focused),onClick:this.onClick},void 0,a()(v.a,{
name:"plex-icon-search-560",className:S.a.searchIcon}),h.a.createElement("input",{className:S.a.searchInput,value:t,type:"text",autoComplete:"off",spellCheck:"false",ref:"input",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}),t.length>0&&a()(y.a,{onPress:this.onClearPress},void 0,a()(v.a,{name:"plex-icon-close-560",className:S.a.closeIcon})))},t}(d.Component);I.defaultProps={query:"",onClick:d.PropTypes.func},t.a=I},function(e,t,n){"use strict";function i(e,t,i){
return t?n.i(c.default)("Search in {channelName}...",{channelName:t}):i?n.i(c.default)("Search all servers...",e):n.i(c.default)("Show more results...",e)}function a(e){var t=e.server,n=e.query,a=e.searchAllServers,r=e.channelPlaceholder,o=e.channelID,l=e.channelSearchKey,c=e.isSelected,p=e.onLinkPress,g=e.onLinkFocus,m=encodeURIComponent(t.machineIdentifier),v=encodeURIComponent(n),y=void 0;if(null!=o&&null!=l){var b=encodeURIComponent(o),S=d.join(l,{query:n})
;y="#!/server/"+m+"/channel/"+b+"/"+encodeURIComponent(S)}else y="#!/server/"+m+"/search/"+v;var I=i(n,r,a);return s()(h.a,{className:u()(f.a.placeholder,c&&f.a.isPlaceholderSelected),tabIndex:"1",title:I,to:y,onPress:p,onFocus:g},void 0,I)}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(30)),u=n.n(l),c=n(4),d=n(19),h=(n(93),n(25)),p=n(2778),f=n.n(p);t.a=a},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(14),f=n(8),g=(n.n(f),
n(349)),m=n(47),v=n(168),y=n(131),b=n(2342),S={resetQuickSearch:y.resetQuickSearch,selectQuickSearchResult:y.selectQuickSearchResult},I=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),i.onLinkPress=function(e){var t=i.props.serverEntityID;i.props.resetQuickSearch({serverEntityID:t}),g.e()},i.onLinkFocus=function(e){i.props.selectQuickSearchResult({searchResultEntityID:null})},
a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){return h.a.createElement(b.a,a()({onLinkPress:this.onLinkPress,onLinkFocus:this.onLinkFocus},this.props))},t}(d.Component);t.a=n.i(p.b)(function(){return n.i(f.createSelector)(m.a,function(e){return e.ui.quickSearch},v.a,function(e,t,n){return{server:e,query:t.query,channelPlaceholder:t.channelPlaceholder,channelID:t.channelID,channelSearchKey:t.channelSearchKey,isSelected:!t.selectedResultEntityID,searchAllServers:n.searchAllServers}})
}(),S)(I)},function(e,t,n){"use strict";function i(e){var t=e.isLoading,i=e.hubs,a=c()(e,["isLoading","hubs"]);return t?l()("div",{className:v.a.spinnerContainer},void 0,l()(f.a,{className:v.a.spinner})):i.length?l()("div",{},void 0,i.map(function(e){return h.a.createElement(g.a,s()({key:e.hubIdentifier,title:e.title,results:e.results},a))})):l()("div",{className:v.a.noResults},void 0,n.i(p.default)("No Results"))}function a(e){
var t=e.title,n=e.isOnlyProvider,a=e.isSearchPending,r=(e.isSearchPopulated,c()(e,["title","isOnlyProvider","isSearchPending","isSearchPopulated"]));return l()("div",{},void 0,!n&&l()("div",{className:v.a.title,"aria-label":"heading","aria-level":"4"},void 0,t),h.a.createElement(i,s()({isLoading:a&&!e.hubs.length},r)))}var r=n(6),s=n.n(r),o=n(3),l=n.n(o),u=n(16),c=n.n(u),d=n(1),h=n.n(d),p=n(4),f=n(36),g=n(2340),m=n(2779),v=n.n(m);t.a=a},function(e,t,n){"use strict";function i(){
return n.i(l.createSelector)(function(e){return e.ui.quickSearch},n.i(u.a)(),function(e,t){return{title:t.title,selectedResultEntityID:e.selectedResultEntityID}})}function a(e){return s.a.createElement(c.a,e)}var r=n(1),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(127)),c=n(2344);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.searches,i=e.onScrollIntoView;return o()("div",{},void 0,n.map(function(e){return u.a.createElement(c.a,r()({},e,{key:e.key,
isOnlyProvider:1===n.length,serverEntityID:t,onScrollIntoView:i}))}))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(1),u=n.n(l),c=n(2345);t.a=i},function(e,t,n){"use strict";var i=n(14),a=n(8),r=(n.n(a),n(168)),s=n(2346),o=n.i(a.createSelector)(function(e){return e.ui.quickSearch},r.a,function(e,t){return{searches:e.searches}});t.a=n.i(i.b)(function(e){return o(e)})(s.a)},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[M.a,P.a];case"show":return[M.a,E.a];case"episode":
return[M.a,D.a];case"artist":return[M.a,x.a];case"album":return[M.a,C.a];case"track":return[M.a,k.a];case"photo":return[M.a,A.a];case"photoalbum":return[M.a,A.a];case"clip":return[M.a,A.a];case"playlist":return[M.a,T.a];case"actor":return[L.a,_.a];case"genre":return[L.a,_.a];case"director":return[L.a,_.a];case"autotag":return[L.a,_.a];case"collection":return[L.a,_.a];default:return[M.a,_.a]}}var a=n(3),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=(n.n(h),
n(48)),f=n.n(p),g=n(30),m=n.n(g),v=n(27),y=n(63),b=n(102),S=n(29),I=n(25),w=n(342),M=n(581),C=n(343),D=n(271),P=n(429),T=n(908),x=n(904),E=n(589),A=n(583),k=n(2129),L=n(2359),_=n(947),N=n(2356),R=n(2354),O=n(2355),j=n(2780),z=n.n(j),U=function(e){function t(i){o()(this,t);var a=u()(this,e.call(this,i));return a.onItemPress=function(e){e.stopPropagation();var t=document.getElementById(a._metadataActionsMenuButtonID);t&&t.contains(e.target)||a.props.onLinkPress()},a.onItemFocus=function(e){
a.props.onResultFocus(a.props.searchResultEntityID)},a.onPlayPress=function(e){e.stopPropagation(),a.props.onPlayPress(a.props.searchResultEntityID)},a.onLinkPress=function(e){e.stopPropagation(),a.props.onLinkPress()},a.onMenuIconPress=function(e){a.setState({isMenuOpen:!a.state.isMenuOpen})},a.onMenuClose=function(){a.setState({isMenuOpen:!1})},a.state={isMenuOpen:!1},a._metadataActionsMenuButtonID=n.i(y.a)(),a}return d()(t,e),t.prototype.shouldComponentUpdate=function(e,t){
return n.i(v.a)(this,e,t)},t.prototype.componentWillUpdate=function(e,t){if(e.isSelected!==this.props.isSelected&&e.isSelected){var n=f.a.findDOMNode(this);this.props.onScrollIntoView({scrollTop:n.offsetTop})}},t.prototype.render=function(){
var e=this,t=this.props,a=t.serverEntityID,s=t.providerEntityID,o=t.searchResultEntityID,l=t.metadataItemEntityID,u=t.server,c=t.provider,d=t.isSelected,h=t.isMetadataItem,p=t.imageWidth,f=t.imageHeight,g=t.imageUrl,v=t.resultRoute,y=t.metadataKey,M=t.metadataTitle,C=t.metadataType,D=t.tag,P=t.tagTypeString,T=t.librarySectionType,x=t.reasonTitle,E=this.state.isMenuOpen,A=c.protocols.livetv;return r()(I.a,{component:"div",className:m()(z.a.button,(d||E)&&z.a.selected),onPress:this.onItemPress,
onFocus:this.onItemFocus},void 0,r()(I.a,{className:z.a.link,tabIndex:"1",title:h?M:D,to:v,onPress:v?this.onLinkPress:this.onPlayPress}),r()("div",{className:z.a.imageContainer},void 0,h?r()(R.a,{serverEntityID:a,imageWidth:p,imageHeight:f,imageUrl:g,title:M,type:C,isLiveTVItem:A,recordLink:n.i(b.a)(u,c,y,{record:1}),onRecordPress:this.onLinkPress,onPlayPress:this.onPlayPress}):r()(O.a,{serverEntityID:a,imageWidth:p,imageHeight:f,imageUrl:g,title:D,tagType:P,librarySectionType:T})),r()("div",{
className:z.a.titles},void 0,i(h?C:P).map(function(t,n){var i=n>0,u=i&&!!x;return r()(N.a,{className:i?null:z.a.title,serverEntityID:a,providerEntityID:s,searchResultEntityID:o,metadataItemEntityID:l,component:u?_.a:t,isSecondary:i,onPress:e.onLinkPress},n)})),h&&!A&&r()(I.a,{id:this._metadataActionsMenuButtonID,tabIndex:"-1",className:z.a.moreButton,onPress:this.onMenuIconPress},void 0,r()(S.a,{className:z.a.moreIcon,name:"plex-icon-more-560"}),r()(w.a,{serverEntityID:a,providerEntityID:s,
metadataItemEntityID:l,showPlayTrailer:!1,showPlayPlexMix:!1,showPlayMusicVideo:!1,showEdit:!1,showRefresh:!1,showAnalyze:!1,showFixMatch:!1,showMatch:!1,showUnmatch:!1,showSplitApart:!1,showSync:!1,showOptimize:!1,showDownload:!1,showWatchLater:!1,showShare:!1,showRecommend:!1,showDelete:!1,showDeleteVersion:!1,target:this._metadataActionsMenuButtonID,isOpen:E,onMenuClose:this.onMenuClose})))},t}(h.Component);U.defaultProps={isMetadataItem:!1},t.a=U},function(e,t,n){"use strict";function i(){
return n.i(g.createSelector)(I.a,w.a,n.i(M.a)(),n.i(C.a)(),function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],r={server:e,provider:t,reasonID:i.reasonID,reasonTitle:i.reasonTitle};if(a){var s=n.i(x.c)(a.type)===x.e?k:L,o=n.i(E.a)(s,null,a.type,a);r=d()({metadataKey:a.key,metadataTitle:a.title,metadataType:a.type,typeString:a.type,imageWidth:o.width,imageHeight:o.height,imageUrl:o.url,resultRoute:n.i(S.a)(e,t,a)},r)}else{
var l=i.tagItem||{},u=m.a.get(l.tagType),c=u&&u.typeString,h=n.i(E.a)(L,null,c,l);r=d()({tag:l.tag,tagType:l.tagType,tagTypeString:c,librarySectionType:l.librarySectionType,imageWidth:h.width,imageHeight:h.height,imageUrl:h.url,resultRoute:n.i(b.a)(e,t,t.isLibraryProvider?i.reasonID:l.librarySectionKey,{filters:l.filter?l.filter:c+"="+l.id,filterLabel:l.tag})},r)}return r})}var a=n(9),r=n.n(a),s=n(11),o=n.n(s),l=n(10),u=n.n(l),c=n(6),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),
n(390)),v=n(349),y=n(41),b=n(94),S=n(967),I=n(47),w=n(45),M=n(263),C=n(24),D=n(107),P=n(131),T=n(277),x=n(203),E=n(440),A=n(2348),k=28,L=36,_=d()({resetQuickSearch:P.resetQuickSearch,selectQuickSearchResult:P.selectQuickSearchResult,playQuickSearchItem:P.playQuickSearchItem},D),N=function(e){function t(){var i,a,s;r()(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return i=a=o()(this,e.call.apply(e,[this].concat(u))),a.onLinkPress=function(){
var e=a.props.serverEntityID;a.props.resetQuickSearch({serverEntityID:e}),v.e()},a.onResultFocus=function(e){n.i(y.a)(function(){a.props.selectQuickSearchResult({searchResultEntityID:e})})},a.onPlayPress=function(e){var t=a.props.serverEntityID;a.props.playQuickSearchItem({serverEntityID:t,searchResultEntityID:e})},s=i,o()(a,s)}return u()(t,e),t.prototype.render=function(){return p.a.createElement(A.a,d()({},this.props,{onLinkPress:this.onLinkPress,onResultFocus:this.onResultFocus,
onPlayPress:this.onPlayPress}))},t}(h.Component);t.a=n.i(f.b)(i,_,T.a)(N)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(46),g=n(27),m=n(74),v=n(256),y=n(2343),b=n(2347),S=n(2781),I=n.n(S),w=function(e){function t(n){s()(this,t);var i=l()(this,e.call(this,n));return i.onWindowResize=function(){i.setState({maxHeight:i.getMaxHeight()})},i.state={maxHeight:i.getMaxHeight()},i}return c()(t,e),
t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onWindowResize)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(g.a)(this,e,t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onWindowResize)},t.prototype.getMaxHeight=function(){return window.innerHeight-150},t.prototype.render=function(){var e=this.props,t=e.className,n=e.serverEntityID,i=e.scrollTop,r=e.onScrollIntoView,s=e.onScrollPositionChange;return a()(v.a,{
page:f.F},void 0,a()(m.a,{className:p()(I.a.container,t),style:this.state,scrollTop:i,onScrollPositionChange:s},void 0,a()(y.a,{serverEntityID:n}),a()(b.a,{serverEntityID:n,onScrollIntoView:r})))},t}(d.Component);t.a=w},function(e,t,n){"use strict";function i(e){var t=e.isMetadataItem,n=o()(e,["isMetadataItem"]);return t?u.a.createElement(c.a,r()({},n,{showSelect:!1})):u.a.createElement(d.a,n)}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(422),d=n(2353);t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.searchResultEntityID,s=e.imageWidth,o=e.imageHeight,h=e.imageUrl,f=e.tag,g=e.tagType,m=e.librarySectionType,v=e.cellX,y=e.cellY,b=e.cellWidth,S=e.cellHeight,I=e.showOffscreenPlaceholder,w=e.titleComponents;return r()(l.a,{className:t,cellX:v,cellY:y,cellWidth:b,cellHeight:S},void 0,r()("div",{className:p.a.imageContainer},void 0,r()(u.a,{serverEntityID:n,imageWidth:s,imageHeight:o,imageUrl:h,title:f,
tagType:g,librarySectionType:m,isOffscreen:I}),r()(c.a,{className:p.a.imageLink,serverEntityID:n,providerEntityID:i,searchResultEntityID:a})),r()("div",{className:p.a.titleContainer},void 0,w.map(function(e,t){return r()(d.a,{serverEntityID:n,providerEntityID:i,searchResultEntityID:a,component:e,isSecondary:t>0},t)})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(144)),l=n(116),u=n(579),c=n(948),d=n(578),h=n(2782),p=n.n(h);t.a=n.i(o.a)(i)},function(e,t,n){"use strict";function i(){
return n.i(l.createSelector)(function(e,t){return t.listType},function(e,t){return t.listContext},function(e,t){return t.cellWidth},n.i(c.a)(),function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=a.tagItem,s=r.tag,o=r.tagType,l=r.librarySectionType,c=n.i(u.a)(i,null,e,r,t);return{tag:s,tagType:o,librarySectionType:l,imageWidth:c.width,imageHeight:c.height,imageUrl:c.url}})}function a(e){return s.a.createElement(d.a,e)}var r=n(1),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),
n(440)),c=n(263),d=n(2352);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.imageWidth,i=e.imageHeight,a=e.imageUrl,s=e.title,d=e.isLiveTVItem,p=e.recordLink,f=e.onRecordPress,g=e.onPlayPress;return r()(u.a,{className:h.a.card,serverEntityID:t,component:c.a,width:n,height:i,url:a},void 0,d?r()(l.a,{className:h.a.recordButton,circleClassName:h.a.recordCircle,tabIndex:"-1",title:s,to:p,onPress:f}):r()(o.a,{className:h.a.playButton,
circleClassName:h.a.playCircle,tabIndex:"-1",title:s,onPress:g}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(339)),l=n(564),u=n(419),c=n(425),d=n(2783),h=n.n(d);i.defaultProps={isLiveTVItem:!1},t.a=i},function(e,t,n){"use strict";function i(e){return o.a.createElement(l.a,r()({className:c.a.card},e))}var a=n(6),r=n.n(a),s=n(1),o=n.n(s),l=n(579),u=n(2784),c=n.n(u);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.component,i=e.isSecondary,a=u()(e,["className","component","isSecondary"]);return o()("div",{className:p()(t,g.a.title,i&&g.a.isSecondary)},void 0,d.a.createElement(n,r()({tabIndex:"-1"},a)))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(30),p=n.n(h),f=n(2785),g=n.n(f);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,i=e.server,a=e.provider,s=e.originalTitle,c=e.reason,d=e.reasonID,h=e.reasonTitle,p=e.filter,f=e.librarySectionID,g=e.librarySectionKey,m=e.onPress;if(!c)return null;if("originalTitle"===c)return r()("span",{className:t},void 0,s);if(!h)return null;var v={};("actor"===c||"director"===c)&&(v.filters=p?p:c+"="+d,v.filterLabel=h);var y=a.isLibraryProvider?f:g,b=n.i(l.a)(i,a,y,v),S={director:n.i(o.default)("by"),actor:n.i(o.default)("with"),section:n.i(o.default)("in"),
autotag:n.i(o.default)("tagged")};return b?r()("span",{className:t},void 0,S[c]," ",r()(u.a,{title:h,tabIndex:"-1",to:b,onPress:m},void 0,h)):r()("span",{className:t},void 0,S[c]+" "+h)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(94),u=(n(93),n(92),n(25));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tag;return r()("span",{className:t},void 0,n)}var a=n(3),r=n.n(a),s=n(1);n.n(s);t.a=i},function(e,t,n){"use strict";function i(){
return n.i(l.createSelector)(n.i(u.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{tag:e.tagItem&&e.tagItem.tag}})}function a(e){return s.a.createElement(c.a,e)}var r=n(1),s=n.n(r),o=n(14),l=n(8),u=(n.n(l),n(263)),c=n(2358);t.a=n.i(o.b)(i)(a)},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.server,a=e.provider,s=e.reasonID,c=e.id,d=e.tag,h=e.filter,p=e.tagType,f=e.librarySectionKey,g=o.a.get(p),m=g.typeString,v=h?h:m+"="+c,y={filters:v,
filterLabel:d},b=a.isLibraryProvider?s:f,S=n.i(l.a)(i,a,b,y);return r()(u.a,{className:t,title:d,to:S},void 0,d)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(390)),l=n(94),u=(n(93),n(92),n(25));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,i=e.machineIdentifier,a=e.friendlyName;if(!a)return null;var s=encodeURIComponent(i);return r()("span",{className:t},void 0,n.i(o.default)("on")," ",r()(l.a,{title:a,to:"#!/server/"+s+"/dashboard"},void 0,a))}
var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(25);t.a=i},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(n.i(s.a)(),function(e){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName}})}var a=n(14),r=n(8),s=(n.n(r),n(54)),o=n(2361);t.a=n.i(a.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){return r()(u.a,{target:e.target,isOpen:e.isOpen,onMenuClose:e.onMenuClose},void 0,e.showPlaySelected&&r()(c.a,{onPress:e.onPlaySelectedPress
},void 0,n.i(o.default)("Play Selected")),e.showShuffle&&r()(c.a,{onPress:e.onShufflePress},void 0,n.i(o.default)("Shuffle")),e.showAddToPlaylist&&r()(c.a,{onPress:e.onAddToPlaylistPress},void 0,n.i(o.default)("Add to Playlist...")),e.showMarkWatched&&r()(c.a,{onPress:e.onMarkWatchedPress},void 0,n.i(o.default)("Mark Watched")),e.showMarkUnwatched&&r()(c.a,{onPress:e.onMarkUnwatchedPress},void 0,n.i(o.default)("Mark Unwatched")),e.showEdit&&r()(c.a,{onPress:e.onEditPress
},void 0,n.i(o.default)("Edit")),e.showRefresh&&r()(c.a,{onPress:e.onRefreshPress},void 0,n.i(o.default)("Refresh Metadata")),e.showAnalyze&&r()(c.a,{onPress:e.onAnalyzePress},void 0,n.i(o.default)("Analyze")),e.showMerge&&r()(c.a,{onPress:e.onMergePress},void 0,n.i(o.default)("Merge")),e.showSync&&r()(c.a,{onPress:e.onSyncPress},void 0,n.i(o.default)("Sync...")),e.showOptimize&&r()(c.a,{onPress:e.onOptimizePress},void 0,n.i(o.default)("Optimize...")),e.showDelete&&r()(c.a,{kind:l.b.DANGER,
onPress:e.onDeletePress},void 0,n.i(o.default)("Delete")))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(22),u=n(568),c=n(146);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.activeSelectionItems,i=e.onDeselectAllPress,a=u()(e,["activeSelectionItems","onDeselectAllPress"]),s=t.length;return o()(g.a,{className:S.a.multiSelectPageHeader},void 0,o()(m.a,{},void 0,o()("div",{className:S.a.selectedTitle},void 0,o()(p.a,{name:"plex-icon-selected-560",className:S.a.icon
}),1===s?n.i(h.default)("1 item selected"):n.i(h.default)("{selectedItemsCount} items selected",{selectedItemsCount:s})),o()(f.a,{className:S.a.deselectLink,onPress:i},void 0,o()(p.a,{name:"plex-icon-remove-560",className:S.a.icon}),n.i(h.default)("Deselect All"))),o()(v.a,{},void 0,d.a.createElement(y.a,r()({selectedItemsCount:s},a))))}var a=n(6),r=n.n(a),s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(29),f=n(25),g=n(170),m=n(171),v=n(198),y=n(2365),b=n(2786),S=n.n(b);t.a=i
},function(e,t,n){"use strict";var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(4),m=n(12),v=n(46),y=n(27),b=n(63),S=n(599),I=n(195),w=n(592),M=n(593),C=n(591),D=n(2139),P=n(919),T=n(594),x=n(345),E=n(2363),A=["showPlaySelected","showShuffle","showAddToPlaylist","showToggleWatched","showEdit","showSync"],k=["showRefresh","showAnalyze","showMerge","showOptimize","showDelete"],L=function(e){function t(i,a){l()(this,t)
;var r=c()(this,e.call(this,i,a));return r.onPlaySelectedShortcut=function(){var e=r.props,t=e.showPlaySelected,n=e.showPlaySelectedOverflow,i=e.onPlaySelectedPress;(t||n)&&i()},r.onToggleWatchedShortcut=function(){var e=r.props,t=e.showMarkWatched,n=e.showMarkUnwatched;t?r.setState({isConfirmMarkWatchedModalOpen:!0}):n&&r.setState({isConfirmMarkUnwatchedModalOpen:!0})},r.onEditShortcut=function(){var e=r.props,t=e.showEdit,n=e.showEditOverflow,i=e.onEditPress;(t||n)&&i()},
r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.onMarkWatchedPress=function(e){r.setState({isConfirmMarkWatchedModalOpen:!0})},r.onMarkUnwatchedPress=function(e){r.setState({isConfirmMarkUnwatchedModalOpen:!0})},r.onMarkWatchedConfirm=function(){r.setState({isConfirmMarkWatchedModalOpen:!1}),r.props.onMarkWatchedConfirm()},r.onMarkWatchedCancel=function(){r.setState({
isConfirmMarkWatchedModalOpen:!1})},r.onMarkUnwatchedConfirm=function(){r.setState({isConfirmMarkUnwatchedModalOpen:!1}),r.props.onMarkUnwatchedConfirm()},r.onMarkUnwatchedCancel=function(){r.setState({isConfirmMarkUnwatchedModalOpen:!1})},r.onDeletePress=function(e){r.setState({isConfirmDeleteModalOpen:!0})},r.onDeleteConfirm=function(e){r.setState({isConfirmDeleteModalOpen:!1}),r.props.onDeleteConfirm()},r.onDeleteCancel=function(){r.setState({isConfirmDeleteModalOpen:!1})},r.state={
isActionsMenuOpen:!1,isConfirmMarkWatchedModalOpen:!1,isConfirmMarkUnwatchedModalOpen:!1,isConfirmDeleteModalOpen:!1},r._moreButtonID=n.i(b.a)(),r}return h()(t,e),t.prototype.componentDidMount=function(){m.a.on("shortcut:playSelected",this.onPlaySelectedShortcut),m.a.on("shortcut:toggleWatched",this.onToggleWatchedShortcut),m.a.on("shortcut:edit",this.onEditShortcut)},t.prototype.shouldComponentUpdate=function(e,t){return n.i(y.a)(this,e,t)},t.prototype.componentWillUnmount=function(){
m.a.off("shortcut:playSelected",this.onPlaySelectedShortcut),m.a.off("shortcut:toggleWatched",this.onToggleWatchedShortcut),m.a.off("shortcut:edit",this.onEditShortcut)},t.prototype.render=function(){
var e=this.props,t=e.className,i=e.selectedItemsCount,r=e.showPlaySelected,o=e.showPlaySelectedOverflow,l=e.showShuffle,u=e.showShuffleOverflow,c=e.showAddToPlaylist,d=e.showAddToPlaylistOverflow,h=e.showToggleWatched,p=e.showToggleWatchedOverflow,m=e.showMarkWatched,y=e.showMarkUnwatched,b=e.showEdit,S=e.showEditOverflow,A=e.showSync,k=e.showSyncOverflow,L=e.showOverflow,_=e.onPlaySelectedPress,N=e.onShufflePress,R=e.onAddToPlaylistPress,O=e.onEditPress,j=e.onSyncPress,z=this.state,U=z.isActionsMenuOpen,F=z.isConfirmMarkWatchedModalOpen,B=z.isConfirmMarkUnwatchedModalOpen,V=z.isConfirmDeleteModalOpen
;return s()("div",{className:t},void 0,r&&s()(w.a,{playLabel:n.i(g.default)("Play Selected"),onPress:_}),l&&s()(M.a,{onPress:N}),c&&s()(C.a,{onPress:R}),h&&s()(D.a,{showMarkWatched:m,showMarkUnwatched:y,onMarkWatchedPress:this.onMarkWatchedPress,onMarkUnwatchedPress:this.onMarkUnwatchedPress}),b&&s()(P.a,{onPress:O}),A&&s()(T.a,{onPress:j}),L&&s()(x.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:n.i(g.default)("More..."),isMenuOpen:U,onPress:this.onActionsPress
}),f.a.createElement(E.a,a()({},this.props,{target:this._moreButtonID,isOpen:U,showPlaySelected:o,showShuffle:u,showAddToPlaylist:d,showMarkWatched:p&&m,showMarkUnwatched:p&&y,showEdit:S,showSync:k,onMenuClose:this.onActionsMenuClose,onMarkWatchedPress:this.onMarkWatchedPress,onMarkUnwatchedPress:this.onMarkUnwatchedPress,onDeletePress:this.onDeletePress})),s()(I.a,{isOpen:F,metricsPage:v.w,title:n.i(g.default)("Mark Watched"),
message:1===i?n.i(g.default)("Are you sure you want to mark this item as watched?"):n.i(g.default)("Are you sure you want to mark these {selectedItemsCount} items as watched?",{selectedItemsCount:i}),onConfirm:this.onMarkWatchedConfirm,onCancel:this.onMarkWatchedCancel}),s()(I.a,{isOpen:B,metricsPage:v.v,title:n.i(g.default)("Mark Unwatched"),
message:1===i?n.i(g.default)("Are you sure you want to mark this item as unwatched?"):n.i(g.default)("Are you sure you want to mark these {selectedItemsCount} items as unwatched?",{selectedItemsCount:i}),onConfirm:this.onMarkUnwatchedConfirm,onCancel:this.onMarkUnwatchedCancel}),s()(I.a,{isOpen:V,metricsPage:v.x,title:n.i(g.default)("Delete"),
message:1===i?n.i(g.default)("Are you sure you want to delete this item from your filesystem?"):n.i(g.default)("Are you sure you want to delete these {selectedItemsCount} items from your filesystem?",{selectedItemsCount:i}),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel}))},t}(p.Component);t.a=n.i(S.a)(L,A,k)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(166)),p=n(63),f=n(204),g=n.n(f),m=n(256),v=n(74),y=n(2379),b=n(2389),S=n(2368),I=n(2377),w=n(2787),M=n.n(w),C=n.i(h.a)(g.a.menuSpeed),D=a()(S.a,{}),P=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onMenuButtonPress=function(e){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(e){r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1},r._serverMenuButtonID=n.i(p.a)(),r}return c()(t,e),t.prototype.componentDidUpdate=function(e,t){var n=this
;!t.isMenuOpen&&this.state.isMenuOpen&&(this._openTimeoutID=setTimeout(function(){return n.props.onServerMenuOpen()},C))},t.prototype.componentWillUnmount=function(){this._openTimeoutID&&clearTimeout(this._openTimeoutID)},t.prototype.render=function(){var e=this.props,t=e.primaryServerEntityID,n=e.serverEntityIDs,i=e.canProvisionPersonalCloudServer,r=this.state.isMenuOpen;return a()(m.a,{page:"sidebar",isDelegated:!0},void 0,a()("div",{className:M.a.sidebar},void 0,a()(y.a,{
id:this._serverMenuButtonID,hasPrimaryServer:!!t,serverEntityID:t,isMenuOpen:r,onPress:this.onMenuButtonPress}),a()(v.a,{className:M.a.sidebarScroller,autoScroll:!0},void 0,a()("div",{className:M.a.sidebarContent},void 0,t?a()(b.a,{serverEntityID:t}):D)),a()(I.a,{target:this._serverMenuButtonID,isOpen:r,canProvisionPersonalCloudServer:i,serverEntityIDs:n,onMenuClose:this.onMenuClose})))},t}(d.Component);t.a=P},function(e,t,n){"use strict";function i(e){
var t=e.outOfDateServers,n=e.isWaitingForPrimaryServer,i=e.isUserRestricted,a=e.canProvisionPersonalCloudServer,s=e.onLinkPersonalCloudServerPress;return n?h:t.length?r()(u.a,{outOfDateServers:t}):i?p:a?r()(d.a,{onPress:s}):f}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(2369)),l=n(2371),u=n(2372),c=n(2373),d=n(2370),h=r()(c.a,{}),p=r()(l.a,{}),f=r()(o.a,{});t.a=i},function(e,t,n){"use strict";function i(){return n.i(g.createStructuredSelector)({outOfDateServers:m.a,
isWaitingForPrimaryServer:function(e){return e.isWaitingForPrimaryServer},isUserRestricted:function(e){return!!e.user.restricted},canProvisionPersonalCloudServer:v.a})}var a=n(6),r=n.n(a),s=n(9),o=n.n(s),l=n(11),u=n.n(l),c=n(10),d=n.n(c),h=n(1),p=n.n(h),f=n(14),g=n(8),m=(n.n(g),n(729)),v=n(373),y=n(167),b=n(2367),S={showProvisionPersonalCloudServerModal:y.a},I=function(e){function t(){var n,i,a;o()(this,t);for(var r=arguments.length,s=Array(r),l=0;l<r;l++)s[l]=arguments[l]
;return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.onLinkPersonalCloudServerPress=function(e){i.props.showProvisionPersonalCloudServerModal({open:!0})},a=n,u()(i,a)}return d()(t,e),t.prototype.render=function(){return p.a.createElement(b.a,r()({},this.props,{onLinkPersonalCloudServerPress:this.onLinkPersonalCloudServerPress}))},t}(h.Component);t.a=n.i(f.b)(i,S)(I)},function(e,t,n){"use strict";function i(){return r()(l.a,{
message:n.i(o.default)("A server could not be found. Download and install Plex Media Server, and it will appear here.")},void 0,r()(u.a,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560",title:n.i(o.default)("Where is my server?")}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(234),u=n(174);t.a=i},function(e,t,n){"use strict";function i(e){return r()("div",{},void 0,r()(l.a,{
message:n.i(o.default)("Don't have a computer to run Plex Media Server? You can get started with Plex Cloud right now!")},void 0,r()(u.a,{icon:"plex-icon-personal-cloud-560",title:n.i(o.default)("Set up Plex Cloud..."),onPress:e.onPress})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(234),u=n(174);t.a=i},function(e,t,n){"use strict";function i(){return r()(l.a,{message:n.i(o.default)("No one in your home has shared a library with you.")},void 0,r()(u.a,{
to:"https://support.plex.tv/hc/en-us/articles/204234313-Example-Plex-Home-Setup",target:"_blank",icon:"plex-icon-help-560",title:n.i(o.default)("Learn more")}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(234),u=n(174);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,i=t.map(function(e){return'"'+e.friendlyName+'"'}),a=n.i(l.a)(i),s=void 0;return s=1===t.length?n.i(o.default)("The server {serverName} needs an update.",{serverName:a
}):n.i(o.default)("The servers {serverNames} need updates.",{serverNames:a}),r()(u.a,{message:s})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(788),u=n(234);t.a=i},function(e,t,n){"use strict";function i(){return r()(l.a,{message:n.i(o.default)("Please wait while servers are discovered.")})}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(234);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(30)),p=n.n(h),f=n(4),g=n(68),m=n(1418),v=n(27),y=n(29),b=n(392),S=n(952),I=n(951),w=n(1002),M=n.n(w),C=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){if(!this.props.isPrimaryEligible||!this.props.friendlyName)return null
;var e=this.props,t=e.className,i=e.isSelected,r=e.isConnected,s=e.isUnavailable,o=e.isSecure,l=e.isRelayed,u=e.machineIdentifier,c=e.friendlyName,d=e.onPress,h=n.i(m.a)(this.props),v=h.isConnecting,w=h.statusWithSource;return a()(b.a,{action:g.d},void 0,a()(S.a,{className:p()(t,(v||s)&&M.a.disabledServerMenuItem,i&&M.a.selectedServerMenuItem),to:"#!/server/"+u+"/dashboard",isDisabled:v,machineIdentifier:u,title:c,details:w,onPress:d},void 0,i&&a()(y.a,{name:"plex-icon-selected-560",
className:p()(M.a.serverMenuIcon,M.a.selectedIcon),"aria-label":n.i(f.default)("Selected")}),a()(I.a,{className:M.a.serverMenuIcon,isConnected:r,isUnavailable:s,isSecure:o,isRelayed:!i&&l})))},t}(d.Component);t.a=C},function(e,t,n){"use strict";function i(e){var t=e.onPress;return r()(u.a,{machineIdentifier:"plexCloud",title:n.i(o.default)("Plex Cloud"),details:n.i(o.default)("Set up Plex Cloud\u2026"),onPress:t},void 0,r()(l.a,{className:d.a.personalCloudIcon,
name:"plex-icon-personal-cloud-560","aria-label":n.i(o.default)("Plex Cloud")}))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(29),u=n(952),c=n(2791),d=n.n(c);t.a=i},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(8)),p=(n.n(h),n(14)),f=n(167),g=n(373),m=n(2375),v=n.i(h.createStructuredSelector)({isNotInterested:function(e){return e.experienceSettings.isNotInterestedInPersonalCloud},canProvisionPersonalCloudServer:g.a}),y={
showProvisionPersonalCloudServerModal:f.a},b=function(e){function t(){var n,i,a;s()(this,t);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return n=i=l()(this,e.call.apply(e,[this].concat(o))),S.call(i),a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){return this.props.canProvisionPersonalCloudServer&&!this.props.isNotInterested?a()(m.a,{onPress:this.onPress}):null},t}(d.Component),S=function(){var e=this;this.onPress=function(){var t
;(t=e.props).onPress.apply(t,arguments),e.props.showProvisionPersonalCloudServerModal({open:!0})}};t.a=n.i(p.b)(v,y)(b)},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.serverEntityIDs,a=e.onMenuClose;return r()(d.a,{className:g.a.serverMenu,target:t,isOpen:n,scrollerProps:y,maxHeight:v,onMenuClose:a},void 0,r()(c.a,{page:"serverPicker"},void 0,r()(p.a,{onPress:a}),i.map(function(e){return r()(h.a,{serverEntityID:e},e)})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(76)),l=n.n(o),u=n(22),c=n(1414),d=n(80),h=n(2380),p=n(2376),f=n(2792),g=n.n(f),m=parseInt(l.a.serverMenuItemHeight,10),v=5*m,y={className:g.a.serverMenuScroller,scrollDirection:u.a.VERTICAL,autoScroll:!0};t.a=i},function(e,t,n){"use strict";function i(e){var t=e.hasPrimaryServer,n=u()(e,["hasPrimaryServer"]);return t?d.a.createElement(r,n):d.a.createElement(a,n)}function a(e){var t=e.id;return o()(m.a,{id:t,className:b.a.serverMenuButton,isSelected:!0,isDisabled:!0},void 0,o()("div",{
className:b.a.serverMenuButtonContainer},void 0,o()("span",{className:b.a.serverMenuTitle},void 0,n.i(h.default)("Looking for servers...")),o()(f.a,{size:p.d.SMALL,className:b.a.serverMenuSpinner})))}function r(e){var t=e.id,i=e.friendlyName,a=e.sourceTitle,r=e.isConnected,s=e.isUnavailable,l=e.isSecure,u=e.isRelayed,c=e.isMenuOpen,d=e.onPress,f=void 0;return u&&a?f=n.i(h.default)("Indirect ({serverName})",{serverName:a}):u?f=n.i(h.default)("Indirect"):a&&(f=a),o()(m.a,{id:t,
className:b.a.serverMenuButton,"aria-haspopup":!0,"data-qa-id":"serverMenuButton",isSelected:!0,onPress:d},void 0,o()("div",{className:b.a.serverMenuButtonContainer},void 0,o()("span",{className:b.a.serverMenuTitle},void 0,o()("span",{className:b.a.serverMenuFriendlyNameContainer},void 0,o()("span",{className:b.a.serverMenuFriendlyName},void 0,i),o()(g.a,{direction:c?p.f.UP:p.f.DOWN,isSelected:!0})),f&&o()("span",{className:b.a.serverMenuUsername},void 0,f)),o()(v.a,{className:b.a.icon,
isConnected:r,isUnavailable:s,isSecure:l})))}var s=n(3),o=n.n(s),l=n(16),u=n.n(l),c=n(1),d=n.n(c),h=n(4),p=n(22),f=n(36),g=n(563),m=n(25),v=n(951),y=n(2793),b=n.n(y);t.a=i},function(e,t,n){"use strict";function i(){return n.i(c.createSelector)(n.i(d.a)(),function(e){return s.a.pick(e,"friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed")})}function a(e){return l.a.createElement(h.a,e)}var r=n(2),s=n.n(r),o=n(1),l=n.n(o),u=n(14),c=n(8),d=(n.n(c),n(54)),h=n(2378)
;t.a=n.i(u.b)(i)(a)},function(e,t,n){"use strict";function i(){return n.i(h.createSelector)(n.i(p.a)(),function(e){return e.primaryServer},function(e,t){var n=l.a.pick(e,"machineIdentifier","friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isCloudSyncServer","isPrimaryEligible","activeConnection","isOutOfDate","isRelayed");return s()({},n,{isSelected:e.entityID===t})})}function a(e){return c.a.createElement(f.a,e)}
var r=n(6),s=n.n(r),o=n(2),l=n.n(o),u=n(1),c=n.n(u),d=n(14),h=n(8),p=(n.n(h),n(54)),f=n(2374);t.a=n.i(d.b)(i)(a)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(4),g=n(66),m=n(46),v=n(27),y=n(63),b=n(195),S=n(2382),I=n(953),w=n(2796),M=n.n(w),C=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen
}),r.props.onActionsMenuOpen&&r.props.onActionsMenuOpen()},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1}),r.props.onActionsMenuClose&&r.props.onActionsMenuClose()},r.onOptimizeDatabasePress=function(e){r.setState({isOptimizeModalOpen:!0})},r.onOptimizeConfirm=function(){r.props.onOptimizeDatabaseConfirm()},r.onOptimizeCancel=function(){r.setState({isOptimizeModalOpen:!1})},r.onCleanBundlesPress=function(e){r.setState({isCleanBundlesModalOpen:!0})},
r.onCleanBundlesConfirm=function(){r.props.onCleanBundlesConfirm()},r.onCleanBundlesCancel=function(){r.setState({isCleanBundlesModalOpen:!1})},r.onEmptyTrashPress=function(e){r.setState({isEmptyTrashModalOpen:!0})},r.onEmptyTrashConfirm=function(){r.setState({isEmptyTrashModalOpen:!1}),r.props.onEmptyTrashConfirm()},r.onEmptyTrashCancel=function(){r.setState({isEmptyTrashModalOpen:!1})},r.state={isActionsMenuOpen:!1,isOptimizeModalOpen:!1,isCleanBundlesModalOpen:!1,isEmptyTrashModalOpen:!1},
r._actionsMenuButtonID=n.i(y.a)(),r}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isOptimizeDatabaseInProgress&&!e.isOptimizeDatabaseInProgress&&this.setState({isOptimizeModalOpen:!1}),this.props.isCleanBundlesInProgress&&!e.isCleanBundlesInProgress&&this.setState({isCleanBundlesModalOpen:!1})},t.prototype.shouldComponentUpdate=function(e,t){return n.i(v.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.className,i=e.isHovered,r=e.isLibraryRefreshing,s=e.isOptimizeDatabaseInProgress,o=e.isCleanBundlesInProgress,l=g.a.hasTouchScreen||i||this.state.isActionsMenuOpen;return a()("div",{className:p()(t,l&&M.a.isVisible),role:"menu"},void 0,a()(I.a,{className:M.a.action,"data-qa-id":"sidebarLibrariesAddButton",icon:"plex-icon-add-560",title:n.i(f.default)("Add Library"),onPress:this.props.onAddLibraryPress}),a()(I.a,{id:this._actionsMenuButtonID,className:M.a.action,
"aria-haspopup":"true","data-qa-id":"sidebarLibrariesMoreButton",icon:"plex-icon-more-560",title:n.i(f.default)("More Actions"),onPress:this.onActionsPress}),a()(S.a,{target:this._actionsMenuButtonID,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:r,onMenuClose:this.onActionsMenuClose,onSharePress:this.props.onSharePress,onUpdateLibrariesPress:this.props.onUpdateLibrariesPress,onCancelUpdatePress:this.props.onCancelUpdatePress,onOptimizeDatabasePress:this.onOptimizeDatabasePress,
onCleanBundlesPress:this.onCleanBundlesPress,onEmptyTrashPress:this.onEmptyTrashPress}),a()(b.a,{isOpen:this.state.isOptimizeModalOpen,isConfirmButtonSpinning:s,isCancelButtonDisabled:s,metricsPage:m.i,title:n.i(f.default)("Optimize Database"),message:n.i(f.default)("Cleans up the library database and ensures it is operating as quickly as possible. This is especially useful when you've added or removed a large amount of media from the library."),confirmLabel:n.i(f.default)("Optimize"),
onConfirm:this.onOptimizeConfirm,onCancel:this.onOptimizeCancel}),a()(b.a,{isOpen:this.state.isCleanBundlesModalOpen,isConfirmButtonSpinning:o,isCancelButtonDisabled:o,metricsPage:m.j,title:n.i(f.default)("Clean Bundles"),message:n.i(f.default)("The media server stores information about your media to disk, as well as posters, artwork, and other media resources from the internet. Running this task deletes any bundles which are no longer in use."),confirmLabel:n.i(f.default)("Clean"),
onConfirm:this.onCleanBundlesConfirm,onCancel:this.onCleanBundlesCancel}),a()(b.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:m.k,title:n.i(f.default)("Empty Trash"),message:n.i(f.default)("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),confirmLabel:n.i(f.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,
onCancel:this.onEmptyTrashCancel}))},t}(d.Component);C.defaultProps={className:M.a.actions},t.a=C},function(e,t,n){"use strict";function i(e){var t=e.isLibraryRefreshing,i=e.onSharePress,a=e.onUpdateLibrariesPress,s=e.onCancelUpdatePress,l=e.onOptimizeDatabasePress,p=e.onCleanBundlesPress,f=e.onEmptyTrashPress,g=o()(e,["isLibraryRefreshing","onSharePress","onUpdateLibrariesPress","onCancelUpdatePress","onOptimizeDatabasePress","onCleanBundlesPress","onEmptyTrashPress"])
;return u.a.createElement(d.a,g,r()(h.a,{onPress:i},void 0,n.i(c.default)("Share...")),t?r()(h.a,{onPress:s},void 0,n.i(c.default)("Cancel Scan")):r()(h.a,{onPress:a},void 0,n.i(c.default)("Scan Library Files")),r()(h.a,{onPress:l},void 0,n.i(c.default)("Optimize Database")),r()(h.a,{onPress:p},void 0,n.i(c.default)("Clean Bundles")),r()(h.a,{onPress:f},void 0,n.i(c.default)("Empty Trash")))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(80),h=n(146);t.a=i},function(e,t,n){
"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(30)),p=n.n(h),f=n(4),g=n(128),m=n(46),v=n(63),y=n(82),b=n(195),S=n(950),I=n(949),w=n(953),M=n(2384),C=n(2797),D=n.n(C),P=function(e){function t(i,a){s()(this,t);var r=l()(this,e.call(this,i,a));return r.onActionsPress=function(){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.onAnalyzePress=function(){r.setState({
isAnalyzeModalOpen:!0})},r.onAnalyzeConfirm=function(){r.setState({isAnalyzeModalOpen:!1}),r.props.onAnalyzeLibraryPress()},r.onAnalyzeCancel=function(){r.setState({isAnalyzeModalOpen:!1})},r.onRefreshAllPress=function(){r.setState({isRefreshAllModalOpen:!0})},r.onRefreshAllConfirm=function(){r.setState({isRefreshAllModalOpen:!1}),r.props.onRefreshLibraryPress()},r.onRefreshAllCancel=function(){r.setState({isRefreshAllModalOpen:!1})},r.onEmptyTrashPress=function(){r.setState({
isEmptyTrashModalOpen:!0})},r.onEmptyTrashConfirm=function(){r.setState({isEmptyTrashModalOpen:!1}),r.props.onEmptyTrashLibraryPress()},r.onEmptyTrashCancel=function(){r.setState({isEmptyTrashModalOpen:!1})},r.onDeletePress=function(){r.setState({isDeleteModalOpen:!0})},r.onDeleteConfirm=function(){r.props.onDeleteLibraryPress()},r.onDeleteCancel=function(){r.setState({isDeleteModalOpen:!1})},r.state={isActionsMenuOpen:!1,isAnalyzeModalOpen:!1,isRefreshAllModalOpen:!1,isEmptyTrashModalOpen:!1,
isDeleteModalOpen:!1},r._actionsMenuButtonID=n.i(v.a)(),r}return c()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isLibraryDeleteInProgress&&!e.isLibraryDeleteInProgress&&this.setState({isDeleteModalOpen:!1})},t.prototype.render=function(){
var e=this.props,t=e.libraryKey,i=e.route,r=e.type,s=e.title,o=e.refreshing,l=e.isLibraryDeleteInProgress,u=e.isFullOwnedServer,c=e.isSelected,d=e.onShareLibraryPress,h=e.onUpdateLibraryPress,v=e.onCancelUpdateLibraryPress,C=e.onEditLibraryPress;return a()(S.a,{className:D.a.libraryListItem},void 0,a()(I.a,{"data-qa-id":"sidebarLibraryItem--"+t,to:i,icon:g.a.get(r).sectionTypeIcon,title:s,showSpinner:u&&o,isSelected:c}),u&&a()(w.a,{id:this._actionsMenuButtonID,
className:p()(D.a.action,this.state.isActionsMenuOpen&&D.a.isVisible),"data-qa-id":"sidebarLibraryMoreButton",icon:"plex-icon-more-560",title:n.i(f.default)("More Actions"),onPress:this.onActionsPress}),a()(M.a,{target:this._actionsMenuButtonID,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:o,onMenuClose:this.onActionsMenuClose,onSharePress:d,onUpdatePress:h,onCancelUpdatePress:v,onEditPress:C,onAnalyzePress:this.onAnalyzePress,onRefreshAllPress:this.onRefreshAllPress,
onEmptyTrashPress:this.onEmptyTrashPress,onDeletePress:this.onDeletePress}),a()(b.a,{isOpen:this.state.isAnalyzeModalOpen,metricsPage:m.e,title:n.i(f.default)("Analyze Library"),message:n.i(f.default)("Analyzes all the media files in the library. The analysis captures information about the media which helps Plex decide how to optimally play back the media."),confirmLabel:n.i(f.default)("Analyze"),onConfirm:this.onAnalyzeConfirm,onCancel:this.onAnalyzeCancel}),a()(b.a,{
isOpen:this.state.isRefreshAllModalOpen,metricsPage:m.f,title:n.i(f.default)("Refresh All Metadata"),message:n.i(f.default)("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:n.i(f.default)("Refresh"),onConfirm:this.onRefreshAllConfirm,onCancel:this.onRefreshAllCancel}),a()(b.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:m.g,title:n.i(f.default)("Empty Trash"),
message:n.i(f.default)("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),confirmLabel:n.i(f.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}),a()(b.a,{isOpen:this.state.isDeleteModalOpen,isConfirmButtonSpinning:l,isCancelButtonDisabled:l,metricsPage:m.h,kind:y.DANGER,
title:n.i(f.default)("Delete Library"),message:n.i(f.default)('The library "{libraryName}" will be removed from this server. Your media files will not be affected. This can\'t be undone. Continue?',{libraryName:s}),accordMessage:n.i(f.default)('Yes, delete the library "{libraryName}"',{libraryName:s}),confirmLabel:n.i(f.default)("Delete"),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel}))},t}(d.Component);P.defaultProps={refreshing:!1},t.a=P},function(e,t,n){"use strict"
;function i(e){var t=e.isLibraryRefreshing,i=e.onSharePress,a=e.onUpdatePress,s=e.onCancelUpdatePress,l=e.onEditPress,f=e.onAnalyzePress,g=e.onRefreshAllPress,m=e.onEmptyTrashPress,v=e.onDeletePress,y=o()(e,["isLibraryRefreshing","onSharePress","onUpdatePress","onCancelUpdatePress","onEditPress","onAnalyzePress","onRefreshAllPress","onEmptyTrashPress","onDeletePress"]);return u.a.createElement(d.a,y,r()(h.a,{onPress:i},void 0,n.i(c.default)("Share...")),t?r()(h.a,{onPress:s
},void 0,n.i(c.default)("Cancel Scan")):r()(h.a,{onPress:a},void 0,n.i(c.default)("Scan Library Files")),r()(h.a,{onPress:l},void 0,n.i(c.default)("Edit")),r()(h.a,{onPress:f},void 0,n.i(c.default)("Analyze")),r()(h.a,{onPress:g},void 0,n.i(c.default)("Refresh All Metadata")),r()(h.a,{onPress:m},void 0,n.i(c.default)("Empty Trash")),r()(h.a,{kind:p.b.DANGER,onPress:v},void 0,n.i(c.default)("Delete")))}var a=n(3),r=n.n(a),s=n(16),o=n.n(s),l=n(1),u=n.n(l),c=n(4),d=n(80),h=n(146),p=n(22);t.a=i
},function(e,t,n){"use strict";function i(){return n.i(m.createSelector)(function(e){return e.ui.quickSearch},function(e){return e.ui.background.isBackgroundPending},n.i(b.a)(),function(e,t,n){var i=e.providerIdentifier,a=e.sectionID;t||(x=i,E=a);var r=t?x:i,s=t?E:a;return r===v.a.LIBRARY_PROVIDER_IDENTIFIER&&s===n.key})}function a(){return n.i(m.createSelector)(n.i(y.a)(),n.i(b.a)(),S.a,n.i(I.c)(),i(),function(e,t,i,a,r){
var s=t.key,o=t.title,l=void 0===o?"":o,u=t.type,c=t.agent,d=t.refreshing,h="movie"===u&&"com.plexapp.agents.none"===c,p="photo"===u&&e.itemClusters&&e.ownerFeatures.indexOf("item_clusters")!==-1,f=e.entityID+"!/library/sections/"+t.key,g=i[f],m={isLibraryProvider:!0},v=p&&n.i(D.a)(e,m,s),y=n.i(C.a)(e,m,s,I),b=g||v||y,S=l.trim(),I=e.isCloudSyncServer?{type:u,title:S}:{};return{libraryKey:s,route:b,title:S,type:h?"videos":u,refreshing:d,isLibraryDeleteInProgress:!!a,
isFullOwnedServer:e.isFullOwnedServer,isSelected:r}})}function r(e,t){var i={serverEntityID:t.serverEntityID,libraryEntityID:t.libraryEntityID,metricsPage:t.metricsPage};return{dispatchFetchLibraries:function(){e(n.i(w.b)({serverEntityID:t.serverEntityID}))},onShareLibraryPress:function(){e(M.a(i))},onUpdateLibraryPress:function(){e(M.b(i))},onCancelUpdateLibraryPress:function(){e(M.c(i))},onEditLibraryPress:function(){e(M.d(i))},onAnalyzeLibraryPress:function(){e(M.e(i))},
onRefreshLibraryPress:function(){e(M.f(i))},onEmptyTrashLibraryPress:function(){e(M.g(i))},onDeleteLibraryPress:function(){e(M.h(i))}}}var s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(8),v=(n.n(m),n(73)),y=n(54),b=n(1276),S=n(846),I=n(844),w=n(88),M=n(1667),C=n(94),D=n(968),P=n(129),T=n(2383),x=void 0,E=void 0,A=function(e){function t(){return u()(this,t),d()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.componentDidUpdate=function(e){
e.isLibraryDeleteInProgress&&!this.props.isLibraryDeleteInProgress&&this.props.dispatchFetchLibraries()},t.prototype.render=function(){var e=this.props,t=(e.metricsPage,e.dispatchFetchLibraries,o()(e,["metricsPage","dispatchFetchLibraries"]));return g.a.createElement(T.a,t)},t}(f.Component);t.a=n.i(P.a)(a,r)(A)},function(e,t,n){"use strict";function i(e){return l.a.EPG_IDENTIFIER.test(e)?"plex-icon-shows-broadcast-560":"plex-icon-channels-560"}function a(e){
var t=e.machineIdentifier,n=e.identifier,a=e.isLibraryProvider,r=e.title,o=e.isRefreshing;if(a)return null;var l=encodeURIComponent(t),c=encodeURIComponent(n);return s()(u.a,{to:"#!/server/"+l+"/provider/"+c,icon:i(n),title:r,showSpinner:o,highlightActiveRoute:!0})}var r=n(3),s=n.n(r),o=n(1),l=(n.n(o),n(73)),u=n(174);t.a=a},function(e,t,n){"use strict";function i(e){return o.a.createElement(h.a,e)}var a=n(2),r=n.n(a),s=n(1),o=n.n(s),l=n(14),u=n(8),c=(n.n(u),
n(127)),d=n(401),h=n(2386),p=function(){return n.i(u.createSelector)(n.i(c.a)(),n.i(d.a)(),function(e,t){var n=r.a.pick(e,"identifier","isLibraryProvider","title");return n.isRefreshing=!!t,n})};t.a=n.i(l.b)(p)(i)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,i=e.machineIdentifier,a=e.allowChannelAccess,s=e.isFullOwnedServer,v=e.isConnected,b=e.isClaimed,S=e.isLibrariesPopulated,I=e.librariesError,w=e.contentProviders,M=e.isProvidersPopulated,C=e.providersError,D=e.showRecordingSchedule;if(!v)return o.a.createElement(m.a,e);var P=!M&&!C,T=!S&&!I;if(P||T)return r()(c.a,{containerClassName:y.a.spinnerContainer,label:n.i(l.default)("Loading libraries")});var x=encodeURIComponent(i);return r()("div",{},void 0,s&&r()(d.a,{
title:n.i(l.default)("Manage")},void 0,r()(h.a,{to:"#!/status",icon:"plex-icon-status-560",title:n.i(l.default)("Status")},"status"),r()(h.a,{to:"#!/settings/server",icon:"plex-icon-settings-560",title:n.i(l.default)("Settings")},"settings",!b&&r()(u.a,{name:"plex-icon-alert-560",className:y.a.unclaimedIcon,"aria-label":n.i(l.default)("Unclaimed")})),D&&r()(h.a,{to:"#!/server/"+x+"/schedule",icon:"plex-icon-calendar-560",title:n.i(l.default)("Recording Schedule"),highlightActiveRoute:!0
},"schedule"),w.map(function(e){return r()(p.a,{serverEntityID:t,providerEntityID:e,machineIdentifier:i},e)})),o.a.createElement(f.a,e),r()(g.a,{machineIdentifier:i,showChannels:a}))}var a=n(3),r=n.n(a),s=n(1),o=n.n(s),l=n(4),u=n(29),c=n(36),d=n(607),h=n(174),p=n(2387),f=n(2390),g=n(2392),m=n(2394),v=n(2798),y=n.n(v);t.a=i},function(e,t,n){"use strict";function i(){return n.i(b.createSelector)(n.i(w.a)(),C.a(),C.b(),n.i(M.a)(I.a.CONTENT),n.i(M.a)(I.a.SUBSCRIBE),n.i(D.a)(),function(e,t,n,i,a,r){
var s=m.a.pick(e,"machineIdentifier","friendlyName","promiseState","presence","allowChannelAccess","isConnected","isFullServer","isFullOwnedServer","isPersonalCloudServer","isBundled","isClaimed","hasHttpsConnections","hasFallbackConnections"),o=m.a.pick(e&&e.desktop,"libraries","isLibrariesPending","isLibrariesPopulated","librariesError","isProvidersPending","isProvidersPopulated","providersError");return f()({},s,o,{contentProviders:i,showRecordingSchedule:!!a.length,isLibraryRefreshing:r,
isOptimizeDatabaseInProgress:!!t,isCleanBundlesInProgress:!!n})})}function a(e,t){var i={serverEntityID:t.serverEntityID,metricsPage:t.metricsPage};return{dispatchFetchLibraries:function(){e(T.b(i))},dispatchFetchProviders:function(){e(T.d(i))},onReloadHttpPress:function(){e(n.i(P.d)())},onReloadHttpAlwaysPress:function(){e(n.i(P.e)()),e(n.i(P.d)())},onRestartPress:function(){e(T.f(i))},onDeleteServerConfirm:function(){e(T.g(i))},onAddLibraryPress:function(){e(T.a(i))},onSharePress:function(){
e(T.h(i))},onUpdateLibrariesPress:function(){e(T.i(i))},onCancelUpdatePress:function(){e(T.j(i))},onOptimizeDatabaseConfirm:function(){e(T.k(i))},onCleanBundlesConfirm:function(){e(T.l(i))},onEmptyTrashConfirm:function(){e(T.m(i))},onTryAgainPress:function(){e(n.i(P.g)()),e(T.n(i))},onAllowFallbackPress:function(){e(T.o(i))}}}var r=n(16),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(6),f=n.n(p),g=n(2),m=n.n(g),v=n(1),y=n.n(v),b=n(8),S=(n.n(b),
n(41)),I=n(139),w=n(54),M=n(726),C=n(844),D=n(547),P=n(79),T=n(88),x=n(129),E=n(2388),A=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.isConnected&&this._populate()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.serverEntityID,i=t.isConnected,a=n!==e.serverEntityID,r=i!==e.isConnected;i&&(a||r)&&this._populate()},t.prototype._populate=function(){var e=this;n.i(S.a)(function(){
e.props.dispatchFetchLibraries(),e.props.dispatchFetchProviders()})},t.prototype.render=function(){var e=this.props,t=(e.metricsPage,e.dispatchFetchLibraries,e.dispatchFetchProviders,s()(e,["metricsPage","dispatchFetchLibraries","dispatchFetchProviders"]));return y.a.createElement(E.a,t)},t}(v.Component);t.a=n.i(x.a)(i,a)(A)},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(16),l=n.n(o),u=n(9),c=n.n(u),d=n(11),h=n.n(d),p=n(10),f=n.n(p),g=n(1),m=n.n(g),v=n(4),y=n(955),b=n(234),S=n(174),I=n(2381),w=n(2385),M=n(2799),C=n.n(M),D=function(e){function t(){return c()(this,t),h()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.hoverableProps,i=e.serverEntityID,r=e.machineIdentifier,o=e.isFullServer,u=e.isFullOwnedServer,c=e.isHovered,d=e.libraries,h=e.librariesError,p=e.onAddLibraryPress,f=l()(e,["hoverableProps","serverEntityID","machineIdentifier","isFullServer","isFullOwnedServer","isHovered","libraries","librariesError","onAddLibraryPress"]),g=!!h&&!d.length,y=u&&!d.length,M=encodeURIComponent(r);return m.a.createElement("div",a()({role:"navigation","data-qa-id":"sidebarLibrariesList"
},t),s()("div",{className:C.a.librariesListHeader,role:"header"},void 0,s()("div",{className:C.a.librariesTitle},void 0,n.i(v.default)("Libraries")),u&&m.a.createElement(I.a,a()({isHovered:c,onAddLibraryPress:p},f))),o&&s()(S.a,{to:"#!/server/"+M+"/playlists",icon:"plex-icon-playlists-560",title:n.i(v.default)("Playlists")},"playlists"),y&&s()(S.a,{icon:"plex-icon-add-560",title:n.i(v.default)("Add Library"),onPress:p},"addLibrary"),g?s()(b.a,{
message:n.i(v.default)("There was an unexpected error loading libraries.")}):d.map(function(e){return s()(w.a,{serverEntityID:i,libraryEntityID:e},e)}))},t}(g.Component);t.a=n.i(y.a)(D)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),n(4)),p=n(410),f=n(607),g=n(174),m=function(e){function t(){return s()(this,t),l()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.render=function(){
var e=this.props,t=e.machineIdentifier,i=e.showChannels,r=e.isUserRestricted,s=e.unwatchedWatchLaterCount,o=e.unwatchedRecommendedCount,l=!r,u=encodeURIComponent(t);return i||l?a()(f.a,{title:n.i(h.default)("Online Content")},void 0,i&&a()(g.a,{to:"#!/server/"+u+"/channels",icon:"plex-icon-channels-560",title:n.i(h.default)("Channels")},"channels"),l&&a()(g.a,{to:"#!/playlist/queue",icon:"plex-icon-watch-later-560",title:n.i(h.default)("Watch Later")
},"watchLater",a()(p.a,{},void 0,s)),l&&a()(g.a,{to:"#!/playlist/recommendations",icon:"plex-icon-recommended-560",title:n.i(h.default)("Recommended")},"recommended",a()(p.a,{},void 0,o))):null},t}(d.Component);t.a=m},function(e,t,n){"use strict";var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=n.n(u),d=n(14),h=n(8),p=(n.n(h),n(41)),f=n(182),g=n(398),m=n(2391),v=n.i(h.createSelector)(f.a,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,isUserRestricted:!!e.restricted,
unwatchedWatchLaterCount:t.unwatchedWatchLaterList.totalSize,unwatchedRecommendedCount:t.unwatchedRecommendedList.totalSize}}),y={repopulateUnwatchedWatchLaterList:g.b,repopulateUnwatchedRecommendedList:g.c},b=function(e){function t(){return a()(this,t),s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillMount=function(){this._populate()},t.prototype.componentWillReceiveProps=function(e){e.isSignedIn!==this.props.isSignedIn&&this._populate(e)},
t.prototype._populate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;e.isSignedIn&&!e.isUserRestricted&&n.i(p.a)(function(){e.repopulateUnwatchedWatchLaterList(),e.repopulateUnwatchedRecommendedList()})},t.prototype.render=function(){return c.a.createElement(m.a,this.props)},t}(u.Component);t.a=n.i(d.b)(function(e){return v(e)},y)(b)},function(e,t,n){"use strict";var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=(n.n(d),
n(4)),p=n(46),f=n(27),g=n(22),m=n(195),v=n(174),y=n(234),b=n(1001),S=n.n(b),I=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onRemoveServerPress=function(e){a.setState({isRemoveModalOpen:!0})},a.onRemoveConfirm=function(){a.setState({isRemoveModalOpen:!1}),a.props.onDeleteServerConfirm(a.props.machineIdentifier)},a.onRemoveCancel=function(){a.setState({isRemoveModalOpen:!1})},a.state={isRemoveModalOpen:!1},a}return c()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.friendlyName,i=e.presence,r=e.isPending,s=e.isBundled,o=e.isFallbackPossible,l=e.isCloudServerConnected,u=e.isCloudServerResourcesPending,c=e.isFullServer,d=e.isFullOwnedServer,f=e.isPersonalCloudServer,b=e.hasHttpsConnections,I=e.hasFallbackConnections,w=e.isPersonalCloudServerRestarting,M=e.onTryAgainPress,C=e.onReloadHttpPress,D=e.onReloadHttpAlwaysPress,P=e.onRestartPress,T=e.onAllowFallbackPress,x=c&&i,E=b&&!I,A=void 0,k=void 0,L=void 0,_=void 0,N=void 0,R=void 0,O=void 0
;f?(A=!1,k=!1,L=!1,_=!1,N=l,R=!1,O=n.i(h.default)("Plex Cloud is unreachable. Make sure you're connected to the internet and try again. If you're still having trouble, you can restart your Plex Cloud server below.")):(A=!o&&x,k=o&&x&&E,L=A||k,_=!L,N=!1,R=d&&!s,O=L?n.i(h.default)('Unable to connect to "{serverName}" securely.',{serverName:t}):n.i(h.default)('The server "{serverName}" is unreachable. Make sure it\'s running, double check your network, and try again.',{serverName:t}))
;var j=u||r,z=j?n.i(h.default)("Connecting"):n.i(h.default)("Try again");return a()(y.a,{message:O},void 0,a()(v.a,{icon:"plex-icon-reload-560",title:z,showSpinner:j,isDisabled:j,onPress:M}),A&&a()("p",{className:S.a.sidebarMessage},void 0,n.i(h.default)("Do you want to allow insecure connections?")),A&&a()(v.a,{icon:"plex-icon-unlock-560",title:n.i(h.default)("Allow once"),onPress:C}),A&&a()(v.a,{icon:"plex-icon-unlock-560",title:n.i(h.default)("Allow always"),onPress:D}),N&&a()(v.a,{
icon:"plex-icon-personal-cloud-560",title:n.i(h.default)("Restart Cloud Server"),showSpinner:w,isDisabled:w,onPress:P}),k&&a()(v.a,{icon:"plex-icon-unlock-560",title:n.i(h.default)("Allow insecure connection"),onPress:T}),L&&a()(v.a,{to:"https://support.plex.tv/hc/en-us/articles/206225077",target:"_blank",icon:"plex-icon-help-560",title:n.i(h.default)("Learn more")}),_&&a()(v.a,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560",
title:n.i(h.default)("Where is my server?")}),R&&a()(v.a,{icon:"plex-icon-remove-560",title:n.i(h.default)("Remove server"),onPress:this.onRemoveServerPress}),R&&a()(m.a,{isOpen:this.state.isRemoveModalOpen,metricsPage:p.l,kind:g.b.DANGER,title:n.i(h.default)("Remove {serverName}",{serverName:t}),message:n.i(h.default)("If this server is restarted, it will automatically be added to your account again.",t),confirmLabel:n.i(h.default)("Remove"),onConfirm:this.onRemoveConfirm,
onCancel:this.onRemoveCancel}))},t}(d.Component);t.a=I},function(e,t,n){"use strict";function i(){return n.i(r.createSelector)(l.a,function(e){return e?{isFallbackPossible:!s.a.isHostedHttps||o.a.get("allowMixedContent"),isCloudServerConnected:e.isConnected,isCloudServerResourcesPending:e.isResourcesPending,isPersonalCloudServerRestarting:e.desktop.isPersonalCloudServerRestarting}:{isCloudServerConnected:!1}})}var a=n(14),r=n(8),s=(n.n(r),n(66)),o=n(56),l=n(371),u=n(2393);t.a=n.i(a.b)(i)(u.a)
},function(e,t,n){"use strict";function i(e){var t=e.selectedKey,i=e.isPlexCloudVisible,a=e.isWebhooksVisible,s=e.isUserUnrestricted,h=e.myPlexUrl,f=e.title;return r()(u.a,{className:p.a.container,autoScroll:!0},void 0,r()(c.a,{title:f},void 0,r()(d.a,{selectableKey:"account",selectedKey:t,to:"#!/account",title:n.i(o.default)("Account")}),s&&r()(d.a,{to:n.i(l.join)([h,"/subscription"]),title:n.i(o.default)("Subscriptions")}),s&&r()(d.a,{to:n.i(l.join)([h,"/users/payments"]),
title:n.i(o.default)("Payments")}),i&&s&&r()(d.a,{selectableKey:"plex-cloud",selectedKey:t,to:"#!/account/plex-cloud",title:n.i(o.default)("Plex Cloud")}),s&&r()(d.a,{to:n.i(l.join)([h,"/cloudsync/providers"]),title:n.i(o.default)("Cloud Sync")}),r()(d.a,{selectableKey:"audio-subtitle-settings",selectedKey:t,to:"#!/account/audio-subtitle",title:n.i(o.default)("Audio & Subtitle Settings")}),s&&r()(d.a,{to:"#!/settings/devices",title:n.i(o.default)("Authorized Devices")}),a&&s&&r()(d.a,{
selectableKey:"webhooks",selectedKey:t,to:"#!/account/webhooks",title:n.i(o.default)("Webhooks")})),s&&r()(c.a,{title:n.i(o.default)("Family & Friends")},void 0,r()(d.a,{to:"#!/settings/users",title:n.i(o.default)("Plex Home")}),r()(d.a,{to:"#!/settings/users/friends",title:n.i(o.default)("Sharing")})))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(19),u=n(74),c=n(607),d=n(2396),h=n(2800),p=n.n(h);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.selectableKey,i=e.selectedKey,a=e.to,s=e.title,l=i&&i===n,u=/^#/.test(a)?null:"_self";return r()(o.a,{target:u,to:a,icon:"plex-icon-settings-560",title:s,isSelected:l},n,t)}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(174));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.isChoosingProvider,i=e.isOpen,a=e.metricsProperties,s=e.onClose,b=e.onInterested,I=e.onNotInterested;return r()(p.a,{size:c.LARGE,isOpen:i,metricsPage:l.E,metricsProperties:a,onModalClose:s
},void 0,r()(f.a,{onModalClose:s},void 0,r()(g.a,{className:M.a.header},void 0,r()("div",{className:M.a.personalCloudServerTitle},void 0,n.i(o.default)("Plex Cloud")),n.i(o.default)("Your very own Plex Media Server in the cloud. No computer required.")),!t&&r()(m.a,{innerClassName:M.a.innerModalBody},void 0,r()("div",{className:M.a.upsell},void 0,r()("img",{className:M.a.upsellImage,src:S.a}),r()("div",{className:M.a.upsellText
},void 0,r()("p",{},void 0,n.i(o.default)("Thanks for participating in the Plex Cloud beta! There are just a few quick steps between here and your very own Plex Media Server in the sky.")),r()("ul",{},void 0,r()("li",{className:M.a.upsellPoint},void 0,n.i(o.default)("First, we\u2019ll link your cloud storage to your Plex account. Choose from popular providers like Dropbox and Google Drive.")),r()("li",{className:M.a.upsellPoint
},void 0,n.i(o.default)("Next, we\u2019ll create your Plex Cloud. This may take a minute or two.")),r()("li",{className:M.a.upsellPoint},void 0,n.i(o.default)("Finally, add your media to your cloud storage and scan it in! Plex Cloud works just like a regular Media Server. Choose it from the location menu in your favorite Plex app and stream away!"))))),r()(h.a,{component:"div",className:M.a.findOutMore,to:"#!/account/plex-cloud",onPress:s
},void 0,n.i(o.default)("Find more Plex Cloud settings or add additional storage providers"))),!t&&r()(v.a,{className:M.a.footer},void 0,r()(h.a,{kind:u.PRIMARY,onPress:I},void 0,n.i(o.default)("No thanks, not interested")),r()(y.a,{},void 0,r()(d.a,{kind:u.PRIMARY,size:c.LARGE,onPress:b},void 0,n.i(o.default)("Let's do this!")))),t&&C))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),
n(4)),l=n(46),u=n(82),c=n(99),d=n(51),h=n(25),p=n(147),f=n(111),g=n(123),m=n(75),v=n(112),y=n(91),b=n(3338),S=n.n(b),I=n(2267),w=n(2801),M=n.n(w),C=r()(I.a,{});t.a=i},function(e,t,n){"use strict";function i(e){return{isOpen:e.ui.provisionPersonalCloudServerPage.isPersonalCloudServerModalOpen}}var a=n(6),r=n.n(a),s=n(16),o=n.n(s),l=n(9),u=n.n(l),c=n(11),d=n.n(c),h=n(10),p=n.n(h),f=n(1),g=n.n(f),m=n(14),v=n(167),y=n(2397),b={dispatchFetchPersonalCloudServerProviders:v.e,
dispatchShowProvisionPersonalCloudServerModal:v.a,dispatchIndicateInterestInPersonalCloudServer:v.h},S=function(e){function t(n,i){u()(this,t);var a=d()(this,e.call(this,n,i));return a.onClose=function(){a.setState({isChoosingProvider:!1}),a.props.dispatchShowProvisionPersonalCloudServerModal({open:!1})},a.onNotInterested=function(){a.props.dispatchIndicateInterestInPersonalCloudServer({interested:!1}),a.onClose()},a.onInterested=function(){a.setState({isChoosingProvider:!0})},a.state={
isChoosingProvider:!1},a}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){e.isOpen&&!this.props.isOpen&&(this.setState({isChoosingProvider:!1}),this.props.dispatchFetchPersonalCloudServerProviders({options:{data:{type:"plex_cloud"}}}))},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchPersonalCloudServerProviders,e.dispatchShowProvisionPersonalCloudServerModal,e.dispatchIndicateInterestInPersonalCloudServer,
o()(e,["dispatchFetchPersonalCloudServerProviders","dispatchShowProvisionPersonalCloudServerModal","dispatchIndicateInterestInPersonalCloudServer"]));return g.a.createElement(y.a,r()({},t,{isChoosingProvider:this.state.isChoosingProvider,onClose:this.onClose,onInterested:this.onInterested,onNotInterested:this.onNotInterested}))},t}(f.Component);t.a=n.i(m.b)(i,b)(S)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,i=e.metricsProperties,a=e.onModalClose;return r()(d.a,{size:u.d.LARGE,
isOpen:t,metricsPage:l.C,metricsProperties:i,onModalClose:a},void 0,r()(h.a,{onModalClose:a},void 0,r()(p.a,{className:P.a.header},void 0,r()("div",{className:P.a.plexPassTitle},void 0,n.i(o.default)("Plex Pass Lite")),n.i(o.default)("Congratulations! You qualify for a free year of Plex Pass Lite!")),r()(f.a,{innerClassName:P.a.body},void 0,r()(m.a,{img:y.a,title:n.i(o.default)("Mobile Sync"),description:n.i(o.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),r()(m.a,{
img:S.a,title:n.i(o.default)("Camera Upload"),description:n.i(o.default)("Sync photos from your mobile devices to Plex Media Server")}),r()(m.a,{img:w.a,title:n.i(o.default)("Cloud Sync"),description:n.i(o.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),r()(m.a,{img:C.a,title:n.i(o.default)("Plex Home"),description:n.i(o.default)("Parental controls and fast user switching")})),r()(g.a,{className:P.a.footer},void 0,r()(c.a,{kind:u.b.PRIMARY,size:u.d.LARGE,
onPress:a},void 0,n.i(o.default)("Hooray, thanks!")))))}var a=n(3),r=n.n(a),s=n(1),o=(n.n(s),n(4)),l=n(46),u=n(22),c=n(51),d=n(147),h=n(111),p=n(123),f=n(75),g=n(112),m=n(954),v=n(1084),y=n.n(v),b=n(1082),S=n.n(b),I=n(1083),w=n.n(I),M=n(3341),C=n.n(M),D=n(2803),P=n.n(D);t.a=i},function(e,t,n){"use strict"
;var i=n(6),a=n.n(i),r=n(3),s=n.n(r),o=n(9),l=n.n(o),u=n(11),c=n.n(u),d=n(10),h=n.n(d),p=n(1),f=n.n(p),g=n(30),m=n.n(g),v=n(4),y=n(19),b=n(500),S=n(68),I=n(22),w=n(27),M=n(392),C=n(36),D=n(25),P=n(51),T=n(111),x=n(123),E=n(75),A=n(112),k=n(954),L=n(1084),_=n.n(L),N=n(3339),R=n.n(N),O=n(3342),j=n.n(O),z=n(1082),U=n.n(z),F=n(1083),B=n.n(F),V=n(3340),H=n.n(V),W=n(2804),Y=n.n(W),Q=s()(C.a,{}),G=function(e){function t(){return l()(this,t),c()(this,e.apply(this,arguments))}return h()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return n.i(w.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.metricsProperties,i=e.plans,r=e.isPlansPending,o=e.isPlansPopulated,l=e.plansError,u=e.onModalClose;return s()(T.a,{onModalClose:u},void 0,s()(x.a,{className:Y.a.header},void 0,s()("div",{className:Y.a.plexPassTitle},void 0,n.i(v.default)("Plex Pass")),n.i(v.default)("Enhance your Plex experience with exclusive premium features")),s()(E.a,{innerClassName:Y.a.body
},void 0,s()(k.a,{img:_.a,title:n.i(v.default)("Mobile Sync"),description:n.i(v.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),s()(k.a,{img:R.a,title:n.i(v.default)("Exclusive Forum Access"),description:n.i(v.default)("Let your voice be heard in special members-only forums")}),s()(k.a,{img:j.a,title:n.i(v.default)("Trailers & Extras"),description:n.i(v.default)("See movie trailers, cast interviews, and other bonus features")}),s()(k.a,{img:U.a,
title:n.i(v.default)("Camera Upload"),description:n.i(v.default)("Sync photos from your mobile devices to Plex Media Server")}),s()(k.a,{img:B.a,title:n.i(v.default)("Cloud Sync"),description:n.i(v.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),s()(k.a,{img:H.a,title:n.i(v.default)("Gracenote Music Magic"),description:n.i(v.default)("Song identification, album reviews, artist bios, and Plex Mix playlists")}),s()("div",{className:Y.a.moreFeatures
},void 0,s()(D.a,{className:Y.a.link,to:b.b,target:"_self"},void 0,n.i(v.default)("...plus more exclusive features!")))),s()(A.a,{className:Y.a.footer},void 0,r&&s()("div",{className:Y.a.spinnerContainer},void 0,Q),s()("div",{className:m()(Y.a.plansContainer,r&&Y.a.isPlansPending)},void 0,!r&&o&&i.map(function(e){var n=y.join(b.c,{plan:e.id,continue:window.location.href});return f.a.createElement(M.a,a()({key:e.id},t,{action:S.b,plan:e.id}),s()(P.a,{className:Y.a.planButton,to:n,target:"_self",
kind:I.b.PRIMARY,size:I.d.LARGE},void 0,e.formattedPrice," \u2014 ",e.name))}),!r&&l&&f.a.createElement(M.a,a()({},t,{action:S.b,plan:"unknown"}),s()(P.a,{className:Y.a.planButton,to:b.c,target:"_self",kind:I.b.PRIMARY,size:I.d.LARGE},void 0,n.i(v.default)("Subscribe")))),s()("div",{},void 0,n.i(v.default)("Subscribe today"),s()("span",{className:Y.a.linkSeparator},void 0,"\u2014"),f.a.createElement(M.a,a()({},t,{action:S.c}),s()(D.a,{className:Y.a.link,to:b.d,target:"_self"
},void 0,n.i(v.default)("or give Plex Pass as a gift!"))))))},t}(p.Component);t.a=G},function(e,t,n){"use strict";var i=n(9),a=n.n(i),r=n(11),s=n.n(r),o=n(10),l=n.n(o),u=n(1),c=n.n(u),d=n(14),h=n(8),p=(n.n(h),n(182)),f=n(398),g=n(2400),m=n.i(h.createSelector)(p.a,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,plans:t.plans,isPlansPending:t.isPlansPending,isPlansPopulated:t.isPlansPopulated,plansError:t.plansError}}),v=function(e){function t(){return a()(this,t),
s()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.componentWillMount=function(){this.props.isSignedIn&&this.props.fetchPlans()},t.prototype.componentWillReceiveProps=function(e){e.isSignedIn&&e.isSignedIn!==this.props.isSignedIn&&e.fetchPlans()},t.prototype.render=function(){return c.a.createElement(g.a,this.props)},t}(u.Component);t.a=n.i(d.b)(function(e){return m(e)},{fetchPlans:f.a})(v)},function(e,t,n){"use strict";function i(e){if(e===document)return!0;if(!e)return!1
;if(!e.parentNode)return!1;if(e.style){var t=e.style;if("none"===t.display||"hidden"===t.visibility)return!1}if(window.getComputedStyle){var n=window.getComputedStyle(e);if("none"===n.getPropertyValue("display")||"hidden"===n.getPropertyValue("visibility"))return!1}return i(e.parentNode)}function a(e){var t=e.tabIndex;return null===t&&(t=void 0),!isNaN(t)&&t>=0&&r(e)}function r(e){if(!i(e))return!1;var t=e.nodeName.toLowerCase()
;return/input|select|textarea|button|object/.test(t)?!e.disabled:"a"!==t||e.href}function s(e){if(!e)return[];var t=[].slice.call(e.getElementsByTagName("*"),0).filter(function(e){return a(e)});return l.a.sortBy(t,function(e){return 0===e.tabIndex?1/0:e.tabIndex})}var o=n(2),l=n.n(o);t.a=s},function(e,t,n){"use strict";function i(e,t){var i={},s={};return e.reduce(function(e,o){var l=o.index,u=o.position,c=n.i(a.default)(1e3*t[l],"YYYY MM"),d=c.slice(0,4);return i[d]?s[c]||(s[c]=!0,e.push({
position:u,type:r.b})):(i[d]=!0,s[c]=!0,e.push({position:u,type:r.a,label:d})),e},[])}var a=n(160),r=n(969);t.a=i},function(e,t,n){"use strict";function i(e){function t(e,t){return Math.max(1,Math.round(e/d))*t+(v+b)}function i(e){var n=e.viewportHeight+":"+e.viewportWidth;if(n===_)return N;x=e.viewportHeight,E=e.viewportWidth-(T+M);var i=E/d;A=p.map(function(e){return t(e,i)}),L=[];var a=I;return A.forEach(function(e){L.push(a),a+=e}),k=A.reduce(function(e,t){return e+t},I+D),_=n,N={height:k,
width:E}}function a(){n.i(s.a)(void 0!==x,"`getListStyle` must be called before `getLandmarks`");var e=x+":"+k;return e===R?O:(R=e,O=L.map(function(e,t){return{index:t,position:e/k}}))}function o(e){return n.i(s.a)(void 0!==x,"`getListStyle` must be called before `getPositionForIndex`"),{cellX:T,cellY:L[e],cellWidth:E,cellHeight:A[e]}}function l(e){var t=r.a.findIndex(L,function(t){return t>e}),n=L.length-1;return t===-1?n:Math.min(Math.max(0,t-1),n)}function u(e){
n.i(s.a)(void 0!==x,"`getListStyle` must be called before `getPositionForIndex`");var t=e+x-1,i=l(e-g*x),a=l(e),r=l(t);return{renderStartIndex:i,renderEndIndex:l(t+g*x),visibleStartIndex:a,visibleEndIndex:r,partiallyVisibleStartIndex:a,partiallyVisibleEndIndex:r}}
var c=e.columns,d=void 0===c?1:c,h=e.areas,p=void 0===h?[]:h,f=e.overscan,g=void 0===f?0:f,m=e.innerPaddingTop,v=void 0===m?0:m,y=e.innerPaddingBottom,b=void 0===y?0:y,S=e.outerPaddingTop,I=void 0===S?0:S,w=e.outerPaddingRight,M=void 0===w?0:w,C=e.outerPaddingBottom,D=void 0===C?0:C,P=e.outerPaddingLeft,T=void 0===P?0:P,x=void 0,E=void 0,A=[],k=void 0,L=[],_=void 0,N=void 0,R=void 0,O=void 0;return{getListStyle:i,getLandmarks:a,getPositionForIndex:o,getRangesForPosition:u}}
var a=n(2),r=n.n(a),s=n(33);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.items,n=e.gap,i=void 0===n?0:n,a=e.existingItems,s=void 0===a?[]:a,o=r.a.sortBy(s,"position"),l=r.a.sortBy(t,"position"),u=-(1/0);return l.forEach(function(e){var t=r.a.sortedIndex(s,e,"position"),n=s[t-1],a=s[t],l=e.position>u+i,c=!n||e.position>n.position+i,d=!a||e.position<a.position-i;l&&c&&d&&(o.push(e),u=e.position)}),r.a.sortBy(o,"position")}var a=n(2),r=n.n(a);t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.index,n=e.length,i=e.renderableWindow,a=void 0===i?n:i,r=e.cellPadding,s=void 0===r?0:r,o=e.cellWidth,l=e.width,u=l/2,c=o/2,d=n*o+(n-1)*s,h=t*(o+s)-(u-c);d>l&&(h=Math.min(Math.max(h,0),d-l));for(var p=[],f=Math.max(0,t-a),g=Math.min(n-1,t+a),m=f;m<=g;m++)p[m]=m*(o+s)-h;return{renderStartIndex:f,renderEndIndex:g,positions:p}}t.a=i},function(e,t,n){"use strict";function i(e,t,n){return!!t.protocols.stream}function a(e,t,n){return!!t.protocols.stream}function r(e,t,n){
return!(!e.isFullServer||!n.isFirstItemLibraryItem)}function s(e,t,n){return!!(e.isFullServer&&e.allowSync&&n.isFirstItemLibraryItem&&n.allowSync)}function o(e,t,n){return!(!e.isFullOwnedServer||!e.transcoderVideo||!n.isFirstItemLibraryItem)}function l(e,t,i,a){var r=a||i.firstItemType||"mixed",s=p[r];return n.i(d.a)(c.a.isArray(s),"getMetadataListActionProps: Invalid type, "+r+", provided"),s.reduce(function(a,s){var o=h[s]
;return n.i(d.a)(c.a.isFunction(o),"getMetadataListActionProps: Invalid action, "+s+", for "+r),a[s]=o(e,t,i),a},{})}var u=n(2),c=n.n(u),d=n(33);t.a=l;var h={showPlayAll:i,showShuffle:a,showAddToPlaylist:r,showSync:s,showOptimize:o},p={mixed:[],movie:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],show:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],season:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],
episode:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],artist:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],album:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],track:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],photoalbum:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],photo:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],
clip:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"]}},function(e,t,n){"use strict";function i(e){switch(e.split(":")[0]){case"addedAt":case"episode.addedAt":return a.a;case"duration":return s.a;case"lastViewedAt":return o.a;case"originallyAvailableAt":return l.a;case"rating":return r.a;case"userRating":return u.a}}var a=n(2097),r=n(582),s=n(906),o=n(909),l=n(912),u=n(428);t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
n.d(t,"CALENDAR",function(){return i}),n.d(t,"AGENDA",function(){return a}),n.d(t,"all",function(){return r});var i="calendar",a="agenda",r=[i,a]},function(e,t,n){"use strict";function i(e){return e.map(function(e){return e.model.type})}function a(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.a)(e,t,a)}))}function r(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.a)(e,t,a)}))}function s(e,t,i){return y.a.every(i.map(function(i){var a=i.model
;return n.i(S.e)(e,t,a)}))}function o(e,t,i){return y.a.some(i.map(function(i){var a=i.model;return n.i(S.f)(e,t,a)}))}function l(e,t,i){return y.a.some(i.map(function(i){var a=i.model;return n.i(S.g)(e,t,a)}))}function u(e,t,a){var r=i(a);return!(y.a.uniq(r).length>1)&&y.a.every(a.map(function(i){var a=i.model;return n.i(S.b)(e,t,a)}))}function c(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.h)(e,t,a)}))}function d(e,t,i){return y.a.every(i.map(function(i){var a=i.model
;return n.i(S.i)(e,t,a)}))}function h(e,t,n){if(!u(e,t,n))return!1;var a=i(n);return 1!==a.length&&(!(y.a.uniq(a).length>1)&&y.a.every(a,function(e){return M.indexOf(e)!==-1}))}function p(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.j)(e,t,a)}))}function f(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.k)(e,t,a)}))}function g(e,t,i){return y.a.every(i.map(function(i){var a=i.model;return n.i(S.l)(e,t,a)}))}function m(e,t,i,a){var r=w[a]
;return n.i(b.a)(y.a.isArray(r),"getMultiSelectActionProps: Invalid type, "+a+", provided"),r.reduce(function(r,s){var o=I[s];return n.i(b.a)(y.a.isFunction(o),"getMultiSelectActionProps: Invalid action, "+s+", for "+a),r[s]=o(e,t,i),r},{})}var v=n(2),y=n.n(v),b=n(33),S=n(235);t.a=m;var I={showPlaySelected:a,showShuffle:r,showAddToPlaylist:s,showMarkWatched:o,showMarkUnwatched:l,showEdit:u,showRefresh:c,showAnalyze:d,showMerge:h,showSync:p,showOptimize:f,showDelete:g},w={
video:["showPlaySelected","showShuffle","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showMerge","showSync","showOptimize","showDelete"],audio:["showPlaySelected","showShuffle","showAddToPlaylist","showEdit","showRefresh","showAnalyze","showMerge","showSync","showOptimize","showDelete"],photo:["showPlaySelected","showShuffle","showAddToPlaylist","showEdit","showAnalyze","showSync","showOptimize","showDelete"]
},M=["movie","show","season","artist","album"]},function(e,t,n){"use strict";function i(e,t){if(!e||null==t)return!1;if(e===r&&a.hasOwnProperty(t))return a[t];e!==r&&(r=e,a={});var n=e.indexOf(t)!==-1;return a[t]=n,n}t.a=i;var a={},r=void 0},function(e,t){e.exports={defaultFontFamily:'"Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif',boldFontFamily:'"Open Sans Bold", "Helvetica Neue", Helvetica, Arial, sans-serif',smallFontSize:"12px",defaultFontSize:"13px",
defaultIconFontSize:"14px",largeFontSize:"15px",lineHeightComputed:"1.71428571"}},function(e,t,n){"use strict";var i=n(13),a=n(1435),r=n(95),s=n(363),o=n(1110),l=n(1111),u=n(298),c=n(1436),d=n(471),h=n(1432),p=n(300),f=n(808),g=n(1447),m=n(40),v=n(299),y=n(1442),b=n(1441),S=n(1446),I=n(2416),w=n(1445),M=n(469),C=n(1100),D={registerAll:function(){var e=c.a.init();e.done(function(e){return u.a.register(e)});var t=new o.a;return r.a.register(t),s.a.register(new l.a),d.a.register(new h.a),
p.a.register(f.a),v.a.register({protocol:"local",type:m.a.types.VIDEO,create:function(e){return new y.a({type:e})}}),v.a.register({protocol:"local",type:m.a.types.MUSIC,create:function(e){return new b.a({type:e})}}),i.c({getDecisionOptions:g.a,mediaComponent:S.a,companionPlayerProfile:w.a,fullscreenManager:n.i(I.a)()}),M.a.register(new C.a),a.a.registerAll(),e}};t.a=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={allowFlash:!0,allowServerUpdates:!0,
allowHttpsMediaServerConnections:!0,allowMediaServerRelayConnections:!0,allowCloudSyncServers:!0,shouldCreateFlexModels:!0,shouldCreateStateTree:!0,allowCloudPubSub:!0,allowLoopbackDiscovery:"http:"===window.location.protocol,allowSSO:!1};t.default=i},function(e,t,n){"use strict";function i(){return n.i(a.a)().then(function(){return r.a.registerAll()})}var a=n(1518),r=n(2413);t.a=i},function(e,t,n){"use strict";function i(){function e(){
return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}function t(){for(var t=0;t<n.length;t++)n[t](e())}var n=[];return document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t),{subscribe:function(e){var t=!0;return n.push(e),function(){if(t){t=!1;var i=n.indexOf(e)
;n.splice(i,1)}}},isFullscreen:e,enter:function(){var e=document.documentElement;(e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen).call(e)},exit:function(){(document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document)}}}t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1088);n.n(i);n(1086).a.start()},function(e,t,n){"use strict"
;var i=n(3),a=n.n(i),r=n(9),s=n.n(r),o=n(11),l=n.n(o),u=n(10),c=n.n(u),d=n(1),h=n.n(d),p=n(27),f=n(2806),g=n.n(f),m=function(e){function t(n,i){s()(this,t);var a=l()(this,e.call(this,n,i));return a.onLineHeightRef=function(e){e&&a.setState({lineHeight:e.clientHeight})},a.state={lineHeight:0},a}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return n.i(p.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.children,i=e.maxLines,r=this.state.lineHeight,s=r*i,o={maxHeight:s,WebkitLineClamp:i};return a()("div",{className:t},void 0,!r&&h.a.createElement("div",{className:g.a.lineHeightMeasure,ref:this.onLineHeightRef}),a()("div",{className:g.a.content,style:o},void 0,n))},t}(d.Component);m.defaultProps={maxLines:3},t.a=m},function(e,t,n){e.exports={default:n(2431),__esModule:!0}},function(e,t,n){e.exports={default:n(2432),__esModule:!0}},function(e,t,n){e.exports={
default:n(2433),__esModule:!0}},function(e,t,n){e.exports={default:n(2434),__esModule:!0}},function(e,t,n){e.exports={default:n(2435),__esModule:!0}},function(e,t,n){e.exports={default:n(2437),__esModule:!0}},function(e,t,n){e.exports={default:n(2438),__esModule:!0}},function(e,t,n){e.exports={default:n(2440),__esModule:!0}},function(e,t,n){e.exports={default:n(2441),__esModule:!0}},function(e,t,n){e.exports={default:n(2443),__esModule:!0}},function(e,t){e.exports=function(){
for(var e=arguments.length,t=[],n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter(function(e){return null!=e}),0!==t.length)return 1===t.length?t[0]:t.reduce(function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}})}},function(e,t,n){var i=n(103),a=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(e){return a.stringify.apply(a,arguments)}},function(e,t,n){n(2465),e.exports=n(103).Number.isFinite},function(e,t,n){n(2466),e.exports=n(103).Number.isInteger
},function(e,t,n){n(2467),e.exports=n(103).Number.isNaN},function(e,t,n){n(2468),e.exports=parseFloat},function(e,t,n){n(2469),e.exports=parseInt},function(e,t,n){n(2470),e.exports=n(103).Object.assign},function(e,t,n){n(2471);var i=n(103).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){n(2472),e.exports=n(103).Object.getPrototypeOf},function(e,t,n){n(2473),e.exports=n(103).Object.keys},function(e,t,n){n(2474),e.exports=n(103).Object.setPrototypeOf},function(e,t,n){n(986),
e.exports=n(103).Symbol.for},function(e,t,n){n(986),n(2475),n(2477),n(2478),e.exports=n(103).Symbol},function(e,t,n){n(2476),n(2479),e.exports=n(626).f("iterator")},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(){}},function(e,t,n){var i=n(239),a=n(2463),r=n(2462);e.exports=function(e){return function(t,n,s){var o,l=i(t),u=a(l.length),c=r(s,u);if(e&&n!=n){for(;u>c;)if((o=l[c++])!=o)return!0
}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var i=n(283),a=n(618),r=n(442);e.exports=function(e){var t=i(e),n=a.f;if(n)for(var s,o=n(e),l=r.f,u=0;o.length>u;)l.call(e,s=o[u++])&&t.push(s);return t}},function(e,t,n){e.exports=n(136).document&&document.documentElement},function(e,t,n){var i=n(973);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(281),a=Math.floor;e.exports=function(e){
return!i(e)&&isFinite(e)&&a(e)===e}},function(e,t,n){"use strict";var i=n(617),a=n(443),r=n(619),s={};n(280)(s,n(284)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(s,{next:a(1,n)}),r(e,t+" Iterator")}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(283),a=n(239);e.exports=function(e,t){for(var n,r=a(e),s=i(r),o=s.length,l=0;o>l;)if(r[n=s[l++]]===t)return n}},function(e,t,n){
var i=n(445)("meta"),a=n(281),r=n(238),s=n(282).f,o=0,l=Object.isExtensible||function(){return!0},u=!n(237)(function(){return l(Object.preventExtensions({}))}),c=function(e){s(e,i,{value:{i:"O"+ ++o,w:{}}})},d=function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,i)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[i].i},h=function(e,t){if(!r(e,i)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[i].w},p=function(e){return u&&f.NEED&&l(e)&&!r(e,i)&&c(e),e
},f=e.exports={KEY:i,NEED:!1,fastKey:d,getWeak:h,onFreeze:p}},function(e,t,n){"use strict";var i=n(283),a=n(618),r=n(442),s=n(444),o=n(977),l=Object.assign;e.exports=!l||n(237)(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=i})?function(e,t){
for(var n=s(e),l=arguments.length,u=1,c=a.f,d=r.f;l>u;)for(var h,p=o(arguments[u++]),f=c?i(p).concat(c(p)):i(p),g=f.length,m=0;g>m;)d.call(p,h=f[m++])&&(n[h]=p[h]);return n}:l},function(e,t,n){var i=n(282),a=n(350),r=n(283);e.exports=n(279)?Object.defineProperties:function(e,t){a(e);for(var n,s=r(t),o=s.length,l=0;o>l;)i.f(e,n=s[l++],t[n]);return e}},function(e,t,n){
var i=n(239),a=n(980).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return a(e)}catch(e){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==r.call(e)?o(e):a(i(e))}},function(e,t,n){var i=n(136).parseFloat,a=n(985).trim;e.exports=1/i(n(622)+"-0")!=-(1/0)?function(e){var t=a(String(e),3),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i},function(e,t,n){
var i=n(136).parseInt,a=n(985).trim,r=n(622),s=/^[\-+]?0[xX]/;e.exports=8!==i(r+"08")||22!==i(r+"0x16")?function(e,t){var n=a(String(e),3);return i(n,t>>>0||(s.test(n)?16:10))}:i},function(e,t,n){var i=n(281),a=n(350),r=function(e,t){if(a(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n(974)(Function.call,n(979).f(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(e){t=!0}
return function(e,n){return r(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:r}},function(e,t,n){var i=n(623),a=n(441);e.exports=function(e){return function(t,n){var r,s,o=String(a(t)),l=i(n),u=o.length;return l<0||l>=u?e?"":void 0:(r=o.charCodeAt(l),r<55296||r>56319||l+1===u||(s=o.charCodeAt(l+1))<56320||s>57343?e?o.charAt(l):r:e?o.slice(l,l+2):s-56320+(r-55296<<10)+65536)}}},function(e,t,n){var i=n(623),a=Math.max,r=Math.min;e.exports=function(e,t){return e=i(e),e<0?a(e+t,0):r(e,t)}
},function(e,t,n){var i=n(623),a=Math.min;e.exports=function(e){return e>0?a(i(e),9007199254740991):0}},function(e,t,n){"use strict";var i=n(2445),a=n(2452),r=n(615),s=n(239);e.exports=n(978)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,a(1)):"keys"==t?a(0,n):"values"==t?a(0,e[n]):a(0,[n,e[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(e,t,n){
var i=n(125),a=n(136).isFinite;i(i.S,"Number",{isFinite:function(e){return"number"==typeof e&&a(e)}})},function(e,t,n){var i=n(125);i(i.S,"Number",{isInteger:n(2450)})},function(e,t,n){var i=n(125);i(i.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var i=n(125),a=n(2458);i(i.S+i.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var i=n(125),a=n(2459);i(i.S+i.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var i=n(125);i(i.S+i.F,"Object",{
assign:n(2455)})},function(e,t,n){var i=n(125);i(i.S,"Object",{create:n(617)})},function(e,t,n){var i=n(444),a=n(981);n(983)("getPrototypeOf",function(){return function(e){return a(i(e))}})},function(e,t,n){var i=n(444),a=n(283);n(983)("keys",function(){return function(e){return a(i(e))}})},function(e,t,n){var i=n(125);i(i.S,"Object",{setPrototypeOf:n(2460).set})},function(e,t){},function(e,t,n){"use strict";var i=n(2461)(!0);n(978)(String,"String",function(e){this._t=String(e),this._i=0
},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){n(625)("asyncIterator")},function(e,t,n){n(625)("observable")},function(e,t,n){n(2464);for(var i=n(136),a=n(280),r=n(615),s=n(284)("toStringTag"),o=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var u=o[l],c=i[u],d=c&&c.prototype;d&&!d[s]&&a(d,s,u),r[u]=r.Array}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict"
;var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.__esModule=!0;var a=n(635),r=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){for(var t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];i(this,e),Array.isArray(n[0])&&1===n.length&&(n=n[0]);for(var s=0;s<n.length;s++)if(!r.default(n[s]))throw new Error("Expected a disposable");this.disposables=n,this.isDisposed=!1}return e.prototype.add=function(e){
this.isDisposed?e.dispose():this.disposables.push(e)},e.prototype.remove=function(e){if(this.isDisposed)return!1;var t=this.disposables.indexOf(e);return t!==-1&&(this.disposables.splice(t,1),e.dispose(),!0)},e.prototype.dispose=function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.isDisposed=!0,this.disposables=[],this.length=0;for(var n=0;n<e;n++)t[n].dispose()}},e}();t.default=s,e.exports=t.default},function(e,t,n){
"use strict";var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.__esModule=!0;var r=function(){},s=function(){function e(t){i(this,e),this.isDisposed=!1,this.action=t||r}
return e.prototype.dispose=function(){this.isDisposed||(this.action.call(null),this.isDisposed=!0)},a(e,null,[{key:"empty",enumerable:!0,value:{dispose:r}}]),e}();t.default=s,e.exports=t.default},function(e,t,n){"use strict";var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.__esModule=!0;var a=n(635),r=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){i(this,e),this.isDisposed=!1,this.current=null}
return e.prototype.getDisposable=function(){return this.current},e.prototype.setDisposable=function(){var e=void 0===arguments[0]?null:arguments[0];if(null!=e&&!r.default(e))throw new Error("Expected either an empty value or a valid disposable");var t=this.isDisposed,n=void 0;t||(n=this.current,this.current=e),n&&n.dispose(),t&&e&&e.dispose()},e.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=null,e&&e.dispose()}},e}();t.default=s,
e.exports=t.default},function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=n(635),r=i(a);t.isDisposable=r.default;var s=n(2503),o=i(s);t.Disposable=o.default;var l=n(2502),u=i(l);t.CompositeDisposable=u.default;var c=n(2504),d=i(c);t.SerialDisposable=d.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(2518),o=i(s),l=n(2514),u=i(l),c=n(451),d=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t
}(c),h=n(2507),p=i(h),f=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e);var i=(0,o.default)(u.default);this.context=n,this.store=i,this.monitor=new p.default(i),this.registry=this.monitor.registry,this.backend=t(this),i.subscribe(this.handleRefCountChange.bind(this))}return r(e,[{key:"handleRefCountChange",value:function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),
this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)}},{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){function e(e){return function(){for(var i=arguments.length,a=Array(i),r=0;r<i;r++)a[r]=arguments[r];var s=e.apply(t,a);void 0!==s&&n(s)}}
var t=this,n=this.store.dispatch;return Object.keys(d).filter(function(e){return"function"==typeof d[e]}).reduce(function(t,n){var i=d[n];return t[n]=e(i),t},{})}}]),e}();t.default=f},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
;i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(105),o=i(s),l=n(240),u=i(l),c=n(998),d=i(c),h=n(2510),p=i(h),f=n(997),g=n(996),m=function(){function e(t){a(this,e),this.store=t,this.registry=new p.default(t)}return r(e,[{key:"subscribeToStateChange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.handlerIds;(0,
o.default)("function"==typeof e,"listener must be a function."),(0,o.default)(void 0===i||(0,u.default)(i),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,r=function(){var n=t.store.getState(),r=n.stateId;try{r===a||r===a+1&&!(0,g.areDirty)(n.dirtyHandlerIds,i)||e()}finally{a=r}};return this.store.subscribe(r)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,o.default)("function"==typeof e,"listener must be a function.")
;var n=this.store.getState().dragOffset,i=function(){var i=t.store.getState().dragOffset;i!==n&&(n=i,e())};return this.store.subscribe(i)}},{key:"canDragSource",value:function(e){var t=this.registry.getSource(e);return(0,o.default)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);if((0,o.default)(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1
;var n=this.registry.getTargetType(e),i=this.getItemType();return(0,d.default)(n,i)&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){var t=this.registry.getSource(e,!0);return(0,o.default)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))}},{key:"isOverTarget",value:function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1},n=t.shallow;if(!this.isDragging())return!1;var i=this.registry.getTargetType(e),a=this.getItemType();if(!(0,d.default)(i,a))return!1;var r=this.getTargetIds();if(!r.length)return!1;var s=r.indexOf(e);return n?s===r.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",
value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){
return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return(0,f.getSourceClientOffset)(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return(0,
f.getDifferenceFromInitialOffset)(this.store.getState().dragOffset)}}]),e}();t.default=m},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,[{key:"canDrag",value:function(){return!0}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}]),e}();t.default=r},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
;i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){i(this,e)}return a(e,[{key:"canDrop",value:function(){return!0}},{key:"hover",value:function(){}},{key:"drop",value:function(){}}]),e}();t.default=r},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){(0,p.default)("function"==typeof e.canDrag,"Expected canDrag to be a function."),(0,p.default)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),(0,p.default)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}function s(e){(0,p.default)("function"==typeof e.canDrop,"Expected canDrop to be a function."),(0,
p.default)("function"==typeof e.hover,"Expected hover to be a function."),(0,p.default)("function"==typeof e.drop,"Expected beginDrag to be a function.")}function o(e,t){if(t&&(0,g.default)(e))return void e.forEach(function(e){return o(e,!1)});(0,p.default)("string"==typeof e||"symbol"===(void 0===e?"undefined":d(e)),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function l(e){var t=(0,S.default)().toString();switch(e){case I.SOURCE:
return"S"+t;case I.TARGET:return"T"+t;default:(0,p.default)(!1,"Unknown role: "+e)}}function u(e){switch(e[0]){case"S":return I.SOURCE;case"T":return I.TARGET;default:(0,p.default)(!1,"Cannot parse handler ID: "+e)}}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),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},h=n(105),p=i(h),f=n(240),g=i(f),m=n(1098),v=i(m),y=n(452),b=n(2517),S=i(b),I={SOURCE:"SOURCE",TARGET:"TARGET"},w=function(){function e(t){a(this,e),this.store=t,this.types={},this.handlers={},this.pinnedSourceId=null,this.pinnedSource=null}return c(e,[{key:"addSource",
value:function(e,t){o(e),r(t);var n=this.addHandler(I.SOURCE,e,t);return this.store.dispatch((0,y.addSource)(n)),n}},{key:"addTarget",value:function(e,t){o(e,!0),s(t);var n=this.addHandler(I.TARGET,e,t);return this.store.dispatch((0,y.addTarget)(n)),n}},{key:"addHandler",value:function(e,t,n){var i=l(e);return this.types[i]=t,this.handlers[i]=n,i}},{key:"containsHandler",value:function(e){var t=this;return Object.keys(this.handlers).some(function(n){return t.handlers[n]===e})}},{key:"getSource",
value:function(e,t){return(0,p.default)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.handlers[e]}},{key:"getTarget",value:function(e){return(0,p.default)(this.isTargetId(e),"Expected a valid target ID."),this.handlers[e]}},{key:"getSourceType",value:function(e){return(0,p.default)(this.isSourceId(e),"Expected a valid source ID."),this.types[e]}},{key:"getTargetType",value:function(e){return(0,
p.default)(this.isTargetId(e),"Expected a valid target ID."),this.types[e]}},{key:"isSourceId",value:function(e){return u(e)===I.SOURCE}},{key:"isTargetId",value:function(e){return u(e)===I.TARGET}},{key:"removeSource",value:function(e){var t=this;(0,p.default)(this.getSource(e),"Expected an existing source."),this.store.dispatch((0,y.removeSource)(e)),(0,v.default)(function(){delete t.handlers[e],delete t.types[e]})}},{key:"removeTarget",value:function(e){var t=this;(0,
p.default)(this.getTarget(e),"Expected an existing target."),this.store.dispatch((0,y.removeTarget)(e)),(0,v.default)(function(){delete t.handlers[e],delete t.types[e]})}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,p.default)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,p.default)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}}]),e}();t.default=w
},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return new l(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=a;var s=n(1026),o=function(e){
return e&&e.__esModule?e:{default:e}}(s),l=function(){function e(t){i(this,e),this.actions=t.getActions()}return r(e,[{key:"setup",value:function(){this.didCallSetup=!0}},{key:"teardown",value:function(){this.didCallTeardown=!0}},{key:"connectDragSource",value:function(){return o.default}},{key:"connectDragPreview",value:function(){return o.default}},{key:"connectDropTarget",value:function(){return o.default}},{key:"simulateBeginDrag",value:function(e,t){this.actions.beginDrag(e,t)}},{
key:"simulatePublishDragSource",value:function(){this.actions.publishDragSource()}},{key:"simulateHover",value:function(e,t){this.actions.hover(e,t)}},{key:"simulateDrop",value:function(){this.actions.drop()}},{key:"simulateEndDrag",value:function(){this.actions.endDrag()}}]),e}()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2506);Object.defineProperty(t,"DragDropManager",{enumerable:!0,get:function(){
return i(a).default}});var r=n(2508);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return i(r).default}});var s=n(2509);Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return i(s).default}});var o=n(2511);Object.defineProperty(t,"createTestBackend",{enumerable:!0,get:function(){return i(o).default}})},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1];switch(t.type){case o.BEGIN_DRAG:
return a({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case o.PUBLISH_DRAG_SOURCE:return a({},e,{isSourcePublic:!0});case o.HOVER:return a({},e,{targetIds:t.targetIds});case l.REMOVE_TARGET:return e.targetIds.indexOf(t.targetId)===-1?e:a({},e,{targetIds:(0,s.default)(e.targetIds,t.targetId)});case o.DROP:return a({},e,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case o.END_DRAG:return a({},e,{itemType:null,item:null,
sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=i;var r=n(1027),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(451),l=n(452),u={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,
isSourcePublic:null}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{dirtyHandlerIds:(0,h.default)(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:(0,s.default)(e.dragOffset,t),refCount:(0,c.default)(e.refCount,t),dragOperation:(0,l.default)(e.dragOperation,t),stateId:(0,f.default)(e.stateId)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a
;var r=n(997),s=i(r),o=n(2513),l=i(o),u=n(2515),c=i(u),d=n(996),h=i(d),p=n(2516),f=i(p)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(arguments[1].type){case a.ADD_SOURCE:case a.ADD_TARGET:return e+1;case a.REMOVE_SOURCE:case a.REMOVE_TARGET:return e-1;default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(452)},function(e,t,n){"use strict";function i(){
return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(){return a++}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=0},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){function i(){v===m&&(v=m.slice())}function r(){return g}function o(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.")
;var t=!0;return i(),v.push(e),function(){if(t){t=!1,i();var n=v.indexOf(e);v.splice(n,1)}}}function c(e){if(!(0,s.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(y)throw new Error("Reducers may not dispatch actions.");try{y=!0,g=f(g,e)}finally{y=!1}for(var t=m=v,n=0;n<t.length;n++)t[n]();return e}function d(e){
if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");f=e,c({type:u.INIT})}function h(){var e,t=o;return e={subscribe:function(e){function n(){e.next&&e.next(r())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:t(n)}}},e[l.default]=function(){return this},e}var p;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){
if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(a)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var f=e,g=t,m=[],v=m,y=!1;return c({type:u.INIT}),p={dispatch:c,subscribe:o,getState:r,replaceReducer:d},p[l.default]=h,p}t.__esModule=!0,t.ActionTypes=void 0,t.default=a;var r=n(175),s=i(r),o=n(3301),l=i(o),u=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";function i(e,t){
e.classList?e.classList.add(t):(0,r.default)(e)||(e.className=e.className+" "+t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(2520),r=function(e){return e&&e.__esModule?e:{default:e}}(a);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")!==-1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default},function(e,t,n){"use strict"
;e.exports=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var i=n(999),a=function(e){
return e&&e.__esModule?e:{default:e}}(i),r="transform",s=void 0,o=void 0,l=void 0,u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0,m=void 0;if(a.default){var v=function(){for(var e=document.createElement("div").style,t={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},n=Object.keys(t),i=void 0,a=void 0,r="",s=0;s<n.length;s++){var o=n[s];if(o+"TransitionProperty"in e){
r="-"+o.toLowerCase(),i=t[o]("TransitionEnd"),a=t[o]("AnimationEnd");break}}return!i&&"transitionProperty"in e&&(i="transitionend"),!a&&"animationName"in e&&(a="animationend"),e=null,{animationEnd:a,transitionEnd:i,prefix:r}}();s=v.prefix,t.transitionEnd=o=v.transitionEnd,t.animationEnd=l=v.animationEnd,t.transform=r=s+"-"+r,t.transitionProperty=u=s+"-transition-property",t.transitionDuration=c=s+"-transition-duration",t.transitionDelay=h=s+"-transition-delay",
t.transitionTiming=d=s+"-transition-timing-function",t.animationName=p=s+"-animation-name",t.animationDuration=f=s+"-animation-duration",t.animationTiming=g=s+"-animation-delay",t.animationDelay=m=s+"-animation-timing-function"}t.transform=r,t.transitionProperty=u,t.transitionTiming=d,t.transitionDelay=h,t.transitionDuration=c,t.transitionEnd=o,t.animationName=p,t.animationDuration=f,t.animationTiming=g,t.animationDelay=m,t.animationEnd=l,t.default={transform:r,end:o,property:u,timing:d,delay:h,
duration:c}},function(e,t,n){"use strict";function i(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-d)),i=setTimeout(e,n);return d=t,i}Object.defineProperty(t,"__esModule",{value:!0});var a=n(999),r=function(e){return e&&e.__esModule?e:{default:e}}(a),s=["","webkit","moz","o","ms"],o="clearTimeout",l=i,u=void 0,c=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};r.default&&s.some(function(e){var t=c(e,"request");if(t in window)return o=c(e,"cancel"),l=function(e){
return window[t](e)}});var d=(new Date).getTime();u=function(e){return l(e)},u.cancel=function(e){window[o]&&"function"==typeof window[o]&&window[o](e)},t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(638),a=n(1007).default,r=n(639).default,s=n(640),o=n(3092),l=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=a,e.Exception=r,e.Utils=s,e.VM=o,e.template=function(t){return o.template(t,e)},e},u=l();u.create=l,t.default=u,e.exports=u
},function(e,t){function n(e){for(var t=e.length,n=new Array(t),i=0;i<t;i++)n[i]=e.charCodeAt(i);return n}function i(e){for(var t="",n=0;n<e.length;n++)t+=SHA256_hexchars[e[n]>>4]+SHA256_hexchars[15&e[n]];return t}function a(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}function r(){SHA256_H=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),SHA256_buf=new Array,SHA256_len=0}function s(e){
SHA256_buf="string"==typeof e?SHA256_buf.concat(n(e)):SHA256_buf.concat(e);for(var t=0;t+64<=SHA256_buf.length;t+=64)b(SHA256_H,SHA256_buf.slice(t,t+64));SHA256_buf=SHA256_buf.slice(t),SHA256_len+=e.length}function o(){if(SHA256_buf[SHA256_buf.length]=128,SHA256_buf.length>56){for(var e=SHA256_buf.length;e<64;e++)SHA256_buf[e]=0;b(SHA256_H,SHA256_buf),SHA256_buf.length=0}for(var e=SHA256_buf.length;e<59;e++)SHA256_buf[e]=0;SHA256_buf[59]=SHA256_len>>>29&255,SHA256_buf[60]=SHA256_len>>>21&255,
SHA256_buf[61]=SHA256_len>>>13&255,SHA256_buf[62]=SHA256_len>>>5&255,SHA256_buf[63]=SHA256_len<<3&255,b(SHA256_H,SHA256_buf);for(var t=new Array(32),e=0;e<8;e++)t[4*e+0]=SHA256_H[e]>>>24,t[4*e+1]=SHA256_H[e]>>16&255,t[4*e+2]=SHA256_H[e]>>8&255,t[4*e+3]=255&SHA256_H[e];return SHA256_H=null,SHA256_buf=null,SHA256_len=null,t}function l(e){var t;return r(),s(e),t=o(),i(t)}function u(e){HMAC_SHA256_key="string"==typeof e?n(e):(new Array).concat(e),HMAC_SHA256_key.length>64&&(r(),s(HMAC_SHA256_key),
HMAC_SHA256_key=o());for(var t=HMAC_SHA256_key.length;t<64;t++)HMAC_SHA256_key[t]=0;for(var t=0;t<64;t++)HMAC_SHA256_key[t]^=54;r(),s(HMAC_SHA256_key)}function c(e){s(e)}function d(){for(var e=o(),t=0;t<64;t++)HMAC_SHA256_key[t]^=106;r(),s(HMAC_SHA256_key),s(e);for(var t=0;t<64;t++)HMAC_SHA256_key[t]=0;return HMAC_SHA256_key=null,o()}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}function f(e){
return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function g(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function m(e,t,n){return n^e&(t^n)}function v(e,t,n){return e&t^n&(e^t)}function y(e,t){for(var n=16;n<64;n++)t[n]=p(t[n-2])+t[n-7]+h(t[n-15])+t[n-16]&4294967295;for(var i=(new Array).concat(e),n=0;n<64;n++){var a=i[7]+g(i[4])+m(i[4],i[5],i[6])+SHA256_K[n]+t[n],r=f(i[0])+v(i[0],i[1],i[2]);i.pop(),i.unshift(a+r&4294967295),i[4]=i[4]+a&4294967295}
for(var n=0;n<8;n++)e[n]=e[n]+i[n]&4294967295}function b(e,t){for(var n=new Array(16),i=0;i<16;i++)n[i]=t[4*i+0]<<24|t[4*i+1]<<16|t[4*i+2]<<8|t[4*i+3];y(e,n)}SHA256_hexchars=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"),
SHA256_K=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),
t.array_to_string=a,t.SHA256_hash=l,t.HMAC_SHA256_init=u,t.HMAC_SHA256_write=c,t.HMAC_SHA256_finalize=d},function(e,t){!function(){"use strict";var e={};!function(){function t(){i||console.log.apply(console,arguments);for(var e=Math.round(Date.now()-r),t=[],n=0;n<arguments.length;n++){var a=""+arguments[n];"[obj"!=a.slice(0,4)&&t.push(a)}var s=e+": "+t.join(", "),o=document.getElementById("console");o&&(o.value+=s+"\n"),i&&console.log(s)}function n(e){e<=a&&t.apply(null,arguments)}
var i=!!(window.console&&window.console.log&&window.console.log.call),a=0,r=(new Date).getTime();e.dlog=n,e.log=t,e.DLOG_LEVEL=a}(),function(){var t={SMOOTH_STREAMING:"smoothstreaming",DASH:"dash"};e.StreamingType=t}(),function(){var t=function(e){this.ttml_=e,this.frameRate_=30};t.prototype.xmlDecode_=function(e){return e.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},t.prototype.parseChildElements_=function(e,t,n){var i=[]
;if(null==n)return i;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&i.push(t.call(this,a));return i},t.prototype.parseAttributes_=function(e,t){var n={};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n},t.prototype.parseTime_=function(e){var t=e.split(":");return 3600*parseFloat(t[0])+60*parseFloat(t[1])+parseFloat(t[2])+parseFloat(t[3])/this.frameRate_},t.prototype.parseTextTrack_=function(e){
return this.xmlDecode_(e.replace(/[\r\n]+/g,"").replace(/ {2,}/g," ").replace(/<[^>]+>/g,"").replace(/<br\s*\/>/g,"\n")).trim()},t.prototype.parse_cue_=function(e){var t=this.parseAttributes_({begin:this.parseTime_.bind(this),end:this.parseTime_.bind(this)},e);return t&&(t.caption=this.parseTextTrack_(e.textContent),t.start=t.begin,delete t.begin),t},t.prototype.parse_div_=function(e){return this.parseChildElements_("p",this.parse_cue_,e)},t.prototype.parse_body_=function(e){
return this.parseChildElements_("div",this.parse_div_,e)[0]},t.prototype.parse_ttml_=function(e){return this.parseChildElements_("body",this.parse_body_,e)[0]},t.prototype.parse=function(){for(var e=new DOMParser,t=e.parseFromString(this.ttml_,"text/xml"),n=0;n<t.childNodes.length;n++)if("tt"===t.childNodes[n].nodeName)return this.parse_ttml_(t.childNodes[n])},e.Ttml=t}(),function(){var t=function(e){if(null==e)throw new Error("A url for the close captions location is required");this._url=e,
this._callback=null,this._ccInfo=null};t.prototype.ccType=function(){return 0},t.prototype.requestCC=function(){var e=new XMLHttpRequest;e.addEventListener("load",this.onCCLoad.bind(this)),e.addEventListener("error",this.onCCError.bind(this)),e.open("GET",this._url),e.send()},t.prototype.load=function(t){if(null==t)throw new Error("A callback is required");this._callback=t,this.requestCC(),e.dlog(1,"Sent request to get the close captions info")},t.prototype.getCCInfo=function(){
return this._ccInfo},t.prototype.onCCError=function(t){var n="Error geting captions from "+this._url;return e.log(n),this._callback(n)},t.prototype.onCCLoad=function(t){e.dlog(2,"Close Captions Info received");var n=null;if(200!==t.target.status||t.target.status>299)return n="HTTP error "+t.target.status+" retrieving close captions from "+this._url,e.log(n),this._callback(n);switch(this.ccType()){case 0:this._ccInfo=new e.Ttml(t.target.responseText).parse();break;case 1:
throw new Error("VTT parsing not implemented yet")}return null===this._ccInfo?(n="Error parsing the close captions info",e.log(n),this._callback(n)):this._callback(n,this._ccInfo)},e.CloseCaptionsLoader=t}(),function(){function t(e){return e}function n(e){var t=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/,n=t.exec(e);return n?3600*parseFloat(n[2]||0)+60*parseFloat(n[4]||0)+parseFloat(n[6]||0):parseFloat(e)}function i(e,t,n){var i=[];if(null==n)return i
;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&i.push(t(a));return i}function a(e,t,n){return i(e,t,n)[0]||null}function r(e,t,n){n=n||{};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n}function s(e){var t=/([0-9]+)(\/([0-9]+))?/.exec(e);return t?t[3]?parseFloat(t[1])/(parseFloat(t[3])||1):parseFloat(t[1]):1}function o(e){var t=/([0-9]+)-([0-9]+)/.exec(e);if(!t)return null;var n=parseInt(t[1]),i=parseInt(t[2]);return{
start:n,end:i,length:i-n+1}}function l(e){return r(I,e)}function u(e){return e.textContent}function c(e){return o(e.attributes.range.value)}function d(e){var t=r(w,e);return t.initialization=a("Initialization",c,e),t}function h(e){return r(M,e)}function p(e){var t=d(e);return t.timescale&&t.duration?t.durationSeconds=t.duration/t.timescale:t.durationSeconds=t.duration,t.segmentURLs=i("SegmentURL",l,e),t}function f(e){var t=r(D,e);return t.baseURLs=i("BaseURL",u,e),
t.segmentBase=a("SegmentBase",d,e),t.segmentList=a("SegmentList",p,e),t.contentProtection=a("ContentProtection",C,e),t}function g(e){var t=f(e);return r(P,e,t),t}function m(e){var t=f(e);t.representations=i("Representation",g,e),t.segmentTemplate=a("SegmentTemplate",h,e);for(var n=0;n<t.representations.length;n++)t.representations[n].segmentTemplate=t.segmentTemplate;return t}function v(e){var t=f(e);return r(T,e,t),t.adaptationSets=i("AdaptationSet",m,e),t}function y(e){var t={};return r({
mediaPresentationDuration:n},e,t),t.periods=i("Period",v,e),t.baseURLs=i("BaseURL",u,e),t}function b(e,t){e.manifestURL=t,e.duration=e.mediaPresentationDuration,delete e.mediaPresentationDuration,e.adaptationSets=e.periods[0].adaptationSets,delete e.periods;for(var n=0;n<e.adaptationSets.length;n++)e.adaptationSets[n].mimeType?(e.adaptationSets[n].mime=e.adaptationSets[n].mimeType,delete e.adaptationSets[n].mimeType):e.adaptationSets[n].mime=e.adaptationSets[n].representations[0].mimeType,
e.adaptationSets[n].codecs||(e.adaptationSets[n].codecs=e.adaptationSets[n].representations[0].codecs);return e}function S(e,t){return b(y((new DOMParser).parseFromString(e,"text/xml").firstChild),t)}var I={media:t,mediaRange:o,index:t,indexRange:o},w={timescale:parseInt,duration:parseInt,indexRange:o,presentationTimeOffset:parseInt,startNumber:parseInt},M={timescale:parseInt,duration:parseInt,initialization:t,media:t,startNumber:parseInt},C=function(e){var t=e.attributes.schemeIdUri
;if(!t||"http://youtube.com/drm/2012/10/10"!=t.textContent)return null;for(var n={},i=e.firstElementChild;null!=i;i=i.nextElementSibling)if("yt:SystemURL"==i.nodeName){var a=i.attributes.type.textContent;n[a]=i.textContent}return n},D={id:t,profiles:t,width:parseInt,height:parseInt,frameRate:s,audioSamplingRate:parseInt,mimeType:t,codecs:t},P={bandwidth:parseInt,qualityRanking:parseInt},T={id:parseInt,start:n,duration:n};e.parseDASHManifest=S}(),function(){function t(e){
for(var t=new DataView(e),n=0;n<e.byteLength;){var i=t.getUint32(n+4,!1);if(1936286840==i||1836019558==i)break;n+=t.getUint32(n,!1)}return new Uint8Array(e.slice(0,n))}function n(e,t){for(var n=new DataView(e),i=0;1936286840!=n.getUint32(i+4,!1);)if((i+=n.getUint32(i,!1))>=e.byteLength)throw"Could not find sidx";var a=n.getUint32(i,!1)+i;if(a>e.byteLength)throw"sidx terminates after array buffer";var r=n.getUint8(i+8);i+=12;var s=n.getUint32(i+4,!1);i+=8;var o,l;0==r?(o=n.getUint32(i,!1),
l=n.getUint32(i+4,!1),i+=8):(o=(n.getUint32(i,!1)<<32)+n.getUint32(i+4,!1),l=(n.getUint32(i+8,!1)<<32)+n.getUint32(i+12,!1),i+=16),l+=a+(t||0);var u=n.getUint16(i+2,!1);i+=4;for(var c=l,d=o,h=[],p=0;p<u;p++){var f=n.getUint32(i,!1);if(2147483648&f)throw"Unhandled indirect reference";f&=2147483647;var g=n.getUint32(i+4,!1);i+=12,h.push({size:f,offset:c,duration:g/s,time:d/s}),c+=f,d+=g}if(i!=a)throw"Error: final pos "+i+" differs from SIDX end "+a;return h}
window.ArrayBuffer&&!window.ArrayBuffer.prototype.slice&&(window.ArrayBuffer.prototype.slice=function(e,t){var n=new Uint8Array(this);null==t&&(t=n.length);for(var i=new ArrayBuffer(t-e),a=new Uint8Array(i),r=0;r<a.length;r++)a[r]=n[r+e];return i}),e.extractInit=t,e.parseSIDX=n}(),function(){function t(e){return e}function n(e){for(var t=new ArrayBuffer(e.length/2),n=new Uint8Array(t),i=0;i<e.length;i+=2)n[i/2]=parseInt(e.substr(i,2),16);return n}function i(e){
for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t}function a(e){return n(e.replace(/[{}-]/g,""))}function r(e,t,n){var i=[];if(null==n)return i;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&i.push(t(a));return i}function s(e,t,n){n=n||{};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n}function o(t){var n={},a=t.split("00000001")
;return 3!==a.length?(t||(e.log("Warning, Audio codec private data is not specified."),t="1210"),n=i(t)):(n.SPS=i(a[1]),n.PPS=i(a[2])),n}function l(t){return"AACL"==t?"mp4a.40.2":"H264"==t||"AVC1"==t?"avc1.4d40":(e.log("Warning, unsupported FourCC encountered: "+t),"")}function u(e){var t={};return s({Bitrate:parseInt},e,t),s({CodecPrivateData:o},e,t),s({MaxWidth:parseInt},e,t),s({MaxHeight:parseInt},e,t),s({FourCC:l},e,t),t}function c(e){var t={};return s({Bitrate:parseInt},e,t),s({
CodecPrivateData:o},e,t),s({SamplingRate:parseInt},e,t),s({Channels:parseInt},e,t),s({BitsPerSample:parseInt},e,t),s({PacketSize:parseInt},e,t),s({FourCC:l},e,t),t}function d(e){var t=[];if(null==e)return t;for(var n=-1,i=e.firstElementChild;null!=i;i=i.nextElementSibling)if("c"==i.nodeName){var a={};if(n==-1&&(n=null!=i.attributes.getNamedItem("t")?parseInt(i.attributes.t.value):0),a.time=n/1e7,a.timeURL=n,null==i.attributes.getNamedItem("d"))throw"Expected attribute 'd' not found"
;var r=parseInt(i.attributes.d.value);a.duration=r/1e7,a.durationURL=r,n+=r,t.push(a)}return t}function h(e){var n={};return s({Type:t},e,n),s({Url:t},e,n),"video"===n.Type?n.QualityLevels=r("QualityLevel",u,e):"audio"==n.Type&&(n.QualityLevels=r("QualityLevel",c,e)),n.Fragments=d(e),n}function p(e,t){for(var n=[],i=[],a=!1,r=!1,s=e.length-1;s>=0&&(r||"video"!==e[s].Type||(i.push(s),r=!0),a||"audio"!==e[s].Type||(i.push(s),a=!0),!r||!a);s--);for(var s=0;s<e.length;s++)if(i.indexOf(s)!==-1){
var o={};switch(o.contentProtection=null,e[s].Type){case"audio":o.mime="audio/mp4";break;case"video":o.mime="video/mp4"}if(e[s].QualityLevels){o.representations=[];for(var l=0;l<e[s].QualityLevels.length;l++){var u={};switch(u.bandwidth=e[s].QualityLevels[l].Bitrate,u.baseURLs=[],u.baseURLs[0]=e[s].Url,u.segmentBase=null,u.segs=e[s].Fragments,e[s].Type){case"audio":u.codecs=e[s].QualityLevels[l].FourCC,u.audio_codec_private_data=e[s].QualityLevels[l].CodecPrivateData,
u.audio_sample_rate=e[s].QualityLevels[l].SamplingRate;break;case"video":u.codecs=e[s].QualityLevels[l].FourCC+e[s].QualityLevels[l].CodecPrivateData.SPS[3].toString(16).toLowerCase(),u.sps=e[s].QualityLevels[l].CodecPrivateData.SPS,u.pps=e[s].QualityLevels[l].CodecPrivateData.PPS,u.width=e[s].QualityLevels[l].MaxWidth,u.height=e[s].QualityLevels[l].MaxHeight}o.representations.push(u)}o.codecs=o.representations[0].codecs}t&&(o.contentProtection=t),n.push(o)}return n}function f(e){
for(var t=atob(e.trim()),n=new ArrayBuffer(t.length),i=new Uint8Array(n),a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return{ab:n,u8:i}}function g(e){for(var t=0,n=[],i=[],a=new Uint16Array(e),r=e.byteLength/2;t<r&&(0===n.length||0===i.length);){for(;t<r&&60!==a[t];)t++;if(75===a[t+1]&&73===a[t+2]&&68===a[t+3]&&62===a[t+4])for(t+=5;t<r&&60!==a[t];)n.push(a[t]),t++;else if(76===a[t+1]&&65===a[t+2]&&95===a[t+3]&&85===a[t+4]&&82===a[t+5]&&76===a[t+6]&&62===a[t+7])for(t+=8;t<r&&60!==a[t];)i.push(a[t]),
t++;else t++}return{kid:String.fromCharCode.apply(null,n),url:String.fromCharCode.apply(null,i)}}function m(e){var t={};s({SystemID:a},e,t);var n=f(e.textContent),i=g(n.ab);return t.KID=f(i.kid).u8,t.url=i.url,t.PrHeader=n.u8,t}function v(e){var t={};return t.ProtectionHeader=r("ProtectionHeader",m,e)[0],t}function y(e){var t={};s({TimeScale:parseInt},e,t),t.TimeScale||(t.TimeScale=1e7),s({Duration:parseInt},e,t),t.StreamIndexes=r("StreamIndex",h,e);var n=r("Protection",v,e)
;n&&n[0]&&(t.Protection=n[0]),t.duration=t.Duration/t.TimeScale;var i;return t.Protection&&(i={},t.Protection.ProtectionHeader.url?i.playready=t.Protection.ProtectionHeader.url:i.playready="http://playready.directtaps.net/pr/svc/rightsmanager.asmx"),t.adaptationSets=p(t.StreamIndexes,i),t.Protection&&(t.pr={},t.pr.systemId=t.Protection.ProtectionHeader.SystemID,t.pr.prHeader=t.Protection.ProtectionHeader.PrHeader,t.pr.ivsize=8,t.pr.kid=t.Protection.ProtectionHeader.KID),t}function b(t,n){
return t.manifestURL=n,t.type=e.StreamingType.SMOOTH_STREAMING,t}function S(e,t){for(var n,i=new DOMParser,a=i.parseFromString(e,"text/xml"),r=0;r<a.childNodes.length;r++)if("SmoothStreamingMedia"===a.childNodes[r].nodeName){n=a.childNodes[r];break}return b(y(n),t)}e.parseSSManifest=S}(),function(){function t(e,t,n){e.setUint32(t,n)}function n(e,t,n){for(var i=0;i<4;i++)e.setUint8(t+4+i,n.charCodeAt(i));return 8}function i(e,t,n,i,a){return n.set(a,i),i+a.length}function a(e,i,a,r,s,o){var l=r
;return r+=n(i,r,s),o&&(r=o(e,i,a,r)),t(i,l,r-l),r}function r(e,t,n,r,s,o){return a(e,t,n,r,s,function(e,t,n,a){return i(e,t,n,a,o)})}function s(e,t,n,i){return r(e,t,n,i,"smhd",[0,0,0,0,0,0,0,0])}function o(e,t,n,i){return r(e,t,n,i,"vmhd",[0,0,0,1,0,0,0,0,0,0,0,0])}function l(e,t,n,r){return a(e,t,n,r,"esds",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,e.audio_codec_private_data[0],e.audio_codec_private_data[1],6,1,2])})}function u(e,t,n,r){
return a(e,t,n,r,"avcC",function(e,t,n,a){return a=i(e,t,n,a,[1,77,64,30,255,225]),t.setUint16(a,e.sps.length),a+=2,a=i(e,t,n,a,e.sps),t.setUint8(a,1),a+=1,t.setUint16(a,e.pps.length),a+=2,a=i(e,t,n,a,e.pps)})}function c(e,t,n){for(var i=n-t+1,a=0,r=t;r<t+i/2;r++)a=e[r],e[r]=e[n-r+t],e[n-r+t]=a}function d(e){var t=new ArrayBuffer(e.length),n=new Uint8Array(t);return n.set(e),c(n,0,3),c(n,4,5),c(n,6,7),n}function h(e,t,n,r){return a(e,t,n,r,"tenc",function(e,t,n,a){
return a=i(e,t,n,a,[0,0,0,0,0,0,1]),t.setUint8(a,e.pr.ivsize),a++,a=i(e,t,n,a,d(e.pr.kid))})}function p(e,t,n,i){return a(e,t,n,i,"schi",function(e,t,n,i){return i=h(e,t,n,i)})}function f(e,t,n,i){return r(e,t,n,i,"schm",[0,0,0,0,99,101,110,99,0,1,0,0])}function g(e,t,n,i){return"audio/mp4"!==e.mime?r(e,t,n,i,"frma",[97,118,99,49]):r(e,t,n,i,"frma",[109,112,52,97])}function m(e,t,n,i){return a(e,t,n,i,"sinf",function(e,t,n,i){return i=g(e,t,n,i),i=f(e,t,n,i),i=p(e,t,n,i)})}function v(e,t,n,r,s){
return a(e,t,n,r,s,function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,e.audio_sample_rate>>8&255,255&e.audio_sample_rate,0,0]),a=l(e,t,n,a),"enca"===s&&(a=m(e,t,n,a)),a})}function y(e,t,n,r,s){return a(e,t,n,r,s,function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t.setUint16(a,e.width),a+=2,t.setUint16(a,e.height),a+=2,
a=i(e,t,n,a,[0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),a=u(e,t,n,a),"encv"===s&&(a=m(e,t,n,a)),a})}function b(e,t,n,r){return a(e,t,n,r,"stsd",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,0,0,0,1]),"audio/mp4"!==e.mime?(e.pr&&(a=y(e,t,n,a,"encv")),a=y(e,t,n,a,"avc1")):(e.pr&&(a=v(e,t,n,a,"enca")),a=v(e,t,n,a,"mp4a")),a})}function S(e,t,n,r){return a(e,t,n,r,"stbl",function(e,t,n,a){return a=b(e,t,n,a),
a="audio/mp4"!==e.mime?i(e,t,n,a,[0,0,0,16,115,116,116,115,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,99,0,0,0,0,0,0,0,0,0,0,0,16,115,116,99,111,0,0,0,0,0,0,0,0,0,0,0,20,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,115,0,0,0,0,0,0,0,0]):i(e,t,n,a,[0,0,0,16,115,116,116,115,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,99,0,0,0,0,0,0,0,0,0,0,0,16,115,116,99,111,0,0,0,0,0,0,0,0,0,0,0,20,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,0])})}function I(e,t,n,i){return r(e,t,n,i,"url ",[0,0,0,1])}
function w(e,t,n,r){return a(e,t,n,r,"dref",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0,0,0,0,1]),a=I(e,t,n,a)})}function M(e,t,n,i){return a(e,t,n,i,"dinf",function(e,t,n,i){return i=w(e,t,n,i)})}function C(e,t,n,i){return a(e,t,n,i,"minf",function(e,t,n,i){return i=M(e,t,n,i),i=S(e,t,n,i),i="audio/mp4"!==e.mime?o(e,t,n,i):s(e,t,n,i)})}function D(e,t,n,i){
return"audio/mp4"!==e.mime?r(e,t,n,i,"hdlr",[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]):r(e,t,n,i,"hdlr",[0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}function P(e,t,n,i){return r(e,t,n,i,"mdhd",[0,0,0,0,204,96,118,241,204,96,118,241,0,152,150,128,0,0,0,0,85,196,0,0])}function T(e,t,n,i){return a(e,t,n,i,"mdia",function(e,t,n,i){return i=P(e,t,n,i),i=D(e,t,n,i),i=C(e,t,n,i)})
}function x(e,t,n,r){return a(e,t,n,r,"tkhd",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,3,204,96,118,241,204,96,118,241,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0]),t.setUint32(a,e.width),a+=4,t.setUint32(a,e.height),a+=4,t.setUint16(a,0),a+=2})}function E(e,t,n,i){return a(e,t,n,i,"trak",function(e,t,n,i){return i=x(e,t,n,i),i=T(e,t,n,i)})}function A(e,t,n,i){
return r(e,t,n,i,"trex",[0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}function k(e,t,n,i){return a(e,t,n,i,"mvex",function(e,t,n,i){return i=A(e,t,n,i)})}function L(e,t,n,r){return a(e,t,n,r,"pssh",function(e,t,n,a){return a=i(e,t,n,a,[0,0,0,0]),a=i(e,t,n,a,e.pr.systemId),t.setUint32(a,e.pr.prHeader.length),a+=4,a=i(e,t,n,a,e.pr.prHeader)})}function _(e,t,n,i){
return r(e,t,n,i,"mvhd",[0,0,0,0,204,96,118,241,204,96,118,241,0,152,150,128,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2])}function N(e,t,n,i){return a(e,t,n,i,"moov",function(e,t,n,i){return i=_(e,t,n,i),e.pr&&(i=L(e,t,n,i)),i=k(e,t,n,i),i=E(e,t,n,i)})}function R(e){var t=new ArrayBuffer(2e4),n=new DataView(t),i=new Uint8Array(t),a=0,r=0;a=N(e,n,i,a),r=a-1;var s={}
;return s.data=t.slice(0,a),s.init={},s.init.start=0,s.init.end=r,s}function O(e,t,n){for(var i=0,a=t,r=0;r<4;r++)i<<=8,i+=n.charCodeAt(r);for(;e.getUint32(a+4,!1)!=i;)if((a+=e.getUint32(a))>=e.byteLength)throw"Could not find box: "+n;return a}function j(e,t){var n=O(e,t,"traf");n=O(e,n+8,"tfhd"),e.setUint32(n+12,1)}function z(e,t,n,i){var a=O(e,t,n),r=e.getUint32(a);return e.setUint32(a,r+i),a}function U(e,t,n){var i=0;if(i=z(e,i,"moof",t),i=z(e,i+8,"traf",t),i=O(e,i+8,"trun"),
1&e.getUint32(i+8)){var a=i+16;e.setUint32(a,n)}return i}function F(e,t,n){var i=0;if(i=z(e,i,"moof",t),i=z(e,i+8,"traf",t),i=O(e,i+8,"trun"),1&e.getUint32(i+8)){var a=i+16,r=e.getUint32(a);e.setUint32(a,r+n)}return i}function B(e,t){var n=[0,0,0,20,116,102,100,116,1,0,0,0],i=n.length+8,a=new ArrayBuffer(e.byteLength+i),r=(new Uint8Array(e),new DataView(e)),s=new Uint8Array(a),o=new DataView(a),l=0;return j(r,8),l=F(r,i,i),s.set(new Uint8Array(e,0,l)),s.set(n,l),
o.setUint32(l+12,t/4294967295&4294967295),o.setUint32(l+16,4294967295&t),s.set(new Uint8Array(e,l,e.byteLength-l),l+i),a}function V(e,t,n,i,a){if(!a)return new Uint8Array(0);for(var r=new Uint8Array(n),s=0,o=0,l=t,u=0;u<n;u++)s=e.getUint16(l+i),o=i+2+6*s,r[u]=o,l+=o;return r}function H(e,t,n,r,s,o){return a(e,t,n,r,"mdat",function(e,t,n,a){return a=i(e,t,n,a,s),a=i(e,t,n,a,o)})}function W(e,t,n,r){return a(e,t,n,r,"saio",function(e,t,n,a){a=i(e,t,n,a,[0,0,0,0,0,0,0,1]);var r=a+4+8
;return t.setUint32(a,r),a+=4})}function Y(e,t,n,r,s,o,l,u){return a(e,t,n,r,"saiz",function(e,t,n,a){return a=l?i(e,t,n,a,[0,0,0,0,0]):i(e,t,n,a,[0,0,0,0,u]),t.setUint32(a,s),a+=4,n.set(o,a),a+=o.length})}function Q(e){var t=new DataView(e),n=0,i=0,a=0,r=t.getUint32(n);n=O(t,n+8,"traf"),n=O(t,n+8,"trun"),i=t.getUint32(n+12),n=O(t,n,"uuid");var s=t.getUint8(n+27),o=!1;if(2!==s&&0!==s)throw"uuid flags expected is 0x02 or 0x00 but found: "+s;2===s&&(o=!0);var l=t.getUint32(n+28)
;if(i!==l)throw"Samples count does not match "+i+" "+l;var u=t.getUint32(n);a=u-32;var c=new ArrayBuffer(e.byteLength+200),d=new Uint8Array(c),h=new DataView(c);d.set(new Uint8Array(e,0,n));var p=n,f=n+32,g=n+u,m=t.getUint32(g),v=V(t,f,i,8,o);if(p=Y(null,h,d,p,i,v,o,8),p=W(null,h,d,p),o){for(var y=0,b=0;b<v.length;b++)y+=v[b];if(y!==a)throw"Samples size does not match "+y+" "+a}else if(8*i!==a)throw"Samples size does not match "+8*i+" "+a
;var S=new Uint8Array(e,f,a),I=new Uint8Array(e,g+8,m-8),w=p-r,M=p;return p=H(null,h,d,p,S,I),U(h,w,M+8+a),new Uint8Array(c,0,p)}function G(e,t,n){var i=B(e,t);return n?Q(i):new Uint8Array(i)}e.abtohex=function(e){for(var t=[],n=0;n<e.byteLength;n++)t.push(e[n].toString(16));return t},e.abtob64=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e)))},e.createSSInit=R,e.process_traf=G}(),function(){function t(e){
for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function n(e){return String.fromCharCode.apply(String,e)}var i=function(e){this.video=e,!e.generateKeyRequest&&e.webkitGenerateKeyRequest&&(e.generateKeyRequest=e.webkitGenerateKeyRequest),!e.addKey&&e.webkitAddKey&&(e.addKey=e.webkitAddKey),this.initDataQueue=[],this.flavor=null,this.keySystem=null,this.licenseServerURL=null,this.mediaEvents_={},
e.generateKeyRequest&&e.addKey&&(this.addMediaEventListener("needkey",this.onNeedKey),this.addMediaEventListener("keymessage",this.onKeyMessage),this.addMediaEventListener("keyerror",this.onKeyError),this.addMediaEventListener("webkitneedkey",this.onNeedKey),this.addMediaEventListener("webkitkeymessage",this.onKeyMessage),this.addMediaEventListener("webkitkeyerror",this.onKeyError))};i.kMime='video/mp4; codecs="avc1.640028"',i.kFlavorToSystem={
clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.youtube.playready","com.microsoft.playready"]},i.prototype.init=function(e,t,n){this.chooseFlavor(i.kMime,e,t),this.isClearKey="clearkey"==this.flavor},i.prototype.destroy=function(){this.removeAllMediaEventListeners(),this.video=null},i.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.video.addEventListener(e,n),this.mediaEvents_[e]=n},
i.prototype.removeMediaEventListener=function(e){this.video.removeEventListener(e,this.mediaEvents_[e]),this.mediaEvents_[e]=null},i.prototype.removeAllMediaEventListeners=function(){for(var e in this.mediaEvents_)e&&this.removeMediaEventListener(e)},i.prototype.chooseFlavor=function(e,t,n){for(var a in t)if(!n||a==n){var r=i.kFlavorToSystem[a];if(r)for(var s in r)if(this.video.canPlayType(e,r[s]))return this.flavor=a,this.keySystem=r[s],void(this.licenseServerURL=t[a])}
throw"Could not find a compatible key system"},i.prototype.extractBMFFClearKeyID=function(e){var t=new ArrayBuffer(e.length);new Uint8Array(t).set(e);for(var n=new DataView(t),i=0;i<t.byteLength;){var a=n.getUint32(i,!1),r=n.getUint32(i+4,!1);if(1886614376!=r)throw"Box type "+r.toString(16)+' not equal to "pssh"';if(1477738184==n.getUint32(i+12,!1)&&69420633==n.getUint32(i+16,!1)&&2464609580==n.getUint32(i+20,!1)&&1558758348==n.getUint32(i+24,!1)){var s=n.getUint32(i+28,!1)
;if(16!=s)throw"Unexpected KID size "+s;return new Uint8Array(t.slice(i+32,i+32+s))}if(3991899049==n.getUint32(i+12,!1)&&2044086990==n.getUint32(i+16,!1)&&2747803612==n.getUint32(i+20,!1)&&3575456237==n.getUint32(i+24,!1))return new Uint8Array(t.slice(i+36,i+52));i+=a}return e},i.prototype.onNeedKey=function(t){if(e.dlog(2,"onNeedKey()"),!this.keySystem)throw"Not initialized! Bad manifest parse?";if(16==t.initData.length)return void e.log("Dropping non-BMFF needKey event");var n=t.initData
;this.isClearKey&&(n=this.extractBMFFClearKeyID(t.initData)),this.video.generateKeyRequest(this.keySystem,n),this.initDataQueue.push(n)},i.prototype.onKeyMessage=function(t){e.dlog(2,"onKeyMessage() Sending request: "+this.licenseServerURL+" "+t.sessionId);var n=this.initDataQueue.shift(),i=new XMLHttpRequest;i.open("POST",this.licenseServerURL),i.setRequestHeader("content-type","text/xml;charset=utf-8"),i.addEventListener("load",this.onLoad.bind(this,n,t.sessionId)),
i.responseType="arraybuffer",i.send(t.message)},i.prototype.onKeyError=function(t){e.dlog(2,"onKeyError("+t.keySystem+", "+t.errorCode.code+", "+t.systemCode+")")},i.prototype.onLoad=function(i,a,r){if(e.dlog(2,"onLoad("+this.licenseServerURL+"): "+a),r.target.status<200||r.target.status>299)throw"Bad XHR status: "+r.target.statusText;var s=n(new Uint8Array(r.target.response)).split("\r\n").pop();this.video.addKey(this.keySystem,t(s),i,a)},e.EMEManager=i}(),function(){
var t=function(e,t,n,i,a,r,s){this.url=e,this.bandwidth=t,this.width=n,this.height=i,this.sps=a,this.pps=r,this.codecs=s,this.initFragment=null,this.initRequestData=null,this.indexRequestData=null,this.isInitialized=!1,this.segs=null};e.Representation=t}(),function(){var t={ENOUGH:20},n=function(e,t,n,i,a,r){if(this.sourceBuffer_=t,this.sourceBuffer_.appendBuffer)this.appendBuffer_=this.sourceBuffer_.appendBuffer,this.sourceBuffer_.addEventListener("updateend",this.onUpdateEnd.bind(this));else{
if(!this.sourceBuffer_.append)throw new Error("Unknown SourceBuffer interface");this.appendBuffer_=this.sourceBuffer_.append}this.representations_=n,this.currentRep=0,this.segIndex=null,this.mime=i,this.resetReason=null,this.active=!0,this.type=a,this.pr_=r,this.seekingStartTime=null,this.mediaSrc_=e,this.bitrates=[];for(var s=0;s<this.representations_.length;s++)this.bitrates.push(this.representations_[s].bandwidth);this.deferredAppends_=[],this.segmentQueue=[],this.segmentSize=0,
this.segmentLastEndTime=0,this.waitingForBuffer=!1,this.segmentTimeout=null};n.prototype.destroy=function(){delete this.mediaSrc_},n.prototype.getCurrentTime=function(){var e=window.googledash.player,t=e&&e.getMediaElement();return t?t.currentTime:0},n.prototype.updateBuffer=function(){var t=this.sourceBuffer_.buffered;if(t.length>0){var n=t.end(t.length-1)-this.segmentLastEndTime
;e.dlog(3,"["+this.mime+"] Play head: "+this.getCurrentTime()+" Segment size: "+(this.segmentSize/1024/1024).toFixed(2)+" MB Segment duration: "+n),this.segmentQueue.push({size:this.segmentSize,duration:n,offset:this.segmentLastEndTime})}},n.prototype.reset=function(t){e.dlog(1,"SourceBuffer["+this.mime+"] reset: "+t),this.segIndex=null,this.representations_[this.currentRep].isInitialized=!1,this.resetReason=t||null,this.active=!0,this.segmentQueue=[],this.segmentSize=0,
this.segmentLastEndTime=0,this.waitingForBuffer=!1,null!=this.segmentTimeout&&clearTimeout(this.segmentTimeout),"open"==this.mediaSrc_.readyState&&this.sourceBuffer_.abort()},n.prototype.isInitialized=function(){return this.representations_[this.currentRep].isInitialized},n.prototype.initialize=function(){this.representations_[this.currentRep].isInitialized=!0},n.prototype.updating=function(){return this.sourceBuffer_.updating},n.prototype.onUpdateEnd=function(t){this.updateBuffer(),
this.deferredAppends_.length>0&&(e.dlog(2,"SourceBuffer["+this.mime+"] appended deferred data"),this.append(this.deferredAppends_.pop()))},n.prototype.append=function(t){var n=this.sourceBuffer_.buffered;if(this.segmentSize=t.length,this.segmentLastEndTime=0,n.length>0&&(this.segmentLastEndTime=n.end(n.length-1)),this.sourceBuffer_.updating){if(this.deferredAppends_.length<5)return e.dlog(2,"SourceBuffer["+this.mime+"] deferring append"),void this.deferredAppends_.push(t)
;e.log("SourceBuffer["+this.mime+"] too many deferrals, aborting"),this.deferredAppends_=[],this.appendBuffer_.abort()}this.appendBuffer_.call(this.sourceBuffer_,t),"appendBuffer"in this.sourceBuffer_||this.updateBuffer()},n.prototype.getCurrentRep=function(){return this.representations_[this.currentRep]},n.prototype.changeQuality=function(t){if(t===this.currentRep)return!1;e.dlog(2,"Bandwitdth change sourceBuffer["+this.mime+"]: "+this.active),
e.dlog(2,"bandwidthChange["+this.mime+"]: "+this.currentRep+" "+t);var n,i=this.representations_[this.currentRep].bandwidth,a=this.representations_[t].bandwidth;e.dlog(2,"bandwidthChange["+this.mime+"]: "+i+" "+a),n=i>a?"rep_down":"rep_up",this.reset(n),this.currentRep=t},n.prototype.getRangesString=function(){for(var e=this.sourceBuffer_.buffered,t="Ranges["+this.mime+"]:",n=0;n<e.length;n++)t+=" ["+e.start(n)+","+e.end(n)+"]";return t},n.prototype.findRangeForPlaybackTime=function(e){
for(var t=this.sourceBuffer_.buffered,n=0;n<t.length;n++)if(t.start(n)<=e&&t.end(n)>=e)return{start:t.start(n),end:t.end(n)};return null},n.prototype.getBufferSize=function(t){e.dlog(4,"Time: "+t+" Ranges in onProgress: "+this.getRangesString());var n=this.findRangeForPlaybackTime(t),i=n&&n.end||0;if(null!==this.segIndex){var a=this.representations_[this.currentRep].segs[this.segIndex].time;i=a>i?a:i}if(n){Math.abs(n.end-i)>.001&&e.dlog(2,"Difference in available data: "+n.end+" "+i)}return i-t
},n.prototype.findSegmentIndexForTime=function(t){for(var n=this.representations_[this.currentRep].segs,i=0;i<n.length;i++){var a=n[i];if(a.time<=t&&a.time+a.duration>=t)return i==n.length-1&&a.time+a.duration+.5<t?null:i}return e.dlog(5,"Could not find segment for time "+t),null},n.prototype.identifyNextFragment=function(n){var i=this.findRangeForPlaybackTime(n),a=i&&i.end||n;if(a>n+t.ENOUGH)return e.dlog(3,"Enough buffering currentTime in rage: "+this.mime+" "+n+"  "+a),null
;if(1==this.waitingForBuffer)return null;if(null==this.segIndex){if(e.dlog(4,"Non existing index, finding the index for the next request["+this.mime+"]"),this.segIndex=this.findSegmentIndexForTime(a),null===this.segIndex)return this.active=!1,null;e.dlog(4,"New Index["+this.mime+"]: "+a+" "+this.segIndex)}else{null==i&&e.log("Playback head outside of buffer in append-continue state.");var r=this.representations_[this.currentRep].segs[this.segIndex].time
;if(r>n+t.ENOUGH)return e.dlog(3,"Enough buffering: "+this.mime+" "+this.segIndex+" "+n+"  "+r),null}return a},n.prototype.appendData=function(t){for(e.dlog(2,"["+this.mime+"] Time is "+this.getCurrentTime()+", asked to add a "+(t.byteLength/1024/1024).toFixed(2)+" MB segment, see if we can."),
this.segmentQueue.length>0&&e.dlog(2,"["+this.mime+"] End of first segment is "+(this.segmentQueue[0].offset+this.segmentQueue[0].duration).toFixed(2));this.segmentQueue.length>0&&this.segmentQueue[0].offset+this.segmentQueue[0].duration<this.getCurrentTime()+2;)e.dlog(2,"["+this.mime+"] Removing collectable segment."),this.segmentQueue.shift();for(var n=0,i=0;i<this.segmentQueue.length;i++)n+=this.segmentQueue[i].size
;e.dlog(2,"["+this.mime+"] Time is "+this.getCurrentTime()+" and there are "+(n/1024/1024).toFixed(2)+" MB uncollectable, bringing the proposed total to "+((n+t.byteLength)/1024/1024).toFixed(2)+" MB."),(n+t.byteLength)/1024/1024>24&&this.segmentQueue.length>0?(e.dlog(2,"["+this.mime+"] Waiting for buffer to have enough room."),this.waitingForBuffer=!0,this.segmentTimeout=setTimeout(function(){this.appendData(t)}.bind(this),1e3)):(this.reallyAppendData(t),this.waitingForBuffer=!1)},
n.prototype.reallyAppendData=function(t){e.dlog(3,"["+this.mime+"] Current Time: "+this.getCurrentTime()+" Ranges in appendData1: "+this.getRangesString());var n,i=this.representations_[this.currentRep].segs[this.segIndex].time,a=i+this.representations_[this.currentRep].segs[this.segIndex].duration;e.dlog(4,"Appending Response ["+this.mime+"] : ["+i+","+a+"]"),
n=this.type===e.StreamingType.SMOOTH_STREAMING?process_traf(t,this.representations_[this.currentRep].segs[this.segIndex].timeURL,this.pr_):new Uint8Array(t),this.append(n),this.segIndex++,this.segIndex>=this.representations_[this.currentRep].segs.length&&(this.active=!1,e.dlog(2,"Source["+this.mime+"] is not active: "+this.segIndex+" "+this.representations_[this.currentRep].segs.length)),e.dlog(3,"Ranges in appendData2: "+this.getRangesString())},e.SourceBufferManager=n}(),function(){
var t=function(){this.mediaSrc_=null,this.sourceBufferManagers_=[],this.videoSrcBufIndex_=0,this.emeMgr_=null,this.type=null,this.pr,this.manifest_=null,this.attachedHandlers_={}};t.prototype.destroy=function(){null!=this.mediaSrc_&&(this.detachAllHandlers_(),this.mediaSrc_=null);var e=this.sourceBufferManagers_;if(e){for(var t=0;t<e.length;t++)e[t].reset(),e[t].destroy();e.length=0}this.sourceBufferManagers_=null,this.emeMgr_&&(this.emeMgr_.destroy(),this.emeMgr_=null),this.revokeObjectURL_(),
this.video_=null},t.prototype.getMediaSource=function(){return this.mediaSrc_},t.prototype.getSourceBufferCount=function(){return this.sourceBufferManagers_.length},t.prototype.getVideoSrcBufferIndex=function(){return this.videoSrcBufIndex_},t.prototype.getLevel=function(e){return this.sourceBufferManagers_[e].currentRep},t.prototype.getSegIndex=function(e){return this.sourceBufferManagers_[e].segIndex},t.prototype.getCurrentRep=function(e){return this.sourceBufferManagers_[e].getCurrentRep()},
t.prototype.getBufferSize=function(e,t){return this.sourceBufferManagers_[e].getBufferSize(t)},t.prototype.getLevel=function(e){return this.sourceBufferManagers_[e].currentRep},t.prototype.appendData=function(e,t){this.mediaSrc_&&"closed"!==this.mediaSrc_.readyState&&this.sourceBufferManagers_[e].appendData(t)},t.prototype.append=function(e,t){this.mediaSrc_&&"closed"!==this.mediaSrc_.readyState&&this.sourceBufferManagers_[e].append(t)},t.prototype.isActive=function(e){
return this.sourceBufferManagers_[e].active},t.prototype.isInitialized=function(e){return this.sourceBufferManagers_[e].isInitialized()},t.prototype.initialize=function(e){this.sourceBufferManagers_[e].initialize()},t.prototype.mime=function(e){return this.sourceBufferManagers_[e].mime},t.prototype.getBitrates=function(e){return this.sourceBufferManagers_[e].bitrates},t.prototype.identifyNextFragment=function(e,t){return this.sourceBufferManagers_[e].identifyNextFragment(t)},
t.prototype.resetAll=function(e){for(var t=0;t<this.sourceBufferManagers_.length;t++)this.sourceBufferManagers_[t].reset(e)},t.prototype.reset=function(e,t){this.sourceBufferManagers_[e].reset(t)},t.prototype.changeQuality=function(e,t){return this.sourceBufferManagers_[e].changeQuality(t)},t.prototype.endOfStream=function(){if(this.mediaSrc_&&"open"===this.mediaSrc_.readyState){for(var t=!1,n=0;n<this.sourceBufferManagers_.length;n++)if(this.sourceBufferManagers_[n].updating()){t=!0;break}
t||(e.log("Ending stream"),this.mediaSrc_.endOfStream())}},t.prototype.absolutizeURL=function(e,t){if(void 0===t&&(t=""),t.match(/^[a-z]*:\/\//))return t;return("/"==t[0]?e.match(/^[a-z]*:\/\/[^\/]*/)[0]:e.replace(/\/[^\/]*$/,"/"))+t},t.prototype.displaySourceBuffers=function(t){for(var n=0;n<this.mediaSrc_.sourceBuffers.length;n++){var i=this.mediaSrc_.sourceBuffers[n];e.dlog(5,t+" SourceBuffer["+i.mime+"]: "+i.active)}},t.prototype.normalizeRepresentation=function(t){var n={
url:this.absolutizeURL(this.manifest_.manifestURL,t.baseURLs[0]),bandwidth:t.bandwidth,width:t.width,height:t.height,sps:t.sps,pps:t.pps,audio_codec_private_data:t.audio_codec_private_data,audio_sample_rate:t.audio_sample_rate};if(this.type===e.StreamingType.SMOOTH_STREAMING)return n.segs=t.segs,n;var i=null;if(null!=t.segmentList){i=t.segmentList.initialization,n.segs=[];for(var a=0;a<t.segmentList.segmentURLs.length;a++){var r=t.segmentList.segmentURLs[a],s={start:r.mediaRange.start,
end:r.mediaRange.end,index:r.indexRange&&r.indexRange.end||null,time:t.segmentList.durationSeconds*a,duration:t.segmentList.durationSeconds,subsegments:null};n.segs.push(s)}}else if(null!=t.segmentTemplate){n.segs=[];var o=t.segmentTemplate.duration/t.segmentTemplate.timescale,s={url:n.url+t.segmentTemplate.initialization.replace("$RepresentationID$",t.id)};n.segs.push(s);for(var l=0;l*o<this.manifest_.duration;l++){var s={start:-1,end:-1,index:null,time:l*o,duration:o,subsegments:null,
url:n.url+t.segmentTemplate.media.replace("$RepresentationID$",t.id).replace("$Number$",l)};n.segs.push(s)}}else{var s={start:null,end:null,index:null,time:0,duration:this.manifest_.duration,subsegments:null};if(null!=t.segmentBase){var r=t.segmentBase;i=r.initialization,null!=r.indexRange&&(n.indexRequestData=r.indexRange)}n.segs=[s]}return this.type!==e.StreamingType.SMOOTH_STREAMING&&(n.initRequestData={start:i&&i.start||0,end:i&&i.end||n.segs[0].index||null}),n},
t.prototype.onSourceOpen=function(t,n,i){e.dlog(2,"onSourceOpen()");var a,r,s,o,l=this.video_;if(this.mediaSrc_.sourceBuffers.length)for(e.dlog(2,"onSourceOpen(): Target already has buffers, bailing."),s=0;s<this.mediaSrc_.sourceBuffers.length;s++)this.mediaSrc_.sourceBuffers[s].active=!0;else{for(this.mediaSrc_.duration=this.manifest_.duration,this.sourceBufferManagers_=[],this.emeMgr_=new e.EMEManager(l),this.type=this.manifest_.type,this.pr=this.manifest_.pr,
s=0;s<this.manifest_.adaptationSets.length;s++)if(o=this.manifest_.adaptationSets[s],!(o.mime&&o.mime.indexOf("webm")>=0)){o.contentProtection&&this.emeMgr_.init(o.contentProtection,options.flavor),a=o.representations.map(this.normalizeRepresentation.bind(this)),r=this.mediaSrc_.addSourceBuffer(o.mime+'; codecs="'+o.codecs+'"'),e.dlog(2,"Buffer added properly: "+(this.mediaSrc_.sourceBuffers[s]===r));var u=new e.SourceBufferManager(this.mediaSrc_,r,a,o.mime,this.type,this.pr)
;o.mime.indexOf("video")>=0&&(this.videoSrcBufIndex_=s),this.sourceBufferManagers_.push(u),e.dlog(2,"onSourceOpen. Initialized SourceBuffer["+o.mime+"]")}n()}},t.prototype.isSupported=function(e){return(null!=window.MediaSource||null!=window.WebKitMediaSource)&&(null==window.MediaSource&&(window.MediaSource=window.WebKitMediaSource),!0)},t.prototype.init=function(){this.mediaSrc_=new MediaSource},t.prototype.attach=function(e,t,n,i){
if(!this.mediaSrc_)throw new Error("MediaSourceManager has not been initialized, please call init()");this.manifest_=t,this.video_=e,this.attachHandler_("sourceopen",this.onSourceOpen.bind(this,n,i)),this.attachHandler_("webkitsourceopen",this.onSourceOpen.bind(this,n,i)),this.createAndSetObjectURL_(e,this.mediaSrc_)},t.prototype.createAndSetObjectURL_=function(e,t){this.revokeObjectURL_(),this.videoURL=window.URL.createObjectURL(t),e.src=this.videoURL},t.prototype.revokeObjectURL_=function(){
this.videoURL&&(window.URL.revokeObjectURL(this.videoURL),this.videoURL=null)},t.prototype.attachHandler_=function(e,t){this.attachedHandlers_[e]||(this.attachedHandlers_[e]=[]),this.attachedHandlers_[e].push(t),this.mediaSrc_.addEventListener(e,t)},t.prototype.detachAllHandlers_=function(){var e,t=this.attachedHandlers_,n=this.mediaSrc_;for(var i in t){e=t[i];for(var a=0;a<e.length;a++)n.removeEventListener(i,e[a]);e.length=0}},e.MediaSourceManager=t}(),function(){var t=function(e){
if(null==e)throw new Error("A url for the manifest is required");this.url_=e,this.callback_=null,this.manifest_=null};t.prototype.load=function(t){if(null==t)throw new Error("A callback is required");this.callback_=t,this.requestManifest_(),e.dlog(1,"Sent request to get the manifest")},t.prototype.getManifest=function(){return this.manifest_},t.prototype.manifestType_=function(){return this.url_.lastIndexOf(".mpd")!=-1?0:1},t.prototype.requestManifest_=function(){var e=new XMLHttpRequest
;e.addEventListener("load",this.onManifestLoad_.bind(this)),e.addEventListener("error",this.onManifestError_.bind(this)),e.open("GET",this.url_),e.send()},t.prototype.onManifestError_=function(t){var n="Error retrieving manifest from "+this.url_;return e.log(n),this.callback_(n)},t.prototype.onManifestLoad_=function(t){e.dlog(2,"Manifest received");var n=null;if(t.target.status<200||t.target.status>299)return n="HTTP error "+t.target.status+" retrieving manifest from "+this.url_,e.log(n),
this.callback_(n);switch(this.manifestType_()){case 0:this.manifest_=e.parseDASHManifest(t.target.responseText,this.url_);break;case 1:this.manifest_=e.parseSSManifest(t.target.responseText,this.url_)}return null===this.manifest_?(n="Error parsing the manifest",e.log(n),this.callback_(n)):this.callback_(n,this.manifest_)},e.ManifestLoader=t}(),function(){var t=5e5,n=5e5,i=function(e,t,n){this.bitrates_=e,this.levelCount_=this.bitrates_.length,this.algorithm_=t||"adaptive",this.cooldownPeriod_=2,
n&&(this.level_=parseInt(n))};i.prototype.onBandwithTracking=function(i){var a=i.target;if(null!=a.lastTime&&i.timeStamp!=a.lastTime){var r=8e3*(i.loaded-a.lastSize)/(i.timeStamp-a.lastTime);t=.99*t+(1-.99)*r,n=.98*n+(1-.98)*r}a.lastTime=i.timeStamp,a.lastSize=i.loaded,e.dlog(5,"Calculated bandwidth: "+t+" "+n)},i.prototype.adapt=function(i){if(!this.bitrates_||this.bitrates_.length<=1)return-1;var a=-1
;if("fixed"===this.algorithm_)a=this.level_;else if("random"===this.algorithm_)Math.random()>.5&&(a=Math.floor(Math.random()*this.levelCount_));else if("adaptive"===this.algorithm_)if(this.cooldownPeriod_)this.cooldownPeriod_--;else{var r=0,s=0,o=Math.min(t,n);e.dlog(5,"Calculated Bandwidth: "+o+" globalSlowBandwidth: "+t+" globalFastBandwidth: "+n);for(var l=0;l<this.bitrates_.length;l++){var u=this.bitrates_[l];u>r&&u<.85*o-128e3&&(r=u,s=l)}
if(s!==i)return e.dlog(2,"Selected new rate "+r+" for bandwidth "+o+" (from "+t+", "+n+")"),this.cooldownPeriod_=8,s}return i!==a&&a!==-1?(e.dlog(2,"Selected new bitrate level: "+a),a):-1},e.AdaptiveManager=i}(),function(){var t=function(e,t,n){this.mediaSrcMgr_=e,this.bufferIndex_=t,this.adaptiveManager_=n,this.fragmentRequest_=null};t.prototype.appendInit=function(){e.dlog(2,"Appending init ["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]: "+this.mediaSrcMgr_.getLevel(this.bufferIndex_)),
this.mediaSrcMgr_.initialize(this.bufferIndex_),this.mediaSrcMgr_.append(this.bufferIndex_,this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment)},t.prototype.onXHRAbort=function(t){e.log("Received abort of XHR.")},t.prototype.onXHRError=function(t){if(this.fragmentRequest_!==t.target)return void e.log("Received error of untracked XHR.");e.log("Received error of XHR."),this.fragmentRequest_=null},t.prototype.onXHRLoad=function(t){
this.fragmentRequest_!==t.target&&e.log("Error, HTTP response for unknown request");var n=this.fragmentRequest_;if(this.fragmentRequest_=null,n.readyState==n.DONE){if(n.status>=300)return void e.log("HTTP Request failure, status="+n.status);if(n.is_index&&(e.dlog(2,"Index Response"),this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs=e.parseSIDX(n.response,n.startByte)),n.is_init)return e.dlog(2,"Init Response"),
this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(n.response),void(this.mediaSrcMgr_.isInitialized(this.bufferIndex_)||this.appendInit());this.mediaSrcMgr_.appendData(this.bufferIndex_,n.response)}},t.prototype.cancelRequests=function(){null!=this.fragmentRequest_&&(this.fragmentRequest_.abort(),this.fragmentRequest_=null)},t.prototype.makeSSXHR=function(){
var t=new XMLHttpRequest,n=this.mediaSrcMgr_.getSegIndex(this.bufferIndex_),i=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,a=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).bandwidth,r=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[n].timeURL;if(i=i.replace("{bitrate}",a),i=i.replace("{start time}",r),t.open("GET",i),t.responseType="arraybuffer",t.addEventListener("load",this.onXHRLoad.bind(this)),t.addEventListener("error",this.onXHRError.bind(this)),
t.addEventListener("abort",this.onXHRAbort.bind(this)),null==i)throw"Null URL";return t.is_init=!1,t.is_index=!1,t.lastTime=null,t.lastSize=null,t.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),t.send(),e.dlog(2,"Sent XHR: url="+i),t},t.prototype.makeXHR=function(t){
var n,i,a=new XMLHttpRequest,r=this.mediaSrcMgr_.getSegIndex(this.bufferIndex_),s=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_),o=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,l=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[r],u=!1;null==r&&(r=0),null!=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[r].url&&(o=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[r].url),t?(n=0,i=s.initRequestData.end,null!=s.indexRequestData&&(i=s.indexRequestData.end,
u=!0)):(n=l.offset,i=l.offset+l.size-1);var c=null;null!=n&&null!=i&&(c="bytes="+n+"-"+i);var d=!!/youtube.com/.exec(o);if(c&&d&&(o=o.replace(/&range=[^&]*/,""),o+="&range="+c.substring(6)),a.open("GET",o),a.responseType="arraybuffer",a.startByte=n,null==c||d||a.setRequestHeader("Range",c),a.addEventListener("load",this.onXHRLoad.bind(this)),null==o)throw"Null URL";return a.is_init=t,a.is_index=u,a.lastTime=null,a.lastSize=null,
a.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),a.send(),e.dlog(2,"Sent XHR: url="+o+", range="+c),a},t.prototype.findRangeForPlaybackTime=function(e,t){for(var n=e.buffered,i=0;i<n.length;i++)if(n.start(i)<=t&&n.end(i)>=t)return{start:n.start(i),end:n.end(i)}},t.prototype.initFragmentRequestNeeded=function(){if(null==this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment){
e.dlog(2,"Creating Init segment["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]");var t=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_);if(this.mediaSrcMgr_.type===e.StreamingType.SMOOTH_STREAMING){var n={pps:t.pps,sps:t.sps,width:t.width,height:t.height,mime:this.mediaSrcMgr_.mime(this.bufferIndex_),pr:this.mediaSrcMgr_.pr,audio_codec_private_data:t.audio_codec_private_data,audio_sample_rate:t.audio_sample_rate},i=e.createSSInit(n)
;return this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(i.data),this.appendInit(),!1}return this.fragmentRequest_=this.makeXHR(!0),!0}return this.mediaSrcMgr_.isInitialized(this.bufferIndex_)||this.appendInit(),!1},t.prototype.requestNextFragment=function(t,n){this.mediaSrcMgr_.type===e.StreamingType.SMOOTH_STREAMING?this.fragmentRequest_=this.makeSSXHR():this.fragmentRequest_=this.makeXHR(!1),this.fragmentRequest_.expected_time=n},t.prototype.tick=function(t){
if(!this.mediaSrcMgr_.isActive(this.bufferIndex_))return e.dlog(4,"Not active["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]"),!1;if(this.fragmentRequest_)e.dlog(4,"Will not request next segment["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"] request pending");else if(!this.initFragmentRequestNeeded()){var n=this.mediaSrcMgr_.identifyNextFragment(this.bufferIndex_,t);if(null!==n){var i=-1
;this.mediaSrcMgr_.mime(this.bufferIndex_).indexOf("video")>=0&&(i=this.adaptiveManager_.adapt(this.mediaSrcMgr_.getLevel(this.bufferIndex_))),i>=0?(this.cancelRequests(),this.mediaSrcMgr_.changeQuality(this.bufferIndex_,i)):this.requestNextFragment(t,n)}}return!0},e.FragmentManager=t}(),function(){function t(e){var t=new RegExp("[?&]"+e+"=([^&]*)"),n=t.exec(window.location.search);return null!=n?(n=n[1],/%/.exec(n)&&(n=decodeURIComponent(n)),n):null}function n(){
for(var e={},n=["autoplay","algorithm","flavor","level","cc","url"],i=0;i<n.length;i++){var a=t(n[i]);e[n[i]]=a}if(e&&e.url)for(var r in e)e.hasOwnProperty(r)&&(this.options[r]=e[r])}var i={Audio_Type:"audio",Video_Type:"video",Image_Type:"img",MSE_Type:"mse"},a=function(t){t||(t={}),this.options=t,this.mediaElementType_=null,this.manifestLoader_=null,this.closeCaptionsLoader_=null,this.progressTimer_=null,this.mediaSrcMgr_=new e.MediaSourceManager,this.fragmentManagers_=null,
this.showControls_=t.showControls,this.mediaElement_=null,this.imageElement_=null,this.mediaEvents_=new Object,t.mediaElement?this.mediaElement_=t.mediaElement:t.imageElement?this.imageElement_=t.imageElement:this.createMediaElement(),e.player=this},r={AUTO_PAUSE_START:1,PAUSE_RESUME:5};a.prototype.destroy=function(){if(this.destroyed_)return void e.log("Refusing to destroy a second time");this.removeAllMediaEventListeners(),this.mediaElementType_!==i.Image_Type&&this.mediaElement_.pause(),
this.mediaElementType_===i.MSE_Type&&this.stopProgressTimer(),this.mediaSrcMgr_&&this.mediaSrcMgr_.destroy(),delete e.player,delete this.mediaElement_,delete this.imageElement_,this.destroyed_=!0},a.prototype.getMediaElement=function(){return this.mediaElement_},a.prototype.onPause=function(t){e.log("Paused, auto="+this.mediaElement_.autopause_pending),this.mediaElement_.autopaused=this.mediaElement_.autopause_pending,this.mediaElement_.autopause_time=(new Date).getTime(),
this.mediaElement_.autopause_pending=!1},a.prototype.onPlay=function(t){e.log("Playing"),this.mediaElement_.autopause_pending=!1,this.mediaElement_.autopaused=!1,this.mediaElement_.autopause_time=null},a.prototype.onError=function(t){e.log("Error ("+this.mediaElement_.error.code+")")},a.prototype.cancelRequests=function(){for(var e=0;e<this.fragmentManagers_.length;e++)this.fragmentManagers_[e].cancelRequests()},a.prototype.onSeeking=function(t){e.log("Seeking"),this.cancelRequests(),
this.mediaSrcMgr_.resetAll("seeking")},a.prototype.onSeeked=function(t){e.log("Seeked")},a.prototype.onProgress=function(){var t=this.mediaSrcMgr_.getMediaSource();if(!t||"closed"===t.readyState)return void this.stopProgressTimer();var n=this.mediaElement_.currentTime;if(this.mediaElement_.error)return void e.dlog(2,"Video Error: "+this.mediaElement_.error);for(var i=!1,a=0,s=0,o=0;o<this.fragmentManagers_.length;o++)if(this.fragmentManagers_[o].tick(n)){
var l=this.mediaSrcMgr_.getBufferSize(o,n);this.mediaElement_.paused?l>=r.PAUSE_RESUME&&s++:l<r.AUTO_PAUSE_START&&(i=!0)}else a++;if(a>0)return void(a===this.fragmentManagers_.length&&this.mediaSrcMgr_.endOfStream());this.mediaElement_.paused?this.mediaElement_.autopaused&&s===this.fragmentManagers_.length&&(e.dlog(2,"Autoresuming"),this.mediaElement_.play()):i&&(e.dlog(2,"Autopausing"),this.mediaElement_.autopause_pending=!0,this.mediaElement_.pause())},
a.prototype.createMediaElement=function(){var t=document.getElementById("mediaElement");this.mediaElement_=document.createElement(i.Video_Type),this.imageElement_=document.createElement(i.Image_Type),t.appendChild(this.mediaElement_),t.appendChild(this.imageElement_),e.me=this.mediaElement_,e.img=this.imageElement_,
this.showControls_?this.mediaElement_.hasAttribute("controls")||this.mediaElement_.setAttribute("controls","controls"):this.mediaElement_.hasAttribute("controls")&&this.mediaElement_.removeAttribute("controls")},a.prototype.showMediaElement=function(t){var n=document.getElementById("mediaElement");this.mediaElementType_===i.MSE_Type&&(this.removeMediaEventListener("seeking"),this.removeMediaEventListener("seeked"),this.removeMediaEventListener("pause"),this.removeMediaEventListener("play"),
this.removeMediaEventListener("error"),t!==i.MSE_Type&&(this.stopProgressTimer(),this.mediaSrcMgr_.destroy(),this.mediaSrcMgr_=new e.MediaSourceManager)),this.mediaElementType_!==i.Image_Type&&(this.mediaElement_.play(0),this.mediaElement_.pause());var a=n.children;if(a&&a.length>0)for(var r=0;r<a.length;r++)"VIDEO"===a[r].nodeName&&t!==i.Image_Type?a[r].style.display="block":"IMG"===a[r].nodeName&&t===i.Image_Type?a[r].style.display="block":(a[r].style.display="none",a[r].src=null)
;this.mediaElementType_=t},a.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.mediaElement_.addEventListener(e,n),this.mediaEvents_[e]=n},a.prototype.removeMediaEventListener=function(e){this.mediaElement_.removeEventListener(e,this.mediaEvents_[e]),this.mediaEvents_[e]=null},a.prototype.removeAllMediaEventListeners=function(){for(var e in this.mediaEvents_)e&&this.removeMediaEventListener(e)},a.prototype.initMseVideoElement=function(e){e&&this.addCaptionInfo(e),
this.addMediaEventListener("seeking",this.onSeeking),this.addMediaEventListener("seeked",this.onSeeked),this.addMediaEventListener("pause",this.onPause),this.addMediaEventListener("play",this.onPlay),this.addMediaEventListener("error",this.onError),this.mediaElement_.autopause_pending=!1,this.options.autoplay?this.mediaElement_.autopaused=!0:this.mediaElement_.autopaused=!1,this.mediaElement_.seekingStatus="none"},a.prototype.onManifestLoad=function(t){
return this.destroyed_?void e.log("Ignoring manifest load after destruction"):t?void e.log("Unable to load manifest"):void(this.options.cc?(this.closeCaptionsLoader_=new e.CloseCaptionsLoader(this.options.cc),this.closeCaptionsLoader_.load(this.onLoadcloseCaptions.bind(this))):this.onLoadcloseCaptions.call(this))},a.prototype.addCaptionInfo=function(e){var t;t=this.mediaElement_.textTracks.length>0?this.mediaElement_.textTracks[0]:this.mediaElement_.addTextTrack("captions"),t.mode="showing"
;for(var n=e[0].start,i=e[0].end,a=[],r=0;r<e.length;r++){var s=new TextTrackCue(e[r].start,e[r].end,e[r].caption);if(n===e[r].start&&i===e[r].end&&a.push(s),n!==e[r].start||i!==e[r].end||r===e.length-1){for(var o=a.length-1;o>=0;o--)t.addCue(a[o]);a.length=0,n=e[r].start,i=e[r].end,r<e.length&&a.push(s)}}},a.prototype.onMediaSourceManagerInitialized=function(t){if(this.destroyed_)return void e.log("Ignoring MediaSourceManager initialization after destruction");this.initMseVideoElement(t)
;for(var n=0;n<this.mediaSrcMgr_.getSourceBufferCount();n++)this.fragmentManagers_.push(new e.FragmentManager(this.mediaSrcMgr_,n,new e.AdaptiveManager(this.mediaSrcMgr_.getBitrates(n),this.options.algorithm,this.options.level)));this.startProgressTimer()},a.prototype.initializeMsePlayer=function(e){var t=null;this.closeCaptionsLoader_&&(t=this.closeCaptionsLoader_.getCCInfo()),this.fragmentManagers_=[],this.mediaSrcMgr_.init(),
this.mediaSrcMgr_.attach(this.mediaElement_,this.manifestLoader_.getManifest(),t,this.onMediaSourceManagerInitialized.bind(this,t))},a.prototype.stopProgressTimer=function(){null!==this.progressTimer_&&(e.dlog(2,"Deregistering progress timer"),window.clearInterval(this.progressTimer_),this.progressTimer_=null)},a.prototype.startProgressTimer=function(){null===this.progressTimer_&&(e.dlog(2,"Starting progress timer"),this.progressTimer_=setInterval(this.onProgress.bind(this),250))},
a.prototype.initializeSimplePlayer=function(e,t){e!==i.Image_Type?(this.mediaElement_.src=t,this.mediaElement_.play()):this.imageElement_.src=t},a.prototype.onLoadcloseCaptions=function(t){return this.destroyed_?void e.log("Ignoring close captions load after destruction"):t?void e.log("Unable to load close captions"):void this.initializeMsePlayer()},a.prototype.onManifestLoad=function(t){
return this.destroyed_?void e.log("Ignoring manifest load after destruction"):t?void e.log("Unable to load manifest"):void(this.options.cc?(this.closeCaptionsLoader_=new e.CloseCaptionsLoader(this.options.cc),this.closeCaptionsLoader_.load(this.onLoadcloseCaptions.bind(this))):this.onLoadcloseCaptions.call(this))},a.prototype.getMediaType=function(t){if(t.length<5)return e.log("Error invalid url"),null;switch(t.substring(t.length-4,t.length)){case".webm":case".mkv":case".mp4":return i.Video_Type
;case".mp3":return i.Audio_Type;case".jpg":return i.Image_Type;case".mpd":return i.MSE_Type;default:return i.MSE_Type}},a.prototype.init=function(){if(e.log("-------- Initializing --------"),!this.mediaSrcMgr_.isSupported())return e.log("Incompatible browser: Media Source extensions not suported"),!1;if(n(),!this.options.url)return e.log("No manifest URL found, please provide one"),!1;var t=this.getMediaType(this.options.url);this.mediaElementType_=t,
this.options.mediaElement||this.options.imageElement||this.showMediaElement(t),t===i.MSE_Type?(this.manifestLoader_=new e.ManifestLoader(this.options.url),this.manifestLoader_.load(this.onManifestLoad.bind(this))):this.initializeSimplePlayer(t,this.options.url)},e.BasicPlayer=a}(),window.googledash=e}(),e.exports=googledash},function(e,t){"undefined"==typeof jwplayer&&(jwplayer=function(e){if(jwplayer.api)return jwplayer.api.selectPlayer(e)},jwplayer.version="6.8.4616",
jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),function(e){function t(e){return function(){return l(e)}}function n(e,t,n,i,a){return function(){var r,o;if(a)n(e);else{try{if((r=e.responseXML)&&(o=r.firstChild,r.lastChild&&"parsererror"===r.lastChild.nodeName))return void(i&&i("Invalid XML"))}catch(e){}if(r&&o)return n(e);(r=s.parseXML(e.responseText))&&r.firstChild?(e=s.extend({},e,{responseXML:r}),
n(e)):i&&i(e.responseText?"Invalid XML":t)}}}var i=document,a=window,r=navigator,s=e.utils=function(){};s.exists=function(e){switch(typeof e){case"string":return 0<e.length;case"object":return null!==e;case"undefined":return!1}return!0},s.styleDimension=function(e){return e+(0<e.toString().indexOf("%")?"":"px")},s.getAbsolutePath=function(e,t){if(s.exists(t)||(t=i.location.href),s.exists(e)){var n;if(s.exists(e)){n=e.indexOf("://");var a=e.indexOf("?");n=0<n&&(0>a||a>n)}else n=void 0
;if(n)return e;n=t.substring(0,t.indexOf("://")+3);var r,a=t.substring(n.length,t.indexOf("/",n.length+1));0===e.indexOf("/")?r=e.split("/"):(r=t.split("?")[0],r=r.substring(n.length+a.length+1,r.lastIndexOf("/")),r=r.split("/").concat(e.split("/")));for(var o=[],l=0;l<r.length;l++)r[l]&&s.exists(r[l])&&"."!=r[l]&&(".."==r[l]?o.pop():o.push(r[l]));return n+a+"/"+o.join("/")}},s.extend=function(){var e=s.extend.arguments;if(1<e.length){for(var t=1;t<e.length;t++)s.foreach(e[t],function(t,n){try{
s.exists(n)&&(e[0][t]=n)}catch(e){}});return e[0]}return null};var o=window.console=window.console||{log:function(){}};s.log=function(){var e=Array.prototype.slice.call(arguments,0);"object"==typeof o.log?o.log(e):o.log.apply(o,e)};var l=s.userAgentMatch=function(e){return null!==r.userAgent.toLowerCase().match(e)};s.isIE=s.isMSIE=t(/msie/i),s.isFF=t(/firefox/i),s.isChrome=t(/chrome/i),s.isIPod=t(/iP(hone|od)/i),s.isIPad=t(/iPad/i),s.isSafari602=t(/Macintosh.*Mac OS X 10_8.*6\.0\.\d* Safari/i),
s.isIETrident=function(e){return e?(e=parseFloat(e).toFixed(1),l(RegExp("msie\\s*"+e+"|trident/.+rv:\\s*"+e,"i"))):l(/msie|trident/i)},s.isSafari=function(){return l(/safari/i)&&!l(/chrome/i)&&!l(/chromium/i)&&!l(/android/i)},s.isIOS=function(e){return l(e?RegExp("iP(hone|ad|od).+\\sOS\\s"+e,"i"):/iP(hone|ad|od)/i)},s.isAndroid=function(e,t){var n=!t||!l(/chrome\/[23456789]/i);return e?n&&l(RegExp("android.*"+e,"i")):n&&l(/android/i)},s.isMobile=function(){return s.isIOS()||s.isAndroid()},
s.saveCookie=function(e,t){i.cookie="jwplayer."+e+"="+t+"; path=/"},s.getCookies=function(){for(var e={},t=i.cookie.split("; "),n=0;n<t.length;n++){var a=t[n].split("=");0===a[0].indexOf("jwplayer.")&&(e[a[0].substring(9,a[0].length)]=a[1])}return e},s.typeOf=function(e){var t=typeof e;return"object"===t?e?e instanceof Array?"array":t:"null":t},s.translateEventResponse=function(t,n){var i=s.extend({},n);if(t!=e.events.JWPLAYER_FULLSCREEN||i.fullscreen)if("object"==typeof i.data){var a=i.data
;delete i.data,i=s.extend(i,a)}else"object"==typeof i.metadata&&s.deepReplaceKeyName(i.metadata,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]);else i.fullscreen="true"==i.message,delete i.message;return s.foreach(["position","duration","offset"],function(e,t){i[t]&&(i[t]=Math.round(1e3*i[t])/1e3)}),i},s.flashVersion=function(){if(s.isAndroid())return 0;var e,t=r.plugins;try{
if("undefined"!==t&&(e=t["Shockwave Flash"]))return parseInt(e.description.replace(/\D+(\d+)\..*/,"$1"),10)}catch(e){}if(void 0!==a.ActiveXObject)try{if(e=new a.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseInt(e.GetVariable("$version").split(" ")[1].split(",")[0],10)}catch(e){}return 0},s.getScriptPath=function(e){for(var t=i.getElementsByTagName("script"),n=0;n<t.length;n++){var a=t[n].src;if(a&&0<=a.indexOf(e))return a.substr(0,a.indexOf(e))}return""},
s.deepReplaceKeyName=function(t,n,i){switch(e.utils.typeOf(t)){case"array":for(var a=0;a<t.length;a++)t[a]=e.utils.deepReplaceKeyName(t[a],n,i);break;case"object":s.foreach(t,function(a,r){var s;if(n instanceof Array&&i instanceof Array){if(n.length!=i.length)return;s=n}else s=[n];for(var o=a,l=0;l<s.length;l++)o=o.replace(RegExp(n[l],"g"),i[l]);t[o]=e.utils.deepReplaceKeyName(r,n,i),a!=o&&delete t[a]})}return t};var u=s.pluginPathType={ABSOLUTE:0,RELATIVE:1,CDN:2}
;s.getPluginPathType=function(e){if("string"==typeof e){e=e.split("?")[0];var t=e.indexOf("://");if(0<t)return u.ABSOLUTE;var n=e.indexOf("/");return e=s.extension(e),!(0>t&&0>n)||e&&isNaN(e)?u.RELATIVE:u.CDN}},s.getPluginName=function(e){return e.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")},s.getPluginVersion=function(e){return e.replace(/[^-]*-?([^\.]*).*$/,"$1")},s.isYouTube=function(e){return/^(http|\/\/).*(youtube\.com|youtu\.be)\/.+/.test(e)},s.youTubeID=function(e){try{
return/v[=\/]([^?&]*)|youtu\.be\/([^?]*)|^([\w-]*)$/i.exec(e).slice(1).join("").replace("?","")}catch(e){return""}},s.isRtmp=function(e,t){return 0===e.indexOf("rtmp")||"rtmp"==t},s.foreach=function(e,t){var n,i;for(n in e)"function"==s.typeOf(e.hasOwnProperty)?e.hasOwnProperty(n)&&(i=e[n],t(n,i)):(i=e[n],t(n,i))},s.isHTTPS=function(){return 0===a.location.href.indexOf("https")},s.repo=function(){var t="http://p.jwpcdn.com/"+e.version.split(/\W/).splice(0,2).join("/")+"/";try{
s.isHTTPS()&&(t=t.replace("http://","https://ssl."))}catch(e){}return t},s.ajax=function(e,t,i,r){var o;if(0<e.indexOf("#")&&(e=e.replace(/#.*$/,"")),e&&0<=e.indexOf("://")&&e.split("/")[2]!=a.location.href.split("/")[2]&&s.exists(a.XDomainRequest))o=new a.XDomainRequest,o.onload=n(o,e,t,i,r),o.ontimeout=o.onprogress=function(){},o.timeout=5e3;else{if(!s.exists(a.XMLHttpRequest))return i&&i(),o;var l=o=new a.XMLHttpRequest,u=e;o.onreadystatechange=function(){if(4===l.readyState)switch(l.status){
case 200:n(l,u,t,i,r)();break;case 404:i("File not found")}}}return o.overrideMimeType&&o.overrideMimeType("text/xml"),o.onerror=function(){i("Error loading file")},setTimeout(function(){try{o.open("GET",e,!0),o.send()}catch(t){i&&i(e)}},0),o},s.parseXML=function(e){var t;try{if(a.DOMParser){if(t=(new a.DOMParser).parseFromString(e,"text/xml"),t.childNodes&&t.childNodes.length&&"parsererror"==t.childNodes[0].firstChild.nodeName)return}else t=new a.ActiveXObject("Microsoft.XMLDOM"),
t.async="false",t.loadXML(e)}catch(e){return}return t},s.filterPlaylist=function(e,t){var n,i,a,r,o=[];for(n=0;n<e.length;n++)if(i=s.extend({},e[n]),i.sources=s.filterSources(i.sources),0<i.sources.length){for(a=0;a<i.sources.length;a++)r=i.sources[a],r.label||(r.label=a.toString());o.push(i)}if(t&&0===o.length)for(n=0;n<e.length;n++)if(i=s.extend({},e[n]),i.sources=s.filterSources(i.sources,!0),0<i.sources.length){for(a=0;a<i.sources.length;a++)r=i.sources[a],r.label||(r.label=a.toString())
;o.push(i)}return o},s.filterSources=function(t,n){var i,a,r=s.extensionmap;if(t){a=[];for(var o=0;o<t.length;o++){var l=t[o].type,u=t[o].file;u&&(u=s.trim(u)),l||(l=r.extType(s.extension(u)),t[o].type=l),n?e.embed.flashCanPlay(u,l)&&(i||(i=l),l==i&&a.push(s.extend({},t[o]))):s.canPlayHTML5(l)&&(i||(i=l),l==i&&a.push(s.extend({},t[o])))}}return a},s.canPlayHTML5=function(t){
return(!s.isAndroid()||"hls"!=t&&"m3u"!=t&&"m3u8"!=t)&&(!!(t=s.extensionmap.types[t])&&!!e.vid.canPlayType&&e.vid.canPlayType(t))},s.seconds=function(e){e=e.replace(",",".");var t=e.split(":"),n=0;return"s"==e.slice(-1)?n=parseFloat(e):"m"==e.slice(-1)?n=60*parseFloat(e):"h"==e.slice(-1)?n=3600*parseFloat(e):1<t.length?(n=parseFloat(t[t.length-1]),n+=60*parseFloat(t[t.length-2]),3==t.length&&(n+=3600*parseFloat(t[t.length-3]))):n=parseFloat(e),n},s.serialize=function(e){
return null==e?null:"true"==e.toString().toLowerCase()||"false"!=e.toString().toLowerCase()&&(isNaN(Number(e))||5<e.length||0===e.length?e:Number(e))}}(jwplayer),function(e){var t="video/",n=e.foreach,i={mp4:t+"mp4",vorbis:"audio/ogg",ogg:t+"ogg",webm:t+"webm",aac:"audio/mp4",mp3:"audio/mpeg",hls:"application/vnd.apple.mpegurl"},a={mp4:i.mp4,f4v:i.mp4,m4v:i.mp4,mov:i.mp4,m4a:i.aac,f4a:i.aac,aac:i.aac,mp3:i.mp3,ogv:i.ogg,ogg:i.vorbis,oga:i.vorbis,webm:i.webm,m3u8:i.hls,hls:i.hls},t="video",t={
flv:t,f4v:t,mov:t,m4a:t,m4v:t,mp4:t,aac:t,f4a:t,mp3:"sound",smil:"rtmp",m3u8:"hls",hls:"hls"},r=e.extensionmap={};n(a,function(e,t){r[e]={html5:t}}),n(t,function(e,t){r[e]||(r[e]={}),r[e].flash=t}),r.types=i,r.mimeType=function(e){var t;return n(i,function(n,i){!t&&i==e&&(t=n)}),t},r.extType=function(e){return r.mimeType(a[e])}}(jwplayer.utils),function(e){var t=e.loaderstatus={NEW:0,LOADING:1,ERROR:2,COMPLETE:3},n=document;e.scriptloader=function(i){function a(){s=t.ERROR,l.sendEvent(o.ERROR)}
function r(){s=t.COMPLETE,l.sendEvent(o.COMPLETE)}var s=t.NEW,o=jwplayer.events,l=new o.eventdispatcher;e.extend(this,l),this.load=function(){var l=e.scriptloader.loaders[i];if(!l||l.getStatus()!=t.NEW&&l.getStatus()!=t.LOADING){if(e.scriptloader.loaders[i]=this,s==t.NEW){s=t.LOADING;var u=n.createElement("script");u.addEventListener?(u.onload=r,u.onerror=a):u.readyState&&(u.onreadystatechange=function(){("loaded"==u.readyState||"complete"==u.readyState)&&r()}),
n.getElementsByTagName("head")[0].appendChild(u),u.src=i}}else l.addEventListener(o.ERROR,a),l.addEventListener(o.COMPLETE,r)},this.getStatus=function(){return s}},e.scriptloader.loaders={}}(jwplayer.utils),function(e){e.trim=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},e.pad=function(e,t,n){for(n||(n="0");e.length<t;)e=n+e;return e},e.xmlAttribute=function(e,t){
for(var n=0;n<e.attributes.length;n++)if(e.attributes[n].name&&e.attributes[n].name.toLowerCase()==t.toLowerCase())return e.attributes[n].value.toString();return""},e.extension=function(e){return e&&"rtmp"!=e.substr(0,4)?(e=e.substring(e.lastIndexOf("/")+1,e.length).split("?")[0].split("#")[0],-1<e.lastIndexOf(".")?e.substr(e.lastIndexOf(".")+1,e.length).toLowerCase():void 0):""},e.stringToColor=function(e){return e=e.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2"),
3==e.length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)}}(jwplayer.utils),function(e){var t="touchmove",n="touchstart";e.touch=function(i){function a(e){e.type==n?(l=!0,c=s(h.DRAG_START,e)):e.type==t?l&&(d||(r(h.DRAG_START,e,c),d=!0),r(h.DRAG,e)):(l&&(d?r(h.DRAG_END,e):(e.cancelBubble=!0,r(h.TAP,e))),l=d=!1,c=null)}function r(e,t,n){u[e]&&(t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault(),t=n?n:s(e,t))&&u[e](t)}
function s(e,t){var n=null;if(t.touches&&t.touches.length?n=t.touches[0]:t.changedTouches&&t.changedTouches.length&&(n=t.changedTouches[0]),!n)return null;var i=o.getBoundingClientRect(),n={type:e,target:o,x:n.pageX-window.pageXOffset-i.left,y:n.pageY,deltaX:0,deltaY:0};return e!=h.TAP&&c&&(n.deltaX=n.x-c.x,n.deltaY=n.y-c.y),n}var o=i,l=!1,u={},c=null,d=!1,h=e.touchEvents;return document.addEventListener(t,a),document.addEventListener("touchend",function(e){l&&d&&r(h.DRAG_END,e),l=d=!1,c=null}),
document.addEventListener("touchcancel",a),i.addEventListener(n,a),i.addEventListener("touchend",a),this.addEventListener=function(e,t){u[e]=t},this.removeEventListener=function(e){delete u[e]},this}}(jwplayer.utils),function(e){e.touchEvents={DRAG:"jwplayerDrag",DRAG_START:"jwplayerDragStart",DRAG_END:"jwplayerDragEnd",TAP:"jwplayerTap"}}(jwplayer.utils),function(e){e.key=function(t){var n,i,a;this.edition=function(){return a&&a.getTime()<(new Date).getTime()?"invalid":n},this.token=function(){
return i},e.exists(t)||(t="");try{t=e.tea.decrypt(t,"36QXq4W@GSBV^teR");var r=t.split("/");(n=r[0])?/^(free|pro|premium|ads)$/i.test(n)?(i=r[1],r[2]&&0<parseInt(r[2])&&(a=new Date,a.setTime(String(r[2])))):n="invalid":n="free"}catch(e){n="invalid"}}}(jwplayer.utils),function(e){var t=e.tea={};t.encrypt=function(e,a){if(0==e.length)return"";var r=t.strToLongs(i.encode(e));1>=r.length&&(r[1]=0)
;for(var s,o=t.strToLongs(i.encode(a).slice(0,16)),l=r.length,u=r[l-1],c=r[0],d=Math.floor(6+52/l),h=0;0<d--;){h+=2654435769,s=h>>>2&3;for(var p=0;p<l;p++)c=r[(p+1)%l],u=(u>>>5^c<<2)+(c>>>3^u<<4)^(h^c)+(o[3&p^s]^u),u=r[p]+=u}return r=t.longsToStr(r),n.encode(r)},t.decrypt=function(e,a){if(0==e.length)return"";for(var r,s=t.strToLongs(n.decode(e)),o=t.strToLongs(i.encode(a).slice(0,16)),l=s.length,u=s[l-1],c=s[0],d=2654435769*Math.floor(6+52/l);0!=d;){r=d>>>2&3
;for(var h=l-1;0<=h;h--)u=s[0<h?h-1:l-1],u=(u>>>5^c<<2)+(c>>>3^u<<4)^(d^c)+(o[3&h^r]^u),c=s[h]-=u;d-=2654435769}return s=t.longsToStr(s),s=s.replace(/\0+$/,""),i.decode(s)},t.strToLongs=function(e){for(var t=Array(Math.ceil(e.length/4)),n=0;n<t.length;n++)t[n]=e.charCodeAt(4*n)+(e.charCodeAt(4*n+1)<<8)+(e.charCodeAt(4*n+2)<<16)+(e.charCodeAt(4*n+3)<<24);return t},t.longsToStr=function(e){
for(var t=Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(255&e[n],e[n]>>>8&255,e[n]>>>16&255,e[n]>>>24&255);return t.join("")};var n={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e,t){var a,r,s,o,l,u,c=[],d="",h=n.code;if(u=(void 0===t?0:t)?i.encode(e):e,0<(l=u.length%3))for(;3>l++;)d+="=",u+="\0";for(l=0;l<u.length;l+=3)a=u.charCodeAt(l),r=u.charCodeAt(l+1),s=u.charCodeAt(l+2),o=a<<16|r<<8|s,a=o>>18&63,r=o>>12&63,s=o>>6&63,o&=63,
c[l/3]=h.charAt(a)+h.charAt(r)+h.charAt(s)+h.charAt(o);return c=c.join(""),c=c.slice(0,c.length-d.length)+d},decode:function(e,t){t=void 0!==t&&t;var a,r,s,o,l,u,c=[],d=n.code;u=t?i.decode(e):e;for(var h=0;h<u.length;h+=4)a=d.indexOf(u.charAt(h)),r=d.indexOf(u.charAt(h+1)),o=d.indexOf(u.charAt(h+2)),l=d.indexOf(u.charAt(h+3)),s=a<<18|r<<12|o<<6|l,a=s>>>16&255,r=s>>>8&255,s&=255,c[h/4]=String.fromCharCode(a,r,s),64==l&&(c[h/4]=String.fromCharCode(a,r)),64==o&&(c[h/4]=String.fromCharCode(a))
;return o=c.join(""),t?i.decode(o):o}},i={encode:function(e){return e=e.replace(/[\u0080-\u07ff]/g,function(e){return e=e.charCodeAt(0),String.fromCharCode(192|e>>6,128|63&e)}),e=e.replace(/[\u0800-\uffff]/g,function(e){return e=e.charCodeAt(0),String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e)})},decode:function(e){return e=e.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(e){return e=(15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2),String.fromCharCode(e)
}),e=e.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(e){return e=(31&e.charCodeAt(0))<<6|63&e.charCodeAt(1),String.fromCharCode(e)})}}}(jwplayer.utils),function(e){e.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",
JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",
JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_CAPTIONS_LOADED:"jwplayerCaptionsLoaded",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},
JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_CONTROLS:"jwplayerViewControls",JWPLAYER_USER_ACTION:"jwplayerUserAction",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError",JWPLAYER_AD_CLICK:"jwplayerAdClicked",
JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions",JWPLAYER_AD_SKIPPED:"jwplayerAdSkipped"}}(jwplayer),function(e){var t=e.utils;e.events.eventdispatcher=function(n,i){function a(e,n,i){if(e)for(var a=0;a<e.length;a++){var r=e[a];if(r){null!==r.count&&0==--r.count&&delete e[a];try{r.listener(n)}catch(e){t.log('Error handling "'+i+'" event listener ['+a+"]: "+e.toString(),r.listener,n)}}}}var r,s
;this.resetEventListeners=function(){r={},s=[]},this.resetEventListeners(),this.addEventListener=function(e,n,i){try{t.exists(r[e])||(r[e]=[]),"string"==t.typeOf(n)&&(n=new Function("return "+n)()),r[e].push({listener:n,count:i||null})}catch(e){t.log("error",e)}return!1},this.removeEventListener=function(e,n){if(r[e]){try{for(var i=0;i<r[e].length;i++)if(r[e][i].listener.toString()==n.toString()){r[e].splice(i,1);break}}catch(e){t.log("error",e)}return!1}},this.addGlobalListener=function(e,n){
try{"string"==t.typeOf(e)&&(e=new Function("return "+e)()),s.push({listener:e,count:n||null})}catch(e){t.log("error",e)}return!1},this.removeGlobalListener=function(e){if(e){try{for(var n=s.length;n--;)s[n].listener.toString()==e.toString()&&s.splice(n,1)}catch(e){t.log("error",e)}return!1}},this.sendEvent=function(o,l){t.exists(l)||(l={}),t.extend(l,{id:n,version:e.version,type:o}),i&&t.log(o,l),a(r[o],l,o),a(s,l,o)}}}(window.jwplayer),function(e){var t={},n={};e.plugins=function(){},
e.plugins.loadPlugins=function(i,a){return n[i]=new e.plugins.pluginloader(new e.plugins.model(t),a),n[i]},e.plugins.registerPlugin=function(n,i,a,r){var s=e.utils.getPluginName(n);t[s]||(t[s]=new e.plugins.plugin(n)),t[s].registerPlugin(n,i,a,r)}}(jwplayer),function(e){e.plugins.model=function(t){this.addPlugin=function(n){var i=e.utils.getPluginName(n);return t[i]||(t[i]=new e.plugins.plugin(n)),t[i]},this.getPlugins=function(){return t}}}(jwplayer),function(e){
var t=jwplayer.utils,n=jwplayer.events;e.pluginmodes={FLASH:0,JAVASCRIPT:1,HYBRID:2},e.plugin=function(i){function a(){switch(t.getPluginPathType(i)){case t.pluginPathType.ABSOLUTE:return i;case t.pluginPathType.RELATIVE:return t.getAbsolutePath(i,window.location.href)}}function r(){c=setTimeout(function(){d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE)},1e3)}function s(){d=t.loaderstatus.ERROR,h.sendEvent(n.ERROR)}var o,l,u,c,d=t.loaderstatus.NEW,h=new n.eventdispatcher;t.extend(this,h),
this.load=function(){if(d==t.loaderstatus.NEW)if(0<i.lastIndexOf(".swf"))o=i,d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE);else if(t.getPluginPathType(i)==t.pluginPathType.CDN)d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE);else{d=t.loaderstatus.LOADING;var e=new t.scriptloader(a());e.addEventListener(n.COMPLETE,r),e.addEventListener(n.ERROR,s),e.load()}},this.registerPlugin=function(e,i,a,r){c&&(clearTimeout(c),c=void 0),u=i,a&&r?(o=r,
l=a):"string"==typeof a?o=a:"function"==typeof a?l=a:!a&&!r&&(o=e),d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE)},this.getStatus=function(){return d},this.getPluginName=function(){return t.getPluginName(i)},this.getFlashPath=function(){if(o)switch(t.getPluginPathType(o)){case t.pluginPathType.ABSOLUTE:return o;case t.pluginPathType.RELATIVE:return 0<i.lastIndexOf(".swf")?t.getAbsolutePath(o,window.location.href):t.getAbsolutePath(o,a())}return null},this.getJS=function(){return l},
this.getTarget=function(){return u},this.getPluginmode=function(){return void 0!==o&&void 0!==l?e.pluginmodes.HYBRID:void 0!==o?e.pluginmodes.FLASH:void 0!==l?e.pluginmodes.JAVASCRIPT:void 0},this.getNewInstance=function(e,t,n){return new l(e,t,n)},this.getURL=function(){return i}}}(jwplayer.plugins),function(e){var t=e.utils,n=e.events,i=t.foreach;e.plugins.pluginloader=function(a,r){function s(){d?p.sendEvent(n.ERROR,{message:l}):c||(c=!0,u=t.loaderstatus.COMPLETE,p.sendEvent(n.COMPLETE))}
function o(){if(h||s(),!c&&!d){var n=0,i=a.getPlugins();t.foreach(h,function(a){a=t.getPluginName(a);var r=i[a];a=r.getJS();var o=r.getTarget(),r=r.getStatus();r==t.loaderstatus.LOADING||r==t.loaderstatus.NEW?n++:a&&(!o||parseFloat(o)>parseFloat(e.version))&&(d=!0,l="Incompatible player version",s())}),0==n&&s()}}var l,u=t.loaderstatus.NEW,c=!1,d=!1,h=r,p=new n.eventdispatcher;t.extend(this,p),this.setupPlugins=function(e,n,r){var s={length:0,plugins:{}},o=0,l={},u=a.getPlugins()
;return i(n.plugins,function(i,a){var c=t.getPluginName(i),d=u[c],h=d.getFlashPath(),p=d.getJS(),f=d.getURL();h&&(s.plugins[h]=t.extend({},a),s.plugins[h].pluginmode=d.getPluginmode(),s.length++);try{if(p&&n.plugins&&n.plugins[f]){var g=document.createElement("div");g.id=e.id+"_"+c,g.style.position="absolute",g.style.top=0,g.style.zIndex=o+10,l[c]=d.getNewInstance(e,t.extend({},n.plugins[f]),g),o++,e.onReady(r(l[c],g,!0)),e.onResize(r(l[c],g))}}catch(e){t.log("ERROR: Failed to load "+c+".")}}),
e.plugins=l,s},this.load=function(){if(!t.exists(r)||"object"==t.typeOf(r)){u=t.loaderstatus.LOADING,i(r,function(e){t.exists(e)&&(e=a.addPlugin(e),e.addEventListener(n.COMPLETE,o),e.addEventListener(n.ERROR,f))});var e=a.getPlugins();i(e,function(e,t){t.load()})}o()};var f=this.pluginFailed=function(){d||(d=!0,l="File not found",s())};this.getStatus=function(){return u}}}(jwplayer),function(){jwplayer.parsers={localName:function(e){return e?e.localName?e.localName:e.baseName?e.baseName:"":""},
textContent:function(e){return e?e.textContent?jwplayer.utils.trim(e.textContent):e.text?jwplayer.utils.trim(e.text):"":""},getChildNode:function(e,t){return e.childNodes[t]},numChildren:function(e){return e.childNodes?e.childNodes.length:0}}}(jwplayer),function(e){var t=e.parsers;(t.jwparser=function(){}).parseEntry=function(n,i){for(var a=[],r=[],s=e.utils.xmlAttribute,o=0;o<n.childNodes.length;o++){var l=n.childNodes[o];if("jwplayer"==l.prefix){var u=t.localName(l)
;"source"==u?(delete i.sources,a.push({file:s(l,"file"),default:s(l,"default"),label:s(l,"label"),type:s(l,"type")})):"track"==u?(delete i.tracks,r.push({file:s(l,"file"),default:s(l,"default"),kind:s(l,"kind"),label:s(l,"label")})):(i[u]=e.utils.serialize(t.textContent(l)),"file"==u&&i.sources&&delete i.sources)}i.file||(i.file=i.link)}if(a.length)for(i.sources=[],o=0;o<a.length;o++)0<a[o].file.length&&(a[o].default="true"==a[o].default,a[o].label.length||delete a[o].label,i.sources.push(a[o]))
;if(r.length)for(i.tracks=[],o=0;o<r.length;o++)0<r[o].file.length&&(r[o].default="true"==r[o].default,r[o].kind=r[o].kind.length?r[o].kind:"captions",r[o].label.length||delete r[o].label,i.tracks.push(r[o]));return i}}(jwplayer),function(e){var t=jwplayer.utils,n=t.xmlAttribute,i=e.localName,a=e.textContent,r=e.numChildren,s=e.mediaparser=function(){};s.parseGroup=function(e,o){var l,u,c=[];for(u=0;u<r(e);u++)if(l=e.childNodes[u],"media"==l.prefix&&i(l))switch(i(l).toLowerCase()){case"content":
n(l,"duration")&&(o.duration=t.seconds(n(l,"duration"))),0<r(l)&&(o=s.parseGroup(l,o)),n(l,"url")&&(o.sources||(o.sources=[]),o.sources.push({file:n(l,"url"),type:n(l,"type"),width:n(l,"width"),label:n(l,"label")}));break;case"title":o.title=a(l);break;case"description":o.description=a(l);break;case"guid":o.mediaid=a(l);break;case"thumbnail":o.image||(o.image=n(l,"url"));break;case"group":s.parseGroup(l,o);break;case"subtitle":var d={};if(d.file=n(l,"url"),d.kind="captions",
0<n(l,"lang").length){var h=d;l=n(l,"lang");var p={zh:"Chinese",nl:"Dutch",en:"English",fr:"French",de:"German",it:"Italian",ja:"Japanese",pt:"Portuguese",ru:"Russian",es:"Spanish"};l=p[l]?p[l]:l,h.label=l}c.push(d)}for(o.hasOwnProperty("tracks")||(o.tracks=[]),u=0;u<c.length;u++)o.tracks.push(c[u]);return o}}(jwplayer.parsers),function(e){function t(t){for(var a={},r=0;r<t.childNodes.length;r++){var o=t.childNodes[r],l=s(o);if(l)switch(l.toLowerCase()){case"enclosure":
a.file=n.xmlAttribute(o,"url");break;case"title":a.title=i(o);break;case"guid":a.mediaid=i(o);break;case"pubdate":a.date=i(o);break;case"description":a.description=i(o);break;case"link":a.link=i(o);break;case"category":a.tags=a.tags?a.tags+i(o):i(o)}}return a=e.mediaparser.parseGroup(t,a),a=e.jwparser.parseEntry(t,a),new jwplayer.playlist.item(a)}var n=jwplayer.utils,i=e.textContent,a=e.getChildNode,r=e.numChildren,s=e.localName;e.rssparser={},e.rssparser.parse=function(e){
for(var n=[],i=0;i<r(e);i++){var o=a(e,i);if("channel"==s(o).toLowerCase())for(var l=0;l<r(o);l++){var u=a(o,l);"item"==s(u).toLowerCase()&&n.push(t(u))}}return n}}(jwplayer.parsers),function(e){e.playlist=function(t){var n=[];if("array"==e.utils.typeOf(t))for(var i=0;i<t.length;i++)n.push(new e.playlist.item(t[i]));else n.push(new e.playlist.item(t));return n}}(jwplayer),function(e){var t=e.item=function(n){var i=jwplayer.utils,a=i.extend({},t.defaults,n)
;a.tracks=n&&i.exists(n.tracks)?n.tracks:[],0==a.sources.length&&(a.sources=[new e.source(a)]);for(var r=0;r<a.sources.length;r++){var s=a.sources[r].default;a.sources[r].default=!!s&&"true"==s.toString(),a.sources[r]=new e.source(a.sources[r])}if(a.captions&&!i.exists(n.tracks)){for(n=0;n<a.captions.length;n++)a.tracks.push(a.captions[n]);delete a.captions}for(r=0;r<a.tracks.length;r++)a.tracks[r]=new e.track(a.tracks[r]);return a};t.defaults={description:"",image:"",mediaid:"",title:"",
sources:[],tracks:[]}}(jwplayer.playlist),function(e){var t=jwplayer,n=t.utils,i=t.events,a=t.parsers;e.loader=function(){function t(t){try{var n=t.responseXML.childNodes;t="";for(var r=0;r<n.length&&(t=n[r],!(8!=t.nodeType));r++);if("xml"==a.localName(t)&&(t=t.nextSibling),"rss"!=a.localName(t))s("Not a valid RSS feed");else{var l=new e(a.rssparser.parse(t));o.sendEvent(i.JWPLAYER_PLAYLIST_LOADED,{playlist:l})}}catch(e){s()}}function r(e){s(e.match(/invalid/i)?"Not a valid RSS feed":"")}
function s(e){o.sendEvent(i.JWPLAYER_ERROR,{message:e?e:"Error loading file"})}var o=new i.eventdispatcher;n.extend(this,o),this.load=function(e){n.ajax(e,t,r)}}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={file:void 0,label:void 0,type:void 0,default:void 0};e.source=function(e){var i=t.extend({},n);return t.foreach(n,function(n){t.exists(e[n])&&(i[n]=e[n],delete e[n])}),i.type&&0<i.type.indexOf("/")&&(i.type=t.extensionmap.mimeType(i.type)),"m3u8"==i.type&&(i.type="hls"),
"smil"==i.type&&(i.type="rtmp"),i}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={file:void 0,label:void 0,kind:"captions",default:!1};e.track=function(e){var i=t.extend({},n);return e||(e={}),t.foreach(n,function(n){t.exists(e[n])&&(i[n]=e[n],delete e[n])}),i}}(jwplayer.playlist),function(e){function t(e,t,i){var a=e.style;a.backgroundColor="#000",a.color="#FFF",a.width=n.styleDimension(i.width),a.height=n.styleDimension(i.height),a.display="table",a.opacity=1,
i=document.createElement("p"),a=i.style,a.verticalAlign="middle",a.textAlign="center",a.display="table-cell",a.font="15px/20px Arial, Helvetica, sans-serif",i.innerHTML=t.replace(":",":<br>"),e.innerHTML="",e.appendChild(i)}var n=e.utils,i=e.events,a=!0,r=!1,s=document,o=e.embed=function(l){function u(e,t){n.foreach(t,function(t,n){"function"==typeof e[t]&&e[t].call(e,n)})}function c(){
if(!D)if("array"==n.typeOf(b.playlist)&&2>b.playlist.length&&(0==b.playlist.length||!b.playlist[0].sources||0==b.playlist[0].sources.length))p();else if(!C)if("string"==n.typeOf(b.playlist)){var t=new e.playlist.loader;t.addEventListener(i.JWPLAYER_PLAYLIST_LOADED,function(e){b.playlist=e.playlist,C=r,c()}),t.addEventListener(i.JWPLAYER_ERROR,function(e){C=r,p(e)}),C=a,t.load(b.playlist)}else if(M.getStatus()==n.loaderstatus.COMPLETE){
for(t=0;t<b.modes.length;t++)if(b.modes[t].type&&o[b.modes[t].type]){var s=n.extend({},b),h=new o[b.modes[t].type](m,b.modes[t],s,M,l);if(h.supportsConfig())return h.addEventListener(i.ERROR,d),h.embed(),u(l,s.events),l}var g;b.fallback?(g="No suitable players found and fallback enabled",P=setTimeout(function(){f(g,a)},10),n.log(g),new o.download(m,b,p)):(g="No suitable players found and fallback disabled",f(g,r),n.log(g),m.parentNode.replaceChild(y,m))}}function d(e){g(w+e.message)}
function h(e){g("Could not load plugins: "+e.message)}function p(e){g(e&&e.message?"Error loading playlist: "+e.message:w+"No playable sources found")}function f(e,t){P&&(clearTimeout(P),P=null),P=setTimeout(function(){P=null,l.dispatchEvent(i.JWPLAYER_SETUP_ERROR,{message:e,fallback:t})},0)}function g(e){D||(b.fallback?(D=a,t(m,e,b),f(e,a)):f(e,r))}var m,v,y,b=new o.config(l.config),S=b.width,I=b.height,w="Error loading player: ",M=e.plugins.loadPlugins(l.id,b.plugins),C=r,D=r,P=null
;return b.fallbackDiv&&(y=b.fallbackDiv,delete b.fallbackDiv),b.id=l.id,v=s.getElementById(l.id),b.aspectratio?l.config.aspectratio=b.aspectratio:delete l.config.aspectratio,m=s.createElement("div"),m.id=v.id,m.style.width=0<S.toString().indexOf("%")?S:S+"px",m.style.height=0<I.toString().indexOf("%")?I:I+"px",v.parentNode.replaceChild(m,v),this.embed=function(){D||(M.addEventListener(i.COMPLETE,c),M.addEventListener(i.ERROR,h),M.load())},this.errorScreen=g,this};e.embed.errorScreen=t
}(jwplayer),function(e){function t(e){if(e.playlist)for(var t=0;t<e.playlist.length;t++)e.playlist[t]=new a(e.playlist[t]);else{var r={};i.foreach(a.defaults,function(t){n(e,r,t)}),r.sources||(e.levels?(r.sources=e.levels,delete e.levels):(t={},n(e,t,"file"),n(e,t,"type"),r.sources=t.file?[t]:[])),e.playlist=[new a(r)]}}function n(e,t,n){i.exists(e[n])&&(t[n]=e[n],delete e[n])}var i=e.utils,a=e.playlist.item;(e.embed.config=function(n){var a={fallback:!0,height:270,primary:"html5",width:480,
base:n.base?n.base:i.getScriptPath("jwplayer.js"),aspectratio:""};n=i.extend(a,e.defaults,n);var a={type:"html5",src:n.base+"jwplayer.html5.js"},r={type:"flash",src:n.base+"jwplayer.flash.swf"};if(n.modes="flash"==n.primary?[r,a]:[a,r],n.listbar&&(n.playlistsize=n.listbar.size,n.playlistposition=n.listbar.position,n.playlistlayout=n.listbar.layout),n.flashplayer&&(r.src=n.flashplayer),n.html5player&&(a.src=n.html5player),t(n),"string"==typeof(r=n.aspectratio)&&i.exists(r)){var s=r.indexOf(":")
;-1==s?a=0:(a=parseFloat(r.substr(0,s)),r=parseFloat(r.substr(s+1)),a=0>=a||0>=r?0:r/a*100+"%")}else a=0;return-1==n.width.toString().indexOf("%")?delete n.aspectratio:a?n.aspectratio=a:delete n.aspectratio,n}).addConfig=function(e,n){return t(n),i.extend(e,n)}}(jwplayer),function(e){var t=e.utils,n=document;e.embed.download=function(e,i,a){function r(e,i){for(var a=n.querySelectorAll(e),r=0;r<a.length;r++)t.foreach(i,function(e,t){a[r].style[e]=t})}function s(e,t,i){return e=n.createElement(e),
t&&(e.className="jwdownload"+t),i&&i.appendChild(e),e}var o,l=t.extend({},i),u=l.width?l.width:480,c=l.height?l.height:320;i=i.logo?i.logo:{prefix:t.repo(),file:"logo.png",margin:10};var d,h,p,f,l=l.playlist,g=["mp4","aac","mp3"];if(l&&l.length){for(f=l[0],o=f.sources,l=0;l<o.length;l++){var m=o[l],v=m.type?m.type:t.extensionmap.extType(t.extension(m.file));m.file&&t.foreach(g,function(e){v==g[e]?(d=m.file,h=f.image):t.isYouTube(m.file)&&(p=m.file)})}d?(o=d,a=h,e&&(l=s("a","display",e),
s("div","icon",l),s("div","logo",l),o&&l.setAttribute("href",t.getAbsolutePath(o))),l="#"+e.id+" .jwdownload",e.style.width="",e.style.height="",r(l+"display",{width:t.styleDimension(Math.max(320,u)),height:t.styleDimension(Math.max(180,c)),background:"black center no-repeat "+(a?"url("+a+")":""),backgroundSize:"contain",position:"relative",border:"none",display:"block"}),r(l+"display div",{position:"absolute",width:"100%",height:"100%"}),r(l+"logo",{top:i.margin+"px",right:i.margin+"px",
background:"top right no-repeat url("+i.prefix+i.file+")"}),r(l+"icon",{
background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgNJREFUeNrs28lqwkAYB/CZqNVDDj2r6FN41QeIy8Fe+gj6BL275Q08u9FbT8ZdwVfotSBYEPUkxFOoks4EKiJdaDuTjMn3wWBO0V/+sySR8SNSqVRKIR8qaXHkzlqS9jCfzzWcTCYp9hF5o+59sVjsiRzcegSckFzcjT+ruN80TeSlAjCAAXzdJSGPFXRpAAMYwACGZQkSdhG4WCzehMNhqV6vG6vVSrirKVEw66YoSqDb7cqlUilE8JjHd/y1MQefVzqdDmiaJpfLZWHgXMHn8F6vJ1cqlVAkEsGuAn83J4gAd2RZymQygX6/L1erVQt+9ZPWb+CDwcCC2zXGJaewl/DhcHhK3DVj+KfKZrMWvFarcYNLomAv4aPRSFZVlTlcSPA5fDweW/BoNIqFnKV53JvncjkLns/n/cLdS+92O7RYLLgsKfv9/t8XlDn4eDyiw+HA9Jyz2eyt0+kY2+3WFC5hluej0Ha7zQQq9PPwdDq1Et1sNsx/nFBgCqWJ8oAK1aUptNVqcYWewE4nahfU0YQnk4ntUEfGMIU2m01HoLaCKbTRaDgKtaVLk9tBYaBcE/6Artdr4RZ5TB6/dC+9iIe/WgAMYADDpAUJAxjAAAYwgGFZgoS/AtNNTF7Z2bL0BYPBV3Jw5xFwwWcYxgtBP5OkE8i9G7aWGOOCruvauwADALMLMEbKf4SdAAAAAElFTkSuQmCC)"
})):p?(i=p,e=s("iframe","",e),e.src="http://www.youtube.com/embed/"+t.youTubeID(i),e.width=u,e.height=c,e.style.border="none"):a()}}}(jwplayer),function(e){var t=e.utils,n=e.events,i={};(e.embed.flash=function(r,s,o,l,u){function c(e,t,n){var i=document.createElement("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function d(e,t,n){return function(){try{n&&document.getElementById(u.id+"_wrapper").appendChild(t)
;var i=document.getElementById(u.id).getPluginConfig("display");"function"==typeof e.resize&&e.resize(i.width,i.height),t.style.left=i.x,t.style.top=i.h}catch(e){}}}function h(e){if(!e)return{};var n={},i=[];return t.foreach(e,function(e,a){var r=t.getPluginName(e);i.push(e),t.foreach(a,function(e,t){n[r+"."+e]=t})}),n.plugins=i.join(","),n}var p=new e.events.eventdispatcher,f=t.flashVersion();t.extend(this,p),this.embed=function(){if(o.id=u.id,10>f)return p.sendEvent(n.ERROR,{
message:"Flash version must be 10.0 or greater"}),!1;var e,a,g=u.config.listbar,m=t.extend({},o);if(r.id+"_wrapper"==r.parentNode.id)e=document.getElementById(r.id+"_wrapper");else{if(e=document.createElement("div"),a=document.createElement("div"),a.style.display="none",a.id=r.id+"_aspect",e.id=r.id+"_wrapper",e.style.position="relative",e.style.display="block",e.style.width=t.styleDimension(m.width),e.style.height=t.styleDimension(m.height),u.config.aspectratio){
var v=parseFloat(u.config.aspectratio);a.style.display="block",a.style.marginTop=u.config.aspectratio,e.style.height="auto",e.style.display="inline-block",g&&("bottom"==g.position?a.style.paddingBottom=g.size+"px":"right"==g.position&&(a.style.marginBottom=-1*g.size*(v/100)+"px"))}r.parentNode.replaceChild(e,r),e.appendChild(r),e.appendChild(a)}for(e=l.setupPlugins(u,m,d),0<e.length?t.extend(m,h(e.plugins)):delete m.plugins,
void 0!==m["dock.position"]&&"false"==m["dock.position"].toString().toLowerCase()&&(m.dock=m["dock.position"],delete m["dock.position"]),e=m.wmode?m.wmode:m.height&&40>=m.height?"transparent":"opaque",a="height width modes events primary base fallback volume".split(" "),g=0;g<a.length;g++)delete m[a[g]];a=t.getCookies(),t.foreach(a,function(e,t){void 0===m[e]&&(m[e]=t)}),a=window.location.href.split("/"),a.splice(a.length-1,1),a=a.join("/"),m.base=a+"/",i[r.id]=m,
t.isIE()?(a='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" " width="100%" height="100%"id="'+r.id+'" name="'+r.id+'" tabindex=0"">',a+='<param name="movie" value="'+s.src+'">',a+='<param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always">',a+='<param name="seamlesstabbing" value="true">',a+='<param name="wmode" value="'+e+'">',a+='<param name="bgcolor" value="#000000">',a+="</object>",r.outerHTML=a,
e=document.getElementById(r.id)):(a=document.createElement("object"),a.setAttribute("type","application/x-shockwave-flash"),a.setAttribute("data",s.src),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("bgcolor","#000000"),a.setAttribute("id",r.id),a.setAttribute("name",r.id),a.setAttribute("tabindex",0),c(a,"allowfullscreen","true"),c(a,"allowscriptaccess","always"),c(a,"seamlesstabbing","true"),c(a,"wmode",e),r.parentNode.replaceChild(a,r),e=a),
u.config.aspectratio&&(e.style.position="absolute"),u.container=e,u.setPlayer(e,"flash")},this.supportsConfig=function(){if(f){if(!o)return!0;if("string"==t.typeOf(o.playlist))return!0;try{var e=o.playlist[0].sources;if(void 0===e)return!0;for(var n=0;n<e.length;n++)if(e[n].file&&a(e[n].file,e[n].type))return!0}catch(e){}}return!1}}).getVars=function(e){return i[e]};var a=e.embed.flashCanPlay=function(e,n){if(t.isYouTube(e)||t.isRtmp(e,n)||"hls"==n)return!0
;var i=t.extensionmap[n?n:t.extension(e)];return!!i&&!!i.flash}}(jwplayer),function(e){var t=e.utils,n=t.extensionmap,i=e.events;e.embed.html5=function(a,r,s,o,l){function u(e,t,n){return function(){try{var i=document.querySelector("#"+a.id+" .jwmain");n&&i.appendChild(t),"function"==typeof e.resize&&(e.resize(i.clientWidth,i.clientHeight),setTimeout(function(){e.resize(i.clientWidth,i.clientHeight)},400)),t.left=i.style.left,t.top=i.style.top}catch(e){}}}function c(e){d.sendEvent(e.type,{
message:"HTML5 player not found"})}var d=this,h=new i.eventdispatcher;t.extend(d,h),d.embed=function(){if(e.html5){o.setupPlugins(l,s,u),a.innerHTML="";var n=e.utils.extend({},s);delete n.volume,n=new e.html5.player(n),l.container=document.getElementById(l.id),l.setPlayer(n,"html5")}else n=new t.scriptloader(r.src),n.addEventListener(i.ERROR,c),n.addEventListener(i.COMPLETE,d.embed),n.load()},d.supportsConfig=function(){if(e.vid.canPlayType)try{if("string"==t.typeOf(s.playlist))return!0
;for(var i=s.playlist[0].sources,a=0;a<i.length;a++){var r,o=i[a].file,l=i[a].type;if(null!==navigator.userAgent.match(/BlackBerry/i)||t.isAndroid()&&("m3u"==t.extension(o)||"m3u8"==t.extension(o))||t.isRtmp(o,l))r=!1;else{var u,c=n[l?l:t.extension(o)];if(!c||c.flash&&!c.html5)u=!1;else{var d=c.html5,h=e.vid;if(d)try{u=!!h.canPlayType(d)}catch(e){u=!1}else u=!0}r=u}if(r)return!0}}catch(e){}return!1}}}(jwplayer),function(e){var t=e.embed,n=e.utils,i=/\.(js|swf)$/;e.embed=n.extend(function(a){
function r(){s="Adobe SiteCatalyst Error: Could not find Media Module"}var s,o=n.repo(),l=n.extend({},e.defaults),u=n.extend({},l,a.config),c=a.config,d=u.plugins,h=u.analytics,p=o+"jwpsrv.js",f=o+"sharing.js",g=o+"related.js",m=o+"gapro.js",l=e.key?e.key:l.key,v=new e.utils.key(l).edition(),d=d?d:{};switch("ads"==v&&u.advertising&&(i.test(u.advertising.client)?d[u.advertising.client]=u.advertising:d[o+u.advertising.client+".js"]=u.advertising),delete c.advertising,c.key=l,
u.analytics&&i.test(u.analytics.client)&&(p=u.analytics.client),delete c.analytics,h&&"ads"!==v&&delete h.enabled,"free"!=v&&h&&!1===h.enabled||(d[p]=h?h:{}),delete d.sharing,delete d.related,v){case"ads":if(c.sitecatalyst)try{window.s&&window.s.hasOwnProperty("Media")?new e.embed.sitecatalyst(a):r()}catch(e){r()}case"premium":u.related&&(i.test(u.related.client)&&(g=u.related.client),d[g]=u.related),u.ga&&(i.test(u.ga.client)&&(m=u.ga.client),d[m]=u.ga);case"pro":
u.sharing&&(i.test(u.sharing.client)&&(f=u.sharing.client),d[f]=u.sharing),u.skin&&(c.skin=u.skin.replace(/^(beelden|bekle|five|glow|modieus|roundster|stormtrooper|vapor)$/i,n.repo()+"skins/$1.xml"))}return c.plugins=d,a.config=c,a=new t(a),s&&a.errorScreen(s),a},e.embed)}(jwplayer),function(e){var t=jwplayer.utils;e.sitecatalyst=function(e){function n(e){h.debug&&t.log(e)}function i(e){return e=e.split("/"),e=e[e.length-1],e=e.split("?"),e[0]}function a(){if(!f){f=!0;var e=d.getPosition()
;n("stop: "+o+" : "+e),s.Media.stop(o,e)}}function r(){g||(a(),g=!0,n("close: "+o),s.Media.close(o),c=!0,u=0)}var o,l,u,c,d=e,h=t.extend({},d.config.sitecatalyst),p={onPlay:function(){if(!c){var e=d.getPosition();f=!1,n("play: "+o+" : "+e),s.Media.play(o,e)}},onPause:a,onBuffer:a,onIdle:r,onPlaylistItem:function(e){try{c=!0,r(),u=0;var n;if(h.mediaName)n=h.mediaName;else{var a=d.getPlaylistItem(e.index);n=a.title?a.title:a.file?i(a.file):a.sources&&a.sources.length?i(a.sources[0].file):""}o=n,
l=h.playerName?h.playerName:d.id}catch(e){t.log(e)}},onTime:function(){if(c){var e=d.getDuration();if(-1==e)return;g=f=c=!1,n("open: "+o+" : "+e+" : "+l),s.Media.open(o,e,l),n("play: "+o+" : 0"),s.Media.play(o,0)}if(e=d.getPosition(),3<=Math.abs(e-u)){var t=u;n("seek: "+t+" to "+e),n("stop: "+o+" : "+t),s.Media.stop(o,t),n("play: "+o+" : "+e),s.Media.play(o,e)}u=e},onComplete:r},f=!0,g=!0;t.foreach(p,function(e){d[e](p[e])})}}(jwplayer.embed),function(e,t){
var n=[],i=e.utils,a=e.events,r=a.state,s=document,o=e.api=function(n){function l(e,t){return function(n){return t(e,n)}}function u(e,t){return v[e]||(v[e]=[],d(a.JWPLAYER_PLAYER_STATE,function(t){var n=t.newstate;if(t=t.oldstate,n==e){var i=v[n];if(i)for(var a=0;a<i.length;a++){var r=i[a];"function"==typeof r&&r.call(this,{oldstate:t,newstate:n})}}})),v[e].push(t),g}function c(e,t){try{e.jwAddEventListener(t,'function(dat) { jwplayer("'+g.id+'").dispatchEvent("'+t+'", dat); }')}catch(e){
i.log("Could not add internal listener")}}function d(e,t){return m[e]||(m[e]=[],p&&y&&c(p,e)),m[e].push(t),g}function h(){if(y){if(p){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if("function"==typeof p[t]){switch(e.length){case 6:return p[t](e[0],e[1],e[2],e[3],e[4],e[5]);case 5:return p[t](e[0],e[1],e[2],e[3],e[4]);case 4:return p[t](e[0],e[1],e[2],e[3]);case 3:return p[t](e[0],e[1],e[2]);case 2:return p[t](e[0],e[1]);case 1:return p[t](e[0])}return p[t]()}}return null}
b.push(arguments)}var p,f,g=this,m={},v={},y=!1,b=[],S={},I={};g.container=n,g.id=n.id,g.getBuffer=function(){return h("jwGetBuffer")},g.getContainer=function(){return g.container},g.addButton=function(e,t,n,a){try{I[a]=n,h("jwDockAddButton",e,t,"jwplayer('"+g.id+"').callback('"+a+"')",a)}catch(e){i.log("Could not add dock button"+e.message)}},g.removeButton=function(e){h("jwDockRemoveButton",e)},g.callback=function(e){I[e]&&I[e]()},g.forceState=function(e){return h("jwForceState",e),g},
g.releaseState=function(){return h("jwReleaseState")},g.getDuration=function(){return h("jwGetDuration")},g.getFullscreen=function(){return h("jwGetFullscreen")},g.getHeight=function(){return h("jwGetHeight")},g.getLockState=function(){return h("jwGetLockState")},g.getMeta=function(){return g.getItemMeta()},g.getMute=function(){return h("jwGetMute")},g.getPlaylist=function(){var e=h("jwGetPlaylist")
;return"flash"==g.renderingMode&&i.deepReplaceKeyName(e,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),e},g.getPlaylistItem=function(e){return i.exists(e)||(e=g.getPlaylistIndex()),g.getPlaylist()[e]},g.getPlaylistIndex=function(){return h("jwGetPlaylistIndex")},g.getPosition=function(){return h("jwGetPosition")},g.getRenderingMode=function(){return g.renderingMode},g.getState=function(){return h("jwGetState")},g.getVolume=function(){return h("jwGetVolume")},
g.getWidth=function(){return h("jwGetWidth")},g.setFullscreen=function(e){return i.exists(e)?h("jwSetFullscreen",e):h("jwSetFullscreen",!h("jwGetFullscreen")),g},g.setMute=function(e){return i.exists(e)?h("jwSetMute",e):h("jwSetMute",!h("jwGetMute")),g},g.lock=function(){return g},g.unlock=function(){return g},g.load=function(e){return h("jwLoad",e),g},g.playlistItem=function(e){return h("jwPlaylistItem",parseInt(e,10)),g},g.playlistPrev=function(){return h("jwPlaylistPrev"),g},
g.playlistNext=function(){return h("jwPlaylistNext"),g},g.resize=function(e,t){if("flash"!==g.renderingMode)h("jwResize",e,t);else{var n=s.getElementById(g.id+"_wrapper"),a=s.getElementById(g.id+"_aspect");a&&(a.style.display="none"),n&&(n.style.display="block",n.style.width=i.styleDimension(e),n.style.height=i.styleDimension(t))}return g},g.play=function(e){return e===t?(e=g.getState(),h(e==r.PLAYING||e==r.BUFFERING?"jwPause":"jwPlay")):h("jwPlay",e),g},g.pause=function(e){
return e===t?(e=g.getState(),h(e==r.PLAYING||e==r.BUFFERING?"jwPause":"jwPlay")):h("jwPause",e),g},g.stop=function(){return h("jwStop"),g},g.seek=function(e){return h("jwSeek",e),g},g.setVolume=function(e){return h("jwSetVolume",e),g},g.createInstream=function(){return new o.instream(this,p)},g.setInstream=function(e){return f=e},g.loadInstream=function(e,t){return f=g.setInstream(g.createInstream()).init(t),f.loadItem(e),f},g.getQualityLevels=function(){return h("jwGetQualityLevels")},
g.getCurrentQuality=function(){return h("jwGetCurrentQuality")},g.setCurrentQuality=function(e){h("jwSetCurrentQuality",e)},g.getCaptionsList=function(){return h("jwGetCaptionsList")},g.getCurrentCaptions=function(){return h("jwGetCurrentCaptions")},g.setCurrentCaptions=function(e){h("jwSetCurrentCaptions",e)},g.getControls=function(){return h("jwGetControls")},g.getSafeRegion=function(){return h("jwGetSafeRegion")},g.setControls=function(e){h("jwSetControls",e)},g.destroyPlayer=function(){
h("jwPlayerDestroy")},g.playAd=function(t){var n=e(g.id).plugins;n.vast&&n.vast.jwPlayAd(t)},g.pauseAd=function(){var t=e(g.id).plugins;t.vast?t.vast.jwPauseAd():h("jwPauseAd")};var w={onBufferChange:a.JWPLAYER_MEDIA_BUFFER,onBufferFull:a.JWPLAYER_MEDIA_BUFFER_FULL,onError:a.JWPLAYER_ERROR,onSetupError:a.JWPLAYER_SETUP_ERROR,onFullscreen:a.JWPLAYER_FULLSCREEN,onMeta:a.JWPLAYER_MEDIA_META,onMute:a.JWPLAYER_MEDIA_MUTE,onPlaylist:a.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:a.JWPLAYER_PLAYLIST_ITEM,
onPlaylistComplete:a.JWPLAYER_PLAYLIST_COMPLETE,onReady:a.API_READY,onResize:a.JWPLAYER_RESIZE,onComplete:a.JWPLAYER_MEDIA_COMPLETE,onSeek:a.JWPLAYER_MEDIA_SEEK,onTime:a.JWPLAYER_MEDIA_TIME,onVolume:a.JWPLAYER_MEDIA_VOLUME,onBeforePlay:a.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:a.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:a.JWPLAYER_DISPLAY_CLICK,onControls:a.JWPLAYER_CONTROLS,onQualityLevels:a.JWPLAYER_MEDIA_LEVELS,onQualityChange:a.JWPLAYER_MEDIA_LEVEL_CHANGED,
onCaptionsList:a.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:a.JWPLAYER_CAPTIONS_CHANGED,onAdError:a.JWPLAYER_AD_ERROR,onAdClick:a.JWPLAYER_AD_CLICK,onAdImpression:a.JWPLAYER_AD_IMPRESSION,onAdTime:a.JWPLAYER_AD_TIME,onAdComplete:a.JWPLAYER_AD_COMPLETE,onAdCompanions:a.JWPLAYER_AD_COMPANIONS,onAdSkipped:a.JWPLAYER_AD_SKIPPED};i.foreach(w,function(e){g[e]=l(w[e],d)});var M={onBuffer:r.BUFFERING,onPause:r.PAUSED,onPlay:r.PLAYING,onIdle:r.IDLE};return i.foreach(M,function(e){g[e]=l(M[e],u)}),
g.remove=function(){if(!y)throw"Cannot call remove() before player is ready";b=[],o.destroyPlayer(this.id)},g.setup=function(t){if(e.embed){var n=s.getElementById(g.id);return n&&(t.fallbackDiv=n),n=g,b=[],o.destroyPlayer(n.id),n=e(g.id),n.config=t,new e.embed(n).embed(),n}return g},g.registerPlugin=function(t,n,i,a){e.plugins.registerPlugin(t,n,i,a)},g.setPlayer=function(e,t){p=e,g.renderingMode=t},g.detachMedia=function(){if("html5"==g.renderingMode)return h("jwDetachMedia")},
g.attachMedia=function(e){if("html5"==g.renderingMode)return h("jwAttachMedia",e)},g.removeEventListener=function(e,t){var n=m[e];if(n)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1)},g.dispatchEvent=function(e,t){var n=m[e];if(n)for(var n=n.slice(0),r=i.translateEventResponse(e,t),s=0;s<n.length;s++){var o=n[s];if("function"==typeof o)try{e===a.JWPLAYER_PLAYLIST_LOADED&&i.deepReplaceKeyName(r.playlist,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),o.call(this,r)
}catch(e){i.log("There was an error calling back an event handler")}}},g.dispatchInstreamEvent=function(e){f&&f.dispatchEvent(e,arguments)},g.callInternal=h,g.playerReady=function(e){for(y=!0,p||g.setPlayer(s.getElementById(e.id)),g.container=s.getElementById(g.id),i.foreach(m,function(e){c(p,e)}),d(a.JWPLAYER_PLAYLIST_ITEM,function(){S={}}),d(a.JWPLAYER_MEDIA_META,function(e){i.extend(S,e.metadata)}),g.dispatchEvent(a.API_READY);0<b.length;)h.apply(this,b.shift())},g.getItemMeta=function(){
return S},g.isBeforePlay=function(){return h("jwIsBeforePlay")},g.isBeforeComplete=function(){return h("jwIsBeforeComplete")},g};o.selectPlayer=function(e){var t;return i.exists(e)||(e=0),e.nodeType?t=e:"string"==typeof e&&(t=s.getElementById(e)),t?(e=o.playerById(t.id))?e:o.addPlayer(new o(t)):"number"==typeof e?n[e]:null},o.playerById=function(e){for(var t=0;t<n.length;t++)if(n[t].id==e)return n[t];return null},o.addPlayer=function(e){for(var t=0;t<n.length;t++)if(n[t]==e)return e
;return n.push(e),e},o.destroyPlayer=function(e){for(var t,a=-1,r=0;r<n.length;r++)n[r].id==e&&(a=r,t=n[r]);return 0<=a&&(e=t.id,r=s.getElementById(e+("flash"==t.renderingMode?"_wrapper":"")),i.clearCss&&i.clearCss("#"+e),r&&("html5"==t.renderingMode&&t.destroyPlayer(),t=s.createElement("div"),t.id=e,r.parentNode.replaceChild(t,r)),n.splice(a,1)),null},e.playerReady=function(t){var n=e.api.playerById(t.id);n?n.playerReady(t):e.api.selectPlayer(t.id).playerReady(t)}}(window.jwplayer),function(e){
var t=e.events,n=e.utils,i=t.state;e.api.instream=function(e,a){function r(t,n){return u[t]||(u[t]=[],a.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+e.id+'").dispatchInstreamEvent("'+t+'", dat); }')),u[t].push(n),this}function s(e,n){return c[e]||(c[e]=[],r(t.JWPLAYER_PLAYER_STATE,function(t){var n=t.newstate,i=t.oldstate;if(n==e){var a=c[n];if(a)for(var r=0;r<a.length;r++){var s=a[r];"function"==typeof s&&s.call(this,{oldstate:i,newstate:n,type:t.type})}}})),c[e].push(n),this}
var o,l,u={},c={},d=this;d.type="instream",d.init=function(){return e.callInternal("jwInitInstream"),d},d.loadItem=function(t,i){o=t,l=i||{},"array"==n.typeOf(t)?e.callInternal("jwLoadArrayInstream",o,l):e.callInternal("jwLoadItemInstream",o,l)},d.removeEvents=function(){u=c={}},d.removeEventListener=function(e,t){var n=u[e];if(n)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1)},d.dispatchEvent=function(e,t){var i=u[e]
;if(i)for(var i=i.slice(0),a=n.translateEventResponse(e,t[1]),r=0;r<i.length;r++){var s=i[r];"function"==typeof s&&s.call(this,a)}},d.onError=function(e){return r(t.JWPLAYER_ERROR,e)},d.onMediaError=function(e){return r(t.JWPLAYER_MEDIA_ERROR,e)},d.onFullscreen=function(e){return r(t.JWPLAYER_FULLSCREEN,e)},d.onMeta=function(e){return r(t.JWPLAYER_MEDIA_META,e)},d.onMute=function(e){return r(t.JWPLAYER_MEDIA_MUTE,e)},d.onComplete=function(e){return r(t.JWPLAYER_MEDIA_COMPLETE,e)},
d.onPlaylistComplete=function(e){return r(t.JWPLAYER_PLAYLIST_COMPLETE,e)},d.onPlaylistItem=function(e){return r(t.JWPLAYER_PLAYLIST_ITEM,e)},d.onTime=function(e){return r(t.JWPLAYER_MEDIA_TIME,e)},d.onBuffer=function(e){return s(i.BUFFERING,e)},d.onPause=function(e){return s(i.PAUSED,e)},d.onPlay=function(e){return s(i.PLAYING,e)},d.onIdle=function(e){return s(i.IDLE,e)},d.onClick=function(e){return r(t.JWPLAYER_INSTREAM_CLICK,e)},d.onInstreamDestroyed=function(e){
return r(t.JWPLAYER_INSTREAM_DESTROYED,e)},d.onAdSkipped=function(e){return r(t.JWPLAYER_AD_SKIPPED,e)},d.play=function(e){a.jwInstreamPlay(e)},d.pause=function(e){a.jwInstreamPause(e)},d.hide=function(){e.callInternal("jwInstreamHide")},d.destroy=function(){d.removeEvents(),e.callInternal("jwInstreamDestroy")},d.setText=function(e){a.jwInstreamSetText(e?e:"")},d.getState=function(){return a.jwInstreamState()},d.setClick=function(e){a.jwInstreamClick&&a.jwInstreamClick(e)}}}(window.jwplayer),
function(e){var t=e.api,n=t.selectPlayer;t.selectPlayer=function(t){return(t=n(t))?t:{registerPlugin:function(t,n,i){e.plugins.registerPlugin(t,n,i)}}}}(jwplayer)),e.exports=jwplayer},function(e,t){var n=function(){function e(){if(!H){try{var e=O.getElementsByTagName("body")[0].appendChild(v("span"));e.parentNode.removeChild(e)}catch(e){return}H=!0;for(var t=U.length,n=0;n<t;n++)U[n]()}}function t(e){H?e():U[U.length]=e}function i(e){
if(typeof R.addEventListener!=E)R.addEventListener("load",e,!1);else if(typeof O.addEventListener!=E)O.addEventListener("load",e,!1);else if(typeof R.attachEvent!=E)y(R,"onload",e);else if("function"==typeof R.onload){var t=R.onload;R.onload=function(){t(),e()}}else R.onload=e}function a(){z?r():s()}function r(){var e=O.getElementsByTagName("body")[0],t=v(A);t.setAttribute("type",L);var n=e.appendChild(t);if(n){var i=0;!function(){if(typeof n.GetVariable!=E){var a=n.GetVariable("$version")
;a&&(a=a.split(" ")[1].split(","),Q.pv=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)])}else if(i<10)return i++,void setTimeout(arguments.callee,10);e.removeChild(t),n=null,s()}()}else s()}function s(){var e=F.length;if(e>0)for(var t=0;t<e;t++){var n=F[t].id,i=F[t].callbackFn,a={success:!1,id:n};if(Q.pv[0]>0){var r=m(n);if(r)if(!b(F[t].swfVersion)||Q.wk&&Q.wk<312)if(F[t].expressInstall&&l()){var s={};s.data=F[t].expressInstall,s.width=r.getAttribute("width")||"0",
s.height=r.getAttribute("height")||"0",r.getAttribute("class")&&(s.styleclass=r.getAttribute("class")),r.getAttribute("align")&&(s.align=r.getAttribute("align"));for(var d={},h=r.getElementsByTagName("param"),p=h.length,f=0;f<p;f++)"movie"!=h[f].getAttribute("name").toLowerCase()&&(d[h[f].getAttribute("name")]=h[f].getAttribute("value"));u(s,d,n,i)}else c(r),i&&i(a);else I(n,!0),i&&(a.success=!0,a.ref=o(n),i(a))}else if(I(n,!0),i){var g=o(n);g&&typeof g.SetVariable!=E&&(a.success=!0,a.ref=g),
i(a)}}}function o(e){var t=null,n=m(e);if(n&&"OBJECT"==n.nodeName)if(typeof n.SetVariable!=E)t=n;else{var i=n.getElementsByTagName(A)[0];i&&(t=i)}return t}function l(){return!W&&b("6.0.65")&&(Q.win||Q.mac)&&!(Q.wk&&Q.wk<312)}function u(e,t,n,i){W=!0,D=i||null,P={success:!1,id:n};var a=m(n);if(a){"OBJECT"==a.nodeName?(M=d(a),C=null):(M=a,C=n),e.id=_,(typeof e.width==E||!/%$/.test(e.width)&&parseInt(e.width,10)<310)&&(e.width="310"),
(typeof e.height==E||!/%$/.test(e.height)&&parseInt(e.height,10)<137)&&(e.height="137"),O.title=O.title.slice(0,47)+" - Flash Player Installation";var r=Q.ie&&Q.win?"ActiveX":"PlugIn",s="MMredirectURL="+R.location.toString().replace(/&/g,"%26")+"&MMplayerType="+r+"&MMdoctitle="+O.title;if(typeof t.flashvars!=E?t.flashvars+="&"+s:t.flashvars=s,Q.ie&&Q.win&&4!=a.readyState){var o=v("div");n+="SWFObjectNew",o.setAttribute("id",n),a.parentNode.insertBefore(o,a),a.style.display="none",function(){
4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}h(e,t,n)}}function c(e){if(Q.ie&&Q.win&&4!=e.readyState){var t=v("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(d(e),t),e.style.display="none",function(){4==e.readyState?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(d(e),e)}function d(e){var t=v("div");if(Q.win&&Q.ie)t.innerHTML=e.innerHTML;else{var n=e.getElementsByTagName(A)[0];if(n){var i=n.childNodes
;if(i)for(var a=i.length,r=0;r<a;r++)1==i[r].nodeType&&"PARAM"==i[r].nodeName||8==i[r].nodeType||t.appendChild(i[r].cloneNode(!0))}}return t}function h(e,t,n){var i,a=m(n);if(Q.wk&&Q.wk<312)return i;if(a)if(typeof e.id==E&&(e.id=n),Q.ie&&Q.win){var r="";for(var s in e)e[s]!=Object.prototype[s]&&("data"==s.toLowerCase()?t.movie=e[s]:"styleclass"==s.toLowerCase()?r+=' class="'+e[s]+'"':"classid"!=s.toLowerCase()&&(r+=" "+s+'="'+e[s]+'"'));var o=""
;for(var l in t)t[l]!=Object.prototype[l]&&(o+='<param name="'+l+'" value="'+t[l]+'" />');a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+r+">"+o+"</object>",B[B.length]=e.id,i=m(e.id)}else{var u=v(A);u.setAttribute("type",L);for(var c in e)e[c]!=Object.prototype[c]&&("styleclass"==c.toLowerCase()?u.setAttribute("class",e[c]):"classid"!=c.toLowerCase()&&u.setAttribute(c,e[c]));for(var d in t)t[d]!=Object.prototype[d]&&"movie"!=d.toLowerCase()&&p(u,d,t[d])
;a.parentNode.replaceChild(u,a),i=u}return i}function p(e,t,n){var i=v("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function f(e){var t=m(e);t&&"OBJECT"==t.nodeName&&(Q.ie&&Q.win?(t.style.display="none",function(){4==t.readyState?g(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function g(e){var t=m(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function m(e){var t=null;try{t=O.getElementById(e)
}catch(e){}return t}function v(e){return O.createElement(e)}function y(e,t,n){e.attachEvent(t,n),V[V.length]=[e,t,n]}function b(e){var t=Q.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]}function S(e,t,n,i){if(!Q.ie||!Q.mac){var a=O.getElementsByTagName("head")[0];if(a){var r=n&&"string"==typeof n?n:"screen";if(i&&(T=null,x=null),!T||x!=r){var s=v("style")
;s.setAttribute("type","text/css"),s.setAttribute("media",r),T=a.appendChild(s),Q.ie&&Q.win&&typeof O.styleSheets!=E&&O.styleSheets.length>0&&(T=O.styleSheets[O.styleSheets.length-1]),x=r}Q.ie&&Q.win?T&&typeof T.addRule==A&&T.addRule(e,t):T&&typeof O.createTextNode!=E&&T.appendChild(O.createTextNode(e+" {"+t+"}"))}}}function I(e,t){if(Y){var n=t?"visible":"hidden";H&&m(e)?m(e).style.visibility=n:S("#"+e,"visibility:"+n)}}function w(e){
return null!=/[\\\"<>\.;]/.exec(e)&&typeof encodeURIComponent!=E?encodeURIComponent(e):e}var M,C,D,P,T,x,E="undefined",A="object",k="Shockwave Flash",L="application/x-shockwave-flash",_="SWFObjectExprInst",N="onreadystatechange",R=window,O=document,j=navigator,z=!1,U=[a],F=[],B=[],V=[],H=!1,W=!1,Y=!0,Q=function(){
var e=typeof O.getElementById!=E&&typeof O.getElementsByTagName!=E&&typeof O.createElement!=E,t=j.userAgent.toLowerCase(),n=j.platform.toLowerCase(),i=n?/win/.test(n):/win/.test(t),a=n?/mac/.test(n):/mac/.test(t),r=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),s=!1,o=[0,0,0],l=null;if(typeof j.plugins!=E&&typeof j.plugins[k]==A)!(l=j.plugins[k].description)||typeof j.mimeTypes!=E&&j.mimeTypes[L]&&!j.mimeTypes[L].enabledPlugin||(z=!0,s=!1,
l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),o[0]=parseInt(l.replace(/^(.*)\..*$/,"$1"),10),o[1]=parseInt(l.replace(/^.*\.(.*)\s.*$/,"$1"),10),o[2]=/[a-zA-Z]/.test(l)?parseInt(l.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof R.ActiveXObject!=E)try{var u=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");u&&(l=u.GetVariable("$version"))&&(s=!0,l=l.split(" ")[1].split(","),o=[parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)])}catch(e){}return{w3:e,pv:o,wk:r,ie:s,win:i,mac:a}}()
;(function(){Q.w3&&((typeof O.readyState!=E&&"complete"==O.readyState||typeof O.readyState==E&&(O.getElementsByTagName("body")[0]||O.body))&&e(),H||(typeof O.addEventListener!=E&&O.addEventListener("DOMContentLoaded",e,!1),Q.ie&&Q.win&&(O.attachEvent(N,function(){"complete"==O.readyState&&(O.detachEvent(N,arguments.callee),e())}),R==top&&function(){if(!H){try{O.documentElement.doScroll("left")}catch(e){return void setTimeout(arguments.callee,0)}e()}}()),Q.wk&&function(){
if(!H)/loaded|complete/.test(O.readyState)?void e():void setTimeout(arguments.callee,0)}(),i(e)))})(),function(){Q.ie&&Q.win&&window.attachEvent("onunload",function(){for(var e=V.length,t=0;t<e;t++)V[t][0].detachEvent(V[t][1],V[t][2]);for(var i=B.length,a=0;a<i;a++)f(B[a]);for(var r in Q)Q[r]=null;Q=null;for(var s in n)n[s]=null;n=null})}();return{registerObject:function(e,t,n,i){if(Q.w3&&e&&t){var a={};a.id=e,a.swfVersion=t,a.expressInstall=n,a.callbackFn=i,F[F.length]=a,I(e,!1)}else i&&i({
success:!1,id:e})},getObjectById:function(e){if(Q.w3)return o(e)},embedSWF:function(e,n,i,a,r,s,o,c,d,p){var f={success:!1,id:n};Q.w3&&!(Q.wk&&Q.wk<312)&&e&&n&&i&&a&&r?(I(n,!1),t(function(){i+="",a+="";var t={};if(d&&typeof d===A)for(var g in d)t[g]=d[g];t.data=e,t.width=i,t.height=a;var m={};if(c&&typeof c===A)for(var v in c)m[v]=c[v];if(o&&typeof o===A)for(var y in o)typeof m.flashvars!=E?m.flashvars+="&"+y+"="+o[y]:m.flashvars=y+"="+o[y];if(b(r)){var S=h(t,m,n);t.id==n&&I(n,!0),f.success=!0,
f.ref=S}else{if(s&&l())return t.data=s,void u(t,m,n,p);I(n,!0)}p&&p(f)})):p&&p(f)},switchOffAutoHideShow:function(){Y=!1},ua:Q,getFlashPlayerVersion:function(){return{major:Q.pv[0],minor:Q.pv[1],release:Q.pv[2]}},hasFlashPlayerVersion:b,createSWF:function(e,t,n){return Q.w3?h(e,t,n):void 0},showExpressInstall:function(e,t,n,i){Q.w3&&l()&&u(e,t,n,i)},removeSWF:function(e){Q.w3&&f(e)},createCSS:function(e,t,n,i){Q.w3&&S(e,t,n,i)},addDomLoadEvent:t,addLoadEvent:i,getQueryParamValue:function(e){
var t=O.location.search||O.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return w(t);for(var n=t.split("&"),i=0;i<n.length;i++)if(n[i].substring(0,n[i].indexOf("="))==e)return w(n[i].substring(n[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(W){var e=m(_);e&&M&&(e.parentNode.replaceChild(M,e),C&&(I(C,!0),Q.ie&&Q.win&&(M.style.display="block")),D&&D(P)),W=!1}}}}();e.exports=n},function(e,t){e.exports={container:"Measure-container-2XznZ",
scrollContainer:"Measure-scrollContainer-3vb4J",expandContent:"Measure-expandContent-1JQfL",shrinkContent:"Measure-shrinkContent-32Udi Measure-expandContent-1JQfL"}},function(e,t){e.exports={equalizer:"EqualizerIcon-equalizer-2SoFA",bar:"EqualizerIcon-bar-1nPot"}},function(e,t){e.exports={cell:"virtualized-cell-3KPHx",isMoving:"virtualized-isMoving-a-wk0"}},function(e,t){e.exports={wrapper:"AbstractReactPageView-wrapper-26Hek"}},function(e,t){e.exports={
pageContainer:"ReactCapturePageView-pageContainer-UZSvw"}},function(e,t){e.exports={sidebarContainer:"ReactSidebarPageView-sidebarContainer-2yqZ9",pageContainer:"ReactSidebarPageView-pageContainer-1Qu7Q"}},function(e,t){e.exports={anagram:"Anagram-anagram-2KZ_Z"}},function(e,t){e.exports={badge:"Badge-badge-1VCQ1",isHidden:"Badge-isHidden-3Atw9",default:"Badge-default-1XnzT",primary:"Badge-primary-3GV6T",success:"Badge-success-3G72_",danger:"Badge-danger-2SHAW"}},function(e,t){e.exports={
circularProgressBarContainer:"CircularProgressBar-circularProgressBarContainer-30vSI",absoluteCenterCircularProgressBarContainer:"CircularProgressBar-absoluteCenterCircularProgressBarContainer-3isvT",circularProgressBar:"CircularProgressBar-circularProgressBar-2bQBe",circularProgressBarBackground:"CircularProgressBar-circularProgressBarBackground-1a1VU",circularProgressBarText:"CircularProgressBar-circularProgressBarText-1kr2I"}},function(e,t){e.exports={
lineHeightMeasure:"CollapsibleText-lineHeightMeasure-1waS-",contentTransition:"CollapsibleText-contentTransition-15VYv",readMore:"CollapsibleText-readMore-1bRJm DisclosureArrowButton-disclosureArrowButton-3tbYZ",readMoreArrow:"CollapsibleText-readMoreArrow-34BdB DisclosureArrowButton-disclosureArrow-34Wg3 DisclosureArrow-disclosureArrow-1sBFv"}},function(e,t){e.exports={separator:"DashSeparator-separator-2a3yn"}},function(e,t){e.exports={disclosureArrow:"DisclosureArrow-disclosureArrow-1sBFv",
default:"DisclosureArrow-default-3_FCW",primary:"DisclosureArrow-primary-vESs5",success:"DisclosureArrow-success-3ECgX",danger:"DisclosureArrow-danger-yr9QC",small:"DisclosureArrow-small-1otGg",up:"DisclosureArrow-up-rjGpc",right:"DisclosureArrow-right-1FzuH",medium:"DisclosureArrow-medium-3VjTd",large:"DisclosureArrow-large-ZqY-A",down:"DisclosureArrow-down-1U7WW DisclosureArrow-up-rjGpc",left:"DisclosureArrow-left-YHRK4 DisclosureArrow-right-1FzuH",isSelected:"DisclosureArrow-isSelected-VMAVr"
}},function(e,t){e.exports={dragLayer:"DragPreviewLayer-dragLayer-2uYZU"}},function(e,t){e.exports={grid:"FlexGrid-grid-Ws_Yk"}},function(e,t){e.exports={takeOver:"Overlay-takeOver-3RpfO",contents:"Overlay-contents-1iUPp",enter:"Overlay-enter-2d3cf",enterActive:"Overlay-enterActive-2Ra2-",leave:"Overlay-leave-17nHb",leaveActive:"Overlay-leaveActive-2QzOi"}},function(e,t){e.exports={plexPassIcon:"PlexPassBadge-plexPassIcon-256yq"}},function(e,t){e.exports={upsell:"PlexPassUpsell-upsell-3i2JL",
iconContainer:"PlexPassUpsell-iconContainer-3uKd8",icon:"PlexPassUpsell-icon-1r94u",title:"PlexPassUpsell-title-3m6RL",text:"PlexPassUpsell-text-2hF28"}},function(e,t){e.exports={scroller:"Scroller-scroller-d5-b-",none:"Scroller-none-1LyUO",vertical:"Scroller-vertical-1bgGS",auto:"Scroller-auto-3t4gM",horizontal:"Scroller-horizontal-1k8ET",omni:"Scroller-omni-2hOYs"}},function(e,t){e.exports={slider:"Slider-slider-2oLVT",thumb:"Slider-thumb-2QGiU Link-link-2XYrU",
isDragging:"Slider-isDragging-3wZpY",hasAutoHideThumb:"Slider-hasAutoHideThumb-tpdhC",track:"Slider-track-28JOS",fill:"Slider-fill-35GFq"}},function(e,t){e.exports={spinner:"Spinner-spinner-290-o spin-spin-2Ou6V",spinnerContainer:"Spinner-spinnerContainer-2t9nG",spinnerLabel:"Spinner-spinnerLabel-XPa3u",small:"Spinner-small-2WAWj Spinner-spinner-290-o spin-spin-2Ou6V",medium:"Spinner-medium-2xYg8 Spinner-spinner-290-o spin-spin-2Ou6V",
large:"Spinner-large-3oCdT Spinner-spinner-290-o spin-spin-2Ou6V"}},function(e,t){e.exports={starRating:"StarRating-starRating-1-SbN",stars:"StarRating-stars-2HyHd",dot:"StarRating-dot-3IqC-",star:"StarRating-star-31C9X",hidden:"StarRating-hidden-2n6-9",emptyStar:"StarRating-emptyStar-1XVvK StarRating-star-31C9X",fullStar:"StarRating-fullStar-3gYOk StarRating-star-31C9X",pulsing:"StarRating-pulsing-ZL72H",isReadOnly:"StarRating-isReadOnly-2SumJ",isUnrated:"StarRating-isUnrated-2pl1W",
slider:"StarRating-slider-2uo17",track:"StarRating-track-29690"}},function(e,t){e.exports={tag:"TagLabel-tag-2dgQO",remove:"TagLabel-remove-1aTjc"}},function(e,t){e.exports={container:"TickMarks-container-Dsw5z",ticks:"TickMarks-ticks-3rrhG",tick:"TickMarks-tick-S3qkF",minor:"TickMarks-minor-1EIQq TickMarks-tick-S3qkF",major:"TickMarks-major-2GXoi TickMarks-tick-S3qkF",label:"TickMarks-label-2qQML"}},function(e,t){e.exports={button:"Button-button--JvPI Link-link-2XYrU",
default:"Button-default-36soe",primary:"Button-primary-2LQVw",success:"Button-success-27Gi3",danger:"Button-danger-2Kt82",small:"Button-small-3Zwli",medium:"Button-medium-m-p5M",large:"Button-large-15Al1"}},function(e,t){e.exports={disclosureArrowButton:"DisclosureArrowButton-disclosureArrowButton-3tbYZ",isSelected:"DisclosureArrowButton-isSelected-oswRN",small:"DisclosureArrowButton-small-3E5xa",medium:"DisclosureArrowButton-medium-3-Y37",large:"DisclosureArrowButton-large-1I8ol",
disclosureArrow:"DisclosureArrowButton-disclosureArrow-34Wg3 DisclosureArrow-disclosureArrow-1sBFv",down:"DisclosureArrowButton-down-bd2wx",left:"DisclosureArrowButton-left-1vTz7",up:"DisclosureArrowButton-up-2fzdj",right:"DisclosureArrowButton-right-3YrxJ"}},function(e,t){e.exports={link:"Link-link-2XYrU",default:"Link-default-32xSO",primary:"Link-primary-2-G21",success:"Link-success-A5sJ5",danger:"Link-danger-2sae2",small:"Link-small-16umL",medium:"Link-medium-2KGbN",large:"Link-large-3ff0J",
isSelected:"Link-isSelected-3GpAs",isActiveRoute:"Link-isActiveRoute-2pAJj"}},function(e,t){e.exports={playButton:"PlayButton-playButton-3WX8X",playCircle:"PlayButton-playCircle-3Evfd",playIcon:"PlayButton-playIcon-dt3sk"}},function(e,t){e.exports={recordButton:"RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X",recordCircle:"RecordButton-recordCircle-eTHvA PlayButton-playCircle-3Evfd",recordIcon:"RecordButton-recordIcon-AeMqn"}},function(e,t){e.exports={
selectButton:"SelectButton-selectButton-3Kbjm",isSelected:"SelectButton-isSelected-3mX24",selectCircle:"SelectButton-selectCircle-3tdvG",selectedIcon:"SelectButton-selectedIcon-3-SAL"}},function(e,t){e.exports={button:"SpinnerButton-button-3WowH Button-button--JvPI Link-link-2XYrU",spinnerContainer:"SpinnerButton-spinnerContainer-2OI9v",spinner:"SpinnerButton-spinner-2SDDZ Spinner-spinner-290-o spin-spin-2Ou6V",label:"SpinnerButton-label-1Rv20",isSpinning:"SpinnerButton-isSpinning-2MaGv"}
},function(e,t){e.exports={container:"AutosuggestInput-container-2cPGb",input:"AutosuggestInput-input-3hXMJ",suggestionsContainer:"AutosuggestInput-suggestionsContainer-1x6tk Scroller-scroller-d5-b- Scroller-vertical-1bgGS MenuContainer-menu-3Gtlw",containerOpen:"AutosuggestInput-containerOpen-2e7tJ",suggestionsList:"AutosuggestInput-suggestionsList-3jsml",suggestion:"AutosuggestInput-suggestion-kMP28 MenuItem-menuItem-25266",suggestionFocused:"AutosuggestInput-suggestionFocused-3wBdE"}
},function(e,t){e.exports={tagsInput:"AutosuggestTagsInput-tagsInput-1wrGI TagsInput-tagsInput-3bbBk",input:"AutosuggestTagsInput-input-2xoI7 TagsInput-input-3mYtb"}},function(e,t){e.exports={input:"CheckInput-input-ekXaU",label:"CheckInput-label-3_eM0",small:"CheckInput-small-1XirQ",large:"CheckInput-large-3iVct",isDisabled:"CheckInput-isDisabled-18Q_A",hasError:"CheckInput-hasError-3hdvR"}},function(e,t){e.exports={group:"FormGroup-group-15o1H"}},function(e,t){e.exports={
help:"FormHelp-help-2-ppP"}},function(e,t){e.exports={label:"FormLabel-label-1sr1f",hasError:"FormLabel-hasError-3iiNl"}},function(e,t){e.exports={sectionError:"FormSectionError-sectionError-3ZuKe",sectionErrorIcon:"FormSectionError-sectionErrorIcon--74cE",sectionErrorDismiss:"FormSectionError-sectionErrorDismiss-2k5QS"}},function(e,t){e.exports={group:"InlineFormGroup-group-39inI"}},function(e,t){e.exports={label:"InlineInputGroupFormLabel-label-3avlL FormLabel-label-1sr1f"}},function(e,t){
e.exports={input:"InlineNumberInputGroup-input-DiEPr TextInput-input-34u_B input-input-2ol6B"}},function(e,t){e.exports={input:"MaskedInput-input-17hU3 TextInput-input-34u_B input-input-2ol6B",small:"MaskedInput-small-1owiY TextInput-small-32Icv input-small-1pC38",large:"MaskedInput-large-1UpZY TextInput-large-3XjFh input-large-1cY_k",isDisabled:"MaskedInput-isDisabled-3_twg TextInput-isDisabled-2ndPL input-isDisabled-3kEMP",
hasError:"MaskedInput-hasError-1kFAT TextInput-hasError-2pH7B input-hasError-FVFYC"}},function(e,t){e.exports={input:"NumberInputGroup-input-293D8 TextInput-input-34u_B input-input-2ol6B"}},function(e,t){e.exports={input:"SelectInput-input-1WBUz input-input-2ol6B",small:"SelectInput-small-1l_KX input-small-1pC38",select:"SelectInput-select-1LGc-",large:"SelectInput-large-1oaRj input-large-1cY_k",isDisabled:"SelectInput-isDisabled-3etwl",hasError:"SelectInput-hasError-3SvNE"}},function(e,t){
e.exports={tagsInput:"TagsInput-tagsInput-3bbBk",input:"TagsInput-input-3mYtb"}},function(e,t){e.exports={textArea:"TextArea-textArea-1PnXt input-input-2ol6B",small:"TextArea-small-1nWjY",large:"TextArea-large-HN26B",isDisabled:"TextArea-isDisabled-1lLQi input-isDisabled-3kEMP",hasError:"TextArea-hasError-2Lomk input-hasError-FVFYC"}},function(e,t){e.exports={input:"TextInput-input-34u_B input-input-2ol6B",small:"TextInput-small-32Icv input-small-1pC38",
large:"TextInput-large-3XjFh input-large-1cY_k",isDisabled:"TextInput-isDisabled-2ndPL input-isDisabled-3kEMP",hasError:"TextInput-hasError-2pH7B input-hasError-FVFYC"}},function(e,t){e.exports={inputs:"UnitInput-inputs-1Fc89",textInput:"UnitInput-textInput-QSuLW TextInput-input-34u_B input-input-2ol6B"}},function(e,t){e.exports={avatar:"AvatarImg-avatar-3Op56"}},function(e,t){e.exports={card:"PosterCard-card-1rN9g"}},function(e,t){e.exports={imageContainer:"PosterCardImg-imageContainer-1Ar4M"}
},function(e,t){e.exports={scroller:"VirtualListScroller-scroller-37EU_"}},function(e,t){e.exports={menuPortal:"Menu-menuPortal-2JtDz",menuScroller:"Menu-menuScroller-E0NwY Scroller-vertical-1bgGS",enter:"Menu-enter-TbCfj",enterActive:"Menu-enterActive-33Wwi",leave:"Menu-leave-vNlfT",leaveActive:"Menu-leaveActive-2OK3A"}},function(e,t){e.exports={menu:"MenuContainer-menu-3Gtlw",isDisabled:"MenuContainer-isDisabled-XuJVB",small:"MenuContainer-small-3OQDe",medium:"MenuContainer-medium-2XOYJ",
large:"MenuContainer-large-1Hnrd"}},function(e,t){e.exports={menuItem:"MenuItem-menuItem-25266",isDisabled:"MenuItem-isDisabled-3RIp9",default:"MenuItem-default-tX5Cl",primary:"MenuItem-primary-2OjZp",success:"MenuItem-success-1gbTj",danger:"MenuItem-danger-5yAK7"}},function(e,t){e.exports={separator:"MenuSeparator-separator-2QS60"}},function(e,t){e.exports={menuItemContainer:"SelectedMenuItem-menuItemContainer-7SpJZ",menuLabel:"SelectedMenuItem-menuLabel-1tKeW",
selectedIcon:"SelectedMenuItem-selectedIcon-3S2cy",isSelected:"SelectedMenuItem-isSelected-3zuEi"}},function(e,t){e.exports={confirmBody:"ConfirmModal-confirmBody-10ifx ModalBody-modalScroller-rPF2V ModalBody-modalBody-3y4WA",accordLabel:"ConfirmModal-accordLabel-2PQCS",accordInput:"ConfirmModal-accordInput-3RjnH",cancelButton:"ConfirmModal-cancelButton-3A26b",confirmButton:"ConfirmModal-confirmButton-1DVQ-"}},function(e,t){e.exports={modalContainer:"Modal-modalContainer-19n0t",
modalBackdrop:"Modal-modalBackdrop-1kQnb",modal:"Modal-modal-y6FAw",small:"Modal-small-1iA7m Modal-modal-y6FAw",medium:"Modal-medium-2lxgW Modal-modal-y6FAw",large:"Modal-large-sIqvF Modal-modal-y6FAw",enter:"Modal-enter-E0Cly",enterActive:"Modal-enterActive-1Nkvf",leave:"Modal-leave-2W8w6",leaveActive:"Modal-leaveActive-1X1Po"}},function(e,t){e.exports={modalBody:"ModalBody-modalBody-3y4WA",modalScroller:"ModalBody-modalScroller-rPF2V ModalBody-modalBody-3y4WA",
innerModalBody:"ModalBody-innerModalBody-1eSxU"}},function(e,t){e.exports={modalContent:"ModalContent-modalContent-2HRs1",closeButton:"ModalContent-closeButton-3VDDx"}},function(e,t){e.exports={modalScroller:"ModalContentCenter-modalScroller-3cd-b ModalBody-modalScroller-rPF2V ModalBody-modalBody-3y4WA",innerModalBody:"ModalContentCenter-innerModalBody-3jQ5I ModalBody-innerModalBody-1eSxU"}},function(e,t){e.exports={icon:"ModalContentError-icon-235FF",default:"ModalContentError-default-1xFU8",
primary:"ModalContentError-primary-34blW",success:"ModalContentError-success-2Wv-f",danger:"ModalContentError-danger-22PUT",message:"ModalContentError-message-3J35m"}},function(e,t){e.exports={modalFooter:"ModalFooter-modalFooter-pJpOu"}},function(e,t){e.exports={buttonBar:"ModalFooterButtonBar-buttonBar-2NGmN"}},function(e,t){e.exports={modalHeader:"ModalHeader-modalHeader-IGRia"}},function(e,t){e.exports={toolbarButton:"ToolbarButton-toolbarButton-3xzHJ",
bottomLeft:"ToolbarButton-bottomLeft-nOJqG Tooltip-bottomLeft-2vO0S Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipTopArrow-1Er8B Tooltip-tooltipLeftAlignArrow-28x2y",bottomCenter:"ToolbarButton-bottomCenter-1c_3c Tooltip-bottomCenter-3kHKi Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipTopArrow-1Er8B Tooltip-tooltipCenterAlignArrow-2YNMd",
bottomRight:"ToolbarButton-bottomRight-1Klcy Tooltip-bottomRight-PO2JM Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipTopArrow-1Er8B Tooltip-tooltipRightAlignArrow-1q7Mh"}},function(e,t){e.exports={toolbarMenu:"ToolbarMenu-toolbarMenu-18yic MenuContainer-menu-3Gtlw"}},function(e,t){e.exports={tooltipPortal:"Tooltip-tooltipPortal-1IUlb",tooltip:"Tooltip-tooltip-2AL-W",tooltipArrow:"Tooltip-tooltipArrow-2yu7H",tooltipBottomArrow:"Tooltip-tooltipBottomArrow-3Gqax",
tooltipTopArrow:"Tooltip-tooltipTopArrow-1Er8B",tooltipRightArrow:"Tooltip-tooltipRightArrow-30EZr",tooltipLeftArrow:"Tooltip-tooltipLeftArrow-3yO_q",tooltipCenterAlignArrow:"Tooltip-tooltipCenterAlignArrow-2YNMd",tooltipLeftAlignArrow:"Tooltip-tooltipLeftAlignArrow-28x2y",tooltipRightAlignArrow:"Tooltip-tooltipRightAlignArrow-1q7Mh",tooltipMiddleAlignArrow:"Tooltip-tooltipMiddleAlignArrow-3RB_t",
topLeft:"Tooltip-topLeft-3hUdA Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipBottomArrow-3Gqax Tooltip-tooltipLeftAlignArrow-28x2y",topCenter:"Tooltip-topCenter-3_uIB Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipBottomArrow-3Gqax Tooltip-tooltipCenterAlignArrow-2YNMd",topRight:"Tooltip-topRight-2GjWg Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipBottomArrow-3Gqax Tooltip-tooltipRightAlignArrow-1q7Mh",
bottomLeft:"Tooltip-bottomLeft-2vO0S Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipTopArrow-1Er8B Tooltip-tooltipLeftAlignArrow-28x2y",bottomCenter:"Tooltip-bottomCenter-3kHKi Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipTopArrow-1Er8B Tooltip-tooltipCenterAlignArrow-2YNMd",bottomRight:"Tooltip-bottomRight-PO2JM Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipTopArrow-1Er8B Tooltip-tooltipRightAlignArrow-1q7Mh",
middleLeft:"Tooltip-middleLeft-2WibI Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipRightArrow-30EZr Tooltip-tooltipMiddleAlignArrow-3RB_t",middleRight:"Tooltip-middleRight-3n22h Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipLeftArrow-3yO_q Tooltip-tooltipMiddleAlignArrow-3RB_t",enter:"Tooltip-enter-xqbEr",enterActive:"Tooltip-enterActive-1Lwxk",leave:"Tooltip-leave-1kw2J",leaveActive:"Tooltip-leaveActive-1P4dI"}},function(e,t){e.exports={
liveTVSettings:"LiveTVSettings-liveTVSettings-w68YV",info:"LiveTVSettings-info-1gi-J",moreInfo:"LiveTVSettings-moreInfo-N5ya4",moreInfoText:"LiveTVSettings-moreInfoText-1ZoWu"}},function(e,t){e.exports={device:"DVRDevice-device-3IwH6",deviceImage:"DVRDevice-deviceImage-1efFa DVRDeviceImage-image-1q4Bg",details:"DVRDevice-details-F9a0M",model:"DVRDevice-model-1unSm",deviceSettingsIcon:"DVRDevice-deviceSettingsIcon-wNdKg",uri:"DVRDevice-uri-2Vhv0",deviceWarning:"DVRDevice-deviceWarning-UAoFi",
deviceWarningIconContainer:"DVRDevice-deviceWarningIconContainer-29K1l",separator:"DVRDevice-separator-2sIVz DashSeparator-separator-2a3yn",info:"DVRDevice-info-kn53L",removeDeviceContainer:"DVRDevice-removeDeviceContainer-2W5hI",removeDevice:"DVRDevice-removeDevice-3N-rD"}},function(e,t){e.exports={image:"DVRDeviceImage-image-1q4Bg"}},function(e,t){e.exports={form:"DVRDeviceSettingsModalContent-form-1a8dR",container:"DVRDeviceSettingsModalContent-container-320C5",
info:"DVRDeviceSettingsModalContent-info-3oNQ9",deviceImage:"DVRDeviceSettingsModalContent-deviceImage-3ud4c",model:"DVRDeviceSettingsModalContent-model-3qWA4",settings:"DVRDeviceSettingsModalContent-settings-3-Kyi"}},function(e,t){e.exports={dvr:"DVRListItem-dvr-1CoTi",header:"DVRListItem-header-Lb8AE",separator:"DVRListItem-separator-2BuN4 DashSeparator-separator-2a3yn",name:"DVRListItem-name-rIFJz",deleteLink:"DVRListItem-deleteLink-1ATve",actions:"DVRListItem-actions-1mU6F",
actionIcon:"DVRListItem-actionIcon-fPqPl",devices:"DVRListItem-devices-2eZl_",addDeviceIcon:"DVRListItem-addDeviceIcon-2n26f"}},function(e,t){e.exports={progressContainer:"DVRManageChannelsInfo-progressContainer-1JJ2z",scroller:"DVRManageChannelsInfo-scroller-1mBV9 Scroller-vertical-1bgGS"}},function(e,t){e.exports={form:"DVRManageChannelsModalContent-form-2ykdJ",manageChannelsBody:"DVRManageChannelsModalContent-manageChannelsBody-PHeFR ModalBody-modalBody-3y4WA",
scanChannelsContainer:"DVRManageChannelsModalContent-scanChannelsContainer-1k91y",scanChannelsMessage:"DVRManageChannelsModalContent-scanChannelsMessage-3d_Eu",scroller:"DVRManageChannelsModalContent-scroller-1MbzJ Scroller-vertical-1bgGS",centeredContainer:"DVRManageChannelsModalContent-centeredContainer-6K7kA",progressContainer:"DVRManageChannelsModalContent-progressContainer-1GUW1"}},function(e,t){e.exports={form:"DVRSettingsModalContent-form-2-MX9"}},function(e,t){e.exports={
attribution:"GracenoteAttribution-attribution-16wMJ"}},function(e,t){e.exports={modal:"DVRSetupModal-modal-3IeKF Modal-medium-2lxgW Modal-modal-y6FAw"}},function(e,t){e.exports={errorMessage:"DVRSetupModalContent-errorMessage-1lyhv",errorIcon:"DVRSetupModalContent-errorIcon-38FJ7"}},function(e,t){e.exports={footer:"DVRSetupModalFooter-footer-VLPNT ModalFooter-modalFooter-pJpOu"}},function(e,t){e.exports={deviceImageContainer:"DVRSetupDevice-deviceImageContainer-2xU-H",
selectButton:"DVRSetupDevice-selectButton-ae6X2 SelectButton-selectButton-3Kbjm",details:"DVRSetupDevice-details-3KGan",model:"DVRSetupDevice-model-2C8RY",uri:"DVRSetupDevice-uri-1doZG",channelCount:"DVRSetupDevice-channelCount-3h5cj"}},function(e,t){e.exports={channel:"DVRSetupDeviceChannel-channel-3Z90s",channelIdentifier:"DVRSetupDeviceChannel-channelIdentifier-1EqGb"}},function(e,t){e.exports={deviceInfoBody:"DVRSetupDeviceInfo-deviceInfoBody-2LzEx ModalBody-modalBody-3y4WA",
deviceInfoForm:"DVRSetupDeviceInfo-deviceInfoForm-1K-pG",channelInfo:"DVRSetupDeviceInfo-channelInfo-32L38",channelDetails:"DVRSetupDeviceInfo-channelDetails-314k9",deviceDetails:"DVRSetupDeviceInfo-deviceDetails-3DYVe",countryInputGroup:"DVRSetupDeviceInfo-countryInputGroup-5CATq",channelScanSourceSelect:"DVRSetupDeviceInfo-channelScanSourceSelect-22g5X SelectInput-input-1WBUz input-input-2ol6B",deviceChannelsContainer:"DVRSetupDeviceInfo-deviceChannelsContainer-2ffnz",
deviceChannels:"DVRSetupDeviceInfo-deviceChannels-2erQ6 Scroller-vertical-1bgGS",deviceChannelsInfo:"DVRSetupDeviceInfo-deviceChannelsInfo-3oUd5 DVRSetupDeviceInfo-deviceChannels-2erQ6 Scroller-vertical-1bgGS"}},function(e,t){e.exports={container:"DVRSetupDeviceInfoChannelInfo-container-38Jxg",settings:"DVRSetupDeviceInfoChannelInfo-settings-3rutx",message:"DVRSetupDeviceInfoChannelInfo-message-1d9gE",noChannelsIcon:"DVRSetupDeviceInfoChannelInfo-noChannelsIcon-339HB",
clockContainer:"DVRSetupDeviceInfoChannelInfo-clockContainer-2n_Vv",noChannelsIconContainer:"DVRSetupDeviceInfoChannelInfo-noChannelsIconContainer-25faJ",clock:"DVRSetupDeviceInfoChannelInfo-clock-2vxBT",clockTime:"DVRSetupDeviceInfoChannelInfo-clockTime-qyydg DVRSetupDeviceInfoChannelInfo-clock-2vxBT",blink:"DVRSetupDeviceInfoChannelInfo-blink-107UT",clockBackground:"DVRSetupDeviceInfoChannelInfo-clockBackground-2moSt",
noChannelsIconBackground:"DVRSetupDeviceInfoChannelInfo-noChannelsIconBackground-3tc9i"}},function(e,t){e.exports={message:"DVRSetupDeviceInfoMessage-message-2ozwd"}},function(e,t){e.exports={addDeviceButton:"DVRSetupDeviceSelector-addDeviceButton-37qk2",manualDeviceButtonContainer:"DVRSetupDeviceSelector-manualDeviceButtonContainer-3-lqe",manualDeviceContainer:"DVRSetupDeviceSelector-manualDeviceContainer-6K51i",manualAddressArrow:"DVRSetupDeviceSelector-manualAddressArrow-e9thn",
manualDeviceInput:"DVRSetupDeviceSelector-manualDeviceInput-22enz TextInput-input-34u_B input-input-2ol6B",deviceCount:"DVRSetupDeviceSelector-deviceCount-6HUil",devices:"DVRSetupDeviceSelector-devices-2f43G",device:"DVRSetupDeviceSelector-device-QX9WA",spinnerContainer:"DVRSetupDeviceSelector-spinnerContainer-2U4Wi"}},function(e,t){e.exports={message:"EPGDownload-message-1nld-",spinnerContainer:"EPGDownload-spinnerContainer-OHwKI",spinnerMessage:"EPGDownload-spinnerMessage-j4e6W"}
},function(e,t){e.exports={message:"EPGMapping-message-2-bns",spinnerContainer:"EPGMapping-spinnerContainer-TAwZ1"}},function(e,t){e.exports={form:"EPGSettings-form-ZJ79Y",message:"EPGSettings-message-159ME",regionInput:"EPGSettings-regionInput-1wXWR SelectInput-input-1WBUz input-input-2ol6B",fetchingSpinner:"EPGSettings-fetchingSpinner-3HphG Spinner-spinner-290-o spin-spin-2Ou6V"}},function(e,t){e.exports={channelMapping:"DeviceChannelMapping-channelMapping-2Z4xx",
deviceInfo:"DeviceChannelMapping-deviceInfo-3HnWc",channelEnabled:"DeviceChannelMapping-channelEnabled-1FW8M",deviceIdentifier:"DeviceChannelMapping-deviceIdentifier-3-v5l",mappingDisabled:"DeviceChannelMapping-mappingDisabled-3uY5j",channelName:"DeviceChannelMapping-channelName-2knCV",epgChannel:"DeviceChannelMapping-epgChannel-tjRMx",drmChannel:"DeviceChannelMapping-drmChannel-2CJhX",drmChannelBadge:"DeviceChannelMapping-drmChannelBadge-1_tZU"}},function(e,t){e.exports={
form:"DeviceChannelMappings-form-BhAiS",channelMappingsBody:"DeviceChannelMappings-channelMappingsBody-1KPox ModalBody-modalBody-3y4WA",programGuideLabel:"DeviceChannelMappings-programGuideLabel-3tWK8",programGuideSelectContainer:"DeviceChannelMappings-programGuideSelectContainer-1cpiV",programGuideTitle:"DeviceChannelMappings-programGuideTitle-3xOjM",centeredContainer:"DeviceChannelMappings-centeredContainer-3NaUq",scroller:"DeviceChannelMappings-scroller-2_Aea Scroller-vertical-1bgGS",
channelMappingsContainer:"DeviceChannelMappings-channelMappingsContainer-2gZaI"}},function(e,t){e.exports={container:"DeviceChannelMappingsHeader-container-1VViT",deviceChannels:"DeviceChannelMappingsHeader-deviceChannels-iZFrg",guideChannels:"DeviceChannelMappingsHeader-guideChannels-3D6cO",deviceChannelsPadding:"DeviceChannelMappingsHeader-deviceChannelsPadding-AkfFy"}},function(e,t){e.exports={hubCell:"HubCell-hubCell-3Ys17",hubHeader:"HubCell-hubHeader-l3HPI",
hubActions:"HubCell-hubActions-28w1-",hubScrollButton:"HubCell-hubScrollButton-2Y7ri"}},function(e,t){e.exports={hubCellHeader:"HubCellHeader-hubCellHeader-2pvYN"}},function(e,t){e.exports={hubCellTitle:"HubCellTitle-hubCellTitle-2abIn"}},function(e,t){e.exports={header:"MetadataMomentCell-header-3vgVa"}},function(e,t){e.exports={titleContainer:"MetadataPosterCell-titleContainer-24DI6",continueWatchingTitleContainer:"MetadataPosterCell-continueWatchingTitleContainer-3yCAY"}},function(e,t){
e.exports={item:"MetadataSummaryCell-item-3B6Cc",isActionsMenuOpen:"MetadataSummaryCell-isActionsMenuOpen-2SCBd",button:"MetadataSummaryCell-button-zZgSe",hasActiveSelection:"MetadataSummaryCell-hasActiveSelection-3nabO",underlay:"MetadataSummaryCell-underlay-3M2OQ",isForcingSelection:"MetadataSummaryCell-isForcingSelection-2Iov2",overlay:"MetadataSummaryCell-overlay-1lk0o",editButton:"MetadataSummaryCell-editButton-2RfiY MetadataSummaryCell-button-zZgSe",
moreButton:"MetadataSummaryCell-moreButton-1rf6A MetadataSummaryCell-button-zZgSe",isSelected:"MetadataSummaryCell-isSelected-fha5M",selectButton:"MetadataSummaryCell-selectButton-3KJeM SelectButton-selectButton-3Kbjm MetadataSummaryCell-button-zZgSe",alternateItem:"MetadataSummaryCell-alternateItem-3K1M6 MetadataSummaryCell-item-3B6Cc",posterContainer:"MetadataSummaryCell-posterContainer-1Vc-o",summaryContainer:"MetadataSummaryCell-summaryContainer-6HJG5",
librarySummaryContainer:"MetadataSummaryCell-librarySummaryContainer-HZdA_ MetadataSummaryCell-summaryContainer-6HJG5",titleContainer:"MetadataSummaryCell-titleContainer-p5H3c",title:"MetadataSummaryCell-title-3jmFb",rating:"MetadataSummaryCell-rating-2Qtpg",separator:"MetadataSummaryCell-separator-2zu7c DashSeparator-separator-2a3yn",summary:"MetadataSummaryCell-summary-2xqys",actions:"MetadataSummaryCell-actions-1C9Sh",selectCoverButton:"MetadataSummaryCell-selectCoverButton-2nF-u"}
},function(e,t){e.exports={loadingItem:"MetadataSummaryCellLoading-loadingItem-2TLko",alternateLoadingItem:"MetadataSummaryCellLoading-alternateLoadingItem-6d55P MetadataSummaryCellLoading-loadingItem-2TLko",posterContainer:"MetadataSummaryCellLoading-posterContainer-18W6x"}},function(e,t){e.exports={tableCell:"MetadataTableCell-tableCell-35117",activeTableCell:"MetadataTableCell-activeTableCell-IpsrR MetadataTableCell-tableCell-35117",title:"MetadataTableCell-title-3KMG0"}},function(e,t){
e.exports={tableHeader:"MetadataTableHeader-tableHeader-2bHAm",tableHeaderLink:"MetadataTableHeader-tableHeaderLink-7Uy9q",tableHeaderCell:"MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",activeTableHeaderCell:"MetadataTableHeader-activeTableHeaderCell-16E3M MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",tableHeaderTitle:"MetadataTableHeader-tableHeaderTitle-2CMNj",sortDirectionIcon:"MetadataTableHeader-sortDirectionIcon-3oFWZ",
playCell:"MetadataTableHeader-playCell-1oEdH MetadataTableRow-playCell-ziDSk MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",actionsCell:"MetadataTableHeader-actionsCell-1RppT MetadataTableRow-libraryActionsCell-2OOmP MetadataTableRow-actionsCell-1ax6E MetadataTableHeader-tableHeaderCell-61R48 MetadataTableCell-tableCell-35117",columnsButton:"MetadataTableHeader-columnsButton-33h2b"}},function(e,t){e.exports={item:"MetadataTableRow-item-11DH-",
isActionsMenuOpen:"MetadataTableRow-isActionsMenuOpen-3yasO",transientTitle:"MetadataTableRow-transientTitle-3nwho",button:"MetadataTableRow-button-1Y7ax",hasActiveSelection:"MetadataTableRow-hasActiveSelection-3A2BE",underlay:"MetadataTableRow-underlay-2ipZb",isForcingSelection:"MetadataTableRow-isForcingSelection-t_XFI",overlay:"MetadataTableRow-overlay-1RiId",transientTitleLeft:"MetadataTableRow-transientTitleLeft-19Y6P MetadataTableRow-transientTitle-3nwho",
transientTitleRight:"MetadataTableRow-transientTitleRight-3JGw3 MetadataTableRow-transientTitle-3nwho",playButton:"MetadataTableRow-playButton-3bNBC PlayButton-playButton-3WX8X MetadataTableRow-button-1Y7ax",editButton:"MetadataTableRow-editButton-1hH1w MetadataTableRow-button-1Y7ax",moreButton:"MetadataTableRow-moreButton-2YKSy MetadataTableRow-button-1Y7ax",isSelected:"MetadataTableRow-isSelected-bNqXl",
selectButton:"MetadataTableRow-selectButton-11Ia9 SelectButton-selectButton-3Kbjm MetadataTableRow-button-1Y7ax",alternateItem:"MetadataTableRow-alternateItem-1-jtp MetadataTableRow-item-11DH-",playCell:"MetadataTableRow-playCell-ziDSk",actionsCell:"MetadataTableRow-actionsCell-1ax6E",libraryActionsCell:"MetadataTableRow-libraryActionsCell-2OOmP MetadataTableRow-actionsCell-1ax6E",selectCoverButton:"MetadataTableRow-selectCoverButton-3SFDJ",
equalizer:"MetadataTableRow-equalizer-35cH_ EqualizerIcon-equalizer-2SoFA"}},function(e,t){e.exports={loadingItem:"MetadataTableRowLoading-loadingItem-2g4_Q",alternateLoadingItem:"MetadataTableRowLoading-alternateLoadingItem-3U7fu MetadataTableRowLoading-loadingItem-2g4_Q"}},function(e,t){e.exports={photoContainer:"PhotoCell-photoContainer-2Iiu_",photo:"PhotoCell-photo-BY0G2",image:"PhotoCell-image-1RkIX",badge:"PhotoCell-badge-3iLJ5",title:"PhotoCell-title-s5wU4"}},function(e,t){e.exports={
stylesContainer:"MetadataListStylesMenu-stylesContainer-jYQkc",slider:"MetadataListStylesMenu-slider-o88eP Slider-slider-2oLVT",stylesButton:"MetadataListStylesMenu-stylesButton-21zDb",stylesIcon:"MetadataListStylesMenu-stylesIcon-1r4qe"}},function(e,t){e.exports={divider:"MetadataListStylesMenuDivider-divider-T9bgy PageHeaderDivider-pageHeaderDivider-DvwUq"}},function(e,t){e.exports={completeIcon:"AiringDetailsModalContent-completeIcon-38k0Q",
recordingIcon:"AiringDetailsModalContent-recordingIcon-LbdQN",errorIcon:"AiringDetailsModalContent-errorIcon-3syeN",separator:"AiringDetailsModalContent-separator-3OQLc DashSeparator-separator-2a3yn",summary:"AiringDetailsModalContent-summary-vVorL"}},function(e,t){e.exports={container:"ConflictItemRow-container-x4THp"}},function(e,t){e.exports={title:"ConflictTitle-title-1g7j7",secondaryTitle:"ConflictTitle-secondaryTitle-2kiOL"}},function(e,t){e.exports={
message:"MediaSubscriptionConflict-message-1ZbxO",conflicts:"MediaSubscriptionConflict-conflicts-3hyQu"}},function(e,t){e.exports={baseForm:"MediaSubscriptionForm-baseForm-2bT5U",advancedForm:"MediaSubscriptionForm-advancedForm-26WFw",advancedSettings:"MediaSubscriptionForm-advancedSettings-3dyPl",baseSettings:"MediaSubscriptionForm-baseSettings-2ssnb",footer:"MediaSubscriptionForm-footer-2U6dh ModalFooter-modalFooter-pJpOu",advancedIcon:"MediaSubscriptionForm-advancedIcon-j3Yxg"}
},function(e,t){e.exports={errorMessage:"MediaSubscriptionNoLibrary-errorMessage-39UUf",addIcon:"MediaSubscriptionNoLibrary-addIcon-2B_Pq"}},function(e,t){e.exports={container:"MediaSubscriptionTargetPosterTitle-container-2LmdB",left:"MediaSubscriptionTargetPosterTitle-left-3Kcsf",right:"MediaSubscriptionTargetPosterTitle-right-18jQp",subscriptionBadge:"MediaSubscriptionTargetPosterTitle-subscriptionBadge-10p6v MetadataPosterCardOverlay-badge-1FU-p",
subscriptionBadgeIcon:"MediaSubscriptionTargetPosterTitle-subscriptionBadgeIcon-3Aqfc",titleContainer:"MediaSubscriptionTargetPosterTitle-titleContainer-1Zl4x",staticHeightTitleContainer:"MediaSubscriptionTargetPosterTitle-staticHeightTitleContainer-3Pp5d MediaSubscriptionTargetPosterTitle-titleContainer-1Zl4x"}},function(e,t){e.exports={title:"MediaSubscriptionTitle-title-1I857",secondaryTitle:"MediaSubscriptionTitle-secondaryTitle-1srwE"}},function(e,t){e.exports={
overlay:"EPGPosterCardOverlay-overlay-21AW0",background:"EPGPosterCardOverlay-background-nZkC7",link:"EPGPosterCardOverlay-link-hVinz",subscriptionBadge:"EPGPosterCardOverlay-subscriptionBadge-2DXam MetadataPosterCardOverlay-badge-1FU-p",subscriptionBadgeIcon:"EPGPosterCardOverlay-subscriptionBadgeIcon-2CSvd",progress:"EPGPosterCardOverlay-progress-2KBp3 PosterCardOverlayProgress-progress-16k0B",button:"EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",
recordButton:"EPGPosterCardOverlay-recordButton-hPelU RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",recordCoverButton:"EPGPosterCardOverlay-recordCoverButton-3QBBo EPGPosterCardOverlay-recordButton-hPelU RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",
recordCircle:"EPGPosterCardOverlay-recordCircle-fVDxD RecordButton-recordCircle-eTHvA PlayButton-playCircle-3Evfd MetadataPosterCardOverlay-centerCircle-1Mg-s",recordIcon:"EPGPosterCardOverlay-recordIcon-1-ns1 RecordButton-recordIcon-AeMqn",moreButton:"EPGPosterCardOverlay-moreButton-3owPW EPGPosterCardOverlay-button-1-wi- MetadataPosterCardOverlay-button-M43H-",isActionsMenuOpen:"EPGPosterCardOverlay-isActionsMenuOpen-1O_P2"}},function(e,t){e.exports={
cardContainer:"MetadataPosterCard-cardContainer-2gRcQ",card:"MetadataPosterCard-card-3bztR",isFlipped:"MetadataPosterCard-isFlipped-2lUII"}},function(e,t){e.exports={poster:"MetadataPosterCardFace-poster-L2P6r",face:"MetadataPosterCardFace-face--dz_D MetadataPosterCardFace-poster-L2P6r",isSelected:"MetadataPosterCardFace-isSelected-1XUgk",isOtherItemSelected:"MetadataPosterCardFace-isOtherItemSelected-z8NtN",faceFront:"MetadataPosterCardFace-faceFront-1bxHG",
faceBack:"MetadataPosterCardFace-faceBack-1ofDH"}},function(e,t){e.exports={placeholderIcon:"MetadataPosterCardIcon-placeholderIcon-2P76z"}},function(e,t){e.exports={overlay:"MetadataPosterCardOverlay-overlay-1uMpL",background:"MetadataPosterCardOverlay-background-2EwyB",link:"MetadataPosterCardOverlay-link-1Swhl",badge:"MetadataPosterCardOverlay-badge-1FU-p",versionBadge:"MetadataPosterCardOverlay-versionBadge-1cDAu MetadataPosterCardOverlay-badge-1FU-p",
versionBadgeIcon:"MetadataPosterCardOverlay-versionBadgeIcon-JkU8E",unwatchedBadge:"MetadataPosterCardOverlay-unwatchedBadge-Qn1fv MetadataPosterCardOverlay-badge-1FU-p",unwatchedTagContainer:"MetadataPosterCardOverlay-unwatchedTagContainer-1lcEn",unwatchedTag:"MetadataPosterCardOverlay-unwatchedTag-Fqazx MetadataPosterCardOverlay-unwatchedBadge-Qn1fv MetadataPosterCardOverlay-badge-1FU-p",progress:"MetadataPosterCardOverlay-progress-2voxf PosterCardOverlayProgress-progress-16k0B",
button:"MetadataPosterCardOverlay-button-M43H-",centerCircle:"MetadataPosterCardOverlay-centerCircle-1Mg-s",playButton:"MetadataPosterCardOverlay-playButton-1fjhk PlayButton-playButton-3WX8X MetadataPosterCardOverlay-button-M43H-",playCoverButton:"MetadataPosterCardOverlay-playCoverButton-I7oU3 MetadataPosterCardOverlay-playButton-1fjhk PlayButton-playButton-3WX8X MetadataPosterCardOverlay-button-M43H-",
playCircle:"MetadataPosterCardOverlay-playCircle-M67q6 PlayButton-playCircle-3Evfd MetadataPosterCardOverlay-centerCircle-1Mg-s",selectButton:"MetadataPosterCardOverlay-selectButton-3rwSV SelectButton-selectButton-3Kbjm MetadataPosterCardOverlay-button-M43H-",selectCircle:"MetadataPosterCardOverlay-selectCircle-3ql8S SelectButton-selectCircle-3tdvG",coverButton:"MetadataPosterCardOverlay-coverButton-2Dm9P",
selectCoverButton:"MetadataPosterCardOverlay-selectCoverButton-ukQUf MetadataPosterCardOverlay-coverButton-2Dm9P",deselectCoverButton:"MetadataPosterCardOverlay-deselectCoverButton-3mzek MetadataPosterCardOverlay-coverButton-2Dm9P",editButton:"MetadataPosterCardOverlay-editButton-7oR-Q MetadataPosterCardOverlay-button-M43H-",moreButton:"MetadataPosterCardOverlay-moreButton-3FK-K MetadataPosterCardOverlay-button-M43H-",isActionsMenuOpen:"MetadataPosterCardOverlay-isActionsMenuOpen-AvHIX",
isOtherItemSelected:"MetadataPosterCardOverlay-isOtherItemSelected-jneUT",hasActiveSelection:"MetadataPosterCardOverlay-hasActiveSelection-2pflV",refreshingCircle:"MetadataPosterCardOverlay-refreshingCircle-3Ebpe MetadataPosterCardOverlay-centerCircle-1Mg-s",trashCircle:"MetadataPosterCardOverlay-trashCircle-XoEoZ MetadataPosterCardOverlay-centerCircle-1Mg-s",isSelected:"MetadataPosterCardOverlay-isSelected-2muun",
isConflictingTypeSelected:"MetadataPosterCardOverlay-isConflictingTypeSelected-E8CIx",isModifierKeyPressed:"MetadataPosterCardOverlay-isModifierKeyPressed-2cmkd",isRefreshing:"MetadataPosterCardOverlay-isRefreshing-2cSpK",isTrash:"MetadataPosterCardOverlay-isTrash-1RTBu",refreshingSpinnerContainer:"MetadataPosterCardOverlay-refreshingSpinnerContainer-1ERDt",refreshingSpinner:"MetadataPosterCardOverlay-refreshingSpinner-ipJiy",refreshingIcon:"MetadataPosterCardOverlay-refreshingIcon-3dF55"}
},function(e,t){e.exports={placeholder:"MetadataPosterCardPlaceholder-placeholder-pMf-q MetadataPosterCardFace-poster-L2P6r",isSelected:"MetadataPosterCardPlaceholder-isSelected-34TSl MetadataPosterCardFace-isSelected-1XUgk",isOtherItemSelected:"MetadataPosterCardPlaceholder-isOtherItemSelected-3sjrF MetadataPosterCardFace-isOtherItemSelected-z8NtN"}},function(e,t){e.exports={title:"MetadataPosterTitle-title-3tU5F",isSecondary:"MetadataPosterTitle-isSecondary-2VUxY",
isSplitLeft:"MetadataPosterTitle-isSplitLeft-1zfWS",isSplitRight:"MetadataPosterTitle-isSplitRight-lf6Nx"}},function(e,t){e.exports={progress:"PosterCardOverlayProgress-progress-16k0B",progressTrack:"PosterCardOverlayProgress-progressTrack-3luzP",progressBar:"PosterCardOverlayProgress-progressBar-3k291"}},function(e,t){e.exports={card:"TagPosterCard-card-RVD0D MetadataPosterCardFace-poster-L2P6r"}},function(e,t){e.exports={container:"CriticRating-container-2t5Lw",
rating:"CriticRating-rating-1Ntfn",rt:"CriticRating-rt-Zm7_X",ratingImage:"CriticRating-ratingImage-1bHp5",imdb:"CriticRating-imdb-16xaH CriticRating-ratingImage-1bHp5",certified:"CriticRating-certified-hBNaw CriticRating-ratingImage-1bHp5",ripe:"CriticRating-ripe-1UFtI CriticRating-ratingImage-1bHp5",rotten:"CriticRating-rotten-33uVa CriticRating-ratingImage-1bHp5",spilled:"CriticRating-spilled-10bCO CriticRating-ratingImage-1bHp5",
upright:"CriticRating-upright-3nkvV CriticRating-ratingImage-1bHp5",other:"CriticRating-other-uJc1K CriticRating-ratingImage-1bHp5"}},function(e,t){e.exports={titleContainer:"MetadataTableTitle-titleContainer-3sPQC",title:"MetadataTableTitle-title-2WmEM",folderIconContainer:"MetadataTableTitle-folderIconContainer-3Tcvn MetadataTitleDecoratorIcon-decoratorIconContainer-3n0am",folderIcon:"MetadataTableTitle-folderIcon-1bAao MetadataTitleDecoratorIcon-decoratorIcon-sjuWW",
multiVersionIcon:"MetadataTableTitle-multiVersionIcon-1lcNL MetadataTitleDecoratorIcon-decoratorIcon-sjuWW"}},function(e,t){e.exports={separator:"MetadataTitleAirDate-separator-2i3bJ DashSeparator-separator-2a3yn"}},function(e,t){e.exports={titleContainer:"MetadataTitleCombinedTitleTrackArtist-titleContainer-4jblz",title:"MetadataTitleCombinedTitleTrackArtist-title-2YgMr",trackArtist:"MetadataTitleCombinedTitleTrackArtist-trackArtist-19qju"}},function(e,t){e.exports={
decoratorIconContainer:"MetadataTitleDecoratorIcon-decoratorIconContainer-3n0am",decoratorIcon:"MetadataTitleDecoratorIcon-decoratorIcon-sjuWW"}},function(e,t){e.exports={unwatchedCircle:"MetadataTitleMiniProgress-unwatchedCircle-235-S MetadataTitleProgress-unwatchedCircle-25KKn",partiallyWatchedCircle:"MetadataTitleMiniProgress-partiallyWatchedCircle-1V9BO MetadataTitleMiniProgress-unwatchedCircle-235-S MetadataTitleProgress-unwatchedCircle-25KKn"}},function(e,t){e.exports={
unwatchedCircle:"MetadataTitleProgress-unwatchedCircle-25KKn"}},function(e,t){e.exports={page:"Page-page-aq7i_"}},function(e,t){e.exports={pageContent:"PageContent-pageContent-16mK6",innerPageContent:"PageContent-innerPageContent-3ktLT"}},function(e,t){e.exports={pageHeader:"PageHeader-pageHeader-18RSw"}},function(e,t){e.exports={badge:"PageHeaderBadge-badge-sOmD-"}},function(e,t){e.exports={link:"PageHeaderBreadcrumbButton-link-1N0DD",
button:"PageHeaderBreadcrumbButton-button-1uaPj DisclosureArrowButton-disclosureArrowButton-3tbYZ"}},function(e,t){e.exports={pageHeaderCenter:"PageHeaderCenter-pageHeaderCenter-3Uq10"}},function(e,t){e.exports={pageHeaderDivider:"PageHeaderDivider-pageHeaderDivider-DvwUq"}},function(e,t){e.exports={pageHeaderLeft:"PageHeaderLeft-pageHeaderLeft-2TxSo"}},function(e,t){e.exports={pageHeaderRight:"PageHeaderRight-pageHeaderRight-2CT0g"}},function(e,t){e.exports={
pageHeaderSeparator:"PageHeaderSeparator-pageHeaderSeparator-221fi DashSeparator-separator-2a3yn"}},function(e,t){e.exports={sectionDetails:"AccountFormSection-sectionDetails-1fmdu CloseableFormSection-isPressable-3BPTn SettingsFormSectionDetails-sectionDetails-2rJ3j",label:"AccountFormSection-label-1BA6m FormLabel-label-1sr1f CloseableFormSection-isPressable-3BPTn",submitButton:"AccountFormSection-submitButton-2_-_v"}},function(e,t){e.exports={
avatarContainer:"AvatarEditor-avatarContainer-3eqle",isOverDropTarget:"AvatarEditor-isOverDropTarget-xHyXA",avatarPane:"AvatarEditor-avatarPane-ZIMdI",sliderContainer:"AvatarEditor-sliderContainer-1XP4N",sliderEnd:"AvatarEditor-sliderEnd-LMe5u",sliderWrapper:"AvatarEditor-sliderWrapper-2-DX7",slider:"AvatarEditor-slider-1DyFR Slider-slider-2oLVT",help:"AvatarEditor-help-9JA7x",avatarTextPane:"AvatarEditor-avatarTextPane-3QTnN",avatarActionButtons:"AvatarEditor-avatarActionButtons-29uxG",
avatarFileInput:"AvatarEditor-avatarFileInput-2RZv1"}},function(e,t){e.exports={formSection:"AudioSubtitleSettingsForm-formSection-2OFZr",submitButton:"AudioSubtitleSettingsForm-submitButton-fWGSg"}},function(e,t){e.exports={dashboardPageContent:"DashboardPage-dashboardPageContent-2rN8X PageContent-innerPageContent-3ktLT",attribution:"DashboardPage-attribution-3AsG5 GracenoteAttribution-attribution-16wMJ"}},function(e,t){e.exports={refreshingSpinner:"DashboardPageHeader-refreshingSpinner-1yk3F"}
},function(e,t){e.exports={emptyPage:"EmptyPage-emptyPage-2AM9u",content:"EmptyPage-content-10PgB",icon:"EmptyPage-icon-31D3Z",default:"EmptyPage-default-26GUD",primary:"EmptyPage-primary-1uNBT",success:"EmptyPage-success-zqYzQ",danger:"EmptyPage-danger-3-2M_",title:"EmptyPage-title-264Jp",description:"EmptyPage-description-oYWtW",footer:"EmptyPage-footer-2lE0T"}},function(e,t){e.exports={icon:"ErrorPage-icon-ZJ38x EmptyPage-icon-31D3Z"}},function(e,t){e.exports={
icon:"InnerErrorPage-icon-tWVPF ErrorPage-icon-ZJ38x EmptyPage-icon-31D3Z"}},function(e,t){e.exports={emptyPage:"InsecureFallbackChoicePage-emptyPage-3RqTd EmptyPage-emptyPage-2AM9u",content:"InsecureFallbackChoicePage-content-hP24c EmptyPage-content-10PgB",title:"InsecureFallbackChoicePage-title-fSQV1 EmptyPage-title-264Jp",description:"InsecureFallbackChoicePage-description-3qJXg EmptyPage-description-oYWtW",pmsLogo:"InsecureFallbackChoicePage-pmsLogo-rf-KR",
button:"InsecureFallbackChoicePage-button-Hd0hl"}},function(e,t){e.exports={emptyPage:"ServerDownloadRequiredPage-emptyPage-2rkKB EmptyPage-emptyPage-2AM9u",content:"ServerDownloadRequiredPage-content-CK6sE EmptyPage-content-10PgB",title:"ServerDownloadRequiredPage-title-3HyW3 EmptyPage-title-264Jp",description:"ServerDownloadRequiredPage-description-3LRBR EmptyPage-description-oYWtW",pmsLogo:"ServerDownloadRequiredPage-pmsLogo-RreDd",button:"ServerDownloadRequiredPage-button-1QeiU",
downloadMessage:"ServerDownloadRequiredPage-downloadMessage-sP7Ud"}},function(e,t){e.exports={updateLink:"ServerUpdateRequiredPage-updateLink-2Enej",updateDisabledLink:"ServerUpdateRequiredPage-updateDisabledLink-2AETO ServerUpdateRequiredPage-updateLink-2Enej"}},function(e,t){e.exports={container:"LibraryFilterBuilder-container-1ep_x",loadingContainer:"LibraryFilterBuilder-loadingContainer-c77Me LibraryFilterBuilder-container-1ep_x",footer:"LibraryFilterBuilder-footer-3W2q0",
settings:"LibraryFilterBuilder-settings-okmbX",checkInput:"LibraryFilterBuilder-checkInput-B0ck9 InlineInputGroupFormLabel-label-3avlL FormLabel-label-1sr1f",numberInput:"LibraryFilterBuilder-numberInput-1vwc6 InlineNumberInputGroup-input-DiEPr TextInput-input-34u_B input-input-2ol6B",buttons:"LibraryFilterBuilder-buttons-3PEDF",button:"LibraryFilterBuilder-button-36Leq Button-button--JvPI Link-link-2XYrU"}},function(e,t){e.exports={container:"LibraryFilterBuilderRow-container-2QVqa",
rules:"LibraryFilterBuilderRow-rules-3enme",rule:"LibraryFilterBuilderRow-rule-2bAya",tagsInput:"LibraryFilterBuilderRow-tagsInput-1zILx AutosuggestTagsInput-tagsInput-1wrGI TagsInput-tagsInput-3bbBk",textInput:"LibraryFilterBuilderRow-textInput-3yZ-z TextInput-input-34u_B input-input-2ol6B",unitTextInput:"LibraryFilterBuilderRow-unitTextInput-38LP9 UnitInput-textInput-QSuLW TextInput-input-34u_B input-input-2ol6B",
selectInput:"LibraryFilterBuilderRow-selectInput-gFMEG SelectInput-input-1WBUz input-input-2ol6B",value:"LibraryFilterBuilderRow-value-3DsOS",buttons:"LibraryFilterBuilderRow-buttons-3m5pt",iconButton:"LibraryFilterBuilderRow-iconButton-1L9m0",iconButtonDisabled:"LibraryFilterBuilderRow-iconButtonDisabled-1LPOD LibraryFilterBuilderRow-iconButton-1L9m0"}},function(e,t){e.exports={container:"LibraryFilterBuilderRowTag-container-2eCig",tag:"LibraryFilterBuilderRowTag-tag-3tEm1",
remove:"LibraryFilterBuilderRowTag-remove-3WifL TagLabel-remove-1aTjc",or:"LibraryFilterBuilderRowTag-or-2CPm8"}},function(e,t){e.exports={attribution:"LibraryPage-attribution-f51hr GracenoteAttribution-attribution-16wMJ"}},function(e,t){e.exports={jumpBar:"LibraryPageJumpBar-jumpBar-22VKU"}},function(e,t){e.exports={character:"LibraryPageJumpBarCharacter-character-2Hr4E"}},function(e,t){e.exports={
menuItemContainer:"DisclosureFilterMenuItem-menuItemContainer-umTpy SelectedMenuItem-menuItemContainer-7SpJZ",menuLabel:"DisclosureFilterMenuItem-menuLabel-3sWTg SelectedMenuItem-menuLabel-1tKeW",spinner:"DisclosureFilterMenuItem-spinner-k12hY Spinner-spinner-290-o spin-spin-2Ou6V",selectedIcon:"DisclosureFilterMenuItem-selectedIcon-1HwbQ SelectedMenuItem-selectedIcon-3S2cy",isSelected:"DisclosureFilterMenuItem-isSelected-3uWkO"}},function(e,t){e.exports={
header:"LibraryFilterOptionsList-header-JO56l",headerTitle:"LibraryFilterOptionsList-headerTitle-21Ewq",backIcon:"LibraryFilterOptionsList-backIcon-15GqT",filterText:"LibraryFilterOptionsList-filterText-ys_NH",searchInput:"LibraryFilterOptionsList-searchInput-3YaUS TextInput-input-34u_B input-input-2ol6B",filterOptionsScroller:"LibraryFilterOptionsList-filterOptionsScroller-1TXk8 Scroller-vertical-1bgGS",
filterOptionsWithSearchScroller:"LibraryFilterOptionsList-filterOptionsWithSearchScroller-3ARHU LibraryFilterOptionsList-filterOptionsScroller-1TXk8 Scroller-vertical-1bgGS",filterOptionMenuItem:"LibraryFilterOptionsList-filterOptionMenuItem-3bhER MenuItem-menuItem-25266",emptyText:"LibraryFilterOptionsList-emptyText-1SzoY"}},function(e,t){e.exports={filtersScroller:"LibraryFiltersList-filtersScroller-2-lmL Scroller-vertical-1bgGS"}},function(e,t){e.exports={
panesContainer:"LibraryFiltersMenu-panesContainer-2wE6-",pane:"LibraryFiltersMenu-pane-13lnR",filtersPane:"LibraryFiltersMenu-filtersPane-367id LibraryFiltersMenu-pane-13lnR",filterOptionsPane:"LibraryFiltersMenu-filterOptionsPane-sYfFI LibraryFiltersMenu-pane-13lnR",showFilterOptions:"LibraryFiltersMenu-showFilterOptions-PvLk-"}},function(e,t){e.exports={metadataListPageContent:"MetadataListPageContent-metadataListPageContent-s56y9 PageContent-pageContent-16mK6",
metadataListScroller:"MetadataListPageContent-metadataListScroller-1uFgY",hasGutter:"MetadataListPageContent-hasGutter-1EfyE",attribution:"MetadataListPageContent-attribution-3zY50"}},function(e,t){e.exports={divider:"MetadataListPageHeader-divider-1LM5c PageHeaderDivider-pageHeaderDivider-DvwUq"}},function(e,t){e.exports={toolbarContainer:"pageHeaderToolbar-toolbarContainer-2N-IJ Measure-container-2XznZ",toolbar:"pageHeaderToolbar-toolbar-1lW-M"}},function(e,t){e.exports={
carousel:"PhotoCarousel-carousel-3TeNY",headerButton:"PhotoCarousel-headerButton-MZJa8",playPauseButton:"PhotoCarousel-playPauseButton-2zjUG",header:"PhotoCarousel-header-3O4wu",message:"PhotoCarousel-message-e-3Vg",contents:"PhotoCarousel-contents-2Y0A_",navigationButton:"PhotoCarousel-navigationButton-SFWD1",action:"PhotoCarousel-action-3I90d"}},function(e,t){e.exports={lightbox:"PhotoPlayer-lightbox-3VxTH",player:"PhotoPlayer-player-2wW2-",content:"PhotoPlayer-content-29UTX",
main:"PhotoPlayer-main-NR-_L",mainFooter:"PhotoPlayer-mainFooter-1VPS3",aside:"PhotoPlayer-aside-VtXQc"}},function(e,t){e.exports={prePlayPageContentContainer:"PrePlayPageContent-prePlayPageContentContainer-1ckaM PageContent-pageContent-16mK6",prePlayPageContent:"PrePlayPageContent-prePlayPageContent-1fFCH"}},function(e,t){e.exports={pageHeader:"PrePlayPageHeader-pageHeader-2o14F PageHeader-pageHeader-18RSw",
altPageHeader:"PrePlayPageHeader-altPageHeader-3bZbS PrePlayPageHeader-pageHeader-2o14F PageHeader-pageHeader-18RSw",divider:"PrePlayPageHeader-divider-WQRk8 PageHeaderDivider-pageHeaderDivider-DvwUq",listStylesArrowsDivider:"PrePlayPageHeader-listStylesArrowsDivider-1OrTC PageHeaderDivider-pageHeaderDivider-DvwUq"}},function(e,t){e.exports={emptyContainer:"PrePlayPageHeaderSiblingsMenu-emptyContainer-zMrx0"}},function(e,t){e.exports={concert:"PrePlayConcert-concert-2d4lO",
concertCalendar:"PrePlayConcert-concertCalendar-1FILv",concertMonth:"PrePlayConcert-concertMonth-2qln2",concertDay:"PrePlayConcert-concertDay-zNEEh",concertDetails:"PrePlayConcert-concertDetails-_iXFv",concertTitle:"PrePlayConcert-concertTitle-2O-pN",concertLocation:"PrePlayConcert-concertLocation-3ltdC"}},function(e,t){e.exports={concerts:"PrePlayConcerts-concerts-3r-qi",concertsLogo:"PrePlayConcerts-concertsLogo-oF29R"}},function(e,t){e.exports={
popularTracksHubCell:"PrePlayPopularTracks-popularTracksHubCell-Q0N9b HubCell-hubCell-3Ys17"}},function(e,t){e.exports={imageContainer:"PrePlayArtwork-imageContainer-3dXG6"}},function(e,t){e.exports={separator:"PrePlayDashSeparator-separator-1d01z"}},function(e,t){e.exports={divider:"PrePlayDivider-divider-1qvbj"}},function(e,t){e.exports={content:"PrePlayMetadataContent-content-2ww3j"}},function(e,t){e.exports={innerContent:"PrePlayMetadataInnerContent-innerContent-1BPzw"}},function(e,t){
e.exports={face:"PrePlayPosterCard-face-3rQEj MetadataPosterCardFace-face--dz_D MetadataPosterCardFace-poster-L2P6r"}},function(e,t){e.exports={tagsListLink:"PrePlayTagList-tagsListLink-Z6lfX Link-link-2XYrU"}},function(e,t){e.exports={group:"PrePlayDetailsGroup-group-3i0Tj"}},function(e,t){e.exports={groupItem:"PrePlayDetailsGroupItem-groupItem-3Tut9",label:"PrePlayDetailsGroupItem-label-2Ee43",content:"PrePlayDetailsGroupItem-content-1aRNU"}},function(e,t){e.exports={
loadingMessage:"PrePlayDetailsStreamsGroup-loadingMessage-27_nd"}},function(e,t){e.exports={summary:"PrePlaySummary-summary-1NL8g"}},function(e,t){e.exports={recordButton:"EPGPrePlayRecordButton-recordButton-1Y_Dw PrePlayStatusButton-statusButton-28XJ7 Button-default-36soe",recordingIcon:"EPGPrePlayRecordButton-recordingIcon-15EDB",recordIcon:"EPGPrePlayRecordButton-recordIcon-3SHaD"}},function(e,t){e.exports={item:"EPGPrePlayEpisodeCell-item-31U2l",
recordButton:"EPGPrePlayEpisodeCell-recordButton-x7LVG RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X",alternateItem:"EPGPrePlayEpisodeCell-alternateItem-3QMpy EPGPrePlayEpisodeCell-item-31U2l",underlay:"EPGPrePlayEpisodeCell-underlay-28hJx",overlay:"EPGPrePlayEpisodeCell-overlay-2sL4Q",primaryTitle:"EPGPrePlayEpisodeCell-primaryTitle-p-Naw",secondaryTitle:"EPGPrePlayEpisodeCell-secondaryTitle-iTKpt",subscriptionIcon:"EPGPrePlayEpisodeCell-subscriptionIcon-14CJU",
nextAiringDate:"EPGPrePlayEpisodeCell-nextAiringDate-10Bif",separator:"EPGPrePlayEpisodeCell-separator-2LvFs",loadingItem:"EPGPrePlayEpisodeCell-loadingItem-2VkI2",alternateLoadingItem:"EPGPrePlayEpisodeCell-alternateLoadingItem-2KPtT EPGPrePlayEpisodeCell-loadingItem-2VkI2"}},function(e,t){e.exports={episodeCount:"EPGPrePlayEpisodeCountLeftTitle-episodeCount-1Ae4n EPGPrePlayStatusLeftTitle-duration-1W91h"}},function(e,t){e.exports={duration:"EPGPrePlayStatusLeftTitle-duration-1W91h"}
},function(e,t){e.exports={cardLink:"PrePlayCastCell-cardLink-Tndv5",titleContainer:"PrePlayCastCell-titleContainer-PAy29"}},function(e,t){e.exports={castList:"PrePlayCastList-castList-3dQB5"}},function(e,t){e.exports={descendantHubCell:"PrePlayDescendantList-descendantHubCell-X8QA4 HubCell-hubCell-3Ys17",descendantHubCellHeader:"PrePlayDescendantList-descendantHubCellHeader-2qK3U HubCellHeader-hubCellHeader-2pvYN",emptyContainer:"PrePlayDescendantList-emptyContainer-2Dx4y",
emptyMessage:"PrePlayDescendantList-emptyMessage-1ouul PrePlayDescendantList-emptyContainer-2Dx4y"}},function(e,t){e.exports={extrasHubCell:"PrePlayExtrasList-extrasHubCell-2NcGK HubCell-hubCell-3Ys17"}},function(e,t){e.exports={bottomDivider:"PrePlayListBottomDivider-bottomDivider-3XSnc PrePlayDivider-divider-1qvbj"}},function(e,t){e.exports={topDivider:"PrePlayListTopDivider-topDivider-3c8uz PrePlayDivider-divider-1qvbj"}},function(e,t){e.exports={
relatedList:"PrePlayRelatedList-relatedList-2fY8S",spinnerContainer:"PrePlayRelatedList-spinnerContainer-RG3Px"}},function(e,t){e.exports={leftTitle:"PrePlayLeftTitle-leftTitle-Ev1KG"}},function(e,t){e.exports={primaryTitle:"PrePlayPrimaryTitle-primaryTitle-1r9P9"}},function(e,t){e.exports={ratingRightTitle:"PrePlayRatingRightTitle-ratingRightTitle-1d4Yy PrePlayRightTitle-rightTitle-VxiwU",starRating:"PrePlayRatingRightTitle-starRating-31XbA",
criticRating:"PrePlayRatingRightTitle-criticRating-2J_tn"}},function(e,t){e.exports={rightTitle:"PrePlayRightTitle-rightTitle-VxiwU"}},function(e,t){e.exports={secondaryTitle:"PrePlaySecondaryTitle-secondaryTitle-YJRGC PrePlayPrimaryTitle-primaryTitle-1r9P9"}},function(e,t){e.exports={statusButton:"PrePlayStatusButton-statusButton-28XJ7 Button-default-36soe"}},function(e,t){e.exports={tertiaryTitle:"PrePlayTertiaryTitle-tertiaryTitle-1Rc92"}},function(e,t){e.exports={
tertiaryTitleSpacer:"PrePlayTertiaryTitleSpacer-tertiaryTitleSpacer-14zhL"}},function(e,t){e.exports={unavailableButton:"PrePlayUnavailableButton-unavailableButton-3dycr PrePlayStatusButton-statusButton-28XJ7 Button-default-36soe"}},function(e,t){e.exports={innerModalBody:"PersonalCloudServerChooseProviderModalBody-innerModalBody-2BJPU PersonalCloudServerModal-innerModalBody-wbNiQ ModalBody-innerModalBody-1eSxU",
providersButtonsSpinner:"PersonalCloudServerChooseProviderModalBody-providersButtonsSpinner-3yoJz",providerButtonsContainer:"PersonalCloudServerChooseProviderModalBody-providerButtonsContainer-3E_52",providerButtonsContainerNarrow:"PersonalCloudServerChooseProviderModalBody-providerButtonsContainerNarrow-2BXio PersonalCloudServerChooseProviderModalBody-providerButtonsContainer-3E_52",
vendorLogoButton:"PersonalCloudServerChooseProviderModalBody-vendorLogoButton-1rQcN Button-button--JvPI Link-link-2XYrU",vendorLogo:"PersonalCloudServerChooseProviderModalBody-vendorLogo-21lJX"}},function(e,t){e.exports={badge:"PremiereAiringBadge-badge-hAmdn"}},function(e,t){e.exports={schedulePageContent:"RecordingSchedulePageContent-schedulePageContent-2kZUq PageContent-pageContent-16mK6",
schedulePageInnerContent:"RecordingSchedulePageContent-schedulePageInnerContent-1wYEs PageContent-innerPageContent-3ktLT",emptyDescription:"RecordingSchedulePageContent-emptyDescription-2Oudl EmptyPage-description-oYWtW"}},function(e,t){e.exports={event:"AgendaEvent-event-1CGOu",isComplete:"AgendaEvent-isComplete-1Qgi-",hasError:"AgendaEvent-hasError-3_JkX",underlay:"AgendaEvent-underlay-3aB2_",overlay:"AgendaEvent-overlay-F0jvn",statusIcon:"AgendaEvent-statusIcon-2HvuT",
date:"AgendaEvent-date-14otD",isToday:"AgendaEvent-isToday-WyLYs",time:"AgendaEvent-time-1gWgj",title:"AgendaEvent-title-2XPt5",titleDetails:"AgendaEvent-titleDetails-1_26S",status:"AgendaEvent-status-3bBTH",recording:"AgendaEvent-recording-R38Vn",recordingProgressBackground:"AgendaEvent-recordingProgressBackground-3zpaH CircularProgressBar-circularProgressBarBackground-1a1VU",recordingIcon:"AgendaEvent-recordingIcon-2abV-"}},function(e,t){e.exports={
agendaHeader:"AgendaHeader-agendaHeader-66Y_9"}},function(e,t){e.exports={calendar:"Calendar-calendar-231Oo"}},function(e,t){e.exports={day:"CalendarDay-day-1O4pX"}},function(e,t){e.exports={dayOfWeek:"CalendarDayOfWeek-dayOfWeek-3dQ59",isToday:"CalendarDayOfWeek-isToday-2rPYN"}},function(e,t){e.exports={calendarDays:"CalendarDays-calendarDays-2ORCe"}},function(e,t){e.exports={container:"CalendarDaysOfWeek-container-1MoYj"}},function(e,t){e.exports={
errorButton:"CalendarErrorButton-errorButton-1z8H1",errorTooltip:"CalendarErrorButton-errorTooltip-lo9O- Tooltip-middleRight-3n22h Tooltip-tooltip-2AL-W Tooltip-tooltipArrow-2yu7H Tooltip-tooltipLeftArrow-3yO_q Tooltip-tooltipMiddleAlignArrow-3RB_t"}},function(e,t){e.exports={event:"CalendarEvent-event-1N79n",isComplete:"CalendarEvent-isComplete-3BKnC",hasError:"CalendarEvent-hasError-2mgqY",underlay:"CalendarEvent-underlay-2LGTN",overlay:"CalendarEvent-overlay-3RDXN",
errorIcon:"CalendarEvent-errorIcon-3q6lK",title:"CalendarEvent-title-K5q2k",secondary:"CalendarEvent-secondary-2ufz9",secondaryInfo:"CalendarEvent-secondaryInfo-3pj4z",time:"CalendarEvent-time-sjVsB",status:"CalendarEvent-status-27k9Y",recording:"CalendarEvent-recording-1igLY",recordingProgressBackground:"CalendarEvent-recordingProgressBackground-1vuJU CircularProgressBar-circularProgressBarBackground-1a1VU",recordingIcon:"CalendarEvent-recordingIcon-3BTdu"}},function(e,t){e.exports={
calendarHeaderContainer:"CalendarHeader-calendarHeaderContainer-2f7fS",calendarHeader:"CalendarHeader-calendarHeader-moR_H",calendarNav:"CalendarHeader-calendarNav-rIR1k Link-link-2XYrU",calendarNavDisabled:"CalendarHeader-calendarNavDisabled-1bqai"}},function(e,t){e.exports={title:"CalendarHeaderTitle-title-15Pr3"}},function(e,t){e.exports={pane:"RecordingPriorityPane-pane-7ENL7",paneHeader:"RecordingPriorityPane-paneHeader-2HEZ3",
paneScroller:"RecordingPriorityPane-paneScroller-FXVrB Scroller-vertical-1bgGS",error:"RecordingPriorityPane-error-2oNO_"}},function(e,t){e.exports={subscription:"RecordingPrioritySubscription-subscription-sOfYq",link:"RecordingPrioritySubscription-link-2-ONe",linkContainer:"RecordingPrioritySubscription-linkContainer-35Li6",posterContainer:"RecordingPrioritySubscription-posterContainer-1ZjTK",titleContainer:"RecordingPrioritySubscription-titleContainer-2zfvG",
dragHandle:"RecordingPrioritySubscription-dragHandle-1KbYq Link-link-2XYrU",dragIcon:"RecordingPrioritySubscription-dragIcon-2zAik"}},function(e,t){e.exports={dragPreview:"RecordingPrioritySubscriptionDragPreview-dragPreview-3q037"}},function(e,t){e.exports={dragSource:"RecordingPrioritySubscriptionDragSource-dragSource-2qcUl"}},function(e,t){e.exports={seriesIcon:"RecordingPrioritySubscriptionSeriesTitle-seriesIcon-1yyj_"}},function(e,t){e.exports={
title:"RecordingPrioritySubscriptionTitle-title-3QS81",secondaryTitle:"RecordingPrioritySubscriptionTitle-secondaryTitle-2Wl5u"}},function(e,t){e.exports={searchPageContent:"SearchPageContent-searchPageContent-2qlNl DashboardPage-dashboardPageContent-2rN8X PageContent-innerPageContent-3ktLT"}},function(e,t){e.exports={spinner:"SearchPageHeader-spinner-1_DoE",separator:"SearchPageHeader-separator-C3ELo"}},function(e,t){e.exports={providerTitle:"SearchProviderHubs-providerTitle-3nGwS",
spinner:"SearchProviderHubs-spinner-1-T9U"}},function(e,t){e.exports={isPressable:"CloseableFormSection-isPressable-3BPTn",isClosed:"CloseableFormSection-isClosed-37Gj8 CloseableFormSection-isPressable-3BPTn",isOpen:"CloseableFormSection-isOpen-vvIoP"}},function(e,t){e.exports={sectionWrapper:"SettingsFormSection-sectionWrapper-1-gPg",section:"SettingsFormSection-section-1zYMP"}},function(e,t){e.exports={actionLinks:"SettingsFormSectionActionLinks-actionLinks-2vGv7"}},function(e,t){e.exports={
sectionDetails:"SettingsFormSectionDetails-sectionDetails-2rJ3j"}},function(e,t){e.exports={content:"SettingsPage-content-1vKVE PageContent-pageContent-16mK6"}},function(e,t){e.exports={header:"SettingsPageHeader-header-1ugtI"}},function(e,t){e.exports={spinnerContainer:"SettingsPageLoadingSpinner-spinnerContainer-oodfM"}},function(e,t){e.exports={measured:"TimelinePage-measured-3JDcK"}},function(e,t){e.exports={container:"TimelinePageContent-container-2lbp-",
stack:"TimelinePageContent-stack-2iWVF PageContent-pageContent-16mK6",adornment:"TimelinePageContent-adornment-1VLRt",scroller:"TimelinePageContent-scroller-3tS5J"}},function(e,t){e.exports={buttons:"WebhookFormSection-buttons-1bW9A",button:"WebhookFormSection-button-2hUeX",dangerButton:"WebhookFormSection-dangerButton-1Hm32",label:"WebhookFormSection-label-1llL2 FormLabel-label-1sr1f CloseableFormSection-isPressable-3BPTn"}},function(e,t){e.exports={buttons:"WebhooksSettingsPage-buttons-2wdUh"}
},function(e,t){e.exports={magazine:"Carousel-magazine-3uVoC",slide:"Carousel-slide-3M-F6",currentSlide:"Carousel-currentSlide-Kx0Q1 Carousel-slide-3M-F6"}},function(e,t){e.exports={controls:"PhotoControls-controls-27jO5",container:"PhotoControls-container-3dauW",textInput:"PhotoControls-textInput-2YEfr TextInput-input-34u_B input-input-2ol6B",textArea:"PhotoControls-textArea-39A6Y TextArea-textArea-1PnXt input-input-2ol6B",seekbar:"PhotoControls-seekbar-11wGS Slider-slider-2oLVT",
seekbarTrack:"PhotoControls-seekbarTrack-2OiQN Slider-track-28JOS",seekbarFill:"PhotoControls-seekbarFill-3Lr9t Slider-fill-35GFq",info:"PhotoControls-info-hudXh",title:"PhotoControls-title-2ngP3",summary:"PhotoControls-summary-2IK7Q",actions:"PhotoControls-actions-3onFK",actionButton:"PhotoControls-actionButton-3SbEO"}},function(e,t){e.exports={hub:"PhotoHub-hub-B86D9",container:"PhotoHub-container-1pCOR",body:"PhotoHub-body-3U47S",overlay:"PhotoHub-overlay-1RWaS",title:"PhotoHub-title-20_Uz",
count:"PhotoHub-count-voSbo",icon:"PhotoHub-icon-11n_K"}},function(e,t){e.exports={container:"PhotoHubList-container-1M6iA",title:"PhotoHubList-title-2OD6n",list:"PhotoHubList-list-3N1N5"}},function(e,t){e.exports={photoInformation:"PhotoInformation-photoInformation-3l-es Scroller-vertical-1bgGS",exif:"PhotoInformation-exif-3iTto",line:"PhotoInformation-line-h2JxB",split:"PhotoInformation-split-3Hr9q PhotoInformation-line-h2JxB",format:"PhotoInformation-format-HswtI"}},function(e,t){e.exports={
strip:"PhotoStrip-strip-xdrO9",thumbs:"PhotoStrip-thumbs-iX7QE",cell:"PhotoStrip-cell-hPM7j",thumbContainer:"PhotoStrip-thumbContainer-w_bQI",isSelected:"PhotoStrip-isSelected-2_Qqe",thumb:"PhotoStrip-thumb-3jVC8",thumbOverlay:"PhotoStrip-thumbOverlay-28y0e"}},function(e,t){e.exports={menuItemContainer:"PlayerAttributeMenu-menuItemContainer-3i81Y",menuLabel:"PlayerAttributeMenu-menuLabel-d6fRE",selectedIcon:"PlayerAttributeMenu-selectedIcon-3VFtA"}},function(e,t){e.exports={
slideContainer:"SlideImg-slideContainer-JBCXH",statusContainer:"SlideImg-statusContainer-39thR fadeIn-fadeIn-3S08e"}},function(e,t){e.exports={slideContainer:"SlideVideo-slideContainer-D17tm",statusContainer:"SlideVideo-statusContainer-WG0V_ fadeIn-fadeIn-3S08e",videoContainer:"SlideVideo-videoContainer-2TT6Z",videoElement:"SlideVideo-videoElement-28Zd4"}},function(e,t){e.exports={container:"QuickSearch-container-2PWkB"}},function(e,t){e.exports={hubTitle:"QuickSearchHub-hubTitle-AHFfv"}
},function(e,t){e.exports={container:"QuickSearchInput-container-R2-wn",focused:"QuickSearchInput-focused-2kpW8",searchIcon:"QuickSearchInput-searchIcon-1f6m9",closeIcon:"QuickSearchInput-closeIcon-3AV1c",searchInput:"QuickSearchInput-searchInput-2HU6-"}},function(e,t){e.exports={placeholder:"QuickSearchPlaceholder-placeholder-2Lsgt",isPlaceholderSelected:"QuickSearchPlaceholder-isPlaceholderSelected-2MXyq"}},function(e,t){e.exports={title:"QuickSearchProvider-title-1DX5M",
noResults:"QuickSearchProvider-noResults-2j7_9",spinnerContainer:"QuickSearchProvider-spinnerContainer-lhn2A",spinner:"QuickSearchProvider-spinner-2_uC9"}},function(e,t){e.exports={button:"QuickSearchResult-button-1ZHpO",title:"QuickSearchResult-title-1XJ-0",selected:"QuickSearchResult-selected-3xPnw",link:"QuickSearchResult-link-3JPgF",imageContainer:"QuickSearchResult-imageContainer-DvFlp",titles:"QuickSearchResult-titles-3kHPx",moreButton:"QuickSearchResult-moreButton-2Agbk",
moreIcon:"QuickSearchResult-moreIcon-UsTkI"}},function(e,t){e.exports={container:"QuickSearchResults-container-3IlHh"}},function(e,t){e.exports={titleContainer:"SearchTagPosterCell-titleContainer-2WMiU",imageContainer:"SearchTagPosterCell-imageContainer-244-T",imageLink:"SearchTagPosterCell-imageLink-GYb2j"}},function(e,t){e.exports={card:"QuickSearchMetadataPosterCard-card-3_XFi",playButton:"QuickSearchMetadataPosterCard-playButton-2pyyd PlayButton-playButton-3WX8X",
playCircle:"QuickSearchMetadataPosterCard-playCircle-2QZF3 PlayButton-playCircle-3Evfd",recordButton:"QuickSearchMetadataPosterCard-recordButton-USRPP RecordButton-recordButton-1BGta PlayButton-playButton-3WX8X",recordCircle:"QuickSearchMetadataPosterCard-recordCircle-vaOBe RecordButton-recordCircle-eTHvA PlayButton-playCircle-3Evfd"}},function(e,t){e.exports={card:"QuickSearchTagPosterCard-card-3RJG3 TagPosterCard-card-RVD0D MetadataPosterCardFace-poster-L2P6r"}},function(e,t){e.exports={
title:"QuickSearchTitle-title-2ApAO",isSecondary:"QuickSearchTitle-isSecondary-mxETF"}},function(e,t){e.exports={multiSelectPageHeader:"MultiSelectPageHeader-multiSelectPageHeader-MIQA1 PageHeader-pageHeader-18RSw",selectedTitle:"MultiSelectPageHeader-selectedTitle-1kn-x",deselectLink:"MultiSelectPageHeader-deselectLink-3Muvc",icon:"MultiSelectPageHeader-icon-3_oXi"}},function(e,t){e.exports={sidebar:"Sidebar-sidebar-e9phF",sidebarScroller:"Sidebar-sidebarScroller-2owup",
sidebarContent:"Sidebar-sidebarContent-3poA4"}},function(e,t){e.exports={sidebarLink:"SidebarLink-sidebarLink-3tOhK Link-default-32xSO",container:"SidebarLink-container-1wDcq",icon:"SidebarLink-icon-3AlP8",title:"SidebarLink-title-7WfGt",children:"SidebarLink-children-7pc_H",spinner:"SidebarLink-spinner-32O1M"}},function(e,t){e.exports={sidebarListHeader:"SidebarList-sidebarListHeader-m1Kth"}},function(e,t){e.exports={sidebarListItem:"SidebarListItem-sidebarListItem-3ijGg"}},function(e,t){
e.exports={personalCloudIcon:"ProvisionPersonalCloudServerMenuItem-personalCloudIcon-3BAU_ ServerMenuItem-serverMenuIcon-2zKCW"}},function(e,t){e.exports={serverMenu:"ServerMenu-serverMenu-6KNnX MenuContainer-menu-3Gtlw",serverMenuScroller:"ServerMenu-serverMenuScroller-1nSX6 Menu-menuScroller-E0NwY Scroller-vertical-1bgGS"}},function(e,t){e.exports={serverMenuButton:"ServerMenuButton-serverMenuButton-6jMk3",serverMenuButtonContainer:"ServerMenuButton-serverMenuButtonContainer-2kNrP",
serverMenuSpinner:"ServerMenuButton-serverMenuSpinner-3jGxB",serverMenuTitle:"ServerMenuButton-serverMenuTitle-cAqMG",serverMenuFriendlyNameContainer:"ServerMenuButton-serverMenuFriendlyNameContainer-SDbme",serverMenuFriendlyName:"ServerMenuButton-serverMenuFriendlyName-hzYb1",serverMenuUsername:"ServerMenuButton-serverMenuUsername-2nkDW",icon:"ServerMenuButton-icon-2yrbL"}},function(e,t){e.exports={secureIcon:"ServerMenuIcon-secureIcon-Xrgxg",alertIcon:"ServerMenuIcon-alertIcon-29qg7",
warningIcon:"ServerMenuIcon-warningIcon-2cI0i"}},function(e,t){e.exports={sidebarIconButton:"SidebarIconButton-sidebarIconButton-3zxa5"}},function(e,t){e.exports={actions:"SidebarLibrariesActions-actions-2eVPc",action:"SidebarLibrariesActions-action-1NiFy SidebarIconButton-sidebarIconButton-3zxa5",isVisible:"SidebarLibrariesActions-isVisible-k1QA0"}},function(e,t){e.exports={action:"SidebarLibraryItem-action-2AHiQ SidebarIconButton-sidebarIconButton-3zxa5",
libraryListItem:"SidebarLibraryItem-libraryListItem-2cmmj SidebarListItem-sidebarListItem-3ijGg",isVisible:"SidebarLibraryItem-isVisible-ynsb8"}},function(e,t){e.exports={spinnerContainer:"SidebarServerContent-spinnerContainer-1XVod",unclaimedIcon:"SidebarServerContent-unclaimedIcon-3-qUN"}},function(e,t){e.exports={librariesListHeader:"SidebarServerLibraries-librariesListHeader-33wsS SidebarList-sidebarListHeader-m1Kth",librariesTitle:"SidebarServerLibraries-librariesTitle-3iqmv"}
},function(e,t){e.exports={container:"UserSidebar-container-kfI4p"}},function(e,t){e.exports={personalCloudServerTitle:"PersonalCloudServerModal-personalCloudServerTitle-3B--X",header:"PersonalCloudServerModal-header-1gfrn ModalHeader-modalHeader-IGRia",innerModalBody:"PersonalCloudServerModal-innerModalBody-wbNiQ ModalBody-innerModalBody-1eSxU",upsell:"PersonalCloudServerModal-upsell-1RaWE",upsellImage:"PersonalCloudServerModal-upsellImage-2OC3p",
upsellText:"PersonalCloudServerModal-upsellText-3KIFG",upsellPoint:"PersonalCloudServerModal-upsellPoint-3wbUp",findOutMore:"PersonalCloudServerModal-findOutMore-2wqwi",footer:"PersonalCloudServerModal-footer-12h4I ModalFooter-modalFooter-pJpOu"}},function(e,t){e.exports={feature:"PlexPassFeature-feature-227Do",featurePadding:"PlexPassFeature-featurePadding-3qxKL",featureImage:"PlexPassFeature-featureImage-1MQuZ",featureContainer:"PlexPassFeature-featureContainer-5yGpR",
featureTitle:"PlexPassFeature-featureTitle-cBOf4",featureDescription:"PlexPassFeature-featureDescription-2mgxr"}},function(e,t){e.exports={plexPassTitle:"PlexPassLiteModal-plexPassTitle-yydxI PlexPassModalContent-plexPassTitle-3B6zq",header:"PlexPassLiteModal-header-3v_OD PlexPassModalContent-header-2D-A9 ModalHeader-modalHeader-IGRia",body:"PlexPassLiteModal-body-X7IaQ PlexPassModalContent-body-3BSt2 ModalBody-innerModalBody-1eSxU",
footer:"PlexPassLiteModal-footer-iGi6c PlexPassModalContent-footer-15_IJ ModalFooter-modalFooter-pJpOu"}},function(e,t){e.exports={plexPassTitle:"PlexPassModalContent-plexPassTitle-3B6zq",header:"PlexPassModalContent-header-2D-A9 ModalHeader-modalHeader-IGRia",body:"PlexPassModalContent-body-3BSt2 ModalBody-innerModalBody-1eSxU",moreFeatures:"PlexPassModalContent-moreFeatures-2qv0-",footer:"PlexPassModalContent-footer-15_IJ ModalFooter-modalFooter-pJpOu",
planButton:"PlexPassModalContent-planButton-3JY2b",link:"PlexPassModalContent-link-3Xt-y",linkSeparator:"PlexPassModalContent-linkSeparator-2yiHh",spinnerContainer:"PlexPassModalContent-spinnerContainer-ytMIf",plansContainer:"PlexPassModalContent-plansContainer-2boTW",isPlansPending:"PlexPassModalContent-isPlansPending-SjJBD"}},function(e,t){e.exports={appear:"crossFadeTransition-appear-27UVR",enter:"crossFadeTransition-enter-2olCX",appearActive:"crossFadeTransition-appearActive-7pzlF",
enterActive:"crossFadeTransition-enterActive-20iYK",leave:"crossFadeTransition-leave-3KwKk",leaveActive:"crossFadeTransition-leaveActive-3J0Fz"}},function(e,t){e.exports={lineHeightMeasure:"TextRegion-lineHeightMeasure-1O0P2",content:"TextRegion-content-3siD4"}},,,,,,,,,,,,,function(e,t,n){e.exports=n.p+"common/img/backgrounds/noise.0e9cf16a17adb19690cd31312cdaa809.png"},function(e,t,n){e.exports=n.p+"common/img/backgrounds/preset-dark.5b95c8c24aab87067b69bca7ae11759a.png"},function(e,t,n){
e.exports=n.p+"common/img/backgrounds/preset-light.fce1a96aaadda47900f6fedf0a348ad1.png"},function(e,t,n){e.exports=n.p+"desktop/common/img/queue/bookmarklet-steps-ie.3cbda4e75b0dd0e186e0c24999ab0d1d.png"},function(e,t,n){e.exports=n.p+"desktop/common/img/queue/bookmarklet-steps.abc5147d9257f0ec59f7b2257db9cb8f.png"},function(e,t,n){e.exports=n.p+"desktop/common/img/queue/email-links.f1b12dd82ea85b39a4c0fa07dd6df095.png"},function(e,t,n){
e.exports=n.p+"desktop/common/mp3/null.2036f08ba858d37814b7f6982d26414a.mp3"},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<svg class="circle-progress-bar" version="1.1" xmlns="http://www.w3.org/2000/svg"> <circle fill="transparent"></circle> </svg> <div class="circle-progress-text"></div> '})},function(e,t){e.exports=function(){return""}},function(e,t){e.exports=function(){return""}
},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="video-player-image-overlays"></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s="";return s+='<div class="page-container '+(0,this.escapeExpression)((r=t&&t.styles,r=null==r||r===!1?r:r.pageContainer,
"function"==typeof r?r.apply(t):r))+'"></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s="",o=this.escapeExpression;return s+='<div class="sidebar-container '+o((r=t&&t.styles,r=null==r||r===!1?r:r.sidebarContainer,"function"==typeof r?r.apply(t):r))+'"></div> <div class="page-container '+o((r=t&&t.styles,r=null==r||r===!1?r:r.pageContainer,
"function"==typeof r?r.apply(t):r))+'"></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<button class="lyrics-btn btn-link dropdown-toggle hidden" data-toggle="dropdown" href="#lyrics-dropdown"> <i class="plex-icon-lyrics"></i> </button> <div class="lyrics-dropdown dropdown-menu pull-center"></div> '})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return(s=n.reason)?r=s.call(t,{hash:{},data:a}):(s=t&&t.reason,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+" "})},function(e,t){e.exports=function(){return""}},function(e,t){e.exports=function(){return""}},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<span class="loading loading-inline"></span> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return(s=n.text)?r=s.call(t,{hash:{},data:a}):(s=t&&t.text,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+" "})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<button class="timed-btn btn-link"> <i class="plex-icon-timer"></i> </button> <button class="prev-lyrics-btn btn-link"> <i class="plex-icon-triangle-left"></i> </button> <span class="lyrics-streams-index"></span> / <span class="lyrics-streams-length"></span> <button class="next-lyrics-btn btn-link"> <i class="plex-icon-triangle-right"></i> </button> <div class="vendor-logo vendor-logo-lyricfind"></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="lyrics-region"></div> <div class="lyrics-streams-region"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+=(0,this.escapeExpression)(i(n(0)).call(t,"Your mix will resume shortly",{hash:{},data:s}))+" "})},function(e,t){
e.exports=function(){return""}},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div id="content" class="scroll-container dark-scrollbar"></div> <div class="scroll-shadow transition-out"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r=""
;return r+="<p>"+g(i(n(0)).call(e,"Requirements",{hash:{},data:t}))+": ",a=e&&e.requirements,a=typeof a===m?a.apply(e):a,(a||0===a)&&(r+=a),r+="</p>"}function l(e,t){var n,i="";return i+="<p>",n=e&&e.info,n=typeof n===m?n.apply(e):n,(n||0===n)&&(i+=n),i+="</p>"}function u(e,t){var r,s=""
;return s+=' <div class="btn-group dropup download-server-btn-group"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> '+g(i(n(0)).call(e,"Download",{hash:{},data:t}))+' <span class="caret"></span> </button> <ul class="dropdown-menu"> ',r=a.each.call(e,e&&e.releases,{hash:{},inverse:v.noop,fn:v.program(6,c,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> </div> "}function c(e,t){var n,i=""
;return i+=' <li><a href="'+g((n=e&&e.url,typeof n===m?n.apply(e):n))+'" download class="download-btn">'+g((n=e&&e.label,typeof n===m?n.apply(e):n))+"</a></li> "}function d(e,t){var n,i="";return i+=' <div class="download-server-btn-group"> ',n=a.each.call(e,e&&e.releases,{hash:{},inverse:v.noop,fn:v.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function h(e,t){var n,i="";return i+=' <a href="'+g((n=e&&e.url,
typeof n===m?n.apply(e):n))+'" download class="btn btn-primary download-btn">'+g((n=e&&e.label,typeof n===m?n.apply(e):n))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g=this.escapeExpression,m="function",v=this;return f+='<div class="type-'+g((p=t&&t.type,typeof p===m?p.apply(t):p))+" platform-logo platform-"+g((p=t&&t.id,typeof p===m?p.apply(t):p))+'"></div> <h2><strong>'+g((p=t&&t.name,
typeof p===m?p.apply(t):p))+"</strong> "+g(i(n(0)).call(t,"Download",{hash:{},data:s}))+"</h2> <h5>"+g(i(n(0)).call(t,"Version",{hash:{},data:s}))+" "+g((p=t&&t.version,typeof p===m?p.apply(t):p))+"</h5> <h5>"+g(i(n(752)).call(t,t&&t.date,{hash:{},data:s}))+'</h5> <div class="more-info"> ',p=a.if.call(t,t&&t.requirements,{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+=" ",p=a.if.call(t,t&&t.info,{hash:{},inverse:v.noop,fn:v.program(3,l,s),data:s}),(p||0===p)&&(f+=p),
f+=" </div> ",p=a.if.call(t,t&&t.shouldUseDropup,{hash:{},inverse:v.program(8,d,s),fn:v.program(5,u,s),data:s}),(p||0===p)&&(f+=p),f+=" "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<button class="like-meh-btn btn-link"><i class="plex-icon-heart plex-icon-heart-empty"></i></button> <button class="dislike-btn btn-link"><i class="plex-icon-heart-strikethrough"></i></button> '})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"(Plex Pass)"}function l(e,t){var n,i="";return i+=' <p><span class="text-muted">Name:</span> '+p((n=e&&e.primaryServer,n=null==n||n===!1?n:n.friendlyName,typeof n===h?n.apply(e):n))+'</p> <p><span class="text-muted">URL:</span> '+p((n=e&&e.primaryServerUrl,
typeof n===h?n.apply(e):n))+'</p> <p><span class="text-muted">Version:</span> '+p((n=e&&e.primaryServer,n=null==n||n===!1?n:n.version,typeof n===h?n.apply(e):n))+'</p> <p><span class="text-muted">Token:</span> '+p((n=e&&e.primaryServer,n=null==n||n===!1?n:n.accessToken,typeof n===h?n.apply(e):n))+"</p> "}function u(e,t){return' <p><span class="text-muted">none</span></p> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h="function",p=this.escapeExpression,f=this
;return d+='<h3>Browser</h3> <p><span class="text-muted">Host:</span> '+p((c=t&&t.host,typeof c===h?c.apply(t):c))+'</p> <p><span class="text-muted">User Agent:</span> '+p((c=t&&t.userAgent,typeof c===h?c.apply(t):c))+'</p> <p><span class="text-muted">Name:</span> '+p((c=t&&t.browser,c=null==c||c===!1?c:c.name,typeof c===h?c.apply(t):c))+'</p> <p><span class="text-muted">Version:</span> '+p((c=t&&t.browser,c=null==c||c===!1?c:c.version,
typeof c===h?c.apply(t):c))+'</p> <p><span class="text-muted">Platform:</span> '+p((c=t&&t.browser,c=null==c||c===!1?c:c.platform,typeof c===h?c.apply(t):c))+'</p> <p><span class="text-muted">Mobile:</span> '+p(i(n(506)).call(t,(c=t&&t.browser,null==c||c===!1?c:c.mobile),{hash:{},data:s}))+'</p> <h3>User</h3> <p><span class="text-muted">Username:</span> '+p((c=t&&t.user,c=null==c||c===!1?c:c.username,typeof c===h?c.apply(t):c))+" ",c=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:f.noop,
fn:f.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='</p> <p><span class="text-muted">Email:</span> '+p((c=t&&t.user,c=null==c||c===!1?c:c.email,typeof c===h?c.apply(t):c))+'</p> <p><span class="text-muted">Token:</span> '+p((c=t&&t.user,c=null==c||c===!1?c:c.accessToken,typeof c===h?c.apply(t):c))+'</p> <h3>plex.tv</h3> <p><span class="text-muted">URL:</span> '+p((c=t&&t.cloudServerUrl,
typeof c===h?c.apply(t):c))+'</p> <p><span class="text-muted">Available:</span> '+p(i(n(506)).call(t,(c=t&&t.cloudServer,null==c||c===!1?c:c.available),{hash:{},data:s}))+'</p> <p><span class="text-muted">Authorized:</span> '+p(i(n(506)).call(t,(c=t&&t.cloudServer,null==c||c===!1?c:c.authorized),{hash:{},data:s}))+"</p> <h3>Primary Server</h3> ",c=a.if.call(t,t&&t.primaryServer,{hash:{},inverse:f.program(5,u,s),fn:f.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+=" "})},function(e,t){
e.exports=function(){return""}},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<textarea class="form-control">',(s=n.logs)?r=s.call(t,{hash:{},data:a}):(s=t&&t.logs,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+"</textarea> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <div class="remember-group checkbox"> <label class="control-label"> <input type="checkbox" id="remember" checked> '+c(i(n(0)).call(e,"Remember me",{hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this
;return u+='<div class="row"> <div class="col-sm-12"> <h2 class="sign-in-header"> <a class="sign-in-btn selected" href="#">'+c(i(n(0)).call(t,"Sign In",{hash:{},data:s}))+'</a> <span class="sign-in-header-divider">'+c(i(n(0)).call(t,"or",{hash:{},data:s}))+'</span> <a class="sign-up-btn" href="#">'+c(i(n(0)).call(t,"Sign Up",{hash:{},data:s}))+'</a> </h2> </div> </div> <div class="username-group form-group"> <label for="username" class="control-label"> '+c(i(n(0)).call(t,"Username",{hash:{},
data:s}))+' <span class="control-error">'+c(i(n(0)).call(t,"Required",{hash:{},data:s}))+'</span> </label> <input type="text" id="username" class="form-control" autocorrect="off" autocapitalize="off"> </div> <div class="email-group form-group"> <label for="email" class="control-label"> '+c(i(n(0)).call(t,"Email",{hash:{},data:s}))+' <span class="control-error">'+c(i(n(0)).call(t,"Required",{hash:{},data:s
}))+'</span> </label> <input type="text" id="email" class="form-control" autocorrect="off" autocapitalize="off"> </div> <div class="password-group form-group"> <label for="password" class="control-label"> '+c(i(n(0)).call(t,"Password",{hash:{},data:s}))+' <span class="control-error">'+c(i(n(0)).call(t,"Required",{hash:{},data:s
}))+'</span> </label> <input type="password" id="password" class="form-control"> </div> <div class="confirm-group form-group"> <label for="confirm" class="control-label"> '+c(i(n(0)).call(t,"Confirm Password",{hash:{},data:s}))+' <span class="control-error">'+c(i(n(0)).call(t,"Passwords do not match",{hash:{},data:s
}))+'</span> </label> <input type="password" id="confirm" class="form-control"> </div> <div class="age-disclaimer form-group"> '+c(i(n(0)).call(t,"By creating an account, you confirm that you have read and accept the {1}Terms and Conditions{2} and are at least 13 years old.",'<a href="https://plex.tv/terms" target="_blank">',"</a>",{hash:{},data:s
}))+' </div> <div class="form-footer"> <button type="submit" class="btn btn-lg btn-primary btn-loading pull-right"> <div class="loading loading-sm"></div> <span class="sign-in-label btn-label">'+c(i(n(0)).call(t,"Sign In",{hash:{},data:s}))+'</span> <span class="sign-up-label btn-label">'+c(i(n(0)).call(t,"Sign Up",{hash:{},data:s}))+"</span> </button> ",l=a.if.call(t,t&&t.showRememberMe,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=" </div> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <a class="btn-gray tv-mode-btn" href="#"> '+f(i(n(0)).call(e,"Enter TV Full Screen",{hash:{},data:t}))+' <i class="plex-icon-tv-mode-enter-560 tv-mode-icon"></i> </a> '}function l(e,t){return' <form id="user-account-form"></form> '}function u(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.showWhySignIn,{hash:{},inverse:g.program(8,d,t),
fn:g.program(6,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function c(e,t){var a="";return a+=" <p>"+f(i(n(0)).call(e,"You must be signed in for Plex to work properly. If you are not signed in:",{hash:{},data:t}))+'</p> <ul class="text-muted"> <li>'+f(i(n(0)).call(e,"Any connections between your media server and players WILL NOT BE SECURE",{hash:{},data:t}))+"</li> <li>"+f(i(n(0)).call(e,"You may experience degraded streaming performance",{hash:{},data:t
}))+"</li> <li>"+f(i(n(0)).call(e,"It will be more difficult, and sometimes impossible, to find your server and discover players",{hash:{},data:t}))+"</li> <li>"+f(i(n(0)).call(e,"You will not be able to access your media server from outside your home",{hash:{},data:t}))+"</li> <li>"+f(i(n(0)).call(e,"You will not be able to access content and many features provided by Plex",{hash:{},data:t
}))+'</li> </ul> <div class="skip-sign-in-container"> <p><button type="button" class="back-to-sign-in-btn btn btn-lg btn-primary">'+f(i(n(0)).call(e,"Sign In",{hash:{},data:t}))+'</button></p> <p><a class="skip-btn" href="#">'+f(i(n(0)).call(e,"Skip and accept limited functionality",{hash:{},data:t}))+"</a></p> </div> "}function d(e,t){var a="";return a+=' <div class="skip-sign-in-container"> <a class="why-sign-in-btn" href="#">'+f(i(n(0)).call(e,"What's this?",{hash:{},data:t}))+"</a> </div> "}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return h=a.if.call(t,t&&t.showTVMode,{hash:{},inverse:g.noop,fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="sign-in-logo text-center"> <i class="plex-image logo"></i> </div> <div class="row row-padded"> <div class="col-sm-6 col-sm-offset-3"> ',h=a.unless.call(t,t&&t.showWhySignIn,{hash:{},inverse:g.noop,fn:g.program(3,l,s),data:s}),(h||0===h)&&(p+=h),p+=" ",
h=a.if.call(t,t&&t.showSkip,{hash:{},inverse:g.noop,fn:g.program(5,u,s),data:s}),(h||0===h)&&(p+=h),p+=" </div> </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){var i,a="";return a+='<span class="star"><i class="star-icon glyphicon ',i=n.if.call(e,e,{hash:{},inverse:c.program(4,o,t),fn:c.program(2,s,t),data:t}),(i||0===i)&&(a+=i),a+='"></i><span class="empty-icon"></span></span>'}function s(e,t){return"star"}function o(e,t){
return"dislikes"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var l,u="",c=this;return l=n.each.call(t,t&&t.stars,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return p(i(n(0)).call(e,"Play",{hash:{},data:t}))}function l(e,t){return p(i(n(0)).call(e,"Play All",{hash:{},data:t}))}
function u(e,t){var a,r="";return r+=' <li><a class="download-btn secondary-only" href="'+p((a=e&&e.downloadUrl,typeof a===f?a.apply(e):a))+'" target="'+p((a=e&&e.defaultLinkTarget,typeof a===f?a.apply(e):a))+'" ',a=i(n(77)).call(e,e&&e.defaultLinkTarget,"_blank",{hash:{},inverse:g.noop,fn:g.program(6,c,t),data:t}),(a||0===a)&&(r+=a),r+=">"+p(i(n(0)).call(e,"Download",{hash:{},data:t}))+"</a></li> "}function c(e,t){var n,i="";return i+='download="'+p((n=e&&e.downloadName,
typeof n===f?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f="function",g=this;return h+='<ul class="nav action-bar-nav"> <li> <a class="play-btn btn-gray" href="#" title="',d=a.if.call(t,t&&t.isSingleItem,{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),
h+='" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-unwatched-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Play Unwatched",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Shuffle",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="play-trailer-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Play Trailer",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="plex-icon-play-strip"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Edit",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Add to playlist",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="refresh-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Refresh",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon repeat"></i></a> </li> <li> <a class="analyze-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Analyze",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon magic"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Mark as Watched",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Mark as Unwatched",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Select",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+p(i(n(0)).call(t,"Deselect All",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+p(i(n(0)).call(t,"Sync",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon download"></i></a> </li> <li> <a class="share-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Share",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon share"></i></a> </li> <li> <a class="recommend-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Recommend",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon share-alt"></i></a> </li> <li> <a class="delete-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="delete-from-user-playlist-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Delete",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="info-btn btn-gray secondary-action" href="#" title="'+p(i(n(0)).call(t,"Info",{hash:{},data:s
}))+'" data-toggle="tooltip"><i class="glyphicon circle-info"></i></a> </li> <li class="secondary-actions-dropdown dropdown"> <a class="more-btn btn-gray dropdown-toggle" href="#" data-toggle="dropdown"><i class="glyphicon more"></i></a> <ul class="dropdown-menu"> <li><a class="play-version-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Play Version...",{hash:{},data:s}))+'</a></li> <li><a class="play-all-btn secondary-only" href="#">',d=a.if.call(t,t&&t.isSingleItem,{hash:{},
inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+='</a></li> <li><a class="play-next-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Play Next",{hash:{},data:s}))+'</a></li> <li><a class="add-to-queue-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Add to Queue",{hash:{},data:s}))+'</a></li> <li class="secondary-divider divider"></li> <li><a class="convert-btn" href="#">'+p(i(n(0)).call(t,"Optimize...",{hash:{},data:s
}))+'</a></li> <li><a class="analyze-btn" href="#">'+p(i(n(0)).call(t,"Analyze",{hash:{},data:s}))+'</a></li> <li><a class="match-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Match",{hash:{},data:s}))+'</a></li> <li><a class="fix-match-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Fix Incorrect Match",{hash:{},data:s}))+'</a></li> <li><a class="unmatch-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Unmatch",{hash:{},data:s
}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Merge",{hash:{},data:s}))+'</a></li> <li><a class="split-apart-btn secondary-only" href="#">'+p(i(n(0)).call(t,"Split Apart",{hash:{},data:s}))+"</a></li> ",d=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:g.noop,fn:g.program(5,u,s),data:s}),(d||0===d)&&(h+=d),h+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+p(i(n(0)).call(t,"Watch Later",{hash:{},data:s
}))+'</a></li> <li><a class="share-btn" href="#">'+p(i(n(0)).call(t,"Share",{hash:{},data:s}))+'</a></li> <li><a class="recommend-btn" href="#">'+p(i(n(0)).call(t,"Recommend",{hash:{},data:s}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+p(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'</a></li> <li><a class="delete-versions-btn has-danger secondary-only" href="#">'+p(i(n(0)).call(t,"Delete Versions",{hash:{},data:s
}))+'</a></li> <li><a class="delete-from-user-playlist-btn has-danger" href="#">'+p(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'</a></li> <li><a class="info-btn" href="#">'+p(i(n(0)).call(t,"Info",{hash:{},data:s}))+"</a></li> </ul> </li> </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o=""
;return o+='<div class="action-bar"> <ul class="nav action-bar-nav"> <li> <a class="options-btn btn-gray" href="#" title="'+(0,this.escapeExpression)(i(n(0)).call(t,"Options",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> </ul> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this,d=this.escapeExpression;return u+='<ul class="nav nav-header pull-right"> <li class="alerts-nav-item"><a class="alerts-btn btn-gray ',l=i(n(20)).call(t,t&&t.subset,"alerts",{hash:{},inverse:c.noop,fn:c.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='" href="#!/status/alerts">'+d(i(n(0)).call(t,"Alerts",{hash:{},data:s}))+'</a></li> <li class="sync-nav-item"><a class="sync-btn btn-gray ',l=i(n(20)).call(t,t&&t.subset,"sync",{hash:{},
inverse:c.noop,fn:c.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='" href="#!/status/sync">'+d(i(n(0)).call(t,"Sync",{hash:{},data:s}))+'</a></li> <li class="conversion-nav-item"><a class="conversion-btn btn-gray ',l=i(n(20)).call(t,t&&t.subset,"conversion",{hash:{},inverse:c.noop,fn:c.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='" href="#!/status/conversion">'+d(i(n(0)).call(t,"Conversion",{hash:{},data:s
}))+'<span class="badge"></span></a></li> <li class="now-playing-nav-item"><a class="now-playing-btn btn-gray ',l=i(n(20)).call(t,t&&t.subset,"nowPlaying",{hash:{},inverse:c.noop,fn:c.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='" href="#!/status/playing">'+d(i(n(0)).call(t,"Now Playing",{hash:{},data:s}))+'<span class="badge"></span></a></li> </ul> <h2>'+d(i(n(0)).call(t,"Status",{hash:{},data:s}))+'</h2> <div class="activity-container"></div> '})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="filter-bar-right"> <span class="page-count">'+p(i(n(0)).call(e,"{1} of {2}",e&&e.page,e&&e.pages,{hash:{},data:t}))+'</span> <a class="previous-btn btn-gray ',r=a.unless.call(e,e&&e.enablePrevious,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(r||0===r)&&(s+=r),
s+='" href="#"> <i class="glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray ',r=a.unless.call(e,e&&e.enableNext,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#"> <i class="glyphicon chevron-right"></i> </a> </div> '}function l(e,t){return"disabled"}function u(e,t){var a=""
;return a+=' <div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h4 class="text-muted text-center">'+p(i(n(0)).call(e,"Alerts are restricted from shared users.",{hash:{},data:t}))+"</h4> </div> </div> "}function c(e,t){return' <div class="alert-list-container"></div> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f=this;return h+='<div class="filter-bar"> ',d=a.unless.call(t,t&&t.shared,{hash:{},inverse:f.noop,
fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" </div> ",d=a.if.call(t,t&&t.shared,{hash:{},inverse:f.program(6,c,s),fn:f.program(4,u,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="filter-bar-right"> <button class="pause-btn btn btn-sm btn-default ',r=a.if.call(e,e&&e.isPaused,{hash:{},inverse:g.noop,
fn:g.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='">'+m(i(n(0)).call(e,"Pause",{hash:{},data:t}))+'</button> <button class="resume-btn btn btn-sm btn-primary ',r=a.unless.call(e,e&&e.isPaused,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='">'+m(i(n(0)).call(e,"Resume",{hash:{},data:t}))+"</button> </div> "}function l(e,t){return"hidden"}function u(e,t){var a,r=""
;return r+=' <p class="conversion-error-message"><i class="conversion-error-icon glyphicon circle-exclamation-mark text-danger"></i> '+m((a=e&&e.errorMessage,typeof a===v?a.apply(e):a))+" "+m(i(n(0)).call(e,"Check the status in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",e&&e.serverID,{hash:{},data:t}))+"</p> "}function c(e,t){var a=""
;return a+=' <p class="conversion-status-message">'+m(i(n(0)).call(e,"Manage your completed conversions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",e&&e.serverID,{hash:{},data:t}))+"</p> "}function d(e,t){var n,i="";return i+=' <div class="conversion-queue-empty-region"></div> <div class="conversion-queue-up-next-list-region"></div> <hr class="conversion-queue-divider ',n=a.unless.call(e,e&&e.shouldShowDivider,{hash:{},inverse:g.noop,
fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+='"> <div class="conversion-queue-after-up-next-list-region"></div> '}function h(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center"> '+m(i(n(0)).call(e,"This requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" </h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g=this,m=this.escapeExpression,v="function"
;return f+='<div class="conversion-filter-bar filter-bar"> ',p=a.if.call(t,t&&t.hasPausedSetting,{hash:{},inverse:g.noop,fn:g.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+=" </div> ",p=a.if.call(t,t&&t.errorMessage,{hash:{},inverse:g.program(6,c,s),fn:g.program(4,u,s),data:s}),(p||0===p)&&(f+=p),f+=" ",p=a.if.call(t,t&&t.shouldShowList,{hash:{},inverse:g.program(10,h,s),fn:g.program(8,d,s),data:s}),(p||0===p)&&(f+=p),f+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <div class="sessions-list-container"></div> '}function l(e,t){var n,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center"> ',n=a.if.call(e,e&&e.shared,{hash:{},inverse:m.program(6,c,t),fn:m.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=" </h4> </div> "}function u(e,t){var a="";return a+=" "+g(i(n(0)).call(e,"Now Playing is restricted from shared users.",{hash:{},data:t}))+" "}
function c(e,t){var n;return n=a.if.call(e,e&&e.synced,{hash:{},inverse:m.program(9,h,t),fn:m.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var a="";return a+=" "+g(i(n(0)).call(e,"Now Playing is unavailable with synced servers.",{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=" "+g(i(n(0)).call(e,"Now Playing requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var p,f="",g=this.escapeExpression,m=this;return f+='<div class="filter-bar"></div> ',p=a.if.call(t,t&&t.shouldShowList,{hash:{},inverse:m.program(3,l,s),fn:m.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o=""
;return o+='<div class="row row-loading"> <div class="loading loading-inline"></div> </div> <div class="sync-empty-message row row-padded hidden"> <h4 class="text-muted text-center"> '+(0,this.escapeExpression)(i(n(0)).call(t,"Nothing is synced to this device.",{hash:{},data:s}))+' </h4> </div> <div class="sync-device-message row hidden"> <h4 class="sync-device-message-text text-muted text-center"></h4> </div> <div class="sync-item-list-container"></div> '})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return'<a class="edit-btn btn-gray" href="#"><i class="glyphicon pencil"></i></a>'}function l(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.devices,{hash:{},inverse:C.program(14,g,t),fn:C.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var n,i="";return i+=' <div class="row"> <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',
n=a.each.call(e,e&&e.devices,{hash:{},inverse:C.noop,fn:C.programWithDepth(5,c,t,e),data:t}),(n||0===n)&&(i+=n),i+=' </ul> </div> <div class="sync-device-container col-sm-8 col-md-9"></div> </div> '}function c(e,t,r){var s,o="";return o+=' <li> <a class="card btn-gray ',s=i(n(20)).call(e,(s=r&&r.selectedDevice,null==s||s===!1?s:s.id),e&&e.id,{hash:{},inverse:C.noop,fn:C.program(6,d,t),data:t}),(s||0===s)&&(o+=s),o+='" data-id="'+M((s=e&&e.id,typeof s===w?s.apply(e):s))+'" href="#"> ',
s=a.if.call(e,e&&e.name,{hash:{},inverse:C.program(10,p,t),fn:C.program(8,h,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:C.noop,fn:C.program(12,f,t),data:t}),(s||0===s)&&(o+=s),o+=" </a> </li> "}function d(e,t){return"selected"}function h(e,t){var n;return M((n=e&&e.name,typeof n===w?n.apply(e):n))}function p(e,t){var n;return M((n=e&&e.device,typeof n===w?n.apply(e):n))}function f(e,t){
return'<i class="cloud-sync-icon glyphicon cloud"></i><button class="cloud-sync-settings-btn btn-link btn-gray"><i class="glyphicon cogwheel"></i></button>'}function g(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+M(i(n(0)).call(e,"You have no sync capable devices.",{hash:{},data:t}))+"</h4> </div> "}function m(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.sync,{hash:{},inverse:C.program(20,b,t),fn:C.program(17,v,t),data:t}),(n||0===n)&&(i+=n),
i+=" "}function v(e,t){var n,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+M((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.message,typeof n===w?n.apply(e):n))+'</h4> <p class="text-center ',n=a.unless.call(e,(n=e&&e.plexPassInfo,null==n||n===!1?n:n.showButton),{hash:{},inverse:C.noop,fn:C.program(18,y,t),data:t}),(n||0===n)&&(i+=n),i+='"> <a class="btn btn-sm btn-primary" href="'+M((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.url,
typeof n===w?n.apply(e):n))+'" target="'+M((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.target,typeof n===w?n.apply(e):n))+'">'+M((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.buttonText,typeof n===w?n.apply(e):n))+"</a> </p> </div> "}function y(e,t){return"hidden"}function b(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+M(i(n(0)).call(e,"This server does not support sync.",{hash:{},data:t}))+"</h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var S,I="",w="function",M=this.escapeExpression,C=this;return I+='<div class="filter-bar"> <div class="filter-bar-right"> ',S=a.if.call(t,t&&t.hasTouchScreen,{hash:{},inverse:C.noop,fn:C.program(1,o,s),data:s}),(S||0===S)&&(I+=S),I+=' <a class="refresh-btn btn-gray" href="#"><i class="glyphicon repeat"></i></a> </div> </div> ',S=a.if.call(t,t&&t.allowSync,{hash:{},inverse:C.program(16,m,s),fn:C.program(3,l,s),data:s}),(S||0===S)&&(I+=S),I+=" "})
},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">',(s=n.message)?r=s.call(t,{hash:{},data:a}):(s=t&&t.message,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+"</span> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"circle-ok"}function l(e,t){return"circle-exclamation-mark"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this;return c+='<button class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <i class="alert-icon glyphicon ',u=i(n(20)).call(t,t&&t.type,"success",{hash:{},inverse:d.program(3,l,s),fn:d.program(1,o,s),data:s}),
(u||0===u)&&(c+=u),c+='"></i> <h4>',u=t&&t.message,u="function"==typeof u?u.apply(t):u,(u||0===u)&&(c+=u),c+="</h4> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <a class="info-link link" href="'+d((a=e&&e.url,typeof a===c?a.apply(e):a))+'" target="_blank">'+d(i(n(0)).call(e,"More Info",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+d((l=t&&t.content,typeof l===c?l.apply(t):l))+"</span> ",l=a.if.call(t,t&&t.url,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <span class="message">'+d(i(n(0)).call(e,"An insecure media server has been found on your network.",{hash:{},data:t}))+'</span> <a class="reload-link link" href="#">'+d(i(n(0)).call(e,"Reload app insecurely",{hash:{},data:t}))+"</a> "}function l(e,t){var a="";return a+=' <span class="message">'+d(i(n(0)).call(e,"An unclaimed media server has been found on your network.",{hash:{},data:t
}))+'</span> <a class="claim-link link" href="#">'+d(i(n(0)).call(e,"Claim it now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return c+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> ',u=a.if.call(t,t&&t.showInsecureMessage,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+u(i(n(0)).call(t,"A new TV tuner ({tunerModel}) has been found! Plex DVR is the easiest way to record your favorite shows!",{hash:{tunerModel:t&&t.model},data:s
}))+'</span> <a class="setup-link link" href="#!/settings/server/'+u((o=t&&t.encodedMachineIdentifier,"function"==typeof o?o.apply(t):o))+'/dvr">'+u(i(n(0)).call(t,"Learn more",{hash:{},data:s}))+"</a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <a class="download-link link" href="#">'+p(i(n(0)).call(e,"Download now",{hash:{},data:t}))+"</a> "}function l(e,t){var a
;return a=i(n(20)).call(e,e&&e.state,"downloaded",{hash:{},inverse:g.program(6,c,t),fn:g.program(4,u,t),data:t}),a||0===a?a:""}function u(e,t){var a="";return a+=' <a class="install-link link" href="#">'+p(i(n(0)).call(e,"Install now",{hash:{},data:t}))+"</a> "}function c(e,t){var a,r="";return r+=' <a class="link" href="'+p((a=e&&e.downloadURL,typeof a===f?a.apply(e):a))+'" target="_blank">'+p(i(n(0)).call(e,"Download now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f="function",g=this;return h+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message"> '+p((d=t&&t.serverUpdateAvailableMessage,typeof d===f?d.apply(t):d))+' <span class="server-update-message-version">'+p((d=t&&t.version,typeof d===f?d.apply(t):d))+'</span> </span> <span class="server-update-links"> ',d=i(n(20)).call(t,t&&t.state,"available",{hash:{},
inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=' <a class="link skip-version-link" href="#">'+p(i(n(0)).call(t,"Skip this version",{hash:{},data:s}))+"</a> </span> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<i class="alert-icon glyphicon cardio"></i> <span class="status"></span> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return'<a class="settings-btn btn-gray" href="#"><i class="glyphicon cogwheel"></i></a>'}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this,h=this.escapeExpression;return c+='<div class="breadcrumb-actions pull-right"> ',u=a.if.call(t,t&&t.showSettings,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),
c+=' <span id="channel-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#channel-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="media-tile-list" href="#">'+h(i(n(0)).call(t,"Posters",{hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(77)).call(t,t&&t.listType,"media-tile-list",{hash:{},
inverse:d.noop,fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+h(i(n(0)).call(t,"Details",{hash:{},data:s}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(77)).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+h(i(n(0)).call(t,"List",{hash:{},data:s
}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(77)).call(t,t&&t.listType,"media-list",{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"><a href="'+h((u=t&&t.channelUrl,"function"==typeof u?u.apply(t):u))+'">'+h((u=t&&t.channelTitle,"function"==typeof u?u.apply(t):u))+'</a></span> <span class="breadcrumb-subset-dropdown ',u=a.unless.call(t,t&&t.title,{hash:{},inverse:d.noop,
fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='"><span class="dropdown-placeholder">'+h((u=t&&t.title,"function"==typeof u?u.apply(t):u))+'</span></span> <span class="list-badge badge badge-lg">'+h((u=t&&t.totalSize,"function"==typeof u?u.apply(t):u))+"</span> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r=""
;return r+=' <span id="section-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="episode-tile-list" href="#">'+v(i(n(0)).call(e,"Posters",{hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=i(n(77)).call(e,e&&e.listType,"episode-tile-list",{
hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+='"></i></a></li> <li><a class="list-btn" data-type="episode-details-list" href="#">'+v(i(n(0)).call(e,"Details",{hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=i(n(77)).call(e,e&&e.listType,"episode-details-list",{hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+='"></i></a></li> <li><a class="list-btn" data-type="episode-list" href="#">'+v(i(n(0)).call(e,"List",{hash:{},
data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=i(n(77)).call(e,e&&e.listType,"episode-list",{hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+='"></i></a></li> </ul> </span> '}function l(e,t){return"hidden"}function u(e,t){var n,i="";return i+=' <span id="section-dropdown" class="details-breadcrumb dropdown"> ',n=a.if.call(e,e&&e.section,{hash:{},inverse:y.program(7,d,t),fn:y.program(5,c,t),data:t}),(n||0===n)&&(i+=n),
i+=' <a class="btn-gray dropdown-toggle split-dropdown-toggle" href="#section-dropdown" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',n=a.if.call(e,e&&e.showPlaylists,{hash:{},inverse:y.noop,fn:y.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.sections,{hash:{},inverse:y.noop,fn:y.programWithDepth(12,f,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> </span> "}function c(e,t){var n,i=""
;return i+=' <a class="section-btn btn-gray" data-key="'+v((n=e&&e.section,n=null==n||n===!1?n:n.key,typeof n===b?n.apply(e):n))+'" href="#">'+v((n=e&&e.section,n=null==n||n===!1?n:n.title,typeof n===b?n.apply(e):n))+"</a> "}function d(e,t){var a="";return a+=' <a class="playlists-btn btn-gray" href="#">'+v(i(n(0)).call(e,"Playlists",{hash:{},data:t}))+"</a> "}function h(e,t){var r,s=""
;return s+=' <li><a class="playlists-btn" href="#"><span class="dropdown-truncated-label">'+v(i(n(0)).call(e,"Playlists",{hash:{},data:t}))+"</span>",r=a.unless.call(e,(r=e&&e.section,null==r||r===!1?r:r.key),{hash:{},inverse:y.noop,fn:y.program(10,p,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function p(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function f(e,t,a){var r,s="";return s+=' <li><a class="section-btn" data-key="'+v((r=e&&e.key,
typeof r===b?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+v((r=e&&e.title,typeof r===b?r.apply(e):r))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',r=i(n(77)).call(e,(r=a&&a.section,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:y.noop,fn:y.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='"></i></a></li> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y=this,b="function"
;return m+='<div class="breadcrumb-actions pull-right"> ',g=a.if.call(t,t&&t.listType,{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=' <a class="previous-btn btn-gray hidden" href="#"><i class="glyphicon chevron-left"></i></a> <a class="next-btn btn-gray hidden" href="#"><i class="glyphicon chevron-right"></i></a> </div> ',g=a.if.call(t,t&&t.showSectionDropdown,{hash:{},inverse:y.noop,fn:y.program(4,u,s),data:s}),(g||0===g)&&(m+=g),
m+=' <span class="grandparent-item hidden"></span> <span class="parents-dropdown hidden"></span> <span class="siblings-dropdown hidden"></span> <span class="current-item hidden"></span> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <span id="section-actions-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-actions-dropdown" data-toggle="dropdown"><i class="glyphicon cogwheel"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="import-btn" href="#">'+c(i(n(0)).call(e,"Import from iTunes",{hash:{},data:t}))+"</a></li> </ul> </span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var l,u="",c=this.escapeExpression,d=this;return u+='<div class="breadcrumb-actions pull-right"> ',l=a.if.call(t,t&&t.canImportPlaylists,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=' </div> <span class="breadcrumb-dropdown"></span> <span class="breadcrumb-subset-dropdown"></span> <span class="breadcrumb-items-dropdown"> <span class="items-badge badge badge-lg">'+c((l=t&&t.totalSize,"function"==typeof l?l.apply(t):l))+"</span> </span> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){var r,s="";return s+=' <li><a class="card btn-gray ',r=i(n(20)).call(e,a&&a.currentKey,e&&e.key,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#!/server/'+h(i(n(85)).call(e,a&&a.serverID,{hash:{},data:t}))+"/directory/"+h(i(n(85)).call(e,e&&e.key,{hash:{},data:t}))+'">'+h(i(n(0)).call(e,e&&e.title,{hash:{},data:t
}))+"</a></li> "}function l(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this,h=this.escapeExpression;return c+="<h2>"+h(i(n(0)).call(t,"Channel Directory",{hash:{},data:s}))+'</h2> <div class="filter-bar"> <a class="btn btn-sm btn-default pull-right" href="#!/server/'+h(i(n(85)).call(t,t&&t.serverID,{hash:{},data:s}))+'/channels">'+h(i(n(0)).call(t,"Browse Channels",{hash:{},data:s
}))+'</a> </div> <div class="row"> <div class="col-md-3"> <ul class="nav nav-cards"> ',u=a.each.call(t,t&&t.directories,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,o,s,t),data:s}),(u||0===u)&&(c+=u),c+=' </ul> </div> <div class="directory-container col-md-9"></div> </div> '})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i=""
;return i+='<span class="badge">'+g((n=e&&e.allCount,typeof n===f?n.apply(e):n))+"</span>"}function l(e,t){var n,i="";return i+='<span class="badge">'+g((n=e&&e.videoCount,typeof n===f?n.apply(e):n))+"</span>"}function u(e,t){var n,i="";return i+='<span class="badge">'+g((n=e&&e.musicCount,typeof n===f?n.apply(e):n))+"</span>"}function c(e,t){var n,i="";return i+='<span class="badge">'+g((n=e&&e.photoCount,typeof n===f?n.apply(e):n))+"</span>"}function d(e,t){var a=""
;return a+=' <div class="filter-bar"> <a class="btn btn-sm btn-primary pull-right" href="#!/server/'+g(i(n(85)).call(e,e&&e.serverID,{hash:{},data:t}))+'/directory">'+g(i(n(0)).call(e,"Install Channels",{hash:{},data:t}))+'</a> <a class="check-updates-btn btn btn-sm btn-default btn-loading" href="#"> <div class="loading loading-sm"></div> <span class="btn-label">'+g(i(n(0)).call(e,"Check for Updates",{hash:{},data:t}))+"</span> </a> </div> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var h,p="",f="function",g=this.escapeExpression,m=this;return p+='<ul class="nav nav-header pull-right"> <li><a class="all-btn btn-gray selected" href="#">'+g(i(n(0)).call(t,"All",{hash:{},data:s})),h=a.if.call(t,t&&t.allCount,{hash:{},inverse:m.noop,fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+='</a></li> <li><a class="video-btn btn-gray" href="#">'+g(i(n(0)).call(t,"Video",{hash:{},data:s})),h=a.if.call(t,t&&t.videoCount,{hash:{},inverse:m.noop,
fn:m.program(3,l,s),data:s}),(h||0===h)&&(p+=h),p+='</a></li> <li><a class="music-btn btn-gray" href="#">'+g(i(n(0)).call(t,"Music",{hash:{},data:s})),h=a.if.call(t,t&&t.musicCount,{hash:{},inverse:m.noop,fn:m.program(5,u,s),data:s}),(h||0===h)&&(p+=h),p+='</a></li> <li><a class="photo-btn btn-gray" href="#">'+g(i(n(0)).call(t,"Photo",{hash:{},data:s})),h=a.if.call(t,t&&t.photoCount,{hash:{},inverse:m.noop,fn:m.program(7,c,s),data:s}),(h||0===h)&&(p+=h),
p+="</a></li> </ul> <h2>"+g(i(n(0)).call(t,"Channels",{hash:{},data:s}))+"</h2> ",h=a.unless.call(t,t&&t.shared,{hash:{},inverse:m.noop,fn:m.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="channels-container"></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){
return' <a class="media-poster-container play-btn" href="#"> <div class="album-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> '}function s(e,t){return' <div class="album-poster item-poster media-poster"></div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",c=this.escapeExpression,d=this
;return u+='<div class="details-title-container"> <h1><a class="artist-title btn-metadata-link" href="#!/server/',(l=n.serverID)?o=l.call(t,{hash:{},data:a}):(l=t&&t.serverID,o="function"==typeof l?l.call(t,{hash:{},data:a}):l),u+=c(o)+"/details/",(l=n.parentKey)?o=l.call(t,{hash:{},data:a}):(l=t&&t.parentKey,o="function"==typeof l?l.call(t,{hash:{},data:a}):l),
u+=c(o)+'"></a></h1> <h2 class="album-title"></h2> <h3 class="item-year"></h3> </div> <div class="details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> <span class="rating-container rating-container-inline"></span> </p> <div class="summary-container"></div> <div class="track-list-container details-list-region"></div> </div> <div class="details-poster-container"> ',o=n.if.call(t,t&&t.canPlay,{hash:{},
inverse:d.program(3,s,a),fn:d.program(1,r,a),data:a}),(o||0===o)&&(u+=o),u+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){
return' <a class="media-poster-container play-btn" href="#"> <div class="artist-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> '}function l(e,t){return' <div class="artist-poster item-poster media-poster"></div> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this
;return c+='<div class="details-title-container"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container"> <div class="artist-details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> </p> <div class="summary-container"></div> </div> <div class="popular-tracks-region hidden"> <h3 class="popular-tracks-header">'+d(i(n(0)).call(t,"Popular Tracks",{hash:{},data:s
}))+'</h3> </div> <div class="albums-region details-list-region"> <h3 class="albums-header">'+d(i(n(0)).call(t,"Albums",{hash:{},data:s}))+'</h3> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+d(i(n(0)).call(t,"Music Videos",{hash:{},data:s}))+'</h3> </div> <div class="concert-region hidden"> <h3 class="concert-header"> '+d(i(n(0)).call(t,"On Tour",{hash:{},data:s
}))+'<div class="concert-api-logo"></div> </h3> </div> <div class="similar-artists-region hidden"> <h3 class="similar-artists-header">'+d(i(n(0)).call(t,"Similar Artists",{hash:{},data:s}))+'</h3> </div> </div> <div class="details-poster-container"> ',u=a.if.call(t,t&&t.canPlay,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Director",{
hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Writer",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Cast",{hash:{},data:s
}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+l(i(n(0)).call(t,"Audio",{hash:{},data:s}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Subtitles",{hash:{},data:s
}))+'</span> </div> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="clip-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> '})},function(e,t){
e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<div class="details-title-container"> <h1><a class="show-title btn-metadata-link" href="#!/server/'+u((o=t&&t.serverID,"function"==typeof o?o.apply(t):o))+"/details/"+u((o=t&&t.grandparentKey,
"function"==typeof o?o.apply(t):o))+'"></a></h1> <h2 class="episode-title"></h2> <h3 class="episode-index"></h3> </div> <div class="details-metadata-container"> <div class="details-progress-container"> <div class="item-progress details-progress"></div> </div> <div class="metadata-right pull-right"> <div class="item-available-at metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="item-unwatched-label label label-primary">'+u(i(n(0)).call(t,"Unwatched",{
hash:{},data:s}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+u(i(n(0)).call(t,"Unavailable",{hash:{},data:s}))+'</a> </p> <div class="item-director metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Director",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Writer",{hash:{},data:s
}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Cast",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+u(i(n(0)).call(t,"Audio",{hash:{},data:s}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+u(i(n(0)).call(t,"Subtitles",{hash:{},data:s
}))+'</span> </div> <div class="summary-container"></div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="episode-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="media-count-badge badge badge-lg hidden"></span> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> '
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="movie-details-metadata-container"> <div class="details-progress-container"> <div class="item-progress details-progress"></div> </div> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="item-unwatched-label label label-primary">'+l(i(n(0)).call(t,"Unwatched",{
hash:{},data:s}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+l(i(n(0)).call(t,"Unavailable",{hash:{},data:s}))+'</a> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Director",{hash:{},data:s
}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Writer",{hash:{},data:s}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Cast",{hash:{},data:s
}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+l(i(n(0)).call(t,"Audio",{hash:{},data:s}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+l(i(n(0)).call(t,"Subtitles",{hash:{},data:s
}))+'</span> </div> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+l(i(n(0)).call(t,"Extras",{hash:{},data:s
}))+'</h3> </div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="movie-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="media-count-badge badge badge-lg hidden"></span> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> '})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <div class="playlist-poster item-poster media-poster '+p((n=e&&e.type,typeof n===h?n.apply(e):n))+'"> ',n=a.if.call(e,e&&e.smart,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function l(e,t){return' <span class="smart-badge badge badge-round"> <i class="icon glyphicon cogwheel"></i> </span> '}function u(e,t){
var n,i="";return i+=" ",n=a.unless.call(e,e&&e.hasComposite,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="details-title-container '+p((c=t&&t.type,typeof c===h?c.apply(t):c))+'"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container '+p((c=t&&t.type,
typeof c===h?c.apply(t):c))+'"> <div class="playlist-details-metadata-container"> <p class="metadata-right pull-right"> <span class="item-duration metadata-duration"></span> </p> <p class="metadata-labels"> <span class="item-count"></span> </p> <p class="item-summary metadata-summary"></p> </div> <div class="playlist-items-container details-list-region"></div> <h1 class="error-text hidden">'+p(i(n(0)).call(t,"Failed to load items for this playlist.",{hash:{},data:s
}))+'</h1> <div class="loading-container"> <div class="loading loading-inline"></div> </div> </div> <div class="details-poster-container '+p((c=t&&t.type,typeof c===h?c.apply(t):c))+'"> ',c=a.if.call(t,t&&t.hasComposite,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+=' <div class="playlist-side-strip item-side-strip media-poster '+p((c=t&&t.type,typeof c===h?c.apply(t):c))+'"> ',c=a.if.call(t,t&&t.smart,{hash:{},inverse:f.noop,fn:f.program(4,u,s),data:s}),
(c||0===c)&&(d+=c),d+=" </div> </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<div class="details-title-container"> <h1><a class="show-title btn-metadata-link" href="#!/server/',(s=n.serverID)?r=s.call(t,{hash:{},data:a}):(s=t&&t.serverID,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+"/details/",
(s=n.parentKey)?r=s.call(t,{hash:{},data:a}):(s=t&&t.parentKey,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+'"></a></h1> <h2 class="season-title"></h2> </div> <div class="details-metadata-container"> <div class="media-actions-container title"></div> <div class="summary-container"></div> <div class="episode-list-container details-list-region"></div> </div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){
return' <a class="media-poster-container play-btn" href="#"> <div class="show-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="unwatched-count-badge details-unwatched-count-badge badge badge-lg hidden"></span> </div> </a> '}function s(e,t){
return' <div class="show-poster item-poster media-poster"> <span class="unwatched-count-badge details-unwatched-count-badge badge badge-lg hidden"></span> </div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l="",u=this
;return l+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="show-details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="rating-container rating-container-inline"></span> <span class="content-rating-flag-container content-rating-flag-container-inline"></span> </p> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="season-list-container details-list-region"></div> </div> <div class="details-poster-container"> ',
o=n.if.call(t,t&&t.canPlay,{hash:{},inverse:u.program(3,s,a),fn:u.program(1,r,a),data:a}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>'+(0,
this.escapeExpression)(i(n(0)).call(t,"This media type does not have a details page.",{hash:{},data:s}))+"</h1> </div> </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<a class="concert-link" target="_blank"> <div class="concert-calendar"> <div class="concert-month"></div> <div class="concert-day"></div> </div> <div class="concert-details"> <div class="concert-name"></div> <div class="concert-location"> <span class="concert-venue"></span> (<span class="concert-city"></span>) </div> </div> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<p class="item-summary metadata-summary"></p> <div class="summary-divider hidden"> <button type="button" class="summary-divider-btn">'+(0,this.escapeExpression)(i(n(0)).call(t,"More",{hash:{},data:s}))+"</button> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i=""
;return i+=' <li><a class="auto-match-agent" href="#" data-id="'+d((n=e&&e.identifier,typeof n===c?n.apply(e):n))+'">'+d((n=e&&e.name,typeof n===c?n.apply(e):n))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<a class="dropdown-toggle" href="#auto-match-dropdown" data-toggle="dropdown">'+d(i(n(0)).call(t,"Auto Match",{hash:{},data:s
}))+' <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu"> ',l=a.each.call(t,t&&t.agents,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=" </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <a class="breadcrumb-btn btn-gray" data-key="'+g((n=e&&e.item,n=null==n||n===!1?n:n.key,
typeof n===f?n.apply(e):n))+'" href="#"><span class="breadcrumb-truncated-label">'+g((n=e&&e.item,n=null==n||n===!1?n:n.title,typeof n===f?n.apply(e):n))+'</span></a> <a class="btn-gray dropdown-toggle split-dropdown-toggle" href="#'+g((n=e&&e.id,typeof n===f?n.apply(e):n))+'" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',n=a.each.call(e,e&&e.items,{hash:{},inverse:m.noop,fn:m.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}
function l(e,t,a){var r,s="";return s+=' <li><a class="breadcrumb-btn" data-key="'+g((r=e&&e.key,typeof r===f?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+g((r=e&&e.title,typeof r===f?r.apply(e):r))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',r=i(n(77)).call(e,(r=a&&a.item,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:m.noop,fn:m.program(3,u,t),data:t}),(r||0===r)&&(s+=r),s+='"></i></a></li> '}function u(e,t){return"hidden"}function c(e,t){var n,i=""
;return i+=' <a class="breadcrumb-btn btn-gray" ',n=a.unless.call(e,e&&e.hasDetails,{hash:{},inverse:m.noop,fn:m.program(6,d,t),data:t}),(n||0===n)&&(i+=n),i+=' href="#"> <span class="breadcrumb-truncated-label">'+g((n=e&&e.item,n=null==n||n===!1?n:n.title,typeof n===f?n.apply(e):n))+"</span> </a> "}function d(e,t){var n,i="";return i+='data-key="'+g((n=e&&e.item,n=null==n||n===!1?n:n.key,typeof n===f?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var h,p="",f="function",g=this.escapeExpression,m=this;return h=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:m.program(5,c,s),fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+='<li><a class="download-btn" href="'+h((a=e&&e.downloadUrl,typeof a===d?a.apply(e):a))+'" target="'+h((a=e&&e.defaultLinkTarget,
typeof a===d?a.apply(e):a))+'" ',a=i(n(77)).call(e,e&&e.defaultLinkTarget,"_blank",{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+=' tabindex="-1">'+h(i(n(0)).call(e,"Download",{hash:{},data:t}))+"</a></li>"}function l(e,t){var n,i="";return i+='download="'+h((n=e&&e.downloadName,typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this
;return c+='<li><a class="play-version-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Version...",{hash:{},data:s}))+'</a></li> <li><a class="play-all-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play All",{hash:{},data:s}))+'</a></li> <li><a class="play-shuffled-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Shuffle",{hash:{},data:s}))+'</a></li> <li><a class="play-next-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Next",{hash:{},data:s
}))+'</a></li> <li><a class="add-to-queue-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Add to Queue",{hash:{},data:s}))+'</a></li> <li><a class="play-mix-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Plex Mix",{hash:{},data:s}))+'</a></li> <li><a class="play-trailer-btn play-primary-extra-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Trailer",{hash:{},data:s
}))+'</a></li> <li><a class="play-music-video-btn play-primary-extra-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Music Video",{hash:{},data:s}))+'</a></li> <li><a class="add-to-playlist-btn btn-link" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Add to Playlist...",{hash:{},data:s}))+'</a></li> <li class="divider"></li> <li><a class="refresh-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Refresh",{hash:{},data:s
}))+'</a></li> <li><a class="mark-watched-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Mark as Watched",{hash:{},data:s}))+'</a></li> <li><a class="mark-unwatched-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Mark as Unwatched",{hash:{},data:s}))+'</a></li> <li><a class="sync-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Sync...",{hash:{},data:s}))+'</a></li> <li><a class="convert-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Optimize...",{hash:{},data:s}))+"</a></li> ",
u=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Watch Later",{hash:{},data:s}))+'</a></li> <li><a class="share-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Share...",{hash:{},data:s}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Recommend...",{hash:{},data:s
}))+'</a></li> <li><a class="delete-btn has-danger" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Delete",{hash:{},data:s}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Info",{hash:{},data:s}))+"</a></li> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o=""
;return o+='<div class="play-queue-empty-message">'+(0,this.escapeExpression)(i(n(0)).call(t,"Nothing queued",{hash:{},data:s}))+"</div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return"readonly"}function u(e,t){return' <button class="btn-gray save-btn" href="#"> <i class="plex-icon-add-to-playlist"></i> </button> '}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this,p=this.escapeExpression;return d+='<button class="btn-link dropdown-toggle ',c=a.unless.call(t,t&&t.canEdit,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='" href="#play-queue-dropdown" data-toggle="dropdown"> <i class="glyphicon show-thumbnails-with-lines"></i> </button> <ol class="play-queue-list dropdown-menu pull-right ',c=a.unless.call(t,t&&t.canEdit,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),
(c||0===c)&&(d+=c),d+='"> <li class="dropdown-header play-queue-header"> ',c=a.if.call(t,t&&t.canPlaylist,{hash:{},inverse:h.noop,fn:h.program(5,u,s),data:s}),(c||0===c)&&(d+=c),d+=' <i class="glyphicon show-thumbnails-with-lines"></i> '+p(i(n(0)).call(t,"Up Next",{hash:{},data:s}))+" </li> </ol> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<a class="play-queue-metadata-region" href="#"></a> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<div class="media-poster ',(s=n.type)?r=s.call(t,{hash:{},data:a}):(s=t&&t.type,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),
o+=l(r)+'"></div> <div class="media-item"> <div class="media-title"></div> <div class="media-subtitle-1"><span class="media-primary-subtitle"></span><span class="media-secondary-subtitle"></span></div> </div> <button class="delete-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r=""
;return r+='<li><a class="download-btn" href="'+h((a=e&&e.downloadUrl,typeof a===d?a.apply(e):a))+'" target="'+h((a=e&&e.defaultLinkTarget,typeof a===d?a.apply(e):a))+'" ',a=i(n(77)).call(e,e&&e.defaultLinkTarget,"_blank",{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+=' tabindex="-1">'+h(i(n(0)).call(e,"Download",{hash:{},data:t}))+"</a></li>"}function l(e,t){var n,i="";return i+='download="'+h((n=e&&e.downloadName,typeof n===d?n.apply(e):n))+'"'}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<li><a class="play-mix-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Play Plex Mix",{hash:{},data:s}))+'</a></li> <li><a class="add-to-playlist-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Add to Playlist...",{hash:{},data:s}))+'</a></li> <li class="divider"></li> <li><a class="sync-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Sync...",{hash:{},data:s
}))+"</a></li> ",u=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' <li><a class="share-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Share...",{hash:{},data:s}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Recommend...",{hash:{},data:s}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+h(i(n(0)).call(t,"Info",{hash:{},data:s}))+"</a></li> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){var r,s="";return s+=' <li><a href="#" class="type-btn" data-key="'+h((r=e&&e.key,typeof r===d?r.apply(e):r))+'">'+h(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+" ",r=i(n(20)).call(e,(r=a&&a.currentType,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function l(e,t){
return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<a class="btn-gray dropdown-toggle" href="#playlist-type-dropdown" data-toggle="dropdown">'+h(i(n(0)).call(t,(u=t&&t.currentType,null==u||u===!1?u:u.title),{hash:{},data:s}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',u=a.each.call(t,t&&t.types,{hash:{},inverse:p.noop,
fn:p.programWithDepth(1,o,s,t),data:s}),(u||0===u)&&(c+=u),c+=" </ul> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"active"}function s(e,t){return"plex-icon-companion-cast-active"}function o(e,t){return"plex-icon-companion-cast"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var l,u="",c=this;return u+='<a class="dropdown-toggle ',l=n.if.call(t,t&&t.isActive,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),
(l||0===l)&&(u+=l),u+='" href="#primary-player-dropdown" data-toggle="dropdown"> <i class="',l=n.if.call(t,t&&t.isActive,{hash:{},inverse:c.program(5,o,a),fn:c.program(3,s,a),data:a}),(l||0===l)&&(u+=l),u+='"></i><i class="caret-icon"></i> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <li class="dropdown-header"><span class="dropdown-truncated-label">',
r=a.if.call(e,e&&e.nowPlaying,{hash:{},inverse:I.noop,fn:I.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=b((r=e&&e.primaryPlayer,r=null==r||r===!1?r:r.friendlyName,typeof r===S?r.apply(e):r))+"</span></li> ",r=a.if.call(e,e&&e.showNowPlaying,{hash:{},inverse:I.noop,fn:I.program(4,u,t),data:t}),(r||0===r)&&(s+=r),s+=' <li> <a class="local-player-btn" href="#"> <i class="glyphicon ban"></i> '+b(i(n(0)).call(e,"Disconnect",{hash:{},data:t}))+" </a> </li> "}function l(e,t){var a=""
;return a+=b(i(n(0)).call(e,"Casting to",{hash:{},data:t}))+" "}function u(e,t){var n,i="";return i+=" ",n=a.each.call(e,e&&e.nowPlaying,{hash:{},inverse:I.noop,fn:I.program(5,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function c(e,t){var n,i="";return i+=' <li> <a class="now-playing-btn" data-id="'+b((n=e&&e.ratingKey,typeof n===S?n.apply(e):n))+'" href="#"> <i class="glyphicon play"></i> <span class="dropdown-truncated-label">'+b((n=e&&e.title,typeof n===S?n.apply(e):n))+"</span> </a> </li> "}
function d(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.showPlayers,{hash:{},inverse:I.program(14,m,t),fn:I.program(8,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function h(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.showCast,{hash:{},inverse:I.noop,fn:I.program(9,p,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.players,{hash:{},inverse:I.noop,fn:I.program(12,g,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function p(e,t){var r,s=""
;return s+=' <li> <a class="cast-player-btn" href="#"> <span class="dropdown-truncated-label">'+b(i(n(0)).call(e,"Cast...",{hash:{},data:t}))+"</span> ",r=a.if.call(e,e&&e.selected,{hash:{},inverse:I.noop,fn:I.program(10,f,t),data:t}),(r||0===r)&&(s+=r),s+=" </a> </li> "}function f(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function g(e,t){var n,i="";return i+=' <li> <a class="plex-player-btn" data-id="'+b((n=e&&e.machineIdentifier,
typeof n===S?n.apply(e):n))+'" href="#"> <span class="dropdown-truncated-label">'+b((n=e&&e.name,typeof n===S?n.apply(e):n))+"</span> ",n=a.if.call(e,e&&e.selected,{hash:{},inverse:I.noop,fn:I.program(10,f,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function m(e,t){var a="";return a+=' <li class="dropdown-menu-item"> <a class="disabled">'+b(i(n(0)).call(e,"No players found",{hash:{},data:t}))+"</a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var v,y="",b=this.escapeExpression,S="function",I=this;return v=a.if.call(t,t&&t.primaryPlayer,{hash:{},inverse:I.program(7,d,s),fn:I.program(1,o,s),data:s}),(v||0===v)&&(y+=v),y+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i=""
;return i+=' <a class="dropdown-toggle" href="#primary-server-dropdown" data-toggle="dropdown"> <span class="dropdown-friendly-name">'+f((n=e&&e.currentServer,n=null==n||n===!1?n:n.friendlyName,typeof n===p?n.apply(e):n))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',n=a.each.call(e,e&&e.servers,{hash:{},inverse:g.noop,fn:g.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t,a){var r,s=""
;return s+=' <li><a data-id="'+f((r=e&&e.machineIdentifier,typeof r===p?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+f((r=e&&e.friendlyName,typeof r===p?r.apply(e):r))+"</span>",r=i(n(20)).call(e,(r=a&&a.currentServer,null==r||r===!1?r:r.machineIdentifier),e&&e.machineIdentifier,{hash:{},inverse:g.noop,fn:g.program(3,u,t),data:t}),(r||0===r)&&(s+=r),s+="</a></li> "}function u(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function c(e,t){var n,i=""
;return i+=' <span class="dropdown-placeholder"> <span class="dropdown-friendly-name">'+f((n=e&&e.currentServer,n=null==n||n===!1?n:n.friendlyName,typeof n===p?n.apply(e):n))+"</span> </span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p="function",f=this.escapeExpression,g=this;return d=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:g.program(5,c,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <a class="dropdown-toggle" href="#section-dropdown" data-toggle="dropdown">'+f((n=e&&e.currentSectionTitle,typeof n===m?n.apply(e):n))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',n=a.if.call(e,e&&e.showPlaylists,{hash:{},inverse:g.noop,fn:g.programWithDepth(2,l,t,e),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.sections,{hash:{},
inverse:g.noop,fn:g.programWithDepth(5,c,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t,r){var s,o="";return o+=' <li><a href="#!/server/'+f(i(n(85)).call(e,r&&r.serverID,{hash:{},data:t}))+'/playlists"><span class="dropdown-truncated-label">'+f(i(n(0)).call(e,"Playlists",{hash:{},data:t}))+"</span>",s=a.unless.call(e,e&&e.currentSectionKey,{hash:{},inverse:g.noop,fn:g.program(3,u,t),data:t}),(s||0===s)&&(o+=s),o+="</a></li> "}function u(e,t){
return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function c(e,t,a){var r,s="";return s+=' <li><a href="#!/server/'+f(i(n(85)).call(e,a&&a.serverID,{hash:{},data:t}))+"?key="+f(i(n(85)).call(e,"/library/sections/",{hash:{},data:t}))+f(i(n(85)).call(e,e&&e.key,{hash:{},data:t}))+'"><span class="dropdown-truncated-label">'+f((r=e&&e.title,typeof r===m?r.apply(e):r))+"</span>",r=i(n(20)).call(e,a&&a.currentSectionKey,e&&e.key,{hash:{},inverse:g.noop,fn:g.program(3,u,t),data:t}),
(r||0===r)&&(s+=r),s+="</a></li> "}function d(e,t){var n,i="";return i+=" "+f((n=e&&e.currentSectionTitle,typeof n===m?n.apply(e):n))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this,m="function";return h=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:g.program(7,d,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <a class="dropdown-toggle" href="#'+f((r=e&&e.type,typeof r===p?r.apply(e):r))+'-dropdown" data-toggle="dropdown"> '+f(i(n(505)).call(e,e&&e.selectedStream,{hash:{},data:t}))+' <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',r=a.each.call(e,e&&e.streams,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> "}function l(e,t){var r,s=""
;return s+=' <li> <a data-id="'+f((r=e&&e.id,typeof r===p?r.apply(e):r))+'" href="#"> '+f(i(n(505)).call(e,e,{hash:{},data:t}))+" ",r=a.if.call(e,e&&e.selected,{hash:{},inverse:g.noop,fn:g.program(3,u,t),data:t}),(r||0===r)&&(s+=r),s+=" </a> </li> "}function u(e,t){return' <i class="dropdown-selected-icon glyphicon ok-2"></i> '}function c(e,t){var a="";return a+=" "+f(i(n(505)).call(e,e&&e.selectedStream,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var d,h="",p="function",f=this.escapeExpression,g=this;return d=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:g.program(5,c,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+c(i(n(26)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var l,u="",c=this.escapeExpression,d=this;return u+='<form class="edit-metadata-form"> ',l=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=" </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(26)).call(e,"autocompleteTextInput",{hash:{label:"Artist",
name:"parentTitle",placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.parentTitle),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.parentRatingKey),title:(a=e&&e.item,null==a||a===!1?a:a.parentTitle)},data:t}))+" </div> </div> "}function l(e,t){var a,r="";return r+=' <div class="col-md-4"> '+p(i(n(26)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(a=e&&e.item,null==a||a===!1?a:a.year),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.year),locked:(a=e&&e.locked,
null==a||a===!1?a:a.year),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.ratingKey)},data:t}))+" </div> "}function u(e,t){return"9"}function c(e,t){return"5"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f=this;return h+='<form class="edit-metadata-form"> ',d=a.if.call(t,t&&t.canReparent,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),
h+=' <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Album",name:"title",value:(d=t&&t.item,null==d||d===!1?d:d.title),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.title),locked:(d=t&&t.locked,null==d||d===!1?d:d.title),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey),scopeToAttr:"parentRatingKey",scopeToParam:"artist.id"},data:s
}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Sort Album",name:"titleSort",value:(d=t&&t.item,null==d||d===!1?d:d.titleSort),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.titleSort),locked:(d=t&&t.locked,null==d||d===!1?d:d.titleSort),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-3"> <label>'+p(i(n(0)).call(t,"Rating",{hash:{},data:s
}))+'</label> <div class="rating-region"></div> </div> ',d=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.noop,fn:f.program(3,l,s),data:s}),(d||0===d)&&(h+=d),h+=' <div class="col-md-',d=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.program(7,c,s),fn:f.program(5,u,s),data:s}),(d||0===d)&&(h+=d),h+=' "> '+p(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(d=t&&t.item,null==d||d===!1?d:d.originallyAvailableAt),
placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.originallyAvailableAt),locked:(d=t&&t.locked,null==d||d===!1?d:d.originallyAvailableAt)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Record Label",name:"studio",value:(d=t&&t.item,null==d||d===!1?d:d.studio),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.studio),locked:(d=t&&t.locked,null==d||d===!1?d:d.studio),ratingKey:(d=t&&t.item,
null==d||d===!1?d:d.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Review",name:"summary",value:(d=t&&t.item,null==d||d===!1?d:d.summary),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.summary),type:"textarea",rows:"5",locked:(d=t&&t.locked,null==d||d===!1?d:d.summary),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="";return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+(0,this.escapeExpression)(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:s}))+" </div> </div> </form> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Artist",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),
locked:(o=t&&t.locked,null==o||o===!1?o:o.title),ratingKey:(o=t&&t.item,null==o||o===!1?o:o.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Sort Artist",name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort),ratingKey:(o=t&&t.item,null==o||o===!1?o:o.ratingKey)},data:s
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Biography",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){var a,r="";return r+=' <div class="row"> <div class="col-md-12"> '+c(i(n(26)).call(e,"lockableTagInput",{hash:{label:"Similar Artists",name:"similar",attribute:"similar",query:"title",locked:(a=e&&e.locked,null==a||a===!1?a:a.similar)},data:t}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this
;return u+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+c(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(l=t&&t.locked,null==l||l===!1?l:l.genre)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+c(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(l=t&&t.locked,null==l||l===!1?l:l.collection)},data:s}))+" </div> </div> ",
l=a.if.call(t,t&&t.canEditSimilarArtists,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=" </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="upload-artwork-container"> <div class="upload-prompt"> ',r=a.if.call(e,e&&e.showFileUpload,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),
s+=' <a class="upload-url-btn" href="#">'+d(i(n(0)).call(e,"enter a url",{hash:{},data:t}))+'</a> </div> <div class="upload-progress"> '+d(i(n(0)).call(e,"Uploading artwork...",{hash:{},data:t}))+' </div> <div class="upload-success"> '+d(i(n(0)).call(e,"this artwork was uploaded successfully",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(0)).call(e,"{1}upload another{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t
}))+' </div> <div class="upload-error"> '+d(i(n(0)).call(e,"there was an error uploading this artwork",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(0)).call(e,"{1}try again{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <form id="upload-form" class="upload-form"> <input type="text" class="form-control" name="url" placeholder="'+d(i(n(0)).call(e,"Enter a url to upload an image from the web",{hash:{},data:t
}))+'"> <div class="upload-form-help"> <div class="pull-right">'+d(i(n(0)).call(e,"enter to {1}upload{2}",'<a class="submit-url-btn" href="#">',"</a>",{hash:{},data:t}))+'</div> <div class="pull-left">'+d(i(n(0)).call(e,"esc to {1}cancel{2}",'<a class="cancel-url-btn" href="#">',"</a>",{hash:{},data:t}))+"</div> </div> </form> </div> "}function l(e,t){var a=""
;return a+=' <span class="artwork-file-container"> <input type="file" class="artwork-file-control" multiple> <a href="#">'+d(i(n(0)).call(e,"choose an image",{hash:{},data:t}))+'</a> </span> <span class="upload-prompt-divider">&middot;</span> '+d(i(n(0)).call(e,"drag and drop",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return u=a.if.call(t,t&&t.showUpload,{
hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' <div class="artwork-list-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{
label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),locked:(o=t&&t.locked,null==o||o===!1?o:o.title)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort)
},data:s}))+' </div> </div> <div class="row"> <div class="col-md-6"> '+u(i(n(26)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(o=t&&t.item,null==o||o===!1?o:o.rating),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.rating),locked:(o=t&&t.locked,null==o||o===!1?o:o.rating)},data:s}))+' </div> <div class="col-md-6"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(o=t&&t.item,
null==o||o===!1?o:o.originallyAvailableAt),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.originallyAvailableAt),locked:(o=t&&t.locked,null==o||o===!1?o:o.originallyAvailableAt)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,
null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",
locked:(o=t&&t.locked,null==o||o===!1?o:o.writer)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Directors",name:"director",attribute:"directors",locked:(o=t&&t.locked,null==o||o===!1?o:o.director)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o="";return o+="<h4>"+(0,this.escapeExpression)(i(n(0)).call(t,"Files",{hash:{},data:s}))+'</h4> <ul class="media-info-file-list"></ul> <div class="loading-container"><div class="loading"></div></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return(s=n.file)?r=s.call(t,{hash:{},data:a}):(s=t&&t.file,
r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=" "+f(i(n(26)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.originallyAvailableAt),
locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" "}function l(e,t){var a,r="";return r+=" "+f(i(n(26)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(a=e&&e.item,null==a||a===!1?a:a.year),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.year),locked:(a=e&&e.locked,null==a||a===!1?a:a.year)},data:t}))+" "}function u(e,t){return"12"}function c(e,t){return"6"}function d(e,t){var a,r=""
;return r+=' <div class="col-md-6"> '+f(i(n(26)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.originallyAvailableAt),locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this
;return p+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(h=t&&t.item,null==h||h===!1?h:h.title),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.title),locked:(h=t&&t.locked,null==h||h===!1?h:h.title),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s
}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(h=t&&t.item,null==h||h===!1?h:h.titleSort),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.titleSort),locked:(h=t&&t.locked,null==h||h===!1?h:h.titleSort),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{
hash:{label:"Original Title",name:"originalTitle",value:(h=t&&t.item,null==h||h===!1?h:h.originalTitle),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.originalTitle),locked:(h=t&&t.locked,null==h||h===!1?h:h.originalTitle),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),
p+=' </div> <div class="col-md-4"> '+f(i(n(26)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(h=t&&t.item,null==h||h===!1?h:h.rating),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.rating),locked:(h=t&&t.locked,null==h||h===!1?h:h.rating)},data:s}))+' </div> <div class="col-md-4 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(h=t&&t.item,null==h||h===!1?h:h.contentRating),
placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.contentRating),locked:(h=t&&t.locked,null==h||h===!1?h:h.contentRating),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-',h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(7,c,s),fn:g.program(5,u,s),data:s}),(h||0===h)&&(p+=h),p+=' selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Studio",name:"studio",value:(h=t&&t.item,
null==h||h===!1?h:h.studio),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.studio),locked:(h=t&&t.locked,null==h||h===!1?h:h.studio),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+" </div> ",h=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.noop,fn:g.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+=' </div> <div class="row"> <div class="col-md-12"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",value:(h=t&&t.item,
null==h||h===!1?h:h.tagline),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.tagline),locked:(h=t&&t.locked,null==h||h===!1?h:h.tagline)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(h=t&&t.item,null==h||h===!1?h:h.summary),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.summary),type:"textarea",rows:"5",locked:(h=t&&t.locked,null==h||h===!1?h:h.summary)},data:s
}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Directors",name:"director",attribute:"directors",locked:(o=t&&t.locked,
null==o||o===!1?o:o.director)},data:s}))+' </div> <div class="col-md-6"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Country",name:"country",attribute:"countries",locked:(o=t&&t.locked,null==o||o===!1?o:o.country)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:s
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(o=t&&t.locked,null==o||o===!1?o:o.writer)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(o=t&&t.locked,null==o||o===!1?o:o.collection)},data:s}))+" </div> </div> </form> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),
locked:(o=t&&t.locked,null==o||o===!1?o:o.title)},data:s}))+' </div> <div class="col-md-6"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",
value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression
;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-9"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),locked:(o=t&&t.locked,null==o||o===!1?o:o.title)},data:s}))+' </div> <div class="col-md-3"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Year",name:"year",value:(o=t&&t.item,null==o||o===!1?o:o.year),
placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.year),locked:(o=t&&t.locked,null==o||o===!1?o:o.year)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(o=t&&t.item,null==o||o===!1?o:o.titleSort),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.titleSort),locked:(o=t&&t.locked,null==o||o===!1?o:o.titleSort)},data:s
}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"textInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"textInput",{hash:{label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),
placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5"},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="";return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+(0,this.escapeExpression)(i(n(26)).call(t,"lockableTextInput",{hash:{
label:"Summary",name:"summary",value:(o=t&&t.item,null==o||o===!1?o:o.summary),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.summary),type:"textarea",rows:"5",locked:(o=t&&t.locked,null==o||o===!1?o:o.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i=""
;return i+=' <form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> ',n=a.if.call(e,e&&e.showLabels,{hash:{},inverse:f.program(4,u,t),fn:f.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> </div> </form> "}function l(e,t){var a,r="";return r+=" "+p(i(n(26)).call(e,"lockableTagInput",{hash:{label:"Labels",name:"label",attribute:"labels",locked:(a=e&&e.locked,null==a||a===!1?a:a.label)},data:t}))+" "}function u(e,t){var a=""
;return a+=' <div class="form-group"> <label>'+p(i(n(0)).call(e,"Labels",{hash:{},data:t}))+"</label> <p>"+p(i(n(0)).call(e,"Labels require Plex Media Server {1} or later.",e&&e.labelsMinVersion,{hash:{},data:t}))+"</p> </div> "}function c(e,t){var a,r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+p(i(n(0)).call(e,"You need a Plex Pass to use restrictions.",{hash:{},data:t
}))+'</h4> <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+p((a=e&&e.plexPassUrl,typeof a===g?a.apply(e):a))+'" target="_blank">'+p(i(n(0)).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f=this,g="function";return d=a.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:f.program(6,c,s),fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=" "+f(i(n(26)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.originallyAvailableAt),locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" "}function l(e,t){
var a,r="";return r+=" "+f(i(n(26)).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(a=e&&e.item,null==a||a===!1?a:a.year),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.year),locked:(a=e&&e.locked,null==a||a===!1?a:a.year)},data:t}))+" "}function u(e,t){return"12"}function c(e,t){return"6"}function d(e,t){var a,r="";return r+=' <div class="col-md-6"> '+f(i(n(26)).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",
value:(a=e&&e.item,null==a||a===!1?a:a.originallyAvailableAt),placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.originallyAvailableAt),locked:(a=e&&e.locked,null==a||a===!1?a:a.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return p+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Title",
name:"title",value:(h=t&&t.item,null==h||h===!1?h:h.title),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.title),locked:(h=t&&t.locked,null==h||h===!1?h:h.title),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(h=t&&t.item,null==h||h===!1?h:h.titleSort),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.titleSort),
locked:(h=t&&t.locked,null==h||h===!1?h:h.titleSort),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' </div> <div class="col-md-4"> '+f(i(n(26)).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(h=t&&t.item,null==h||h===!1?h:h.rating),placeholder:(h=t&&t.placeholders,
null==h||h===!1?h:h.rating),locked:(h=t&&t.locked,null==h||h===!1?h:h.rating)},data:s}))+' </div> <div class="col-md-4 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(h=t&&t.item,null==h||h===!1?h:h.contentRating),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.contentRating),locked:(h=t&&t.locked,null==h||h===!1?h:h.contentRating),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s
}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Original Title",name:"originalTitle",value:(h=t&&t.item,null==h||h===!1?h:h.originalTitle),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.originalTitle),locked:(h=t&&t.locked,null==h||h===!1?h:h.originalTitle),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-',
h=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:g.program(7,c,s),fn:g.program(5,u,s),data:s}),(h||0===h)&&(p+=h),p+=' selectize"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Studio",name:"studio",value:(h=t&&t.item,null==h||h===!1?h:h.studio),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.studio),locked:(h=t&&t.locked,null==h||h===!1?h:h.studio),ratingKey:(h=t&&t.item,null==h||h===!1?h:h.ratingKey)},data:s}))+" </div> ",h=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},
inverse:g.noop,fn:g.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+=' </div> <div class="row"> <div class="col-md-12"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",value:(h=t&&t.item,null==h||h===!1?h:h.tagline),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.tagline),locked:(h=t&&t.locked,null==h||h===!1?h:h.tagline)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Summary",
name:"summary",value:(h=t&&t.item,null==h||h===!1?h:h.summary),placeholder:(h=t&&t.placeholders,null==h||h===!1?h:h.summary),type:"textarea",rows:"5",locked:(h=t&&t.locked,null==h||h===!1?h:h.summary)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression
;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(o=t&&t.locked,null==o||o===!1?o:o.collection)},data:s}))+" </div> </div> </form> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(26)).call(e,"autocompleteTextInput",{hash:{label:"Album Artist",name:"grandparentTitle",placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.grandparentTitle),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.grandparentRatingKey),title:(a=e&&e.item,
null==a||a===!1?a:a.grandparentTitle)},data:t}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(26)).call(e,"autocompleteTextInput",{hash:{label:"Album",name:"parentTitle",placeholder:(a=e&&e.placeholders,null==a||a===!1?a:a.parentTitle),ratingKey:(a=e&&e.item,null==a||a===!1?a:a.parentRatingKey),title:(a=e&&e.item,null==a||a===!1?a:a.parentTitle),scopeToAttr:"grandparentRatingKey",scopeToParam:"artist.id"},data:t}))+" </div> </div> "}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this;return u+='<form class="edit-metadata-form"> ',l=a.if.call(t,t&&t.canReparent,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=' <div class="row"> <div class="col-md-12"> '+c(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(l=t&&t.item,null==l||l===!1?l:l.title),placeholder:(l=t&&t.placeholders,null==l||l===!1?l:l.title),
locked:(l=t&&t.locked,null==l||l===!1?l:l.title)},data:s}))+' </div> </div> <div class="row"> <div class="col-md-4"> <label>'+c(i(n(0)).call(t,"Rating",{hash:{},data:s}))+'</label> <div class="rating-region"></div> </div> <div class="col-md-4"> '+c(i(n(26)).call(t,"lockableNumericInput",{hash:{label:"Track",name:"index",value:(l=t&&t.item,null==l||l===!1?l:l.index),placeholder:(l=t&&t.placeholders,null==l||l===!1?l:l.index),locked:(l=t&&t.locked,null==l||l===!1?l:l.index),
disabled:t&&t.disableIndices},data:s}))+' </div> <div class="col-md-4"> '+c(i(n(26)).call(t,"lockableNumericInput",{hash:{label:"Disc",name:"parentIndex",value:(l=t&&t.item,null==l||l===!1?l:l.parentIndex),placeholder:(l=t&&t.placeholders,null==l||l===!1?l:l.parentIndex),locked:(l=t&&t.locked,null==l||l===!1?l:l.parentIndex),disabled:t&&t.disableIndices},data:s}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+c(i(n(26)).call(t,"lockableTextInput",{hash:{label:"Artist",
name:"originalTitle",value:(l=t&&t.item,null==l||l===!1?l:l.originalTitle),placeholder:(l=t&&t.placeholders,null==l||l===!1?l:l.originalTitle),locked:(l=t&&t.locked,null==l||l===!1?l:l.originalTitle),ratingKey:(l=t&&t.item,null==l||l===!1?l:l.ratingKey)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var o,l="";return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+(0,this.escapeExpression)(i(n(26)).call(t,"lockableTagInput",{hash:{label:"Moods",name:"mood",attribute:"moods",locked:(o=t&&t.locked,null==o||o===!1?o:o.mood)},data:s}))+" </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s=""
;return s+=' <div class="setup-agent-section"> <div class="setup-agent-title">'+d(i(n(0)).call(e,"{1} Settings",e&&e.agentName,{hash:{},data:t}))+'</div> <p class="setup-agent-disclaimer">'+d(i(n(0)).call(e,"Note: These settings will take effect for all libraries using the {1} agent.",e&&e.agentName,{hash:{},data:t}))+'</p> <div class="setup-agent-settings"> ',r=a.each.call(e,e&&e.settings,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=" </div> </div> "}
function l(e,t){var a="";return a+=" "+d(i(n(26)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return u=a.if.call(t,t&&t.settings,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<form class="edit-section-type-form settings-container"> <p>'+l(i(n(0)).call(t,"There was an error adding this library.",{hash:{},data:s}))+"</p> <p>"+l(i(n(0)).call(t,"You need to {1}follow these instructions{2} to troubleshoot the Plex Media Server.",'<a href="https://support.plex.tv/hc/en-us/articles/201119258-Resetting-System-and-Framework-bundles" target="_blank">',"</a>",{hash:{},data:s}))+"</p> </form>"})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <i class="server-alert-icon glyphicon cogwheel"></i> '}function l(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"status",{hash:{},inverse:V.program(6,c,t),fn:V.program(4,u,t),data:t}),a||0===a?a:""}function u(e,t){return' <i class="server-alert-icon glyphicon bullhorn"></i> '}function c(e,t){var a
;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"playing",{hash:{},inverse:V.program(9,h,t),fn:V.program(7,d,t),data:t}),a||0===a?a:""}function d(e,t){return' <i class="server-alert-icon glyphicon imac"></i> '}function h(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"websocket",{hash:{},inverse:V.program(13,g,t),fn:V.program(10,p,t),data:t}),a||0===a?a:""}function p(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.event,
null==n||n===!1?n:n.opened),{hash:{},inverse:V.program(11,f,t),fn:V.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function f(e,t){return' <i class="server-alert-icon glyphicon warning-sign"></i> '}function g(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),0,{hash:{},inverse:V.program(16,v,t),fn:V.program(14,m,t),data:t}),a||0===a?a:""}function m(e,t){return' <i class="server-alert-icon glyphicon plus"></i> '}function v(e,t){var a
;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),5,{hash:{},inverse:V.program(19,b,t),fn:V.program(17,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <i class="server-alert-icon glyphicon ok-2"></i> '}function b(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),6,{hash:{},inverse:V.program(22,I,t),fn:V.program(20,S,t),data:t}),a||0===a?a:""}function S(e,t){return' <i class="server-alert-icon glyphicon magic"></i> '}function I(e,t){var a
;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),9,{hash:{},inverse:V.program(25,M,t),fn:V.program(23,w,t),data:t}),a||0===a?a:""}function w(e,t){return' <i class="server-alert-icon glyphicon bin"></i> '}function M(e,t){return' <i class="server-alert-icon glyphicon tags"></i> '}function C(e,t){var a,r="";return r+=" "+H(i(n(0)).call(e,"{1} set to {2}.",(a=e&&e.event,null==a||a===!1?a:a.label),(a=e&&e.event,null==a||a===!1?a:a.value),{hash:{},data:t}))+" "}function D(e,t){var a
;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"status",{hash:{},inverse:V.program(36,A,t),fn:V.program(30,P,t),data:t}),a||0===a?a:""}function P(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.message),{hash:{},inverse:V.program(33,x,t),fn:V.program(31,T,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function T(e,t){var a,r="";return r+=" "+H(i(n(0)).call(e,(a=e&&e.event,null==a||a===!1?a:a.message),{hash:{},data:t}))+" "}function x(e,t){var r,s=""
;return s+=" "+H(i(n(0)).call(e,(r=e&&e.event,null==r||r===!1?r:r.title),{hash:{},data:t})),r=a.if.call(e,(r=e&&e.event,null==r||r===!1?r:r.description),{hash:{},inverse:V.noop,fn:V.program(34,E,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function E(e,t){var a,r="";return r+=": "+H(i(n(0)).call(e,(a=e&&e.event,null==a||a===!1?a:a.description),{hash:{},data:t}))}function A(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"timeline",{hash:{},inverse:V.program(39,L,t),
fn:V.program(37,k,t),data:t}),a||0===a?a:""}function k(e,t){var a,r="";return r+=" "+H(i(n(0)).call(e,(a=e&&e.event,null==a||a===!1?a:a.stateString),{hash:{},data:t}))+' <a href="#!/server/'+H(i(n(85)).call(e,e&&e.serverID,{hash:{},data:t}))+"/details?key="+H(i(n(85)).call(e,e&&e.itemKey,{hash:{},data:t}))+'">'+H((a=e&&e.event,a=null==a||a===!1?a:a.mediaTitle,typeof a===W?a.apply(e):a))+"</a> "}function L(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"playing",{
hash:{},inverse:V.program(42,N,t),fn:V.program(40,_,t),data:t}),a||0===a?a:""}function _(e,t){var a,r="";return r+=" "+H(i(n(0)).call(e,"{1} started playing {2} on {3}.",(a=e&&e.event,null==a||a===!1?a:a.username),(a=e&&e.event,null==a||a===!1?a:a.title),(a=e&&e.event,null==a||a===!1?a:a.player),{hash:{},data:t}))+" "}function N(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"websocket",{hash:{},inverse:V.noop,fn:V.program(43,R,t),data:t}),a||0===a?a:""}
function R(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.opened),{hash:{},inverse:V.program(46,j,t),fn:V.program(44,O,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function O(e,t){var a="";return a+=" "+H(i(n(0)).call(e,"Opened connection to {1}, listening for events.",e&&e.serverName,{hash:{},data:t}))+" "}function j(e,t){var n;return n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.closed),{hash:{},inverse:V.program(49,U,t),fn:V.program(47,z,t),data:t}),n||0===n?n:""}
function z(e,t){var a="";return a+=" "+H(i(n(0)).call(e,"Connection to {1} closed.",e&&e.serverName,{hash:{},data:t}))+" "}function U(e,t){var a="";return a+=" "+H(i(n(0)).call(e,"Unable to listen for events on {1}.",e&&e.serverName,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var F,B="",V=this,H=this.escapeExpression,W="function";return B+='<div class="striped-list-inner-item alert-list-inner-item"> ',F=i(n(20)).call(t,(F=t&&t.event,
null==F||F===!1?F:F._type),"setting",{hash:{},inverse:V.program(3,l,s),fn:V.program(1,o,s),data:s}),(F||0===F)&&(B+=F),B+=' <div class="server-alert-details"> <span class="server-alert-time">'+H(i(n(752)).call(t,(F=t&&t.event,null==F||F===!1?F:F.time),t&&t.timeFormat,{hash:{},data:s}))+"</span> ",F=i(n(20)).call(t,(F=t&&t.event,null==F||F===!1?F:F._type),"setting",{hash:{},inverse:V.program(29,D,s),fn:V.program(27,C,s),data:s}),(F||0===F)&&(B+=F),B+=" </div> </div> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="row row-padded"> <h4 class="text-muted text-center"> '+(0,this.escapeExpression)(i(n(0)).call(t,"Nothing is currently being played.",{hash:{},data:s}))+" </h4> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hide-actions"}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this,h=this.escapeExpression;return c+='<a class="media-poster-container ',u=a.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+='" href="'+h((u=t&&t.url,
"function"==typeof u?u.apply(t):u))+'"> <div class="media-poster-fade invisible"></div> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-top-overlay"></div> <div class="media-poster-actions ',u=a.unless.call(t,t&&t.showStopButton,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),
c+='"> <button class="stop-btn media-poster-btn btn-link" tabindex="-1"> <i class="glyphicon remove-2"></i> <span class="media-poster-btn-text">'+h(i(n(0)).call(t,"Stop playback",{hash:{},data:s
}))+'</span> </button> </div> <img class="device-icon"> <div class="session-player"></div> <div class="session-state"></div> <div class="session-transcode-details"> <p class="session-transcode-title"> <span class="session-transcode"></span> <span class="session-transcode-throttled"></span> </p> <p class="session-transcode-video"> <span class="session-transcode-label">'+h(i(n(0)).call(t,"Video",{hash:{},data:s
}))+'</span> <span class="session-transcode-video-decision"></span> </p> <p class="session-transcode-audio"> <span class="session-transcode-label">'+h(i(n(0)).call(t,"Audio",{hash:{},data:s
}))+'</span> <span class="session-transcode-audio-decision"></span> </p> </div> <div class="media-progress"></div> </div> <div class="session-user pull-right"> <div class="user-poster img-circle"></div> <div class="session-username media-heading secondary"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){
return"cloud-download"}function s(e,t){return"circle-arrow-down"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var l,u="",c=this
;return u+='<a class="media-poster-container" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="sync-status"> <div class="sync-status-transcode hidden"></div> <i class="sync-status-icon sync-complete-icon glyphicon ok-2 hidden"></i> <i class="sync-status-icon sync-waiting-icon glyphicon ',l=n.if.call(t,t&&t.isCloudSync,{hash:{},inverse:c.program(3,s,a),fn:c.program(1,r,a),data:a}),(l||0===l)&&(u+=l),
u+=' hidden"></i> <i class="sync-status-icon sync-processing-icon glyphicon more hidden"></i> <i class="sync-status-icon sync-failed-icon glyphicon warning-sign ',l=n.unless.call(t,t&&t.isFailure,{hash:{},inverse:c.noop,fn:c.program(5,o,a),data:a}),(l||0===l)&&(u+=l),u+='"></i> <i class="sync-status-icon sync-unknown-icon glyphicon circle-question-mark ',l=n.if.call(t,t&&t.isFailure,{hash:{},inverse:c.noop,fn:c.program(5,o,a),data:a}),(l||0===l)&&(u+=l),
u+='"></i> </div> <div class="media-poster-actions"> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="delete-btn media-poster-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> <div class="media-context media-heading secondary"></div> </a> '})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <i class="glyphicon cloud-download"></i> <span class="cloud-sync-waiting">'+d(i(n(0)).call(e,"Waiting to be uploaded",{hash:{},data:t}))+'</span> <span class="cloud-sync-uploading hidden">'+d(i(n(0)).call(e,"Uploading",{hash:{},data:t}))+' &middot; <span class="transcode-progress"></span>%</span> '}function l(e,t){var a=""
;return a+=' <i class="glyphicon circle-arrow-down"></i> '+d(i(n(0)).call(e,"Waiting to be downloaded",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return c+='<div class="media-poster"></div> <p class="title"></p> <p class="complete-subtitle subtitle hidden"> <i class="glyphicon ok-2"></i> '+d(i(n(0)).call(t,"Synced",{hash:{},data:s}))+' </p> <p class="waiting-subtitle subtitle hidden"> ',
u=a.if.call(t,t&&t.isCloudSync,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' </p> <p class="downloading-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(0)).call(t,"Downloading",{hash:{},data:s}))+' &middot; <span class="transcode-progress"></span>% </p> <p class="converting-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(0)).call(t,"Converting",{hash:{},data:s
}))+' &middot; <span class="transcode-progress"></span>% &middot; <span class="transcode-remaining"></span> </p> <p class="processing-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(i(n(0)).call(t,"Waiting to be converted",{hash:{},data:s}))+' </p> <p class="unknown-subtitle subtitle hidden"> <i class="glyphicon circle-question-mark"></i> '+d(i(n(0)).call(t,"Unknown",{hash:{},data:s
}))+' </p> <p class="failed-subtitle subtitle hidden"> <i class="glyphicon warning-sign"></i> <span class="error-message"></span> </p> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+l(i(n(0)).call(t,"Conversions for sync and media optimization will appear here.",{hash:{},data:s}))+"</p> <p>"+l(i(n(0)).call(t,"Manage your optimized versions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",t&&t.serverID,{hash:{},data:s}))+"</p> </h4> </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){
return' <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",u=this.escapeExpression,c=this;return l+='<div class="show-actions striped-list-inner-item playlist-inner-item ',(o=n.type)?s=o.call(t,{hash:{},data:a}):(o=t&&t.type,s="function"==typeof o?o.call(t,{hash:{},data:a}):o),l+=u(s)+'"> <div class="media-actions media-reorder"> ',s=n.unless.call(t,t&&t.hideDragHandle,{hash:{},
inverse:c.noop,fn:c.program(1,r,a),data:a
}),(s||0===s)&&(l+=s),l+=' </div> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="media-actions generator-actions"> <button class="promote-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon up-arrow"></i></button> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> <div class="media-item"> <div class="media-details"> <div class="generator-title col-lg"></div> <div class="generator-target col-md col-secondary"></div> <div class="conversion-status-region col-md col-secondary"></div> </div> </div> </div> '
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression
;return l+='<div class="conversion-status-container conversion-status-converting"> <div class="progress-bar-region"></div> <div class="conversion-status-converting-label-container"> <span class="conversion-status-converting-label">'+u(i(n(0)).call(t,"Converting",{hash:{},data:s
}))+'</span> <span class="conversion-status-converting-speed"></span> <div class="conversion-status-converting-progress"> <span class="conversion-status-converting-percentage"></span> <span class="conversion-status-converting-progress-separator">&middot;</span> <span class="conversion-status-converting-remaining"></span> </div> </div> </div> <div class="conversion-status-container conversion-status-processed"> <i class="conversion-status-icon glyphicon ok-2 text-success"></i> '+u(i(n(0)).call(t,"Complete",{
hash:{},data:s}))+' </div> <div class="conversion-status-container conversion-status-disabled"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> '+u(i(n(0)).call(t,"Deleted",{hash:{},data:s
}))+' <button class="enable-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> </div> <div class="conversion-status-container conversion-status-error"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="conversion-status-failed-message">'+u((o=t&&t.initialErrorMessage,
"function"==typeof o?o.apply(t):o))+'</span> <button class="retry-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> </div> <div class="conversion-status-container conversion-status-pending"> <i class="conversion-status-icon glyphicon clock"></i> <span class="conversion-status-pending-label">'+u(i(n(0)).call(t,"Waiting",{hash:{},data:s}))+"</span> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<a class="card-collapsed" href="#!/server/'+u(i(n(85)).call(t,t&&t.serverID,{hash:{},data:s}))+"/directory/"+u(i(n(85)).call(t,t&&t.currentKey,{hash:{},data:s}))+"/"+u(i(n(85)).call(t,(o=t&&t.channel,null==o||o===!1?o:o.key),{hash:{},data:s}))+'"> <span class="media-title media-heading"></span> </a> '})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<a class="media-poster-container" href="#"> <div class="media-poster"> <div class="installed-icon"><i class="glyphicon ok-2"></i></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <div class="media-poster-overlay"></div> <div class="media-poster-actions"> ',n=a.if.call(e,(n=e&&e.item,null==n||n===!1?n:n.hasPrefs),{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=' <button class="uninstall-btn media-poster-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> '}function l(e,t){
return' <button class="settings-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon cogwheel"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this,h=this.escapeExpression;return c+='<a class="media-poster-container" href="#!/server/'+h(i(n(85)).call(t,t&&t.serverID,{hash:{},data:s}))+"/channel/"+h(i(n(85)).call(t,(u=t&&t.item,null==u||u===!1?u:u.key),{hash:{},data:s}))+'"> <div class="media-poster"> ',u=a.unless.call(t,t&&t.shared,{
hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' <div class="loading loading-inline"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{}
;var o,l,u="",c=this,d=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o="function"==typeof l?l.call(t,{hash:{},data:a}):l),u+=d(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,
fn:c.program(3,s,a),data:a
}),(o||0===o)&&(u+=o),u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",u=this,c=this.escapeExpression;return l+='<div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',s=n.if.call(t,t&&t.selected,{hash:{},inverse:u.noop,fn:u.program(1,r,a),data:a}),(s||0===s)&&(l+=s),
l+='" href="#"> <div class="track-actions media-actions"> <button class="track-more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="track-index media-index media-heading secondary"> <span>',(o=n.index)?s=o.call(t,{hash:{},data:a}):(o=t&&t.index,s="function"==typeof o?o.call(t,{hash:{},data:a}):o),
l+=c(s)+'</span> <i class="glyphicon volume-up"></i> </span> <span class="track-title media-title media-heading"></span> <span class="track-subtitle-1 media-subtitle-1 media-heading secondary"></span> <span class="track-context media-context media-heading secondary"></span> <button class="track-music-video-btn media-action-btn btn-link" tabindex="-1"><i class="plex-icon-shows-560"></i></button> </a> <div class="track-actions-dropdown media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<a class="artwork-option media-poster-container" data-rating-key="',(s=n.ratingKey)?r=s.call(t,{hash:{},data:a}):(s=t&&t.ratingKey,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+'" href="#"> <div class="media-poster"></div> </a> '})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",c=this,d=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,
o="function"==typeof l?l.call(t,{hash:{},data:a}):l),u+=d(o)+'"> <div class="media-poster"> <span class="media-count-badge badge hidden"></span> <span class="unwatched-count-badge badge hidden"></span> <div class="media-progress"></div> </div> <div class="media-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,a),data:a}),(o||0===o)&&(u+=o),
u+='"> <button class="play-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-index media-heading secondary"></span> <span class="media-title media-heading"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading media-rating"></span> <p class="media-tagline"></p> <p class="media-summary"></p> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",c=this,d=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a
}):(l=t&&t.url,o="function"==typeof l?l.call(t,{hash:{},data:a}):l),u+=d(o)+'"> <span class="media-index media-heading secondary"></span> <span class="media-title media-heading"></span> <span class="unwatched-icon"></span> <div class="media-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,a),data:a}),(o||0===o)&&(u+=o),
u+='"> <button class="play-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-context media-heading media-rating"></span> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",c=this,d=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,
o="function"==typeof l?l.call(t,{hash:{},data:a}):l),u+=d(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,a),data:a}),(o||0===o)&&(u+=o),
u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-count-badge badge badge-lg hidden"></span> <div class="media-progress"></div> </div> <span class="unwatched-icon"></span> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<a class="media-poster-container play-btn" href="',(s=n.url)?r=s.call(t,{hash:{},data:a}):(s=t&&t.url,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),
o+=l(r)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <div class="media-progress"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){
return"missing"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="row disc-number hidden"> '+c(i(n(0)).call(t,"Disc {1}",t&&t.parentIndex,{hash:{},data:s}))+' </div> <div class="row striped-list-inner-item"> <span class="col-xs-1 match-index"> '+c((l=t&&t.index,"function"==typeof l?l.apply(t):l))+'. </span> <span class="col-xs-11 match-track-name ',l=a.unless.call(t,t&&t.matched,{hash:{},inverse:d.noop,
fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='"> '+c((l=t&&t.name,"function"==typeof l?l.apply(t):l))+" </span> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="match-empty-message">'+(0,this.escapeExpression)(i(n(0)).call(t,"No matches found.",{hash:{},data:s}))+"</div> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <span class="match-name">'+p((n=e&&e.parentName,typeof n===h?n.apply(e):n))+'</span> &ndash; <span class="match-name">'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+"</span> "}function l(e,t){var n,i="";return i+=' <span class="match-name">'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+"</span> "}function u(e,t){var n,i=""
;return i+=' <span class="match-year">'+p((n=e&&e.year,typeof n===h?n.apply(e):n))+'</span> <span class="match-separator">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<a class="match-result col-xs-12" href="#"> <div class="row"> <div class="col-xs-9 match-title-info"> ',c=a.if.call(t,t&&t.parentName,{hash:{},inverse:f.program(3,l,s),fn:f.program(1,o,s),data:s}),(c||0===c)&&(d+=c),
d+=' </div> <div class="col-xs-3 match-score-info" title="'+p(i(n(0)).call(t,"Score {1}",t&&t.normalizedScore,{hash:{},data:s}))+'"> ',c=a.if.call(t,t&&t.year,{hash:{},inverse:f.noop,fn:f.program(5,u,s),data:s}),(c||0===c)&&(d+=c),d+=' <span class="match-score"><i class="match-score-icon glyphicon certificate"></i>'+p((c=t&&t.normalizedScore,
typeof c===h?c.apply(t):c))+'</span> </div> </div> <div class="row match-extended-info hidden"> <div class="col-xs-4"> <img class="match-art" src="'+p((c=t&&t.thumb,typeof c===h?c.apply(t):c))+'"/> </div> <div class="col-xs-8 children-region"></div> </div> </a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"show-actions"}function l(e,t){return"selected"}function u(e,t){return"hidden"}
function c(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:I.program(12,p,t),fn:I.program(10,h,t),data:t}),a||0===a?a:""}function h(e,t){return' <span class="media-available-at"></span> '}function p(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"rating",{hash:{},inverse:I.program(15,g,t),fn:I.program(13,f,t),data:t}),a||0===a?a:""}function f(e,t){return' <span class="media-rating"></span> '}
function g(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:I.program(18,v,t),fn:I.program(16,m,t),data:t}),a||0===a?a:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"duration",{hash:{},inverse:I.noop,fn:I.program(19,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var b,S="",I=this,w=this.escapeExpression;return S+='<a class="media-list-inner-item ',b=a.if.call(t,t&&t.showActions,{hash:{},inverse:I.noop,fn:I.program(1,o,s),data:s}),(b||0===b)&&(S+=b),S+=" ",b=a.if.call(t,t&&t.selected,{hash:{},inverse:I.noop,fn:I.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+='" href="'+w((b=t&&t.url,
"function"==typeof b?b.apply(t):b))+'"> <div class="media-poster"> <span class="media-count-badge badge hidden"></span> <span class="unwatched-count-badge badge hidden"></span> <span class="video-badge badge badge-round hidden"> <i class="glyphicon facetime-video"></i> </span> <div class="media-progress"></div> </div> <div class="media-actions ',b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:I.noop,fn:I.program(5,u,s),data:s}),(b||0===b)&&(S+=b),
S+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-loading btn-loading-static" tabindex="-1"> <i class="btn-label glyphicon pencil"></i> <div class="loading loading-sm"></div> </button> <button class="more-btn media-action-btn" tabindex="-1"><i class="glyphicon more"></i></button> </div> <div class="media-sort media-heading secondary"> ',
b=i(n(20)).call(t,t&&t.sort,"addedAt",{hash:{},inverse:I.program(9,d,s),fn:I.program(7,c,s),data:s}),(b||0===b)&&(S+=b),
S+=' </div> <span class="media-title media-heading"></span> <span class="media-subtitle-2 media-heading secondary"></span> <span class="media-subtitle-1 media-heading secondary"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading secondary"></span> <p class="media-tagline"></p> <p class="media-summary"></p> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"show-actions"}function l(e,t){return"selected"}function u(e,t){return"hidden"}function c(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:I.program(12,p,t),fn:I.program(10,h,t),data:t}),a||0===a?a:""}function h(e,t){
return' <span class="media-available-at"></span> '}function p(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"rating",{hash:{},inverse:I.program(15,g,t),fn:I.program(13,f,t),data:t}),a||0===a?a:""}function f(e,t){return' <span class="media-rating"></span> '}function g(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:I.program(18,v,t),fn:I.program(16,m,t),data:t}),a||0===a?a:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var a
;return a=i(n(20)).call(e,e&&e.sort,"duration",{hash:{},inverse:I.noop,fn:I.program(19,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var b,S="",I=this,w=this.escapeExpression;return S+='<a class="media-list-inner-item ',b=a.if.call(t,t&&t.showActions,{hash:{},inverse:I.noop,fn:I.program(1,o,s),data:s}),(b||0===b)&&(S+=b),S+=" ",b=a.if.call(t,t&&t.selected,{hash:{},inverse:I.noop,
fn:I.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+='" href="'+w((b=t&&t.url,"function"==typeof b?b.apply(t):b))+'"> <div class="media-actions ',b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:I.noop,fn:I.program(5,u,s),data:s}),(b||0===b)&&(S+=b),
S+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link btn-loading btn-loading-static" tabindex="-1"> <i class="btn-label glyphicon pencil"></i> <div class="loading loading-sm"></div> </button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-title media-heading"></span> <span class="media-subtitle-2 media-heading secondary"></span> <span class="media-subtitle-1 media-heading secondary"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading secondary"></span> <span class="media-sort media-heading secondary"> ',
b=i(n(20)).call(t,t&&t.sort,"addedAt",{hash:{},inverse:I.program(9,d,s),fn:I.program(7,c,s),data:s}),(b||0===b)&&(S+=b),S+=' </span> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<div class="media-progress-track"></div> <div class="media-progress-pct"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hide-actions"}function l(e,t){return"selected"}function u(e,t){return"hidden"}function c(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:I.program(12,p,t),
fn:I.program(10,h,t),data:t}),a||0===a?a:""}function h(e,t){return' <span class="media-available-at"></span> '}function p(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"rating",{hash:{},inverse:I.program(15,g,t),fn:I.program(13,f,t),data:t}),a||0===a?a:""}function f(e,t){return' <span class="media-rating"></span> '}function g(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:I.program(18,v,t),fn:I.program(16,m,t),data:t}),a||0===a?a:""}function m(e,t){
return' <span class="media-resolution"></span> '}function v(e,t){var a;return a=i(n(20)).call(e,e&&e.sort,"duration",{hash:{},inverse:I.noop,fn:I.program(19,y,t),data:t}),a||0===a?a:""}function y(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var b,S="",I=this,w=this.escapeExpression;return S+='<a class="media-poster-container ',b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:I.noop,fn:I.program(1,o,s),data:s}),
(b||0===b)&&(S+=b),S+=" ",b=a.if.call(t,t&&t.selected,{hash:{},inverse:I.noop,fn:I.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+='" href="'+w((b=t&&t.url,
"function"==typeof b?b.apply(t):b))+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons with-actions"> <i class="analyzing-icon media-poster-overlay-icon glyphicon magic hidden"></i> <i class="matching-icon media-poster-overlay-icon glyphicon search hidden"></i> <i class="metadata-icon media-poster-overlay-icon glyphicon tags hidden"></i> <i class="trash-icon media-poster-overlay-icon glyphicon bin warning hidden"></i> </div> <div class="media-poster-actions ',
b=a.unless.call(t,t&&t.showActions,{hash:{},inverse:I.noop,fn:I.program(5,u,s),data:s}),(b||0===b)&&(S+=b),
S+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-count-badge badge badge-lg hidden"></span> <span class="unwatched-count-badge badge badge-lg hidden"></span> <span class="video-badge badge badge-round hidden"> <i class="glyphicon facetime-video"></i> </span> <div class="media-progress"></div> <div class="loading loading-inline"></div> </div> <span class="unwatched-icon"></span> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> <div class="media-subtitle-2 media-heading secondary"></div> <div class="media-context media-heading secondary"></div> <div class="media-sort media-heading secondary"> ',
b=i(n(20)).call(t,t&&t.sort,"addedAt",{hash:{},inverse:I.program(9,d,s),fn:I.program(7,c,s),data:s}),(b||0===b)&&(S+=b),S+=' </div> <div class="media-subtitle-1-fill media-heading hidden"></div> <div class="media-subtitle-2-fill media-heading hidden"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<a class="playlist-metadata-region" href="#"></a> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <div class="media-actions media-reorder"> <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> </div> '}function l(e,t){
return' <div class="media-poster-container play-btn"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </div> '}function u(e,t){return' <div class="media-actions media-delete"> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> '}function c(e,t){return"has-actions"}function d(e,t){
return"btn-metadata-link"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return p+='<div class="show-actions playlist-inner-item '+f((h=t&&t.type,"function"==typeof h?h.apply(t):h))+'"> ',h=a.if.call(t,t&&t.canEdit,{hash:{},inverse:g.noop,fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="media-index media-heading secondary"> <i class="glyphicon volume-up"></i> </div> ',h=i(n(77)).call(t,t&&t.type,"track",{hash:{},
inverse:g.noop,fn:g.program(3,l,s),data:s}),(h||0===h)&&(p+=h),p+=" ",h=a.if.call(t,t&&t.canEdit,{hash:{},inverse:g.noop,fn:g.program(5,u,s),data:s}),(h||0===h)&&(p+=h),p+=' <div class="media-item '+f((h=t&&t.type,"function"==typeof h?h.apply(t):h))+" ",h=a.if.call(t,t&&t.canEdit,{hash:{},inverse:g.noop,fn:g.program(7,c,s),data:s}),(h||0===h)&&(p+=h),p+='"> <div class="media-details"> <div class="media-detail media-heading"> <span class="media-title ',h=a.if.call(t,t&&t.hasDetails,{hash:{},
inverse:g.noop,fn:g.program(9,d,s),data:s}),(h||0===h)&&(p+=h),p+='"></span> </div> <div class="media-detail media-optional media-heading secondary"> <span class="media-primary-subtitle btn-metadata-link"></span> </div> <div class="media-detail media-always media-heading secondary"> <span class="media-secondary-subtitle btn-metadata-link"></span> </div> <div class="media-duration media-heading secondary"></div> </div> </div> </div>'})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",c=this,d=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o="function"==typeof l?l.call(t,{hash:{},data:a
}):l),u+=d(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,a),data:a}),(o||0===o)&&(u+=o),
u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="unwatched-count-badge badge badge-lg hidden"></span> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<a class="playlist" data-id="',(s=n.ratingKey)?r=s.call(t,{hash:{},data:a}):(s=t&&t.ratingKey,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+'" href="#"> <span class="media-poster playlist-poster"></span> ',(s=n.title)?r=s.call(t,{hash:{},data:a}):(s=t&&t.title,
r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+" </a>"})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"selected"}function l(e,t){return' <button class="track-edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this
;return c+='<div class="disc-number hidden"> '+d(i(n(0)).call(t,"Disc {1}",'<span class="track-parent-index"></span>',{hash:{},data:s}))+' </div> <div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',u=a.if.call(t,t&&t.selected,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+='" href="#"> <div class="track-actions media-actions"> ',u=a.if.call(t,t&&t.showEdit,{hash:{},inverse:h.noop,
fn:h.program(3,l,s),data:s
}),(u||0===u)&&(c+=u),c+=' <button class="track-more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="track-index media-index media-heading secondary"> <span></span> <i class="glyphicon volume-up"></i> </span> <span class="track-title media-title media-heading"></span> <span class="track-subtitle-1 media-subtitle-1 media-heading secondary"></span> <span class="track-context media-context media-heading secondary"></span> <button class="track-music-video-btn media-action-btn btn-link" tabindex="-1"><i class="plex-icon-shows-560"></i></button> </a> <div class="track-actions-dropdown media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> '
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+l(i(n(0)).call(t,'Choose "Optimize..." on items in your library and optimized versions will appear here.',{hash:{},data:s
}))+"</p> <p>"+l(i(n(0)).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{hash:{},data:s}))+"</p> </h4> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<a class="show-actions playlist-inner-item '+u((o=t&&t.type,
"function"==typeof o?o.apply(t):o))+'" href="#"> <div class="media-actions media-reorder"> <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> </div> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="media-actions generator-actions"> <button class="retry-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> <button class="edit-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> <div class="media-item"> <div class="media-details"> <div class="generator-title col-lg"></div> <div class="generator-target col-md col-secondary"></div> <div class="generator-status col-md col-secondary"> <div class="generator-status-container generator-status-complete"> <i class="generator-status-icon glyphicon ok-2 text-success"></i> '+u(i(n(0)).call(t,"Complete",{
hash:{},data:s}))+' </div> <div class="generator-status-container generator-status-failed"> <i class="generator-status-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="generator-status-failed-message">'+u(i(n(0)).call(t,"Failed",{hash:{},data:s}))+'</span> </div> <div class="generator-status-container generator-status-converting"> <i class="generator-status-icon glyphicon restart"></i> '+u(i(n(0)).call(t,"Converting",{hash:{},data:s
}))+' </div> <div class="generator-status-container generator-status-pending"> <i class="generator-status-icon glyphicon clock"></i> '+u(i(n(0)).call(t,"Waiting",{hash:{},data:s}))+" </div> </div> </div> </div> </a> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression
;return o+='<div class="striped-list-inner-item"> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="conversion-status-region"></div> <div class="generator-metadata-title">',(s=n.title)?r=s.call(t,{hash:{},data:a}):(s=t&&t.title,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+'</div> <div class="generator-metadata-episode-index generator-metadata-subtitle"></div> <div class="generator-metadata-year generator-metadata-subtitle">',
(s=n.year)?r=s.call(t,{hash:{},data:a}):(s=t&&t.year,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+"</div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<a class="sort-btn btn-gray" href="#"> '+(0,this.escapeExpression)(i(n(0)).call(t,t&&t.title,{hash:{},data:s
}))+' <i class="desc-icon caret-icon caret-icon-sm hidden"></i> <i class="asc-icon caret-icon caret-icon-sm caret-icon-reverse hidden"></i> </a> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s="",o=this.escapeExpression;return s+='<a class="striped-list-item" href="#" data-key="'+o((r=t&&t.filePath,r=null==r||r===!1?r:r.key,
"function"==typeof r?r.apply(t):r))+'"> <i class="glyphicon file"></i> '+o((r=t&&t.filePath,r=null==r||r===!1?r:r.title,"function"==typeof r?r.apply(t):r))+" </a> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"left-arrow"}function s(e,t){var i;return i=n.if.call(e,(i=e&&e.filePath,null==i||i===!1?i:i.home),{hash:{},inverse:g.program(6,l,t),fn:g.program(4,o,t),data:t}),i||0===i?i:""}function o(e,t){return"home"}function l(e,t){var i
;return i=n.if.call(e,(i=e&&e.filePath,null==i||i===!1?i:i.network),{hash:{},inverse:g.program(9,c,t),fn:g.program(7,u,t),data:t}),i||0===i?i:""}function u(e,t){return"globe"}function c(e,t){var i;return i=n.if.call(e,e&&e.isRoot,{hash:{},inverse:g.program(12,h,t),fn:g.program(10,d,t),data:t}),i||0===i?i:""}function d(e,t){return"hdd"}function h(e,t){return"folder-open"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var p,f="",g=this,m=this.escapeExpression
;return f+='<a class="striped-list-item" href="#" data-key="'+m((p=t&&t.filePath,p=null==p||p===!1?p:p.key,"function"==typeof p?p.apply(t):p))+'"> <i class="folder-icon glyphicon ',p=n.if.call(t,(p=t&&t.filePath,null==p||p===!1?p:p.isBackShortcut),{hash:{},inverse:g.program(3,s,a),fn:g.program(1,r,a),data:a}),(p||0===p)&&(f+=p),f+='"></i> '+m((p=t&&t.filePath,p=null==p||p===!1?p:p.title,"function"==typeof p?p.apply(t):p))+' <div class="loading loading-sm loading-inline hidden"></div> </a> '})
},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<a class="btn-gray" data-identifier="',(s=n.identifier)?r=s.call(t,{hash:{},data:a}):(s=t&&t.identifier,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+'" href="#">',(s=n.name)?r=s.call(t,{hash:{},data:a}):(s=t&&t.name,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+"</a> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"checked"}function l(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this
;return c+='<div class="card-actions"> <button class="info-btn card-action-btn"><i class="glyphicon circle-info"></i></button> <button class="settings-btn card-action-btn"><i class="glyphicon cogwheel"></i></button> </div> <div class="card-handle"><i class="glyphicon show-lines"></i></div> <label for="'+d((u=t&&t.identifier,"function"==typeof u?u.apply(t):u))+'"> <input id="'+d((u=t&&t.identifier,"function"==typeof u?u.apply(t):u))+'" name="'+d((u=t&&t.identifier,
"function"==typeof u?u.apply(t):u))+'" type="checkbox" ',u=a.if.call(t,t&&t.enabled,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" ",u=a.if.call(t,t&&t.isPrimary,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+="> "+d(i(n(0)).call(t,t&&t.name,{hash:{},data:s}))+" </label> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="row-padded"> <h4 class="text-muted text-center">'+(0,this.escapeExpression)(i(n(0)).call(t,"No devices found",{hash:{},data:s}))+"</h4> </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<div class="card card-device"> <img class="card-poster device-icon"> <div class="card-actions"> <button class="remove-device-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="name"></h4> <div class="card-details"> <div class="pull-right"> <div class="last-seen text-muted"></div> <span class="sync-info hidden"> <span class="glyphicon circle-arrow-down sync-icon"></span> <span class="sync-count"></span> <span class="sync-size"></span> </span> </div> <span class="version text-muted"></span> <div class="device-info-container"> <div class="product"></div> <div class="device text-muted"></div> <div class="platform-info text-muted"> <span class="platform"></span> <span class="platform-version"></span> </div> </div> </div> </div> '
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<h4 class="text-muted text-center">'+(0,this.escapeExpression)(i(n(0)).call(t,"No friends yet. {1}Invite a friend{2} and share your libraries.",'<a class="invite-friend-btn" href="#">',"</a>",{hash:{},data:s}))+"</h4> "})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<div class="card card-user card-friend"> <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> <button class="edit-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="username"></h4> <div class="card-details"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon right-arrow"></i> <a class="server-share-edit-btn server-share-status shared '+v((n=e&&e.shared,n=null==n||n===!1?n:n.status,typeof n===y?n.apply(e):n))+" ",n=a.unless.call(e,e&&e.canEdit,{hash:{},inverse:b.noop,fn:b.program(2,l,t),data:t}),(n||0===n)&&(i+=n),
i+='" href="#"> <i class="server-share-status-icon available glyphicon circle-ok"></i> <i class="server-share-status-icon unavailable glyphicon circle-exclamation-mark"></i> <i class="server-share-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-share-status-hover-icon glyphicon pencil"></i> </a> ',n=a.if.call(e,(n=e&&e.shared,null==n||n===!1?n:n.hasActiveShare),{hash:{},inverse:b.program(6,c,t),fn:b.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function l(e,t){
return"disabled"}function u(e,t){var a,r="";return r+=" "+v(i(n(0)).call(e,"shares {1} {2} with you",(a=e&&e.shared,null==a||a===!1?a:a.numLibraries),(a=e&&e.shared,null==a||a===!1?a:a.libraryLabel),{hash:{},data:t}))+" "}function c(e,t){var a,r="";return r+=" "+v(i(n(0)).call(e,"wants to share {1} {2} with you",(a=e&&e.shared,null==a||a===!1?a:a.numLibraries),(a=e&&e.shared,null==a||a===!1?a:a.libraryLabel),{hash:{},data:t}))+" "}function d(e,t){var n,i=""
;return i+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon left-arrow"></i> <a class="server-share-edit-btn server-share-status owned '+v((n=e&&e.owned,n=null==n||n===!1?n:n.status,typeof n===y?n.apply(e):n))+" ",n=a.unless.call(e,e&&e.canEdit,{hash:{},inverse:b.noop,fn:b.program(2,l,t),data:t}),(n||0===n)&&(i+=n),
i+='" href="#"> <i class="server-share-status-icon available glyphicon circle-ok"></i> <i class="server-share-status-icon unavailable glyphicon circle-exclamation-mark"></i> <i class="server-share-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-share-status-hover-icon glyphicon pencil"></i> </a> ',n=a.if.call(e,(n=e&&e.owned,null==n||n===!1?n:n.hasActiveShare),{hash:{},inverse:b.program(11,p,t),fn:b.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function h(e,t){
var a,r="";return r+=" "+v(i(n(0)).call(e,"sharing {1} {2} with this {3}",(a=e&&e.owned,null==a||a===!1?a:a.numLibraries),(a=e&&e.owned,null==a||a===!1?a:a.libraryLabel),(a=e&&e.owned,null==a||a===!1?a:a.friendLabel),{hash:{},data:t}))+" "}function p(e,t){var a,r="";return r+=" "+v(i(n(0)).call(e,"invited to share {1} {2}",(a=e&&e.owned,null==a||a===!1?a:a.numLibraries),(a=e&&e.owned,null==a||a===!1?a:a.libraryLabel),{hash:{},data:t}))+" "}function f(e,t){var a=""
;return a+=' <p class="user-summary server-share-empty-message">'+v(i(n(0)).call(e,"no shared libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y="function",b=this;return g=a.if.call(t,(g=t&&t.shared,null==g||g===!1?g:g.numLibraries),{hash:{},inverse:b.noop,fn:b.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,(g=t&&t.owned,null==g||g===!1?g:g.numLibraries),{hash:{},inverse:b.noop,
fn:b.program(8,d,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=a.if.call(t,t&&t.showEmptyMessage,{hash:{},inverse:b.noop,fn:b.program(13,f,s),data:s}),(g||0===g)&&(m+=g),m+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <h4 class="text-muted text-center">'+d(i(n(0)).call(e,"No one else is in your home. {1}Add a user{2} to enable user switching.",'<a class="add-user-btn" href="#">',"</a>",{hash:{},data:t}))+"</h4> "}function l(e,t){var a,r="";return r+=' <h4 class="text-muted text-center">'+d(i(n(0)).call(e,"You need a Plex Pass to add users to your home.",{hash:{},data:t}))+'</h4> <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+d((a=e&&e.plexPassUrl,
typeof a===h?a.apply(e):a))+'" target="_blank">'+d(i(n(0)).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h="function",p=this;return u=a.if.call(t,t&&t.hasHomeFeature,{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' <ul class="list centered-home-user-container"></ul> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){
function r(e,t){return'<div class="selected-user-icon"></div>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o="",l=this;return o+='<div class="card card-user card-friend card-home-user"> ',s=n.if.call(t,t&&t.isSignedInUser,{hash:{},inverse:l.noop,fn:l.program(1,r,a),data:a}),(s||0===s)&&(o+=s),
o+=' <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> <button class="pin-btn pin-protected-btn card-action-btn btn-success"><i class="glyphicon lock"></i></button> <button class="pin-btn pin-unprotected-btn card-action-btn"><i class="glyphicon unlock"></i></button> <button class="edit-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4> <i class="admin-icon glyphicon crown"></i> <span class="username"></span> </h4> <div class="card-details"> <div class="user-type text-muted"></div> </div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return'<button class="accept-btn card-action-btn btn-success"><i class="glyphicon ok-2"></i></button>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o="",l=this;return o+='<div class="card card-user"> <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> ',s=n.if.call(t,t&&t.showAccept,{hash:{},inverse:l.noop,fn:l.program(1,r,a),data:a}),
(s||0===s)&&(o+=s),o+=' <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="username"></h4> <div class="card-details"> <p class="user-summary"></p> </div> </div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression
;return o+='<div class="card card-section"> <div class="card-actions"> <button class="edit-section-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-section-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <i class="section-icon glyphicon ',(s=n.icon)?r=s.call(t,{hash:{},data:a}):(s=t&&t.icon,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+'"></i> <span class="section-title"></span> </div> '})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){var n,i="";return i+=' <h4><a href="'+p((n=e&&e.url,typeof n===h?n.apply(e):n))+'" target="_blank">'+p((n=e&&e.title,typeof n===h?n.apply(e):n))+'</a></h4> <a href="'+p((n=e&&e.url,typeof n===h?n.apply(e):n))+'" target="_blank"> <img class="thumb"/> </a> '}function u(e,t){var n,i="";return i+=" <h4>"+p((n=e&&e.title,
typeof n===h?n.apply(e):n))+'</h4> <img class="thumb"/> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="card card-announcement"> <div class="unread ',c=a.if.call(t,t&&t.read,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='"></div> ',c=a.if.call(t,t&&t.url,{hash:{},inverse:f.program(5,u,s),fn:f.program(3,l,s),data:s}),(c||0===c)&&(d+=c),
d+=' <div class="date">'+p(i(n(1300)).call(t,t&&t.notifyAt,{hash:{},data:s}))+'</div> <div class="description">',c=t&&t.content,c=typeof c===h?c.apply(t):c,(c||0===c)&&(d+=c),d+="</div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression
;return l+='<a class="friend" data-id="'+u((o=t&&t.recommendationsPlaylistId,"function"==typeof o?o.apply(t):o))+'" href="#"> <span class="media-poster user-poster"></span> '+u(i(n(507)).call(t,t&&t.title,20,{hash:{},data:s}))+" </a> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<a class="card card-user-playlist" href="',(s=n.url)?r=s.call(t,{
hash:{},data:a}):(s=t&&t.url,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),
o+=l(r)+'"> <div class="card-poster media-poster"></div> <div class="card-actions"> <button class="play-btn card-action-btn"><i class="glyphicon play"></i></button> <button class="mark-unwatched-btn card-action-btn"><i class="glyphicon circle-minus"></i></button> <button class="mark-watched-btn card-action-btn"><i class="glyphicon circle-ok"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="media-title"></h4> <div class="card-details"> <span class="media-subtitle-1"></span> <span class="media-context"></span> <p class="media-summary"></p> </div> </a> '
})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<div class="modal-dialog"> <div class="modal-content"> <form name="add-folder-form"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon folder-plus"></i> '+l(i(n(0)).call(t,"Add Folder",{hash:{},data:s
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="row"> <div class="col-md-12"> <input type="text" name="path" class="form-control" value=""> </div> </div> <div class="row directory-container-row"> <div class="home-directory-container col-md-5"></div> <div class="col-md-7"> <div class="path-container"></div> <div class="file-container"></div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+l(i(n(0)).call(t,"Cancel",{
hash:{},data:s}))+'</button> <button type="submit" class="add-btn btn btn-primary">'+l(i(n(0)).call(t,"Add",{hash:{},data:s}))+"</button> </div> </form> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return v(i(n(0)).call(e,"Select a Playlist",{hash:{},data:t}))}function l(e,t){return v(i(n(0)).call(e,"Create Playlist",{hash:{},data:t}))}function u(e,t){var n,i=""
;return i+=" ",n=a.if.call(e,e&&e.hasPlaylists,{hash:{},inverse:y.program(8,d,t),fn:y.program(6,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function c(e,t){return' <div class="playlists-container"></div> '}function d(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.loading,{hash:{},inverse:y.program(11,p,t),fn:y.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function h(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function p(e,t){var a=""
;return a+=' <div class="empty-message">'+v(i(n(0)).call(e,"There are no playlists on this server.",{hash:{},data:t}))+"</div> "}function f(e,t){return"only-control"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y=this
;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon plex-icon-add-to-playlist"></i> ',g=a.if.call(t,t&&t.showExisting,{hash:{},inverse:y.program(3,l,s),fn:y.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+=' </h4> </div> <div class="modal-body modal-body-scroll minimal-scroll"> ',g=a.if.call(t,t&&t.showExisting,{
hash:{},inverse:y.noop,fn:y.program(5,u,s),data:s}),(g||0===g)&&(m+=g),m+=' <div class="message-container ',g=a.unless.call(t,t&&t.showExisting,{hash:{},inverse:y.noop,fn:y.program(13,f,s),data:s}),(g||0===g)&&(m+=g),m+='"> <input class="message form-control" placeholder="'+v(i(n(0)).call(t,"New playlist...",{hash:{},data:s
}))+'"> </div> </div> <div class="modal-footer"> <button type="button" class="add-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+v(i(n(0)).call(t,"Add",{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o=""
;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-info"></i> '+(0,this.escapeExpression)((r=t&&t.agent,r=null==r||r===!1?r:r.name,"function"==typeof r?r.apply(t):r))+' </h4> </div> <div class="modal-body"> <p class="agent-icon-container"></p> <p>',(s=n.attribution)?r=s.call(t,{hash:{},data:a
}):(s=t&&t.attribution,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),(r||0===r)&&(o+=r),o+="</p> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+='<button class="browse-btn btn btn-primary">'+c(i(n(0)).call(e,"Browse",{hash:{},data:t}))+"</button>"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var l,u="",c=this.escapeExpression,d=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title">'+c((l=t&&t.channel,l=null==l||l===!1?l:l.title,
"function"==typeof l?l.apply(t):l))+'</h4> </div> <div class="modal-body"> <div class="channel-poster-container"> <div class="channel-poster media-poster"></div> <div class="installed-actions-container"> ',l=a.unless.call(t,t&&t.agent,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=' <div class="btn-group"> <button type="button" class="update-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(i(n(0)).call(t,"Update",{
hash:{},data:s}))+'</span> </button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </button> <ul class="dropdown-menu pull-right"> <li><a class="restart-btn" href="#">'+c(i(n(0)).call(t,"Restart",{hash:{},data:s}))+'</a></li> <li><a class="reset-btn" href="#">'+c(i(n(0)).call(t,"Reset",{hash:{},data:s
}))+'</a></li> </ul> </div> <button class="uninstall-btn btn btn-danger btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(i(n(0)).call(t,"Uninstall",{hash:{},data:s}))+'</span> </button> </div> <div class="uninstalled-actions-container"> <button class="install-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(i(n(0)).call(t,"Install",{hash:{},data:s
}))+'</span> </button> </div> </div> <div class="channel-details"> '+c((l=t&&t.channel,l=null==l||l===!1?l:l.summary,"function"==typeof l?l.apply(t):l))+" </div> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+h(i(n(0)).call(e,"Directory Settings",{hash:{},data:t}))+" "}function l(e,t){var a=""
;return a+=" "+h(i(n(0)).call(e,"{1} Settings",e&&e.title,{hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+h(i(n(26)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this.escapeExpression,p=this
;return d+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon cogwheel"></i> ',c=i(n(20)).call(t,t&&t.title,"Preferences...",{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+=' </h4> </div> <form id="channel-settings-form"> <div class="modal-body settings-container"> ',
c=a.each.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.program(5,u,s),data:s}),(c||0===c)&&(d+=c),d+=' </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+h(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,"Save",{hash:{},data:s
}))+"</span> </button> </div> </form> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+h(i(n(0)).call(e,e&&e.cancelLabel,{hash:{},data:t}))+"</button> "}function l(e,t){return"btn-danger"}function u(e,t){return"btn-primary"}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this.escapeExpression,p=this;return d+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-exclamation-mark"></i> '+h((c=t&&t.title,"function"==typeof c?c.apply(t):c))+'</h4> </div> <div class="modal-body"> <p class="confirm-message">'+h((c=t&&t.message,
"function"==typeof c?c.apply(t):c))+'</p> <p class="double-confirm-message text-warning"></p> </div> <div class="modal-footer"> ',c=a.unless.call(t,t&&t.hideCancel,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+=' <button type="button" class="confirm-btn btn btn-lg ',c=a.if.call(t,t&&t.hasDanger,{hash:{},inverse:p.program(5,u,s),fn:p.program(3,l,s),data:s}),(c||0===c)&&(d+=c),
d+=' btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,t&&t.confirmLabel,{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,r){var s,o="";return o+=' <li class="striped-list-item select-list-item download-list-item"> <a class="media" data-value="'+m((s=null==t||t===!1?t:t.index,
typeof s===g?s.apply(e):s))+'" href="'+m((s=e&&e.downloadUrl,typeof s===g?s.apply(e):s))+'" target="'+m((s=r&&r.defaultLinkTarget,typeof s===g?s.apply(e):s))+'" ',s=i(n(77)).call(e,r&&r.defaultLinkTarget,"_blank",{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(s||0===s)&&(o+=s),o+="> ",s=a.if.call(e,e&&e.title,{hash:{},inverse:v.noop,fn:v.program(4,u,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,e&&e.videoResolution,{hash:{},inverse:v.noop,fn:v.program(6,c,t),data:t}),
(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(9,h,t),data:t}),(s||0===s)&&(o+=s),o+=" </a> </li> "}function l(e,t){var n,i="";return i+='download="'+m((n=e&&e.downloadName,typeof n===g?n.apply(e):n))+'"'}function u(e,t){var n,i="";return i+=" "+m((n=e&&e.title,typeof n===g?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function c(e,t){var r,s="";return s+=" "+m(i(n(754)).call(e,e&&e.videoResolution,{hash:{},data:t})),
r=a.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(7,d,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function d(e,t){return","}function h(e,t){var a="";return a+=" "+m(i(n(753)).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g="function",m=this.escapeExpression,v=this
;return f+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download-alt"></i> '+m(i(n(0)).call(t,"Download a Version",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list download-list"> ',p=a.each.call(t,t&&t.mediaItems,{hash:{},
inverse:v.noop,fn:v.programWithDepth(1,o,s,t),data:s}),(p||0===p)&&(f+=p),f+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <i class="modal-icon glyphicon plus"></i> '+S(i(n(0)).call(e,"Add {1} Library",'<span class="section-type-title"></span>',{hash:{},data:t}))+" "}function l(e,t){var a=""
;return a+=' <i class="modal-icon glyphicon pencil"></i> '+S(i(n(0)).call(e,"Edit Library",{hash:{},data:t}))+" "}function u(e,t){return' <div class="modal-body-pane pane-region dark-scrollbar"> <div class="loading loading-inline"></div> </div> '}function c(e,t){var r,s="";return s+=' <div class="modal-nav-pane dark-scrollbar"> <ul class="list modal-nav-list"> <li> <a class="btn-gray change-pane-btn type-btn',r=i(n(20)).call(e,e&&e.selectedPane,"type",{hash:{},inverse:I.noop,fn:I.program(8,d,t),
data:t}),(r||0===r)&&(s+=r),s+='" data-pane="type" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> ',r=a.if.call(e,e&&e.add,{hash:{},inverse:I.program(12,p,t),fn:I.program(10,h,t),data:t}),(r||0===r)&&(s+=r),s+=' </a> </li> <li> <a class="btn-gray change-pane-btn folders-btn',r=i(n(20)).call(e,e&&e.selectedPane,"folders",{hash:{},inverse:I.noop,fn:I.program(8,d,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.add,{hash:{},inverse:I.noop,fn:I.program(14,f,t),data:t}),
(r||0===r)&&(s+=r),s+=" ",r=a.unless.call(e,e&&e.showFolders,{hash:{},inverse:I.noop,fn:I.program(16,g,t),data:t}),(r||0===r)&&(s+=r),s+='" data-pane="folders" href="#"> <i class="modal-nav-icon glyphicon folder-open"></i> '+S(i(n(0)).call(e,"Add folders",{hash:{},data:t}))+' </a> </li> <li> <a class="btn-gray change-pane-btn options-btn',r=i(n(20)).call(e,e&&e.selectedPane,"options",{hash:{},inverse:I.noop,fn:I.program(8,d,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.add,{hash:{},
inverse:I.noop,fn:I.program(14,f,t),data:t}),(r||0===r)&&(s+=r),s+=' hidden" data-pane="options" href="#"> <i class="modal-nav-icon glyphicon magic"></i> '+S(i(n(0)).call(e,"Options",{hash:{},data:t}))+' </a> </li> <li> <a class="btn-gray change-pane-btn advanced-btn',r=i(n(20)).call(e,e&&e.selectedPane,"advanced",{hash:{},inverse:I.noop,fn:I.program(8,d,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.add,{hash:{},inverse:I.noop,fn:I.program(14,f,t),data:t}),(r||0===r)&&(s+=r),
s+='" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+S(i(n(0)).call(e,"Advanced",{hash:{},data:t}))+' </a> </li> </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> '}function d(e,t){return" selected"}function h(e,t){var a="";return a+=" "+S(i(n(0)).call(e,"Select type",{hash:{},data:t}))+" "}function p(e,t){var a="";return a+=" "+S(i(n(0)).call(e,"General",{hash:{},data:t}))+" "}function f(e,t){return"disabled"}function g(e,t){
return"hidden"}function m(e,t){var a="";return a+=" "+S(i(n(0)).call(e,"Add Library",{hash:{},data:t}))+" "}function v(e,t){var a="";return a+=" "+S(i(n(0)).call(e,"Save Changes",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var y,b="",S=this.escapeExpression,I=this
;return b+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> ',y=a.if.call(t,t&&t.add,{hash:{},inverse:I.program(3,l,s),fn:I.program(1,o,s),data:s}),(y||0===y)&&(b+=y),b+=' </h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> ',y=a.if.call(t,t&&t.isLoading,{hash:{},inverse:I.program(7,c,s),fn:I.program(5,u,s),
data:s}),(y||0===y)&&(b+=y),b+=' </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+S(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading ',y=a.if.call(t,t&&t.add,{hash:{},inverse:I.noop,fn:I.program(14,f,s),data:s}),(y||0===y)&&(b+=y),
b+='"> <div class="loading loading-sm"></div> <span class="btn-label"> <span class="save-btn-label-next">'+S(i(n(0)).call(t,"Next",{hash:{},data:s}))+'</span> <span class="save-btn-label-save"> ',y=a.if.call(t,t&&t.add,{hash:{},inverse:I.program(20,v,s),fn:I.program(18,m,s),data:s}),(y||0===y)&&(b+=y),b+=" </span> </span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){
function o(e,t){var a="";return a+=' <div class="match-location"> '+h(i(n(0)).call(e,"Location",{hash:{},data:t}))+": "+h(i(n(755)).call(e,e&&e.location,60,12,{hash:{},data:t}))+" </div> "}function l(e,t){var a="";return a+=' <ul class="list modal-list"> <li class="modal-list-item"><a class="search-options-btn" href="#">'+h(i(n(0)).call(e,"Search Options",{hash:{},data:t}))+'</a></li> <li class="auto-match-dropdown-region modal-list-item"></li> </ul> '}function u(e,t){var a=""
;return a+=' <button type="submit" class="search-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Search",{hash:{},data:t}))+"</span> </button> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this.escapeExpression,p=this
;return d+='<div class="modal-dialog"> <div class="modal-content"> <form id="fix-incorrect-match-form"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon nameplate"></i> <span class="modal-title-text"></span></h4> ',c=a.if.call(t,t&&t.location,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(d+=c),
d+=' </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',c=a.if.call(t,t&&t.showNavigation,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+=' <div class="pane-region"></div> </div> <div class="modal-footer"> <div class="match-search-actions"> <button type="button" class="cancel-btn btn btn-default">'+h(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+"</button> ",c=a.if.call(t,t&&t.showNavigation,{hash:{},inverse:p.noop,fn:p.program(5,u,s),data:s}),
(c||0===c)&&(d+=c),d+=" </div> </div> </form> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+d(i(n(0)).call(e,"Insecure connections will only be allowed when you're on the same network as the server.",{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=" "+d(i(n(0)).call(e,"Insecure connections will be allowed to any server.",{hash:{},data:t}))+" "}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-exclamation-mark"></i> '+d(i(n(0)).call(t,"Server Unreachable",{hash:{},data:s}))+' </h4> </div> <div class="modal-body"> <p> ',
u=a.if.call(t,t&&t.publicAddressMatches,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" </p> <p>"+d(i(n(0)).call(t,"The Allow Fallback to Insecure Connections setting can be changed in Web Settings. Would you like to allow insecure connections?",{hash:{},data:s}))+'</p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+d(i(n(0)).call(t,"No",{hash:{},data:s
}))+'</button> <button type="button" class="confirm-btn btn btn-lg btn-danger">'+d(i(n(0)).call(t,"Yes",{hash:{},data:s}))+"</button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){var n,i="";return i+=' <option value="'+h((n=e&&e.key,typeof n===d?n.apply(e):n))+'">'+h((n=e&&e.title,typeof n===d?n.apply(e):n))+"</option> "}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon file-import"></i> '+h(i(n(0)).call(t,"Import from iTunes",{hash:{},data:s
}))+' </h4> </div> <div class="modal-body"> <p class="help-block">'+h(i(n(0)).call(t,"Importing from iTunes will import your music playlists. It will also import your ratings, the date you added the music, as well as play and skip counts for tracks in your library. Depending on how many tracks you have, this process can take many minutes to complete.",{hash:{},data:s}))+'</p> <div class="form-group ',u=a.unless.call(t,t&&t.showSections,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),
(u||0===u)&&(c+=u),c+='"> <label class="control-label"> '+h(i(n(0)).call(t,"Add to library: ",{hash:{},data:s}))+' <select id="section-list"> ',u=a.each.call(t,t&&t.sections,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+=' </select> </label> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="import-all"> '+h(i(n(0)).call(t,"Overwrite existing playlists",{hash:{},data:s
}))+' </label> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+h(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="button" class="import-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,"Import",{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <h5 class="keyboard-shortcuts-header">'+m((n=e&&e.label,typeof n===g?n.apply(e):n))+'</h5> <ul class="list keyboard-shortcuts-list"> ',n=a.each.call(e,e&&e.shortcuts,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function l(e,t){var r,s="";return s+=' <li> <span class="keyboard-shortcuts-keys"> ',r=a.each.call(e,e&&e.keys,{hash:{},inverse:v.noop,fn:v.program(3,u,t),
data:t}),(r||0===r)&&(s+=r),s+=' </span> <span class="keyboard-shortcuts-label text-muted">'+m(i(n(0)).call(e,e&&e.label,{hash:{},data:t}))+"</span> </li> "}function u(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.plain,{hash:{},inverse:v.noop,fn:v.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.unless.call(e,e&&e.plain,{hash:{},inverse:v.noop,fn:v.program(6,d,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.split,{hash:{},inverse:v.noop,fn:v.program(8,h,t),data:t}),
(n||0===n)&&(i+=n),i+=" "}function c(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-plain">'+m((n=e&&e.s,typeof n===g?n.apply(e):n))+"</span> "}function d(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-key">'+m((n=e&&e.s,typeof n===g?n.apply(e):n))+"</span> "}function h(e,t){return" <br> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g="function",m=this.escapeExpression,v=this
;return f+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon keyboard-wireless"></i> '+m(i(n(0)).call(t,"Keyboard Shortcuts",{hash:{},data:s}))+' </h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',p=a.each.call(t,t&&t.groups,{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),
(p||0===p)&&(f+=p),f+=" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Internet Required",{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Plex Pass Required",{hash:{},data:t}))+" "}function u(e,t){var a=""
;return a+=" "+v(i(n(0)).call(e,"This server cannot reach the Internet. Please verify connectivity and try again.",{hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"This library requires your server be signed in to a Plex Pass account.",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=' <button type="button" class="confirm-btn btn btn-lg btn-primary">'+v(i(n(0)).call(e,"OK",{hash:{},data:t}))+"</button> "}function h(e,t){var n,i=""
;return i+=' <a class="confirm-btn btn btn-lg btn-primary" href="#!/settings/server/'+v((n=e&&e.serverID,typeof n===y?n.apply(e):n))+'"> ',n=a.if.call(e,e&&e.isSignedIn,{hash:{},inverse:b.program(14,f,t),fn:b.program(12,p,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> "}function p(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Settings",{hash:{},data:t}))+" "}function f(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Sign In",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y="function",b=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-exclamation-mark"></i> ',g=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(3,l,s),fn:b.program(1,o,s),data:s}),(g||0===g)&&(m+=g),
m+=' </h4> </div> <div class="modal-body"> <p class="confirm-message"> ',g=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(7,c,s),fn:b.program(5,u,s),data:s}),(g||0===g)&&(m+=g),m+=' </p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+v(i(n(0)).call(t,"Ignore",{hash:{},data:s}))+"</button> ",g=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:b.program(11,h,s),fn:b.program(9,d,s),data:s}),(g||0===g)&&(m+=g),
m+=" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hide-streams-column"}function l(e,t){var r,s="";return s+=' <div class="files"> <h4>'+_(i(n(0)).call(e,"Files",{hash:{},data:t}))+"</h4> ",r=a.each.call(e,e&&e.media,{hash:{},inverse:R.noop,fn:R.programWithDepth(4,u,t,e),data:t}),(r||0===r)&&(s+=r),s+=" </div> "}function u(e,t,n){var i,r=""
;return r+=' <ul class="media-info-file-list well"> ',i=a.if.call(e,n&&n.showDeleteFile,{hash:{},inverse:R.noop,fn:R.program(5,c,t),data:t}),(i||0===i)&&(r+=i),r+=" ",i=a.each.call(e,e&&e.Part,{hash:{},inverse:R.noop,fn:R.programWithDepth(10,p,t,n),data:t}),(i||0===i)&&(r+=i),r+=" </ul> "}function c(e,t){var a,r="";return r+=' <a href="#" data-media-item="'+_((a=null==t||t===!1?t:t.index,typeof a===N?a.apply(e):a))+'" class="delete-btn text-danger pull-right"> <i class="glyphicon bin"></i> ',
a=i(n(20)).call(e,(a=e&&e.Part,null==a||a===!1?a:a.length),"1",{hash:{},inverse:R.program(8,h,t),fn:R.program(6,d,t),data:t}),(a||0===a)&&(r+=a),r+=" </a> "}function d(e,t){var a="";return a+=" "+_(i(n(0)).call(e,"Delete File",{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=" "+_(i(n(0)).call(e,"Delete Files",{hash:{},data:t}))+" "}function p(e,t,n){var i,r="";return r+=" <li> ",i=a.if.call(e,n&&n.showFilepath,{hash:{},inverse:R.program(13,g,t),fn:R.program(11,f,t),data:t}),
(i||0===i)&&(r+=i),r+=" ",i=a.unless.call(e,e&&e.accessible,{hash:{},inverse:R.noop,fn:R.program(15,m,t),data:t}),(i||0===i)&&(r+=i),r+=" </li> "}function f(e,t){var n,i="";return i+=" "+_((n=e&&e.file,typeof n===N?n.apply(e):n))+" "}function g(e,t){var a="";return a+=" "+_(i(n(1305)).call(e,e&&e.file,{hash:{},data:t}))+" "}function m(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.exists,{hash:{},inverse:R.program(18,y,t),fn:R.program(16,v,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function v(e,t){
var a="";return a+=' <span class="label label-danger" data-toggle="tooltip" title="'+_(i(n(0)).call(e,"Please check the permissions for this file.",{hash:{},data:t}))+'">'+_(i(n(0)).call(e,"Inaccessible",{hash:{},data:t}))+"</span> "}function y(e,t){var a="";return a+=' <span class="label label-danger" data-toggle="tooltip" title="'+_(i(n(0)).call(e,"Please check that this file exists and the necessary drive is mounted.",{hash:{},data:t}))+'">'+_(i(n(0)).call(e,"Unavailable",{hash:{},data:t
}))+"</span> "}function b(e,t,r){var s,o="";return o+=' <div class="media"> <div class="props"> <h4>'+_(i(n(0)).call(e,"Media",{hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,e&&e.properties,{hash:{},inverse:R.noop,fn:R.program(21,S,t),data:t}),(s||0===s)&&(o+=s),o+=" </ul> </div> ",s=a.each.call(e,e&&e.Part,{hash:{},inverse:R.noop,fn:R.programWithDepth(23,I,t,r),data:t}),(s||0===s)&&(o+=s),o+=" </div> "}function S(e,t){var a,r=""
;return r+=' <li> <span class="detail-label">'+_(i(n(0)).call(e,e&&e.name,{hash:{},data:t}))+'</span> <span class="detail">'+_((a=e&&e.value,typeof a===N?a.apply(e):a))+"</span> </li> "}function I(e,t,r){var s,o="";return o+=' <div class="part"> <div class="props"> <h4>'+_(i(n(0)).call(e,"Part",{hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,e&&e.properties,{hash:{},inverse:R.noop,fn:R.program(21,S,t),data:t}),(s||0===s)&&(o+=s),o+=' </ul> </div> <div class="streams"> ',
s=a.each.call(e,e&&e.Stream,{hash:{},inverse:R.noop,fn:R.program(24,w,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=a.if.call(e,r&&r.loading,{hash:{},inverse:R.noop,fn:R.program(33,x,t),data:t}),(s||0===s)&&(o+=s),o+=" </div> </div> "}function w(e,t){var r,s="";return s+=' <div class="props"> ',r=i(n(20)).call(e,e&&e.streamType,"1",{hash:{},inverse:R.program(27,C,t),fn:R.program(25,M,t),data:t}),(r||0===r)&&(s+=r),s+=" <ul> ",r=a.each.call(e,e&&e.properties,{hash:{},inverse:R.noop,
fn:R.program(21,S,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> </div> "}function M(e,t){var a="";return a+=" <h4>"+_(i(n(0)).call(e,"Video",{hash:{},data:t}))+"</h4> "}function C(e,t){var a;return a=i(n(20)).call(e,e&&e.streamType,"2",{hash:{},inverse:R.program(30,P,t),fn:R.program(28,D,t),data:t}),a||0===a?a:""}function D(e,t){var a="";return a+=" <h4>"+_(i(n(0)).call(e,"Audio",{hash:{},data:t}))+"</h4> "}function P(e,t){var a;return a=i(n(20)).call(e,e&&e.streamType,"3",{hash:{},inverse:R.noop,
fn:R.program(31,T,t),data:t}),a||0===a?a:""}function T(e,t){var a="";return a+=" <h4>"+_(i(n(0)).call(e,"Subtitles",{hash:{},data:t}))+"</h4> "}function x(e,t){var a="";return a+=' <div class="props"> <h4>'+_(i(n(0)).call(e,"Loading",{hash:{},data:t}))+"...</h4> </div> "}function E(e,t,n){var i;return i=a.if.call(e,n&&n.showFilepath,{hash:{},inverse:R.noop,fn:R.program(36,A,t),data:t}),i||0===i?i:""}function A(e,t){var a,r=""
;return r+=' <div class="modal-footer"> <div class="pull-left"> <a href="'+_((a=e&&e.url,typeof a===N?a.apply(e):a))+'" target="_blank">'+_(i(n(0)).call(e,"View XML",{hash:{},data:t}))+"</a> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var k,L="",_=this.escapeExpression,N="function",R=this
;return L+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+_(i(n(0)).call(t,"Media Info",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="position-ref ',k=a.unless.call(t,t&&t.hasStreams,{hash:{},inverse:R.noop,fn:R.program(1,o,s),
data:s}),(k||0===k)&&(L+=k),L+='"> ',k=a.if.call(t,t&&t.hasFiles,{hash:{},inverse:R.noop,fn:R.program(3,l,s),data:s}),(k||0===k)&&(L+=k),L+=" ",k=a.each.call(t,t&&t.media,{hash:{},inverse:R.noop,fn:R.programWithDepth(20,b,s,t),data:s}),(k||0===k)&&(L+=k),L+=" </div> </div> ",k=a.if.call(t,t&&t.key,{hash:{},inverse:R.noop,fn:R.programWithDepth(35,E,s,t),data:s}),(k||0===k)&&(L+=k),L+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+g((n=null==t||t===!1?t:t.index,typeof n===f?n.apply(e):n))+'" href="#"> ',n=a.if.call(e,e&&e.title,{hash:{},inverse:m.noop,fn:m.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.videoResolution,{hash:{},inverse:m.noop,fn:m.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.bitrate,{
hash:{},inverse:m.noop,fn:m.program(7,d,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function l(e,t){var n,i="";return i+=" "+g((n=e&&e.title,typeof n===f?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function u(e,t){var r,s="";return s+=" "+g(i(n(754)).call(e,e&&e.videoResolution,{hash:{},data:t})),r=a.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(5,c,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function c(e,t){return","}function d(e,t){var a=""
;return a+=" "+g(i(n(753)).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var h,p="",f="function",g=this.escapeExpression,m=this;return p+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon adjust-alt"></i> '+g(i(n(0)).call(t,"Select a Version",{
hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',h=a.each.call(t,t&&t.mediaItems,{hash:{},inverse:m.noop,fn:m.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <p class="text-muted">'+d(i(n(0)).call(e,"Everything you need to experience the best of Plex. Your subscription gives you premium features and exclusive access to new ones.",{hash:{},data:t}))+"</p> "}function l(e,t){var a="";return a+=' <p class="text-muted">'+d(i(n(0)).call(e,'The server "{1}" has not been claimed. This server must be claimed by an account with a Plex Pass subscription.',e&&e.friendlyName,{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-arrow-right"></i> '+d(i(n(0)).call(t,"Go Premium",{hash:{},data:s
}))+' </h4> </div> <div class="modal-body"> <p class="text-center"><i class="plex-image plex-pass"></i></p> <h4 class="text-center">'+d(i(n(0)).call(t,"This feature requires a Plex Pass subscription.",{hash:{},data:s}))+"</h4> ",u=a.if.call(t,t&&t.isClaimed,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+d((u=t&&t.plexPassUrl,
"function"==typeof u?u.apply(t):u))+'" target="_blank">'+d(i(n(0)).call(t,"Learn More",{hash:{},data:s}))+"</a> </p> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <div class="friends-container"></div> <div class="message-container invisible"> <textarea class="message form-control" placeholder="'+d(i(n(0)).call(e,"Say something about this...",{
hash:{},data:t}))+'"></textarea> </div> '}function l(e,t){var a="";return a+=' <div class="empty-message"> '+d(i(n(0)).call(e,"You need {1}friends{2} to recommend media.",'<a class="friends-btn" href="#!/friends">',"</a>",{hash:{},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this
;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon share-alt"></i> '+d(i(n(0)).call(t,"Select Friends",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',u=a.if.call(t,t&&t.hasFriends,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),
(u||0===u)&&(c+=u),c+=' </div> <div class="modal-footer"> <span class="characters-remaining"></span> <button type="button" class="send-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(i(n(0)).call(t,"Send",{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-exclamation-mark"></i> '+u(i(n(0)).call(t,"Limited Connection",{hash:{},data:s}))+" - "+u((o=t&&t.serverName,
"function"==typeof o?o.apply(t):o))+' </h4> </div> <div class="modal-body"> <p> '+u(i(n(0)).call(t,"You are not connected directly to {1} so streaming quality may be limited. You may be able to connect directly to this server by changing your home network settings. {2}Learn more{3}",t&&t.serverName,'<a href="https://help.plex.tv/relay" target="_blank" class="learn-more">',"</a>",{hash:{},data:s
}))+' </p> </div> <div class="modal-footer"> <button type="button" class="confirm-btn btn btn-lg btn-primary">'+u(i(n(0)).call(t,"OK",{hash:{},data:s}))+"</button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,r){var s,o="";return o+=' <h4 class="update-list-title">'+p(i(n(0)).call(e,"New",{hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,r&&r.added,{hash:{},
inverse:f.noop,fn:f.program(2,l,t),data:t}),(s||0===s)&&(o+=s),o+=" </ul> "}function l(e,t){var n="";return n+=" <li>"+p(typeof e===h?e.apply(e):e)+"</li> "}function u(e,t,r){var s,o="";return o+=' <h4 class="update-list-title">'+p(i(n(0)).call(e,"Fixes",{hash:{},data:t}))+"</h4> <ul> ",s=a.each.call(e,r&&r.fixed,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(s||0===s)&&(o+=s),o+=" </ul> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+p(i(n(0)).call(t,"Plex Media Server Release Notes",{hash:{},data:s
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <span class="text-muted">'+p(i(n(0)).call(t,"Version {1}",t&&t.version,{hash:{},data:s}))+"</span> ",c=a.if.call(t,t&&t.added,{hash:{},inverse:f.noop,fn:f.programWithDepth(1,o,s,t),data:s}),(c||0===c)&&(d+=c),d+=" ",c=a.if.call(t,t&&t.fixed,{hash:{},inverse:f.noop,fn:f.programWithDepth(4,u,s,t),data:s}),(c||0===c)&&(d+=c),d+=" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+p((n=e&&e.id,typeof n===f?n.apply(e):n))+'" href="#"> ',n=a.if.call(e,e&&e.name,{hash:{},inverse:g.program(4,u,t),fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:g.noop,fn:g.program(6,c,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function l(e,t){var a=""
;return a+=" "+p(i(n(507)).call(e,e&&e.name,25,{hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+p(i(n(507)).call(e,e&&e.device,25,{hash:{},data:t}))+" "}function c(e,t){return'<i class="cloud-sync-icon glyphicon cloud"></i>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f="function",g=this
;return h+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon iphone"></i> '+p(i(n(0)).call(t,"Choose Destination",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',d=a.each.call(t,t&&t.devices,{hash:{},inverse:g.noop,fn:g.program(1,o,s),
data:s}),(d||0===d)&&(h+=d),h+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+d((a=null==t||t===!1?t:t.index,typeof a===c?a.apply(e):a))+'" href="#"> ',a=i(n(1304)).call(e,(a=e&&e.Part,a=null==a||a===!1?a:a[0],null==a||a===!1?a:a.file),35,{hash:{},data:t}),
(a||0===a)&&(r+=a),r+=" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon file"></i> '+d(i(n(0)).call(t,"Select a File",{hash:{},data:s
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',l=a.each.call(t,t&&t.medias,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=" </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression
;return l+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-arrow-right"></i> '+u(i(n(0)).call(t,"Resume",{hash:{},data:s}))+'</h4> </div> <div class="modal-body"> <ul class="list select-list"> <li class="striped-list-item select-list-item"><a class="offset" data-value="'+u((o=t&&t.offset,
"function"==typeof o?o.apply(t):o))+'" href="#">'+u(i(n(0)).call(t,"Resume from {1}",t&&t.formattedOffset,{hash:{},data:s}))+'</a></li> <li class="striped-list-item select-list-item"><a class="offset" data-value="0" href="#">'+u(i(n(0)).call(t,"Start from beginning",{hash:{},data:s}))+"</a></li> </ul> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r=""
;return r+=' <li><a class="btn-gray show-pane-btn type-btn',a=i(n(20)).call(e,e&&e.selectedPane,e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(a||0===a)&&(r+=a),r+='" href="#" data-pane="'+p((a=e&&e.id,typeof a===h?a.apply(e):a))+'">'+p((a=e&&e.name,typeof a===h?a.apply(e):a))+"</a></li> "}function l(e,t){return" selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this,h="function",p=this.escapeExpression
;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon plex-icon-plex-chevron"></i> '+p(i(n(0)).call(t,"Plex Media Server Downloads",{hash:{},data:s}))+' </h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"> <ul class="list modal-nav-list"> ',
u=a.each.call(t,t&&t.items,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> </div> <div class="server-download-loading loading loading-inline"></div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s=""
;return s+=' <ul class="list select-list select-networks-list dark-scrollbar"> ',r=a.each.call(e,e&&e.networks,{hash:{},inverse:y.noop,fn:y.programWithDepth(2,l,t,e),data:t}),(r||0===r)&&(s+=r),s+=' </ul> <div class="message-container ',r=a.unless.call(e,e&&e.autoSelect,{hash:{},inverse:y.noop,fn:y.program(10,p,t),data:t}),(r||0===r)&&(s+=r),s+='"> <textarea class="message form-control" placeholder="'+S(i(n(0)).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}
function l(e,t,r){var s,o="";return o+=' <li class="striped-list-item select-list-item"> <a class="network ',s=a.if.call(e,r&&r.autoSelect,{hash:{},inverse:y.noop,fn:y.program(3,u,t),data:t}),(s||0===s)&&(o+=s),o+='" data-id="'+S((s=e&&e.key,typeof s===b?s.apply(e):s))+'" href="#"> ',s=i(n(20)).call(e,e&&e.key,"facebook",{hash:{},inverse:y.program(7,d,t),fn:y.program(5,c,t),data:t}),(s||0===s)&&(o+=s),o+=" "+S((s=e&&e.title,typeof s===b?s.apply(e):s))+" </a> </li> "}function u(e,t){
return"selected"}function c(e,t){return' <i class="network-icon glyphicon glyphicon-social facebook"></i> '}function d(e,t){var a,r="";return r+=" ",a=i(n(20)).call(e,e&&e.key,"twitter",{hash:{},inverse:y.noop,fn:y.program(8,h,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function h(e,t){return' <i class="network-icon glyphicon glyphicon-social twitter"></i> '}function p(e,t){return"invisible"}function f(e,t){var a=""
;return a+=' <div class="empty-message"> '+S(i(n(0)).call(e,"You need to {1}link your account{2}.",'<a href="{3}" target="_blank">',"</a>",e&&e.accountUrl,{hash:{},data:t}))+" </div> "}function g(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var m,v="",y=this,b="function",S=this.escapeExpression
;return v+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon share"></i> '+S(i(n(0)).call(t,"Share",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',m=a.if.call(t,t&&t.networks,{hash:{},inverse:y.program(12,f,s),fn:y.program(1,o,s),data:s}),(m||0===m)&&(v+=m),
v+=' </div> <div class="modal-footer"> <span class="characters-remaining"></span> <button type="button" class="share-btn btn btn-primary btn-loading ',m=a.unless.call(t,t&&t.autoSelect,{hash:{},inverse:y.noop,fn:y.program(14,g,s),data:s}),(m||0===m)&&(v+=m),v+='"> <div class="loading loading-sm"></div> <span class="btn-label">'+S(i(n(0)).call(t,"Share",{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-exclamation-mark"></i> '+l(i(n(0)).call(t,"Stop this item",{hash:{},data:s
}))+'</h4> </div> <div class="modal-body"> <p class="confirm-message"> '+l(i(n(0)).call(t,"Do you wish to stop this item's playback?",{hash:{},data:s}))+"<br/> "+l(i(n(0)).call(t,"You can add a message to the user below.",{hash:{},data:s}))+' </p> <div class="message-container"> <textarea class="message form-control"></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+l(i(n(0)).call(t,"Cancel",{hash:{},data:s
}))+'</button> <button type="button" class="stop-media-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+l(i(n(0)).call(t,"Stop",{hash:{},data:s}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <p class="text-muted"><i class="glyphicon warning-sign"></i> '+d((n=e&&e.Status,
n=null==n||n===!1?n:n.failure,typeof n===c?n.apply(e):n))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Sync Status",{hash:{},data:s
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4 class="sync-item-title">'+d((l=t&&t.rootTitle,typeof l===c?l.apply(t):l))+" &middot; "+d((l=t&&t.title,typeof l===c?l.apply(t):l))+"</h4> ",l=a.if.call(t,(l=t&&t.Status,null==l||l===!1?l:l.failure),{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=' <div class="sync-status-list-container"></div> </div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=" "+h((n=e&&e.status,typeof n===d?n.apply(e):n))+" "}function l(e,t){var a="";return a+=" "+h(i(n(0)).call(e,"There was a problem preparing for optimization.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this
;return c+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-error-icon"><i class="glyphicon circle-exclamation-mark"></i></p> </div> <div class="col-sm-8"> <h4> ',u=a.if.call(t,t&&t.status,{hash:{},inverse:p.program(3,l,s),fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=' </h4> <h4><a class="try-again-link" href="#">'+h(i(n(0)).call(t,"Try again",{hash:{},data:s}))+"</a></h4> </div> </div> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"disabled"}function l(e,t){return"selected"}function u(e,t,a){var r,s="";return s+=' <option value="'+p((r=e&&e.id,typeof r===h?r.apply(e):r))+'" ',r=i(n(20)).call(e,a&&a.selectedLocationID,e&&e.id,{hash:{},inverse:f.noop,fn:f.program(3,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+p(i(n(755)).call(e,e&&e.path,50,20,{hash:{},data:t}))+"</option> "}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<label class="control-label" for="convert-storage-location">'+p(i(n(0)).call(t,"Version storage location",{hash:{},data:s}))+'</label> <select id="convert-storage-location" class="storage-location-select" name="storageLocation" ',c=a.if.call(t,t&&t.disableLocation,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='> <option value="-1" ',
c=i(n(20)).call(t,t&&t.selectedLocationID,-1,{hash:{},inverse:f.noop,fn:f.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+=">"+p(i(n(0)).call(t,"In folders with original items",{hash:{},data:s}))+"</option> ",c=a.each.call(t,t&&t.locations,{hash:{},inverse:f.noop,fn:f.programWithDepth(5,u,s,t),data:s}),(c||0===c)&&(d+=c),d+=' </select> <p class="help-block">'+p(i(n(0)).call(t,'A "Plex Versions" folder will be created in your chosen location.',{hash:{},data:s}))+"</p> "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return"checked"}function u(e,t){var n,i="";return i+='value="'+v((n=e&&e.policy,n=null==n||n===!1?n:n.value,typeof n===m?n.apply(e):n))+'"'}function c(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:y.program(10,h,t),fn:y.program(8,d,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function d(e,t){var a=""
;return a+=" "+v(i(n(0)).call(e,"A large number of sync items may be time-consuming to convert, and the time to upload is dependent on your bandwidth. A large number of high quality items may take a very long time. If you have trouble, try reducing the number of items or your quality setting.",{hash:{},data:t}))+" "}function h(e,t){var a=""
;return a+=" "+v(i(n(0)).call(e,"A large number of sync items may be time-consuming to convert and transfer to your device. If you have trouble, try reducing the number of items.",{hash:{},data:t}))+" "}function p(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"A large number of items may be time-consuming to convert. If you have trouble, try reducing the number of items.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var f,g="",m="function",v=this.escapeExpression,y=this;return g+='<div class="form-group ',f=a.unless.call(t,t&&t.showUnwatched,{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(f||0===f)&&(g+=f),g+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-unwatched" name="policyUnwatched" ',f=a.if.call(t,(f=t&&t.policy,null==f||f===!1?f:f.unwatched),{hash:{},inverse:y.noop,fn:y.program(3,l,s),data:s}),(f||0===f)&&(g+=f),g+="> "+v(i(n(0)).call(t,"Unwatched only",{hash:{},
data:s}))+' </label> </div> <div class="form-group ',f=a.unless.call(t,t&&t.isDirectory,{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(f||0===f)&&(g+=f),g+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-scope" name="policyScope" value="count" ',f=i(n(20)).call(t,(f=t&&t.policy,null==f||f===!1?f:f.scope),"count",{hash:{},inverse:y.noop,fn:y.program(3,l,s),data:s}),(f||0===f)&&(g+=f),g+="> "+v(i(n(0)).call(t,"Limit to",{hash:{},data:s
}))+' <input type="number" id="convert-policy-value" name="policyValue" class="policy-value-control form-control" ',f=a.if.call(t,(f=t&&t.policy,null==f||f===!1?f:f.value),{hash:{},inverse:y.noop,fn:y.program(5,u,s),data:s}),(f||0===f)&&(g+=f),g+="> "+v(i(n(0)).call(t,"items",{hash:{},data:s}))+' </label> <p class="convert-warning help-block ',f=a.unless.call(t,t&&t.showLimitWarning,{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(f||0===f)&&(g+=f),
g+='"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> ',f=a.if.call(t,t&&t.isSync,{hash:{},inverse:y.program(12,p,s),fn:y.program(7,c,s),data:s}),(f||0===f)&&(g+=f),g+=" </span> </p> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"disabled"}function l(e,t,r){var s,o="";return o+=' <option value="'+g((s=e&&e.id,
typeof s===m?s.apply(e):s))+'" ',s=i(n(20)).call(e,(s=r&&r.item,null==s||s===!1?s:s.targetTagID),e&&e.id,{hash:{},inverse:v.noop,fn:v.program(4,u,t),data:t}),(s||0===s)&&(o+=s),o+="> "+g((s=e&&e.tag,typeof s===m?s.apply(e):s)),s=a.if.call(e,(s=e&&e.mediaSettings,null==s||s===!1?s:s.videoResolution),{hash:{},inverse:v.noop,fn:v.program(6,c,t),data:t}),(s||0===s)&&(o+=s),o+=" </option> "}function u(e,t){return"selected"}function c(e,t){var a=""
;return a+=" - "+g(i(n(186)).call(e,e&&e.mediaSettings,{hash:{},data:t}))}function d(e,t,a){var r,s="";return s+=' <option value="'+g((r=e&&e.title,typeof r===m?r.apply(e):r))+'" ',r=i(n(20)).call(e,(r=a&&a.selectedProfile,null==r||r===!1?r:r.title),e&&e.title,{hash:{},inverse:v.noop,fn:v.program(4,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+g((r=e&&e.title,typeof r===m?r.apply(e):r))+" </option> "}function h(e,t,a){var r,s="";return s+=' <option value="'+g((r=e&&e.index,
typeof r===m?r.apply(e):r))+'" ',r=i(n(20)).call(e,(r=a&&a.selectedCustomQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(4,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+g(i(n(186)).call(e,e,{hash:{},data:t}))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g=this.escapeExpression,m="function",v=this;return f+='<select class="convert-target-select" name="target" ',p=a.if.call(t,t&&t.disableTarget,{hash:{},inverse:v.noop,
fn:v.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+="> ",p=a.each.call(t,t&&t.targets,{hash:{},inverse:v.noop,fn:v.programWithDepth(3,l,s,t),data:s}),(p||0===p)&&(f+=p),f+=' <option value="-1" ',p=a.unless.call(t,(p=t&&t.item,null==p||p===!1?p:p.targetTagID),{hash:{},inverse:v.noop,fn:v.program(4,u,s),data:s}),(p||0===p)&&(f+=p),f+=">"+g(i(n(0)).call(t,"Custom",{hash:{},data:s
}))+'</option> </select> <div class="convert-custom-target-container"> <input type="text" class="convert-target-title form-control" name="targetTitle" class="form-control" value="'+g((p=t&&t.item,p=null==p||p===!1?p:p.target,typeof p===m?p.apply(t):p))+'" placeholder="'+g(i(n(0)).call(t,"Quality Name",{hash:{},data:s}))+'"> <select class="convert-target-profile-select" name="targetProfile"> ',p=a.each.call(t,t&&t.profiles,{hash:{},inverse:v.noop,fn:v.programWithDepth(8,d,s,t),data:s}),
(p||0===p)&&(f+=p),f+=' </select> <select class="convert-target-quality-select" name="targetQuality"> ',p=a.each.call(t,t&&t.availableCustomQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(10,h,s,t),data:s}),(p||0===p)&&(f+=p),f+=' </select> </div> <p class="help-block">'+g(i(n(0)).call(t,"Plex will convert your media to this quality. Each version will be stored in a separate file.",{hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return h(i(n(0)).call(e,"Optimize",{hash:{},data:t}))}function u(e,t){return h(i(n(0)).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this.escapeExpression,p=this;return d+='<form id="convert-form" class="settings-container"> <div class="modal-body"> <div class="form-group ',c=a.unless.call(t,t&&t.showRemuxOnlyWarning,{hash:{},
inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='"> <p class="convert-warning help-block"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> '+h(i(n(0)).call(t,"Video optimization may take a long time to complete on this server. You'll be able to use Plex normally while you wait.",{hash:{},data:s}))+' </span> </p> </div> <div class="form-group"> <label class="control-label" for="convert-title">'+h(i(n(0)).call(t,"Title",{
hash:{},data:s}))+'</label> <input type="text" id="convert-title" name="title" class="form-control" value="'+h((c=t&&t.conversionItem,c=null==c||c===!1?c:c.title,"function"==typeof c?c.apply(t):c))+'" placeholder="'+h((c=t&&t.conversionItem,c=null==c||c===!1?c:c.title,
"function"==typeof c?c.apply(t):c))+'"> </div> <div class="policy-region"></div> <div class="targets-region"></div> <div class="location-region"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">'+h(i(n(0)).call(t,"Cancel",{hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',c=a.if.call(t,t&&t.isNew,{hash:{},
inverse:p.program(5,u,s),fn:p.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+="</span> </button> </div> </form> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="loading loading-inline"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon restart"></i> '+(0,this.escapeExpression)(i(n(0)).call(t,"Optimize",{hash:{},data:s}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-success-icon"><i class="glyphicon ok-2"></i></p> </div> <div class="col-sm-8"> <h4>'+l(i(n(0)).call(t,"This media is being converted.",{hash:{},data:s
}))+"</h4> <h4>"+l(i(n(0)).call(t,"Watch the status of the conversion {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:s}))+"</h4> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-error-icon"><i class="glyphicon circle-exclamation-mark"></i></p> </div> <div class="col-sm-8"> <h4>'+l(i(n(0)).call(t,"There was a problem syncing this media.",{hash:{},data:s}))+'</h4> <h4><a class="try-again-link" href="#">'+l(i(n(0)).call(t,"Try again",{hash:{},data:s}))+"</a></h4> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="videoQuality"> ',n=a.if.call(e,e&&e.supportsOriginalQuality,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.availableVideoQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(5,c,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function l(e,t){var a,r="";return r+=' <option value="-1" ',
a=i(n(20)).call(e,(a=e&&e.selectedVideoQuality,null==a||a===!1?a:a.index),-1,{hash:{},inverse:v.noop,fn:v.program(3,u,t),data:t}),(a||0===a)&&(r+=a),r+="> "+y(i(n(0)).call(e,"Original",{hash:{},data:t}))+" </option> "}function u(e,t){return"selected"}function c(e,t,a){var r,s="";return s+=' <option value="'+y((r=e&&e.index,typeof r===b?r.apply(e):r))+'" ',r=i(n(20)).call(e,(r=a&&a.selectedVideoQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,u,t),data:t}),
(r||0===r)&&(s+=r),s+="> "+y(i(n(186)).call(e,e,{hash:{},data:t}))+" </option> "}function d(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="musicQuality"> ',n=a.each.call(e,e&&e.availableMusicQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(8,h,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function h(e,t,a){var r,s="";return s+=' <option value="'+y((r=e&&e.index,typeof r===b?r.apply(e):r))+'" ',r=i(n(20)).call(e,(r=a&&a.selectedMusicQuality,
null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+y(i(n(186)).call(e,e,{hash:{},data:t}))+" </option> "}function p(e,t){var n,i="";return i+=' <select class="sync-quality-select" name="photoQuality"> ',n=a.each.call(e,e&&e.availablePhotoQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(11,f,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function f(e,t,a){var r,s="";return s+=' <option value="'+y((r=e&&e.index,
typeof r===b?r.apply(e):r))+'" ',r=i(n(20)).call(e,(r=a&&a.selectedPhotoQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+y((r=e&&e.title,typeof r===b?r.apply(e):r))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this,y=this.escapeExpression,b="function";return g=i(n(20)).call(t,t&&t.typeElement,"video",{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),(g||0===g)&&(m+=g),
m+=" ",g=i(n(20)).call(t,t&&t.typeElement,"audio",{hash:{},inverse:v.noop,fn:v.program(7,d,s),data:s}),(g||0===g)&&(m+=g),m+=" ",g=i(n(20)).call(t,t&&t.typeElement,"photo",{hash:{},inverse:v.noop,fn:v.program(10,p,s),data:s}),(g||0===g)&&(m+=g),m+=' <p class="help-block">'+y(i(n(0)).call(t,"Plex will convert your media to this quality and transfer the converted media to your device.",{hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return d(i(n(0)).call(e,"Sync",{hash:{},data:t}))}function l(e,t){return d(i(n(0)).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return c+='<form id="sync-form" class="settings-container"> <div class="modal-body"> <div class="form-group"> <label class="control-label" for="sync-title">'+d(i(n(0)).call(t,"Title",{hash:{},data:s
}))+'</label> <input type="text" id="sync-title" name="title" class="form-control" value="'+d((u=t&&t.syncItem,u=null==u||u===!1?u:u.title,"function"==typeof u?u.apply(t):u))+'" placeholder="'+d((u=t&&t.syncItem,u=null==u||u===!1?u:u.title,"function"==typeof u?u.apply(t):u))+'"> </div> <div class="policy-region"></div> <div class="quality-region"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">'+d(i(n(0)).call(t,"Cancel",{hash:{},data:s
}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',u=a.if.call(t,t&&t.isNew,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+="</span> </button> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var o="";return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download"></i> '+(0,this.escapeExpression)(i(n(0)).call(t,"Sync",{hash:{},data:s}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-success-icon"><i class="glyphicon ok-2"></i></p> </div> <div class="col-sm-8"> <h4>'+l(i(n(0)).call(t,"This media is being synced.",{hash:{},data:s
}))+"</h4> <h4>"+l(i(n(0)).call(t,"Watch the status of the sync {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:s}))+"</h4> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o=""
;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon restart"></i> <span class="generator-title"></span></h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4> <span class="generator-failure-container pull-right"> <i class="generator-failure-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="generator-failure-message text-muted"></span> </span> <span class="generator-items-count"></span> &middot; <span class="generator-total-size"></span> </h4> <div class="list-region"></div> <div class="list-feedback-container"> <span class="loading hidden"></span> <span class="error-message text-muted hidden"> '+(0,
this.escapeExpression)(i(n(0)).call(t,"There was a problem loading these items.",{hash:{},data:s}))+" </span> </div> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=" "+y((n=e&&e.title,typeof n===v?n.apply(e):n))+" "}function l(e,t){var a,r="";return r+=" ",a=i(n(20)).call(e,e&&e.type,"home",{hash:{},inverse:b.program(6,c,t),fn:b.program(4,u,t),data:t
}),(a||0===a)&&(r+=a),r+=" "}function u(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Add User",{hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Invite Friend",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Save Changes",{hash:{},data:t}))+" "}function h(e,t){var a,r="";return r+=" ",a=i(n(20)).call(e,e&&e.type,"home",{hash:{},inverse:b.program(13,f,t),fn:b.program(11,p,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function p(e,t){var a=""
;return a+=" "+y(i(n(0)).call(e,"Add",{hash:{},data:t}))+" "}function f(e,t){var a="";return a+=" "+y(i(n(0)).call(e,"Invite",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v="function",y=this.escapeExpression,b=this
;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <div class="modal-poster media-poster img-circle placeholder-friend"></div> <h4 class="modal-title"> ',g=a.if.call(t,t&&t.title,{hash:{},inverse:b.program(3,l,s),fn:b.program(1,o,s),data:s}),(g||0===g)&&(m+=g),
m+=' </h4> </div> <form id="share-server-form"> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"></div> <div class="modal-body-pane dark-scrollbar"></div> </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+y(i(n(0)).call(t,"Cancel",{hash:{},data:s
}))+'</button> <button type="submit" class="next-btn btn btn-lg btn-primary disabled">'+y(i(n(0)).call(t,"Next",{hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading hidden"> <div class="loading loading-sm"></div> <span class="btn-label"> ',g=a.if.call(t,t&&t.title,{hash:{},inverse:b.program(10,h,s),fn:b.program(8,d,s),data:s}),(g||0===g)&&(m+=g),m+=" </span> </button> </div> </form> </div> </div> "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r="";return r+=' <div class="restricted-name-group form-group"> <input type="text" id="restricted-title" name="title" class="form-control" placeholder="'+w(i(n(0)).call(e,"Name",{hash:{},data:t}))+'" value="'+w((a=e&&e.homeUser,a=null==a||a===!1?a:a.title,typeof a===M?a.apply(e):a))+'"> </div> '}function l(e,t){var n,i="";return i+=' <h3 class="friend-title"> ',
n=a.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.title),{hash:{},inverse:C.program(6,c,t),fn:C.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=' </h3> <p class="text-muted"> ',n=a.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.email),{hash:{},inverse:C.program(10,h,t),fn:C.program(8,d,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function u(e,t){var n,i="";return i+=" "+w((n=e&&e.friend,n=null==n||n===!1?n:n.title,typeof n===M?n.apply(e):n))+" "}function c(e,t){var n,i=""
;return i+=" "+w((n=e&&e.friend,n=null==n||n===!1?n:n.username,typeof n===M?n.apply(e):n))+" "}function d(e,t){var n,i="";return i+=" "+w((n=e&&e.friend,n=null==n||n===!1?n:n.email,typeof n===M?n.apply(e):n))+" "}function h(e,t){var a="";return a+=" "+w(i(n(0)).call(e,"An invite will be sent to this user.",{hash:{},data:t}))+" "}function p(e,t){var n,i="";return i+=' <div class="edit-friend-footer"> ',n=a.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.restricted),{hash:{},
inverse:C.program(18,v,t),fn:C.program(13,f,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function f(e,t){var n,i="";return i+=" ",n=a.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.guest),{hash:{},inverse:C.program(16,m,t),fn:C.program(14,g,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function g(e,t){var a="";return a+=' <button type="button" class="disable-guest-btn btn btn-sm btn-danger">'+w(i(n(0)).call(e,"Disable guest",{hash:{},data:t}))+"</button> "}function m(e,t){var a=""
;return a+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+w(i(n(0)).call(e,"Delete user",{hash:{},data:t}))+"</button> "}function v(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.canRemoveFriend,{hash:{},inverse:C.noop,fn:C.program(19,y,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.canRemoveHomeUser,{hash:{},inverse:C.noop,fn:C.program(21,b,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function y(e,t){var a=""
;return a+=' <button type="button" class="remove-friend-btn btn btn-sm btn-danger">'+w(i(n(0)).call(e,"Remove this friend",{hash:{},data:t}))+"</button> "}function b(e,t){var a="";return a+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+w(i(n(0)).call(e,"Remove from home",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var S,I="",w=this.escapeExpression,M="function",C=this
;return I+='<div class="edit-friend-header"> <div class="media-poster img-circle placeholder-friend"></div> ',S=a.if.call(t,(S=t&&t.homeUser,null==S||S===!1?S:S.restricted),{hash:{},inverse:C.program(3,l,s),fn:C.program(1,o,s),data:s}),(S||0===S)&&(I+=S),I+=" </div> ",S=a.if.call(t,t&&t.showActions,{hash:{},inverse:C.noop,fn:C.program(12,p,s),data:s}),(S||0===S)&&(I+=S),I+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<li> <a class="btn-gray change-pane-btn disabled" data-pane="general" data-pane-id="general" href="#"> <i class="modal-nav-icon glyphicon user"></i> '+l(i(n(0)).call(t,"General",{hash:{},data:s}))+' </a> </li> <li class="owned-list-header modal-nav-list-header">'+l(i(n(0)).call(t,"My Servers",{hash:{},data:s
}))+'</li> <li class="owned-servers-container"></li> <li> <a class="btn-gray change-pane-btn disabled" data-pane="restrictions" data-pane-id="restrictions" href="#"> <i class="modal-nav-icon glyphicon ban"></i> '+l(i(n(0)).call(t,"Restrictions",{hash:{},data:s}))+' </a> </li> <li class="shared-list-header modal-nav-list-header">'+l(i(n(0)).call(t,"Shared With Me",{hash:{},data:s}))+'</li> <li class="shared-servers-container"></li> '})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<span class="modal-nav-icon friend-server-status ',(s=n.status)?r=s.call(t,{hash:{},data:a}):(s=t&&t.status,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),
o+=l(r)+'"> <i class="friend-server-status-icon unknown glyphicon circle-question-mark"></i> <i class="friend-server-status-icon available glyphicon circle-ok"></i> <i class="friend-server-status-icon unavailable glyphicon circle-exclamation-mark"></i> </span> '+l((r=t&&t.server,r=null==r||r===!1?r:r.name,"function"==typeof r?r.apply(t):r))+" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="server-header"> <i class="plex-image server server-xs"></i> <h3 class="server-title"></h3> <a class="server-status-btn unknown" href="#"> <span class="server-status-label available">'+l(i(n(0)).call(t,"Available",{hash:{},data:s}))+'</span> <span class="server-status-label unavailable">'+l(i(n(0)).call(t,"Unavailable",{hash:{},data:s
}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(0)).call(t,"Unauthorized",{hash:{},data:s}))+'</span> <span class="server-status-label unknown">'+l(i(n(0)).call(t,"Unknown",{hash:{},data:s}))+'</span> <i class="server-details-open-icon glyphicon chevron-down"></i> <i class="server-details-close-icon glyphicon chevron-up"></i> </a> </div> <div class="server-details transition-out"> <h4>'+l(i(n(0)).call(t,"Info",{hash:{},data:s
}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Version",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row server-detail-last-seen-row hidden"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Last Seen",{hash:{},data:s
}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Address",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Port",{hash:{},data:s
}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+l(i(n(0)).call(t,"Share",{hash:{},data:s}))+"</h4> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s=""
;return s+=' <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',r=a.if.call(e,(r=e&&e.user,null==r||r===!1?r:r.allowChannels),{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+p(i(n(0)).call(e,"Allow Channels",{hash:{},data:t
}))+' </label> </div> </div> </div> <div class="row"> <h4 class="text-muted plex-pass-restrictions-header"> <span class="plex-pass-restrictions-title">'+p(i(n(0)).call(e,"Plex Pass restrictions",{hash:{},data:t}))+'</span> <a href="'+p((r=e&&e.plexPassUrl,typeof r===f?r.apply(e):r))+'" target="_blank">'+p(i(n(0)).call(e,"Learn More",{hash:{},data:t}))+'</a> </h4> <p class="text-center"> </p> </div> '}function l(e,t){return"checked"}function u(e,t){var r,s=""
;return s+=' <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',r=a.if.call(e,(r=e&&e.user,null==r||r===!1?r:r.allowChannels),{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+p(i(n(0)).call(e,"Allow Channels",{hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this,p=this.escapeExpression,f="function"
;return c=a.unless.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+=' <div class="plex-pass-restrictions"> <div class="overlay"></div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <div class="checkbox"> <label for="allow-sync-cb"> <input type="checkbox" id="allow-sync-cb" name="allowSync" ',c=a.if.call(t,(c=t&&t.user,null==c||c===!1?c:c.allowSync),{hash:{},inverse:h.noop,fn:h.program(2,l,s),data:s}),
(c||0===c)&&(d+=c),d+="> "+p(i(n(0)).call(t,"Allow Sync",{hash:{},data:s}))+' </label> </div> <div class="checkbox"> <label for="allow-camera-upload-images-cb"> <input type="checkbox" id="allow-camera-upload-images-cb" name="allowCameraUpload" ',c=a.if.call(t,(c=t&&t.user,null==c||c===!1?c:c.allowCameraUpload),{hash:{},inverse:h.noop,fn:h.program(2,l,s),data:s}),(c||0===c)&&(d+=c),d+="> "+p(i(n(0)).call(t,"Allow Camera Upload",{hash:{},data:s
}))+' </label> <p class="help-block">'+p(i(n(0)).call(t,"Enabling this option will allow this user to upload media to your server.",{hash:{},data:s}))+"</p> </div> ",c=a.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:h.noop,fn:h.program(4,u,s),data:s}),(c||0===c)&&(d+=c),d+=' </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+p((c=t&&t.moviesIcon,
typeof c===f?c.apply(t):c))+'"></i> '+p(i(n(0)).call(t,"Movies",{hash:{},data:s}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+p(i(n(0)).call(t,"Only allow movies matching the ratings or labels below.",{hash:{},data:s}))+' </div> </div> <div class="form-group"> <label for="filter-movie-contentRating" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Ratings",{hash:{},data:s
}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-movie-contentRating" class="form-control tag-input-hidden" name="filterMovies" data-filter="contentRating" data-section-type="movie" placeholder="'+p(i(n(0)).call(t,"Allow all ratings",{hash:{},data:s}))+'" value="'+p((c=t&&t.user,c=null==c||c===!1?c:c.filterMovies,c=null==c||c===!1?c:c.contentRating,
typeof c===f?c.apply(t):c))+'"> </div> </div> <div class="form-group"> <label for="filter-movie-label" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Labels",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-movie-label" class="form-control tag-input-hidden" name="filterMovies" data-filter="label" data-section-type="movie" placeholder="'+p(i(n(0)).call(t,"Allow all labels",{hash:{},data:s}))+'" value="'+p((c=t&&t.user,c=null==c||c===!1?c:c.filterMovies,
c=null==c||c===!1?c:c.label,typeof c===f?c.apply(t):c))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+p((c=t&&t.showsIcon,typeof c===f?c.apply(t):c))+'"></i> '+p(i(n(0)).call(t,"TV Shows",{hash:{},data:s}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+p(i(n(0)).call(t,"Only allow TV shows matching the ratings or labels below.",{hash:{},data:s
}))+' </div> </div> <div class="form-group"> <label for="filter-show-contentRating" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Ratings",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-show-contentRating" class="form-control tag-input-hidden" name="filterTelevision" data-filter="contentRating" data-section-type="show" placeholder="'+p(i(n(0)).call(t,"Allow all ratings",{hash:{},data:s}))+'" value="'+p((c=t&&t.user,c=null==c||c===!1?c:c.filterTelevision,
c=null==c||c===!1?c:c.contentRating,typeof c===f?c.apply(t):c))+'"> </div> </div> <div class="form-group"> <label for="filter-show-label" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Labels",{hash:{},data:s}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-show-label" class="form-control tag-input-hidden" name="filterTelevision" data-filter="label" data-section-type="show" placeholder="'+p(i(n(0)).call(t,"Allow all labels",{hash:{},data:s}))+'" value="'+p((c=t&&t.user,
c=null==c||c===!1?c:c.filterTelevision,c=null==c||c===!1?c:c.label,typeof c===f?c.apply(t):c))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+p((c=t&&t.musicIcon,typeof c===f?c.apply(t):c))+'"></i> '+p(i(n(0)).call(t,"Albums",{hash:{},data:s}))+' </label> </div> <div class="form-group"> <label for="filter-artist-label" class="col-sm-3 control-label"> '+p(i(n(0)).call(t,"Labels",{hash:{},data:s
}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-artist-label" class="form-control tag-input-hidden" name="filterMusic" data-filter="label" data-section-type="artist" placeholder="'+p(i(n(0)).call(t,"Allow all labels",{hash:{},data:s}))+'" value="'+p((c=t&&t.user,c=null==c||c===!1?c:c.filterMusic,c=null==c||c===!1?c:c.label,typeof c===f?c.apply(t):c))+'"> </div> </div> </div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){
return"checked"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",u=this.escapeExpression,c=this;return l+='<div class="checkbox"> <label for="share-section-'+u((s=t&&t.section,s=null==s||s===!1?s:s.id,"function"==typeof s?s.apply(t):s))+'-cb"> <input type="checkbox" id="share-section-'+u((s=t&&t.section,s=null==s||s===!1?s:s.id,"function"==typeof s?s.apply(t):s))+'-cb" value="'+u((s=t&&t.section,s=null==s||s===!1?s:s.id,"function"==typeof s?s.apply(t):s))+'" ',
s=n.if.call(t,t&&t.isChecked,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(s||0===s)&&(l+=s),l+='> <i class="section-type-icon glyphicon ',(o=n.typeIcon)?s=o.call(t,{hash:{},data:a}):(o=t&&t.typeIcon,s="function"==typeof o?o.call(t,{hash:{},data:a}):o),l+=u(s)+'"></i> '+u((s=t&&t.section,s=null==s||s===!1?s:s.title,"function"==typeof s?s.apply(t):s))+" </label> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"show-libraries"}function l(e,t){var r,s="";return s+=' <li class="share-section-list-item"> <div class="checkbox"> <label for="share-all-libraries-'+y((r=e&&e.server,r=null==r||r===!1?r:r.machineIdentifier,typeof r===v?r.apply(e):r))+'-cb"> <input type="checkbox" id="share-all-libraries-'+y((r=e&&e.server,r=null==r||r===!1?r:r.machineIdentifier,
typeof r===v?r.apply(e):r))+'-cb" name="share-all-libraries-cb" value="all" ',r=a.if.call(e,e&&e.allLibraries,{hash:{},inverse:b.noop,fn:b.program(4,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+y(i(n(0)).call(e,"All Libraries",{hash:{},data:t}))+" </label> </div> </li> "}function u(e,t){return"checked"}function c(e,t){var a="";return a+=' <p class="text-muted">'+y(i(n(0)).call(e,"Loading...",{hash:{},data:t}))+"</p> "}function d(e,t){var n;return n=a.if.call(e,e&&e.hasFailed,{hash:{},
inverse:b.program(11,p,t),fn:b.program(9,h,t),data:t}),n||0===n?n:""}function h(e,t){var a,r="";return r+=' <p class="text-muted">'+y(i(n(0)).call(e,"We were unable to retrieve libraries for {1}. Please ensure the server is signed in to your Plex account.",(a=e&&e.server,null==a||a===!1?a:a.name),{hash:{},data:t}))+"</p> "}function p(e,t){var n;return n=a.unless.call(e,e&&e.hasSections,{hash:{},inverse:b.noop,fn:b.program(12,f,t),data:t}),n||0===n?n:""}function f(e,t){var a=""
;return a+=' <p class="text-muted">'+y(i(n(0)).call(e,"No libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v="function",y=this.escapeExpression,b=this;return m+='<ul id="'+y((g=t&&t.server,g=null==g||g===!1?g:g.machineIdentifier,typeof g===v?g.apply(t):g))+'-section-list" class="list share-section-list ',g=a.unless.call(t,t&&t.allLibraries,{hash:{},inverse:b.noop,fn:b.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+='"> ',
g=a.if.call(t,t&&t.hasSections,{hash:{},inverse:b.noop,fn:b.program(3,l,s),data:s}),(g||0===g)&&(m+=g),m+=" </ul> ",g=a.if.call(t,t&&t.isPending,{hash:{},inverse:b.program(8,d,s),fn:b.program(6,c,s),data:s}),(g||0===g)&&(m+=g),m+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<div class="server-header"> <i class="plex-image server server-xs"></i> <h3 class="server-title"></h3> <a class="server-status-btn unknown" href="#"> <span class="server-status-label available">'+l(i(n(0)).call(t,"Available",{hash:{},data:s}))+'</span> <span class="server-status-label unavailable">'+l(i(n(0)).call(t,"Unavailable",{hash:{},data:s}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(0)).call(t,"Unauthorized",{hash:{},data:s
}))+'</span> <span class="server-status-label unknown">'+l(i(n(0)).call(t,"Unknown",{hash:{},data:s}))+'</span> <i class="server-details-open-icon glyphicon chevron-down"></i> <i class="server-details-close-icon glyphicon chevron-up"></i> </a> </div> <div class="server-details transition-out"> <h4>'+l(i(n(0)).call(t,"Info",{hash:{},data:s}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Version",{hash:{},data:s
}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Last Seen",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Address",{hash:{},data:s
}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(0)).call(t,"Port",{hash:{},data:s}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+l(i(n(0)).call(t,"Sharing",{hash:{},data:s
}))+'</h4> <div class="share-server-container"> <div class="server-restriction-allow-sync share-section-list-item no-checkbox"> <i class="section-type-icon glyphicon ok-2"></i> '+l(i(n(0)).call(t,"Sync Allowed",{hash:{},data:s}))+' </div> <ul class="list share-section-list show-libraries"></ul> </div> </div> <div class="share-details-footer"> <button type="button" class="leave-server-btn btn btn-sm btn-danger">'+l(i(n(0)).call(t,"Leave Server",{hash:{},data:s}))+"</button> </div> "})
},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<li class="share-section-list-item no-checkbox"> <i class="section-type-icon glyphicon ',(s=n.typeIcon)?r=s.call(t,{hash:{},data:a}):(s=t&&t.typeIcon,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+'"></i> '+l((r=t&&t.section,r=null==r||r===!1?r:r.title,
"function"==typeof r?r.apply(t):r))+" </li> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <div class="existing-user-group username-group"> <div class="media-poster img-circle placeholder-square"></div> <div class="username-group-input-container"> <i class="validation-success-icon glyphicon circle-ok"></i> <i class="validation-error-icon glyphicon circle-exclamation-mark"></i> <input type="text" class="form-control hidden" name="username" placeholder="'+d(i(n(0)).call(e,"Username or email",{hash:{},data:t
}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-existing-user-btn btn btn-primary">'+d(i(n(0)).call(e,"Add an Existing Plex User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(i(n(0)).call(e,"Adding a Plex user to your home will allow you to quickly switch accounts. The invited user will be asked to confirm home membership.",{hash:{},data:t
}))+'</p> </div> </div> <div class="restricted-user-group username-group"> <div class="media-poster img-circle placeholder-friend"></div> <div class="username-group-input-container"> <input type="text" class="form-control hidden" name="title" placeholder="'+d(i(n(0)).call(e,"Name",{hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-restricted-user-btn btn btn-primary">'+d(i(n(0)).call(e,"Create a Managed User",{hash:{},data:t
}))+'</button> <p class="help-block">'+d(i(n(0)).call(e,"Managed users are only available when signed in with an account in your home. You can choose any name you like and you'll be able to set restrictions on accessible media.",{hash:{},data:t}))+"</p> </div> </div> "}function l(e,t){var a=""
;return a+=' <div class="friend-group username-group"> <div class="media-poster img-circle placeholder-friend"></div> <div class="username-group-input-container"> <i class="validation-success-icon glyphicon circle-ok"></i> <i class="validation-error-icon glyphicon circle-exclamation-mark"></i> <input type="text" class="form-control" name="username" placeholder="'+d(i(n(0)).call(e,"Username or email",{hash:{},data:t
}))+'" autocorrect="off" autocapitalize="off"> <p class="help-block">'+d(i(n(0)).call(e,"The invited user will be asked to confirm friendship. If libraries are shared with the user, you'll be able to set restrictions on accessible media.",{hash:{},data:t}))+"</p> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return u=i(n(20)).call(t,t&&t.type,"home",{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),
(u||0===u)&&(c+=u),c+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+l(i(n(0)).call(t,"Welcome to Plex Home",{hash:{},data:s}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <p>'+l(i(n(0)).call(t,"{1}, so we've made a few changes to help keep your media safe.",t&&t.intro,{
hash:{},data:s}))+"</p> <ol> <li>"+l(i(n(0)).call(t,"We've increased the security requirements on this server, so anything communicating with it will need to be signed in to a Plex account.",{hash:{},data:s}))+"</li> <li>"+l(i(n(0)).call(t,"We've disabled DLNA to prevent any DLNA-enabled device from browsing and playing media without a password or PIN. You can change this preference in your {1}server settings{2}.",'<a class="server-settings-btn" href="#">',"</a>",{hash:{},data:s
}))+"</li> </ol> <p>"+l(i(n(0)).call(t,"For more information on Plex Home security settings, please see the {1}Plex Home section{2} on our support site.",'<a href="https://support.plex.tv/hc/en-us/sections/200641063" target="_blank">',"</a>",{hash:{},data:s}))+'</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-lg btn-primary" data-dismiss="modal">'+l(i(n(0)).call(t,"OK",{hash:{},data:s}))+"</button> </div> </div> </div> "})},function(e,t,n){var i=n(7)
;e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="modal-dialog"> <div class="modal-alert"></div> <div class="modal-content"></div> </div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var r,s,o="",l=this.escapeExpression;return o+='<span class="message">',(s=n.message)?r=s.call(t,{hash:{},data:a
}):(s=t&&t.message,r="function"==typeof s?s.call(t,{hash:{},data:a}):s),o+=l(r)+"</span> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return' <a class="back-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> '}function l(e,t){var a="";return a+=' <i class="modal-icon glyphicon pencil"></i> '+b(i(n(0)).call(e,"Edit PIN",{hash:{},data:t}))+" "}function u(e,t){var n
;return n=a.if.call(e,e&&e.isEditConfirmation,{hash:{},inverse:S.program(8,d,t),fn:S.program(6,c,t),data:t}),n||0===n?n:""}function c(e,t){var a="";return a+=" "+b(i(n(0)).call(e,"Confirm Current PIN",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=" "+b(i(n(0)).call(e,"Enter PIN",{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=' <p class="help-block"> '+b(i(n(0)).call(e,"You do not currently have a PIN. This will allow any users in this home to switch to your account.",{
hash:{},data:t}))+" </p> "}function p(e,t){var r,s="";return s+=' <div class="modal-footer"> ',r=a.if.call(e,e&&e.hasCurrentPIN,{hash:{},inverse:S.noop,fn:S.program(13,f,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.isEditWarning,{hash:{},inverse:S.program(17,m,t),fn:S.program(15,g,t),data:t}),(r||0===r)&&(s+=r),s+=' <button type="submit" class="save-btn btn-link">'+b(i(n(0)).call(e,"Save",{hash:{},data:t}))+"</button> </div> "}function f(e,t){var a=""
;return a+=' <button type="button" class="remove-btn btn-gray pull-left">'+b(i(n(0)).call(e,"Remove",{hash:{},data:t}))+"</button> "}function g(e,t){var a="";return a+=' <button type="button" class="skip-btn btn-gray" data-dismiss="modal">'+b(i(n(0)).call(e,"Skip",{hash:{},data:t}))+"</button> "}function m(e,t){var a="";return a+=' <button type="button" class="cancel-btn btn-gray" data-dismiss="modal">'+b(i(n(0)).call(e,"Cancel",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var v,y="",b=this.escapeExpression,S=this;return y+='<div class="modal-header"> <div class="home-user-dropdown-container pull-right"></div> <h4 class="modal-title"> ',v=a.if.call(t,t&&t.showBackButton,{hash:{},inverse:S.noop,fn:S.program(1,o,s),data:s}),(v||0===v)&&(y+=v),y+=" ",v=a.if.call(t,t&&t.isEditing,{hash:{},inverse:S.program(5,u,s),fn:S.program(3,l,s),data:s}),(v||0===v)&&(y+=v),
y+=' <span class="loading loading-sm hidden"></span> </h4> </div> <form id="pin-form"> <div class="modal-body"> <ul class="tile-list user-select-list disabled"></ul> <input type="number" pattern="[0-9]*" class="pin-input"> <div class="pin-digit-container" aria-hidden="true"> <div class="pin-digit"></div> <div class="pin-digit"></div> <div class="pin-digit"></div> <div class="pin-digit"></div> </div> ',v=a.if.call(t,t&&t.isEditWarning,{hash:{},inverse:S.noop,fn:S.program(10,h,s),data:s}),
(v||0===v)&&(y+=v),y+=" </div> ",v=a.if.call(t,t&&t.isEditing,{hash:{},inverse:S.noop,fn:S.program(12,p,s),data:s}),(v||0===v)&&(y+=v),y+=" </form> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <div class="user-select-container"> '}function s(e,t){return' <a class="user-select-container" href="#"> '}function o(e,t){return" </div> "}function l(e,t){return" </a> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{}
;var u,c="",d=this;return u=n.if.call(t,t&&t.disabled,{hash:{},inverse:d.program(3,s,a),fn:d.program(1,r,a),data:a}),(u||0===u)&&(c+=u),c+=' <div class="user-select-top"> <div class="user-poster img-circle"></div> <i class="protected-icon user-icon glyphicon lock"></i> <i class="admin-icon user-icon glyphicon crown"></i> </div> <div class="username"></div> ',u=n.if.call(t,t&&t.disabled,{hash:{},inverse:d.program(7,l,a),fn:d.program(5,o,a),data:a}),(u||0===u)&&(c+=u),c+=" "})},function(e,t,n){
function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="modal-header"> <h4 class="modal-title"> '+(0,this.escapeExpression)(i(n(0)).call(t,"Select User",{hash:{},data:s}))+' <span class="loading loading-sm"></span> </h4> </div> <div class="modal-body"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){var r,s="";return s+=' <li><a class="exit-fullscreen-btn ',r=a.unless.call(e,e&&e.isFullscreen,{hash:{},inverse:h.noop,fn:h.program(1,o,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#" title="'+p(i(n(0)).call(e,"Exit Full Screen",{hash:{},data:t}))+'" data-toggle="tooltip"><i class="plex-icon-tv-mode-exit-560"></i></a></li> <li><a class="tv-mode-btn ',r=a.unless.call(e,e&&e.isOnDashboard,{hash:{},
inverse:h.noop,fn:h.program(1,o,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.isFullscreen,{hash:{},inverse:h.noop,fn:h.program(1,o,t),data:t}),(r||0===r)&&(s+=r),s+='" href="#" title="'+p(i(n(0)).call(e,"Enter TV Full Screen",{hash:{},data:t}))+'" data-toggle="tooltip"><i class="plex-icon-tv-mode-enter-560"></i></a></li> '}function u(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this,p=this.escapeExpression
;return d+='<ul class="nav nav-bar-nav"> <li><a class="back-btn ',c=a.unless.call(t,t&&t.hasHistory,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='" href="#"><i class="glyphicon chevron-left"></i></a></li> <li><a class="home-btn" href="#"><i class="glyphicon home"></i></a></li> </ul> <div class="nav-bar-search-container"></div> <ul class="nav nav-bar-nav nav-bar-right"> <li><a class="plex-pass-btn ',c=a.unless.call(t,t&&t.canGoPremium,{hash:{},inverse:h.noop,
fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='" href="#"><span class="plex-pass-label label label-primary">'+p(i(n(0)).call(t,"Go Premium",{hash:{},data:s}))+"</span></a></li> ",c=a.if.call(t,t&&t.isKonvergo,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+=' <li class="',c=a.if.call(t,t&&t.activityCount,{hash:{},inverse:h.noop,fn:h.program(5,u,s),data:s}),(c||0===c)&&(d+=c),d+='"><a class="activity-btn ',c=a.unless.call(t,t&&t.showActivity,{hash:{},inverse:h.noop,
fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='" href="#!/status" title="'+p(i(n(0)).call(t,"Status",{hash:{},data:s}))+'" data-toggle="tooltip"><span class="activity-badge badge badge-transparent ',c=a.unless.call(t,t&&t.activityCount,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='">'+p((c=t&&t.activityCount,
"function"==typeof c?c.apply(t):c))+'</span><i class="glyphicon cardio"></i></a></li> <li><a class="settings-btn" href="#!/settings" title="'+p(i(n(0)).call(t,"Settings",{hash:{},data:s}))+'" data-toggle="tooltip"><i class="glyphicon settings"></i></a></li> </ul> <div class="modal-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){
return"signed-in"}function u(e,t){return"full-user"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this,p=this.escapeExpression;return d+='<a class="dropdown-toggle dropdown-poster-toggle" href="#nav-dropdown" data-toggle="dropdown"> <div class="dropdown-poster-container"> <div class="media-poster img-circle"></div> <i class="caret-icon"></i> </div> <span class="total-badge badge ',c=a.unless.call(t,t&&t.totalCount,{hash:{},inverse:h.noop,fn:h.program(1,o,s),
data:s}),(c||0===c)&&(d+=c),d+='">'+p((c=t&&t.totalCount,"function"==typeof c?c.apply(t):c))+'</span> </a> <ul class="dropdown-menu ',c=a.if.call(t,t&&t.signedIn,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+=" ",c=a.if.call(t,t&&t.isFullUser,{hash:{},inverse:h.noop,fn:h.program(5,u,s),data:s}),(c||0===c)&&(d+=c),d+='"> <li class="signed-in-item dropdown-header username-header"></li> <li class="signed-in-item"><a href="#!/account">'+p(i(n(0)).call(t,"Account",{
hash:{},data:s}))+'</a></li> <li class="signed-in-item"><a class="users-btn" href="#">'+p(i(n(0)).call(t,"Users",{hash:{},data:s}))+' <span class="invites-badge badge ',c=a.unless.call(t,t&&t.invitesCount,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='">'+p((c=t&&t.invitesCount,
"function"==typeof c?c.apply(t):c))+'</span></a></li> <li class="signed-in-item full-user-item divider"></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/queue">'+p(i(n(0)).call(t,"Watch Later",{hash:{},data:s}))+'</a></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/recommendations">'+p(i(n(0)).call(t,"Recommended",{hash:{},data:s}))+'</a></li> <li class="signed-in-item divider"></li> <li class="announcements-item ',c=a.if.call(t,t&&t.isRestricted,{hash:{},
inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='"><a href="#!/announcements">'+p(i(n(0)).call(t,"Announcements",{hash:{},data:s}))+' <span class="announcements-badge badge ',c=a.unless.call(t,t&&t.unreadAnnouncementsCount,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='">'+p((c=t&&t.unreadAnnouncementsCount,"function"==typeof c?c.apply(t):c))+'</span></a></li> <li><a href="'+p((c=t&&t.appsUrl,
"function"==typeof c?c.apply(t):c))+'" target="_blank">'+p(i(n(0)).call(t,"Get Plex apps",{hash:{},data:s}))+'</a></li> <li><a href="'+p((c=t&&t.helpUrl,"function"==typeof c?c.apply(t):c))+'" target="_blank">'+p(i(n(0)).call(t,"Help",{hash:{},data:s}))+'</a></li> <li class="divider"></li> <li class="signed-in-item switch-user-item ',c=a.unless.call(t,t&&t.home,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),
d+='"><a class="switch-user-btn" href="#">'+p(i(n(0)).call(t,"Switch User...",{hash:{},data:s}))+'</a></li> <li class="signed-out-item"><a class="sign-in-btn" href="#">'+p(i(n(0)).call(t,"Sign In",{hash:{},data:s}))+'</a></li> <li class="signed-in-item full-user-item"><a class="sign-out-btn" href="#">'+p(i(n(0)).call(t,"Sign Out",{hash:{},data:s}))+"</a></li> </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+='data-scope-to-attr="'+d((n=e&&e.scopeToAttr,typeof n===c?n.apply(e):n))+'" data-scope-to-param="'+d((n=e&&e.scopeToParam,typeof n===c?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="form-group" data-attr="'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'"> <label for="text-'+d((l=t&&t.name,
typeof l===c?l.apply(t):l))+'" class="control-label">'+d(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'<span class="control-error"></span></label> <div class="input-group selectize-group"> <input type="text" id="text-'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'" class="form-control text-field" name="'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'" placeholder="'+d((l=t&&t.placeholder,typeof l===c?l.apply(t):l))+'" data-rating-key="'+d((l=t&&t.ratingKey,
typeof l===c?l.apply(t):l))+'" data-title="'+d((l=t&&t.title,typeof l===c?l.apply(t):l))+'" ',l=a.if.call(t,t&&t.scopeToAttr,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+="> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+f(i(n(0)).call(e,"Problem Connecting to Plex",{hash:{},data:t
}))+'</h4> <p class="text-muted">'+f(i(n(0)).call(e,"Plex was unable to authenticate your server. Please sign your server out and try again.",{hash:{},data:t}))+"</p> "}function l(e,t){var a,r="";return a=i(n(20)).call(e,e&&e.mappingError,"myplexgone",{hash:{},inverse:g.program(6,c,t),fn:g.program(4,u,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function u(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+f(i(n(0)).call(e,"Problem Connecting to Plex",{hash:{},data:t
}))+'</h4> <p class="text-muted">'+f(i(n(0)).call(e,"Your server was unable to reach Plex. Please ensure that the computer or device running your server can access the internet.",{hash:{},data:t}))+"</p> "}function c(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+f(i(n(0)).call(e,"Signed in to Plex",{hash:{},data:t
}))+'</h4> <p class="text-muted">'+f(i(n(0)).call(e,"You have successfully signed your server in to Plex, but we were unable to reach it from outside your network.",{hash:{},data:t}))+"</p> "}function d(e,t){var a="";return a+=' <p class="text-muted">'+f(i(n(0)).call(e,"If you skip this step you will not be able to share or stream media outside your home. If you change your mind later, you can adjust this in Settings.",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var h,p="",f=this.escapeExpression,g=this;return h=i(n(20)).call(t,t&&t.mappingError,"badauth",{hash:{},inverse:g.program(3,l,s),fn:g.program(1,o,s),data:s}),(h||0===h)&&(p+=h),p+=" ",h=i(n(77)).call(t,t&&t.context,"settings",{hash:{},inverse:g.noop,fn:g.program(8,d,s),data:s}),(h||0===h)&&(p+=h),
p+=' <p class="text-muted">'+f(i(n(0)).call(t,"If you would like to enable this now, you will need to configure your router or firewall to allow Plex to contact your server. Please refer to our {1}Connecting a Server{2} article for more information.",'<a href="http://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server" target="_blank">',"</a>",{hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"locked"}function l(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return c+='<div class="form-group"> <label for="lockable-'+d((u=t&&t.name,"function"==typeof u?u.apply(t):u))+'">'+d(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'</label> <div class="input-group"> <a href="#" data-field="'+d((u=t&&t.name,
"function"==typeof u?u.apply(t):u))+'" class="input-group-addon edit-lock-addon ',u=a.if.call(t,t&&t.locked,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" ",u=a.if.call(t,t&&t.disabled,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='" tabindex="-1"><i class="glyphicon lock"></i></a> <input type="number" id="lockable-'+d((u=t&&t.name,"function"==typeof u?u.apply(t):u))+'" class="form-control lockable-field" name="'+d((u=t&&t.name,
"function"==typeof u?u.apply(t):u))+'" value="'+d((u=t&&t.value,"function"==typeof u?u.apply(t):u))+'" placeholder="'+d((u=t&&t.placeholder,"function"==typeof u?u.apply(t):u))+'" ',u=a.if.call(t,t&&t.disabled,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+="> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return" locked"}function l(e,t){var n,i=""
;return i+='data-query="'+h((n=e&&e.query,typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<div class="form-group"> <label for="lockable-'+h((u=t&&t.name,typeof u===d?u.apply(t):u))+'">'+h(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'</label> <div class="input-group selectize-group"> <a href="#" data-field="'+h((u=t&&t.name,
typeof u===d?u.apply(t):u))+'" class="input-group-addon edit-lock-addon',u=a.if.call(t,t&&t.locked,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+='"><i class="glyphicon lock"></i></a> <input type="text" id="lockable-'+h((u=t&&t.name,typeof u===d?u.apply(t):u))+'" class="form-control lockable-field tag-input-hidden" data-name="'+h((u=t&&t.name,typeof u===d?u.apply(t):u))+'" data-attr="'+h((u=t&&t.attribute,typeof u===d?u.apply(t):u))+'" ',u=a.if.call(t,t&&t.query,{
hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+="> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return" locked"}function l(e,t){var n,i="";return i+=' <textarea class="form-control lockable-field" id="lockable-'+m((n=e&&e.name,typeof n===g?n.apply(e):n))+'" name="'+m((n=e&&e.name,typeof n===g?n.apply(e):n))+'"',n=a.if.call(e,e&&e.rows,{hash:{},
inverse:v.noop,fn:v.program(4,u,t),data:t}),(n||0===n)&&(i+=n),i+=' placeholder="'+m((n=e&&e.placeholder,typeof n===g?n.apply(e):n))+'">'+m((n=e&&e.value,typeof n===g?n.apply(e):n))+"</textarea> "}function u(e,t){var n,i="";return i+=' rows="'+m((n=e&&e.rows,typeof n===g?n.apply(e):n))+'"'}function c(e,t){var n,i="";return i+=' <input type="text" id="lockable-'+m((n=e&&e.name,typeof n===g?n.apply(e):n))+'" class="form-control lockable-field" name="'+m((n=e&&e.name,
typeof n===g?n.apply(e):n))+'" value="'+m((n=e&&e.value,typeof n===g?n.apply(e):n))+'" placeholder="'+m((n=e&&e.placeholder,typeof n===g?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.scopeToAttr,{hash:{},inverse:v.noop,fn:v.program(7,d,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.ratingKey,{hash:{},inverse:v.noop,fn:v.program(9,h,t),data:t}),(n||0===n)&&(i+=n),i+="> "}function d(e,t){var n,i="";return i+='data-scope-to-attr="'+m((n=e&&e.scopeToAttr,
typeof n===g?n.apply(e):n))+'" data-scope-to-param="'+m((n=e&&e.scopeToParam,typeof n===g?n.apply(e):n))+'"'}function h(e,t){var n,i="";return i+='data-rating-key="'+m((n=e&&e.ratingKey,typeof n===g?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var p,f="",g="function",m=this.escapeExpression,v=this;return f+='<div class="form-group selectize-group" data-attr="'+m((p=t&&t.name,typeof p===g?p.apply(t):p))+'"> <label for="lockable-'+m((p=t&&t.name,
typeof p===g?p.apply(t):p))+'">'+m(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+'</label> <div class="input-group"> <a href="#" data-field="'+m((p=t&&t.name,typeof p===g?p.apply(t):p))+'" class="input-group-addon edit-lock-addon',p=a.if.call(t,t&&t.locked,{hash:{},inverse:v.noop,fn:v.program(1,o,s),data:s}),(p||0===p)&&(f+=p),f+='" tabindex="-1"><i class="glyphicon lock"></i></a> ',p=i(n(20)).call(t,t&&t.type,"textarea",{hash:{},inverse:v.program(6,c,s),fn:v.program(3,l,s),data:s}),
(p||0===p)&&(f+=p),f+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"advanced-setting"}function l(e,t){var r,s="";return s+=' <label class="control-label" for="input_'+I((r=e&&e.id,typeof r===w?r.apply(e):r))+I((r=e&&e.idSuffix,typeof r===w?r.apply(e):r))+'"> <input type="checkbox" id="input_'+I((r=e&&e.id,typeof r===w?r.apply(e):r))+I((r=e&&e.idSuffix,
typeof r===w?r.apply(e):r))+'" name="'+I((r=e&&e.id,typeof r===w?r.apply(e):r))+'" value="1" ',r=a.if.call(e,e&&e.value,{hash:{},inverse:M.noop,fn:M.program(4,u,t),data:t}),(r||0===r)&&(s+=r),s+="> "+I(i(n(0)).call(e,e&&e.label,{hash:{},data:t}))+" </label> ",r=a.if.call(e,e&&e.summary,{hash:{},inverse:M.noop,fn:M.program(6,c,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function u(e,t){return"checked"}function c(e,t){var a="";return a+=' <p class="help-block">'+I(i(n(0)).call(e,e&&e.summary,{hash:{},
data:t}))+"</p> "}function d(e,t){var r,s="";return s+=' <label class="control-label" for="input_'+I((r=e&&e.id,typeof r===w?r.apply(e):r))+I((r=e&&e.idSuffix,typeof r===w?r.apply(e):r))+'">'+I(i(n(0)).call(e,e&&e.label,{hash:{},data:t}))+"</label> ",r=a.if.call(e,e&&e.enumValues,{hash:{},inverse:M.program(13,g,t),fn:M.program(9,h,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.summary,{hash:{},inverse:M.noop,fn:M.program(6,c,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function h(e,t){
var n,i="";return i+=' <select id="input_'+I((n=e&&e.id,typeof n===w?n.apply(e):n))+I((n=e&&e.idSuffix,typeof n===w?n.apply(e):n))+'" name="'+I((n=e&&e.id,typeof n===w?n.apply(e):n))+'"> ',n=a.each.call(e,e&&e.enumValues,{hash:{},inverse:M.noop,fn:M.programWithDepth(10,p,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function p(e,t,a){var r,s="";return s+=' <option value="'+I((r=e&&e.value,typeof r===w?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,a&&a.value,{hash:{},inverse:M.noop,
fn:M.program(11,f,t),data:t}),(r||0===r)&&(s+=r),s+=">"+I(i(n(0)).call(e,e&&e.label,{hash:{},data:t}))+"</option> "}function f(e,t){return'selected="selected"'}function g(e,t){var r,s="";return s+=' <input type="',r=i(n(20)).call(e,e&&e.option,"hidden",{hash:{},inverse:M.program(16,v,t),fn:M.program(14,m,t),data:t}),(r||0===r)&&(s+=r),s+='" id="input_'+I((r=e&&e.id,typeof r===w?r.apply(e):r))+I((r=e&&e.idSuffix,typeof r===w?r.apply(e):r))+'" class="form-control" name="'+I((r=e&&e.id,
typeof r===w?r.apply(e):r))+'" value="'+I((r=e&&e.value,typeof r===w?r.apply(e):r))+'" ',r=a.if.call(e,e&&e.placeholder,{hash:{},inverse:M.noop,fn:M.program(18,y,t),data:t}),(r||0===r)&&(s+=r),s+="> "}function m(e,t){return"password"}function v(e,t){return"text"}function y(e,t){var n,i="";return i+='placeholder="'+I((n=e&&e.placeholder,typeof n===w?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var b,S="",I=this.escapeExpression,w="function",M=this
;return S+='<div class="form-group ',b=a.if.call(t,t&&t.advanced,{hash:{},inverse:M.noop,fn:M.program(1,o,s),data:s}),(b||0===b)&&(S+=b),S+='"> ',b=i(n(20)).call(t,t&&t.type,"bool",{hash:{},inverse:M.program(8,d,s),fn:M.program(3,l,s),data:s}),(b||0===b)&&(S+=b),S+=" </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i=""
;return i+=' <textarea class="form-control text-field" id="text-'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'" name="'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'"',n=a.if.call(e,e&&e.rows,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=' placeholder="'+f((n=e&&e.placeholder,typeof n===p?n.apply(e):n))+'">'+f((n=e&&e.value,typeof n===p?n.apply(e):n))+"</textarea> "}function l(e,t){var n,i="";return i+=' rows="'+f((n=e&&e.rows,typeof n===p?n.apply(e):n))+'"'}
function u(e,t){var n,i="";return i+=' <input type="text" id="text-'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'" class="form-control text-field" name="'+f((n=e&&e.name,typeof n===p?n.apply(e):n))+'" value="'+f((n=e&&e.value,typeof n===p?n.apply(e):n))+'" placeholder="'+f((n=e&&e.placeholder,typeof n===p?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.excludeParam,{hash:{},inverse:g.noop,fn:g.program(5,c,t),data:t}),(n||0===n)&&(i+=n),i+="> "}function c(e,t){var n,i=""
;return i+='data-exclude-param="'+f((n=e&&e.excludeParam,typeof n===p?n.apply(e):n))+'" data-exclude-value="'+f((n=e&&e.excludeValue,typeof n===p?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p="function",f=this.escapeExpression,g=this;return h+='<div class="form-group"> <label for="text-'+f((d=t&&t.name,typeof d===p?d.apply(t):d))+'">'+f(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+"</label> ",d=i(n(20)).call(t,t&&t.type,"textarea",{hash:{},
inverse:g.program(4,u,s),fn:g.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="mini-controls"> <div class="loading loading-inline"></div> </div> '})},function(e,t){e.exports=function(){return""}},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<div class="post-play-background background"></div> <div class="post-play-footer"> <div class="item-previous"> <div class="item-poster"> <h1>'+u(i(n(0)).call(t,"Previous",{hash:{},data:s
}))+'</h1> <a class="media-poster-container replay-btn play-btn" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon refresh"></i> </div> </div> </a> </div> <div class="item-summary"> <h1 class="media-title">'+u((o=t&&t.previous,o=null==o||o===!1?o:o.title,"function"==typeof o?o.apply(t):o))+'</h1> <h2 class="media-subtitle-1">',o=t&&t.previous,o=null==o||o===!1?o:o.subtitle,
o="function"==typeof o?o.apply(t):o,(o||0===o)&&(l+=o),l+='</h2> </div> </div> <div class="item-next"> <div class="item-poster"> <h1>'+u(i(n(0)).call(t,"Playing Next",{hash:{},data:s
}))+'</h1> <a class="media-poster-container next-btn play-btn" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="countdown"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> </div> <div class="item-summary"> <h1 class="media-title">'+u((o=t&&t.next,o=null==o||o===!1?o:o.title,"function"==typeof o?o.apply(t):o))+'</h1> <h2 class="media-subtitle-1">'+u((o=t&&t.next,
o=null==o||o===!1?o:o.subtitle,"function"==typeof o?o.apply(t):o))+'</h2> <h3 class="media-subtitle-2">',o=t&&t.next,o=null==o||o===!1?o:o.index,o="function"==typeof o?o.apply(t):o,(o||0===o)&&(l+=o),l+="</h3> <p>"+u((o=t&&t.next,o=null==o||o===!1?o:o.summary,"function"==typeof o?o.apply(t):o))+"</p> </div> </div> </div> "})},function(e,t){e.exports=function(){return""}},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{},'<div class="video-container"> <div class="video-controls-container"></div> <div class="video-post-play-container"></div> <div class="video-details-container"></div> </div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<div class="mini-controls"> <div class="seek-bar-container"></div> <div class="mini-controls-left"> <a class="media-poster-container" href="#"><div class="media-poster"></div></a> </div> <div class="mini-player-scrub-preview persistent-tooltip top fade"> <div class="tooltip-arrow"></div> <div class="tooltip-inner"></div> </div> <div class="mini-controls-right"> <div class="mini-controls-below-track-segment media-title"> <div class="grandparent-title-container"> <button class="grandparent-title btn-link btn-metadata-link"></button> </div> <div class="title-container"> <button class="item-title btn-link btn-metadata-link"></button> </div> </div> <div class="mini-controls-below-track-segment mini-controls-numeric-progress"> <span class="player-position"></span><span class="separator"></span><span class="player-duration"></span> </div> <div class="mini-controls-below-track-segment"> <button class="previous-btn btn-link"><i class="glyphicon fast-backward"></i></button> <button class="play-btn btn-link btn-link-lg hidden"><i class="glyphicon play"></i></button> <button class="pause-btn btn-link btn-link-lg hidden"><i class="glyphicon pause"></i></button> <button class="stop-btn btn-link btn-link-lg hidden"><i class="glyphicon stop"></i></button> <button class="next-btn btn-link"><i class="glyphicon fast-forward"></i></button> <span id="player-actions-dropdown" class="dropup"> <button class="more-btn btn-link dropdown-toggle" href="#player-actions-dropdown" data-toggle="dropdown"><i class="glyphicon more"></i></button> </span> </div> <div class="mini-controls-below-track-segment player-dropdowns-container rating-container"> </div> <div class="mini-controls-below-track-segment ancillary-btns"> <span class="player-lyrics-container"></span> <button class="shuffle-btn btn-link"><i class="plex-icon-osd-shuffle"></i></button> <button class="repeat-btn btn-link"> <i class="repeat-one plex-icon-osd-repeat-one"></i> <i class="repeat plex-icon-osd-repeat"></i> </button> </div> <div class="mini-controls-below-track-segment"> <button class="volume-btn btn-link hidden"> <i class="glyphicon volume-up"></i> <i class="glyphicon volume-down"></i> <i class="glyphicon mute"></i> </button> <span class="player-volume-slider-container"></span> <button class="enter-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <button class="maximize-btn btn-link"><i class="glyphicon chevron-up"></i></button> <span class="player-play-queue-container"></span> </div> </div> </div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="player-slider-track"> <div class="player-slider-buffer"></div> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},
'<div class="player-slider-track"> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> '})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<img class="player-scrub-preview-thumbnail hidden"> <div class="tooltip top player-scrub-preview-tooltip"> <div class="tooltip-inner player-scrub-preview-time"></div> <div class="tooltip-arrow"></div> </div>'})
},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <video id="html-video" class="html-video"></video> <div class="video-subtitles-container"></div> <div class="flash-video-background"></div> <div class="flash-video"> <div id="flash-video-placeholder"></div> </div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o="",l=this
;return o+='<div class="video-background"> <div class="video-background-image"></div> </div> ',s=n.if.call(t,t&&t.showVideoElements,{hash:{},inverse:l.noop,fn:l.program(1,r,a),data:a}),(s||0===s)&&(o+=s),
o+=' <div class="video-image-overlays-region"></div> <div class="video-loading loading loading-inline"></div> <div class="alert-player alert-paused"><i class="glyphicon play"></i></div> <button class="video-overlay-btn"></button> <button class="player-close-btn btn-gray"><i class="glyphicon remove-2"></i></button> <div class="video-error-message-container"> <div class="video-error-message-center"> <div class="video-error-message"></div> <div class="video-error-skip-message btn-link"></div> </div> </div> <div class="video-controls-overlay video-controls-overlay-top"> <div class="video-controls-left"> <span class="video-title"></span> </div> <div class="player-dropdowns-container video-controls-right"> <button class="player-close-btn btn-link"><i class="glyphicon remove-2"></i></button> <button class="btn-link share-btn pull-left"><i class="glyphicon share"></i></button> <button class="btn-link recommend-btn pull-left"><i class="glyphicon share-alt"></i></button> </div> </div> <div class="player-primary-player-name-container"> <span class="primary-player-name"></span> </div> <div class="player-scrub-preview-container"></div> <div class="video-controls-overlay video-controls-overlay-bottom"> <div class="video-controls-left"> <button class="previous-btn btn-link hidden"><i class="glyphicon fast-backward"></i></button> <button class="play-btn btn-link hidden"><i class="glyphicon play"></i></button> <button class="pause-btn btn-link hidden"><i class="glyphicon pause"></i></button> <button class="next-btn btn-link hidden"><i class="glyphicon fast-forward"></i></button> </div> <div class="player-dropups-container video-controls-right"> <button class="volume-btn btn-link btn-link-lg hidden"> <i class="glyphicon volume-up"></i> <i class="glyphicon volume-down"></i> <i class="glyphicon mute"></i> </button> <div class="player-volume-slider-container"></div> <button class="enter-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <button class="minimize-btn btn-link"><i class="glyphicon chevron-down"></i></button> </div> <div class="video-controls-center-wrapper"> <div class="video-controls-center"> <span class="player-position"></span> <div class="seek-bar-container"></div> <span class="player-duration"></span> </div> </div> </div> <div class="video-player-poster media-poster"></div> <div class="video-alert-region"></div> '
})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return"active"}function s(e,t){return"plex-icon-companion-cast-active"}function o(e,t){return"plex-icon-companion-cast"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var l,u="",c=this;return u+='<button class="btn-link dropdown-toggle ',l=n.if.call(t,t&&t.isActive,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(l||0===l)&&(u+=l),
u+='" href="#player-primary-player-dropdown" data-toggle="dropdown"> <i class="',l=n.if.call(t,t&&t.isActive,{hash:{},inverse:c.program(5,o,a),fn:c.program(3,s,a),data:a}),(l||0===l)&&(u+=l),u+='"></i> </button> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <li> <a class="',r=a.unless.call(e,e&&e.hasSelectedQuality,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),
(r||0===r)&&(s+=r),s+='" data-index="-1" href="#"> '+p(i(n(0)).call(e,"Original",{hash:{},data:t}))+' <i class="player-dropdown-selected-icon selected-icon glyphicon ok-2"></i> </a> </li> '}function l(e,t){return"selected"}function u(e,t){var r,s="";return s+=' <li> <a class="',r=a.if.call(e,e&&e.selected,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='" data-index="'+p((r=e&&e.index,typeof r===f?r.apply(e):r))+'" href="#"> '+p(i(n(186)).call(e,e,{hash:{},data:t
}))+' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i> </a> </li> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this,p=this.escapeExpression,f="function";return d+='<button class="btn-link dropdown-toggle" href="#player-quality-dropdown" data-toggle="dropdown"> <i class="glyphicon adjust-alt"></i> </button> <ul class="dropdown-menu pull-right"> ',c=a.if.call(t,t&&t.includeOriginal,{hash:{},inverse:h.noop,fn:h.program(1,o,s),
data:s}),(c||0===c)&&(d+=c),d+=" ",c=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:h.noop,fn:h.program(4,u,s),data:s}),(c||0===c)&&(d+=c),d+=" </ul> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"plex-icon-audio"}function l(e,t){return"plex-icon-subtitles-alt"}function u(e,t,r){var s,o="";return o+=' <li><a class="',s=a.if.call(e,e&&e.selected,{hash:{},inverse:w.noop,
fn:w.program(6,c,t),data:t}),(s||0===s)&&(o+=s),o+='" data-id="'+I((s=e&&e.id,typeof s===S?s.apply(e):s))+'" href="#">',s=a.if.call(e,e&&e.language,{hash:{},inverse:w.program(10,h,t),fn:w.program(8,d,t),data:t}),(s||0===s)&&(o+=s),s=i(n(20)).call(e,r&&r.type,"subtitles",{hash:{},inverse:w.noop,fn:w.program(12,p,t),data:t}),(s||0===s)&&(o+=s),s=i(n(20)).call(e,r&&r.type,"audio",{hash:{},inverse:w.noop,fn:w.program(16,m,t),data:t}),(s||0===s)&&(o+=s),
o+=' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i></a></li> '}function c(e,t){return"selected"}function d(e,t){var n;return I((n=e&&e.language,typeof n===S?n.apply(e):n))}function h(e,t){return I(i(n(0)).call(e,"Unknown",{hash:{},data:t}))}function p(e,t){var n;return n=a.if.call(e,e&&e.format,{hash:{},inverse:w.noop,fn:w.program(13,f,t),data:t}),n||0===n?n:""}function f(e,t){var r,s="";return s+=" ("+I(i(n(1303)).call(e,e&&e.format,{hash:{},data:t})),
r=a.if.call(e,e&&e.forced,{hash:{},inverse:w.noop,fn:w.program(14,g,t),data:t}),(r||0===r)&&(s+=r),s+=")"}function g(e,t){var a="";return a+=" "+I(i(n(0)).call(e,"Forced",{hash:{},data:t}))}function m(e,t){var n;return n=a.if.call(e,e&&e.codec,{hash:{},inverse:w.noop,fn:w.program(17,v,t),data:t}),n||0===n?n:""}function v(e,t){var a="";return a+=" ("+I(i(n(1302)).call(e,e&&e.codec,{hash:{},data:t}))+" "+I(i(n(1301)).call(e,e&&e.channels,{hash:{},data:t}))+")"}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var y,b="",S="function",I=this.escapeExpression,w=this;return b+='<button class="btn-link dropdown-toggle" href="#player-'+I((y=t&&t.type,typeof y===S?y.apply(t):y))+'-dropdown" data-toggle="dropdown"> <i class="',y=i(n(20)).call(t,t&&t.type,"audio",{hash:{},inverse:w.program(3,l,s),fn:w.program(1,o,s),data:s}),(y||0===y)&&(b+=y),b+='"></i> </button> <ul class="dropdown-menu pull-right"> ',y=a.each.call(t,t&&t.streams,{hash:{},inverse:w.noop,
fn:w.programWithDepth(5,u,s,t),data:s}),(y||0===y)&&(b+=y),b+=" </ul> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){return' <span class="smart-badge badge badge-round"> <i class="icon glyphicon cogwheel"></i> </span> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",u=this.escapeExpression,c=this;return l+='<a class="media-poster-container" href="',(o=n.url)?s=o.call(t,{hash:{},data:a}):(o=t&&t.url,
s="function"==typeof o?o.call(t,{hash:{},data:a}):o),l+=u(s)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> ',s=n.if.call(t,t&&t.smart,{hash:{},inverse:c.noop,fn:c.program(1,r,a),data:a}),(s||0===s)&&(l+=s),
l+=' <div class="media-poster-actions"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> </div> <div class="media-subtitle-1-fill media-heading playlist-title"></div> <div class="media-subtitle-2-fill media-heading secondary playlist-duration"></div> </a> <div class="media-actions-dropdown playlist-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '
})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression;return l+='<form class="edit-section-advanced-form settings-container"> <div class="language-group"> <input type="hidden" name="language" value="'+u((o=t&&t.section,o=null==o||o===!1?o:o.language,
"function"==typeof o?o.apply(t):o))+'"> </div> <div class="row"> <div class="col-md-12 section-settings-region"></div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group scanner-group hidden"> <label for="edit-section-scanner" class="control-label"> '+u(i(n(0)).call(t,"Scanner",{hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"A scanner is required.",{hash:{},data:s
}))+'</span> </label> <select id="edit-section-scanner" name="scanner"></select> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group agent-group hidden"> <label for="edit-section-agent" class="control-label"> '+u(i(n(0)).call(t,"Agent",{hash:{},data:s}))+' <span class="control-error">'+u(i(n(0)).call(t,"An agent is required.",{hash:{},data:s
}))+'</span> </label> <select id="edit-section-agent" name="agent"></select> </div> </div> </div> <div class="row"> <div class="col-md-12 section-agent-settings-region"></div> </div> </form> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this
;return u+='<form class="edit-section-folders-form settings-container"> <label> '+c(i(n(0)).call(t,"Add folders to your library",{hash:{},data:s}))+' </label> <div class="form-group Location-group"> <div class="paths-region"></div> <p class="add-folder-container"> <span class="add-folder-populating loading ',l=a.unless.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='"></span> <span class="add-folder-populating ',
l=a.unless.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='"> '+c(i(n(0)).call(t,"Plex Cloud is searching for folders",{hash:{},data:s}))+' </span> <span class="add-folder-error hidden"> '+c(i(n(0)).call(t,"Plex Cloud took too long finding folders. Please try again.",{hash:{},data:s}))+' </span> <button type="button" class="add-folder-btn btn btn-icon-label btn-default ',
l=a.if.call(t,t&&t.isPersonalCloudServerDriveCachePending,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='"> <i class="glyphicon folder-plus"></i> '+c(i(n(0)).call(t,"Browse for media folder",{hash:{},data:s}))+' </button> </p> <p class="control-error">'+c(i(n(0)).call(t,"At least one folder is required.",{hash:{},data:s
}))+'</p> </div> <p class="help-block">'+c(i(n(0)).call(t,"Help us out by following {1}our guide{2} to naming and organizing your media.",'<a href="http://support.plex.tv/hc/en-us/categories/200028098-Media-Preparation" target="_blank">',"</a>",{hash:{},data:s}))+"</p> </form> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="section-options" />'})},function(e,t,n){
var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){function r(e,t){var i,a,r="";return r+=' <input type="text" name="path" class="form-control" value="',(a=n.path)?i=a.call(e,{hash:{},data:t}):(a=e&&e.path,i=typeof a===u?a.call(e,{hash:{},data:t}):a),r+=c(i)+'"> '}function s(e,t){var i,a,r="";return r+=' <span class="form-static-value">',(a=n.path)?i=a.call(e,{hash:{},data:t}):(a=e&&e.path,i=typeof a===u?a.call(e,{hash:{},data:t}):a),
r+=c(i)+'<input type="hidden" name="path" value="',(a=n.path)?i=a.call(e,{hash:{},data:t}):(a=e&&e.path,i=typeof a===u?a.call(e,{hash:{},data:t}):a),r+=c(i)+'" /></span> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<div class="col-md-12"> <div class="form-group path-group"> ',o=n.if.call(t,t&&t.canEditPath,{hash:{},inverse:d.program(3,s,a),fn:d.program(1,r,a),data:a}),(o||0===o)&&(l+=o),
l+=' <div class="path-actions"> <a href="#" class="remove-path-btn btn-link btn-gray"><i class="glyphicon remove-2"></i></a> </div> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <p class="help-block"> '+d(i(n(0)).call(e,"Note: An active Plex Pass is required for this service. Don't have a Plex Pass? {1}Subscribe here{2}",'<a href="{3}" target="_blank">',"</a>",e&&e.plexPassUrl,{hash:{},data:t}))+" </p> "}function l(e,t){return'<div class="vendor-logo vendor-logo-lyricfind"></div>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this
;return c+='<div class="choose-library use-premium-library" data-agent="com.plexapp.agents.plexmusic" data-scanner="Plex Premium Music Scanner"> <div class="row"> <div class="col-xs-12"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio"> <span class="header-text"> '+d(i(n(0)).call(t,"Create a premium Plex music library!",{hash:{},data:s
}))+' </span> </div> </div> <div class="row use-premium-library-body"> <div class="col-xs-8"> <ul> <li>'+d(i(n(0)).call(t,"Access to the best artwork, artist bios, album reviews, and more",{hash:{},data:s}))+"</li> <li>"+d(i(n(0)).call(t,"Smart mixes based on track or mood",{hash:{},data:s}))+"</li> <li>"+d(i(n(0)).call(t,"Improved music recognition and matching",{hash:{},data:s}))+"</li> </ul> ",u=a.unless.call(t,t&&t.hasPremiumMusic,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),
(u||0===u)&&(c+=u),c+=' </div> <div class="col-xs-4 vendor-logos"> ',u=a.if.call(t,t&&t.hasLyrics,{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+=' <div class="vendor-logo vendor-logo-gracenote"></div> <div class="vendor-logo vendor-logo-plex-pass"></div> </div> </div> </div> </div> </div> <div class="choose-library use-basic-library"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio"> '+d(i(n(0)).call(t,"Create a basic music library",{
hash:{},data:s}))+" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=' <p class="help-block"> '+c(i(n(0)).call(e,"Note: An active Plex Pass is required for this service. Don't have a Plex Pass? {1}Subscribe here{2}",'<a href="{3}" target="_blank">',"</a>",e&&e.plexPassUrl,{hash:{},data:t}))+" </p> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="choose-library use-premium-library"> <div class="row"> <div class="col-xs-12"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio" disabled> <span class="header-text"> '+c(i(n(0)).call(t,"Automatically tag my photos!",{hash:{},data:s
}))+' </span> </div> </div> <div class="use-premium-library-body"> <div class="row"> <div class="col-xs-8"> <ul> <li>'+c(i(n(0)).call(t,"Wondering if your photos contain kittens? Our advanced neural net can help you figure it out!",{hash:{},data:s}))+"</li> <li>"+c(i(n(0)).call(t,"A fun new way to explore your collection!",{hash:{},data:s
}))+'</li> </ul> </div> <div class="col-xs-4 vendor-logos"> <div class="vendor-logo vendor-logo-plex-pass"></div> </div> </div> <div class="row"> <div class="col-xs-12"> <p class="help-block"> '+c(i(n(0)).call(t,"Note: photo thumbnails will be temporarily uploaded to a third party for analysis. {1}Learn more{2}",'<a href="https://help.plex.tv/photo-auto-tagging" target="_blank">',"</a>",{hash:{},data:s}))+" </p> ",l=a.unless.call(t,t&&t.hasPremiumPhotos,{hash:{},inverse:d.noop,
fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=' </div> </div> </div> </div> </div> </div> <div class="choose-library use-basic-library"> <div class="row use-library-header"> <div class="col-xs-12"> <input type="radio" disabled> '+c(i(n(0)).call(t,"No thanks, I don't care about kittens",{hash:{},data:s}))+" </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,r){var s,o=""
;return o+=" "+h(i(n(26)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" ",s=a.if.call(e,r&&r.edit,{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(s||0===s)&&(o+=s),o+=" "}function l(e,t){var a,r="";return r+=" ",a=i(n(20)).call(e,e&&e.id,"enableBIFGeneration",{hash:{},inverse:p.noop,fn:p.program(3,u,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function u(e,t){var a=""
;return a+=' <div class="form-group"> <button type="button" class="delete-thumbnails-btn btn btn-sm btn-danger">'+h(i(n(0)).call(e,"Delete Preview Thumbnails",{hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this.escapeExpression,p=this;return c=a.each.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.programWithDepth(1,o,s,t),data:s}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"section-type-chosen"}function l(e,t){var a="";return a+=' <p class="prompt">'+v(i(n(0)).call(e,"Select your library type",{hash:{},data:t}))+"</p> "}function u(e,t){var a="";return a+=" <label>"+v(i(n(0)).call(e,"Library type",{hash:{},data:t}))+"</label> "}function c(e,t,r){var s,o="";return o+=' <a class="wizard-block section-type ',s=a.if.call(e,r&&r.canChangeType,{
hash:{},inverse:y.noop,fn:y.program(8,d,t),data:t}),(s||0===s)&&(o+=s),o+=" ",s=i(n(20)).call(e,r&&r.currentSectionKey,e&&e.key,{hash:{},inverse:y.noop,fn:y.program(10,h,t),data:t}),(s||0===s)&&(o+=s),o+='" data-key="'+v((s=e&&e.key,typeof s===b?s.apply(e):s))+'" href="#"> <i class="wizard-block-icon '+v((s=e&&e.sectionTypeIcon,typeof s===b?s.apply(e):s))+'"></i> '+v((s=e&&e.title,typeof s===b?s.apply(e):s))+" </a> "}function d(e,t){return"selectable"}function h(e,t){return"selected"}
function p(e,t){var a="";return a+=' <div class="row"> <div class="col-xs-12"> <p class="prompt">'+v(i(n(0)).call(e,"Name your library and choose language.",{hash:{},data:t}))+"</p> </div> </div> "}function f(e,t){var a="";return a+=" "+v(i(n(0)).call(e,"Last updated {1}",e&&e.updatedAt,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var g,m="",v=this.escapeExpression,y=this,b="function"
;return m+='<form class="edit-section-type-form settings-container ',g=a.if.call(t,(g=t&&t.section,null==g||g===!1?g:g.type),{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(g||0===g)&&(m+=g),m+='"> ',g=a.if.call(t,t&&t.add,{hash:{},inverse:y.program(5,u,s),fn:y.program(3,l,s),data:s}),(g||0===g)&&(m+=g),m+=' <div class="wizard-blocks-group form-group type-group"> ',g=a.each.call(t,t&&t.sectionTypes,{hash:{},inverse:y.noop,fn:y.programWithDepth(7,c,s,t),data:s}),(g||0===g)&&(m+=g),
m+=' <label class="control-label"> <span class="control-error">'+v(i(n(0)).call(t,"You must select a media type.",{hash:{},data:s}))+'</span> </label> </div> <div class="visible-once-section-type-chosen"> ',g=a.if.call(t,t&&t.hasType,{hash:{},inverse:y.noop,fn:y.program(12,p,s),data:s}),(g||0===g)&&(m+=g),m+=' <div class="row"> <div class="col-md-7"> <div class="form-group title-group"> <div> <label for="edit-section-title" class="control-label"> '+v(i(n(0)).call(t,"Name",{hash:{},data:s
}))+' <span class="control-error">'+v(i(n(0)).call(t,"A library name is required.",{hash:{},data:s}))+'</span> </label> </div> <input type="text" id="edit-section-title" name="title" class="form-control" value="'+v((g=t&&t.section,g=null==g||g===!1?g:g.title,typeof g===b?g.apply(t):g))+'"> </div> </div> <div class="col-md-5"> <div class="form-group language-group"> <div> <label for="edit-section-language" class="control-label"> '+v(i(n(0)).call(t,"Language",{hash:{},data:s
}))+' <span class="control-error">'+v(i(n(0)).call(t,"A language is required.",{hash:{},data:s}))+'</span> </label> </div> <select id="edit-section-language" name="language"></select> </div> </div> </div> <div class="row"> <div class="col-md-12"> <span class="text-muted"> ',g=a.if.call(t,t&&t.updatedAt,{hash:{},inverse:y.noop,fn:y.program(14,f,s),data:s}),(g||0===g)&&(m+=g),m+=" </span> </div> </div> </div> </form> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <option value="'+f((n=e&&e.value,typeof n===p?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.selected,{hash:{},inverse:g.noop,fn:g.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=">"+f((n=e&&e.label,typeof n===p?n.apply(e):n))+"</option> "}function l(e,t){return"selected"}function u(e,t){var a="";return a+=' <option value="">'+f(i(n(0)).call(e,"Loading...",{hash:{},data:t}))+"</option> "}
function c(e,t){var n,i="";return i+=' <option value="'+f((n=e&&e.value,typeof n===p?n.apply(e):n))+'">'+f((n=e&&e.label,typeof n===p?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p="function",f=this.escapeExpression,g=this;return h+='<div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-title">'+f(i(n(0)).call(t,"Title",{hash:{},data:s
}))+'</label> <input type="text" id="match-search-title" name="title" class="form-control" value="'+f((d=t&&t.item,d=null==d||d===!1?d:d.title,typeof d===p?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-agent">'+f(i(n(0)).call(t,"Agent",{hash:{},data:s}))+'</label> <select id="match-search-agent" name="agent"> ',d=a.each.call(t,t&&t.agents,{hash:{},inverse:g.program(4,u,s),fn:g.program(1,o,s),data:s}),
(d||0===d)&&(h+=d),h+=' </select> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-year">'+f(i(n(0)).call(t,"Year",{hash:{},data:s}))+'</label> <input type="text" id="match-search-year" name="year" class="form-control" value="'+f((d=t&&t.item,d=null==d||d===!1?d:d.year,
typeof d===p?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-language">'+f(i(n(0)).call(t,"Language",{hash:{},data:s}))+'</label> <select id="match-search-language" name="language"> ',d=a.each.call(t,t&&t.languages,{hash:{},inverse:g.program(4,u,s),fn:g.program(6,c,s),data:s}),(d||0===d)&&(h+=d),h+=" </select> </div> </div> </div> "})},function(e,t,n){var i=n(7);e.exports=(i.default||i).template(function(e,t,n,i,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="result-region"> <div class="loading loading-inline"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.title,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function l(e,t){var a,r=""
;return r+=' <li> <a class="card btn-gray ',a=i(n(20)).call(e,e&&e.id,"all",{hash:{},inverse:h.noop,fn:h.program(3,u,t),data:t}),(a||0===a)&&(r+=a),r+='" data-id="'+f((a=e&&e.id,typeof a===p?a.apply(e):a))+'" href="#">'+f(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</a> </li> "}function u(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this,p="function",f=this.escapeExpression
;return d+='<div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',c=a.each.call(t,t&&t.deviceTypes,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+=' </ul> </div> <div class="device-list-container col-sm-8 col-md-9"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression
;return o+='<h3 class="invite-list-header top">'+l(i(n(0)).call(t,"Invites",{hash:{},data:s}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(0)).call(t,"Friends",{hash:{},data:s}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(0)).call(t,"Pending",{hash:{},data:s}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<h3 class="invite-list-header top">'+l(i(n(0)).call(t,"Invites",{hash:{},data:s}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(0)).call(t,"My Home",{hash:{},data:s}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(0)).call(t,"Pending",{hash:{},
data:s}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"selected"}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this,h=this.escapeExpression;return c+='<ul class="nav nav-header pull-right"> <li class="web-nav-item"><a class="web-btn btn-gray ',
u=i(n(20)).call(t,t&&t.subset,"web",{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+='" href="#!/settings/web">'+h(i(n(0)).call(t,"Web",{hash:{},data:s}))+'</a></li> <li class="server-nav-item ',u=a.unless.call(t,t&&t.hasPrimaryServer,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='"><a class="server-btn btn-gray ',u=i(n(20)).call(t,t&&t.subset,"server",{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),
c+='" href="#!/settings/server">'+h(i(n(0)).call(t,"Server",{hash:{},data:s}))+'</a></li> <li class="users-nav-item ',u=a.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='"><a class="users-btn btn-gray ',u=i(n(20)).call(t,t&&t.subset,"users",{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+='" href="#!/settings/users">'+h(i(n(0)).call(t,"Users",{hash:{},data:s
}))+'<span class="badge"></span></a></li> <li class="devices-nav-item ',u=a.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+='"><a class="devices-btn btn-gray ',u=i(n(20)).call(t,t&&t.subset,"devices",{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+='" href="#!/settings/devices">'+h(i(n(0)).call(t,"Devices",{hash:{},data:s}))+"</a></li> </ul> <h2>"+h(i(n(0)).call(t,"Settings",{hash:{},data:s
}))+'</h2> <div class="settings-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"hidden"}function l(e,t){return"selected"}function u(e,t){var a,r="";return r+=' <li> <a class="friends-card card btn-gray ',a=i(n(20)).call(e,e&&e.subset,"friends",{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t}),(a||0===a)&&(r+=a),
r+='" href="#!/settings/users/friends"> <span class="badge"></span> '+p(i(n(0)).call(e,"Friends",{hash:{},data:t}))+" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this,p=this.escapeExpression;return d+='<div class="filter-bar"> <div class="filter-bar-right"> <span class="user-actions ',c=a.unless.call(t,t&&t.showUserActions,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),
d+='"> <button class="add-user-btn btn btn-sm btn-default">'+p(i(n(0)).call(t,"Add User",{hash:{},data:s}))+'</button> <button class="enable-guest-btn btn btn-sm btn-default ',c=a.unless.call(t,t&&t.showEnableGuest,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='">'+p(i(n(0)).call(t,"Enable Guest",{hash:{},data:s}))+'</button> <button class="disable-guest-btn btn btn-sm btn-danger ',c=a.unless.call(t,t&&t.showDisableGuest,{hash:{},inverse:h.noop,fn:h.program(1,o,s),
data:s}),(c||0===c)&&(d+=c),d+='">'+p(i(n(0)).call(t,"Disable Guest",{hash:{},data:s}))+'</button> </span> <button class="leave-home-btn btn btn-sm btn-danger ',c=a.unless.call(t,t&&t.showLeaveHome,{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+='">'+p(i(n(0)).call(t,"Leave Home",{hash:{},data:s}))+'</button> <button class="invite-friend-btn btn btn-sm btn-default">'+p(i(n(0)).call(t,"Invite Friend",{hash:{},data:s
}))+'</button> </div> </div> <div class="users-row row"> <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> <li> <a class="home-card card btn-gray ',c=i(n(20)).call(t,t&&t.subset,"home",{hash:{},inverse:h.noop,fn:h.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+='" href="#!/settings/users/home"> <span class="badge"></span> '+p(i(n(0)).call(t,"My Home",{hash:{},data:s}))+" </a> </li> ",c=a.if.call(t,t&&t.showFriends,{hash:{},inverse:h.noop,fn:h.program(5,u,s),data:s}),(c||0===c)&&(d+=c),
d+=" </ul> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.language),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N((r=e&&e.title,typeof r===_?r.apply(e):r))+" </option> "}function l(e,t){
return"selected"}function u(e,t){var r,s="";return s+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="autoLogin" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.autoLogin),{hash:{},inverse:R.noop,fn:R.program(5,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N(i(n(0)).call(e,"Automatically Sign In",{hash:{},data:t}))+' </label> <p class="help-block">'+N(i(n(0)).call(e,"Do not prompt to select a user or enter a PIN during startup on this device.",{hash:{},data:t
}))+"</p> </div> "}function c(e,t){return"checked"}function d(e,t){var r,s="";return s+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="playThemeMusic" ',r=a.if.call(e,(r=e&&e.experienceSettings,null==r||r===!1?r:r.playThemeMusic),{hash:{},inverse:R.noop,fn:R.program(5,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N(i(n(0)).call(e,"Play Theme Music",{hash:{},data:t
}))+' </label> <p class="help-block">'+N(i(n(0)).call(e,"Automatically play theme music in the background when available.",{hash:{},data:t}))+"</p> </div> "}function h(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.allowHttpFallback),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}
function p(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.experienceSettings,null==r||r===!1?r:r.timeFormat),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function f(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,
null==r||r===!1?r:r.debugLevel),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function g(e,t){var r,s="";return s+=' <div class="form-group"> <label for="chromecastAppID">Chromecast Receiver</label> <select id="chromecastAppID"> ',r=a.each.call(e,e&&e.chromecastAppIDs,{hash:{},inverse:R.noop,fn:R.programWithDepth(16,m,t,e),data:t}),(r||0===r)&&(s+=r),
s+=' </select> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> <div id="chromecast-custom-group" class="form-group ',r=i(n(77)).call(e,(r=e&&e.settings,null==r||r===!1?r:r.chromecastAppID),"custom",{hash:{},inverse:R.noop,fn:R.program(18,v,t),data:t}),(r||0===r)&&(s+=r),
s+='"> <label for="chromecastCustomAppID">Custom Chromecast Application ID</label> <input type="text" id="chromecastCustomAppID" class="form-control" placeholder="Application ID" value="'+N((r=e&&e.settings,r=null==r||r===!1?r:r.chromecastCustomAppID,
typeof r===_?r.apply(e):r))+'"> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> <div class="form-group"> <label for="myPlexScheme">Plex.tv Scheme</label> <input type="text" id="myPlexScheme" class="form-control" placeholder="https" value="'+N((r=e&&e.settings,r=null==r||r===!1?r:r.myPlexScheme,
typeof r===_?r.apply(e):r))+'"> </div> <div class="form-group"> <label for="myPlexUrl">Plex.tv Address</label> <input type="text" id="myPlexUrl" class="form-control" placeholder="plex.tv" value="'+N((r=e&&e.settings,r=null==r||r===!1?r:r.myPlexUrl,typeof r===_?r.apply(e):r))+'"> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="rejectDirectConnections" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.rejectDirectConnections),{hash:{},inverse:R.noop,
fn:R.program(5,c,t),data:t}),(r||0===r)&&(s+=r),s+='> Reject direct connections </label> <p class="help-block">Forces relayed connections if available. Refresh after saving this setting for it to take effect.</p> </div> '}function m(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.chromecastAppID),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),
s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function v(e,t){return"hidden"}function y(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.index,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.index,(r=a&&a.settings,null==r||r===!1?r:r.localQuality),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N(i(n(186)).call(e,e,{hash:{},data:t}))+" </option> "}function b(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.index,
typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.index,(r=a&&a.settings,null==r||r===!1?r:r.remoteQuality),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N(i(n(186)).call(e,e,{hash:{},data:t}))+" </option> "}function S(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.index,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.index,(r=a&&a.settings,null==r||r===!1?r:r.channelQuality),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),
(r||0===r)&&(s+=r),s+="> "+N(i(n(186)).call(e,e,{hash:{},data:t}))+" </option> "}function I(e,t){var r,s="";return s+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="dash" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.dash),{hash:{},inverse:R.noop,fn:R.program(5,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N(i(n(0)).call(e,"HTML5 Player",{hash:{},data:t
}))+' </label> <p class="help-block">'+N(i(n(0)).call(e,"Prefer the HTML5 video player over the Flash player.",{hash:{},data:t}))+"</p> </div> "}function w(e,t){var a="";return a+=" "+N(i(n(0)).call(e,"Allows the player to play compatible media without any conversion.",{hash:{},data:t}))+" "}function M(e,t){var a=""
;return a+=" "+N(i(n(0)).call(e,"Allows the player to play compatible media without any conversion. In most browsers, direct play supports MP4 videos with h264 video and AAC audio. Videos with subtitles cannot be played directly.",{hash:{},data:t}))+" "}function C(e,t){var r,s="";return s+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="allowAC3" ',r=a.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.allowAC3),{hash:{},inverse:R.noop,
fn:R.program(5,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N(i(n(0)).call(e,"Allow Direct Play of AC3 Audio",{hash:{},data:t}))+' </label> <p class="help-block">'+N(i(n(0)).call(e,"Allow MP4 videos with AC3 audio to be played directly. Browser support for AC3 audio is limited.",{hash:{},data:t}))+"</p> </div> "}function D(e,t){var r,s="";return s+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="preferAAC" ',r=a.if.call(e,(r=e&&e.settings,
null==r||r===!1?r:r.preferAAC),{hash:{},inverse:R.noop,fn:R.program(5,c,t),data:t}),(r||0===r)&&(s+=r),s+="> "+N(i(n(0)).call(e,"Prefer AAC Audio",{hash:{},data:t}))+' </label> <p class="help-block">'+N(i(n(0)).call(e,"Prefer AAC over MP3 when transcoding audio. Some devices, like the Wii U, only support HLS with AAC audio.",{hash:{},data:t}))+"</p> </div> "}function P(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',
r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.audioBoost),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function T(e,t){var r,s="";return s+=' <div class="form-group"> <label for="subtitleSize">'+N(i(n(0)).call(e,"Subtitle Size",{hash:{},data:t}))+'</label> <select id="subtitleSize" data-type="int"> ',r=a.each.call(e,e&&e.subtitleSizes,{hash:{},inverse:R.noop,
fn:R.programWithDepth(39,x,t,e),data:t}),(r||0===r)&&(s+=r),s+=' </select> </div> <div class="form-group"> <label for="subtitlesBurnLevel">'+N(i(n(0)).call(e,"Burn Subtitles",{hash:{},data:t}))+'</label> <select id="subtitlesBurnLevel"> ',r=a.each.call(e,e&&e.subtitlesBurnLevels,{hash:{},inverse:R.noop,fn:R.programWithDepth(41,E,t,e),data:t}),(r||0===r)&&(s+=r),
s+=' </select> <p class="help-block">'+N(i(n(0)).call(e,"Determines if the server should burn in subtitles when converting video depending on the subtitles format. Avoiding burn in improves server performance and is only supported by the HTML5 player.",{hash:{},data:t}))+"</p> </div> "}function x(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.subtitleSize),{hash:{},inverse:R.noop,
fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function E(e,t,a){var r,s="";return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.subtitlesBurnLevel),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function A(e,t,a){var r,s=""
;return s+=' <option value="'+N((r=e&&e.value,typeof r===_?r.apply(e):r))+'" ',r=i(n(20)).call(e,e&&e.value,(r=a&&a.settings,null==r||r===!1?r:r.extrasPrefixCount),{hash:{},inverse:R.noop,fn:R.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=">"+N(i(n(0)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var k,L="",_="function",N=this.escapeExpression,R=this
;return L+='<div class="filter-bar"> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right basic-setting">'+N(i(n(0)).call(t,"Show Advanced",{hash:{},data:s}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right advanced-setting">'+N(i(n(0)).call(t,"Hide Advanced",{hash:{},data:s
}))+'</button> </div> <div class="row"> <div class="col-sm-4 col-md-3"> <ul class="settings-nav nav nav-cards"> <li><a class="card btn-gray selected" href="#general-web-group">'+N(i(n(0)).call(t,"General",{hash:{},data:s}))+'</a></li> <li class="advanced-setting"><a class="card btn-gray" href="#debug-web-group">'+N(i(n(0)).call(t,"Debug",{hash:{},data:s}))+'</a></li> <li><a class="card btn-gray" href="#player-web-group">'+N(i(n(0)).call(t,"Player",{hash:{},data:s
}))+'</a></li> </ul> </div> <div class="col-sm-8 col-md-9"> <form id="web-settings-form"> <div id="general-web-group" class="settings-group active"> <h4 class="version-title"> '+N(i(n(0)).call(t,"Version",{hash:{},data:s}))+" "+N((k=t&&t.version,typeof k===_?k.apply(t):k))+' </h4> <div class="form-group"> <label for="language">'+N(i(n(0)).call(t,"Language",{hash:{},data:s}))+'</label> <select id="language"> ',k=a.each.call(t,t&&t.languages,{hash:{},inverse:R.noop,fn:R.programWithDepth(1,o,s,t),
data:s}),(k||0===k)&&(L+=k),L+=' </select> <p class="help-block">'+N(i(n(0)).call(t,"Help us translate this app into your language {1}here{2}.",'<a href="https://transifex.com/plex-1/plex-web" target="_blank">',"</a>",{hash:{},data:s}))+"</p> </div> ",k=a.if.call(t,t&&t.hasHome,{hash:{},inverse:R.noop,fn:R.program(4,u,s),data:s}),(k||0===k)&&(L+=k),L+=" ",k=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:R.noop,fn:R.program(7,d,s),data:s}),(k||0===k)&&(L+=k),
L+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="keyboardShortcuts" ',k=a.if.call(t,(k=t&&t.settings,null==k||k===!1?k:k.keyboardShortcuts),{hash:{},inverse:R.noop,fn:R.program(5,c,s),data:s}),(k||0===k)&&(L+=k),L+="> "+N(i(n(0)).call(t,"Enable Keyboard Shortcuts",{hash:{},data:s}))+' </label> <p class="help-block">'+N(i(n(0)).call(t,"Press ? to view the list of {1}available shortcuts{2}.",'<a class="keyboard-shortcuts-btn" href="#">',"</a>",{hash:{},data:s
}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="companion" ',k=a.if.call(t,(k=t&&t.settings,null==k||k===!1?k:k.companion),{hash:{},inverse:R.noop,fn:R.program(5,c,s),data:s}),(k||0===k)&&(L+=k),L+="> "+N(i(n(0)).call(t,"Advertise as player",{hash:{},data:s}))+' </label> <p class="help-block">'+N(i(n(0)).call(t,"Allow other Plex apps to fling content to this device and control it remotely.",{hash:{},data:s
}))+'</p> </div> <div class="form-group"> <label for="allowHttpFallback">'+N(i(n(0)).call(t,"Allow Fallback to Insecure Connections",{hash:{},data:s}))+'</label> <select id="allowHttpFallback"> ',k=a.each.call(t,t&&t.httpFallbackOptions,{hash:{},inverse:R.noop,fn:R.programWithDepth(9,h,s,t),data:s}),(k||0===k)&&(L+=k),L+=' </select> <p class="help-block">'+N(i(n(0)).call(t,"Allow this browser to make insecure connections to Plex Media Server if secure connections fail.",{hash:{},data:s
}))+'</p> </div> <div class="form-group"> <label for="timeFormat">'+N(i(n(0)).call(t,"Time Format",{hash:{},data:s}))+'</label> <select id="timeFormat"> ',k=a.each.call(t,t&&t.timeFormats,{hash:{},inverse:R.noop,fn:R.programWithDepth(11,p,s,t),data:s}),(k||0===k)&&(L+=k),L+=' </select> </div> </div> <div id="debug-web-group" class="settings-group"> <div class="form-group"> <label for="debugLevel">'+N(i(n(0)).call(t,"Debug Level",{hash:{},data:s
}))+'</label> <select id="debugLevel" data-type="int"> ',k=a.each.call(t,t&&t.debugLevels,{hash:{},inverse:R.noop,fn:R.programWithDepth(13,f,s,t),data:s}),(k||0===k)&&(L+=k),L+=' </select> <p class="help-block">'+N(i(n(0)).call(t,"You can view the debug logs {1}here{2}.",'<a href="#!/logs">',"</a>",{hash:{},data:s}))+"</p> </div> ",k=a.if.call(t,t&&t.isNinja,{hash:{},inverse:R.noop,fn:R.program(15,g,s),data:s}),(k||0===k)&&(L+=k),
L+=' </div> <div id="player-web-group" class="settings-group"> <h4 class="settings-header">'+N(i(n(0)).call(t,"Streaming Quality",{hash:{},data:s}))+'</h4> <div class="form-group"> <label for="localQuality">'+N(i(n(0)).call(t,"Local Quality",{hash:{},data:s}))+'</label> <select id="localQuality" data-type="int"> <option value="-1">'+N(i(n(0)).call(t,"Original",{hash:{},data:s}))+"</option> ",k=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:R.noop,fn:R.programWithDepth(20,y,s,t),data:s}),
(k||0===k)&&(L+=k),L+=' </select> </div> <div class="form-group"> <label for="remoteQuality">'+N(i(n(0)).call(t,"Remote Quality",{hash:{},data:s}))+'</label> <select id="remoteQuality" data-type="int"> <option value="-1">'+N(i(n(0)).call(t,"Original",{hash:{},data:s}))+"</option> ",k=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:R.noop,fn:R.programWithDepth(22,b,s,t),data:s}),(k||0===k)&&(L+=k),
L+=' </select> </div> <div class="form-group"> <label for="channelQuality">'+N(i(n(0)).call(t,"Online Quality",{hash:{},data:s}))+'</label> <select id="channelQuality" data-type="int"> <option value="-1">'+N(i(n(0)).call(t,"Original",{hash:{},data:s}))+"</option> ",k=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:R.noop,fn:R.programWithDepth(24,S,s,t),data:s}),(k||0===k)&&(L+=k),L+=" </select> </div> ",k=a.if.call(t,t&&t.showExperimentalPlayer,{hash:{},inverse:R.noop,
fn:R.program(26,I,s),data:s}),(k||0===k)&&(L+=k),L+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directPlay" ',k=a.if.call(t,(k=t&&t.settings,null==k||k===!1?k:k.directPlay),{hash:{},inverse:R.noop,fn:R.program(5,c,s),data:s}),(k||0===k)&&(L+=k),L+="> "+N(i(n(0)).call(t,"Direct Play",{hash:{},data:s}))+' </label> <p class="help-block"> ',k=a.if.call(t,t&&t.isPMPDesktop,{hash:{},inverse:R.program(30,M,s),fn:R.program(28,w,s),data:s}),
(k||0===k)&&(L+=k),L+=' </p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directStream" ',k=a.if.call(t,(k=t&&t.settings,null==k||k===!1?k:k.directStream),{hash:{},inverse:R.noop,fn:R.program(5,c,s),data:s}),(k||0===k)&&(L+=k),L+="> "+N(i(n(0)).call(t,"Direct Stream",{hash:{},data:s}))+' </label> <p class="help-block">'+N(i(n(0)).call(t,"Allows the server to copy compatible audio and video streams without converting them.",{hash:{},
data:s}))+'</p> </div> <h4 class="settings-header">'+N(i(n(0)).call(t,"Audio & Subtitles",{hash:{},data:s}))+"</h4> ",k=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:R.noop,fn:R.program(32,C,s),data:s}),(k||0===k)&&(L+=k),L+=" ",k=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:R.noop,fn:R.program(34,D,s),data:s}),(k||0===k)&&(L+=k),L+=' <div class="form-group"> <label for="audioBoost">'+N(i(n(0)).call(t,"Multi-Channel Audio Boost",{hash:{},data:s
}))+'</label> <select id="audioBoost" data-type="int"> ',k=a.each.call(t,t&&t.audioBoostLevels,{hash:{},inverse:R.noop,fn:R.programWithDepth(36,P,s,t),data:s}),(k||0===k)&&(L+=k),L+=' </select> <p class="help-block">'+N(i(n(0)).call(t,"Boost volume when converting multi-channel audio to stereo.",{hash:{},data:s}))+"</p> </div> ",k=a.unless.call(t,t&&t.isPMPDesktop,{hash:{},inverse:R.noop,fn:R.program(38,T,s),data:s}),(k||0===k)&&(L+=k),
L+=' <h4 class="settings-header">'+N(i(n(0)).call(t,"Extras",{hash:{},data:s}))+'</h4> <div class="form-group"> <label for="extrasPrefixCount">'+N(i(n(0)).call(t,"Cinema Trailers to Play Before Movies",{hash:{},data:s}))+'</label> <select id="extrasPrefixCount" data-type="int"> ',k=a.each.call(t,t&&t.extrasPrefixCounts,{hash:{},inverse:R.noop,fn:R.programWithDepth(43,A,s,t),data:s}),(k||0===k)&&(L+=k),
L+=' </select> </div> </div> <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+N(i(n(0)).call(t,"Save Changes",{hash:{},data:s}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t,a){
var r,s="";return s+=' <li class="',r=i(n(20)).call(e,(r=a&&a.currentType,null==r||r===!1?r:r.id),e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+='"> <a class="btn-gray" data-type="'+p((r=e&&e.typeString,typeof r===h?r.apply(e):r))+'" href="#">'+p(i(n(0)).call(e,e&&e.plural,{hash:{},data:t}))+"</a> </li> "}function l(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this,h="function",p=this.escapeExpression
;return c+='<ul class="agent-types-nav nav nav-pills"> ',u=a.each.call(t,t&&t.agentTypes,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,o,s,t),data:s}),(u||0===u)&&(c+=u),c+=' </ul> <div class="agents-list-container"></div> <p class="help-block sortable-help-block">'+p(i(n(0)).call(t,"Select which additional agents should contribute to metadata from {1}, and drag them to change the order of preference.",'<span class="agent-label"></span>',{hash:{},data:s
}))+'</p> <div class="contributors-list-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+c(i(n(26)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this
;return u+='<div class="sign-in-region"></div> <hr> <form id="server-settings-form"> <div class="form-group"> <h4 class="version-header"><span class="version"></span> <span class="update-region"></span></h4> </div> ',l=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),
u+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(i(n(0)).call(t,"Save Changes",{hash:{},data:s}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s=""
;return s+=' <p class="text-muted"> '+p(i(n(0)).call(e,"The Plex Media Server logs and database can be helpful to developers and forum community members in diagnosing server issues.",{hash:{},data:t}))+' </p> <div class="help-btn-container"> ',r=a.if.call(e,e&&e.showDownloadLogs,{hash:{},inverse:f.noop,fn:f.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.showDownloadDatabases,{hash:{},inverse:f.noop,fn:f.program(4,u,t),data:t}),(r||0===r)&&(s+=r),s+=" </div> "}
function l(e,t){var a,r="";return r+=' <a class="btn btn-primary" href="'+p((a=e&&e.downloadLogsUrl,typeof a===h?a.apply(e):a))+'" target="'+p((a=e&&e.defaultLinkTarget,typeof a===h?a.apply(e):a))+'">'+p(i(n(0)).call(e,"Download Logs",{hash:{},data:t}))+"</a> "}function u(e,t){var a,r="";return r+=' <a class="btn btn-primary" href="'+p((a=e&&e.downloadDatabasesUrl,typeof a===h?a.apply(e):a))+'" target="'+p((a=e&&e.defaultLinkTarget,
typeof a===h?a.apply(e):a))+'">'+p(i(n(0)).call(e,"Download Database",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="help-container"> <p class="text-muted"> '+p(i(n(0)).call(t,"You can find documentation, guides and FAQs as well as our friendly Community Forums among our {1}support resources{2}.",'<a href="https://support.plex.tv" target="_blank">',"</a>",{hash:{},data:s
}))+" </p> ",c=a.if.call(t,t&&t.showDownloadLogsOrDatabases,{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+=" </div> "})},function(e,t){e.exports=function(){return""}},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o,l="",u=this.escapeExpression
;return l+='<a class="card btn-gray" href="#" data-group="'+u((o=t&&t.id,"function"==typeof o?o.apply(t):o))+'"> <span class="modal-nav-icon"> <i class="server-settings-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-settings-status-icon error glyphicon circle-exclamation-mark"></i> <i class="server-settings-status-icon success glyphicon circle-ok"></i> <i class="server-settings-status-icon warning plex-icon-alert-560"></i> </span> '+u(i(n(0)).call(t,t&&t.title,{
hash:{},data:s}))+" </a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+c(i(n(26)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this;return u+='<form id="server-settings-form"> ',l=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),
(l||0===l)&&(u+=l),u+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(i(n(0)).call(t,"Save Changes",{hash:{},data:s}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+B(i(n(0)).call(e,"Connecting server...",{hash:{},data:t}))+" </h4> "}function l(e,t){var a;return a=i(n(20)).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"disconnecting",{hash:{},inverse:V.program(6,c,t),fn:V.program(4,u,t),data:t}),a||0===a?a:""}function u(e,t){var a=""
;return a+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+B(i(n(0)).call(e,"Disconnecting server...",{hash:{},data:t}))+" </h4> "}function c(e,t){var n;return n=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.program(12,f,t),fn:V.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var r,s="";return s+=' <h4 class="status-header text-danger">'+B(i(n(0)).call(e,"Not available outside your network",{hash:{},data:t}))+"</h4> ",
r=a.if.call(e,e&&e.isSignedOut,{hash:{},inverse:V.program(10,p,t),fn:V.program(8,h,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function h(e,t){var a="";return a+=' <span class="status-description help-block">'+B(i(n(0)).call(e,"First {1}sign in{2} to access your server from anywhere.",'<a class="sign-in-link" href="#">',"</a>",{hash:{},data:t}))+"</span> "}function p(e,t){var a="";return a+=' <span class="status-description help-block">'+B(i(n(0)).call(e,"Enable to access your server from anywhere.",{
hash:{},data:t}))+'</span> <button class="remote-access-enable-btn btn btn-sm btn-primary">'+B(i(n(0)).call(e,"Enable Remote Access",{hash:{},data:t}))+"</button> "}function f(e,t){var r,s="";return s+=" ",r=i(n(20)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"unreachable",{hash:{},inverse:V.program(19,b,t),fn:V.program(13,g,t),data:t}),(r||0===r)&&(s+=r),s+=' <button class="remote-access-disable-btn btn btn-sm btn-default">'+B(i(n(0)).call(e,"Disable Remote Access",{
hash:{},data:t}))+"</button> ",r=a.if.call(e,(r=e&&e.mappingModeSetting,null==r||r===!1?r:r.value),{hash:{},inverse:V.noop,fn:V.program(21,S,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function g(e,t){var a,r="";return r+=' <h4 class="status-header text-danger">'+B(i(n(0)).call(e,"Not available outside your network",{hash:{},data:t
}))+'</h4> <span class="unreachable-description status-description help-block">'+B(i(n(0)).call(e,"Your server is signed in to Plex, but is not reachable from outside your network. {1}Learn more{2}",'<a href="https://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server" target="_blank">',"</a>",{hash:{},data:t}))+"</span> ",a=i(n(20)).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),"jumboframes",{hash:{},inverse:V.program(16,v,t),fn:V.program(14,m,t),data:t}),
(a||0===a)&&(r+=a),r+=" "}function m(e,t){var a="";return a+=' <span class="jumbo-frames-description status-details help-block"> <span class="help-tip">'+B(i(n(0)).call(e,"Tip:",{hash:{},data:t}))+"</span> "+B(i(n(0)).call(e,'It looks like the devices between your server and the internet have "jumbo frames" enabled which can cause issues with remote access. Disable jumbo frames on at least one device and try again.',{hash:{},data:t}))+" </span> "}function v(e,t){var a
;return a=i(n(20)).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),"doublenat",{hash:{},inverse:V.noop,fn:V.program(17,y,t),data:t}),a||0===a?a:""}function y(e,t){var a="";return a+=' <span class="double-nat-description status-details help-block"> <span class="help-tip">'+B(i(n(0)).call(e,"Tip:",{hash:{},data:t
}))+"</span> "+B(i(n(0)).call(e,'It looks like your server may be connected to the internet through multiple routers or other network devices. Try connecting it directly to your primary device, or visit our support site for more information about troubleshooting this "Double-NAT" scenario. {1}Learn more{2}','<a href="https://support.plex.tv/hc/en-us/articles/200931138" target="_blank">',"</a>",{hash:{},data:t}))+" </span> "}function b(e,t){var a=""
;return a+=' <h4 class="status-header text-success">'+B(i(n(0)).call(e,"Fully accessible outside your network",{hash:{},data:t}))+'</h4> <span class="status-description help-block"> '+B(i(n(0)).call(e,"You can access this server from signed-in Plex apps or in a browser at {1}.",'<a href="https://plex.tv/web" target="_blank">https://plex.tv/web</a>',{hash:{},data:t}))+" </span> "}function S(e,t){var a=""
;return a+=' <p class="remote-access-disable-message help-block"> <i class="remote-access-disable-warning-icon glyphicon circle-exclamation-mark"></i> '+B(i(n(0)).call(e,"You currently have Remote Access enabled through a manually-specified port. If you wish to disable Remote Access, you will need to remove your manual port forwarding from your router.",{hash:{},data:t}))+" </p> "}function I(e,t){var a,r="";return r+=" ",a=i(n(77)).call(e,(a=e&&e.cloudAccount,
null==a||a===!1?a:a.remoteAccessState),"disconnecting",{hash:{},inverse:V.noop,fn:V.program(24,w,t),data:t}),(a||0===a)&&(r+=a),r+=" "}function w(e,t){var r,s="";return s+=' <div class="remote-access-advanced"> <div class="remote-access-mapping-container ',r=a.unless.call(e,e&&e.forceAdvanced,{hash:{},inverse:V.noop,fn:V.program(25,M,t),data:t}),(r||0===r)&&(s+=r),
s+='"> <hr> <i class="plex-image server server-xs server-logo"></i> <div class="remote-access-mapping"> <span class="mapping-label text-muted">'+B(i(n(0)).call(e,"Private",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',r=a.if.call(e,e&&e.hasPrivateAddress,{hash:{},inverse:V.program(29,D,t),fn:V.program(27,C,t),data:t}),(r||0===r)&&(s+=r),s+=" </span> ",r=a.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:V.program(33,T,t),fn:V.program(31,P,t),data:t}),(r||0===r)&&(s+=r),
s+=' <span class="mapping-label text-muted">'+B(i(n(0)).call(e,"Public",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',r=a.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:V.program(29,D,t),fn:V.program(35,x,t),data:t}),(r||0===r)&&(s+=r),s+=" </span> ",r=i(n(20)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"ok",{hash:{},inverse:V.program(33,T,t),fn:V.program(31,P,t),data:t}),(r||0===r)&&(s+=r),s+=' <span class="mapping-internet ',
r=i(n(77)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"ok",{hash:{},inverse:V.noop,fn:V.program(37,E,t),data:t}),(r||0===r)&&(s+=r),s+='"> <i class="mapping-internet-icon glyphicon globe text-muted"></i> '+B(i(n(0)).call(e,"Internet",{hash:{},data:t}))+" </span> </div> </div> ",r=a.if.call(e,e&&e.hasMappingSettings,{hash:{},inverse:V.noop,fn:V.program(39,A,t),data:t}),(r||0===r)&&(s+=r),s+=" </div> "}function M(e,t){return"advanced-setting"}function C(e,t){var a,r=""
;return r+=' <span class="mapping-value">'+B((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.privateAddress,typeof a===H?a.apply(e):a))+'</span> <span class="mapping-separator text-muted">'+B(i(n(0)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+B((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.privatePort,typeof a===H?a.apply(e):a))+"</span> "}function D(e,t){var a="";return a+=' <span class="mapping-empty-value">'+B(i(n(0)).call(e,"Unknown IP",{hash:{},data:t}))+"</span> "}
function P(e,t){return' <i class="mapping-icon glyphicon left-arrow text-success"></i> '}function T(e,t){return' <i class="mapping-icon glyphicon remove-2 text-danger"></i> '}function x(e,t){var a,r="";return r+=' <span class="mapping-value">'+B((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.publicAddress,typeof a===H?a.apply(e):a))+'</span> <span class="mapping-separator text-muted">'+B(i(n(0)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+B((a=e&&e.cloudAccount,
a=null==a||a===!1?a:a.publicPort,typeof a===H?a.apply(e):a))+"</span> "}function E(e,t){return"unreachable"}function A(e,t){var r,s="";return s+=' <div class="remote-access-error-container ',r=a.unless.call(e,e&&e.forceAdvanced,{hash:{},inverse:V.noop,fn:V.program(25,M,t),data:t}),(r||0===r)&&(s+=r),s+='"> <div class="form-inline"> <div class="checkbox"> <label class="',r=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.noop,fn:V.program(40,k,t),data:t}),(r||0===r)&&(s+=r),
s+='"> <input type="checkbox" id="'+B((r=e&&e.mappingModeSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" name="'+B((r=e&&e.mappingModeSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" value="1" ',r=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.noop,fn:V.program(40,k,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,(r=e&&e.mappingModeSetting,null==r||r===!1?r:r.value),{hash:{},inverse:V.noop,fn:V.program(42,L,t),data:t}),(r||0===r)&&(s+=r),
s+="> "+B(i(n(0)).call(e,"Manually specify public port",{hash:{},data:t}))+' </label> </div> <div class="form-group"> <input type="text" id="'+B((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" name="'+B((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.id,typeof r===H?r.apply(e):r))+'" class="form-control" value="'+B((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.value,typeof r===H?r.apply(e):r))+'" ',r=a.unless.call(e,e&&e.canEditPort,{hash:{},inverse:V.noop,
fn:V.program(40,k,t),data:t}),(r||0===r)&&(s+=r),s+='> </div> <button class="retry-btn btn btn-primary btn-loading" ',r=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.noop,fn:V.program(40,k,t),data:t}),(r||0===r)&&(s+=r),s+='> <div class="loading loading-sm"></div> <span class="btn-label">',r=i(n(20)).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"unreachable",{hash:{},inverse:V.program(46,N,t),fn:V.program(44,_,t),data:t}),(r||0===r)&&(s+=r),
s+='</span> </button> </div> <p class="help-block">'+B(i(n(0)).call(e,"You may need to enable this to establish a direct connection from outside your network. You may also need to configure your router. Detailed instructions are available {1}here{2}.",'<a href="http://support.plex.tv/hc/en-us/articles/200931138-Troubleshooting-myPlex-Server-connections" target="_blank">',"</a>",{hash:{},data:t}))+"</p> </div> "}function k(e,t){return"disabled"}function L(e,t){return"checked"}function _(e,t){
return B(i(n(0)).call(e,"Retry",{hash:{},data:t}))}function N(e,t){return B(i(n(0)).call(e,"Apply",{hash:{},data:t}))}function R(e,t){var r,s="";return s+=' <div class="remote-access-upload-container ',r=a.unless.call(e,e&&e.totalRateSettingValue,{hash:{},inverse:V.noop,fn:V.program(49,O,t),data:t}),(r||0===r)&&(s+=r),
s+='"> <hr> <div class="remote-access-upload-icon-container"> <i class="remote-access-upload-icon glyphicon circle-arrow-top"></i> <i class="remote-access-upload-warning-icon glyphicon circle-exclamation-mark"></i> </div> <form id="remote-access-upload-form" class="remote-access-upload-form"> <div class="remote-access-upload-speed-header">'+B(i(n(0)).call(e,"No upload speed set",{hash:{},data:t
}))+'</div> <div class="form-group"> <div class="form-inline"> <div class="form-group"> '+B(i(n(0)).call(e,"Internet upload speed",{hash:{},data:t}))+' <input type="text" id="'+B((r=e&&e.totalRateSettingID,typeof r===H?r.apply(e):r))+'" name="'+B((r=e&&e.totalRateSettingID,typeof r===H?r.apply(e):r))+'" class="remote-access-upload-speed-control form-control" value="',r=a.if.call(e,e&&e.totalRateSettingValue,{hash:{},inverse:V.noop,fn:V.program(51,j,t),data:t}),(r||0===r)&&(s+=r),
s+='" > '+B(i(n(0)).call(e,"Mbps",{hash:{},data:t}))+' </div> <p class="help-block"> '+B(i(n(0)).call(e,"You can use {1}speedtest.net{2} to determine your internet upload capacity.",'<a href="http://speedtest.net" target="_blank" rel="noopener noreferrer">',"</a>",{hash:{},data:t}))+" <br> "+B(i(n(0)).call(e,"Enter an upload speed here and Plex can ensure it operates within this boundary.",{hash:{},data:t}))+" </p> </div> </div> ",r=a.each.call(e,e&&e.uploadSettings,{hash:{},inverse:V.noop,
fn:V.program(53,z,t),data:t}),(r||0===r)&&(s+=r),s+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+B(i(n(0)).call(e,"Save Changes",{hash:{},data:t}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> '}function O(e,t){return"show-warning"}function j(e,t){var n;return B((n=e&&e.totalRateSettingValue,typeof n===H?n.apply(e):n))}
function z(e,t){var a="";return a+=" "+B(i(n(26)).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var U,F="",B=this.escapeExpression,V=this,H="function";return F+='<i class="remote-access-status-icon glyphicon globe"></i> <div class="remote-access-status-message"> ',U=i(n(20)).call(t,(U=t&&t.cloudAccount,null==U||U===!1?U:U.remoteAccessState),"connecting",{hash:{},inverse:V.program(3,l,s),fn:V.program(1,o,s),data:s}),
(U||0===U)&&(F+=U),F+=" </div> ",U=i(n(77)).call(t,(U=t&&t.cloudAccount,null==U||U===!1?U:U.remoteAccessState),"connecting",{hash:{},inverse:V.noop,fn:V.program(23,I,s),data:s}),(U||0===U)&&(F+=U),F+=" ",U=a.if.call(t,t&&t.hasUploadLimitSettings,{hash:{},inverse:V.noop,fn:V.program(48,R,s),data:s}),(U||0===U)&&(F+=U),F+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <button class="server-sign-out-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Sign Out",{hash:{},data:t}))+"</span> </button> "}function l(e,t){var a="";return a+=' <div class="server-claim-container"> <div class="server-claim-info"> <h4>'+h(i(n(0)).call(e,"This server is unclaimed and not secure",{hash:{},data:t
}))+'</h4> <p class="help-block"> '+h(i(n(0)).call(e,"Claiming this server will associate it with your Plex account. {1} This helps your devices find each other and helps keep your media safe.","<br>",{hash:{},data:t}))+' </p> </div> <button class="server-claim-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Claim Server",{hash:{},data:t}))+"</span> </button> </div> "}function u(e,t){var a=""
;return a+=' <form id="server-sign-in-form" class="form-inline"> <div class="form-group"> <input type="text" class="form-control" name="username" placeholder="'+h(i(n(0)).call(e,"Username or email",{hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> </div> <div class="form-group"> <input type="password" class="form-control" name="password" placeholder="'+h(i(n(0)).call(e,"Password",{hash:{},data:t
}))+'"> </div> <button type="submit" class="server-sign-in-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(e,"Sign In",{hash:{},data:t}))+'</span> </button> <p class="help-block">'+h(i(n(0)).call(e,"Sign in with your Plex account to help your devices find this server, access your media remotely, and more. {1}Learn more{2}",'<a href="https://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server">',"</a>",{hash:{},data:t
}))+"</p> </form> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var c,d="",h=this.escapeExpression,p=this;return d+='<div class="server-account-poster user-poster img-circle placeholder-friend"> <i class="server-signedout-icon plex-icon-alert-560"></i> </div> <div class="server-account-info"> <div class="server-account-user"> <div class="server-account-label">'+h(i(n(0)).call(t,"Server signed in as",{hash:{},data:s
}))+'</div> <div class="server-account-username"></div> </div> ',c=a.if.call(t,t&&t.showSignOut,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(c||0===c)&&(d+=c),d+=" </div> ",c=a.if.call(t,t&&t.showClaimMessage,{hash:{},inverse:p.program(5,u,s),fn:p.program(3,l,s),data:s}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){return"active"}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this,d=this.escapeExpression;return u+='<a href="#" class="check-for-updates-btn label label-btn label-primary ',l=a.unless.call(t,t&&t.canCheckForUpdate,{hash:{},inverse:c.noop,fn:c.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+='"> <i class="label-icon glyphicon upload"></i> '+d(i(n(0)).call(t,"Check for Updates",{hash:{},data:s
}))+' </a> <a href="#" class="checking-for-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(i(n(0)).call(t,"Checking for Updates",{hash:{},data:s}))+' </a> <a href="#" class="available-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Download Updates",{hash:{},data:s
}))+' </a> <span class="downloading-updates-container label label-btn label-progress active"> <i class="label-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Downloading Update",{hash:{},data:s}))+' <span class="downloading-progress-container hidden">(<span class="downloading-progress-label"></span>%)</span ></span> <a href="#" class="install-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+d(i(n(0)).call(t,"Install Update",{hash:{},data:s
}))+' </a> <a href="#" class="installing-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(i(n(0)).call(t,"Installing",{hash:{},data:s}))+' </a> <span class="install-info-label up-to-date-label"> <i class="success-icon glyphicon ok-2"></i> '+d(i(n(0)).call(t,"Up to date",{hash:{},data:s
}))+' </span> <span class="install-info-label install-error-label"> <i class="failure-icon glyphicon circle-exclamation-mark"></i> <span class="update-error-message"></span> <a class="install-manual-link" href="https://plex.tv/downloads" target="_blank">'+d(i(n(0)).call(t,"Please install manually.",{hash:{},data:s}))+'</a> </span> <a href="#" class="release-notes-btn label label-btn label-default"> <i class="label-icon glyphicon circle-info"></i> '+d(i(n(0)).call(t,"What's New",{hash:{},data:s
}))+" </a> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" "+p(i(n(0)).call(e,"Optimized Versions requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" "}function l(e,t){var n;return n=a.if.call(e,e&&e.isTranscoderRequired,{hash:{},inverse:f.program(6,c,t),fn:f.program(4,u,t),data:t}),n||0===n?n:""}function u(e,t){var a=""
;return a+=" "+p(i(n(0)).call(e,"This Plex Media Server platform is not capable of converting video.",{hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+p(i(n(0)).call(e,"There was a problem requesting media versions from this server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var d,h="",p=this.escapeExpression,f=this;return h+='<div class="row row-padded"> <h4 class="text-muted text-center"> ',d=a.if.call(t,t&&t.isUpgradeRequired,{
hash:{},inverse:f.program(3,l,s),fn:f.program(1,o,s),data:s}),(d||0===d)&&(h+=d),h+=" </h4> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<p class="versions-status-message hidden"> <button class="delete-all-btn btn btn-sm btn-danger pull-right">'+l(i(n(0)).call(t,"Delete All Versions",{
hash:{},data:s}))+"</button> "+l(i(n(0)).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{hash:{},data:s}))+' </p> <div class="background-processing-list-region"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a=""
;return a+=' <div class="filter-bar-right"> <button class="toggle-advanced-btn btn btn-sm btn-default basic-setting">'+c(i(n(0)).call(e,"Show Advanced",{hash:{},data:t}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default advanced-setting">'+c(i(n(0)).call(e,"Hide Advanced",{hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="filter-bar"> ',
l=a.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(u+=l),u+=' </div> <div class="settings-row row"> <div class="nav-region col-sm-4 col-md-3"></div> <div class="pane-region col-sm-8 col-md-9"></div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a,r=""
;return r+=' <div class="setup-basic-form-group form-group"> <p class="text-muted"> '+d(i(n(0)).call(e,"Give it a friendly name to help identify it in Plex apps and on your network.",{hash:{},data:t}))+' </p> <input type="text" id="'+d((a=e&&e.friendlyNameSetting,a=null==a||a===!1?a:a.id,typeof a===h?a.apply(e):a))+'" class="form-control" value="'+d((a=e&&e.friendlyNameSetting,a=null==a||a===!1?a:a.value,typeof a===h?a.apply(e):a))+'" placeholder="'+d((a=e&&e.server,
a=null==a||a===!1?a:a.friendlyName,typeof a===h?a.apply(e):a))+'"> </div> '}function l(e,t){var a,r="";return r+=' <div class="setup-basic-form-group form-group"> <div class="publish-checkbox checkbox"> <label for="'+d((a=e&&e.publishSetting,a=null==a||a===!1?a:a.id,typeof a===h?a.apply(e):a))+'"> <input type="checkbox" id="'+d((a=e&&e.publishSetting,a=null==a||a===!1?a:a.id,typeof a===h?a.apply(e):a))+'" checked> '+d(i(n(0)).call(e,"Allow me to access my media outside my home",{hash:{},data:t
}))+' </label> </div> <p class="text-muted"> '+d(i(n(0)).call(e,"Plex will attempt to automatically configure your network to allow access to your Plex Media Server from Plex apps outside your home.",{hash:{},data:t}))+" </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h="function",p=this;return c+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+d(i(n(0)).call(t,"Great, we found a server!",{hash:{},data:s
}))+'</h4> <form id="setup-basic-form" class="settings-container"> ',u=a.if.call(t,t&&t.friendlyNameSetting,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" ",u=a.if.call(t,t&&t.publishSetting,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+=' <div class="setup-footer"> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(i(n(0)).call(t,"Next",{hash:{},
data:s}))+'</span> </button> <button class="next-btn hidden" data-subset="setupLibrary"></button> </div> </form> </div> </div> <div class="modal-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var r,s="";return s+=' <div class="checkbox"> <label for="'+h((r=e&&e.collectUsageDataSetting,r=null==r||r===!1?r:r.id,
typeof r===d?r.apply(e):r))+'"> <input type="checkbox" id="'+h((r=e&&e.collectUsageDataSetting,r=null==r||r===!1?r:r.id,typeof r===d?r.apply(e):r))+'" name="'+h((r=e&&e.collectUsageDataSetting,r=null==r||r===!1?r:r.id,typeof r===d?r.apply(e):r))+'" value="1" ',r=a.if.call(e,(r=e&&e.collectUsageDataSetting,null==r||r===!1?r:r.value),{hash:{},inverse:p.noop,fn:p.program(2,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+h(i(n(0)).call(e,"Send anonymous usage data to Plex",{hash:{},data:t
}))+' </label> </div> <p class="setup-complete-help text-muted"> '+h(i(n(0)).call(e,"Help us improve everyone's Plex experience by sending anonymous usage data.",{hash:{},data:t}))+" </p> "}function l(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this
;return c+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <div class="setup-apps-container"> <img class="setup-apps-image" src="'+h((u=t&&t.devicesImg,typeof u===d?u.apply(t):u))+'"> <a href="https://plex.tv/downloads" target="_blank" class="btn btn-default btn-lg">'+h(i(n(0)).call(t,"Get Plex Apps",{hash:{},data:s
}))+'</a> </div> <p class="text-muted">'+h(i(n(0)).call(t,"All set! Your Plex Media Server is working hard to find your media and make it beautiful. Grab the Plex app for all your favorite devices to get the most out of Plex and start streaming everywhere!",{hash:{},data:s}))+'</p> <form id="setup-complete-form" class="settings-container"> ',u=a.if.call(t,t&&t.collectUsageDataSetting,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),
c+=' <div class="setup-footer setup-done-footer"> <button class="next-btn btn btn-default btn-lg" data-subset="setupLibrary">'+h(i(n(0)).call(t,"Back",{hash:{},data:s}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg"> <div class="loading loading-sm"></div> <span class="btn-label">'+h(i(n(0)).call(t,"Done",{hash:{},data:s
}))+'</span> </button> <button class="done-btn btn btn-primary btn-lg hidden"></button> </div> </form> </div> </div> <div class="modal-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var a="";return a+=" <h1>"+d(i(n(0)).call(e,"Setup is not allowed for shared servers.",{hash:{},data:t}))+"</h1> "}function l(e,t){var a=""
;return a+=" <h1>"+d(i(n(0)).call(e,"A problem has been detected with a core component of Plex Media Server.",{hash:{},data:t}))+'</h1> <h2 class="text-muted">'+d(i(n(0)).call(e,"Please visit the {1}forums{2} and provide your logs, as described {3}here{4}.",'<a href="https://forums.plex.tv" target="_blank">',"</a>",'<a href="http://support.plex.tv/hc/en-us/articles/200250417-Log-File-Locations" target="_blank">',"</a>",{hash:{},data:t}))+"</h2> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var u,c="",d=this.escapeExpression,h=this;return c+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> ',u=a.if.call(t,t&&t.shared,{hash:{},inverse:h.program(3,l,s),fn:h.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var o,l="",u=this.escapeExpression;return l+='<h2 class="setup-intro-header">'+u(i(n(0)).call(t,"How Plex Works",{hash:{},data:s}))+"</h2> <h4>"+u(i(n(0)).call(t,"Plex Media Server runs on the computer where you keep your media",{hash:{},data:s}))+'</h4> <img class="setup-intro-img setup-intro-computer-img" src='+u((o=t&&t.computerImg,"function"==typeof o?o.apply(t):o))+"> <h4>"+u(i(n(0)).call(t,"Plex scans your media, automatically organizes it, and makes it beautiful",{hash:{},data:s
}))+'</h4> <img class="setup-intro-img setup-intro-media-img" src='+u((o=t&&t.mediaImg,"function"==typeof o?o.apply(t):o))+"> <h4>"+u(i(n(0)).call(t,"Play your media on any screen with your favorite Plex app",{hash:{},data:s}))+'</h4> <img class="setup-intro-img setup-intro-play-img" src='+u((o=t&&t.playImg,"function"==typeof o?o.apply(t):o))+'> <p> <button class="next-btn btn btn-primary btn-lg" data-subset="setupLoading">'+u(i(n(0)).call(t,"Got it!",{hash:{},data:s}))+"</button> </p> "})
},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+l(i(n(0)).call(t,"Organize Your Media",{hash:{},data:s
}))+'</h4> <p class="text-muted">'+l(i(n(0)).call(t,"Plex organizes your media into libraries. You can add as many libraries as you want, and you can have multiple libraries with the same type.",{hash:{},data:s}))+'</p> <p class="setup-add-section-container"> <button class="add-section-btn btn btn-default">'+l(i(n(0)).call(t,"Add Library",{hash:{},data:s
}))+'</button> </p> <div class="setup-section-list-container"></div> <div class="setup-footer"> <button class="next-btn btn btn-default btn-lg" data-subset="setupBasic">'+l(i(n(0)).call(t,"Back",{hash:{},data:s}))+'</button> <button class="next-btn btn btn-primary btn-lg" data-subset="setupComplete">'+l(i(n(0)).call(t,"Next",{hash:{},data:s}))+"</button> </div> </div> </div> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7)
;e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="loading loading-inline"></div> <p class="loading-title">'+(0,this.escapeExpression)(i(n(0)).call(t,"Please wait a moment while Plex starts.",{hash:{},data:s}))+"</p> "})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),s=s||{};var o="",l=this.escapeExpression;return o+='<div class="setup-header row hidden"> <div class="col-sm-6 col-sm-offset-3"> <div class="sign-in-logo text-center"> <i class="plex-image logo"></i> </div> <h2>'+l(i(n(0)).call(t,"Server Setup",{hash:{},data:s}))+'</h2> <div class="setup-progress"> <div class="basic-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupBasic" href="#">'+l(i(n(0)).call(t,"Name",{hash:{},data:s
}))+'</a> </div> <div class="library-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupLibrary" href="#">'+l(i(n(0)).call(t,"Media Library",{hash:{},data:s}))+'</a> </div> <div class="complete-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupComplete" href="#">'+l(i(n(0)).call(t,"Finish",{hash:{},data:s}))+'</a> </div> </div> </div> </div> <div class="setup-container"></div> '})},function(e,t,n){function i(e){
return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+='<div class="side-bar-page main-page minimal-scroll"> <div class="section-sort-container"> <h5>'+(0,this.escapeExpression)(i(n(0)).call(t,"Sort",{hash:{},data:s}))+'</h5> <div class="section-sort-list-container"></div> </div> </div>'})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}
var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var o="";return o+="<h2>"+(0,this.escapeExpression)(i(n(0)).call(t,"Announcements",{hash:{},data:s}))+'</h2> <div class="announcements-container"></div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{}
;var o,l="",u=this.escapeExpression;return l+="<h2>"+u(i(n(0)).call(t,"Watch Later Help",{hash:{},data:s}))+'</h2> <div class="filter-bar"> <h4>'+u(i(n(0)).call(t,"Add videos from your browser",{hash:{},data:s
}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="text-center"> <a class="btn btn-primary btn-lg btn-plexit" href="javascript:(function(d){var s=d.createElement(\'script\');s.type=\'text/javascript\';s.src=\'//plex.tv/queue/bookmarklet_payload\';var h=d.getElementsByTagName(\'head\')[0];h.appendChild(s);}(document))"><span class="plexit-hidden">\u276f</span> Plex It!</a> </div> <ol class="steps-list"> <li>'+u((o=t&&t.firstStepText,
"function"==typeof o?o.apply(t):o))+"</li> <li>"+u(i(n(0)).call(t,'To save a video to Watch Later, click "Plex It!" in your Bookmarks Bar.',{hash:{},data:s}))+"</li> <li>"+u(i(n(0)).call(t,"A panel will appear on the left side of the page to let you know the video has been saved.",{hash:{},data:s}))+"</li> <li>"+u(i(n(0)).call(t,'You can also recommend the video to friends or "fling" it to a Plex player and watch it there.',{hash:{},data:s
}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="plexit-img" src="'+u((o=t&&t.stepsImgSrc,"function"==typeof o?o.apply(t):o))+'"/> </div> </div> <div class="filter-bar"> <h4>'+u(i(n(0)).call(t,"Add videos by email",{hash:{},data:s}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="queue-email form-control input-lg disabled" title="'+u((o=t&&t.copyCommand,"function"==typeof o?o.apply(t):o))+'" tabindex="-1">'+u((o=t&&t.queueEmail,
"function"==typeof o?o.apply(t):o))+'</div> <ol class="steps-list"> <li>'+u(i(n(0)).call(t,"Send an email to the address above with any link(s) you want added to Watch Later.",{hash:{},data:s}))+"</li> <li>"+u(i(n(0)).call(t,"Add this to your address book so you can easily email links from your iPhone, iPad, Android, or any other device.",{hash:{},data:s}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="email-links" src="'+u((o=t&&t.emailImgSrc,
"function"==typeof o?o.apply(t):o))+'"/> </div> </div> '})},function(e,t,n){function i(e){return e&&(e.__esModule?e.default:e)}var a=n(7);e.exports=(a.default||a).template(function(e,t,a,r,s){function o(e,t){var n,i="";return i+=' <li><a class="'+h((n=e&&e.subset,typeof n===d?n.apply(e):n))+'-btn btn-gray" href="#!/playlist/'+h((n=e&&e.key,typeof n===d?n.apply(e):n))+"/"+h((n=e&&e.subset,typeof n===d?n.apply(e):n))+'">'+h((n=e&&e.title,
typeof n===d?n.apply(e):n))+'<span class="badge"></span></a></li> '}function l(e,t){var n,i="";return i+=' <a class="user-playlist-help btn-gray" href="'+h((n=e&&e.helpRoute,typeof n===d?n.apply(e):n))+'" target="'+h((n=e&&e.defaultTarget,typeof n===d?n.apply(e):n))+'"><i class="glyphicon circle-question-mark"></i></a> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),s=s||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<ul class="nav nav-header pull-right"> ',
u=a.each.call(t,t&&t.filters,{hash:{},inverse:p.noop,fn:p.program(1,o,s),data:s}),(u||0===u)&&(c+=u),c+=" </ul> <h2> "+h(i(n(0)).call(t,t&&t.label,{hash:{},data:s}))+" ",u=a.if.call(t,t&&t.helpRoute,{hash:{},inverse:p.noop,fn:p.program(3,l,s),data:s}),(u||0===u)&&(c+=u),c+=' </h2> <div class="user-playlist-container"></div> '})},function(e,t,n){"use strict";function i(e){var t=e&&e[0]||1,n=d;if(t!==n){if(t<n){var i=h[n],a=h[t]
;throw new c("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+a+").")}throw new c("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function a(e,t){if(!t)throw new c("No environment passed to template");var n=function(e,n,i,a,r,s){
var o=t.VM.invokePartial.apply(this,arguments);if(null!=o)return o;if(t.compile){var l={helpers:a,partials:r,data:s};return r[n]=t.compile(e,{data:void 0!==s},t),r[n](i,l)}throw new c("The partial "+n+" could not be compiled when running in runtime-only mode")},i={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var i=this.programs[e];return n?i=s(e,t,n):i||(i=this.programs[e]=s(e,t)),i},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},
u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,a){a=a||{};var r,s,o=a.partial?a:t;a.partial||(r=a.helpers,s=a.partials);var l=e.call(i,o,n,r,s,a.data);return a.partial||t.VM.checkRevision(i.compilerInfo),l}}function r(e,t,n){var i=Array.prototype.slice.call(arguments,3),a=function(e,a){return a=a||{},t.apply(this,[e,a.data||n].concat(i))};return a.program=e,a.depth=i.length,a}function s(e,t,n){var i=function(e,i){
return i=i||{},t(e,i.data||n)};return i.program=e,i.depth=0,i}function o(e,t,n,i,a,r){var s={partial:!0,helpers:i,partials:a,data:r};if(void 0===e)throw new c("The partial "+t+" could not be found");if(e instanceof Function)return e(n,s)}function l(){return""}var u=n(640),c=n(639).default,d=n(638).COMPILER_REVISION,h=n(638).REVISION_CHANGES;t.checkRevision=i,t.template=a,t.programWithDepth=r,t.program=s,t.invokePartial=o,t.noop=l},function(e,t,n){"use strict";var i={childContextTypes:!0,
contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;++r)i[n[r]]||a[n[r]]||(e[n[r]]=t[n[r]]);return e}},function(e,t){(function(){window.Modernizr=function(e,t,n){function i(e){g.cssText=e}function a(e,t){return typeof e===t}function r(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var i in e){
var a=e[i];if(!r(a,"-")&&g[a]!==n)return"pfx"!=t||a}return!1}function o(e,t,i){for(var r in e){var s=t[e[r]];if(s!==n)return i===!1?e[r]:a(s,"function")?s.bind(i||t):s}return!1}function l(e,t,n){var i=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+y.join(i+" ")+i).split(" ");return a(t,"string")||a(t,"undefined")?s(r,t):(r=(e+" "+b.join(i+" ")+i).split(" "),o(r,t,n))}var u,c,d={},h=t.documentElement,p="modernizr",f=t.createElement(p),g=f.style,m=({}.toString,
" -webkit- -moz- -o- -ms- ".split(" ")),v="Webkit Moz O ms",y=v.split(" "),b=v.toLowerCase().split(" "),S={},I=[],w=I.slice,M=function(e,n,i,a){var r,s,o,l,u=t.createElement("div"),c=t.body,d=c||t.createElement("body");if(parseInt(i,10))for(;i--;)o=t.createElement("div"),o.id=a?a[i]:p+(i+1),u.appendChild(o);return r=["&#173;",'<style id="s',p,'">',e,"</style>"].join(""),u.id=p,(c?u:d).innerHTML+=r,d.appendChild(u),c||(d.style.background="",d.style.overflow="hidden",l=h.style.overflow,
h.style.overflow="hidden",h.appendChild(d)),s=n(u,e),c?u.parentNode.removeChild(u):(d.parentNode.removeChild(d),h.style.overflow=l),!!s},C={}.hasOwnProperty;c=a(C,"undefined")||a(C.call,"undefined")?function(e,t){return t in e&&a(e.constructor.prototype[t],"undefined")}:function(e,t){return C.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=w.call(arguments,1),i=function(){if(this instanceof i){
var a=function(){};a.prototype=t.prototype;var r=new a,s=t.apply(r,n.concat(w.call(arguments)));return Object(s)===s?s:r}return t.apply(e,n.concat(w.call(arguments)))};return i}),S.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in h.style&&M("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=9===t.offsetLeft&&3===t.offsetHeight}),e};for(var D in S)c(S,D)&&(u=D.toLowerCase(),d[u]=S[D](),
I.push((d[u]?"":"no-")+u));return d.addTest=function(e,t){if("object"==typeof e)for(var i in e)c(e,i)&&d.addTest(i,e[i]);else{if(e=e.toLowerCase(),d[e]!==n)return d;t="function"==typeof t?t():t,"undefined"!=typeof enableClasses&&enableClasses&&(h.className+=" "+(t?"":"no-")+e),d[e]=t}return d},i(""),f=null,d._version="2.8.3",d._prefixes=m,d._domPrefixes=b,d._cssomPrefixes=y,d.testProp=function(e){return s([e])},d.testAllProps=l,d.testStyles=M,d}(0,this.document),e.exports=window.Modernizr
}).call(window)},function(e,t,n){var i,a,r;/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 */
!function(s){a=[n(5)],i=s,void 0!==(r="function"==typeof i?i.apply(t,a):i)&&(e.exports=r)}(function(e){function t(t){var s=t||window.event,o=l.call(arguments,1),u=0,d=0,h=0,p=0,f=0,g=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(h=s.detail*-1),"wheelDelta"in s&&(h=s.wheelDelta),"wheelDeltaY"in s&&(h=s.wheelDeltaY),"wheelDeltaX"in s&&(d=s.wheelDeltaX*-1),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=h*-1,h=0),u=0===h?d:h,"deltaY"in s&&(h=s.deltaY*-1,u=h),"deltaX"in s&&(d=s.deltaX,
0===h&&(u=d*-1)),0!==h||0!==d){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");u*=m,h*=m,d*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");u*=v,h*=v,d*=v}if(p=Math.max(Math.abs(h),Math.abs(d)),(!r||p<r)&&(r=p,i(s,p)&&(r/=40)),i(s,p)&&(u/=40,d/=40,h/=40),u=Math[u>=1?"floor":"ceil"](u/r),d=Math[d>=1?"floor":"ceil"](d/r),h=Math[h>=1?"floor":"ceil"](h/r),c.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect()
;f=t.clientX-y.left,g=t.clientY-y.top}return t.deltaX=d,t.deltaY=h,t.deltaFactor=r,t.offsetX=f,t.offsetY=g,t.deltaMode=0,o.unshift(t,u,d,h),a&&clearTimeout(a),a=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,o)}}function n(){r=null}function i(e,t){return c.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}
var a,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var u=s.length;u;)e.event.fixHooks[s[--u]]=e.event.mouseHooks;var c=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=o.length;n;)this.addEventListener(o[--n],t,!1);else this.onmousewheel=t
;e.data(this,"mousewheel-line-height",c.getLineHeight(this)),e.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=o.length;n;)this.removeEventListener(o[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),
parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})},function(e,t,n){var i,a;!function(n,r){var s=this;i=[],void 0!==(a=function(){return r(s)}.apply(t,i))&&(e.exports=a)}(0,function(e){"use strict";return function(e){
function t(i){if(n[i])return n[i];var a=n[i]=Object.create(null);return e[i](a,t),a}var n=Object.create(null);return t(0)}([function(e,t){var n=t(23),i=t(23);e.debugMode=i.debugMode,e.verboseMode=i.verboseMode;var a=t(33),r=t(33);e.Set=r.Set;var s=t(30),o=t(30);e.Map=o.Map;var l=t(32),u=t(32);e.Promise=u.Promise,e.DeferredPromise=u.DeferredPromise;var c=t(37);e.webworker=c;var d=t(8);e.parts=d;var h=t(1);e.parser=h;var p=t(14);e.renderers=p;var f=t(24);e.ASS=f.ASS;var g=t(25)
;e.Attachment=g.Attachment,e.AttachmentType=g.AttachmentType;var m=t(26);e.Dialogue=m.Dialogue;var v=t(28);e.ScriptProperties=v.ScriptProperties;var y=t(29);e.Style=y.Style;var b=t(27);e.BorderStyle=b.BorderStyle,e.Format=b.Format,e.WrappingStyle=b.WrappingStyle,Object.defineProperties(e,{debugMode:{get:function(){return n.debugMode},set:n.setDebugMode},verboseMode:{get:function(){return n.verboseMode},set:n.setVerboseMode},Set:{get:function(){return a.Set},set:a.setImplementation},Map:{
get:function(){return s.Map},set:s.setImplementation},Promise:{get:function(){return l.Promise},set:l.setImplementation}})},function(e,t){var n=t(3);e.parse=n.parse;var i=t(5);e.BrowserReadableStream=i.BrowserReadableStream,e.StringStream=i.StringStream,e.XhrStream=i.XhrStream;var a=t(4);e.StreamParser=a.StreamParser,e.SrtStreamParser=a.SrtStreamParser},function(e,t){function n(e){var t=e.indexOf(":");return t===-1?null:{name:e.substr(0,t),value:e.substr(t+1).replace(/^\s+/,"")}}function i(e,t){
var i=n(e);if(null===i)return null;var r=i.value.split(",");r.length>t.length&&(r[t.length-1]=r.slice(t.length-1).join(","));var s=new a.Map;return t.forEach(function(e,t){s.set(e,r[t])}),{type:i.name,template:s}}var a=t(30);e.parseLineIntoProperty=n,e.parseLineIntoTypedTemplate=i},function(e,t){function n(e,t){var n=new l(e,t);if(null===n.result||n.result.end!==e.length)throw r.debugMode&&console.error("Parse failed. %s %s %o",t,e,n.result),new Error("Parse failed.");return n.result.value}
function i(e,t,n,i){l.prototype["parse_tag_"+e]=function(a){var r=this,s=new h(a);if(null===r.read(s,e))return a.pop(),null;var o=n.call(r,s);if(null!==o)s.value=new t(o.value);else{if(i)return a.pop(),null;s.value=new t(null)}return s}}var a=t(8),r=t(23),s=t(30),o=new s.Map;e.parse=n;var l=function(){function e(e,t){this._input=e,this._parseTree=new h(null),this._result=o.get(t).call(this,this._parseTree)}return Object.defineProperty(e.prototype,"result",{get:function(){return this._result},
enumerable:!0,configurable:!0}),e.prototype.parse_dialogueParts=function(e){var t,i=new h(e);for(i.value=[];this._haveMore();){var r=this.parse_enclosedTags(i);if(null!==r)(t=i.value).push.apply(t,r.value);else{var s=this.parse_newline(i)||this.parse_hardspace(i)||this.parse_text(i);if(null===s)return e.pop(),null;if(s.value instanceof a.Text&&i.value[i.value.length-1]instanceof a.Text){var o=i.value[i.value.length-1];i.value[i.value.length-1]=new a.Text(o.value+s.value.value)
}else i.value.push(s.value)}}var l=!1;return i.value.forEach(function(e,t){e instanceof a.DrawingMode?l=0!==e.scale:e instanceof a.Text&&l&&(i.value[t]=new a.DrawingInstructions(n(e.value,"drawingInstructions")))}),i},e.prototype.parse_enclosedTags=function(e){var t=new h(e);if(t.value=[],null===this.read(t,"{"))return e.pop(),null;for(var n=this._peek();this._haveMore()&&"}"!==n;n=this._peek()){var i=null
;if(null!==this.read(t,"\\")&&null===(i=this.parse_tag_alpha(t)||this.parse_tag_iclip(t)||this.parse_tag_xbord(t)||this.parse_tag_ybord(t)||this.parse_tag_xshad(t)||this.parse_tag_yshad(t)||this.parse_tag_blur(t)||this.parse_tag_bord(t)||this.parse_tag_clip(t)||this.parse_tag_fade(t)||this.parse_tag_fscx(t)||this.parse_tag_fscy(t)||this.parse_tag_move(t)||this.parse_tag_shad(t)||this.parse_tag_fad(t)||this.parse_tag_fax(t)||this.parse_tag_fay(t)||this.parse_tag_frx(t)||this.parse_tag_fry(t)||this.parse_tag_frz(t)||this.parse_tag_fsp(t)||this.parse_tag_fsplus(t)||this.parse_tag_fsminus(t)||this.parse_tag_org(t)||this.parse_tag_pbo(t)||this.parse_tag_pos(t)||this.parse_tag_an(t)||this.parse_tag_be(t)||this.parse_tag_fn(t)||this.parse_tag_fr(t)||this.parse_tag_fs(t)||this.parse_tag_kf(t)||this.parse_tag_ko(t)||this.parse_tag_1a(t)||this.parse_tag_1c(t)||this.parse_tag_2a(t)||this.parse_tag_2c(t)||this.parse_tag_3a(t)||this.parse_tag_3c(t)||this.parse_tag_4a(t)||this.parse_tag_4c(t)||this.parse_tag_a(t)||this.parse_tag_b(t)||this.parse_tag_c(t)||this.parse_tag_i(t)||this.parse_tag_k(t)||this.parse_tag_K(t)||this.parse_tag_p(t)||this.parse_tag_q(t)||this.parse_tag_r(t)||this.parse_tag_s(t)||this.parse_tag_t(t)||this.parse_tag_u(t))&&t.pop(),
null===i&&(i=this.parse_comment(t)),null===i)return e.pop(),null;i.value instanceof a.Comment&&t.value[t.value.length-1]instanceof a.Comment?t.value[t.value.length-1]=new a.Comment(t.value[t.value.length-1].value+i.value.value):t.value.push(i.value)}return null===this.read(t,"}")?(e.pop(),null):t},e.prototype.parse_newline=function(e){var t=new h(e);return null===this.read(t,"\\N")?(e.pop(),null):(t.value=new a.NewLine,t)},e.prototype.parse_hardspace=function(e){var t=new h(e)
;return null===this.read(t,"\\h")?(e.pop(),null):(t.value=new a.Text("\xa0"),t)},e.prototype.parse_text=function(e){var t=this._peek(),n=new h(e),i=new h(n,t);return n.value=new a.Text(i.value),n},e.prototype.parse_comment=function(e){var t=this._peek(),n=new h(e),i=new h(n,t);return n.value=new a.Comment(i.value),n},e.prototype.parse_tag_a=function(e){var t=new h(e);if(null===this.read(t,"a"))return e.pop(),null;var n=this._peek();switch(n){case"1":var i=this._peek(2);switch(i){case"10":
case"11":n=i}break;case"2":case"3":case"5":case"6":case"7":case"9":break;default:return e.pop(),null}var r=new h(t,n),s=null;switch(r.value){case"1":s=1;break;case"2":s=2;break;case"3":s=3;break;case"5":s=7;break;case"6":s=8;break;case"7":s=9;break;case"9":s=4;break;case"10":s=5;break;case"11":s=6}return t.value=new a.Alignment(s),t},e.prototype.parse_tag_alpha=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_an=function(e){var t=new h(e)
;if(null===this.read(t,"an"))return e.pop(),null;var n=this._peek();if(n<"1"||n>"9")return e.pop(),null;var i=new h(t,n);return t.value=new a.Alignment(parseInt(i.value)),t},e.prototype.parse_tag_b=function(e){var t=new h(e);if(null===this.read(t,"b"))return e.pop(),null;var n=null,i=this._peek();return i>="1"&&i<="9"&&(i=this._peek(3),"00"===i.substr(1)&&(n=new h(t,i),n.value=parseInt(n.value))),null===n&&(n=this.parse_enableDisable(t)),t.value=null!==n?new a.Bold(n.value):new a.Bold(null),t},
e.prototype.parse_tag_be=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_blur=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_bord=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_clip=function(e){return this._parse_tag_clip_or_iclip("clip",e)},e.prototype.parse_tag_fad=function(e){var t=new h(e)
;if(null===this.read(t,"fad"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new a.Fade(n.value/1e3,i.value/1e3),t)},e.prototype.parse_tag_fade=function(e){var t=new h(e);if(null===this.read(t,"fade"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),
null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);if(null===i)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var r=this.parse_decimal(t);if(null===r)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var s=this.parse_decimal(t);if(null===s)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var o=this.parse_decimal(t);if(null===o)return e.pop(),null
;if(null===this.read(t,","))return e.pop(),null;var l=this.parse_decimal(t);if(null===l)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var u=this.parse_decimal(t);return null===u?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new a.ComplexFade(1-n.value/255,1-i.value/255,1-r.value/255,s.value/1e3,o.value/1e3,l.value/1e3,u.value/1e3),t)},e.prototype.parse_tag_fax=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fay=function(){
throw new Error("Method not implemented.")},e.prototype.parse_tag_fn=function(e){var t=new h(e);if(null===this.read(t,"fn"))return e.pop(),null;for(var n=new h(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new a.FontName(n.value):t.value=new a.FontName(null),t},e.prototype.parse_tag_fr=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_frx=function(){throw new Error("Method not implemented.")},
e.prototype.parse_tag_fry=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_frz=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fs=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fsplus=function(e){var t=new h(e);if(null===this.read(t,"fs+"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.FontSizePlus(n.value),t)},e.prototype.parse_tag_fsminus=function(e){
var t=new h(e);if(null===this.read(t,"fs-"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.FontSizeMinus(n.value),t)},e.prototype.parse_tag_fscx=function(e){var t=new h(e);if(null===this.read(t,"fscx"))return e.pop(),null;var n=this.parse_decimal(t);return t.value=null!==n?new a.FontScaleX(n.value/100):new a.FontScaleX(null),t},e.prototype.parse_tag_fscy=function(e){var t=new h(e);if(null===this.read(t,"fscy"))return e.pop(),null
;var n=this.parse_decimal(t);return t.value=null!==n?new a.FontScaleY(n.value/100):new a.FontScaleY(null),t},e.prototype.parse_tag_fsp=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_i=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_iclip=function(e){return this._parse_tag_clip_or_iclip("iclip",e)},e.prototype.parse_tag_k=function(e){var t=new h(e);if(null===this.read(t,"k"))return e.pop(),null;var n=this.parse_decimal(t)
;return null===n?(e.pop(),null):(t.value=new a.ColorKaraoke(n.value/100),t)},e.prototype.parse_tag_K=function(e){var t=new h(e);if(null===this.read(t,"K"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_kf=function(e){var t=new h(e);if(null===this.read(t,"kf"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.SweepingColorKaraoke(n.value/100),t)},
e.prototype.parse_tag_ko=function(e){var t=new h(e);if(null===this.read(t,"ko"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new a.OutlineKaraoke(n.value/100),t)},e.prototype.parse_tag_move=function(e){var t=new h(e);if(null===this.read(t,"move"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t)
;if(null===i)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var r=this.parse_decimal(t);if(null===r)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var s=this.parse_decimal(t);if(null===s)return e.pop(),null;var o=null,l=null;if(null!==this.read(t,",")){if(null===(o=this.parse_decimal(t)))return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;if(null===(l=this.parse_decimal(t)))return e.pop(),null}return null===this.read(t,")")?(e.pop(),
null):(t.value=new a.Move(n.value,i.value,r.value,s.value,null!==o?o.value/1e3:null,null!==l?l.value/1e3:null),t)},e.prototype.parse_tag_org=function(e){var t=new h(e);if(null===this.read(t,"org"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),
null):(t.value=new a.RotationOrigin(n.value,i.value),t)},e.prototype.parse_tag_p=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_pbo=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_pos=function(e){var t=new h(e);if(null===this.read(t,"pos"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t)
;return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new a.Position(n.value,i.value),t)},e.prototype.parse_tag_q=function(e){var t=new h(e);if(null===this.read(t,"q"))return e.pop(),null;var n=this._peek();if(n<"0"||n>"3")return e.pop(),null;var i=new h(t,n);return t.value=new a.WrappingStyle(parseInt(i.value)),t},e.prototype.parse_tag_r=function(e){var t=new h(e);if(null===this.read(t,"r"))return e.pop(),null
;for(var n=new h(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new a.Reset(n.value):t.value=new a.Reset(null),t},e.prototype.parse_tag_s=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_shad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_t=function(e){var t=new h(e);if(null===this.read(t,"t"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null
;var n=null,i=null,r=null,s=this.parse_decimal(t);if(null!==s){if(null===this.read(t,","))return e.pop(),null;var o=this.parse_decimal(t);if(null!==o){if(n=s,i=o,null===this.read(t,","))return e.pop(),null;var l=this.parse_decimal(t);if(null!==l&&(r=l,null===this.read(t,",")))return e.pop(),null}else if(r=s,null===this.read(t,","))return e.pop(),null}for(var u=[],c=this._peek();this._haveMore()&&")"!==c&&"}"!==c;c=this._peek()){var d=null
;if(null!==this.read(t,"\\")&&null===(d=this.parse_tag_alpha(t)||this.parse_tag_iclip(t)||this.parse_tag_xbord(t)||this.parse_tag_ybord(t)||this.parse_tag_xshad(t)||this.parse_tag_yshad(t)||this.parse_tag_blur(t)||this.parse_tag_bord(t)||this.parse_tag_clip(t)||this.parse_tag_fscx(t)||this.parse_tag_fscy(t)||this.parse_tag_shad(t)||this.parse_tag_fax(t)||this.parse_tag_fay(t)||this.parse_tag_frx(t)||this.parse_tag_fry(t)||this.parse_tag_frz(t)||this.parse_tag_fsp(t)||this.parse_tag_fsplus(t)||this.parse_tag_fsminus(t)||this.parse_tag_be(t)||this.parse_tag_fr(t)||this.parse_tag_fs(t)||this.parse_tag_1a(t)||this.parse_tag_1c(t)||this.parse_tag_2a(t)||this.parse_tag_2c(t)||this.parse_tag_3a(t)||this.parse_tag_3c(t)||this.parse_tag_4a(t)||this.parse_tag_4c(t)||this.parse_tag_c(t))&&t.pop(),
null===d&&(d=this.parse_comment(t)),null===d)return e.pop(),null;d.value instanceof a.Comment&&u[u.length-1]instanceof a.Comment?u[u.length-1]=new a.Comment(u[u.length-1].value+d.value.value):u.push(d.value)}return this.read(t,")"),t.value=new a.Transform(null!==n?n.value/1e3:null,null!==i?i.value/1e3:null,null!==r?r.value/1e3:null,u),t},e.prototype.parse_tag_u=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_xbord=function(){throw new Error("Method not implemented.")
},e.prototype.parse_tag_xshad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_ybord=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_yshad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_1a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_1c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_2a=function(){throw new Error("Method not implemented.")},
e.prototype.parse_tag_2c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_3a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_3c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_4a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_4c=function(){throw new Error("Method not implemented.")},e.prototype.parse_drawingInstructions=function(e){var t=new h(e),n=null,i=[]
;for(t.value=[];this._haveMore();){for(;null!==this.read(t," "););if(!this._haveMore())break;if(null!==n){var r=this.parse_decimal(t);if(null!==r){i.push(r),"m"===n&&2===i.length?(t.value.push(new a.drawing.MoveInstruction(i[0].value,i[1].value)),i.splice(0,i.length)):"l"===n&&2===i.length?(t.value.push(new a.drawing.LineInstruction(i[0].value,i[1].value)),
i.splice(0,i.length)):"b"===n&&6===i.length&&(t.value.push(new a.drawing.CubicBezierCurveInstruction(i[0].value,i[1].value,i[2].value,i[3].value,i[4].value,i[5].value)),i.splice(0,i.length));continue}}var s=this.parse_text(t);if(null===s)break;var o=s.value.value;switch(o){case"m":case"l":case"b":n=o,i.splice(0,i.length)}}for(;null!==this.read(t," "););return t},e.prototype.parse_decimalInt32=function(e){
for(var t=new h(e),n=null!==this.read(t,"-"),i=new h(t,""),a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())i.value+=a;if(0===i.value.length)return e.pop(),null;var r=parseInt(i.value);return r>=4294967295?r=4294967295:n&&(r=-r),t.value=r,t},e.prototype.parse_hexInt32=function(e){for(var t=new h(e),n=null!==this.read(t,"-"),i=new h(t,""),a=this._peek();this._haveMore()&&(a>="0"&&a<="9"||a>="a"&&a<="f"||a>="A"&&a<="F");a=this._peek())i.value+=a;if(0===i.value.length)return e.pop(),
null;var r=parseInt(i.value,16);return r>=4294967295?r=4294967295:n&&(r=-r),t.value=r,t},e.prototype.parse_decimalOrHexInt32=function(e){var t=new h(e),n=null!==this.read(t,"&H")||null!==this.read(t,"&h")?this.parse_hexInt32(t):this.parse_decimalInt32(t);return null===n?(e.pop(),null):(t.value=n.value,t)},e.prototype.parse_decimal=function(e){var t=new h(e),n=null!==this.read(t,"-"),i=this.parse_unsignedDecimal(t);return null===i?(e.pop(),null):(t.value=i.value,n&&(t.value=-t.value),t)},
e.prototype.parse_unsignedDecimal=function(e){for(var t=new h(e),n=new h(t,""),i=null,a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())n.value+=a;if(0===n.value.length)return e.pop(),null;if(null!==this.read(t,".")){i=new h(t,"");for(var a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())i.value+=a;if(0===i.value.length)return e.pop(),null}return t.value=parseFloat(n.value+(null!==i?"."+i.value:"")),t},e.prototype.parse_enableDisable=function(e){var t=this._peek()
;if("0"===t||"1"===t){var n=new h(e,t);return n.value="1"===n.value,n}return null},e.prototype.parse_color=function(e){for(var t=new h(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);if(null===n)return e.pop(),null;var i=n.value;for(t.value=new a.Color(255&i,i>>8&255,i>>16&255);null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_alpha=function(e){for(var t=new h(e);null!==this.read(t,"&")||null!==this.read(t,"H"););
var n=this.parse_hexInt32(t);if(null===n)return e.pop(),null;var i=n.value;for(t.value=1-(255&i)/255;null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_colorWithAlpha=function(e){var t=new h(e),n=this.parse_decimalOrHexInt32(t);if(null===n)return e.pop(),null;var i=n.value;return t.value=new a.Color(255&i,i>>8&255,i>>16&255,1-(i>>24&255)/255),t},e.prototype.read=function(e,t){return this._peek(t.length)!==t?null:new h(e,t)},e.prototype._peek=function(e){
return void 0===e&&(e=1),1===e?this._input[this._parseTree.end]:this._input.substr(this._parseTree.end,e)},e.prototype._haveMore=function(){return this._parseTree.end<this._input.length},e.prototype._parse_tag_clip_or_iclip=function(e,t){var i=new h(t);if(null===this.read(i,e))return t.pop(),null;if(null===this.read(i,"("))return t.pop(),null;var r=null,s=null,o=null,l=null,u=null,c=null,d=this.parse_decimal(i);if(null!==d){if(null===this.read(i,","))return t.pop(),null
;var p=this.parse_decimal(i);null!==p?(r=d,o=p):u=d}if(null!==r&&null!==o){if(null===this.read(i,","))return t.pop(),null;if(s=this.parse_decimal(i),null===this.read(i,","))return t.pop(),null;l=this.parse_decimal(i),i.value=new a.RectangularClip(r.value,o.value,s.value,l.value,"clip"===e)}else{c=new h(i,"");for(var f=this._peek();this._haveMore()&&")"!==f&&"}"!==f;f=this._peek())c.value+=f;i.value=new a.VectorClip(null!==u?u.value:1,n(c.value,"drawingInstructions"),"clip"===e)}
return null===this.read(i,")")?(t.pop(),null):i},e}();i("alpha",a.Alpha,l.prototype.parse_alpha,!1),i("be",a.Blur,l.prototype.parse_decimal,!1),i("blur",a.GaussianBlur,l.prototype.parse_decimal,!1),i("bord",a.Border,l.prototype.parse_decimal,!1),i("c",a.PrimaryColor,l.prototype.parse_color,!1),i("fax",a.SkewX,l.prototype.parse_decimal,!1),i("fay",a.SkewY,l.prototype.parse_decimal,!1),i("fr",a.RotateZ,l.prototype.parse_decimal,!1),i("frx",a.RotateX,l.prototype.parse_decimal,!1),
i("fry",a.RotateY,l.prototype.parse_decimal,!1),i("frz",a.RotateZ,l.prototype.parse_decimal,!1),i("fs",a.FontSize,l.prototype.parse_decimal,!1),i("fsp",a.LetterSpacing,l.prototype.parse_decimal,!1),i("i",a.Italic,l.prototype.parse_enableDisable,!1),i("p",a.DrawingMode,l.prototype.parse_decimal,!0),i("pbo",a.DrawingBaselineOffset,l.prototype.parse_decimal,!0),i("s",a.StrikeThrough,l.prototype.parse_enableDisable,!1),i("shad",a.Shadow,l.prototype.parse_decimal,!1),
i("u",a.Underline,l.prototype.parse_enableDisable,!1),i("xbord",a.BorderX,l.prototype.parse_decimal,!1),i("xshad",a.ShadowX,l.prototype.parse_decimal,!1),i("ybord",a.BorderY,l.prototype.parse_decimal,!1),i("yshad",a.ShadowY,l.prototype.parse_decimal,!1),i("1a",a.PrimaryAlpha,l.prototype.parse_alpha,!1),i("1c",a.PrimaryColor,l.prototype.parse_color,!1),i("2a",a.SecondaryAlpha,l.prototype.parse_alpha,!1),i("2c",a.SecondaryColor,l.prototype.parse_color,!1),
i("3a",a.OutlineAlpha,l.prototype.parse_alpha,!1),i("3c",a.OutlineColor,l.prototype.parse_color,!1),i("4a",a.ShadowAlpha,l.prototype.parse_alpha,!1),i("4c",a.ShadowColor,l.prototype.parse_color,!1);for(var u=0,c=Object.keys(l.prototype);u<c.length;u++){var d=c[u];0===d.indexOf("parse_")&&"function"==typeof l.prototype[d]&&o.set(d.substr("parse_".length),l.prototype[d])}var h=function(){function e(e,t){void 0===t&&(t=null),this._parent=e,this._children=[],null!==e&&e.children.push(this),
this._start=null!==e?e.end:0,this._end=this._start,this.value=t}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,null!==this._value&&this._value.constructor===String&&0===this._children.length&&this._setEnd(this._start+this._value.length)},enumerable:!0,configurable:!0}),e.prototype.pop=function(){this._children.splice(this._children.length-1,1),this._children.length>0?this._setEnd(this._children[this._children.length-1].end):this._setEnd(this.start)},
e.prototype._setEnd=function(e){this._end=e,null!==this._parent&&this._parent.end!==this._end&&this._parent._setEnd(this._end)},e}(),p=t(32),f=t(36);t(38).registerWorkerCommand(f.WorkerCommands.Parse,function(e){return new p.Promise(function(t){t(n(e.input,e.rule))})})},function(e,t){function n(e){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n)-33;if(i<0||i>63)throw new Error("Out-of-range character code "+i+" at index "+n+" in string "+e)
;t+=i<26?String.fromCharCode("A".charCodeAt(0)+i):i<52?String.fromCharCode("a".charCodeAt(0)+i-26):i<62?String.fromCharCode("0".charCodeAt(0)+i-52):62===i?"+":"/"}return t}var i,a=t(23),r=t(24),s=t(29),o=t(26),l=t(25),u=t(30),c=t(32),d=t(2);!function(e){e[e.ScriptInfo=0]="ScriptInfo",e[e.Styles=1]="Styles",e[e.Events=2]="Events",e[e.Fonts=3]="Fonts",e[e.Graphics=4]="Graphics",e[e.Other=5]="Other",e[e.EOF=6]="EOF"}(i||(i={}));var h=function(){function e(e){var t=this;this._stream=e,
this._ass=new r.ASS,this._minimalDeferred=new c.DeferredPromise,this._deferred=new c.DeferredPromise,this._shouldSwallowBom=!0,this._currentSection=i.ScriptInfo,this._currentAttachment=null,this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._minimalDeferred.reject(e),t._deferred.reject(e)})}return Object.defineProperty(e.prototype,"minimalASS",{get:function(){return this._minimalDeferred.promise},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"ass",{get:function(){return this._deferred.promise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentSection",{get:function(){return this._currentSection},set:function(e){if(null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentSection===i.ScriptInfo&&e!==i.ScriptInfo&&this._minimalDeferred.resolve(this._ass),e===i.EOF){var t=this._ass.properties
;void 0===t.resolutionX||void 0===t.resolutionY?(this._minimalDeferred.reject("Malformed ASS script."),this._deferred.reject("Malformed ASS script.")):(this._minimalDeferred.resolve(this._ass),this._deferred.resolve(this._ass))}this._currentSection=e},enumerable:!0,configurable:!0}),e.prototype._onNextLine=function(e){var t=this;if(null===e)return void(this.currentSection=i.EOF);if("\r"===e[e.length-1]&&(e=e.substr(0,e.length-1)),65279===e.charCodeAt(0)&&this._shouldSwallowBom&&(e=e.substr(1)),
this._shouldSwallowBom=!1,""===e);else if(";"===e[0]&&null===this._currentAttachment);else if("[Script Info]"===e)this.currentSection=i.ScriptInfo;else if("[V4+ Styles]"===e||"[V4 Styles]"===e)this.currentSection=i.Styles;else if("[Events]"===e)this.currentSection=i.Events;else if("[Fonts]"===e)this.currentSection=i.Fonts;else if("[Graphics]"===e)this.currentSection=i.Graphics;else switch(null===this._currentAttachment&&"["===e[0]&&"]"===e[e.length-1]&&(this.currentSection=i.Other),
this.currentSection){case i.ScriptInfo:var r=d.parseLineIntoProperty(e);if(null!==r)switch(r.name){case"PlayResX":this._ass.properties.resolutionX=parseInt(r.value);break;case"PlayResY":this._ass.properties.resolutionY=parseInt(r.value);break;case"WrapStyle":this._ass.properties.wrappingStyle=parseInt(r.value);break;case"ScaledBorderAndShadow":this._ass.properties.scaleBorderAndShadow="yes"===r.value}break;case i.Styles:if(null===this._ass.stylesFormatSpecifier){var s=d.parseLineIntoProperty(e)
;null!==s&&"Format"===s.name&&(this._ass.stylesFormatSpecifier=s.value.split(",").map(function(e){return e.trim()}))}else try{this._ass.addStyle(e)}catch(t){a.debugMode&&console.error("Could not parse style from line "+e+" - "+(t.stack||t))}break;case i.Events:if(null===this._ass.dialoguesFormatSpecifier){var o=d.parseLineIntoProperty(e);null!==o&&"Format"===o.name&&(this._ass.dialoguesFormatSpecifier=o.value.split(",").map(function(e){return e.trim()}))}else try{this._ass.addEvent(e)}catch(t){
a.debugMode&&console.error("Could not parse event from line "+e+" - "+(t.stack||t))}break;case i.Fonts:case i.Graphics:var u=this.currentSection===i.Fonts?/^fontname:(.+)/:/^filename:(.+)/,c=u.exec(e);if(null!==c)null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentAttachment=new l.Attachment(c[1].trim(),this.currentSection===i.Fonts?l.AttachmentType.Font:l.AttachmentType.Graphic);else if(null!==this._currentAttachment)try{
this._currentAttachment.contents+=n(e)}catch(e){a.debugMode&&console.error("Encountered error while reading font "+this._currentAttachment.filename+": %o",e),this._currentAttachment=null}break;case i.Other:break;default:throw new Error("Unhandled state "+this.currentSection)}this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._minimalDeferred.reject(e),t._deferred.reject(e)})},e}();e.StreamParser=h;var p=function(){function e(e){var t=this;this._stream=e,
this._ass=new r.ASS,this._deferred=new c.DeferredPromise,this._shouldSwallowBom=!0,this._currentDialogueNumber=null,this._currentDialogueStart=null,this._currentDialogueEnd=null,this._currentDialogueText=null,this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._deferred.reject(e)}),this._ass.properties.resolutionX=1280,this._ass.properties.resolutionY=720,this._ass.properties.wrappingStyle=1,this._ass.properties.scaleBorderAndShadow=!0
;var n=new s.Style(new u.Map([["Name","Default"],["FontSize","36"]]));this._ass.styles.set(n.name,n)}return Object.defineProperty(e.prototype,"ass",{get:function(){return this._deferred.promise},enumerable:!0,configurable:!0}),e.prototype._onNextLine=function(e){var t=this
;if(null===e)return null!==this._currentDialogueNumber&&null!==this._currentDialogueStart&&null!==this._currentDialogueEnd&&null!==this._currentDialogueText&&this._ass.dialogues.push(new o.Dialogue(new u.Map([["Style","Default"],["Start",this._currentDialogueStart],["End",this._currentDialogueEnd],["Text",this._currentDialogueText]]),this._ass)),void this._deferred.resolve(this._ass);if("\r"===e[e.length-1]&&(e=e.substr(0,e.length-1)),
65279===e.charCodeAt(0)&&this._shouldSwallowBom&&(e=e.substr(1)),this._shouldSwallowBom=!1,""===e)null!==this._currentDialogueNumber&&null!==this._currentDialogueStart&&null!==this._currentDialogueEnd&&null!==this._currentDialogueText&&this._ass.dialogues.push(new o.Dialogue(new u.Map([["Style","Default"],["Start",this._currentDialogueStart],["End",this._currentDialogueEnd],["Text",this._currentDialogueText]]),this._ass)),
this._currentDialogueNumber=this._currentDialogueStart=this._currentDialogueEnd=this._currentDialogueText=null;else if(null===this._currentDialogueNumber)/^\d+$/.test(e)&&(this._currentDialogueNumber=e);else if(null===this._currentDialogueStart&&null===this._currentDialogueEnd){var n=/^(\d\d:\d\d:\d\d,\d\d\d) --> (\d\d:\d\d:\d\d,\d\d\d)/.exec(e);null!==n&&(this._currentDialogueStart=n[1].replace(",","."),this._currentDialogueEnd=n[2].replace(",","."))
}else e=e.replace(/<b>/g,"{\\b1}").replace(/\{b\}/g,"{\\b1}").replace(/<\/b>/g,"{\\b0}").replace(/\{\/b\}/g,"{\\b0}").replace(/<i>/g,"{\\i1}").replace(/\{i\}/g,"{\\i1}").replace(/<\/i>/g,"{\\i0}").replace(/\{\/i\}/g,"{\\i0}").replace(/<u>/g,"{\\u1}").replace(/\{u\}/g,"{\\u1}").replace(/<\/u>/g,"{\\u0}").replace(/\{\/u\}/g,"{\\u0}").replace(/<font color="#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})">/g,function(e,t,n,i){return"{c&H"+i+n+t+"&}"}).replace(/<\/font>/g,"{\\c}"),
null!==this._currentDialogueText?this._currentDialogueText+="\\N"+e:this._currentDialogueText=e;this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._deferred.reject(e)})},e}();e.SrtStreamParser=p},function(t,n){var i=n(32),a=function(){function e(e){this._str=e,this._readTill=0}return e.prototype.nextLine=function(){var e=null;if(this._readTill<this._str.length){var t=this._str.indexOf("\n",this._readTill)
;t!==-1?(e=i.Promise.resolve(this._str.substring(this._readTill,t)),this._readTill=t+1):(e=i.Promise.resolve(this._str.substr(this._readTill)),this._readTill=this._str.length)}else e=i.Promise.resolve(null);return e},e}();t.StringStream=a;var r=function(){function e(e){var t=this;this._xhr=e,this._readTill=0,this._pendingDeferred=null,this._failedError=null,e.addEventListener("progress",function(){return t._onXhrProgress()},!1),e.addEventListener("load",function(){return t._onXhrLoad()},!1),
e.addEventListener("error",function(e){return t._onXhrError(e)},!1)}return e.prototype.nextLine=function(){if(null!==this._pendingDeferred)throw new Error("XhrStream only supports one pending unfulfilled read at a time.");var e=this._pendingDeferred=new i.DeferredPromise;return this._tryResolveNextLine(),e.promise},e.prototype._onXhrProgress=function(){null!==this._pendingDeferred&&this._xhr.readyState!==XMLHttpRequest.DONE&&this._tryResolveNextLine()},e.prototype._onXhrLoad=function(){
null!==this._pendingDeferred&&this._tryResolveNextLine()},e.prototype._onXhrError=function(e){this._failedError=e,null!==this._pendingDeferred&&this._tryResolveNextLine()},e.prototype._tryResolveNextLine=function(){if(null!==this._failedError)return void this._pendingDeferred.reject(this._failedError);var e=this._xhr.responseText,t=e.indexOf("\n",this._readTill);t!==-1?(this._pendingDeferred.resolve(e.substring(this._readTill,t)),this._readTill=t+1,
this._pendingDeferred=null):this._xhr.readyState===XMLHttpRequest.DONE&&(null!==this._failedError?this._pendingDeferred.reject(this._failedError):this._readTill<e.length?(this._pendingDeferred.resolve(e.substr(this._readTill)),this._readTill=e.length):this._pendingDeferred.resolve(null),this._pendingDeferred=null)},e}();t.XhrStream=r;var s=function(){function t(t,n){this._buffer="",this._pendingDeferred=null,this._reader=t.getReader(),this._decoder=new e.TextDecoder(n,{ignoreBOM:!0})}
return t.prototype.nextLine=function(){if(null!==this._pendingDeferred)throw new Error("BrowserReadableStream only supports one pending unfulfilled read at a time.");var e=this._pendingDeferred=new i.DeferredPromise;return this._tryResolveNextLine(),e.promise},t.prototype._tryResolveNextLine=function(){var e=this,t=this._buffer.indexOf("\n");t!==-1?(this._pendingDeferred.resolve(this._buffer.substr(0,t)),this._buffer=this._buffer.substr(t+1),
this._pendingDeferred=null):this._reader.read().then(function(t){var n=t.value;t.done?(0===e._buffer.length?e._pendingDeferred.resolve(null):(e._pendingDeferred.resolve(e._buffer),e._buffer=""),e._pendingDeferred=null):(e._buffer+=e._decoder.decode(n,{stream:!0}),e._tryResolveNextLine())})},t}();t.BrowserReadableStream=s},function(e,t){function n(e){for(var t=atob(e.contents),n=new Uint8Array(new ArrayBuffer(t.length)),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);for(var a={
dataView:new DataView(n.buffer),position:0},r=c.read(a),s=null,i=0;i<r.numTables;i++){var o=d.read(a);if(o.c1+o.c2+o.c3+o.c4==="name"){s=o;break}}a.position=s.offset;for(var u=h.read(a),f=new l.Set,i=0;i<u.count;i++){var g=p.read(a);switch(g.nameId){case 1:case 4:case 6:var m=s.offset+u.stringOffset+g.offset,v=n.subarray(m,m+g.length);switch(g.platformId){case 1:for(var y="",b=0;b<v.length;b++)y+=String.fromCharCode(v[b]);f.add(y);break;case 3:
for(var S="",b=0;b<v.length;b+=2)S+=String.fromCharCode((v[b]<<8)+v[b+1]);f.add(S)}}}return f}function i(e){var t=e.__fields;return e.read=function(n){for(var i=new e,a=0;a<t.length;a++){var s=t[a],o=void 0;switch(s.type){case r.Char:o=String.fromCharCode(n.dataView.getInt8(n.position)),n.position+=1;break;case r.Uint16:o=n.dataView.getUint16(n.position),n.position+=2;break;case r.Uint32:o=n.dataView.getUint32(n.position),n.position+=4}i[s.field]=o}return i},e}function a(e){var t=u.get(e)
;return void 0===t&&(t=function(t,n){var i=t.constructor;void 0===i.__fields&&(i.__fields=[]),i.__fields.push({type:e,field:n})},u.set(e,t)),t}var r,s=t(34).__decorate,o=t(30),l=t(33);!function(e){e[e.Char=0]="Char",e[e.Uint16=1]="Uint16",e[e.Uint32=2]="Uint32"}(r||(r={}));var u=new o.Map,c=function(){function e(){}return s([a(r.Uint16)],e.prototype,"majorVersion",void 0),s([a(r.Uint16)],e.prototype,"minorVersion",void 0),s([a(r.Uint16)],e.prototype,"numTables",void 0),
s([a(r.Uint16)],e.prototype,"searchRange",void 0),s([a(r.Uint16)],e.prototype,"entrySelector",void 0),s([a(r.Uint16)],e.prototype,"rangeShift",void 0),e=s([i],e)}(),d=function(){function e(){}return s([a(r.Char)],e.prototype,"c1",void 0),s([a(r.Char)],e.prototype,"c2",void 0),s([a(r.Char)],e.prototype,"c3",void 0),s([a(r.Char)],e.prototype,"c4",void 0),s([a(r.Uint32)],e.prototype,"checksum",void 0),s([a(r.Uint32)],e.prototype,"offset",void 0),s([a(r.Uint32)],e.prototype,"length",void 0),
e=s([i],e)}(),h=function(){function e(){}return s([a(r.Uint16)],e.prototype,"formatSelector",void 0),s([a(r.Uint16)],e.prototype,"count",void 0),s([a(r.Uint16)],e.prototype,"stringOffset",void 0),e=s([i],e)}(),p=function(){function e(){}return s([a(r.Uint16)],e.prototype,"platformId",void 0),s([a(r.Uint16)],e.prototype,"encodingId",void 0),s([a(r.Uint16)],e.prototype,"languageId",void 0),s([a(r.Uint16)],e.prototype,"nameId",void 0),s([a(r.Uint16)],e.prototype,"length",void 0),
s([a(r.Uint16)],e.prototype,"offset",void 0),e=s([i],e)}();e.getTtfNames=n},function(e){var t=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.MoveInstruction=t;var n=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){
return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.LineInstruction=n;var i=function(){function e(e,t,n,i,a,r){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._x3=a,this._y3=r}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x3",{get:function(){return this._x3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y3",{get:function(){return this._y3},enumerable:!0,configurable:!0}),e}();e.CubicBezierCurveInstruction=i},function(e,t){var n=t(7);e.drawing=n
;var i=function(){function e(e,t,n,i){void 0===i&&(i=1),this._red=e,this._green=t,this._blue=n,this._alpha=i}return Object.defineProperty(e.prototype,"red",{get:function(){return this._red},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"green",{get:function(){return this._green},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blue",{get:function(){return this._blue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){
return this._alpha},enumerable:!0,configurable:!0}),e.prototype.withAlpha=function(t){return null!==t?new e(this._red,this._green,this._blue,t):this},e.prototype.toString=function(){return"rgba("+this._red+", "+this._green+", "+this._blue+", "+this._alpha.toFixed(3)+")"},e.prototype.interpolate=function(t,n){return new e(this._red+n*(t.red-this._red),this._green+n*(t.green-this._green),this._blue+n*(t.blue-this._blue),this._alpha+n*(t.alpha-this._alpha))},e}();e.Color=i;var a=function(){
function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Comment=a;var r=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"Text { value: "+this._value.replace(/\u00A0/g,"\\h")+" }"},e}();e.Text=r;var s=function(){function e(){}return e}();e.NewLine=s
;var o=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Italic=o;var l=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Bold=l;var u=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,
configurable:!0}),e}();e.Underline=u;var c=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.StrikeThrough=c;var d=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Border=d;var h=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.BorderX=h;var p=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.BorderY=p;var f=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Shadow=f;var g=function(){function e(e){this._value=e}
return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowX=g;var m=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowY=m;var v=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Blur=v
;var y=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.GaussianBlur=y;var b=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontName=b;var S=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},
enumerable:!0,configurable:!0}),e}();e.FontSize=S;var I=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSizePlus=I;var w=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSizeMinus=w;var M=function(){function e(e){this._value=e}
return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontScaleX=M;var C=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontScaleY=C;var D=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}()
;e.LetterSpacing=D;var P=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateX=P;var T=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateY=T;var x=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){
return this._value},enumerable:!0,configurable:!0}),e}();e.RotateZ=x;var E=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SkewX=E;var A=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SkewY=A;var k=function(){function e(e){this._value=e}
return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.PrimaryColor=k;var L=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SecondaryColor=L;var _=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}()
;e.OutlineColor=_;var N=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowColor=N;var R=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Alpha=R;var O=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){
return this._value},enumerable:!0,configurable:!0}),e}();e.PrimaryAlpha=O;var j=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SecondaryAlpha=j;var z=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.OutlineAlpha=z;var U=function(){function e(e){this._value=e}
return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowAlpha=U;var F=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Alignment=F;var B=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}()
;e.ColorKaraoke=B;var V=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.SweepingColorKaraoke=V;var H=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.OutlineKaraoke=H;var W=function(){function e(e){this._value=e}
return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.WrappingStyle=W;var Y=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Reset=Y;var Q=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.Position=Q;var G=function(){function e(e,t,n,i,a,r){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._t1=a,this._t2=r}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){
return this._x2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t1",{get:function(){return this._t1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t2",{get:function(){return this._t2},enumerable:!0,configurable:!0}),e}();e.Move=G;var K=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){
return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.RotationOrigin=K;var q=function(){function e(e,t){this._start=e,this._end=t}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),e}();e.Fade=q;var X=function(){
function e(e,t,n,i,a,r,s){this._a1=e,this._a2=t,this._a3=n,this._t1=i,this._t2=a,this._t3=r,this._t4=s}return Object.defineProperty(e.prototype,"a1",{get:function(){return this._a1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"a2",{get:function(){return this._a2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"a3",{get:function(){return this._a3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t1",{get:function(){return this._t1},
enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t2",{get:function(){return this._t2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t3",{get:function(){return this._t3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t4",{get:function(){return this._t4},enumerable:!0,configurable:!0}),e}();e.ComplexFade=X;var Z=function(){function e(e,t,n,i){this._start=e,this._end=t,this._accel=n,this._tags=i}
return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accel",{get:function(){return this._accel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tags",{get:function(){return this._tags},enumerable:!0,configurable:!0}),e}();e.Transform=Z;var J=function(){function e(e,t,n,i,a){
this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._inside=a}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"inside",{get:function(){return this._inside},enumerable:!0,configurable:!0}),e}();e.RectangularClip=J;var $=function(){function e(e,t,n){this._scale=e,this._instructions=t,this._inside=n}return Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instructions",{get:function(){return this._instructions},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"inside",{get:function(){return this._inside},enumerable:!0,configurable:!0}),e}();e.VectorClip=$;var ee=function(){function e(e){this._scale=e}return Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!0,configurable:!0}),e}();e.DrawingMode=ee;var te=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}()
;e.DrawingBaselineOffset=te;var ne=function(){function e(e){this._instructions=e}return Object.defineProperty(e.prototype,"instructions",{get:function(){return this._instructions},enumerable:!0,configurable:!0}),e}();e.DrawingInstructions=ne;for(var ie=function(e,t){if(!e.prototype.hasOwnProperty("toString")){var n=Object.getOwnPropertyNames(e.prototype).filter(function(e){return"constructor"!==e});e.prototype.toString=function(){var e=this;return t+" { "+n.map(function(t){return t+": "+e[t]
}).join(", ")+(n.length>0?" ":"")+"}"}}},ae=t(38),re=0,se=Object.keys(e);re<se.length;re++){var oe=se[re],le=e[oe];le instanceof Function&&(ie(le,oe),ae.registerClassPrototype(le.prototype))}for(var ue=0,ce=Object.keys(n);ue<ce.length;ue++){var oe=ce[ue],le=n[oe];le instanceof Function&&(ie(le,"Drawing"+oe),ae.registerClassPrototype(le.prototype))}},function(e,t){var n=t(23),i=t(11),a=function(){function e(e,t){this._getCurrentTime=e,this._autoPauseAfter=t,this._manualClock=new i.ManualClock,
this._nextAnimationFrameRequestId=null,this._lastKnownExternalTime=null,this._lastKnownExternalTimeObtainedAt=null}return e.prototype.play=function(){this._manualClock.enabled&&(this._startTicking(),this._manualClock.play())},e.prototype.pause=function(){if(this._manualClock.enabled){if(null===this._nextAnimationFrameRequestId)return void(n.debugMode&&console.warn("AutoClock.pause: Abnormal state detected. AutoClock._nextAnimationFrameRequestId should not have been null."));this._stopTicking(),
this._manualClock.pause()}},e.prototype.seeking=function(){this._manualClock.seek(this._getCurrentTime())},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._manualClock.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._manualClock.enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._manualClock.paused},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"rate",{get:function(){return this._manualClock.rate},enumerable:!0,configurable:!0}),e.prototype.setRate=function(e){this._manualClock.setRate(e)},e.prototype.enable=function(){return!!this._manualClock.enable()&&(this._startTicking(),!0)},e.prototype.disable=function(){return!!this._manualClock.disable()&&(this._stopTicking(),!0)},e.prototype.toggle=function(){this._manualClock.enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){
return e?this.enable():this.disable()},e.prototype.addEventListener=function(e,t){this._manualClock.addEventListener(e,t)},e.prototype._onTimerTick=function(e){var t=this;if(!this._manualClock.enabled)return void(n.debugMode&&console.warn("AutoClock._onTimerTick: Called when disabled."));var i=this._manualClock.currentTime,a=this._getCurrentTime();this._manualClock.paused?i!==a&&(this._lastKnownExternalTime=a,this._lastKnownExternalTimeObtainedAt=e,
this._manualClock.tick(a)):null!==this._lastKnownExternalTime&&a===this._lastKnownExternalTime?e-this._lastKnownExternalTimeObtainedAt>this._autoPauseAfter?(this._lastKnownExternalTimeObtainedAt=null,this._manualClock.pause()):this._manualClock.tick((e-this._lastKnownExternalTimeObtainedAt)/1e3*this._manualClock.rate+this._lastKnownExternalTime):(this._lastKnownExternalTime=a,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(a)),
this._nextAnimationFrameRequestId=requestAnimationFrame(function(e){return t._onTimerTick(e)})},e.prototype._startTicking=function(){var e=this;null===this._nextAnimationFrameRequestId&&(this._nextAnimationFrameRequestId=requestAnimationFrame(function(t){return e._onTimerTick(t)}))},e.prototype._stopTicking=function(){null!==this._nextAnimationFrameRequestId&&(cancelAnimationFrame(this._nextAnimationFrameRequestId),this._nextAnimationFrameRequestId=null)},e}();e.AutoClock=a},function(e){
var t=function(){function e(){}return e.prototype.addEventListener=function(e,t){var n=this._eventListeners.get(e);void 0===n&&this._eventListeners.set(e,n=[]),n.push(t)},e.prototype._dispatchEvent=function(e,t){var n=this._eventListeners.get(e);if(void 0!==n)for(var i=0;i<n.length;i++){var a=n[i];a.apply(this,t)}},e}();e.EventSource=t,function(e){e[e.Play=0]="Play",e[e.Tick=1]="Tick",e[e.Pause=2]="Pause",e[e.Stop=3]="Stop",e[e.RateChange=4]="RateChange"}(e.ClockEvent||(e.ClockEvent={}))
},function(e,t){var n=t(31),i=t(30),a=t(10),r=function(){function e(){this._currentTime=-1,this._rate=1,this._enabled=!0,this._paused=!0,this._eventListeners=new i.Map}return e.prototype.play=function(){this._enabled&&this._paused&&(this._paused=!1,this._dispatchEvent(a.ClockEvent.Play,[]))},e.prototype.tick=function(e){this._enabled&&this._currentTime!==e&&(this.play(),this._currentTime=e,this._dispatchEvent(a.ClockEvent.Tick,[]))},e.prototype.seek=function(e){this._enabled&&(this.pause(),
this._currentTime!==e&&(this.stop(),this.tick(e),this.pause()))},e.prototype.pause=function(){this._enabled&&(this._paused||(this._paused=!0,this._dispatchEvent(a.ClockEvent.Pause,[])))},e.prototype.stop=function(){this._dispatchEvent(a.ClockEvent.Stop,[])},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{get:function(){return this._rate},enumerable:!0,configurable:!0}),e.prototype.setRate=function(e){this._rate!==e&&(this._rate=e,this._dispatchEvent(a.ClockEvent.RateChange,[]))},e.prototype.enable=function(){return!this._enabled&&(this._enabled=!0,!0)},e.prototype.disable=function(){return!!this._enabled&&(this.pause(),this.stop(),
this._enabled=!1,!0)},e.prototype.toggle=function(){this._enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){return e?this.enable():this.disable()},e}();e.ManualClock=r,n.mixin(r,[a.EventSource])},function(e,t){var n=t(9),i=function(){function e(e){var t=this;this._autoClock=new n.AutoClock(function(){return e.currentTime},100),e.addEventListener("playing",function(){return t._autoClock.play()},!1),e.addEventListener("pause",function(){return t._autoClock.pause()},!1),
e.addEventListener("seeking",function(){return t._autoClock.seeking()},!1),e.addEventListener("ratechange",function(){return t._autoClock.setRate(e.playbackRate)},!1)}return Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._autoClock.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._autoClock.enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){
return this._autoClock.paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{get:function(){return this._autoClock.rate},enumerable:!0,configurable:!0}),e.prototype.enable=function(){return this._autoClock.enable()},e.prototype.disable=function(){return this._autoClock.disable()},e.prototype.toggle=function(){this._autoClock.enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){return e?this.enable():this.disable()},
e.prototype.addEventListener=function(e,t){this._autoClock.addEventListener(e,t)},e}();e.VideoClock=i},function(e,t){var n=t(34).__extends,i=t(12),a=t(21),r=function(e){function t(t,n,a){e.call(this,n,new i.VideoClock(t),document.createElement("div"),a),this._video=t,this._video.parentElement.replaceChild(this.libjassSubsWrapper,this._video),this.libjassSubsWrapper.insertBefore(this._video,this.libjassSubsWrapper.firstElementChild)}return n(t,e),t.prototype.resize=function(){
var t=this._video.videoWidth,n=this._video.videoHeight,i=this._video.offsetWidth,a=this._video.offsetHeight,r=Math.min(i/t,a/n),s=t*r,o=n*r,l=(i-s)/2,u=(a-o)/2;e.prototype.resize.call(this,s,o,l,u)},t.prototype.resizeVideo=function(){console.warn("`DefaultRenderer.resizeVideo(width, height)` has been deprecated. Use `DefaultRenderer.resize()` instead."),this.resize()},t.prototype._ready=function(){this.resize(),e.prototype._ready.call(this)},t}(a.WebRenderer);e.DefaultRenderer=r},function(e,t){
var n=t(10);e.ClockEvent=n.ClockEvent,e.EventSource=n.EventSource;var i=t(9);e.AutoClock=i.AutoClock;var a=t(11);e.ManualClock=a.ManualClock;var r=t(12);e.VideoClock=r.VideoClock;var s=t(13);e.DefaultRenderer=s.DefaultRenderer;var o=t(15);e.NullRenderer=o.NullRenderer;var l=t(21);e.WebRenderer=l.WebRenderer;var u=t(16);e.RendererSettings=u.RendererSettings},function(e,t){var n=t(10),i=t(16),a=t(23),r=function(){function e(t,a,r){var s=this;this._ass=t,this._clock=a,this._id=++e._lastRendererId,
this._settings=i.RendererSettings.from(r),this._clock.addEventListener(n.ClockEvent.Play,function(){return s._onClockPlay()}),this._clock.addEventListener(n.ClockEvent.Tick,function(){return s._onClockTick()}),this._clock.addEventListener(n.ClockEvent.Pause,function(){return s._onClockPause()}),this._clock.addEventListener(n.ClockEvent.Stop,function(){return s._onClockStop()}),this._clock.addEventListener(n.ClockEvent.RateChange,function(){return s._onClockRateChange()})}
return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ass",{get:function(){return this._ass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clock",{get:function(){return this._clock},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"settings",{get:function(){return this._settings},enumerable:!0,configurable:!0}),e.prototype.preRender=function(){},
e.prototype.draw=function(){},e.prototype.enable=function(){return this._clock.enable()},e.prototype.disable=function(){return this._clock.disable()},e.prototype.toggle=function(){this._clock.toggle()},e.prototype.setEnabled=function(e){return this._clock.setEnabled(e)},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._clock.enabled},enumerable:!0,configurable:!0}),e.prototype._onClockPlay=function(){a.verboseMode&&console.log("NullRenderer._onClockPlay")},
e.prototype._onClockTick=function(){var e=this._clock.currentTime;a.verboseMode&&console.log("NullRenderer._onClockTick: currentTime = "+e);for(var t=0,n=this._ass.dialogues;t<n.length;t++){var i=n[t];i.end>e&&(i.start<=e?this.draw(i):i.start<=e+this._settings.preRenderTime&&this.preRender(i))}},e.prototype._onClockPause=function(){a.verboseMode&&console.log("NullRenderer._onClockPause")},e.prototype._onClockStop=function(){a.verboseMode&&console.log("NullRenderer._onClockStop")},
e.prototype._onClockRateChange=function(){a.verboseMode&&console.log("NullRenderer._onClockRateChange")},e._lastRendererId=-1,e}();e.NullRenderer=r},function(e,t){function n(e){return e.type===CSSRule.FONT_FACE_RULE}var i=t(30),a=function(){function e(){}return e.makeFontMapFromStyleElement=function(e){for(var t=new i.Map,a=e.sheet,r=0;r<a.cssRules.length;r++){var s=a.cssRules[r];if(n(s)){
var o=s.style.getPropertyValue("font-family").match(/^["']?(.*?)["']?$/)[1],l=s.style.getPropertyValue("src");l||(l=s.cssText.split("\n").map(function(e){return e.match(/src:\s*([^;]+?)\s*;/)}).filter(function(e){return null!==e}).map(function(e){return e[1]})[0]),t.set(o,l)}}return t},e.from=function(t){void 0!==t&&null!==t||(t={})
;var n=t,i=n.fontMap,a=void 0===i?null:i,r=n.preRenderTime,s=void 0===r?5:r,o=n.preciseOutlines,l=void 0!==o&&o,u=n.enableSvg,c=void 0===u||u,d=n.fallbackFonts,h=void 0===d?'Arial, Helvetica, sans-serif, "Segoe UI Symbol"':d,p=n.useAttachedFonts,f=void 0!==p&&p,g=new e;return g.fontMap=a,g.preRenderTime=s,g.preciseOutlines=l,g.enableSvg=c,g.fallbackFonts=h,g.useAttachedFonts=f,g},e}();e.RendererSettings=a},function(e,t){var n=t(30),i=function(){function e(t,i){this._style=i,
this._animationStyle="",this._animationDelays=new n.Map,this._numAnimations=0,this._id=t.id+"-"+e._nextId++,this._rate=t.clock.rate}return Object.defineProperty(e.prototype,"animationStyle",{get:function(){return this._animationStyle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationDelays",{get:function(){return this._animationDelays},enumerable:!0,configurable:!0}),e.prototype.add=function(e,t){for(var n=null,i=null,a=0;a<t.length;a++){var r=t[a]
;null===n&&(n=r.time),i=r.time}for(var s="",o=0;o<t.length;o++){var r=t[o];s+="\t"+(100*(i-n==0?1:(r.time-n)/(i-n))).toFixed(3)+"% {\n",r.properties.forEach(function(e,t){s+="\t\t"+t+": "+e+";\n"}),s+="\t}\n"}var l="animation-"+this._id+"-"+this._numAnimations++;this._style.appendChild(document.createTextNode("@-webkit-keyframes "+l+" {\n"+s+"\n}")),this._style.appendChild(document.createTextNode("@keyframes "+l+" {\n"+s+"\n}")),""!==this._animationStyle&&(this._animationStyle+=","),
this._animationStyle+=l+" "+((i-n)/this._rate).toFixed(3)+"s "+e,this._animationDelays.set(l,n)},e._nextId=0,e}();e.AnimationCollection=i},function(e,t){var n=t(8),i=function(){function e(e,t){this._outputScaleX=e,this._outputScaleY=t,this._scale=1,this._baselineOffset=0}return Object.defineProperty(e.prototype,"scale",{set:function(e){this._scale=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baselineOffset",{set:function(e){this._baselineOffset=e},enumerable:!0,
configurable:!0}),e.prototype.toSVG=function(e,t){for(var i=Math.pow(2,this._scale-1),a=this._outputScaleX/i,r=this._outputScaleY/i,s=document.createElementNS("http://www.w3.org/2000/svg","path"),o=0,l=0,u=0,c=e.instructions;u<c.length;u++){var d=c[u];d instanceof n.drawing.MoveInstruction?(s.pathSegList.appendItem(s.createSVGPathSegMovetoAbs(d.x,d.y+this._baselineOffset)),o=Math.max(o,d.x),
l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.LineInstruction?(s.pathSegList.appendItem(s.createSVGPathSegLinetoAbs(d.x,d.y+this._baselineOffset)),o=Math.max(o,d.x),l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.CubicBezierCurveInstruction&&(s.pathSegList.appendItem(s.createSVGPathSegCurvetoCubicAbs(d.x3,d.y3+this._baselineOffset,d.x1,d.y1+this._baselineOffset,d.x2,d.y2+this._baselineOffset)),o=Math.max(o,d.x1,d.x2,d.x3),
l=Math.max(l,d.y1+this._baselineOffset,d.y2+this._baselineOffset,d.y3+this._baselineOffset))}var h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("version","1.1"),h.width.baseVal.valueAsString=(o*a).toFixed(3)+"px",h.height.baseVal.valueAsString=(l*r).toFixed(3)+"px";var p=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(p),p.setAttribute("transform","scale("+a.toFixed(3)+" "+r.toFixed(3)+")"),p.appendChild(s),
s.setAttribute("fill",t.toString()),h},e}();e.DrawingStyles=i},function(e,t){function n(e,t,n,i){var a='"'+e+'"';""!==n&&(a+=", "+n),i.style.fontFamily=a,i.style.fontSize=t+"px"}function i(e,t,i,a){return n(e,t,i,a),new u.Promise(function(e){return setTimeout(function(){return e(a.offsetHeight)},1e3)})}function a(e,t,i,a){return n(e,t,i,a),a.offsetHeight}function r(e,t){return[e,180/(t-e)]}function s(e,t,n){return i(e,180,t,n).then(function(a){return i(e,360,t,n).then(function(e){return r(a,e)})
})}function o(e,t,n){return 180+(e-t)*n}function l(e,t,n,i,s){var l=s.get(e);if(void 0===l){var u=a(e,180,n,i),c=a(e,360,n,i);s.set(e,l=r(u,c))}return o(t,l[0],l[1])}var u=t(32);e.calculateFontMetrics=s,e.fontSizeForLineHeight=l},function(e){var t=function(){function e(e,t){this._time=e,this._properties=t}return Object.defineProperty(e.prototype,"time",{get:function(){return this._time},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){
return this._properties},enumerable:!0,configurable:!0}),e}();e.Keyframe=t},function(t,n){var i=n(34).__extends,a=n(17),r=n(18),s=n(19),o=n(20),l=n(22),u=n(10),c=n(15),d=n(6),h=n(8),p=n(23),f=n(25),g=n(27),m=n(31),v=n(30),y=n(32),b=/^(url|local)\(["']?(.+?)["']?\)$/,S=function(t){function n(n,i,a,r){var s=this;t.call(this,n,i,function(){if(!(a instanceof HTMLDivElement)){var e=r;r=a,a=e,
console.warn("WebRenderer's constructor now takes libjassSubsWrapper as the third parameter and settings as the fourth parameter. Please update the caller.")}return r}()),this._libjassSubsWrapper=a,this._layerWrappers=[],this._layerAlignmentWrappers=[],this._fontMetricsCache=new v.Map,this._currentSubs=new v.Map,this._preRenderedSubs=new v.Map,this._eventListeners=new v.Map,this._libjassSubsWrapper.classList.add("libjass-wrapper"),this._subsWrapper=document.createElement("div"),
this._libjassSubsWrapper.appendChild(this._subsWrapper),this._subsWrapper.className="libjass-subs",this._fontSizeElement=document.createElement("div"),this._libjassSubsWrapper.appendChild(this._fontSizeElement),this._fontSizeElement.className="libjass-font-measure",this._fontSizeElement.appendChild(document.createTextNode("M")),p.debugMode&&console.log("Preloading fonts...");var o=[],l=new v.Map,u=null===this.settings.fontMap?new v.Map:this.settings.fontMap,c=new v.Map
;this.settings.useAttachedFonts&&n.attachments.forEach(function(e){if(e.type===f.AttachmentType.Font){var t=null;try{t=d.getTtfNames(e)}catch(e){return void console.error(e)}var n="data:application/x-font-ttf;base64,"+e.contents;t.forEach(function(e){var t=u.get(e);if(void 0!==t)if("string"!=typeof t)t.push(n);else{var i=c.get(e);void 0===i&&c.set(e,i=[]),i.push(n)}else u.set(e,[n])})}}),u.forEach(function(t,n){var i;if(e.document.fonts&&e.document.fonts.add){
var a="string"==typeof t?t:t.map(function(e){return null!==e.match(b)?e:'url("'+e+'")'}).join(", "),r=c.get(n);if(void 0!==r)for(var u=0;u<r.length;u++){var d=r[u];a+=', url("'+d+'")'}var h=[];e.document.fonts.forEach(function(e){e.family!==n&&e.family!=='"'+n+'"'||h.push(e)});var f;if(0===h.length){var g=new FontFace(n,a),m=new FontFace('"'+n+'"',a);e.document.fonts.add(g),e.document.fonts.add(m),f=y.any([g.load(),m.load()])}else f=y.any(h.map(function(e){return e.load()}))
;i=s._calculateFontMetricsAfterFetch(n,f.catch(function(e){return console.warn("Fetching fonts for "+n+" at "+a+" failed: %o",e),null}))}else{var v=("string"==typeof t?t.split(/,/):t).map(function(e){return e.trim()}).map(function(e){var t=e.match(b);return null===t?e:"local"===t[1]?null:t[2]}).filter(function(e){return null!==e}),r=c.get(n);void 0!==r&&(v=v.concat(r));var S=v.map(function(e){var t=l.get(e);return void 0===t&&(t=new y.Promise(function(t,n){var i=new XMLHttpRequest
;i.addEventListener("load",function(){p.debugMode&&console.log("Preloaded "+e+"."),t(null)}),i.addEventListener("error",function(e){n(e)}),i.open("GET",e,!0),i.send()}),l.set(e,t)),t}),I=0===S.length?y.Promise.resolve(null):y.first(S).catch(function(e){return console.warn("Fetching fonts for "+n+" at "+v.join(", ")+" failed: %o",e),null});i=s._calculateFontMetricsAfterFetch(n,I)}o.push(i.then(function(e){return s._fontMetricsCache.set(n,e)}))}),y.Promise.all(o).then(function(){
p.debugMode&&console.log("All fonts have been preloaded."),s._ready()})}return i(n,t),Object.defineProperty(n.prototype,"libjassSubsWrapper",{get:function(){return this._libjassSubsWrapper},enumerable:!0,configurable:!0}),n.prototype.resize=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0),this._removeAllSubs(),this._subsWrapper.style.width=e.toFixed(3)+"px",this._subsWrapper.style.height=t.toFixed(3)+"px",this._subsWrapper.style.left=n.toFixed(3)+"px",
this._subsWrapper.style.top=i.toFixed(3)+"px",this._subsWrapperWidth=e,this._scaleX=e/this.ass.properties.resolutionX,this._scaleY=t/this.ass.properties.resolutionY,this._preRenderedSubs.clear(),this.clock.currentTime!==-1&&this._onClockTick()},n.prototype.preRender=function(e){var t=this,i=this._preRenderedSubs.get(e.id);if(i)return i;var s=this.clock.currentTime-e.start;if(e.containsTransformTag&&s<0)return null;var u=document.createElement("div")
;u.style.marginLeft=(this._scaleX*e.style.marginLeft).toFixed(3)+"px",u.style.marginRight=(this._scaleX*e.style.marginRight).toFixed(3)+"px",u.style.marginTop=u.style.marginBottom=(this._scaleY*e.style.marginVertical).toFixed(3)+"px",u.style.minWidth=(this._subsWrapperWidth-this._scaleX*(e.style.marginLeft+e.style.marginRight)).toFixed(3)+"px";var c=document.createElement("style");c.id="libjass-animation-styles-"+this.id+"-"+e.id,c.type="text/css"
;var d=new a.AnimationCollection(this,c),f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("version","1.1"),f.setAttribute("class","libjass-filters"),f.width.baseVal.valueAsString="0",f.height.baseVal.valueAsString="0";var m=document.createElementNS("http://www.w3.org/2000/svg","defs");f.appendChild(m);var y=null,b=new l.SpanStyles(this,e,this._scaleX,this._scaleY,this.settings,this._fontSizeElement,m,this._fontMetricsCache),S=null,I=!1,w=function(e){
null!==y&&y.hasChildNodes()&&u.appendChild(b.setStylesOnSpan(y,S)),null!==S&&S.animationDelays.forEach(function(e,t){return d.animationDelays.set(t,e)}),e&&(I?u.appendChild(b.makeNewLine()):u.appendChild(document.createElement("br"))),y=document.createElement("span"),S=new a.AnimationCollection(t,c),I=e};w(!1);for(var M=new r.DrawingStyles(this._scaleX,this._scaleY),C=this.ass.properties.wrappingStyle,D=0,P=0,T=e.parts;P<T.length;P++){var x=T[P]
;if(x instanceof h.Italic)b.italic=x.value;else if(x instanceof h.Bold)b.bold=x.value;else if(x instanceof h.Underline)b.underline=x.value;else if(x instanceof h.StrikeThrough)b.strikeThrough=x.value;else if(x instanceof h.Border)b.outlineWidth=x.value,b.outlineHeight=x.value;else if(x instanceof h.BorderX)b.outlineWidth=x.value;else if(x instanceof h.BorderY)b.outlineHeight=x.value;else if(x instanceof h.Shadow)b.shadowDepthX=x.value,
b.shadowDepthY=x.value;else if(x instanceof h.ShadowX)b.shadowDepthX=x.value;else if(x instanceof h.ShadowY)b.shadowDepthY=x.value;else if(x instanceof h.Blur)b.blur=x.value;else if(x instanceof h.GaussianBlur)b.gaussianBlur=x.value;else if(x instanceof h.FontName)b.fontName=x.value;else if(x instanceof h.FontSize)b.fontSize=x.value;else if(x instanceof h.FontSizePlus)b.fontSize+=x.value;else if(x instanceof h.FontSizeMinus)b.fontSize-=x.value;else if(x instanceof h.FontScaleX)b.fontScaleX=x.value;else if(x instanceof h.FontScaleY)b.fontScaleY=x.value;else if(x instanceof h.LetterSpacing)b.letterSpacing=x.value;else if(x instanceof h.RotateX)b.rotationX=x.value;else if(x instanceof h.RotateY)b.rotationY=x.value;else if(x instanceof h.RotateZ)b.rotationZ=x.value;else if(x instanceof h.SkewX)b.skewX=x.value;else if(x instanceof h.SkewY)b.skewY=x.value;else if(x instanceof h.PrimaryColor)b.primaryColor=x.value;else if(x instanceof h.SecondaryColor)b.secondaryColor=x.value;else if(x instanceof h.OutlineColor)b.outlineColor=x.value;else if(x instanceof h.ShadowColor)b.shadowColor=x.value;else if(x instanceof h.Alpha)b.primaryAlpha=x.value,
b.secondaryAlpha=x.value,b.outlineAlpha=x.value,b.shadowAlpha=x.value;else if(x instanceof h.PrimaryAlpha)b.primaryAlpha=x.value;else if(x instanceof h.SecondaryAlpha)b.secondaryAlpha=x.value;else if(x instanceof h.OutlineAlpha)b.outlineAlpha=x.value;else if(x instanceof h.ShadowAlpha)b.shadowAlpha=x.value;else if(x instanceof h.Alignment);else if(x instanceof h.ColorKaraoke)w(!1),
S.add("step-end",[new o.Keyframe(0,new v.Map([["color",b.secondaryColor.withAlpha(b.secondaryAlpha).toString()]])),new o.Keyframe(D,new v.Map([["color",b.primaryColor.withAlpha(b.primaryAlpha).toString()]]))]),D+=x.duration;else if(x instanceof h.WrappingStyle)C=x.value;else if(x instanceof h.Reset)b.reset(this.ass.styles.get(x.value));else if(x instanceof h.Position)u.style.position="absolute",u.style.left=(this._scaleX*x.x).toFixed(3)+"px",
u.style.top=(this._scaleY*x.y).toFixed(3)+"px";else if(x instanceof h.Move)u.style.position="absolute",
d.add("linear",[new o.Keyframe(0,new v.Map([["left",(this._scaleX*x.x1).toFixed(3)+"px"],["top",(this._scaleY*x.y1).toFixed(3)+"px"]])),new o.Keyframe(x.t1,new v.Map([["left",(this._scaleX*x.x1).toFixed(3)+"px"],["top",(this._scaleY*x.y1).toFixed(3)+"px"]])),new o.Keyframe(x.t2,new v.Map([["left",(this._scaleX*x.x2).toFixed(3)+"px"],["top",(this._scaleY*x.y2).toFixed(3)+"px"]])),new o.Keyframe(e.end-e.start,new v.Map([["left",(this._scaleX*x.x2).toFixed(3)+"px"],["top",(this._scaleY*x.y2).toFixed(3)+"px"]]))]);else if(x instanceof h.Fade)d.add("linear",[new o.Keyframe(0,new v.Map([["opacity","0"]])),new o.Keyframe(x.start,new v.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start-x.end,new v.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start,new v.Map([["opacity","0"]]))]);else if(x instanceof h.ComplexFade)d.add("linear",[new o.Keyframe(0,new v.Map([["opacity",x.a1.toFixed(3)]])),new o.Keyframe(x.t1,new v.Map([["opacity",x.a1.toFixed(3)]])),new o.Keyframe(x.t2,new v.Map([["opacity",x.a2.toFixed(3)]])),new o.Keyframe(x.t3,new v.Map([["opacity",x.a2.toFixed(3)]])),new o.Keyframe(x.t4,new v.Map([["opacity",x.a3.toFixed(3)]])),new o.Keyframe(e.end-e.start,new v.Map([["opacity",x.a3.toFixed(3)]]))]);else if(x instanceof h.Transform)for(var E=s<=x.start?0:s>=x.end?1:Math.pow((s-x.start)/(x.end-x.start),x.accel),A=0,k=x.tags;A<k.length;A++){
var L=k[A];L instanceof h.Border?(b.outlineWidth+=E*(L.value-b.outlineWidth),b.outlineHeight+=E*(L.value-b.outlineHeight)):L instanceof h.BorderX?b.outlineWidth+=E*(L.value-b.outlineWidth):L instanceof h.BorderY?b.outlineHeight+=E*(L.value-b.outlineHeight):L instanceof h.Shadow?(b.shadowDepthX+=E*(L.value-b.shadowDepthX),
b.shadowDepthY+=E*(L.value-b.shadowDepthY)):L instanceof h.ShadowX?b.shadowDepthX+=E*(L.value-b.shadowDepthX):L instanceof h.ShadowY?b.shadowDepthY+=E*(L.value-b.shadowDepthY):L instanceof h.Blur?b.blur+=E*(L.value-b.blur):L instanceof h.GaussianBlur?b.gaussianBlur+=E*(L.value-b.gaussianBlur):L instanceof h.FontSize?b.fontSize+=E*(L.value-b.fontSize):L instanceof h.FontSizePlus?b.fontSize+=E*L.value:L instanceof h.FontSizeMinus?b.fontSize-=E*L.value:L instanceof h.FontScaleX?b.fontScaleX+=E*(L.value-b.fontScaleX):L instanceof h.FontScaleY?b.fontScaleY+=E*(L.value-b.fontScaleY):L instanceof h.LetterSpacing?b.letterSpacing+=E*(L.value-b.letterSpacing):L instanceof h.RotateX?b.rotationX+=E*(L.value-b.rotationX):L instanceof h.RotateY?b.rotationY+=E*(L.value-b.rotationY):L instanceof h.RotateZ?b.rotationZ+=E*(L.value-b.rotationZ):L instanceof h.SkewX?b.skewX+=E*(L.value-b.skewX):L instanceof h.SkewY?b.skewY+=E*(L.value-b.skewY):L instanceof h.PrimaryColor?b.primaryColor=b.primaryColor.interpolate(L.value,E):L instanceof h.SecondaryColor?b.secondaryColor=b.secondaryColor.interpolate(L.value,E):L instanceof h.OutlineColor?b.outlineColor=b.outlineColor.interpolate(L.value,E):L instanceof h.ShadowColor?b.shadowColor=b.shadowColor.interpolate(L.value,E):L instanceof h.Alpha?(b.primaryAlpha+=E*(L.value-b.primaryAlpha),
b.secondaryAlpha+=E*(L.value-b.secondaryAlpha),b.outlineAlpha+=E*(L.value-b.outlineAlpha),b.shadowAlpha+=E*(L.value-b.shadowAlpha)):L instanceof h.PrimaryAlpha?b.primaryAlpha+=E*(L.value-b.primaryAlpha):L instanceof h.SecondaryAlpha?b.secondaryAlpha+=E*(L.value-b.secondaryAlpha):L instanceof h.OutlineAlpha?b.outlineAlpha+=E*(L.value-b.outlineAlpha):L instanceof h.ShadowAlpha&&(b.shadowAlpha+=E*(L.value-b.shadowAlpha))
}else x instanceof h.DrawingMode?0!==x.scale&&(M.scale=x.scale):x instanceof h.DrawingBaselineOffset?M.baselineOffset=x.value:x instanceof h.DrawingInstructions?(y.appendChild(M.toSVG(x,b.primaryColor.withAlpha(b.primaryAlpha))),w(!1)):x instanceof h.Text?(y.appendChild(document.createTextNode(x.value+"\u200c")),w(!1)):p.debugMode&&x instanceof h.Comment?(y.appendChild(document.createTextNode(x.value)),w(!1)):x instanceof h.NewLine&&w(!0)}for(var _=0,N=e.parts;_<N.length;_++){var x=N[_]
;if(x instanceof h.Position||x instanceof h.Move){var R=n._transformOrigins[e.alignment],O="translate("+-R[0]+"%, "+-R[1]+"%) translate(-"+u.style.marginLeft+", -"+u.style.marginTop+")",j=R[0]+"% "+R[1]+"%";u.style.webkitTransform=O,u.style.webkitTransformOrigin=j,u.style.transform=O,u.style.transformOrigin=j;break}}switch(C){case g.WrappingStyle.EndOfLineWrapping:u.style.whiteSpace="pre-wrap";break;case g.WrappingStyle.NoLineWrapping:u.style.whiteSpace="pre";break
;case g.WrappingStyle.SmartWrappingWithWiderTopLine:case g.WrappingStyle.SmartWrappingWithWiderBottomLine:u.style.whiteSpace="pre-wrap"}if(""!==u.style.position)switch(e.alignment){case 1:case 4:case 7:u.style.textAlign="left";break;case 2:case 5:case 8:u.style.textAlign="center";break;case 3:case 6:case 9:u.style.textAlign="right"}u.style.webkitAnimation=d.animationStyle,u.style.animation=d.animationStyle,u.setAttribute("data-dialogue-id",this.id+"-"+e.id),""!==c.textContent&&u.appendChild(c),
m.hasChildNodes()&&u.appendChild(f);var z={sub:u,animationDelays:d.animationDelays};return e.containsTransformTag||this._preRenderedSubs.set(e.id,z),z},n.prototype.draw=function(e){var t=this;if(!this._currentSubs.has(e)||e.containsTransformTag){p.debugMode&&console.log(e.toString());var n=this._preRenderedSubs.get(e.id);void 0===n&&(n=this.preRender(e),p.debugMode&&console.log(e.toString()));var i=n.sub.cloneNode(!0),a=function(i){var a=i.style.animationName||i.style.webkitAnimationName
;if(void 0!==a&&""!==a){var r=a.split(",").map(function(i){return i=i.trim(),((n.animationDelays.get(i)+e.start-t.clock.currentTime)/t.clock.rate).toFixed(3)+"s"}).join(", ");i.style.webkitAnimationDelay=r,i.style.animationDelay=r}};a(i);for(var r=i.querySelectorAll('[style*="animation:"]'),s=0;s<r.length;s++)a(r[s]);var o=e.layer,l="absolute"===i.style.position?0:e.alignment;if(void 0===this._layerWrappers[o]){var u=document.createElement("div");u.className="layer layer"+o
;for(var c=null,d=o+1;d<this._layerWrappers.length&&null===c;d++)void 0!==this._layerWrappers[d]&&(c=this._layerWrappers[d]);this._subsWrapper.insertBefore(u,c),this._layerWrappers[o]=u,this._layerAlignmentWrappers[o]=[]}if(void 0===this._layerAlignmentWrappers[o][l]){var h=document.createElement("div");h.className="an an"+l
;for(var u=this._layerWrappers[o],c=null,f=l+1;f<this._layerAlignmentWrappers[o].length&&null===c;f++)void 0!==this._layerAlignmentWrappers[o][f]&&(c=this._layerAlignmentWrappers[o][f]);u.insertBefore(h,c),this._layerAlignmentWrappers[o][l]=h}this._layerAlignmentWrappers[o][l].appendChild(i);var g=i.getElementsByTagName("style")[0];if(void 0!==g){var m=g.sheet;0===m.cssRules.length&&(m.cssText=g.textContent)}this._currentSubs.set(e,i)}},n.prototype._onClockPlay=function(){
t.prototype._onClockPlay.call(this),this._removeAllSubs(),this._subsWrapper.style.display="",this._subsWrapper.classList.remove("paused")},n.prototype._onClockTick=function(){var e=this,n=this.clock.currentTime;this._currentSubs.forEach(function(t,i){(i.start>n||i.end<n||i.containsTransformTag)&&(e._currentSubs.delete(i),e._removeSub(t))}),t.prototype._onClockTick.call(this)},n.prototype._onClockPause=function(){t.prototype._onClockPause.call(this),this._subsWrapper.classList.add("paused")},
n.prototype._onClockStop=function(){t.prototype._onClockStop.call(this),this._subsWrapper.style.display="none"},n.prototype._onClockRateChange=function(){t.prototype._onClockRateChange.call(this),this._preRenderedSubs.clear()},n.prototype._ready=function(){this._dispatchEvent("ready",[])},n.prototype._calculateFontMetricsAfterFetch=function(e,t){var n=this;return t.then(function(){var t=n._fontSizeElement.cloneNode(!0);return n._libjassSubsWrapper.appendChild(t),
y.lastly(s.calculateFontMetrics(e,n.settings.fallbackFonts,t),function(){n._libjassSubsWrapper.removeChild(t)})})},n.prototype._removeSub=function(e){e.parentNode.removeChild(e)},n.prototype._removeAllSubs=function(){var e=this;this._currentSubs.forEach(function(t){return e._removeSub(t)}),this._currentSubs.clear()},n._transformOrigins=[null,[0,100],[50,100],[100,100],[0,50],[50,50],[100,50],[0,0],[50,0],[100,0]],n}(c.NullRenderer);t.WebRenderer=S,m.mixin(S,[u.EventSource])},function(e,t){
var n=t(19),i=function(){function e(e,t,n,i,a,r,s,o){this._scaleX=n,this._scaleY=i,this._settings=a,this._fontSizeElement=r,this._svgDefsElement=s,this._fontMetricsCache=o,this._nextFilterId=0,this._id=e.id+"-"+t.id,this._defaultStyle=t.style,this.reset(null)}return e.prototype.reset=function(e){void 0!==e&&null!==e||(e=this._defaultStyle),this.italic=e.italic,this.bold=e.bold,this.underline=e.underline,this.strikeThrough=e.strikeThrough,this.outlineWidth=e.outlineThickness,
this.outlineHeight=e.outlineThickness,this.shadowDepthX=e.shadowDepth,this.shadowDepthY=e.shadowDepth,this.fontName=e.fontName,this.fontSize=e.fontSize,this.fontScaleX=e.fontScaleX,this.fontScaleY=e.fontScaleY,this.letterSpacing=e.letterSpacing,this._rotationX=null,this._rotationY=null,this._rotationZ=e.rotationZ,this._skewX=null,this._skewY=null,this.primaryColor=e.primaryColor,this.secondaryColor=e.secondaryColor,this.outlineColor=e.outlineColor,this.shadowColor=e.shadowColor,
this.primaryAlpha=e.primaryColor.alpha,this.secondaryAlpha=e.secondaryColor.alpha,this.outlineAlpha=e.outlineColor.alpha,this.shadowAlpha=e.shadowColor.alpha,this.blur=null,this.gaussianBlur=null},e.prototype.setStylesOnSpan=function(t,i){var a=t.childNodes[0]instanceof Text,r="";this._italic&&(r+="italic "),this._bold===!0?r+="bold ":this._bold!==!1&&(r+=this._bold+" ")
;var s=(this._scaleY*n.fontSizeForLineHeight(this._fontName,this._fontSize*(a?this._fontScaleX:1),this._settings.fallbackFonts,this._fontSizeElement,this._fontMetricsCache)).toFixed(3),o=(this._scaleY*this._fontSize).toFixed(3),l=this._fontName;switch(l){case"cursive":case"fantasy":case"monospace":case"sans-serif":case"serif":break;default:l='"'+l+'"'}""!==this._settings.fallbackFonts&&(l+=", "+this._settings.fallbackFonts),t.style.font=""+r+s+"px/"+o+"px "+l;var u=""
;this._underline&&(u="underline"),this._strikeThrough&&(u+=" line-through"),t.style.textDecoration=u.trim();var c="";if(a?this._fontScaleY!==this._fontScaleX&&(c+="scaleY("+(this._fontScaleY/this._fontScaleX).toFixed(3)+") "):(1!==this._fontScaleX&&(c+="scaleX("+this._fontScaleX+") "),1!==this._fontScaleY&&(c+="scaleY("+this._fontScaleY+") ")),null!==this._rotationY&&(c+="rotateY("+this._rotationY+"deg) "),null!==this._rotationX&&(c+="rotateX("+this._rotationX+"deg) "),
0!==this._rotationZ&&(c+="rotateZ("+-1*this._rotationZ+"deg) "),null!==this._skewX||null!==this._skewY){var d=e._valueOrDefault(this._skewX,0);c+="matrix(1, "+e._valueOrDefault(this._skewY,0)+", "+d+", 1, 0, 0) "}""!==c&&(t.style.webkitTransform=c,t.style.webkitTransformOrigin="50% 50%",t.style.transform=c,t.style.transformOrigin="50% 50%",t.style.display="inline-block"),t.style.letterSpacing=(this._scaleX*this._letterSpacing).toFixed(3)+"px"
;var h=this._scaleX*this._outlineWidth,p=this._scaleY*this._outlineHeight,f=document.createElement("span");f.appendChild(t);var g=this._primaryColor.withAlpha(this._primaryAlpha),m=this._outlineColor.withAlpha(this._outlineAlpha),v=this._shadowColor.withAlpha(this._shadowAlpha);if(this._settings.enableSvg||(0!==h||0!==p)&&m.alpha!==g.alpha||(0!==this._shadowDepthX||0!==this._shadowDepthY)&&v.alpha!==g.alpha||(g=this._primaryColor.withAlpha(1),m=this._outlineColor.withAlpha(1),
v=this._shadowColor.withAlpha(1),t.style.opacity=this._primaryAlpha.toFixed(3)),t.style.color=g.toString(),this._settings.enableSvg?this._setSvgOutlineOnSpan(f,h,p,m,this._primaryAlpha):this._setTextShadowOutlineOnSpan(t,h,p,m),0!==this._shadowDepthX||0!==this._shadowDepthY){var y=v.toString()+" "+(this._shadowDepthX*this._scaleX).toFixed(3)+"px "+(this._shadowDepthY*this._scaleY).toFixed(3)+"px 0px";""===t.style.textShadow?t.style.textShadow=y:t.style.textShadow+=", "+y}
return 0===this._rotationX&&0===this._rotationY||(f.style.display="inline-block"),t.style.webkitAnimation=i.animationStyle,t.style.animation=i.animationStyle,f},e.prototype._setSvgOutlineOnSpan=function(e,t,n,i,a){var r="svg-filter-"+this._id+"-"+this._nextFilterId++,s=document.createElementNS("http://www.w3.org/2000/svg","filter");if(s.id=r,s.x.baseVal.valueAsString="-50%",s.width.baseVal.valueAsString="200%",s.y.baseVal.valueAsString="-50%",s.height.baseVal.valueAsString="200%",t>0||n>0){
var o=0,l=!this._settings.preciseOutlines&&this._gaussianBlur>0?this._gaussianBlur:1;!function(e){if(t<=n)if(t>0){var i;for(i=0;i<=t;i+=l)e(i,n/t*Math.sqrt(t*t-i*i));i!==t+l&&e(t,0)}else e(0,n);else if(n>0){var a;for(a=0;a<=n;a+=l)e(t/n*Math.sqrt(n*n-a*a),a);a!==n+l&&e(0,n)}else e(t,0)}(function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","feMorphology");s.appendChild(n),n.in1.baseVal="source",n.operator.baseVal=SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE,
n.radiusX.baseVal=e,n.radiusY.baseVal=t,n.result.baseVal="outline"+o,o++});var u=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.insertBefore(u,s.firstElementChild),u.in1.baseVal="SourceAlpha",u.result.baseVal="source";var c=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");u.appendChild(c),c.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,c.slope.baseVal=0===a?1:1/a,c.intercept.baseVal=0
;var d=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(d);for(var h=0;h<o;h++){var p=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");d.appendChild(p),p.in1.baseVal="outline"+h}var f=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.appendChild(f),f.setAttribute("color-interpolation-filters","sRGB");var g=document.createElementNS("http://www.w3.org/2000/svg","feFuncR");f.appendChild(g),
g.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,g.slope.baseVal=0,g.intercept.baseVal=i.red/255*i.alpha;var m=document.createElementNS("http://www.w3.org/2000/svg","feFuncG");f.appendChild(m),m.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,m.slope.baseVal=0,m.intercept.baseVal=i.green/255*i.alpha;var v=document.createElementNS("http://www.w3.org/2000/svg","feFuncB");f.appendChild(v),
v.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,v.slope.baseVal=0,v.intercept.baseVal=i.blue/255*i.alpha;var y=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");if(f.appendChild(y),y.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,y.slope.baseVal=i.alpha,y.intercept.baseVal=0,this._gaussianBlur>0){var b=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");s.appendChild(b),
b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var h=0;h<this._blur;h++){var S=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(S),S.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),S.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}var I=document.createElementNS("http://www.w3.org/2000/svg","feComposite");s.appendChild(I),I.in2.baseVal="source",
I.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT;var w=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(w);var M=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");w.appendChild(M);var C=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");w.appendChild(C),C.in1.baseVal="SourceGraphic"}else{if(this._gaussianBlur>0){var b=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");s.appendChild(b),
b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var h=0;h<this._blur;h++){var S=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(S),S.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),S.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}}s.childElementCount>0&&(this._svgDefsElement.appendChild(s),e.style.webkitFilter='url("#'+r+'")',e.style.filter='url("#'+r+'")')},
e.prototype._setTextShadowOutlineOnSpan=function(e,t,n,i){var a=this;if(t>0||n>0){var r="";!function(e){for(var i=0;i<=t;i++)for(var a=0===t?n:n*Math.sqrt(1-i*i/(t*t)),r=0;r<=a;r++)e(i,r),0!==i&&e(-i,r),0!==r&&e(i,-r),0!==i&&0!==r&&e(-i,-r)}(function(e,t){r+=", "+i.toString()+" "+e+"px "+t+"px "+a._gaussianBlur.toFixed(3)+"px"}),e.style.textShadow=r.substr(", ".length)}},e.prototype.makeNewLine=function(){var e=document.createElement("br")
;return e.style.lineHeight=(this._scaleY*this._fontSize).toFixed(3)+"px",e},Object.defineProperty(e.prototype,"italic",{set:function(t){this._italic=e._valueOrDefault(t,this._defaultStyle.italic)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{set:function(t){this._bold=e._valueOrDefault(t,this._defaultStyle.bold)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"underline",{set:function(t){
this._underline=e._valueOrDefault(t,this._defaultStyle.underline)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strikeThrough",{set:function(t){this._strikeThrough=e._valueOrDefault(t,this._defaultStyle.strikeThrough)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineWidth",{get:function(){return this._outlineWidth},set:function(t){this._outlineWidth=e._valueOrDefault(t,this._defaultStyle.outlineThickness)},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"outlineHeight",{get:function(){return this._outlineWidth},set:function(t){this._outlineHeight=e._valueOrDefault(t,this._defaultStyle.outlineThickness)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowDepthX",{get:function(){return this._shadowDepthX},set:function(t){this._shadowDepthX=e._valueOrDefault(t,this._defaultStyle.shadowDepth)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowDepthY",{get:function(){
return this._shadowDepthY},set:function(t){this._shadowDepthY=e._valueOrDefault(t,this._defaultStyle.shadowDepth)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blur},set:function(t){this._blur=e._valueOrDefault(t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gaussianBlur",{get:function(){return this._gaussianBlur},set:function(t){this._gaussianBlur=e._valueOrDefault(t,0)},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"fontName",{set:function(t){this._fontName=e._valueOrDefault(t,this._defaultStyle.fontName)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize=e._valueOrDefault(t,this._defaultStyle.fontSize)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleX",{get:function(){return this._fontScaleX},set:function(t){
this._fontScaleX=e._valueOrDefault(t,this._defaultStyle.fontScaleX)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleY",{get:function(){return this._fontScaleY},set:function(t){this._fontScaleY=e._valueOrDefault(t,this._defaultStyle.fontScaleY)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing=e._valueOrDefault(t,this._defaultStyle.letterSpacing)},
enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationX",{get:function(){return this._rotationX},set:function(e){this._rotationX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationY",{get:function(){return this._rotationY},set:function(e){this._rotationY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationZ",{get:function(){return this._rotationZ},set:function(t){
this._rotationZ=e._valueOrDefault(t,this._defaultStyle.rotationZ)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skewX",{get:function(){return this._skewX},set:function(e){this._skewX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skewY",{get:function(){return this._skewY},set:function(e){this._skewY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryColor",{get:function(){return this._primaryColor},set:function(t){
this._primaryColor=e._valueOrDefault(t,this._defaultStyle.primaryColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryColor",{get:function(){return this._secondaryColor},set:function(t){this._secondaryColor=e._valueOrDefault(t,this._defaultStyle.secondaryColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineColor",{get:function(){return this._outlineColor},set:function(t){
this._outlineColor=e._valueOrDefault(t,this._defaultStyle.outlineColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return this._shadowColor},set:function(t){this._shadowColor=e._valueOrDefault(t,this._defaultStyle.shadowColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryAlpha",{get:function(){return this._primaryAlpha},set:function(t){this._primaryAlpha=e._valueOrDefault(t,this._defaultStyle.primaryColor.alpha)
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryAlpha",{get:function(){return this._secondaryAlpha},set:function(t){this._secondaryAlpha=e._valueOrDefault(t,this._defaultStyle.secondaryColor.alpha)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineAlpha",{get:function(){return this._outlineAlpha},set:function(t){this._outlineAlpha=e._valueOrDefault(t,this._defaultStyle.outlineColor.alpha)},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"shadowAlpha",{get:function(){return this._shadowAlpha},set:function(t){this._shadowAlpha=e._valueOrDefault(t,this._defaultStyle.shadowColor.alpha)},enumerable:!0,configurable:!0}),e._valueOrDefault=function(e,t){return null!==e?e:t},e}();e.SpanStyles=i},function(e){function t(t){e.debugMode=t}function n(t){e.verboseMode=t}e.debugMode=!1,e.verboseMode=!1,e.setDebugMode=t,e.setVerboseMode=n},function(t,n){
var i=n(26),a=n(29),r=n(28),s=n(27),o=n(23),l=n(1),u=n(2),c=n(30),d=n(32),h=function(){function t(){if(this._properties=new r.ScriptProperties,this._styles=new c.Map,this._dialogues=[],this._attachments=[],this._stylesFormatSpecifier=null,this._dialoguesFormatSpecifier=null,1===arguments.length)throw new Error("Constructor `new ASS(rawASS)` has been deprecated. Use `ASS.fromString(rawASS)` instead.");this._styles.set("Default",new a.Style(new c.Map([["Name","Default"]])))}
return Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styles",{get:function(){return this._styles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialogues",{get:function(){return this._dialogues},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attachments",{get:function(){return this._attachments},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"stylesFormatSpecifier",{get:function(){return this._stylesFormatSpecifier},set:function(e){this._stylesFormatSpecifier=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialoguesFormatSpecifier",{get:function(){return this._dialoguesFormatSpecifier},set:function(e){this._dialoguesFormatSpecifier=e},enumerable:!0,configurable:!0}),t.prototype.addStyle=function(e){var t=u.parseLineIntoTypedTemplate(e,this._stylesFormatSpecifier)
;if(null!==t&&"Style"===t.type){var n=t.template;if(o.verboseMode){var i="";n.forEach(function(e,t){return i+=t+" = "+e+", "}),console.log("Read style: "+i)}var r=new a.Style(n);this._styles.set(r.name,r)}},t.prototype.addEvent=function(e){var t=u.parseLineIntoTypedTemplate(e,this._dialoguesFormatSpecifier);if(null!==t&&"Dialogue"===t.type){var n=t.template;if(o.verboseMode){var a="";n.forEach(function(e,t){return a+=t+" = "+e+", "}),console.log("Read dialogue: "+a)}
this.dialogues.push(new i.Dialogue(n,this))}},t.prototype.addAttachment=function(e){this._attachments.push(e)},t.fromString=function(e,n){return void 0===n&&(n=s.Format.ASS),t.fromStream(new l.StringStream(e),n)},t.fromStream=function(e,t){switch(void 0===t&&(t=s.Format.ASS),t){case s.Format.ASS:return new l.StreamParser(e).ass;case s.Format.SRT:return new l.SrtStreamParser(e).ass;default:throw new Error("Illegal value of type: "+t)}},t.fromUrl=function(n,i){void 0===i&&(i=s.Format.ASS);var a
;return a="function"==typeof e.fetch&&"function"==typeof e.ReadableStream&&"function"==typeof e.ReadableStream.prototype.getReader&&"function"==typeof e.TextDecoder?e.fetch(n).then(function(e){if(e.ok===!1||void 0===e.ok&&(e.status<200||e.status>299))throw new Error("HTTP request for "+n+" failed with status code "+e.status);return t.fromReadableStream(e.body,"utf-8",i)}):d.Promise.reject(new Error("Not supported.")),a.catch(function(e){console.warn("fetch() failed, falling back to XHR: %o",e)
;var a=new XMLHttpRequest,r=t.fromStream(new l.XhrStream(a),i);return a.open("GET",n,!0),a.send(),r})},t.fromReadableStream=function(e,n,i){return void 0===n&&(n="utf-8"),void 0===i&&(i=s.Format.ASS),t.fromStream(new l.BrowserReadableStream(e,n),i)},t}();t.ASS=h},function(e){!function(e){e[e.Font=0]="Font",e[e.Graphic=1]="Graphic"}(e.AttachmentType||(e.AttachmentType={}));var t=function(){function e(e,t){this._filename=e,this._type=t,this._contents=""}
return Object.defineProperty(e.prototype,"filename",{get:function(){return this._filename},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contents",{get:function(){return this._contents},set:function(e){this._contents=e},enumerable:!0,configurable:!0}),e}();e.Attachment=t},function(e,t){var n=t(27),i=t(3),a=t(8),r=t(23),s=t(30),o=function(){function e(t,i){
this._parts=null,this._containsTransformTag=!1;var a=new s.Map;t.forEach(function(e,t){a.set(t.toLowerCase(),e)}),t=a,this._id=++e._lastDialogueId;var o=t.get("style");if(void 0!==o&&null!==o&&o.constructor===String&&(o=o.replace(/^\*+/,""),null!==o.match(/^Default$/i)&&(o="Default")),this._style=i.styles.get(o),void 0===this._style&&(r.debugMode&&console.warn("Unrecognized style "+o+'. Falling back to "Default"'),this._style=i.styles.get("Default")),
void 0===this._style)throw new Error("Unrecognized style "+o);if(this._start=e._toTime(t.get("start")),this._end=e._toTime(t.get("end")),this._layer=Math.max(n.valueOrDefault(t,"layer",parseInt,function(e){return!isNaN(e)},"0"),0),this._rawPartsString=t.get("text"),void 0===this._rawPartsString||null===this._rawPartsString||this._rawPartsString.constructor!==String)throw new Error("Dialogue doesn't have any text.")}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},
enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return null===this._parts&&this._parsePartsString(),this._alignment},
enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parts",{get:function(){return null===this._parts&&this._parsePartsString(),this._parts},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"containsTransformTag",{get:function(){return null===this._parts&&this._parsePartsString(),this._containsTransformTag},enumerable:!0,configurable:!0}),
e.prototype.toString=function(){return"#"+this._id+" ["+this._start.toFixed(3)+"-"+this._end.toFixed(3)+"] "+(null!==this._parts?this._parts.join(", "):this._rawPartsString)},e.prototype._parsePartsString=function(){var e=this;if(this._parts=i.parse(this._rawPartsString,"dialogueParts"),this._alignment=this._style.alignment,this._parts.forEach(function(t,n){
t instanceof a.Alignment?e._alignment=t.value:t instanceof a.Move?null!==t.t1&&null!==t.t2||(e._parts[n]=new a.Move(t.x1,t.y1,t.x2,t.y2,0,e._end-e._start)):t instanceof a.Transform&&(null!==t.start&&null!==t.end&&null!==t.accel||(e._parts[n]=new a.Transform(null===t.start?0:t.start,null===t.end?e._end-e._start:t.end,null===t.accel?1:t.accel,t.tags)),e._containsTransformTag=!0)}),r.debugMode){var t=this._parts.filter(function(e){return e instanceof a.Comment&&e.value.indexOf("\\")!==-1})
;t.length>0&&console.warn("Possible incorrect parse:\n"+this._rawPartsString+"\nwas parsed as\n"+this.toString()+"\nThe possibly incorrect parses are:\n"+t.join("\n"))}},e._toTime=function(e){return e.split(":").reduce(function(e,t){return 60*e+parseFloat(t)},0)},e._lastDialogueId=-1,e}();e.Dialogue=o},function(e){function t(e,t,n,i,a){var r=e.get(t);if(void 0===r)return n(a);try{var s=n(r);if(null!==i&&!i(s))throw new Error("Validation failed.");return s}catch(e){
throw new Error("Property "+t+" has invalid value "+r+" - "+e.stack)}}!function(e){e[e.ASS=0]="ASS",e[e.SRT=1]="SRT"}(e.Format||(e.Format={})),function(e){e[e.SmartWrappingWithWiderTopLine=0]="SmartWrappingWithWiderTopLine",e[e.SmartWrappingWithWiderBottomLine=3]="SmartWrappingWithWiderBottomLine",e[e.EndOfLineWrapping=1]="EndOfLineWrapping",e[e.NoLineWrapping=2]="NoLineWrapping"}(e.WrappingStyle||(e.WrappingStyle={})),function(e){e[e.Outline=1]="Outline",e[e.OpaqueBox=3]="OpaqueBox"
}(e.BorderStyle||(e.BorderStyle={})),e.valueOrDefault=t},function(e){var t=function(){function e(){}return Object.defineProperty(e.prototype,"resolutionX",{get:function(){return this._resolutionX},set:function(e){this._resolutionX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resolutionY",{get:function(){return this._resolutionY},set:function(e){this._resolutionY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrappingStyle",{get:function(){
return this._wrappingStyle},set:function(e){this._wrappingStyle=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleBorderAndShadow",{get:function(){return this._scaleBorderAndShadow},set:function(e){this._scaleBorderAndShadow=e},enumerable:!0,configurable:!0}),e}();e.ScriptProperties=t},function(e,t){var n=t(27),i=t(3),a=t(30),r=function(){function e(e){var t=new a.Map;if(e.forEach(function(e,n){t.set(n.toLowerCase(),e)}),e=t,this._name=e.get("name"),
void 0===this._name||null===this._name||this._name.constructor!==String)throw new Error("Style doesn't have a name.");this._name=this._name.replace(/^\*+/,""),this._italic=!!n.valueOrDefault(e,"italic",parseFloat,function(e){return!isNaN(e)},"0"),this._bold=!!n.valueOrDefault(e,"bold",parseFloat,function(e){return!isNaN(e)},"0"),this._underline=!!n.valueOrDefault(e,"underline",parseFloat,function(e){return!isNaN(e)},"0"),
this._strikeThrough=!!n.valueOrDefault(e,"strikeout",parseFloat,function(e){return!isNaN(e)},"0"),this._fontName=n.valueOrDefault(e,"fontname",function(e){return e},function(e){return e.constructor===String},"sans-serif"),this._fontSize=n.valueOrDefault(e,"fontsize",parseFloat,function(e){return!isNaN(e)},"18"),this._fontScaleX=n.valueOrDefault(e,"scalex",parseFloat,function(e){return e>=0},"100")/100,this._fontScaleY=n.valueOrDefault(e,"scaley",parseFloat,function(e){return e>=0},"100")/100,
this._letterSpacing=n.valueOrDefault(e,"spacing",parseFloat,function(e){return e>=0},"0"),this._rotationZ=n.valueOrDefault(e,"angle",parseFloat,function(e){return!isNaN(e)},"0"),this._primaryColor=n.valueOrDefault(e,"primarycolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H00FFFFFF"),this._secondaryColor=n.valueOrDefault(e,"secondarycolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H00FFFF00"),this._outlineColor=n.valueOrDefault(e,"outlinecolour",function(e){
return i.parse(e,"colorWithAlpha")},null,"&H00000000"),this._shadowColor=n.valueOrDefault(e,"backcolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H80000000"),this._outlineThickness=n.valueOrDefault(e,"outline",parseFloat,function(e){return e>=0},"2"),this._borderStyle=n.valueOrDefault(e,"borderstyle",parseInt,function(e){return n.BorderStyle[n.BorderStyle[e]]===e},"1"),this._shadowDepth=n.valueOrDefault(e,"shadow",parseFloat,function(e){return e>=0},"3"),
this._alignment=n.valueOrDefault(e,"alignment",parseInt,function(e){return e>=1&&e<=9},"2"),this._marginLeft=n.valueOrDefault(e,"marginl",parseFloat,function(e){return!isNaN(e)},"20"),this._marginRight=n.valueOrDefault(e,"marginr",parseFloat,function(e){return!isNaN(e)},"20"),this._marginVertical=n.valueOrDefault(e,"marginv",parseFloat,function(e){return!isNaN(e)},"20")}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"italic",{get:function(){return this._italic},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{get:function(){return this._bold},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"underline",{get:function(){return this._underline},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strikeThrough",{get:function(){return this._strikeThrough},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleX",{get:function(){return this._fontScaleX},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleY",{get:function(){return this._fontScaleY},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationZ",{get:function(){return this._rotationZ},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryColor",{get:function(){return this._primaryColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryColor",{get:function(){return this._secondaryColor},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"outlineColor",{get:function(){return this._outlineColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return this._shadowColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineThickness",{get:function(){return this._outlineThickness},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borderStyle",{get:function(){return this._borderStyle},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"shadowDepth",{get:function(){return this._shadowDepth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginLeft",{get:function(){return this._marginLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginRight",{get:function(){return this._marginRight},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"marginVertical",{get:function(){return this._marginVertical},enumerable:!0,configurable:!0}),e}();e.Style=r},function(t){function n(e){t.Map=null!==e?e:i}t.Map=e.Map;var i=function(){function e(e){if(this.clear(),void 0!==e){if(!Array.isArray(e))throw new Error("Non-array iterables are not supported by the SimpleMap constructor.");for(var t=0;t<e.length;t++){var n=e[t];this.set(n[0],n[1])}}}return e.prototype.get=function(e){var t=this._keyToProperty(e)
;if(null!==t)return this._values[t]},e.prototype.has=function(e){var t=this._keyToProperty(e);return null!==t&&t in this._keys},e.prototype.set=function(e,t){var n=this._keyToProperty(e);if(null===n)throw new Error("This Map implementation only supports Number and String keys, or keys with an id property.");return n in this._keys||this._size++,this._keys[n]=e,this._values[n]=t,this},e.prototype.delete=function(e){var t=this._keyToProperty(e);if(null===t)return!1;var n=t in this._keys
;return n&&(delete this._keys[t],delete this._values[t],this._size--),n},e.prototype.clear=function(){this._keys=Object.create(null),this._values=Object.create(null),this._size=0},e.prototype.forEach=function(e,t){for(var n=0,i=Object.keys(this._keys);n<i.length;n++){var a=i[n];e.call(t,this._values[a],this._keys[a],this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype._keyToProperty=function(e){
return"number"==typeof e?"#"+e:"string"==typeof e?"'"+e:void 0!==e.id?"!"+e.id:null},e}();(void 0===t.Map||"function"!=typeof t.Map.prototype.forEach||function(){try{return 2!==new t.Map([[1,"foo"],[2,"bar"]]).size}catch(e){return!0}}())&&(t.Map=i),t.setImplementation=n},function(e){function t(e,t){for(var n=0;n<t.length;n++)for(var i=t[n],a=0,r=Object.getOwnPropertyNames(i.prototype);a<r.length;a++){var s=r[a];e.prototype[s]=i.prototype[s]}}e.mixin=t},function(t){function n(e){
t.Promise=null!==e?e:l}function i(e){return a(e,[])}function a(e,n){if(0===e.length)return t.Promise.reject(n);var i=e[0],r=e.slice(1);return i.catch(function(e){return a(r,n.concat(e))})}function r(e){return new t.Promise(function(n,i){return t.Promise.all(e.map(function(e){return e.then(n,function(e){return e})})).then(i)})}function s(e,t){return e.then(function(e){return t(),e},function(e){throw t(),e})}t.Promise=e.Promise;var o=function(){var t=e.MutationObserver||e.WebkitMutationObserver
;if(void 0!==e.process&&"function"==typeof e.process.nextTick)return function(t){e.process.nextTick(t)};if(void 0!==t){var n=[],i=!1,a=document.createElement("div");return new t(function(){for(var e=n.splice(0,n.length),t=0;t<e.length;t++){(0,e[t])()}i=!1,n.length>0&&(a.classList.toggle("foo"),i=!0)}).observe(a,{attributes:!0}),function(e){n.push(e),i||(a.classList.toggle("foo"),i=!0)}}return function(e){return setTimeout(e,0)}}(),l=function(){function e(e){if(this._state=u.PENDING,
this._fulfillReactions=[],this._rejectReactions=[],this._fulfilledValue=null,this._rejectedReason=null,"function"!=typeof e)throw new TypeError('typeof executor !== "function"');var t=this._createResolvingFunctions(),n=t.resolve,i=t.reject;try{e(n,i)}catch(e){i(e)}}return e.prototype.then=function(e,t){var n=new c;"function"!=typeof e&&(e=function(e){return e}),"function"!=typeof t&&(t=function(e){throw e});var i={capabilities:n,handler:e},a={capabilities:n,handler:t};switch(this._state){
case u.PENDING:this._fulfillReactions.push(i),this._rejectReactions.push(a);break;case u.FULFILLED:this._enqueueFulfilledReactionJob(i,this._fulfilledValue);break;case u.REJECTED:this._enqueueRejectedReactionJob(a,this._rejectedReason)}return n.promise},e.prototype.catch=function(e){return this.then(null,e)},e.resolve=function(n){return n instanceof e?n:new t.Promise(function(e){return e(n)})},e.reject=function(e){return new t.Promise(function(t,n){return n(e)})},e.all=function(e){
return new t.Promise(function(n,i){var a=[],r=e.length;if(0===r)return void n(a);e.forEach(function(e,s){return t.Promise.resolve(e).then(function(e){a[s]=e,0===--r&&n(a)},i)})})},e.race=function(e){return new t.Promise(function(n,i){for(var a=0;a<e.length;a++){var r=e[a];t.Promise.resolve(r).then(n,i)}})},e.prototype._createResolvingFunctions=function(){var e=this,t=!1;return{resolve:function(n){if(!t){if(t=!0,n===e)return void e._reject(new TypeError("resolution === this"))
;if(null===n||"object"!=typeof n&&"function"!=typeof n)return void e._fulfill(n);try{var i=n.then}catch(t){return void e._reject(t)}if("function"!=typeof i)return void e._fulfill(n);o(function(){return e._resolveWithThenable(n,i)})}},reject:function(n){t||(t=!0,e._reject(n))}}},e.prototype._resolveWithThenable=function(e,t){var n=this._createResolvingFunctions(),i=n.resolve,a=n.reject;try{t.call(e,i,a)}catch(e){a(e)}},e.prototype._fulfill=function(e){var t=this._fulfillReactions
;this._fulfilledValue=e,this._fulfillReactions=void 0,this._rejectReactions=void 0,this._state=u.FULFILLED;for(var n=0;n<t.length;n++){var i=t[n];this._enqueueFulfilledReactionJob(i,e)}},e.prototype._reject=function(e){var t=this._rejectReactions;this._rejectedReason=e,this._fulfillReactions=void 0,this._rejectReactions=void 0,this._state=u.REJECTED;for(var n=0;n<t.length;n++){var i=t[n];this._enqueueRejectedReactionJob(i,e)}},e.prototype._enqueueFulfilledReactionJob=function(e,t){o(function(){
var n,i=e.capabilities,a=i.resolve,r=i.reject,s=e.handler;try{n=s(t)}catch(e){return void r(e)}a(n)})},e.prototype._enqueueRejectedReactionJob=function(e,t){o(function(){var n,i=e.capabilities,a=i.resolve,r=i.reject,s=e.handler;try{n=s(t)}catch(e){return void r(e)}a(n)})},e}();void 0===t.Promise&&(t.Promise=l);var u;!function(e){e[e.PENDING=0]="PENDING",e[e.FULFILLED=1]="FULFILLED",e[e.REJECTED=2]="REJECTED"}(u||(u={})),t.setImplementation=n;var c=function(){function e(){var e=this
;this._promise=new t.Promise(function(t,n){Object.defineProperties(e,{resolve:{value:t,enumerable:!0},reject:{value:n,enumerable:!0}})})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!0,configurable:!0}),e}();t.DeferredPromise=c,t.first=i,t.any=r,t.lastly=s},function(t){function n(e){t.Set=null!==e?e:i}t.Set=e.Set;var i=function(){function e(e){if(this.clear(),void 0!==e){
if(!Array.isArray(e))throw new Error("Non-array iterables are not supported by the SimpleSet constructor.");for(var t=0;t<e.length;t++){var n=e[t];this.add(n)}}}return e.prototype.add=function(e){var t=this._toProperty(e);if(null===t)throw new Error("This Set implementation only supports Number and String values.");return t in this._elements||this._size++,this._elements[t]=e,this},e.prototype.clear=function(){this._elements=Object.create(null),this._size=0},e.prototype.has=function(e){
var t=this._toProperty(e);return null!==t&&t in this._elements},e.prototype.forEach=function(e,t){for(var n=0,i=Object.keys(this._elements);n<i.length;n++){var a=i[n],r=this._elements[a];e.call(t,r,r,this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype._toProperty=function(e){return"number"==typeof e?"#"+e:"string"==typeof e?"'"+e:null},e}();(void 0===t.Set||"function"!=typeof t.Set.prototype.forEach||function(){try{
return 2!==new t.Set([1,2]).size}catch(e){return!0}}())&&(t.Set=i),t.setImplementation=n},function(e){function t(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n}function n(e,t,n){if(arguments.length<3)return i(e.reverse(),t);a(e.reverse(),t,n)}function i(e,t){for(var n=0;n<e.length;n++){t=(0,e[n])(t)||t}return t}function a(e,t,n){for(var i=0;i<e.length;i++){(0,e[i])(t,n)}}e.__extends=t,e.__decorate=n},function(e,t){
var n=t(30),i=t(32),a=t(36),r=t(38),s=function(){function e(e){var t=this;this._comm=e,this._pendingRequests=new n.Map,this._comm.addEventListener("message",function(e){return t._onMessage(e.data)},!1)}return e.prototype.request=function(t,n){var a=new i.DeferredPromise,s=++e._lastRequestId;this._pendingRequests.set(s,a);var o={requestId:s,command:t,parameters:n};return this._comm.postMessage(r.serialize(o)),a.promise},e.prototype.cancelRequest=function(e){var t=this._pendingRequests.get(e)
;void 0!==t&&(this._pendingRequests.delete(e),t.reject(new Error("Cancelled.")))},e.prototype._respond=function(e){var t=e.requestId,n=e.error,i=e.result;n instanceof Error&&(n={message:n.message,stack:n.stack}),this._comm.postMessage(r.serialize({command:a.WorkerCommands.Response,requestId:t,error:n,result:i}))},e.prototype._onMessage=function(e){var t=this,n=r.deserialize(e);if(n.command===a.WorkerCommands.Response){var i=n,s=this._pendingRequests.get(i.requestId)
;void 0!==s&&(this._pendingRequests.delete(i.requestId),null===i.error?s.resolve(i.result):s.reject(i.error))}else{var o=n,l=o.requestId,u=r.getWorkerCommandHandler(o.command);if(void 0===u)return void this._respond({requestId:l,error:new Error("No handler registered for command "+o.command),result:null});u(o.parameters).then(function(e){return{requestId:l,error:null,result:e}},function(e){return{requestId:l,error:e,result:null}}).then(function(e){return t._respond(e)})}},e._lastRequestId=-1,e
}();e.WorkerChannelImpl=s,r.registerWorkerCommand(a.WorkerCommands.Ping,function(){return new i.Promise(function(e){return e(null)})})},function(e){!function(e){e[e.Response=0]="Response",e[e.Parse=1]="Parse",e[e.Ping=2]="Ping"}(e.WorkerCommands||(e.WorkerCommands={}))},function(t,n){function i(e){return void 0===e&&(e=s.src),new a.WorkerChannelImpl(new Worker(e))}var a=n(35),r=n(36);t.WorkerCommands=r.WorkerCommands,t.supported="undefined"!=typeof Worker
;var s="undefined"!=typeof document&&void 0!==document.currentScript?document.currentScript:null;t.createWorker=i,"undefined"!=typeof WorkerGlobalScope&&e instanceof WorkerGlobalScope&&new a.WorkerChannelImpl(e)},function(e,t){function n(e,t){l.set(e,t)}function i(e){return l.get(e)}function a(e){e._classTag=u.size,u.set(e._classTag,e)}function r(e){return JSON.stringify(e,function(e,t){return t&&void 0!==t._classTag&&(t._classTag=t._classTag),t})}function s(e){return JSON.parse(e,function(e,t){
if(t&&void 0!==t._classTag){for(var n=Object.create(u.get(t._classTag)),i=0,a=Object.keys(t);i<a.length;i++){var r=a[i];"_classTag"!==r&&(n[r]=t[r])}t=n}return t})}var o=t(30),l=new o.Map,u=new o.Map;e.registerWorkerCommand=n,e.getWorkerCommandHandler=i,e.registerClassPrototype=a,e.serialize=r,e.deserialize=s}])})},function(e,t,n){"use strict";function i(e){return null==e?void 0===e?l:o:u&&u in Object(e)?n.i(r.a)(e):n.i(s.a)(e)}
var a=n(1011),r=n(3100),s=n(3101),o="[object Null]",l="[object Undefined]",u=a.a?a.a.toStringTag:void 0;t.a=i},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(t,n(242))},function(e,t,n){"use strict";var i=n(3102),a=n.i(i.a)(Object.getPrototypeOf,Object);t.a=a},function(e,t,n){"use strict";function i(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0}catch(e){}var i=o.call(e);return t?e[l]=n:delete e[l],i}
var a=n(1011),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,l=a.a?a.a.toStringTag:void 0;t.a=i},function(e,t,n){"use strict";function i(e){return r.call(e)}var a=Object.prototype,r=a.toString;t.a=i},function(e,t,n){"use strict";function i(e,t){return function(n){return e(t(n))}}t.a=i},function(e,t,n){"use strict";var i=n(3098),a="object"==typeof self&&self&&self.Object===Object&&self,r=i.a||a||Function("return this")();t.a=r},function(e,t,n){"use strict";function i(e){
return null!=e&&"object"==typeof e}t.a=i},function(e,t,n){"use strict";function i(e){if(!n.i(s.a)(e)||n.i(a.a)(e)!=o)return!1;var t=n.i(r.a)(e);if(null===t)return!0;var i=d.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&c.call(i)==h}var a=n(3097),r=n(3099),s=n(3104),o="[object Object]",l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,h=c.call(Object);t.a=i},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length
;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(3134),r=n(3135),s=n(3136),o=n(3137),l=n(3138);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i},function(e,t,n){function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}var a=n(3144),r=n(3145),s=n(3146),o=n(3147),l=n(3148);i.prototype.clear=a,i.prototype.delete=r,i.prototype.get=s,i.prototype.has=o,i.prototype.set=l,e.exports=i
},function(e,t,n){var i=n(456),a=n(354),r=i(a,"Map");e.exports=r},function(e,t,n){var i=n(456),a=n(354),r=i(a,"Set");e.exports=r},function(e,t){function n(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var s=e[n];t(s,n,e)&&(r[a++]=s)}return r}e.exports=n},function(e,t,n){function i(e,t){var n=s(e),i=!n&&r(e),c=!n&&!i&&o(e),h=!n&&!i&&!c&&u(e),p=n||i||c||h,f=p?a(e.length,String):[],g=f.length
;for(var m in e)!t&&!d.call(e,m)||p&&("length"==m||c&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||l(m,g))||f.push(m);return f}var a=n(3123),r=n(1023),s=n(240),o=n(3169),l=n(1020),u=n(3170),c=Object.prototype,d=c.hasOwnProperty;e.exports=i},function(e,t){function n(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}e.exports=n},function(e,t,n){function i(e,t,n){var i=e[t];o.call(e,t)&&r(i,n)&&(void 0!==n||t in e)||a(e,t,n)}
var a=n(1014),r=n(458),s=Object.prototype,o=s.hasOwnProperty;e.exports=i},function(e,t){function n(e,t,n,i){for(var a=e.length,r=n+(i?1:-1);i?r--:++r<a;)if(t(e[r],r,e))return r;return-1}e.exports=n},function(e,t,n){function i(e,t,n){return t===t?s(e,t,n):a(e,r,n)}var a=n(3114),r=n(3118),s=n(3163);e.exports=i},function(e,t,n){function i(e,t,n){for(var i=n?s:r,d=e[0].length,h=e.length,p=h,f=Array(h),g=1/0,m=[];p--;){var v=e[p];p&&t&&(v=o(v,l(t))),g=c(v.length,g),
f[p]=!n&&(t||d>=120&&v.length>=120)?new a(p&&v):void 0}v=e[0];var y=-1,b=f[0];e:for(;++y<d&&m.length<g;){var S=v[y],I=t?t(S):S;if(S=n||0!==S?S:0,!(b?u(b,I):i(m,I,n))){for(p=h;--p;){var w=f[p];if(!(w?u(w,I):i(e[p],I,n)))continue e}b&&b.push(I),m.push(S)}}return m}var a=n(641),r=n(643),s=n(644),o=n(645),l=n(646),u=n(647),c=Math.min;e.exports=i},function(e,t,n){function i(e){return r(e)&&a(e)==s}var a=n(454),r=n(356),s="[object Arguments]";e.exports=i},function(e,t){function n(e){return e!==e}
e.exports=n},function(e,t,n){function i(e){return!(!s(e)||r(e))&&(a(e)?p:l).test(o(e))}var a=n(1024),r=n(3142),s=n(355),o=n(3164),l=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,d=u.toString,h=c.hasOwnProperty,p=RegExp("^"+d.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=i},function(e,t,n){function i(e){return s(e)&&r(e.length)&&!!o[a(e)]}var a=n(454),r=n(1025),s=n(356),o={}
;o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,
o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=i},function(e,t,n){function i(e){if(!a(e))return s(e);var t=r(e),n=[];for(var i in e)("constructor"!=i||!t&&l.call(e,i))&&n.push(i);return n}
var a=n(355),r=n(3143),s=n(3154),o=Object.prototype,l=o.hasOwnProperty;e.exports=i},function(e,t,n){var i=n(3166),a=n(1018),r=n(1022),s=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:r;e.exports=s},function(e,t){function n(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}e.exports=n},function(e,t,n){function i(e,t,n){var i=e.length;if(i<2)return i?s(e[0]):[]
;for(var o=-1,l=Array(i);++o<i;)for(var u=e[o],c=-1;++c<i;)c!=o&&(l[o]=a(l[o]||u,e[c],t,n));return s(r(l,1),t,n)}var a=n(1015),r=n(1016),s=n(1017);e.exports=i},function(e,t,n){function i(e){return a(e)?e:[]}var a=n(459);e.exports=i},function(e,t,n){function i(e,t,n,i){var s=!n;n||(n={});for(var o=-1,l=t.length;++o<l;){var u=t[o],c=i?i(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),s?r(n,u,c):a(n,u,c)}return n}var a=n(3113),r=n(1014);e.exports=i},function(e,t,n){
var i=n(354),a=i["__core-js_shared__"];e.exports=a},function(e,t,n){function i(e){return a(function(t,n){var i=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(a--,s):void 0,o&&r(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var l=n[i];l&&e(t,l,i,s)}return t})}var a=n(290),r=n(3140);e.exports=i},function(e,t,n){var i=n(3109),a=n(1026),r=n(1021),s=i&&1/r(new i([,-0]))[1]==1/0?function(e){return new i(e)}:a;e.exports=s},function(e,t,n){
function i(e,t,n,i){return void 0===e||a(e,r[n])&&!s.call(i,n)?t:e}var a=n(458),r=Object.prototype,s=r.hasOwnProperty;e.exports=i},function(e,t,n){var i=n(3157),a=i(Object.getPrototypeOf,Object);e.exports=a},function(e,t,n){function i(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0}catch(e){}var i=o.call(e);return t?e[l]=n:delete e[l],i}var a=n(642),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,l=a?a.toStringTag:void 0;e.exports=i},function(e,t){function n(e,t){return null==e?void 0:e[t]}
e.exports=n},function(e,t,n){function i(){this.__data__=a?a(null):{},this.size=0}var a=n(457);e.exports=i},function(e,t){function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=n},function(e,t,n){function i(e){var t=this.__data__;if(a){var n=t[e];return n===r?void 0:n}return o.call(t,e)?t[e]:void 0}var a=n(457),r="__lodash_hash_undefined__",s=Object.prototype,o=s.hasOwnProperty;e.exports=i},function(e,t,n){function i(e){var t=this.__data__
;return a?void 0!==t[e]:s.call(t,e)}var a=n(457),r=Object.prototype,s=r.hasOwnProperty;e.exports=i},function(e,t,n){function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=a&&void 0===t?r:t,this}var a=n(457),r="__lodash_hash_undefined__";e.exports=i},function(e,t,n){function i(e){return s(e)||r(e)||!!(o&&e&&e[o])}var a=n(642),r=n(1023),s=n(240),o=a?a.isConcatSpreadable:void 0;e.exports=i},function(e,t,n){function i(e,t,n){if(!o(n))return!1;var i=typeof t
;return!!("number"==i?r(n)&&s(t,n.length):"string"==i&&t in n)&&a(n[t],e)}var a=n(458),r=n(648),s=n(1020),o=n(355);e.exports=i},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function i(e){return!!r&&r in e}var a=n(3127),r=function(){var e=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=i},function(e,t){function n(e){var t=e&&e.constructor
;return e===("function"==typeof t&&t.prototype||i)}var i=Object.prototype;e.exports=n},function(e,t){function n(){this.__data__=[],this.size=0}e.exports=n},function(e,t,n){function i(e){var t=this.__data__,n=a(t,e);return!(n<0)&&(n==t.length-1?t.pop():s.call(t,n,1),--this.size,!0)}var a=n(453),r=Array.prototype,s=r.splice;e.exports=i},function(e,t,n){function i(e){var t=this.__data__,n=a(t,e);return n<0?void 0:t[n][1]}var a=n(453);e.exports=i},function(e,t,n){function i(e){
return a(this.__data__,e)>-1}var a=n(453);e.exports=i},function(e,t,n){function i(e,t){var n=this.__data__,i=a(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var a=n(453);e.exports=i},function(e,t,n){function i(){this.size=0,this.__data__={hash:new a,map:new(s||r),string:new a}}var a=n(3106),r=n(3107),s=n(3108);e.exports=i},function(e,t,n){function i(e){var t=a(this,e).delete(e);return this.size-=t?1:0,t}var a=n(455);e.exports=i},function(e,t,n){function i(e){return a(this,e).get(e)}
var a=n(455);e.exports=i},function(e,t,n){function i(e){return a(this,e).has(e)}var a=n(455);e.exports=i},function(e,t,n){function i(e,t){var n=a(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}var a=n(455);e.exports=i},function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},function(e,t,n){(function(e){
var i=n(1019),a="object"==typeof t&&t&&!t.nodeType&&t,r=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=r&&r.exports===a,o=s&&i.process,l=function(){try{return o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=l}).call(t,n(468)(e))},function(e,t){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){function i(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){
for(var i=arguments,s=-1,o=r(i.length-t,0),l=Array(o);++s<o;)l[s]=i[t+s];s=-1;for(var u=Array(t+1);++s<t;)u[s]=i[s];return u[t]=n(l),a(e,this,u)}}var a=n(1013),r=Math.max;e.exports=i},function(e,t){function n(e){return this.__data__.set(e,i),this}var i="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){var i=n(3122),a=n(3162),r=a(i);e.exports=r},function(e,t){function n(e){var t=0,n=0;return function(){var s=r(),o=a-(s-n)
;if(n=s,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,a=16,r=Date.now;e.exports=n},function(e,t){function n(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}e.exports=n},function(e,t){function n(e){if(null!=e){try{return a.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var i=Function.prototype,a=i.toString;e.exports=n},function(e,t,n){var i=n(3126),a=n(3128),r=n(3171),s=a(function(e,t,n,a){i(t,r(t),e,a)});e.exports=s
},function(e,t){function n(e){return function(){return e}}e.exports=n},function(e,t,n){var i=n(1013),a=n(3165),r=n(290),s=n(3130),o=r(function(e){return e.push(void 0,s),i(a,void 0,e)});e.exports=o},function(e,t,n){var i=n(645),a=n(3116),r=n(290),s=n(3125),o=r(function(e){var t=i(e,s);return t.length&&t[0]===e[0]?a(t):[]});e.exports=o},function(e,t,n){(function(e){
var i=n(354),a=n(3173),r="object"==typeof t&&t&&!t.nodeType&&t,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===r,l=o?i.Buffer:void 0,u=l?l.isBuffer:void 0,c=u||a;e.exports=c}).call(t,n(468)(e))},function(e,t,n){var i=n(3120),a=n(646),r=n(3155),s=r&&r.isTypedArray,o=s?a(s):i;e.exports=o},function(e,t,n){function i(e){return s(e)?a(e,!0):r(e)}var a=n(3111),r=n(3121),s=n(648);e.exports=i},function(e,t,n){function i(e,t){
if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var s=e.apply(this,i);return n.cache=r.set(a,s)||r,s};return n.cache=new(i.Cache||a),n}var a=n(1012),r="Expected a function";i.Cache=a,e.exports=i},function(e,t){function n(){return!1}e.exports=n},function(e,t,n){var i=n(1016),a=n(290),r=n(1017),s=n(459),o=a(function(e){return r(i(e,1,s,!0))});e.exports=o},function(e,t,n){
var i=n(3110),a=n(290),r=n(3124),s=n(459),o=a(function(e){return r(i(e,s))});e.exports=o},function(e,t,n){var i;!function(a,r,s){function o(e,t,n){if(e.addEventListener)return void e.addEventListener(t,n,!1);e.attachEvent("on"+t,n)}function l(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return I[e.which]?I[e.which]:w[e.which]?w[e.which]:String.fromCharCode(e.which).toLowerCase()}function u(e,t){
return e.sort().join(",")===t.sort().join(",")}function c(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function d(e){if(e.preventDefault)return void e.preventDefault();e.returnValue=!1}function h(e){if(e.stopPropagation)return void e.stopPropagation();e.cancelBubble=!0}function p(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function f(){if(!S){S={};for(var e in I)e>95&&e<112||I.hasOwnProperty(e)&&(S[I[e]]=e)}
return S}function g(e,t,n){return n||(n=f()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function m(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function v(e,t){var n,i,a,r=[];for(n=m(e),a=0;a<n.length;++a)i=n[a],C[i]&&(i=C[i]),t&&"keypress"!=t&&M[i]&&(i=M[i],r.push("shift")),p(i)&&r.push(i);return t=g(i,r,t),{key:i,modifiers:r,action:t}}function y(e,t){return null!==e&&e!==r&&(e===t||y(e.parentNode,t))}function b(e){function t(e){e=e||{};var t,n=!1
;for(t in S)e[t]?n=!0:S[t]=0;n||(M=!1)}function n(e,t,n,i,a,r){var s,o,l=[],c=n.type;if(!m._callbacks[e])return[];for("keyup"==c&&p(e)&&(t=[e]),s=0;s<m._callbacks[e].length;++s)if(o=m._callbacks[e][s],(i||!o.seq||S[o.seq]==o.level)&&c==o.action&&("keypress"==c&&!n.metaKey&&!n.ctrlKey||u(t,o.modifiers))){var d=!i&&o.combo==a,h=i&&o.seq==i&&o.level==r;(d||h)&&m._callbacks[e].splice(s,1),l.push(o)}return l}function i(e,t,n,i){m.stopCallback(t,t.target||t.srcElement,n,i)||e(t,n)===!1&&(d(t),h(t))}
function a(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=l(e);if(t)return"keyup"==e.type&&I===t?void(I=!1):void m.handleKey(t,c(e),e)}function s(){clearTimeout(y),y=setTimeout(t,1e3)}function f(e,n,a,r){function o(n){i(a,n,e),"keyup"!==r&&(I=l(n)),setTimeout(t,10)}S[e]=0;for(var u=0;u<n.length;++u){var c=u+1===n.length,d=c?o:function(t){return function(){M=t,++S[e],s()}}(r||v(n[u+1]).action);g(n[u],d,r,e,u)}}function g(e,t,i,a,r){m._directMap[e+":"+i]=t,e=e.replace(/\s+/g," ")
;var s,o=e.split(" ");if(o.length>1)return void f(e,o,t,i);s=v(e,i),m._callbacks[s.key]=m._callbacks[s.key]||[],n(s.key,s.modifiers,{type:s.action},a,e,r),m._callbacks[s.key][a?"unshift":"push"]({callback:t,modifiers:s.modifiers,action:s.action,seq:a,level:r,combo:e})}var m=this;if(e=e||r,!(m instanceof b))return new b(e);m.target=e,m._callbacks={},m._directMap={};var y,S={},I=!1,w=!1,M=!1;m._handleKey=function(e,a,r){var s,o=n(e,a,r),l={},u=0,c=!1
;for(s=0;s<o.length;++s)o[s].seq&&(u=Math.max(u,o[s].level));for(s=0;s<o.length;++s)if(o[s].seq){if(o[s].level!=u)continue;c=!0,l[o[s].seq]=1,i(o[s].callback,r,o[s].combo,o[s].seq)}else c||i(o[s].callback,r,o[s].combo);var d="keypress"==r.type&&w;r.type!=M||p(e)||d||t(l),w=c&&"keydown"==r.type},m._bindMultiple=function(e,t,n){for(var i=0;i<e.length;++i)g(e[i],t,n)},o(e,"keypress",a),o(e,"keydown",a),o(e,"keyup",a)}for(var S,I={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",
20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},w={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},M={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},C={option:"alt",command:"meta",return:"enter",
escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},D=1;D<20;++D)I[111+D]="f"+D;for(D=0;D<=9;++D)I[D+96]=D;b.prototype.bind=function(e,t,n){var i=this;return e=e instanceof Array?e:[e],i._bindMultiple.call(i,e,t,n),i},b.prototype.unbind=function(e,t){var n=this;return n.bind.call(n,e,function(){},t)},b.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),n},b.prototype.reset=function(){var e=this
;return e._callbacks={},e._directMap={},e},b.prototype.stopCallback=function(e,t){var n=this;return!((" "+t.className+" ").indexOf(" mousetrap ")>-1)&&(!y(t,n.target)&&("INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable))},b.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},b.init=function(){var e=b(r);for(var t in e)"_"!==t.charAt(0)&&(b[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},b.init(),a.Mousetrap=b,
void 0!==e&&e.exports&&(e.exports=b),void 0!==(i=function(){return b}.call(t,n,t,e))&&(e.exports=i)}(window,document)},function(e,t,n){"use strict";var i=n(126),a=n(39),r=n(3178);e.exports=function(){function e(e,t,n,i,s,o){o!==r&&a(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,
string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=i,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var i=n(1030),a={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};a.parseValues=function(e,t){
for(var n={},a=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),r=0,s=a.length;r<s;++r){var o=a[r],l=o.indexOf("]=")===-1?o.indexOf("="):o.indexOf("]=")+1;if(l===-1)n[i.decode(o)]="",t.strictNullHandling&&(n[i.decode(o)]=null);else{var u=i.decode(o.slice(0,l)),c=i.decode(o.slice(l+1));Object.prototype.hasOwnProperty.call(n,u)?n[u]=[].concat(n[u]).concat(c):n[u]=c}}return n},a.parseObject=function(e,t,n){if(!e.length)return t;var i,r=e.shift();if("[]"===r)i=[],
i=i.concat(a.parseObject(e,t,n));else{i=n.plainObjects?Object.create(null):{};var s="["===r[0]&&"]"===r[r.length-1]?r.slice(1,r.length-1):r,o=parseInt(s,10),l=""+o;!isNaN(o)&&r!==s&&l===s&&o>=0&&n.parseArrays&&o<=n.arrayLimit?(i=[],i[o]=a.parseObject(e,t,n)):i[s]=a.parseObject(e,t,n)}return i},a.parseKeys=function(e,t,n){if(e){n.allowDots&&(e=e.replace(/\.([^\.\[]+)/g,"[$1]"));var i=/^([^\[\]]*)/,r=/(\[[^\[\]]*\])/g,s=i.exec(e),o=[];if(s[1]){
if(!n.plainObjects&&Object.prototype.hasOwnProperty(s[1])&&!n.allowPrototypes)return;o.push(s[1])}for(var l=0;null!==(s=r.exec(e))&&l<n.depth;)++l,(n.plainObjects||!Object.prototype.hasOwnProperty(s[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&o.push(s[1]);return s&&o.push("["+e.slice(s.index)+"]"),a.parseObject(o,t,n)}},e.exports=function(e,t){if(t=t||{},t.delimiter="string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:a.delimiter,t.depth="number"==typeof t.depth?t.depth:a.depth,
t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,t.parseArrays=t.parseArrays!==!1,t.allowDots="boolean"==typeof t.allowDots?t.allowDots:a.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,
t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling,""===e||null===e||void 0===e)return t.plainObjects?Object.create(null):{};for(var n="string"==typeof e?a.parseValues(e,t):e,r=t.plainObjects?Object.create(null):{},s=Object.keys(n),o=0,l=s.length;o<l;++o){var u=s[o],c=a.parseKeys(u,n[u],t);r=i.merge(r,c,t)}return i.compact(r)}},function(e,t,n){var i=n(1030),a={delimiter:"&",arrayPrefixGenerators:{brackets:function(e,t){return e+"[]"},
indices:function(e,t){return e+"["+t+"]"},repeat:function(e,t){return e}},strictNullHandling:!1};a.stringify=function(e,t,n,r,s){if("function"==typeof s)e=s(t,e);else if(i.isBuffer(e))e=e.toString();else if(e instanceof Date)e=e.toISOString();else if(null===e){if(r)return i.encode(t);e=""}if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return[i.encode(t)+"="+i.encode(e)];var o=[];if(void 0===e)return o;for(var l=Array.isArray(s)?s:Object.keys(e),u=0,c=l.length;u<c;++u){var d=l[u]
;o=Array.isArray(e)?o.concat(a.stringify(e[d],n(t,d),n,r,s)):o.concat(a.stringify(e[d],t+"["+d+"]",n,r,s))}return o},e.exports=function(e,t){t=t||{};var n,i,r=void 0===t.delimiter?a.delimiter:t.delimiter,s="boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling;"function"==typeof t.filter?(i=t.filter,e=i("",e)):Array.isArray(t.filter)&&(n=i=t.filter);var o=[];if("object"!=typeof e||null===e)return"";var l
;l=t.arrayFormat in a.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";var u=a.arrayPrefixGenerators[l];n||(n=Object.keys(e));for(var c=0,d=n.length;c<d;++c){var h=n[c];o=o.concat(a.stringify(e[h],h,u,s,i))}return o.join(r)}},function(e,t,n){"use strict";function i(e){this.name="RavenConfigError",this.message=e}i.prototype=new Error,i.prototype.constructor=i,e.exports=i},function(e,t,n){"use strict";(function(t){function i(){return+new Date}function a(){
this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument="undefined"!=typeof document,this._lastCapturedException=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50},this._ignoreOnError=0,this._isRavenInstalled=!1,
this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=window.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=i(),this._wrappedBuiltIns=[];for(var e in this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}
var r=n(3183),s=n(3181),o=n(1032),l=o.isFunction,u=o.isUndefined,c=o.isError,d=o.isEmptyObject,h=o.hasKey,p=o.joinRegExp,f=o.each,g=o.objectMerge,m=o.truncate,v=o.urlencode,y=o.uuid4,b="source protocol user pass host port path".split(" "),S=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;a.prototype={VERSION:"2.2.0",debug:!1,TraceKit:r,config:function(e,t){var n=this;if(this._globalServer)return this._logDebug("error","Error: Raven has already been configured"),this
;if(!e)return this;t&&f(t,function(e,t){"tags"===e||"extra"===e?n._globalContext[e]=t:n._globalOptions[e]=t});var i=this._parseDSN(e),a=i.path.lastIndexOf("/"),s=i.path.substr(1,a);return this._dsn=e,this._globalOptions.ignoreErrors.push(/^Script error\.?$/),this._globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this._globalOptions.ignoreErrors=p(this._globalOptions.ignoreErrors),
this._globalOptions.ignoreUrls=!!this._globalOptions.ignoreUrls.length&&p(this._globalOptions.ignoreUrls),this._globalOptions.whitelistUrls=!!this._globalOptions.whitelistUrls.length&&p(this._globalOptions.whitelistUrls),this._globalOptions.includePaths=p(this._globalOptions.includePaths),this._globalKey=i.user,this._globalSecret=i.pass&&i.pass.substr(1),this._globalProject=i.path.substr(a+1),this._globalServer=this._getGlobalServer(i),
this._globalEndpoint=this._globalServer+"/"+s+"api/"+this._globalProject+"/store/",this._globalOptions.fetchContext&&(r.remoteFetching=!0),this._globalOptions.linesOfContext&&(r.linesOfContext=this._globalOptions.linesOfContext),r.collectWindowErrors=!!this._globalOptions.collectWindowErrors,this},install:function(){var e=this;return this.isSetup()&&!this._isRavenInstalled&&(r.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),this._wrapBuiltIns(),this._drainPlugins(),
this._isRavenInstalled=!0),Error.stackTraceLimit=this._globalOptions.stackTraceLimit,this},context:function(e,t,n){return l(e)&&(n=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,n)},wrap:function(e,t){function n(){for(var n=[],a=arguments.length,r=!e||e&&e.deep!==!1;a--;)n[a]=r?i.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,n)}catch(t){throw i._ignoreNextOnError(),i.captureException(t,e),t}}var i=this;if(u(t)&&!l(e))return e;if(l(e)&&(t=e,e=void 0),!l(t))return t;try{
if(t.__raven__)return t}catch(e){return t}if(t.__raven_wrapper__)return t.__raven_wrapper__;for(var a in t)h(t,a)&&(n[a]=t[a]);return t.__raven_wrapper__=n,n.prototype=t.prototype,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return r.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(e,t){if(!c(e))return this.captureMessage(e,t);this._lastCapturedException=e;try{
var n=r.computeStackTrace(e);this._handleStackInfo(n,t)}catch(t){if(e!==t)throw t}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e))return this._send(g({message:e+""},t)),this},addPlugin:function(e){var t=Array.prototype.slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},
setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(JSON.stringify(this._globalContext))},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){return this._globalOptions.dataCallback=e,this},setShouldSendCallback:function(e){
return this._globalOptions.shouldSendCallback=e,this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=window.RavenConfig
;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(window.document){e=e||{};var t=e.eventId||this.lastEventId();if(!t)throw new s("Missing eventId");var n=e.dsn||this._dsn;if(!n)throw new s("Missing DSN");var i=encodeURIComponent,a="";a+="?eventId="+i(t),a+="&dsn="+i(n);var r=e.user||this._globalContext.user;r&&(r.name&&(a+="&name="+i(r.name)),r.email&&(a+="&email="+i(r.email)));var o=this._getGlobalServer(this._parseDSN(n)),l=document.createElement("script");l.async=!0,
l.src=o+"/api/embed/error-page/"+a,(document.head||document.body).appendChild(l)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var n,i;if(this._hasDocument){t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),document.createEvent?(n=document.createEvent("HTMLEvents"),n.initEvent(e,!0,!0)):(n=document.createEventObject(),n.eventType=e);for(i in t)h(t,i)&&(n[i]=t[i])
;if(document.createEvent)document.dispatchEvent(n);else try{document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(e){}}},_wrapBuiltIns:function(){function e(e,t,n,a){var r=e[t];e[t]=n(r),a||i._wrappedBuiltIns.push([e,t,r])}function n(e){return function(t,n){var a=[].slice.call(arguments),r=a[0];return l(r)&&(a[0]=i.wrap(r)),e.apply?e.apply(this,a):e(a[0],a[1])}}var i=this;e(window,"setTimeout",n),e(window,"setInterval",n),
window.requestAnimationFrame&&e(window,"requestAnimationFrame",function(e){return function(t){return e(i.wrap(t))}}),
"EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".replace(/\w+/g,function(t){var n=window[t]&&window[t].prototype
;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(e(n,"addEventListener",function(e){return function(t,n,a,r){try{n&&n.handleEvent&&(n.handleEvent=i.wrap(n.handleEvent))}catch(e){}return e.call(this,t,i.wrap(n),a,r)}}),e(n,"removeEventListener",function(e){return function(t,n,i,a){return n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n),e.call(this,t,n,i,a)}}))}),"XMLHttpRequest"in window&&e(XMLHttpRequest.prototype,"send",function(t){return function(n){var a=this
;return"onreadystatechange onload onerror onprogress".replace(/\w+/g,function(t){t in a&&"[object Function]"===Object.prototype.toString.call(a[t])&&e(a,t,function(e){return i.wrap(e)},!0)}),t.apply(this,arguments)}});var a=t||window.$;a&&a.fn&&a.fn.ready&&e(a.fn,"ready",function(e){return function(t){return e.call(this,i.wrap(t))}})},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){e=this._wrappedBuiltIns.shift();var t=e[0],n=e[1],i=e[2];t[n]=i}},_drainPlugins:function(){
var e=this;f(this._plugins,function(t,n){var i=n[0],a=n[1];i.apply(e,[e].concat(a))})},_parseDSN:function(e){var t=S.exec(e),n={},i=7;try{for(;i--;)n[b[i]]=t[i]||""}catch(t){throw new s("Invalid DSN: "+e)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new s("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},
_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var n=this,i=[];e.stack&&e.stack.length&&f(e.stack,function(e,t){var a=n._normalizeFrame(t);a&&i.push(a)}),this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,i.slice(0,this._globalOptions.stackTraceLimit),t)},_normalizeFrame:function(e){if(e.url){var t,n={filename:e.url,lineno:e.line,colno:e.column,
function:e.func||"?"},i=this._extractContextFromFrame(e);if(i){var a=["pre_context","context_line","post_context"];for(t=3;t--;)n[a[t]]=i[t]}return n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n}},_extractContextFromFrame:function(e){if(e.context&&this._globalOptions.fetchContext){for(var t=e.context,n=~~(t.length/2),i=t.length,a=!1;i--;)if(t[i].length>300){a=!0
;break}if(a){if(u(e.column))return;return[[],t[n].substr(e.column,50),[]]}return[t.slice(0,n),t[n],t.slice(n+1)]}},_processException:function(e,t,n,i,a,r){var s,o;if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t))&&(t+="",t=m(t,this._globalOptions.maxMessageLength),o=e+": "+t,o=m(o,this._globalOptions.maxMessageLength),a&&a.length?(n=a[0].filename||n,a.reverse(),s={frames:a}):n&&(s={frames:[{filename:n,lineno:i,in_app:!0}]}),
(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){var l=g({exception:{values:[{type:e,value:t,stacktrace:s}]},culprit:n,message:o},r);this._send(l)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message=m(e.message,t),e.exception){var n=e.exception.values[0];n.value=m(n.value,t)}return e},_getHttpData:function(){
if(this._hasDocument&&document.location&&document.location.href){var e={headers:{"User-Agent":navigator.userAgent}};return e.url=document.location.href,document.referrer&&(e.headers.Referer=document.referrer),e}},_send:function(e){var t=this,n=this._globalOptions,a={project:this._globalProject,logger:n.logger,platform:"javascript"},r=this._getHttpData();if(r&&(a.request=r),e=g(a,e),e.tags=g(g({},this._globalContext.tags),e.tags),e.extra=g(g({},this._globalContext.extra),e.extra),
e.extra["session:duration"]=i()-this._startTime,d(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),n.release&&(e.release=n.release),n.serverName&&(e.server_name=n.serverName),l(n.dataCallback)&&(e=n.dataCallback(e)||e),e&&!d(e)&&(!l(n.shouldSendCallback)||n.shouldSendCallback(e))&&(this._lastEventId=e.event_id||(e.event_id=y()),e=this._trimPacket(e),this._logDebug("debug","Raven about to send:",e),this.isSetup())){var s={sentry_version:"7",
sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(s.sentry_secret=this._globalSecret);var o=this._globalEndpoint;(n.transport||this._makeRequest).call(this,{url:o,auth:s,data:e,options:n,onSuccess:function(){t._triggerEvent("success",{data:e,src:o})},onError:function(){t._triggerEvent("failure",{data:e,src:o})}})}},_makeImageRequest:function(e){e.auth.sentry_data=JSON.stringify(e.data);var t=this._newImage(),n=e.url+"?"+v(e.auth),i=e.options.crossOrigin
;(i||""===i)&&(t.crossOrigin=i),t.onload=e.onSuccess,t.onerror=t.onabort=e.onError,t.src=n},_makeXhrRequest:function(e){function t(){200===n.status?e.onSuccess&&e.onSuccess():e.onError&&e.onError()}var n,i=e.url;n=new XMLHttpRequest,"withCredentials"in n?n.onreadystatechange=function(){4===n.readyState&&t()}:(n=new XDomainRequest,i=i.replace(/^https?:/,""),n.onload=t),n.open("POST",i+"?"+v(e.auth)),n.send(JSON.stringify(e.data))},_makeRequest:function(e){
return("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest?this._makeXhrRequest:this._makeImageRequest)(e)},_newImage:function(){return document.createElement("img")},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[e],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=g(this._globalContext[e]||{},t)}},
a.prototype.setUser=a.prototype.setUserContext,a.prototype.setReleaseContext=a.prototype.setRelease,e.exports=a}).call(t,n(5))},function(e,t,n){"use strict";function i(){return"undefined"==typeof document?"":document.location.href}var a=n(1032),r=a.hasKey,s=a.isString,o=a.isUndefined,l={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7,debug:!1},u=[].slice,c="?";l.report=function(){function e(e){o(),g.push(e)}function t(e){for(var t=g.length-1;t>=0;--t)g[t]===e&&g.splice(t,1)}
function n(){c(),g=[]}function a(e,t){var n=null;if(!t||l.collectWindowErrors){for(var i in g)if(r(g,i))try{g[i].apply(null,[e].concat(u.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function s(e,t,n,r,s){var o=null;if(y)l.computeStackTrace.augmentStackTraceWithInitialElement(y,t,n,e),d();else if(s)o=l.computeStackTrace(s),a(o,!0);else{var u={url:t,line:n,column:r};u.func=l.computeStackTrace.guessFunctionName(u.url,u.line),u.context=l.computeStackTrace.gatherContext(u.url,u.line),o={message:e,
url:i(),stack:[u]},a(o,!0)}return!!p&&p.apply(this,arguments)}function o(){f||(p=window.onerror,window.onerror=s,f=!0)}function c(){f&&(window.onerror=p,f=!1,p=void 0)}function d(){var e=y,t=m;m=null,y=null,v=null,a.apply(null,[e,!1].concat(t))}function h(e,t){var n=u.call(arguments,1);if(y){if(v===e)return;d()}var i=l.computeStackTrace(e);if(y=i,v=e,m=n,window.setTimeout(function(){v===e&&d()},i.incomplete?2e3:0),t!==!1)throw e}var p,f,g=[],m=null,v=null,y=null;return h.subscribe=e,
h.unsubscribe=t,h.uninstall=n,h}(),l.computeStackTrace=function(){function e(e){if(!l.remoteFetching)return"";try{var t=function(){try{return new window.XMLHttpRequest}catch(e){return new window.ActiveXObject("Microsoft.XMLHTTP")}}();return t.open("GET",e,!1),t.send(""),t.responseText}catch(e){return""}}function t(t){if(!s(t))return[];if(!r(I,t)){var n="",i="";try{i=document.domain}catch(e){}t.indexOf(i)!==-1&&(n=e(t)),I[t]=n?n.split("\n"):[]}return I[t]}function n(e,n){
var i,a=/function ([^(]*)\(([^)]*)\)/,r=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,s="",l=t(e);if(!l.length)return c;for(var u=0;u<10;++u)if(s=l[n-u]+s,!o(s)){if(i=r.exec(s))return i[1];if(i=a.exec(s))return i[1]}return c}function a(e,n){var i=t(e);if(!i.length)return null;var a=[],r=Math.floor(l.linesOfContext/2),s=r+l.linesOfContext%2,u=Math.max(0,n-r-1),c=Math.min(i.length,n+s-1);n-=1;for(var d=u;d<c;++d)o(i[d])||a.push(i[d]);return a.length>0?a:null}function u(e){
return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function d(e){return u(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function h(e,n){for(var i,a,r=0,s=n.length;r<s;++r)if((i=t(n[r])).length&&(i=i.join("\n"),a=e.exec(i)))return{url:n[r],line:i.substring(0,a.index).split("\n").length,column:a.index-i.lastIndexOf("\n",a.index)-1};return null}function p(e,n,i){var a,r=t(n),s=new RegExp("\\b"+u(e)+"\\b")
;return i-=1,r&&r.length>i&&(a=s.exec(r[i]))?a.index:null}function f(e){if("undefined"!=typeof document){for(var t,n,i,a,r=[window.location.href],s=document.getElementsByTagName("script"),o=""+e,l=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,c=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,p=0;p<s.length;++p){var f=s[p];f.src&&r.push(f.src)}if(i=l.exec(o)){var g=i[1]?"\\s+"+i[1]:"",m=i[2].split(",").join("\\s*,\\s*");t=u(i[3]).replace(/;$/,";?"),
n=new RegExp("function"+g+"\\s*\\(\\s*"+m+"\\s*\\)\\s*{\\s*"+t+"\\s*}")}else n=new RegExp(u(o).replace(/\s+/g,"\\s+"));if(a=h(n,r))return a;if(i=c.exec(o)){var v=i[1];if(t=d(i[2]),n=new RegExp("on"+v+"=[\\'\"]\\s*"+t+"\\s*[\\'\"]","i"),a=h(n,r[0]))return a;if(n=new RegExp(t),a=h(n,r))return a}return null}}function g(e){if(!o(e.stack)&&e.stack){
for(var t,r,s=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,l=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[).*?)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,d=e.stack.split("\n"),h=[],f=/^(.*) is undefined$/.exec(e.message),g=0,m=d.length;g<m;++g){if(t=s.exec(d[g])){var v=t[2]&&t[2].indexOf("native")!==-1;r={url:v?null:t[2],
func:t[1]||c,args:v?[t[2]]:[],line:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}else if(t=u.exec(d[g]))r={url:t[2],func:t[1]||c,args:[],line:+t[3],column:t[4]?+t[4]:null};else{if(!(t=l.exec(d[g])))continue;r={url:t[3],func:t[1]||c,args:t[2]?t[2].split(","):[],line:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}!r.func&&r.line&&(r.func=n(r.url,r.line)),r.line&&(r.context=a(r.url,r.line)),h.push(r)}
return h.length?(h[0].line&&!h[0].column&&f?h[0].column=p(f[1],h[0].url,h[0].line):h[0].column||o(e.columnNumber)||(h[0].column=e.columnNumber+1),{name:e.name,message:e.message,url:i(),stack:h}):null}}function m(e){var t=e.stacktrace;if(!o(e.stacktrace)&&e.stacktrace){for(var r,s=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,l=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,u=t.split("\n"),c=[],d=0;d<u.length;d+=2){var h=null
;if((r=s.exec(u[d]))?h={url:r[2],line:+r[1],column:null,func:r[3],args:[]}:(r=l.exec(u[d]))&&(h={url:r[6],line:+r[1],column:+r[2],func:r[3]||r[4],args:r[5]?r[5].split(","):[]}),h){if(!h.func&&h.line&&(h.func=n(h.url,h.line)),h.line)try{h.context=a(h.url,h.line)}catch(e){}h.context||(h.context=[u[d+1]]),c.push(h)}}return c.length?{name:e.name,message:e.message,url:i(),stack:c}:null}}function v(e){var s=e.message.split("\n");if(s.length<4)return null
;var o,l=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,u=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,c=/^\s*Line (\d+) of function script\s*$/i,p=[],f=document.getElementsByTagName("script"),g=[];for(var m in f)r(f,m)&&!f[m].src&&g.push(f[m]);for(var v=2;v<s.length;v+=2){var y=null;if(o=l.exec(s[v]))y={url:o[2],func:o[3],args:[],line:+o[1],column:null};else if(o=u.exec(s[v])){y={url:o[3],func:o[4],
args:[],line:+o[1],column:null};var b=+o[1],S=g[o[2]-1];if(S){var I=t(y.url);if(I){I=I.join("\n");var w=I.indexOf(S.innerText);w>=0&&(y.line=b+I.substring(0,w).split("\n").length)}}}else if(o=c.exec(s[v])){var M=window.location.href.replace(/#.*$/,""),C=new RegExp(d(s[v+1])),D=h(C,[M]);y={url:M,func:"",args:[],line:D?D.line:o[1],column:null}}if(y){y.func||(y.func=n(y.url,y.line));var P=a(y.url,y.line),T=P?P[Math.floor(P.length/2)]:null
;P&&T.replace(/^\s*/,"")===s[v+1].replace(/^\s*/,"")?y.context=P:y.context=[s[v+1]],p.push(y)}}return p.length?{name:e.name,message:s[0],url:i(),stack:p}:null}function y(e,t,i,r){var s={url:t,line:i};if(s.url&&s.line){e.incomplete=!1,s.func||(s.func=n(s.url,s.line)),s.context||(s.context=a(s.url,s.line));var o=/ '([^']+)' /.exec(r);if(o&&(s.column=p(o[1],s.url,s.line)),e.stack.length>0&&e.stack[0].url===s.url){if(e.stack[0].line===s.line)return!1
;if(!e.stack[0].line&&e.stack[0].func===s.func)return e.stack[0].line=s.line,e.stack[0].context=s.context,!1}return e.stack.unshift(s),e.partial=!0,!0}return e.incomplete=!0,!1}function b(e,t){for(var a,r,s,o=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],d={},h=!1,g=b.caller;g&&!h;g=g.caller)if(g!==S&&g!==l.report){if(r={url:null,func:c,line:null,column:null},g.name?r.func=g.name:(a=o.exec(g.toString()))&&(r.func=a[1]),void 0===r.func)try{
r.func=a.input.substring(0,a.input.indexOf("{"))}catch(e){}if(s=f(g)){r.url=s.url,r.line=s.line,r.func===c&&(r.func=n(r.url,r.line));var m=/ '([^']+)' /.exec(e.message||e.description);m&&(r.column=p(m[1],s.url,s.line))}d[""+g]?h=!0:d[""+g]=!0,u.push(r)}t&&u.splice(0,t);var v={name:e.name,message:e.message,url:i(),stack:u};return y(v,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),v}function S(e,t){var n=null;t=null==t?0:+t;try{if(n=m(e))return n}catch(e){if(l.debug)throw e
}try{if(n=g(e))return n}catch(e){if(l.debug)throw e}try{if(n=v(e))return n}catch(e){if(l.debug)throw e}try{if(n=b(e,t+1))return n}catch(e){if(l.debug)throw e}return{name:e.name,message:e.message,url:i()}}var I={};return S.augmentStackTraceWithInitialElement=y,S.computeStackTraceFromStackProp=g,S.guessFunctionName=n,S.gatherContext=a,S}(),e.exports=l},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){
return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(1),c=i(u),d=n(3299),h=i(d),p=n(3190),f=i(p),g=function(){return!0},m=function(e){return e.trim().length>0},v={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",
suggestionFocused:"react-autosuggest__suggestion--focused",sectionContainer:"react-autosuggest__section-container",sectionTitle:"react-autosuggest__section-title"},y=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFocused":t.itemFocused=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t},b=function(e){function t(e){var n=e.alwaysRenderSuggestions;a(this,t)
;var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return S.call(i),i.state={isFocused:!1,isCollapsed:!n,focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null},i.justPressedUpDown=!1,i}return s(t,e),l(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown)}},{key:"componentWillReceiveProps",value:function(e){(0,
h.default)(e.suggestions,this.props.suggestions)?e.focusFirstSuggestion&&e.suggestions.length>0&&this.justPressedUpDown===!1&&this.focusFirstSuggestion():this.willRenderSuggestions(e)?(e.focusFirstSuggestion&&this.focusFirstSuggestion(),this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions()):this.resetFocusedSuggestion()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown)}},{key:"inputFocused",
value:function(e){this.setState({isFocused:!0,isCollapsed:!e})}},{key:"inputBlurred",value:function(e){this.setState({isFocused:!1,focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null,isCollapsed:!e})}},{key:"inputChanged",value:function(e){this.setState({focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null,isCollapsed:!e})}},{key:"updateFocusedSuggestion",value:function(e,t,n){var i=this.state.valueBeforeUpDown
;null===t?i=null:null===i&&void 0!==n&&(i=n),this.setState({focusedSectionIndex:e,focusedSuggestionIndex:t,valueBeforeUpDown:i})}},{key:"resetFocusedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.state.valueBeforeUpDown;this.setState({focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:e?null:t})}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){
this.setState({focusedSectionIndex:null,focusedSuggestionIndex:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,i=n.suggestions,a=n.multiSection,r=n.getSectionSuggestions;return a?r(i[e])[t]:i[t]}},{key:"getFocusedSuggestion",value:function(){var e=this.state,t=e.focusedSectionIndex,n=e.focusedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,
this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),
new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var i=this.props.inputProps,a=i.value,r=i.onChange;t!==a&&r(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,i=e.shouldRenderSuggestions,a=n.value;return t.length>0&&i(a)}},{key:"render",value:function(){
var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,a=t.renderSuggestionsContainer,r=t.onSuggestionsFetchRequested,s=t.renderSuggestion,l=t.inputProps,u=t.multiSection,d=t.renderSectionTitle,h=t.id,p=t.getSectionSuggestions,m=t.theme,v=t.getSuggestionValue,b=t.alwaysRenderSuggestions,S=this.state,I=S.isFocused,w=S.isCollapsed,M=S.focusedSectionIndex,C=S.focusedSuggestionIndex,D=S.valueBeforeUpDown,P=b?g:this.props.shouldRenderSuggestions,T=l.value,x=l.onFocus,E=l.onKeyDown,A=this.willRenderSuggestions(this.props),k=b||I&&!w&&A,L=k?n:[],_=o({},l,{
onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=P(T);e.inputFocused(n),x&&x(t),n&&r({value:T})}},onBlur:function(t){if(e.justClickedOnSuggestionsContainer)return void e.input.focus();e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested())},onChange:function(t){var n=t.target.value,i=P(n);e.maybeCallOnChange(t,n,"type"),e.inputChanged(i),i?r({value:n}):e.onSuggestionsClearRequested()},onKeyDown:function(t,i){switch(t.key){
case"ArrowDown":case"ArrowUp":if(w)P(T)&&(r({value:T}),e.revealSuggestions());else if(n.length>0){var a=i.newFocusedSectionIndex,s=i.newFocusedItemIndex,o=void 0;o=null===s?null===D?T:D:e.getSuggestionValueByIndex(a,s),e.updateFocusedSuggestion(a,s,T),e.maybeCallOnChange(t,o,"ArrowDown"===t.key?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout(function(){e.justPressedUpDown=!1});break;case"Enter":var l=e.getFocusedSuggestion();if(k&&!b&&e.closeSuggestions(),null!==l){var u=v(l)
;e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:u,suggestionIndex:C,sectionIndex:M,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout(function(){e.justSelectedSuggestion=!1})}break;case"Escape":k&&t.preventDefault();var c=k&&!b;if(null===D){if(!c){e.maybeCallOnChange(t,"","escape"),P("")?r({value:""}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,D,"escape");c?(e.onSuggestionsClearRequested(),
e.closeSuggestions()):e.resetFocusedSuggestion()}E&&E(t)}}),N={query:(D||T).trim()};return c.default.createElement(f.default,{multiSection:u,items:L,renderInputComponent:i,renderItemsContainer:a,renderItem:s,renderItemData:N,renderSectionTitle:d,getSectionItems:p,focusedSectionIndex:M,focusedItemIndex:C,inputProps:_,itemProps:this.itemProps,theme:y(m),id:h,ref:this.storeReferences})}}]),t}(u.Component);b.propTypes={suggestions:u.PropTypes.array.isRequired,
onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function e(t,n){var e=t[n];if(t.alwaysRenderSuggestions===!1&&"function"!=typeof e)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},
onSuggestionSelected:u.PropTypes.func,renderInputComponent:u.PropTypes.func,renderSuggestionsContainer:u.PropTypes.func,getSuggestionValue:u.PropTypes.func.isRequired,renderSuggestion:u.PropTypes.func.isRequired,inputProps:function e(t,n){var e=t[n];if(!e.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!e.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:u.PropTypes.func,
alwaysRenderSuggestions:u.PropTypes.bool,multiSection:u.PropTypes.bool,renderSectionTitle:function e(t,n){var e=t[n];if(t.multiSection===!0&&"function"!=typeof e)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function e(t,n){var e=t[n]
;if(t.multiSection===!0&&"function"!=typeof e)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:u.PropTypes.bool,focusFirstSuggestion:u.PropTypes.bool,theme:u.PropTypes.object,id:u.PropTypes.string},b.defaultProps={shouldRenderSuggestions:m,alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,focusFirstSuggestion:!1,theme:v,id:"1"};var S=function(){
var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeReferences=function(t){if(null!==t){var n=t.input,i=t.itemsContainer;e.input=n,e.suggestionsContainer=i}},this.onSuggestionMouseEnter=function(t,n){
var i=n.sectionIndex,a=n.itemIndex;e.updateFocusedSuggestion(i,a)},this.focusFirstSuggestion=function(){e.updateFocusedSuggestion(e.props.multiSection?0:null,0)},this.onSuggestionMouseDown=function(){e.justSelectedSuggestion=!0},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var i=e.props,a=i.alwaysRenderSuggestions,r=i.onSuggestionSelected,s=i.onSuggestionsFetchRequested;r&&r(t,n),a?s({value:n.suggestionValue
}):e.onSuggestionsClearRequested(),e.resetFocusedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,i=n.alwaysRenderSuggestions,a=n.focusInputOnSuggestionClick,r=e.getSuggestionIndices(e.findSuggestionElement(t.target)),s=r.sectionIndex,o=r.suggestionIndex,l=e.getSuggestion(s,o),u=e.props.getSuggestionValue(l);e.maybeCallOnChange(t,u,"click"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:u,suggestionIndex:o,sectionIndex:s,method:"click"}),i||e.closeSuggestions(),
a===!0?e.input.focus():e.onBlur(),setTimeout(function(){e.justSelectedSuggestion=!1})},this.onBlur=function(){var t=e.props,n=t.inputProps,i=t.shouldRenderSuggestions,a=n.value,r=n.onBlur,s=e.getFocusedSuggestion();e.inputBlurred(i(a)),r&&r(e.blurEvent,{focusedSuggestion:s})},this.resetFocusedSuggestionOnMouseLeave=function(){e.resetFocusedSuggestion(!1)},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,
onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.resetFocusedSuggestionOnMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionMouseDown,onClick:e.onSuggestionClick}}};t.default=b},function(e,t,n){"use strict";e.exports=n(3184).default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){
if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t
;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=n(1),d=i(c),h=n(3297),p=i(h),f=n(3277),g=i(f),m=n(3189),v=i(m),y=n(3188),b=i(y),S=function(){return!0},I={},w=function(e){
return d.default.createElement("input",e)},M=function(e){return d.default.createElement("div",e)},C={container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",itemsContainer:"react-autowhatever__items-container",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFocused:"react-autowhatever__item--focused",sectionContainer:"react-autowhatever__section-container",
sectionTitle:"react-autowhatever__section-title"},D=function(e){function t(e){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.focusedItem=null,n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n.onKeyDown=n.onKeyDown.bind(n),n.storeInputReference=n.storeInputReference.bind(n),n.storeItemsContainerReference=n.storeItemsContainerReference.bind(n),n.onFocusedItemChange=n.onFocusedItemChange.bind(n),n.getItemId=n.getItemId.bind(n),n}return s(t,e),
u(t,[{key:"componentDidMount",value:function(){this.ensureFocusedItemIsVisible()}},{key:"componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureFocusedItemIsVisible()}},{key:"setSectionsItems",value:function(e){
e.multiSection&&(this.sectionsItems=e.items.map(function(t){return e.getSectionItems(t)}),this.sectionsLengths=this.sectionsItems.map(function(e){return e.length}),this.allSectionsAreEmpty=this.sectionsLengths.every(function(e){return 0===e}))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,p.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,g.default)(e.theme)}},{
key:"storeInputReference",value:function(e){null!==e&&(this.input=e)}},{key:"storeItemsContainerReference",value:function(e){null!==e&&(this.itemsContainer=e)}},{key:"onFocusedItemChange",value:function(e){this.focusedItem=e}},{key:"getItemId",value:function(e,t){return null===t?null:"react-autowhatever-"+this.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null
;var t=this.theme,n=this.props,i=n.id,a=n.items,r=n.renderItem,s=n.renderItemData,o=n.shouldRenderSection,l=n.renderSectionTitle,u=n.focusedSectionIndex,c=n.focusedItemIndex,h=n.itemProps;return a.map(function(n,a){if(!o(n))return null;var p="react-autowhatever-"+i+"-",f=p+"section-"+a+"-";return d.default.createElement("div",t(f+"container","sectionContainer"),d.default.createElement(v.default,{section:n,renderSectionTitle:l,theme:t,sectionKeyPrefix:f}),d.default.createElement(b.default,{
items:e.sectionsItems[a],itemProps:h,renderItem:r,renderItemData:s,sectionIndex:a,focusedItemIndex:u===a?c:null,onFocusedItemChange:e.onFocusedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:p,ref:e.storeItemsListReference}))})}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,i=n.id,a=n.renderItem,r=n.renderItemData,s=n.focusedSectionIndex,o=n.focusedItemIndex,l=n.itemProps;return d.default.createElement(b.default,{items:e,
itemProps:l,renderItem:a,renderItemData:r,focusedItemIndex:null===s?o:null,onFocusedItemChange:this.onFocusedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+i+"-"})}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.inputProps,i=t.focusedSectionIndex,a=t.focusedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var r="ArrowDown"===e.key?"next":"prev",s=this.sectionIterator[r]([i,a]),o=l(s,2),u=o[0],c=o[1];n.onKeyDown(e,{newFocusedSectionIndex:u,
newFocusedItemIndex:c});break;default:n.onKeyDown(e,{focusedSectionIndex:i,focusedItemIndex:a})}}},{key:"ensureFocusedItemIsVisible",value:function(){var e=this.focusedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,i=t.scrollTop;n<i?i=n:n+e.offsetHeight>i+t.offsetHeight&&(i=n+e.offsetHeight-t.offsetHeight),i!==t.scrollTop&&(t.scrollTop=i)}}},{key:"render",value:function(){
var e=this.theme,t=this.props,n=t.id,i=t.multiSection,a=t.renderInputComponent,r=t.renderItemsContainer,s=t.focusedSectionIndex,l=t.focusedItemIndex,u=i?this.renderSections():this.renderItems(),c=null!==u,h=this.getItemId(s,l),p=e("react-autowhatever-"+n+"-container","container",c&&"containerOpen"),f="react-autowhatever-"+n,g=a(o({type:"text",value:"",autoComplete:"off",role:"combobox","aria-autocomplete":"list","aria-owns":f,"aria-expanded":c,"aria-haspopup":c,"aria-activedescendant":h
},e("react-autowhatever-"+n+"-input","input"),this.props.inputProps,{onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),m=r(o({id:f},e("react-autowhatever-"+n+"-items-container","itemsContainer"),{ref:this.storeItemsContainerReference,children:u}));return d.default.createElement("div",p,g,m)}}]),t}(c.Component);D.propTypes={id:c.PropTypes.string,multiSection:c.PropTypes.bool,renderInputComponent:c.PropTypes.func,items:c.PropTypes.array.isRequired,
renderItemsContainer:c.PropTypes.func,renderItem:c.PropTypes.func,renderItemData:c.PropTypes.object,shouldRenderSection:c.PropTypes.func,renderSectionTitle:c.PropTypes.func,getSectionItems:c.PropTypes.func,inputComponent:c.PropTypes.func,inputProps:c.PropTypes.object,itemProps:c.PropTypes.oneOfType([c.PropTypes.object,c.PropTypes.func]),focusedSectionIndex:c.PropTypes.number,focusedItemIndex:c.PropTypes.number,theme:c.PropTypes.oneOfType([c.PropTypes.object,c.PropTypes.array])},D.defaultProps={
id:"1",multiSection:!1,renderInputComponent:w,renderItemsContainer:M,shouldRenderSection:S,renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:I,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},inputProps:I,itemProps:I,focusedSectionIndex:null,focusedItemIndex:null,theme:C},t.default=D},function(e,t,n){"use strict";function i(e){
return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
;for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=n(1),d=i(c),h=n(649),p=i(h),f=function(e){function t(){r(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))
;return e.storeItemReference=e.storeItemReference.bind(e),e.onMouseEnter=e.onMouseEnter.bind(e),e.onMouseLeave=e.onMouseLeave.bind(e),e.onMouseDown=e.onMouseDown.bind(e),e.onClick=e.onClick.bind(e),e}return o(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e){return(0,p.default)(e,this.props,["renderItemData"])}},{key:"storeItemReference",value:function(e){null!==e&&(this.item=e)}},{key:"onMouseEnter",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex
;this.props.onMouseEnter(e,{sectionIndex:n,itemIndex:i})}},{key:"onMouseLeave",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex;this.props.onMouseLeave(e,{sectionIndex:n,itemIndex:i})}},{key:"onMouseDown",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex;this.props.onMouseDown(e,{sectionIndex:n,itemIndex:i})}},{key:"onClick",value:function(e){var t=this.props,n=t.sectionIndex,i=t.itemIndex;this.props.onClick(e,{sectionIndex:n,itemIndex:i})}},{key:"render",
value:function(){var e=this.props,t=e.item,n=e.renderItem,i=e.renderItemData,r=a(e,["item","renderItem","renderItemData"]);return delete r.sectionIndex,delete r.itemIndex,"function"==typeof r.onMouseEnter&&(r.onMouseEnter=this.onMouseEnter),"function"==typeof r.onMouseLeave&&(r.onMouseLeave=this.onMouseLeave),"function"==typeof r.onMouseDown&&(r.onMouseDown=this.onMouseDown),"function"==typeof r.onClick&&(r.onClick=this.onClick),d.default.createElement("li",l({role:"option"},r,{
ref:this.storeItemReference}),n(t,i))}}]),t}(c.Component);f.propTypes={sectionIndex:c.PropTypes.number,itemIndex:c.PropTypes.number.isRequired,item:c.PropTypes.any.isRequired,renderItem:c.PropTypes.func.isRequired,renderItemData:c.PropTypes.object.isRequired,onMouseEnter:c.PropTypes.func,onMouseLeave:c.PropTypes.func,onMouseDown:c.PropTypes.func,onClick:c.PropTypes.func},t.default=f},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){
return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(1),c=i(u),d=n(3187),h=i(d),p=n(649),f=i(p),g=function(e){function t(){a(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.storeFocusedItemReference=e.storeFocusedItemReference.bind(e),e}return s(t,e),l(t,[{key:"shouldComponentUpdate",value:function(e){return(0,f.default)(e,this.props,["itemProps"])}},{key:"storeFocusedItemReference",value:function(e){this.props.onFocusedItemChange(null===e?null:e.item)}},{
key:"render",value:function(){var e=this,t=this.props,n=t.items,i=t.itemProps,a=t.renderItem,r=t.renderItemData,s=t.sectionIndex,l=t.focusedItemIndex,u=t.getItemId,d=t.theme,p=t.keyPrefix,f=null===s?p:p+"section-"+s+"-",g="function"==typeof i;return c.default.createElement("ul",o({role:"listbox"},d(f+"items-list","itemsList")),n.map(function(t,n){var p=n===l,m=f+"item-"+n,v=g?i({sectionIndex:s,itemIndex:n}):i,y=o({id:u(s,n)},d(m,"item",p&&"itemFocused"),v)
;return p&&(y.ref=e.storeFocusedItemReference),c.default.createElement(h.default,o({},y,{sectionIndex:s,itemIndex:n,item:t,renderItem:a,renderItemData:r}))}))}}]),t}(u.Component);g.propTypes={items:u.PropTypes.array.isRequired,itemProps:u.PropTypes.oneOfType([u.PropTypes.object,u.PropTypes.func]),renderItem:u.PropTypes.func.isRequired,renderItemData:u.PropTypes.object.isRequired,sectionIndex:u.PropTypes.number,focusedItemIndex:u.PropTypes.number,onFocusedItemChange:u.PropTypes.func.isRequired,
getItemId:u.PropTypes.func.isRequired,theme:u.PropTypes.func.isRequired,keyPrefix:u.PropTypes.string.isRequired},g.defaultProps={sectionIndex:null},t.default=g},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}
function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,
"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),c=n(649),d=i(c),h=function(e){function t(){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e){return(0,d.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,i=e.theme,a=e.sectionKeyPrefix,r=n(t)
;return r?u.default.createElement("div",i(a+"title","sectionTitle"),r):null}}]),t}(l.Component);h.propTypes={section:l.PropTypes.any.isRequired,renderSectionTitle:l.PropTypes.func.isRequired,theme:l.PropTypes.func.isRequired,sectionKeyPrefix:l.PropTypes.string.isRequired},t.default=h},function(e,t,n){"use strict";e.exports=n(3186).default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=n(3174),s=i(r),o=n(1027),l=i(o),u=function(){function e(){a(this,e),this.entered=[]}return e.prototype.enter=function(e){var t=this.entered.length;return this.entered=s.default(this.entered.filter(function(t){return document.documentElement.contains(t)&&(!t.contains||t.contains(e))}),[e]),0===t&&this.entered.length>0},e.prototype.leave=function(e){var t=this.entered.length
;return this.entered=l.default(this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();t.default=u,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0
;var r=n(3167),s=i(r),o=n(3197),l=i(o),u=n(3191),c=i(u),d=n(1033),h=n(3195),p=n(3194),f=n(650),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(f),m=function(){function e(t){a(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},
this.enterLeaveCounter=new c.default,this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),
this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),
this.endDragNativeItem=this.endDragNativeItem.bind(this)}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){
e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),
e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),
e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,n){var i=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete i.sourcePreviewNodes[e],
delete i.sourcePreviewNodeOptions[e]}},e.prototype.connectDragSource=function(e,t,n){var i=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=n;var a=function(t){return i.handleDragStart(t,e)},r=function(t){return i.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",a),t.addEventListener("selectstart",r),function(){delete i.sourceNodes[e],delete i.sourceNodeOptions[e],t.removeEventListener("dragstart",a),t.removeEventListener("selectstart",r),
t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var n=this,i=function(t){return n.handleDragEnter(t,e)},a=function(t){return n.handleDragOver(t,e)},r=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",i),t.addEventListener("dragover",a),t.addEventListener("drop",r),function(){t.removeEventListener("dragenter",i),t.removeEventListener("dragover",a),t.removeEventListener("drop",r)}},e.prototype.getCurrentSourceNodeOptions=function(){
var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return s.default(t||{},{dropEffect:"move"})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return s.default(t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){
return h.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();return Object.keys(g).some(function(t){return g[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=p.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),
d.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(d.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){var e=this.currentDragSourceNode
;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=h.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,
this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!l.default(h.getNodeClientOffset(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},
e.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,n=this.dragStartSourceIds;this.dragStartSourceIds=null;var i=h.getEventClientOffset(e);this.actions.beginDrag(n,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});var a=e.dataTransfer,r=p.matchNativeItemType(a)
;if(this.monitor.isDragging()){if("function"==typeof a.setDragImage){var s=this.monitor.getSourceId(),o=this.sourceNodes[s],l=this.sourcePreviewNodes[s]||o,u=this.getCurrentSourcePreviewNodeOptions(),c=u.anchorX,d=u.anchorY,f={anchorX:c,anchorY:d},g=h.getDragPreviewOffset(o,l,i,f);a.setDragImage(l,g.x,g.y)}try{a.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target)
;this.getCurrentSourcePreviewNodeOptions().captureDraggingState?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})}else if(r)this.beginDragNativeItem(r);else{if(!(a.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){if(this.dragEnterTargetIds=[],
this.enterLeaveCounter.enter(e.target)&&!this.monitor.isDragging()){var t=e.dataTransfer,n=p.matchNativeItemType(t);n&&this.beginDragNativeItem(n)}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t)},e.prototype.handleTopDragEnter=function(e){var t=this,n=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){d.isFirefox()||this.actions.hover(n,{clientOffset:h.getEventClientOffset(e)});n.some(function(e){return t.monitor.canDropOnTarget(e)
})&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]},e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t)},e.prototype.handleTopDragOver=function(e){var t=this,n=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(n,{clientOffset:h.getEventClientOffset(e)}),
n.some(function(e){return t.monitor.canDropOnTarget(e)})?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault(),
this.enterLeaveCounter.leave(e.target)&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t)},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{
clientOffset:h.getEventClientOffset(e)}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},e}();t.default=m,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=function(){function e(t,n){i(this,e);for(var a=t.length,r=[],s=0;s<a;s++)r.push(s);r.sort(function(e,n){return t[e]<t[n]?-1:1});for(var o=[],l=[],u=[],c=void 0,d=void 0,s=0;s<a-1;s++)c=t[s+1]-t[s],d=n[s+1]-n[s],l.push(c),o.push(d),u.push(d/c);for(var h=[u[0]],s=0;s<l.length-1;s++){var p=u[s],f=u[s+1];if(p*f<=0)h.push(0);else{c=l[s];var g=l[s+1],m=c+g;h.push(3*m/((m+g)/p+(m+c)/f))}}
h.push(u[u.length-1]);for(var v=[],y=[],b=void 0,s=0;s<h.length-1;s++){b=u[s];var S=h[s],I=1/l[s],m=S+h[s+1]-b-b;v.push((b-S-m)*I),y.push(m*I*I)}this.xs=t,this.ys=n,this.c1s=h,this.c2s=v,this.c3s=y}return e.prototype.interpolate=function(e){var t=this.xs,n=this.ys,i=this.c1s,a=this.c2s,r=this.c3s,s=t.length-1;if(e===t[s])return n[s];for(var o=0,l=r.length-1,u=void 0;o<=l;){u=Math.floor(.5*(o+l));var c=t[u];if(c<e)o=u+1;else{if(!(c>e))return n[u];l=u-1}}s=Math.max(0,l);var d=e-t[s],h=d*d
;return n[s]+i[s]*d+a[s]*h+r[s]*d*h},e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){var i=t.reduce(function(t,n){return t||e.getData(n)},null);return null!=i?i:n}function s(e){var t=d[e],n=t.exposeProperty,r=t.matchesTypes,s=t.getData
;return function(){function e(){i(this,e),this.item=Object.defineProperties({},a({},n,{get:function(){return console.warn("Browser doesn't allow reading \""+n+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[n],this.item[n]=s(e,r)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},
e.prototype.endDrag=function(){},e}()}function o(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(d).filter(function(e){return d[e].matchesTypes.some(function(e){return t.indexOf(e)>-1})})[0]||null}t.__esModule=!0;var l;t.createNativeDragSource=s,t.matchNativeItemType=o;var u=n(650),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),d=(l={},a(l,c.FILE,{
exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),a(l,c.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return r(e,t,"").split("\n")}}),a(l,c.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return r(e,t,"")}}),l)},function(e,t,n){"use strict";function i(e){var t=e.nodeType===u?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),i=n.top;return{
x:n.left,y:i}}function a(e){return{x:e.clientX,y:e.clientY}}function r(e,t,n,a){var r="IMG"===t.nodeName&&(s.isFirefox()||!document.documentElement.contains(t)),o=r?e:t,u=i(o),c={x:n.x-u.x,y:n.y-u.y},d=e.offsetWidth,h=e.offsetHeight,p=a.anchorX,f=a.anchorY,g=r?t.width:d,m=r?t.height:h;s.isSafari()&&r?(m/=window.devicePixelRatio,g/=window.devicePixelRatio):s.isFirefox()&&!r&&(m*=window.devicePixelRatio,g*=window.devicePixelRatio)
;var v=new l.default([0,.5,1],[c.x,c.x/d*g,c.x+g-d]),y=new l.default([0,.5,1],[c.y,c.y/h*m,c.y+m-h]),b=v.interpolate(p),S=y.interpolate(f);return s.isSafari()&&r&&(S+=(window.devicePixelRatio-1)*m),{x:b,y:S}}t.__esModule=!0,t.getNodeClientOffset=i,t.getEventClientOffset=a,t.getDragPreviewOffset=r;var s=n(1033),o=n(3193),l=function(e){return e&&e.__esModule?e:{default:e}}(o),u=1},function(e,t,n){"use strict";function i(){return a||(a=new Image,
a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),a}t.__esModule=!0,t.default=i;var a=void 0;e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,r=0;r<n.length;r++){if(!a.call(t,n[r])||e[n[r]]!==t[n[r]])return!1;if(e[n[r]]!==t[n[r]])return!1}return!0}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){
"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){
m.default.apply(void 0,["DragDropContext","backend"].concat(l.call(arguments)));var t=void 0;t="object"==typeof e&&"function"==typeof e.default?e.default:e,f.default("function"==typeof t,"Expected the backend to be a function or an ES6 module exporting a default function. Read more: http://gaearon.github.io/react-dnd/docs-drag-drop-context.html");var n={dragDropManager:new h.DragDropManager(t)};return function(e){var t=e.displayName||e.name||"Component";return function(i){function s(){a(this,s),
i.apply(this,arguments)}return r(s,i),s.prototype.getDecoratedComponentInstance=function(){return this.refs.child},s.prototype.getManager=function(){return n.dragDropManager},s.prototype.getChildContext=function(){return n},s.prototype.render=function(){return d.default.createElement(e,o({},this.props,{ref:"child"}))},u(s,null,[{key:"DecoratedComponent",value:e,enumerable:!0},{key:"displayName",value:"DragDropContext("+t+")",enumerable:!0},{key:"childContextTypes",value:{
dragDropManager:c.PropTypes.object.isRequired},enumerable:!0}]),s}(c.Component)}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=Array.prototype.slice,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){
return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=s;var c=n(1),d=i(c),h=n(2512),p=n(105),f=i(p),g=n(461),m=i(g);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{
constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return I.default.apply(void 0,["DragLayer","collect[, options]"].concat(l.call(arguments))),
b.default("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-layer.html",e),b.default(v.default(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-layer.html',t),function(n){
var i=t.arePropsEqual,s=void 0===i?g.default:i,l=n.displayName||n.name||"Component";return function(t){function i(e,n){a(this,i),t.call(this,e),this.handleChange=this.handleChange.bind(this),this.manager=n.dragDropManager,
b.default("object"==typeof this.manager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",l,l),this.state=this.getCurrentState()}return r(i,t),i.prototype.getDecoratedComponentInstance=function(){return this.refs.child},i.prototype.shouldComponentUpdate=function(e,t){
return!s(e,this.props)||!p.default(t,this.state)},u(i,null,[{key:"DecoratedComponent",value:n,enumerable:!0},{key:"displayName",value:"DragLayer("+l+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:c.PropTypes.object.isRequired},enumerable:!0}]),i.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),
this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),this.handleChange()},i.prototype.componentWillUnmount=function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()},i.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();p.default(e,this.state)||this.setState(e)}},i.prototype.getCurrentState=function(){var t=this.manager.getMonitor();return e(t)},i.prototype.render=function(){
return d.default.createElement(n,o({},this.props,this.state,{ref:"child"}))},i}(c.Component)}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=Array.prototype.slice,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}
return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=s;var c=n(1),d=i(c),h=n(652),p=i(h),f=n(1038),g=i(f),m=n(175),v=i(m),y=n(105),b=i(y),S=n(461),I=i(S);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];d.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(r.call(arguments)));var a=e
;"function"!=typeof e&&(o.default(M.default(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',e),a=function(){return e}),
o.default(u.default(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',t);var s=v.default(t);return o.default("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',n),
o.default(u.default(i),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',n),function(e){return p.default({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:s,registerHandler:g.default,createMonitor:b.default,createConnector:I.default,DecoratedComponent:e,getType:a,collect:n,options:i})}}
t.__esModule=!0;var r=Array.prototype.slice;t.default=a;var s=n(105),o=i(s),l=n(175),u=i(l),c=n(461),d=i(c),h=n(1036),p=i(h),f=n(3208),g=i(f),m=n(3203),v=i(m),y=n(3204),b=i(y),S=n(3202),I=i(S),w=n(1037),M=i(w);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];d.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(r.call(arguments)));var a=e
;"function"!=typeof e&&(o.default(M.default(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',e),a=function(){return e}),
o.default(u.default(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',t);var s=v.default(t);return o.default("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',n),
o.default(u.default(i),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',n),function(e){return p.default({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:s,registerHandler:g.default,createMonitor:b.default,createConnector:I.default,DecoratedComponent:e,getType:a,collect:n,options:i})}}
t.__esModule=!0;var r=Array.prototype.slice;t.default=a;var s=n(105),o=i(s),l=n(175),u=i(l),c=n(461),d=i(c),h=n(1036),p=i(h),f=n(3209),g=i(f),m=n(3206),v=i(m),y=n(3207),b=i(y),S=n(3205),I=i(S),w=n(1037),M=i(w);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){function t(){u&&(u(),u=null),a&&r&&(u=e.connectDragSource(a,r,o))}function n(){h&&(h(),h=null),a&&c&&(h=e.connectDragPreview(a,c,d))}function i(e){e!==a&&(a=e,t(),n())}
var a=void 0,r=void 0,o=void 0,u=void 0,c=void 0,d=void 0,h=void 0;return{receiveHandlerId:i,hooks:s.default({dragSource:function(e,n){e===r&&l.default(n,o)||(r=e,o=n,t())},dragPreview:function(e,t){e===c&&l.default(t,d)||(c=e,d=t,n())}})}}t.__esModule=!0,t.default=a;var r=n(1039),s=i(r),o=n(1035),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")
}function r(e){Object.keys(e).forEach(function(t){o.default(u.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',u.join(", "),t),
o.default("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),c.forEach(function(t){o.default("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){
function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrag=function(){return!e.canDrag||e.canDrag(this.props,this.monitor)},t.prototype.isDragging=function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()},t.prototype.beginDrag=function(){var t=e.beginDrag(this.props,this.monitor,this.component);return t},
t.prototype.endDrag=function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)},t}();return function(e){return new t(e)}}t.__esModule=!0,t.default=r;var s=n(105),o=i(s),l=n(175),u=(i(l),["canDrag","beginDrag","canDrag","isDragging","endDrag"]),c=["beginDrag"];e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return new u(e)}t.__esModule=!0,t.default=a
;var r=n(105),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=!1,l=!1,u=function(){function e(t){i(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.sourceId=e},e.prototype.canDrag=function(){s.default(!o,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return o=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{o=!1}},
e.prototype.isDragging=function(){s.default(!l,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{l=!1}},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){
return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){
return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){function t(){o&&(o(),o=null),i&&a&&(o=e.connectDropTarget(i,a,r))}function n(e){e!==i&&(i=e,t())}var i=void 0,a=void 0,r=void 0,o=void 0;return{receiveHandlerId:n,hooks:s.default({dropTarget:function(e,n){
e===a&&l.default(n,r)||(a=e,r=n,t())}})}}t.__esModule=!0,t.default=a;var r=n(1039),s=i(r),o=n(1035),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){Object.keys(e).forEach(function(t){
o.default(u.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',u.join(", "),t),o.default("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t,t,e[t])});var t=function(){
function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveMonitor=function(e){this.monitor=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrop=function(){return!e.canDrop||e.canDrop(this.props,this.monitor)},t.prototype.hover=function(){e.hover&&e.hover(this.props,this.monitor,this.component)},t.prototype.drop=function(){if(e.drop){
var t=e.drop(this.props,this.monitor,this.component);return t}},t}();return function(e){return new t(e)}}t.__esModule=!0,t.default=r;var s=n(105),o=i(s),l=n(175),u=(i(l),["canDrop","hover","drop"]);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return new l(e)}t.__esModule=!0,t.default=a;var r=n(105),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=!1,l=function(){function e(t){
i(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.targetId=e},e.prototype.canDrop=function(){s.default(!o,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drop-target-monitor.html");try{return o=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{o=!1}},e.prototype.isOver=function(e){return this.internalMonitor.isOverTarget(this.targetId,e)},
e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){
return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){function i(){a.removeSource(r)}
var a=n.getRegistry(),r=a.addSource(e,t);return{handlerId:r,unregister:i}}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){function i(){a.removeTarget(r)}var a=n.getRegistry(),r=a.addTarget(e,t);return{handlerId:r,unregister:i}}t.__esModule=!0,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=e.ref
;return r.default("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?s.cloneElement(e,{ref:function(e){t(e),n&&n(e)}}):s.cloneElement(e,{ref:t})}t.__esModule=!0,t.default=i;var a=n(105),r=function(e){return e&&e.__esModule?e:{default:e}}(a),s=n(1);e.exports=t.default
},,,,function(e,t,n){"use strict";var i={topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,
topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,
topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null},a={topLevelTypes:i};e.exports=a},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){
if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(1),o=(n.n(s),n(1070));n(668)
;n.d(t,"a",function(){return l});var l=function(e){function t(n,r){i(this,t);var s=a(this,e.call(this,n,r));return s.store=n.store,s}return r(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){return s.Children.only(this.props.children)},t}(s.Component);l.propTypes={store:o.a.isRequired,children:s.PropTypes.element.isRequired},l.childContextTypes={store:o.a.isRequired},l.displayName="Provider"},function(e,t,n){"use strict";function i(e,t){var n={}
;for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function a(e,t,n){for(var i=t.length-1;i>=0;i--){var a=t[i](e);if(a)return a}return function(t,i){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function r(e,t){return e===t}var s=n(1068),o=n(3276),l=n(3270),u=n(3271),c=n(3272),d=n(3273),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
;for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?s.a:t,p=e.mapStateToPropsFactories,f=void 0===p?u.a:p,g=e.mapDispatchToPropsFactories,m=void 0===g?l.a:g,v=e.mergePropsFactories,y=void 0===v?c.a:v,b=e.selectorFactory,S=void 0===b?d.a:b;return function(e,t,s){
var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=l.pure,c=void 0===u||u,d=l.areStatesEqual,p=void 0===d?r:d,g=l.areOwnPropsEqual,v=void 0===g?o.a:g,b=l.areStatePropsEqual,I=void 0===b?o.a:b,w=l.areMergedPropsEqual,M=void 0===w?o.a:w,C=i(l,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),D=a(e,f,"mapStateToProps"),P=a(t,m,"mapDispatchToProps"),T=a(s,y,"mergeProps");return n(S,h({methodName:"connect",getDisplayName:function(e){
return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:D,initMapDispatchToProps:P,initMergeProps:T,pure:c,areStatesEqual:p,areOwnPropsEqual:v,areStatePropsEqual:I,areMergedPropsEqual:M},C))}}()},function(e,t,n){"use strict";function i(e){return"function"==typeof e?n.i(o.a)(e,"mapDispatchToProps"):void 0}function a(e){return e?void 0:n.i(o.b)(function(e){return{dispatch:e}})}function r(e){return e&&"object"==typeof e?n.i(o.b)(function(t){
return n.i(s.bindActionCreators)(e,t)}):void 0}var s=n(671),o=(n.n(s),n(1069));t.a=[i,a,r]},function(e,t,n){"use strict";function i(e){return"function"==typeof e?n.i(r.a)(e,"mapStateToProps"):void 0}function a(e){return e?void 0:n.i(r.b)(function(){return{}})}var r=n(1069);t.a=[i,a]},function(e,t,n){"use strict";function i(e,t,n){return o({},n,e,t)}function a(e){return function(t,n){var i=(n.displayName,n.pure),a=n.areMergedPropsEqual,r=!1,s=void 0;return function(t,n,o){var l=e(t,n,o)
;return r?i&&a(l,s)||(s=l):(r=!0,s=l),s}}}function r(e){return"function"==typeof e?a(e):void 0}function s(e){return e?void 0:function(){return i}}var o=(n(1071),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e});t.a=[r,s]},function(e,t,n){"use strict";function i(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}
function a(e,t,n,i){return function(a,r){return n(e(a,r),t(i,r),r)}}function r(e,t,n,i,a){function r(a,r){return f=a,g=r,m=e(f,g),v=t(i,g),y=n(m,v,g),p=!0,y}function s(){return m=e(f,g),t.dependsOnOwnProps&&(v=t(i,g)),y=n(m,v,g)}function o(){return e.dependsOnOwnProps&&(m=e(f,g)),t.dependsOnOwnProps&&(v=t(i,g)),y=n(m,v,g)}function l(){var t=e(f,g),i=!h(t,m);return m=t,i&&(y=n(m,v,g)),y}function u(e,t){var n=!d(t,g),i=!c(e,f);return f=e,g=t,n&&i?s():n?o():i?l():y}
var c=a.areStatesEqual,d=a.areOwnPropsEqual,h=a.areStatePropsEqual,p=!1,f=void 0,g=void 0,m=void 0,v=void 0,y=void 0;return function(e,t){return p?u(e,t):r(e,t)}}function s(e,t){var n=t.initMapStateToProps,s=t.initMapDispatchToProps,o=t.initMergeProps,l=i(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),u=n(e,l),c=s(e,l),d=o(e,l);return(l.pure?r:a)(u,c,d,e,l)}n(3274);t.a=s},function(e,t,n){"use strict";n(668)},function(e,t,n){"use strict";function i(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(){var e=[],t=[];return{clear:function(){t=r,e=r},notify:function(){for(var n=e=t,i=0;i<n.length;i++)n[i]()},subscribe:function(n){var i=!0;return t===e&&(t=e.slice()),t.push(n),function(){i&&e!==r&&(i=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}}n.d(t,"a",function(){return o});var r=null,s={notify:function(){}},o=function(){function e(t,n){i(this,e),this.store=t,this.parentSub=n,
this.unsubscribe=null,this.listeners=s}return e.prototype.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},e.prototype.notifyNestedSubs=function(){this.listeners.notify()},e.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},e.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=a())},
e.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}()},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=0,i=0;for(var r in e){if(a.call(e,r)&&e[r]!==t[r])return!1;n++}for(var s in t)a.call(t,s)&&i++;return n===i}t.a=i;var a=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}
return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}
}(),r=n(3278),s=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=a(t,2),r=n[0],l=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];var u=n.map(function(e){return r[e]}).filter(o);return"string"==typeof u[0]||"function"==typeof l?{key:e,className:l?l.apply(void 0,i(u)):u.join(" ")}:{key:e,style:s.default.apply(void 0,[{}].concat(i(u)))}}},
e.exports=t.default},function(e,t,n){"use strict";function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function a(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter(function(t){return r.call(e,t)})}var r=Object.prototype.propertyIsEnumerable;e.exports=Object.assign||function(e,t){for(var n,r,s=i(e),o=1;o<arguments.length;o++){n=arguments[o],
r=a(Object(n));for(var l=0;l<r.length;l++)s[r[l]]=n[r[l]]}return s}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e
},l=n(1),u=i(l),c=n(460),d=i(c),h=n(3281),p=i(h),f=n(3280),g=i(f),m=n(1072),v={transitionName:m.nameShape.isRequired,transitionAppear:d.default.bool,transitionEnter:d.default.bool,transitionLeave:d.default.bool,transitionAppearTimeout:(0,m.transitionTimeout)("Appear"),transitionEnterTimeout:(0,m.transitionTimeout)("Enter"),transitionLeaveTimeout:(0,m.transitionTimeout)("Leave")},y={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},b=function(e){function t(){var n,i,s;a(this,t)
;for(var o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=i=r(this,e.call.apply(e,[this].concat(l))),i._wrapChild=function(e){return u.default.createElement(g.default,{name:i.props.transitionName,appear:i.props.transitionAppear,enter:i.props.transitionEnter,leave:i.props.transitionLeave,appearTimeout:i.props.transitionAppearTimeout,enterTimeout:i.props.transitionEnterTimeout,leaveTimeout:i.props.transitionLeaveTimeout},e)},s=n,r(i,s)}return s(t,e),
t.prototype.render=function(){return u.default.createElement(p.default,o({},this.props,{childFactory:this._wrapChild}))},t}(u.default.Component);b.displayName="CSSTransitionGroup",b.propTypes=v,b.defaultProps=y,t.default=b,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){
if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){
return w.length?w.forEach(function(n){return e.addEventListener(n,t,!1)}):setTimeout(t,0),function(){w.length&&w.forEach(function(n){return e.removeEventListener(n,t,!1)})}}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},u=n(2519),c=i(u),d=n(2521),h=i(d),p=n(2523),f=i(p),g=n(2522),m=n(1),v=i(m),y=n(460),b=i(y),S=n(48),I=n(1072),w=[]
;g.transitionEnd&&w.push(g.transitionEnd),g.animationEnd&&w.push(g.animationEnd);var M={children:b.default.node,name:I.nameShape.isRequired,appear:b.default.bool,enter:b.default.bool,leave:b.default.bool,appearTimeout:b.default.number,enterTimeout:b.default.number,leaveTimeout:b.default.number},C=function(e){function t(){var n,i,s;a(this,t);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return n=i=r(this,e.call.apply(e,[this].concat(l))),i.componentWillAppear=function(e){
i.props.appear?i.transition("appear",e,i.props.appearTimeout):e()},i.componentWillEnter=function(e){i.props.enter?i.transition("enter",e,i.props.enterTimeout):e()},i.componentWillLeave=function(e){i.props.leave?i.transition("leave",e,i.props.leaveTimeout):e()},s=n,r(i,s)}return s(t,e),t.prototype.componentWillMount=function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.timeout&&clearTimeout(this.timeout),
this.transitionTimeouts.forEach(function(e){clearTimeout(e)}),this.classNameAndNodeQueue.length=0},t.prototype.transition=function(e,t,n){var i=(0,S.findDOMNode)(this);if(!i)return void(t&&t());var a=this.props.name[e]||this.props.name+"-"+e,r=this.props.name[e+"Active"]||a+"-active",s=null,l=void 0;(0,c.default)(i,a),this.queueClassAndNode(r,i);var u=function(e){e&&e.target!==i||(clearTimeout(s),l&&l(),(0,h.default)(i,a),(0,h.default)(i,r),l&&l(),t&&t())};n?(s=setTimeout(u,n),
this.transitionTimeouts.push(s)):g.transitionEnd&&(l=o(i,u))},t.prototype.queueClassAndNode=function(e,t){var n=this;this.classNameAndNodeQueue.push({className:e,node:t}),this.rafHandle||(this.rafHandle=(0,f.default)(function(){return n.flushClassNameAndNodeQueue()}))},t.prototype.flushClassNameAndNodeQueue=function(){this.unmounted||this.classNameAndNodeQueue.forEach(function(e){e.node.scrollTop,(0,c.default)(e.node,e.className)}),this.classNameAndNodeQueue.length=0,this.rafHandle=null},
t.prototype.render=function(){var e=l({},this.props);return delete e.name,delete e.appear,delete e.enter,delete e.leave,delete e.appearTimeout,delete e.enterTimeout,delete e.leaveTimeout,delete e.children,v.default.cloneElement(v.default.Children.only(this.props.children),e)},t}(v.default.Component);C.displayName="CSSTransitionGroupChild",C.propTypes=M,t.default=C,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=n(2429),u=i(l),c=n(1),d=i(c),h=n(460),p=i(h),f=n(3344),g=(i(f),n(3282)),m={component:p.default.any,childFactory:p.default.func,children:p.default.node},v={component:"span",childFactory:function(e){return e}},y=function(e){function t(n,i){
a(this,t);var s=r(this,e.call(this,n,i));return s.performAppear=function(e){s.currentlyTransitioningKeys[e]=!0;var t=s.childRefs[e];t.componentWillAppear?t.componentWillAppear(s._handleDoneAppearing.bind(s,e)):s._handleDoneAppearing(e)},s._handleDoneAppearing=function(e){var t=s.childRefs[e];t&&t.componentDidAppear&&t.componentDidAppear(),delete s.currentlyTransitioningKeys[e];var n=(0,g.getChildMapping)(s.props.children);n&&n.hasOwnProperty(e)||s.performLeave(e)},s.performEnter=function(e){
s.currentlyTransitioningKeys[e]=!0;var t=s.childRefs[e];t.componentWillEnter?t.componentWillEnter(s._handleDoneEntering.bind(s,e)):s._handleDoneEntering(e)},s._handleDoneEntering=function(e){var t=s.childRefs[e];t&&t.componentDidEnter&&t.componentDidEnter(),delete s.currentlyTransitioningKeys[e];var n=(0,g.getChildMapping)(s.props.children);n&&n.hasOwnProperty(e)||s.performLeave(e)},s.performLeave=function(e){s.currentlyTransitioningKeys[e]=!0;var t=s.childRefs[e]
;t.componentWillLeave?t.componentWillLeave(s._handleDoneLeaving.bind(s,e)):s._handleDoneLeaving(e)},s._handleDoneLeaving=function(e){var t=s.childRefs[e];t&&t.componentDidLeave&&t.componentDidLeave(),delete s.currentlyTransitioningKeys[e];var n=(0,g.getChildMapping)(s.props.children);n&&n.hasOwnProperty(e)?s.performEnter(e):s.setState(function(t){var n=o({},t.children);return delete n[e],{children:n}})},s.childRefs=Object.create(null),s.state={children:(0,g.getChildMapping)(n.children)},s}
return s(t,e),t.prototype.componentWillMount=function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},t.prototype.componentDidMount=function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},t.prototype.componentWillReceiveProps=function(e){var t=(0,g.getChildMapping)(e.children),n=this.state.children;this.setState({children:(0,g.mergeChildMappings)(n,t)});for(var i in t){var a=n&&n.hasOwnProperty(i)
;!t[i]||a||this.currentlyTransitioningKeys[i]||this.keysToEnter.push(i)}for(var r in n){var s=t&&t.hasOwnProperty(r);!n[r]||s||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},t.prototype.componentDidUpdate=function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},t.prototype.render=function(){var e=this,t=[];for(var n in this.state.children)!function(n){var i=e.state.children[n]
;if(i){var a="string"!=typeof i.ref,r=e.props.childFactory(i),s=function(t){e.childRefs[n]=t};r===i&&a&&(s=(0,u.default)(i.ref,s)),t.push(d.default.cloneElement(r,{key:n,ref:s}))}}(n);var i=o({},this.props);return delete i.transitionLeave,delete i.transitionName,delete i.transitionAppear,delete i.transitionEnter,delete i.childFactory,delete i.transitionLeaveTimeout,delete i.transitionEnterTimeout,delete i.transitionAppearTimeout,delete i.component,
d.default.createElement(this.props.component,i,t)},t}(d.default.Component);y.displayName="TransitionGroup",y.propTypes=m,y.defaultProps=v,t.default=y,e.exports=t.default},function(e,t,n){"use strict";function i(e){if(!e)return e;var t={};return r.Children.map(e,function(e){return e}).forEach(function(e){t[e.key]=e}),t}function a(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var i={},a=[];for(var r in e)t.hasOwnProperty(r)?a.length&&(i[r]=a,a=[]):a.push(r)
;var s=void 0,o={};for(var l in t){if(i.hasOwnProperty(l))for(s=0;s<i[l].length;s++){var u=i[l][s];o[i[l][s]]=n(u)}o[l]=n(l)}for(s=0;s<a.length;s++)o[a[s]]=n(a[s]);return o}t.__esModule=!0,t.getChildMapping=i,t.mergeChildMappings=a;var r=n(1)},,,,,,,,,,,,function(e,t,n){"use strict";function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,i,r){var o=e(n,i,r),l=o.dispatch,u=[],c={getState:o.getState,dispatch:function(e){return l(e)}}
;return u=t.map(function(e){return e(c)}),l=s.default.apply(void 0,u)(o.dispatch),a({},o,{dispatch:l})}}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=i;var r=n(1078),s=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){"use strict";function i(e,t){return function(){return t(e.apply(void 0,arguments))}}function a(e,t){
if("function"==typeof e)return i(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),a={},r=0;r<n.length;r++){var s=n[r],o=e[s];"function"==typeof o&&(a[s]=i(o,t))}return a}t.__esModule=!0,t.default=a},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e
}}function a(e,t){var n=t&&t.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function r(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:o.ActionTypes.INIT
}))throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")
}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+o.ActionTypes.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.')})}function s(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var s=t[i]
;"function"==typeof e[s]&&(n[s]=e[s])}var o,l=Object.keys(n);try{r(n)}catch(e){o=e}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(o)throw o;for(var i=!1,r={},s=0;s<l.length;s++){var u=l[s],c=n[u],d=e[u],h=c(d,t);if(void 0===h){var p=a(u,t);throw new Error(p)}r[u]=h,i=i||h!==d}return i?r:e}}t.__esModule=!0,t.default=s;var o=n(1079),l=n(175),u=(i(l),n(1080));i(u)},function(e,t,n){"use strict";var i=function(){function e(e,t){
var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.exports=function(e){function t(e){for(null===e?e=0:e++;e<o.length&&0===o[e];)e++
;return e===o.length?null:e}function n(e){for(null===e?e=o.length-1:e--;e>=0&&0===o[e];)e--;return e===-1?null:e}function a(e){var n=i(e,2),a=n[0],r=n[1];return l?null===r||r===o[a]-1?(a=t(a),null===a?[null,null]:[a,0]):[a,r+1]:0===o||r===o-1?[null,null]:null===r?[null,0]:[null,r+1]}function r(e){var t=i(e,2),a=t[0],r=t[1];return l?null===r||0===r?(a=n(a),null===a?[null,null]:[a,o[a]-1]):[a,r-1]:0===o||0===r?[null,null]:null===r?[null,o-1]:[null,r-1]}function s(e){return null===a(e)[1]}
var o=e.data,l=e.multiSection;return{next:a,prev:r,isLast:s}}},function(e,t,n){"use strict";/**
 * @license shallow-diff https://github.com/cosmosio/shallow-diff
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2015 Olivier Scherrer <pode.fr@gmail.com>
 */
function i(e,t){if(e)throw new TypeError("simple-loop: "+t)}var a=n(3300);e.exports=function(e,t){i("object"!=typeof e,"the first object to compare with shallowDiff needs to be an object"),i("object"!=typeof t,"the second object to compare with shallowDiff needs to be an object");var n=[],r=[],s=[],o=[];return a(t,function(t,i){i in e?t!==e[i]?r.push(i):t===e[i]&&n.push(i):o.push(i)}),a(e,function(e,n){n in t||s.push(n)}),{updated:r,unchanged:n,added:o,deleted:s}}},function(e,t){
e.exports=function(e,t){if(e===t)return!0;var n=e.length;if(t.length!==n)return!1;for(var i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}},function(e,t,n){"use strict";/**
 * @license simple-loop https://github.com/flams/simple-loop
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2015 Olivier Scherrer <pode.fr@gmail.com>
 */
function i(e,t){if(e)throw new TypeError("simple-loop: "+t)}e.exports=function(e,t,n){i("object"!=typeof e,"iterated must be an array/object"),i("function"!=typeof t,"callback must be a function");var a;if(Array.isArray(e))for(a=0;a<e.length;a++)t.call(n,e[a],a,e);else for(a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}},function(e,t,n){e.exports=n(3302)},function(e,t,n){"use strict";(function(e,i){Object.defineProperty(t,"__esModule",{value:!0});var a,r=n(3303),s=function(e){
return e&&e.__esModule?e:{default:e}}(r);a="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:i;var o=(0,s.default)(a);t.default=o}).call(t,n(242),n(468)(e))},function(e,t,n){"use strict";function i(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){var i,a;/*! tether 1.3.4 */
!function(r,s){i=s,void 0!==(a="function"==typeof i?i.call(t,n,t,e):i)&&(e.exports=a)}(0,function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=e.getBoundingClientRect(),n={};for(var i in t)n[i]=t[i];if(e.ownerDocument!==document){var r=e.ownerDocument.defaultView.frameElement;if(r){var s=a(r);n.top+=s.top,n.bottom+=s.top,n.left+=s.left,n.right+=s.left}}return n}function r(e){
var t=getComputedStyle(e)||{},n=t.position,i=[];if("fixed"===n)return[e];for(var a=e;(a=a.parentNode)&&a&&1===a.nodeType;){var r=void 0;try{r=getComputedStyle(a)}catch(e){}if(void 0===r||null===r)return i.push(a),i;var s=r,o=s.overflow,l=s.overflowX,u=s.overflowY;/(auto|scroll)/.test(o+u+l)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(r.position)>=0)&&i.push(a)}return i.push(e.ownerDocument.body),e.ownerDocument!==document&&i.push(e.ownerDocument.defaultView),i}function s(){
D&&document.body.removeChild(D),D=null}function o(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var n=t.documentElement,i=a(e),r=x();return i.top-=r.top,i.left-=r.left,void 0===i.width&&(i.width=document.body.scrollWidth-i.left-i.right),void 0===i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=t.body.clientWidth-i.width-i.left,i.bottom=t.body.clientHeight-i.height-i.top,i}
function l(e){return e.offsetParent||document.documentElement}function u(){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");c(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var i=e.offsetWidth;n===i&&(i=t.clientWidth),document.body.removeChild(t);var a=n-i
;return{width:a,height:a}}function c(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach(function(t){if(t)for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function d(e,t){if(void 0!==e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.remove(t)});else{var n=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),i=f(e).replace(n," ");g(e,i)}}function h(e,t){
if(void 0!==e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.add(t)});else{d(e,t);var n=f(e)+" "+t;g(e,n)}}function p(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=f(e);return new RegExp("(^| )"+t+"( |$)","gi").test(n)}function f(e){return e.className instanceof e.ownerDocument.defaultView.SVGAnimatedString?e.className.baseVal:e.className}function g(e,t){e.setAttribute("class",t)}function m(e,t,n){n.forEach(function(n){t.indexOf(n)===-1&&p(e,n)&&d(e,n)}),
t.forEach(function(t){p(e,t)||h(e,t)})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function y(e,t){
var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+n>=t&&t>=e-n}function b(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function S(){for(var e={top:0,left:0},t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach(function(t){var n=t.top,i=t.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof i&&(i=parseFloat(i,10)),e.top+=n,e.left+=i}),e}function I(e,t){
return"string"==typeof e.left&&e.left.indexOf("%")!==-1&&(e.left=parseFloat(e.left,10)/100*t.width),"string"==typeof e.top&&e.top.indexOf("%")!==-1&&(e.top=parseFloat(e.top,10)/100*t.height),e}function w(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),void 0!==t.nodeType&&function(){var e=t,n=o(t),i=n,a=getComputedStyle(t)
;if(t=[i.left,i.top,n.width+i.left,n.height+i.top],e.ownerDocument!==document){var r=e.ownerDocument.defaultView;t[0]+=r.pageXOffset,t[1]+=r.pageYOffset,t[2]+=r.pageXOffset,t[3]+=r.pageYOffset}K.forEach(function(e,n){e=e[0].toUpperCase()+e.substr(1),"Top"===e||"Left"===e?t[n]+=parseFloat(a["border"+e+"Width"]):t[n]-=parseFloat(a["border"+e+"Width"])})}(),t}var M=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,
"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),C=void 0;void 0===C&&(C={modules:[]});var D=null,P=function(){var e=0;return function(){return++e}}(),T={},x=function(){var e=D;e||(e=document.createElement("div"),e.setAttribute("data-tether-id",P()),c(e.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(e),D=e);var t=e.getAttribute("data-tether-id");return void 0===T[t]&&(T[t]=a(e),A(function(){
delete T[t]})),T[t]},E=[],A=function(e){E.push(e)},k=function(){for(var e=void 0;e=E.pop();)e()},L=function(){function e(){i(this,e)}return M(e,[{key:"on",value:function(e,t,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:n,once:i})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){
if(void 0!==this.bindings&&void 0!==this.bindings[e])if(void 0===t)delete this.bindings[e];else for(var n=0;n<this.bindings[e].length;)this.bindings[e][n].handler===t?this.bindings[e].splice(n,1):++n}},{key:"trigger",value:function(e){if(void 0!==this.bindings&&this.bindings[e]){for(var t=0,n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];for(;t<this.bindings[e].length;){var r=this.bindings[e][t],s=r.handler,o=r.ctx,l=r.once,u=o;void 0===u&&(u=this),s.apply(u,i),
l?this.bindings[e].splice(t,1):++t}}}}]),e}();C.Utils={getActualBoundingClientRect:a,getScrollParents:r,getBounds:o,getOffsetParent:l,extend:c,addClass:h,removeClass:d,hasClass:p,updateClasses:m,defer:A,flush:k,uniqueId:P,Evented:L,getScrollBarSize:u,removeUtilElements:s};var _=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{
if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),M=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),N=function(e,t,n){for(var i=!0;i;){var a=e,r=t,s=n;i=!1,
null===a&&(a=Function.prototype);var o=Object.getOwnPropertyDescriptor(a,r);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(a);if(null===u)return;e=u,t=r,n=s,i=!0,o=u=void 0}};if(void 0===C)throw new Error("You must include the utils.js file before tether.js")
;var R=C.Utils,r=R.getScrollParents,o=R.getBounds,l=R.getOffsetParent,c=R.extend,h=R.addClass,d=R.removeClass,m=R.updateClasses,A=R.defer,k=R.flush,u=R.getScrollBarSize,s=R.removeUtilElements,O=function(){if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],n=0;n<t.length;++n){var i=t[n];if(void 0!==e.style[i])return i}}(),j=[],z=function(){j.forEach(function(e){e.position(!1)}),k()}
;!function(){var e=null,t=null,n=null,i=function i(){if(void 0!==t&&t>16)return t=Math.min(t-16,250),void(n=setTimeout(i,250));void 0!==e&&b()-e<10||(null!=n&&(clearTimeout(n),n=null),e=b(),z(),t=b()-e)};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,i)})}();var U={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},B={top:0,left:0,middle:"50%",center:"50%",
bottom:"100%",right:"100%"},V=function(e,t){var n=e.left,i=e.top;return"auto"===n&&(n=U[t.left]),"auto"===i&&(i=F[t.top]),{left:n,top:i}},H=function(e){var t=e.left,n=e.top;return void 0!==B[e.left]&&(t=B[e.left]),void 0!==B[e.top]&&(n=B[e.top]),{left:t,top:n}},W=function(e){var t=e.split(" "),n=_(t,2);return{top:n[0],left:n[1]}},Y=W,Q=function(e){function t(e){var n=this;i(this,t),N(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.position=this.position.bind(this),
j.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(e){void 0!==e.initialize&&e.initialize.call(n)}),this.position()}return v(t,e),M(t,[{key:"getClass",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return void 0!==t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={
offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(i,e);var a=this.options,s=a.element,o=a.target,l=a.targetModifier;if(this.element=s,this.target=o,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(e){
if(void 0===t[e])throw new Error("Tether Error: Both element and target must be defined");void 0!==t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),h(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&h(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=Y(this.options.targetAttachment),this.attachment=Y(this.options.attachment),
this.offset=W(this.options.offset),this.targetOffset=W(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),this.options.enabled!==!1&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return o(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,
width:innerWidth};var e=o(this.target),t={height:e.height,width:e.width,top:e.top,left:e.left};return t.height=Math.min(t.height,e.height-(pageYOffset-e.top)),t.height=Math.min(t.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),t.height=Math.min(innerHeight,t.height),t.height-=2,t.width=Math.min(t.width,e.width-(pageXOffset-e.left)),t.width=Math.min(t.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),t.width=Math.min(innerWidth,t.width),t.width-=2,
t.top<pageYOffset&&(t.top=pageYOffset),t.left<pageXOffset&&(t.left=pageXOffset),t}if("scroll-handle"===this.targetModifier){var e=void 0,n=this.target;n===document.body?(n=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=o(n);var i=getComputedStyle(n),a=n.scrollWidth>n.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;a&&(r=15)
;var s=e.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-r,t={width:15,height:.975*s*(s/n.scrollHeight),left:e.left+e.width-parseFloat(i.borderLeftWidth)-15},l=0;s<408&&this.target===document.body&&(l=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(t.height=Math.max(t.height,24));var u=this.target.scrollTop/(n.scrollHeight-s);return t.top=u*(s-t.height-l)+e.top+parseFloat(i.borderTopWidth),this.target===document.body&&(t.height=Math.max(t.height,24)),t}}},{
key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return void 0===this._cache&&(this._cache={}),void 0===this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.options.addTargetClasses!==!1&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(t){
t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)}),t&&this.position()}},{key:"disable",value:function(){var e=this;d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.position)})}},{key:"destroy",value:function(){var e=this;this.disable(),j.forEach(function(t,n){t===e&&j.splice(n,1)}),0===j.length&&s()}},{key:"updateAttachClasses",
value:function(e,t){var n=this;e=e||this.attachment,t=t||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var a=this._addAttachClasses;e.top&&a.push(this.getClass("element-attached")+"-"+e.top),e.left&&a.push(this.getClass("element-attached")+"-"+e.left),
t.top&&a.push(this.getClass("target-attached")+"-"+t.top),t.left&&a.push(this.getClass("target-attached")+"-"+t.left);var r=[];i.forEach(function(e){r.push(n.getClass("element-attached")+"-"+e),r.push(n.getClass("target-attached")+"-"+e)}),A(function(){void 0!==n._addAttachClasses&&(m(n.element,n._addAttachClasses,r),n.options.addTargetClasses!==!1&&m(n.target,n._addAttachClasses,r),delete n._addAttachClasses)})}},{key:"position",value:function(){
var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=V(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return o(e.element)}),a=i.width,r=i.height;if(0===a&&0===r&&void 0!==this.lastSize){var s=this.lastSize;a=s.width,r=s.height}else this.lastSize={width:a,height:r};var c=this.cache("target-bounds",function(){return e.getTargetBounds()
}),d=c,h=I(H(this.attachment),{width:a,height:r}),p=I(H(n),d),f=I(this.offset,{width:a,height:r}),g=I(this.targetOffset,d);h=S(h,f),p=S(p,g);for(var m=c.left+p.left-h.left,v=c.top+p.top-h.top,y=0;y<C.modules.length;++y){var b=C.modules[y],w=b.position.call(this,{left:m,top:v,targetAttachment:n,targetPos:c,elementPos:i,offset:h,targetOffset:p,manualOffset:f,manualTargetOffset:g,scrollbarSize:T,attachment:this.attachment});if(w===!1)return!1;void 0!==w&&"object"==typeof w&&(v=w.top,m=w.left)}
var M={page:{top:v,left:m},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-r+innerHeight,left:m-pageXOffset,right:pageXOffset-m-a+innerWidth}},D=this.target.ownerDocument,P=D.defaultView,T=void 0;return D.body.scrollWidth>P.innerWidth&&(T=this.cache("scrollbar-size",u),M.viewport.bottom-=T.height),D.body.scrollHeight>P.innerHeight&&(T=this.cache("scrollbar-size",u),M.viewport.right-=T.width),
["","static"].indexOf(D.body.style.position)!==-1&&["","static"].indexOf(D.body.parentElement.style.position)!==-1||(M.page.bottom=D.body.scrollHeight-v-r,M.page.right=D.body.scrollWidth-m-a),void 0!==this.options.optimizations&&this.options.optimizations.moveElement!==!1&&void 0===this.targetModifier&&function(){var t=e.cache("target-offsetparent",function(){return l(e.target)}),n=e.cache("target-offsetparent-bounds",function(){return o(t)}),i=getComputedStyle(t),a=n,r={}
;if(["Top","Left","Bottom","Right"].forEach(function(e){r[e.toLowerCase()]=parseFloat(i["border"+e+"Width"])}),n.right=D.body.scrollWidth-n.left-a.width+r.right,n.bottom=D.body.scrollHeight-n.top-a.height+r.bottom,M.page.top>=n.top+r.top&&M.page.bottom>=n.bottom&&M.page.left>=n.left+r.left&&M.page.right>=n.right){var s=t.scrollTop,u=t.scrollLeft;M.offset={top:M.page.top-n.top+s-r.top,left:M.page.left-n.left+u-r.left}}}(),this.move(M),this.history.unshift(M),
this.history.length>3&&this.history.pop(),t&&k(),!0}}},{key:"move",value:function(e){var t=this;if(void 0!==this.element.parentNode){var n={};for(var i in e){n[i]={};for(var a in e[i]){for(var r=!1,s=0;s<this.history.length;++s){var o=this.history[s];if(void 0!==o[i]&&!y(o[i][a],e[i][a])){r=!0;break}}r||(n[i][a]=!0)}}var u={top:"",left:"",right:"",bottom:""},d=function(e,n){if((void 0!==t.options.optimizations?t.options.optimizations.gpu:null)!==!1){var i=void 0,a=void 0;e.top?(u.top=0,
i=n.top):(u.bottom=0,i=-n.bottom),e.left?(u.left=0,a=n.left):(u.right=0,a=-n.right),u[O]="translateX("+Math.round(a)+"px) translateY("+Math.round(i)+"px)","msTransform"!==O&&(u[O]+=" translateZ(0)")}else e.top?u.top=n.top+"px":u.bottom=n.bottom+"px",e.left?u.left=n.left+"px":u.right=n.right+"px"},h=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(u.position="absolute",d(n.page,e.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(u.position="fixed",
d(n.viewport,e.viewport)):void 0!==n.offset&&n.offset.top&&n.offset.left?function(){u.position="absolute";var i=t.cache("target-offsetparent",function(){return l(t.target)});l(t.element)!==i&&A(function(){t.element.parentNode.removeChild(t.element),i.appendChild(t.element)}),d(n.offset,e.offset),h=!0}():(u.position="absolute",d({top:!0,left:!0},e.page)),!h){for(var p=!0,f=this.element.parentNode;f&&1===f.nodeType&&"BODY"!==f.tagName;){if("static"!==getComputedStyle(f).position){p=!1;break}
f=f.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var g={},m=!1;for(var a in u){var v=u[a];this.element.style[a]!==v&&(m=!0,g[a]=v)}m&&A(function(){c(t.element.style,g),t.trigger("repositioned")})}}}]),t}(L);Q.modules=[],C.position=z;var G=c(Q,C),_=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){a=!0,
r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),R=C.Utils,o=R.getBounds,c=R.extend,m=R.updateClasses,A=R.defer,K=["left","top","right","bottom"];C.modules.push({position:function(e){var t=this,n=e.top,i=e.left,a=e.targetAttachment;if(!this.options.constraints)return!0
;var r=this.cache("element-bounds",function(){return o(t.element)}),s=r.height,l=r.width;if(0===l&&0===s&&void 0!==this.lastSize){var u=this.lastSize;l=u.width,s=u.height}var d=this.cache("target-bounds",function(){return t.getTargetBounds()}),h=d.height,p=d.width,f=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,n=e.pinnedClass;t&&f.push(t),n&&f.push(n)}),f.forEach(function(e){
["left","top","right","bottom"].forEach(function(t){f.push(e+"-"+t)})});var g=[],v=c({},a),y=c({},this.attachment);return this.options.constraints.forEach(function(e){var r=e.to,o=e.attachment,u=e.pin;void 0===o&&(o="");var c=void 0,d=void 0;if(o.indexOf(" ")>=0){var f=o.split(" "),m=_(f,2);d=m[0],c=m[1]}else c=d=o;var b=w(t,r);"target"!==d&&"both"!==d||(n<b[1]&&"top"===v.top&&(n+=h,v.top="bottom"),n+s>b[3]&&"bottom"===v.top&&(n-=h,v.top="top")),
"together"===d&&("top"===v.top&&("bottom"===y.top&&n<b[1]?(n+=h,v.top="bottom",n+=s,y.top="top"):"top"===y.top&&n+s>b[3]&&n-(s-h)>=b[1]&&(n-=s-h,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&n+s>b[3]?(n-=h,v.top="top",n-=s,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*s-h)<=b[3]&&(n+=s-h,v.top="top",y.top="top")),"middle"===v.top&&(n+s>b[3]&&"top"===y.top?(n-=s,y.top="bottom"):n<b[1]&&"bottom"===y.top&&(n+=s,y.top="top"))),
"target"!==c&&"both"!==c||(i<b[0]&&"left"===v.left&&(i+=p,v.left="right"),i+l>b[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===c&&(i<b[0]&&"left"===v.left?"right"===y.left?(i+=p,v.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=p,v.left="right",i-=l,y.left="right"):i+l>b[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>b[2]&&"left"===y.left?(i-=l,
y.left="right"):i<b[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==d&&"both"!==d||(n<b[1]&&"bottom"===y.top&&(n+=s,y.top="top"),n+s>b[3]&&"top"===y.top&&(n-=s,y.top="bottom")),"element"!==c&&"both"!==c||(i<b[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,y.left="left")),i+l>b[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(e){return e.trim()
}):u===!0&&(u=["top","left","right","bottom"]),u=u||[];var S=[],I=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],S.push("top")):I.push("top")),n+s>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-s,S.push("bottom")):I.push("bottom")),i<b[0]&&(u.indexOf("left")>=0?(i=b[0],S.push("left")):I.push("left")),i+l>b[2]&&(u.indexOf("right")>=0?(i=b[2]-l,S.push("right")):I.push("right")),S.length&&function(){var e=void 0;e=void 0!==t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),g.push(e),
S.forEach(function(t){g.push(e+"-"+t)})}(),I.length&&function(){var e=void 0;e=void 0!==t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),g.push(e),I.forEach(function(t){g.push(e+"-"+t)})}(),(S.indexOf("left")>=0||S.indexOf("right")>=0)&&(y.left=v.left=!1),(S.indexOf("top")>=0||S.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===a.top&&v.left===a.left&&y.top===t.attachment.top&&y.left===t.attachment.left||(t.updateAttachClasses(y,v),t.trigger("update",{attachment:y,
targetAttachment:v}))}),A(function(){t.options.addTargetClasses!==!1&&m(t.target,g,f),m(t.element,g,f)}),{top:n,left:i}}});var R=C.Utils,o=R.getBounds,m=R.updateClasses,A=R.defer;C.modules.push({position:function(e){var t=this,n=e.top,i=e.left,a=this.cache("element-bounds",function(){return o(t.element)}),r=a.height,s=a.width,l=this.getTargetBounds(),u=n+r,c=i+s,d=[];n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(e){var t=l[e];t!==i&&t!==c||d.push(e)}),
i<=l.right&&c>=l.left&&["top","bottom"].forEach(function(e){var t=l[e];t!==n&&t!==u||d.push(e)});var h=[],p=[],f=["left","top","right","bottom"];return h.push(this.getClass("abutted")),f.forEach(function(e){h.push(t.getClass("abutted")+"-"+e)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(e){p.push(t.getClass("abutted")+"-"+e)}),A(function(){t.options.addTargetClasses!==!1&&m(t.target,p,h),m(t.element,p,h)}),!0}});var _=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{
for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(e){var t=e.top,n=e.left;if(this.options.shift){var i=this.options.shift
;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:t,left:n}));var a=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=i,o=_(s,2);a=o[0],r=o[1],a=parseFloat(a,10),r=parseFloat(r,10)}else a=i.top,r=i.left;return t+=a,n+=r,{top:t,left:n}}}}),G})},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,t),
a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1);Object.defineProperty(t,"createAutoCorrectedDatePipe",{enumerable:!0,get:function(){return i(a).default}});var r=n(2);Object.defineProperty(t,"createNumberMask",{enumerable:!0,get:function(){return i(r).default}});var s=n(3);Object.defineProperty(t,"emailMask",{enumerable:!0,get:function(){
return i(s).default}})},function(e,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy";return function(t){var n=[],i=e.split(/[^dmy]+/),a={dd:31,mm:12,yyyy:9999},r={dd:1,mm:1,yyyy:1},s=t.split("");return i.forEach(function(t){var i=e.indexOf(t),r=parseInt(a[t].toString().substr(0,1),10);parseInt(s[i],10)>r&&(s[i+1]=s[i],s[i]=0,n.push(i))}),!i.some(function(n){var i=e.indexOf(n),s=n.length,o=t.substr(i,s).replace(/\D/g,""),l=parseInt(o,10)
;return l>a[n]||o.length===s&&l<r[n]})&&{value:s.join(""),indexesOfPipedChars:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){"use strict";function n(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=e.length;if(e===o||e[0]===m[0]&&1===t)return m.split(o).concat([f]).concat(y.split(o));var n=e.lastIndexOf(P),s=n!==-1,l=e[0]===c&&L,u=void 0,v=void 0,b=void 0;if(e.slice(z*-1)===y&&(e=e.slice(0,z*-1)),
s&&(C||A)?(u=e.slice(e.slice(0,j)===m?j:0,n),v=e.slice(n+1,t),v=i(v.replace(h,o))):u=e.slice(0,j)===m?e.slice(j):e,O&&(void 0===O?"undefined":r(O))===p){var I="."===w?"[.]":""+w,M=(u.match(new RegExp(I,"g"))||[]).length;u=u.slice(0,O+M*U)}return u=u.replace(h,o),N||(u=String(Number(u))),u=S?a(u,w):u,b=i(u),(s&&C||A===!0)&&(e[n-1]!==P&&b.push(g),b.push(P,g),v&&((void 0===x?"undefined":r(x))===p&&(v=v.slice(0,x)),b=b.concat(v)),A===!0&&e[n-1]===P&&b.push(f)),j>0&&(b=m.split(o).concat(b)),
l&&(b.length===j&&b.push(f),b=[d].concat(b)),y.length>0&&(b=b.concat(y.split(o))),b}
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefix,m=void 0===n?s:n,v=t.suffix,y=void 0===v?o:v,b=t.includeThousandsSeparator,S=void 0===b||b,I=t.thousandsSeparatorSymbol,w=void 0===I?l:I,M=t.allowDecimal,C=void 0!==M&&M,D=t.decimalSymbol,P=void 0===D?u:D,T=t.decimalLimit,x=void 0===T?2:T,E=t.requireDecimal,A=void 0!==E&&E,k=t.allowNegative,L=void 0!==k&&k,_=t.allowLeadingZeroes,N=void 0!==_&&_,R=t.integerLimit,O=void 0===R?null:R,j=m&&m.length||0,z=y&&y.length||0,U=w&&w.length||0
;return e.instanceOf="createNumberMask",e}function i(e){return e.split(o).map(function(e){return f.test(e)?f:e})}function a(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var r="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.default=n
;var s="$",o="",l=",",u=".",c="-",d=/-/,h=/\D+/g,p="number",f=/\d/,g="[]"},function(e,t,n){"use strict";function i(e,t){e=e.replace(S,p);var n=t.placeholderChar,i=t.currentCaretPosition,u=e.indexOf(f),c=e.lastIndexOf(h),d=c<u?-1:c,g=a(e,u+1,f),m=a(e,d-1,h),v=r(e,u),y=s(e,u,d,n),b=o(e,d,n,i);return v=l(v),y=l(y),b=l(b,!0),v.concat(g).concat(y).concat(m).concat(b)}function a(e,t,n){var i=[];return e[t]===n?i.push(n):i.push(g,n),i.push(g),i}function r(e,t){return t===-1?e:e.slice(0,t)}
function s(e,t,n,i){var a=p;return t!==-1&&(a=n===-1?e.slice(t+1,e.length):e.slice(t+1,n)),a=a.replace(new RegExp("[\\s"+i+"]",v),p),a===f?d:a.length<1?m:a[a.length-1]===h?a.slice(0,a.length-1):a}function o(e,t,n,i){var a=p;return t!==-1&&(a=e.slice(t+1,e.length)),a=a.replace(new RegExp("[\\s"+n+".]",v),p),0===a.length?e[t-1]===h&&i!==e.length?d:p:a}function l(e,t){return e.split(p).map(function(e){return e===m?e:t?b:y})}Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),c=function(e){
return e&&e.__esModule?e:{default:e}}(u),d="*",h=".",p="",f="@",g="[]",m=" ",v="g",y=/[^\s]/,b=/[^.\s]/,S=/\s/g;t.default={mask:i,pipe:c.default}},function(e,t){"use strict";function n(e,t){var n=t.currentCaretPosition,r=t.rawValue,h=t.previousConformedValue,p=t.placeholderChar,f=e;f=i(f);var g=f.indexOf(o);if(null===r.match(new RegExp("[^@\\s."+p+"]")))return s;if(f.indexOf(u)!==-1||g!==-1&&n!==g+1||r.indexOf(a)===-1&&h!==s&&r.indexOf(l)!==-1)return!1;var m=f.indexOf(a)
;return(f.slice(m+1,f.length).match(d)||c).length>1&&f.substr(-1)===l&&n!==r.length&&(f=f.slice(0,f.length-1)),f}function i(e){var t=0;return e.replace(r,function(){return t++,1===t?a:s})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var a="@",r=/@/g,s="",o="@.",l=".",u="..",c=[],d=/\./g}])})},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={exports:{},id:i,loaded:!1}
;return e[i].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3);Object.defineProperty(t,"conformToMask",{enumerable:!0,get:function(){return i(a).default}});var r=n(2);Object.defineProperty(t,"adjustCaretPosition",{enumerable:!0,get:function(){return i(r).default}});var s=n(5)
;Object.defineProperty(t,"createTextMaskInputElement",{enumerable:!0,get:function(){return i(s).default}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placeholderChar="_"},function(e,t){"use strict";function n(e){var t=e.previousConformedValue,n=void 0===t?a:t,r=e.currentCaretPosition,s=void 0===r?0:r,o=e.conformedValue,l=e.rawValue,u=e.placeholderChar,c=e.placeholder,d=e.indexesOfPipedChars,h=void 0===d?i:d,p=e.caretTrapIndexes,f=void 0===p?i:p
;if(0===s)return 0;var g=l.length,m=n.length,v=c.length,y=o.length,b=g-m,S=b>0,I=0===m;if(b>1&&!S&&!I)return s;var w=S&&(n===o||o===c),M=0;if(w)M=s-b;else for(var C=o.toLowerCase(),D=l.toLowerCase(),P=D.substr(0,s).split(a),T=P.filter(function(e){return C.indexOf(e)!==-1}),x=T[T.length-1],E=h.map(function(e){return C[e]}),A=E.filter(function(e){return e===x}).length,k=T.filter(function(e){return e===x}).length,L=c.substr(0,c.indexOf(u)).split(a).filter(function(e,t){return e===x&&l[t]!==e
}).length,_=L+k+A,N=0,R=0;R<y;R++){var O=C[R];if(M=R+1,O===x&&N++,N>=_)break}if(S){for(var j=M,z=M;z<=v;z++)if(c[z]===u&&(j=z),c[z]===u||f.indexOf(z)!==-1||z===v)return j}else for(var U=M;U>=0;U--)if(c[U-1]===u||f.indexOf(U)!==-1||0===U)return U}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var i=[],a=""},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.guide,o=void 0===i||i,l=n.previousConformedValue,u=void 0===l?s:l,c=n.placeholderChar,d=void 0===c?r.placeholderChar:c,h=n.placeholder,p=void 0===h?(0,
a.convertMaskToPlaceholder)(t,d):h,f=n.currentCaretPosition,g=n.keepCharPositions,m=o===!1&&void 0!==u,v=e.length,y=u.length,b=p.length,S=t.length,I=v-y,w=I>0,M=f+(w?-I:0),C=M+Math.abs(I);if(g===!0&&!w){for(var D=s,P=M;P<C;P++)p[P]===d&&(D+=d);e=e.slice(0,M)+D+e.slice(M,v)}for(var T=e.split(s).map(function(e,t){return{char:e,isNew:t>=M&&t<C}}),x=v-1;x>=0;x--){var E=T[x].char;if(E!==d){E===p[x>=M&&y===S?x-I:x]&&T.splice(x,1)}}var A=s,k=!1;e:for(var L=0;L<b;L++){var _=p[L];if(_===d){
if(T.length>0)for(;T.length>0;){var N=T.shift(),R=N.char,O=N.isNew;if(R===d&&m!==!0){A+=d;continue e}if(t[L].test(R)){if(g===!0&&O!==!1&&u!==s&&o!==!1&&w){for(var j=T.length,z=null,U=0;U<j;U++){var F=T[U];if(F.char!==d&&F.isNew===!1)break;if(F.char===d){z=U;break}}null!==z?(A+=R,T.splice(z,1)):L--}else A+=R;continue e}k=!0}m===!1&&(A+=p.substr(L,b));break}A+=_}if(m&&w===!1){for(var B=null,V=0;V<A.length;V++)p[V]===d&&(B=V);A=null!==B?A.substr(0,B+1):s}return{conformedValue:A,meta:{
someCharsRejected:k}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(4),r=n(1),s=""},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.placeholderChar
;if(e.indexOf(t)!==-1)throw new Error("Placeholder character must not be used as part of the mask. Please specify a character that is not present in your mask as your placeholder character.\n\nThe placeholder character that was received is: "+JSON.stringify(t)+"\n\nThe mask that was received is: "+JSON.stringify(e));return e.map(function(e){return e instanceof RegExp?t:e}).join("")}function a(e){return"string"==typeof e||e instanceof String}function r(e){
return"number"==typeof e&&void 0===e.length&&!isNaN(e)}function s(e){for(var t=[],n=void 0;(n=e.indexOf(u))!==-1;)t.push(n),e.splice(n,1);return{maskWithoutCaretTraps:e,indexes:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.convertMaskToPlaceholder=i,t.isString=a,t.isNumber=r,t.processCaretTraps=s;var o=n(1),l=[],u="[]"},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t={previousConformedValue:m};return{state:t,update:function(n){
var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,a=i.inputElement,u=i.mask,d=i.guide,v=i.pipe,b=i.placeholderChar,S=void 0===b?f.placeholderChar:b,I=i.keepCharPositions,w=void 0!==I&&I;if((n=n||a.value)!==t.previousConformedValue){(void 0===u?"undefined":l(u))===y&&void 0!==u.pipe&&void 0!==u.mask&&(v=u.pipe,u=u.mask);var M=void 0,C=void 0;if(u instanceof Array&&(M=(0,p.convertMaskToPlaceholder)(u,S)),u!==!1){var D=s(n),P=a.selectionStart,T=t.previousConformedValue,x=void 0
;if((void 0===u?"undefined":l(u))===g){if((C=u(D,{currentCaretPosition:P,previousConformedValue:T,placeholderChar:S}))===!1)return;var E=(0,p.processCaretTraps)(C),A=E.maskWithoutCaretTraps,k=E.indexes;C=A,x=k,M=(0,p.convertMaskToPlaceholder)(C,S)}else C=u;var L={previousConformedValue:T,guide:d,placeholderChar:S,pipe:v,placeholder:M,currentCaretPosition:P,keepCharPositions:w},_=(0,h.default)(D,C,L),N=_.conformedValue,R=(void 0===v?"undefined":l(v))===g,O={};R&&(O=v(N,o({rawValue:D},L)),
O===!1?O={value:T,rejected:!0}:(0,p.isString)(O)&&(O={value:O}));var j=R?O.value:N,z=(0,c.default)({previousConformedValue:T,conformedValue:j,placeholder:M,rawValue:D,currentCaretPosition:P,placeholderChar:S,indexesOfPipedChars:O.indexesOfPipedChars,caretTrapIndexes:x}),U=j===M&&0===z,F=U?m:j;t.previousConformedValue=F,a.value!==F&&(a.value=F,r(a,z))}}}}}function r(e,t){document.activeElement===e&&(b?setTimeout(function(){return e.setSelectionRange(t,t,v)},0):e.setSelectionRange(t,t,v))}
function s(e){if((0,p.isString)(e))return e;if((0,p.isNumber)(e))return String(e);if(void 0===e||null===e)return m;throw new Error("The 'value' provided to Text Mask needs to be a string or a number. The value received was:\n\n "+JSON.stringify(e))}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e
},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};t.default=a;var u=n(2),c=i(u),d=n(3),h=i(d),p=n(4),f=n(1),g="function",m="",v="none",y="object",b="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent)}])})},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNhNGM2MzkiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00NC44ODIgMjUuMzcxbDIuODE3IDQuODU5Yy01LjEyNyAyLjQ5NS04LjYwMiA3LjM4MS04LjYwMiAxMi45ODZoMzIuODA3YzAtNS42MDUtMy40NzUtMTAuNDktOC42MDMtMTIuOTg2bDIuODE3LTQuODU5YzAgMCAuMTM0LS4yNTgtLjExOS0uNDAzLS4yNTMtLjE0NS0uNDIzLjEwMi0uNDIzLjEwMmwtMi44NiA0LjkwMmMtMi4xNzgtLjk2Mi00LjYyNi0xLjUwNS03LjIxNi0xLjUwNS0yLjU5IDAtNS4wNC41NDMtNy4yMTYgMS41MDVsLTIuODYtNC45MDJjMCAwLS4xNi0uMjQ3LS40MTQtLjEwMy0uMjU1LjE0NC0uMTI4LjQwMy0uMTI4LjQwM20yLjgxNyA5LjQxMmMuODYgMCAxLjU2LjY5NSAxLjU2IDEuNTQ4IDAgLjg1My0uNyAxLjUyNi0xLjU2IDEuNTI2LS44NTkgMC0xLjU2LS42NzQtMS41Ni0xLjUyNiAwLS44NTMuNzAxLTEuNTQ4IDEuNTYtMS41NDhtMTUuNjAyIDBjLjg2IDAgMS41Ni42OTUgMS41NiAxLjU0OCAwIC44NTMtLjcgMS41MjYtMS41NiAxLjUyNi0uODU5IDAtMS41Ni0uNjc0LTEuNTYtMS41MjYgMC0uODUzLjcwMS0xLjU0OCAxLjU2LTEuNTQ4bS0yNC4zMzcgMTAuMzI4djI0LjY5NGMwIDEuMjI1IDEuNDkzIDIuODI5IDIuNzI3IDIuODI5aDMuOTAzdjguNDE5YzAgMi4xNDMgMS41NzQgMy44NyAzLjUzMyAzLjg3IDEuOTU4IDAgMy41MzItMS43MjcgMy41MzItMy44N3YtOC40MTloNS42Nzh2OC40MTljMCAyLjE0MyAxLjU3NCAzLjg3IDMuNTMyIDMuODcgMS45NTggMCAzLjU1NC0xLjcyNyAzLjU1NC0zLjg3di04LjQxOWgzLjg4MWMxLjIzNSAwIDIuNzI4LTEuNjA0IDIuNzI4LTIuODI5di0yNC42OTRoLTMzLjA3bS01LjQ0Mi0uNTE3YzEuOTUzIDAgMy41MzUgMS43MzMgMy41MzUgMy44N3YxNC42NTFjMCAyLjEzNi0xLjU4MyAzLjg3LTMuNTM1IDMuODctMS45NTMgMC0zLjUzNi0xLjczMy0zLjUzNi0zLjg3di0xNC42NTFjMC0yLjEzNyAxLjU4My0zLjg3IDMuNTM2LTMuODdtNDMuOTU2IDBjMS45NTMgMCAzLjUzNiAxLjczMyAzLjUzNiAzLjg3djE0LjY1MWMwIDIuMTM2LTEuNTgyIDMuODctMy41MzYgMy44Ny0xLjk1MiAwLTMuNTM1LTEuNzMzLTMuNTM1LTMuODd2LTE0LjY1MWMwLTIuMTM3IDEuNTgyLTMuODcgMy41MzUtMy44NyIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNkOGQ4ZDgiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00My44MDIgNTUuODQ0Yy0uMDMzLTMuNTUyIDIuODU3LTUuMjU5IDIuOTg3LTUuMzQxLTEuNjI1LTIuNDEyLTQuMTU0LTIuNzQzLTUuMDU2LTIuNzgzLTIuMTU0LS4yMjEtNC4yMDIgMS4yODctNS4yOTMgMS4yODctMS4wOTEgMC0yLjc3OC0xLjI1NC00LjU2Mi0xLjIxOS0yLjM0OC4wMzQtNC41MTEgMS4zODQtNS43MjEgMy41MTYtMi40MzcgNC4yOTUtLjYyMyAxMC42NTYgMS43NTMgMTQuMTQgMS4xNjIgMS43MDMgMi41NDYgMy42MiA0LjM2NCAzLjU1MSAxLjc1Mi0uMDY5IDIuNDEzLTEuMTQ5IDQuNTI5LTEuMTQ5IDIuMTE2IDAgMi43MTIgMS4xNDkgNC41NjQgMS4xMTMgMS44ODUtLjAzNCAzLjA3OC0xLjczNiA0LjIzMS0zLjQ0NiAxLjMzMy0xLjk3OCAxLjg4Mi0zLjg5MyAxLjkxNS0zLjk5MS0uMDQxLS4wMTktMy42NzQtMS40MzItMy43MTEtNS42NzhtLTMuNDc5LTEwLjQyOGMuOTY2LTEuMTg3IDEuNjE2LTIuODM3IDEuNDM4LTQuNDgxLTEuMzkuMDU4LTMuMDc0Ljk0MS00LjA3MyAyLjEyNi0uODk0IDEuMDUxLTEuNjc4IDIuNzI5LTEuNDY2IDQuMzQxIDEuNTUuMTIyIDMuMTM1LS44IDQuMTAxLTEuOTg2bTE3Ljk1Ny0zLjY0MXY1Ljk0OGg1LjMxMnYyLjg2N2gtNS4zMTJ2MTEuMTY5YzAgMi41NjguNzE3IDQuMDIgMi43ODMgNC4wMi45NyAwIDEuNjg3LS4xMjggMi4xNS0uMjU3bC4xNjkgMi44MjRjLS43MTcuMy0xLjg1NS41MTQtMy4yODkuNTE0LTEuNzI4IDAtMy4xMi0uNTU2LTQuMDEtMS41ODMtMS4wNTQtMS4xMTMtMS40MzMtMi45NTMtMS40MzMtNS4zOTJ2LTExLjI5OGgtMy4xNjJ2LTIuODY3aDMuMTYydi00Ljk2NGwzLjYyNi0uOTg0bTExLjI5OCA1Ljk0OGw0LjAxIDExLjY0Yy42NzUgMS44ODMgMS4yMjMgMy41OTUgMS42NDQgNS4zMDZoLjEyNmMuNDY0LTEuNzEyIDEuMDU0LTMuNDI0IDEuNzI5LTUuMzA2bDMuOTYzLTExLjY0aDMuODc5bC04LjAxIDIwLjcxMmgtMy41NDJsLTcuNzU4LTIwLjcxMmgzLjk2MyIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM0Y2I2NDkiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGZpbGw9IiNmY2QyMDkiIGQ9Im0zNy42IDExMGg3Mi40di03NGgtNTguMjRsMS44NTkgNS43MTggOC45MzIgMi42NDIgNC41MyA4LjY2LS43NyA4eiIvPjxwYXRoIGZpbGw9IiNlZDVlNTAiIGQ9Im04IDBsMzQuMTkgNTkuOTguNDEtOS41NCAzLjUzLTUuNTM0IDguODctMy45MDZoNTV2LTQwLjk5N3oiLz48Y2lyY2xlIGZpbGw9IiMxZjFmMWYiIGN4PSI1NSIgY3k9IjU1IiByPSIzMCIvPjxwYXRoIGQ9Im01NSA4NWMxNi41NjkgMCAzMC0xMy40MzEgMzAtMzAgMC01LjA2LTEuMjUzLTkuODI4LTMuNDY1LTE0LjAxbC0yNy41MzUuMDA5YzguNTk5IDEuOTI5IDE0LjE4OCA1Ljc2OSAxMS45OTMgMjAuNjEzbC0xMy42NzUgMjMuMjY4YzAgMCAxLjc3OC4xMTggMi42ODEuMTE4IiBmaWxsPSIjNjY2Ii8+PHBhdGggZD0ibTgxLjU1IDQxLjAxYy01LjAzLTkuNTI0LTE1LjAzLTE2LjAxLTI2LjU0OC0xNi4wMS0xMC40NyAwLTE5LjY4OCA1LjM2NC0yNS4wNSAxMy40OTRsMTIuMjM1IDIxLjUwNmMtMy4zMzEtMTUuNzg4IDExLjgyLTE4Ljk4NSAxMS44Mi0xOC45ODVoMjcuNTQ4IiBmaWxsPSIjMzMzIi8+PHBhdGggZD0ibTU0LjUgNjhjNy40NTYgMCAxMy41LTYuMDQgMTMuNS0xMy41IDAtNy40NTYtNi4wNC0xMy41LTEzLjUtMTMuNS03LjQ1NiAwLTEzLjUgNi4wNC0xMy41IDEzLjUgMCA3LjQ1NiA2LjA0IDEzLjUgMTMuNSAxMy41bTAtMmMtNi4zNTEgMC0xMS41LTUuMTQ5LTExLjUtMTEuNSAwLTYuMzUxIDUuMTQ5LTExLjUgMTEuNS0xMS41IDYuMzUxIDAgMTEuNSA1LjE0OSAxMS41IDExLjUgMCA2LjM1MS01LjE0OSAxMS41LTExLjUgMTEuNSIgZmlsbD0iIzY1OWVjZSIvPjwvZz48L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlNWEwMGQiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NC4yMSA1My4zYy0uMTIyLS4xNTctLjI4Ni0uMjEzLS40NDUtLjIxMy0uMTI3IDAtLjI0OC4wNzItLjM0NC4ybC0xMS40ODIgMTMuNjIxYy0uMjE3LjI4My0uMTA0LjYwNS4yNTIuNjA1bDYuODA5LjAyOXYxMy41MDljMCAuNjYyLjMxNC45MjQuOTc0LjkyNmw3LjY2Mi4wMTljLjY2LjAwMi45MzctLjI1OS45MzctLjkyM2wuMDI1LTEzLjUzMmg2LjgzOGMuMzU2IDAgLjQ3LS4zNDMuMjUyLS42MjZsLTExLjQ3OC0xMy42MTVtMTYuMzktMTQuMjE2Yy0xLjUwNiAwLTIuOTUzLjI0Ny00LjMxMi42OTEtMi43NzEtNi4xNTMtOC45MjMtMTAuNDQxLTE2LjA5LTEwLjQ0MS05Ljc1NiAwLTE3LjY2MyA3LjkzOC0xNy42NjMgMTcuNzMgMCAuNjEuMDMxIDEuMjExLjA5IDEuODA0LTQuMTQ1LjkwOC03LjI1MiA0Ljc5Mi03LjI1MiA5LjIyNCAwIDUuMTEyIDQuMTMgOS40NDggOS4yMjQgOS40NDhoMi45NjNjLS4wODYtMS4wNDYuMTg3LTIuMTEuODY5LTIuOTk2bDEyLjA2LTEzLjc0OWMuNzAyLS45MzYgMS45NDMtMS41NjUgMy4yNzctMS41NjUgMS4zNzMgMCAyLjY0MS42MjIgMy40NzkgMS43MDRsMTEuODYyIDEzLjQ5Yy43NTEuOTY4IDEuMDQ1IDIuMDU5Ljk3IDMuMTE1aDEuMDFjNy43MDUgMCAxMy40NjQtNi40NyAxMy40NjQtMTQuMjI5IDAtNy43NTQtNi4yNDUtMTQuMjI4LTEzLjk1LTE0LjIyOCIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4="
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgdmlld0JveD0iMCAwIDExMCAxMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjMzMzIiBkPSJNMCAwaDExMHYxMTBIMHoiLz48cGF0aCBmaWxsPSIjMUYxRjFGIiBkPSJNNTQuNTkgMjVsMTkuNDA2IDI5Ljk5OC0xOS40MDYgMzBIMzd2LS4wMDZsMTkuNDEtMjkuOTk0TDM3IDI1aDE3LjU5Ii8+PC9nPjwvc3ZnPgo="},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM0NWFhNDIiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NS40OSAyNWMxNi42NTkgMCAzMC41NTggMTAuMTkyIDMzLjc4MyAyMy43NDQuMyAxLjI1OC41MDMgMi41MzEtLjA3NyAzLjM4My0uODIgMS4yMDUtMi42OTYuOTc3LTMuOTkuOTc3aC0yNC42MzNjLTIuNDg5IDAtNC4yOTQuMDMzLTYuNjQyLTEuMTM1LTEuODEyLS45MDItMi40NDItMS42NTgtMy42NzUtMy4wODItMS42NzMtMS45MzEtNC4xMzEtMy4xNS02Ljg3LTMuMTUtNS4wNCAwLTkuMTI4IDQuMTI4LTkuMTI4IDkuMjIxIDAgNS4wOTMgNC4wODcgOS4yMjEgOS4xMjggOS4yMjEgMi4xNzcgMCA0LjE3Ny0uNzcgNS43NDUtMi4wNTYuODE5LS42NzEgMS44OTEtMS45MjMgMi42NDgtMi43MjEgMS44NTQtMS45NTIgNC43NjEtMi41NzUgOC4wNy0yLjQ0OGgyNi4zMTVjMi43OTMtLjA2OCAzLjgxMS40ODYgMy4yODIgMy4wNTYtMi44NzMgMTMuOTMzLTE2Ljk4MSAyNC41MTItMzMuOTUzIDI0LjUxMi0xMC4yNjIgMC0xOS40NzctMy44NjktMjUuNzk0LTEwLjAxLS43NjItLjc0MS0xLjA3Mi0xLjY5LjAwNy0yLjI5NS4zOTktLjIyNC45OTEtLjM1IDEuODExLS4zNTJoMTcuNjg4YzEuODk0LjEwOCAzLjU4Mi42MDIgNS4wODYgMS40ODYgMS43NTYgMS4wMzMgMi4wNzIgMS43NDYgMy4zMjIgMy4wNTYgMS42NiAxLjc0MSAzLjk5MiAyLjgyNCA2LjU3NCAyLjgyNCA1LjA0IDAgOS4xMjgtNC4xMjggOS4xMjgtOS4yMjEgMC01LjA5My00LjA4Ny05LjIyMS05LjEyOC05LjIyMS0yLjE3NyAwLTQuMTc3Ljc3LTUuNzQ1IDIuMDU2LS44MTkuNjcxLTEuODkxIDEuOTIzLTIuNjQ4IDIuNzIxLTIuODMxIDIuOTgtNy41MiAyLjQ0OC0xMS4yNjYgMi40NDhoLTEzLjM2MWMtMi4wNzcgMC00LjM4Mi4yMTYtNi4xODItLjk3OC0xLjEzNC0uNzUzLTEuOTE4LTEuOTYtMi41MjUtMy43MDQtLjk0Ni0yLjcxNS0xLjQ1NS01LjU5My0xLjQ1NS04LjU3NCAwLTIuNTE1LjM2My00Ljk1NiAxLjA0NC03LjI4OCAxLjAxLTMuMzc5IDIuNjc2LTYuMDUgNy41OTgtNS45MTdoMTguMjk2YzIuNjcxLS4xMDIgNS4wODEuMjg1IDYuODg2IDEuNDY1Ljk4OS42NDcgMS4zNzQgMS4yNDIgMi4xMzcgMi4wODEuNTYzLjYxOSAxLjE3NSAxLjIzNSAxLjY5MyAxLjYyMyAxLjYyNSAxLjIxNiAzLjU2OCAyLjA1NiA1Ljc0NiAyLjA1NiA1LjA0IDAgOS4xMjctNC4xMjggOS4xMjctOS4yMjEgMC01LjA5My00LjA4Ni05LjIyMS05LjEyNy05LjIyMS0yLjc4NSAwLTUuMjc4IDEuMjYtNi45NTIgMy4yNDYtMS42MTkgMS45MjEtMy4yOTcgMy4xMzktNS40NzYgMy43MjctMS40ODkuNDAyLTIuNzA0LjM5My00LjIxLjM5M2gtMTYuMDNjLTMuMTY0LS4wMDktMy4wMzUtMS44MjktMS4xNS0zLjUyNiA2LjI3Ny01LjY1NiAxNS4xMi05LjE3OSAyNC45MTEtOS4xNzkiIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMzMjc3YmMiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00NS40MiA0OS4xOGgyMS4xMWMwLTcuNTQzLTMuMjctMTIuNjg1LTEyLjE4Ny0xMi42ODUtMTAuNTM4IDAtMjEuMjU0IDYuOTA0LTI2LjM0OCAxNS41MTIgMS41NzgtMTQuOTQxIDEyLjIyMy0yNyAyOC4yNS0yNyAxMy43MzYgMCAyNi43NTEgMTAuNTcgMjYuNzUxIDI4LjE0djYuNjhoLTM3LjQ2M2MwIDkuMDkgNy44ODEgMTIuNjk0IDE2LjEzIDEyLjY5NCAxMC4wNCAwIDE2LjI2NS00LjU0MyAxNi4yNjUtNC41NDN2MTIuNzM1YzAgMC03LjAyIDQuMjkzLTE4LjIxNSA0LjI5My0xNC41NDUgMC0yNC44MTMtMTAuNDkxLTI0LjgxMy0yMy41MzYgMC0xMC4yNCA2LjE1NC0xOC40MTUgMTQuNjc5LTIxLjc4OS00LjE1IDQuNTg2LTQuMTY0IDkuNTAyLTQuMTY0IDkuNTAyIiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlYjc3MWYiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01MS4yMyA0MC45MDljLS42MjItLjA3NC0xLjI2LS4wMDEtMS44OTEuMDEzLTEuNjE2LS41NjktMi40MTQtMi4xODEtMy44MzItMy0uMDcxLTIuNjc0IDEuODQ1LTQuMzQ1IDMuMzg5LTYuMjE3LS45ODUtLjU2Ni0xLjc2Ny0uMTMyLTIuMjk0LjIxNy0yLjkyNyAxLjkzOC02LjA1IDIuNzY2LTkuNTkxIDMuMDY0LTIuNTI4LjIxMy0zLjcyOS0uMzE4LTQuMzk5LTIuNTY0LS4zNjMtMS4wNDItLjcyNi0yLjA4NC0xLjE0Ni0zLjI4OC0yLjI2MyAyLjAzMi0yLjk2NyA0Ljc3MS0yLjkgNy40MTYuMDkxIDMuNTk4LTEuNzc4IDYuMTIyLTMuNTY5IDguODA2LS4xODYgMy4xMzEuNDI1IDExLjIwNi40ODggMTEuMzg5IDEuNzYxIDEzLjE1MiAxMi4zMTEgMjMuMjQgMjYuMTggMjUuMDQuMTg0LjA2OCAzLjg2OC4zMiA2LjI5NS4wMTEgMTIuOTQ3LTEuNzcgMjMuMjMtMTEuOTI3IDI2LjA2LTI1LjcwMi4yNzQtMS4zMzUgMS4wMzEtNy43Ljg5NC05LjMwMy0uMDg1LS4wMzEtLjE2NC0uMTM1LS4yMzYtLjMzNy4wMDEtLjg3Ni0xLjIzOC0uNTI5LTEuMzM1LTEuNjgyLS40NTEtNS4zODMtMy43NTItOS4zMTItNy4xOS0xMy4xMi0yLjg4Ny0uNzkyLTUuMzk3LTIuNjQ2LTguNDQ3LTIuOTg1LTEuMjgzLS4xNDMtMi41NjMtLjMzNC00LjQ4LS41ODggMS42MjUgMS41MDEgMy40NjEgMS43MjggNC4zMDEgMy40Ni0uOS4xMzctMS42ODQuMjU1LTMuMTI4LjQ3NCA1LjA2NiAyLjc4OSAxMC4yNzUgNC43NTMgMTEuNzc3IDExLjAyLS45MDktLjM3Ny0xLjUyMy0uNjMyLTIuMzU3LS45NzguNTIyIDMuNzE2IDEuMzUyIDcuMjAyLjM1OCAxMS4xNjctLjY2Ni0xLjAxNi0xLjA5Ni0xLjY3MS0xLjg2MS0yLjgzOC0uMTgyIDQuNjA4LjMzIDguODE1LTEuOTk0IDEyLjQ5bC0uNTM5LTEuNjg2Yy0xLjM5My0uODM5LTEuNDU2LjY4Ny0xLjg5OSAxLjIwNS01LjMyOSA2LjIyOC0xMS42NjYgNy41NDYtMTguMTEgMy42NDUtLjg1OC0uNTE5LTEuODM4LS45NDktMi40MTktMi40NjMgNS4wODQuOTcxIDguMjYxLTMuMTI3IDEyLjYwMS00LjEyOSAxLjMwMS0uMy40NDMtMS40NDYtLjEzOC0xLjk3My0xLjk0My0xLjc2MS00LjE1Mi0yLjAyOC02LjU1OS0uOTY3LTQuMjcyIDEuODgyLTYuNzgyIDEuMjE0LTkuNTE2LTIuNDM2LS41MzctLjcxNi0uOTY2LTEuNDIxLS41MjgtMi4zMjUuNDUyLS45MzIgMS4yOTMtLjg4OCAyLjE3NS0uOTE3IDEuMTQ2LS4wMzggMi42MTcgMS4yNzkgMy4zMTUuMDY0Ljc2OS0xLjMzOC0uMTk3LTIuOS0uODczLTQuMjU5LjE2OC0uMTkzLjMzNy0uMzg0LjUwNi0uNTc2IDEuNDgyLTEuMTAyIDMuMzIyLTEuNzU4IDQuMzIyLTMuNDYxLS4wNy0uMDgxLS4xNC0uMTUtLjIxMS0uMjA3LjEzNy4wMDIuMjc0LjAwNC40MTEuMDA2LjIzMS0uNTE5LjMzNC0xLjAxLS4zMDItMS4zMjktLjQ0NS0uMDYxLS45MzktLjI5OC0xLjMyOC0uMTU0IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMDhiY2YiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01OC4wNyAxOS42MDd2MzUuMzhjMCAzLjI1OS0yLjI1MiAzLjE0NS01Ljc3IDMuODU5LTUuNDg5IDEuMTE1LTE0LjE0IDEuMTkyLTIyLjc2OSAxLjE2Ny05LjEyNi0uMDI3LTE4LjI5OS0uMDY2LTIzLjcwMS0xLjQxNi0yLjkyOS0uNzMyLTQuODI5LS43NC00LjgyOS0zLjU5OHYtMzUuMzhjMC0zLjMwMyAyLjI1Mi0zLjE0NSA1Ljc3LTMuODU5IDQuMDU4LS44MjQgOS44NDgtMS4wODEgMTYuMDgtMS4xNDlsLTguNzY4LTExLjExYy0xLjQzMy0xLjgxNi0xLjEwOC0yLjI2OC0uNDY1LTIuODM5LjY0My0uNTcxIDEuMjk2LS43NzYgMi44MDIuNzYzbDEyLjg5NCAxMy4xN2guMjEybDEzLjEyLTEzLjMzNmMxLjYyNi0xLjY1MyAyLjE0LTEuMzY0IDIuNzkxLS44MDIuNjUxLjU2Mi45MDYgMS4xNTgtLjQyNCAyLjg0NWwtOC45NDQgMTEuMzMzYy4yMjguMDAzLjQ1Ni4wMDYuNjgzLjAwOSA2LjUyMi4wOTIgMTIuNTI0LjM3NyAxNi40OTEgMS4zNjggMi45MjguNzMyIDQuODI5LjkwNCA0LjgyOSAzLjU5N20tNTQuMzMuMjYzdjM0Ljc3NmMwIC4yMi4yNTYuMzk5LjU2OC4zOTloNTAuMjVjLjMxMyAwIC41NjgtLjE4LjU2OC0uMzk5di0zNC43NzZjMC0uMjItLjI1NS0uMzk5LS41NjgtLjM5OWgtNTAuMjVjLS4zMTIgMC0uNTY4LjE4LS41NjguMzk5bTcuMzA2IDUuMDcyaDkuNDYyYy4zNjcgMCAuNjY4LjI5OC42NjguNjYxdjUuMjg4YzAgLjM2NC0uMzAxLjY2MS0uNjY4LjY2MWgtOS40NjJjLS4zNjcgMC0uNjY4LS4yOTctLjY2OC0uNjYxdi01LjI4OGMwLS4zNjQuMzAxLS42NjEuNjY4LS42NjFtMTMuODYxIDE4LjE4aDkuNDYyYy4zNjcgMCAuNjY4LjI5OC42NjguNjYxdjUuMjg4YzAgLjM2NC0uMzAxLjY2MS0uNjY4LjY2MWgtOS40NjJjLS4zNjcgMC0uNjY4LS4yOTctLjY2OC0uNjYxdi01LjI4OGMwLS4zNjMuMzAxLS42NjEuNjY4LS42NjFtMC0xOC4xOGg5LjQ2MmMuMzY3IDAgLjY2OC4yOTguNjY4LjY2MXY1LjI4OGMwIC4zNjQtLjMwMS42NjEtLjY2OC42NjFoLTkuNDYyYy0uMzY3IDAtLjY2OC0uMjk3LS42NjgtLjY2MXYtNS4yODhjMC0uMzY0LjMwMS0uNjYxLjY2OC0uNjYxbS0xMy44NjEgOC45MjNoOS40NjJjLjM2NyAwIC42NjguMjk3LjY2OC42NjF2NS4yODhjMCAuMzYzLS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MW0yNy4zODcgOS4yNTNoOS40NjJjLjM2NyAwIC42NjguMjk4LjY2OC42NjF2NS4yODhjMCAuMzY0LS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2My4zMDEtLjY2MS42NjgtLjY2MW0tMjcuMzg3IDBoOS40NjJjLjM2NyAwIC42NjguMjk4LjY2OC42NjF2NS4yODhjMCAuMzY0LS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2My4zMDEtLjY2MS42NjgtLjY2MW0yNy4zODctOS4yNTNoOS40NjJjLjM2NyAwIC42NjguMjk3LjY2OC42NjF2NS4yODhjMCAuMzYzLS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MW0tMTMuNTI2IDBoOS40NjJjLjM2NyAwIC42NjguMjk3LjY2OC42NjF2NS4yODhjMCAuMzYzLS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MW0xMy41MjYtOC45MjNoOS40NjJjLjM2NyAwIC42NjguMjk4LjY2OC42NjF2NS4yODhjMCAuMzY0LS4zMDEuNjYxLS42NjguNjYxaC05LjQ2MmMtLjM2NyAwLS42NjgtLjI5Ny0uNjY4LS42NjF2LTUuMjg4YzAtLjM2NC4zMDEtLjY2MS42NjgtLjY2MSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjYgMjUpIiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM1MjkwY2QiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIGZpbGw9IiMxZjFmMWYiPjxwYXRoIGQ9Im02MS4xOCAzMC44NzZjLTEuNjk2LS4yNjYtMy40NzUtLjQwNS01LjMyOS0uNDA1LTcuNDY2IDAtMTMuNDg4IDIuMTgyLTE4LjA3IDYuMjk2LTUuMjA3IDQuNzM4LTguMDkzIDEwLjk0MS04LjA5MyAxOC4xMSAwIC4wNiAwIC4xMjEuMDAxLjE4MSA3LjMyNi0xMS40MDQgMTguNTkzLTE3LjI0NiAyMS41ODEtMTguNzg5LjQ3LS4yMTguNzUzLjM0My4zMTQuNTYxLTUuMTQ3IDMuMDYzLTE0LjgxIDEyLjA4LTIwLjgzMSAyNS4wNCAxLjQ3NCA0Ljc0NCA0LjQyNiA5IDguNTM0IDEyLjExIDQuNTQ4IDMuMzk3IDEwLjMyIDUuMTEyIDE3LjQwOSA1LjExMiAxMy4wMiAwIDIyLjE1LTcuMTM4IDI1LjQwOC0xNy41NDlsLTE3Ljg4LS4wMzFjLS43NTMgMy42NzgtMy4yNjMgNS42NDItNy4xODQgNS42NDItNC45MjUgMC04LjMxMi0yLjY4MS04LjUzMi04Ljg4M2wzMy45NC0uMDMxYy4wNjMtMS4yNzgtLjA5NC0yLjE4My0uMDk0LTMuMTggMC0xMS42MjgtNy0yMC43MjEtMTguMzkzLTIzLjYxOSA0LjY0Mi0yLjg2NSAxMy4zMS03LjEgMTcuNDg0LTMuNzE3IDMuMTM3IDIuNTI1IDEuNDEyIDcuODI0LjY1OSAxMC4wMS0uMTI1LjU2MS41MzQuNjU1LjY1OS4xMjUgMS41NjgtMy45MjggMi4wMzktOS4xOTUtLjI1MS0xMS4yNTMtNC43MjMtNC4yMjYtMTUuNDI1Ljg0Mi0yMS4zMzQgNC4yN20zLjEwOSAxOS42MDdoLTE1Ljg0MWMuMDk0LTUuMzkyIDMuOTg0LTcuNzMgOC4wNi03LjczIDQuMjk4IDAgNy43NzkgMi40NjMgNy43NzkgNy43MyIvPjxwYXRoIGQ9Im0zMC42IDgzLjg3Yy02LjQ2Mi00LjA1Mi0zLjIzMS0xNS4wOS41OTYtMjIuOTQxbDIuOTggNi4zNThjLTIuNjk4IDUuNzM1LTQuMjA0IDExLjg0NS0xLjI4NiAxNC4wMyAzLjc2NCAyLjgwNSAxMS41MTIuMzQzIDE3LjAzLTIuOTkybDEuNzg4LjE1NmMtNy4xMiA0LjcwNy0xNi4xMiA4LjUwOS0yMS4xMSA1LjM5MiIvPjwvZz48L2c+PC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNkOGQ4ZDgiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDM4KSIgZmlsbD0iIzFmMWYxZiI+PHBhdGggZD0ibTEuNzA4IDEwLjE3Mmg1LjE3OXYyMi45NDhoLTUuMTc5eiIvPjxwYXRoIGQ9Im0yNS4xOSAxLjA4MWMtNy43MDIgMC0xMy45NDcgNS44NDgtMTMuOTQ3IDE2LjQyIDAgMTAuNTcyIDYuMjQ1IDE2LjQyIDEzLjk0NyAxNi40MiA3LjcwMiAwIDEzLjgzOS03LjA2IDEzLjgzOS0xNi40MDUgMC0xMC4zOTUtNi4xMzctMTYuNDM0LTEzLjgzOS0xNi40MzRtLjAzMiA0LjU4YzQuNDU5IDAgOC4yNDIgNi4yNzYgOC4xNTYgMTIuNTQyLS4wODUgNi4yNjYtMy42OTcgMTEuMTM4LTguMTU2IDExLjEzOC00LjQ1OSAwLTguMzY4LTQuMjE5LTguMzY4LTExLjg0IDAtNy42MiAzLjkwOS0xMS44NCA4LjM2OC0xMS44NCIvPjxwYXRoIGQ9Im03LjcwMyA0LjEyNmMwIDEuNzY0LTEuNTAzIDMuMTk0LTMuMzU3IDMuMTk0LTEuODU0IDAtMy4zNTctMS40My0zLjM1Ny0zLjE5NCAwLTEuNzY0IDEuNTAzLTMuMTk0IDMuMzU3LTMuMTk0IDEuODU0IDAgMy4zNTcgMS40MyAzLjM1NyAzLjE5NCIvPjxwYXRoIGQ9Im00Mi42NzcgMjYuNzA5YzAgMCAzLjI0NiAyLjEwNCA3LjUyNiAyLjAyOSA0LjI4LS4wNzUgNS4wOTEtMi42MyA1LjAyLTQuODA5LS4wNzQtMi4xNzktMy4wMi0zLjk1OS02Ljg2Mi01LjE4Ni00Ljk0NC0xLjU3OC02LjkzNi02LjkxNC02LjM0Ni0xMC43NDcuNTktMy44MzIgNS40Ni02LjkxNCAxMC45Mi02LjY4OCA1LjQ2LjIyNSA2LjcxNCAxLjY1MyA2LjcxNCAxLjY1M2wtMS4yNTQgNC43MzRjMCAwLTIuODA0LTIuMDI5LTUuMDkxLTEuOTU0LTIuMjg3LjA3NS01LjYwOCAxLjI3Ny01LjgyOSAzLjMwNy0uMjIxIDIuMDI5IDEuNjIzIDQuMDU4IDQuMTMyIDUuMjYgMi41MDkgMS4yMDIgOS43MzkgMy45MDggOS4zNzEgMTAuMjIxLS4zNjkgNi4zMTMtNS40NiA3Ljg5LTcuODIxIDguNjQzLTIuMzYxLjc1MS02LjQ5My4wNzUtOC4zMzgtLjQ1MS0xLjg0NS0uNTI2LTMuNjg5LTEuMTI3LTMuNjg5LTEuMTI3bDEuNTUtNC44ODUiLz48L2c+PC9nPjwvc3ZnPg=="
},function(e,t,n){e.exports=n.p+"desktop/common/img/devices/linux.e80fefdbe1947faf2913d4ce0043c707.svg"},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlMjA2MTMiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NS40NyA4NC45NjljLTMuNjI4IDAtNy4wMi0uNzEtMTAuMTM5LTIuMTQxLTMuMTIxLTEuNDM1LTUuOTI2LTMuNTU4LTguNDEzLTYuMzQzLTIuNzE3LTIuOTg5LTQuNzI5LTYuMjI5LTYuMDEtOS43MTgtMS4yOC0zLjQ4MS0xLjkwNi03LjQtMS45MDYtMTEuNzQ0IDAtNC4zNDQuNjI1LTguMjYgMS45MDYtMTEuNzQxIDEuMjgtMy40ODcgMy4yOTItNi43MjkgNi4wMS05LjcxOCAyLjUxMy0yLjgwOSA1LjMyNS00Ljk1MyA4LjQ1Mi02LjQwMiAzLjEyNy0xLjQ0MyA2LjQ5OS0yLjE2MiAxMC4xLTIuMTYyIDMuNjAyIDAgNi45NzcuNzE5IDEwLjEgMi4xNjIgMy4xMjQgMS40NDkgNS45NDEgMy41OTMgOC40NDggNi40MDIgMi42OTMgMi45NjYgNC42ODggNi4xODggNS45NTMgOS42NiAxLjI2OCAzLjQ2NiAxLjg4NSA3LjQwNiAxLjg4NSAxMS44IDAgNC4zOTQtLjYxNyA4LjMzNy0xLjg4NSAxMS44LTEuMjY1IDMuNDc1LTMuMjYgNi42OTQtNS45NSA5LjY2Mi0yLjQ5IDIuNzg2LTUuMjg2IDQuOTA5LTguNDEzIDYuMzQzLTMuMTI3IDEuNDMxLTYuNTA4IDIuMTQxLTEwLjEzNiAyLjE0MW0wLTMuODcyYzQuMDc3IDAgNi42NzMtMS41NTUgOC4xMzYtNC41NyAxLjU2OS0zLjIxOSAyLjQ1Ny0xMC4yNzIgMi40NTctMjEuNTA0IDAtMTEuMjI2LS44ODgtMTguMjgyLTIuNDU3LTIxLjUwNi0xLjQ2My0zLjAxLTQuMDU5LTQuNTY1LTguMTM2LTQuNTY1LTQuMSAwLTYuNzIgMS41Ny04LjIwMSA0LjYwOS0xLjU4NCAzLjI0OC0yLjQ3MiAxMC4yODktMi40NzIgMjEuNDYyIDAgMTEuMTc2Ljg4OCAxOC4yMiAyLjQ3MiAyMS40NjggMS40ODEgMy4wMzYgNC4xIDQuNjA2IDguMjAxIDQuNjA2IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNkOGQ4ZDgiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im03MS45NDIgNTYuODc4Yy0uMDcyLTcuNTk1IDYuMjI1LTExLjI0NCA2LjUxLTExLjQyMS0zLjU0Mi01LjE1OC05LjA1LTUuODY1LTExLjAyLTUuOTUtNC42OTMtLjQ3My05LjE1NiAyLjc1Mi0xMS41MzQgMi43NTItMi4zNzggMC02LjA1LTIuNjgtOS45NDItMi42MDctNS4xMTcuMDczLTkuODI5IDIuOTYtMTIuNDY3IDcuNTE5LTUuMzEgOS4xODQtMS4zNTcgMjIuNzg1IDMuODIgMzAuMjMgMi41MzEgMy42NDEgNS41NDcgNy43NCA5LjUxMSA3LjU5MSAzLjgxNy0uMTQ4IDUuMjU5LTIuNDU2IDkuODY5LTIuNDU2IDQuNjEyIDAgNS45MSAyLjQ1NiA5Ljk0NSAyLjM4IDQuMTA3LS4wNzIgNi43MDctMy43MTMgOS4yMi03LjM2OCAyLjkwNi00LjIyOSA0LjEwMS04LjMyNCA0LjE3My04LjUzNC0uMDktLjA0MS04LjAxLTMuMDYyLTguMDktMTIuMTRtLTcuNTgyLTIyLjI5N2MyLjEwNS0yLjUzOCAzLjUyMS02LjA3IDMuMTMzLTkuNTgxLTMuMDMuMTIzLTYuNjk5IDIuMDEtOC44NzUgNC41NDctMS45NDkgMi4yNDYtMy42NTYgNS44MzYtMy4xOTQgOS4yODEgMy4zNzguMjYxIDYuODMxLTEuNzEyIDguOTM2LTQuMjQ3IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9IjAiIGQ9Im01NC41OSAyNWwxOS40MDYgMjkuOTk4LTE5LjQwNiAzMGgtOC43OTctOC43OTN2LS4wMDZsMTkuNDEtMjkuOTk0LTE5LjQxLTI5Ljk5OGgxNy41OSIgZmlsbD0iIzFmMWYxZiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlNWEwMGQiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjx1c2UgeGxpbms6aHJlZj0iIzAiLz48L2c+PC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiNlNWEwMGQiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im0zMCA2MGMxNi41NjkgMCAzMC0xMy40MzEgMzAtMzAgMC0xNi41NjktMTMuNDMxLTMwLTMwLTMwLTE2LjU2OSAwLTMwIDEzLjQzMS0zMCAzMCAwIDE2LjU2OSAxMy40MzEgMzAgMzAgMzBtLS41NzEtNDguNzJsMTIuMTQ5IDE4Ljc0OS0xMi4xNSAxOC43NWgtNS41MDQtNS41MDR2LS4wMDRsMTIuMTQ3LTE4Ljc0Ni0xMi4xNDctMTguNzQ2di0uMDAyaDExLjAxIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSAyNSkiIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiM4ZTIzZTEiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE2IDQyKSIgZmlsbD0iIzFmMWYxZiI+PHBhdGggZD0ibTIxLjUxMiAyNC4yMWgtNy4wMWwtNS41NjQtNy43MzloLTEuODcxdjcuNzIyaC02LjE3NXYtMjMuMmg4Ljg0N2M1LjEgMCA5LjI2MyAzLjQ3NyA5LjI2MyA3Ljc1NCAwIDIuNjA5LTEuNTk2IDQuOTM5LTQuMDMgNi4zNjVsNi41MzMgOS4xbS04LjY4NC0xNS40NjNjMC0yLjE1OC0xLjczMi0zLjg5NS0zLjg0OS0zLjg5NWgtMS45MDl2Ny43NTZoMS45MDljMi4xMTggMCAzLjg0OS0xLjczOSAzLjg0OS0zLjg2MSIvPjxwYXRoIGQ9Im0zNy45ODIgMTUuMTFjMCA1LjI1NS00LjI2MyA5LjQ2My05LjUwNiA5LjQ2My01LjI0IDAtOS40NzItNC4yMDgtOS40NzItOS40NjMgMC01LjI1MSA0LjIzMS05LjQ2MSA5LjQ3Mi05LjQ2MSA1LjI0MiAwIDkuNTA2IDQuMjEgOS41MDYgOS40NjFtLTkuNTA2LTQuOTcyYy0xLjYzMSAwLTMuMDIgMi4yMjItMy4wMiA0Ljk3MiAwIDIuNzUxIDEuMzg3IDQuOTc2IDMuMDIgNC45NzYgMS42NjggMCAzLjA1NC0yLjIyNSAzLjA1NC00Ljk3NiAwLTIuNzUxLTEuMzg1LTQuOTcyLTMuMDU0LTQuOTcyIi8+PHBhdGggZD0ibTUyLjQ3IDYuMDNsLTcuMTE0IDcuMTN2LTcuMTU0aC02LjE3NHYxOC4xOGg2LjE3NHYtNy4zNzVsNy40MjcgNy4zNzVoNy43NzJsLTkuNDM4LTkuNDYyIDcuODE3LTcuODMzdjEwLjc4OWMwIDMuNTgyIDIuMTQ5IDYuODg4IDcuNTYxIDYuODg4IDIuNTY5IDAgNC45MjctMS40NjEgNi4wNzMtMi43ODNsMi43NzYgMi40aDEuMzE4di0xOC4xNmgtNi4xNzR2MTEuNzU2Yy0uNjk1IDEuMjE2LTEuNjY1IDEuOTgxLTMuMTYyIDEuOTgxLTEuNTE5IDAtMi4yMTYtLjkwMy0yLjIxNi0zLjc5di05Ljk0N2gtMTIuNjQiLz48L2c+PC9nPjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMGEzZGIiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDI1KSIgZmlsbD0iIzFmMWYxZiI+PHBhdGggZD0ibTMwIDBjLTE2LjU2OSAwLTMwIDEzLjQzMS0zMCAzMCAwIDE2LjU2OSAxMy40MzEgMzAgMzAgMzAgMTYuNTY5IDAgMzAtMTMuNDMxIDMwLTMwIDAtMTYuNTY5LTEzLjQzMS0zMC0zMC0zMG0yNS4xOSAzMy41MTVjLTEuMzE0IDEwLjE5NC05LjI1NSAxOC45NDQtMTkuMjg2IDIxLjIxLTEuMTY4LjI2NC0yLjM4My4zMi0zLjU1My41NzctLjk1MS4yMDktMS40NTctLjA5Mi0xLjY5OC0xLjAxLS4wOTEtLjM0OS0uMy0uNjY2LS40NjUtMS4wMTgtLjEwOC4xMDEtLjE4NC4xNDMtLjIxOC4yMDctMS4wNTIgMS45OC0xLjA1MSAxLjk4LTMuMjQ4IDEuNzE5LTExLjc0LTEuMzk2LTIxLjI2OC0xMS41NzQtMjEuOTY2LTIzLjQzMS0uMDM0LS41ODMuMTQ0LS44NDcuNjU0LTEuMDI3LjQzNC0uMTUzLjg0My0uMzc3IDEuMzA5LS41OTItLjA3Ni0uMTU3LS4wODMtLjIwNC0uMTA4LS4yMTgtMS45NjktMS4wNTItMS45NjktMS4wNTItMS42ODYtMy4yNzMgMS41LTExLjc5MyAxMS42ODktMjEuMjkyIDIzLjQ4NS0yMS45MTcuNTEzLS4wMjcuNzg4LjA5OS45NjYuNTc5LjE4Ni41MDMuNDQzLjk3OS41OTMgMS4zMDMuMTk4LjIxNy4yNDIuMTk2LjI5LjA5Mi45ODgtMi4xMTMuOTg5LTIuMTEzIDMuMzE0LTEuNzggMTEuODc3IDEuNzAxIDIwLjkyOSAxMS40MTggMjEuNzgyIDIzLjM1NC4wMzkuNTQ1LS4wNDUuODc2LS41OTEgMS4wNjYtLjQ2MS4xNjEtLjg5NC40MDItMS4zMzcuNjA2LjA2NC4xMzQuMDc4LjIzMi4xMjguMjU2IDEuOTM4Ljk0MSAxLjkzOS45NCAxLjYzNSAzLjI5NSIvPjxwYXRoIGQ9Im00MS40MSAyOC43MjNjLTEuNDgtLjIzMS0yLjUzNC0uNzE2LTIuNzQ0LTIuMzQ4LS4wMzctLjI5LS4yMjEtLjU4OC0uNDA4LS44MjYtLjQ2Ni0uNTk1LS4yOTctMS4wNDcuMTE2LTEuNjIyIDIuMTctMy4wMyA0LjI5MS02LjA4NiA2LjQyMS05LjE0MS4xNjEtLjIzLjQ2MS0uNDExLjM4LS43NzktLjQ5My0uMTUyLS43MTMuMjU3LS45ODYuNDc5LTIuMzQ3IDEuOTEyLTQuNzI1IDMuNzktNi45OTkgNS43ODctMS4zNDUgMS4xODEtMi41MzggMi4wOTYtNC4zOTYuODg1LS41NjctLjM3LS45MzMtLjYzOC0xLjA3Ni0xLjI4Mi0uNDc3LTIuMTU1LS45ODgtNC4zMDMtMS40ODUtNi40NTMtLjA2OC4wMDktLjEzNi4wMTgtLjIwNC4wMjYtLjUyMSAyLjE3OC0xLjA2OSA0LjM1MS0xLjU0NCA2LjUzOS0uMTMzLjYxMi0uMzY0Ljg3MS0uOTg4IDEuMDYyLTMuMTc5Ljk3NC01LjM2MiAzLjAzOC02LjM2MyA2LjIzNi0uMjI2LjcyMS0uNTU0IDEuMDQtMS4zMDYgMS4xOTQtMi4wOTEuNDI4LTQuMTU4Ljk3LTYuMjM1IDEuNDY3IDEuODQ3LjY2NyAzLjY2OCAxLjE0OSA1LjUxNCAxLjUwNCAxLjE0Ny4yMiAyLjAyOC41MzggMi4xODkgMS44OTcuMDYuNTA4LjM3NyAxLjAzMi43MDMgMS40NS40MjQuNTQ1LjI5My45MTUtLjA3NCAxLjQxNy0yLjIyIDMuMDM4LTQuNDA4IDYuMDk5LTYuNjAzIDkuMTU2LS4xNi4yMjItLjQxMS40Mi0uMzg4Ljc3Ni41MDEuMDY4LjcxNi0uMjUxLjk3My0uNDU2IDIuNDg0LTEuOTg5IDUuMDItMy45MjQgNy40MTgtNi4wMSAxLjIzNS0xLjA3MiAyLjI5LTEuNjc1IDMuOTE5LS43NDkuNjkuMzkyIDEuMTU0LjY0OSAxLjMyNCAxLjQ3NC40MzQgMi4xMTMuOTcyIDQuMjA0IDEuNDY5IDYuMzA0LjY5Ni0yLjE4NSAxLjIwMy00LjM1MyAxLjcwMS02LjUyNC4xMzQtLjU4NS4zMy0uOTcxIDEuMDI3LTEuMTgzIDMuMi0uOTczIDUuMjk1LTMuMTM1IDYuMjc4LTYuMzE3LjE5NS0uNjMuNTA5LS44NTkgMS4wOC0uOTg1IDEuNzc5LS4zOSAzLjU1Ny0uNzg1IDUuMzItMS4yMzcuMzktLjEuOTE1LS4wMSAxLjI0NC0uNTE3LTEuODEyLS40MzItMy41MjUtLjk1Mi01LjI3OC0xLjIyNW0tMTcuMTMgNC4xODhjLTEuMjY4LTIuMjY2LS45MTEtNS4xMzMuODA0LTcuMTE4IDEuODQ0LTIuMTM0IDQuNjczLTIuODQyIDcuNDE5LTEuNzQ4LTEuNjAyIDEuMzU2LTMuMjc5IDIuNTMyLTQuNjQyIDQtMS4zNDggMS40NTMtMi4zNzggMy4yMDEtMy41ODEgNC44NjZtMTAuODQ3IDEuMzA0Yy0xLjkwOSAyLjIyOS00LjMyMiAyLjgzNy03LjUxNiAxLjk5MSAzLjU3OC0yLjM4IDYuMzA0LTUuMjQ1IDguMjkzLTguODkyIDEuMTc0IDIuMjUuODQgNS4wMS0uNzc3IDYuOTAxIi8+PC9nPjwvZz48L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64, "
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMWFjY2EiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im00OS42MjEgNjAuMjljLjY2NC42OTIgMS40NjEgMS4yMzMgMi4zODggMS42Mi45MjcuMzg4IDEuOTMzLjU4MiAzLjAyLjU4MiAxLjA4NCAwIDIuMDgxLS4xOTQgMi45OTEtLjU4Mi45MS0uMzg3IDEuNjk3LS45MjggMi4zNjItMS42Mi42NjQtLjY5MSAxLjE4MS0xLjUxIDEuNTQ4LTIuNDU1LjM2Ny0uOTQ1LjU1MS0xLjk3NS41NTEtMy4wODh2LTIxLjY0M2gtMTQuOTU3djIxLjY0M2MwIDEuMTE0LjE4NCAyLjE0NC41NTEgMy4wODguMzY3Ljk0NS44ODMgMS43NjQgMS41NDggMi40NTVtMjcuMDUtMjcuMTloLTZ2MjEuOTQ3YzAgMi4xMjYtLjMzMyA0LjA4NC0uOTk3IDUuODcyLS42NjUgMS43ODktMS42NTMgMy4zNDItMi45NjUgNC42NTgtMS4zMTIgMS4zMTYtMi45NDggMi4zNDYtNC45MDcgMy4wODgtMS45Ni43NDItNC4yMTcgMS4xMTQtNi43NyAxLjExNC0yLjU5IDAtNC44NjQtLjM3Mi02LjgyMy0xLjExNC0xLjk2LS43NDItMy41OTUtMS43NzItNC45MDctMy4wODgtMS4zMTItMS4zMTYtMi4zMDEtMi44NjgtMi45NjUtNC42NTgtLjY2NS0xLjc4OC0uOTk3LTMuNzQ2LS45OTctNS44NzJ2LTIxLjk0N2gtNmMtNC42MDIgMC04LjMzMyAzLjcxNC04LjMzMyA4LjI5N3YyOC4yMWMwIDQuNTgyIDMuNzMxIDguMjk3IDguMzMzIDguMjk3aDQzLjMzYzQuNjAyIDAgOC4zMzMtMy43MTQgOC4zMzMtOC4yOTd2LTI4LjIxYzAtNC41ODItMy43MzEtOC4yOTctOC4zMzMtOC4yOTciIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMwMGJkZjYiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im0yNC45MDMgNTYuMzN2MjAuMjI3bDI0LjYwOSAzLjQyNXYtMjMuNTUxbC0yNC42MDktLjEwMW0yNC42MDktMjYuMThsLTI0LjYwOSAzLjYxM3YxOS45OThsMjQuNjA5LS4xMDF2LTIzLjUwOW0zNS41NjMgMjMuMzYydi0yOC41ODNsLTMyLjY4NSA0Ljc5OXYyMy45MmwzMi42ODUtLjEzNW0tMzIuNjg1IDI2Ljg2OGwzMi42ODUgNC41NDh2LTI4LjM1NGwtMzIuNjg1LS4xMzV2MjMuOTQiIGZpbGw9IiMxZjFmMWYiLz48L2c+PC9zdmc+"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMzOTMiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im01NC44NjMgMjVjLTE2LjQ5MyAwLTI5Ljg2MyAxMy40MTUtMjkuODYzIDI5Ljk2MyAwIDE2LjU0OCAxMy4zNyAyOS45NjMgMjkuODYzIDI5Ljk2MyAxNi40OTMgMCAyOS44NjMtMTMuNDE1IDI5Ljg2My0yOS45NjMgMC0xNi41NDgtMTMuMzctMjkuOTYzLTI5Ljg2My0yOS45NjNtLTExLjY5MSAxMy45NzZjMCAwIDcuOTk0LTQuMzY0IDE0LjgzNC44OTRsLTMuODI3IDEzLjE5NmMwIDAtNC4yODMtMi45Ni03LjQ2NC0yLjY0MS0zLjE4MS4zMTktNy4zNyAxLjg0Ny03LjM3IDEuODQ3bDMuODI3LTEzLjI5Nm0tLjg0NyAyNy4yOGMtMy4wNTMuMjU1LTUuNy43MjItNy40NjIgMS42MzdsMy44MDctMTMuMjk0YzAgMCA0LjI5MS0yIDcuODUzLTEuNzQ3IDMuNTYyLjI1NSA2LjQwNyAyLjE3OSA3LjAyIDIuNjIxbC0zLjg2NyAxMy4zMzNjMCAwLTQuMjk4LTIuODA2LTcuMzUyLTIuNTUxbTI0LjI1IDQuNTk3YzAgMC00LjIxIDEuOTc3LTguMDMgMS43ODUtMy44MTctLjE5Mi02LjEwOS0yLjM4Mi02LjgwNy0yLjY1OWwzLjgwOC0xMy4yMTZjMCAwIDQuMDgxIDIuNjYzIDYuNzUzIDIuNTk5IDIuNjMyLS4wNjMgNC40NTMtLjI3MSA4LjAyLTEuNjc2LjAyLS4wMDguMDYyLS4wMzYuMDc2LS4wNDYgMCAwIC4wMDEtLjAwMS4wMDEtLjAwMi4wMDctLjAwNC4wMDUtLjAwMi0uMDAxLjAwMi0uMDkyLjEwMi0zLjgyNiAxMy4yMTItMy44MjYgMTMuMjEybTQuNDgxLTE1LjQ5OWMtLjU4LjE5NS0yLjk2NiAxLjU4My03LjM1NSAxLjgzOS00LjM4OS4yNTUtNy41MDYtMi44MDgtNy41MDYtMi44MDhsMy44MzctMTMuMTJjMS4xLjc5NCAzLjE2MSAyLjIwNiA2LjQ2OCAyLjU4OCAzLjMwOC4zODMgOC4zNjUtMS43MzUgOC4zNjUtMS43MzVsLTMuODA5IDEzLjIzNiIgZmlsbD0iIzFmMWYxZiIvPjwvZz48L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEwIDExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMxMDdjMTAiIGQ9Im0wIDBoMTEwdjExMGgtMTEweiIvPjxwYXRoIGQ9Im0zOC4xIDI5Ljk4OWMtLjAzMS4wMjMtLjA1NC4wNTQtLjA4OS4wNzcuMTY5LS4xNzcuNDE0LS4zNjkuNTY5LS40NjkgNC42LTIuOTkxIDkuOTIzLTQuNTk3IDE1LjgyNi00LjU5NyA1LjUxNCAwIDEwLjY5NCAxLjUyOSAxNS4xIDQuMTc0LjMyMy4xODkgMS4xOTEuNzkxIDEuNjQgMS4zNC00LjI1NC00LjctMTYuNzc0IDUuMzc3LTE2Ljc3NCA1LjM3Ny00LjMzMS0zLjMzNy04LjMwNi01LjYxMS0xMS4yNzQtNi40MTctMi40NzctLjY4LTQuMTk0LS4xMjMtNSAuNTE0bTM3Ljg4IDQuNDQzYy0uMTM0LS4xNDYtLjI4LS4yOC0uNDExLS40MjYtMS4wNzEtMS4xODMtMi40LTEuNDcxLTMuNTgzLTEuMzk0LTEuMDk0LjM0Ni02LjEwNiAyLjE1NC0xMi4yODkgNy45OTEgMCAwIDYuOTU0IDYuNzYzIDExLjIxNyAxMy42ODMgNC4yNjMgNi45MiA2LjgwNiAxMi4zNTQgNS4yNDYgMTkuOSA0Ljc0My01LjIyMyA3LjY0My0xMi4xNTQgNy42NDMtMTkuNzc3IDAtNy43MTEtMi45NjktMTQuNzMxLTcuODIzLTE5Ljk3N20tMTAuNjI2IDIyLjgxMWMtMS44OTctMi4xMi00LjY5Ny01LjE1Ny04LjQxNC04Ljg1MS0uODAzLS44MDMtMS42NjMtMS42NC0yLjU2Ni0yLjUxMSAwIDAtMS4zNTEgMS4zNTEtMy4xMTQgMy4xMzctMi4yNjYgMi4yNzctNS4xOTEgNS4yNTctNi44MiA2Ljk4Ni0yLjg5MSAzLjA5MS0xMS4xODMgMTIuNzkxLTExLjY1MSAxOC4yMjYgMCAwLTEuODQzLTQuMzA2IDIuMjA5LTE0LjI1MSAyLjY0Ni02LjUwNiAxMC42MzctMTYuMjcxIDEzLjk3NC0xOS40NTQgMCAwLTMuMDQ2LTMuMzU3LTYuODc0LTUuNjY5bC0uMDIzLS4wMTFjMCAwLS4wNDYtLjAzNC0uMTExLS4wNzctMS44NDMtMS4wOTQtMy44NTEtMS45NDMtNS43ODMtMi4wNTQtMS45NzQuMTM0LTMuMjIzIDEuNTg2LTMuMjIzIDEuNTg2LTQuOTQ2IDUuMjU3LTcuOTYgMTIuMzMxLTcuOTYgMjAuMTEgMCAxNi4yMzcgMTMuMTcxIDI5LjQwOSAyOS40MDkgMjkuNDA5IDguNjE3IDAgMTYuMzc0LTMuNzE3IDIxLjc1NC05LjYyIDAtLjAxMS0uNjE0LTMuODk3LTQuNTc3LTkuNDU0LS45MjYtMS4zMDYtNC4zMzEtNS4zNjktNi4yMjktNy41IiBmaWxsPSIjMWYxZjFmIi8+PC9nPjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzJmNDc0MSIvPgogPHBhdGggZD0ibTE0MCAyNDRjMC04LjI0MyA1LjgzMi0xNS4zNDcgMTQtMTYuNTE2bDI4LTMuNDgzaDE5NmwyOCAzLjQ4M2M4LjE4MyAxLjE2OSAxNCA4LjI4MSAxNCAxNi41MTZ2NzJjMCA4LjI0My01LjgzMiAxNS4zNDctMTQgMTYuNTE2bC0yOCAzLjQ4M2gtMTk2bC0yOC0zLjQ4M2MtOC4xODMtMS4xNjktMTQtOC4yODEtMTQtMTYuNTE2di03MiIgc3R5bGU9ImZpbGwtb3BhY2l0eTouMTQ5MDIiLz4KIDxwYXRoIGQ9Im0zNzggMzM2aC0xOTZsLTI4LTMuNDgzYy0uNTA2LS4wNzUtMS4wMS0uMTY4LTEuNTA2LS4yODgtMS4wODktLjI2MS0yLjE0OS0uNjM3LTMuMTU5LTEuMTItMi4xMzItMS4wMTgtNC4wMi0yLjUxNC01LjUyLTQuMzQtMS4yMzEtMS41MDItMi4xOTQtMy4yMi0yLjg0MS01LjA1LS40MzQtMS4yMzItLjcyNi0yLjUxMy0uODY5LTMuODExLS4wNjMtLjU2OS0uMTA0LTEuNzE0LS4xMDQtMS43MTR2LTcyLjM5YzAgMCAuMDQxLTEuMTQ2LjEwNC0xLjcxNi4xNDQtMS4yOTkuNDM2LTIuNTgxLjg3MS0zLjgxMi42NDgtMS44MzIgMS42MTItMy41NTEgMi44NDUtNS4wNSAxLjQ5OC0xLjgyNSAzLjM4OS0zLjMyIDUuNTE5LTQuMzM4IDEuMDEtLjQ4MiAyLjA2OS0uODU3IDMuMTU2LTEuMTE5LjQ5Ny0uMTE5Ljk5OS0uMjEyIDEuNTA0LS4yODdsMjgtMy40ODNoMTk2YzAgMCAxOC42NjcgMi4zMjIgMjggMy40ODMuNTA2LjA3NSAxLjAxLjE2OCAxLjUwNi4yODggMS4wODkuMjYxIDIuMTQ5LjYzNyAzLjE1OSAxLjEyIDIuMTMyIDEuMDE4IDQuMDIgMi41MTQgNS41MiA0LjM0IDEuMjMxIDEuNTAyIDIuMTk0IDMuMjIgMi44NDEgNS4wNS40MzQgMS4yMzIuNzI2IDIuNTEzLjg2OSAzLjgxMS4wNjMuNTY5LjEwNCAxLjcxNC4xMDQgMS43MTR2NzIuMzljMCAwLS4wNDEgMS4xNDYtLjEwNCAxLjcxNi0uMTQ0IDEuMjk5LS40MzYgMi41ODEtLjg3MSAzLjgxMi0uNjQ4IDEuODMyLTEuNjEyIDMuNTUxLTIuODQ1IDUuMDUtMS40OTggMS44MjUtMy4zODkgMy4zMi01LjUxOSA0LjMzOC0xLjAxLjQ4Mi0yLjA2OS44NTctMy4xNTYgMS4xMTktLjQ5Ny4xMTktLjk5OS4yMTItMS41MDQuMjg3bC0yOCAzLjQ4M20tLjU1OC0xMDNoLTE5NC44OGMtOS4xMjQgMS4xMzUtMTguMjc4IDIuMDUyLTI3LjM3MiAzLjQwNS0uMTEzLjAxOS0uMjI2LjAzOS0uMzM4LjA2MS0uNjQxLjEzNC0xLjI2LjM0OC0xLjg0MS42NS0uOTMxLjQ4Ni0xLjc0NSAxLjE4My0yLjM4NCAyLjAxLS40OTcuNjQ4LS44ODkgMS4zNzYtMS4xNjEgMi4xNDYtLjI5OS44NDYtLjQ2MSAyLjYyOS0uNDYxIDIuNjI5bC4wMDEgNzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk3LjI4Ny43NjIuNjkyIDEuNDc5IDEuMjAyIDIuMTE0LjY3MS44MzcgMS41MjQgMS41MjggMi40OTMgMS45OTEuNTk4LjI4NiAxLjIzMi40NzkgMS44ODQuNTkybC4wODcuMDE0LjAzMi4wMDQgMjcuMzM5IDMuNDAxaDE5NC44OGMwIDAgMTguMjc4LTIuMDUyIDI3LjM3MS0zLjQwNS42ODEtLjExIDEuMzQzLS4zMDcgMS45NjYtLjYwNCAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjU1LS44MTYtMS40ODItMS40OTQtMi40MjItMS45NTYtLjYxOS0uMzA1LTEuMjc4LS41MDktMS45NTYtLjYyN2wtLjA4Ni0uMDEzLS4wMzItLjAwNS0yNy4zNC0zLjQwMW0tMTMuNDQyIDM4YzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTEyNiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6IzkxYzUzYiIvPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzQxNDEzZSIvPgogPHBhdGggZD0ibTg0IDI0NGMwLTguMjQzIDUuODMyLTE1LjM0NyAxNC0xNi41MTZsNTYtMy40ODNoMjUybDU2IDMuNDgzYzguMTgzIDEuMTY5IDE0IDguMjgxIDE0IDE2LjUxNnY3MmMwIDguMjQzLTUuODMyIDE1LjM0Ny0xNCAxNi41MTZsLTU2IDMuNDgzaC0yNTJsLTU2LTMuNDgzYy04LjE4My0xLjE2OS0xNC04LjI4MS0xNC0xNi41MTZ2LTcyIiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNiAzMzZoLTI1MmwtNTYtMy40ODNjLS41MDYtLjA3NS0xLjAxLS4xNjgtMS41MDYtLjI4OC0xLjA4OS0uMjYxLTIuMTQ5LS42MzctMy4xNTktMS4xMi0yLjEzMi0xLjAxOC00LjAyLTIuNTE0LTUuNTItNC4zNC0xLjIzMS0xLjUwMi0yLjE5NC0zLjIyLTIuODQxLTUuMDUtLjQzNC0xLjIzMi0uNzI2LTIuNTEzLS44NjktMy44MTEtLjA2My0uNTY5LS4xMDQtMS43MTQtLjEwNC0xLjcxNHYtNzIuMzljMCAwIC4wNDEtMS4xNDYuMTA0LTEuNzE2LjE0NC0xLjI5OS40MzYtMi41ODEuODcxLTMuODEyLjY0OC0xLjgzMiAxLjYxMi0zLjU1MSAyLjg0NS01LjA1IDEuNDk4LTEuODI1IDMuMzg5LTMuMzIgNS41MTktNC4zMzggMS4wMS0uNDgyIDIuMDY5LS44NTcgMy4xNTYtMS4xMTkuNDk3LS4xMTkuOTk5LS4yMTIgMS41MDQtLjI4N2w1Ni0zLjQ4M2gyNTJjMCAwIDM3LjMzIDIuMzIyIDU2IDMuNDgzLjUwNi4wNzUgMS4wMS4xNjggMS41MDYuMjg4IDEuMDg5LjI2MSAyLjE0OS42MzcgMy4xNTkgMS4xMiAyLjEzMiAxLjAxOCA0LjAyIDIuNTE0IDUuNTIgNC4zNCAxLjIzMSAxLjUwMiAyLjE5NCAzLjIyIDIuODQxIDUuMDUuNDM0IDEuMjMyLjcyNiAyLjUxMy44NjkgMy44MTEuMDYzLjU2OS4xMDQgMS43MTQuMTA0IDEuNzE0djcyLjM5YzAgMC0uMDQxIDEuMTQ2LS4xMDQgMS43MTYtLjE0NCAxLjI5OS0uNDM2IDIuNTgxLS44NzEgMy44MTItLjY0OCAxLjgzMi0xLjYxMiAzLjU1MS0yLjg0NSA1LjA1LTEuNDk4IDEuODI1LTMuMzg5IDMuMzItNS41MTkgNC4zMzgtMS4wMS40ODItMi4wNjkuODU3LTMuMTU2IDEuMTE5LS40OTcuMTE5LS45OTkuMjEyLTEuNTA0LjI4N2wtNTYgMy40ODNtLS4yOC0xMDNoLTI1MS40NGwtNTUuMjkgMy40MzljLS4xMDMuMDE5LS4yMDYuMDQtLjMwOC4wNjMtLjYwOC4xNDItMS4xOTUuMzU2LTEuNzQ1LjY1MS0uOTUxLjUxLTEuNzc2IDEuMjQxLTIuNDEzIDIuMTExLS40NTEuNjE0LS44MDggMS4yOTUtMS4wNjIgMi4wMS0uMjk5Ljg0NS0uNDYxIDIuNjI4LS40NjEgMi42Mjh2NzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk4LjI4Ny43NjEuNjkyIDEuNDc4IDEuMjAyIDIuMTEzLjY3MS44MzggMS41MjQgMS41MjggMi40OTMgMS45OTEuNTYzLjI2OSAxLjE2LjQ1OSAxLjc3NC41NzJsNTUuMjkgMy40MzloMjUxLjQ0bDU1LjI5LTMuNDM5Yy42MTItLjExMyAxLjIwNy0uMzAyIDEuNzY5LS41NyAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjcyLS44MzgtMS41MjUtMS41MjgtMi40OTUtMS45OTItLjU2My0uMjY5LTEuMTYtLjQ1OC0xLjc3My0uNTcxbC01NS4yOS0zLjQzOW0tNDEuNzIgMzhjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTg0IDBjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6I2Y3OTQxZSIvPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzFlNDI1NCIvPgogPHBhdGggZD0ibTQyMCAyMzhjMC03LjcyNi02LjI3NS0xNC0xNC0xNGgtMjUyYy03LjcyNyAwLTE0IDYuMjc0LTE0IDE0djg0YzAgNy43MjcgNi4yNzMgMTQgMTQgMTRoMjUyYzcuNzI2IDAgMTQtNi4yNzMgMTQtMTR2LTg0IiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNi4xOCAyMjRjMCAwIC45NTIuMDM2IDEuNDI2LjA5IDEuMDM2LjExOSAyLjA1OS4zNTQgMy4wNDMuNzAxIDEuOTE2LjY3NSAzLjY3NSAxLjc3NCA1LjEyOCAzLjE5MiAxLjQ5MiAxLjQ1OCAyLjY1NCAzLjI0NiAzLjM3MiA1LjIwNC4zNTguOTc4LjYwNiAxLjk5Ny43MzcgMy4wMy4wNjguNTMyLjExMiAxLjYwMS4xMTIgMS42MDF2ODQuMzZjMCAwLS4wNDQgMS4wNjktLjExMiAxLjYwMS0uMTMxIDEuMDMzLS4zNzkgMi4wNTItLjczNyAzLjAzLS43MTggMS45NTgtMS44OCAzLjc0Ni0zLjM3MiA1LjIwNC0xLjQ1MyAxLjQxOC0zLjIxMiAyLjUxNy01LjEyOCAzLjE5Mi0uOTg0LjM0Ny0yLjAxLjU4Mi0zLjA0My43MDEtLjQ3NC4wNTQtMS40MjYuMDktMS40MjYuMDloLTI1Mi4zNmMwIDAtLjk1Mi0uMDM2LTEuNDI2LS4wOS0xLjAzNi0uMTE5LTIuMDU5LS4zNTQtMy4wNDMtLjcwMS0xLjkxNi0uNjc1LTMuNjc1LTEuNzc0LTUuMTI4LTMuMTkyLTEuNDkyLTEuNDU4LTIuNjU0LTMuMjQ2LTMuMzcyLTUuMjA0LS4zNTgtLjk3OC0uNjA2LTEuOTk3LS43MzctMy4wMy0uMDY4LS41MzItLjExMi0xLjYwMS0uMTEyLTEuNjAxdi04NC4zNmMwIDAgLjA0NC0xLjA2OS4xMTItMS42MDEuMTMxLTEuMDMzLjM3OS0yLjA1Mi43MzctMy4wMy43MTgtMS45NTggMS44OC0zLjc0NiAzLjM3Mi01LjIwNCAxLjQ1My0xLjQxOCAzLjIxMi0yLjUxNyA1LjEyOC0zLjE5Mi45ODQtLjM0NyAyLjAxLS41ODIgMy4wNDMtLjcwMS40NzQtLjA1NCAxLjQyNi0uMDkgMS40MjYtLjA5aDI1Mi4zNm0tMjUyLjE1IDguOTk5YzAgMC0uNDA4LjAxLS42MTEuMDMzLS40MDYuMDQ3LS44MDYuMTQ0LTEuMTg4LjI4OS0xLjM0NC41MTEtMi40MzQgMS42MTQtMi45MjggMi45NjMtLjE5NC41MjktLjMgMS42NDgtLjMgMS42NDhsLjAwMSA4NC4yYzAgMCAuMTEyIDEuMDc0LjI5OSAxLjU4Mi40OTQgMS4zNDkgMS41ODQgMi40NTIgMi45MjggMi45NjMuNTI0LjIgMS42MzguMzIgMS42MzguMzJoMjUyLjI3YzAgMCAxLjExNC0uMTIgMS42MzktLjMyIDEuMzQzLS41MTEgMi40MzMtMS42MTQgMi45MjctMi45NjMuMTg2LS41MDguMjk5LTEuNTgyLjI5OS0xLjU4MnYtODQuMjdjMCAwLS4xMi0xLjExNC0uMzItMS42MzgtLjUxMS0xLjM0NC0xLjYxNC0yLjQzNC0yLjk2My0yLjkyOC0uNTA4LS4xODctMS41ODItLjI5OS0xLjU4Mi0uMjk5bC0yNTIuMS0uMDAybTEwMS43MSA2My40MmgtNi45NjN2LTMyLjgzOGg2Ljk2M3YxMi44N2gxMy4wMXYtMTIuODdoNi45NDF2MzIuODM4aC02Ljk0MXYtMTQuMTczaC0xMy4wMXYxNC4xNzNtMzcuNTMyIDBoLTkuMjk4di0zMi44MzhoMTAuMzA5YzUuMzYxIDAgOS41MjQgMS40MTUgMTIuNDg4IDQuMjQ1IDIuOTY1IDIuODMgNC40NDggNi43ODMgNC40NDggMTEuODYgMCA1LjQwNS0xLjUzOSA5LjU0NS00LjYxNiAxMi40Mi0zLjA3NyAyLjg3NS03LjUyIDQuMzEzLTEzLjMzMSA0LjMxM20xLjM3MS0yNy4xM2gtMy43MDd2MjEuMzgzaDIuOTg4YzYuNzA4IDAgMTAuMDYtMy42MDEgMTAuMDYtMTAuODA0IDAtNy4wNS0zLjExNC0xMC41NzktOS4zNDMtMTAuNTc5IiBzdHlsZT0iZmlsbDojMzFhZmMwIi8+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzJmMzM0ZCIvPgogPHBhdGggZD0ibTg0IDI0NGMwLTguMjQzIDUuODMyLTE1LjM0NyAxNC0xNi41MTZsNTYtMy40ODNoMjUybDU2IDMuNDgzYzguMTgzIDEuMTY5IDE0IDguMjgxIDE0IDE2LjUxNnY3MmMwIDguMjQzLTUuODMyIDE1LjM0Ny0xNCAxNi41MTZsLTU2IDMuNDgzaC0yNTJsLTU2LTMuNDgzYy04LjE4My0xLjE2OS0xNC04LjI4MS0xNC0xNi41MTZ2LTcyIiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNiAzMzZoLTI1MmwtNTYtMy40ODNjLS41MDYtLjA3NS0xLjAxLS4xNjgtMS41MDYtLjI4OC0xLjA4OS0uMjYxLTIuMTQ5LS42MzctMy4xNTktMS4xMi0yLjEzMi0xLjAxOC00LjAyLTIuNTE0LTUuNTItNC4zNC0xLjIzMS0xLjUwMi0yLjE5NC0zLjIyLTIuODQxLTUuMDUtLjQzNC0xLjIzMi0uNzI2LTIuNTEzLS44NjktMy44MTEtLjA2My0uNTY5LS4xMDQtMS43MTQtLjEwNC0xLjcxNHYtNzIuMzljMCAwIC4wNDEtMS4xNDYuMTA0LTEuNzE2LjE0NC0xLjI5OS40MzYtMi41ODEuODcxLTMuODEyLjY0OC0xLjgzMiAxLjYxMi0zLjU1MSAyLjg0NS01LjA1IDEuNDk4LTEuODI1IDMuMzg5LTMuMzIgNS41MTktNC4zMzggMS4wMS0uNDgyIDIuMDY5LS44NTcgMy4xNTYtMS4xMTkuNDk3LS4xMTkuOTk5LS4yMTIgMS41MDQtLjI4N2w1Ni0zLjQ4M2gyNTJjMCAwIDM3LjMzIDIuMzIyIDU2IDMuNDgzLjUwNi4wNzUgMS4wMS4xNjggMS41MDYuMjg4IDEuMDg5LjI2MSAyLjE0OS42MzcgMy4xNTkgMS4xMiAyLjEzMiAxLjAxOCA0LjAyIDIuNTE0IDUuNTIgNC4zNCAxLjIzMSAxLjUwMiAyLjE5NCAzLjIyIDIuODQxIDUuMDUuNDM0IDEuMjMyLjcyNiAyLjUxMy44NjkgMy44MTEuMDYzLjU2OS4xMDQgMS43MTQuMTA0IDEuNzE0djcyLjM5YzAgMC0uMDQxIDEuMTQ2LS4xMDQgMS43MTYtLjE0NCAxLjI5OS0uNDM2IDIuNTgxLS44NzEgMy44MTItLjY0OCAxLjgzMi0xLjYxMiAzLjU1MS0yLjg0NSA1LjA1LTEuNDk4IDEuODI1LTMuMzg5IDMuMzItNS41MTkgNC4zMzgtMS4wMS40ODItMi4wNjkuODU3LTMuMTU2IDEuMTE5LS40OTcuMTE5LS45OTkuMjEyLTEuNTA0LjI4N2wtNTYgMy40ODNtLS4yOC0xMDNoLTI1MS40NGwtNTUuMjkgMy40MzljLS4xMDMuMDE5LS4yMDYuMDQtLjMwOC4wNjMtLjYwOC4xNDItMS4xOTUuMzU2LTEuNzQ1LjY1MS0uOTUxLjUxLTEuNzc2IDEuMjQxLTIuNDEzIDIuMTExLS40NTEuNjE0LS44MDggMS4yOTUtMS4wNjIgMi4wMS0uMjk5Ljg0NS0uNDYxIDIuNjI4LS40NjEgMi42Mjh2NzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk4LjI4Ny43NjEuNjkyIDEuNDc4IDEuMjAyIDIuMTEzLjY3MS44MzggMS41MjQgMS41MjggMi40OTMgMS45OTEuNTYzLjI2OSAxLjE2LjQ1OSAxLjc3NC41NzJsNTUuMjkgMy40MzloMjUxLjQ0bDU1LjI5LTMuNDM5Yy42MTItLjExMyAxLjIwNy0uMzAyIDEuNzY5LS41NyAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjcyLS44MzgtMS41MjUtMS41MjgtMi40OTUtMS45OTItLjU2My0uMjY5LTEuMTYtLjQ1OC0xLjc3My0uNTcxbC01NS4yOS0zLjQzOW0tNDEuNzIgMzhjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTg0IDBjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6Izk0NTA4ZCIvPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTQ4IiBoZWlnaHQ9IjM2MCIgdmlld0JveD0iMCAwIDU0OCAzNjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjx0aXRsZT5Hcm91cDwvdGl0bGU+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0xOTYgMTczdjEzSDgxdi0xNCIvPjxtYXNrIGlkPSJqIiB4PSIwIiB5PSIwIiB3aWR0aD0iMTE1IiBoZWlnaHQ9IjE0IiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik02LjUyMiAxNzNDMi45MiAxNzMgMCAxNzAuNjMxIDAgMTY3LjcxVjUuMjlDMCAyLjM3IDIuOTIgMCA2LjUyMiAwaDI2Mi45NTZDMjczLjA4IDAgMjc2IDIuMzY5IDI3NiA1LjI5djE2Mi40MmMwIDIuOTIxLTIuOTIgNS4yOS02LjUyMiA1LjI5SDYuNTIyeiIgaWQ9ImIiLz48bWFzayBpZD0iayIgeD0iMCIgeT0iMCIgd2lkdGg9IjI3NiIgaGVpZ2h0PSIxNzMiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2IiLz48L21hc2s+PHBhdGggaWQ9ImMiIGQ9Ik0xMyAxNjAuMTg1aDI0OS45MVYxM0gxM3oiLz48bWFzayBpZD0ibCIgeD0iMCIgeT0iMCIgd2lkdGg9IjI0OS45MTEiIGhlaWdodD0iMTQ3LjE4NSIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYyIvPjwvbWFzaz48cmVjdCBpZD0iZCIgd2lkdGg9IjE5MiIgaGVpZ2h0PSIxNDAiIHJ4PSI2Ii8+PG1hc2sgaWQ9Im0iIHg9IjAiIHk9IjAiIHdpZHRoPSIxOTIiIGhlaWdodD0iMTQwIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNkIi8+PC9tYXNrPjxwYXRoIGlkPSJlIiBkPSJNMjAgMTFoMTUydjExOEgyMHoiLz48bWFzayBpZD0ibiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE1MiIgaGVpZ2h0PSIxMTgiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2UiLz48L21hc2s+PGNpcmNsZSBpZD0iZiIgY3g9IjEyIiBjeT0iNzAiIHI9IjYiLz48bWFzayBpZD0ibyIgeD0iMCIgeT0iMCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNmIi8+PC9tYXNrPjxwYXRoIGlkPSJnIiBkPSJNMCAxOGg3MnY4NEgweiIvPjxtYXNrIGlkPSJwIiB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iODQiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2ciLz48L21hc2s+PGNpcmNsZSBpZD0iaCIgY3g9IjM2IiBjeT0iMTA5IiByPSI1Ii8+PG1hc2sgaWQ9InEiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjaCIvPjwvbWFzaz48cmVjdCBpZD0iaSIgd2lkdGg9IjcyIiBoZWlnaHQ9IjEyMCIgcng9IjguNCIvPjxtYXNrIGlkPSJyIiB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iMTIwIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNpIi8+PC9tYXNrPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3MiA4NykiPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI2opIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNhIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjaykiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2IiLz48dXNlIHN0cm9rZT0iI0JCQiIgbWFzaz0idXJsKCNsKSIgc3Ryb2tlLXdpZHRoPSI0IiB4bGluazpocmVmPSIjYyIvPjxwYXRoIGZpbGw9IiNGOEFEMTgiIGQ9Ik0xMzcuMDQyIDEyMC43NUgxMTdsMjIuMTktMzQuMzc1TDExNyA1MmgyMC4wNDJsMjIuMTkgMzQuMzc1eiIvPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDIyMCkiPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI20pIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNkIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjbikiIHN0cm9rZS13aWR0aD0iNCIgeGxpbms6aHJlZj0iI2UiLz48dXNlIHN0cm9rZT0iI0JCQiIgbWFzaz0idXJsKCNvKSIgc3Ryb2tlLXdpZHRoPSI0IiB4bGluazpocmVmPSIjZiIvPjxjaXJjbGUgZmlsbD0iI0JCQiIgY3g9IjE4MCIgY3k9IjcwIiByPSIyIi8+PHBhdGggZmlsbD0iI0Y4QUQxOCIgZD0iTTk0LjU4IDEwMkg3NmwyMC42NDUtMzAuOTY4TDc2IDM4aDE4LjU4bDIwLjY0NiAzMy4wMzJ6Ii8+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYwKSI+PHJlY3Qgd2lkdGg9IjcyIiBoZWlnaHQ9IjEyMCIgcng9IjguNCIvPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI3ApIiBzdHJva2Utd2lkdGg9IjQiIHhsaW5rOmhyZWY9IiNnIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjcSkiIHN0cm9rZS13aWR0aD0iNCIgeGxpbms6aHJlZj0iI2giLz48cmVjdCBmaWxsPSIjQkJCIiB4PSIzMSIgeT0iMTAiIHdpZHRoPSIxMC44IiBoZWlnaHQ9IjIuNCIgcng9IjEuMiIvPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI3IpIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNpIi8+PHBhdGggZD0iTTM1LjAzMiA3OUgyNGwxMi4yNTgtMTguMzg3TDI0IDQxaDExLjAzMkw0Ny4yOSA2MC42MTN6IiBmaWxsPSIjRjhBRDE4Ii8+PC9nPjwvZz48L3N2Zz4="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODEwIiBoZWlnaHQ9IjIzMCIgdmlld0JveD0iMCAwIDgxMCAyMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjx0aXRsZT5QTVMg4oaSIENvbXB1dGVyPC90aXRsZT48ZGVmcz48cGF0aCBkPSJNMTU5LjU5NSAyMDcuNDc3Yy0uNDk0LTIuNDctMi42NS05LjczMi0zLjM0Ny0yMS40NDRIOTkuMzZjLS42OTggMTEuNzEyLTIuODUzIDE4Ljk3NC0zLjM0NiAyMS40NDQtLjk3NiA0Ljg4LTQuNzkgOC44MjktMTIuMDQgMTEuMDU5LTUuOTEyIDEuODE5LTUuMTU4IDEwLjY5MyAxLjY3NCAxMC42OTNoODQuMzE0YzYuODMxIDAgNy41ODctOC44NzMgMS42NzMtMTAuNjkzLTcuMjUtMi4yMy0xMS4wNjQtNi4xNzgtMTIuMDQtMTEuMDU5eiIgaWQ9ImEiLz48bWFzayBpZD0iZCIgeD0iMCIgeT0iMCIgd2lkdGg9Ijk1LjYzMyIgaGVpZ2h0PSI0My4xOTYiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTI1NiAxNDcuNXYzMS41NjRjMCA1LjUyNy00LjQ3IDEwLjAwOC05Ljk5NiAxMC4wMDhIOS45OTZjLTUuNTIgMC05Ljk5Ni00LjQ3Ni05Ljk5Ni0xMC4wMDhWMTAuMDAzQzAgNC40OCA0LjQ3IDAgOS45OTYgMGgyMzYuMDA4QzI1MS41MjQgMCAyNTYgNC40ODUgMjU2IDEwLjAwM1YxNDcuNXoiIGlkPSJiIi8+PG1hc2sgaWQ9ImUiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNTYiIGhlaWdodD0iMTg5LjA3MiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYiIvPjwvbWFzaz48Y2lyY2xlIGlkPSJjIiBjeD0iMTEwIiBjeT0iMTEwIiByPSIxMTAiLz48bWFzayBpZD0iZiIgeD0iMCIgeT0iMCIgd2lkdGg9IjIyMCIgaGVpZ2h0PSIyMjAiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2MiLz48L21hc2s+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTUzKSIgc3Ryb2tlPSIjQkJCIj48dXNlIG1hc2s9InVybCgjZCkiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2EiLz48dXNlIG1hc2s9InVybCgjZSkiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2IiLz48cGF0aCBkPSJNMS41IDE0Ny41aDI1My4xOTgiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUpIj48dXNlIHN0cm9rZT0iI0Y4QUQxOCIgbWFzaz0idXJsKCNmKSIgc3Ryb2tlLXdpZHRoPSI4IiBmaWxsPSIjMUYxRjFGIiB4bGluazpocmVmPSIjYyIvPjxwYXRoIGZpbGw9IiNGOEFEMTgiIGQ9Ik0xMTIuMTM0IDE3OS42NjdINzIuMTFsNDQuMzEtNjkuMDU2LTQ0LjMxLTY5LjA1NWg0MC4wMjNsNDQuMzEgNjkuMDU1eiIvPjwvZz48ZyBmaWxsPSIjQkJCIj48cGF0aCBkPSJNNTA0LjUgMTE1bC0xNCAxMy41di0yN3pNNDc5IDExOGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnoiLz48L2c+PC9nPjwvc3ZnPg=="
},function(e,t){
e.exports="data:image/svg+xml;base64, "
},function(e,t){
e.exports="data:image/svg+xml;base64, "
},function(e,t){
e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxMDI0IiBoZWlnaHQ9IjEwMjQiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPgo8ZyBpZD0iaWNvbW9vbi1pZ25vcmUiPgo8L2c+CjxwYXRoIGZpbGw9IiNlZWUiIGQ9Ik00OTcuNCA5MTAuNmMtMTMzLTQuNC0yMzcuNy0xMTYuMi0yMzMuNC0yNDkuMiA0LjQtMTMzLjEgMTE2LjItMjM3LjcgMjQ5LjItMjMzLjRzMjM3LjcgMTE2LjIgMjMzLjQgMjQ5LjJjLTQuNCAxMzMuMS0xMTYuMiAyMzcuOC0yNDkuMiAyMzMuNHpNNTExLjggNDcxLjljLTEwOC45LTMuNi0yMDAuMyA4Mi4xLTIwMy45IDE5MXM4Mi4xIDIwMC4zIDE5MC45IDIwMy45YzEwOC45IDMuNiAyMDAuMy04Mi4xIDIwMy45LTE5MC45cy04Mi4xLTIwMC40LTE5MC45LTIwNHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTE4OS41IDY3Ni4yYy05LjYtMC4zLTg4LjItNC41LTEzOS44LTU4LjgtMzAuNi0zMi4yLTQ1LjMtNzQuOC00My42LTEyNi43IDEuOC01NC4yIDI3LjYtMTA0LjEgNzAuOC0xMzYuOSAzNi43LTI3LjkgODEuNy00MC4yIDEyNy4yLTM1LjYgMjUuOC0xNTQuNCAxNjIuNi0yNjguMiAzMjEuNC0yNjMgMTE2LjQgMy44IDIyMi4yIDcyLjkgMjczLjIgMTc3LjMgNTguMSAzLjIgMTExLjkgMjcuNiAxNTIuNyA2OS42IDQ0LjMgNDUuNiA2Ny42IDEwNS43IDY1LjUgMTY5LjItNS43IDE3MS43LTE1NC44IDIxMy43LTIwMC40IDIyMi41LTEyIDIuMy0yMy40LTUuNS0yNS43LTE3LjRzNS41LTIzLjQgMTcuNC0yNS43YzQ4LTkuMyAxNjAuMy00NS40IDE2NC43LTE4MC44IDEuNy01MS41LTE3LjItMTAwLjItNTMuMS0xMzcuMi0zNS43LTM2LjctODQtNTctMTM1LjMtNTYuNy05LjEgMC0xNi44LTUuMi0yMC4yLTEzLjItNDEuNy05Ni0xMzYtMTYwLjMtMjQwLjMtMTYzLjgtMTQzLjUtNC43LTI2Ni4yIDEwMy42LTI3OS4zIDI0Ni42LTAuNiA2LjQtMy45IDEyLjEtOS4xIDE1LjhzLTExLjggNS0xOCAzLjVjLTM5LjgtOS42LTgxLjYtMS0xMTQuMiAyMy44cy01Mi4xIDYyLjUtNTMuNCAxMDMuNGMtMS4zIDM5LjYgOS4yIDcxLjUgMzEuMyA5NC45IDQwLjkgNDMuMiAxMDcuMyA0NS4xIDEwOS45IDQ1LjMgMCAwIDAuMSAwIDAuMSAwIDEyLjEgMC40IDIxLjYgMTAuNCAyMS4zIDIyLjQtMC4yIDEyLjEtMTAuMiAyMS43LTIyLjMgMjEuNS0wLjEgMC0wLjQgMC0wLjggMHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTUxMi41IDU0My40aC03My45bDczLjkgMTI3LjQtNzMuOSAxMjcuNGg3My45bDczLjktMTI3LjQtNzMuOS0xMjcuNHoiPjwvcGF0aD4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cGF0aCBkPSJtMjgwIDU2MGMtMTU0LjM1IDAtMjgwLTEyNS42NS0yODAtMjgwIDAtMTU0LjM1IDEyNS42NS0yODAgMjgwLTI4MCAxNTQuMzUgMCAyODAgMTI1LjY1IDI4MCAyODAgMCAxNTQuMzUtMTI1LjQ2IDI4MC0yODAgMjgwbTAtNTQ3LjczYy0xNDcuNjIgMC0yNjcuNTMgMTIwLjExLTI2Ny41MyAyNjcuNTMgMCAxNDcuNjIgMTIwLjExIDI2Ny41MyAyNjcuNTMgMjY3LjUzIDE0Ny40MiAwIDI2Ny41My0xMjAuMTEgMjY3LjUzLTI2Ny41My4xOTgtMTQ3LjQyLTExOS45MS0yNjcuNTMtMjY3LjUzLTI2Ny41M20tMTIuNjUgMzU3LjczbC02MS41IDQ4LjZjLTEuMi45LTIuNyAxLjQtNC4xIDEuNC0xIDAtMi0uMi0yLjktLjctMi4zLTEuMS0zLjgtMy40LTMuOC02di00My4zaC0zNi43Yy0xMSAwLTIwLTktMjAtMjB2LTE1MGMwLTExIDktMjAgMjAtMjBoMjQzLjNjMTEgMCAyMCA5IDIwIDIwdjE1MGMwIDExLTkgMjAtMjAgMjBoLTEzNC4zbTEzNC40LTE3Ni43aC0yNDMuNGMtMy43IDAtNi43IDMtNi43IDYuN3YxNTBjMCAzLjcgMyA2LjcgNi43IDYuN2g0My40YzMuNyAwIDYuNyAzIDYuNyA2Ljd2MzYuMmw1Mi41LTQxLjVjMS4yLS45IDIuNi0xLjQgNC4xLTEuNGgxMzYuN2MzLjcgMCA2LjctMyA2LjctNi43di0xNTBjMC0zLjctMy02LjctNi43LTYuN20tNDMuNCAxMDcuOGgtMTUwYy0zLjcgMC02LjctMy02LjctNi43IDAtMy43IDMtNi43IDYuNy02LjdoMTUwYzMuNyAwIDYuNyAzIDYuNyA2LjcgMCAzLjctMi45OTkgNi42OTktNi43IDYuN20wLTQxLjFoLTE1MGMtMy43IDAtNi43LTMtNi43LTYuNyAwLTMuNyAzLTYuNyA2LjctNi43aDE1MGMzLjcgMCA2LjcgMyA2LjcgNi43IDAgMy43LTIuOTk5IDYuNjk5LTYuNyA2LjciIHN0eWxlPSJmaWxsOiNjYzdiMTk7ZmlsbC1ydWxlOm5vbnplcm8iLz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NC4zNDYgMC0yODAtMTI1LjY1My0yODAtMjgwIDAtMTU0LjM0NyAxMjUuNjUzLTI4MCAyODAtMjgwIDE1NC4zNDYgMCAyODAgMTI1LjY1MyAyODAgMjgwIDAgMTU0LjM0Ny0xMjUuNjUzIDI4MC0yODAgMjgwbTAtNTQ3LjUzM2MtMTQ3LjYxOSAwLTI2Ny41MzQgMTIwLjExMy0yNjcuNTM0IDI2Ny41MzQgMCAxNDcuNjE4IDEyMC4xMTMgMjY3LjUzMyAyNjcuNTM0IDI2Ny41MzMgMTQ3LjQyMSAwIDI2Ny41MzQtMTIwLjExMyAyNjcuNTM0LTI2Ny41MzMgMC0xNDcuNjE5LTExOS45MTUtMjY3LjUzNC0yNjcuNTM0LTI2Ny41MzRtNzcuMTI5IDM3Ni44NDljMC0xOC43ODUtMzUuNjA0LTMzLjk5My03OS40MzgtMzMuOTkzLTQzLjgzNSAwLTc5LjQzOCAxNS4yMDctNzkuNDM4IDMzLjk5MyAwIDE4Ljc4NiAzNS40MjQgMzMuOTk0IDc5LjQzOCAzMy45OTQgNDMuODMzIDAgNzkuNDM4LTE1LjIwNyA3OS40MzgtMzMuOTk0bTExLjQ1LTE0MS42OTljMC01MC4wOTYtNDAuNjE0LTkwLjcwOS05MC43MDktOTAuNzA5LTUwLjA5NiAwLTkwLjcwOSA0MC42MTMtOTAuNzA5IDkwLjcwOSAwIDUwLjA5NSA0MC42MTMgOTAuNzA5IDkwLjcwOSA5MC43MDkgNDkuOTE3IDAgOTAuNzA5LTQwLjYxNCA5MC43MDktOTAuNzA5bTIyLjU0My04NS4xNjNjMC0xMi41MjQtMTAuMTk4LTIyLjcyMy0yMi43MjItMjIuNzIzLTEyLjUyNCAwLTIyLjcyMiAxMC4xOTktMjIuNzIyIDIyLjcyMyAwIDEyLjUyNCAxMC4xOTggMjIuNzIyIDIyLjcyMiAyMi43MjIgMTIuNzAzIDAgMjIuNzIyLTEwLjE5OCAyMi43MjItMjIuNzIyIi8+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44N2MtMTQ3LjQ3IDAtMjY3Ljg3IDEyMC40LTI2Ny44NyAyNjcuODcgMCAxNDcuNDcgMTIwLjQgMjY3Ljg3IDI2Ny44NyAyNjcuODcgMTQ3LjQ3IDAgMjY3Ljg3LTEyMC40IDI2Ny44Ny0yNjcuODctLjkzMy0xNDcuNDctMTIwLjQtMjY3Ljg3LTI2Ny44Ny0yNjcuODdtLTI4LjM0IDQwMy44N2gtODkuNzVsLTIuMjk2LS40NTdjLTEuOTMzLTEuMjkxLTEuOTU2LTEuMzE0LTMuMjQ3LTMuMjQ3bC0uNDU3LTIuMjk2di0xMTcuODloLTMwLjkwN2MtLjc2NC0uMTUyLTEuNTczLS4xNTgtMi4yOTMtLjQ1NS0uNzItLjI5OC0xLjM5My0uNzQ3LTEuOTQ1LTEuMjk3LTEuMTI0LTEuMTIzLTEuNzU4LTIuNjQ1LTEuNzYyLTQuMjM0LS4wMDItLjc3OS4xNTQtMS41NzMuNDUtMi4yOTQuMjk2LS43Mi44NjItMS4yOTggMS4yOTItMS45NDhsMTU1LTE1Ni4xMSAxLjk1Mi0xLjMxMSAyLjMwNi0uNDYxYy43NjkuMTU0IDEuNTM3LjMwNyAyLjMwNi40NjFsMS45NTIgMS4zMTEgMTU1IDE1Ni4xMWMuNDMuNjUuOTk2IDEuMjI4IDEuMjkyIDEuOTQ4LjYwNCAxLjQ3LjYgMy4xMTktLjAxMSA0LjU4Ni0uMjk5LjcxOS0uNzUgMS4zOTEtMS4zMDEgMS45NDItLjU1Mi41NS0xLjIyNS45OTktMS45NDUgMS4yOTctLjcyLjI5Ny0xLjUyOC4zMDMtMi4yOTMuNDU1aC0zMC4yNnYxMTcuODlsLS40NTYgMi4yOTZjLTEuMjkyIDEuOTMzLTEuMzE1IDEuOTU2LTMuMjQ4IDMuMjQ3bC0yLjI5Ni40NTdoLTg4LjM0bC0yLjI5Ni0uNDU3Yy0xLjkzNC0xLjI5MS0xLjk1Ni0xLjMxNC0zLjI0OC0zLjI0N2wtLjQ1Ni0yLjI5NnYtNzguMjRoLTQ2LjczM3Y3OC4yNGwtLjQ1NyAyLjI5NmMtMS4yOTEgMS45MzMtMS4zMTQgMS45NTYtMy4yNDcgMy4yNDdsLTIuMjk2LjQ1N20tMTEyLjI1LTEzNS44OWgyMi40OTRsMi4yOTYuNDU3YzEuOTMzIDEuMjkxIDEuOTU2IDEuMzE0IDMuMjQ3IDMuMjQ3bC40NTcgMi4yOTZ2MTE3Ljg5aDc3Ljc1di03OC4yNGwuNDU3LTIuMjk2YzEuMjkyLTEuOTM0IDEuMzE0LTEuOTU2IDMuMjQ3LTMuMjQ4bDIuMjk2LS40NTZoNTguNzMzbDIuMjk2LjQ1NmMxLjkzMyAxLjI5MiAxLjk1NSAxLjMxNSAzLjI0NyAzLjI0OGwuNDU3IDIuMjk2djc4LjI0aDc2LjM0di0xMTcuODlsLjQ1Ny0yLjI5NmMxLjI5Mi0xLjkzMyAxLjMxNC0xLjk1NiAzLjI0Ny0zLjI0N2wyLjI5Ni0uNDU3aDIxLjg1MmwtMTQwLjU5LTE0MS41OS0xNDAuNTkgMTQxLjU5IiBzdHlsZT0iZmlsbC1ydWxlOm5vbnplcm8iLz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCAwYy0xNTQgMC0yODAgMTI2LTI4MCAyODAgMCAxNTQgMTI2IDI4MCAyODAgMjgwIDE1NCAwIDI4MC0xMjYgMjgwLTI4MCAwLTE1NC0xMjYtMjgwLTI4MC0yODBtMCA1NDcuNzVjLTE0Ny44NzUgMC0yNjcuNzUtMTE5Ljg3NS0yNjcuNzUtMjY3Ljc1IDAtMTQ3Ljg3NSAxMTkuODc1LTI2Ny43NSAyNjcuNzUtMjY3Ljc1IDE0Ny44NzUgMCAyNjcuNzUgMTE5Ljg3NSAyNjcuNzUgMjY3Ljc1IDAgMTQ3Ljg3NS0xMTkuODc1IDI2Ny43NS0yNjcuNzUgMjY3Ljc1bTQzLjc1LTMwNy4xMjVsLTE2Mi43NS0yNC41Yy01LjI1LS44NzUtOS42MjUtMy41LTEyLjI1LTctMi42MjUtMy41LTQuMzc1LTguNzUtMy41LTEzLjEyNWw1LjI1LTM4LjVjLjg3NS05LjYyNSAxMC41LTE2LjYyNSAyMC4xMjUtMTQuODc1bDIzMy42MjUgMzQuMTI1YzQuMzc1Ljg3NSA4Ljc1IDIuNjI1IDExLjM3NSA2LjEyNSAyLjYyNSAzLjUgNC4zNzUgOC43NSAzLjUgMTMuMTI1bC01LjI1IDM4LjVjMCA0LjM3NS0xLjc1IDctNC4zNzUgOS42MjUgNC4zNzUgMy41IDcgOC43NSA3IDE0bDAgMTM1LjYyNWMwIDEwLjUtOC43NSAxOC4zNzUtMTguMzc1IDE4LjM3NWwtMjM2LjI1IDBjLTEwLjUgMC0xOC4zNzUtOC43NS0xOC4zNzUtMTguMzc1bDAtMTM0Ljc1YzAtMTAuNDk5IDguNzQ5LTE4LjM3NCAxOC4zNzUtMTguMzc1bDE2MS44NzUgMG03NC4zNzUgMTU4LjM3NWMyLjYyNy0uMDAyIDUuMjUtMi42MjYgNS4yNS01LjI1bDAtNzkuNjI1LTI0Ni43NSAwIDAgNzkuNjI1YzAgMi42MjUgMS43NSA1LjI1IDUuMjUgNS4yNWwyMzYuMjUgMG0tMTczLjI1LTk3LjEyNWMuODc1LS44NzUuODc1LS44NzYuODc1LTEuNzVsMjkuNzUtNDcuMjUtNDIgMGMwIC44NzUgMCAuODc1LS44NzUgMi42MjVsLTI4Ljg3NSA0Ni4zNzUgNDEuMTI1IDBtNTYuODc1IDBjLjg3NS0uODc1Ljg3NS0uODc2Ljg3NS0xLjc1bDI5Ljc1LTQ3LjI1LTQyIDBjMCAuMzgzLS4xNjcuNTk4LS4zNTYuNzkzbC0uMTYzLjE2NGMtLjE4OS4xOTUtLjM1Ni40MS0uMzU2Ljc5M2wtMjkuNzUgNDcuMjUgNDIgMG01NiAwYy44NzUtLjg3NS44NzUtLjg3Ni44NzUtMS43NWwyOS43NS00Ny4yNS00MiAwYzAgLjM4My0uMTY3LjU5OC0uMzU2Ljc5M2wtLjE2My4xNjRjLS4xODkuMTk1LS4zNTYuNDEtLjM1Ni43OTNsLTI5Ljc1IDQ3LjI1IDQyIDBtLTE2OC44NzUgMGMuODc1LS44NzUuODc1LS44NzYuODc1LTEuNzVsMjkuNzUtNDcuMjUtMzcuNjI1IDBjLTMuNSAwLTUuMjUgMi42MjUtNi4xMjUgNi4xMjVsMCA0Mi44NzUgMTMuMTI1IDBtMjM0LjUtLjg3NWwwLTQyLjg3NWMwLTIuNjI1LTEuNzUtNS4yNS01LjI1LTUuMjVsLTE0Ljg3NSAwYzAgLjM4My0uMTY3LjU5OC0uMzU2Ljc5M2wtLjE2My4xNjRjLS4xODkuMTk1LS4zNTYuNDEtLjM1Ni43OTNsLTI4Ljg3NSA0Ni4zNzUgNDkuODc1IDBtLS44NzUtMTEybC00My43NS02LjEyNSAyMS44NzUgNDkuODc1IDAgMy41IDE1Ljc1IDEuNzVjMi42MjUgMCA1LjI1LTEuNzUgNS4yNS00LjM3NWw1LjI1LTM4LjVjMC0xLjc1IDAtMy41LS44NzUtNC4zNzUtLjg3NS0uODc1LTIuNjI1LTEuNzUtMy41LTEuNzVtLTc3Ljg3NSAzNS44NzVsMCAyLjYyNSA0Mi44NzUgNy0yMi43NS01MS42MjUgMC0xLjc1LTQyLTYuMTI1IDIxLjg3NSA0OS44NzVtLTU2LTguNzVjMCAuODc1Ljg3NSAyLjYyNSAwIDMuNWw0Mi44NzUgNi4xMjUtMjIuNzUtNTEuNjI1IDAtMS43NS00Mi02LjEyNSAyMS44NzUgNDkuODc1bS01Ni03Ljg3NWMuODc1Ljg3NS44NzUgMS43NSAwIDIuNjI1bDQyLjg3NSA2LjEyNS0yMi43NS01MS42MjUgMC0xLjc1LTQyLTYuMTI1IDIxLjg3NSA1MC43NW0tNTAuNzUtNC4zNzVsMzcuNjI1IDUuMjUtMjIuNzUtNTEuNjI1IDAtMS43NS03Ljg3NS0uODc1Yy0zLjUgMC02LjEyNSAxLjc1LTYuMTI1IDQuMzc1bC01LjI1IDM4LjVjMCAxLjc1IDAgMy41Ljg3NSA0LjM3NS44NzUuODc1IDEuNzUgMS43NSAzLjUgMS43NSIvPgo8L3N2Zz4K"
},function(e,t,n){e.exports=n.p+"desktop/common/img/vendor-logos/songkick.19411461aa7bffd06675aaa8a3d0a056.svg"},function(e,t,n){"use strict";var i=function(){};e.exports=i},function(e,t){(function(t){e.exports=t}).call(t,{})}],[2417]);