webpackJsonp([0,3],[function(e,t,n){"use strict";var a=n(1).default;n(1615);var i=n(1014),r=a(i);r.default.start()},,function(e,t,n){"use strict";function a(){var e=s.default.initial(arguments).concat({escape:!0});return new l.default.SafeString(d.default.apply(d.default,e))}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(4),l=i(o),u=n(6),d=i(u);t.default=a,e.exports=t.default},,function(e,t,n){e.exports=n(1609)},,function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(216),r=a(i);t.default=function(){return r.default.t.apply(r.default,arguments)},e.exports=t.default},function(e,t,n){"use strict";e.exports=n(275)},,,,function(e,t,n){"use strict";function a(e,t){if(!t)return e;var n={};return t.forEach(function(t){n[t]=function(){return e[t].apply(e,arguments)}}),n}function i(e,t){if(e.hasOwnProperty(t)){var n=e[t];n&&b.default.isFunction(n.destroy)&&n.destroy(),delete e[t]}}function r(e){for(var t in e)i(e,t);
}function s(e,t,n){S[e]=a(t,n);var i=C[e];i&&(delete C[e],i.resolve(S[e]))}function o(e,t,n){h(e)||s(e,t(),n)}function l(e){b.default.each(e,function(e,t){var n=void 0,a=void 0;b.default.isArray(e)?(n=e[0],a=e[1]):n=e,s(t,n,a)})}function u(e){b.default.each(e,function(e,t){var n=void 0,a=void 0;b.default.isArray(e)?(n=e[0],a=e[1]):n=e,o(t,n,a)})}function d(e){return h(e)?P.default.Deferred().resolve(S[e]).promise():(C[e]||(C[e]=P.default.Deferred()),C[e].promise())}function c(e,t,n){S.hasOwnProperty(e)&&(x[e]=S[e]),
s(e,t,n)}function f(e){x.hasOwnProperty(e)&&(i(S,e),s(e,x[e]),delete x[e])}function p(){r(S),r(x)}function h(e){return S.hasOwnProperty(e)}function m(e){return S[e]}function v(e){var t=m(e);if(b.default.isFunction(t)){for(var n=arguments.length,a=Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return t.apply(void 0,a)}}var g=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.register=s,t.registerOnce=o,t.registerAll=l,t.registerAllOnce=u,t.waitFor=d,t.swapIn=c,t.swapOut=f,t.reset=p,
t.hasRegistered=h,t.resolve=m,t.execute=v;var y=n(3),b=g(y),w=n(5),P=g(w),_=n(38),S=(g(_),{}),x={},C={}},function(e,t,n){"use strict";var a=n(1537).default;t.default=a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},t.__esModule=!0},function(e,t,n){"use strict";var a=n(1540).default;t.default="function"==typeof a&&a.for&&a.for("react.element")||60103,t.__esModule=!0},function(e,t){"use strict";t.default=function(e,t){
if(e)for(var n in e)"undefined"==typeof t[n]&&(t[n]=e[n]);return t},t.__esModule=!0},function(e,t){"use strict";function n(e,t,n){return e===t?n.fn(this):n.inverse(this)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";t.default=function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n},t.__esModule=!0},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(38),o=a(s),l=n(26),u=a(l),d={_map:{},register:function(e,t){(0,o.default)(r.default.isFunction(t),'The "'+e+'" command must be a function'),this._map[e]=t},registerAll:function(e){var t=this;r.default.each(e,function(e,n){"__esModule"!==n&&t.register(n,e)})},reset:function(){this._map={}},execute:function(e){var t=this._map[e];if((0,o.default)(t,'The "'+e+'" command has not been registered'),t){(0,u.default)("[Commands] Executing",e);for(var n=arguments.length,a=Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];
return t.apply(void 0,a)}}};t.default=d,e.exports=t.default},function(e,t,n){"use strict";function a(e){return!0}function i(e){return d.default.isObject(e)&&!d.default.isArray(e)}function r(e,t){t||(t={});var n=d.default.defaults(t,{typeName:e,parse:d.default.bind(f.default.parseType,f.default,e),stringify:d.default.bind(f.default.stringifyType,f.default,e)});return n.validate=t.validate?s(t.validate):a,n.isRequired=d.default.extend({},n,{validate:function(e){return null!=e&&n.validate(e)}}),n}function s(e){
return function(t){return null==t||e(t)}}var o=n(1534).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),c=n(46),f=l(c),p=["boolean","integer","float","string","object","array"],h={any:r("any"),"boolean":r("boolean",{validate:d.default.isBoolean}),integer:r("integer",{validate:o}),"float":r("float",{validate:d.default.isNumber}),string:r("string",{validate:d.default.isString}),object:r("object",{validate:i}),array:r("array",{validate:d.default.isArray}),list:r("list",{
validate:d.default.isArray}),encodedString:r("encodedString",{validate:d.default.isString}),queryString:r("queryString",{validate:i}),instanceOf:function(){var e=d.default.toArray(arguments);return r("instanceOf",{validate:function(t){return d.default.some(e,function(e){return t instanceof e})}})},oneOf:function(){var e=d.default.toArray(arguments);return r("oneOf",{validate:function(t){return d.default.contains(e,t)}})},oneOfType:function(){var e=d.default.toArray(arguments);return r("oneOfType",{
validate:function(t){return d.default.some(e,function(e){return e.validate(t)})}})},custom:function(e){return r("custom",{validate:e})},getAttrTypeFor:function(e){if(null==e)return h.any;for(var t=0,n=p.length;t<n;t++){var a=p[t],i=h[a];if(i.validate(e))return i}return h.any}};t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(100).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(41),u=i(l),d=n(5),c=i(d),f=n(9),p=i(f),h=n(46),m=i(h),v=n(306),g=i(v),y=n(38),b=i(y),w=n(23),P=r(w),_=n(218),S=i(_),x=n(18),C=i(x),T=n(60),k=i(T),I=n(79),M=r(I),A=n(57),E=i(A),O=/^change:[\w]+$/,D=u.default.Model.extend({
mixins:[S.default],name:"AbstractModel",responseType:k.default.xml,hasInitialRelations:!1,_context:["parent","skipCache"],cache:null,cacheKey:function(e){return e[this.idAttribute]},constructor:function(e,t){e||(e={}),t||(t={});var n;if(this.initialize!==u.default.Model.prototype.initialize&&(n=this.initialize,this.initialize=function(){}),o.default.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 u.default.Model.prototype.constructor.apply(this,arguments),
this._initModel(t),void(n&&(n.apply(this,arguments),this.initialize=n));var a=this.findOption(t,"onlyIfCached"),i=this.cache.getItemCacheKey(this,e),r=this.cache.get(i);return r?(this.uninitialize(),a||(this.preserveCachedAttributes&&(r.isPreservingAttributes=!0),t.parse?e=r.parse(e):o.default.extend(e,r._getRelations(this.syncedRelations,e)),r.set(e),r.isPreservingAttributes=!1),o.default.each(this.getContext(),function(e){r.setContext(e,this[e]||r[e])},this),t.collection&&(r.collection=t.collection),
r._computedEntityID&&r.updateEntity(),r):a?{}:(u.default.Model.prototype.constructor.apply(this,arguments),this._initModel(t),n&&(n.apply(this,arguments),this.initialize=n),void this.cache.store(this,i))},uninitialize:function(){this.stopListening()},_initModel:function(e){E.default.get("shouldCreateStateTree")&&this.entityID&&(this.state=this.toState()),this._initRelations(e),this._initDerived(e),this._initState()},_initRelations:function(e){this._relationListeners={};var t=o.default.extend({},this.sessionRelations,this.syncedRelations);
o.default.each(t,function(e,t){this._initRelation(e,t);var n=o.default.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),a=n.relationClass,i=this.get(t),r=this.previous(t),s=i&&i instanceof a,l=r&&r instanceof a;l&&o.default.has(this._relationListeners,t)&&(r.off("all",this._relationListeners[t]),
this._relationListeners[t]=null),s&&this._forwardRelationEvents(i,t)},_initDerived:function(){o.default.each(this.derivedAttrs,this._setDerived,this)},_initState:function(){E.default.get("shouldCreateStateTree")&&(this.state=this.toState(),this.updateState=this.updateState.bind(this),this._computedEntityID&&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=o.default.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],a=n.call(this);this.set(e,a)}if("parent"!==e){var i=o.default.extend({},this.sessionRelations,this.syncedRelations);o.default.each(i,function(n,a){var i=this.get(a);i&&i.setContext(e,t)},this)}}},getScopedKey:function(e){return null!=e&&o.default.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();this._computedEntityID&&t!==e&&this.updateEntity(),this.trigger("statechange",this,t,e)},updateEntity:function(){(0,b.default)(this.entityType,this.name+" requires an `entityType`"),p.default.trigger("change:entity",{type:this.entityType,id:this._computedEntityID,model:this})},toState:function(){var e=a(this.attributes),t=o.default.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,n){var a=this.get(n);if(a){var i;i=t.excludeDefaults?a instanceof u.default.Collection?a.map(function(e){return(0,
g.default)(o.default.result(e,"defaults"),e.toJSON(t))}):(0,g.default)(o.default.result(a,"defaults"),a.toJSON(t)):a.toJSON(t),h[n]=i}}var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=this.syncedAttrs,a=this.sessionRelations,i=this.syncedRelations,r=this.attributes,s={};for(var l in r){var d=a&&o.default.has(a,l),f=i&&o.default.has(i,l),p=t.syncedOnly&&(!n||!o.default.has(n,l));d||f||p||(s[l]=r[l])}var h=c.default.extend(!0,{},s);return t.syncedOnly||o.default.each(a,e,this),o.default.each(i,e,this),
h},clone:function(){var e=o.default.extend(o.default.pick(this,this.getContext()),{skipCache:!0});return new this.constructor(this.toJSON(),e)||null},copy:function(e){(0,b.default)(e instanceof this.constructor,"Only a model of the same type may be copied");var t=e.toJSON();return o.default.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 o.default.each(this.attributes,function(e,n){
this.derivedAttrs&&o.default.has(this.derivedAttrs,n)||(t[n]=void 0)},this),o.default.extend(t,this._getRelations(this.sessionRelations,{},{reset:!0}),this._getRelations(this.syncedRelations,{},{reset:!0}),o.default.result(this,"defaults"),e),this.set(t)},set:function(e,t,n){var a;o.default.isObject(e)?(a=e,n=t):(a={})[e]=t,n||(n={});var i,r=this.shouldPreserveAttributes();return!r&&n.merge&&this.preserveCachedAttributes&&(i=!0,r=!0,this.isPreservingAttributes=!0),r&&(a=this._removePreservedAttrs(a)),
u.default.Model.prototype.set.call(this,a,n),i&&(this.isPreservingAttributes=!1),this},hasAttr:function(e){var t=this.sessionAttrs&&o.default.has(this.sessionAttrs,e),n=this.syncedAttrs&&o.default.has(this.syncedAttrs,e);return!(!t&&!n)},hasRelation:function(e){var t=this.sessionRelations&&o.default.has(this.sessionRelations,e),n=this.syncedRelations&&o.default.has(this.syncedRelations,e);return!(!t&&!n)},hasDerived:function(e){return!(!this.derivedAttrs||!o.default.has(this.derivedAttrs,e))},validate:function(e,t){
var n=o.default.extend({},this.sessionAttrs,this.syncedAttrs,this.sessionRelations,this.syncedRelations),a=this._validateTypes(e,n);return a&&(0,b.default)(!1,a),a},parse:function(e,t){return t&&t.save?this.attributes:this.convert(e,t)},convert:function(e,t){var n,a=e,i=o.default.result(this,"responseType");o.default.isString(a)&&(n=!0,o.default.isFunction(this.augmentResponseText)&&(a=this.augmentResponseText(a,i)),a=i.parse(a),i===k.default.json&&(a=m.default.splitChildren(a))),o.default.isFunction(this.augmentResponse)&&(a=this.augmentResponse(a,i)),
n&&this.rootPropertyName&&o.default.has(a,this.rootPropertyName)&&(a=a[this.rootPropertyName]),o.default.isArray(a)&&(a=o.default.first(a));var r,s={};o.default.each(this.sessionAttrs,function(e,t){o.default.has(a,t)&&(s[t]=a[t])}),o.default.each(this.syncedAttrs,function(e,t){if(o.default.has(a,t)){var n,i=e;i.typeName||(i=e.type,n=o.default.omit(e,"type")),s[t]=i===C.default.string?a[t]:i.parse(a[t],n)}else this.has(t)&&(r||(r=o.default.result(this,"defaults")),s[t]=r&&o.default.has(r,t)?r[t]:void 0);
},this);var l=o.default.extend({},t,{parse:!0});return o.default.extend(s,this._getRelations(this.syncedRelations,a,l)),s},save:function(e,t,n){var a;null==e||"object"==typeof e?(a=e,n=t):(a={})[e]=t;var i=o.default.extend({save:!0},n),r=o.default.extend(this.getSaveParams(a),i.data);if(o.default.isEmpty(r))return i.success&&i.success(this),c.default.Deferred().resolve(this);i.data=r;var s=i.success;return i.success=function(e,t,n){e.cache&&e.cache.store(e),s&&s(e,t,n)},u.default.Model.prototype.save.call(this,a,i);
},sync:function(e,t,n){var a=n?o.default.clone(n):{};if("create"===e||"update"===e){var i=a.data,r=a.url||o.default.result(this,"saveUrl")||o.default.result(this,"syncUrl")||o.default.result(this,"url");a.url=P.join(r,i),a.data=""}return u.default.Model.prototype.sync.call(this,e,t,a)},getSaveParams:function(e){var t=this._getSaveAttrs(e),n=o.default.reduce(t,function(e,t,n){var a=t.definition,i=t.value,r=n;if(!a)return e[r]=i,e;var s=a.relationClass;if(s){var l,u=s.prototype.model;a.rootPropertyName?l=a.rootPropertyName:i.rootPropertyName?l=i.rootPropertyName:u&&u.prototype&&(l=u.prototype.rootPropertyName),
i=i.getSaveParams(),l&&(r=l)}else{var d,c;o.default.has(a,"type")?(d=a.type,c=o.default.omit(a,"type")):d=a,i=d.stringify(i,c)}return e[r]=i,e},{},this);return n},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void(0,b.default)(!1,this.name+" is already capturing events");var e=this.set,t=[],n=o.default.clone(this.attributes);this.set=function(n,a,i){var r,s=o.default.extend({},i,{silent:!0});return"object"==typeof n?(r=n,i=a):(r={})[n]=a,o.default.each(r,function(n,a){
this.get(a)!==n&&(t.push({key:a,value:n}),e.call(this,a,n,s))},this),o.default.each(this._derivedListeners,function(n){var a=n.key,i=this.derivedAttrs[a],r=i.call(this);this.get(a)!==r&&(t.push({key:a,value:r}),e.call(this,a,r,s))},this),this},this.releaseCapturedChangeEvents=function(){this.set=e,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,this._previousAttributes=n,this._changing=!0,o.default.each(t,function(e){this.trigger("change:"+e.key,this,e.value)},this),this._changing=!1,
o.default.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},shouldPreserveAttributes:function(){return!!(this.isPreservingAttributes||this.collection&&this.collection.isPreservingAttributes);
},shouldPreserveAttribute:function(e,t){var n=this.get(e);return o.default.isObject(n)||o.default.isUndefined(t)},_removePreservedAttrs:function(e){var t=o.default.reduce(e,function(e,t,n){return this.shouldPreserveAttribute(n,t)||(e[n]=t),e},{},this);return t},_resolveRelationDefinition:function(e){return o.default.isFunction(e)?e.call(this):e},_getRelations:function(e,t,n){t||(t={}),n||(n={});var a={};return o.default.each(e,function(e,i){var r=this._resolveRelationDefinition(e),s=r.relationClass;
(0,b.default)(s,this.name+" requires a `relationClass` for the "+i+" relation");var l=i;n.parse&&!o.default.has(t,i)&&o.default.has(r,"rootPropertyName")&&(l=r.rootPropertyName);var d=t[l],c=this.shouldPreserveAttributes();if(d instanceof s)return void(a[i]=d);if(!d&&r.deferred)return void(c||(a[i]=void 0));var f=n.reset?null:this.get(i),p=f instanceof s,h=s.prototype instanceof u.default.Collection;if(h?d=m.default.parseArray(d):d||(d={}),p){f.isPreservingAttributes=c||f.preserveCachedAttributes;
var v=r.setOptions;o.default.isFunction(v)&&(v=v.call(this,n)),h?f.set(d,o.default.extend({parse:n.parse,remove:!f.isPreservingAttributes},v)):(n.parse&&(d=f.parse(d)),f.set(d,v)),f.isPreservingAttributes=!1}else{var g={parse:n.parse};if(o.default.each(this.getContext(),function(e){g[e]=this[e]},this),!h){var y=r.attrs;o.default.isFunction(y)&&(y=y.call(this,t)),d=o.default.extend({},d,y)}var w=r.options;o.default.isFunction(w)&&(w=w.call(this,t)),o.default.extend(g,{parent:this},w),f=new s(d,g)}
a[i]=f},this),a},_forwardRelationEvents:function(e,t){function n(){var n=arguments[0];if("change"!==n){if("statechange"===n)return void(this.shouldUpdateRelationState.apply(this,o.default.rest(arguments,1))&&M.scheduleUpdate(this.updateState,this));var i=o.default.toArray(arguments);i[0]="change:"+t+"."+n,this.trigger.apply(this,i),o.default.contains(a,n)||(this.trigger("change:"+t+".change",this,e),this.trigger("change",this))}}var a=["sync","request","sort","invalid","error","add","remove"];e.on("all",n,this),
this._relationListeners[t]=n},_setDerived:function(e,t){var n,a=this.spyOnGet(function(){var a=this.set;this.set=function(){(0,b.default)(!1,this.name+" blocked `set` in the "+t+" attribute. Derived attributes are read-only.")},n=e.call(this),this.set=a});this.set(t,n),o.default.each(a,function(n){this._addDerivedListener(t,n,e)},this)},_addDerivedListener:function(e,t,n){this._derivedListeners||(this._derivedListeners=[]);var a={key:e,name:t,callback:o.default.bind(this._setDerived,this,n,e)},i=o.default.findWhere(this._derivedListeners,{
key:e,name:a.name});i||(this._derivedListeners.push(a),this.on(a.name,a.callback))},_getSaveAttrs:function(e){var t;if(e)t=o.default.reduce(e,function(e,t,n){return e[n]={definition:this.syncedAttrs[n],value:t},e},{},this);else{var n=o.default.extend({},this.syncedAttrs,this.syncedRelations);t=o.default.reduce(n,function(e,t,n){var a=this._resolveRelationDefinition(t),i=a.save;return o.default.isFunction(i)&&(i=i.call(this)),i&&(e[n]={definition:a,value:this.get(n)}),e},{},this)}return t},_validateTypes:function(e,t){
var n=a(e),i=o.default.reduce(n,function(n,a){if(this.hasDerived(a))return n;if(!o.default.has(t,a))return n.push(this.name+" received an unknown attribute: "+a+". All attributes must be defined in `sessionAttrs`, `syncedAttrs`, `sessionRelations`, or `syncedRelations`."),n;var i,r=e[a],s=this._resolveRelationDefinition(t[a]),l=s.relationClass;i=l?this.hasInitialRelations?C.default.instanceOf(l):l.prototype instanceof u.default.Collection?C.default.oneOfType(C.default.array,C.default.object):C.default.object:s.type?s.type:s;
var d=i.validate;return d?d(r)||n.push(a+" of type "+i.typeName+" has an invalid value: "+JSON.stringify(r)):n.push(a+" 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){O.test(e)&&M.scheduleUpdate(this.updateState,this)}});t.default=D,e.exports=t.default},function(e,t){"use strict";t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
},t.__esModule=!0},function(e,t,n){"use strict";var a=n(597).default;t.default=function(e,t,n){for(var i=!0;i;){var r=e,s=t,o=n;l=d=u=void 0,i=!1,null===r&&(r=Function.prototype);var l=a(r,s);if(void 0!==l){if("value"in l)return l.value;var u=l.get;if(void 0===u)return;return u.call(o)}var d=Object.getPrototypeOf(r);if(null===d)return;e=d,t=s,n=o,i=!0}},t.__esModule=!0},function(e,t,n){"use strict";var a=n(596).default,i=n(1539).default;t.default=function(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=a(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i?i(e,t):e.__proto__=t)},t.__esModule=!0},,function(e,t,n){"use strict";function a(e,t){var n=l.default.partials[e],a=s.default.extend({},t.hash.context||this,t.hash);return new l.default.SafeString(n(a))}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(4),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=a(r),o=n(41),l=a(o),u=n(5),d=a(u),c=n(38),f=(a(c),n(23)),p=i(f),h=n(46),m=a(h),v=n(218),g=a(v),y=n(60),b=a(y),w=n(79),P=i(w),_=n(57),S=a(_),x=l.default.Collection.extend({mixins:[g.default],responseType:b.default.xml,instanceOptions:["url","path","pageStart","pageSize","persistInCache","skipCache"],_context:["parent"],cache:null,cacheKey:function(){return s.default.result(this,"url")},constructor:function(e,t){t||(t={}),s.default.each(this.getContext(),function(e){var n=t[e];
void 0!==n&&this.setContext(e,n)},this);var n=s.default.result(this,"instanceOptions");if(s.default.each(n,function(e){s.default.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(d.default.Deferred().resolve().promise()),!this.cache||this.skipCache)return l.default.Collection.prototype.constructor.apply(this,arguments),void this._initState();this.initialize.apply(this,arguments);
var a=this.cache.getItemCacheKey(this),i=this.cache.get(a);return this.uninitialize(),i?i:t.onlyIfCached?{}:(l.default.Collection.prototype.constructor.apply(this,arguments),this._initState(),void this.cache.store(this,a))},uninitialize:function(){this.stopListening()},_initState:function(){S.default.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=s.default.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),l.default.sync.apply(this,arguments)},syncUrl:function(){var e="";if(this.url&&(e=s.default.result(this,"url")),this.path&&(e=p.join([e,s.default.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=p.join(e,t)}return e},parse:function(e,t){
return this.convert(e)},convert:function(e){var t=e;if(s.default.isString(t)){var n=s.default.result(this,"responseType");s.default.isFunction(this.augmentResponseText)&&(t=this.augmentResponseText(t,n)),t=n.parse(t),n===b.default.json&&(t=m.default.splitChildren(t))}if(s.default.isFunction(this.augmentResponse)&&(t=this.augmentResponse(t)),s.default.isArray(t))return t;var a=this.model.prototype.rootPropertyName;if(!a)return t;var i=t[a];return i?(s.default.isArray(i)||(i=[i]),i):[]},clone:function(e){
e||(e=this.models);var t=s.default.result(this,"instanceOptions"),n=s.default.extend(s.default.pick(this,t),s.default.pick(this,this.getContext()),{skipCache:!0,persistInCache:!1});return new this.constructor(e,n)||null},cloneDeep:function(e){e||(e=this.models);var t=s.default.map(e,function(e){return e.clone()});return this.clone(t)},clear:function(e){e=s.default.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)},getSaveParams:function(){return this.map(function(e){
return e.getSaveParams()})},onCollectionChange:function(){P.scheduleUpdate(this.updateState,this)},onStateChange:function(e,t,n){e!==this&&this.shouldUpdateModelState(e,t,n)&&P.scheduleUpdate(this.updateState,this)}});t.default=x,e.exports=t.default},,function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(681),r=a(i);t.autobind=r.default;var s=n(850),o=a(s);t.after=o.default;var l=n(851),u=a(l);t.compose=u.default;var d=n(852),c=a(d);t.debounce=c.default;
var f=n(853),p=a(f);t.memoize=p.default;var h=n(854),m=a(h);t.once=m.default;var v=n(470),g=a(v);t.throttle=g.default},function(e,t,n){"use strict";var a=n(204).default;t.default=function(){function e(e,t,n){for(var i=0;i<t.length;i++){var r=t[i],s=r.decorators,o=r.key;if(delete r.key,delete r.decorators,r.enumerable=r.enumerable||!1,r.configurable=!0,("value"in r||r.initializer)&&(r.writable=!0),s){for(var l=0;l<s.length;l++){var u=s[l];if("function"!=typeof u)throw new TypeError("The decorator for method "+r.key+" is of the invalid type "+typeof u);
r=u(e,o,r)||r}if(void 0!==r.initializer){n[o]=r;continue}}a(e,o,r)}}return function(t,n,a,i,r){return n&&e(t.prototype,n,i),a&&e(t,a,r),t}}(),t.__esModule=!0},function(e,t,n){"use strict";function a(e,t,n){var a=(0,s.default)(e.props,t),i=(0,s.default)(e.state,n),r=!a||!i;return r}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(333),s=i(r);e.exports=t.default},function(e,t){"use strict";function n(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 i(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,a){return t(e,n[a])})?i:(n=r,i=e.apply(void 0,r))}}function r(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 s(e){for(var t=arguments.length,a=Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return function(){for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];var o=0,l=i.pop(),u=r(i),d=e.apply(void 0,[function(){return o++,l.apply(void 0,arguments)}].concat(a)),c=function(e,t){for(var a=arguments.length,i=Array(a>2?a-2:0),r=2;r<a;r++)i[r-2]=arguments[r];var s=u.map(function(n){return n.apply(void 0,[e,t].concat(i))});return d.apply(void 0,n(s))};return c.resultFunc=l,
c.recomputations=function(){return o},c.resetRecomputations=function(){return o=0},c}}function o(){return s(i).apply(void 0,arguments)}function l(e){var t=arguments.length<=1||void 0===arguments[1]?o: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),a=0;a<e;a++)t[a]=arguments[a];
return t.reduce(function(e,t,a){return e[n[a]]=t,e},{})})}t.__esModule=!0,t.defaultMemoize=i,t.createSelectorCreator=s,t.createSelector=o,t.createStructuredSelector=l},,function(e,t,n){var a,i;/*!
	  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 a=arguments[t];if(a){var i=typeof a;if("string"===i||"number"===i)e.push(a);else if(Array.isArray(a))e.push(n.apply(null,a));else if("object"===i)for(var s in a)r.call(a,s)&&a[s]&&e.push(s)}}return e.join(" ")}var r={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(a=[],i=function(){return n}.apply(t,a),!(void 0!==i&&(e.exports=i)))}()},function(e,t,n){"use strict";function a(e,t,n,a,i,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,a,i,r,s,o],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=a},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var i=n(2040),r=a(i),s=n(2041),o=a(s);t.Provider=r.default,t.connect=o.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({"interface":["get","save","populate"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(10),o=a(s),l=o.default.CollectionView.extend({appendHtml:function(e,t,n){return this.sorted?this.sortedAppendHtml.apply(this,arguments):this.reversed?this.reversedAppendHtml.apply(this,arguments):o.default.CollectionView.prototype.appendHtml.apply(this,arguments);
},sortedAppendHtml:function(e,t,n){if(e.isBuffering){var a=e.elBuffer.childNodes;a.length<=n?e.elBuffer.appendChild(t.el):e.elBuffer.insertBefore(t.el,a[n]),e._bufferedChildren.push(t)}else{var i=e.itemViewContainer?e.$(e.itemViewContainer):e.$el,r=i.children();r.size()<=n?i.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{var a=e.itemViewContainer?e.$(e.itemViewContainer):e.$el;
a.prepend(t.el)}},measureList:function(){if(this.children.length){var e=this.children._views,t=e[r.default.first(r.default.keys(e))];r.default.defer(r.default.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=r.default.map(t,function(t,n){var a=e.findByModel(t);return a._index=n,a.el});this.$el.append(n)},onCollectionRendered:function(){this.measure&&this.measureList()}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1903),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(47),c=a(d),f=c.default.extend({className:"confirm-modal modal modal-sm fade",template:r.default,
ui:{doubleConfirmMessage:".double-confirm-message",confirmBtn:".confirm-btn",confirmLabel:".confirm-btn .btn-label"},events:o.default.extend({"click .confirm-btn":"onConfirm"},c.default.prototype.events),whitelistedOptions:["title","message","confirmLabel","cancelLabel","hasDanger","hideCancel"],initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.async=e.async,this.data=o.default.pick(e,this.whitelistedOptions),this.promise=u.default.Deferred()},serializeData:function(){
return o.default.defaults(this.data,{confirmLabel:"Yes",cancelLabel:"No"})},onRender:function(){c.default.prototype.onRender.apply(this,arguments),setTimeout(o.default.bind(function(){this.ui.confirmBtn.focus()},this),this.focusDelay)},onHide:function(e){c.default.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.default=f,e.exports=t.default},,function(e,t,n){"use strict";function a(e,t){o.default.isArray(t)?o.default.each(t,e):e(t)}function i(e){return o.default.reduce(e,function(e,t){var n=t.split("="),a=n[0],i=n[1];try{a=decodeURIComponent(a),i=void 0===i?null:decodeURIComponent(i),e.hasOwnProperty(a)?Array.isArray(e[a])?e[a].push(i):e[a]=[e[a],i]:e[a]=i;
}catch(r){c.default.warn("Unable to decode query string at "+a)}return e},{})}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(385),u=r(l),d=n(26),c=r(d),f=new u.default((!1),"",(!0)),p={parseXML:function(e){if(!e)return{};var t=f.parseXmlString(e);if(!t)return c.default.warn("parseXML: No XML document created"),{};if(t.getElementsByTagName("parsererror").length)return c.default.warn("parseXML: Errors found while parsing XML document"),{};try{return f.xml2json(t);
}catch(n){return c.default.warn("parseXML: Unable to parse XML: "+n.message),{}}},replaceXMLElementNames:function(e,t,n){o.default.isArray(t)||(t=[t]);var a=t.join("|"),i=new RegExp("<("+a+")","g"),r=new RegExp("</("+a+")>","g");return e=e.replace(i,"<"+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(a){}}}e&&a(n,t)},parseInteger:function(e,t){function n(t){
if(e.hasOwnProperty(t)){var n=e[t];null==n||""===n?e[t]=0:e[t]=parseInt(n,10)}}e&&a(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];null===n||""===n?e[t]=0:e[t]=parseFloat(n)}}e&&a(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&&a(n,t)},parseArray:function(e,t){function n(t){if(e.hasOwnProperty(t)){
var n=e[t];o.default.isArray(n)||(e[t]=[n])}else e[t]=[]}e&&a(n,t)},parseQueryString:function(e,t,n){function r(t){if(e.hasOwnProperty(t)){var a=e[t];if(!o.default.isObject(a))return o.default.isString(a)&&(a=a.trim().replace(/^(\?|#)/,""))?void(e[t]=i(a.split(n))):void(e[t]={})}}e&&(n||(n="&"),a(r,t))}};t.default=p,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=v.get(e);if(!t)return[];var n=u.default.compact(u.default.map(m,function(e){if(t.hasOwnProperty(e))return v.get(t[e]);
}));return n.unshift(t),n}function i(e){var t=v.get(e);if(t){var n=t.grandchild||t.child;return n?v.get(n):t}}function r(e){var t=i(e);return!!t&&t.typeString!==e}var s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),d=n(149),c=o(d),f=n(6),p=o(f),h=["id","typeString"],m=["grandparent","parent","child","grandchild"],v=(0,c.default)(h,[{id:1,typeString:"movie",title:function(){return(0,p.default)("Movie")},plural:function(){return(0,p.default)("Movies");
},element:"video"},{id:2,typeString:"show",title:function(){return(0,p.default)("Show")},plural:function(){return(0,p.default)("Shows")},element:"directory",child:3,grandchild:4},{id:3,typeString:"season",title:function(){return(0,p.default)("Season")},plural:function(){return(0,p.default)("Seasons")},element:"directory",parent:2,child:4},{id:4,typeString:"episode",title:function(){return(0,p.default)("Episode")},plural:function(){return(0,p.default)("Episodes")},element:"video",grandparent:2,parent:3
},{id:5,typeString:"trailer",title:function(){return(0,p.default)("Trailer")},plural:function(){return(0,p.default)("Trailers")},element:"video"},{id:6,typeString:"comic",title:function(){return(0,p.default)("Comic")},plural:function(){return(0,p.default)("Comics")},element:"photo"},{id:7,typeString:"person",title:function(){return(0,p.default)("Person")},plural:function(){return(0,p.default)("People")},element:"directory"},{id:8,typeString:"artist",title:function(){return(0,p.default)("Artist")},
plural:function(){return(0,p.default)("Artists")},element:"directory",child:9,grandchild:10},{id:9,typeString:"album",title:function(){return(0,p.default)("Album")},plural:function(){return(0,p.default)("Albums")},element:"directory",parent:8,child:10},{id:10,typeString:"track",title:function(){return(0,p.default)("Track")},plural:function(){return(0,p.default)("Tracks")},element:"audio",grandparent:8,parent:9},{id:11,typeString:"picture",title:function(){return(0,p.default)("Picture")},plural:function(){
return(0,p.default)("Pictures")},element:"photo"},{id:12,typeString:"clip",title:function(){return(0,p.default)("Clip")},plural:function(){return(0,p.default)("Clips")},element:"video"},{id:13,typeString:"photo",title:function(){return(0,p.default)("Photo")},plural:function(){return(0,p.default)("Photos")},element:"photo",parent:14},{id:14,typeString:"photoAlbum",title:function(){return(0,p.default)("Photo Album")},plural:function(){return(0,p.default)("Photo Albums")},element:"directory",child:13
},{id:15,typeString:"playlist",title:function(){return(0,p.default)("Playlist")},plural:function(){return(0,p.default)("Playlists")},element:"directory"},{id:16,typeString:"playlistFolder",title:function(){return(0,p.default)("Playlist")},plural:function(){return(0,p.default)("Playlists")},element:"directory",child:15},{id:1001,typeString:"userPlaylistItem",title:function(){return(0,p.default)("Clip")},plural:function(){return(0,p.default)("Clips")},element:"video"}]);t.default=s({},v,{getRelatedMediaTypes:a,
getChildMediaType:i,typeHasChildMedia:r}),e.exports=t.default},,function(e,t,n){"use strict";function a(e,t){var n=s.default.invert(e);return s.default.reduce(e,function(e,a){return e[a]=t[n[a]],e},{})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(31),l=i(o),u={playing:"playing",paused:"paused",stopped:"paused",error:"paused",buffering:"playing"},d=l.default.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=a(this.elements,this.types),this.elementByType=a(this.types,this.elements),
this.typeByStream=a(this.streams,this.types),this.streamByType=a(this.types,this.streams),this.statebyCastState=a(this.castStates,this.states),this.castStateByState=a(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 u[e]}}),c=new d;t.default=c,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(16).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(66),p=u(f),h=n(32),m=u(h),v=n(38),g=u(v),y=n(27),b=n(44),w=n(29),P=u(w),_=n(1630),S=u(_),x=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
(0,g.default)(!e.onClick,"Use `onPress` instead of `onClick` for reliable behavior on touch screens"),this._preventFocus=!1,this._preventOnClick=!1,this._isTouch=!1,this._isActive=!1,this._isFocused=!1,this.state={isActive:!1,isFocused:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"_activate",value:function(e){this._isActive=e,this.setState({isActive:e})}},{key:"_focus",value:function(e){this._isFocused=e,this.setState({isFocused:e})}
},{key:"_shouldPreventFocus",value:function(){if(this.props.allowFocusOnPress)return!1;var e=p.default.findDOMNode(this)===document.activeElement;return!e}},{key:"_press",value:function(e){var t=this.props.onPress;t&&t(e)}},{key:"onTouchStart",decorators:[y.autobind],value:function(e){this._isTouch=!0,this._preventFocus=this._shouldPreventFocus(),1===e.touches.length&&this._activate(!0),this.props.onTouchStart&&this.props.onTouchStart(e)}},{key:"onTouchMove",decorators:[y.autobind],value:function(e){
this._activate(!1),this.props.onTouchMove&&this.props.onTouchMove(e)}},{key:"onTouchEnd",decorators:[y.autobind],value:function n(e){var t=this.props,a=t.to,i=t.target,r=t.isDisabled,n=t.onTouchEnd;this._isActive&&!r&&(!a||i&&"_self"!==i||(e.preventDefault(),window.location.href=a),this._press(e)),this._activate(!1),n&&n(e)}},{key:"onTouchCancel",decorators:[y.autobind],value:function(e){this._isTouch=!1,this._activate(!1),this.props.onTouchCancel&&this.props.onTouchCancel(e)}},{key:"onMouseDown",
decorators:[y.autobind],value:function(e){this._isTouch||(this._preventFocus=this._shouldPreventFocus(),0===e.button&&this._activate(!0),this.props.onMouseDown&&this.props.onMouseDown(e))}},{key:"onMouseUp",decorators:[y.autobind],value:function u(e){if(!this._isTouch){var t=this.props,n=t.isDisabled,u=t.onMouseUp;this._isActive&&!n&&(this._press(e),this._preventOnClick=!0),this._activate(!1),u&&u(e)}}},{key:"onMouseLeave",decorators:[y.autobind],value:function(e){this._isTouch||(this._isActive&&this.setState({
isActive:!1}),this.props.onMouseLeave&&this.props.onMouseLeave(e))}},{key:"onClick",decorators:[y.autobind],value:function(e){this._preventFocus=!1;var t=this.props.isDisabled;this._preventOnClick||this._isTouch||this._isActive||!this._isFocused||t||this._press(e),this._preventOnClick=!1,this._isTouch=!1}},{key:"onFocus",decorators:[y.autobind],value:function(e){return this._preventFocus?void(this._preventFocus=!1):(this._focus(!0),void(this.props.onFocus&&this.props.onFocus(e)))}},{key:"onBlur",
decorators:[y.autobind],value:function(e){this._focus(!1),this.props.onBlur&&this.props.onBlur(e)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.to,a=e.kind,i=e.size,r=e.isSelected,s=e.isDisabled,u=e.component,d=l(e,["className","to","kind","size","isSelected","isDisabled","component"]),f=this.state,p=f.isActive,h=f.isFocused,v={},g=u;return n?(g="a",v.href=n,v["aria-role"]="link"):v["aria-role"]="button",v.className=(0,m.default)(t,S.default.link,S.default[a],i&&S.default[i],r&&S.default.isSelected,s&&"isDisabled",p&&"isActive",h&&"isFocused"),
"button"!==g&&"input"!==g||(v.type=d.type||"button",v.disabled=s),c.default.createElement(g,o({},d,v,{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}(d.Component);x.propTypes={component:d.PropTypes.string,className:d.PropTypes.string,to:d.PropTypes.string,target:d.PropTypes.string,
kind:d.PropTypes.oneOf(b.kinds.all),size:d.PropTypes.oneOf(b.sizes.all),isSelected:d.PropTypes.bool,isDisabled:d.PropTypes.bool,allowFocusOnPress:d.PropTypes.bool,onPress:d.PropTypes.func,onTouchStart:d.PropTypes.func,onTouchMove:d.PropTypes.func,onTouchEnd:d.PropTypes.func,onTouchCancel:d.PropTypes.func,onMouseDown:d.PropTypes.func,onMouseUp:d.PropTypes.func,onMouseLeave:d.PropTypes.func,onClick:d.PropTypes.func,onFocus:d.PropTypes.func,onBlur:d.PropTypes.func},x.defaultProps={component:"button",
kind:b.kinds.DEFAULT,isSelected:!1,isDisabled:!1,allowFocusOnPress:!1},t.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(928),r=a(i);t.directions=r;var s=n(332),o=a(s);t.kinds=o;var l=n(241),u=a(l);t.sizes=u;var d=n(929),c=a(d);t.scrollDirections=c;var f=n(930),p=a(f);t.tooltipAttachments=p},function(e,t,n){"use strict";var a=n(82),i=a;e.exports=i},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(385),o=a(s),l=n(26),u=a(l),d=new o.default((!1),"",(!0)),c=["Directory","Video","Track","Photo","Playlist"],f=r.default.reduce(c,function(e,t){return e[t]="Metadata",e},{}),p={parseType:function(e,t,n){var a=this.getByType("parse",e,this._parseTypeMap);return a?a(t,n):t},stringifyType:function(e,t,n){if(r.default.isString(t))return t;if(null==t)return"";var a=this.getByType("stringify",e,this._stringifyTypeMap);return a?a(t,n):t},getByType:function(e,t,n){if(n&&r.default.has(n,t))return n[t];
var a=t.charAt(0).toUpperCase()+t.slice(1),i=e+a;return r.default.has(this,i)?(n[t]=this[i],this[i]):void 0},parseBoolean:function(e){return 1===Number(e)||"true"===e},stringifyBoolean:function(e){return e?"1":"0"},parseInteger:function(e){return null==e||""===e?0:parseInt(e,10)},parseFloat:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return null==e||""===e?0:parseFloat(e)}),parseString:function(e){return null==e?"":e.toString();
},parseEncodedString:function(e){if(null==e)return"";try{return decodeURIComponent(e)}catch(t){return u.default.warn("[Parser] Unable to parse encoded string"),e}},parseArray:function(e){return e?r.default.isArray(e)?e:[e]:[]},parseList:function(e){return e?r.default.isArray(e)?e:e.split(","):[]},stringifyList:function(e){return e.join(",")},parseQueryString:function(e,t){if(t||(t={}),r.default.isObject(e))return e;if(!r.default.isString(e))return{};if(e=e.trim().replace(/^(\?|#)/,""),!e)return{};
var n=t.separator||"&";return r.default.reduce(e.split(n),function(e,t){var n=t.split("="),a=n[0],i=n[1];try{a=decodeURIComponent(a),i=void 0===i?null:decodeURIComponent(i),e.hasOwnProperty(a)?Array.isArray(e[a])?e[a].push(i):e[a]=[e[a],i]:e[a]=i}catch(r){u.default.warn("[Parser] Unable to decode query string at "+a)}return e},{})},stringifyQueryString:function(e,t){t||(t={});var n=t.separator||"&",a=r.default.map(r.default.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t]);
});return a.join(n)},parseJSON:function(e){try{return JSON.parse(e)}catch(t){var n=r.default.isString(e)?e.substring(0,50):"no response";return u.default.warn("[Parser] Unable to parse JSON: "+t.message+" ("+n+")"),{}}},parseXML:function(e){var t=d.parseXmlString(e);if(!t)return u.default.warn("[Parser] No XML document created"),{};if(t.getElementsByTagName("parsererror").length)return u.default.warn("[Parser] Errors found while parsing XML document"),{};try{return d.xml2json(t)}catch(n){return u.default.warn("[Parser] Unable to parse XML: "+n.message),
{}}},replaceXMLElementNames:function(e,t,n){r.default.isArray(t)||(t=[t]);var a=t.join("|"),i=new RegExp("<("+a+")","g"),s=new RegExp("</("+a+")>","g");return e=e.replace(i,"<"+n+' elementName="$1"'),e=e.replace(s,"</"+n+">")},replaceMetadataXMLElementNames:function(e){return this.replaceXMLElementNames(e,c,"Metadata")},splitChildren:function(e){var t=e&&e._children;return r.default.isArray(t)&&(t.forEach(function(t){var n=t._elementType;if(t.elementName=n,n){var a=f[n]||n;e[a]||(e[a]=[]),e[a].push(this.splitChildren(t));
}}.bind(this)),e._children=null),e},reset:function(){this._parseTypeMap={json:this.parseJSON,xml:this.parseXML},this._stringifyTypeMap={}}};p.reset(),t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=0,p=[],h=u.default.Layout.extend({className:"modal fade",focusDelay:500,animationDelay:500,events:{"hide.bs.modal":"onHide"},initialize:function(e){this.once("render",function(){
f+=1,c.default.trigger("anyModalOpen")}),this.once("close",function(){f-=1,0===f&&c.default.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(c.default,"shortcut:escape",r.default.bind(function(){p[0]===this&&this.hide()},this)),this.listenToOnce(this,"close",function(){var e=p.indexOf(this);e!==-1&&p.splice(e,1)}),p.unshift(this),this.$el.modal()),
(0,o.default)(":focus").blur())},onHide:function(e){this.isHidden=!0,r.default.each(this.panes,function(e,t){var n=e.constructor.onModalClose;n&&n.apply(this)},this),setTimeout(r.default.bind(function(){c.default.trigger("hide:modal",this),this.trigger("close")},this),this.animationDelay)}});t.default=h,e.exports=t.default},,function(e,t,n){"use strict";function a(e){var t=e["aria-label"],n=e.className,a=e.name,r=e.style;return{$$typeof:i,type:"i",key:null,ref:null,props:{className:n?(0,l.default)(a,n):a,
"aria-hidden":!t,"aria-label":t,style:r},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(32)),l=r(o);a.propTypes={"aria-label":s.PropTypes.string,className:s.PropTypes.string,style:s.PropTypes.object,name:s.PropTypes.string.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(204).default;t.default=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),a(e,i.key,i)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),t.__esModule=!0},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(182),r=a(i),s=n(235),o=a(s),l=n(80),u=a(l),d=u.default.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=o.default.folder:e.placeholderClass||(this.placeholderClass=o.default[this.type])),
u.default.prototype.setup.apply(this,arguments)},setDimensions:function(e){e.width?e.height=r.default.getPosterHeight(this.type,e.width):e.height&&(e.width=r.default.getPosterWidth(this.type,e.height)),u.default.prototype.setDimensions.call(this,e)},setModel:function(e,t){u.default.prototype.setModel.apply(this,arguments),this.model&&this.model.get("isFolder")&&(this.placeholderClass=o.default.folder)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(204).default;t.default=function(e,t,n){
return t in e?a(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.__esModule=!0},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(41),l=a(o),u=n(5),d=a(u),c=n(39),f=a(c),p=n(38),h=a(p),m=n(23),v=i(m),g=n(111),y=a(g),b=n(218),w=a(b),P=l.default.Model.extend({mixins:[w.default],cache:new y.default,constructor:function(e,t){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");var n=this.findOption(t,"skipCache");if(n)return void l.default.Model.prototype.constructor.apply(this,arguments);var a=this.cache.getItemCacheKey(this,e),i=this.cache.get(a);if(i)return t.parse&&(e=i.parse(e)),this.preserveCachedAttributes&&this.preserveCachedAttributes(t.url)?s.default.each(e,function(e,t){s.default.isUndefined(i.get(t))&&!s.default.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;var r=this.findOption(t,"onlyIfCached");return r?{}:(l.default.Model.prototype.constructor.apply(this,arguments),void this.cache.store(this,a))},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){var t=s.default.isObject(e)?e:f.default.parseXML(e);return t},parse:function(e,t){var n=this.convert(e);return this.whitelistedAttrs&&(n=s.default.pick(n,this.whitelistedAttrs)),n},save:function(e,t,n){var a,i,r,o=this.attributes;null==e||"object"==typeof e?(a=e,n=t):(a={})[e]=t,n=s.default.extend({validate:!0},n);var u=this.getSaveParams(a,n);if(s.default.extend(u,n.data),a&&!n.wait){if(!this.set(a,n))return!1;
}else if(!this._validate(a,n))return!1;if(a&&n.wait&&(this.attributes=s.default.extend({},o,a)),s.default.isEmpty(u)&&!n.force)return n.success&&n.success(this),d.default.Deferred().resolve(this);void 0===n.parse&&(n.parse=!0);var c=this,f=n.success;n.success=function(e){if(c.attributes=o,e){var t=c.parse(e,n);if(n.wait&&(t=s.default.extend(a||{},t)),s.default.isObject(t)&&!c.set(t,n))return!1;c.cache.store(c)}f&&f(c,e,n),c.trigger("sync",c,e,n)},l.default.wrapError(this,n),i=this.isNew()?"create":n.patch?"patch":"update",
"patch"===i&&(n.attrs=a);var p=s.default.result(this,"saveUrl")||s.default.result(this,"url");return s.default.isEmpty(u)||(n.url=v.join(p,u)),n.data="",r=this.sync(i,this,n),a&&n.wait&&(this.attributes=o),r},getSaveParams:function(e,t){return this.isNew()?e||this.toJSON():this.changedAttributes(e)||{}},getScopedKey:function(e){return null!=e&&s.default.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},restoreDefaults:function(e){var t=s.default.result(this,"defaults");if(!t)return this.clear(e);
var n,a=this.attributes;for(n in a)n in t||this.unset(n,e);return this.set(t,e),this},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void(0,h.default)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,a,i){var r;"object"==typeof n?(r=n,i=a):(r={})[n]=a;var o=s.default.extend({},i,{silent:!0}),l=e.call(this,r,o);return s.default.extend(t,this.changed),l},this.releaseCapturedChangeEvents=function(){s.default.each(t,function(e,t){this.trigger("change:"+t,this,e);
},this),s.default.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}}});P.extend=function(){var e=l.default.Model.extend.apply(this,arguments);return e.prototype.cache=new y.default,e},t.default=P,e.exports=t.default},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function a(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",
"5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var a=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==a.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(r){return!1}}var i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=a()?Object.assign:function(e,t){for(var a,s,o=n(e),l=1;l<arguments.length;l++){
a=Object(arguments[l]);for(var u in a)i.call(a,u)&&(o[u]=a[u]);if(Object.getOwnPropertySymbols){s=Object.getOwnPropertySymbols(a);for(var d=0;d<s.length;d++)r.call(a,s[d])&&(o[s[d]]=a[s[d]])}}return o}},function(e,t,n){"use strict";var a=n(205).default,i=n(206).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(298);a(t,i(r,a));var s="SHOW_ALERT";t.SHOW_ALERT=s;var o="SAVE_SETTINGS";t.SAVE_SETTINGS=o;var l="DOWNLOAD_SERVER";t.DOWNLOAD_SERVER=l;var u="DISCOVER_SERVERS";t.DISCOVER_SERVERS=u;
var d="REDIRECT_TO_ROUTE";t.REDIRECT_TO_ROUTE=d;var c="REDIRECT_TO_HTTP";t.REDIRECT_TO_HTTP=c;var f="GARBAGE_COLLECT_ENTITIES";t.GARBAGE_COLLECT_ENTITIES=f;var p="SELECT_ITEM";t.SELECT_ITEM=p;var h="SELECT_MODELS";t.SELECT_MODELS=h;var m="DESELECT_ALL_ITEMS";t.DESELECT_ALL_ITEMS=m;var v="DESELECT_MODELS";t.DESELECT_MODELS=v;var g="DESELECT_COLLECTION";t.DESELECT_COLLECTION=g;var y="SELECT_RANGE";t.SELECT_RANGE=y;var b="DESELECT_RANGE";t.DESELECT_RANGE=b;var w="PLAY_SELECTED_ITEMS";t.PLAY_SELECTED_ITEMS=w;
var P="ADD_SELECTED_ITEMS_TO_PLAYLIST";t.ADD_SELECTED_ITEMS_TO_PLAYLIST=P;var _="UPDATE_SELECTED_ITEMS_WATCHED_STATUS";t.UPDATE_SELECTED_ITEMS_WATCHED_STATUS=_;var S="EDIT_SELECTED_ITEMS";t.EDIT_SELECTED_ITEMS=S;var x="REFRESH_SELECTED_ITEMS";t.REFRESH_SELECTED_ITEMS=x;var C="ANALYZE_SELECTED_ITEMS";t.ANALYZE_SELECTED_ITEMS=C;var T="SYNC_METADATA_ITEMS";t.SYNC_METADATA_ITEMS=T;var k="OPTIMIZE_METADATA_ITEMS";t.OPTIMIZE_METADATA_ITEMS=k;var I="MERGE_SELECTED_ITEMS";t.MERGE_SELECTED_ITEMS=I;var M="DELETE_SELECTED_ITEMS";
t.DELETE_SELECTED_ITEMS=M;var A="FETCH_PLANS";t.FETCH_PLANS=A;var E="POPULATE_PLANS";t.POPULATE_PLANS=E;var O="FETCH_UNWATCHED_WATCH_LATER_LIST";t.FETCH_UNWATCHED_WATCH_LATER_LIST=O;var D="POPULATE_UNWATCHED_WATCH_LATER_LIST";t.POPULATE_UNWATCHED_WATCH_LATER_LIST=D;var R="FETCH_UNWATCHED_RECOMMENDED_LIST";t.FETCH_UNWATCHED_RECOMMENDED_LIST=R;var L="POPULATE_UNWATCHED_RECOMMENDED_LIST";t.POPULATE_UNWATCHED_RECOMMENDED_LIST=L;var N="UPDATE_USER";t.UPDATE_USER=N;var j="CLEAR_UPDATE_USER_ERROR";t.CLEAR_UPDATE_USER_ERROR=j;
var U="TEST_SERVER";t.TEST_SERVER=U;var F="SET_RELAY_REMINDER";t.SET_RELAY_REMINDER=F;var B="FETCH_LIBRARIES";t.FETCH_LIBRARIES=B;var z="POPULATE_LIBRARIES";t.POPULATE_LIBRARIES=z;var $="ADD_LIBRARY";t.ADD_LIBRARY=$;var V="START_LIBRARY_REFRESH";t.START_LIBRARY_REFRESH=V;var H="SHARE_LIBRARIES";t.SHARE_LIBRARIES=H;var q="ENABLE_HTTP_FALLBACK";t.ENABLE_HTTP_FALLBACK=q;var W="OPTIMIZE_DATABASE";t.OPTIMIZE_DATABASE=W;var K="CLEAN_BUNDLES";t.CLEAN_BUNDLES=K;var Q="EMPTY_TRASH";t.EMPTY_TRASH=Q;var Y="DELETE_SERVER";
t.DELETE_SERVER=Y;var G="START_ACTIVITY";t.START_ACTIVITY=G;var X="UPDATE_ACTIVITY";t.UPDATE_ACTIVITY=X;var J="FINISH_ACTIVITY";t.FINISH_ACTIVITY=J;var Z="EVENT_CONNECTION_OPEN";t.EVENT_CONNECTION_OPEN=Z;var ee="RESET_QUICK_SEARCH";t.RESET_QUICK_SEARCH=ee;var te="FETCH_QUICK_SEARCH";t.FETCH_QUICK_SEARCH=te;var ne="CHANGE_SEARCH_QUERY";t.CHANGE_QUICK_SEARCH_QUERY=ne;var ae="CHANGE_SEARCH_SETTINGS";t.CHANGE_QUICK_SEARCH_SETTINGS=ae;var ie="SELECT_SEARCH_RESULT";t.SELECT_QUICK_SEARCH_RESULT=ie;var re="NAVIGATE_SEARCH_RESULT";
t.NAVIGATE_QUICK_SEARCH_RESULT=re;var se="PLAY_SEARCH_RESULT";t.PLAY_QUICK_SEARCH_RESULT=se;var oe="FETCH_SEARCH";t.FETCH_SEARCH=oe;var le="EDIT_LIBRARY";t.EDIT_LIBRARY=le;var ue="POPULATE_METADATA_LIST_RANGE";t.POPULATE_METADATA_LIST_RANGE=ue;var de="REPOPULATE_METADATA_LIST_RANGE";t.REPOPULATE_METADATA_LIST_RANGE=de;var ce="PLAY_METADATA_LIST";t.PLAY_METADATA_LIST=ce;var fe="SHUFFLE_METADATA_LIST";t.SHUFFLE_METADATA_LIST=fe;var pe="ADD_METADATA_LIST_TO_PLAYLIST";t.ADD_METADATA_LIST_TO_PLAYLIST=pe;
var he="SYNC_METADATA_LIST";t.SYNC_METADATA_LIST=he;var me="OPTIMIZE_METADATA_LIST";t.OPTIMIZE_METADATA_LIST=me;var ve="SELECT_METADATA_LIST_ITEM";t.SELECT_METADATA_LIST_ITEM=ve;var ge="DESELECT_METADATA_LIST_ITEM";t.DESELECT_METADATA_LIST_ITEM=ge;var ye="DESELECT_ALL_METADATA_LIST_ITEMS";t.DESELECT_ALL_METADATA_LIST_ITEMS=ye;var be="ADD_METADATA_ITEM_TO_PLAYLIST";t.ADD_METADATA_ITEM_TO_PLAYLIST=be;var we="ANALYZE_METADATA_ITEM";t.ANALYZE_METADATA_ITEM=we;var Pe="DELETE_METADATA_ITEM";t.DELETE_METADATA_ITEM=Pe;
var _e="DELETE_METADATA_ITEM_VERSION";t.DELETE_METADATA_ITEM_VERSION=_e;var Se="DOWNLOAD_METADATA_ITEM_VERSION";t.DOWNLOAD_METADATA_ITEM_VERSION=Se;var xe="EDIT_METADATA_ITEM";t.EDIT_METADATA_ITEM=xe;var Ce="FIX_METADATA_ITEM_MATCH";t.FIX_METADATA_ITEM_MATCH=Ce;var Te="GET_METADATA_ITEM_INFO";t.GET_METADATA_ITEM_INFO=Te;var ke="MARK_METADATA_ITEM_UNWATCHED";t.MARK_METADATA_ITEM_UNWATCHED=ke;var Ie="MARK_METADATA_ITEM_WATCHED";t.MARK_METADATA_ITEM_WATCHED=Ie;var Me="OPTIMIZE_METADATA_ITEM";t.OPTIMIZE_METADATA_ITEM=Me;
var Ae="PLAY_METADATA_ITEM";t.PLAY_METADATA_ITEM=Ae;var Ee="PLAY_METADATA_ITEM_VERSION";t.PLAY_METADATA_ITEM_VERSION=Ee;var Oe="PLAY_RELATED_MIX";t.PLAY_RELATED_MIX=Oe;var De="PLAY_PRIMARY_EXTRA";t.PLAY_PRIMARY_EXTRA=De;var Re="QUEUE_METADATA_ITEM";t.QUEUE_METADATA_ITEM=Re;var Le="RATE_METADATA_ITEM";t.RATE_METADATA_ITEM=Le;var Ne="RECOMMEND_METADATA_ITEM";t.RECOMMEND_METADATA_ITEM=Ne;var je="REFRESH_METADATA_ITEM";t.REFRESH_METADATA_ITEM=je;var Ue="SHARE_METADATA_ITEM";t.SHARE_METADATA_ITEM=Ue;var Fe="SPLIT_METADATA_ITEM_APART";
t.SPLIT_METADATA_ITEM_APART=Fe;var Be="SYNC_METADATA_ITEM";t.SYNC_METADATA_ITEM=Be;var ze="UNMATCH_METADATA_ITEM";t.UNMATCH_METADATA_ITEM=ze;var $e="WATCH_METADATA_ITEM_LATER";t.WATCH_METADATA_ITEM_LATER=$e;var Ve="REPOPULATE_PAGE";t.REPOPULATE_PAGE=Ve;var He="VIEW_ITEM_DETAILS";t.VIEW_ITEM_DETAILS=He;var qe="INIT_HUBS_PAGE";t.INIT_HUBS_PAGE=qe;var We="FETCH_HUBS";t.FETCH_HUBS=We;var Ke="POPULATE_HUBS";t.POPULATE_HUBS=Ke;var Qe="INIT_METADATA_LIST_PAGE";t.INIT_METADATA_LIST_PAGE=Qe},function(e,t,n){
"use strict";var a=n(262).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(6),c=i(d),f=n(39),p=i(f),h=n(46),m=i(h),v=n(23),g=r(v),y=n(230),b=i(y),w=n(92),P=i(w),_=n(40),S=i(_),x=n(73),C=i(x),T=n(177),k=i(T),I=n(78),M=r(I),A=n(77),E=i(A),O=n(232),D=i(O),R=n(111),L=i(R),N=n(18),j=i(N),U=n(60),F=i(U),B=n(19),z=i(B),$=n(770),V=i($),H=n(434),q=i(H),W=n(772),K=i(W),Q=z.default.extend({name:"MetadataModel",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey","relatedOptions"],
responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:M.METADATA_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,E.default)(this.entityType,e.ratingKey,this.server.entityID())},idAttribute:"ratingKey",rootPropertyName:"Metadata",cache:new L.default,preserveCachedAttributes:!0,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:{indirectHttpHeaders:j.default.object},syncedAttrs:{elementName:j.default.string,ratingKey:j.default.string,parentRatingKey:j.default.string,grandparentRatingKey:j.default.string,key:j.default.string,childrenKey:j.default.string,parentKey:j.default.string,grandparentKey:j.default.string,primaryExtraKey:j.default.string,guid:j.default.string,librarySectionID:j.default.string,librarySectionUUID:j.default.string,
type:j.default.string,title:j.default.string,titleSort:j.default.string,originalTitle:j.default.string,parentTitle:j.default.string,grandparentTitle:j.default.string,year:j.default.string,tagline:j.default.string,summary:j.default.string,studio:j.default.string,contentRating:j.default.string,originallyAvailableAt:j.default.string,thumb:j.default.string,parentThumb:j.default.string,grandparentThumb:j.default.string,banner:j.default.string,art:j.default.string,parentArt:j.default.string,grandparentArt:j.default.string,
theme:j.default.string,parentTheme:j.default.string,grandparentTheme:j.default.string,chapterSource:j.default.string,ratingImage:j.default.string,audienceRating:j.default.float,audienceRatingImage:j.default.string,metadataState:j.default.string,mediaState:j.default.string,isChannelItem:j.default.boolean,rating:j.default.float,userRating:j.default.float,index:j.default.integer,parentIndex:j.default.integer,absoluteIndex:j.default.integer,duration:j.default.integer,viewOffset:j.default.integer,viewCount:j.default.integer,
childCount:j.default.integer,leafCount:j.default.integer,viewedLeafCount:j.default.integer,ratingCount:j.default.integer,extraType:j.default.integer,lastViewedAt:j.default.integer,addedAt:j.default.integer,updatedAt:j.default.integer,deletedAt:j.default.integer,url:j.default.string,playlistID:j.default.integer,playlistType:j.default.string,smart:j.default.boolean,composite:j.default.string,durationInSeconds:j.default.integer,Media:j.default.array,Collection:j.default.array,Director:j.default.array,
Producer:j.default.array,Writer:j.default.array,Genre:j.default.array,Mood:j.default.array,Country:j.default.array,Label:j.default.array,Role:j.default.array,Location:j.default.array},sessionRelations:{children:function(){return{relationClass:n(89)}}},syncedRelations:{chapters:{relationClass:V.default,rootPropertyName:"Chapter",deferred:!0},overlays:{relationClass:q.default,rootPropertyName:"Overlay",deferred:!0},onDeck:function(){return{relationClass:Q,rootPropertyName:"OnDeck",deferred:!0}},related:function(){
var e={skipCache:!0};return this.relatedOptions&&o.default.extend(e,this.relatedOptions),{relationClass:n(221),rootPropertyName:"RelatedHubs",deferred:!0,options:e}},popularLeaves:function(){return{relationClass:n(89),rootPropertyName:"PopularLeaves",deferred:!0}},extras:function(){return{relationClass:n(89),rootPropertyName:"Extras",deferred:!0,attrs:function(e){return{containerKey:g.join([e.key,"extras"])}}}},concerts:{relationClass:K.default,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(){var e=S.default.get("playlist"),t=e.typeString;return this.get("type")===t},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},compositeTranscodeUrl:function(){var e=this.get("composite");if(e)return(0,D.default)(this.server,e)},thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,D.default)(this.server,e)},parentThumbTranscodeUrl:function(){var e=this.get("parentThumb");if(e)return(0,D.default)(this.server,e)},grandparentThumbTranscodeUrl:function(){var e=this.get("grandparentThumb");
if(e)return(0,D.default)(this.server,e)},artTranscodeUrl:function(){var e=this.get("art");if(e)return(0,D.default)(this.server,e)},parentArtTranscodeUrl:function(){var e=this.get("parentArt");if(e)return(0,D.default)(this.server,e)},grandparentArtTranscodeUrl:function(){var e=this.get("grandparentArt");if(e)return(0,D.default)(this.server,e)},downloadUrl:function(){var e=this,t=this.get("Media");if(t&&1===t.length){var n=function(){var n=o.default.first(o.default.first(t).Part),a=n&&n.key;if(a)return{
v:function(){return e.server.resolveUrl(a,{appendToken:!0})}}}();if("object"==typeof n)return n.v}}},defaults:{rating:0,isChannelItem:!1,Media:[],Collection:[],Director:[],Producer:[],Writer:[],Genre:[],Mood:[],Country:[],Label:[],Role:[],Location:[]},initialize:function(){this.setChildrenKey(this.get("childrenKey")),this.on("socket:timeline",this.onSocketTimeline,this),this.on("change:childrenKey",this.onChildrenKeyChange,this)},uninitialize:function(){this.off("socket:timeline",this.onSocketTimeline,this),
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=o.default.extend({},this._populatedParams,e.data)),e.usePopulatedParams&&(e.data=this._populatedParams),z.default.prototype.fetch.call(this,e)},shouldPreserveAttribute:function(e,t){if("Media"===e){if(!this.get(e))return!1;var n=o.default.first(t),a=n&&o.default.first(n.Part),i=a&&a.Stream;return!i||!i.length;
}return z.default.prototype.shouldPreserveAttribute.apply(this,arguments)},augmentResponseText:function(e,t){return t===F.default.xml?m.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var a=e[t];void 0!==a&&n.setContext(t,a)});var a=e[this.rootPropertyName];a&&(a.librarySectionID=e.librarySectionID,a.librarySectionUUID=e.librarySectionUUID);var i=a||e,r=i.Related,s=i.OnDeck,l=this.extractChildrenKey(i.key);return l.childrenKey&&(i.childrenKey=l.childrenKey,
i.key=l.key),t===F.default.xml&&(i.Media=this.convertMediaItems(i.Media)),r&&(i.RelatedHubs=o.default.compact([].concat(r.Hub,r.Metadata))),s&&(i.OnDeck=s.Metadata),this.normalize(i)},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=g.join(e,{includeRelated:1})),this.get("children").set("containerKey",e))},convertMediaItems:function(e){var t=m.default.parseArray(e);
return o.default.each(t,function(e){p.default.parseBoolean(e,["indirect","optimizedForStreaming","premium"]),p.default.parseInteger(e,["id","duration","width","height","bitrate","audioChannels","proxyType"]),p.default.parseArray(e,"Part"),o.default.each(e.Part,function(e){e.exists=null==e.exists||m.default.parseBoolean(e.exists),e.accessible=null==e.accessible||m.default.parseBoolean(e.accessible),p.default.parseInteger(e,["id","duration","size"]),p.default.parseBoolean(e,"optimizedForStreaming"),
p.default.parseEncodedString(e,"file"),p.default.parseArray(e,"Stream"),o.default.each(e.Stream,function(e){p.default.parseBoolean(e,["selected","default","forced","timed","cabac","hasScalingMatrix","headerStripping"]),p.default.parseInteger(e,["id","index","streamType","duration","width","height","bitrate","bitDepth","level","refFrames","samplingRate","channels","minLines"]),p.default.parseFloat(e,"frameRate")})})}),this.addNoneSubtitlesStreams(t)},addNoneSubtitlesStreams:function(e){var t=C.default.get("subtitles");
return o.default.each(e,function(e){var n=o.default.first(e.Part);if(n&&n.Stream&&(0,b.default)(e)){var a=(0,P.default)(e,{streamType:t.id,selected:!0}),i={id:0,streamType:t.id,language:(0,c.default)("None")};a.length||(i.selected=!0),n.Stream.unshift(i)}}),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"),
"photoalbum"===e.type&&(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":/(movie|episode|video)/i.test(e.type)&&(e.type="clip"),
S.default.get(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,a=u.default.Deferred();if(!e||!t)return a.reject(this).promise();if(!e.indirect)return a.resolve(this).promise();if(t.postURL){var i=o.default.find([this.server,this.server.parent.get("primaryServer")],function(e){return e&&e.get("isConnected")&&e.get("isFullServer")&&!e.get("activeConnection").get("isPossiblyCrossNetworkProtected")});if(i)return this.resolvePostUrl(e,t,i)}var r=t.key;this.server.get("isCloud")&&(r=this.server.swizzleNodeUrl(r));var s=u.default.ajax(this.server.getXHROptions(r));
return s.done(function(i){n.mergeIndirectResponse(i,e,t)?a.resolve(n):a.reject(n)}),s.fail(function(){a.reject(n)}),a.promise()},resolvePostUrl:function(e,t,n){var a=this,i=u.default.Deferred(),r=t.key,s=t.postURL,o=n.getXHROptions("/system/proxy");o.headers=o.headers||{},o.headers["X-Plex-Url"]=s;var l=u.default.ajax(o);return l=l.then(function(e,t,n){var i=g.join(r,{postURL:s});a.server.get("isCloud")&&(i=a.server.swizzleNodeUrl(i));var o=a.server.getXHROptions(i);return o.type="POST",o.headers=o.headers||{},
o.data=n.getAllResponseHeaders()+"\r\n"+e,u.default.ajax(o)}),l.done(function(n,r,s){a.mergeIndirectResponse(n,e,t)?i.resolve(a):i.reject(a)}),l.fail(function(){i.reject(a)}),i.promise()},mergeIndirectResponse:function(e,t,n){var i=m.default.parseXML(m.default.replaceMetadataXMLElementNames(e));if(!(i&&i.Metadata&&i.Metadata.Media&&i.Metadata.Media.Part))return!1;var r=o.default.first(this.convertMediaItems(i.Metadata.Media)),s=m.default.parseArray(r.Part),l=o.default.first(s);if(!r||!l)return!1;if(r.indirect=!1,
o.default.extend(t,o.default.omit(r,"Part")),o.default.extend(n,l),s.length>1){var u;(u=t.Part).push.apply(u,a(s.slice(1)))}if(i.httpHeaders){for(var d,c=new RegExp("([^=]+)=([^&]+)&?","g"),f={};d=c.exec(i.httpHeaders);)d[1]in f?(o.default.isArray(f[d[1]])||(f[d[1]]=[f[d[1]]]),f[d[1]].push(d[2])):f[d[1]]=d[2];this.set("indirectHttpHeaders",f)}return!0},batchAdd:function(e,t,n){var a=o.default.map(e,function(e){return e.get("ratingKey")}),i=g.join(["/library/metadata",a.join(","),t,"add"],{tag:n}),r=this.server.getXHROptions(i,{
type:"PUT"});return u.default.ajax(r)},getDownloadUrl:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.get("Media")[e];if(t){var n=o.default.first(t.Part),a=n&&n.key;if(a)return this.server.resolveUrl(a,{appendToken:!0})}},getFilepath:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.get("Media")[e];if(t){var n=o.default.first(t.Part);if(n)return n.file}},getLocation:function(){var e=this.get("Location");return e.length?o.default.first(e).path:this.getFilepath();
},getMediaKey:function(){var e=o.default.first(this.get("Media"));if(e){var t=o.default.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")},onSocketTimeline:function(e){e.state===k.default.PROCESSED?(this.fetch({data:{skipRefresh:1},usePopulatedParams:!0}),this.refreshChildren()):e.state===k.default.DELETED&&this.trigger("destroy",this,this.collection);
},onChildrenKeyChange:function(e,t){this.setChildrenKey(t)}});t.default=Q,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(41),o=a(s),l=n(1015),u=o.default.Model.extend({defaults:r.default.extend({allowFlash:!1,allowServerUpdates:!1,testPrivateConnectionsWhenPublicAddressDoesNotMatch:!0,allowHttpsMediaServerConnections:!1,allowMediaServerRelayConnections:!1,allowLoopbackDiscovery:!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},l,window.PLEXWEB)}),d=new u;t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(62),r=a(i),s={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(){var e="ie"===r.default.id&&11===parseInt(r.default.version,10);
return!e&&!r.default.presto&&!!(window.URL&&window.URL.createObjectURL&&window.URL.revokeObjectURL)}(),hasBlob:function(){try{return!!new 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(n){}return e}(),isChromeApp:!(!window.chrome||!window.chrome.storage)};t.default=s,e.exports=t.default},function(e,t,n){"use strict";function a(e){for(var t;t=e._renderedComponent;)e=t;return e;
}function i(e,t){var n=a(e);n._nativeNode=t,t[m]=n}function r(e){var t=e._nativeNode;t&&(delete t[m],e._nativeNode=null)}function s(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,r=t.firstChild;e:for(var s in n)if(n.hasOwnProperty(s)){var o=n[s],l=a(o)._domID;if(null!=l){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(p)===String(l)||8===r.nodeType&&r.nodeValue===" react-text: "+l+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+l+" "){i(o,r);continue e}f(!1);
}}e._flags|=h.hasCachedChildNodes}}function o(e){if(e[m])return e[m];for(var t=[];!e[m];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,a;e&&(a=e[m]);e=t.pop())n=a,t.length&&s(a,e);return n}function l(e){var t=o(e);return null!=t&&t._nativeNode===e?t:null}function u(e){if(void 0===e._nativeNode?f(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:f(!1),e=e._nativeParent;for(;t.length;e=t.pop())s(e,e._nativeNode);return e._nativeNode;
}var d=n(139),c=n(641),f=n(33),p=d.ID_ATTRIBUTE_NAME,h=c,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:o,getInstanceFromNode:l,getNodeFromInstance:u,precacheChildNodes:s,precacheNode:i,uncacheNode:r};e.exports=v},function(e,t,n){"use strict";function a(e,t){t||(t={});var n=s.default.defaults(t,{typeName:e,parse:s.default.bind(l.default.parseType,l.default,e)});return n}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(46),l=i(o),u={
xml:a("xml"),json:a("json",{accept:"application/json"}),text:a("text")};t.default=u,e.exports=t.default},function(e,t){"use strict";function n(e){return encodeURIComponent(e||"")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(31),o=a(s),l=/version\/(\d+(\.\d+)?)/i,u=/(?:chrome|crios|gfibertv)[\/-](\d+(\.\d+)?)/i,d=/firefox[ \/](\d+(\.\d+)?)/i,c=/(msie |rv:)(\d+(\.\d+)?)/i,f=/(?:applewebkit|safari)\/(\d+(\.\d+)?)/i,p=function(e){
var t=/\(.* ([^\)]+)\)$/.exec(e);return t&&t[1]||void 0},h=o.default.extend({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:f,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:f},{id:"ps4",name:"Mystery 4",webkit:!0,regex:/\(PlayStation 4\)/,versionRegex:f},{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:c,versionMatchIndex:2},{id:"opera",name:"Opera",presto:!0,regex:/opera/i,versionRegex:l},{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)/i,versionRegex:u},{id:"firefox",name:"Firefox",gecko:!0,regex:/firefox/i,versionRegex:d},{id:"safari",name:"Safari",webkit:!0,regex:/macintosh.+safari/i,versionRegex:l},{id:"safari",name:"Safari",webkit:!0,regex:/applewebkit/i,versionRegex:f}],platforms:[{id:"wpe",name:"WebKit for Wayland",tv:!0,regex:/WPE$/},{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(t){}}},{id:"blackberry",name:"Blackberry",mobile:!0,regex:/BlackBerry|RIM|BB10/,version:function(e){var t=/PlayBook/.test(e)?/Tablet OS (\d+\.\d+)/:l,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+)/.exec(e);return t&&t[1]||void 0}},{id:"sta",name:"Smart TV Alliance",tv:!0,version:function m(e){
var m,t;if(/SmartTvA/.test(e))t=/SmartTvA\/(\d+\.\d+)/.exec(e),m=t&&t[1]||m;else{var n=[/Linux i686.+Chromium\/18/,/nettv\/4.2/i,/toshiba-dtv/i,/viera/i],a=[/nettv\/4/i],i=[/nettv/i],s=function(t){return t.test(e)};r.default.some(n,s)?m="2.0":r.default.some(a,s)?m="1.0":r.default.some(i,s)&&(m="0")}return m},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=/\/([^\s]+) \(Vizio/.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:"OpenELEC (Raspberry Pi)",tv:!0,regex:/plexmediaplayer.*openelec-rpi2/i,version:p},{id:"openelec",name:"OpenELEC",tv:!0,regex:/plexmediaplayer.*openelec/i,version:p},{id:"linuxkonvergo",name:"Linux",tv:!0,regex:/plexmediaplayer.*linux/i,
version:p},{id:"osxkonvergo",name:"OSX",tv:!0,regex:/plexmediaplayer.*mac/i,version:p},{id:"windowskonvergo",name:"Windows",tv:!0,regex:/plexmediaplayer.*win/i,version:p},{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:"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,constructor:function(e){var t="",n="";e?(t=e.userAgent,n=e.platform):null!=navigator&&(t=navigator.userAgent,n=navigator.platform),this.detect({userAgent:t,platform:n})},detect:function(e){var t,n=this.runTests(this.browsers,e),a=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),a&&(t=r.default.isFunction(a.version)?a.version(e.userAgent):a.version,this.platform=a.name,this.platformID=a.id,this.platformVersion=t||this.platformVersion,this.mobile=!!a.mobile,this.tv=!!a.tv),this.tv||(this.platformModifierKey="osx"===this.platformID||"ios"===this.platformID?"command":"ctrl")},runTests:function(e,t){
for(var n,a,i,r=0;a!==!0&&(i=e[r++]);)n=t[i.context||"userAgent"],i.regex?a=i.regex.test(n):i.predicate&&(a=i.predicate(n));return i},getVersion:function(e,t,n){var a=e.match(t);return a&&a.length>n&&a[n]||"0"},toJSON:function(){var e={};for(var t in this)this[t]&&"browsers"!==t&&"platforms"!==t&&(e[t]=this[t]);return e}});t.default=new h,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return e!==t?n.fn(this):n.inverse(this)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,
e.exports=t.default},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=a},,function(e,t,n){"use strict";e.exports=n(640)},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(41),l=a(o),u=n(5),d=a(u),c=n(39),f=a(c),p=n(23),h=i(p),m=n(304),v=a(m),g=n(218),y=a(g),b=l.default.Collection.extend({
mixins:[y.default],cache:new v.default,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(d.default.Deferred().resolve().promise()),
!t.allowInCache&&!t.persistInCache)return void l.default.Collection.prototype.constructor.apply(this,arguments);this.initialize.apply(this,arguments);var n=this.cache.getItemCacheKey(this),a=this.cache.get(n);return this.uninitialize(),t.onlyIfCached&&(a||(a={})),a?a:(l.default.Collection.prototype.constructor.apply(this,arguments),void this.cache.store(this,n))},uninitialize:function(){this.stopListening()},sync:function(){return(this.allowInCache||this.persistInCache)&&this.cache.store(this),l.default.sync.apply(this,arguments);
},syncUrl:function(){var e="";if(this.url&&(e=s.default.result(this,"url")),this.path&&(e=h.join([e,s.default.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var t=this.pageStart||0,n=this.pageSize||0,a={};a["X-Plex-Container-Start"]=t,a["X-Plex-Container-Size"]=n,e=h.join(e,a)}return e},convert:function(e,t){var n=s.default.isObject(e)?e:f.default.parseXML(e);if(!t)return n;var a=n[t];return a?(s.default.isArray(a)||(a=[a]),a):[]},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=s.default.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)}});b.extend=function(){var e=l.default.Collection.extend.apply(this,arguments);return e.prototype.cache=new v.default,e},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function a(e){
return e}function i(e,t){(0,o.default)("string"==typeof e,'Action creators must have a "type". Have you misspelled a constant?');var n="function"==typeof t?t:a;return function(){var t={type:e,payload:n.apply(void 0,arguments)};return t}}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(38),o=r(s);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function a(e){return function(){return e.apply(this,s.default.initial(arguments))}}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.containerClassName,a=e.labelClassName,r=e.size,s=e.label,o=(0,l.default)(t,p.default[r]);return s?{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{className:o},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:s,className:(0,l.default)(a,p.default.spinnerLabel)},_owner:null}],className:(0,l.default)(n,p.default.spinnerContainer)
},_owner:null}:{$$typeof:i,type:"div",key:null,ref:null,props:{className:o,"aria-label":(0,d.default)("Loading")},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(32)),l=r(o),u=n(6),d=r(u),c=n(44),f=n(1627),p=r(f);a.propTypes={className:s.PropTypes.string,containerClassName:s.PropTypes.string,labelClassName:s.PropTypes.string,label:s.PropTypes.string,size:s.PropTypes.oneOf(c.sizes.all)},a.defaultProps={size:c.sizes.MEDIUM},t.default=a,
e.exports=t.default},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(41),u=i(l),d=n(11),c=n(38),f=i(c),p=n(23),h=r(p),m=n(58),v=i(m),g=n(311),y=i(g),b=n(78),w=r(b),P=n(77),_=i(P),S=n(111),x=i(S),C=n(227),T=i(C),k=n(35),I=i(k),M=n(141),A=i(M),E=n(26),O=i(E),D=n(17),R=i(D),L=n(57),N=i(L),j=n(18),U=i(j),F=n(422),B=i(F),z=n(292),$=i(z),V=n(19),H=i(V),q=n(426),W=i(q),K=n(289),Q=i(K),Y=n(142),G=i(Y),X=n(758),J=i(X),Z=n(295),ee=i(Z),te=n(106),ne=i(te),ae=n(108),ie=i(ae),re=n(797),se=i(re),oe=n(800),le=i(oe),ue=n(107),de=i(ue),ce=n(795),fe=i(ce),pe=n(803),he=i(pe),me=n(801),ve=i(me),ge={
PENDING:"pending",CONNECTED:"connected",UNAVAILABLE:"unavailable",UNAUTHORIZED:"unauthorized"},ye={PENDING:"pending",RESOLVED:"resolved",REJECTED:"rejected"},be={SECONDARY:"secondary"},we=["camera_upload","cloudsync","content_filter","home","lyrics","music_videos","pass","premium_music_metadata","sync","trailers"],Pe=H.default.extend({mixins:[$.default],name:"ServerModel",entityType:w.SERVER,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,_.default)(this.entityType,e.machineIdentifier||this.cid);
},idAttribute:"machineIdentifier",connectionTestTimeout:1e4,cache:new x.default,persistInCache:!0,sessionAttrs:{connectionTestResult:U.default.oneOf(ge.PENDING,ge.CONNECTED,ge.UNAVAILABLE,ge.UNAUTHORIZED).isRequired,promiseState:U.default.oneOf(ye.PENDING,ye.RESOLVED,ye.REJECTED).isRequired,sections:U.default.instanceOf(Q.default).isRequired,playlists:U.default.instanceOf(J.default).isRequired,playQueueManager:U.default.instanceOf(W.default).isRequired,isShared:U.default.boolean.isRequired,isBundled:U.default.boolean.isRequired,
isCloud:U.default.boolean.isRequired,isMerged:U.default.boolean.isRequired,cloudAccount:U.default.instanceOf(se.default).isRequired,update:U.default.instanceOf(le.default),settings:U.default.instanceOf(de.default).isRequired,alerts:U.default.instanceOf(fe.default).isRequired,transcodeJobs:U.default.instanceOf(he.default).isRequired,sessions:U.default.instanceOf(ve.default).isRequired,superToken:U.default.string,accessToken:U.default.string,sourceTitle:U.default.string,publicAddressMatches:U.default.boolean,
httpsRequired:U.default.boolean,presence:U.default.boolean,home:U.default.boolean,synced:U.default.boolean,createdAt:U.default.integer,lastSeenAt:U.default.integer,serverClass:U.default.oneOf(be.SECONDARY)},sessionRelations:{activeConnection:{relationClass:ne.default,deferred:!0},connections:{relationClass:ee.default,options:function(){return{server:this}}}},syncedAttrs:{machineIdentifier:U.default.string,friendlyName:U.default.string,startState:U.default.string,version:U.default.string,platform:U.default.string,
platformVersion:U.default.string,sync:U.default.boolean,multiuser:U.default.boolean,transcoderLyrics:U.default.boolean,myPlex:U.default.boolean,myPlexMappingState:U.default.string,myPlexSigninState:U.default.string,myPlexSubscription:U.default.boolean,myPlexUsername:U.default.string,transcoderPhoto:U.default.boolean,transcoderAudio:U.default.boolean,transcoderVideo:U.default.boolean,transcoderVideoRemuxOnly:U.default.boolean,transcoderSubtitles:U.default.boolean,transcoderActiveVideoSessions:U.default.integer,
allowMediaDeletion:U.default.boolean,allowCameraUpload:U.default.boolean,allowChannelAccess:U.default.boolean,allowSync:U.default.boolean,companionProxy:U.default.boolean,updater:U.default.boolean,updatedAt:U.default.integer,countryCode:U.default.string,ownerFeatures:U.default.list,maxUploadBitrate:U.default.integer,maxUploadBitrateReason:U.default.string,maxUploadBitrateReasonMessage:U.default.string},derivedAttrs:{debugName:function(){var e=this.get("machineIdentifier"),t=this.get("connections"),n=1===t.length&&t.at(0).get("isLoopback"),a=this.get("friendlyName");
return!a&&n&&(a="[Loopback]"),a||(e?"["+e+"]":"[Anonymous]")},shortVersion:function(){var e=this.get("version"),t=/(\d+\.){2,3}\d+/.exec(e);return o.default.first(t)||e},isConnected:function(){return this.get("connectionTestResult")===ge.CONNECTED},isUnavailable:function(){return this.get("connectionTestResult")===ge.UNAVAILABLE},isUnauthorized:function(){return this.get("connectionTestResult")===ge.UNAUTHORIZED},isResolved:function(){return this.get("promiseState")===ye.RESOLVED},isRejected:function(){
return this.get("promiseState")===ye.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(){var e=this.get("connections");return!!e.findWhere({isHttps:!0})},hasFallbackConnections:function(){var e=this.get("connections");return!!e.findWhere({isFallback:!0})},isCloudSyncServer:function(){return!!this.get("synced")},isCloudPersonalServer:function(){
return"Cloud"===this.get("platform")},isMobileServer:function(){return!this.get("synced")&&this.get("serverClass")===be.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!(!N.default.get("allowCloudSyncServers")&&this.get("isCloudSyncServer"))&&(!(!N.default.get("allowMobileServers")&&this.get("isMobileServer"))&&(!!this.get("machineIdentifier")&&!this.get("isUnauthorized")&&!this.get("isCloud")));
},isOutOfDate:function(){if(this.get("isCloudSyncServer"))return!1;var e="0.9.16.0";return!this.isVersionOrNewer(e)},isClaimed:function(){return this.get("isConnected")?"ok"===this.get("myPlexSigninState"):void 0},hasManualConnection:function(){var e=this.get("connections");return e.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(){var e=this.get("connectionTestResult")===ge.PENDING;return e?null:this.get("isConnected")},available:function(){var e=this.get("connectionTestResult")===ge.PENDING;return e?null:!this.get("isUnavailable")},authorized:function(){var e=this.get("connectionTestResult")===ge.PENDING;return e?null:this.get("isResolved")},relayed:function(){return this.get("isRelayed")}},defaults:function(){return{connectionTestResult:ge.PENDING,promiseState:ye.PENDING,
sections:new Q.default([],{server:this}),playlists:new J.default({},{server:this}),playQueueManager:new W.default({server:this}),cloudAccount:new se.default({},{server:this}),update:N.default.get("allowServerUpdates")?new le.default({},{server:this}):null,settings:new de.default([],{server:this}),alerts:new fe.default([],{server:this}),transcodeJobs:new he.default([],{server:this}),sessions:new ve.default([],{server:this}),isShared:!1,isBundled:!1,isCloud:!1,isMerged:!1,updater:!0}},url:function _e(){
var e=arguments.length<=0||void 0===arguments[0]?this.get("activeConnection"):arguments[0];(0,f.default)(e,"An active or manual connection is required for a server url");var _e=o.default.result(e,"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 H.default.prototype.updateEntity.apply(this,arguments)},fetch:function(){return u.default.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=t.useLoopback?"http://127.0.0.1:32400/":this.url(t.connection),a=this.get("accessToken"),i=o.default.extend({},t.params);return t.appendHeaders&&o.default.defaults(i,this.getHeaders()),
t.appendToken&&a&&(i["X-Plex-Token"]=a),h.join([n,e],i)},swizzleUrl:function(e,t){var n=e.match(/^\w+:\/\/.+?(\/.+)$/),a=n?n[1]:e;return this.resolveUrl(a,t)},getXHROptions:function(e,t){return a({url:this.resolveUrl(e),dataType:"text",headers:this.getHeaders()},t)},getHeaders:function(){var e=A.default.getInstance(),t=o.default.clone(e),n=this.get("accessToken");n&&(t["X-Plex-Token"]=n);var a=I.default.get("language");return a&&(t["Accept-Language"]=a),t},addConnection:function(e){e.sources||(e.sources=[{
id:"internal"}]);var t=this.get("connections"),n=new ne.default(e),a=t.get(n.id);if(a){var i=a.get("sources");return i.set(e.sources,{remove:!1}),a}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;){var a=t.at(n),i=a.get("sources");i.remove(e),n--}},testAllConnections:function(){var e=this,t=this.get("connections");return(0,O.default)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName")),
this._reset(),t.each(function(t){var n=!t.get("relay"),a=!t.get("isUntested");(n||a)&&e.testConnection(t)}),this.populatePromise},testOnlyUntestedConnections:function(){var e=this,t=this.get("connections");return t.each(function(t){var n=!t.get("relay"),a=t.get("isUntested"),i=t.get("isAborted");n&&(a||i)&&e.testConnection(t)}),this.populatePromise},testOnlyUntestedRelayConnections:function(){var e=this,t=this.get("connections");return t.each(function(t){var n=t.get("relay"),a=t.get("isUntested");
n&&a&&e.testConnection(t)}),this.populatePromise},testConnection:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.server=this,t.connection=e,this.get("promiseState")===ye.REJECTED&&this._reset();var n=R.default.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this));return n},abortAllConnectionTests:function(){var e=this,t=this.get("connections");(0,O.default)("[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};R.default.execute("abortServerConnectionTest",t)},populateIdentity:function(e){var t=this;if(this._identityPromise)return this._identityPromise;var n=R.default.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),n=this.cache.get(t);
if(n){var a=n.get("debugName");O.default.warn("[Identity] %s and %s (cached) collide",e,a),n.get("isConnected")||!this.get("isConnected")?((0,O.default)("[Identity] Merging %s into %s (cached)",e,a),n.merge(this)):((0,O.default)("[Identity] Merging %s (cached) into %s",a,e),this.merge(n),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),N.default.get("shouldCreateStateTree")&&this.updateEntity()},hasOwnerFeature:function(e){if(this.supports("ownerFeatures")){var t=this.get("ownerFeatures");return!!t&&t.indexOf(e)>-1}return!!this.get("myPlexSubscription")&&we.indexOf(e)>-1},supports:function(e){var t=this.get(e);
if(o.default.isBoolean(t))return t;var n=ie.default[e];return null!=n&&this.isVersionOrNewer(n)},isVersionOrNewer:function(e){var t=this.get("shortVersion");return!e||(0,y.default)(t,e)},getSectionForItem:function(e){if(e.section)return e.section;if(e.get("isSection"))return e;var t=e.get("librarySectionID");if(t){var n=new G.default({key:e.get("librarySectionID")},{server:e.server,onlyIfCached:!0});return n}return e.parent?this.getSectionForItem(e.parent):void 0},canAllowHttpFallback:function(){
if(!this.get("isFullServer"))return!1;if(v.default.isHostedHttps&&!N.default.get("allowMixedContent"))return!1;var e=I.default.get("allowHttpFallback"),t=e===T.default.ALWAYS,n=e===T.default.SAME_NETWORK,a=t||n&&this.get("publicAddressMatches");return!!a},hasOtherLoopbackServer:function(){return!!this.collection&&this.collection.hasLoopbackServer()},hasLocalConnection:function(){var e=this.get("activeConnection");return e&&e.get("isPrivate")},hasLoopbackConnection:function(){var e=this.get("activeConnection");
return e&&e.get("isLoopback")},hasSecureConnection:function(){return this.get("isSecure")},authenticate:function(e){this._resolve({accessToken:e})},deauthenticate:function(){this._reject({accessToken:null})},_reset:function(){this.startCapturingChangeEvents(),this.set("promiseState",ye.PENDING),this._resetPopulate(),this.releaseCapturedChangeEvents()},_resolve:function(e){var t=o.default.extend({connectionTestResult:ge.CONNECTED,promiseState:ye.RESOLVED},e);this.startCapturingChangeEvents(),this.set(t),
this._resolvePopulate(),this.releaseCapturedChangeEvents()},_reject:function(e){var t=this.get("connections");t.hasOnlyFailedConnections()&&O.default.warn("[Connections] All connections to %s failed",this.get("debugName"));var n=t.findWhere({isUnauthorized:!0})?ge.UNAUTHORIZED:ge.UNAVAILABLE,a=o.default.extend({connectionTestResult:n,promiseState:ye.REJECTED},e);this.startCapturingChangeEvents(),this.set(a),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")&&O.default.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this._resolve(a({activeConnection:t
},t.get("serverAttrs"))),N.default.get("allowLoopbackDiscovery")){var n=this.get("connections"),i=this.get("activeConnection"),r=i.get("isPrivate"),s=!!n.findWhere({isLoopback:!0});!r||s||this.hasOtherLoopbackServer()||((0,O.default)("[Connections] Adding possible loopback connection for",this.get("debugName")),this.addConnection(i.getLoopbackAttributes()))}},onConnectionTestError:function(e,t){var n=this;if(!e.get("isAborted")){var a=this.get("connections");if(e.get("isHttps")&&!e.get("isUnauthorized")&&!e.get("relay"))if(this.canAllowHttpFallback()){
var i=this.addConnection({scheme:"http",address:e.get("address"),port:e.get("port"),isFallback:!0});(0,O.default)("[Connections] Added insecure fallback connection for %s at %s",this.get("debugName"),i.id)}else O.default.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()&&n._reject();
}):a.hasFailedEveryDirectConnection()&&this.testOnlyUntestedRelayConnections()}}},{connectionTestResults:ge,promiseStates:ye,serverClasses:be});(0,B.default)(Pe,function(){return{relationClass:(0,d.resolve)("ServerFlexModel"),options:{server:this}}}),t.default=Pe,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(149),o=a(s),l=["id","typeString"],u=(0,o.default)(l,[{id:1,typeString:"video",key:"videoStreamID",
title:function(){return(0,r.default)("Video")}},{id:2,typeString:"audio",key:"audioStreamID",title:function(){return(0,r.default)("Audio")}},{id:3,typeString:"subtitles",key:"subtitleStreamID",title:function(){return(0,r.default)("Subtitles")}},{id:4,typeString:"lyrics",key:"lyricStreamID",title:function(){return(0,r.default)("Lyrics")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(31),u=a(l),d=n(48),c=a(d),f=u.default.extend({
mixins:c.default,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),r.default.each(this.interface,function(t){e[t]=r.default.bind(e._proxy,e,t)})},_proxy:function(e){for(var t=this.getInstance(),n=arguments.length,a=Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return t[e].apply(t,a)},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=o.default.Deferred();return this.hasInstance()?e.resolve():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(r.default.contains(this.props,e))return this.getInstance()[e];throw new Error("The "+e+" property has not been defined for this adapter")}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function a(e){return(0,l.default)((0,s.default)(e),"Action handlers must be plain objects"),function(t,n,a){var i=n.type,r=n.payload;return!!e.hasOwnProperty(i)&&(e[i](t,r,a),!0)}}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(310),s=i(r),o=n(38),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,r.createSelector)(function(e,t){var n=t.serverEntityID;return n},o.default,function(e,t){return t[e]})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(30),s=n(302),o=i(s);e.exports=t.default},function(e,t){"use strict";function n(e,t){if(t){var n=[];n.push(e);for(var a=arguments.length,i=Array(a>2?a-2:0),r=2;r<a;r++)i[r-2]=arguments[r];
for(var s=0,o=i.length;s<o;s++){var l=i[s];l&&n.push(l)}return n.push(t),n.join("--")}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="servers";t.SERVER=n;var a="libraries";t.LIBRARY=a;var i="hubs";t.HUB=i;var r="metadataLists";t.METADATA_LIST=r;var s="metadataItems";t.METADATA_ITEM=s;var o="sessionItems";t.SESSION_ITEM=o;var l="userPlaylistItems";t.USER_PLAYLIST_ITEM=l},function(e,t,n){
"use strict";function a(){w&&(w=clearTimeout(w))}function i(){P&&(P=clearTimeout(P))}function r(){a(),i();var e=(0,h.default)(),t=void 0;for(g=!0;m.length&&(!t||t-e<y);)m.pop()(),t=(0,h.default)();g=!1,m.length?w=setTimeout(r,b):_&&(P=setTimeout(_,b))}function s(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];null!=e.budget&&(y=e.budget),null!=e.delay&&(b=e.delay)}function o(){a(),i(),g=!1,v=!1,_=null,m.length=0}function l(e){for(a(),i(),g=!0,v=!0;m.length;)m.pop()();if(e)try{e();
}catch(t){(0,f.default)(!1,t.name+": "+t.message)}_&&_(),g=!1,v=!1}function u(e,t){return t.isStateTreeRoot?(_=e,void(g||P||(P=setTimeout(_,b)))):v?void e():(i(),m[0]!==e&&m.unshift(e),void(g||w||(w=setTimeout(r,b))))}var d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.configure=s,t.resetUpdates=o,t.scheduleImmediateUpdate=l,t.scheduleUpdate=u;var c=n(38),f=d(c),p=n(493),h=d(p),m=[],v=!1,g=!1,y=1e3/60,b=1e3/60,w=void 0,P=void 0,_=void 0},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(58),h=a(p),m=n(148),v=a(m),g=n(461),y=a(g),b=n(180),w=a(b),P=n(57),_=a(P),S="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",x=d.default.ItemView.extend({tagName:"img",background:!1,backgroundSize:"",cache:new y.default,initialize:function(e){e||(e={}),s.default.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("+S+")":"",e.background&&(this.background=e.background),e.backgroundSize&&(this.backgroundSize=e.backgroundSize),e.format&&(this.format=e.format),e.quality&&(this.quality=e.quality),s.default.isFunction(e.getUrl)&&(this.getUrl=e.getUrl),this.allowBaseImageBlobs=_.default.get("allowBaseImageBlobs"),
this.allowBaseImagePreloading=_.default.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){d.default.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=f.resolve("appModel"),n=(0,w.default)();return v.default.image(this.server,e,{fallbackServer:t.get("primaryServer"),
width:this.width*n,height:this.height*n,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(S)},showImage:function(e){return this.background?void this.showBackgroundImage(e):void 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 l.default.Deferred().reject().promise();if(e=this.getTranscodeUrl(e),this.exposeUrl&&this.$el.attr("data-image-url",e),this.allowBaseImageBlobs&&h.default.hasBlob&&h.default.hasObjectUrl){var t=this.loadBlob(e);return t=t.then(this.loadImage,null,this.loadImage)}return this.allowBaseImagePreloading?this.loadImage(e):l.default.Deferred().resolve(e).promise()},loadBlob:function(e){var t=l.default.Deferred();this.cancel();var n=this.cache.getBlobUrl(e);if(n)return t.resolve(n),
t.promise();var a=this.cache.getPlaceholder(e);a&&t.notify(a,!0);var i=new XMLHttpRequest;return i.open("GET",e,!0),i.responseType="arraybuffer",this.xhr=i,i.onreadystatechange=s.default.bind(function(){if(4===i.readyState)if(i.onreadystatechange=null,this.xhr=null,200===i.status){var n=new Blob([i.response],{type:"image/jpeg"}),a=window.URL.createObjectURL(n);this.cache.store({url:e,blobUrl:a}),t.resolve(a)}else t.reject()},this),i.send(),t.promise()},loadImage:function(e,t){var n=l.default.Deferred(),a=new Image;
return a.onload=function(){a.onload=a.onabort=a.onerror=null,t?n.notify(e,a.width,a.height):n.resolve(e,a.width,a.height)},a.onabort=a.onerror=function(){a.onload=a.onabort=a.onerror=null,n.reject()},a.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 a=t&&t>this.width||n&&n>this.height?this.backgroundSize:"auto";this.$el[0].style.backgroundSize=a}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){return t=this.getUrl(t),this.url===t?this:(this.url=t,this.src=null,void this.render())}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default,r=n(205).default,s=n(206).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=a(o),u=n(462),d=i(u),c=n(68),f=a(c),p=n(55),h=i(p),m=n(452);
r(t,s(m,r));var v=(0,f.default)(h.SHOW_ALERT,function(e){return l.default.isString(e)?{type:d.ERROR,message:e}:e});t.showAlert=v;var g=(0,f.default)(h.SAVE_SETTINGS);t.saveSettings=g;var y=(0,f.default)(h.DOWNLOAD_SERVER);t.downloadServer=y;var b=(0,f.default)(h.DISCOVER_SERVERS);t.discoverServers=b;var w=(0,f.default)(h.REDIRECT_TO_ROUTE);t.redirectToRoute=w;var P=(0,f.default)(h.REDIRECT_TO_HTTP);t.redirectToHttp=P;var _=(0,f.default)(h.GARBAGE_COLLECT_ENTITIES);t.garbageCollectEntities=_},function(e,t){
"use strict";function n(e){return function(){return e}}var a=function(){};a.thatReturns=n,a.thatReturnsFalse=n(!1),a.thatReturnsTrue=n(!0),a.thatReturnsNull=n(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t,n){"use strict";var a=n(2072);e.exports={debugTool:a}},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({"interface":["get","set","remove","clear"]
});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(230),o=a(s),l=n(319),u=a(l),d=r.default.extend({},u.default,{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,n){if(!e||!t)return[];var a=t.get("transcoderVideo"),i=t.get("transcoderVideoRemuxOnly"),s=(0,o.default)(e),l=!(!s||!s.bitrate),u=!!e.videoResolution;if(!a||i||!l&&!u)return[];var d,c=t.get("maxUploadBitrate");if(c){var f=l?Math.min(s.bitrate,c):c;if(f===c){var p=r.default.extend({},n,{comparator:function(e){var t=this.qualities.bitrate[e];return t>f}});d=this.getAvailableQualities(p)}else d=this.getAvailableQualitiesBelowBitrate(f,n)}else d=l?this.getAvailableQualitiesBelowBitrate(s.bitrate,n):this.getAvailableQualitiesBelowResolution(e.videoResolution,n);
return d},getAvailableQualitiesBelowBitrate:function(e,t){return t||(t={}),t.comparator=function(t){var n=this.qualities.bitrate[t];return n>=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],a=this.getHeightFromResolution(this.getResolutionFromSize(t));return a>=n},this.getAvailableQualities(t)},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e);
},getMinimumQuality:function(e,t){var n=e===d.ORIGINAL?Number.MAX_VALUE:e,a=t===d.ORIGINAL?Number.MAX_VALUE:t;return n<a?e:t},getMaximumQuality:function(e,t){return this.getMinimumQuality(e,t)===e?t:e}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(16).default,l=n(12).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(32),p=u(f),h=n(2024),m=u(h),v=n(2023),g=u(v),y=n(27),b=n(509),w=n(29),P=u(w),_=n(118),S=u(_),x=n(44),C=n(1625),T=u(C),k=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isScrolling:!1},this._currentScrollTop=0,this._currentScrollLeft=0}return i(t,e),r(t,[{key:"componentDidMount",value:function(){this._scrollTo(this.props)}},{key:"componentWillReceiveProps",value:function(e){e.scrollTop===this.props.scrollTop&&e.scrollLeft===this.props.scrollLeft||this.setState({isScrolling:!0})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t);
}},{key:"componentDidUpdate",value:function(e){this.state.isScrolling&&(this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID),this._scrollTimeoutID=setTimeout(this.onScrollTimeout,this.props.isScrollingTimeout)),this._scrollTo(this.props)}},{key:"componentWillUnmount",value:function(){this._clearTimeouts(),this._cancelScrollTo()}},{key:"_setScrollPosition",value:function(e){var t=e.scrollTop,n=e.scrollLeft;this._clearTimeouts(),this._currentScrollTop=t,this._currentScrollLeft=n,this._animationFrameID=requestAnimationFrame(this.onScrollPositionChange);
}},{key:"_updateScrollPosition",value:function(e){var t=e.scrollTop,n=e.scrollLeft;null!=t&&(this.refs.scroller.scrollTop=t),null!=n&&(this.refs.scroller.scrollLeft=n)}},{key:"_scrollTo",value:function(e){var t=e.scrollTop,n=e.scrollLeft;if(null!=t||null!=n){var a=null!=t&&t!==this._currentScrollTop,i=null!=n&&n!==this._currentScrollLeft;if(a||i){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:g.default.Power3.easeOut,onUpdate:this.onScrollToUpdate,onComplete:this.onScrollToComplete};this._scrollToPosition={},a&&(s.scrollTop=Math.min(t,this.refs.scroller.scrollHeight-this.refs.scroller.clientHeight),this._scrollToPosition.scrollTop=this.refs.scroller.scrollTop),i&&(s.scrollLeft=Math.min(n,this.refs.scroller.scrollWidth-this.refs.scroller.clientWidth),this._scrollToPosition.scrollLeft=this.refs.scroller.scrollLeft),this._cancelScrollTo(),this._scrollToTween=m.default.to(this._scrollToPosition,r,s);
}}}},{key:"_cancelScrollTo",value:function(){this._scrollToTween&&(this._scrollToTween.kill(),this._scrollToTween=null)}},{key:"_clearTimeouts",value:function(){this._animationFrameID&&cancelAnimationFrame(this._animationFrameID),this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID)}},{key:"onScroll",decorators:[y.autobind],value:function(e){if(e.target===this.refs.scroller){var t=e.target.scrollTop,n=e.target.scrollLeft,a=t!==this._currentScrollTop,i=n!==this._currentScrollLeft;(a||i)&&this._setScrollPosition({
scrollTop:t,scrollLeft:n})}}},{key:"onScrollPositionChange",decorators:[y.autobind],value:function(){this._animationFrameID=null,this.props.onScrollPositionChange({scrollTop:this._currentScrollTop,scrollLeft:this._currentScrollLeft})}},{key:"onScrollTimeout",decorators:[y.autobind],value:function(){this.setState({isScrolling:!1})}},{key:"onScrollToUpdate",decorators:[y.autobind],value:function(){this._updateScrollPosition(this._scrollToPosition),this.props.onScrollToUpdate&&this.props.onScrollToUpdate(this._scrollToPosition);
}},{key:"onScrollToComplete",decorators:[y.autobind],value:function(){this._scrollToTween=null,this._scrollToPosition=null,this.props.onScrollToComplete&&this.props.onScrollToComplete()}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,a=t.children,i=t.scrollDirection,r=t.autoScroll,s=t.onScroll,u=t.onScrollPositionChange,d=o(t,["className","children","scrollDirection","autoScroll","onScroll","onScrollPositionChange"]);return c.default.createElement("div",l({ref:"scroller",className:(0,
p.default)(n,T.default.scroller,T.default[i],r&&T.default.auto),onScroll:u?(0,S.default)(this.onScroll,s):s},d),u?(0,b.mapValidComponents)(a,function(t){return c.default.cloneElement(t,{isScrolling:e.state.isScrolling,scrollTop:e._currentScrollTop,scrollLeft:e._currentScrollLeft})}):a)}}]),t}(d.Component);k.propTypes={className:d.PropTypes.string,children:d.PropTypes.node.isRequired,scrollDirection:d.PropTypes.oneOf(x.scrollDirections.all).isRequired,autoScroll:d.PropTypes.bool,smoothScroll:d.PropTypes.bool,
smoothScrollDuration:d.PropTypes.number.isRequired,scrollTop:d.PropTypes.number,scrollLeft:d.PropTypes.number,isScrollingTimeout:d.PropTypes.number.isRequired,onScroll:d.PropTypes.func,onScrollPositionChange:d.PropTypes.func,onScrollToUpdate:d.PropTypes.func,onScrollToComplete:d.PropTypes.func},k.defaultProps={scrollDirection:x.scrollDirections.VERTICAL,autoScroll:!1,smoothScroll:!0,smoothScrollDuration:400,isScrollingTimeout:100},t.default=k,e.exports=t.default},,function(e,t,n){"use strict";var a=n(54),i=n(127),r=(n(45),
n(398),"function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103),s={key:!0,ref:!0,__self:!0,__source:!0},o=function(e,t,n,a,i,s,o){var l={$$typeof:r,type:e,key:t,ref:n,props:o,_owner:s};return l};o.createElement=function(e,t,n){var a,r={},l=null,u=null,d=null,c=null;if(null!=t){u=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key,d=void 0===t.__self?null:t.__self,c=void 0===t.__source?null:t.__source;for(a in t)t.hasOwnProperty(a)&&!s.hasOwnProperty(a)&&(r[a]=t[a])}var f=arguments.length-2;
if(1===f)r.children=n;else if(f>1){for(var p=Array(f),h=0;h<f;h++)p[h]=arguments[h+2];r.children=p}if(e&&e.defaultProps){var m=e.defaultProps;for(a in m)void 0===r[a]&&(r[a]=m[a])}return o(e,l,u,d,c,i.current,r)},o.createFactory=function(e){var t=o.createElement.bind(null,e);return t.type=e,t},o.cloneAndReplaceKey=function(e,t){var n=o(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},o.cloneElement=function(e,t,n){var r,l=a({},e.props),u=e.key,d=e.ref,c=e._self,f=e._source,p=e._owner;if(null!=t){
void 0!==t.ref&&(d=t.ref,p=i.current),void 0!==t.key&&(u=""+t.key);var h;e.type&&e.type.defaultProps&&(h=e.type.defaultProps);for(r in t)t.hasOwnProperty(r)&&!s.hasOwnProperty(r)&&(void 0===t[r]&&void 0!==h?l[r]=h[r]:l[r]=t[r])}var m=arguments.length-2;if(1===m)l.children=n;else if(m>1){for(var v=Array(m),g=0;g<m;g++)v[g]=arguments[g+2];l.children=v}return o(e.type,u,d,c,f,p,l)},o.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},e.exports=o},function(e,t,n){"use strict";
var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(46),l=a(o),u=n(78),d=i(u),c=n(77),f=a(c),p=n(143),h=a(p),m=n(18),v=a(m),g=n(60),y=a(g),b=n(19),w=a(b),P=n(175),_=a(P),S=w.default.extend({mixins:[h.default],name:"MetadataListModel",context:["server","section","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:d.METADATA_LIST,entityID:function(){
var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0],t=e.listIdentifier;if(!t){var n=e.containerKey||e.key,a=n&&n.match(/([^\?]+)/);a&&(t=a[1])}return(0,f.default)(this.entityType,t,this.server.entityID())},idAttribute:"containerKey",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey")||this.get("key"))},sessionAttrs:{isMetadataList:v.default.boolean,listIdentifier:v.default.string,containerKey:v.default.string,containerTitle:v.default.string,
currentPageStart:v.default.integer,currentPageSize:v.default.integer,populatedRange:v.default.object,isPending:v.default.boolean,isPopulated:v.default.boolean,error:v.default.object},syncedAttrs:{key:v.default.string,totalSize:v.default.integer,viewGroup:v.default.string,title:v.default.string,thumb:v.default.string,art:v.default.string,banner:v.default.string,theme:v.default.string,allowSync:v.default.boolean},syncedRelations:{metadataItems:{relationClass:_.default,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===y.default.xml?l.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var a=e[t];void 0!==a&&n.setContext(t,a)});var a=l.default.parseArray(e.Metadata),i=l.default.parseInteger(e.totalSize);
return this.allowAllLeaves||(e.Metadata=s.default.reject(a,function(e){var t=/\/allLeaves$/.test(e.key);return t&&(this._totalSizeAdjustment-=1),t},this)),i&&this._totalSizeAdjustment&&(e.totalSize=i-this._totalSizeAdjustment),e},onContainerKeyChange:function(e,t){var n=this.get("metadataItems"),a=this.syncedRelations.metadataItems.options(this.attributes);s.default.each(a,function(e,t){n.setContext(t,e)})}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(38),o=a(s),l=n(18),u=a(l),d=n(420),c=a(d),f=n(832),p=a(f),h=c.default.extend({name:"UserStorageModel",storageKey:"users",sessionAttrs:{activeUserID:u.default.integer},syncedRelations:{users:{relationClass:p.default}},initialize:function(){this.debouncedSave=r.default.debounce(function(){(0,o.default)(!arguments.length,"Set attributes before using `debouncedSave` so the model is immediately updated. Otherwise, race conditions may occur."),this.save()},2e3)},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.default=new h,e.exports=t.default},function(e,t,n){"use strict";function a(){k.ReactReconcileTransaction&&P?void 0:v(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),
this.reconcileTransaction=k.ReactReconcileTransaction.getPooled(!0)}function r(e,t,n,i,r,s){a(),P.batchedUpdates(e,t,n,i,r,s)}function s(e,t){return e._mountOrder-t._mountOrder}function o(e){var t=e.dirtyComponentsLength;t!==g.length?v(!1):void 0,g.sort(s),y++;for(var n=0;n<t;n++){var a=g[n],i=a._pendingCallbacks;a._pendingCallbacks=null;var r;if(p.logTopLevelRenders){var o=a;a._currentElement.props===a._renderedComponent._currentElement&&(o=a._renderedComponent),r="React update: "+o.getName(),console.time(r);
}if(h.performUpdateIfNecessary(a,e.reconcileTransaction,y),r&&console.timeEnd(r),i)for(var l=0;l<i.length;l++)e.callbackQueue.enqueue(i[l],a.getPublicInstance())}}function l(e){return a(),P.isBatchingUpdates?(g.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=y+1))):void P.batchedUpdates(l,e)}function u(e,t){P.isBatchingUpdates?void 0:v(!1),b.enqueue(e,t),w=!0}var d=n(54),c=n(634),f=n(126),p=n(645),h=(n(83),n(171)),m=n(280),v=n(33),g=[],y=0,b=c.getPooled(),w=!1,P=null,_={initialize:function(){
this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),C()):g.length=0}},S={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[_,S];d(i.prototype,m.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,k.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null;
},perform:function(e,t,n){return m.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(i);var C=function(){for(;g.length||w;){if(g.length){var e=i.getPooled();e.perform(o,null,e),i.release(e)}if(w){w=!1;var t=b;b=c.getPooled(),t.notifyAll(),c.release(t)}}},T={injectReconcileTransaction:function(e){e?void 0:v(!1),k.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:v(!1),"function"!=typeof e.batchedUpdates?v(!1):void 0,
"boolean"!=typeof e.isBatchingUpdates?v(!1):void 0,P=e}},k={ReactReconcileTransaction:null,batchedUpdates:r,enqueueUpdate:l,flushBatchedUpdates:C,injection:T,asap:u};e.exports=k},function(e,t,n){"use strict";function a(e,t){var n=[];if(e){var a=s.default.first(e.Part);a&&a.Stream&&n.push.apply(n,s.default.where(a.Stream,t))}return n}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(149),o=a(s),l=["key","typeID","typeString"],u=(0,o.default)(l,[{key:"movies",typeID:"1",typeString:"movie",title:function(){return(0,r.default)("Movies")},defaultAgent:"com.plexapp.agents.imdb",defaultLanguage:"en",defaultScanner:"Plex Movie Scanner",sectionTypeIcon:"plex-icon-movies-560"},{key:"tv",typeID:"2",typeString:"show",title:function(){return(0,r.default)("TV Shows")},defaultAgent:"com.plexapp.agents.thetvdb",defaultLanguage:"en",
defaultScanner:"Plex Series Scanner",sectionTypeIcon:"plex-icon-shows-560"},{key:"music",typeID:"8",typeString:"artist",title:function(){return(0,r.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:"photo",title:function(){return(0,r.default)("Photos")},defaultAgent:"com.plexapp.agents.none",
defaultLanguage:"xn",defaultScanner:"Plex Photo Scanner",sectionTypeIcon:"plex-icon-photos-560"},{key:"videos",typeID:"1",typeString:"movie",title:function(){return(0,r.default)("Home Videos")},defaultAgent:"com.plexapp.agents.none",defaultLanguage:"xn",defaultScanner:"Plex Video Files Scanner",sectionTypeIcon:"plex-icon-clips-560"}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=a(r),o=n(180),l=i(o),u=n(51),d=i(u),c=d.default.extend({
getUrl:function(e){if(e){var t=(0,l.default)();return s.join(e,{size:Math.round(this.width*t)})}return e}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.get("unviewedLeafCount")>0}function i(e){var t=e.get("viewCount"),n=e.get("viewOffset");return!(t&&!n)}function r(e){return!(!e||e.get("isFolder"))&&!g.default.get(e.get("type")).child}function s(e){return!a(e)}function o(e){return!i(e)}var l=n(1).default,u=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var d=n(3),c=l(d),f=n(11),p=u(f),h=n(6),m=l(h),v=n(40),g=l(v),y=n(53),b=l(y),w={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},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},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}},P={showListDropdown:["showShuffle","showQueue","showRefresh","showSync","showDownload","showWatchLater","showShare","showInfo"]},_=b.default.extend({initialize:function(e,t){t||(t={});var n=p.resolve("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("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=c.default.clone(w[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 a=!!this.defaults&&this.defaults[e];this.set(e,t.call(this,a,n))},updateDropdown:function(e){
var t=P[e],n=c.default.map(t,function(e){return this.get(e)},this);this.set(e,c.default.some(n))},updateSelectionStates:function(){var e=this.getActionTargets();if(e){var t=e[0].get("type"),n="show"===t||"season"===t,r=this.get("selectedItems"),l=!(!r||!r.length),u=c.default.some(r,function(e){return e.get("isFolder")}),d=!!c.default.some(e,n?a:i),f=!!c.default.some(e,n?s:o);this.set({selecting:l,hasSelectedFolder:u,hasUnwatched:d,hasWatched:f})}},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.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"),a=this.parent&&this.parent.get("currentSubset");
if(a){var i=this.get("selectedItems"),r=c.default.some(i,function(e){return e.get("isFolder")});t=("all"===a.id||i&&i.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(),n=c.default.every(t,function(e){var t=this.shared&&e.get("isPlaylist"),n=e.get("isSection"),a=!this.shared&&(n||e.get("isLibraryItem")&&!e.get("isFolder"));return t||a},this);return n},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)&&!r(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;
var n=t[0];return!n.get("isSection")&&!n.get("isFolder")&&this.get("hasUnwatched")},canMarkUnwatched:function(e){if(!e)return!1;if(!this.canMultiSelect(e)&&!r(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;var n=t[0];return!n.get("isSection")&&!n.get("isFolder")&&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=c.default.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;var t=this.devices.filterSyncDevices(this.item);if(!t.length)return!1;var n=this.shared?"sharedSync":"sync",a=this.server.supports(n);if(!a||this.parent.get("isFolder"))return!1;var i;if(this.shared){var r=this.section||this.item.section;i=r&&r.get("allowSync")}else i=this.parent.get("allowSync")||this.parent.collection&&this.parent.collection.allowSync;return!!i},canConvert:function(e){if(!e||!this.parent||this.shared||this.synced)return!1;
var t=this.server.supports("streamReady"),n=this.server.get("transcoderVideo");return!(!t||!n||this.parent.get("isFolder"))},canWatchLater:function(e){if(!e||!this.item)return!1;var t="video"===g.default.getChildMediaType(this.type).element,n=!!this.item.get("url"),a=!this.item.userPlaylistKey||"queue"!==this.item.userPlaylistKey;return this.signedIn&&this.user.get("queueUid")&&t&&n&&a},canShare:function(e){if(e){var t=this.item&&this.item.isLibraryItem();return!t&&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&&c.default.every(t,this.canDeleteSingleItem,this)},canDeleteSingleItem:function(e){if(!e||this.synced||e.get("isSection"))return!1;if(!r(e)&&!e.server.supports("compositeDelete"))return!1;var t=!(!e.get("isLibraryItem")||!this.server.get("allowMediaDeletion")||this.shared),n=e.get("playlistType");return t||n;
},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"),n=c.default.filter(t,function(e){return!!e.proxyType});return!!n.length},isMedia:function(e){if(!e)return!1;if(this.playQueue&&this.playQueue.get("isRadio"))return!1;if(!this.item)return!0;var t="photo"===this.type&&!this.item.get("isLibraryItem");return!t&&!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"),a=c.default.bind(this.updateAll,this),i=c.default.filter(e,function(e){return!c.default.contains(n,e)});c.default.each(i,function(e){e.selected=!0,n.push(e),this.listenTo(e,{"change:viewCount":a,"change:viewOffset":a,"change:unviewedLeafCount":a,"change:viewedLeafCount":a})},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?c.default.sortBy(e,function(e){return n.indexOf(e)}):c.default.clone(e)},deselectItems:function(e,t){if(0!==e.length){var n=this.get("selectedItems");c.default.each(e,function(e){var t=c.default.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&&(c.default.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?(0,m.default)("{1} and {2}",e[0].get("title"),e[1].get("title")):3===e.length?(0,
m.default)("{1}, {2}, and {3}",e[0].get("title"),e[1].get("title"),e[2].get("title")):(0,m.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.default=_,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=t.searchResultEntityID;return(0,d.default)(e,f.SEARCH_RESULT,n)}function i(e,t){
var n=t.syncMetadataEntityID;return(0,d.default)(e,f.SYNC_METADATA_ITEM,n)}var r=n(1).default,s=n(8).default,o=n(205).default,l=n(206).default;Object.defineProperty(t,"__esModule",{value:!0}),t.findSearchResultModel=a,t.findSyncMetadataModelModel=i;var u=n(494),d=r(u),c=n(247),f=s(c),p=n(902);o(t,l(p,o))},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1865),r=a(i),s=n(5),o=a(s),l=n(3),u=a(l),d=n(10),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=n(115),g=a(v),y=n(145),b=a(y),w=n(146),P=a(w),_=n(113),S=a(_),x=n(233),C=a(x),T=n(35),k=a(T),I=n(17),M=a(I),A=n(516),E=a(A),O=n(95),D=a(O),R=n(1256),L=a(R),N=n(119),j=a(N),U=n(193),F=a(U),B=n(134),z=a(B),$=c.default.Layout.extend({
mixins:[E.default],tagName:"li",className:"striped-list-item media-list-item",template:r.default,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){u.default.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=this.model&&this.model.section&&"photo"===this.model.section.get("type"),"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 n=this.model&&this.model.server||this.parentMediaActions&&this.parentMediaActions.server;this.mediaActions=new D.default({},{item:this.model,type:t,server:n}),this.listenTo(this.mediaActions,{"change:showPlay":this.onActionsChange,"change:showEdit":this.onActionsChange,"change:showListDropdown":this.onActionsChange
}),m.default.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.isChannelItem){var n=this.model.channel,a=n.id?n.id:n.get("identifier");
t+="/channel/"+encodeURIComponent(a),t+="clip"===e.type?"/details/"+encodeURIComponent(e.key):"/"+encodeURIComponent(e.key)}else"userPlaylistItem"===e.type?t="#!/playlist/"+this.model.userPlaylistKey+"/details/"+e.id:t+="/details/"+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 c.default.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&&!k.default.get("showUnwatchedIcons"))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){var n=this.model.get("viewOffset");n&&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("isChannelItem")?'<span class="btn-metadata-link media-title-link">'+u.default.escape(t)+"</span>":u.default.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=(0,p.default)("from {1}",this.model.get("recommender")));else{var n=this.model.get("grandparentTitle")||this.model.get("parentTitle");t=n?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?(0,g.default)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "}):void 0}},".media-context":{modelAttribute:"sourceTitle",manual:!0,formatter:function(e,t){var n=!!this.model.get("librarySectionID"),a=n?this.model.server.get("friendlyName"):e;t.toggleClass("multiserver-only",n),t.text(a);
}},".media-added-at":{modelAttribute:"addedAt",autohide:!0,formatter:function(e){return(0,S.default)(e)}},".media-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return(0,b.default)(e)}},".media-resolution":{modelAttribute:"Media",autohide:!0,formatter:function(e){return e&&e.length?(0,C.default)(e[0].videoResolution):""}},".media-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return(0,P.default)(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 j.default({model:this.model,disabled:!0})),this.progress&&this.progress.show(new L.default({model:this.model}))},onClose:function(){this.image&&this.image.close(),this.dropdown&&this.dropdown.close(),m.default.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 a={item:this.model,siblings:this.canPlaySiblings()};"photo"===t&&(a.autoplay=!1),M.default.execute("playMedia",a);
}})},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),M.default.execute("playMedia",{item:this.model,continuous:this.continuousPlay,siblings:this.canPlaySiblings()})},onPlayUnwatchedClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),M.default.execute("playMedia",{item:this.model,unwatched:!0,siblings:this.canPlaySiblings()})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=(0,o.default)(e.currentTarget),n=t.hasClass("btn-loading")?t:this.$el;
if(!n.hasClass("active")){n.addClass("active");var a=this.model.fetch();a.done(u.default.bind(function(){m.default.trigger("show:modal",new z.default({mediaActions:this.mediaActions}))},this)),a.always(u.default.bind(function(){n.removeClass("active")},this))}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),(0,o.default)(".media-actions-dropdown").trigger("hide.bs.dropdown"),this.dropdown=new F.default({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=(0,o.default)(e.currentTarget),n=this.ui.actions.position().top,a=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(a)},onTitleClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),m.default.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.default=$,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(47),u=a(l),d=u.default.extend({className:"select-modal modal modal-sm fade",events:r.default.extend({"click a":"onClick"},u.default.prototype.events),initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.promise=o.default.Deferred()},onRender:function(){u.default.prototype.onRender.apply(this,arguments);
},onHide:function(e){u.default.prototype.onHide.apply(this,arguments),this.promise.reject()},onClick:function(e){e.preventDefault(),this.promise.resolve((0,o.default)(e.currentTarget).data("value")),this.hide()}});t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={LIBRARY:"library",CONTINUE_WATCHING:"continueWatching",PRE_PLAY:"prePlay",SEARCH_ALL_SERVERS:"searchAllServers",SEARCH:"search",QUICK_SEARCH:"quickSearch"};t.default=n,e.exports=t.default;
},,,function(e,t,n){var a=n(605)("wks"),i=n(607),r=n(265).Symbol;e.exports=function(e){return a[e]||(a[e]=r&&r[e]||(r||i)("Symbol."+e))}},function(e,t,n){"use strict";var a=n(272),i=a({bubbled:null,captured:null}),r=a({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}),s={topLevelTypes:r,PropagationPhases:i};e.exports=s},function(e,t,n){"use strict";function a(e,t,n,a){this.dispatchConfig=e,
this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var r in i)if(i.hasOwnProperty(r)){var o=i[r];o?this[r]=o(n):"target"===r?this.target=a:this[r]=n[r]}var l=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return l?this.isDefaultPrevented=s.thatReturnsTrue:this.isDefaultPrevented=s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}var i=n(54),r=n(126),s=n(82),o=(n(45),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),l={
type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=s.thatReturnsTrue);
},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<o.length;n++)this[o[n]]=null}}),a.Interface=l,a.augmentClass=function(e,t){var n=this,a=function(){};a.prototype=n.prototype;var s=new a;i(s,e.prototype),e.prototype=s,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,r.addPoolingTo(e,r.fourArgumentPooler)},r.addPoolingTo(a,r.fourArgumentPooler),
e.exports=a},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(482),o=a(s),l=n(479),u=a(l),d=n(145),c=a(d),f=n(146),p=a(f),h=n(913),m=a(h),v={tagsRenderer:m.default,tagsRendererOptions:{},defaultBindings:{".item-title":{modelAttribute:"title"},".item-year":{modelAttribute:"year"},".item-progress":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var n=this.model.get("duration"),a=(0,o.default)(e,n);a&&t.css("width",a+"%"),
t.parent().toggleClass("hidden",!a)}},".item-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return e?(0,p.default)(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){var t=(0,u.default)(e);return!!t.length}},".item-available-at":{
modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return(0,c.default)(e)}},".item-tagline":{modelAttribute:"tagline",autohide:!0},".item-genre":{modelAttribute:"Genre",autohide:!0,isHtml:!0,formatter:function(e){if(!e||!e.length)return"";var t=this.tagsRenderer(r.default.extend({},this.tagsRendererOptions,{model:this.model,key:"genre",tags:e,maxLen:50,maxTags:2}));return t}},".item-director":{modelAttribute:"Director",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";
var n=this.tagsRenderer(r.default.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(r.default.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(r.default.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.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(38),o=a(s),l=n(327),u=a(l),d=n(23),c=n(18),f=a(c),p=n(19),h=a(p),m=n(790),v=a(m),g={UNTESTED:"untested",
PENDING:"pending",CONNECTED:"connected",UNAUTHORIZED:"unauthorized",UNAVAILABLE:"unavailable",ABORTED:"aborted"},y=f.default.boolean.isRequired,b=h.default.extend({name:"ConnectionModel",context:["server"],idAttribute:"uri",sessionAttrs:{currentTest:f.default.custom(function(e){return r.default.isFunction(e.abort)}),testState:f.default.oneOf(g.UNTESTED,g.PENDING,g.CONNECTED,g.UNAUTHORIZED,g.UNAVAILABLE,g.ABORTED).isRequired,isBundled:y,isFallback:y,serverAttrs:f.default.object,currentReachabilityTest:f.default.custom(function(e){
return r.default.isFunction(e.abort)}),isPossiblyCrossNetworkProtected:f.default.boolean.isRequired},sessionRelations:{sources:{relationClass:v.default}},syncedAttrs:{uri:f.default.string,scheme:f.default.string,address:f.default.string,port:f.default.string,relay:f.default.boolean},derivedAttrs:{isUntested:function(){return this.get("testState")===g.UNTESTED},isPending:function(){return this.get("testState")===g.PENDING},isConnected:function(){return this.get("testState")===g.CONNECTED},isUnauthorized:function(){
return this.get("testState")===g.UNAUTHORIZED},isUnavailable:function(){return this.get("testState")===g.UNAVAILABLE},isFailed:function(){return this.get("isUnauthorized")||this.get("isUnavailable")},isAborted:function(){return this.get("testState")===g.ABORTED},isLoopback:function(){var e=this.get("address");return"localhost"===e||u.default.isLoopbackAddress(e)},isPrivate:function(){return this.get("isLoopback")||u.default.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:g.UNTESTED,isBundled:!1,isFallback:!1,relay:!1,isPossiblyCrossNetworkProtected:!1},url:function(){return this.get("uri")},constructor:function(e,t){var n=r.default.clone(e);r.default.isObject(e)&&!e.uri&&((0,o.default)(e.scheme&&e.address,"A server connection requires either a uri or a scheme and address. "+e.scheme+"://"+e.address),
n.uri=e.scheme+"://"+e.address,e.port&&(n.uri+=":"+e.port)),h.default.prototype.constructor.call(this,n,t)},initialize:function(){this.listenTo(this.get("sources"),"remove reset",this.onSourcesChange)},augmentResponse:function(e){var t=e.protocol;return t?r.default.extend({},e,{scheme:t}):e},getAddressFromUri:function(){return(0,d.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(){var e={scheme:"http",address:"127.0.0.1",port:this.get("port")};return e},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:g});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(67),o=a(s),l=n(799),u=a(l),d=o.default.extend({
model:u.default,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 r.default.filter(t,function(e){return e.id})}});t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var n={decisionEndpoint:"1.0.3",defaultSections:"0.9.17.3",ownerFeatures:"0.9.17.0",replaceTranscodeTarget:"0.9.17.0",quickSearch:"0.9.16.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.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0
});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(9),h=a(p),m=n(117),v=a(m),g=n(56),y=a(g),b=n(424),w=a(b),P=n(128),_=a(P);n(221);var S,x=!1,C=d.default.Controller.extend({populateView:function(e){e||(e={}),e.showLoading!==!1&&h.default.trigger("show:loading",{navigating:!0}),this.abortPendingPopulate();var t={options:e},n=l.default.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 l.default.Deferred().resolve(t).promise()},function(e){return x?x=!1:h.default.trigger("navigate","unauthorized",{result:t,silent:!0}),l.default.Deferred().reject(t).promise()}),S=a,a},abortPendingPopulate:function(){S&&"pending"===S.state()&&(x=!0),v.default.abortAll("page")},populateUser:function(e,t){
var n=f.resolve("appModel"),a=n.get("user"),i=function(){var e=a.get("isLocked"),n=l.default.Deferred();return e?n.reject(t):n.resolve(t),n.promise()},r=a.get("lockState")===_.default.lockStates.PENDING?a.server.populate():l.default.Deferred().resolve().promise();return e=r.then(i,i)},populateServer:function(e,t,n){var a=f.resolve("appModel");return e=e.then(function(){var e=a.get("servers"),i=void 0;if(!t)return e.populateAnyServer();if(/^transient/.test(t)){var r=a.get("transientServer");if(!r||r.id!==t)return h.default.trigger("navigate:refresh:dashboard"),
l.default.Deferred().reject().promise();i=l.default.Deferred().resolve(r).promise()}else i=e.populateServer(t);return i.done(function(e){n.server=e}),i.fail(function(){n.server=e.get(t)}),i})},populatePrimaryServer:function(e,t){var n=f.resolve("appModel");return e=e.then(function(){function e(r,s){s||(n.off("change:isWaitingForPrimaryServer",e),i=n.get("primaryServer"),i?(t.server=i,i.populate().done(a.resolve).fail(a.reject)):a.reject())}var a=l.default.Deferred(),i=n.get("primaryServer");return i?(t.server=i,
a.resolve().promise()):n.get("isWaitingForPrimaryServer")?(n.on("change:isWaitingForPrimaryServer",e),a.promise()):a.reject().promise()})},populateSection:function(e,t,n){return t=t.then(function(){return n.server.get("sections").populate()}),t=t.then(function(t){var a=n.item,i=e.sectionID;if(a&&(i=a.get("librarySectionID"),!i||!n.server.get("isFullServer")))return l.default.Deferred().resolve();var r=t.get(i);return r?(n.section=r,a&&a.setContext("section",r),l.default.Deferred().resolve(r)):l.default.Deferred().reject();
})},populateMetadata:function(e,t,n){return t=t.then(function(){var t=new y.default({key:e.key},{server:n.server,relatedOptions:e.relatedOptions});return n.item=t,t.fetch({scope:"page",data:s.default.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,a={};/^\/\w+\//.test(t)?a.key=t:a.identifier=t;var i=new w.default(a,{
server:n.server});return n.channel=i,i.fetch({scope:"page"})})},populateChannelMetadata:function(e,t,n){return t=t.then(function(){var t=new w.default({key:e.channelKey},{server:n.server,channel:n.channel});return n.channelItem=t,t.fetch({scope:"page"})})}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(41),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(9),h=a(p),m=n(140),v=a(m),g=d.default.AppRouter.extend({
initialize:function(){this.uniqueRoutes=s.default.uniq(s.default.values(this.appRoutes)),this.fragments=s.default.invert(this.appRoutes),this.listenTo(this,"route",this.onRoute),this.listenTo(h.default,"navigate",this.onNavigate)},resolveUrlFragment:function(e,t){var n=e.match(/:\w+/g);return n&&s.default.each(n,function(n){var a=n.slice(1),i=t[a];if(null==i){var r=new RegExp("\\([^\\)]*"+n+"[^\\)]*\\)","g");e=e.replace(r,"")}else e=e.replace(n,encodeURIComponent(i))}),e.replace(/\(|\)/g,"")},onRoute:function(e){
var t=f.resolve("appModel"),n=t.get("history"),a=t.get("forwardHistory"),i=l.default.history.getFragment();i===a[0]?n.push(a.shift()):i!==s.default.last(n)&&(n.push(i),a.splice(0)),v.default.trackView(e),t.trigger("change:history",t,n)},onNavigate:function(e,t){if(s.default.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,s.default.values(t));else{var a=this.resolveUrlFragment(this.fragments[e],t);
this.navigate(a,{trigger:t.trigger,replace:t.replace})}}}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(303),o=a(s),l=o.default.extend({maxCycles:5,maxSize:100,getItemCacheKey:function(e,t){if(r.default.isFunction(e.cacheKey))return t||(t=e.toJSON()),e.cacheKey(t)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(e<=0||!s.default.isNumber(e))return"0:00";var t=l.default.duration(e),n=t.seconds(),a=t.minutes(),i=t.hours()+24*t.days(),r="";
return r=n<10?":0"+n:":"+n,r=a<10&&i>0?"0"+a+r:a+r,i>0&&(r=i+":"+r),r}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(65),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return(0,s.default)(e,{limit:"past"})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(847),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var i=n(488),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.seasonPrefix||"S{1}",n=e.episodePrefix||"E{1}",a=e.seasonIndex,i=e.episodeIndex;if((i>0||0===i)&&a<1e3){e.noLeadingZero||(a=(0,d.default)(a),i=(0,d.default)(i));var r=e.separator||"";return(0,l.default)(t,a)+r+(0,l.default)(n,i)}return e.date?(0,s.default)(e.date).format("M/D/YY"):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r),o=n(6),l=i(o),u=n(317),d=i(u);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.Deferred();return e.always(function(){t.resolve.apply(t,arguments)}),t.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(11),u=n(23),d=n(31),c=a(d),f=n(26),p=a(f),h=n(476),m=a(h),v=c.default.extend({
initialize:function(){r.default.bindAll(this,"onAjaxSend","onAjaxComplete"),this.requests=[],this.byId={}},startListening:function(){var e=(0,o.default)(document);e.on("ajaxSend",this.onAjaxSend),e.on("ajaxComplete",this.onAjaxComplete)},stopListening:function(){var e=(0,o.default)(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=r.default.isString(e)?this.byId[e]:e;t&&(t.xhr.aborting=!0,t.xhr.abort(),this.remove(t))},store:function(e,t){var n=r.default.uniqueId("r");e.rid=n;var a={xhr:e,settings:t};return this.requests.push(a),this.byId[n]=a,a},remove:function(e){var t=r.default.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 a=this;if(!n.skipCorsWithRedirect){var i=this.store(t,n);t.always(function(){
t.aborting||a.remove(i)})}},onAjaxComplete:function(e,t,n){var a=(0,m.default)(t);if(!t.aborting&&a){var i=(0,u.parseUrl)(n.url);if(!a||"/log"!==i.pathname){var s=(0,l.resolve)("appModel").get("servers").find(function(e){var t=e.get("activeConnection"),a=t&&t.get("isConnected"),i=r.default.result(t,"url");return!!a&&0===n.url.indexOf(i)});s&&((0,p.default)('[Connections] Active connection to "%s" lost authorization',s.get("debugName")),s.trigger("error:connection",s))}}}});t.default=new v,e.exports=t.default;
},function(e,t){"use strict";function n(){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 a=t[e];"function"==typeof a&&a.apply(void 0,arguments)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1766),r=a(i),s=n(5),o=a(s),l=n(3),u=a(l),d=n(252),c=a(d),f=n(17),p=a(f),h=c.default.extend({tagName:"span",
className:"rating star-rating",template:r.default,disabled:!0,modelEvents:{"change:rating":"onRatingChange","change:userRating":"onRatingChange"},events:u.default.extend({mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},c.default.prototype.events),initialize:function(e){c.default.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,a=n/t.width();return a=Math.min(Math.max(a,0),1),a=2*Math.ceil(5*a)},persistValue:function(){var e=this.currentValue||-1;
p.default.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),n=this.$(".star-icon");n.each(function(e){var n=t>e;(0,o.default)(this).toggleClass("star",n).toggleClass("dislikes",!n)}),this.$el.toggleClass("unrated",!e)},onRender:function(){c.default.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.default=h,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(41),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(42),y=a(g),b=n(40),w=a(b),P=n(85),_=a(P),S=n(234),x=a(S),C=n(231),T=a(C),k=n(172),I=a(k),M=n(285),A=a(M),E=n(35),O=a(E),D=n(17),R=a(D),L=n(105),N=a(L),j=n(197),U=a(j),F=d.default.Layout.extend({mixins:N.default,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){s.default.bindAll(this,"onResize","onScroll");
var t=f.resolve("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 l.default.Model({loading:!1,failed:!1}),this.listenTo(t,"change:primaryPlayer",this.onPrimaryPlayerChange),this.pageSize&&(v.default.trigger("content.subscribe:resize",this.onResize),v.default.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(){if(this.allowMirror){var e;e=this.model.get("isPlaylist")?this.model.get("playlistType"):w.default.getChildMediaType(this.model.get("type")).element;
var t=y.default.getTypeByElement(e),n=I.default.getInstance(t,{isPassive:!0});n&&n.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(s.default.bind(function(){this.progress.set("loading",!1)},this)),e},getPreferredMedia:function(){var e=f.resolve("appModel"),t=w.default.getChildMediaType(this.model.get("type")).element,n={item:this.model,
type:t,profile:A.default.prop(t),transcodeServer:x.default.resolveTranscodeServer({type:t,item:this.model,fallbackServer:e.get("primaryServer")}),allowDirectPlay:O.default.get("directPlay"),allowedAC3Containers:O.default.get("allowAC3")?"mp4":null,subtitlesBurnLevel:O.default.get("subtitlesBurnLevel")};return t===y.default.types.VIDEO&&(n.quality=_.default.getCurrentQuality(this.model,O.default.getInstance())),T.default.getMediaDecision(n).media},onRender:function(){if(this.children&&this.ListConstructor){
var e;e=this.pageSize?this.populatePage():this.children.fetch({scope:"page"}),e.fail(s.default.bind(function(){v.default.trigger("show:alert",{type:"error",message:(0,h.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&&(v.default.trigger("content.unsubscribe:resize",this.onResize),v.default.trigger("content.unsubscribe:scroll",this.onScroll))},onPrimaryPlayerChange:function(e,t){t&&this.mirror()},onPlayClick:function(e){e.preventDefault(),R.default.execute("playMedia",{item:this.model})},onUnavailableClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new U.default({
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,a=n-e.scrollTop<10,i=t.get("populatedRange").end<t.get("totalSize");a&&i&&this.populatePage()}}});t.default=F,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1899),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(41),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=n(40),g=a(v),y=n(435),b=a(y),w=n(291),P=a(w),_=n(1264),S=a(_),x=n(98),C=a(x),T=C.default.extend({
name:"addToPlaylistModal",className:"add-to-playlist-modal select-modal modal modal-sm fade",template:r.default,ui:{addBtn:".add-btn",newPlaylist:".message"},regions:{list:".playlists-container"},events:o.default.extend({"click .playlist":"onPlaylistClick","keyup .message":"onNewPlaylistKeyUp","click .message":"onNewPlaylistClick","click .add-btn":"onAddClick"},C.default.prototype.events),initialize:function(e){C.default.prototype.initialize.apply(this,arguments),this.items=e.items,this.title=e.title,
(!this.items||1===this.items.length&&this.items[0]===this.model)&&(this.ignoreTargets=!0),this.model.get("isMetadataList")?this.leafType=g.default.getChildMediaType(this.model.get("firstItemType")).element:this.model.get("playQueueID")?this.leafType=this.model.get("mediaType"):this.leafType=g.default.getChildMediaType(this.model.get("type")).element,this.smart=this.model.get("isSection")&&this.ignoreTargets,this.playlistList=new b.default({},{server:this.model.server,section:new c.default.Model({
currentType:this.leafType,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,n=this.model.server;this.ignoreTargets||(t=n.supports("playItemsBatchAdd")?this.items:o.default.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"),m.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem adding to the playlist.")
})})),a},_createPlaylist:function(){var e=this.ui.newPlaylist.val().trim();if(e){var t=new P.default({title:e,playlistType:this.leafType,smart:this.smart},{server:this.model.server}),n=this._addToPlaylist(t);n.then(o.default.bind(function(){m.default.trigger("navigate","playlist",{serverID:t.server.id,key:t.get("ratingKey")})},this))}},onRender:function(){C.default.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 S.default({collection:this.playlists}))},onNewPlaylistKeyUp:function(e){this.toggleAddButton(),13===e.keyCode&&this._createPlaylist()},onNewPlaylistClick:function(){this.suggestTitleIfEmpty()},onPlaylistClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("id"),a=this.playlists.get(n);this._addToPlaylist(a)},onAddClick:function(e){e.preventDefault(),this.ui.addBtn.isDisabled()||this._createPlaylist();
}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),i=a.PropTypes.shape({machineIdentifier:a.PropTypes.string.isRequired,allowSync:a.PropTypes.bool,allowMediaDeletion:a.PropTypes.bool,transcoderVideo:a.PropTypes.bool,isFullServer:a.PropTypes.bool.isRequired,isFullOwnedServer:a.PropTypes.bool.isRequired});t.default=i,e.exports=t.default},function(e,t,n){"use strict";var a=n(1532).default,i=n(1533).default;t.default=function(){
function e(e,t){var n=[],i=!0,r=!1,s=void 0;try{for(var o,l=a(e);!(i=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(u){r=!0,s=u}finally{try{!i&&l.return&&l.return()}finally{if(r)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(i(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t.__esModule=!0},,function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};
e.exports=n},function(e,t,n){"use strict";var a=n(33),i=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},r=function(e,t){var n=this;if(n.instancePool.length){var a=n.instancePool.pop();return n.call(a,e,t),a}return new n(e,t)},s=function(e,t,n){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n),i}return new a(e,t,n)},o=function(e,t,n,a){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();
return i.call(r,e,t,n,a),r}return new i(e,t,n,a)},l=function(e,t,n,a,i){var r=this;if(r.instancePool.length){var s=r.instancePool.pop();return r.call(s,e,t,n,a,i),s}return new r(e,t,n,a,i)},u=function(e){var t=this;e instanceof t?void 0:a(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},d=10,c=i,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=d),n.release=u,n},p={addPoolingTo:f,oneArgumentPooler:i,twoArgumentPooler:r,threeArgumentPooler:s,
fourArgumentPooler:o,fiveArgumentPooler:l};e.exports=p},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t,n){"use strict";var a=n(52).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(41),d=i(u),c=n(1610),f=i(c),p=n(11),h=n(84),m=i(h),v=n(35),g=i(v),y=n(232),b=i(y),w=n(292),P=i(w),_=n(57),S=i(_),x=n(18),C=i(x),T=n(422),k=i(T),I=n(19),M=i(I),A=n(90),E=i(A),O=n(476),D=i(O),R=n(451),L=i(R),N=n(450),j=i(N),U=n(446),F=i(U),B=n(449),z=i(B),$=n(816),V=i($),H=n(445),q=i(H),W=n(818),K=i(W),Q=n(820),Y=i(Q),G=n(824),X=i(G),J=n(819),Z=i(J),ee=n(814),te=i(ee),ne={
PENDING:"pending",LOCKED:"locked",UNLOCKED:"unlocked"},ae={EMPTY:"",UNSUBSCRIBED:"unsubscribed",ACTIVE:"active",ERROR:"error",REMOVED:"removed"},ie=M.default.extend({mixins:[P.default],name:"UserModel",context:["server"],url:"/api/v2/user",sessionAttrs:{isSignedIn:C.default.boolean.isRequired,hasInvalidToken:C.default.boolean.isRequired,lastPrimaryServerID:C.default.string,lockState:C.default.oneOf(ne.PENDING,ne.LOCKED,ne.UNLOCKED).isRequired,devices:C.default.instanceOf(V.default).isRequired,homeUsers:C.default.instanceOf(q.default).isRequired,
friends:C.default.instanceOf(K.default).isRequired,invites:C.default.instanceOf(Y.default).isRequired,sentInvites:C.default.instanceOf(Y.default).isRequired,socialNetworks:C.default.instanceOf(X.default).isRequired,homeDetails:C.default.instanceOf(Z.default).isRequired},sessionRelations:{announcements:{relationClass:te.default}},syncedAttrs:{id:C.default.integer,uuid:C.default.string,authToken:C.default.string,username:C.default.string,email:C.default.string,emailOnlyAuth:C.default.boolean,title:C.default.string,
locale:C.default.string,thumb:C.default.string,pin:C.default.string,home:C.default.boolean,restricted:C.default.boolean,guest:C.default.boolean,homeSize:C.default.integer,maxHomeSize:C.default.integer,queueUid:C.default.string,queueEmail:C.default.string,hasAllEntitlements:C.default.boolean,mailingListActive:C.default.boolean,mailingListStatus:C.default.oneOf(ae.EMPTY,ae.UNSUBSCRIBED,ae.ACTIVE,ae.ERROR,ae.REMOVED)},syncedRelations:{subscription:{relationClass:L.default},roles:{relationClass:j.default
},entitlements:{relationClass:F.default},providers:{relationClass:z.default}},derivedAttrs:{isLocked:function(){return this.get("lockState")===ne.LOCKED},isUnlocked:function(){return this.get("lockState")===ne.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},thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,b.default)(this.server,e)},signedIn:function(){return this.get("isSignedIn")},locked:function(){var e=this.get("lockState");return e===ne.LOCKED||e!==ne.UNLOCKED&&null}},defaults:function(){var e={server:this.server,parent:this};return{isSignedIn:!1,hasInvalidToken:!1,lockState:ne.PENDING,devices:new V.default([],e),homeUsers:new q.default([],e),
friends:new K.default([],e),invites:new Y.default([],e),sentInvites:new Y.default([],s.default.extend({subset:"requested"},e)),socialNetworks:new X.default([],e),homeDetails:new Z.default({},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 d.default.Model.prototype.fetch.apply(this,arguments)},augmentResponse:function(e){var t=e.roles,n=e.entitlements,a=e.providers,i=s.default.extend({},e,{roles:t&&t.role,hasAllEntitlements:n&&n.all,entitlements:n&&n.entitlement,providers:a&&a.provider});return i},signInWithStoredToken:function(){var e=this,t=m.default.get("myPlexAccessToken");t.done(function(t){var n=e.server.getXHROptions(s.default.result(e,"url")),i=s.default.extend({},n.headers,a({},"X-Plex-Token",t));
n.headers=i;var r=l.default.ajax(n);r.done(function(t){var n=e.get("homeDetails"),a=n.fetch({headers:i});a.always(function(){var a=e.parse(t),i=e.get("lockState");if(i!==ne.UNLOCKED){var r=S.default.get("proxied")||g.default.get("autoLogin"),s=!!a.guest&&!n.get("guestEnabled"),o=!!a.home&&(!r||s);i=o?ne.LOCKED:ne.UNLOCKED}e.signIn(a,{lockState:i})})}),r.fail(function(t){if(!t.aborting){var n=(0,D.default)(t);e.signOut({hasInvalidToken:n}),e.server.testAllConnections(),n&&e.clearAccessToken()}})}),
t.fail(function(){e.signOut()})},signIn:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],a=s.default.isString(e)?this.parse(e):e,i=a.authToken,r=s.default.extend({isSignedIn:!0},a,t);return this._resolve(r,n),m.default.set("myPlexAccessToken",i)},signOut:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._reject(e),l.default.Deferred().resolve().promise()},activateStoredUser:function(e){
E.default.set("activeUserID",e);var t=E.default.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=m.default.remove("myPlexAccessToken");return e=e.then(function(){return E.default.clearActiveUser()})},hashPIN:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.get("authToken"):arguments[1];return f.default.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.signInWithStoredToken()},onServerUnavailableChange:function(e,t){t&&this.signOut({lockState:this.get("lockState")})}},{lockStates:ne,mailingListStates:ae});(0,k.default)(ie,function(){return{relationClass:(0,p.resolve)("UserFlexModel")}}),
t.default=ie,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={NORMAL:0,LOCAL:42,CLOUD:43},e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(115),d=a(u),c=n(40),f=a(c),p=n(499),h=a(p),m=n(433),v=a(m),g={uri:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataURI(n,t);e||(e=s.default.first(n));
}return e.get("isSection")?this.getSectionURI(e,t):e.get("isMetadataList")?this.getMetadataListURI(e,t):e.get("isPlaylist")?this.getPlaylistURI(e,t):e.get("isChannelItem")?this.getChannelURI(e,t):this.getLibraryMetadataURI(e,t)},getSectionURI:function(e,t){var n,a=s.default.result(e,"url"),i=e.get("currentSubset"),r=e.get("currentFolderKey"),o=e.get("currentType");if("folder"===i.id)n=r?r:l.join([a,"all"]);else{var u=e.get("items"),d=u.getParams();if(d.type&&delete d.type,d.timelineState&&delete d.timelineState,
d.unwatchedLeaves){var c=f.default.getChildMediaType(e.get("type")).typeString;d[c+".unwatched"]=1,delete d.unwatchedLeaves}o&&(d.sourceType=o.id),n=l.join([a,i.id],d),n=u.replaceSpecialFilterOperators(n)}return this._resolveURI({prefix:"library",parts:[e.get("uuid"),"directory",n]})},getBatchLibraryMetadataURI:function(e,t){var n=this._getSectionInfo(s.default.first(e)),a=s.default.map(e,function(e){return e.get("ratingKey")}),i="/library/metadata/"+a.join(",");return this._resolveURI({prefix:"library",
parts:[n.sectionUUID,"directory",i]})},getLibraryMetadataURI:function(e,t){t||(t={});var n,a=this._getSectionInfo(e),i=s.default.result(e,"url");return t.excludeSeedItem&&(i=l.join(i,{excludeSeedItem:1})),n=e.models||e.collectionName||e instanceof v.default?"directory":"item",this._resolveURI({prefix:"library",parts:[a.sectionUUID,n,i]})},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=s.default.result(e,"url"),a=e.get("items").length?"directory":"item";return this._resolveURI({prefix:"channel",parts:[e.channel.get("identifier"),a,n]})},title:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataTitle(n,t);e=s.default.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"),a=e.get("currentFilters");if("all"!==n.id)return t+": "+n.get("title");if(!a.length)return t;var i=s.default.flatten(s.default.map(a,function(e){return e.titles}));return t+": "+i.join(", ")},getMetadataListTitle:function(e){return e.get("containerTitle")||e.get("title")},getBatchLibraryMetadataTitle:function(e){var t=s.default.map(e,function(e){return e.get("title")});return(0,h.default)(t)},getLibraryMetadataTitle:function(e){
var t=e.get("grandparentTitle")||e.get("parentTitle"),n=e.get("title");if(t&&(n=t+" - "+n),"episode"===e.get("type")){var a=(0,d.default)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" "});n+=" ("+a+")"}return n},_resolveURI:function(e){var t=e.parts,n=s.default.map(t,function(e){return e?encodeURIComponent(e):""});return e.prefix+"://"+n.join("/")},_getSectionInfo:function(e){var t=e.get("librarySectionUUID"),n=e.get("librarySectionID");
if(!t||!n){var a=e.server.getSectionForItem(e);s.default.isEmpty(a)||(t=a.get("uuid"),n=a.id)}return{sectionUUID:t,sectionID:n}}};t.default=g,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={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.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1802),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=c.default.ItemView.extend({
className:"summary",template:r.default,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=o.default.map(o.default.compact(e.split("\n")),function(e){return u.default.trim(o.default.escape(e));
});if(t.length)return"<p>"+t.join("</p><p>")+"</p>"}}}},initialize:function(){this.listenTo(m.default,"resize",this.onResize),this.listenTo(this.model,"change:summary",this.onSummaryChange)},updateDividerBtn:function(e){var t=e?(0,p.default)("More"):(0,p.default)("Less");this.ui.dividerBtn.html(t)},updateDividerBtnVisibility:function(){if(this.originalHeight){var e=this.ui.summary.prop("scrollHeight");e<=this.originalHeight?this.ui.divider.addClass("hidden"):(this.updateDividerBtn(!this.expanded),
this.ui.divider.removeClass("hidden"))}},onRender:function(){o.default.defer(o.default.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.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(169),r=a(i),s=n(920),o=a(s),l=o.default.extend({
className:"container",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(626),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(65),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=n(17),g=a(v),y=n(1070),b=a(y),w=n(533),P=a(w),_=n(534),S=a(_),x=n(1201),C=a(x),T=n(1198),k=a(T),I=n(1199),M=a(I),A=n(47),E=a(A),O=n(184),D=a(O),R={movie:["general","tags","sharing","poster","art","info"],show:["general","tags","sharing","poster","banner","art"],
season:["general","poster","art","info"],episode:["general","tags","poster","art","info"],artist:["general","tags","poster","art"],album:["general","tags","sharing","poster","art","info"],track:["general","tags","info"],photoAlbum:["general","poster","art"],photo:["general","info"]},L=["poster","art","banner","info"],N=E.default.extend({mixins:[D.default],name:"editMetadataModal",className:"edit-metadata-modal modal modal-lg fade",template:r.default,panes:{general:{constructor:P.default},tags:{constructor:S.default
},poster:{constructor:k.default},art:{constructor:k.default},banner:{constructor:k.default},sharing:{constructor:C.default},info:{constructor:M.default}},events:o.default.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},E.default.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){E.default.prototype.initialize.apply(this,arguments);var t,n=e.mediaActions,a=e.items||(n?n.getActionTargets():[this.model]),i=a[0];this.model=new b.default({},{server:i.server,metadataItems:a}),t=i.section||i.get("librarySectionID")?u.default.Deferred().resolve().promise():i.populate(),t=t.then(o.default.bind(function(){return this.model.setContext("section",i.server.getSectionForItem(i)),this.model.populate()},this)),t.done(o.default.bind(function(){this.model.set("originalSaveParams",this.model.getSaveParams()),
this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(m.default,"shortcut:save",this.saveChanges)},this)),t.fail(o.default.bind(function(){this.ui.message.text((0,p.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=R[this.model.get("type")]||R.movie;this.model.get("isSingleMetadataItem")||(e=o.default.difference(e,L));var t=o.default.reduce(e,function(e,t){return e[t]=!0,e},{}),n=(0,p.default)("Edit {1}",this.model.get("aggregateTitle"),{
escape:!0}),a={item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:n};return a},paneConstructorArg:function(){return{type:this.selectedPane}},invalidChangedAttrs:function(e){var t=[];if("track"===this.model.get("type")){var n=o.default.has(e,"artist.id.value")||o.default.has(e,"artist.title.value")||o.default.has(e,"album.id.value")||o.default.has(e,"album.title.value"),a=e["album.id.value"]||e["album.title.value"],i=e["artist.id.value"]||e["artist.title.value"],r=!n||i&&a;r||(i||t.push("grandparentTitle"),
a||t.push("parentTitle"))}if(o.default.has(e,"originallyAvailableAt.value")){var s=e["originallyAvailableAt.value"];/^\d{4}$/.test(s)&&(e["originallyAvailableAt.value"]+="-01-01",s=e["originallyAvailableAt.value"]),""===s||(0,c.default)(s,"YYYY-MM-DD",!0).isValid()?this.model.set("originallyAvailableAt",s):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 n=[],a=this.model.getSaveParams(),i=this.invalidChangedAttrs(a);if(i.length)return void this.markInvalid(i);e.addClass("active"),o.default.each(["poster","banner","art"],function(e){var t=this.model.get(e);t&&n.push(g.default.execute("changeArtwork",{item:this.model.getSingleMetadataItem(),artworkType:e,artworkRatingKey:t}))},this),n.push(this.model.save());var r=u.default.when.apply(u.default,n);r.done(o.default.bind(function(){
this.hide()},this)),r.fail(function(){t.text((0,p.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.default=N,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1905),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(6),f=a(c),p=n(9),h=a(p),m=n(39),v=a(m),g=n(23),y=i(g),b=n(93),w=a(b),P=n(40),_=a(P),S=n(17),x=a(S),C=n(142),T=a(C),k=n(1204),I=a(k),M=n(1207),A=a(M),E=n(1210),O=a(E),D=n(1212),R=a(D),L=n(1206),N=a(L),j=n(47),U=a(j),F=n(251),B=a(F),z=n(184),$=a(z),V=U.default.extend({mixins:[$.default],name:"editSectionModal",className:"edit-section-modal modal modal-lg fade",template:s.default,panes:{type:{constructor:R.default,nextPane:"folders",dependentPanes:["folders"]
},folders:{constructor:A.default,nextPane:"create",dependentPanes:["create","advanced"]},create:{constructor:O.default,nextPane:"advanced"},advanced:{constructor:I.default},error:{constructor:N.default}},panesModel:"tempModel",ui:{sidebar:".modal-nav-list",createBtn:".create-btn",saveBtn:".save-btn",message:".form-message",headerSectionType:".section-type-title"},regions:{paneRegion:".pane-region"},events:l.default.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onSaveClick",
"click .delete-btn":"onDeleteClick","submit .edit-section-type-form":"onGeneralFormSubmit"},U.default.prototype.events),onlyAfterRender:["showPane","updateMessage","updateSectionTitle","updateSectionTitleDestabilized","updateSaveBtn"],paneConstructorArg:function(){return{isDefaultSection:this.isDefaultSection}},initialize:function(e){U.default.prototype.initialize.apply(this,arguments),this.server=e.server,this.redirect=e.redirect,this.isDefaultSection=e.isDefaultSection,this.model?(this.tempModel=this.model.clone(),
this.tempModel.collection=this.model.collection):this.tempModel=new T.default({},{server:this.server,collection:this.server.get("sections")}),this.listenTo(this.tempModel,"change:type",this.onSectionTypeChange),this.showPane(e.selectedPane||"type"),this.tempModel.isNew()&&e.seedAttrs&&this.tempModel.set(this.tempModel.parse(e.seedAttrs)),this._deferred=d.default.Deferred(),this.promise=this._deferred.promise()},serializeData:function(){var e=this.tempModel,t=e.isNew(),n={add:t,edit:!t,section:e&&e.toJSON(),
selectedPane:this.selectedPane,canDelete:this.isDefaultSection||this.model&&!this.model.isNew()};return n},updateMessage:function(e){this.ui.message.text(e||"")},updateSaveBtn:function H(){var e=this.ui.saveBtn,t=this.panes[this.selectedPane],H=l.default.bind(function(n){var a=t.nextPane,i=this.tempModel.isNew(),r=!t.constructor.prototype.validate||0===t.constructor.prototype.validate(this.tempModel).length,s=!this.getReachablePanes().isAnyInvalid;this.ui.createBtn.toggleClass("hidden",!n);var o,l=s||i&&r;
o=a,n||"create"!==a||(o=!1),s&&(o=!1),n&&"create"===a&&(o=!0),n&&"advanced"===a&&(o=!0),e.toggleClass("save",!o),e.toggleClass("next",!!o),e.toggleClass("disabled",!l)},this),n="music"===this.tempModel.get("type")&&this.tempModel.server.supports("premiumMusic");n?this.paneRegion.currentView.populateAgents().then(function(e){var t=e.findWhere({identifier:"com.plexapp.agents.plexmusic"});H(t)}):H(!1)},updateSectionTitle:function(){var e=w.default.get(this.tempModel.get("type"));if(e){this.updateSectionTitleDestabilized();
var t=(0,f.default)(e.title,{escape:!0});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(l.default.bind(function(e){503===e.status?h.default.trigger("show:modal",new B.default({
model:this.server})):this.updateMessage((0,f.default)("Your changes could not be saved."))},this)),t.then(l.default.bind(function(){if(!this.redirect)return this._deferred.resolve(),void this.hide();var e={serverID:this.model.server.id,sectionID:this.model.id};return"artist"!==this.model.get("type")?(h.default.trigger("navigate","section",e),this._deferred.resolve(),void this.hide()):(e.type=_.default.get("album").id,e.sortKey="addedAt",e.sortDirection="desc",this._deferred.resolve(),this.hide(),
void h.default.trigger("navigate","sectionType",e))},this))},saveModel:function(){var e;return this.tempModel.isNew()?(e=this.tempModel.save(),e=e.then(l.default.bind(function(e,t,n){var a=v.default.parseXML(e);if(201===n.status){if(a.Directory&&(a=a.Directory),!a.key){var i=n.getResponseHeader("Location");i&&(a.key=i.substring(i.lastIndexOf("/")+1))}var r=this.server;return r.supports("advancedFilters")&&(a.filters=!0),this.model=new T.default(a,{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(l.default.bind(this.saveSettings,this)),e=e.then(l.default.bind(this.saveAgentSettings,this))},saveSettings:function(){var e=d.default.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(l.default.isEmpty(n))return e;var a=t.first(),i=a.getSaveParams(n),r=y.join(["/library/sections/",this.model.id,"/prefs"],i),s=l.default.extend(this.server.getXHROptions(r),{
type:"PUT"});return d.default.ajax(s).promise().then(function(){return e})},saveAgentSettings:function(){var e=d.default.Deferred().resolve(this.model).promise(),t=this.tempModel.agentSettings;if(!this.tempModel.agentSettings)return e;var n=this.getSettingsChanges(t);if(l.default.isEmpty(n))return e;var a=t.first(),i=a.getSaveParams(n),r=l.default.result(t,"url"),s=y.join([r,"/set"],i),o=a.server.getXHROptions(s);return d.default.ajax(o).promise().then(function(){return e})},getSettingsChanges:function(e){
var t=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},{});return t},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;n&&!this.ui.sidebar.find("."+n+"-btn").isDisabled()&&this.showPane(n)}else this.save()},onDeleteClick:function(e){e.preventDefault();var t=x.default.execute("deleteSection",{section:this.model});this.isDefaultSection||t.done(function(){h.default.trigger("navigate","dashboard")})},onGeneralFormSubmit:function(e){
this.onSaveClick(e)},onSectionTypeChange:function(){this.updateSaveBtn()}});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1930),r=a(i),s=n(5),o=a(s),l=n(153),u=a(l),d=n(335),c=a(d),f=n(1065),p=a(f),h=n(1056),m=a(h),v=n(47),g=a(v),y=n(1322),b=a(y),w=n(1321),P=a(w),_=n(1323),S=a(_),x=n(1318),C=a(x),T=g.default.extend({mixins:[u.default],name:"convertModal",className:"convert-modal modal fade",template:r.default,
regions:{bodyRegion:".modal-body-region"},initialize:function(e){g.default.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 c.default([],t),this.targets=new p.default([],t),this.profiles=new m.default([],t)},initialState:"loading",states:{loading:{nextState:"form",onEnter:function(){this.bodyRegion.show(new b.default),this.listenForStateRequests();var e=o.default.when(this.playlists.populate(),this.targets.populate(),this.profiles.populate(),this.server.get("sections").populate());
e.done(this.whenRendered(function(){this.playlist=this.playlists.first(),this.playlist?this.enterNextState():this.enterState("error")})),e.fail(this.whenRendered(function(){this.enterState("error")}))}},form:{nextState:"success",onEnter:function(){this.bodyRegion.show(new P.default({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 S.default({
server:this.server})),this.listenForStateRequests())}},error:{onEnter:function(e){this.bodyRegion.show(new C.default({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(){g.default.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}
});t.default=T,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.children,a=e.kind,s=i(e,["className","children","kind"]);return l.default.createElement(p.default,r({className:(0,d.default)(t,m.default.menuItem,m.default[a]),role:"menuitem"},s),n)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(44),f=n(43),p=s(f),h=n(1644),m=s(h);a.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,
kind:o.PropTypes.oneOf(c.kinds.all)},a.defaultProps={kind:c.kinds.DEFAULT},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return o.default.createElement(u.default,i({iconClassName:c.default.icon,icon:"plex-icon-alert-560"},e))}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(202),u=r(l),d=n(1683),c=r(d);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return(e&t)===t}var i=n(33),r={MUST_USE_PROPERTY:1,
HAS_SIDE_EFFECTS:2,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=r,n=e.Properties||{},s=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},d=e.DOMMutationMethods||{};e.isCustomAttribute&&o._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var c in n){o.properties.hasOwnProperty(c)?i(!1):void 0;var f=c.toLowerCase(),p=n[c],h={attributeName:f,attributeNamespace:null,
propertyName:c,mutationMethod:null,mustUseProperty:a(p,t.MUST_USE_PROPERTY),hasSideEffects:a(p,t.HAS_SIDE_EFFECTS),hasBooleanValue:a(p,t.HAS_BOOLEAN_VALUE),hasNumericValue:a(p,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:a(p,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:a(p,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(!h.mustUseProperty&&h.hasSideEffects?i(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:i(!1),l.hasOwnProperty(c)){var m=l[c];h.attributeName=m}
s.hasOwnProperty(c)&&(h.attributeNamespace=s[c]),u.hasOwnProperty(c)&&(h.propertyName=u[c]),d.hasOwnProperty(c)&&(h.mutationMethod=d[c]),o.properties[c]=h}}},s=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:s,ATTRIBUTE_NAME_CHAR:s+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",
properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<o._isCustomAttributeFunctions.length;t++){var n=o._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:r};e.exports=o},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=r.default.extend({"interface":["enable","disable","set","trackView","trackEvent"],register:function(e){this._Analytics=e},init:function(e){
return this._instance=new this._Analytics(e),this._instance}});t.default=new s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({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-Provides","X-Plex-Version"]});t.default=s,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(93),d=a(u),c=n(503),f=a(c),p=n(40),h=a(p),m=n(78),v=i(m),g=n(77),y=a(g),b=n(18),w=a(b),P=n(19),_=a(P),S=n(111),x=a(S),C=n(779),T=a(C),k=n(290),I=a(k),M=n(767),A=a(M),E=n(766),O=a(E),D=n(430),R=a(D),L=n(759),N=a(L),j=n(762),U=a(j),F=n(431),B=a(F),z=n(432),$=a(z),V=n(761),H=a(V),q=n(429),W=a(q),K=n(764),Q=a(K),Y=n(107),G=a(Y),X=_.default.extend({name:"SectionModel",
context:["server"],entityType:v.LIBRARY,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,y.default)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",rootPropertyName:"Directory",cache:new x.default,persistInCache:!0,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.key)},url:function J(){if(this.isNew())return s.default.result(this,"urlRoot")||s.default.result(this.collection,"url");var e=s.default.isNaN(parseInt(this.id,10)),J=e?this.id:"/library/sections/"+this.id;
return J},sessionAttrs:{isSection:w.default.boolean,currentFilters:w.default.array,currentFolderKey:w.default.string,settings:w.default.instanceOf(G.default)},syncedAttrs:{key:w.default.oneOfType(w.default.string,w.default.integer),uuid:w.default.string,thumb:w.default.string,art:w.default.string,createdAt:w.default.integer,updatedAt:w.default.integer,allowAdvancedFilters:w.default.boolean,allowSync:w.default.boolean,refreshing:w.default.boolean,name:{type:w.default.string,save:!0},title:{type:w.default.string,
save:!0},type:{type:w.default.string,save:!0},agent:{type:w.default.string,save:!0},scanner:{type:w.default.string,save:!0},language:{type:w.default.string,save:!0},importFromiTunes:{type:w.default.boolean,save:!0}},syncedRelations:{locations:function(){return{relationClass:Q.default,rootPropertyName:"Location",options:{section:this},save:!0}}},sessionRelations:{items:function(){return{relationClass:T.default,options:{section:this}}},currentSubset:function(){return{relationClass:I.default,options:{
section:this}}},currentFirstCharacter:function(){return{relationClass:W.default,deferred:!0}},currentType:function(){return{relationClass:R.default,deferred:!0}},currentSort:function(){return{relationClass:$.default,deferred:!0}},types:function(){return{relationClass:O.default,options:{section:this}}},subsets:function(){return{relationClass:A.default,options:{section:this}}},filters:function(){var e=this.get("allowAdvancedFilters")?N.default:U.default;return{relationClass:e,options:{section:this}
}},sorts:function(){return{relationClass:B.default,options:{section:this}}},firstCharacters:function(){return{relationClass:H.default,options:{section:this}}}},defaults:function(){var e=this;return{isSection:!0,currentType:null,currentFilters:[],currentSort:null,currentFirstCharacter:null,currentFolderKey:null,currentSubset:f.default.get("all"),settings:new G.default([],{server:this.server,url:function(){return l.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 d.default.get(e)},getSaveParams:function(e){var t=_.default.prototype.getSaveParams.apply(this,arguments);if("type"in t){var n=d.default.get(t.type);n&&(t.type=n.typeString);
}return"title"in t&&(t.name=t.title,delete t.title),s.default.isObject(t.type)&&(t.type=t.type.typeString),"Location"in t&&(t.location=s.default.pluck(t.Location,"path"),delete t.Location),t},getSyncTitle:function(e){var t=this.get("title"),n=[],a=this.get("currentSubset"),i=this.get("currentFilters");return e?(s.default.each(e,function(e){n.push(e.get("title"))}),t+": "+n.join(", ")):"all"!==a.id?t+": "+a.get("title"):i.length?(s.default.each(i,function(e){n.push(e.titles.join(", "))}),t+": "+n.join(",")):t;
},setAgentAndScanner:function(e,t,n,a){var i=e.defaultAgent,r=e.defaultScanner;if(a){var s=e.exclusiveAgents,o=e.exclusiveScanners,l=t.hasExclusiveAgent(s),u=n.hasExclusiveScanner(o);l&&(i=s[0]),u&&(r=o[0])}this.set({agent:i,scanner:r})},updateMediaTypes:function(e,t){var n=h.default.getRelatedMediaTypes(t);this.get("types").reset(n)}});t.default=X,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(236),d=a(u),c=n(23),f=i(c),p={
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 a={"X-Plex-Container-Start":t||0,"X-Plex-Container-Size":n||0};return f.join(e,a)}return e},getCollectionChangeEvents:function(){var e=this.getCollectionName(),t=["change:"+e+".update","change:"+e+".reset"];
return t.join(" ")},startPopulatedRangeMonitor:function(){this.updatePopulatedRange(),this.on(this.getCollectionChangeEvents(),this.updatePopulatedRange,this)},stopPopulatedRangeMonitor:function(){this.off(this.getCollectionChangeEvents(),this.updatePopulatedRange,this)},fetchRange:function(e){var t=s.default.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"),a=d.default.difference(e,n)[0];
if(!a)return l.default.Deferred().resolve().promise();if(a=d.default.degap(a,n),this.hasPendingPopulate()){var i=this.get("currentPageStart")!==a.start,r=this.get("currentPageSize")!==a.size;if(!i&&!r)return this.populatePromise;this.abortPendingPopulate()}if(e.reloadThreshold&&a.size>e.reloadThreshold)return t.reset(),this.populateRange(s.default.omit(e,"reloadThreshold"));var o=s.default.extend({},e,a,{prepend:a.start<n.start});return this.fetchRange(o)},repopulateRange:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.get("populatedRange").end;
return e||t?(this.set({currentPageStart:0,currentPageSize:Math.max(t,e)}),this.abortPendingPopulate(),this.fetch()):l.default.Deferred().resolve().promise()},updatePopulatedRange:function(){var e=this.get("currentPageStart"),t=this.get("populatedRange").start,n=this.get("populatedRange").size,a=this.getCollection().length,i=void 0;i=a?n?Math.min(t,null==e?1/0:e):e||t:0,this.set("populatedRange",{start:i,end:i+a,size:a})}};t.default=p,e.exports=t.default},function(e,t){"use strict";function n(e){return e.entities;
}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=arguments.length<=1||void 0===arguments[1]?"MMMM D, YYYY":arguments[1];return e?(0,s.default)(e).format(t):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.duration(e),n=t.hours()+24*t.days(),a=t.minutes(),i=t.seconds();return n&&a?(0,l.default)("{1} hr {2} min",n,a):n?(0,
l.default)("{1} hr",n):a?(0,l.default)("{1} min",a):i>0?(0,l.default)("{1} sec",i):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r),o=n(6),l=i(o);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0
});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(26),d=a(u),c=n(106),f=a(c),p=n(478),h=a(p),m=n(481),v=a(m),g={extensions:{dash:".mpd",hls:".m3u8",http:""},logParams:function(e,t){d.default.group("[Transcoder] %s options",e),s.default.forEach(t,function(e,t){return d.default.info("%s: %s",t,e)}),d.default.groupEnd()},serializeParams:function(e,t){var n,a={},i={},r=/^X-Plex/;return s.default.each(e,function(e,t){r.test(t)?i[t]=e:a[t]=e}),a=l.stringifyParams(a),i=l.stringifyParams(i),n=a&&i?a+"&"+i:a||i},image:function(e,t,n){
if(!t)return"";var a,i=n.fallbackServer,r=!1;if(i&&i.get("isConnected")){var o=i.get("isFullServer"),l=i.get("activeConnection").get("isPossiblyCrossNetworkProtected");a=o&&!l?i:null}if(a)if(e.get("cloud"))r=!0;else if(!e.get("isFullServer")){var u=!e.get("activeConnection").get("isPrivate"),d=a.get("activeConnection").get("isPrivate");r=u||d}var c=r?a:e,p=c.id===e.id;e.get("cloud")&&(t=r?a.resolveUrl(t,{appendToken:!0}):e.resolveUrl(t,{appendToken:!0,connection:new f.default({scheme:"https",address:"node.plexapp.com",
port:"32443"})}));var h={url:e.resolveUrl(t,{useLoopback:p,appendToken:!0}),width:n.width&&Math.round(parseFloat(n.width)),height:n.height&&Math.round(parseFloat(n.height))};n.minSize&&(h.minSize=1),n.format&&(h.format=n.format),n.quality&&(h.quality=n.quality),n.filters&&s.default.each(n.filters,function(e,t){void 0!==e&&(h[t]=e)});var m="/photo/:/transcode?"+this.serializeParams(h,c);return c.resolveUrl(m,{appendToken:!0})},music:function(e,t,n,a){a||(a="start");var i=s.default.first(t.get("Media"));
if(i){var r=s.default.first(i.Part);if(r){var o,l;return e.supports("universalMusicTranscoder")?(o=s.default.extend({hasMDE:1,path:e.resolveUrl(t.get("key"),{useLoopback:!0}),mediaIndex:0,partIndex:0},n),l="/music/:/transcode/universal/"+a):(o={identifier:t.get("identifier"),url:e.resolveUrl(r.key,{useLoopback:!0}),format:"mp3",audioCodec:"libmp3lame",audioBitrate:320,audioSamples:44100},l="/music/:/transcode/generic.mp3"),this.logParams("Music",o),o=s.default.extend(o,e.getHeaders()),e.resolveUrl(l+"?"+this.serializeParams(o,e));
}}},video:function(e,t,n,a,i,r){i||(i={}),r||(r="start");var o=e.id===t.server.id,l=t.server.get("cloud")?e:t.server,u=s.default.extend({hasMDE:1,path:l.resolveUrl(t.get("key"),{useLoopback:o,appendToken:!o}),mediaIndex:(0,h.default)(t,n.id),partIndex:(0,v.default)(n,a.key),protocol:"hls",offset:0,fastSeek:1,directPlay:0,directStream:1,subtitleSize:100,audioBoost:100},i);u.path=u.path.replace(/^http[s]?:\/\/node.plexapp.com:[\d]+\//,e.url()),this.logParams("Video",u);var d=t.get("indirectHttpHeaders");
d&&(u.httpCookies=d.Cookie,u.userAgent=d["User-Agent"]),u=s.default.extend(u,e.getHeaders());var c=this.extensions[u.protocol],f="/video/:/transcode/universal/"+r;return"start"===r&&c&&(f+=c),e.resolveUrl(f+"?"+this.serializeParams(u,e))}};t.default=g,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=o.default.clone(e);return t.title=o.default.result(t,"title"),t.hasOwnProperty("plural")&&(t.plural=o.default.result(t,"plural")),t}function i(e,t){function n(e){for(var t in r){var n=r[t],i=n[e];
if(i)return a(i)}u.default.warn("No type was found for "+e)}function i(){return t.map(function(e){return a(e)})}var r={};return e.forEach(function(e){r[e]=t.reduceRight(function(t,n){var a=n[e];return null!=a&&(t[a]=n),t},{})}),{get:n,getAll:i}}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(3),o=r(s),l=n(26),u=r(l);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=a(i),s=r.default.Layout.extend({
regions:{content:".content"}});t.default=s,e.exports=t.default},function(e,t){"use strict";function n(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}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(10),o=a(s),l=n(236),u=a(l),d={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,a=r.default.indexOf(t,n);if(a!==-1)return!0;var i=n.get("children"),s=i&&i.length&&i.every(function(e){return e.selected});return!!s},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,a=this.previousCollectionOffset-n,i=[],s=[];if(this.previousCollectionOffset=n,this.shiftRange.start<0)this.shiftRange.start=t,i.push(e.model),e.select();else if(this.shiftRange.end<0)this.shiftRange.start+=a,this.shiftRange.end=t,u.default.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){i.push(t);var n=this.getViewForModel(t);n&&n.select();
}},this);else{u.default.each(this.shiftRange,function(e){var t=this.collection.at(e);t&&s.push(t)},this),this.shiftRange.start+=a,this.shiftRange.end=t,u.default.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){i.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);var o=[s].concat(i);s=r.default.without.apply(r.default,o),r.default.each(s,function(e){var t=this.getViewForModel(e);t&&t.deselect()},this)}this.mediaActions.selectItems(i,{superset:this.collection}),this.mediaActions.deselectItems(s,{
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 a=o.default.normalizeMethods.call(this,this.itemEvents);"undefined"!=typeof a&&r.default.isFunction(a[t])&&a[t].apply(this,n),
o.default.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.model.selected&&(this.deselectItem(e.model),e.deselect())}};t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s={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 a=this.states[t];if(r.default.isFunction(a.onExit)){var i=a.onExit.call(this);if(i===!1)return}}if(this.currentState=e,r.default.isFunction(n.onEnter)){var s=n.onEnter.apply(this,r.default.rest(arguments));if(s===!1)return void(this.currentState=t)}this.triggerMethod("stateMachineChange",{from:t,to:e})}},enterNextState:function(){var e;if(this.currentState){
var t=this.states[this.currentState];e=t.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.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.RESET_QUICK_SEARCH);t.resetQuickSearch=u;var d=(0,s.default)(l.FETCH_QUICK_SEARCH);
t.fetchQuickSearch=d;var c=(0,s.default)(l.CHANGE_QUICK_SEARCH_QUERY);t.changeQuickSearchQuery=c;var f=(0,s.default)(l.CHANGE_QUICK_SEARCH_SETTINGS);t.changeQuickSearchSettings=f;var p=(0,s.default)(l.SELECT_QUICK_SEARCH_RESULT);t.selectQuickSearchResult=p;var h=(0,s.default)(l.NAVIGATE_QUICK_SEARCH_RESULT);t.navigateQuickSearchResult=h;var m=(0,s.default)(l.PLAY_QUICK_SEARCH_RESULT);t.playQuickSearchItem=m},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1939),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(11),f=i(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(39),y=a(g),b=n(17),w=a(b),P=n(444),_=a(P),S=n(297),x=a(S),C=n(1092),T=a(C),k=n(47),I=a(k),M=n(1330),A=a(M),E=n(1338),O=a(E),D=n(1329),R=a(D),L=n(1333),N=a(L),j=n(1337),U=a(j),F=n(1334),B=a(F),z=n(94),$=a(z),V=I.default.extend({name:"editFriendModal",className:"edit-friend-modal modal modal-lg fade",template:s.default,panes:{username:O.default,general:R.default,ownedServer:N.default,sharedServer:U.default,
restrictions:B.default},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:l.default.extend({"submit #share-server-form":"onSubmit"},I.default.prototype.events),initialize:function(e){I.default.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 $.default({model:this.model,type:"friend",width:40}),this.listenTo(this.body,"show",this.onShowPane)},initHomeUser:function(e){var t=f.resolve("appModel");if(this.homeUser=e.homeUser,this.homeUser){var n=t.get("user"),a=n.get("friends");this.model=a.findWhere({id:e.homeUser.id}),this.tempHomeUser=this.homeUser.clone()}else this.tempHomeUser=new x.default({admin:!1},{server:t.get("user").server})},initModel:function(e){
var t=f.resolve("appModel");this.model?this.tempModel=this.model.cloneDeep():(this.tempModel=new _.default({},{server:t.get("user").server}),this.tempModel.parseServers({Server:[]}))},initServerOverviews:function(e){var t=f.resolve("appModel"),n=t.get("servers"),a=t.get("user"),i=this.tempModel.get("serverOverviews");i||(i=new T.default([],{server:a.server,parent:this.tempModel}),this.tempModel.set("serverOverviews",i));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});l.default.each(r,function(e){var t=i.add({machineIdentifier:e.id,name:e.get("friendlyName")});t.populate()})},initServerShares:function(e){var t=this.tempModel.get("serverShares");t.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 a,i;if("ownedServer"===e?(a=this.tempModel.get("serverOverviews"),
i="serverOverview"):(a=this.tempModel.get("serverShares"),i="serverShare"),a.length){var r;this.defaultPaneID&&(r=a.findWhere({machineIdentifier:this.defaultPaneID})),r||(r=a.first()),t=r.id,n[i]=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 a=this.panes[e],i=new a(l.default.extend({paneID:t,model:this.tempModel,homeUser:this.tempHomeUser,type:this.type,isAdmin:this.isAdmin},n));return this.listenTo(i,{"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=i,this.nav.currentView.selectItem(t),
this.body.show(i),i},getSubmitBtn:function(){return this.currentPane&&"username"===this.currentPane.paneID?this.ui.nextBtn:this.ui.submitBtn},findExistingFriend:function(){var e,t=f.resolve("appModel"),n=t.get("user"),a=n.get("friends"),i=this.tempModel.get("username");if(this.tempModel.get("restricted")?e=a.findWhere({restricted:!0,title:i}):(e=a.findWhere({username:i}),e||(e=a.findWhere({email:i}))),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(),n=[];n.push(this.sendFriendInvite()),n.push(this.sendHomeInvite());var a=d.default.when.apply(d.default,n);return a=a.then(l.default.bind(function(){return Array.prototype.push.apply(n,this.sendServerShareInvites()),this.tempModel.isNew()||n.push(this.tempModel.save({},{parse:!1
})),this.tempHomeUser&&!e&&n.push(this.tempHomeUser.save()),d.default.when.apply(d.default,n)},this)),a.done(l.default.bind(function(){var e=f.resolve("appModel"),t=e.get("user");t.get("friends").fetch(),"home"===this.type&&t.get("homeUsers").fetch(),this.tempModel.get("restricted")||t.get("sentInvites").fetch(),this.hide()},this)),a.fail(l.default.bind(function(n){var a=y.default.parseXML(n.responseText),i=a&&a.status;l.default.isString(i)||(i=e?(0,h.default)("This user could not be added to your home."):t?(0,
h.default)("An invite could not be sent to this user."):(0,h.default)("Your changes could not be saved.")),v.default.trigger("show:alert",{type:"error",message:i})},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(l.default.bind(function(){
if(this.tempHomeUser.get("restricted")){this.tempModel.set("id",this.tempHomeUser.id);var e=f.resolve("appModel"),t=e.get("user");t.set("home",!0)}this.showHomeWarnings()},this)),e}},showHomeWarnings:function(){w.default.execute("showHomeWarningsModal")},sendServerShareInvites:function(){var e=this.model&&this.model.get("serverShares").filterByOwned(),t=this.tempModel.get("serverShares").filterByOwned(),n=e?e.pluck("machineIdentifier"):[],a=t?t.pluck("machineIdentifier"):[],i=l.default.union(n,a),r=[];
return l.default.each(i,function(n){var a=e&&e.findWhere({machineIdentifier:n}),i=t&&t.findWhere({machineIdentifier:n}),s=a&&a.isActive(),o=i&&i.isActive();o?r.push(w.default.execute("shareServer",{user:this.tempModel,serverShare:i})):s&&r.push(a.destroy({wait:!0}))},this),r},onRender:function(){I.default.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster);var e=new A.default({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){var e=w.default.execute("removeHomeUser",{
homeUser:this.homeUser});e.done(l.default.bind(this.hide,this))}},onFriendDestroy:function(){if(this.model){var e=w.default.execute("removeFriend",{friend:this.model});e.done(l.default.bind(this.hide,this))}},onServerShareDestroy:function(e){var t=w.default.execute("removeServerShare",{serverShare:e});t.done(l.default.bind(function(){var t=this.model.get("serverShares");t.remove(e.id),this.showNextPane("general")},this))},onGuestDisable:function(){var e=f.resolve("appModel"),t=w.default.execute("toggleGuest",{
user:e.get("user"),enable:!1});t.done(l.default.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(l.default.bind(function(){this.ui.submitBtn.removeClass("active")},this))}}});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(2002),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=u.default.Layout.extend({className:"form-group",template:r.default,isDisabled:!0,isActive:!1,ui:{submitBtn:".submit-btn",message:".form-message"},events:{"change #server-settings-form input[name]":"onInputChange","keyup #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 o.default.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(){o.default.isEmpty(this.changes)||this.enable()},onInputChange:function(e){var t=e.currentTarget,n=t.name,a=t.value,i=t.value;if(n){"checkbox"===t.type&&(i=t.checked,i||(a="0"));var r=this.updateModel(n,i);
r&&(this.changes[t.name]=a,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=(0,c.default)("Your changes have been saved.")):t=(0,c.default)("Your changes could not be saved."),this.ui.message.text(t)}});t.default=f,e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t=e.className,n=e.children,a=e.kind,s=e.size,o=i(e,["className","children","kind","size"]);return l.default.createElement(p.default,r({className:(0,d.default)(t,m.default.button,m.default[a],m.default[s])},o),n)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(44),f=n(43),p=s(f),h=n(1628),m=s(h);a.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,kind:o.PropTypes.oneOf(c.kinds.all),
size:o.PropTypes.oneOf(c.sizes.all)},a.defaultProps={kind:c.kinds.DEFAULT,size:c.sizes.MEDIUM},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.className,a=e.errorClassName,s=e.name,o=e.hasError,u=i(e,["children","className","errorClassName","name","hasError"]);return l.default.createElement("label",r({},u,{className:(0,d.default)(n,o&&a),htmlFor:s}),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(1635),f=s(c);a.propTypes={children:o.PropTypes.node.isRequired,className:o.PropTypes.string,errorClassName:o.PropTypes.string,name:o.PropTypes.string,hasError:o.PropTypes.bool},a.defaultProps={className:f.default.label,errorClassName:f.default.hasError},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default,f=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var p=n(7),h=c(p),m=n(66),v=c(m),g=n(32),y=c(g),b=n(27),w=n(246),P=f(w),_=n(29),S=c(_),x=n(509),C=n(118),T=c(C),k=n(151),I=c(k),M=n(507),A=c(M),E=n(363),O=f(E),D=n(44),R=n(163),L=c(R),N=n(240),j=c(N),U=n(86),F=c(U),B=n(1414),z=c(B),$=n(1642),V=c($),H=(0,I.default)(L.default.menuSpeed),q={appear:V.default.enter,appearActive:V.default.enterActive,enter:V.default.enter,enterActive:V.default.enterActive,leave:V.default.leave,leaveActive:V.default.leaveActive
},W=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this._openMenu()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,S.default)(this,e,t)}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen?this._openMenu():e.isOpen&&!this.props.isOpen&&this._closeMenu()}},{key:"componentWillUnmount",value:function(){this.props.isOpen&&this._closeMenu();
}},{key:"_openMenu",value:function(){O.startScopedFocus(v.default.findDOMNode(this.refs.menu)),document.addEventListener("mouseup",this.onWindowPress),document.addEventListener("touchend",this.onWindowPress),document.addEventListener("keydown",this.onKeyDown)}},{key:"_closeMenu",value:function(){document.removeEventListener("mouseup",this.onWindowPress),document.removeEventListener("touchend",this.onWindowPress),document.removeEventListener("keydown",this.onKeyDown)}},{key:"onWindowPress",decorators:[b.autobind],
value:function(e){var t=this.props.target,n=v.default.findDOMNode(this.refs.menu),a=n&&n.contains(e.target),i=!a&&v.default.findDOMNode(t),r=i&&i.contains(e.target);a||r||this.props.onMenuClose()}},{key:"onKeyDown",decorators:[b.autobind],value:function(e){var t=e.keyCode;t===P.TAB?O.scopeTabEvent(e):t===P.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.props.onMenuClose(),O.restorePreviousFocus())}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=e.target,i=e.options,r=e.isOpen,s=e.scrollerProps,c=e.onMenuClose,f=u(e,["className","children","target","options","isOpen","scrollerProps","onMenuClose"]);
return{$$typeof:l,type:A.default,key:null,ref:null,props:o(A.default.defaultProps,{children:h.default.createElement(j.default,{ref:"menu",isOpen:r,transitionName:q,transitionAppearTimeout:H,transitionEnterTimeout:H,transitionLeaveTimeout:H},r&&h.default.createElement(z.default,d({className:(0,y.default)(t,V.default.menu)},f),h.default.createElement(F.default,s,(0,x.mapValidComponents)(n,function(e){var t=(0,T.default)(c,e.props.onPress);return h.default.cloneElement(e,{onPress:t})})))),className:V.default.menuPortal,
target:a,options:i,isOpen:r,closeTimeout:H}),_owner:null}}}]),t}(p.Component);W.propTypes={className:p.PropTypes.string,children:p.PropTypes.node.isRequired,target:p.PropTypes.object,options:p.PropTypes.object,isOpen:p.PropTypes.bool.isRequired,scrollerProps:p.PropTypes.object,onMenuClose:p.PropTypes.func.isRequired},W.defaultProps={scrollerProps:{scrollDirection:D.scrollDirections.NONE}},t.default=W,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(16).default,l=n(12).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(567),p=u(f),h=n(43),m=u(h),v=n(1652),g=u(v),y=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.tooltip,a=e.hideOnPress,i=e.onPress,r=o(e,["children","tooltip","hideOnPress","onPress"]);return c.default.createElement(p.default,l({className:g.default.toolbarButton,component:m.default,
tooltip:n,tooltipClassName:g.default.toolbarTooltip,hideOnPress:a,onPress:i},r),t)}}]),t}(d.Component);y.propTypes={children:d.PropTypes.node,tooltip:d.PropTypes.string,hideOnPress:d.PropTypes.bool,onPress:d.PropTypes.func},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=s(e,["children"]);return{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{children:u.default.createElement(p.default,n,t)}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(361),c=o(d),f=n(359),p=o(f);a.propTypes={children:l.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.message,n=e.children;return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"p",key:null,ref:null,props:{children:t,className:l.default.sidebarMessage},_owner:null},n]},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(7),o=(r(s),n(1703)),l=r(o);a.propTypes={message:s.PropTypes.string.isRequired,children:s.PropTypes.node},t.default=a,e.exports=t.default},function(e,t){"use strict";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",posterFlipSpeed:"0.8s",selectCircleSpeed:"0.15s"}},function(e,t){e.exports={}},,,,,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){
function r(e,t){var a,i,r="";return r+=' <h2 class="text-muted">',(i=n.subtitle)?a=i.call(e,{hash:{},data:t}):(i=e&&e.subtitle,a=typeof i===d?i.call(e,{hash:{},data:t}):i),(a||0===a)&&(r+=a),r+="</h2> "}function s(e,t){var a,i,r="";return r+=" <p>",(i=n.message)?a=i.call(e,{hash:{},data:t}):(i=e&&e.message,a=typeof i===d?i.call(e,{hash:{},data:t}):i),(a||0===a)&&(r+=a),r+="</p> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var o,l,u="",d="function",c=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:i}):(l=t&&t.title,o=typeof l===d?l.call(t,{hash:{},data:i}):l),(o||0===o)&&(u+=o),u+="</h1> ",o=n.if.call(t,t&&t.subtitle,{hash:{},inverse:c.noop,fn:c.program(1,r,i),data:i}),(o||0===o)&&(u+=o),u+=" ",o=n.if.call(t,t&&t.message,{hash:{},inverse:c.noop,fn:c.program(3,s,i),data:i}),(o||0===o)&&(u+=o),u+=" </div> </div>"})},function(e,t,n){"use strict";function a(e){if(m){var t=e.node,n=e.children;if(n.length)for(var a=0;a<n.length;a++)v(t,n[a],null);else null!=e.html?t.innerHTML=e.html:null!=e.text&&f(t,e.text);
}}function i(e,t){e.parentNode.replaceChild(t.node,e),a(t)}function r(e,t){m?e.children.push(t):e.node.appendChild(t.node)}function s(e,t){m?e.html=t:e.node.innerHTML=t}function o(e,t){m?e.text=t:f(e.node,t)}function l(){return this.node.nodeName}function u(e){return{node:e,children:[],html:null,text:null,toString:l}}var d=n(635),c=n(399),f=n(665),p=1,h=11,m="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),v=c(function(e,t,n){
t.node.nodeType===h||t.node.nodeType===p&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===d.html)?(a(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),a(t))});u.insertTreeBefore=v,u.replaceChildWithTree=i,u.queueChild=r,u.queueHTML=s,u.queueText=o,e.exports=u},function(e,t,n){"use strict";function a(){i.attachRefs(this,this._currentElement)}var i=n(2082),r=(n(83),n(33)),s={mountComponent:function(e,t,n,i,r){var s=e.mountComponent(t,n,i,r);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(a,e),
s},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){i.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,r){var s=e._currentElement;if(t!==s||r!==e._context){var o=i.shouldUpdateRefs(s,t);o&&i.detachRefs(e,s),e.receiveComponent(t,n,r),o&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(a,e)}},performUpdateIfNecessary:function(e,t,n){return e._updateBatchNumber!==n?void(null!=e._updateBatchNumber&&e._updateBatchNumber!==n+1?r(!1):void 0):void e.performUpdateIfNecessary(t);
}};e.exports=s},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(11),l=i(o),u=n(74),d=a(u),c=n(6),f=a(c),p=n(9),h=a(p),m=n(26),v=a(m),g=d.default.extend({initialize:function(){this.controllers=[]},register:function(e){this.controllers.push(e)},getInstance:function(e,t){t||(t={});var n,a=l.resolve("appModel"),i=a.get("primaryPlayer");n=i&&!t.forceLocal?i.get("protocol")||"legacy":"local";var r=s.default.find(this.controllers,function(t){
var a=n===t.protocol,i=e===t.type||"*"===t.type;return a&&i});if(r)return r.create(e,t);if(t.forceLocal)throw new Error("No player controller found for: "+e);return v.default.warn("A player did not match the protocol ("+n+") and type ("+e+")."),h.default.trigger("show:alert",{type:"error",message:(0,f.default)("Playback of this media is not supported with the selected player.")}),this.getInstance(e,{forceLocal:!0})}});t.default=new g,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){
return e?o.default.reduce(t,function(t,n,a){return e.indexOf(a)===-1&&(t[a]=n),t},{}):t}function i(e,t){var n;try{n=e._getStorageKey()}catch(a){n="no storageKey"}p.default.error("StorageModel ("+n+") "+t)}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(41),u=r(l),d=n(306),c=r(d),f=n(26),p=r(f),h=n(84),m=r(h),v=n(38),g=r(v),y=u.default.Model.extend({sessionAttrs:[],save:function(e,t,n){var i,r=this.attributes;if(null==e||"object"==typeof e?(i=e,n=t):(i={})[e]=t,
n=o.default.extend({validate:!0},n),i&&!n.wait){if(!this.set(i,n))return!1}else if(!this._validate(i,n))return!1;i&&n.wait&&(this.attributes=o.default.extend({},r,i)),void 0===n.parse&&(n.parse=!0);var s=this,l=n.success;n.success=function(){s.attributes=r,l&&l(s,r,n),s.trigger("sync",s,r,n)},u.default.wrapError(this,n);var d=this._getStorage(),f=this._getStorageKey(),p=this.attributes;if(!d.getInstance().persistDefaults){var h=o.default.result(this,"defaults");p=(0,c.default)(h,p)}var m=o.default.result(this,"sessionAttrs");
p=a(m,p);var v=this.serialize(p),g=d.set(f,v);return g.done(n.success).fail(n.error),i&&n.wait&&(this.attributes=r),g},populate:function(){return this.populatePromise||(this.populatePromise=this.fetch.apply(this,arguments)),this.populatePromise},fetch:function(e){e=e?o.default.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,n=e.success;e.success=function(a){return!!t.set(t.parse(a,e),e)&&(n&&n(t,a,e),void t.trigger("sync",t,a,e))},u.default.wrapError(this,e);var a=this._getStorage().get(this._getStorageKey());
return a.done(e.success).fail(e.error),this.populatePromise=a,a},destroy:function b(e){e=e?o.default.clone(e):{};var t=this,n=e.success,b=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(a){e.wait&&b(),n&&n(t,a,e),t.trigger("sync",t,a,e)},u.default.wrapError(this,e);var a=this._getStorage().remove(this._getStorageKey());return a.done(e.success).fail(e.error),e.wait||b(),a},serialize:function(e){var t="";try{t=JSON.stringify(e)}catch(n){i(this,"serialization error: "+n.message);
}return t},parse:function(e){var t;if(null==e)return t;if(o.default.isObject(e))return e;try{t=JSON.parse(e);var n=o.default.result(this,"sessionAttrs");t=a(n,t)}catch(r){var s=o.default.isString(e)?e.substring(0,50):"no response";i(this,"parse error: "+r.message+" ("+s+")")}return t},sync:function(){throw new Error("storage model doesn`t allow syncing to server")},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void(0,g.default)(!1,"This model is already capturing events");
var e=this.set,t={};this.set=function(n,a,i){var r;"object"==typeof n?(r=n,i=a):(r={})[n]=a;var s=o.default.extend({},i,{silent:!0}),l=e.call(this,r,s);return o.default.extend(t,this.changed),l},this.releaseCapturedChangeEvents=function(){o.default.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),o.default.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}},_getStorageKey:function(){var e=o.default.result(this,"storageKey");if(!e)throw new Error("storageKey is required");
return e},_getStorage:function(){return m.default}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(9),d=a(u),c=n(130),f=a(c),p=n(39),h=a(p),m=n(23),v=i(m),g=n(53),y=a(g),b=n(288),w=a(b),P={audio:["Track"],photo:["Photo","Video"],video:["Video"]},_=y.default.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 w.default([],{server:t.server}))},_fetch:function(){var e=s.default.result(this,"url");return this._ajax("GET",e)},convert:function(e){var t=s.default.isObject(e)?e:h.default.parseXML(e);return h.default.parseInteger(t,["playQueueVersion","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID"]),
h.default.parseArray(t,"Metadata"),h.default.parseBoolean(t,"playQueueShuffled"),t.stationService?(h.default.parseBoolean(t,"allowRepeat"),h.default.parseBoolean(t,"allowSeek"),h.default.parseBoolean(t,"allowShuffle"),h.default.parseBoolean(t,"allowSkipPrevious"),h.default.parseInteger(t,"stationSkipsPerHour"),h.default.parseInteger(t,"serviceSkipsPerDay"),t.isRadio=!0):t.isRadio=!1,t},parse:function(e){var t=P[this.get("mediaType")].concat("Directory");e=h.default.replaceXMLElementNames(e,t,"Metadata");
var n=this.convert(e),a=["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","message","isRadio","stationTitle","stationThumb","stationService","allowRepeat","allowSeek","allowShuffle","allowSkipPrevious","stationSkipsPerHour","serviceSkipsPerDay"];n.playQueueVersion>this.get("playQueueVersion")&&a.push("playQueueID","playQueueVersion");var i=s.default.pick(n,a);return i.shuffled=!!n.playQueueShuffled,i.hasUpNext=!!n.playQueueLastAddedItemID,this.set(i),this.parseElementCollection(n);
},parseElementCollection:function(e){var t=e.Metadata,n=(0,s.default)(t).pluck("playQueueItemID").indexOf(e.playQueueSelectedItemID.toString()),a=parseInt(e.playQueueSelectedItemOffset,10),i=a-n,r=this.get("collection");return e.identifier&&r.setContext("identifier",e.identifier),e.mediaTagPrefix&&r.setContext("mediaTagPrefix",e.mediaTagPrefix),e.mediaTagVersion&&r.setContext("mediaTagVersion",e.mediaTagVersion),s.default.each(t,function(e,t){e.queueIndex=i+t}),t.message=e.message,t.totalSize=parseInt(e.playQueueTotalCount,10),
t.availableRange={start:i,end:i+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=v.join(t,n);var a=s.default.extend(this.get("server").getXHROptions(t),{type:e}),i=this._$ajax(a),r=s.default.bind(function(e){var t=this.parse(e);t.message&&d.default.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 i.done(r,this)},_$ajax:function(e){return l.default.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 a=s.default.pick(t,"unwatched","items","excludeSeedItem");n.uri=f.default.uri(e,a)}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",v.join("/playQueues",n)):(n.next=t.next?1:0,this.set("hasUserAdditions",!0),this._addContentPromise=this._ajax("PUT",v.join(s.default.result(this,"url"),n))),this._addContentPromise},addContent:function(e,t){return this.queueContent(e,t).then(s.default.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 l.default.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var t=v.join([s.default.result(this,"url"),"/items/",e.get("playQueueItemID")]);return this._ajax("DELETE",t)},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return l.default.Deferred().resolve().promise();
var n=t||this.get("selectedItem").get("playQueueItemID");this.set("hasUserAdditions",!0);var a={after:n},i=v.join([s.default.result(this,"url"),"/items/",e,"/move"],a);return this._ajax("PUT",i)},isItemQueueable:function(e){var t=(0,s.default)(e).result("url"),n=e.get("playlistType")||/\/(?:library|hubs|services\/gracenote)\//.test(t);if(!n)return!1;var a=/\/sync\//.test(t);if(a)return!1;var i=/\/folder/.test(t);if(i)return!1;var r=/\/theme\//.test(t);if(r)return!1;var o=e.get("currentSubset")&&e.get("currentSubset").id;
if("folder"===o||"recentlyViewedShows"===o)return!1;var l=e.get("type")&&("photoAlbum"===e.get("type")||"photo"===e.get("type")),u="photo"===e.viewGroup||l,d=e.server.supports("photoPlayQueues");return d||!u},toggleShuffle:function(){var e=[s.default.result(this,"url")];return this.get("shuffled")?e.push("/unshuffle"):e.push("/shuffle"),this._ajax("PUT",v.join(e))},setRepeatAll:function(e){return this.set("repeatAll",e),this.fetch()},yieldOwnership:function(){this.set("owned",!1);var e=this._addContentPromise||l.default.Deferred().resolve().promise();
return e.then(s.default.bind(function(){return this.get("playQueueID")&&this.get("collection").length>0?s.default.result(this,"url")+"?own=1&window=200":null},this))},takeOwnership:function(){if(this.get("owned"))return l.default.Deferred().resolve().promise();this.set("owned",!0);var e=s.default.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.default=_,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(46),r=a(i),s=n(60),o=a(s),l=n(25),u=a(l),d=n(56),c=a(d),f=u.default.extend({name:"MetadataCollection",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey"],model:c.default,url:function(){return this.containerKey},augmentResponseText:function(e,t){return t===o.default.xml?r.default.replaceMetadataXMLElementNames(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.default=f,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={AUTO:"auto",AVOID:"avoid",ALWAYS:"always",NEVER:"never"};n.settings=[{value:n.AUTO,title:"Automatic"},{value:n.AVOID,title:"Only image formats"},{value:n.ALWAYS,title:"Always"}],t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0
});var n={CREATED:0,PROGRESS:1,MATCHING:2,DOWNLOADING_METADATA:3,LOADING_METADATA:4,PROCESSED:5,ANALYZING:6,DELETED:9};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=o.default.find(v,function(t){var n=i(t,1),a=n[0];return e<=a}),n=i(t,2),a=n[1];return a(e)}var i=n(123).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(468),u=r(l),d=n(146),c=r(d),f=n(467),p=r(f),h=n(466),m=r(h),v=[[54e5,u.default],[864e5,c.default],[6048e5,p.default],[1/0,m.default]];
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(null==e)return"";var t=(0,l.default)(1e3*e);return t?(0,s.default)("{1} left",t):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(178),l=i(o);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(){return window.overridePixelRatio||window.devicePixelRatio||1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";
function a(e){var t=e.episodePrefix||"E{1}",n=e.episodeIndex;return n>0||0===n?(e.noLeadingZero||(n=(0,d.default)(n)),(0,l.default)(t,n)):e.date?(0,s.default)(e.date).format("M/D/YY"):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r),o=n(6),l=i(o),u=n(317),d=i(u);t.default=a,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={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.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return null==n&&(n=e+"s"),1===t?e:n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=t.constructor.prototype.validate;return n?n(e):[]}function i(e){var t=this.panes[e],n=o.call(this,t);
return 0===a.call(this,n,t).length}function r(e,t){return e.concat(this.panes[t].dependentPanes||[])}function s(){var e=this.$(".change-pane-btn");e.addClass("disabled").removeClass("selected"),d.default.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(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),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],a=n.constructor,i=this.paneConstructorArg?this.paneConstructorArg():{},r=new a(d.default.extend(i,{model:o.call(this,n)}));if(r.onModalClose){this._paneOnModalCloseCallbacks||this.listenToOnce(this,"close",function(){
d.default.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=d.default.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=d.default.reduce(this.panes,function(e,t){
return d.default.union(e,t.dependentPanes||[])},[]),a=d.default.filter(d.default.keys(this.panes),function(e){return!d.default.contains(n,e)}),s=a;s.length;)e=d.default.filter(s,i,this),t=t||e.length!==s.length,s=d.default.reduce(e,r,[],this),a=a.concat(s);return a.isAnyInvalid=t,a},onChangePaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"))}};t.default=c,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(67),r=a(i),s=n(1055),o=a(s),l=r.default.extend({model:o.default,url:"/status/sessions/background",parse:function(e){return this.convert(e,"TranscodeJob")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(111),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=n(1064),c=a(d),f=n(1063),p=a(f),h=n(1059),m=a(h),v=n(1061),g=a(v),y=u.default.extend({name:"VersionGeneratorModel",context:["server","section","playlistID"],
rootPropertyName:"Item",cache:new r.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.id)},urlRoot:function(){var e=this.playlistID||this.parent.id;return"/playlists/"+e+"/items"},syncedAttrs:{id:o.default.integer,clientIdentifier:o.default.string,contentType:o.default.string,composite:o.default.string,type:{type:o.default.integer,save:!0},title:{type:o.default.string,save:!0},target:{type:o.default.string,save:!0},targetTagID:{type:o.default.integer,save:!0},locationID:{
type:o.default.integer,save:!0},Location:{type:o.default.object,save:!0},Device:{type:o.default.object,save:!0}},sessionRelations:{children:{relationClass:g.default,options:function(){return{generator:this}}}},syncedRelations:{status:{relationClass:c.default,rootPropertyName:"Status"},policy:{relationClass:p.default,rootPropertyName:"Policy",save:!0},mediaSettings:{relationClass:m.default,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:{video:5,audio:50,photo:50},warningCounts:{video:10,audio:100,photo:100},getSaveParams:function(e,t){var n=u.default.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.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(68),o=i(s),l=n(55),u=r(l),d=(0,o.default)(u.POPULATE_METADATA_LIST_RANGE);t.populateMetadataListRange=d;var c=(0,o.default)(u.REPOPULATE_METADATA_LIST_RANGE);t.repopulateMetadataListRange=c;
var f=(0,o.default)(u.PLAY_METADATA_LIST);t.playMetadataList=f;var p=(0,o.default)(u.ADD_METADATA_LIST_TO_PLAYLIST);t.addMetadataListToPlaylist=p;var h=(0,o.default)(u.SYNC_METADATA_LIST);t.syncMetadataList=h;var m=(0,o.default)(u.OPTIMIZE_METADATA_LIST);t.optimizeMetadataList=m;var v=(0,o.default)(u.SELECT_METADATA_LIST_ITEM);t.selectMetadataListItem=v;var g=(0,o.default)(u.DESELECT_METADATA_LIST_ITEM);t.deselectMetadataListItem=g;var y=(0,o.default)(u.DESELECT_ALL_METADATA_LIST_ITEMS);t.deselectAllMetadataListItems=y;
var b=(0,o.default)(u.PLAY_METADATA_LIST,function(e){return a({},e,{shuffle:!0})});t.shuffleMetadataList=b},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(68),o=i(s),l=n(55),u=r(l),d=(0,o.default)(u.TEST_SERVER);t.testServer=d;var c=(0,o.default)(u.SET_RELAY_REMINDER);t.setRelayReminder=c;var f=(0,o.default)(u.FETCH_LIBRARIES);t.fetchLibraries=f;var p=(0,o.default)(u.POPULATE_LIBRARIES);t.populateLibraries=p;var h=(0,
o.default)(u.ADD_LIBRARY);t.addLibrary=h;var m=(0,o.default)(u.START_LIBRARY_REFRESH);t.startLibraryRefresh=m;var v=(0,o.default)(u.SHARE_LIBRARIES);t.shareLibraries=v;var g=(0,o.default)(u.ENABLE_HTTP_FALLBACK);t.enableHttpFallback=g;var y=(0,o.default)(u.OPTIMIZE_DATABASE);t.optimizeDatabase=y;var b=(0,o.default)(u.CLEAN_BUNDLES);t.cleanBundles=b;var w=(0,o.default)(u.EMPTY_TRASH);t.emptyTrash=w;var P=(0,o.default)(u.DELETE_SERVER);t.deleteServer=P;var _=(0,o.default)(u.START_ACTIVITY);t.startActivity=_;
var S=(0,o.default)(u.UPDATE_ACTIVITY);t.updateActivity=S;var x=(0,o.default)(u.FINISH_ACTIVITY);t.finishActivity=x;var C=(0,o.default)(u.EVENT_CONNECTION_OPEN);t.eventConnectionOpen=C;var T=(0,o.default)(u.START_LIBRARY_REFRESH,function(e){return a({},e,{force:!0})});t.startLibraryForceRefresh=T;var k=(0,o.default)(u.START_LIBRARY_REFRESH,function(e){return a({},e,{cancel:!0})});t.cancelLibraryRefresh=k},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.REPOPULATE_PAGE);t.repopulatePage=u;var d=(0,s.default)(l.VIEW_ITEM_DETAILS);t.viewItemDetails=d},function(e,t){"use strict";function n(e){return e.multiSelect}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=a(i),s=n(66),o=a(s),l=n(38),u=a(l),d=n(1747),c=a(d),f=n(1618),p=a(f),h=r.default.Layout.extend({
className:"react-page-container",template:c.default,ui:{sidebar:".sidebar-container",page:".page-container"},initialize:function(){this.$el.addClass(p.default.wrapper)},serializeData:function(){return{styles:p.default}},mountReact:function(){(0,u.default)(!1,"`mountReact` must be implemented by a subclass of `ReactPageView`")},unmountReact:function(){this.isRendered&&(o.default.unmountComponentAtNode(this.ui.sidebar[0]),o.default.unmountComponentAtNode(this.ui.page[0]))},onBeforeRender:function(){
this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1776),r=a(i),s=n(10),o=a(s),l=n(9),u=a(l),d=o.default.ItemView.extend({className:"alert-bar",template:r.default,events:{"click .close-btn":"onCloseClick"},initialize:function(e){this.alert=e.alert,this.alert&&this.$el.addClass(this.alert.type)},hide:function(){
u.default.trigger("hide:bar","alertbar")},serializeData:function(){return this.alert},onCloseClick:function(e){e.preventDefault(),this.hide()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1805),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(23),y=i(g),b=n(40),w=a(b),P=n(17),_=a(P),S=n(56),x=a(S),C=n(95),T=a(C),k=n(343),I=a(k),M=n(342),A=a(M),E=n(121),O=a(E),D=n(199),R=a(D),L=n(197),N=a(L),j=n(198),U=a(j),F=n(136),B=a(F),z=f.default.ItemView.extend({
tagName:"ul",className:"dropdown-menu",template:s.default,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.mediaType=w.default.get(this.model.get("type")),this.mediaActions=new T.default({},{item:this.model}),(0,d.default)(".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=y.getLastSegment(n))}return{downloadUrl:e,downloadName:t}},getPosition:function(e,t,n){var a=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&&(a-=this.$el.width()-e.outerWidth()),{top:n,left:a}},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 n=this.model.get("related"),a=n.findWhere({browse:!1}),i=a.get("title");i&&t.text((0,
h.default)("Play {1}",i))}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(),v.default.trigger("show:modal",new I.default({model:this.model}))},onPlayAllClick:function(e){e.preventDefault(),_.default.execute("playMedia",{item:this.model})},onPlayShuffledClick:function(e){e.preventDefault(),_.default.execute("playMedia",{item:this.model,
shuffle:!0})},onPlayPrimaryExtraClick:function(e){e.preventDefault();var t=this.model.server.getSectionForItem(this.model);if(!l.default.isEmpty(t)){var n=new x.default({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});_.default.execute("playMedia",{item:n})}},onPlayNextClick:function(e){return e.preventDefault(),(0,d.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void _.default.execute("queueMedia",{
item:this.model,next:!0})},onAddToQueueClick:function(e){return e.preventDefault(),(0,d.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void _.default.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"),_.default.execute("playMedia",{item:n})},onAddToPlaylistClick:function(e){return e.preventDefault(),(0,d.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void v.default.trigger("show:modal",new O.default({
model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onRefreshClick:function(e){e.preventDefault(),_.default.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onMarkWatchedClick:function(e){e.preventDefault(),_.default.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),_.default.execute("markUnwatched",{item:this.model})},onSyncClick:function(e){e.preventDefault(),_.default.execute("showSyncModal",{
item:this.model})},onConvertClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new B.default({item:this.model}))},onWatchLaterClick:function(e){e.preventDefault(),_.default.execute("watchLater",{item:this.model})},onShareClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new R.default({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new U.default({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),
this.model.get("playlistType")?_.default.execute("deletePlaylist",{item:this.model}):_.default.execute("deleteItems",{item:this.model,skipRedirect:!0})},onInfoClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new N.default({model:this.model}))},onDownloadClick:function(e){e.preventDefault(),this.model.get("Media").length>1?v.default.trigger("show:modal",new A.default({model:this.model})):window.location.href=this.model.getDownloadUrl()}});t.default=z,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1814),s=a(r),o=n(5),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=d.default.ItemView.extend({id:"primary-server-dropdown",tagName:"span",className:"dropdown",template:s.default,events:{"click .dropdown-menu a":"onServerClick"},initialize:function(e){e||(e={});var t=f.resolve("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"),a=t.get("sections");if(n&&!(this.showSharedServers&&a&&a.findWhere({allowSync:!0})))return e;var i=t.toJSON();return i.authorized&&!(i.cloud||i.synced||i.isOutOfDate)&&e.push(i),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=f.resolve("appModel"),n=(0,l.default)(e.currentTarget).data("id"),a=this.collection.get(n);a&&t.set("primaryServer",a)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(10),d=a(u),c=n(23),f=i(c),p=n(93),h=a(p),m=n(242),v=a(m),g=n(1087),y=a(g),b=n(524),w=a(b),P=n(1084),_=a(P),S=n(107),x=a(S),C=d.default.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"),s.default.each(e,function(e){t.filter("."+e+"-group").addClass("has-error")}),this.trigger(e.length?"invalid":"valid")},createMenuOptions:function(e,t){return s.default.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=h.default.get(e);return"movie"===e&&"com.plexapp.agents.none"===this.model.get("agent")&&(t=h.default.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 v.default([],{server:this.model.server,mediaTypeID:e.typeID})),this.model.agents.populate().then(function(e){
return e})):l.default.Deferred().reject().promise()},populateScanners:function(){var e=this.getSectionType();return e?(this.model.scanners||(this.model.scanners=new y.default([],{server:this.model.server,sectionTypeID:e.typeID})),this.model.scanners.populate().then(function(e){return e})):l.default.Deferred().reject().promise()},populateAgentsProxy:function(){var e=this.getSectionType().exclusiveAgents,t=new w.default(this.model.agents,e,this.model.get("agent"));return this.model.agentsProxy=t,l.default.Deferred().resolve(t).promise();
},populateScannersProxy:function(){var e=this.getSectionType().exclusiveScanners,t=new _.default(this.model.scanners,e,this.model.get("scanner"));return this.model.scannersProxy=t,l.default.Deferred().resolve(t).promise()},populateSectionSettings:function(){if(!this.model.server.supports("sectionSettings"))return l.default.Deferred().resolve().promise();if(!this.model.settings){var e=new x.default([],{server:this.model.server});if(this.model.isNew()){var t={type:this.getSectionType().typeID,agent:this.model.get("agent")
};e.url=f.join(["/library/sections/prefs"],t)}else e.url=f.join(["/library/sections/",this.model.id,"/prefs"]);this.model.settings=e}var n=this.model.settings.populate();return n},populateSectionAgentSettings:function(){if(!this.model.agentSettings){var e=new x.default([],{server:this.model.server,url:f.join(["/:/plugins/",this.model.get("agent"),"/prefs"])});this.model.agentSettings=e}var t=this.model.agentSettings.populate();return t},onModalClose:function(){this.model.scanners=null,this.model.scannersProxy=null,
this.model.agents=null,this.model.agentsProxy=null,this.model.settings=null}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1867),r=a(i),s=n(3),o=a(s),l=n(97),u=a(l),d=n(51),c=a(d),f=u.default.extend({className:"poster-item media-tile-list-item",template:r.default,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){u.default.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.model.section&&"photo"===this.model.section.get("type")?"photo":this.type,t=150;"episode"===e?e="show":"clip"!==e&&"userPlaylistItem"!==e||(t=250),this.image=new c.default({model:this.model,type:e,getUrl:this.getPosterUrl,width:t})},updateDim:function(){var e=this.model.get("mediaState"),t=this.model.get("metadataState"),n=t&&"created"!==t||e,a=!!this.model.get("deletedAt");
n||a?this.$el.addClass("dim"):this.$el.removeClass("dim")},bindings:o.default.extend({},u.default.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=u.default.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=u.default.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.default=f,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=d.default.reject(e,function(e){return 0===e.id}),n=d.default.sortBy(t,"streamType");return d.default.map(n,function(e){return D(e,"streamType")})}function i(e){return d.default.map(e.get("Media"),function(e){return d.default.extend(D(e,"Part"),{Part:d.default.map(e.Part,function(e){return d.default.extend(D(e,"Stream"),{file:e.file,exists:e.exists,accessible:e.accessible,Stream:a(e.Stream)
})})})})}var r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(1911),l=r(o),u=n(3),d=r(u),c=n(5),f=r(c),p=n(11),h=s(p),m=n(849),v=s(m),g=n(881),y=s(g),b=n(909),w=s(b),P=n(23),_=s(P),S=n(47),x=r(S),C=n(17),T=r(C),k=n(95),I=r(k),M=["id","key","index","videoCodec","audioCodec","audioChannels","default","selected","languageCode","codecID","accessible","exists","provider","lines","minLines","follow","requiredBandwidths","deepAnalysisVersion","deepAnalysisDate"],A={
size:y.formatBytes,duration:v.formatPlayerTime,codec:w.toUpperCase,format:w.toUpperCase,container:w.toUpperCase,videoResolution:y.formatResolution,channels:y.formatAudioChannels,level:y.formatVideoLevel,bitrateMode:w.toUpperCase,accessible:w.formatBoolean,exists:w.formatBoolean,optimizedForStreaming:w.formatBoolean,timed:w.formatBoolean,file:_.getLastSegment},E={optimizedForStreaming:"Web Optimized",has64bitOffsets:"Has 64bit Offsets",cabac:"CABAC",postURL:"URL"},O={frameRate:" fps",dialogNorm:" dB",
bitrate:" kbps",samplingRate:" Hz"},D=function(e,t){var n={properties:[]};for(var a in e)if(a!==t&&d.default.indexOf(M,a)===-1){var i=E[a],r=e[a];A[a]&&(r=A[a](r)),r&&(O[a]&&(r+=O[a]),i||(i=w.formatPropertyLabel(a)),n.properties.push({name:i,value:r}))}return t&&e&&(n[t]=e[t]),n},R=x.default.extend({name:"mediaInfoModal",className:"media-info-modal modal modal-lg fade",template:l.default,ui:{scroller:".modal-body-scroll",files:".files > ul",stickyProps:".media > .props, .part > .props"},events:d.default.extend({
"click .delete-btn":"onDeleteClick"},x.default.prototype.events),modelEvents:{"change:Media":"onMediaChange"},initialize:function(e){x.default.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("onMediaChange","onScroll"),this.loading=!1,this.media=i(this.model),this.mediaActions=new I.default({},{item:this.model}),this.hasStreams()||(this.loading=!0,this.model.fetch().always(this.whenRendered(function(){this.model.changed.hasOwnProperty("Media")||this.updateMedia()})))},serializeData:function(){
var e=this.model.get("key"),t=h.resolve("appModel"),n=t.get("user"),a=this.model.server;return this.model.get("isLibraryItem")&&(e=_.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:a.supports("specificMediaDeletion"),showFilepath:!a.get("shared")||n.isNinja(),loading:this.loading}},updateMedia:function(){this.loading=!1,this.rerender=!0,this.ui.scroller.off("scroll",this.onScroll),
this.media=i(this.model),this.render()},hasFiles:function(){return!!d.default.chain(this.media).pluck("Part").flatten().pluck("file").compact().size().value()},hasStreams:function(){return!!d.default.chain(this.media).pluck("Part").flatten().pluck("Stream").flatten().size().value()},bindingsModel:"mediaActions",bindings:{".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0}},onRender:function(){x.default.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(),T.default.execute("deleteMediaItem",{item:this.model,index:(0,f.default)(e.currentTarget).data("media-item")})},onScroll:function(){var e=this.ui.scroller.scrollTop(),t=this.ui.scroller.offset().top;return this.ui.files.length&&(t+=parseInt(this.ui.files.css("margin-bottom"),10)),
t<0?void setTimeout(this.onScroll,500):void this.ui.stickyProps.each(function(){var n=(0,f.default)(this),a=n.parent().height()-n.height(),i=e-this.parentNode.offsetTop,r=Math.min(Math.max(i,0),a);r&&r===i?(n.addClass("sticky"),n.css("top",t)):(n.removeClass("sticky"),n.css("top",r))})}});t.default=R,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1914),s=a(r),o=n(5),l=a(o),u=n(3),d=a(u),c=n(11),f=i(c),p=n(17),h=a(p),m=n(47),v=a(m),g=n(98),y=a(g),b=n(1300),w=a(b),P=y.default.extend({
name:"recommendModal",className:"recommend-modal select-modal modal modal-sm fade",template:s.default,playlistIDs:null,ui:{sendBtn:".send-btn",messageContainer:".message-container",message:".message"},regions:{list:".friends-container"},events:d.default.extend({"click .friend":"onFriendClick","click .friends-btn":"onFriendsClick","click .send-btn":"onSendClick"},v.default.prototype.events),initialize:function(){y.default.prototype.initialize.apply(this,arguments);var e=f.resolve("appModel"),t=e.get("user");
this.collection=t.get("friends").filterByUnrestricted(),this.playlistIDs=[]},serializeData:function(){return{hasFriends:!!this.collection.length}},onRender:function(){y.default.prototype.onRender.apply(this,arguments),this.list.show(new w.default({collection:this.collection}))},onClose:function(){this.collection.destroy()},onFriendClick:function(e){e.preventDefault();var t=(0,l.default)(e.currentTarget),n=t.data("id");t.hasClass("selected")?this.playlistIDs.splice(d.default.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()},a=h.default.execute("recommend",n);a.done(d.default.bind(this.onSendSuccess,this)),
a.fail(d.default.bind(this.onSendError,this))}},onSendSuccess:function(){this.hide()},onSendError:function(){this.ui.sendBtn.removeClass("active")}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1921),s=a(r),o=n(5),l=a(o),u=n(3),d=a(u),c=n(11),f=i(c),p=n(17),h=a(p),m=n(47),v=a(m),g=n(98),y=a(g),b=y.default.extend({name:"shareModal",className:"share-modal select-modal modal modal-sm fade",template:s.default,
linkedNetworks:null,networkIDs:null,maxLength:null,ui:{shareBtn:".share-btn",messageContainer:".message-container",charactersRemaining:".characters-remaining",message:".message"},events:d.default.extend({"click .network":"onNetworkClick","keyup .message":"onMessageKeyUp","click .share-btn":"onShareClick"},v.default.prototype.events),initialize:function(){y.default.prototype.initialize.apply(this,arguments);var e=f.resolve("appModel");this.user=e.get("user"),this.socialNetworks=this.user.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;d.default.each(this.networkIDs,function(n){var a=t.get(n),i=a.get("maxLength")||null;(null===e||e>i)&&(e=i);
}),this.maxLength=e,this.calculateCharactersRemaining()},calculateCharactersRemaining:function(){var e=this.ui.message.val(),t=this.maxLength-e.length;return null===this.maxLength?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")),void this.ui.charactersRemaining.text(this.maxLength-e.length));
},onRender:function(){y.default.prototype.onRender.apply(this,arguments),this.autoSelect&&(this.networkIDs.push(this.linkedNetworks[0].id),this.calculateMaxLength())},onNetworkClick:function(e){e.preventDefault();var t=(0,l.default)(e.currentTarget),n=t.data("id");t.hasClass("selected")?this.networkIDs.splice(d.default.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()},a=h.default.execute("share",n);a.done(d.default.bind(this.onShareSuccess,this)),a.fail(d.default.bind(this.onShareError,this))}},onShareSuccess:function(){this.hide()},onShareError:function(){
this.ui.shareBtn.removeClass("active")}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1951),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(11),f=i(c),p=n(57),h=a(p),m=n(47),v=a(m),g=n(1342),y=a(g),b=n(1340),w=a(b),P=n(1339),_=a(P),S=v.default.extend({name:"userSelectModal",className:"user-select-modal modal modal-transparent fade",template:s.default,transparent:!0,panes:{users:y.default,pin:w.default
},regions:{content:".modal-content",alertBar:".modal-alert"},initialize:function(e){v.default.prototype.initialize.apply(this,arguments);var t=f.resolve("appModel");this.options=e,this.isForced=e.isForced,this.user=t.get("user"),this.promise=d.default.Deferred()},showPane:function(e,t){this.currentPane&&this.stopListening(this.currentPane);var n=this.panes[e],a=new n(l.default.extend({},this.options,t));return this.listenTo(a,{"change:pane":this.onChangePane,resolve:this.onResolve,reject:this.onReject
}),this.currentPane=a,this.content.show(a),a},showAlertBar:function(){var e=h.default.get("alerts");h.default.set("alerts",null);var t=new _.default({alert:l.default.first(e)});this.alertBar.show(t)},onRender:function(){v.default.prototype.onRender.apply(this,arguments),this.model?this.showPane("pin",{focusDelay:this.focusDelay}):this.showPane("users"),this.showAlertBar()},onHide:function(e){v.default.prototype.onHide.apply(this,arguments),"pending"===this.promise.state()&&this.promise.reject()},
onChangePane:function(e,t){this.showPane(e,t)},onResolve:function(e){return h.default.has("continueUrl")&&!this.options.isEditing?void(window.location=h.default.get("continueUrl")):(this.promise.resolve(e),void this.hide())},onReject:function(){this.promise.reject(),this.hide()}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=function(t){function n(e,t){o(this,n),i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.hasBlurred=!1}return r(n,t),
s(n,[{key:"componentWillMount",value:function(){this.initializeInputState(this.props,this.context)}},{key:"componentWillReceiveProps",value:function(e,t){(0,b.default)(t.formState,this.context.formState)||this.handleStateChange(e,t)}},{key:"shouldComponentUpdate",value:function(e,t,n){var a=n.formState,i=e.name,r=!!a[i];return r||this.initializeInputState(e,n),r}},{key:"initializeInputState",value:function(e,t){var n=t.onInputChange,a=e.name,i=e.initialValue;n(l({},a,{errors:[],showErrors:!1,value:i
}))}},{key:"handleStateChange",value:function(e,t,n){var a=t.onInputChange,i=t.formState,r=e.name,s=i[r],o=null!=n?n:s.value,u=this.calculateErrors(o,i,e);s.value===o&&f.default.isEqual(s.errors,u)||a(l({},r,{errors:u,showErrors:this.hasBlurred&&0!==u.length,value:o}))}},{key:"calculateErrors",value:function(e,t,n){var a=n.validations,i=a.map(function(n){return n(e,t)}).filter(function(e){return null!=e});return i}},{key:"onChange",decorators:[m.autobind],value:function(e){this.handleStateChange(this.props,this.context,e);
}},{key:"onBlur",decorators:[m.autobind],value:function(){if(!this.hasBlurred){this.hasBlurred=!0;var e=this.context,t=e.onInputChange,n=e.formState,a=this.props.name,i=n[a],r=this.calculateErrors(i.value,n,this.props);t(l({},a,u({},i,{errors:r,showErrors:0!==r.length})))}}},{key:"render",value:function(){var t=this.props,n=t.name,a=t.errors,i=this.context.formState[n];if(!i)return null;var r=a.length>0,s=i.value,o=i.errors,l=i.showErrors;return h.default.createElement(e,u({},this.props,{showErrors:!!r||l,
errors:r?a:o,value:s,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}))}}]),n}(p.Component);return t.displayName="FormInput("+(0,g.default)(e)+")",t.WrappedComponent=e,t.propTypes={name:p.PropTypes.string.isRequired,initialValue:p.PropTypes.oneOfType([p.PropTypes.number,p.PropTypes.string,p.PropTypes.bool]).isRequired,errors:p.PropTypes.arrayOf(p.PropTypes.string),validations:p.PropTypes.arrayOf(p.PropTypes.func)},t.contextTypes={formState:p.PropTypes.object,onInputChange:p.PropTypes.func
},t.defaultProps={validations:[],errors:[]},t}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(52).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(3),f=d(c),p=n(7),h=d(p),m=n(27),v=n(331),g=d(v),y=n(333),b=d(y);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.contentClassName,n=e.iconClassName,a=e.titleClassName,l=e.descriptionClassName,u=e.footerClassName,c=e.children,p=e.kind,h=e.icon,v=e.title,y=e.description,w=e.footer,P=s(e,["contentClassName","iconClassName","titleClassName","descriptionClassName","footerClassName","children","kind","icon","title","description","footer"]);
return d.default.createElement(g.default,o({className:b.default.emptyPage},P),{$$typeof:i,type:"div",key:null,ref:null,props:{children:[!!h&&{$$typeof:i,type:m.default,key:null,ref:null,props:r(m.default.defaultProps,{name:h,className:(0,f.default)(b.default[p],n)}),_owner:null},!!v&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:v,className:a},_owner:null},!!y&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:y,className:l},_owner:null},c],className:t},_owner:null},!!w&&{$$typeof:i,
type:"div",key:null,ref:null,props:{children:w,className:u},_owner:null})}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(32),f=l(c),p=n(44),h=n(49),m=l(h),v=n(86),g=l(v),y=n(1682),b=l(y);a.propTypes={contentClassName:u.PropTypes.string,iconClassName:u.PropTypes.string,titleClassName:u.PropTypes.string,descriptionClassName:u.PropTypes.string,footerClassName:u.PropTypes.string,children:u.PropTypes.node,
icon:u.PropTypes.string,kind:u.PropTypes.oneOf(p.kinds.all),title:u.PropTypes.string,description:u.PropTypes.string,footer:u.PropTypes.string},a.defaultProps={contentClassName:b.default.content,iconClassName:b.default.icon,titleClassName:b.default.title,descriptionClassName:b.default.description,footerClassName:b.default.footer,kind:p.kinds.DEFAULT},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){if(t)switch(t){case U.default.PRE_PLAY:switch(e){case"season":return[F,K];
case"episode":return[F,W];case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":return[$]}break;case U.default.CONTINUE_WATCHING:switch(e){case"movie":return[F,X,V];case"clip":return[F,X];case"episode":return[z,X,J]}break;case U.default.SEARCH_ALL_SERVERS:switch(e){case"movie":return[F,V,ee,ne];case"show":return[F,Q,ee,ne];case"episode":return[z,F,q,ee,ne];case"actor":return[te,ee,ne];case"genre":return[te,ee,ne];case"director":return[te,ee,ne];case"artist":return[F,Y,ee,ne];case"album":return[B,F,ee,ne];
case"track":return[z,ee,$,ne];case"photo":return[$,H,ee,ne];case"photoAlbum":return[F,H,ee,ne];case"clip":return[F,H,ee,ne];case"playlist":return[F,G,ee,ne]}break;case U.default.SEARCH:switch(e){case"movie":return[F,V,ee];case"show":return[F,Q,ee];case"episode":return[z,F,q,ee];case"actor":return[te,ee];case"genre":return[te,ee];case"director":return[te,ee];case"artist":return[F,Y,ee];case"album":return[B,F,ee];case"track":return[z,ee,$];case"photo":return[$,H,ee];case"photoAlbum":return[F,H,ee];case"clip":
return[F,H,ee];case"playlist":return[F,G,ee]}break;case U.default.QUICK_SEARCH:switch(e){case"movie":return[$,V];case"show":return[$,Q];case"episode":return[$,z];case"artist":return[$,Y];case"album":return[$,B];case"track":return[$,Z];case"photo":return[$,H];case"photoAlbum":return[$,H];case"clip":return[$,H];case"playlist":return[$,G];default:return[$,ee]}}switch(e){case"movie":return[F,V];case"show":return[F,Q];case"season":return[B,F];case"episode":return[z,F,q];case"artist":return[F];case"album":
return[B,F];case"track":return[z,$];case"photo":return[$];case"photoAlbum":return[F];case"clip":return[F];case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":return[z,$];default:return[$]}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(1431),s=i(r),o=n(351),l=i(o),u=n(1441),d=i(u),c=n(1433),f=i(c),p=n(576),h=i(p),m=n(1435),v=i(m),g=n(1434),y=i(g),b=n(1439),w=i(b),P=n(1432),_=i(P),S=n(1437),x=i(S),C=n(1438),T=i(C),k=n(1436),I=i(k),M=n(1440),A=i(M),E=n(577),O=i(E),D=n(586),R=i(D),L=n(1442),N=i(L),j=n(99),U=i(j),F={
key:"titleLink",component:l.default,selectProps:function(e){var t=e.server,n=e.metadataKey,a=e.title;return{server:t,linkKey:n,linkTitle:a}}},B={key:"parentTitleLink",component:l.default,selectProps:function(e){var t=e.server,n=e.parentKey,a=e.parentTitle;return{server:t,linkKey:n,linkTitle:a}}},z={key:"grandparentTitleLink",component:l.default,selectProps:function(e){var t=e.server,n=e.grandparentKey,a=e.grandparentTitle;return{server:t,linkKey:n,linkTitle:a}}},$={key:"title",component:s.default
},V={key:"year",component:d.default},H={key:"addedDate",component:f.default,selectProps:function(e){var t=e.addedAt;return{date:1e3*t}}},q={key:"seasonEpisodeIndex",component:h.default},W={key:"episodeIndex",component:v.default},K={key:"episodeCount",component:y.default},Q={key:"seasonCount",component:w.default},Y={key:"albumCount",component:_.default},G={key:"itemCount",component:x.default},X={key:"minutesLeft",component:T.default},J={key:"continueWatchingEpisode",component:I.default},Z={key:"trackParents",
component:A.default},ee={key:"searchReason",component:R.default},te={key:"tagTitleLink",component:O.default},ne={key:"serverNameLink",component:N.default};e.exports=t.default},function(e,t,n){e.exports={"default":n(1551),__esModule:!0}},function(e,t,n){"use strict";var a=n(1538).default,i=n(597).default,r=n(204).default;t.default=function(e,t){for(var n=a(t),s=0;s<n.length;s++){var o=n[s],l=i(t,o);l&&l.configurable&&void 0===e[o]&&r(e,o,l)}return e},t.__esModule=!0},function(e,t){"use strict";t.default=function(e,t){
var n=t({},e);return delete n.default,n},t.__esModule=!0},function(e,t,n){var a=n(601),i=n(368);e.exports=function(e){return a(i(e))}},,,function(e,t,n){"use strict";var a=n(274),i=n(392),r=n(396),s=n(656),o=n(658),l=n(33),u={},d=null,c=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return c(e,!0)},p=function(e){return c(e,!1)},h={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName
},putListener:function(e,t,n){"function"!=typeof n?l(!1):void 0;var i=u[t]||(u[t]={});i[e._rootNodeID]=n;var r=a.registrationNameModules[t];r&&r.didPutListener&&r.didPutListener(e,t,n)},getListener:function(e,t){var n=u[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=a.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var i=u[t];i&&delete i[e._rootNodeID]},deleteAllListeners:function(e){for(var t in u)if(u[t][e._rootNodeID]){var n=a.registrationNameModules[t];
n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete u[t][e._rootNodeID]}},extractEvents:function(e,t,n,i){for(var r,o=a.plugins,l=0;l<o.length;l++){var u=o[l];if(u){var d=u.extractEvents(e,t,n,i);d&&(r=s(r,d))}}return r},enqueueEvents:function(e){e&&(d=s(d,e))},processEventQueue:function(e){var t=d;d=null,e?o(t,f):o(t,p),d?l(!1):void 0,r.rethrowCaughtError()},__purge:function(){u={}},__getListenerBank:function(){return u}};e.exports=h},function(e,t,n){"use strict";function a(e,t,n){var a=t.dispatchConfig.phasedRegistrationNames[n];
return b(e,a)}function i(e,t,n){var i=t?y.bubbled:y.captured,r=a(e,n,i);r&&(n._dispatchListeners=v(n._dispatchListeners,r),n._dispatchInstances=v(n._dispatchInstances,e))}function r(e){e&&e.dispatchConfig.phasedRegistrationNames&&m.traverseTwoPhase(e._targetInst,i,e)}function s(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?m.getParentInstance(t):null;m.traverseTwoPhase(n,i,e)}}function o(e,t,n){if(n&&n.dispatchConfig.registrationName){var a=n.dispatchConfig.registrationName,i=b(e,a);
i&&(n._dispatchListeners=v(n._dispatchListeners,i),n._dispatchInstances=v(n._dispatchInstances,e))}}function l(e){e&&e.dispatchConfig.registrationName&&o(e._targetInst,null,e)}function u(e){g(e,r)}function d(e){g(e,s)}function c(e,t,n,a){m.traverseEnterLeave(n,a,o,e,t)}function f(e){g(e,l)}var p=n(103),h=n(210),m=n(392),v=n(656),g=n(658),y=(n(45),p.PropagationPhases),b=h.getListener,w={accumulateTwoPhaseDispatches:u,accumulateTwoPhaseDispatchesSkipTarget:d,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:c
};e.exports=w},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(104),r=n(402),s={view:function(e){if(e.view)return e.view;var t=r(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};i.augmentClass(a,s),e.exports=a},function(e,t,n){var a,i;/**!
	 * Sortable
	 * @author	RubaXa   <trash@rubaxa.org>
	 * @license MIT
	 */
!function(r){"use strict";a=r,i="function"==typeof a?a.call(t,n,t,e):a,!(void 0!==i&&(e.exports=i))}(function(){"use strict";function e(e,t){this.el=e,this.options=t=v({},t),e[D]=this;var a={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 i in a)!(i in t)&&(t[i]=a[i]);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),$.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&&w.insertBefore(b,g),b.state=e)}function n(e,t){var n=z.call(arguments,2);return t.bind?t.bind.apply(t,[e].concat(n)):function(){return t.apply(e,n.concat(z.call(arguments)))}}function a(e,t,n){if(e){n=n||L,t=t.split(".");var a=t.shift().toUpperCase(),i=new RegExp("\\s("+t.join("|")+")\\s","g");do if(">*"===a&&e.parentNode===n||(""===a||e.nodeName.toUpperCase()==a)&&(!t.length||((" "+e.className+" ").match(i)||[]).length==t.length))return e;while(e!==n&&(e=e.parentNode))}return null}function i(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 a=(" "+e.className+" ").replace(O," ").replace(" "+t+" "," ");e.className=(a+(n?" "+t:"")).replace(O," ")}}function l(e,t,n){var a=e&&e.style;if(a){if(void 0===n)return L.defaultView&&L.defaultView.getComputedStyle?n=L.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),
void 0===t?n:n[t];t in a||(t="-webkit-"+t),a[t]=n+("string"==typeof n?"":"px")}}function u(e,t,n){if(e){var a=e.getElementsByTagName(t),i=0,r=a.length;if(n)for(;i<r;i++)n(a[i],i);return a}return[]}function d(e){e.draggable=!1}function c(){U=!1}function f(e,t){var n=e.lastElementChild,a=n.getBoundingClientRect();return t.clientY-(a.top+a.height)>5&&n}function p(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,a=0;n--;)a+=t.charCodeAt(n);return a.toString(36)}function h(e){for(var t=0;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&t++;
return t}function m(e,t){var n,a;return function(){void 0===n&&(n=arguments,a=this,setTimeout(function(){1===n.length?e.call(a,n[0]):e.apply(a,n),n=void 0},t))}}function v(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var g,y,b,w,P,_,S,x,C,T,k,I,M,A,E={},O=/\s+/g,D="Sortable"+(new Date).getTime(),R=window,L=R.document,N=R.parseInt,j=!!("draggable"in L.createElement("div")),U=!1,F=function(e,t,n,a,i,r,s){var o=L.createEvent("Event"),l=(e||t[D]).options,u="on"+n.charAt(0).toUpperCase()+n.substr(1);
o.initEvent(n,!0,!0),o.item=a||t,o.from=i||t,o.clone=b,o.oldIndex=r,o.newIndex=s,l[u]&&l[u].call(e,o),t.dispatchEvent(o)},B=Math.abs,z=[].slice,$=[],V=m(function(e,t,n){if(n&&t.scroll){var a,i,r,s,o=t.scrollSensitivity,l=t.scrollSpeed,u=e.clientX,d=e.clientY,c=window.innerWidth,f=window.innerHeight;if(S!==n&&(_=t.scroll,S=n,_===!0)){_=n;do if(_.offsetWidth<_.scrollWidth||_.offsetHeight<_.scrollHeight)break;while(_=_.parentNode)}_&&(a=_,i=_.getBoundingClientRect(),r=(B(i.right-u)<=o)-(B(i.left-u)<=o),
s=(B(i.bottom-d)<=o)-(B(i.top-d)<=o)),r||s||(r=(c-u<=o)-(u<=o),s=(f-d<=o)-(d<=o),(r||s)&&(a=R)),E.vx===r&&E.vy===s&&E.el===a||(E.el=a,E.vx=r,E.vy=s,clearInterval(E.pid),a&&(E.pid=setInterval(function(){a===R?R.scrollTo(R.pageXOffset+r*l,R.pageYOffset+s*l):(s&&(a.scrollTop+=s*l),r&&(a.scrollLeft+=r*l))},24)))}},30);return e.prototype={constructor:e,_onTapStart:function(e){var t=this,n=this.el,i=this.options,r=e.type,s=e.touches&&e.touches[0],o=(s||e).target,l=o,u=i.filter;if(!("mousedown"===r&&0!==e.button||i.disabled)&&(o=a(o,i.draggable,n))){
if(T=h(o),"function"==typeof u){if(u.call(this,e,o,this))return F(t,l,"filter",o,n,T),void e.preventDefault()}else if(u&&(u=u.split(",").some(function(e){if(e=a(l,e.trim(),n))return F(t,e,"filter",o,n,T),!0})))return void e.preventDefault();i.handle&&!a(l,i.handle,n)||this._prepareDragStart(e,s,o)}},_prepareDragStart:function(e,t,n){var a,i=this,s=i.el,o=i.options,l=s.ownerDocument;n&&!g&&n.parentNode===s&&(M=e,w=s,g=n,P=g.nextSibling,I=o.group,a=function(){i._disableDelayedDrag(),g.draggable=!0,
o.ignore.split(",").forEach(function(e){u(g,e.trim(),d)}),i._triggerDragStart(t)},r(l,"mouseup",i._onDrop),r(l,"touchend",i._onDrop),r(l,"touchcancel",i._onDrop),o.delay?(r(l,"mousemove",i._disableDelayedDrag),r(l,"touchmove",i._disableDelayedDrag),i._dragStartTimer=setTimeout(a,o.delay)):a())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),s(e,"mousemove",this._disableDelayedDrag),s(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){
e?(M={target:g,clientX:e.clientX,clientY:e.clientY},this._onDragStart(M,"touch")):j?(r(g,"dragend",this),r(w,"dragstart",this._onDragStart)):this._onDragStart(M,!0);try{L.selection?L.selection.empty():window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){w&&g&&(o(g,this.options.ghostClass,!0),e.active=this,F(this,w,"start",g,w,T))},_emulateDragOver:function(){if(A){l(y,"display","none");var e=L.elementFromPoint(A.clientX,A.clientY),t=e,n=" "+this.options.group.name,a=$.length;
if(t)do{if(t[D]&&t[D].options.groups.indexOf(n)>-1){for(;a--;)$[a]({clientX:A.clientX,clientY:A.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);l(y,"display","")}},_onTouchMove:function(e){if(M){var t=e.touches?e.touches[0]:e,n=t.clientX-M.clientX,a=t.clientY-M.clientY,i=e.touches?"translate3d("+n+"px,"+a+"px,0)":"translate("+n+"px,"+a+"px)";A=t,l(y,"webkitTransform",i),l(y,"mozTransform",i),l(y,"msTransform",i),l(y,"transform",i),e.preventDefault()}},_onDragStart:function(e,t){var n=e.dataTransfer,a=this.options;
if(this._offUpEvents(),"clone"==I.pull&&(b=g.cloneNode(!0),l(b,"display","none"),w.insertBefore(b,g)),t){var i,s=g.getBoundingClientRect(),o=l(g);y=g.cloneNode(!0),l(y,"top",s.top-N(o.marginTop,10)),l(y,"left",s.left-N(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"),w.appendChild(y),i=y.getBoundingClientRect(),l(y,"width",2*s.width-i.width),l(y,"height",2*s.height-i.height),"touch"===t?(r(L,"touchmove",this._onTouchMove),
r(L,"touchend",this._onDrop),r(L,"touchcancel",this._onDrop)):(r(L,"mousemove",this._onTouchMove),r(L,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else n&&(n.effectAllowed="move",a.setData&&a.setData.call(this,n,g)),r(L,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(e){var n,i,r,s=this.el,o=this.options,u=o.group,d=u.put,p=I===u,h=o.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!o.dragoverBubble&&e.stopPropagation()),I&&!o.disabled&&(p?h||(r=!w.contains(g)):I.pull&&d&&(I.name===u.name||d.indexOf&&~d.indexOf(I.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){
if(V(e,o,this.el),U)return;if(n=a(e.target,o.draggable,s),i=g.getBoundingClientRect(),r)return t(!0),void(b||P?w.insertBefore(g,b||P):h||w.appendChild(g));if(0===s.children.length||s.children[0]===y||s===e.target&&(n=f(s,e))){if(n){if(n.animated)return;v=n.getBoundingClientRect()}t(p),s.appendChild(g),this._animate(i,g),n&&this._animate(v,n)}else if(n&&!n.animated&&n!==g&&void 0!==n.parentNode[D]){x!==n&&(x=n,C=l(n));var m,v=n.getBoundingClientRect(),_=v.right-v.left,S=v.bottom-v.top,T=/left|right|inline/.test(C.cssFloat+C.display),k=n.offsetWidth>g.offsetWidth,M=n.offsetHeight>g.offsetHeight,A=(T?(e.clientX-v.left)/_:(e.clientY-v.top)/S)>.5,E=n.nextElementSibling;
U=!0,setTimeout(c,30),t(p),m=T?n.previousElementSibling===g&&!k||A&&k:E!==g&&!M||A&&M,m&&!E?s.appendChild(g):n.parentNode.insertBefore(g,m?E:n),this._animate(i,g),this._animate(v,n)}}},_animate:function(e,t){var n=this.options.animation;if(n){var a=t.getBoundingClientRect();l(t,"transition","none"),l(t,"transform","translate3d("+(e.left-a.left)+"px,"+(e.top-a.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(L,"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,a=this.options;clearInterval(this._loopId),clearInterval(E.pid),clearTimeout(this.dragStartTimer),s(L,"drop",this),s(L,"mousemove",this._onTouchMove),s(n,"dragstart",this._onDragStart),this._offUpEvents(),t&&(t.preventDefault(),!a.dropBubble&&t.stopPropagation(),
y&&y.parentNode.removeChild(y),g&&(s(g,"dragend",this),d(g),o(g,this.options.ghostClass,!1),w!==g.parentNode?(k=h(g),F(null,g.parentNode,"sort",g,w,T,k),F(this,w,"sort",g,w,T,k),F(null,g.parentNode,"add",g,w,T,k),F(this,w,"remove",g,w,T,k)):(b&&b.parentNode.removeChild(b),g.nextSibling!==P&&(k=h(g),F(this,w,"update",g,w,T,k),F(this,w,"sort",g,w,T,k))),e.active&&F(this,w,"end",g,w,T,k)),w=g=y=P=b=_=S=M=A=x=C=I=e.active=null,this.save())},handleEvent:function(e){var t=e.type;"dragover"===t||"dragenter"===t?g&&(this._onDragOver(e),
i(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,i=0,r=n.length,s=this.options;i<r;i++)e=n[i],a(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,i){var r=n.children[i];a(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 a(e,t||this.options.draggable,this.el)},option:function(e,t){var n=this.options;return void 0===t?n[e]:void(n[e]=t)},destroy:function(){var e=this.el;e[D]=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")}),$.splice($.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!!a(e,t,e)},extend:v,throttle:m,closest:a,toggleClass:o,index:h},e.version="1.2.0",e.create=function(t,n){return new e(t,n)},e})},function(e,t,n){!function(t,a){e.exports=a(n(3),n(41))}(this,function(e,t){function n(n){return{underscore:e,backbone:t}[n]}var a=function(e){function t(e){var n=t.cache[e];if(!n){var a={};n=t.cache[e]={id:e,exports:a},t.modules[e].call(a,n,a)}return n.exports}return t.cache=[],t.modules=[function(e,a){function i(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),d(this._paginated,this),c.call(this,this._filtered,h),c.call(this,this._sorted,v),c.call(this,this._paginated,y),this.initialize(t)}var r=n("underscore"),s=n("backbone"),o=t(2),l=t(5),u=t(4),d=t(1),c=t(7),f={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"],h=["filtered:add","filtered:remove","filtered:reset"],m=["setSort","reverseSort","removeSort"],v=["sorted:add","sorted:remove"],g=["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){f[e]=function(){var t=o.prototype[e].apply(this._filtered,arguments);return t===this._filtered?this:t}}),r.each(g,function(e){f[e]=function(){var t=u.prototype[e].apply(this._paginated,arguments);return t===this._paginated?this:t}}),r.each(m,function(e){f[e]=function(){var t=l.prototype[e].apply(this._sorted,arguments);return t===this._sorted?this:t}}),r.each(b,function(e){f[e]=function(){throw new Error("Backbone.Obscura: Unsupported method: "+e+"called on read-only proxy")};
}),r.extend(i.prototype,f,s.Events),i=s.Collection.extend(i.prototype),i.FilteredCollection=o,i.SortedCollection=l,i.PaginatedCollection=u,e.exports=i},function(e,t){function a(e,t){function n(){t.length=e.length}function a(n){var a=i.toArray(arguments),r="change"===n||"change:"===n.slice(0,7);"reset"===n&&(t.models=e.models),i.contains(o,n)?(i.contains(["add","remove","destroy"],n)?a[2]=t:i.contains(["reset","sort"],n)&&(a[1]=t),t.trigger.apply(this,a)):r&&t.contains(a[1])&&t.trigger.apply(this,a);
}var l={};return i.each(i.functions(r.Collection.prototype),function(t){i.contains(s,t)||(l[t]=function(){return e[t].apply(e,arguments)})}),i.extend(t,r.Events,l),t.listenTo(e,"all",n),t.listenTo(e,"all",a),t.models=e.models,n(),t}var i=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=a},function(e,a){function i(){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(g.bind(l,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length}function d(){u.call(this,{reset:!0})}function c(){var e=!(!this._superset||!this._superset.comparator);u.call(this,{reset:e})}function f(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,a=t-1;a>=0;a-=1)if(this.contains(this.superset().at(a))){n=this.indexOf(this.superset().at(a))+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 h(e,t,n){"change:"===e.slice(0,7)&&p.call(this,arguments[1]);
}function m(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length}function v(e){this._superset=e,this._collection=new y.Collection(e.toArray()),b(this._collection,this),this.resetFilters(),this.listenTo(this._superset,"reset",d),this.listenTo(this._superset,"sort",c),this.listenTo(this._superset,"add change",f),this.listenTo(this._superset,"remove",m),this.listenTo(this._superset,"all",h)}var g=n("underscore"),y=n("backbone"),b=t(1),w=t(3),P={defaultFilterName:"__default",
filterBy:function(e,t){return t||(t=e,e=this.defaultFilterName),s.call(this,e,w(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={},i.call(this),this.trigger("filtered:reset"),u.call(this),this},superset:function(){return this._superset},refilter:function(e){return"object"==typeof e&&e.cid?f.call(this,e):(i.call(this),u.call(this)),this},getFilters:function(){return g.keys(this._filters);
},hasFilter:function(e){return g.contains(this.getFilters(),e)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};g.extend(v.prototype,P,y.Events),e.exports=v},function(e,t){function a(e,t){return function(n){return n.get(e)===t}}function i(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)?i(t,n):a(t,n)}),s=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};return r(s,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,a){function i(){var e=this.getPage()*this.getPerPage(),t=e+this.getPerPage();return[e,t]}function r(){var e=i.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,a=this._totalPages!==n;
if(this._totalPages=n,a&&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=c.max([e.length,t.length]),a=0,i=0;a<n;a+=1,i+=1)if(e[a]!==t[i])if(t[a-1]===e[a])i-=1;else{if(t[a+1]!==e[a])return e[a];i+=1}}function u(e,t,n){if(!s.call(this)){var a=i.call(this),r=a[0],o=a[1],u=l(this.superset().slice(r,o),this._collection.toArray()),d=l(this._collection.toArray(),this.superset().slice(r,o));
d&&this._collection.remove(d),u&&this._collection.add(u,{at:this.superset().indexOf(u)-r})}}function d(e,t){this._superset=e,this._collection=new f.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 c=n("underscore"),f=n("backbone"),p=t(1),h={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=0,n=this.getNumPages()-1;return e=e>t?e:t,e=e<n?e:n,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");
}};c.extend(d.prototype,h,f.Events),e.exports=d},function(e,a){function i(e){return c.isFunction(e)?e:function(t){return t.get(e)}}function r(e){return this._comparator?this._reverse?h(this._collection.toArray(),e,i(this._comparator)):c.sortedIndex(this._collection.toArray(),e,i(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 d(e){this._superset=e,this._reverse=!1,this._comparator=null,this._collection=new f.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 c=n("underscore"),f=n("backbone"),p=t(1),h=t(6),m={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");
}};c.extend(d.prototype,m,f.Events),e.exports=d},function(e,t){function a(e){return r.isFunction(e)?e:function(t){return t[e]}}function i(e,t,n,i){n=null==n?r.identity:a(n);for(var s=n.call(i,t),o=0,l=e.length;o<l;){var u=o+l>>>1;n.call(i,e[u])<s?l=u:o=u+1}return o}var r=n("underscore");e.exports=i},function(e,t){function a(e,t){i.each(t,function(t){this.listenTo(e,t,function(){var e=i.toArray(arguments);e.unshift(t),this.trigger.apply(this,e)})},this)}var i=n("underscore");e.exports=a}],t(0)}();return a;
})},,function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({"interface":["getLanguages","load","t"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({"interface":["get","set","remove","clear"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(41),u=a(l),d=n(117),c=a(d),f={hasPendingPopulate:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},populate:function(){return this.populatePromise?this.populatePromise:this.fetch.apply(this,arguments)},fetch:function(){var e,t=o.default.Deferred();if(this.hasPendingPopulate())return this.populatePromise;e=this._fetch?this._fetch.apply(this,arguments):this instanceof u.default.Collection?u.default.Collection.prototype.fetch.apply(this,arguments):u.default.Model.prototype.fetch.apply(this,arguments);
var n=t.promise();return n.rid=e.rid,this.populatePromise=n,e.done(r.default.bind(function(e){this.populatePromise=o.default.Deferred().resolveWith(this,[this]).promise(),t.resolveWith(this,[this,e])},this)),e.fail(r.default.bind(function(e){this.populatePromise=null,t.rejectWith(this,[this,e])},this)),n},abortPendingPopulate:function(){return this.hasPendingPopulate()&&c.default.abort(this.populatePromise.rid),this.populatePromise},resetPopulatePromise:function(e){return this.hasPendingPopulate()||(this.populatePromise=e),
this.populatePromise}};t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(100).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(46),l=i(o),u=n(73),d=i(u),c=n(111),f=i(c),p=n(18),h=i(p),m=n(19),v=i(m),g=n(56),y=i(g),b=n(785),w=i(b),P=v.default.extend({name:"PlayQueueItemModel",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],idAttribute:"playQueueItemID",cache:new f.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.playQueueItemID);
},sessionAttrs:{isPlayQueueItem:h.default.boolean},syncedAttrs:{playQueueItemID:h.default.integer,queueIndex:h.default.integer,key:h.default.string,ratingKey:h.default.string,type:h.default.string,advertisement:h.default.boolean,allowSkipAfter:h.default.integer,librarySectionID:h.default.string,syncItemId:h.default.integer,generatorID:h.default.integer,generatorType:h.default.integer,clientIdentifier:h.default.string,target:h.default.string},syncedRelations:{metadataItem:{relationClass:y.default,
deferred:!0},lyricsStreams:{relationClass:w.default,deferred:!0}},defaults:{isPlayQueueItem:!0},augmentResponse:function(e){var t=s.default.pick(e,a(this.syncedAttrs));t.metadataItem=e;var n=s.default.first(l.default.parseArray(e.Media));if(n){var i=s.default.first(l.default.parseArray(n.Part));if(i){var r=l.default.parseArray(i.Stream);r&&!function(){var e=d.default.get("lyrics");t.lyricsStreams=s.default.filter(r,function(t){return l.default.parseInteger(t.streamType)===e.id})}()}}return t}});t.default=P,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(428),u=a(l),d=o.default.extend({name:"FilterModel",context:["server","section","type","standalone"],idAttribute:"filter",rootPropertyName:"Directory",defaults:{advanced:!1},syncedAttrs:{filter:r.default.string,filterType:r.default.string,type:r.default.string,key:r.default.string,title:r.default.string,advanced:r.default.boolean},syncedRelations:{
options:{relationClass:u.default}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(52).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(9),u=i(l),d=n(46),c=i(d),f=n(23),p=r(f),h=n(304),m=i(h),v=n(147),g=i(v),y=n(60),b=i(y),w=n(25),P=i(w),_=n(433),S=i(_),x=P.default.extend({name:"HubCollection",context:["server","section","hubKey","count","includeEmpty","excludes","allowSync","maxLength"],responseContext:["allowSync"],
model:S.default,cache:new m.default,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.includeEmpty&&(t.includeEmpty=1),this.excludes&&this.excludes.length&&this.excludes.forEach(function(e){t["exclude"+(0,g.default)(e)]=1}),p.join(e,t)},initialize:function(){this.section&&this.listenTo(u.default,"clear:sections:hubs",this.clear)},fetch:function(){
var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=o.default.clone(e);return e.onlyTransient&&this.populatePromise&&(t.remove=!1,t.url=p.join(o.default.result(this,"url"),{onlyTransient:1})),P.default.prototype.fetch.call(this,t)},augmentResponseText:function(e,t){return t===b.default.xml?c.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){var t=this,n=this.model.prototype.rootPropertyName;if(e&&n){o.default.isArray(e)?e=a({},n,e):e[n]&&!o.default.isArray(e[n])&&(e=a({},n,[e[n]]));
var i=e[n],r=i&&i.length;if(r){if(!this.includeEmpty)for(;r&&r--;)i[r].size<=0&&i.splice(r,1);this.maxLength&&i.splice(this.maxLength),e.size>i.length&&(e.size=String(i.length))}}return this.responseContext.forEach(function(n){var a=e[n];void 0!==a&&t.setContext(n,a)}),e}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.key,n=e.getModel,a=(0,u.default)(t),r="is"+a+"Pending",s="is"+a+"Populated",l=t?t+"Error":"error";return function(e){var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=n(e,a),d=t?u.get(t):u,c=u.sessionAttrs;
(0,o.default)(!!c,u.name+" is missing session attributes"),(0,o.default)(c.hasOwnProperty(r),u.name+" is missing a session attribute for "+r),(0,o.default)(c.hasOwnProperty(s),u.name+" is missing a session attribute for "+s),(0,o.default)(c.hasOwnProperty(l),u.name+" is missing a session attribute for "+l),u.set(r,!0),d.fetch(a.options).done(function(){var e;u.set((e={},i(e,r,!1),i(e,s,!0),i(e,l,null),e))}).fail(function(e,t){var n;u.set((n={},i(n,r,!1),i(n,l,t),n))})}}var i=n(52).default,r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(38),o=r(s),l=n(147),u=r(l);e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,r.createSelector)(function(e,t){var n=t.libraryEntityID;return n},o.default,function(e,t){return t[e]})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(30),s=n(455),o=i(s);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),r=n(144),s=a(r),o=(0,
i.createSelector)(s.default,function(e){return e.metadataItems});t.default=o,e.exports=t.default},function(e,t){"use strict";function n(e){return e.user}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(31),o=a(s),l=o.default.extend({initialize:function(){this._entries=[]},wrapAll:function(e,t,n){r.default.each(e,function(e){this.wrap(e,t,n)},this);
},wrap:function(e,t,n){n[e]=r.default.wrap(n[e],r.default.bind(function(e){var a=r.default.toArray(arguments).slice(1);return t.call(n)?e.apply(n,a):void this.add({fn:e,args:a,context:n})},this))},add:function(e){this._entries.push(e)},process:function(){r.default.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.default=l,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var n={NEVER:"never",SAME_NETWORK:"samenetwork",ALWAYS:"always"};n.settings=[{value:n.NEVER,title:"Never"},{value:n.SAME_NETWORK,title:"On same network as server"},{value:n.ALWAYS,title:"Always"}],t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(e){var t=o[e.code+"-"+e.field]||o[e.code];return t?t():e.message}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorText=a;var r=n(6),s=i(r),o={1001:function(){return(0,s.default)("User could not be authenticated");
},"1010-login":function(){return(0,s.default)("Login is required")},"1010-password":function(){return(0,s.default)("Password is required")},"1010-email":function(){return(0,s.default)("Email is required")},"1011-username":function(){return(0,s.default)("Username has already been taken")},"1011-email":function(){return(0,s.default)("email has already been taken")},1030:function(){return(0,s.default)("User could not be authenticated. This account only allows signing in with email address")},1031:function(){
return(0,s.default)("User could not be authenticated. This IP appears to be having trouble signing in to an account (detected repeated failures)")},"1032-password":function(){return(0,s.default)("Password must be at least 8 characters")},"1033-password":function(){return(0,s.default)("Password is too weak")},"1034-password":function(){return(0,s.default)("Password must be different from username or email address")},"1035-email":function(){return(0,s.default)("Email is not a valid email address")},
"1036-username":function(){return(0,s.default)("Username must not be an email address")},"1037-username":function(){return(0,s.default)("Username contains invalid characters")},"1038-pin":function(){return(0,s.default)("Pin must be 4 digits")},"1039-passwordConfirmation":function(){return(0,s.default)("Confirm Password must match Password")},1040:function(){return(0,s.default)("Invalid Password")}};t.default=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={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",xx:"Unknown",xn:"None"};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=l.default.get("video").id,n=(0,d.default)(e,{streamType:t});return s.default.first(n)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(73),l=i(o),u=n(92),d=i(u);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(6),u=a(l),d=n(230),c=a(d),f=n(485),p=a(f),h=n(486),m=a(h),v=n(92),g=a(v),y=n(479),b=a(y),w=n(42),P=a(w),_=n(85),S=a(_),x=n(73),C=a(x),T=n(129),k=a(T),I=n(176),M=a(I),A=n(26),E=a(A),O={getMediaDecision:function(e){var t=this.augmentProfile(e);if(E.default.info("[MDE] Augmented profile:",t),e.media)return this.analyzeMedia(e.media,t,e);
var n=e.item,a=n.get("Media");if(!a.length)return{transcodeServer:e.transcodeServer,canPlay:!0,canDirectPlay:!0};if(1===a.length)return this.analyzeMedia(r.default.first(a),t,e);var i=r.default.map(a,function(n){return this.analyzeMedia(n,t,e)},this);return this.getBestDecision(i)},augmentProfile:function(e){var t=e.profile;if(!t)throw new Error("MDE: No player profile provided for "+e.type);var n=o.default.extend(!0,{},t.directPlay),a=o.default.extend(!0,{},t.directStream),i=n.generic;i&&delete n.generic;
var s=e.allowedAC3Containers,l="*"===s;!l&&s&&(s=r.default.isArray(s)?s:[s]);var u=e.allowedEAC3Containers,d="*"===u;!d&&u&&(u=r.default.isArray(u)?u:[u]);var c=e.allowedDCAContainers,f="*"===c;return!f&&c&&(c=r.default.isArray(c)?c:[c]),r.default.each(n,function(t,n){this.mergeGenericOptions(t,i),this.mergeMaxQualityOptions(t,e),(l||s&&r.default.contains(s,n))&&this.addAudioCodec("ac3",t,e),(d||u&&r.default.contains(u,n))&&this.addAudioCodec("eac3",t,e),(f||c&&r.default.contains(c,n))&&this.addAudioCodec("dca",t,e);
var a=P.default.getStreamByType(e.type),o=t[a];if(o){var p=o.codecs;r.default.each(p,function(t,n){this.mergeMaxQualityOptions(t,e,!0),e.videoCodecOptions&&e.videoCodecOptions[n]&&this.mergeVideoCodecOptions(t,e.videoCodecOptions[n])},this)}},this),this.mergeMaxQualityOptions(a,e),e.videoCodecOptions&&e.type===P.default.types.VIDEO&&a.video&&r.default.each(a.video.codecs,function(t,n){e.videoCodecOptions[n]&&this.mergeVideoCodecOptions(t,e.videoCodecOptions[n])},this),{directPlay:n,directStream:a
}},mergeGenericOptions:function(e,t){t&&(r.default.defaults(e,r.default.omit(t,"video","audio")),r.default.each(["audio","video"],function(n){var a=t[n],i=e[n];a&&(i||(i={},e[n]=i),r.default.defaults(i,r.default.omit(a,"codecs")),a.codecs&&r.default.each(a.codecs,function(e,t){r.default.defaults(this.ensureCodecs(t,i),e)},this))},this))},mergeVideoCodecOptions:function(e,t){r.default.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 a=[{option:"bitrate",setting:"maxBitrate"},{option:"videoResolution",setting:"maxVideoResolution"}];r.default.each(a,function(a){if("videoResolution"!==a.option||t.type===P.default.types.VIDEO){var i=this.getMaxQualityOption(e,a.option,t);if(null!=i){var r=a.setting,s=P.default.getStreamByType(t.type);e.hasOwnProperty(r)?e[r]=i:e.hasOwnProperty(s)?e[s][r]=i:n||(e[s]={},e[s][r]=i)}}},this)},getMaxQualityOption:function(e,t,n){var a=n.quality||{},i="max"+t.charAt(0).toUpperCase()+t.slice(1),r=a[t],s=this.getPrimaryStreamProperty(e,i,n);
if("videoResolution"===t&&r&&(r=S.default.getResolutionFromSize(r)),"bitrate"===t){var o=n.item.server,l=o.get("maxUploadBitrate");l&&(!r||l<r)&&(r=l)}if(r||s){var u;return u=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,n){E.default.info("[MDE] Starting analysis of",this.getMediaTitle(e)),(0,E.default)("[MDE] Analyzing direct play");var a=this.canDirectPlay(e,t.directPlay,n),i={transcodeServer:n.transcodeServer,
item:n.item,media:e,canDirectPlay:a.result,canDirectPlayFailedCheck:a.failedCheck},s=n.transcoderOptions||{};if(r.default.isFunction(s)&&(s=s(i)),n.type===P.default.types.VIDEO){(0,E.default)("[MDE] Analyzing video direct stream");var o=(0,c.default)(e);if(o){var l=this.canDirectStream(o,t.directStream.video,n,s);i.canDirectStreamVideo=l.result,i.canDirectStreamVideoFailedCheck=l.failedCheck}}if(n.type!==P.default.types.PHOTO){(0,E.default)("[MDE] Analyzing audio direct stream");var u=(0,p.default)(e);
if(u){var l=this.canDirectStream(u,t.directStream.audio,n,s);i.canDirectStreamAudio=l.result,i.canDirectStreamAudioFailedCheck=l.failedCheck}}var d=(0,m.default)(i.media);return d&&((0,E.default)("[MDE] Analyzing subtitles"),r.default.extend(i,this.analyzeSubtitles(d,n))),(0,E.default)("[MDE] Analyzing playability"),r.default.extend(i,this.canPlay(i,n)),r.default.extend(i,this.getEffectiveQuality(e,t.directStream,n)),E.default.group("[MDE] Finished analysis of",this.getMediaTitle(e)),this.getDecisionLogs(i).forEach(function(e){
return E.default.info(e)}),E.default.groupEnd(),i},canDirectPlay:function(e,t,n){if(n.forceDirectPlay)return(0,E.default)("[MDE] Direct play forced"),{result:!0};if(n.allowDirectPlay===!1)return E.default.warn("[MDE] Direct play failed; option is disabled"),{result:!1,failedCheck:"allowDirectPlay"};if(n.type===P.default.types.VIDEO&&!this.canDirectPlayVideo(e,n))return{result:!1,failedCheck:"canDirectPlayVideo"};var a=t[e.container];if(!a)return E.default.warn("[MDE] Direct play failed; unsupported container:",e.container),
{result:!1,failedCheck:"containerProfile"};var i=r.default.keys(a);if(i&&i.length){for(var s=0,o=i.length;s<o;s++){var l=i[s],u=a[l];if("mimeType"===l){if(!n.skipCanPlayTypeTest&&!this.canPlayType(P.default.getElementByType(n.type),u))return E.default.warn("[MDE] Direct play failed; canPlayType test, %s: %s",l,u),{result:!1,failedCheck:"canPlayType"}}else if("video"===l||"audio"===l){var d=C.default.get(l),f=(0,g.default)(e,{streamType:d.id}),h="video"===l?(0,c.default)(e):(0,p.default)(e);if(!h){
E.default.warn("[MDE] No stream selected; will not be able to analyze stream codecs");continue}var m="audio"===l&&h!==f[0];if(m&&!n.allowMultiTrackAudio)return E.default.warn("[MDE] Direct play failed; multi-track audio is required"),{result:!1,failedCheck:"allowMultiTrackAudio"};var v=this.analyzeStream(h,u,n);if(!v.result)return{result:!1,failedCheck:v.failedCheck}}else if("photo"===l){var v=this.analyzeStream(r.default.first(e.Part),u,n);if(!v.result)return{result:!1,failedCheck:v.failedCheck};
}else if(!this.validateProfileProperty(l,u,e))return{result:!1,failedCheck:"validateProfileProperty:"+l}}return{result:!0}}return{result:!0}},canDirectPlayVideo:function(e,t){if(!t.allowDirectPlay)return E.default.warn("[MDE] Direct play failed; option is disabled"),!1;if("hls"===e.protocol&&!t.hasFlash&&!t.hasNativeHLS)return E.default.warn("[MDE] Direct play failed; cannot play HLS"),!1;if("flv"===e.container&&!t.hasFlash)return E.default.warn("[MDE] Direct play failed; cannot play FLV"),!1;var n=r.default.first(e.Part);
return t.allowSecureDirectPlay!==!1||!n||!/^https:\/\//.test(n.key)||(E.default.warn("[MDE] Direct play prevented; cannot play via HTTPS"),!1)},canPlayType:function(e,t){if(e===P.default.elements.PHOTO)return!0;var n=document.createElement(e);return!(!n.canPlayType||!n.canPlayType(t).replace(/^no$/,""))},canDirectStream:function(e,t,n,a){return a.directStream?this.analyzeStream(e,t,n):(E.default.warn("[MDE] Direct stream failed; option is disabled"),{result:!1,failedCheck:"options:directStream"});
},analyzeStream:function D(e,t,n){var a=t&&t.codecs&&t.codecs[e.codec];for(var i in t){var r=t[i];if("codecs"===i){var s=r[e.codec];if(!s)return{result:!1,failedCheck:"noCodecInProfile:"+e.codec};var D=this.analyzeStream(e,s,n);if(!D.result)return{result:!1,failedCheck:D.failedCheck}}else if(!(a&&i in a||this.validateProfileProperty(i,r,e)))return{result:!1,failedCheck:"validateProfileProperty:"+i}}return{result:!0}},validateProfileProperty:function(e,t,n){var a,i=e.match(/^max(\w)(\w*)/);if(i){if(e=i[1].toLowerCase()+i[2],
a=n[e],null==a&&E.default.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),null!=a&&"videoResolution"===e&&(a=S.default.getHeightFromResolution(a),t=S.default.getHeightFromResolution(t)),null!=a&&a>t)return E.default.warn("[MDE] Invalid profile property; %s: %s > %s",e,a,t),!1}else if(a=n[e],null==a&&E.default.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),a!==t&&!r.default.contains(t,a))return E.default.warn("[MDE] Invalid profile property; %s: %s !== %s",e,a,t),
!1;return!0},analyzeSubtitles:function(e,t){var n=t.subtitlesBurnLevel||M.default.ALWAYS,a=e.codec;return(0,E.default)("[MDE] Subtitle codec:",a),(0,E.default)("[MDE] Burn level:",n),n===M.default.ALWAYS?(E.default.warn("[MDE] Direct play failed; asked to always burn subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:burnLevelAlways",canDirectStreamVideo:!1}):t.transcodeServer.supports("softSubtitles")?n===M.default.NEVER?{useSoftSubtitles:!0}:(E.default.warn("[MDE] Direct play failed; %s subtitles",a),
/^(pgs|vobsub)$/i.test(a)?(E.default.warn("[MDE] Soft subtitles failed; bitmap subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):/^(ass|ssa)$/i.test(a)&&n===M.default.AUTO?(E.default.warn("[MDE] Soft subtitles failed; ASS subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):{useSoftSubtitles:!0,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles"}):(E.default.warn("[MDE] Direct play failed; server support requires burn subtitles"),
E.default.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 n=(0,b.default)(e.media);if(n.length){E.default.warn("[MDE] Unable to play; missing parts");var a=r.default.first(n);return 1===Number(a.exists)?(0,
u.default)("Please check the permissions for this file."):(0,u.default)("Please check that the file exists and the necessary drive is mounted.")}},validateTranscoder:function(e,t){if(!e.canDirectPlay){var n,a=t.type,i=a===P.default.types.MUSIC,s=a===P.default.types.VIDEO,o=t.transcodeServer,l=o.get("transcoderAudio"),d=o.get("transcoderVideo");if(i||"track"===t.item.get("type")){if(n=(0,u.default)("This server is not powerful enough to convert music."),s&&!d)return E.default.warn("[MDE] Unable to play; server unable to transcode music using video transcoder"),
n;if(i&&!l)return E.default.warn("[MDE] Unable to play; server unable to transcode music using audio transcoder"),n}else if(s){var c=(0,u.default)("This server is not powerful enough to convert video. You may be able to enable playback by increasing your quality setting."),f=(0,u.default)("This server is not powerful enough to convert video. Playback qualities are limited because an indirect connection is being used."),p=e.canDirectStreamVideo||!o.get("transcoderVideoRemuxOnly");if(n=(0,u.default)("This server is not powerful enough to convert video."),
!d||!p){if(E.default.warn("[MDE] Unable to play; server unable to transcode video"),o.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"validateProfileProperty:maxLevel":return(0,u.default)("Synced media cannot be converted to a lower H.264 level.");case"validateProfileProperty:maxBitrate":return(0,u.default)("Synced media cannot be converted to a lower quality.");case"allowDirectPlay":default:return(0,u.default)("Converting is not supported for synced media.")}if(t.quality){if(t.quality.index===S.default.ORIGINAL)return n;
var h=r.default.clone(t);return h.quality=r.default.extend({index:S.default.ORIGINAL},r.default.pick(t.quality,"attribute")),this.getMediaDecision(h).canDirectPlay?c:"relay"===o.get("maxUploadBitrateReason")?f:n}return c}}}},getEffectiveQuality:function(e,t,n){var a=n.quality,i={},r={};if(e.bitrate||E.default.warn("[MDE] Unable to determine effective quality; re-analyze the media if possible"),n.type===P.default.types.VIDEO){i.bitrate=e.bitrate,i.videoResolution=S.default.getHeightFromResolution(e.videoResolution);
var s=this.getPrimaryStreamProperty(t,"maxBitrate",n);if(s){var o=(0,c.default)(e),l=o?o.bitrate:e.bitrate;i.bitrate=Math.min(l,s),r.maxVideoBitrate=s}if(a){var u=a.videoResolution;if(u){var d=S.default.getResolutionFromSize(a.videoResolution),f=S.default.getHeightFromResolution(d);i.videoResolution=Math.min(i.videoResolution,f)}r.videoQuality=a.videoQuality,r.videoResolution=a.videoResolution}}else if(n.type===P.default.types.MUSIC){i.bitrate=e.bitrate;var p=this.getPrimaryStreamProperty(t,"maxBitrate",n);
p&&(i.bitrate=Math.min(e.bitrate,p),r.maxAudioBitrate=p)}return i.transcoderQualityOptions=r,i},getPrimaryStreamProperty:function(e,t,n){var a=P.default.getStreamByType(n.type),i=e[a],r=e[t];return null==r&&i&&(r=i[t]),r},getMediaTitle:function(e){var t=e.title||e.videoResolution||e.bitrate,n=r.default.compact([e.container,e.videoCodec,e.audioCodec]),a=(0,c.default)(e);return a&&n.push(a.level,a.profile),n.length&&(t+=" ("+n.join(", ")+")"),t},getDecisionLogs:function(e){var t=["canPlay: "+e.canPlay,"canDirectPlay: "+e.canDirectPlay],n=e.canDirectStreamVideo;
null!=n&&t.push("canDirectStreamVideo: "+n);var a=e.canDirectStreamAudio;null!=a&&t.push("canDirectStreamAudio: "+a);var i=e.useSoftSubtitles;null!=i&&t.push("useSoftSubtitles: "+i);var s=e.bitrate;null==s||r.default.isNaN(s)||t.push("bitrate: "+s);var o=e.videoResolution;return null==o||r.default.isNaN(o)||t.push("videoResolution: "+o),t},getBestDecision:function(e){var t=r.default.last(this.sortDecisions(e));return E.default.group("[MDE] Selected %s to play",this.getMediaTitle(t.media)),this.getDecisionLogs(t).forEach(function(e){
return E.default.info(e)}),E.default.groupEnd(),t},sortDecisions:function(e){return r.default.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===k.default.CLOUD;return e.transcodeServer.hasLocalConnection()?!t:t},preferHigherResolutionIfCapable:function(e){var t=e.transcodeServer,n=t.get("transcoderVideo"),a=t.get("transcoderVideoRemuxOnly");return n&&!a&&(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.default=O,e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){
var a=(0,u.resolve)("appModel"),i=a.get("servers"),s=i.find(function(e){var t=e.get("activeConnection");return e.get("isConnected")&&e.get("isFullServer")&&t.get("isPrivate")});return l.default.image(e,t,r({fallbackServer:s},n))}function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return a.apply(void 0,t)}}var r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.imageTranscodeUrl=a,t.default=i;var o=n(148),l=s(o),u=n(11)},function(e,t,n){
"use strict";function a(e){if(!e)return"";if("8k"===e)return"8K";if("4k"===e)return"4K";var t=parseInt(e,10);return s.default.isNaN(t)?e.toUpperCase():e+"p"}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(6),u=a(l),d=n(46),c=a(d),f=n(42),p=a(f),h=n(873),m=a(h),v=n(480),g=a(v),y=n(483),b=a(y),w=n(231),P=a(w),_=n(176),S=a(_),x=n(322),C=a(x),T=n(26),k=a(T),I=n(492),M=a(I),A=n(108),E=a(A),O={
getPlayerDecision:function(e){r.default.defaults(e,{offset:0,minVersionForDASH:E.default.dash,minVersionForStreamingMKV:E.default.streamingMKV,transcoderOptions:{}});var t={playbackSessionID:(0,C.default)(),transcodeSessionID:(0,C.default)(),offset:e.offset},n=this.populateMedia(t,e);return n=n.then(r.default.bind(function(){return this.resolveMedia(t,e)},this)),n=n.then(function(){return o.default.when(t.url)}),n=n.then(function(e){return t.url=e,t})},populateMedia:function(e,t){var n=o.default.Deferred(),a=r.default.bind(n.resolve,n,e);
return t.requireAnalysis&&(0,m.default)(t.item)?t.item.fetch({scope:"player"}).always(a):r.default.defer(a),n.promise()},resolveMedia:function(e,t){var n=r.default.extend({transcodeServer:this.resolveTranscodeServer(t)},t),a=P.default.getMediaDecision(n),i=a.media,s=o.default.Deferred();return r.default.extend(e,a),i?e.canPlay?"webkit"===i.protocol?(k.default.warn("[PDE] Webkit videos are not supported"),e.redirect=!0,s.reject(e).promise()):"embed"===i.protocol?(k.default.warn("[PDE] An embed is required"),
e.embed=!0,e.part=r.default.first(i.Part),s.reject(e).promise()):this.resolvePart(e,t):(k.default.warn("[PDE] Unable to play item;",e.errorMessage),s.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 a;return e.type===p.default.types.VIDEO?a="transcoderVideo":e.type===p.default.types.MUSIC&&(a="transcoderAudio"),a&&!t.get(a)&&n.get(a)?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=(0,
g.default)(e.media,t.offset),e.offset=(0,b.default)(e.media,e.part,t.offset)):e.part=r.default.first(e.media.Part),e.media.indirect?this.resolveIndirect(e,t):this.resolveUrls(e,t)},resolveIndirect:function(e,t){(0,k.default)("[PDE] Resolving indirect item");var n=t.item.resolveIndirect(e.media,e.part),a=r.default.bind(function(){return this.resolveMedia(e,t)},this),i=r.default.bind(function(){return o.default.Deferred().reject(e).promise()},this);return n=n.then(a,i)},resolveUrls:function(e,t){var n=o.default.Deferred();
return this.validatePlayerType(e,t)?(this.validateSoftSubtitles(e,t)?e.subtitlesUrl=this.resolveSubtitlesUrl(e,t):e.useSoftSubtitles&&(e.useSoftSubtitles=!1),k.default.group("[PDE] Player decision"),k.default.info("Player:",e.playerType),k.default.info("Protocol:",e.protocol),k.default.info("Direct Play:",e.canDirectPlay),k.default.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!==p.default.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 n,a=e.transcodeServer,i=t.transcodeProtocol,r=!0,s=!0,o=!0;if(i&&(r="dash"===i,s="http"===i,o="hls"===i),o&&t.hasNativeHLS)return e.protocol="hls",
e.playerType="html",!0;if(s&&t.hasStreamingMKV){if(a.isVersionOrNewer(t.minVersionForStreamingMKV))return e.protocol="http",e.playerType="html",!0;n=t.minVersionForStreamingMKV}if(r&&t.hasDASH){if(a.isVersionOrNewer(t.minVersionForDASH))return e.protocol="dash",e.playerType="html",!0;n=t.minVersionForDASH}return t.type===p.default.types.MUSIC?(e.protocol="http",e.playerType="html",!0):o&&t.hasFlash?(e.protocol="hls",e.playerType="flash",!0):(n?e.errorMessage=(0,u.default)("Please update Plex Media Server. This feature requires {1} or later.",n):e.errorMessage=(0,
u.default)("Streaming this media is unsupported."),!1)},validateSoftSubtitles:function(e,t){return e.useSoftSubtitles&&"html"!==e.playerType?(k.default.warn("[PDE] Only the HTML player supports soft subtitles"),!1):e.useSoftSubtitles},resolveDirectPlayUrl:function(e,t){var n=t.item,a=e.part,i={"X-Plex-Session-Identifier":e.playbackSessionID};if(a){var r=/(googlevideo|youtube).com/.test(a.key);return"flv"===a.container&&r&&a.postURL?a.postURL:n.server.resolveUrl(a.key,{appendHeaders:!0,params:i})}
return n.server.resolveUrl(n.get("key"),{appendHeaders:!0,params:i})},resolveTranscoderUrl:function(e,t,n){var a=t.item,i=e.media,s=e.part,o=t.transcoderOptions;r.default.isFunction(o)&&(o=o(e)),o=r.default.extend({},e.transcoderQualityOptions,o,{"X-Plex-Session-Identifier":e.playbackSessionID,session:e.transcodeSessionID,protocol:e.protocol,directPlay:e.canDirectPlay?1:0,offset:e.offset/1e3}),t.type===p.default.types.VIDEO&&(e.useSoftSubtitles?(o.subtitles="auto",t.subtitlesBurnLevel===S.default.AVOID&&(o.advancedSubtitles="text")):o.subtitles="burn");
var l=t.profileExtra;r.default.isFunction(l)&&(l=l(e)),o["X-Plex-Client-Profile-Extra"]=l,("hls"===o.protocol&&!t.useOffsetHLS||"dash"===o.protocol)&&((0,k.default)("[PDE] DASH and HLS should seek forward by default, offset=0"),o.offset=0),"hls"===o.protocol&&t.useOffsetHLS&&(e.useOffsetHLS=!0,o.offset&&((0,k.default)("[PDE] HLS started with an offset, copyts=0"),o.copyts=0)),"http"===o.protocol&&(t.type===p.default.types.MUSIC?(e.useOffsetHTTP=!0,o.copyts=0):o.copyts=1),"http"!==o.protocol||e.canDirectPlay||(o["X-Plex-Chunked"]=1),
r.default.each(r.default.keys(o),function(e){var t=o[e];null==t&&delete o[e]});var u=t.type,d=t.transcoder,c=e.transcodeServer;return u===p.default.types.VIDEO?d.video(c,a,i,s,o,n):u===p.default.types.MUSIC?d.music(c,a,o,n):u===p.default.types.PHOTO?(o.fallbackServer=t.fallbackServer,d.image(c,a.getMediaKey(),o)):void 0},resolveSubtitlesUrl:function(e,t){var n=this.resolveTranscoderUrl(e,t),a=n.substring(n.indexOf("?"));return e.transcodeServer.resolveUrl("/video/:/transcode/universal/subtitles"+a);
},resolveDecision:function(e,t){var n=e.transcodeServer,a=o.default.Deferred();if(t.type===p.default.types.PHOTO||!n.supports("decisionEndpoint"))return a.resolve(e).promise();var i=this.resolveTranscoderUrl(e,t,"decision"),r=o.default.ajax(n.getXHROptions(i,{timeout:2e3}));return r.done(function(t){var n=c.default.parseXML(t);n.generalDecisionCode&&(e.generalDecisionCode=c.default.parseInteger(n.generalDecisionCode),e.generalDecisionText=n.generalDecisionText),n.mdeDecisionCode&&(e.mdeDecisionCode=c.default.parseInteger(n.mdeDecisionCode),
e.mdeDecisionText=n.mdeDecisionText),n.transcodeDecisionCode&&(e.transcodeDecisionCode=c.default.parseInteger(n.transcodeDecisionCode),e.transcodeDecisionText=n.transcodeDecisionText),(0,M.default)(e)?a.reject(e):a.resolve(e)}),r.fail(function(){k.default.warn("[PDE] Player decision failed; the transcode server may be a slow or outdated"),a.resolve(e)}),a.promise()}};t.default=O,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="placeholder-standard",a="placeholder-square",i="placeholder-widescreen",r="placeholder-folder",s="placeholder-friend",o={
movie:n,show:n,season:n,episode:i,artist:a,album:a,track:a,photo:a,photoAlbum:a,clip:i,userPlaylistItem:i,playlist:a,playlistFolder:a,channel:a,channelDirectory:a,folder:r,friend:s,device:a,poster:n,art:i,banner:i};t.default=o,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=o.default.clone(e);return"undefined"!=typeof t.last?(t.end=t.last+1,t.size=t.end-t.start):"undefined"!=typeof t.size?(t.end=t.start+t.size,t.last=t.end-1):"undefined"!=typeof t.end&&(t.last=t.end-1,t.size=t.end-t.start),
t}function i(e,t){return o.default.filter(o.default.map(e,a),function(e){return t?e.size>=0:e.size>0})}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l={augment:a,difference:function(e,t,n){e=a(e),t=a(t);var r=[{start:e.start,last:Math.min(e.last,t.start-1)},{start:Math.max(e.start,t.end),last:e.last}];return i(r,n)},union:function(e,t,n){if(e=a(e),t=a(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),
i(s,n)},degap:function(e,t){var n=a(e);return t=a(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}),a(n)):n},each:function(e,t,n){e=a(e);for(var i=Math.min(e.start,e.end),r=Math.max(e.start,e.end);i<=r;i++)t.call(n,i)},roundByPage:function(e,t){return e=a(e),a({start:Math.floor(e.start/t)*t,end:Math.ceil(e.end/t)*t})}};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var i=n(3),r=a(i),s=n(11),o=n(31),l=a(o),u=n(42),d=a(u),c=n(40),f=a(c),p=n(35),h=a(p),m=n(282),v=a(m),g=n(26),y=a(g),b=n(48),w=a(b),P=l.default.extend({mixins:[w.default],idleTimelineInterval:1e4,players:{photo:null,video:null,audio:null},textField:{focused:!1,content:"",secure:!1},initialize:function(){r.default.bindAll(this,"_sendTimeline"),this._sendTimelineThrottle=r.default.throttle(this._sendTimeline,1e3)},registerPlayer:function(e){if(h.default.get("companion")){var t=f.default.getChildMediaType(e.currentItem.get("type")).element;
(0,y.default)("[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=f.default.getChildMediaType(e.currentItem.get("type")).element;(0,y.default)("[Companion Timeline] unregistering player. Type %s",t),this.players[t]=null,this.stopListening(e.model),r.default.defer(this._sendTimeline);
},enteredTextField:function(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];this.flushTextField(),this.textField.focused=!0,this.textField.content=e,this.textField.secure=t,this._sendTimeline()},updatedTextField:function(e){this.textField.content!==e&&(this.flushTextField(),this.textField.content=e,this._sendTimeline())},leavedTextField:function(){this.textField.focused=!1,this._sendTimeline()},flushTextField:function(){this.textField.focused&&(this.textField.focused=!1,this._sendTimeline(),
this.textField.focused=!0)},start:function(){this.timelineStarted||(this.timelineStarted=!0,(0,y.default)("[Companion Timeline] Starting"),this._idleTimelineInterval=setInterval(this._sendTimelineThrottle,this.idleTimelineInterval))},stop:function(e){this.timelineStarted&&(e&&this._sendTimeline({requestDisconnect:!0}),this.timelineStarted=!1,(0,y.default)("[Companion Timeline] Stopping"),this._idleTimelineInterval=clearInterval(this._idleTimelineInterval))},isPlaybackActive:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.states||[d.default.states.PLAYING,d.default.states.PAUSED,d.default.states.BUFFERING],n=e.types||r.default.keys(this.players),a=r.default.find(this.players,function(e,a){
return e&&r.default.contains(t,e.model.get("state"))&&r.default.contains(n,a)});return!!a},_sendTimeline:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(this.timelineStarted){var t=this._buildVideoTimeline(),n=this._buildMusicTimeline(),a=this._buildPhotoTimeline(),i=t._location||a._location||n._location||"navigation",s={MediaContainer:{_location:i,Timeline:[t,n,a]}};e.requestDisconnect&&(s.MediaContainer._disconnected=1),this.textField.focused&&r.default.extend(s.MediaContainer,{
_textFieldFocused:"field",_textFieldContent:this.textField.content,_textFieldSecure:this.textField.secure?1:0}),(0,y.default)("[Companion Timeline] sending companion timeline"),v.default.publish(s)}},_buildVideoTimeline:function(){var e=this._buildbaseTimeline(this.players.video,"video");return e._state&&e._state!==d.default.states.STOPPED&&(e._location="fullScreenVideo"),e},_buildPhotoTimeline:function(){var e=this._buildbaseTimeline(this.players.photo,"photo");return e._state&&e._state!==d.default.states.STOPPED&&(e._location="fullScreenPhoto"),
e},_buildMusicTimeline:function(){var e=this._buildbaseTimeline(this.players.audio,"music");return e._state&&e._state!==d.default.states.STOPPED&&(e._location="fullScreenMusic"),e},_buildbaseTimeline:function(e,t){var n=(0,s.resolve)("companionPlayerProfile"),a={_type:t,_seekRange:"0-0",_time:"0",_controllable:n[t]};if(!e||!e.currentItem)return a;var i=e.currentItem,o=e.model,l=i.server,u=l.get("originalMachineIdentifier")||l.get("machineIdentifier"),d=l.get("connections"),c=l.get("activeConnection");
c.get("isLoopback")&&(c=d.findWhere({isConnected:!0,isLoopback:!1})||c);var f=o.get("duration"),p=0;o.get("repeatAll")?p=2:o.get("repeatItem")&&(p=1),a=r.default.extend(a,{_protocol:c.get("scheme"),_address:c.getAddressFromUri(),_port:c.get("port"),_token:l.get("accessToken"),_machineIdentifier:u,_guid:i.get("guid"),_key:i.get("key"),_ratingKey:i.get("ratingKey"),_duration:f,_audioStreamID:o.get("audioStreamID"),_state:o.get("state"),_subtitleStreamID:o.get("subtitleStreamID"),_time:o.get("position"),
_repeat:p,_mute:0,_shuffle:0,_volume:o.get("volume")}),f&&(a._seekRange="0-"+f);var h=o.get("playQueue");return r.default.result(h,"url")?a=r.default.extend(a,{_containerKey:"/playQueues/"+h.id,_playQueueID:h.id,_playQueueVersion:h.get("playQueueVersion"),_playQueueItemID:i.get("playQueueItemID")}):a._containerKey=r.default.result(h.get("lastAddedItem"),"url"),a}}),_=new P;t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(80),r=a(i),s=r.default.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.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(38),f=(l(c),
n(27)),p=n(29),h=l(p),m=n(1616),v=l(m),g=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n);var i=e.ignoreWidth,r=e.ignoreHeight,o=e.ignorePosition;this.state={isMeasured:!1,width:i?void 0:0,height:r?void 0:0,x:o?void 0:0,y:o?void 0:0}}return i(t,e),r(t,[{key:"componentDidMount",value:function(){this._requestFrame()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){
this._cancelFrame(),this._clearTimeout()}},{key:"_requestFrame",decorators:[f.autobind],value:function(){this._clearTimeout(),this._cancelFrame(),this._frameRequestID=requestAnimationFrame(this._measure)}},{key:"_cancelFrame",value:function(){this._frameRequestID&&(this._frameRequestID=cancelAnimationFrame(this._frameRequestID))}},{key:"_clearTimeout",value:function(){this._measureTimeoutID&&(this._measureTimeoutID=clearTimeout(this._measureTimeoutID))}},{key:"_measure",decorators:[f.autobind],value:function(){
var e=this.props,t=e.ignoreWidth,n=e.ignoreHeight,a=e.ignorePosition,i=this.refs.container,r=i.getBoundingClientRect(),s=r.width||0,o=r.height||0,l=r.left||0,u=r.top||0,d={isMeasured:!0,width:t?void 0:s,height:n?void 0:o,x:a?void 0:l,y:a?void 0:u};this.setState(d),this.props.onMeasure&&this.props.onMeasure(d),this._reset()}},{key:"_reset",value:function(){var e=this.refs.expandContainer,t=this.refs.shrinkContainer;e.scrollTop=1e5,e.scrollLeft=1e5,t.scrollTop=1e5,t.scrollLeft=1e5}},{key:"onScroll",
decorators:[f.autobind],value:function(e){this._cancelFrame(),this._clearTimeout(),this._measureTimeoutID=setTimeout(this._requestFrame,this.props.resizeTimeout)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=(e.onMeasure,"function"!=typeof n);return d.default.createElement("div",{ref:"container",className:t},a?n:n(this.state),d.default.createElement("div",{ref:"expandContainer",className:v.default.scrollContainer,onScroll:this.onScroll},{$$typeof:o,type:"div",key:null,
ref:null,props:{className:v.default.expandContent},_owner:null}),d.default.createElement("div",{ref:"shrinkContainer",className:v.default.scrollContainer,onScroll:this.onScroll},{$$typeof:o,type:"div",key:null,ref:null,props:{className:v.default.shrinkContent},_owner:null}))}}]),t}(u.Component);g.propTypes={className:u.PropTypes.string,style:u.PropTypes.object,children:u.PropTypes.oneOfType([u.PropTypes.node,u.PropTypes.func]).isRequired,ignoreWidth:u.PropTypes.bool,ignoreHeight:u.PropTypes.bool,
ignorePosition:u.PropTypes.bool,resizeTimeout:u.PropTypes.number.isRequired,onMeasure:u.PropTypes.func},g.defaultProps={className:v.default.container,ignoreWidth:!1,ignoreHeight:!1,ignorePosition:!1,resizeTimeout:100},t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(2039),c=o(d),f=n(29),p=o(f),h=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){return u.default.createElement(c.default,this.props)}}]),t}(l.Component);h.propTypes={className:l.PropTypes.string,children:l.PropTypes.node,component:l.PropTypes.string,transitionName:l.PropTypes.shape({appear:l.PropTypes.string,appearActive:l.PropTypes.string,enter:l.PropTypes.string,enterActive:l.PropTypes.string,leave:l.PropTypes.string,leaveActive:l.PropTypes.string
}).isRequired,transitionAppear:l.PropTypes.bool,transitionEnter:l.PropTypes.bool,transitionLeave:l.PropTypes.bool,transitionAppearTimeout:l.PropTypes.number,transitionEnterTimeout:l.PropTypes.number,transitionLeaveTimeout:l.PropTypes.number},h.defaultProps={component:"div",transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionEnter:!0,transitionLeave:!0},t.default=h,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});
var n="small";t.SMALL=n;var a="medium";t.MEDIUM=a;var i="large";t.LARGE=i;var r=[n,a,i];t.all=r},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(304),o=a(s),l=n(25),u=a(l),d=n(1083),c=a(d),f=u.default.extend({name:"AgentCollection",context:["server","mediaTypeID","primaryAgentID","relatedAgentID"],model:c.default,cache:new o.default,cacheKey:function(){var e=r.default.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!!r.default.intersection(this.pluck("identifier"),e).length}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(68),o=i(s),l=n(55),u=r(l),d=(0,o.default)(u.ADD_METADATA_ITEM_TO_PLAYLIST);t.addMetadataItemToPlaylist=d;var c=(0,o.default)(u.ANALYZE_METADATA_ITEM);t.analyzeMetadataItem=c;var f=(0,o.default)(u.DELETE_METADATA_ITEM);t.deleteMetadataItem=f;var p=(0,o.default)(u.DELETE_METADATA_ITEM_VERSION);t.deleteMetadataItemVersion=p;var h=(0,o.default)(u.DOWNLOAD_METADATA_ITEM_VERSION);t.downloadMetadataItemVersion=h;var m=(0,o.default)(u.EDIT_METADATA_ITEM);t.editMetadataItem=m;var v=(0,o.default)(u.FIX_METADATA_ITEM_MATCH);
t.fixMetadataItemMatch=v;var g=(0,o.default)(u.GET_METADATA_ITEM_INFO);t.getMetadataItemInfo=g;var y=(0,o.default)(u.MARK_METADATA_ITEM_UNWATCHED);t.markMetadataItemUnwatched=y;var b=(0,o.default)(u.MARK_METADATA_ITEM_WATCHED);t.markMetadataItemWatched=b;var w=(0,o.default)(u.OPTIMIZE_METADATA_ITEM);t.optimizeMetadataItem=w;var P=(0,o.default)(u.PLAY_METADATA_ITEM);t.playMetadataItem=P;var _=(0,o.default)(u.PLAY_METADATA_ITEM_VERSION);t.playMetadataItemVersion=_;var S=(0,o.default)(u.PLAY_PRIMARY_EXTRA);
t.playPrimaryExtra=S;var x=(0,o.default)(u.PLAY_RELATED_MIX);t.playRelatedMix=x;var C=(0,o.default)(u.QUEUE_METADATA_ITEM);t.queueMetadataItem=C;var T=(0,o.default)(u.RATE_METADATA_ITEM);t.rateMetadataItem=T;var k=(0,o.default)(u.RECOMMEND_METADATA_ITEM);t.recommendMetadataItem=k;var I=(0,o.default)(u.REFRESH_METADATA_ITEM);t.refreshMetadataItem=I;var M=(0,o.default)(u.SHARE_METADATA_ITEM);t.shareMetadataItem=M;var A=(0,o.default)(u.SPLIT_METADATA_ITEM_APART);t.splitMetadataItemApart=A;var E=(0,o.default)(u.SYNC_METADATA_ITEM);
t.syncMetadataItem=E;var O=(0,o.default)(u.UNMATCH_METADATA_ITEM);t.unmatchMetadataItem=O;var D=(0,o.default)(u.WATCH_METADATA_ITEM_LATER);t.watchMetadataItemLater=D;var R=(0,o.default)(u.QUEUE_METADATA_ITEM,function(e){return a({},e,{next:!1})});t.addMetadataItemToQueue=R;var L=(0,o.default)(u.PLAY_METADATA_ITEM,function(e){return a({},e,{unwatched:!1})});t.playMetadataItemAll=L;var N=(0,o.default)(u.QUEUE_METADATA_ITEM,function(e){return a({},e,{next:!0})});t.playMetadataItemNext=N;var j=(0,o.default)(u.PLAY_METADATA_ITEM,function(e){
return a({},e,{shuffle:!0})});t.shuffleMetadataItem=j},function(e,t){"use strict";function n(e){return e.experienceSettings}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,l.createSelector)((0,f.default)(),function(e){var t=o.default.pick(e,"friendlyName","machineIdentifier","allowSync","allowMediaDeletion","transcoderVideo","isFullServer","isFullOwnedServer");return t})}function i(){return(0,d.default)(a(),function(e){
return e})}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(3),o=r(s),l=n(30),u=n(300),d=r(u),c=n(76),f=r(c);e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=9;t.TAB=n;var a=13;t.ENTER=a;var i=16;t.SHIFT=i;var r=17;t.CONTROL=r;var s=27;t.ESCAPE=s;var o=38;t.UP_ARROW=o;var l=40;t.DOWN_ARROW=l;var u=91;t.META_1=u;var d=93;t.META_2=d;var c=224;t.META_3=c},function(e,t,n){"use strict";var a=n(205).default,i=n(206).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(78);a(t,i(r,a));var s="searchResults";t.SEARCH_RESULT=s;var o="syncMetadataItems";t.SYNC_METADATA_ITEM=o},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1793),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(9),f=a(c),p=n(35),h=a(p),m=n(11),v=i(m),g=n(154),y=i(g),b=n(17),w=a(b),P=n(56),_=a(P),S=n(95),x=a(S),C=n(1153),T=a(C),k=n(1168),I=a(k),M=n(1181),A=a(M),E=n(1185),O=a(E),D=n(1184),R=a(D),L=n(1180),N=a(L),j=n(1178),U=a(j),F=n(1177),B=a(F),z=n(1182),$=a(z),V=n(1179),H=a(V),q=n(1183),W=a(q),K=n(1186),Q=a(K),Y={
movie:A.default,show:O.default,season:R.default,episode:N.default,artist:U.default,album:B.default,photoAlbum:$.default,clip:H.default,userPlaylistItem:H.default,playlist:W.default},G={playlist:{blur:5,saturation:50}},X=d.default.Layout.extend({className:"details-container",template:s.default,regions:{details:".row"},events:{"click .pivot-link":"onPivotClick"},onlyAfterRender:["playTheme"],initialize:function(){var e=this.model.get("type"),t={};(0,l.default)(G).has(e)&&(t=G[e]),this.mediaActions=new x.default({},{
item:this.model,type:e,showAdvanced:!0}),v.resolve("appModel").get("primaryServer")===this.model.server&&v.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:this.model.get("librarySectionID")})),this.once("render",l.default.bind(function(){f.default.trigger("show:background",{model:this.model,imageFilters:t}),f.default.trigger("show:bar","actionbar",new T.default({model:this.model,mediaActions:this.mediaActions})),this.model.get("isLibraryItem")&&f.default.trigger("show:bar","breadcrumbbar",new I.default({
model:this.model}))},this)),this.playTheme()},playTheme:function(){if(h.default.get("playThemeMusic")){var e=this.model.get("grandparentTheme")||this.model.get("parentTheme")||this.model.get("theme");if(!e)return null;var t=new _.default({theme:e,key:e,parentKey:this.model.get("key"),type:"track",Media:[]},{server:this.model.server});w.default.execute("playBackgroundMedia",{item:t,volume:50})}},onRender:function(){var e,t=this.model.get("type");if((0,l.default)(Y).has(t)){var n=Y[t];e=new n({model:this.model,
mediaActions:this.mediaActions})}else e=new Q.default({model:this.model});this.details.append(e,this.$el)},onClose:function(){f.default.trigger("hide:bar","actionbar"),v.resolve("appModel").get("primaryServer")===this.model.server&&v.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:null})),this.model.get("isLibraryItem")&&f.default.trigger("hide:bar","breadcrumbbar")},onPivotClick:function(e){var t=this.model.section;if(t){var n=t.get("items");
n.scrollPosition=0}}});t.default=X,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=a(r),o=n(180),l=i(o),u=n(80),d=i(u),c=n(235),f=i(c),p=d.default.extend({background:!0,setup:function(e){this.model=e.model,e.noPlaceholder||(this.placeholderClass=f.default.playlist);var t=(0,l.default)(),n={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},a=this.model.get("composite");a&&(this.url=this.model.server.resolveUrl(s.join(a,n),{appendToken:!0}))}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1902),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(6),f=a(c),p=n(9),h=a(p),m=n(23),v=i(m),g=n(47),y=a(g),b=y.default.extend({name:"channelSettingsModal",className:"channel-settings-modal modal fade",
template:s.default,ui:{submitBtn:".submit-btn"},events:l.default.extend({"change input[name]":"onInputChange","change select[name]":"onInputChange","submit #channel-settings-form":"onSubmit"},y.default.prototype.events),initialize:function(){y.default.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(),l.default.isEmpty(this.changes))return void this.hide();var t=this.ui.submitBtn;if(!t.hasClass("active")){t.addClass("active");var n=this.collection.first(),a=n.getSaveParams(this.changes),i=l.default.result(this.collection,"url"),r=v.join([i,"/set"],a),s=d.default.ajax(n.server.getXHROptions(r));s.done(l.default.bind(function(){this.hide()},this)),s.fail(l.default.bind(function(){h.default.trigger("show:alert",{
type:"error",message:(0,f.default)("There was a problem saving these settings.")})},this)),s.always(function(){t.removeClass("active")})}}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1910),r=a(i),s=n(3),o=a(s),l=n(47),u=a(l),d=u.default.extend({name:"libraryFailureModal",className:"confirm-modal modal modal-sm fade",template:r.default,events:o.default.extend({"click .confirm-btn":"hide"},u.default.prototype.events),
serializeData:function(){return{serverID:this.model.id,isSignedIn:"ok"===this.model.get("myPlexSigninState"),hasPlexPass:this.model.get("myPlexSubscription")}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1975),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=c.default.ItemView.extend({className:"player-slider",template:r.default,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){o.default.bindAll(this,"onMouseMove","onMouseUp","onTouchMove","onTouchEnd"),this.$document=(0,u.default)(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,a=n/t.width();return a=Math.min(Math.max(a,0),1),a=Math.round(100*a)},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.default=f,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=i(e,["children"]);return o.default.createElement("div",n,t)}var i=n(16).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(1634),u=r(l);a.propTypes={children:s.PropTypes.node.isRequired},a.defaultProps={className:u.default.group},t.default=a,e.exports=t.default},function(e,t,n){
"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(14).default,u=n(13).default,d=n(16).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(11),m=n(6),v=c(m),g=n(27),y=n(118),b=c(y),w=n(29),P=c(w),_=n(44),S=n(157),x=c(S),C=n(562),T=c(C),k=n(563),I=c(k),M=n(566),A=c(M),E=n(564),O=c(E),D=n(565),R=c(D),L=n(1647),N=c(L),j=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isAccordGiven:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"onCancel",decorators:[g.autobind],value:function(){var e=(0,h.resolve)("metrics");e.trackClick(o({},this.props.metricsProperties,{page:this.props.metricsPage,action:"cancel"}))}},{key:"onAccordChange",decorators:[g.autobind],value:function(e){this.setState({isAccordGiven:e.target.checked})}},{key:"render",value:function(){var e=this.props,t=e.metricsPage,n=e.metricsProperties,a=e.kind,i=e.title,r=e.message,s=e.accordMessage,c=e.confirmLabel,f=e.cancelLabel,h=e.hideCancelButton,m=e.onConfirm,g=e.onCancel,y=d(e,["metricsPage","metricsProperties","kind","title","message","accordMessage","confirmLabel","cancelLabel","hideCancelButton","onConfirm","onCancel"]),w=!!s,P=w&&!this.state.isAccordGiven;
return p.default.createElement(I.default,o({className:N.default.confirmModal,metricsPage:t,metricsProperties:n,onModalClose:(0,b.default)(this.onCancel,g)},y),{$$typeof:u,type:A.default,key:null,ref:null,props:l(A.default.defaultProps,{children:i,className:N.default.modalHeader}),_owner:null},{$$typeof:u,type:O.default,key:null,ref:null,props:l(O.default.defaultProps,{children:[r,w&&{$$typeof:u,type:"label",key:null,ref:null,props:{children:[{$$typeof:u,type:"input",key:null,ref:null,props:{type:"checkbox",
className:N.default.accordInput,checked:this.state.isAccordGiven,onChange:this.onAccordChange},_owner:null},s],className:N.default.accordLabel},_owner:null}],bodyClassName:N.default.modalBody}),_owner:null},{$$typeof:u,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{children:[!h&&{$$typeof:u,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{children:f||(0,v.default)("Cancel"),className:N.default.cancelButton,kind:_.kinds.DEFAULT,onPress:(0,b.default)(this.onCancel,g)
}),_owner:null},p.default.createElement(T.default,o({},n,{page:t,action:"confirm"}),{$$typeof:u,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{children:c||(0,v.default)("OK"),className:N.default.confirmButton,"data-autofocus":!0,kind:a,isDisabled:P,onPress:m}),_owner:null})],className:N.default.modalFooter}),_owner:null})}}]),t}(f.Component);j.propTypes={className:f.PropTypes.string,metricsPage:f.PropTypes.string.isRequired,metricsProperties:f.PropTypes.object,kind:f.PropTypes.oneOf(_.kinds.all),
title:f.PropTypes.string.isRequired,message:f.PropTypes.string.isRequired,accordMessage:f.PropTypes.string,confirmLabel:f.PropTypes.string,cancelLabel:f.PropTypes.string,hideCancelButton:f.PropTypes.bool,onConfirm:f.PropTypes.func.isRequired,onCancel:f.PropTypes.func},j.defaultProps={kind:_.kinds.PRIMARY},t.default=j,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(34),c=n(81),f=n(1446),p=o(f),h=function(e){
function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"componentWillUnmount",value:function(){this.props.garbageCollectEntities()}},{key:"render",value:function(){return u.default.createElement(p.default,this.props)}}]),t}(l.Component);h.propTypes={garbageCollectEntities:l.PropTypes.func.isRequired},t.default=(0,d.connect)(null,{garbageCollectEntities:c.garbageCollectEntities})(h),e.exports=t.default},function(e,t,n){"use strict";
function a(e){var t=e.children,n=i(e,["children"]);return l.default.createElement("div",r({className:d.default.pageHeader},n),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1669),d=s(u);a.propTypes={children:o.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=i(e,["children"]);return l.default.createElement("div",r({className:d.default.pageHeaderLeft},n),t)}var i=n(16).default,r=n(12).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1671),d=s(u);a.propTypes={children:o.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=i(e,["children"]);return l.default.createElement("div",r({className:d.default.pageHeaderRight},n),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1672),d=s(u);a.propTypes={children:o.PropTypes.node},t.default=a,
e.exports=t.default},function(e,t,n){"use strict";function a(e){return{isWaitingForPrimaryServer:e.isWaitingForPrimaryServer,primaryServerEntityID:e.primaryServer}}var i=n(21).default,r=n(22).default,s=n(50).default,o=n(20).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(34),f=n(79),p=n(81),h=n(1447),m=l(h),v=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),s(t,[{key:"componentWillMount",
value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.machineIdentifier&&e.machineIdentifier!==this.props.machineIdentifier&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,f.scheduleImmediateUpdate)(function(){e.machineIdentifier&&e.changePrimaryServer(e.machineIdentifier)})}},{key:"render",value:function(){return d.default.createElement(m.default,this.props)}}]),t}(u.Component);v.propTypes={
machineIdentifier:u.PropTypes.string,changePrimaryServer:u.PropTypes.func.isRequired},t.default=(0,c.connect)(a,{changePrimaryServer:p.changePrimaryServer})(v),e.exports=t.default},function(e,t,n){"use strict";function a(e){return{primaryServerEntityID:e.primaryServer,serverEntityIDs:e.servers}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(34),s=n(81),o=n(1495),l=i(o),u={onServerMenuOpen:s.discoverServers},d=(0,r.connect)(a,u)(l.default);t.default=d,e.exports=t.default;
},function(e,t,n){"use strict";function a(e,t){if(t)switch(t){case l.default.PRE_PLAY:switch(e){case"episode":return c}break;case l.default.CONTINUE_WATCHING:return c}switch(e){case"movie":return u;case"show":return u;case"season":return u;case"episode":return u;case"artist":return d;case"album":return d;case"track":return d;case"photo":return d;case"photoAlbum":return d;case"clip":return c;case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":case"concert":return c;case"mixed":return u;default:
return d}}function i(e,t,n){var i=a(t,n);return Math.round(e*i)}function r(e,t,n){var i=a(t,n);return Math.round(e/i)}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAspectRatio=a,t.getWidth=i,t.getHeight=r;var o=n(99),l=s(o),u=1/1.5;t.PORTRAIT=u;var d=1;t.SQUARE=d;var c=16/9;t.LANDSCAPE=c},function(e,t,n){"use strict";var a=n(595).default;t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return a(e)},t.__esModule=!0;
},function(e,t,n){var a=n(371);e.exports=function(e){if(!a(e))throw TypeError(e+" is not an object!");return e}},,,,,,,,function(e,t,n){"use strict";var a={};e.exports=a},function(e,t,n){"use strict";var a=n(33),i=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:a(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,
onMouseMoveCapture:!0,onMouseUpCapture:!0},a={getNativeProps:function(e,t){if(!t.disabled)return t;var a={};for(var i in t)!n[i]&&t.hasOwnProperty(i)&&(a[i]=t[i]);return a}};e.exports=a},function(e,t,n){"use strict";function a(){if(o)for(var e in l){var t=l[e],n=o.indexOf(e);if(n>-1?void 0:s(!1),!u.plugins[n]){t.extractEvents?void 0:s(!1),u.plugins[n]=t;var a=t.eventTypes;for(var r in a)i(a[r],t,r)?void 0:s(!1)}}}function i(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?s(!1):void 0,u.eventNameDispatchConfigs[n]=e;
var a=e.phasedRegistrationNames;if(a){for(var i in a)if(a.hasOwnProperty(i)){var o=a[i];r(o,t,n)}return!0}return!!e.registrationName&&(r(e.registrationName,t,n),!0)}function r(e,t,n){u.registrationNameModules[e]?s(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var s=n(33),o=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){
o?s(!1):void 0,o=Array.prototype.slice.call(e),a()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?s(!1):void 0,l[n]=i,t=!0)}t&&a()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var a=u.registrationNameModules[t.phasedRegistrationNames[n]];
if(a)return a}return null},_resetEventPlugins:function(){o=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var a=u.registrationNameModules;for(var i in a)a.hasOwnProperty(i)&&delete a[i]}};e.exports=u},function(e,t,n){"use strict";var a=n(54),i=n(636),r=n(638),s=n(637),o=n(2061),l=n(88),u=(n(643),n(652)),d=n(654),c=n(664),f=(n(45),l.createElement),p=l.createFactory,h=l.cloneElement,m=a,v={Children:{
map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:c},Component:r,createElement:f,cloneElement:h,isValidElement:l.isValidElement,PropTypes:u,createClass:s.createClass,createFactory:p,createMixin:function(e){return e},DOM:o,version:d,__spread:m};e.exports=v},function(e,t,n){"use strict";function a(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=h++,f[e[v]]={}),f[e[v]]}var i,r=n(54),s=n(103),o=n(274),l=n(2075),u=n(655),d=n(661),c=n(404),f={},p=!1,h=0,m={topAbort:"abort",topAnimationEnd:d("animationend")||"animationend",
topAnimationIteration:d("animationiteration")||"animationiteration",topAnimationStart:d("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",
topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",
topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:d("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",
topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),g=r({},l,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=a(n),r=o.registrationNameDependencies[e],l=s.topLevelTypes,u=0;u<r.length;u++){
var d=r[u];i.hasOwnProperty(d)&&i[d]||(d===l.topWheel?c("wheel")?g.ReactEventListener.trapBubbledEvent(l.topWheel,"wheel",n):c("mousewheel")?g.ReactEventListener.trapBubbledEvent(l.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(l.topWheel,"DOMMouseScroll",n):d===l.topScroll?c("scroll",!0)?g.ReactEventListener.trapCapturedEvent(l.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(l.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):d===l.topFocus||d===l.topBlur?(c("focus",!0)?(g.ReactEventListener.trapCapturedEvent(l.topFocus,"focus",n),
g.ReactEventListener.trapCapturedEvent(l.topBlur,"blur",n)):c("focusin")&&(g.ReactEventListener.trapBubbledEvent(l.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(l.topBlur,"focusout",n)),i[l.topBlur]=!0,i[l.topFocus]=!0):m.hasOwnProperty(d)&&g.ReactEventListener.trapBubbledEvent(d,m[d],n),i[d]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){
if(void 0===i&&(i=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!i&&!p){var e=u.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),p=!0}}});e.exports=g},function(e,t,n){"use strict";var a={};e.exports=a},function(e,t,n){"use strict";var a=n(272),i=a({prop:null,context:null,childContext:null});e.exports=i},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(212),r=n(655),s=n(401),o={screenX:null,screenY:null,clientX:null,clientY:null,
ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:s,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+r.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+r.currentScrollTop}};i.augmentClass(a,o),e.exports=a},function(e,t,n){"use strict";var a=n(33),i={reinitializeTransaction:function(){
this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,i,r,s,o,l){this.isInTransaction()?a(!1):void 0;var u,d;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),d=e.call(t,n,i,r,s,o,l),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(c){}else this.closeAll(0)}finally{
this._isInTransaction=!1}}return d},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var a=t[n];try{this.wrapperInitData[n]=r.OBSERVED_ERROR,this.wrapperInitData[n]=a.initialize?a.initialize.call(this):null}finally{if(this.wrapperInitData[n]===r.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(i){}}}},closeAll:function(e){this.isInTransaction()?void 0:a(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var i,s=t[n],o=this.wrapperInitData[n];try{i=!0,o!==r.OBSERVED_ERROR&&s.close&&s.close.call(this,o),
i=!1}finally{if(i)try{this.closeAll(n+1)}catch(l){}}}this.wrapperInitData.length=0}},r={Mixin:i,OBSERVED_ERROR:{}};e.exports=r},function(e,t){"use strict";function n(e){return i[e]}function a(e){return(""+e).replace(r,n)}var i={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},r=/[&><"']/g;e.exports=a},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=r.default.extend({"interface":["publish","subscribe","unsubscribe","registerPlayer","getDeepLink"]
});t.default=new s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({"interface":["init","enable","disable","set","capture"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({props:["shortcuts"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(74),r=a(i),s=new r.default({props:["capabilities","video","music","photo"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=a(i),s=n(31),o=a(s),l=n(26),u=a(l),d=o.default.extend({getStorage:function(){},get:function(e){var t=this;return this._catchStorageError(function(n){var a=window.PLEXWEB,i=a&&e in a?a[e]:n.getItem(e);if(null==i)throw new Error(e+" is not in "+t.name);return i})},
set:function(e,t){var n=this;return this._catchStorageError(function(a){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 a.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=r.default.Deferred();
try{t.resolve(e(this.getStorage()))}catch(n){u.default.warn(n.message),t.reject(n)}return t.promise()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(42),u=a(l),d=n(876),c=a(d),f=n(874),p=a(f),h=n(875),m=a(h),v=n(140),g=a(v),y=n(443),b=a(y),w=n(788),P=a(w),_={playbackDuration:0,modelDefaults:function(){var e=r.default.omit(r.default.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,a=!!this.nextItem&&!this.currentItem.get("isAdvertisement");
return this.webRadioUsage&&a&&(a=this.webRadioUsage.get("canSkipNext")),r.default.extend(e,{playQueueItem:this.currentItem,metadataItem:this.currentItem.get("metadataItem"),type:this.type,canRepeat:!0,canSkipPrevious:n,canSkipNext:a,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");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));var n=this.currentItem.get("advertisement");return n&&(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=r.default.wrap(this.stop,r.default.bind(function(e){return!this.model||this.model.get("stopped")?o.default.Deferred().resolve().promise():e.apply(this,[].slice.call(arguments,1));
},this)),this.seekBackward=r.default.bind(this.seek,this,-1e4,0,0),this.seekForward=r.default.bind(this.seek,this,3e4,0,3e3)},request:function(e){return this.pendingRequests||(this.pendingRequests=[]),this.pendingRequests.push(e),e.always(r.default.bind(function(){var t=r.default.indexOf(this.pendingRequests,e);this.pendingRequests.splice(t,1)},this)),e},waitForRequests:function(){return o.default.when.apply(o.default,this.pendingRequests)},reset:function(e){this.currentItem&&(this.timeline({state:u.default.states.STOPPED,
continuing:!0}),this.stopTimeline(),this.stopSession()),this.currentItem=e,this.previousItem=this.getPreviousItem(e),this.nextItem=this.getNextItem(e),this.setRadioPolicy();var t=r.default.extend(r.default.result(this,"modelDefaults"),this.modelOverrides());return this.model.set(t),e},getItemAtOffset:function(e,t,n){if(t||(t=this.model.get("playQueueItem")),!t)return null;var a=this.model.get("playQueue"),i=t.get("ratingKey");if(!i)return null;n||(n={});var r=a.get("collection"),s=r.findWhere({ratingKey:i
}),o=r.indexOf(s),l=o+e,u=n.loop&&r.length>1||this.model.get("repeatAll");return l>=0&&l<r.length?r.at(l):u?(l=(l+r.length)%r.length,r.at(l)):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")===u.default.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,a){var i=this.model.get("position")+e,r=0+(t>=0?t:0),s=this.model.get("duration")-(n>=0?n:0);i=Math.max(r,Math.min(i,s)),this.setPosition(i,a)},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,a=this.getNextItem(n),i=a&&this.getNextItem(a);a&&i||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"),a=n.get("collection"),i=a.findWhere({
key:e});return this.reset(i)},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(r.default.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(){var e=this.model.get("playQueue");e.fetch()},stop:function(e){this._fadeInterval&&clearInterval(this._fadeInterval),e&&e.silent||this.model.set("state",u.default.states.STOPPED);var t=this.model.get("metadataItem"),n=t.server.get("playQueueManager");if(n){var a=this.model.get("playQueue"),i=n.getFor(t);i&&a&&i===a&&n.remove(a.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(r.default.bind(function(){var e=this.model.get("volume");e<=0?this.stop():this.decreaseVolume(5)},this),50)},timeline:function(e){return e||(e={}),r.default.defaults(e,this.model.attributes),this.companion||!e.metadataItem?o.default.Deferred().resolve().promise():this.request((0,c.default)(e))},startTimeline:function(){
this.companion||this.serverTimelineInterval||(this.serverTimelineInterval=setInterval(r.default.bind(this.timeline,this),c.default.DELAY))},stopTimeline:function(){this.serverTimelineInterval=clearInterval(this.serverTimelineInterval),this.trackPlaybackEvent()},updatePlayQueue:function(){var e=this.model.get("playQueue"),t=this.model.get("playQueueItem");return e.get("playQueueSelectedItemID")!==t.get("playQueueItemID")?e.fetch():o.default.Deferred().resolve().promise()},ping:function(){return this.companion?o.default.Deferred().resolve().promise():this.request((0,
p.default)(this.model.get("transcodeServer"),this.transcodeSessionID))},startPing:function(){var e=this.model.get("directPlay"),t=!this.companion&&this.type!==u.default.types.PHOTO;!t||e||this.pingInterval||(this.pingInterval=setInterval(r.default.bind(this.ping,this),p.default.DELAY))},stopPing:function(){this.pingInterval=clearInterval(this.pingInterval)},stopSession:function(e){var t=this.transcodeSessionID,n=t||r.default.uniqueId("no-session-"),a=e&&e.xhrOptions||{};if(this.stoppedSessions.hasOwnProperty(n))return this.stoppedSessions[n];
this.subcontroller&&this.subcontroller.stop(e);var i;return i=t&&this.type!==u.default.types.PHOTO&&!this.model.get("directPlay")?this.request((0,m.default)(this.model.get("transcodeServer"),t,a)):o.default.Deferred().resolve().promise(),this.stoppedSessions[n]=i,i},startPlaybackTracking:function(){this.companion||this.playbackInterval||(this.playbackInterval=setInterval(r.default.bind(function(){this.playbackDuration++},this),1e3))},stopPlaybackTracking:function(){this.playbackInterval=clearInterval(this.playbackInterval);
},trackPlaybackEvent:function(){if(!this.companion){b.default.incPlaybackCount();var e=this.model.get("metadataItem"),t=e.get("identifier");g.default.trackEvent({eventCategory:"Playback",eventAction:e.get("type"),eventLabel:t,eventValue:this.playbackDuration}),this.playbackDuration=0}},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=r.default.extend(r.default.pick(e.attributes,P.default.playQueueAttributes),{playQueue:e});this.webRadioUsage=new P.default(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(r.default.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 a=n.length-1;a>=0;a--){var i=n.at(a),r=i.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 a=0;a<n.length;a++){var i=n.at(a),r=i.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.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(219),o=a(s),l=r.default.extend({name:"PlayQueueItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(142),o=a(s),l=r.default.extend({
name:"SectionCollection",context:["server"],model:o.default,url:"/library/sections"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(6),o=a(s),l=n(18),u=a(l),d=n(19),c=a(d),f=["all","recentlyAdded","recentlyViewed","recentlyViewedShows","onDeck","newest","folder"],p=c.default.extend({name:"SectionSubsetModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{
selected:u.default.boolean},syncedAttrs:{key:u.default.string,title:u.default.string,secondary:u.default.boolean},derivedAttrs:{primary:function(){return!this.get("secondary")&&r.default.contains(f,this.get("key"))}},defaults:{selected:!1},augmentResponse:function(e){return"all"===e.key&&(e.title=(0,o.default)("All")),e}},{whitelistedPrimaryKeySubsets:f});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});
var r=n(3),s=a(r),o=n(5),l=a(o),u=n(23),d=i(u),c=n(130),f=a(c),p=n(18),h=a(p),m=n(19),v=a(m),g=n(777),y=a(g),b=v.default.extend({name:"PlaylistModel",context:["server","containerKey"],idAttribute:"ratingKey",rootPropertyName:"Playlist",urlRoot:"/playlists",saveUrl:function(){return"/library/metadata/"+this.id},sessionAttrs:{isPlaylist:h.default.boolean,isLibraryItem:h.default.boolean},syncedAttrs:{ratingKey:h.default.string,key:h.default.string,guid:h.default.string,type:h.default.string,playlistType:h.default.string,
title:h.default.string,titleSort:h.default.string,composite:h.default.string,summary:h.default.string,smart:h.default.boolean,allowSync:h.default.boolean,duration:h.default.integer,durationInSeconds:h.default.integer,leafCount:h.default.integer,addedAt:h.default.integer,updatedAt:h.default.integer},sessionRelations:{children:{relationClass:y.default,attrs:function(e){var t={};return"audio"===e.playlistType&&(t.includeRelated=1),{containerKey:d.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}:{},a=d.join([s.default.result(this,"url"),"/items/",e,"/move"],n),i=s.default.extend(this.server.getXHROptions(a),{type:"PUT"}),r=l.default.ajax(i),o=this.get("children").getCollection(),u=this.findItem(e);o.remove(u);var c=this.findItem(t),f=c?o.indexOf(c)+1:0;return o.add(u,{at:f
}),r}},removeItem:function(e){var t=this;if(void 0!==e){var n=d.join([s.default.result(this,"url"),"/items/",e]),a=s.default.extend(this.server.getXHROptions(n),{type:"DELETE"}),i=l.default.ajax(a);i.then(function(e){t.set(t.parse(e))});var r=this.get("children").getCollection(),o=this.findItem(e);return r.remove(o),i}},addContent:function(e,t){var n=this,a=this.isNew()?"POST":"PUT",i=[s.default.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=f.default.uri(e,t);var o=d.join(i,r),u=s.default.extend(e.server.getXHROptions(o),{type:a}),c=l.default.ajax(u);return c.then(function(e){n.set(n.parse(e))}),c.promise()},isLibraryItem:function(e,t){return!0},isPlexMusicItem:function(){return!1}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=a(i),s=n(38),o=a(s),l={fetch:function(){return(0,
o.default)(!1,"A model or collection with a controlled populate promise cannot be fetched directly"),this.populatePromise},hasPendingPopulate:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},_resetPopulate:function(){return this.hasPendingPopulate()||(this._populateDeferred=r.default.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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),r=a(i),s=n(18),o=a(s),l=n(56),u=a(l),d=n(219),c=a(d),f=n(174),p=a(f),h=n(425),m=a(h),v=n(72),g=a(v),y=n(42),b=a(y),w=r.default.extend({
name:"PlayerModel",sessionAttrs:{playQueueItem:o.default.instanceOf(c.default),metadataItem:o.default.instanceOf(u.default),media:o.default.object,part:o.default.object,url:o.default.string,subtitlesUrl:o.default.string,playQueue:o.default.instanceOf(p.default,m.default),transcodeServer:o.default.instanceOf(g.default),friendlyName:o.default.string,mediaIndex:o.default.integer,partIndex:o.default.integer,partCount:o.default.integer,qualityIndex:o.default.integer,videoStreamID:o.default.integer,audioStreamID:o.default.integer,
subtitleStreamID:o.default.integer,type:o.default.oneOf(b.default.types.VIDEO,b.default.types.MUSIC,b.default.types.PHOTO),state:o.default.oneOf(b.default.states.STOPPED,b.default.states.PAUSED,b.default.states.PLAYING,b.default.states.BUFFERING,b.default.states.ERROR),bufferingMessage:o.default.string,errorMessage:o.default.string,ready:o.default.boolean,loaded:o.default.boolean,ended:o.default.boolean,finished:o.default.boolean,embedHtml:o.default.string,duration:o.default.integer,position:o.default.float,
lastSeekPosition:o.default.integer,offset:o.default.integer,volume:o.default.integer,startBuffer:o.default.integer,endBuffer:o.default.float,percentBuffered:o.default.integer,shuffled:o.default.boolean,repeatAll:o.default.boolean,repeatItem:o.default.boolean,directPlay:o.default.boolean,videoDimensions:o.default.object,playbackSessionID:o.default.string,transcodeSessionID:o.default.string,softSubtitlesFailed:o.default.boolean,forceWebkitVideoFullscreen:o.default.boolean,canPlayPause:o.default.boolean,
canStop:o.default.boolean,canSeek:o.default.boolean,canSetVolume:o.default.boolean,canSetVideoStream:o.default.boolean,canSetAudioStream:o.default.boolean,canSetSubtitleStream:o.default.boolean,canSetQuality:o.default.boolean,canShuffle:o.default.boolean,canRepeat:o.default.boolean,canLyrics:o.default.boolean,canSkipPrevious:o.default.boolean,canSkipNext:o.default.boolean,showSeekBar:o.default.boolean,showAudioStream:o.default.boolean,showSubtitleStream:o.default.boolean,showQuality:o.default.boolean,
showPlayQueue:o.default.boolean,showShuffle:o.default.boolean,showRepeat:o.default.boolean,showLyrics:o.default.boolean,showMinimize:o.default.boolean,showMaximize:o.default.boolean,showEnterFullscreen:o.default.boolean,showExitFullscreen:o.default.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:b.default.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")===b.default.states.STOPPED},paused:function(){return this.get("state")===b.default.states.PAUSED;
},playing:function(){return this.get("state")===b.default.states.PLAYING},buffering:function(){return this.get("state")===b.default.states.BUFFERING},error:function(){return this.get("state")===b.default.states.ERROR},positionPercentage:function P(){var e=this.get("duration"),t=this.get("position"),P=e?Math.min(Math.max(t/e*100,0),100):0;return P}},initialize:function(){this.on("change:state",this.onStateChange)},onStateChange:function(e,t){t!==b.default.states.STOPPED&&e.set("ended",!1)}});t.default=w,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(40),r=a(i),s=n(67),o=a(s),l=n(219),u=a(l),d=o.default.extend({model:u.default,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")}),n=this.collection.indexOf(t),a=r.default.getChildMediaType(e.get("type")).element,i=this.windowSize[a],s=this.collection.reject(function(e){return e.get("advertisement")}).slice(n+1,n+i);if(this.parent.get("repeatAll")){var o=Math.max(i-s.length,0),l=this.collection.slice(0,Math.min(n,o));
s=s.concat(l)}this.set(s)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(106),u=a(l),d=n(57),c=a(d),f=n(327),p=a(f),h=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:e;
},m=o.default.extend({name:"ConnectionCollection",context:["server"],model:u.default,getBestConnection:function(){var e=c.default.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 r.default.reduce(n,h)},hasBetterConnectionCandidates:function(){var e=this.server&&this.server.get("activeConnection");return this.some(function(t){var n=t.get("isUntested")||t.get("isPending"),a=!e||t!==e&&h(t,e)===t;
return n&&a})},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")&&p.default.isValidV4Address(n)){var a=p.default.getV4Subnet(n);return e||(e=a),e!==a}})}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(131),o=a(s),l=n(18),u=a(l),d=n(186),c=a(d),f=c.default.extend({name:"SyncItemModel",context:["server","device"],urlRoot:function(){if(this.device)return"/devices/"+this.device.get("clientIdentifier")+"/sync_items"},syncedAttrs:r.default.extend({},c.default.prototype.syncedAttrs,{version:{type:u.default.integer,save:!0},metadataType:{type:u.default.string,save:!0},rootTitle:{type:u.default.string,save:!0},machineIdentifier:{
type:u.default.string,save:!0},Server:u.default.object}),defaults:function(){return{Location:{},Device:{},Server:{}}},sync:function(e,t,n){var a=o.default.addVersionHeaderForDevice(this.device,n);return c.default.prototype.sync.call(this,e,t,a)},getSaveParams:function(e,t){var n=c.default.prototype.getSaveParams.apply(this,arguments),a=n.Item;return r.default.each(a,function(e,t){""===e&&delete a[t]}),{SyncItem:a}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({urlRoot:"/api/home/users",whitelistedAttrs:["id","uuid","admin","protected","restricted","guest","title","username","email","thumb"],convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return t.User&&(t=t.User),o.default.parseInteger(t,"id"),o.default.parseBoolean(t,["admin","protected","restricted","guest"]),t},parse:function(e){var t=this.convert(e);return t=r.default.pick(t,this.whitelistedAttrs);
},getSaveParams:function(e,t){if(r.default.isEmpty(e)){var n={};return this.get("restricted")?n.title=this.get("title"):this.isNew()&&(n.invitedEmail=this.get("username")),n}return u.default.prototype.getSaveParams.apply(this,arguments)}});t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="RESET_PRIMARY_SERVER";t.RESET_PRIMARY_SERVER=n;var a="CHANGE_PRIMARY_SERVER";t.CHANGE_PRIMARY_SERVER=a;var i="CONFIRM_RELAY_CONNECTION";t.CONFIRM_RELAY_CONNECTION=i;
},function(e,t,n){"use strict";function a(e){var t=e.key,n=e.actionSuffix,a=e.getModel,i=(0,s.default)(t||n),r=(0,l.default)(t),o="is"+r+"Populated";return function(e,t,n){var r=a(e,t);r.get(o)||n({type:"FETCH_"+i,payload:t})}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(497),s=i(r),o=n(147),l=i(o);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),r=n(333),s=a(r),o=(0,i.createSelectorCreator)(i.defaultMemoize,s.default);
t.default=o,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,r.createSelector)(function(e,t){var n=t.metadataItemEntityID;return n},o.default,function(e,t){return t[e]})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(30),s=n(224),o=i(s);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),r=n(144),s=a(r),o=(0,i.createSelector)(s.default,function(e){return e.servers;
});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(31),o=a(s),l=n(9),u=a(l),d=n(26),c=a(d),f=n(48),p=a(f),h=o.default.extend({mixins:p.default,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(u.default,{"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,r.default.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,r.default.first(this.cycles)))},getItemCacheKey:function(e){return r.default.result(e,"cacheKey")},setItemCycle:function(e,t,n){var a=e._cacheCycle;
a&&a.hasOwnProperty(t)&&delete a[t],e._cacheCycle=n,n[t]=e},cycle:function(){this.size>this.maxSize&&(c.default.warn("Cache overflow, size: "+this.size),r.default.each(this.cycles.slice(1),this.removeCycle,this)),this.cycles.unshift({}),this.cycles.length>Math.max(this.maxCycles,1)&&this.removeCycle(r.default.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){r.default.each(r.default.values(e),this.remove,this);var t=r.default.indexOf(this.cycles,e);this.cycles.splice(t,1)},clearWhere:function(e){var t=r.default.where(r.default.values(this._cache),e);r.default.each(t,this.remove,this)},clearAll:function(){r.default.each(r.default.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.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(303),o=a(s),l=o.default.extend({maxCycles:3,maxSize:20,get:function(e){var t=o.default.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=r.default.result(e,"url");return e.server&&(t=e.server.getScopedKey(t)),t}});t.default=l,
e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="https://forums.plex.tv";t.FORUMS_URL=n;var a="https://support.plex.tv";t.SUPPORT_URL=a;var i="https://status.plex.tv";t.SYSTEM_STATUS_URL=i;var r="https://plex.tv/subscription/about";t.PLEX_PASS_INFO_URL=r;var s="https://plex.tv/gifts";t.PLEX_PASS_GIFT_URL=s;var o="https://plex.tv/subscription/new";t.PLEX_PASS_SUBSCRIBE_URL=o},function(e,t,n){"use strict";function a(e,t){return e?s.default.reduce(t,function(t,n,a){
return e[a]!==n&&(t[a]=n),t},{}):t}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(487),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(498),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(323),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t){"use strict";function n(e){if(!e||"object"!=typeof e)return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&a(n)===i}Object.defineProperty(t,"__esModule",{value:!0
}),t.default=n;var a=function(e){return Function.prototype.toString.call(e)},i=a(Object);e.exports=t.default},function(e,t,n){"use strict";function a(e,t){if((0,s.default)(null!=t,"No `minVersion` supplied to `isVersionOrNewer`. Have you misspelled a constant?"),!e)return!0;for(var n=t.split("."),a=e.split("."),i=0,r=n.length;i<r;i++)if(i<a.length){var o=parseInt(n[i],10),l=parseInt(a[i],10);if(o<l)return!0;if(o>l)return!1}return!0}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
}),t.default=a;var r=n(38),s=i(r);e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){if(e){var a=(0,l.default)(e,{streamType:t.id});s.default.each(a,function(e){e.selected=e.id===n})}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(92),l=i(o);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(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)));
}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e=parseInt(e,10),e?e<2?(0,s.default)("Mono"):e<3?(0,s.default)("Stereo"):(e-1).toString()+".1":""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){return e?"dca"===e?"DTS":e.toUpperCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default;
},function(e,t){"use strict";function n(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=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(e=parseInt(e,10),s.default.isNaN(e))return"";var t=e<10?"0":"";return t+e}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default;
},function(e,t,n){"use strict";function a(e,t){var n=s.default.pick(t,"type","controller","media","offset","media","autoplay","useMiniPlayer","isSwitchingPlayers","inline","playQueue","isFromCompanion","background"),a=t.playQueue;if(e=a?a.get("selectedItem"):e,n.model=e,n.autoplay=n.autoplay!==!1,e&&"track"===e.get("type")){var i=e.get("metadataItem")||e,r=t.enableTrackOffsets?i.get("viewOffset"):null;s.default.isNumber(r)&&(n.offset=r)}return n.offset&&(n.offset=parseInt(n.offset,10)||0),n.type||(n.type=l.default.getTypeByElement((0,
d.default)(e))),n}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(42),l=i(o),u=n(888),d=i(u);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(26),o=a(s),l={ORIGINAL:-1,qualities:{},getQualityByIndex:function(e){if(e<0)return{index:this.ORIGINAL};var t={index:e};return r.default.each(this.qualities,function(n,a){t[a]=r.default.result(this.qualities,a)[e]},this),
t},getQualityCount:function(){var e=r.default.first(r.default.keys(this.qualities));return r.default.result(this.qualities,e).length},getQualityAttribute:function(e){var t,n=e.get("isLibraryItem"),a=e.get("isExtra")&&!/^file:\/\//.test(e.get("guid"));return t=n&&!a?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),a=t.get(n);
return a>=this.getQualityCount()&&(o.default.warn("Quality index "+a+" is out of bounds"),a=t.defaults[n],t.save(n,a)),r.default.extend(this.getQualityByIndex(a),{attribute:n})},getAvailableQualities:function(e){e||(e={});var t=e.lowestQualityIndex,n=e.highestQualityIndex,a=e.comparator,i=[];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 i;if(a&&a.call(this,r))return i;i.push(this.getQualityByIndex(r))}return i},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 a=0,i=e.length;a<i;a++){var r=e[a];if(r>t)break;n=a}}return n}};t.default=l,
e.exports=t.default},function(e,t,n){"use strict";function a(e){return e=s.default.isArray(e)?e:s.default.toArray(arguments),l.default.when.apply(l.default,s.default.map(e,d.default))}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(116),d=i(u);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.toUpperCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";
function n(){return Math.random().toString(36).substr(2)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(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=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){if(!e)return"";if(e.length>t){n=n||Math.floor((t-3)/2);
var a=t-3-n;return e.substr(0,n)+"..."+e.substr(e.length-a)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(149),o=a(s),l=["id","typeString"],u=(0,o.default)(l,[{id:1,typeString:"trailer",title:function(){return(0,r.default)("Trailer")}},{id:2,typeString:"deletedScene",title:function(){return(0,r.default)("Deleted Scene")}},{id:3,typeString:"interview",
title:function(){return(0,r.default)("Interview")}},{id:4,typeString:"musicVideo",title:function(){return(0,r.default)("Music Video")}},{id:5,typeString:"behindTheScenes",title:function(){return(0,r.default)("Behind the Scenes")}},{id:6,typeString:"scene",title:function(){return(0,r.default)("Scene")}},{id:7,typeString:"liveMusicVideo",title:function(){return(0,r.default)("Live Music Video")}},{id:8,typeString:"lyricMusicVideo",title:function(){return(0,r.default)("Lyric Music Video")}},{id:9,typeString:"concert",
title:function(){return(0,r.default)("Concert")}},{id:10,typeString:"featurette",title:function(){return(0,r.default)("Featurette")}},{id:11,typeString:"short",title:function(){return(0,r.default)("Short")}},{id:12,typeString:"other",title:function(){return(0,r.default)("Other")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(149),o=a(s),l=["id","typeString"],u=(0,o.default)(l,[{id:0,typeString:"tag",
title:function(){return(0,r.default)("Tag")}},{id:1,typeString:"genre",title:function(){return(0,r.default)("Genre")}},{id:2,typeString:"collection",title:function(){return(0,r.default)("Collection")}},{id:3,typeString:"bookmark",title:function(){return(0,r.default)("Bookmark")}},{id:4,typeString:"director",title:function(){return(0,r.default)("Director")}},{id:5,typeString:"writer",title:function(){return(0,r.default)("Writer")}},{id:6,typeString:"actor",title:function(){return(0,r.default)("Actor");
}},{id:7,typeString:"producer",title:function(){return(0,r.default)("P")}},{id:8,typeString:"country",title:function(){return(0,r.default)("country")}},{id:9,typeString:"chapter",title:function(){return(0,r.default)("Chapter")}},{id:10,typeString:"review",title:function(){return(0,r.default)("Review")}},{id:11,typeString:"label",title:function(){return(0,r.default)("Label")}},{id:42,typeString:"versionBackgroundProcessingTarget",title:function(){return(0,r.default)("Version Background Processing Target");
}},{id:200,typeString:"make",title:function(){return(0,r.default)("Make")}},{id:201,typeString:"model",title:function(){return(0,r.default)("Model")}},{id:202,typeString:"aperture",title:function(){return(0,r.default)("Aperture")}},{id:203,typeString:"exposure",title:function(){return(0,r.default)("Exposure")}},{id:204,typeString:"iso",title:function(){return(0,r.default)("ISO")}},{id:205,typeString:"lens",title:function(){return(0,r.default)("Lens")}},{id:206,typeString:"device",title:function(){
return(0,r.default)("Device")}},{id:300,typeString:"mood",title:function(){return(0,r.default)("Mood")}},{id:301,typeString:"bpm",title:function(){return(0,r.default)("BPM")}},{id:302,typeString:"composer",title:function(){return(0,r.default)("Composer")}},{id:303,typeString:"featuring",title:function(){return(0,r.default)("Featuring")}},{id:304,typeString:"trackArtist",title:function(){return(0,r.default)("Track Artist")}},{id:305,typeString:"similarArtist",title:function(){return(0,r.default)("Similar Artist");
}},{id:306,typeString:"concert",title:function(){return(0,r.default)("Concert")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=u.exec(e);if(null!=t)return{octets:o.default.map(o.default.rest(t),function(e){return parseInt(e,10)})}}function i(e){if(d.test(e)){var t=e.split("::"),n=t[0].match(c),a={parts:[]};if(null!=n){if(n.length>8)return;a.parts=o.default.map(n,function(e){return parseInt(e,16)})}if(t.length>1){var i=t[1].match(c),r=o.default.map(i,function(e){
return parseInt(e,16)}),s=8-a.parts.length-r.length;if(s<0||8===s)return;o.default.times(s,function(){a.parts.push(0)}),a.parts=a.parts.concat(r)}return a}}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=/^([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])$/,u=/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/,d=/(([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,f={
isValidPort:function(e){return l.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=a(e);return!(!t||!o.default.all(t.octets,function(e){return e>=0&&e<=255;
}))},isLoopbackV4Address:function(e){var t=a(e);return!(!t||127!==t.octets[0]&&!o.default.all(t.octets,function(e){return 0===e}))},isPrivateV4Address:function(e){var t=a(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=i(e);return!(!t||!o.default.all(t.parts,function(e){return e>=0&&e<=65535}))},isLoopbackV6Address:function(e){var t=i(e);if(t){var n=o.default.all(o.default.take(t.parts,7),function(e){
return 0===e});return n&&1===o.default.last(t.parts)}return!1},isPrivateV6Address:function(e){var t=i(e);return!!(t&&t.parts[0]>=64512&&t.parts[0]<=65023)},getV4Subnet:function(e){return f.isValidV4Address(e)?e.split(".").slice(0,-1).join("."):""}};t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1743),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"circle-progress",template:r.default,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,a=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",a),this.ui.svgCircle.css("stroke-width",this.lineWidth),this.ui.svgCircle.css("stroke",this.strokeColor),this.hasSize=!0);var i=this.model.get("progress"),r=(100-i)/100*a;this.ui.svgCircle.css("stroke-dashoffset",r)},onRender:function(){this.drawProgressBar()},onProgressChange:function(){this.drawProgressBar();
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.children,a=e.cellX,r=e.cellY,s=e.cellWidth,o=e.cellHeight,l="translate3d("+a+"px, "+r+"px, 0)",u={position:"absolute",width:s,height:o,WebkitTransform:l,msTransform:l,transform:l};return{$$typeof:i,type:"div",key:null,ref:null,props:{children:n,className:t,style:u},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7);r(s);a.propTypes={className:s.PropTypes.string,
children:s.PropTypes.node,cellX:s.PropTypes.number.isRequired,cellY:s.PropTypes.number.isRequired,cellWidth:s.PropTypes.number.isRequired,cellHeight:s.PropTypes.number.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=function(t){function n(e,t){o(this,n),i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.state={isMoving:!1}}return r(n,t),s(n,[{key:"componentDidMount",value:function(){this._setRenderedItem(),this._setVisibleItem();
}},{key:"componentWillReceiveProps",value:function(e,t){var n=this.props[this.props.keyPropName],a=e[e.keyPropName],i=n&&n===a;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())}},{key:"shouldComponentUpdate",value:function(e,t){return(0,b.default)(this,e,t)}},{key:"componentDidUpdate",
value:function(){this._setRenderedItem(),this._setVisibleItem()}},{key:"componentWillUnmount",value:function(){this._clearMoveTimeout()}},{key:"_setRenderedItem",value:function(){this.props.isScrolling||(this._renderedItem=this.props[this.props.keyPropName])}},{key:"_setVisibleItem",value:function(){this.props.isVisible&&(this._visibleItem=this.props[this.props.keyPropName])}},{key:"_clearMoveTimeout",value:function(){this._moveTimeoutID&&(this._moveTimeoutID=clearTimeout(this._moveTimeoutID))}},{
key:"onMoveTimeout",decorators:[m.autobind],value:function(){this.setState({isMoving:!1})}},{key:"render",value:function(){var t=this.props,n=t.className,a=t.keyPropName,i=t.isScrolling,r=t.isVisible,s=l(t,["className","keyPropName","isScrolling","isVisible"]),o=s[a],d=i&&o!==this._renderedItem,c=!r&&o!==this._visibleItem;return f.default.createElement(e,u({className:(0,h.default)(n,P.default.cell,this.state.isMoving&&P.default.isMoving),showScrollPlaceholder:d,showOffscreenPlaceholder:c},s))}}]),
n}(c.Component);return t.displayName="Virtualized("+(0,g.default)(e)+")",t.WrappedComponent=e,t.propTypes={className:c.PropTypes.string,keyPropName:c.PropTypes.string.isRequired,cellIndex:c.PropTypes.number.isRequired,isScrolling:c.PropTypes.bool.isRequired,isVisible:c.PropTypes.bool.isRequired,moveTimeout:c.PropTypes.number.isRequired},t.defaultProps={moveTimeout:400},t}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(16).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(7),f=d(c),p=n(32),h=d(p),m=n(27),v=n(331),g=d(v),y=n(29),b=d(y),w=n(1617),P=d(w);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){return e.displayName||e.name||"Component"}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="default";t.DEFAULT=n;var a="primary";t.PRIMARY=a;var i="success";t.SUCCESS=i;var r="danger";t.DANGER=r;var s=[n,a,i,r];t.all=s;
},function(e,t,n){"use strict";function a(e,t){if(e===t)return!0;var n=i(e),a=i(t);if(n.length!==a.length)return!1;for(var r=Object.prototype.hasOwnProperty,s=0;s<n.length;s++)if(!r.call(t,n[s])||e[n[s]]!==t[n[s]])return!1;return!0}var i=n(100).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i={handleCollectUsageData:function(e){var t=(0,a.resolve)("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("settings")));var a=void 0;if(t){var i=t.get("settings"),r=i.get("collectUsageData");a=r?r.get("value"):a,this.listenTo(i,"add change",this.onSettingsModelChange);
}this._toggleAdapter(a)},onSettingsModelChange:function(e,t,n){if("collectUsageData"===e.id){var a=this._appModel.get("primaryServer");a&&a.id===e.server.id&&this._toggleAdapter(e.get("value"))}}};t.default=i,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(129),r=a(i),s=n(67),o=a(s),l=n(1053),u=a(l),d=o.default.extend({model:u.default,url:"/playlists?type="+r.default.LOCAL,parse:function(e){return this.convert(e,"Playlist");
}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.SELECT_ITEM);t.selectItem=u;var d=(0,s.default)(l.SELECT_MODELS);t.selectModels=d;var c=(0,s.default)(l.DESELECT_ALL_ITEMS);t.deselectAllItems=c;var f=(0,s.default)(l.DESELECT_MODELS);t.deselectModels=f;var p=(0,s.default)(l.DESELECT_COLLECTION);t.deselectCollection=p;var h=(0,s.default)(l.SELECT_RANGE);
t.selectRange=h;var m=(0,s.default)(l.DESELECT_RANGE);t.deselectRange=m;var v=(0,s.default)(l.PLAY_SELECTED_ITEMS);t.playSelectedItems=v;var g=(0,s.default)(l.ADD_SELECTED_ITEMS_TO_PLAYLIST);t.addSelectedItemsToPlaylist=g;var y=(0,s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS);t.updateSelectedItemsWatchedStatus=y;var b=(0,s.default)(l.EDIT_SELECTED_ITEMS);t.editSelectedItems=b;var w=(0,s.default)(l.REFRESH_SELECTED_ITEMS);t.refreshSelectedItems=w;var P=(0,s.default)(l.ANALYZE_SELECTED_ITEMS);t.analyzeSelectedItems=P;
var _=(0,s.default)(l.SYNC_METADATA_ITEMS);t.syncSelectedItems=_;var S=(0,s.default)(l.OPTIMIZE_METADATA_ITEMS);t.optimizeSelectedItems=S;var x=(0,s.default)(l.MERGE_SELECTED_ITEMS);t.mergeSelectedItems=x;var C=(0,s.default)(l.DELETE_SELECTED_ITEMS);t.deleteSelectedItems=C;var T=(0,s.default)(l.PLAY_SELECTED_ITEMS,function(){return{shuffle:!0}});t.shuffleSelectedItems=T;var k=(0,s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(){return{watched:!0}});t.markSelectedItemsWatched=k;var I=(0,
s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(){return{watched:!1}});t.markSelectedItemsUnwatched=I},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.FETCH_PLANS);t.fetchPlans=u;var d=(0,s.default)(l.POPULATE_PLANS);t.populatePlans=d;var c=(0,s.default)(l.FETCH_UNWATCHED_WATCH_LATER_LIST);t.fetchUnwatchedWatchLaterList=c;var f=(0,s.default)(l.POPULATE_UNWATCHED_WATCH_LATER_LIST);
t.populateUnwatchedWatchLaterList=f;var p=(0,s.default)(l.FETCH_UNWATCHED_RECOMMENDED_LIST);t.fetchUnwatchedRecommendedList=p;var h=(0,s.default)(l.POPULATE_UNWATCHED_RECOMMENDED_LIST);t.populateUnwatchedRecommendedList=h;var m=(0,s.default)(l.UPDATE_USER);t.updateUser=m;var v=(0,s.default)(l.CLEAR_UPDATE_USER_ERROR);t.clearUpdateUserError=v},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1819),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(92),p=a(f),h=n(73),m=a(h),v=n(17),g=a(v),y=c.default.ItemView.extend({
tagName:"span",className:"dropdown",template:r.default,modelEvents:{"change:Media":"render","change:streams":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=m.default.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"),n=(0,p.default)(this.media,{streamType:this.streamType.id}),a=(0,p.default)(this.media,{streamType:this.streamType.id,selected:!0
}),i=o.default.first(a);return{showDropdown:!this.disabled&&n.length>1&&(!t||e),type:this.streamType.typeString,streams:n,selectedStream:i}},onRender:function(){this.$el.attr("id",this.streamType.typeString+"-dropdown")},onStreamClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("id");g.default.execute("selectStream",{item:this.model,streamType:this.streamType,streamID:n})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(41),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(236),p=a(f),h=n(501),m=a(h),v=n(152),g=a(v),y=n(915),b=a(y);n(680);var w=b.default.extend({mixins:g.default,paginated:!0,scrollPosition:0,scrollDirection:"down",mergeDelay:5e3,viewsByModel:{},initialize:function(e){b.default.prototype.initialize.apply(this,arguments),r.default.bindAll(this,"onResize","onScroll"),this.listModel=e.listModel,this.mediaActions=e.mediaActions,g.default.initialize.apply(this,arguments),null!=e.paginated&&(this.paginated=e.paginated),
this.channelName=e.channelName||"content",this.initializingScrollPosition=!0,this.merge=r.default.throttle(r.default.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),c.default.trigger(this.channelName+".subscribe:resize",this.onResize),
c.default.trigger(this.channelName+".subscribe:scroll",this.onScroll),c.default.trigger("start:scrollListener")},getLockIndexes:function(){var e,t=this.getVisibleBounds(),n=this.getLockBounds(),a=this.getIndexBounds(),i=r.default.range(t.from,t.to+1),s=r.default.range(t.to+1,n.to+1),o=r.default.range(t.from-1,n.from-1,-1);return"down"===this.scrollDirection?(o.reverse(),e=i.concat(s,o)):(i.reverse(),o.reverse(),e=i.concat(o,s)),r.default.filter(e,function(e){return e>=a.from&&e<=a.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=r.default.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(r.default.bind(this.prepareCells,this,e));var a=p.default.roundByPage({start:r.default.min(n),last:r.default.max(n)},2*this.getPageSize()),i=this.listModel.populateRange(a);this.trigger("change:loading",!0,{prepend:"up"===this.scrollDirection}),i.always(r.default.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=u.default.getOption(this,"itemViewOptions");r.default.isFunction(t)&&(t=t.call(this,e)),t=r.default.clone(t),t.model=this.getModelForId(e.id),t.mediaActions=this.mediaActions,e.el&&(t.el=e.el);var n=u.default.getOption(this,"itemView");
n._ensureElementExtension||(n._ensureElementExtension=n.extend({_ensureElement:function(){var e=this.el?r.default.result(this,"el"):o.default.$("<"+r.default.result(this,"tagName")+">");this.setElement(e,!1);var t=r.default.extend({},r.default.result(this,"attributes"));this.id&&(t.id=r.default.result(this,"id")),this.className&&(t.class=r.default.result(this,"className")),this.$el.attr(t)}}));var a=new n._ensureElementExtension(t);return e.el||(this.$el.append(a.$el),e.el=a.el),this.forwardItemViewEvents(a),
a.remove=function(){return this.stopListening(),this.$el.unbind(),this.$el.empty(),this},a},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||(b.default.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 a=n.get("currentType"),i=this.listModel.getSort();if(e=a&&a.get("typeString"),
i){var s=i.split(":");s.length&&(t=r.default.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);r.default.defer(r.default.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,c.default.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});var a=this.listModel.fetch();a.done(r.default.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?c.default.trigger("update:scrollPosition",this.listModel.scrollPosition):this.containerScrollPosition.scrollTop>0&&c.default.trigger("update:scrollPosition",0));
},onDeselectAll:function(e){r.default.each(e,function(e){this.pool.each(function(t){t.view.model===e&&t.view.deselect()},this)},this)},onClose:function(){b.default.prototype.onClose.apply(this,arguments),g.default.onClose.apply(this,arguments),c.default.trigger("stop:scrollListener"),c.default.trigger(this.channelName+".unsubscribe:resize",this.onResize),c.default.trigger(this.channelName+".unsubscribe:scroll",this.onScroll),this.listModel.scrollPosition=this.scrollPosition},onCollectionReset:function(e,t){
this.isRefreshing||(m.default.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&&r.default.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.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1864),r=a(i),s=n(3),o=a(s),l=n(97),u=a(l),d=n(51),c=a(d),f=u.default.extend({className:"striped-list-item media-list-item media-details-list-item",template:r.default,ui:o.default.extend({poster:".media-poster"},u.default.prototype.ui),initialize:function(e){
u.default.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.type;"episode"===e&&(e="show"),this.image=new c.default({model:this.model,type:e,getUrl:this.getPosterUrl,height:150})},bindings:o.default.extend({},u.default.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.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(152),r=a(i),s=n(36),o=a(s),l=o.default.extend({mixins:[r.default],onAddChild:function(e){this.forwardItemViewEvents(e);
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1904),s=a(r),o=n(3),l=a(o),u=n(98),d=a(u),c=n(23),f=i(c),p=d.default.extend({name:"downloadVersionModal",template:s.default,serializeData:function(){var e=this.model,t=l.default.map(this.model.get("Media"),function(t,n){var a=l.default.clone(t);a.downloadUrl=e.getDownloadUrl(n);var i=e.getFilepath(n);return i&&(a.downloadName=f.getLastSegment(i)),
a});return{mediaItems:t}},onClick:function(){}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1912),r=a(i),s=n(5),o=a(s),l=n(17),u=a(l),d=n(98),c=a(d),f=c.default.extend({name:"playVersionModal",template:r.default,serializeData:function(){return{mediaItems:this.model.get("Media")}},onClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget).data("value"),n=this.model.get("Media")[t];u.default.execute("playMedia",{
item:this.model,media:n}),this.promise.resolve(n),this.hide()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(41),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(9),v=a(m),g=n(42),y=a(g),b=n(115),w=a(b),P=n(35),_=a(P),S=n(172),x=a(S),C=n(17),T=a(C),k=n(293),I=a(k);n(2026);var M=f.default.Layout.extend({events:{fullscreenchange:"onFullscreenChange",webkitfullscreenchange:"onFullscreenChange",
mousewheel:"onMouseWheel"},shortcutListeners:function(){return{"shortcut:playPause":this.getListenerFor("playPause"),"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||I.default;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 n=h.resolve("appModel"),a=n.get("primaryPlayer");this.controller=x.default.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?_.default.get(this.volumeSettingsKey):_.default.getInstance().defaults.volume,friendlyName:a?a.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=s.default.throttle(s.default.bind(this.persistPlayQueue,this),1e3),this.$document=(0,l.default)(document),this.$document.on("MSFullscreenChange",s.default.bind(this.onFullscreenChange,this)),this.$document.on("mozfullscreenchange",s.default.bind(this.onFullscreenChange,this))},addListeners:function(){var e=h.resolve("appModel");this.listenTo(d.default.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(v.default,s.default.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===y.default.states.STOPPED)return void(document.title="Plex");
var t,n=this.playerModel.get("metadataItem"),a=n.get("type");if("episode"===a){var i=(0,w.default)({seasonIndex:n.get("parentIndex"),episodeIndex:n.get("index"),date:n.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "});t=n.get("grandparentTitle")+" - "+i}else if("track"===a){var r=n.get("originalTitle")||n.get("grandparentTitle");t=r?r+" - "+n.get("title"):n.get("title")}else t=n.get("title");e===y.default.states.PLAYING||e===y.default.states.BUFFERING?document.title="\u25b6 "+t:document.title=t;
},getListenerFor:function(e){return s.default.isFunction(this[e])?this[e]:s.default.bind(this.controller[e],this.controller)},minimize:function(){this.isSwitchingPlayers=!0,T.default.execute("playMedia",{item:this.model,controller:this.controller,useMiniPlayer:!0,isSwitchingPlayers:!0})},maximize:function(){this.isSwitchingPlayers=!0,T.default.execute("playMedia",{item:this.model,controller:this.controller,isSwitchingPlayers:!0})},enterFullscreen:function(){var e=this.el.requestFullScreen||this.el.webkitRequestFullScreen||this.el.mozRequestFullScreen||this.el.msRequestFullscreen;
e.call(this.el)},exitFullscreen:function(){var e=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen;e.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"))&&(v.default.trigger("navigate","details",{serverID:this.model.server.id,key:e}),!0)},navigateToChannelItem:function(e){var t=this.model.channel;return!!t&&(v.default.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");
if(e)return e;var t=this.metadataItem.get("parentKey");return t},getNavigationKey:function(){return this.metadataItem.get("key")},isNowPlaying:function(){var e=h.resolve("appModel"),t=e.get("primaryPlayer");if(!t)return!1;var n=t.get("nowPlaying");return!!n.get(this.metadataItem.id)},canAutoplay:function(e){return e!==y.default.states.PAUSED},persistPlayQueue:function(){var e=this.playerModel;if(e&&this.playQueue.get("playQueueID")){var t=e.get("state");return t===y.default.states.STOPPED?void T.default.execute("persistPlayQueue",null):void T.default.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||v.default.trigger("hide:player",this)},onPrimaryPlayerChange:function(e,t){var n=this.playerModel.get("state"),a=this.playerModel.get("position"),i=this.controller.mediaElement;this.playerModel.set("ready",!1),this.playerModel.set("friendlyName",t?t.get("friendlyName"):null),this.controller.stop(),this.controller=x.default.getInstance(this.type),this.stopListening(),this.addListeners(),this.startPlayback({offset:a,autoplay:this.canAutoplay(n),mediaElement:i
})},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){this.volumeSettingsKey&&_.default.save(this.volumeSettingsKey,t)},onPlayerFinishedChange:function(e,t){if(t){var n=y.default.getElementByType(this.type);this.model.server.get("playQueueManager").remove(n),
v.default.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?v.default.trigger("shortcut:increaseVolume"):e.deltaY<0&&v.default.trigger("shortcut:decreaseVolume");
}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(344),o=a(s),l=o.default.extend({className:"player mini-player",isMini:!0,regions:{controls:".mini-player-controls"},shortcutListeners:function(){var e=o.default.prototype.shortcutListeners.apply(this,arguments);return r.default.omit(e,"shortcut:stop")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1973),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(112),c=a(d),f=n(6),p=a(f),h=n(51),m=a(h),v=n(119),g=a(v),y=n(1147),b=a(y),w=n(1143),P=a(w),_=n(553),S=a(_),x=n(252),C=a(x),T=n(1191),k=a(T),I=n(529),M=a(I),A=n(1197),E=a(A),O=u.default.Layout.extend({template:r.default,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 M.default({model:this.model,collection:t}),this.lyricsDropdown=new E.default({
model:this.model}),this.setupPosterImage(),this.seekBarView=new S.default({model:this.model}),this.volumeSlider=new C.default({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 m.default({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"),a=this.ui.repeatBtn;a.toggleClass("disabled",!e),n&&!t?(a.addClass("one"),a.addClass("selected")):t&&!n?(a.removeClass("one"),a.addClass("selected")):(a.removeClass("one"),a.removeClass("selected"))},updateAncillaryBtns:function(){var e=this.ui.shuffleBtn.parent(),t=this.model.get("showShuffle")||this.model.get("showRepeat")||this.model.get("showLyrics");
(0,o.default)(e).toggleClass("hidden",!t)},updateRatingView:function(e){var t="track"===e.get("type");if(this.$(this.rating.el).toggleClass("hidden",!t),t){var n,a=e.get("isLibraryItem"),i=this.model.get("playQueueItem"),r=this.model.get("playQueue"),s=r&&r.get("isRadio"),o=i.get("advertisement");o?n=P.default:s?n=b.default:a&&(n=g.default),n&&this.rating.show(new n({model:e}))}},updateMoreActionsDropdown:function(){var e=this.model.get("metadataItem"),t=this.model.get("playQueue");return t&&t.get("isRadio")?void this.ui.dropdown.addClass("hidden"):(this.ui.dropdown.removeClass("hidden"),
void this.dropdown.append(new k.default({model:e,playQueue:t})))},updateControlTooltips:function(){var e=this.model.get("playQueueItem"),t=e.get("advertisement")?(0,p.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 a=e.get("originalTitle")||e.get("grandparentTitle");return a?a: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"),a=this.model.get("showLyrics"),i=e||n||a;return t.toggleClass("hidden",!i),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){var t=this.model.get("duration");return!!t&&(0,c.default)(e)}},".separator":{modelAttribute:"duration",formatter:function(e){return!!e&&"/"}},".player-duration":{modelAttribute:"duration",formatter:function(e){return!!e&&(0,c.default)(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((0,c.default)(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.default=O,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.transitionProps,n=r(e,["transitionProps"]);return l.default.createElement(f.default,i({style:m,background:!0,minSize:!0,transition:!0,transitionProps:i({className:h.default.imageContainer},d.default,t)
},n))}var i=n(12).default,r=n(16).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(594),d=s(u),c=n(505),f=s(c),p=n(1640),h=s(p),m={width:"100%",height:"100%"};a.propTypes={transitionProps:o.PropTypes.object},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.className,a=e.isSelected,l=s(e,["children","className","isSelected"]);return d.default.createElement(y.default,o({className:(0,f.default)(n,a&&w.default.isSelected)
},l),{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:w.default.menuLabel},_owner:null},a&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:v.default,key:null,ref:null,props:r(v.default.defaultProps,{name:"plex-icon-selected-560","aria-label":(0,h.default)("Selected")}),_owner:null},className:w.default.selectedIcon},_owner:null}],className:w.default.menuItemContainer},_owner:null})}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(12).default,l=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(32),f=l(c),p=n(6),h=l(p),m=n(49),v=l(m),g=n(137),y=l(g),b=n(1646),w=l(b);a.propTypes={children:u.PropTypes.node,className:u.PropTypes.string,isSelected:u.PropTypes.bool},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return o.default.createElement(u.default,i({className:c.default.toolbarMenu},e))}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(159),u=r(l),d=n(1653),c=r(d);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(34),f=n(30),p=n(27),h=n(244),m=l(h),v=n(81),g=n(1430),y=l(g),b=(0,f.createSelector)(m.default,function(e){return{columnAdjustment:e.columnAdjustment}}),w=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),
r(t,[{key:"onColumnAdjustmentChange",decorators:[p.autobind],value:function(e){this.props.saveSettings({name:"experienceSettings",settings:{columnAdjustment:e}})}},{key:"render",value:function(){return d.default.createElement(y.default,o({onColumnAdjustmentChange:this.onColumnAdjustmentChange},this.props))}}]),t}(u.Component);w.propTypes={saveSettings:u.PropTypes.func.isRequired},t.default=(0,c.connect)(function(e){return b},{saveSettings:v.saveSettings})(w),e.exports=t.default},function(e,t,n){"use strict";
var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(16).default,l=n(12).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(29),p=u(f),h=n(122),m=u(h),v=n(43),g=u(v),y=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.server,n=e.linkTitle,a=e.linkKey,i=e.onPress,r=o(e,["server","linkTitle","linkKey","onPress"]);
if(!n)return null;if(!a)return c.default.createElement("span",r,n);var s=encodeURIComponent(t.machineIdentifier),u=encodeURIComponent(a);return c.default.createElement(g.default,l({title:n,to:"#!/server/"+s+"/details/"+u,onPress:i},r),n)}}]),t}(d.Component);y.propTypes={className:d.PropTypes.string,server:m.default.isRequired,linkKey:d.PropTypes.string,linkTitle:d.PropTypes.string,onPress:d.PropTypes.func},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.separator;
return{$$typeof:i,type:"span",key:null,ref:null,props:{children:t,className:l.default.separator},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(1666)),l=r(o);a.defaultProps={separator:"\u2014"},a.propTypes={separator:s.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(29),m=c(h),v=n(49),g=c(v),y=n(160),b=c(y),w=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.icon,a=e.label,i=e.isMenuOpen,r=u(e,["children","icon","label","isMenuOpen"]);return p.default.createElement(b.default,d({
"aria-haspopup":!0,tooltip:i?void 0:a,hideOnPress:!1},r),{$$typeof:l,type:g.default,key:null,ref:null,props:o(g.default.defaultProps,{name:n,"aria-label":a}),_owner:null},t)}}]),t}(f.Component);w.propTypes={children:f.PropTypes.node,icon:f.PropTypes.string.isRequired,label:f.PropTypes.string.isRequired,isMenuOpen:f.PropTypes.bool.isRequired},t.default=w,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.innerClassName,a=r(e,["children","innerClassName"]);return u.default.createElement(c.default,s({
className:p.default.pageContent},a),{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:n},_owner:null})}var i=n(13).default,r=n(16).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(86),c=o(d),f=n(1668),p=o(f);a.propTypes={children:l.PropTypes.node,innerClassName:l.PropTypes.string},a.defaultProps={innerClassName:p.default.innerPageContent},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=i(e,["children"]);
return l.default.createElement("div",r({className:d.default.pageHeaderCenter},n),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1670),d=s(u);a.propTypes={children:o.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,f.createSelector)((0,m.default)(),function(e){var t=e.desktop,n=t.libraries,a=t.isLibrariesPending,i=t.librariesError;return{showLibrariesSpinner:a&&!n.length,
showLibrariesError:!!i&&!n.length}})}var i=n(21).default,r=n(22).default,s=n(50).default,o=n(20).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(34),f=n(30),p=n(79),h=n(76),m=l(h),v=n(188),g=n(1448),y=l(g),b=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.serverEntityID!==this.props.serverEntityID&&this._populate(e);
}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,p.scheduleImmediateUpdate)(function(){e.populateLibraries({serverEntityID:e.serverEntityID})})}},{key:"render",value:function(){return d.default.createElement(y.default,this.props)}}]),t}(u.Component);b.propTypes={serverEntityID:u.PropTypes.string.isRequired,populateLibraries:u.PropTypes.func.isRequired},t.default=(0,c.connect)(a,{populateLibraries:v.populateLibraries})(b),e.exports=t.default;
},function(e,t,n){"use strict";function a(e){return o.default.createElement(d.default,i({className:f.default.innerEmptyPage,contentClassName:f.default.innerEmptyPageContent,scrollDirection:l.scrollDirections.NONE},e))}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(44),u=n(358),d=r(u),c=n(620),f=r(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return u.default.createElement(g.default,s({title:(0,c.default)("There was an unexpected error"),
description:(0,c.default)("Please visit our forums if you continue to experience problems")},e),{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:(0,c.default)("Go to Forums"),to:f.FORUMS_URL,target:"_blank",kind:p.kinds.PRIMARY}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(305),p=n(44),h=n(43),m=o(h),v=n(138),g=o(v);t.default=a,e.exports=t.default;
},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.children,a=e.icon,l=e.showSpinner,u=s(e,["className","children","icon","showSpinner"]);return d.default.createElement(y.default,o({className:(0,f.default)(t,w.default.sidebarLink)},u),l?{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{className:w.default.sidebarLinkSpinner}),_owner:null}:{$$typeof:r,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{name:a,className:w.default.sidebarLinkIcon
}),_owner:null},n)}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(32),f=l(c),p=n(49),h=l(p),m=n(70),v=l(m),g=n(43),y=l(g),b=n(1699),w=l(b);a.propTypes={className:u.PropTypes.string,children:u.PropTypes.node,showSpinner:u.PropTypes.bool,icon:u.PropTypes.string.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.title,n=e.children;return{$$typeof:i,type:"div",
key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:l.default.sidebarListHeader,role:"header"},_owner:null},n],role:"navigation"},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(1700)),l=r(o);a.propTypes={title:s.PropTypes.string.isRequired,children:s.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=i(e,["className"]);
return l.default.createElement("div",r({className:(0,d.default)(t,f.default.sidebarListItem)},n))}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(1701),f=s(c);a.propTypes={className:o.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(34),c=n(30),f=n(225),p=o(f),h=n(337),m=n(1521),v=o(m),g=(0,
c.createSelector)(p.default,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,plans:t.plans,isPlansPending:t.isPlansPending,isPlansPopulated:t.isPlansPopulated,plansError:t.plansError}}),y=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"componentWillMount",value:function(){this.props.isSignedIn&&this.props.fetchPlans()}},{key:"componentWillReceiveProps",value:function(e){e.isSignedIn&&e.isSignedIn!==this.props.isSignedIn&&e.fetchPlans();
}},{key:"render",value:function(){return u.default.createElement(v.default,this.props)}}]),t}(l.Component);y.propTypes={isSignedIn:l.PropTypes.bool.isRequired,fetchPlans:l.PropTypes.func.isRequired},t.default=(0,d.connect)(function(e){return g(e)},{fetchPlans:h.fetchPlans})(y),e.exports=t.default},function(e,t,n){"use strict";function a(e){try{e.focus()}catch(t){}}function i(){var e=document.activeElement;e&&e.blur()}function r(e){b=document.activeElement,w=e,i()}function s(e){(0,v.default)(w,"Call `startScopedFocus(element)` before `scopeTabEvent`");
var t=(0,y.default)(w);if(t.length){e.preventDefault();var n=document.activeElement,i=n?t.indexOf(n):-1,r=t.length-1,s=void 0;i===-1?s=e.shiftKey?r:0:(s=e.shiftKey?i-1:i+1,s<0?s=r:s>r&&(s=0)),a(t[s])}}function o(){(0,v.default)(w,"Call `startScopedFocus(element)` before `scopeAutoFocus`");var e=(0,y.default)(w),t=f.default.find(e,function(e){return h.default.parseBoolean(e.getAttribute("data-autofocus"))});t&&a(t)}function l(){w=null}function u(){b&&(a(b),b=null)}var d=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.resetFocus=i,t.startScopedFocus=r,t.scopeTabEvent=s,t.scopeAutoFocus=o,t.resetScopedFocus=l,t.restorePreviousFocus=u;var c=n(3),f=d(c),p=n(46),h=d(p),m=n(38),v=d(m),g=n(1523),y=d(g),b=void 0,w=void 0},function(e,t,n){"use strict";function a(e){var t=j.default.get(e);return!(!t||!t.child)}function i(e){return!e.hasInvalidKey&&!e.deletedAt}function r(e){return!!i(e)&&(e.Media&&e.Media.length>1)}function s(e){return i(e)}function o(e){return i(e)}function l(e){return!!e.primaryExtraKey}
function u(e){return!!D.default.findWhere(e.related,{browse:!1})}function d(e){return!!e.isLibraryItem}function c(e){return!!e.isLibraryItem&&(a(e.type)?e.unviewedLeafCount>0:!e.viewCount||!!e.viewOffset)}function f(e){return!!e.isLibraryItem&&(a(e.type)?e.viewedLeafCount>0:!!e.viewCount||!!e.viewOffset)}function p(e){return!(!e.server.isFullOwnedServer||!e.isLibraryItem)}function h(e){return p(e)}function m(e){return p(e)}function v(e){return!!p(e)&&!(!e.guid||/(local|none)\:\/\//.test(e.guid))}
function g(e){return!!p(e)&&(!!e.guid&&!v(e))}function y(e){return v(e)}function b(e){if(!p(e))return!1;var t=void 0;return t=a(e.type)?e.Location:D.default.filter(e.Media,function(e){return!e.proxyType}),t.length>1}function w(e){return!(!e.server.isFullServer||!e.isLibraryItem)&&!(!e.server.allowSync||!e.allowSync)}function P(e){return!!p(e)&&!!e.server.transcoderVideo}function _(e){return p(e)}function S(e){return!1}function x(e){return!1}function C(e){return!1}function T(e){return!!p(e)&&!!e.server.allowMediaDeletion;
}function k(e){if(!p(e))return!1;if(!e.server.allowMediaDeletion)return!1;var t=D.default.filter(e.Media,function(e){return!!e.proxyType});return t.length>0}function I(e){var t="photo"===e.type&&!e.isLibraryItem;return!t}function M(e){return!!e.isLibraryItem&&(!e.activeSelectionType||e.type===e.activeSelectionType)}function A(e){var t=e.type,n=F[t];(0,L.default)(D.default.isArray(n),"getMetadataActionProps: Invalid type, "+t+", provided");var a=n.reduce(function(n,a){var i=U[a];return(0,L.default)(D.default.isFunction(i),"getMetadataActionProps: Invalid action, "+a+", for "+t),
D.default.has(e,a)?n[a]=e[a]:n[a]=i(e),n},{});return a}var E=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var O=n(3),D=E(O),R=n(38),L=E(R),N=n(40),j=E(N),U={showPlay:i,showPlayVersion:r,showPlayAll:i,showShuffle:s,showQueue:o,showPlayTrailer:l,showPlayPlexMix:u,showPlayMusicVideo:l,showAddToPlaylist:d,showMarkWatched:c,showMarkUnwatched:f,showEdit:p,showRefresh:h,showAnalyze:m,showFixMatch:v,showMatch:g,showUnmatch:y,showSplitApart:b,showSync:w,showOptimize:P,showDownload:_,
showWatchLater:S,showShare:x,showRecommend:C,showDelete:T,showDeleteVersion:k,showGetInfo:I,showSelect:M},F={movie:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showDelete","showDeleteVersion","showGetInfo","showSelect"],show:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDelete","showSelect"],
season:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showSync","showOptimize","showDelete","showSelect"],episode:["showPlay","showPlayVersion","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showSync","showOptimize","showDownload","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","showWatchLater","showShare","showRecommend","showGetInfo","showSelect"],playlist:["showDelete","showEdit","showPlay","showQueue","showShuffle","showSync","showSelect"]};e.exports=t.default},function(e,t){"use strict";e.exports={sliderTrackWidth:"60px",sliderThumbSize:"12px",tooltipArrowSize:"6px",sidebarWidth:"240px",searchHubTitleHeight:"18px",searchResulWidth:"346px",searchResultHeight:"50px",posterTitlePadding:"10px",posterTitleHeight:"20px",posterCenterCircleSize:"42px",
posterBadgeHeight:"24px",posterHoverSlideDistance:"10px",pageHeaderHeight:"60px",breakpointExtraSmall:"480px",breakpointSmall:"768px",breakpointMedium:"992px",breakpointLarge:"1200px"}},377,,,166,function(e,t,n){var a=n(71),i=n(373);e.exports=n(599)?function(e,t,n){return a.setDesc(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},269,,381,function(e,t,n){var a=n(71).setDesc,i=n(369),r=n(102)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,r)&&a(e,r,{configurable:!0,value:t})}},,function(e,t,n){
"use strict";var a=n(1570)(!0);n(602)(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=a(t,n),this._i+=e.length,{value:e,done:!1})})},,,,,,,,,function(e,t){function n(e,t,n){"use strict";function a(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function i(r){var s,o,l;if(r.nodeType==y.DOCUMENT_NODE){var u,d;for(o=r.firstChild,u=0,d=r.childNodes.length;u<d;u+=1)if(r.childNodes[u].nodeType!==y.COMMENT_NODE){
o=r.childNodes[u];break}return n?s=i(o):(s={},l=a(o),s[l]=i(o)),s}if(r.nodeType==y.ELEMENT_NODE){var c=0,f=r.childNodes;s=new Object;for(var p=0;p<f.length;p++)if(o=f.item(p),l=a(o),c++,null==s[l])s[l]=i(o);else{if(null!=s[l]&&!(s[l]instanceof Array)){var h=s[l];s[l]=[],s[l].push(h)}for(var m=0;null!=s[l][m];)m++;s[l][m]=i(o)}for(var v=0;v<r.attributes.length;v++){var g=r.attributes.item(v);c++;for(var b=g.value,w=0,P=e.length;w<P;w++){var _=e[w];_.test.call(this,g.value)&&(b=_.converter.call(this,g.value));
}s[t+g.name]=b}if(null!=s["#text"]){var S=s["#text"];"string"==typeof S?(S=S.replace(/[\r\n]/g,""),s["#text"]=S,1==c&&(s=S)):delete s["#text"]}return s}return r.nodeType==y.TEXT_NODE||r.nodeType==y.CDATA_SECTION_NODE?r.nodeValue:r.nodeType==y.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+=g?r(e.__text):e.__text),t}function o(e){var t="";return e instanceof Object?t+=s(e):null!=e&&(t+=g?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 d(e){var t=0;if(e instanceof Object)for(var n in e)u(e,n)||t++;return t}function c(e){var t=[];if(e instanceof Object)for(var n in e){var a=n.toString(),i=a.charAt(0);n.indexOf("__")==-1&&("_"===i||i===i.toLowerCase()&&i!==i.toUpperCase())&&t.push(n);
}return t}function f(e,t,n){var a="";if(0==e.length)a+=p(e,t,n,!0);else for(var i=0;i<e.length;i++)a+=p(e[i],t,c(e[i]),!1),a+=m(e[i]),a+=h(e[i],t);return a}function p(e,t,n,a){var i="<"+(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]);i+=" "+o.substr(1)+"='"+l+"'"}return i+=a?"/>":">"}function h(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function m(e){var t="",n=d(e);if(n>0)for(var a in e)if(!u(e,a)){var i=e[a],r=c(i);if(null==i||void 0==i)t+=p(i,a,r,!0);else if(i instanceof Object)if(i instanceof Array)t+=f(i,a,r);else{
var s=d(i);s>0||null!=i.__text||null!=i.__cdata?(t+=p(i,a,r,!1),t+=m(i),t+=h(i,a)):t+=p(i,a,r,!0)}else t+=p(i,a,r,!1),t+=o(i),t+=h(i,a)}return t+=o(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var v="1.0.11",g=!1,y={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){var n=new window.DOMParser;t=n.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 i(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return this.xml2json(t)},this.getVersion=function(){return v},this.escapeMode=function(e){g=e},this.json2xml_str=function(e){return m(e)}}e.exports=n},function(e,t,n){"use strict";function a(e,t){this.helpers=e||{},this.partials=t||{},i(this)}function i(e){e.registerHelper("helperMissing",function(e){if(2!==arguments.length)throw new o("Missing helper: '"+e+"'");
}),e.registerHelper("blockHelperMissing",function(t,n){var a=n.inverse||function(){},i=n.fn;return f(t)&&(t=t.call(this)),t===!0?i(this):t===!1||null==t?a(this):c(t)?t.length>0?e.helpers.each(t,n):a(this):i(t)}),e.registerHelper("each",function(e,t){var n,a=t.fn,i=t.inverse,r=0,s="";if(f(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(c(e))for(var o=e.length;r<o;r++)n&&(n.index=r,n.first=0===r,n.last=r===e.length-1),s+=a(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+=a(e[l],{data:n}),r++);return 0===r&&(s=i(this)),s}),e.registerHelper("if",function(e,t){return f(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(f(e)&&(e=e.call(this)),!s.isEmpty(e))return t.fn(e)}),e.registerHelper("log",function(t,n){var a=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;
e.log(a,t)})}function r(e,t){m.log(e,t)}var s=n(388),o=n(387).default,l="1.3.0";t.VERSION=l;var u=4;t.COMPILER_REVISION=u;var d={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};t.REVISION_CHANGES=d;var c=s.isArray,f=s.isFunction,p=s.toString,h="[object Object]";t.HandlebarsEnvironment=a,a.prototype={constructor:a,logger:m,log:r,registerHelper:function(e,t,n){if(p.call(e)===h){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){p.call(e)===h?s.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};t.logger=m,t.log=r;var v=function(e){var t={};return s.extend(t,e),t};t.createFrame=v},function(e,t){"use strict";function n(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"];n.prototype=new Error,t.default=n},function(e,t,n){"use strict";function a(e){return l[e]||"&amp;"}function i(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,d.test(e)?e.replace(u,a):e):""}function s(e){
return!e&&0!==e||!(!p(e)||0!==e.length)}var o=n(627).default,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},u=/[&<>"'`]/g,d=/[&<>"'`]/;t.extend=i;var c=Object.prototype.toString;t.toString=c;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===c.call(e)});var f;t.isFunction=f;var p=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===c.call(e)};t.isArray=p,t.escapeExpression=r,
t.isEmpty=s},function(e,t,n){function a(e){if(!s(e)||f.call(e)!=o||r(e))return!1;var t=i(e);if(null===t)return!0;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}var i=n(2028),r=n(2029),s=n(2031),o="[object Object]",l=Object.prototype,u=Function.prototype.toString,d=l.hasOwnProperty,c=u.call(Object),f=l.toString;e.exports=a},function(e,t,n){"use strict";function a(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function i(e,t,n){
d.insertTreeBefore(e,t,n)}function r(e,t,n){Array.isArray(t)?o(e,t[0],t[1],n):v(e,t,n)}function s(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],l(e,t,n),e.removeChild(n)}e.removeChild(t)}function o(e,t,n,a){for(var i=t;;){var r=i.nextSibling;if(v(e,i,a),i===n)break;i=r}}function l(e,t,n){for(;;){var a=t.nextSibling;if(a===n)break;e.removeChild(a)}}function u(e,t,n){var a=e.parentNode,i=e.nextSibling;i===t?n&&v(a,document.createTextNode(n),i):n?(m(i,n),l(a,i,t)):l(a,e,t)}var d=n(170),c=n(2047),f=n(648),p=(n(59),
n(83),n(399)),h=n(405),m=n(665),v=p(function(e,t,n){e.insertBefore(t,n)}),g=c.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:u,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var o=t[n];switch(o.type){case f.INSERT_MARKUP:i(e,o.content,a(e,o.afterNode));break;case f.MOVE_EXISTING:r(e,o.fromNode,a(e,o.afterNode));break;case f.SET_MARKUP:h(e,o.content);break;case f.TEXT_CONTENT:m(e,o.content);break;case f.REMOVE_NODE:s(e,o.fromNode)}}}};e.exports=y;
},function(e,t,n){"use strict";function a(e){return!!u.hasOwnProperty(e)||!l.hasOwnProperty(e)&&(o.test(e)?(u[e]=!0,!0):(l[e]=!0,!1))}function i(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var r=n(139),s=(n(59),n(2065),n(83),n(2105)),o=(n(45),new RegExp("^["+r.ATTRIBUTE_NAME_START_CHAR+"]["+r.ATTRIBUTE_NAME_CHAR+"]*$")),l={},u={},d={createMarkupForID:function(e){return r.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){
e.setAttribute(r.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return r.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(r.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=r.properties.hasOwnProperty(e)?r.properties[e]:null;if(n){if(i(n,t))return"";var a=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?a+'=""':a+"="+s(t)}return r.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){
return a(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var a=r.properties.hasOwnProperty(t)?r.properties[t]:null;if(a){var s=a.mutationMethod;if(s)s(e,n);else{if(i(a,n))return void this.deleteValueForProperty(e,t);if(a.mustUseProperty){var o=a.propertyName;a.hasSideEffects&&""+e[o]==""+n||(e[o]=n)}else{var l=a.attributeName,u=a.attributeNamespace;u?e.setAttributeNS(u,l,""+n):a.hasBooleanValue||a.hasOverloadedBooleanValue&&n===!0?e.setAttribute(l,""):e.setAttribute(l,""+n)}}}else if(r.isCustomAttribute(t))return void d.setValueForAttribute(e,t,n);
},setValueForAttribute:function(e,t,n){if(a(t)){null==n?e.removeAttribute(t):e.setAttribute(t,""+n)}},deleteValueForProperty:function(e,t){var n=r.properties.hasOwnProperty(t)?r.properties[t]:null;if(n){var a=n.mutationMethod;if(a)a(e,void 0);else if(n.mustUseProperty){var i=n.propertyName;n.hasBooleanValue?e[i]=!1:n.hasSideEffects&&""+e[i]==""||(e[i]="")}else e.removeAttribute(n.attributeName)}else r.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=d},function(e,t,n){"use strict";function a(e){
return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function i(e){return e===y.topMouseMove||e===y.topTouchMove}function r(e){return e===y.topMouseDown||e===y.topTouchStart}function s(e,t,n,a){var i=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(a),t?m.invokeGuardedCallbackWithCatch(i,n,e):m.invokeGuardedCallback(i,n,e),e.currentTarget=null}function o(e,t){var n=e._dispatchListeners,a=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)s(e,t,n[i],a[i]);else n&&s(e,t,n,a);
e._dispatchListeners=null,e._dispatchInstances=null}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var a=0;a<t.length&&!e.isPropagationStopped();a++)if(t[a](e,n[a]))return n[a]}else if(t&&t(e,n))return n;return null}function u(e){var t=l(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function d(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?v(!1):void 0,e.currentTarget=t?b.getNodeFromInstance(n):null;var a=t?t(e):null;
return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,a}function c(e){return!!e._dispatchListeners}var f,p,h=n(103),m=n(396),v=n(33),g=(n(45),{injectComponentTree:function(e){f=e},injectTreeTraversal:function(e){p=e}}),y=h.topLevelTypes,b={isEndish:a,isMoveish:i,isStartish:r,executeDirectDispatch:d,executeDispatchesInOrder:o,executeDispatchesInOrderStopAtTrue:u,hasDispatches:c,getInstanceFromNode:function(e){return f.getInstanceFromNode(e)},getNodeFromInstance:function(e){
return f.getNodeFromInstance(e)},isAncestor:function(e,t){return p.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return p.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return p.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return p.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,a,i){return p.traverseEnterLeave(e,t,n,a,i)},injection:g};e.exports=b},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},a=(""+e).replace(t,function(e){
return n[e]});return"$"+a}function a(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},a="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+a).replace(t,function(e){return n[e]})}var i={escape:n,unescape:a};e.exports=i},function(e,t,n){"use strict";function a(e){null!=e.checkedLink&&null!=e.valueLink?u(!1):void 0}function i(e){a(e),null!=e.value||null!=e.onChange?u(!1):void 0}function r(e){a(e),null!=e.checked||null!=e.onChange?u(!1):void 0}function s(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`.";
}return""}var o=n(652),l=n(278),u=n(33),d=(n(45),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),c={value:function(e,t,n){return!e[t]||d[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
},onChange:o.func},f={},p={checkPropTypes:function(e,t,n){for(var a in c){if(c.hasOwnProperty(a))var i=c[a](t,a,e,l.prop);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;s(n)}}},getValue:function(e){return e.valueLink?(i(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(r(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(r(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0;
}};e.exports=p},function(e,t,n){"use strict";var a=n(33),i=!1,r={unmountIDFromEnvironment:null,replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i?a(!1):void 0,r.unmountIDFromEnvironment=e.unmountIDFromEnvironment,r.replaceNodeWithMarkup=e.replaceNodeWithMarkup,r.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=r},function(e,t,n){"use strict";function a(e,t,n,a){try{return t(n,a)}catch(r){return void(null===i&&(i=r))}}var i=null,r={invokeGuardedCallback:a,
invokeGuardedCallbackWithCatch:a,rethrowCaughtError:function(){if(i){var e=i;throw i=null,e}}};e.exports=r},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";var a=!1;e.exports=a},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,a,i){
MSApp.execUnsafeLocalFunction(function(){return e(t,n,a,i)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var a=i[e];return!!a&&!!n[a]}function a(e){return n}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=a},function(e,t){"use strict";
function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(a&&e[a]||e[i]);if("function"==typeof t)return t}var a="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=n},function(e,t,n){"use strict";/**
	 * Checks if an event is supported in the current execution environment.
	 *
	 * NOTE: This will not work correctly for non-generic events such as `change`,
	 * `reset`, `load`, `error`, and `select`.
	 *
	 * Borrows from Modernizr.
	 *
	 * @param {string} eventNameSuffix Event name, e.g. "click".
	 * @param {?boolean} capture Check if the capture phase is supported.
	 * @return {boolean} True if the event is supported.
	 * @internal
	 * @license Modernizr 3.0.0pre (Custom Build) | MIT
	 */
function a(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,a=n in document;if(!a){var s=document.createElement("div");s.setAttribute(n,"return;"),a="function"==typeof s[n]}return!a&&i&&"wheel"===e&&(a=document.implementation.hasFeature("Events.wheel","3.0")),a}var i,r=n(64);r.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=a},function(e,t,n){"use strict";var a=n(64),i=/^[ \r\n\t\f]/,r=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(399),o=s(function(e,t){
e.innerHTML=t});if(a.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(o=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&r.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=o},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,a=null===t||t===!1;if(n||a)return n===a;var i=typeof e,r=typeof t;return"string"===i||"number"===i?"string"===r||"number"===r:"object"===r&&e.type===t.type&&e.key===t.key;
}e.exports=n},function(e,t,n){"use strict";function a(e,t){return e&&"object"==typeof e&&null!=e.key?u.escape(e.key):t.toString(36)}function i(e,t,n,r){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||s.isValidElement(e))return n(r,e,""===t?d+a(e,0):t),1;var p,h,m=0,v=""===t?d:t+c;if(Array.isArray(e))for(var g=0;g<e.length;g++)p=e[g],h=v+a(p,g),m+=i(p,h,n,r);else{var y=o(e);if(y){var b,w=y.call(e);if(y!==e.entries)for(var P=0;!(b=w.next()).done;)p=b.value,
h=v+a(p,P++),m+=i(p,h,n,r);else for(;!(b=w.next()).done;){var _=b.value;_&&(p=_[1],h=v+u.escape(_[0])+c+a(p,0),m+=i(p,h,n,r))}}else if("object"===f){String(e);l(!1)}}return m}function r(e,t,n){return null==e?0:i(e,"",t,n)}var s=(n(127),n(88)),o=n(403),l=n(33),u=n(393),d=(n(45),"."),c=":";e.exports=r},function(e,t,n){"use strict";var a=(n(54),n(82)),i=(n(45),a);e.exports=i},,,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 a=(new Date).getTime(),i=Math.max(0,16-(a-e)),r=window.setTimeout(function(){t(a+i)},i);return e=a+i,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}()},function(e,t,n){var a,i,a,r,a,s,o;(function(l){!function(r,s){a=s,!(i="function"==typeof a?a.call(t,n,t,e):a)}(this,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||!e.length)return[];var t,n,r,o,l=[],u=e.split(/ +/);for(t=0,n=u.length;t<n;t++){if(r=i(u[t]),this.settings.diacritics)for(o in s)s.hasOwnProperty(o)&&(r=r.replace(new RegExp(o,"g"),s[o]));l.push({string:u[t],regex:new RegExp(r,"i")})}return l},e.prototype.iterator=function(e,t){var n;n=r(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,a,i,r;n=this,e=n.prepareSearch(e,t),i=e.tokens,a=e.options.fields,r=i.length;var s=function(e,t){var n,a;return e?(e=String(e||""),a=e.search(t.regex),a===-1?0:(n=t.string.length/e.length,0===a&&(n+=.5),n)):0},o=function(){var e=a.length;return e?1===e?function(e,t){return s(t[a[0]],e)}:function(t,n){for(var i=0,r=0;i<e;i++)r+=s(n[a[i]],t);return r/e}:function(){
return 0}}();return r?1===r?function(e){return o(i[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,a=0;n<r;n++){if(t=o(i[n],e),t<=0)return 0;a+=t}return a/r}:function(e){for(var t=0,n=0;t<r;t++)n+=o(i[t],e);return n/r}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var a,i,r,s,o,l,u,d,c,f,p;if(r=this,e=r.prepareSearch(e,n),p=!e.query&&n.sort_empty||n.sort,c=function(e,t){return"$score"===e?t.score:r.items[t.id][e]},o=[],p)for(a=0,i=p.length;a<i;a++)(e.query||"$score"!==p[a].field)&&o.push(p[a]);
if(e.query){for(f=!0,a=0,i=o.length;a<i;a++)if("$score"===o[a].field){f=!1;break}f&&o.unshift({field:"$score",direction:"desc"})}else for(a=0,i=o.length;a<i;a++)if("$score"===o[a].field){o.splice(a,1);break}for(d=[],a=0,i=o.length;a<i;a++)d.push("desc"===o[a].direction?-1:1);return l=o.length,l?1===l?(s=o[0].field,u=d[0],function(e,n){return u*t(c(s,e),c(s,n))}):function(e,n){var a,i,r;for(a=0;a<l;a++)if(r=o[a].field,i=d[a]*t(c(r,e),c(r,n)))return i;return 0}:null},e.prototype.prepareSearch=function(e,t){
if("object"==typeof e)return e;t=n({},t);var a=t.fields,i=t.sort,s=t.sort_empty;return a&&!r(a)&&(t.fields=[a]),i&&!r(i)&&(t.sort=[i]),s&&!r(s)&&(t.sort_empty=[s]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}},e.prototype.search=function(e,t){var n,a,i,r,s=this;return a=this.prepareSearch(e,t),t=a.options,e=a.query,r=t.score||s.getScoreFunction(a),e.length?s.iterator(s.items,function(e,i){n=r(e),(t.filter===!1||n>0)&&a.items.push({score:n,id:i})}):s.iterator(s.items,function(e,t){
a.items.push({score:1,id:t})}),i=s.getSortFunction(a,t),i&&a.items.sort(i),a.total=a.items.length,"number"==typeof t.limit&&(a.items=a.items.slice(0,t.limit)),a};var t=function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=o(String(e||"")),t=o(String(t||"")),e>t?1:t>e?-1:0)},n=function(e,t){var n,a,i,r;for(n=1,a=arguments.length;n<a;n++)if(r=arguments[n])for(i in r)r.hasOwnProperty(i)&&(e[i]=r[i]);return e},a=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},i=function(e){
return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},r=Array.isArray||l&&l.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s={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]"},o=function(){var e,t,n,a,i="",r={};for(n in s)if(s.hasOwnProperty(n))for(a=s[n].substring(2,s[n].length-1),i+=a,e=0,t=a.length;e<t;e++)r[a.charAt(e)]=n;var o=new RegExp("["+i+"]","g");return function(e){return e.replace(o,function(e){
return r[e]}).toLowerCase()}}();return e}),function(i,s){a=s,!(r="function"==typeof a?a.call(t,n,t,e):a)}(this,function(){var e={};e.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var n,a,i,r=this,s=[];if(r.plugins={names:[],settings:{},requested:{},loaded:{}},t.isArray(e))for(n=0,a=e.length;n<a;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(i in e)e.hasOwnProperty(i)&&(r.plugins.settings[i]=e[i],s.push(i));
for(;s.length;)r.require(s.shift())},e.prototype.loadPlugin=function(t){var n=this,a=n.plugins,i=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');a.requested[t]=!0,a.loaded[t]=i.fn.apply(n,[n.plugins.settings[t]||{}]),a.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(l,u){s=[n(5),i,r],a=u,o="function"==typeof a?a.apply(t,s):a,!(void 0!==o&&(e.exports=o))}(this,function(e,t,n){"use strict";var a=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,a=function(e){var t=0;if(3===e.nodeType){var i=e.data.search(n);if(i>=0&&e.data.length>0){var r=e.data.match(n),s=document.createElement("span");
s.className="highlight";var o=e.splitText(i),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+=a(e.childNodes[u]);return t};return e.each(function(){a(this)})}},i=function(){};i.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))}},i.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=i.prototype[t[n]]};var r=/Mac/.test(navigator.userAgent),s=65,o=13,l=27,u=37,d=38,c=80,f=39,p=40,h=78,m=8,v=46,g=16,y=r?91:17,b=r?18:17,w=9,P=1,_=2,S=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,x=function(e){
return"undefined"!=typeof e},C=function(e){return"undefined"==typeof e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},T=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},k=function(e){return(e+"").replace(/\$/g,"$$$$")},I={};I.before=function(e,t,n){var a=e[t];e[t]=function(){return n.apply(e,arguments),a.apply(e,arguments)}},I.after=function(e,t,n){var a=e[t];e[t]=function(){var t=a.apply(e,arguments);return n.apply(e,arguments),
t}};var M=function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},A=function(e,t){var n;return function(){var a=this,i=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(a,i)},t)}},E=function(e,t,n){var a,i=e.trigger,r={};e.trigger=function(){var n=arguments[0];return t.indexOf(n)===-1?i.apply(e,arguments):void(r[n]=arguments)},n.apply(e,[]),e.trigger=i;for(a in r)r.hasOwnProperty(a)&&i.apply(e,r[a])},O=function(e,t,n,a){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;
return t.currentTarget=n,a.apply(this,[t])})},D=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(),a=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t.start=n.text.length-a,t.length=a}return t},R=function(e,t,n){var a,i,r={};if(n)for(a=0,i=n.length;a<i;a++)r[n[a]]=e.css(n[a]);else r=e.css();t.css(r)},L=function(t,n){if(!t)return 0;var a=e("<test>").css({
position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");R(n,a,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var i=a.width();return a.remove(),i},N=function(e){var t=null,n=function(n,a){var i,r,s,o,l,u,d,c;n=n||window.event||{},a=a||{},n.metaKey||n.altKey||(a.force||e.data("grow")!==!1)&&(i=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,r===v||r===m?(c=D(e[0]),
c.length?i=i.substring(0,c.start)+i.substring(c.start+c.length):r===m&&c.start?i=i.substring(0,c.start-1)+i.substring(c.start+1):r===v&&"undefined"!=typeof c.start&&(i=i.substring(0,c.start)+i.substring(c.start+1))):s&&(u=n.shiftKey,d=String.fromCharCode(n.keyCode),d=u?d.toUpperCase():d.toLowerCase(),i+=d)),o=e.attr("placeholder"),!i&&o&&(i=o),l=L(i,e)+4,l!==t&&(t=l,e.width(l),e.triggerHandler("resize")))};e.on("keydown keyup update blur",n),n()},j=function(n,a){var i,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:a,$input:n,tabIndex:n.attr("tabindex")||"",tagType:"select"===o.tagName.toLowerCase()?P:_,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++j.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===a.loadThrottle?l.onSearchChange:A(l.onSearchChange,a.loadThrottle)}),l.sifter=new t(this.options,{diacritics:a.diacritics}),l.settings.options){for(i=0,r=l.settings.options.length;i<r;i++)l.registerOption(l.settings.options[i]);
delete l.settings.options}if(l.settings.optgroups){for(i=0,r=l.settings.optgroups.length;i<r;i++)l.registerOptionGroup(l.settings.optgroups[i]);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 i.mixin(j),n.mixin(j),e.extend(j.prototype,{setup:function(){var t,n,a,i,s,o,l,u,d,c=this,f=c.settings,p=c.eventNS,h=e(window),m=e(document),v=c.$input;
if(l=c.settings.mode,u=v.attr("class")||"",t=e("<div>").addClass(f.wrapperClass).addClass(u).addClass(l),n=e("<div>").addClass(f.inputClass).addClass("items").appendTo(t),a=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",v.is(":disabled")?"-1":c.tabIndex),o=e(f.dropdownParent||t),i=e("<div>").addClass(f.dropdownClass).addClass(l).hide().appendTo(o),s=e("<div>").addClass(f.dropdownContentClass).appendTo(i),c.settings.copyClassesToDropdown&&i.addClass(u),t.css({width:v[0].style.width
}),c.plugins.names.length&&(d="plugin-"+c.plugins.names.join(" plugin-"),t.addClass(d),i.addClass(d)),(null===f.maxItems||f.maxItems>1)&&c.tagType===P&&v.attr("multiple","multiple"),c.settings.placeholder&&a.attr("placeholder",f.placeholder),!c.settings.splitOn&&c.settings.delimiter){var w=c.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");c.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}v.attr("autocorrect")&&a.attr("autocorrect",v.attr("autocorrect")),v.attr("autocapitalize")&&a.attr("autocapitalize",v.attr("autocapitalize")),
c.$wrapper=t,c.$control=n,c.$control_input=a,c.$dropdown=i,c.$dropdown_content=s,i.on("mouseenter","[data-selectable]",function(){return c.onOptionHover.apply(c,arguments)}),i.on("mousedown click","[data-selectable]",function(){return c.onOptionSelect.apply(c,arguments)}),O(n,"mousedown","*:not(input)",function(){return c.onItemSelect.apply(c,arguments)}),c.settings.manualInputWidth||N(a),n.on({mousedown:function(){return c.onMouseDown.apply(c,arguments)},click:function(){return c.onClick.apply(c,arguments);
}}),a.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return c.onKeyDown.apply(c,arguments)},keyup:function(){return c.onKeyUp.apply(c,arguments)},keypress:function(){return c.onKeyPress.apply(c,arguments)},resize:function(){c.positionDropdown.apply(c,[])},blur:function(){return c.onBlur.apply(c,arguments)},focus:function(){return c.ignoreBlur=!1,c.onFocus.apply(c,arguments)},paste:function(){return c.onPaste.apply(c,arguments)}}),v.parents().last().find('label[for="'+v.attr("id")+'"]').on("click",function(){
c.onClick.apply(c,arguments)}),m.on("keydown"+p,function(e){c.isCmdDown=e[r?"metaKey":"ctrlKey"],c.isCtrlDown=e[r?"altKey":"ctrlKey"],c.isShiftDown=e.shiftKey}),m.on("keyup"+p,function(e){e.keyCode===b&&(c.isCtrlDown=!1),e.keyCode===g&&(c.isShiftDown=!1),e.keyCode===y&&(c.isCmdDown=!1)}),m.on("mousedown"+p,function(e){if(c.isFocused){if(e.target===c.$dropdown[0]||e.target.parentNode===c.$dropdown[0])return!1;c.$control.has(e.target).length||e.target===c.$control[0]||c.blur(e.target)}}),h.on(["scroll"+p,"resize"+p].join(" "),function(){
c.isOpen&&c.positionDropdown.apply(c,arguments)}),h.on("mousemove"+p,function(){c.ignoreHover=!1}),this.revertSettings={$children:v.children().detach(),tabindex:v.attr("tabindex")},v.attr("tabindex",-1).hide().after(c.$wrapper),e.isArray(f.items)&&(c.setValue(f.items),delete f.items),S&&v.on("invalid"+p,function(e){e.preventDefault(),c.isInvalid=!0,c.refreshState()}),c.updateOriginalInput(),c.refreshItems(),c.refreshState(),c.updatePlaceholder(),c.isSetup=!0,v.is(":disabled")&&c.disable(),c.on("change",this.onChange),
v.data("selectize",c),v.addClass("selectized"),c.trigger("initialize"),f.preload===!0&&c.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,a=t.settings.optgroupLabelField,i={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[a])+"</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({},i,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]],t&&this.on(e,t))},onClick:function(e){var t=this;t.isFocused||(t.focus(),e.preventDefault())},onMouseDown:function(t){var n=this,a=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():a||n.setActiveItem(null),!1}else a||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),a=0,i=t.length;a<i;a++)n.createItem(t[a])},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(e.keyCode!==w&&e.preventDefault());switch(e.keyCode){case s:if(t.isCmdDown)return void t.selectAll();break;case l:return void(t.isOpen&&(e.preventDefault(),e.stopPropagation(),t.close()));case h:if(!e.ctrlKey||e.altKey)break;case p: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 c:if(!e.ctrlKey||e.altKey)break;case d:if(t.$activeOption){t.ignoreHover=!0;var a=t.getAdjacentOption(t.$activeOption,-1);a.length&&t.setActiveOption(a,!0,!0)}return void e.preventDefault();case o:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),e.preventDefault()));case u:return void t.advanceSelection(-1,e);case f:return void t.advanceSelection(1,e);case w: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 m:return void t.deleteSelection(e,!0);case v: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(a){n.apply(t,[e,a])})))},onFocus:function(e){var t=this,n=t.isFocused;return t.isDisabled?(t.blur(),e&&e.preventDefault(),!1):void(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,a,i=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),a=e(t.currentTarget),a.hasClass("create")?i.createItem(null,function(){i.settings.closeAfterSelect&&i.close()}):(n=a.attr("data-value"),"undefined"!=typeof n&&(i.lastQuery=null,i.setTextboxValue(""),
i.addItem(n),i.settings.closeAfterSelect?i.close():!i.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&i.setActiveOption(i.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,n=t.val()!==e;n&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return this.tagType===P&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){var n=t?[]:["change"];E(this,n,function(){this.clear(t),this.addItems(e,t)})},setActiveItem:function(t,n){var a,i,r,s,o,l,u,d,c=this;if("single"!==c.settings.mode){if(t=e(t),!t.length)return e(c.$activeItems).removeClass("active"),
c.$activeItems=[],void(c.isFocused&&c.showInput());if(a=n&&n.type.toLowerCase(),"mousedown"===a&&c.isShiftDown&&c.$activeItems.length){for(d=c.$control.children(".active:last"),s=Array.prototype.indexOf.apply(c.$control[0].childNodes,[d[0]]),o=Array.prototype.indexOf.apply(c.$control[0].childNodes,[t[0]]),s>o&&(u=s,s=o,o=u),i=s;i<=o;i++)l=c.$control[0].childNodes[i],c.$activeItems.indexOf(l)===-1&&(e(l).addClass("active"),c.$activeItems.push(l));n.preventDefault()}else"mousedown"===a&&c.isCtrlDown||"keydown"===a&&this.isShiftDown?t.hasClass("active")?(r=c.$activeItems.indexOf(t[0]),
c.$activeItems.splice(r,1),t.removeClass("active")):c.$activeItems.push(t.addClass("active")[0]):(e(c.$activeItems).removeClass("active"),c.$activeItems=[t.addClass("active")[0]]);c.hideInput(),this.isFocused||c.focus()}},setActiveOption:function(t,n,a){var i,r,s,o,l,u=this;u.$activeOption&&u.$activeOption.removeClass("active"),u.$activeOption=null,t=e(t),t.length&&(u.$activeOption=t.addClass("active"),!n&&x(n)||(i=u.$dropdown_content.height(),r=u.$activeOption.outerHeight(!0),n=u.$dropdown_content.scrollTop()||0,
s=u.$activeOption.offset().top-u.$dropdown_content.offset().top+n,o=s,l=s-i+r,s+r>i+n?u.$dropdown_content.stop().animate({scrollTop:l},a?u.settings.scrollDuration:0):s<n&&u.$dropdown_content.stop().animate({scrollTop:o},a?u.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,a,i,r=this,s=r.settings,o=this.getSearchOptions();if(s.score&&(i=r.settings.score.apply(this,[t]),"function"!=typeof i))throw new Error('Selectize "score" setting must be a function that returns a function');
if(t!==r.lastQuery?(r.lastQuery=t,a=r.sifter.search(t,e.extend(o,{score:i})),r.currentResults=a):a=e.extend(!0,{},r.currentResults),s.hideSelected)for(n=a.items.length-1;n>=0;n--)r.items.indexOf(C(a.items[n].id))!==-1&&a.items.splice(n,1);return a},refreshOptions:function(t){var n,i,r,s,o,l,u,d,c,f,p,h,m,v,g,y;"undefined"==typeof t&&(t=!0);var b=this,w=e.trim(b.$control_input.val()),P=b.search(w),_=b.$dropdown_content,S=b.$activeOption&&C(b.$activeOption.attr("data-value"));for(s=P.items.length,"number"==typeof b.settings.maxOptions&&(s=Math.min(s,b.settings.maxOptions)),
o={},l=[],n=0;n<s;n++)for(u=b.options[P.items[n].id],d=b.render("option",u),c=u[b.settings.optgroupField]||"",f=e.isArray(c)?c:[c],i=0,r=f&&f.length;i<r;i++)c=f[i],b.optgroups.hasOwnProperty(c)||(c=""),o.hasOwnProperty(c)||(o[c]=[],l.push(c)),o[c].push(d);for(this.settings.lockOptgroupOrder&&l.sort(function(e,t){var n=b.optgroups[e].$order||0,a=b.optgroups[t].$order||0;return n-a}),p=[],n=0,s=l.length;n<s;n++)c=l[n],b.optgroups.hasOwnProperty(c)&&o[c].length?(h=b.render("optgroup_header",b.optgroups[c])||"",
h+=o[c].join(""),p.push(b.render("optgroup",e.extend({},b.optgroups[c],{html:h})))):p.push(o[c].join(""));if(_.html(p.join("")),b.settings.highlight&&P.query.length&&P.tokens.length)for(n=0,s=P.tokens.length;n<s;n++)a(_,P.tokens[n].regex);if(!b.settings.hideSelected)for(n=0,s=b.items.length;n<s;n++)b.getOption(b.items[n]).addClass("selected");m=b.canCreate(w),m&&(_.prepend(b.render("option_create",{input:w})),y=e(_[0].childNodes[0])),b.hasOptions=P.items.length>0||m,b.hasOptions?(P.items.length>0?(g=S&&b.getOption(S),
g&&g.length?v=g:"single"===b.settings.mode&&b.items.length&&(v=b.getOption(b.items[0])),v&&v.length||(v=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):_.find("[data-selectable]:first"))):v=y,b.setActiveOption(v),t&&!b.isOpen&&b.open()):(b.setActiveOption(null),t&&b.isOpen&&b.close())},addOption:function(t){var n,a,i,r=this;if(e.isArray(t))for(n=0,a=t.length;n<a;n++)r.addOption(t[n]);else(i=r.registerOption(t))&&(r.userOptions[i]=!0,r.lastQuery=null,r.trigger("option_add",i,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 a,i,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),s!==-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&&(a=d.getItem(t),i=e(d.render("item",n)),a.hasClass("active")&&i.addClass("active"),a.replaceWith(i)),d.lastQuery=null,d.isOpen&&d.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=C(e);var a=n.renderCache.item,i=n.renderCache.option;a&&delete a[e],i&&delete i[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 a=this.$dropdown.find("[data-selectable]"),i=a.index(t)+n;return i>=0&&i<a.length?a.eq(i):e()},getElementWithValue:function(t,n){if(t=C(t),"undefined"!=typeof t&&null!==t)for(var a=0,i=n.length;a<i;a++)if(n[a].getAttribute("data-value")===t)return e(n[a]);
return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t,n){for(var a=e.isArray(t)?t:[t],i=0,r=a.length;i<r;i++)this.isPending=i<r-1,this.addItem(a[i],n)},addItem:function(t,n){var a=n?[]:["change"];E(this,a,function(){var a,i,r,s,o,l=this,u=l.settings.mode;return t=C(t),l.items.indexOf(t)!==-1?void("single"===u&&l.close()):void(l.options.hasOwnProperty(t)&&("single"===u&&l.clear(n),"multi"===u&&l.isFull()||(a=e(l.render("item",l.options[t])),
o=l.isFull(),l.items.splice(l.caretPos,0,t),l.insertAtCaret(a),(!l.isPending||!o&&l.isFull())&&l.refreshState(),l.isSetup&&(r=l.$dropdown_content.find("[data-selectable]"),l.isPending||(i=l.getOption(t),s=l.getAdjacentOption(i,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,a),l.updateOriginalInput({silent:n})))))})},removeItem:function(e,t){var n,a,i,r=this;
n="object"==typeof e?e:r.getItem(e),e=C(n.attr("data-value")),a=r.items.indexOf(e),a!==-1&&(n.remove(),n.hasClass("active")&&(i=r.$activeItems.indexOf(n[0]),r.$activeItems.splice(i,1)),r.items.splice(a,1),r.lastQuery=null,!r.settings.persist&&r.userOptions.hasOwnProperty(e)&&r.removeOption(e,t),a<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 a=this,i=a.caretPos;
t=t||e.trim(a.$control_input.val()||"");var r=arguments[arguments.length-1];if("function"!=typeof r&&(r=function(){}),"boolean"!=typeof n&&(n=!0),!a.canCreate(t))return r(),!1;a.lock();var s="function"==typeof a.settings.create?this.settings.create:function(e){var t={};return t[a.settings.labelField]=e,t[a.settings.valueField]=e,t},o=M(function(e){if(a.unlock(),!e||"object"!=typeof e)return r();var t=C(e[a.settings.valueField]);return"string"!=typeof t?r():(a.setTextboxValue(""),a.addOption(e),a.setCaret(i),
a.addItem(t),a.refreshOptions(n&&"single"!==a.settings.mode),void r(e))}),l=s.apply(this,[t,o]);return"undefined"!=typeof l&&o(l),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){var e,t=this;t.isRequired&&(t.items.length&&(t.isInvalid=!1),t.$control_input.prop("required",e)),t.refreshClasses()},refreshClasses:function(){var t=this,n=t.isFull(),a=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",a).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&&!a)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems;
},updateOriginalInput:function(e){var t,n,a,i,r=this;if(e=e||{},r.tagType===P){for(a=[],t=0,n=r.items.length;t<n;t++)i=r.options[r.items[t]][r.settings.labelField]||"",a.push('<option value="'+T(r.items[t])+'" selected="selected">'+T(i)+"</option>");a.length||this.$input.attr("multiple")||a.push('<option value="" selected="selected"></option>'),r.$input.html(a.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 a,i,r,s,o,l,u,d,c,f=this;if(r=n||void 0===n&&t&&t.keyCode===m?-1:1,s=D(f.$control_input[0]),f.$activeOption&&!f.settings.hideSelected&&(u=f.getAdjacentOption(f.$activeOption,-1).attr("data-value")),
o=[],f.$activeItems.length){for(c=f.$control.children(".active:"+(r>0?"last":"first")),l=f.$control.children(":not(input)").index(c),r>0&&l++,a=0,i=f.$activeItems.length;a<i;a++)o.push(e(f.$activeItems[a]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(f.isFocused||"single"===f.settings.mode)&&f.items.length&&(r<0&&0===s.start&&0===s.length?o.push(f.items[f.caretPos-1]):r>0&&s.start===f.$control_input.val().length&&o.push(f.items[f.caretPos]));if(!o.length||"function"==typeof f.settings.onDelete&&f.settings.onDelete.apply(f,[o])===!1)return!1;
for("undefined"!=typeof l&&f.setCaret(l);o.length;)f.removeItem(o.pop());return f.showInput(),f.positionDropdown(),f.refreshOptions(!0),u&&(d=f.getOption(u),d.length&&f.setActiveOption(d)),!0},advanceSelection:function(e,t){var n,a,i,r,s,o,l=this;0!==e&&(l.rtl&&(e*=-1),n=e>0?"last":"first",a=D(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(r=l.$control_input.val().length,s=e<0?0===a.start&&0===a.length:a.start===r,s&&!r&&l.advanceCaret(e,t)):(o=l.$control.children(".active:"+n),o.length&&(i=l.$control.children(":not(input)").index(o),
l.setActiveItem(null),l.setCaret(e>0?i+1:i))))},advanceCaret:function(e,t){var n,a,i=this;0!==e&&(n=e>0?"next":"prev",i.isShiftDown?(a=i.$control_input[n](),a.length&&(i.hideInput(),i.setActiveItem(a),t&&t.preventDefault())):i.setCaret(i.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 a,i,r,s;for(r=n.$control.children(":not(input)"),a=0,i=r.length;a<i;a++)s=e(r[a]).detach(),a<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,a=t.revertSettings;t.trigger("destroy"),
t.off(),t.$wrapper.remove(),t.$dropdown.remove(),t.$input.html("").append(a.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:a.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,a,i="",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&&(x(s.renderCache[e])||(s.renderCache[e]={}),s.renderCache[e].hasOwnProperty(n))?s.renderCache[e][n]:(i=s.settings.render[e].apply(this,[t,T]),"option"!==e&&"option_create"!==e||(i=i.replace(o,"<$1 data-selectable")),"optgroup"===e&&(a=t[s.settings.optgroupValueField]||"",i=i.replace(o,'<$1 data-group="'+k(T(a))+'"')),"option"!==e&&"item"!==e||(i=i.replace(o,'<$1 data-value="'+k(T(n||""))+'"')),r&&(s.renderCache[e][n]=i),i)},clearCache:function(e){var t=this;"undefined"==typeof 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))}}),j.count=0,j.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,a=e.extend({},n,t),i=a.dataAttr,r=a.labelField,s=a.valueField,o=a.optgroupField,l=a.optgroupLabelField,u=a.optgroupValueField,d=function(t,n){var o,l,u,d,c=t.attr(i);if(c)for(n.options=JSON.parse(c),o=0,l=n.options.length;o<l;o++)n.items.push(n.options[o][s]);else{var f=e.trim(t.val()||"");if(!a.allowEmptyOption&&!f.length)return;for(u=f.split(a.delimiter),
o=0,l=u.length;o<l;o++)d={},d[r]=u[o],d[s]=u[o],n.options.push(d);n.items=u}},c=function(t,n){var d,c,f,p,h=n.options,m={},v=function(e){var t=i&&e.attr(i);return"string"==typeof t&&t.length?JSON.parse(t):null},g=function(t,i){t=e(t);var l=C(t.attr("value"));if(l||a.allowEmptyOption)if(m.hasOwnProperty(l)){if(i){var u=m[l][o];u?e.isArray(u)?u.push(i):m[l][o]=[u,i]:m[l][o]=i}}else{var d=v(t)||{};d[r]=d[r]||t.text(),d[s]=d[s]||l,d[o]=d[o]||i,m[l]=d,h.push(d),t.is(":selected")&&n.items.push(l)}},y=function(t){
var a,i,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),a=0,i=o.length;a<i;a++)g(o[a],r)};for(n.maxItems=t.attr("multiple")?null:1,p=t.children(),d=0,c=p.length;d<c;d++)f=p[d].tagName.toLowerCase(),"optgroup"===f?y(p[d]):"option"===f&&g(p[d])};return this.each(function(){if(!this.selectize){var i,r=e(this),s=this.tagName.toLowerCase(),o=r.attr("placeholder")||r.attr("data-placeholder");o||a.allowEmptyOption||(o=r.children('option[value=""]').text());
var l={placeholder:o,options:[],optgroups:[],items:[]};"select"===s?c(r,l):d(r,l),i=new j(r,e.extend(!0,{},n,l,t))}})},e.fn.selectize.defaults=j.defaults,e.fn.selectize.support={validity:S},j.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,a='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+T(t.title)+'">'+t.label+"</a>",i=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 i(s.apply(this,arguments),a)}}r.apply(this,arguments),this.$control.on("click","."+t.className,function(t){if(t.preventDefault(),!n.isLocked){var a=e(t.currentTarget).parent();n.setActiveItem(a),n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}}),j.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 a,i;return t.keyCode===m&&""===this.$control_input.val()&&!this.$activeItems.length&&(a=this.caretPos-1,a>=0&&a<this.items.length)?(i=this.options[this.items[a]],this.deleteSelection(t,!0)&&(this.setTextboxValue(e.text.apply(this,[i])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()}),j.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 a=this.caretPos-1;if(a>=0&&a<this.items.length){var i=this.options[this.items[a]],r=e.text.call(this,i);this.removeItem(i[this.settings.valueField]),this.setTextboxValue(r),this.refreshOptions(!0)}return n.apply(this,arguments)}}()}),j})}).call(t,n(5))},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(74),r=a(i),s=new r.default({"interface":["load","stop","canPause"]});t.default=s,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(6),o=a(s),l=n(31),u=a(l),d=n(42),c=a(d),f=n(92),p=a(f),h=n(226),m=a(h),v=n(465),g=a(v),y=n(73),b=a(y),w=n(26),P=a(w),_=n(413),S=a(_),x=u.default.extend({readyEvent:"loadedmetadata",wrapped:["play","pause","setVolume","setPosition","resume","stop"],initialize:function(e){r.default.bindAll(this,"onReady","onWaiting","onStalled","onPlaying","onProgress","onTime","onPause","onVolume","onEnded","onError"),
this.type=e,this.backlog=new m.default,this.backlog.wrapAll(this.wrapped,function(){return!!this.mediaElement},this)},setMediaSrc:function(e,t){P.default.info("[Player] setting src attribute",e),this.mediaElement.setAttribute("src",e)},removeMediaSrc:function(){P.default.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"),a=e.mediaElement||this.createManagedMediaElement();this.backlog.clear(),this.model=t,
this.mediaElement=a,this.autoplay=e.autoplay,this.offset=t.get("position"),this.lastOffset=null;var i=!t.get("directPlay")&&"http"===e.protocol;this.useSeekStreamSwitch=i||e.useOffsetHLS,this.useOffset=e.useOffsetHLS||e.useOffsetHTTP,this.useOffset&&this.model.set("offset",this.offset),a.stream_restart=!1,a.autoplay=this.autoplay,this.addMediaListeners(),P.default.group("[Player] Load"),P.default.info("URL:",n),P.default.info("Autoplay:",this.autoplay),P.default.info("Offset:",this.offset),P.default.groupEnd(),
"dash"===e.protocol?(S.default.load(n,a),this.usingDashPlayer=!0):(this.setMediaSrc(n,e.mimeType),a.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(){P.default.info("[Player] Resuming at "+this.offset),this.setPosition(this.offset),this.offset=0},stop:function(){
P.default.info("[Player] Stopping playback. DashPlayer:",!!this.usingDashPlayer),this.removeMediaListeners(),this.model.set("ready",!1),this.usingDashPlayer&&(this.usingDashPlayer=!1,S.default.stop()),this.removeMediaSrc(),this.removeManagedMediaElement(),this.mediaElement=null},preferElementDuration:function(){if(!r.default.isFinite(this.mediaElement.duration))return!1;if(this.model.get("type")!==c.default.types.PHOTO){var e=r.default.first((0,p.default)(this.model.get("media"),{streamType:b.default.get("audio").id,
selected:!0}));if(e&&"vbr"===e.bitrateMode)return!1}return!0},getErrorMessage:function(e){return(0,o.default)("There was a problem playing this item.")},beforeStreamSwitch:function(){this.mediaElement&&(this.mediaElement.stream_restart=!0)},createManagedMediaElement:function(){var e=c.default.getElementByType(this.type),t="audio"===e,n=(0,g.default)(e,t);return n.style.cssText="position:absolute;width:1px;height:1px;",n.managed=!0,n.parentNode||document.body.appendChild(n),n},removeManagedMediaElement:function(){
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")){P.default.info("[Player] Playback is ready");var t=this.mediaElement,n={ready:!0,loaded:!0};if(e.get("type")===c.default.types.VIDEO&&(n.videoDimensions={width:t.videoWidth,height:t.videoHeight}),this.preferElementDuration()){var a=1e3*t.duration;this.useOffset&&(a+=this.offset),n.duration=Math.round(a)}e.set(n);var i=e.get("volume");null!=i&&this.setVolume(i),
this.backlog.process()}},onWaiting:function(){this.model.set("state",c.default.states.BUFFERING)},onStalled:function(){},onPlaying:function(){this.model.set("state",c.default.states.PLAYING)},onProgress:function(){for(var e=this.mediaElement.buffered,t=null,n=null,a=0,i=e.length;a<i;a++){var r=Math.round(1e3*e.start(a)),s=Math.round(1e3*e.end(a));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 a=1e3*e.currentTime;this.useOffset&&(a+=this.offset);var i=this.lastOffset&&Math.abs(a-this.lastOffset)<100;if(!(e.paused||i&&this.model.get("buffering"))){var r=this.model;this.lastOffset=a,r.get("buffering")&&r.set("state",c.default.states.PLAYING),r.set("position",Math.round(a))}},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&&S.default.canPause(this.mediaElement)?this.model.set("state",c.default.states.BUFFERING):this.model.set("state",c.default.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&&P.default.warn("[Player] Media element error code: "+n),this.model.set({state:c.default.states.ERROR,errorMessage:this.getErrorMessage(n)})}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(6),u=a(l),d=n(178),c=a(d),f=n(31),p=a(f),h=n(485),m=a(h),v=n(486),g=a(v),y=n(478),b=a(y),w=n(481),P=a(w),_=n(870),S=a(_),x=n(42),C=a(x),T=n(237),k=a(T),I=n(226),M=a(I),A=n(492),E=a(A),O=n(893),D=a(O),R=n(26),L=a(R),N=n(9),j=a(N),U=n(73),F=a(U),B=n(85),z=a(B),$=n(285),V=a($),H=n(17),q=a(H),W=n(48),K=a(W),Q=n(287),Y=a(Q),G=n(414),X=a(G),J=p.default.extend({
mixins:[K.default,Y.default],playerProfileAdapter:V.default,resetStreamDebounce:200,handleSetPositionDebounce:0,errorSkipTime:2e3,wrapped:["play","pause","playPause","setVolume","setRepeat","setPosition","seekForward","seekBackward","setSubtitleStreamID"],modelDefaults:function(){var e=Y.default.modelDefaults.apply(this,arguments);return r.default.extend(e,{state:C.default.states.BUFFERING})},initialize:function(e){e||(e={}),Y.default.initialize.apply(this,arguments),r.default.bindAll(this,"onDecisionSuccess","onDecisionError"),
this.profile=this.playerProfileAdapter.prop(this.type),this.backlog=new M.default,this.backlog.wrapAll(this.wrapped,function(){return!!this.subcontroller},this),this.useBufferDetection()&&(this.bufferingDetector=new D.default,this.bufferingDetector.on("warn",this.onBufferingDetectorWarn,this),this.bufferingDetector.on("buffering",this.onBufferingDetected)),this.resetStreamDebounce&&(this.resetStream=r.default.debounce(this.resetStream,this.resetStreamDebounce)),this.handleSetPositionDebounce&&(this.handleSetPosition=r.default.debounce(this.handleSetPosition,this.handleSetPositionDebounce)),
this.listenTo(j.default,{"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){this.originalOptions=e,
this.model=e.model,this.autoplay=e.autoplay,this.postplay=e.postplay;var t=this.model.get("playQueue"),n=this.model.get("playQueueItem");return this.reset(n),k.default.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
}),t&&(this.listenTo(t.get("collection"),"add remove reset sync",this.onPlayQueueChange),this.listenTo(t,"change:hasUpNext change:shuffled",this.onPlayQueueChange)),this.getPlayerDecision(n.get("metadataItem"),e)},reset:function(e){return this.bufferingDetector&&this.bufferingDetector.stop(),Y.default.reset.apply(this,arguments)},populateItem:function(e,t){var n=r.default.extend({},t,{reset:!0,scope:"player"});if(e.get("isLibraryItem")&&(n.data={checkFiles:"1",includeChapters:"1"}),e.server.get("cloud")){
var a=e.get("key");n.url=e.server.swizzleNodeUrl(a)}return e.populate(n)},loadMediaElement:function(e){this.subcontroller=this.getSubcontrollerByType(this.playerType),this.backlog.process();var t,n=this.profile&&this.profile.protocols,a=this.protocol;a&&n&&n[a]&&(t=n[a].mimeType),this.subcontroller.load(r.default.extend({},this.originalOptions,{model:this.model,protocol:a,autoplay:this.autoplay,mimeType:t,useOffsetHLS:e.useOffsetHLS,useOffsetHTTP:e.useOffsetHTTP,canDirectPlay:e.canDirectPlay})),this.bufferingDetector&&(this.bufferingDetector.setModel(this.model),
this.bufferingDetector.start())},getSubcontrollerByType:function(e){return new X.default(this.type)},embed:function(e){var t=this.model.get("metadataItem"),n=o.default.ajax(t.server.getXHROptions(e.key));n.done(r.default.bind(function(e){this.model.set("embedHtml",e)},this)),n.fail(r.default.bind(function(e){this.model.set({state:C.default.states.ERROR,errorMessage:(0,u.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 a=e.key.match(/\/webkit\?url=([^&]+)/);a&&(n=decodeURIComponent(a[1]))}window.open(n),r.default.defer(r.default.bind(function(){this.model.set("finished",!0)},this))},play:function(){this.model.get("state")!==C.default.states.PLAYING&&this.subcontroller.play()},pause:function(){this.model.get("state")!==C.default.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!==C.default.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){var t=q.default.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),streamType:F.default.get("subtitles"),streamID:e});t.done(r.default.bind(function(){this.model.set("subtitleStreamID",e)},this))},restartCurrent:function(){this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);
},skipPrevious:function(){var e=Y.default.skipPrevious.apply(this,arguments);return e&&this.switchStreams({autoplay:!0}),e},skipNext:function(){var e=Y.default.skipNext.apply(this,arguments);return e&&this.switchStreams({autoplay:!0}),e},skipNextOrFinish:function(){this.model.get("canSkipNext")?this.skipNext():this.model.set("finished",!0)},skipTo:function(e){var t=Y.default.skipTo.apply(this,arguments);return t&&this.switchStreams({autoplay:!0}),t},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){if(e||(e={}),this.canHandleDebounce()){var t=this.stopSession();t.done(r.default.bind(function(){this.autoplay=e.autoplay!==!1,this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);
},this))}},stop:function(e,t){return(0,L.default)("[PlayerController] Stopping playback"),Y.default.stop.apply(this,arguments),this.bufferingDetector&&(this.bufferingDetector.off("warn",this.onBufferingDetectorWarn),this.bufferingDetector.stop()),k.default.unregisterPlayer(this),j.default.trigger("hide:player",t),this.stopSession(e)},setSkipStates:function(e){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem(),this.model.set(r.default.extend({},e,{canSkipPrevious:!!this.previousItem,
canSkipNext:!!this.nextItem},this.modelOverrides()))},shouldSkipOnError:function(){return!1},skipOnError:function(){if(this.shouldSkipOnError()){this.abortSkipOnError(),L.default.warn("[PlayerController] Item failed to play, automatically skipping to the next item in",(0,c.default)(this.errorSkipTime));var e=r.default.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(0,E.default)(e)||(0,u.default)("There was a problem playing this item.")},getMaxVideoBitrateQualityIndex:function(e){var t=e.transcoderQualityOptions.maxVideoBitrate;if(t)return t?z.default.getNearestIndexToBitrate(t):void 0},onDecisionSuccess:function(e){var t=this.model,n=t.get("state"),a=0;if(n!==C.default.states.STOPPED&&n!==C.default.states.ERROR){e.part&&e.part.duration&&(a=e.part.duration),this.playbackSessionID=e.playbackSessionID,
this.transcodeSessionID=e.transcodeSessionID,this.playerType=e.playerType,this.protocol=e.protocol;var i=e.media,s=e.part,o=(0,m.default)(i),l=(0,g.default)(i),u=t.get("playQueueItem"),d=u.get("lyricsStreams");this.model.set(r.default.extend({media:i,part:s,url:e.url,subtitlesUrl:e.subtitlesUrl,transcodeServer:e.transcodeServer,mediaIndex:i?(0,b.default)(t.get("metadataItem"),i.id):0,partIndex:s?(0,P.default)(i,s.key):0,partCount:(0,S.default)(e.media),audioStreamID:o?o.id:0,subtitleStreamID:l?l.id:0,
state:this.autoplay?C.default.states.BUFFERING:C.default.states.PAUSED,position:e.offset,duration:a,directPlay:e.canDirectPlay,playbackSessionID:e.playbackSessionID,transcodeSessionID:e.transcodeSessionID,softSubtitlesFailed:!1,canLyrics:d&&d.length>0},this.modelOverrides())),this.loadMediaElement(e)}},onDecisionError:function(e){var t=this.model,n=t.get("state");if(n!==C.default.states.STOPPED&&n!==C.default.states.ERROR){var a=this.playerProfileAdapter.prop("capabilities");return e.embed&&a.embed?void this.embed(e.part):e.redirect&&a.redirect?void this.redirect(e.part):void t.set({
state:C.default.states.ERROR,errorMessage:this.getErrorMessage(e)})}},onQualityIndexChange:function(e,t){var n=e.previous("qualityIndex");null!=t&&null!=n&&this.switchStreams()},onAudioStreamIDChange:function(e,t){var n=e.previous("audioStreamID");null!=t&&null!=n&&this.switchStreams()},onSubtitleStreamIDChange:function(e,t){var n=e.previous("subtitleStreamID");null!=t&&null!=n&&this.switchStreams()},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 n=this.timeline();(0,L.default)("[PlayerController] State change",t),t===C.default.states.PLAYING&&n.done(r.default.bind(this.updatePlayQueue,this)),t===C.default.states.STOPPED||t===C.default.states.ERROR?this.stopTimeline():this.startTimeline(),t===C.default.states.PAUSED?this.startPing():this.stopPing(),t===C.default.states.PLAYING?this.startPlaybackTracking():this.stopPlaybackTracking(),
t===C.default.states.ERROR?this.skipOnError():this.abortSkipOnError()},onEndedChange:function(e,t){if(t){var n=e.get("partIndex"),a=e.get("partCount");if(++n>=a)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 i=e.get("media");this.model.set({part:i.Part[n],position:0}),this.switchStreams({autoplay:!0})}}},onSoftSubtitlesFailedChange:function(e,t){!t||e.get("stopped")||e.get("error")||this.switchStreams();
},onBufferingDetected:function(){this.model.set("state",C.default.states.BUFFERING)},onBufferingDetectorWarn:function(e){var t,n=this.bufferingDetector.reasons,a=e.reason,i=this.bufferingDetector.recommendations,r=e.recommendation,s=this.type===C.default.types.VIDEO?(0,u.default)("video"):(0,u.default)("track");t=a===n.TRANSCODER?r===i.ORIGINAL_QUALITY?(0,u.default)("The server is not powerful enough to convert this {1} for smooth playback. Try playing at the original quality.",s):(0,u.default)("The server is not powerful enough to convert this {1} for smooth playback.",s):a===n.NETWORK?r===i.LOWER_QUALITY?(0,
u.default)("Your connection to the server is not fast enough to stream this {1}. Check your network or try a lower quality.",s):(0,u.default)("Your connection to the server is not fast enough to stream this {1}. Check your network.",s):(0,u.default)("We are having trouble playing this {1}. Please check your playback setup.",s),this.model.set("bufferingMessage",t)}});t.default=J,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(419),r=a(i),s=r.default.extend({
supportsRetry:function(e){return e.get("isCloud")}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(48),r=a(i),s=n(419),o=a(s),l=o.default.extend({mixins:[r.default],initialize:function(e){var t=e.appModel;o.default.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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(6),o=a(s),l=n(9),u=a(l),d=n(31),c=a(d),f=n(58),p=a(f),h=n(177),m=a(h),v=n(26),g=a(v),y=n(48),b=a(y),w=c.default.extend({mixins:[b.default],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(u.default,"timeline",this.onTimeline)},stop:function(){this.stopListening(),this._serverRetryManager.stopAll(),this.connections={}},connect:function(e){var t=e.server,n=this.connections[t.id];n||(n=new this.ServerEventConnection({server:t}),this.connections[t.id]=n,this.listenTo(n,{open:this.onOpen,close:this.onClose,
error:this.onClose}));var a=n.open(),i=n.socket?n.socket.url:n.pollUrl;return(0,g.default)("["+this.name+"] Opening server event connection to "+t.get("debugName")+" at "+i),a},disconnectAll:function(){var e=this;r.default.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 n=t.socket?t.socket.url:t.pollUrl,a=t.server;(0,g.default)("["+this.name+"] Closing server event connection to "+a.get("debugName")+" at "+n),
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&&(p.default.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,a=t.previousModels;r.default.each(a,function(t){e.contains(t)||n.disconnect({server:t})})},onTimeline:function(e){var t=void 0;switch(e.state){case m.default.CREATED:t="Created {1} in {2} on {3}";break;case m.default.MATCHING:t="Matching {1} in {2} on {3}";break;case m.default.DOWNLOADING_METADATA:t="Downloading metadata for {1} in {2} on {3}";
break;case m.default.LOADING_METADATA:t="Loading metadata for {1} in {2} on {3}";break;case m.default.PROCESSED:t="Finished processing {1} in {2} on {3}";break;case m.default.ANALYZING:t="Analyzing {1} in {2} on {3}";break;case m.default.DELETED:t="Deleted {1} in {2} on {3}"}if(t&&e.sectionID>0){var n=e.title||(0,o.default)("an item"),a=e.section?e.section.get("title"):"section "+e.sectionID;u.default.trigger("show:status",e.server,(0,o.default)(t,n,a,e.server.get("friendlyName")))}},onOpen:function(e){
var t=this.connections[e.id],n=t.socket?t.socket.url:t.pollUrl;g.default.info("["+this.name+"] Opened server event connection to "+e.get("debugName")+" at "+n),this._serverRetryManager.stop(e)},onClose:function(e){g.default.warn("["+this.name+"] Unexpectedly closed server event connection to "+e.get("debugName")),this._serverRetryManager.start(e)}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(31),o=a(s),l=n(26),u=a(l),d=o.default.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;r.default.each(this._serversBeingRetried,function(t,n){clearTimeout(t.timeout),
delete e._serversBeingRetried[n]})},supportsRetry:function(e){return!0},_scheduleRetry:function(e){var t=this,n=this._serversBeingRetried[e.id],a=Math.min(this.maximumDelay,n.attempt);(0,u.default)(this.logFormat,e.get("debugName"),a),n.timeout=setTimeout(function(){t.callback(e),n.attempt++,t._scheduleRetry(e)},1e3*a)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(306),o=a(s),l=n(38),u=a(l),d=n(84),c=a(d),f=n(60),p=a(f),h=n(19),m=a(h),v=m.default.extend({
name:"AbstractStorageModel",responseType:p.default.json,save:function(e,t){var n=this,a=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=this.attributes,s=void 0;if(null==e||r.default.isObject(e)?(s=e,a=t):(s={})[e]=t,a=r.default.extend({validate:!0},a),this._warnUnsupportedOptions(a),s&&!a.wait){if(!this.set(s,a))return!1}else if(!this._validate(s,a))return!1;s&&a.wait&&(this.attributes=r.default.extend({},i,s));var l=this.toJSON({syncedOnly:!0,excludeDefaults:!0});c.default.getInstance().persistDefaults||(l=(0,
o.default)(r.default.result(this,"defaults"),l));var u=this._serialize(l),d=c.default.set(this._getStorageKey(),u);return d.done(function(){n.attributes=i,n.trigger("sync",n,i,a)}),d.fail(function(e){n.trigger("error",n,e,a)}),s&&a.wait&&(this.attributes=i),d},destroy:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this._warnUnsupportedOptions(t),t.wait||this.trigger("destroy",this,this.collection,t);var n=c.default.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=r.default.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];this._warnUnsupportedOptions(t);var n=c.default.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=JSON.stringify(e)}catch(n){this._logError("serialization error: "+n.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(n){t="no storageKey"}(0,u.default)(!1,this.name+" ("+t+") "+e)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(116),u=a(l),d=n(53),c=a(d),f=c.default.extend({fetch:function(){return this.storage.fetch().then(r.default.bind(function(){var e=this._readFromStorage();return e?(this.set(e),this):o.default.Deferred().reject();
},this))},save:function(e){return(0,u.default)(this.storage.fetch()).then(r.default.bind(function(){return e&&this.set(e),this._saveToStorage(this.toJSON())},this))},destroy:function(){return(0,u.default)(this.storage.fetch()).then(r.default.bind(function(){return this.storage.unset(r.default.result(this,"storageKey")),this.storage.save()},this))},_readFromStorage:function(){return this.storage.get(r.default.result(this,"storageKey"))},_saveToStorage:function(e){return this.storage.save(r.default.result(this,"storageKey"),e);
}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return l.default.get("shouldCreateFlexModels")&&(e.prototype.sessionRelations=i({},e.prototype.sessionRelations,r({},"desktop",t))),e}var i=n(12).default,r=n(52).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(57),l=s(o);e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=a(r),o=n(143),l=i(o),u=n(18),d=i(u),c=n(19),f=i(c),p=n(752),h=i(p),m=f.default.extend({
mixins:[l.default],name:"ChannelListModel",context:["server"],idAttribute:"key",collectionName:"channels",url:function v(){var e=this.get("key"),v=e?e:s.join(["/channels",this.get("subset")]);return this.getPaginatedUrl(v)},sessionAttrs:{key:d.default.string,subset:d.default.oneOf("all","recentlyViewed"),currentPageStart:d.default.integer,currentPageSize:d.default.integer,populatedRange:d.default.object},syncedAttrs:{totalSize:d.default.integer,viewGroup:d.default.string,title1:d.default.string,title2:d.default.string
},syncedRelations:{channels:{relationClass:h.default,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.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(46),r=a(i),s=n(18),o=a(s),l=n(60),u=a(l),d=n(19),c=a(d),f=n(89),p=a(f),h=c.default.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:o.default.string,identifier:o.default.string,type:o.default.string,name:o.default.string,title1:o.default.string,title2:o.default.string,message:o.default.string,summary:o.default.string,thumb:o.default.string,art:o.default.string,prefsKey:o.default.string,searchKey:o.default.string,
installed:o.default.boolean,noCache:o.default.boolean,allowSync:o.default.boolean,hasPrefs:o.default.boolean,hasStoreServices:o.default.boolean,share:o.default.boolean,lastAccessedAt:o.default.integer},syncedRelations:{metadataList:{relationClass:p.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===u.default.xml?r.default.replaceMetadataXMLElementNames(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=r.default.parseArray(e.Metadata),a=n.length-1;a>=0;a--){var i=n[a];if(i.isChannelItem=!0,i.settings||i.search){var s=i.settings?"prefsKey":"searchKey";e[s]=i.key,n.splice(a,1)}}return e.Metadata=n,e.metadataList=e,e}});t.default=h,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(53),u=a(l),d=n(880),c=a(d),f=n(883),p=a(f),h=n(877),m=a(h),v=n(288),g=a(v),y=u.default.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 g.default([],{type:e.mediaType,server:e.server})})},fetch:function(){return o.default.Deferred().resolve().promise();
},queueContent:function(e,t,n){n||(n={});var a=o.default.Deferred().resolve().promise(),i=e.get("isPlayQueueItem")?e.get("metadataItem"):e;return this.isItemQueueable(i)&&(i.get("children")&&r.default.result(i.get("children"),"url")&&(a=a.then(function(){return i.get("children").populate()})),a=a.done(r.default.bind(function(){this.set({lastAddedItem:i,hasUpNext:!0,hasUserAdditions:this.get("collection").length>0,shuffled:!!n.shuffled});var e=this.get("collection").indexOf(t);e===-1&&(e=0);var a=n.next?{
at:e+1}:{},s=(0,c.default)(i);if(s){var o=s.filter(p.default);n.shuffle&&(o=(0,r.default)(o).shuffle());var l=r.default.map(o,r.default.bind(m.default,this));this.get("collection").add(l,a)}else this.get("collection").add(m.default.apply(this,[i]),a);this.get("collection").trigger("reset",this.get("collection"))},this))),a},addContent:function(e,t){return this.queueContent(e,this.get("selectedItem"),t).then(r.default.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")?o.default.Deferred().resolve().promise():(this.set("hasUserAdditions",!0),this.get("collection").remove(e),this.get("collection").trigger("reset",this.get("collection")),o.default.Deferred().resolve().promise())},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return o.default.Deferred().resolve().promise();
var n=this.get("collection"),a=n.findWhere({playQueueItemID:e});n.remove(a);var i=t||this.get("selectedItem").get("playQueueItemID"),r=n.findWhere({playQueueItemID:i}),s=n.indexOf(r)+1;return this.set("hasUserAdditions",!0),n.add(a,{at:s}),n.trigger("reset",n),o.default.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"],n=(0,
r.default)(t).contains(e.get("type")),a=(0,c.default)(e),i=a&&a.any(p.default);return n||i},toggleShuffle:function(){return o.default.Deferred().resolve().promise()},setRepeatAll:function(e){return o.default.Deferred().resolve().promise()},yieldOwnership:function(e){e=e||{};var t,n=this.get("lastAddedItem");return t=n.server.get("synced")||e.absoluteUrl?r.default.result((0,c.default)(n),"url"):this.get("selectedItem").get("key"),o.default.Deferred().resolve(t).promise()},takeOwnership:function(){
return o.default.Deferred().resolve().promise()},supports:function(e){return!(e&&(e.unwatched||e.remoteRefresh))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(31),o=a(s),l=n(48),u=a(l),d=n(40),c=a(d),f=n(425),p=a(f),h=n(174),m=a(h),v=o.default.extend({mixins:u.default,initialize:function(e){this.server=e.server,this._queues={audio:null,photo:null,video:null},this.canCreateOnLocal=p.default.prototype.isItemQueueable,
this.doesLocalSupport=p.default.prototype.supports},createFor:function(e,t){t=t||e;var n;n=t.get("isUserPlaylist")?"video":t.get("isPlaylist")?t.get("playlistType"):t.get("isMetadataList")?c.default.getChildMediaType(t.get("firstItemType")).element:e.get("element")||c.default.getChildMediaType(t.get("type")).element;var a=null;return this.canCreateOnServer(e)?a=new m.default({mediaType:n},{server:this.server}):this.canCreateOnLocal(e)&&(a=new p.default({mediaType:n},{server:this.server})),this._queues[n]=a,
this.trigger("change change:playQueue:"+n,a),a},getForType:function(e){return this._queues[e]},createForType:function(e,t){var n=null;return n=t.onServer?new m.default({mediaType:e},{server:this.server}):new p.default({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;n=e.get("isUserPlaylist")?"video":e.get("isPlaylist")?e.get("playlistType"):e.get("element")||c.default.getChildMediaType(t).element;
var a=this._queues[n];return a&&a.isItemQueueable(e)?a:null},get:function(e){return r.default.findWhere(this._queues,{id:e})},populateQueue:function(e,t){var n=new m.default({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:"+e,t))},removeAll:function(){r.default.each(r.default.keys(this._queues),this.remove,this)},canCreateOnServer:function(e){return this.server.supports("playQueues")&&this.server.get("isFullServer")&&m.default.prototype.isItemQueueable(e);
},doesServerSupport:function(e){return this.server.supports("playQueues")&&m.default.prototype.supports(e)},canCreateFor:function(e,t){return this.canCreateOnServer(e)&&this.doesServerSupport(t)||this.canCreateOnLocal(e)&&this.doesLocalSupport(t)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(749),o=a(s),l=o.default.extend({initialize:function(e){this.playQueue=e.playQueue,this.includeSelectedItem=e.includeSelectedItem,
this.addFilter(r.default.bind(this.filterUpNext,this)),this.listenForUpNextChanges()},listenForUpNextChanges:function(){var e=r.default.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(),a=n.start,i=n.end;return this.includeSelectedItem||(a+=1),
t>=a&&t<=i},onPlayQueueChange:function(){this.refilter()}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(760),u=a(l),d=o.default.extend({name:"FilterOptionCollection",context:["server","section","type","standalone"],model:u.default,url:function c(){var e=r.default.result(this.section,"url"),c=e+"/"+this.parent.id;return this.type?c+="?type="+this.type:this.standalone||(c+="?"+this.getUrlParams()),
c},getUrlParams:function(){var e=this,t={},n=[],a=this.section.get("currentType"),i=this.section.get("currentFilters");return a&&(t.type=a.id),r.default.each(i,function(n){n.key!==e.parent.id&&n.values.length&&(t[n.key]=n.values.join(","))}),r.default.each(t,function(e,t){"unviewedLeafCount"===t?n.push(t+">="+e):n.push(t+"="+e)}),n.join("&")},augmentResponse:function(e){return e.Directory&&!r.default.isArray(e.Directory)&&(e.Directory=[e.Directory]),e.Directory=r.default.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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"FirstCharacterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:r.default.string,title:r.default.string,
size:r.default.integer},urlRoot:function(){return"/library/sections/"+this.section.id+"/firstCharacter"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"MediaTypeModel",context:["server","section"],sessionAttrs:{id:r.default.integer,typeString:r.default.string,title:r.default.string,plural:r.default.string,element:r.default.string,child:r.default.integer,
grandchild:r.default.integer,parent:r.default.integer,grandparent:r.default.integer,selected:r.default.boolean},defaults:{selected:!1}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(25),d=a(u),c=n(432),f=a(c),p=d.default.extend({name:"SortCollection",context:["server","section","typeID"],model:f.default,url:function(){var e=s.default.result(this.section,"url"),t=this.typeID||this.section.get("currentType").id,n=t?{
type:t}:{};return l.join([e,"/sorts"],n)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l={ASCENDING:"asc",DESCENDING:"desc"},u=o.default.extend({name:"SortModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{selected:r.default.boolean,direction:r.default.string},syncedAttrs:{key:r.default.string,title:r.default.string,isDefault:r.default.boolean,
defaultDirection:r.default.string},defaults:{selected:!1},augmentResponse:function(e){return e.defaultDirection||(e.defaultDirection=e.default||l.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!==l.ASCENDING?l.ASCENDING:l.DESCENDING,this.set("direction",e)}},{directions:l});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(46),s=a(r),o=n(78),l=i(o),u=n(77),d=a(u),c=n(18),f=a(c),p=n(60),h=a(p),m=n(19),v=a(m),g=n(89),y=a(g),b=v.default.extend({name:"HubModel",context:["server","section","allowSync"],entityType:l.HUB,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,d.default)(this.entityType,e.hubIdentifier,this.server.entityID(),this.section&&this.section.entityID())},idAttribute:"hubIdentifier",rootPropertyName:"Hub",
url:function(){return this.get("key")||this.get("hubKey")},sessionAttrs:{isMetadataListPending:f.default.boolean,isMetadataListPopulated:f.default.boolean,metadataListError:f.default.object},syncedAttrs:{key:f.default.string,hubKey:f.default.string,hubIdentifier:f.default.string,title:f.default.string,type:f.default.string,size:f.default.integer,more:f.default.boolean,random:f.default.boolean,browse:f.default.boolean},syncedRelations:{metadataList:{relationClass:y.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===h.default.xml?s.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){var t=s.default.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,a=e.get("totalSize"),i={
size:n};null!=a&&(i.more=a>n),this.set(i)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(774),o=a(s),l=r.default.extend({name:"OverlayCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(131),l=a(o),u=n(23),d=i(u),c=n(143),f=a(c),p=n(18),h=a(p),m=n(19),v=a(m),g=n(775),y=a(g),b=v.default.extend({
mixins:[f.default],name:"PlaylistListModel",context:["server","section"],idAttribute:"key",collectionName:"playlists",url:function(){return this.getPaginatedUrl(s.default.result(this,"containerKey"))},containerKey:function(){var e=this.section.get("currentType"),t=this.section.get("currentSort"),n={type:15};return t?n.sort=t.id+":"+(t.get("direction")||"asc"):n.sort="titleSort:asc",e&&(n.playlistType=e),this.section.get("onlyDumb")&&(n.smart=0),d.join("/playlists/all",n)},sessionAttrs:{isPlaylistList:h.default.boolean,
currentPageStart:h.default.integer,currentPageSize:h.default.integer,populatedRange:h.default.object},syncedAttrs:{totalSize:h.default.integer},syncedRelations:{playlists:{relationClass:y.default,rootPropertyName:"Playlist",options:function(e){return{containerKey:s.default.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 a=l.default.addVersionHeader(2,n);return v.default.prototype.sync.call(this,e,t,a)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(232),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=u.default.extend({name:"TagModel",context:["server","section"],idAttribute:"tag",syncedAttrs:{id:o.default.integer,tag:{type:o.default.string,save:!0},tagType:o.default.integer,librarySectionType:o.default.integer,
librarySectionID:o.default.string,role:o.default.string,thumb:o.default.string,count:o.default.integer},derivedAttrs:{thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,r.default)(this.server,e)}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(53),u=a(l),d=n(175),c=a(d),f=u.default.extend({whitelistedAttrs:["friendlyName","label","capabilities"],defaults:{protocolCapabilities:["playback","timeline","mirror","playqueues"]
},initialize:function(){this.set("nowPlaying",new c.default([],{server:this.server}))},parse:function(e){var t=r.default.pick(e,this.whitelistedAttrs);return t.friendlyName=(0,o.default)("<div/>").html(t.friendlyName).text(),t.protocol=e.receiverType,t.volume=e.volume.level,t.muted=e.volume.muted,t}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(293),u=a(l),d=n(42),c=a(d),f=u.default.extend({
name:"PhotoPlayerModel",sessionAttrs:r.default.extend({},u.default.prototype.sessionAttrs,{slideshowState:o.default.oneOf(c.default.slideshowStates.PLAYING,c.default.slideshowStates.PAUSED)}),defaults:function(){return r.default.extend({},u.default.prototype.defaults.apply(this),{slideshowState:c.default.slideshowStates.PAUSED,slideshowPaused:!0,slideshowPlaying:!1})},derivedAttrs:r.default.extend({},u.default.prototype.derivedAttrs,{slideshowPaused:function(){return this.get("slideshowState")===c.default.slideshowStates.PAUSED;
},slideshowPlaying:function(){return this.get("slideshowState")===c.default.slideshowStates.PLAYING}})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),r=a(i),s=n(502),o=a(s),l=n(173),u=a(l),d=n(421),c=a(d),f=2592e5,p=u.default.extend({storageKey:"resumePlayQueue",serialize:function(e){return u.default.prototype.serialize.call(this,o.default.augmentDictionary(e,{ttl:f}))},_getStorage:function(){return r.default;
}}),h=c.default.extend({initialize:function(e,t){c.default.prototype.initialize.apply(this,arguments),this.user=t.user,this.storage=new p},storageKey:function(){return this.user.id},toJSON:function(){var e=c.default.prototype.toJSON.apply(this,arguments);return o.default.augmentObj(e,f,!0)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(23),u=r(l),d=n(141),c=i(d),f=n(18),p=i(f),h=n(19),m=i(h),v=n(175),g=i(v),y=m.default.extend({
name:"PlexPlayerModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",sessionAttrs:{nowPlaying:p.default.instanceOf(g.default).isRequired},syncedAttrs:{machineIdentifier:p.default.string,name:p.default.string,address:p.default.string,port:p.default.string,deviceClass:p.default.string,version:p.default.string,product:p.default.string,protocol:p.default.string,protocolVersion:p.default.string,protocolCapabilities:p.default.list},derivedAttrs:{friendlyName:function(){return this.get("name");
}},defaults:function(){return{nowPlaying:new g.default([],{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:u.join([o.default.result(this,"url"),e])},getHeaders:function(){var e=c.default.getInstance(),t=o.default.clone(e);return t}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(72),u=a(l),d=n(11),c=u.default.prototype,f=u.default.extend({name:"TransientServerModel",cache:null,persistInCache:!1,sessionAttrs:r.default.extend({},u.default.prototype.sessionAttrs,{isTransient:o.default.boolean,originalMachineIdentifier:o.default.string}),defaults:function p(){var p=u.default.prototype.defaults.apply(this,arguments);return r.default.extend({},p,{friendlyName:"Transient Server",
isTransient:!0})},initialize:function(e){var t=e.originalMachineIdentifier,n=(0,d.resolve)("appModel"),a=n.get("servers").get(t);a&&r.default.extend(e,a.pick("publicAddressMatches","version")),u.default.prototype.initialize.apply(this,arguments)},addConnection:function(){var e=c.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.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=n(807),c=a(d),f=u.default.extend({name:"StoredServerModel",idAttribute:"machineIdentifier",syncedAttrs:{machineIdentifier:o.default.string,friendlyName:o.default.string,
accessToken:o.default.string,sourceTitle:o.default.string,home:o.default.boolean,synced:o.default.boolean,serverClass:o.default.string,isShared:o.default.boolean,version:o.default.string,publicAddressMatches:o.default.boolean},syncedRelations:{connections:{relationClass:c.default}},copyFromServer:function(e){var t={};r.default.each(this.syncedAttrs,function(n,a){t[a]=e.get(a)}),this.set(t)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(57),o=a(s),l=n(173),u=a(l),d=u.default.extend({storageKey:"sessionstats",incPlaybackCount:function(){this.save("playbackCount",this.get("playbackCount")+1)},startSession:function(){var e=(new Date).getTime();this.save({playbackCount:0,startTime:e,heartbeatTime:e}),setInterval(r.default.bind(function(){this.save("heartbeatTime",(new Date).getTime())},this),o.default.get("heartbeatInterval"))}});t.default=new d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(39),u=a(l),d=n(53),c=a(d),f=n(822),p=a(f),h=c.default.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=r.default.isObject(e)?e:u.default.parseXML(e);return t.User&&(t=t.User),u.default.parseInteger(t,"id"),u.default.parseBoolean(t,["home","protected","restricted","allowSync","allowCameraUpload","allowChannels"]),u.default.parseQueryString(t,["filterMovies","filterTelevision","filterMusic","filterPhotos"],"|"),u.default.parseArray(t,"Server"),t},parse:function(e){var t=this.convert(e);return this.parseServers(t),
t=r.default.pick(t,this.whitelistedAttrs)},parseServers:function(e){var t=this.get("serverShares"),n=e.Server;t?t.set(n,{parse:!0}):(t=new p.default(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(o.default.extend(!0,{},e),t)||null;
},getSaveParams:function(e,t){var n=this;if(r.default.isEmpty(e)){var a=this.pick(this.saveAttrs);return r.default.map(a,function(e,t,a){r.default.isBoolean(e)?a[t]=e?"1":"0":r.default.contains(n.filterAttrs,t)&&(a[t]=n.stringifyFilter(e))},this),a}return c.default.prototype.getSaveParams.apply(this,arguments)},stringifyFilter:function(e){var t=r.default.map(r.default.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])});return t.join("|")}});t.default=h,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(67),r=a(i),s=n(297),o=a(s),l=r.default.extend({model:o.default,url:"/api/home/users",parse:function(e){return this.convert(e,"User")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(826),o=a(s),l=r.default.extend({name:"UserEntitlementCollection",model:o.default});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(78),d=i(u),c=n(77),f=a(c),p=n(18),h=a(p),m=n(56),v=a(m),g=v.default.prototype,y=v.default.extend({name:"UserPlaylistItemModel",entityType:d.USER_PLAYLIST_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,f.default)(this.entityType,e.id,this.server.entityID())},context:["server","section","channel","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],
idAttribute:"id",cache:null,url:function(){return l.join(["/pms/playlists/",this.userPlaylistKey,"items",this.id])},sessionAttrs:s.default.extend({},g.sessionAttrs,{isUserPlaylistItem:h.default.boolean}),syncedAttrs:s.default.extend({},g.syncedAttrs,{id:h.default.integer,sourceTitle:h.default.string,recommender:h.default.string,message:h.default.string}),defaults:s.default.extend({},g.defaults,{isUserPlaylistItem:!0}),augmentResponse:function(e){var t=g.augmentResponse.call(this,e);if(t.type="userPlaylistItem",
t.ratingKey=t.url,t.thumb){var n=/\?(\d+)$/.exec(t.thumb);n&&(t.addedAt=n[1])}return t}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(6),l=a(o),u=n(46),d=a(u),c=n(23),f=i(c),p=n(143),h=a(p),m=n(18),v=a(m),g=n(60),y=a(g),b=n(19),w=a(b),P=n(829),_=a(P),S={WATCH_LATER:"queue",RECOMMENDED:"recommendations"},x={ALL:"all",UNWATCHED:"unwatched",WATCHED:"watched"},C=w.default.extend({
mixins:[h.default],name:"UserPlaylistModel",context:["server"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(s.default.result(this,"containerKey"))},containerKey:function(){return f.join(["/pms/playlists",this.get("key"),this.get("subset")])},sessionAttrs:{isUserPlaylist:v.default.boolean,key:v.default.oneOf(S.WATCH_LATER,S.RECOMMENDED).isRequired,subset:v.default.oneOf(x.ALL,x.UNWATCHED,x.WATCHED).isRequired,currentPageStart:v.default.integer,currentPageSize:v.default.integer,
populatedRange:v.default.object},syncedAttrs:{totalSize:v.default.integer,identifier:v.default.string,mediaTagPrefix:v.default.string,mediaTagVersion:v.default.string,viewGroup:v.default.string,title:v.default.string},syncedRelations:{metadataItems:{relationClass:_.default,rootPropertyName:"Metadata",options:function(e){return{identifier:e.identifier,mediaTagPrefix:e.mediaTagPrefix,mediaTagVersion:e.mediaTagVersion,containerKey:s.default.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===S.WATCH_LATER?(0,l.default)("Watch Later"):e===S.RECOMMENDED?(0,l.default)("Recommended"):void 0},helpRoute:function(){var e=this.get("key");if(e===S.WATCH_LATER)return"#!/playlist/"+e+"/help"},playlistRoute:function(){return"#!/playlist/"+this.get("key")}},defaults:function(){return{isUserPlaylist:!0,subset:x.ALL,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor();
},augmentResponseText:function(e,t){return t===y.default.xml?d.default.replaceMetadataXMLElementNames(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:S,subsets:x});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(25),r=a(i),s=n(830),o=a(s),l=r.default.extend({name:"UserProviderCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(831),o=a(s),l=r.default.extend({name:"UserRoleCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=n(827),c=a(d),f=u.default.extend({
name:"UserSubscriptionModel",syncedAttrs:{active:o.default.boolean,status:o.default.string,plan:o.default.string},syncedRelations:{features:{relationClass:c.default}},augmentResponse:function(e){var t=e.features;return t&&t.feature?r.default.extend({},e,{features:t.feature}):e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(298),l=i(o),u=(0,s.default)(l.RESET_PRIMARY_SERVER);t.resetPrimaryServer=u;
var d=(0,s.default)(l.CHANGE_PRIMARY_SERVER);t.changePrimaryServer=d;var c=(0,s.default)(l.CONFIRM_RELAY_CONNECTION);t.confirmRelayConnection=c},function(e,t,n){"use strict";function a(e){var t=e.server,n=t.getXHROptions("/library/metadata/"+e.id+"/analyze",{type:"PUT"});e.set("mediaState",u.ANALYZING);var a=o.default.ajax(n).fail(function(t){e.unset("mediaState")});return a.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(5),o=i(s),l=n(845),u=r(l);
e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.server,n=t.getXHROptions("/library/metadata/"+e.id+"/refresh",{type:"PUT"});e.set("metadataState",u.QUEUED);var a=o.default.ajax(n).fail(function(t){e.unset("metadataState")});return a.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(5),o=i(s),l=n(464),u=r(l);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(30),r=n(144),s=a(r),o=(0,i.createSelector)(s.default,function(e){return e.libraries});t.default=o,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,r.createSelector)(function(e,t){var n=t.metadataListEntityID;return n},o.default,function(e,t){return t[e]})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(30),s=n(458),o=i(s);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(30),r=n(144),s=a(r),o=(0,i.createSelector)(s.default,function(e){return e.hubs});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),r=n(144),s=a(r),o=(0,i.createSelector)(s.default,function(e){return e.metadataLists});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(30),o=n(460),l=a(o),u=(0,
s.createSelector)(l.default,function(e){return r.default.where(e,{isOutOfDate:!0})});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),r=n(302),s=a(r),o=(0,i.createSelector)(s.default,function(e){return e.servers},function(e,t){return t?t.map(function(t){return e[t]}):[]});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(58),o=a(s),l=n(303),u=a(l),d=u.default.extend({
maxCycles:3,maxSize:50,imageParamsRegex:/&?(width|height|minSize)=([^&]+)/g,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this._infoMemo={}},store:function(e,t){if(t||(t=this.getItemCacheKey(e)),t){var n=e.url,a=this.getImageInfo(n),i={url:n,blobUrl:e.blobUrl,size:a.size},s=this.get(t);if(s){if(!s.images.hasOwnProperty(n)){var o=s.sizes;s.images[n]=i;var l=r.default.sortedIndex(o,i,"size");o.splice(l,0,i)}}else s={images:{},sizes:[i]},s.images[n]=i,this.startListening(),
s._cacheKey=t,this._cache[t]=s,this.size++,e.persistInCache||this.setItemCycle(s,t,r.default.first(this.cycles))}},getItemCacheKey:function(e){var t=this.getImageInfo(e.url);return t.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,a){return t[n]=parseInt(a,10),""}),a={key:n,size:t.width*t.height+t.minSize};return this._infoMemo[e]=a,a},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 a=n.images[e];if(a)return a.blobUrl}},getPlaceholder:function(e){var t=this.getImageInfo(e),n=this.get(t.key);if(n){if(n.images[e])return;var a=r.default.last(n.sizes);return a.blobUrl}},remove:function(e,t){u.default.prototype.remove.apply(this,arguments),r.default.each(e.sizes,function(e){this.removeImageInfo(e.url),o.default.hasObjectUrl&&window.URL.revokeObjectURL(e.blobUrl)},this)}});t.default=d,e.exports=t.default;
},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="error";t.ERROR=n;var a="success";t.SUCCESS=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DISABLED:0,ENABLED:1,VERBOSE:2};n.settings=[{value:n.DISABLED,title:"Disabled"},{value:n.ENABLED,title:"Enabled"},{value:n.VERBOSE,title:"Verbose"}],t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="queued";t.QUEUED=n;var a="matching";
t.MATCHING=a;var i="processing";t.PROCESSING=i;var r="loading";t.LOADING=r},function(e,t){"use strict";function n(e){return e.toLowerCase()}function a(e,t){e=n(e);var r=!a.preventRecycle&&t;if(r&&i[e])return i[e];var s=document.createElement(e);return r&&(i[e]=s),s}Object.defineProperty(t,"__esModule",{value:!0});var i={};t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.duration(e),n=365*t.years(),a=30*t.months(),i=n+a+t.days();return 1!==i?(0,l.default)("{1} days",i):(0,
l.default)("{1} day",i)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r),o=n(6),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.duration(e),n=t.days(),a=t.hours(),i=1!==n;return n&&a?i?(0,l.default)("{1} days {2} hr",n,a):(0,l.default)("{1} day {2} hr",n,a):n?i?(0,l.default)("{1} days",n):(0,l.default)("{1} day",n):(0,l.default)("{1} hr",a)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r),o=n(6),l=i(o);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.duration(e),n=24*t.days()*60,a=60*t.hours(),i=t.minutes()+a+n,r=t.seconds();return i?(0,l.default)("{1} min",i):r>0?(0,l.default)("{1} sec",r):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r),o=n(6),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=arguments.length<=1||void 0===arguments[1]?"MMMM D, YYYY":arguments[1];return e?s.default.unix(e).format(t):"";
}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return function(t,n,a){var r=a.value;return a.value=(0,i.throttle)(r,e),a}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(3);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s={pms:/plex.*media.*server|plex.*media.*hub/i,osx:/macosx/i,
pht:/konvergo|plex.*home.*theater|plex.*media.*center/i,win8:/windows/i,wp:/windows.*phone|wince/i,ios:/ios/i,android:/android/i,chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet.*explorer|explorer.*windows/i,opera:/opera/i,wiiu:/wii.*u/i,samsung:/samsung/i,roku:/roku/i,atv:/plex.*atv|tvos/i,gtv:/google.*tv/i,cloudsync:/cloudsync/i,dlna:/dlna/i,xbox:/xbox|mystery.*5/i,linux:/linux/i},o=r.default.pairs(s),l={},u={getIcon:function(e){var t="default";return e?l.hasOwnProperty(e)?l[e]:(r.default.every(o,function(n){
var a=n[1].test(e);return a&&(t=n[0],l[e]=t),!a}),t):t}};t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(145),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(316),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(233),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(324),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t){"use strict";function n(e){return!(!e||!e.status)&&(401===e.status||422===e.status)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default;
},function(e,t,n){"use strict";function a(e){return s.default[e]||""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(229),s=i(r);e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=e.get("Media"),a=s.default.indexOf(n,s.default.findWhere(n,{id:t}));return a}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=[];return s.default.isArray(e)||(e=[e]),
s.default.each(e,function(e){var n=e.Part;n&&s.default.each(n,function(e){e.exists!==!1&&e.accessible!==!1||t.push(e)})}),t}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=void 0;if(e.Part.length>1)for(var a=0,i=0,r=e.Part.length;i<r&&(n=e.Part[i],n.duration)&&(a+=n.duration,!(a>t));i++);else n=s.default.first(e.Part);return n}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=e.Part,a=s.default.indexOf(n,s.default.findWhere(n,{key:t}));return a}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e,t){return e>t?50:e<=0||t<=0?0:Math.round(e/t*100)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){
var a=n;if(e.Part.length>1)for(var i=0,r=e.Part.length;i<r;i++){var s=e.Part[i];if(!s.duration)break;if(t.key===s.key)break;a-=s.duration}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){var a=(0,s.default)(e,t);if(n=(0,l.default)(a,n)){var i=(0,d.default)(e,a,t);return"/library/parts/"+a.id+"/indexes/"+n+"/"+i}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(480),s=i(r),o=n(871),l=i(o),u=n(483),d=i(u);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=l.default.get("audio").id,n=(0,d.default)(e,{streamType:t,selected:!0});return s.default.first(n)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(73),l=i(o),u=n(92),d=i(u);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=l.default.get("subtitles").id,n=(0,d.default)(e,{streamType:t,selected:!0}),a=s.default.first(n);if(a&&a.id>0)return a}var i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(73),l=i(o),u=n(92),d=i(u);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(!e)return(0,s.default)("None");var t=e.language||(0,s.default)("Unknown"),n=l.default.get(e.streamType),a=n&&n.typeString,i=e.codec,r=[];return"subtitles"===a&&i?(r.push(i.toUpperCase()),e.key&&r.push((0,s.default)("External")),e.forced&&r.push((0,s.default)("Forced"))):"audio"===a&&i&&(r.push((0,d.default)(i)),e.channels&&r.push((0,
f.default)(e.channels))),r.length?t+" ("+r.join(" ")+")":t}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(73),l=i(o),u=n(315),d=i(u),c=n(314),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.bitrate||e.maxVideoBitrate,n=e.videoResolution;if(!t&&!n)return(0,s.default)("Unknown");var a=[];if(t){var i=t<1e3||t%1e3===0?0:1;a.push((0,d.default)(t,i))}if(n&&(!t||t>=1e3)){var r=l.default.getResolutionFromSize(n);a.push((0,
f.default)(r))}return a.join(" ")}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(85),l=i(o),u=n(316),d=i(u),c=n(233),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){if(e=parseInt(e,10),t=t||1,s.default.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)+" "+o[n]}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=["Bytes","KB","MB","GB","TB"];
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.item||e.items[0];if((0,y.default)(e))return s.default.Deferred().resolve((0,d.default)(t,e)).promise();var n=s.default.Deferred();return e.notify=n.notify,(0,h.default)(t,e).then(function(n){return e.itemDecision=n,(0,f.default)(t,e)}).done(n.resolve).fail(function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];e.silent||((0,v.default)(),l.default.warn("[PlayMedia] Unable to queue item; failed to get next unwatched item"));
var t="Couldn't get the next item to play. code: "+e.status;l.default.warn("[PlayMedia]",t),n.reject(t)}),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(26),l=i(o),u=n(318),d=i(u),c=n(890),f=i(c),p=n(887),h=i(p),m=n(491),v=i(m),g=n(892),y=i(g);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){l.default.trigger("show:alert",{type:"error",message:e||(0,s.default)("Sorry, there was a problem playing this item.")})}var i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(9),l=i(o);t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){return e>=2e3}function a(e){return n(e.generalDecisionCode)?e.generalDecisionText:n(e.mdeDecisionCode)?e.mdeDecisionText:n(e.transcodeDecisionCode)?e.transcodeDecisionText:e.errorMessage}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return l?performance.now():Date.now()-u;
}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(26),s=i(r),o=!!window.performance,l=o&&!!window.performance.now,u=void 0;l||(s.default.warn("`performance.now` is not available; a `Date.now()` fallback will be used instead."),u=o&&performance.timing&&performance.timing.navigationStart?performance.timing.navigationStart:Date.now()),e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){var a=e.get("entities").get(t);if(a){var i=a.get(n);if(i)return i.get("model");
}s.default.warn('An entity does not exist with the type "%s" and id "%s"',t,n)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(26),s=i(r);e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");
}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){return(0,l.default)((0,s.default)(e).join("_"))}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(910),s=i(r),o=n(321),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e&&l.default.parseBoolean(e)?(0,s.default)("Yes"):(0,s.default)("No")}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(46),l=i(o);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(e&&e.length){var t=e.length;return 1===t?e[0]:2===t?(0,s.default)("{1} and {2}",e[0],e[1]):3===t?(0,s.default)("{1}, {2}, and {3}",e[0],e[1],e[2]):(0,s.default)("{1}, {2}, and {3} others",e[0],e[1],e.length-2)}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return(0,s.default)((0,o.getLastSegment)(e||""),t);
}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(324),s=i(r),o=n(23);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){v=setTimeout(function(){v=null,i(),u.default.times(t,r),m.length&&a(e,t)},e)}function i(){var e=(new Date).getTime();m=u.default.filter(m,function(t){return t.expire>e})}function r(){for(var e=0;e<m.length;e++){var t=m[e],n=!1;try{n=t.fn.call(t.thisArg,t.arg)}catch(a){c.default.error(a.name+": "+a.message),n=!0}if(n){m.splice(e,1);
break}}}var s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(26),c=s(d),f=n(11),p=o(f);n(411);var h={defaultWait:10,defaultBatchSize:2,timeout:3e4,enqueue:function(e,t,n,i,r){var s={fn:e,thisArg:t,cancelToken:n,expire:(new Date).getTime()+this.timeout,arg:r};if(void 0===i?m.push(s):m.splice(i,0,s),!v){var o=p.hasRegistered("experience")?p.resolve("experience").taskThrottle:{},l=o.wait||this.defaultWait,u=o.batchSize||this.defaultBatchSize;a(l,u);
}},cancel:function(e){m=u.default.filter(m,function(t){return t.cancelToken!==e})},throttleWithRAF:function(e,t){var n=function a(){a.rafID&&window.cancelAnimationFrame(a.rafID),a.rafID=window.requestAnimationFrame(function(){delete a.rafID,e.call(t)})};return n}},m=[],v=null;t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s={augmentDictionary:function(e,t){return t=t||{},r.default.reduce(e,function(e,n,a){
var i=(new Date).getTime(),o=r.default.isFunction(t.ttl)?t.ttl(a,n):t.ttl,l=r.default.isFunction(t.refresh)?t.refresh(a,n):t.refresh,u=r.default.isObject(n)?s.augmentObj(n,o,l,i):null;return u&&(e[a]=u),e},{})},augmentObj:function(e,t,n,a){var i=e._ttl;if(a=a||(new Date).getTime(),i){if(n)i.expireAt=a+t;else if(i.expireAt<=a)return null}else i={expireAt:a+t};return e._ttl=i,e}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(6),r=a(i),s=n(149),o=a(s),l=["key"],u=(0,o.default)(l,[{key:"all",title:function(){return(0,r.default)("All")}},{key:"unwatched",title:function(){return(0,r.default)("Unwatched")}},{key:"newest",title:function(){return(0,r.default)("Recently Released")}},{key:"recentlyAdded",title:function(){return(0,r.default)("Recently Added")}},{key:"recentlyViewed",title:function(){return(0,r.default)("Recently Viewed")}},{key:"recentlyViewedShows",title:function(){return(0,r.default)("Recently Viewed Shows");
}},{key:"onDeck",title:function(){return(0,r.default)("On Deck")}},{key:"folder",title:function(){return(0,r.default)("By Folder")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(385),r=a(i),s=new r.default((!1),"_",(!0)),o={writeXml:function(e){return'<?xml version="1.0"?>'+s.json2xml_str(e)}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";function a(e){return b.default.createElement("img",e);
}function i(e){var t=e.src,n=e.style,a=e.width,i=e.height,r=e.backgroundSize,o=e.backgroundPosition,l=c(e,["src","style","width","height","backgroundSize","backgroundPosition"]),u=s({backgroundImage:"url("+t+")",backgroundSize:r,backgroundPosition:o,width:a,height:i},n);return b.default.createElement("div",s({style:u},l))}function r(e){var t=e.component,n=e.transitionProps,a=e.isLoaded,i=e.style,r=e.src,o=e.prevSrc,l=c(e,["component","transitionProps","isLoaded","style","src","prevSrc"]),u=t;return b.default.createElement(N.default,n,a&&b.default.createElement(u,s({
style:F(2,i)},l,{src:r,key:r})),!a&&o&&b.default.createElement(u,s({style:F(1,i)},l,{src:o,key:o})))}var s=n(12).default,o=n(21).default,l=n(22).default,u=n(28).default,d=n(20).default,c=n(16).default,f=n(1).default,p=n(8).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImgTag=a,t.BackgroundImgTag=i,t.TransitionImg=r;var h=n(3),m=f(h),v=n(5),g=f(v),y=n(7),b=f(y),w=n(27),P=n(23),_=p(P),S=n(180),x=f(S),C=n(58),T=f(C),k=n(897),I=f(k),M=n(461),A=f(M),E=n(29),O=f(E),D=n(594),R=f(D),L=n(240),N=f(L),j=new A.default;
t.cache=j;var U="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";t.EMPTY_IMAGE=U,i.propTypes={src:y.PropTypes.string,width:y.PropTypes.number,height:y.PropTypes.number,style:y.PropTypes.object,backgroundSize:y.PropTypes.string,backgroundPosition:y.PropTypes.string},i.defaultProps={backgroundSize:"cover",backgroundPosition:"center"};var F=function(e,t){return s({position:"absolute",zIndex:e},t)};r.propTypes={component:y.PropTypes.oneOf([a,i]),transitionProps:y.PropTypes.shape(N.default.propTypes),
isLoaded:y.PropTypes.bool,prevSrc:y.PropTypes.string,src:y.PropTypes.string,style:y.PropTypes.object};var B=function(e){function t(e,n){d(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isLoaded:!1,url:this.getImageUrl(e),src:U,prevSrc:U}}return l(t,e),u(t,[{key:"componentDidMount",value:function(){this.loadImage(this.props,this.state.url)}},{key:"componentWillReceiveProps",value:function(e){var t=this.getImageUrl(e),n=this.state.url;if(n!==t){var a=this.state.src;
this.setState({isLoaded:!1,url:t,prevSrc:a}),this.loadImage(e,t)}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,O.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this.abortImage()}},{key:"getImageUrl",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];if(e.src)return e.src;if(e.url){var t=(0,x.default)(),n=s({width:Math.round(e.width*t),height:Math.round(e.height*t)},e.filters);e.minSize&&(n.minSize=1),e.format&&(n.format=e.format),
e.quality&&(n.quality=e.quality);var a=m.default.result(e,"url"),i=a.indexOf("?"),r=a;return i>-1?(r=_.join(a.substring(0,i),n),r+=r.indexOf("?")===-1?"?":"&",r+=a.substring(i+1)):r=_.join(r,n),r}}},{key:"getImageProps",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=e.exposeUrl,n=e.backgroundSize,a=e.backgroundPosition,i=e.width,r=e.height,s=e.style,o=e.className,l=this.state,u=l.src,d=l.url;return{"data-image-url":t?d:void 0,src:u,style:s,className:o,
backgroundSize:n,backgroundPosition:a,width:i,height:r}}},{key:"loadImage",value:function(e,t){if(void 0===e&&(e=this.props),this.abortImage(),t){var n=e.src?this.preloadImage({url:t}):this.loadBlob({url:t});this._cancelable=(0,I.default)(n),this._cancelable.promise.then(this.onLoad,this.onError,this.onLoad)}}},{key:"loadBlob",value:function(e){var t=this,n=e.url;if(!this.props.allowImageBlobs)return this.preloadImage({url:n});var a=g.default.Deferred(),i=j.getBlobUrl(n);if(i)return a.resolve({url:i
}),a.promise();var r=j.getPlaceholder(n);r&&a.notify({url:r,isPlaceholder:!0});var s=new 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 Blob([s.response],{type:"image/jpeg"}),i=window.URL.createObjectURL(e);j.store({url:n,blobUrl:i}),a.resolve({url:i})}else a.reject({url:n})},s.send(),a.then(this.preloadImage,this.onError,this.preloadImage),a.promise();
}},{key:"preloadImage",decorators:[w.autobind],value:function(e){if(!this.props.allowImagePreloading)return g.default.Deferred().resolve(e).promise();var t=g.default.Deferred(),n=new Image,a=e.url,i=e.isPlaceholder;return n.onload=function(){n.onload=n.onabort=n.onerror=null,i?t.notify(e):t.resolve(e)},n.onabort=n.onerror=function(){n.onload=n.onabort=n.onerror=null,t.reject(e)},n.src=a,t.promise()}},{key:"abortImage",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.abort(),
this._xhr=null),this._cancelable&&this._cancelable.cancel()}},{key:"onLoad",decorators:[w.autobind],value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.url;this.setState({isLoaded:!0,src:t}),this.props.onLoad(this.state.url,t)}},{key:"onError",decorators:[w.autobind],value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.url,n=e.isCanceled,a=void 0!==n&&n;a||(this.setState({isLoaded:!0,src:U}),this.props.onError(this.state.url,t))}},{
key:"render",value:function(){var e=this.props,t=e.background,n=e.transition,o=e.transitionProps,l=this.state,u=l.isLoaded,d=l.prevSrc,c=t?i:a,f=this.getImageProps();return n?b.default.createElement(r,s({component:c,isLoaded:u,prevSrc:d,transitionProps:o},f)):b.default.createElement(c,s({},f,{src:u?f.src:d}))}}]),t}(y.Component);B.propTypes={className:y.PropTypes.string,src:y.PropTypes.string,url:y.PropTypes.oneOfType([y.PropTypes.string,y.PropTypes.func]),background:y.PropTypes.bool,backgroundSize:y.PropTypes.string,
backgroundPosition:y.PropTypes.string,exposeUrl:y.PropTypes.bool,width:y.PropTypes.number,height:y.PropTypes.number,minSize:y.PropTypes.bool,format:y.PropTypes.string,quality:y.PropTypes.number,filters:y.PropTypes.shape({blur:y.PropTypes.number,background:y.PropTypes.string,opacity:y.PropTypes.number,saturation:y.PropTypes.number}),transition:y.PropTypes.bool,transitionProps:y.PropTypes.shape(N.default.propTypes),allowImageBlobs:y.PropTypes.bool,allowImagePreloading:y.PropTypes.bool,onLoad:y.PropTypes.func,
onError:y.PropTypes.func},B.defaultProps={exposeUrl:!1,transition:!1,background:!1,minSize:!1,transitionProps:s({},R.default,{style:{position:"relative"}}),filters:{},allowImageBlobs:T.default.hasBlob&&T.default.hasObjectUrl,allowImagePreloading:!0,onLoad:function(){},onError:function(){}},t.default=B},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(66),c=o(d),f=n(633),p=o(f),h=n(27),m=n(29),v=o(m),g=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this._portal=null,this._portalRef=null,this._closeTimeoutID=null}return i(t,e),r(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.renderPortal(this.props)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"componentDidUpdate",value: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)))}},{key:"componentWillUnmount",value:function(){this.removePortal()}},{key:"_setAttrs",value:function(e,t){this._setClassName(e,t.className),this._setStyle(e,t.style)}},{key:"_setClassName",value:function(e,t){null!=t&&(e.className=t)}},{key:"_setStyle",value:function(e,t){t&&p.default.setValueForStyles(e,t)}},{key:"renderPortal",value:function(e){var t=this.props.onPortalRef,n=this._portal||document.createElement("div");
this._setAttrs(n,e),this._portal||document.body.appendChild(n);var a=u.default.Children.only(e.children);this._portal=n;var i=c.default.unstable_renderSubtreeIntoContainer(this,a,n);this._portalRef!==i&&(this._portalRef=i,t&&(t(null),t(this._portalRef)))}},{key:"removePortal",decorators:[h.autobind],value:function(){var e=this.props.onPortalRef,t=this._portal;t&&(c.default.unmountComponentAtNode(t),document.body.removeChild(t)),this._portal=null,this._portalRef=null,e&&e(null),this._closeTimeoutID=clearTimeout(this._closeTimeoutID);
}},{key:"render",value:function(){return null}}]),t}(l.Component);g.propTypes={className:l.PropTypes.string,style:l.PropTypes.object,children:l.PropTypes.node.isRequired,onPortalRef:l.PropTypes.func,isOpen:l.PropTypes.bool,closeTimeout:l.PropTypes.number},l.PropTypes.defaultProps={isOpen:!0,closeTimeout:0},t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var u=n(7),d=l(u),c=n(66),f=l(c),p=n(2111),h=l(p),m=n(27),v=n(29),g=l(v),y=n(506),b=l(y),w=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this._tether=null}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._destroy()}},{key:"_destroy",value:function(){this._tether&&(this._tether.destroy(),this._tether=null)}},{key:"onPortalRef",
decorators:[m.autobind],value:function(e){return e?void(this._tether=new h.default(o({element:f.default.findDOMNode(e).parentNode,target:f.default.findDOMNode(this.props.target)},this.props.options))):void this._destroy()}},{key:"render",value:function(){return d.default.createElement(b.default,o({},this.props,{onPortalRef:this.onPortalRef}))}}]),t}(u.Component);w.propTypes={target:u.PropTypes.object,options:u.PropTypes.object},w.defaultProps={options:{skipMoveElement:!0,attachment:"top left",targetAttachment:"bottom left",
constraints:[{to:"window",attachment:"together",pin:!0}]}},t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(12).default,l=n(13).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=u(d),f=n(7),p=(u(f),n(32)),h=u(p),m=n(511),v=u(m),g=n(925),y=u(g),b=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state=this._getListState(e),
this._keyPool=(0,y.default)("cell"),this._shouldRequestPage=!1}return i(t,e),r(t,[{key:"componentWillMount",value:function(){this.props.onListUpdate&&this.props.onListUpdate(this.state)}},{key:"componentWillReceiveProps",value:function(e){this.setState(this._getListState(e))}},{key:"shouldComponentUpdate",value:function(e,t){var n=this.props,a=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.layout!==n.layout||(t.visibleStartIndex!==a.visibleStartIndex||(t.visibleEndIndex!==a.visibleEndIndex||(t.partiallyVisibleStartIndex!==a.partiallyVisibleStartIndex||(t.partiallyVisibleEndIndex!==a.partiallyVisibleEndIndex||(t.renderStartIndex!==a.renderStartIndex||t.renderEndIndex!==a.renderEndIndex)))))))));
}},{key:"componentWillUpdate",value:function(e,t){this.props.onListUpdate&&t!==this.state&&this.props.onListUpdate(t)}},{key:"componentDidUpdate",value:function(){var e=this.state;this._shouldRequestPage&&(this._shouldRequestPage=!1,this.props.onPageRequest({startIndex:e.renderStartIndex,endIndex:e.renderEndIndex}))}},{key:"_getListState",value:function(e){var t=this._getListStyle(e),n=e.layout.getRangesForPosition(e.scrollTop,e.scrollLeft,e.size);return{listStyle:t,visibleStartIndex:n.visibleStartIndex,
visibleEndIndex:n.visibleEndIndex,partiallyVisibleStartIndex:n.partiallyVisibleStartIndex,partiallyVisibleEndIndex:n.partiallyVisibleEndIndex,renderStartIndex:n.renderStartIndex,renderEndIndex:n.renderEndIndex}}},{key:"_getListStyle",value:function(e){var t=e.items,n=e.size,a=e.layout,i=e.viewportWidth,r=e.viewportHeight,s=e.listTop,o=e.listLeft,l={viewportWidth:i,viewportHeight:r,listTop:s,listLeft:o};return a.getListStyle(l,n,t)}},{key:"renderCells",value:function(){var e=this.props,t=e.keyPropName,n=e.items,a=e.itemsOffset,i=e.size,r=e.layout,s=e.cellRenderer,l=e.isScrolling,u=e.onPageRequest,d=this.state,f=d.renderStartIndex,p=d.renderEndIndex,h=d.partiallyVisibleStartIndex,m=d.partiallyVisibleEndIndex,v=i>n.length&&p===n.length-1,g=this._keyPool.getKeys(f,p,n,a,t),y=[];
return c.default.each(g,function(e,a){var u=e.index,d=e.item,f=u>=h&&u<=m,p=r.getPositionForIndex(u,i,n);null===d&&(v=!0);var g={key:a,keyPropName:t,isVisible:f,isScrolling:l,cellIndex:u,cellX:p.cellX,cellY:p.cellY,cellWidth:p.cellWidth,cellHeight:p.cellHeight};c.default.isString(d)?g[t]=d:g=o({},d,g),y.push(s(g))}),this._shouldRequestPage=!!u&&(v&&!l),y}},{key:"render",value:function(){var e=this._getListStyle(this.props);return{$$typeof:l,type:"div",key:null,ref:null,props:{children:this.renderCells(),
className:(0,h.default)(this.props.className,this.props.isScrolling&&"isScrolling"),style:e},_owner:null}}}]),t}(f.Component);b.propTypes={className:f.PropTypes.string,keyPropName:f.PropTypes.string.isRequired,items:f.PropTypes.array.isRequired,itemsOffset:f.PropTypes.number.isRequired,size:f.PropTypes.number.isRequired,layout:v.default.isRequired,cellRenderer:f.PropTypes.func.isRequired,viewportWidth:f.PropTypes.number,viewportHeight:f.PropTypes.number,listTop:f.PropTypes.number,listLeft:f.PropTypes.number,
isScrolling:f.PropTypes.bool,scrollTop:f.PropTypes.number,scrollLeft:f.PropTypes.number,onListUpdate:f.PropTypes.func,onPageRequest:f.PropTypes.func},b.defaultProps={keyPropName:"entityID",items:[],itemsOffset:0,viewportWidth:0,viewportHeight:0,listTop:0,listLeft:0,isScrolling:!1},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){var a=0;return c.default.Children.map(e,function(e){if(c.default.isValidElement(e)){var i=a;return a++,t.call(n,e,i)}return e})}function i(e,t,n){
var a=0;return c.default.Children.forEach(e,function(e){c.default.isValidElement(e)&&(t.call(n,e,a),a++)})}function r(e){var t=0;return c.default.Children.forEach(e,function(e){c.default.isValidElement(e)&&t++}),t}function s(e){var t=!1;return c.default.Children.forEach(e,function(e){!t&&c.default.isValidElement(e)&&(t=!0)}),t}function o(e,t){var n=void 0;return i(e,function(a,i){!n&&t(a,i,e)&&(n=a)}),n}function l(e,t,n){var a=[],i=0;return c.default.Children.forEach(e,function(e){c.default.isValidElement(e)&&(t.call(n,e,i)&&a.push(e),
i++)}),a}var u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.mapValidComponents=a,t.forEachValidComponents=i,t.numberOfValidComponents=r,t.hasValidComponent=s,t.findValidComponent=o,t.findValidComponents=l;var d=n(7),c=u(d)},function(e,t,n){"use strict";function a(){function e(e,t){k=e.listTop,I=e.listLeft,(0,s.default)(o||e.viewportHeight,"A grid list must have a viewport height or a fixed number of rows"),(0,s.default)(d||e.viewportWidth,"A grid list must have a viewport width or a fixed number of columns");
var n=e.viewportWidth-w-x,a=e.viewportHeight-y-_;r===u?n-=I:a-=k,M=C({innerViewportWidth:n,innerViewportHeight:a,innerHorizontalPadding:h,innerVerticalPadding:v}),A=T({cellWidth:M,innerViewportWidth:n,innerViewportHeight:a,innerHorizontalPadding:h,innerVerticalPadding:v}),E=o||Math.floor((a+v)/(A+v)),O=d||Math.floor((n+h)/(M+h)),D=O*E;var i=r===u?O*(M+h)-h:Math.ceil(t/E)*(M+h)-h,l=r===u?Math.ceil(t/O)*(A+v)-v:E*(A+v)-v;return{width:i+w+x,height:l+y+_}}function t(e){(0,s.default)(void 0!==M,"`getListStyle` must be called before `getPositionForIndex`");
var t=void 0,n=void 0;r===u?(t=e%O,n=Math.floor(e/O)):(t=Math.floor(e/E),n=e%E);var a=t*(M+h)+I+x,i=n*(A+v)+k+y;return{cellX:a,cellY:i,cellWidth:M,cellHeight:A}}function n(e,t,n){(0,s.default)(void 0!==M,"`getListStyle` must be called before `getRangesForPosition`");var a=r===u?O:E,i=r===u?(e-k)/(A+v):(t-I)/(M+h),o=D+2*a+f*a*2,d=Math.round(i)*a,c=d+D-1,p=Math.floor(i)*a,m=d+D+a-1,g=p-a*f,y=(0,l.default)(g,n)+o-1;return y>=n&&(g=n-o),{visibleStartIndex:(0,l.default)(d,n),visibleEndIndex:(0,l.default)(c,n),
partiallyVisibleStartIndex:(0,l.default)(p,n),partiallyVisibleEndIndex:(0,l.default)(m,n),renderStartIndex:(0,l.default)(g,n),renderEndIndex:(0,l.default)(y,n)}}var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=a.direction,r=void 0===i?u:i,o=a.rows,d=a.columns,c=a.overscan,f=void 0===c?0:c,p=a.innerHorizontalPadding,h=void 0===p?0:p,m=a.innerVerticalPadding,v=void 0===m?0:m,g=a.outerPaddingTop,y=void 0===g?0:g,b=a.outerPaddingRight,w=void 0===b?0:b,P=a.outerPaddingBottom,_=void 0===P?0:P,S=a.outerPaddingLeft,x=void 0===S?0:S,C=a.getCellWidth,T=a.getCellHeight,k=void 0,I=void 0,M=void 0,A=void 0,E=void 0,O=void 0,D=void 0;
return{options:a,getListStyle:e,getPositionForIndex:t,getRangesForPosition:n}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(38),s=i(r),o=n(926),l=i(o),u="vertical";t.VERTICAL=u;var d="horizontal";t.HORIZONTAL=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),i=a.PropTypes.shape({getListStyle:a.PropTypes.func.isRequired,getPositionForIndex:a.PropTypes.func.isRequired,getRangesForPosition:a.PropTypes.func.isRequired
});t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),i=a.PropTypes.shape({start:a.PropTypes.number.isRequired,end:a.PropTypes.number.isRequired,size:a.PropTypes.number.isRequired});t.default=i,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={PLAY:"PLAY",PAUSE:"PAUSE",SEEK:"SEEK",STOP:"STOP",PREVIOUS:"PREVIOUS",NEXT:"NEXT",SKIPTO:"SKIPTO",SHOWDETAILS:"SHOWDETAILS",REFRESHPLAYQUEUE:"REFRESHPLAYQUEUE",
SETSTREAM:"SETSTREAM",SETQUALITY:"SETQUALITY"};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(11),l=i(o),u=n(6),d=a(u),c=n(31),f=a(c),p=n(9),h=a(p),m=n(312),v=a(m),g=n(42),y=a(g),b=n(73),w=a(b),P=n(48),_=a(P),S=n(287),x=a(S),C=n(17),T=a(C),k=n(37),I=a(k),M=f.default.extend({mixins:[_.default,x.default],companion:!0,modelDefaults:function(){var e=x.default.modelDefaults.apply(this,arguments),t=this.type===y.default.types.MUSIC,n=this.type===y.default.types.PHOTO;
return s.default.extend(e,{state:y.default.states.BUFFERING,showMinimize:!0,showMaximize:!t,showSeekBar:!n,showRepeat:t,showShuffle:t})},modelOverrides:function(){var e=x.default.modelOverrides.apply(this,arguments),t=this.model.get("metadataItem"),n=t.get("type")===y.default.types.PHOTO;return(n||this.model.get("playQueue").get("collection").length<2)&&(e.showPlayQueue=!1),e},initialize:function(e){x.default.initialize.apply(this,arguments),s.default.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");return n&&n.get("isLoopback")&&(n=e.get("connections").find(function(e){return e.get("isConnected")&&!e.get("isLoopback")})),n?{protocol:n.get("scheme")||"http",address:n.getAddressFromUri(),port:n.get("port")}:void(t.isRequired&&this.showLoopbackWarning(e))},showLoopbackWarning:function(e){var t=l.resolve("appModel"),n=t.get("user");if(!n.get("signedIn")||"ok"!==e.get("myPlexSigninState")){
var a;a=n.get("signedIn")?(0,d.default)("This server is unavailable to the player. Please sign this server in to your Plex account and try again."):(0,d.default)("This server is unavailable to the player. Please sign in to your Plex account and try again.");var i=new I.default({title:(0,d.default)("Unable to Cast"),message:a,confirmLabel:(0,d.default)("OK"),cancelLabel:(0,d.default)("Ignore")});i.promise.done(function(){h.default.trigger("hide:player"),n.get("signedIn")?h.default.trigger("navigate","serverSettings",{
serverID:e.id}):h.default.trigger("navigate","login",{silent:!0})}),h.default.trigger("show:modal",i)}},getTransientToken:function(e){return T.default.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(s.default.extend(s.default.result(this,"modelDefaults"),this.modelOverrides())),e},stop:function(e,t){x.default.stop.apply(this,arguments);
var n=l.resolve("appModel"),a=this.model.get("playQueue");a&&!n.get("primaryPlayer")&&a.takeOwnership(),this.manager.resetActiveController(this.type),h.default.trigger("hide:player",t)},setStream:function(e,t){},setRepeat:function(e){},refreshRemotePlayQueue:function(){},onFinishedChange:function(e,t){t&&(this.manager.resetActiveController(this.type),h.default.trigger("hide:player"))},onMetadataItemChange:function(){var e,t,n=this.model.get("metadataItem"),a=this.model.get("mediaIndex"),i=this.model.get("partIndex"),r=n.get("Media");
if(e=a>1&&r.length>a?r[a]:s.default.first(r)){var o=e.Part;t=i>1&&o.length>i?o[i]:s.default.first(o)}this.model.set({media:e,part:t})},onAudioStreamIDChange:function(e,t){var n=e.previous("audioStreamID");if(null!=t&&null!=n){if(this.isTimelineChange){var a=w.default.get("audio");return void(0,v.default)(e.get("media"),a,t)}this.setStream("audio",t)}},onSubtitleStreamIDChange:function(e,t){var n=e.previous("subtitleStreamID");if(null!=t&&null!=n){if(this.isTimelineChange){var a=w.default.get("subtitles");
return void(0,v.default)(e.get("media"),a,t)}this.setStream("subtitles",t)}},onPlayQueueChange:function(){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem();var e=s.default.pick(s.default.result(this,"modelDefaults"),["showPlayQueue","canSkipPrevious","canSkipNext","canShuffle","shuffled"]);this.model.set(s.default.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.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(11),l=i(o),u=n(31),d=a(u),c=n(42),f=a(c),p=n(40),h=a(p),m=n(17),v=a(m),g=n(48),y=a(g),b=n(26),w=a(b),P=n(237),_=a(P),S=n(106),x=a(S),C=n(72),T=a(C),k=n(56),I=a(k),M=n(89),A=a(M),E=n(174),O=a(E),D=d.default.extend({mixins:[y.default],types:[f.default.types.VIDEO,f.default.types.MUSIC,f.default.types.PHOTO],initialize:function(){
var e=l.resolve("appModel");this.items={},this.containers={},this.activeControllerTypes={},this.listenTo(e,"change:primaryPlayer",this.onPrimaryPlayerChange)},start:function(e){this.player&&this.stop(),w.default.info("Casting to "+e.get("friendlyName")),this.player=e,e&&this.listenTo(e.get("nowPlaying"),"add",this.onNowPlayingAdd)},stop:function(){if(this.player){(0,w.default)("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,a=e.state===f.default.states.STOPPED||e.state===f.default.states.ERROR,i=this.items[t],r=this.containers[t];if(i){if(n===i.get("key")&&!a)return;this.removeFromNowPlaying(i,e);
}n&&!a&&this.addToNowPlaying(s.default.extend({},e,{previousItem:i,previousContainer:r}))},addToNowPlaying:function(e){var t=e.type,n=e.machineIdentifier,a=e.key,i=e.containerKey,r=e.previousContainer;"node"===n&&(n="myPlex");var o=new T.default({machineIdentifier:n},{onlyIfCached:!0});if(!s.default.isEmpty(o)){if("myPlex"===n){var l=o.parent.get("primaryServer");a=l?l.resolveUrl(a):o.resolveUrl(a,{connection:new x.default({scheme:"https",address:"node.plexapp.com",port:"32443"})})}var u=new I.default({
key:a},{server:o,skipCache:!0}),d=u.populate();this.items[t]=u;var c;if(r&&r.key===i)c=r.playQueue;else{var p=u.server.get("playQueueManager"),h=f.default.getElementByType(t),m=O.default.prototype.getIdFromKey(i);if(null!==m)c=p.getForType(h),c&&c.get("playQueueID")===m||(c=p.createForType(h,{onServer:!0}),c.set("playQueueID",m),d=d.then(function(){return c.fetch({reset:!0})}));else{var v;i&&(v=new A.default({containerKey:i},{server:o,skipCache:!0}),d=d.then(function(){return v.populate()})),d=d.then(function(){
c=p.createForType(h,{onServer:!1});var e=v?v.get("metadataItems"):u;return c.addContent(e)})}d.done(function(){var e=c.get("collection").findWhere({key:a});c.set("selectedItem",e)})}this.containers[t]={key:i,playQueue:c},d.done(s.default.bind(function(){u.set("key",a);var e=this.player.get("nowPlaying");e.add(u)},this)),d.fail(s.default.bind(function(){this.removeFromNowPlaying(u,e)},this))}},removeFromNowPlaying:function(e,t){this.items[t.type]=null,this.containers[t.type]=null;var n=this.player.get("nowPlaying");
n.remove(e)},onPrimaryPlayerChange:function(e,t){if(t){_.default.stop(!0);var n=l.resolve("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 n=h.default.getChildMediaType(t),a=f.default.getTypeByElement(n.element);this.activeControllerTypes[a]||v.default.execute("playMedia",{item:e,useMiniPlayer:!0,isFromCompanion:!0})}}});t.default=D,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s={triggerAutoselect:function(e){this.trigger("autoselect",{shiftKey:e.shiftKey})},stopTrackingSelecting:function(e,t){return this.isTrackingSelecting?(e.preventDefault(),void(this.isTrackingSelecting=!1)):void(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=r.default.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.default=s,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s={collectionEvents:{"update reset sort":"onTracksUpdate"},markDiscNumbers:function(){if(this.collection.server.supports("premiumMusic")){var e=this.collection.reduce(function(e,t,n){var a=t.get("parentIndex");return a!==e.lastDiscNumber&&(e.markers[n]=a,e.lastDiscNumber=a,e.count+=1),e},{markers:{},lastDiscNumber:null,count:0});return this.discMarkers=e.markers,e.count}},onRender:function(){
var e=this.markDiscNumbers();1!==e&&r.default.each(this.discMarkers,r.default.bind(function(e,t){this.$("li:eq("+t+") .disc-number").removeClass("hidden")},this))},onTracksUpdate:function(){this.render()}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1051),o=a(s),l=r.default.extend({name:"FilePathCollection",context:["server"],model:o.default,url:"/services/browse"});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1052),o=a(s),l=r.default.extend({name:"MatchResultCollection",context:["server"],model:o.default,url:function(){return"/library/metadata/"+this.parent.id+"/matches"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(129),r=a(i),s=n(67),o=a(s),l=n(1054),u=a(l),d=o.default.extend({model:u.default,
url:"/playQueues?type="+r.default.LOCAL,parse:function(e){return this.convert(e,"PlayQueue")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){var a=/!$/.test(n),i=/\.id$/.test(n);if(a||i)return e[n]=t,e;var r=n.match(/^(.+)\.(.+)/);return r&&(e.type=p.default.get(r[1]).id,n=r[2]),e[n+".query"]=t,e}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(46),u=i(l),d=n(23),c=r(d),f=n(40),p=i(f),h=n(60),m=i(h),v=n(25),g=i(v),y=n(1069),b=i(y),w=g.default.extend({
name:"MetadataAutocompleteResultCollection",context:["server","section","multiMetadataItem","query"],model:b.default,url:function(){var e={type:p.default.get(this.multiMetadataItem.get("type")).id,limit:10};return e=o.default.reduce(this.query,a,e),c.join([this.multiMetadataItem.sectionUrl(),"autocomplete"],e)},augmentResponseText:function(e,t){return t===m.default.xml?u.default.replaceMetadataXMLElementNames(e):e}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(247),s=a(r),o=n(77),l=i(o),u=n(111),d=i(u),c=n(56),f=i(c),p=f.default.extend({name:"SyncMetadataModel",entityType:s.SYNC_METADATA_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,l.default)(this.entityType,e.ratingKey,this.syncItemId,this.server.entityID())},context:["server","device","syncItemId"],cache:new d.default,cacheKey:function(){var e=f.default.prototype.cacheKey.apply(this,arguments);
return e+"!"+this.syncItemId}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1073),o=a(s),l=r.default.extend({name:"SearchHubCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(214),o=a(s),l=o.default.extend({constructor:function(e,t,n,a){this.exclusiveAgents=t,
this.agentIdentifier=n,o.default.call(this,e,a),this.filterBy(r.default.bind(this.filterExclusiveAgent,this))},filterExclusiveAgent:function(e){var t=e.get("identifier"),n=this.exclusiveAgents;if(!n)return!0;var a=this.agentIdentifier,i=n.indexOf(a)!==-1,r=n.indexOf(t)!==-1,s=i?t===a:!r;return s}});t.default=l,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={PRODUCTION:"9AC194DC",QA:"4289C4E0",CUSTOM:"custom"};n.settings=[{value:n.PRODUCTION,
title:"Production"},{value:n.QA,title:"QA"},{value:n.CUSTOM,title:"Custom"}],t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1762),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"loading",template:r.default,initialize:function(e){e&&e.inline&&this.$el.addClass("loading-inline")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1765),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(9),h=a(p),m=n(11),v=i(m),g=n(17),y=a(g),b=n(1151),w=a(b),P=f.default.Layout.extend({className:"sign-in-container container",template:s.default,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"},initialize:function(e){e||(e={}),this.isFirstRun=!!e.isFirstRun,
this.showWhySignIn=!1},serializeData:function(){return{showSkip:this.isFirstRun,showWhySignIn:this.showWhySignIn}},signIn:function(e){return this.form.currentView.validateAll(this.ui.form[0],["username","password"],e)?y.default.execute("signIn",e).done(function(){v.resolve("metrics").trackEvent({event:"client:signin",interaction:!0,properties:{mode:"password",firstRun:this.isFirstRun}})}.bind(this)):d.default.Deferred().reject().promise()},signUp:function(e){return this.form.currentView.validateAll(this.ui.form[0],null,e)?y.default.execute("signUp",e).done(function(){
v.resolve("metrics").trackEvent({event:"client:signup",interaction:!0,properties:{firstRun:this.isFirstRun}})}.bind(this)):d.default.Deferred().reject().promise()},onRender:function(){this.form.show(new w.default({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 a={username:t.username.value,email:t.email.value,password:t.password.value,confirm:t.confirm.value,
remember:t.remember.checked},i=this.form.currentView.$el.hasClass("sign-in-form")?this.signIn(a):this.signUp(a);i.done(function(){h.default.trigger("navigate:refresh")}),i.fail(l.default.bind(function(){n.removeClass("active")},this))}},onWhySignInClick:function(e){e.preventDefault(),v.resolve("metrics").trackClick({page:"signIn",action:"whatsThis",firstRun:this.isFirstRun}),this.showWhySignIn=!0,this.render()},onBackToSignInClick:function(e){e.preventDefault(),this.showWhySignIn=!1,this.render();
},onSkipClick:function(e){e.preventDefault(),v.resolve("metrics").trackClick({page:"signIn",action:"skip",firstRun:this.isFirstRun}),this.trigger("skipSignIn")}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1777),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(153),c=a(d),f=u.default.ItemView.extend({mixins:[c.default],className:"alert transition-in",template:r.default,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"]),o.default.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(){o.default.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.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1807),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(213),p=a(f),h=n(9),m=a(h),v=n(36),g=a(v),y=n(1257),b=a(y),w=n(1190),P=a(w),_=n(121),S=a(_),x=c.default.CompositeView.extend({
id:"player-play-queue-dropdown",tagName:"span",className:"dropup",itemView:b.default,emptyView:P.default,itemViewContainer:"ol",template:r.default,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"),a=e.supports({playlists:!0});return{canEdit:this.model.get("showPlayQueue"),canPlaylist:!t&&a&&n
}},appendHtml:function(e,t,n){return g.default.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=(0,u.default)(e.item).data("play-queue-id"),n=(0,u.default)(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 p.default(t,{draggable:".play-queue-list-item",
animation:200,onUpdate:o.default.bind(e,this)})}},onShowPlayQueueChange:function(){this.render()},onSaveClick:function(){m.default.trigger("show:modal",new S.default({model:this.model.get("playQueue")}))},onPlayQueueMouseWheel:function(e){e.stopPropagation()}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1812),s=a(r),o=n(10),l=a(o),u=n(11),d=i(u),c=n(9),f=a(c),p=n(1193),h=a(p),m=l.default.Layout.extend({
id:"primary-player-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:s.default,regions:{list:".dropdown-menu"},events:{"click .cast-btn":"onCastClick"},initialize:function(e){e||(e={});var t=d.resolve("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=d.resolve("appModel"),t=e.get("primaryPlayer");if(t){var n=t.get("nowPlaying");this.listenTo(n,"update reset",this.render)}},serializeData:function(){var e=d.resolve("appModel");return{primaryPlayer:!!e.get("primaryPlayer"),showDropdown:!e.get("isCastApiAvailable")}},onRender:function(){var e=d.resolve("appModel"),t=!e.get("isCastApiAvailable");t&&this.list.append(new h.default({showNowPlaying:this.showNowPlaying}),this.$el)},onPrimaryPlayerChange:function(e,t){
var n=d.resolve("appModel"),a=n.previous("primaryPlayer");a&&this.stopListening(a.get("nowPlaying")),this.setup(),this.render()},onCastClick:function(e){e.preventDefault(),this.players.fetch(),f.default.trigger("cast:launch")}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1815),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({id:"section-dropdown",tagName:"span",className:"dropdown",template:r.default,
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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=u.default.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 n=this.model.toJSON(),a=this.model.get("mixedFields"),i={originallyAvailableAt:(0,c.default)("YYYY-MM-DD")};return a&&a.forEach(function(e){i[e]=(0,c.default)("MIXED");
}),{item:n,locked:t,placeholders:i,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 a=(0,o.default)(n),i=a.data("field");a.hasClass("locked")?t[i]=!0:i in t&&(t[i]=!1)}),r.default.map(t,function(e,t){return{
name:t,locked:e}})},onLockClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget);t.hasClass("disabled")||(0,o.default)(e.currentTarget).toggleClass("locked")},onLockableFieldChange:function(e){var t=e instanceof o.default?e:(0,o.default)(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.default=f,e.exports=t.default},function(e,t,n){
"use strict";function a(e){return T.default.reduce(e,function(e,t){return e[t]=!0,e},{})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1820),s=i(r),o=n(1822),l=i(o),u=n(1825),d=i(u),c=n(1829),f=i(c),p=n(1831),h=i(p),m=n(1832),v=i(m),g=n(1834),y=i(g),b=n(1836),w=i(b),P=n(1838),_=i(P),S=n(1833),x=i(S),C=n(3),T=i(C),k=n(5),I=i(k),M=n(6),A=i(M),E=n(40),O=i(E),D=n(532),R=i(D),L=n(1202),N=i(L),j=n(119),U=i(j),F={movie:f.default,show:w.default,season:y.default,episode:d.default,
artist:l.default,album:s.default,track:_.default,photoAlbum:h.default,photo:v.default,playlist:x.default},B=R.default.extend({regions:{ratingRegion:".rating-region"},ui:T.default.extend({selectizeInputs:".selectize input[type=text]"},R.default.prototype.ui),initialize:function(e){var t=this.model.get("type");this.template=F[t]||F.movie;var n=O.default.get(t);this.canSelectize=this.model.server.supports("batchEdit")&&n,this.canReparent=this.model.server.supports("batchEdit")},serializeData:function(){
var e=R.default.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=a(T.default.pluck(t,"name")),i=a(T.default.pluck(e.find("[type=number]"),"name")),r=(0,T.default)(e.serializeArray()).reject(function(e){return n[e.name]},this),s=T.default.reduce(r,function(e,t){if(i[t.name]){var n=I.default.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);T.default.each(t,function(e){var t=(0,I.default)(e),n=t.data("updateAttr"),a=t.data("altUpdateAttr"),i=t.data("isText"),r=e.selectize.getValue();if(a)if(i)s[n]=r,s[a]=null;else{var o=e.selectize.options[r];if(o){var l=o[t.data("autocompleteAttr")];s[n]=l,s[a]=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"),
(0,T.default)(e).each(function(e){var t=this.$('.form-group[data-attr="'+e+'"]');t.addClass("has-error"),t.find(".control-error").text((0,A.default)("Required"))},this)},onRender:function(){if(this.$(".rating-region").length>0&&this.ratingRegion.show(new U.default({model:this.model,passive:!0})),this.canSelectize){var e=this;this.ui.selectizeInputs.each(function(t,n){(0,N.default)(e,n)})}}});t.default=B,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1830),r=a(i),s=n(1837),o=a(s),l=n(1826),u=a(l),d=n(1823),c=a(d),f=n(1821),p=a(f),h=n(1839),m=a(h),v=n(3),g=a(v),y=n(5),b=a(y),w=n(142),P=a(w),_=n(532),S=a(_),x=n(1203),C=a(x);n(412);var T=S.default.extend({templatesByType:{movie:r.default,show:o.default,episode:u.default,artist:c.default,album:p.default,track:m.default},ui:g.default.extend({tagInputs:".tag-input-hidden"},S.default.prototype.ui),events:g.default.extend({"change .lockable-field":"onLockableFieldChange"},S.default.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 P.default({key:t},{server:this.model.server})}this.section=e},flushChanges:function(){var e=this.ui.form,t=g.default.reduce(e.serializeArray(),function(e,t){
return e[t.name]=t.value,e},{}),n=g.default.reduce(this.ui.tagInputs,function(e,t){var n=t.selectize,a=(0,b.default)(t).data("name"),i=(0,b.default)(t).data("attr");return e[i]=g.default.map(n.items,function(e){var t=n.options[e];return{tag:t.tag,id:t.id}}),this.model["original.tag."+a]=g.default.toArray(n.options),e},{},this);g.default.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,n){(0,C.default)(e,n)})}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1850),r=a(i),s=n(41),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=n(179),p=a(f),h=n(153),m=a(h),v=n(328),g=a(v),y=u.default.Layout.extend({mixins:[m.default],className:"conversion-status",template:r.default,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 o.default.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?(0,c.default)("Paused"):(0,c.default)("Converting")}},".conversion-status-pending-label":{
model:"pausedSetting",modelAttribute:"value",formatter:function(e){return e?(0,c.default)("Paused"):(0,c.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(0,p.default)(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"),a=this.model.get("syncItemId"),i=t&&t===e.get("ratingKey"),r=n&&n===e.get("generatorID"),s=a&&a===e.get("syncItemId");
return i&&(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 g.default({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.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=a(i),s=n(40),o=a(s),l=n(51),u=a(l),d=r.default.ItemView.extend({ui:{poster:".media-poster"},bindings:{".media-title":{modelAttribute:"title"}},initialize:function(e){this.type=this.model.get("type");var t=o.default.get(this.type).element,n=this.posterWidth[t]||40,a="movie"===this.type?"art":"thumb",i="movie"===this.type?"art":this.type;this.image=new u.default({
model:this.model,type:i,getUrl:this.getPosterUrl,width:n,modelAttribute:a})},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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1249),o=a(s),l=r.default.extend({
tagName:"ul",className:"tile-list media-tile-list extra-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(339),r=a(i),s=n(340),o=a(s),l=r.default.extend({tagName:"ul",className:"list virtual-list media-list media-details-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(339),r=a(i),s=n(97),o=a(s),l=r.default.extend({
tagName:"ul",className:"list virtual-list media-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(339),r=a(i),s=n(196),o=a(s),l=r.default.extend({tagName:"ul",className:"tile-list virtual-list media-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1280),o=a(s),l=r.default.extend({
tagName:"ul",className:"list side-bar-list",itemView:o.default,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.default=l,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1889),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(6),v=a(m),g=n(9),y=a(g),b=n(183),w=a(b),P=n(155),_=a(P),S=f.default.ItemView.extend({className:"friend-server-status-container",template:s.default,events:{"click .server-share-edit-btn":"onEditClick"},initialize:function(){var e=h.resolve("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=h.resolve("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")?(0,v.default)("user"):(0,v.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=(0,w.default)((0,v.default)("library"),t.numLibraries,(0,v.default)("libraries")),t},getServerStatus:function(e){for(var t,n=0,a=this.collection.length;n<a;n++){
var i=this.collection.at(n);if(i.get("owned")===e.owned){var r=this.servers.get(i.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=l.default.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=(0,d.default)(e.currentTarget);if(!t.isDisabled()){var n,a=t.hasClass("owned"),i=this.collection.findWhere({
owned:a});i&&(n=i.get("machineIdentifier")),y.default.trigger("show:modal",new _.default({model:this.model,defaultPaneType:a?"ownedServer":"sharedServer",defaultPaneID:n}))}}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1891),s=a(r),o=n(5),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(17),y=a(g),b=n(94),w=a(b),P=n(542),_=a(P),S=n(155),x=a(S),C=n(200),T=a(C),k=d.default.Layout.extend({
tagName:"li",className:"card-tile-list-item card-2-col-item",template:s.default,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=f.resolve("appModel"),n=t.get("user"),a=n.get("friends"),i=a.get(this.model.id);this.isAdmin=e.isAdmin,this.isSignedInUser=this.model.id===n.id,this.image=new w.default({model:this.model,type:"friend",width:80}),i?this.friend=i:this.listenTo(a,"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 _.default({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")?(0,h.default)("Guest User"):e?(0,h.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=f.resolve("appModel"),n=t.get("user"),a=this.isAdmin||!n.get("restricted")&&!this.model.get("restricted");
return a&&!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(),(0,l.default)(e.currentTarget).isDisabled()||v.default.trigger("show:modal",new T.default({
model:this.model,isEditing:!0}))},onEditClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new x.default({type:"home",homeUser:this.model,isAdmin:this.isAdmin}))},onDeleteClick:function(e){e.preventDefault(),y.default.execute("removeHomeUser",{homeUser:this.model})}});t.default=k,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1295),o=a(s),l=r.default.extend({tagName:"ul",className:"list card-tile-list",
itemView:o.default,sorted:!0});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(626),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(6),c=a(d),f=n(9),p=a(f),h=n(533),m=a(h),v=n(47),g=a(v),y=n(184),b=a(y),w={playlist:["general"]},P=g.default.extend({mixins:[b.default],name:"editPlaylistModal",className:"edit-metadata-modal modal modal-lg fade",template:r.default,panes:{general:{constructor:m.default}},panesModel:"tempModel",
events:o.default.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},g.default.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){g.default.prototype.initialize.apply(this,arguments);var t,n,a,i=e.mediaActions;if(i?(a=i.getActionTargets(),
t=a[0]):(t=e.model,a=[t]),this.model=t,this.tempModel=t.clone(),!n){var r=u.default.Deferred();r.resolve(),n=r.promise()}n=n.done(o.default.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(p.default,"shortcut:save",this.saveChanges)},this)),n.fail(o.default.bind(function(){this.ui.message.text((0,c.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden");
},this))},serializeData:function(){var e=w[this.model.get("type")]||w.movie,t=o.default.reduce(e,function(e,t){return e[t]=!0,e},{}),n=o.default.escape((0,c.default)("Edit {1}",this.model.get("title"))),a={item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:n};return a},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 n=o.default.reduce(this.model.changedAttributes(this.tempModel.attributes),function(e,t,n){return e[n]=t,e},{});e.addClass("active");var a=[];o.default.isEmpty(n)||a.push(this.model.save(n));var i=u.default.when.apply(u.default,a);i.done(o.default.bind(function(){this.hide()},this)),i.fail(function(){t.text((0,c.default)("Your changes could not be saved."))}),i.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.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1906),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(6),c=a(d),f=n(47),p=a(f),h=n(1188),m=a(h),v=n(184),g=a(v),y=n(1371),b=a(y),w=n(1372),P=a(w),_=p.default.extend({mixins:[g.default],name:"fixIncorrectMatch",className:"fix-incorrect-match-modal modal modal-lg fade",
template:r.default,panes:{form:{constructor:b.default},results:{constructor:P.default}},ui:{searchBtn:".search-btn"},regions:{paneRegion:".pane-region",autoMatchDropdownRegion:".auto-match-dropdown-region"},events:o.default.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"},p.default.prototype.events),onlyAfterRender:["showPane","updateSearchBtn"],
initialize:function(){p.default.prototype.initialize.apply(this,arguments),b.default.prototype.setupAgents.apply(this),P.default.prototype.setupResults.apply(this),this.showPane("results")},serializeData:function(){var e={location:this.model.getLocation(),showNavigation:!this.model.isPlexMusicItem()};return e},updateSearchBtn:function(e){this.ui.searchBtn.toggleClass("disabled","form"!==e)},fetchResults:function(e){var t=o.default.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)?(0,c.default)("Match"):(0,c.default)("Fix Incorrect Match")}}},onRender:function(){p.default.prototype.onRender.apply(this,arguments),this.autoMatchDropdownRegion.show(new m.default({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=(0,u.default)(e.currentTarget);if(!t.isDisabled()){var n=t.closest("form");this.fetchResults(n),this.showPane("results")}},onSearchSubmit:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.find("search-btn");n.isDisabled()||(this.fetchResults(t),this.showPane("results"))}});
t.default=_,e.exports=t.default},function(e,t,n){"use strict";function a(e){return u.default.reduce(e,function(e,t,n){var a=i(t);if(0===n)return e.concat(a);var r=a.length>1;return e.concat({plain:!0,split:r,s:"or"},a)},[])}function i(e){var t=e.match(/(.+) (.+)/);if(t)return i(t[1]).concat({plain:!0,s:"then"}).concat(i(t[2]));var n=e.match(/(.+)\+(\S+)/);if(n)return i(n[1]).concat({plain:!0,s:"+"}).concat(i(n[2]));var a=u.default.reduce([[/command/,"\u2318"],[/up/,"\u2191"],[/down/,"\u2193"],[/left/,"\u2190"],[/right/,"\u2192"]],function(e,t){
return e.replace(t[0],t[1])},e);return[{s:a}]}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(1909),o=r(s),l=n(3),u=r(l),d=n(47),c=r(d),f=c.default.extend({name:"keyboardShortcutsModal",className:"keyboard-shortcuts-modal modal fade",template:o.default,orderedGroups:[{group:"navigation",label:"Navigation"},{group:"actions",label:"Actions"},{group:"player",label:"Player"}],initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.shortcuts=e.shortcuts;
},serializeData:function(){var e={};u.default.each(this.shortcuts,function(t){var n=t.group;e[n]||(e[n]=[]),e[n].push(this.humanizeShortcut(t))},this);var t=u.default.map(this.orderedGroups,function(t){var n=u.default.clone(t);return n.shortcuts=e[t.group],n},this);return{groups:t}},humanizeShortcut:function(e){return e=u.default.clone(e),e.keys=a(e.keys),e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0
});var r=n(1913),s=a(r),o=n(11),l=i(o),u=n(47),d=a(u),c=d.default.extend({name:"plexPassModal",template:s.default,serializeData:function(){var e=l.resolve("appModel"),t=e.get("user").server;return{plexPassUrl:t.get("plexPassUrl"),friendlyName:this.model.get("friendlyName"),isClaimed:this.model.get("isClaimed")}}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1926),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(42),c=a(d),f=n(40),p=a(f),h=u.default.ItemView.extend({
className:"convert-policy-container",template:r.default,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=p.default.get(this.model.get("metadataType")||"movie"),
this.childElement=p.default.getChildMediaType(this.type.typeString).element,this.model.setPolicyDefaultsFor(this.childElement)},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.childElement,e.policy.value),e.showUnwatched=e.isDirectory&&this.childElement===c.default.elements.VIDEO,e},updatePolicyValue:function(){
var e=this.model.get("policy"),t=Math.abs(parseInt(this.ui.policyValueInput.val(),10));this.ui.policyValueInput.val(o.default.isNaN(t)?"":t),o.default.isNaN(t)&&(t=0),e.set("value","all"===e.scope?null:t);var n=this.model.shouldShowPolicyWarning(this.childElement,t);this.ui.policyWarning.toggleClass("hidden",!n)},onPolicyUnwatchedChange:function(e){var t=this.model.get("policy");t.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.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1935),r=a(i),s=n(153),o=a(s),l=n(47),u=a(l),d=n(1326),c=a(d),f=n(1327),p=a(f),h=n(1324),m=a(h),v=u.default.extend({mixins:[o.default],name:"syncModal",className:"convert-modal modal fade",template:r.default,regions:{bodyRegion:".modal-body-region"},initialize:function(e){
u.default.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 c.default({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 p.default({server:this.options.item.server,device:this.device})),this.listenForStateRequests());
}},error:{onEnter:function(){this.bodyRegion.show(new m.default),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){u.default.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(1950),r=a(i),s=n(3),o=a(s),l=n(6),u=a(l),d=n(9),c=a(d),f=n(47),p=a(f),h=p.default.extend({name:"homeWarningModal",template:r.default,events:o.default.extend({"click .server-settings-btn":"onServerSettingsClick"},p.default.prototype.events),initialize:function(e){p.default.prototype.initialize.apply(this,arguments),this.type=e.type},serializeData:function(){var e;return e="pin"===this.type?(0,u.default)("You've added a PIN restriction"):(0,u.default)("You've joined a Plex Home"),
{intro:e}},onServerSettingsClick:function(e){e.preventDefault(),this.hide(),c.default.trigger("navigate","serverSettings")}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1954),s=a(r),o=n(10),l=a(o),u=n(11),d=i(u),c=n(94),f=a(c),p=l.default.ItemView.extend({tagName:"li",className:"user-select-list-item",template:s.default,ui:{container:".user-select-container",poster:".user-poster"},events:{
"click a":"onClick"},initialize:function(e){this.disabled=e.disabled,this.posterImage=new f.default({model:this.model,type:"friend",width:80});var t=d.resolve("appModel"),n=t.get("primaryServer");n&&n.supports("imageFilters")&&(this.backgroundImage=new f.default({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.default=p,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1974),r=a(i),s=n(3),o=a(s),l=n(252),u=a(l),d=u.default.extend({className:function(){var e=this.model.get("canSeek");return"player-seek-bar player-slider"+(e?"":" disabled")},template:r.default,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:o.default.extend({mouseenter:"onMouseMove",mousemove:"onMouseMove",mouseleave:"onMouseLeave"},u.default.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,a=e-n.offset().left,i=a/n.width();return i=Math.min(Math.max(i,0),1),i*=t,Math.round(i)},setValue:function(e){this.model.get("canSeek")&&u.default.prototype.setValue.apply(this,arguments);
},displayValue:function(e){e=this.normalizeValue(e),this.dragging&&(e>=100||!this.model.get("canSeek"))||u.default.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"),a=this.normalizeValue(n);this.ui.buffer.css("width",a+"%")},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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1994),s=a(r),o=n(10),l=a(o),u=n(11),d=i(u),c=n(9),f=a(c),p=n(544),h=a(p),m=n(1290),v=a(m),g=l.default.Layout.extend({className:"friends-container col-sm-8 col-md-9",template:s.default,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=d.resolve("appModel"),t=e.get("user");return t.get("restricted")?void f.default.trigger("navigate","users",{subset:"home"}):(this.collection=t.get("friends").filterByUnrestricted(),this.invites=t.get("invites").filterByFriends(),this.sentInvites=t.get("sentInvites").filterByFriends(),void 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 v.default({collection:this.collection})),this.inviteList.show(new h.default({collection:this.invites})),this.pendingList.show(new h.default({collection:this.sentInvites})),this.updateHeaders()},onClose:function(){this.collection.destroy&&this.collection.destroy(),this.invites.destroy(),this.sentInvites.destroy()},onInvitesChange:function(){this.updateHeaders()}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.count,a=e.kind;
return{$$typeof:i,type:"div",key:null,ref:null,props:{children:n,className:(0,c.default)(t,p.default.badge,p.default[a],!n&&p.default.isHidden)},_owner:null}}var i=n(13).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(r(o),n(332)),u=s(l),d=n(32),c=r(d),f=n(1621),p=r(f);a.propTypes={className:o.PropTypes.string,count:o.PropTypes.number,kind:o.PropTypes.oneOf(u.all)},a.defaultProps={kind:u.DEFAULT},t.default=a,e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t=e.className,n=e.kind,a=e.size,r=e.direction,s=e.isSelected;return{$$typeof:i,type:"div",key:null,ref:null,props:{className:(0,l.default)(t,c.default.disclosureArrow,c.default[r],c.default[n],c.default[a],s&&c.default.isSelected)},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(32)),l=r(o),u=n(44),d=n(1623),c=r(d);a.propTypes={className:s.PropTypes.string,direction:s.PropTypes.oneOf(u.directions.all),
kind:s.PropTypes.oneOf(u.kinds.all),size:s.PropTypes.oneOf(u.sizes.all),isSelected:s.PropTypes.bool},a.defaultProps={direction:u.directions.DOWN,kind:u.kinds.DEFAULT,size:u.sizes.MEDIUM,isSelected:!1},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(16).default,d=n(12).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(7),m=c(h),v=n(32),g=c(v),y=n(38),b=c(y),w=n(27),P=n(29),_=c(P),S=n(118),x=c(S),C=n(43),T=c(C),k=n(1626),I=c(k),M=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDragging:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,_.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._stopListeningForDrag()}},{key:"_listenForDrag",value: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))}},{key:"_stopListeningForDrag",value: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)}},{key:"_startDrag",value:function(e,t){document.body.classList.add(I.default.isDragging),this.setState({isDragging:!0
}),this._changeValue(this._getValueForPosition(e)),this._listenForDrag(t),this.props.onDragStart&&this.props.onDragStart()}},{key:"_drag",value:function(e){this._changeValue(this._getValueForPosition(e))}},{key:"_stopDrag",value:function(e){document.body.classList.remove(I.default.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})}},{key:"_getValueForPosition",value:function(e){var t=this.props,n=t.min,a=t.max;(0,b.default)(a>n,"The max, "+a+", must be greater than the min, "+n);var i=this.refs.track,r=i.getBoundingClientRect(),s=r.left+document.body.scrollLeft,o=e-s,l=o/i.offsetWidth;return l=Math.min(Math.max(l,0),1),(a-n)*l+n}},{key:"_getSteppedValue",value:function(e){var t=this.props,n=t.min,a=t.max,i=t.stepSize;if(!i)return e;(0,b.default)(i>=1,"The step size, "+i+", must be greater or equal to 1");var r=Math.round(e/i)*i;
return Math.min(Math.max(r,n),a)}},{key:"_getStickyValue",value:function(e){var t=this.props,n=t.max,a=t.min,i=t.stepSize,r=t.stickiness;if(!i||!r)return e;var s=this._getSteppedValue(e),o=Math.abs(s-e)/(n-a);return o<r/100?s:e}},{key:"_changeValue",value:function(e){e!==this.props.value&&this.props.onChange({positionValue:e,steppedValue:this._getSteppedValue(e)})}},{key:"_getPercent",value:function(e,t,n){return(e-t)/(n-t)*100}},{key:"onMouseDown",decorators:[w.autobind],value:function(e){e.preventDefault(),
0===e.button&&this._startDrag(e.pageX)}},{key:"onTouchStart",decorators:[w.autobind],value:function(e){e.preventDefault();var t=p.default.first(e.touches);t&&this._startDrag(t.pageX,!0)}},{key:"onMouseMove",decorators:[w.autobind],value:function(e){this._drag(e.pageX)}},{key:"onTouchMove",decorators:[w.autobind],value:function(e){var t=p.default.first(e.touches);t&&this._drag(t.pageX)}},{key:"onMouseUp",decorators:[w.autobind],value:function(e){this._stopDrag(e.pageX)}},{key:"onTouchEnd",decorators:[w.autobind],
value:function(e){var t=p.default.first(e.changedTouches);t&&this._stopDrag(t.pageX)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.trackClassName,a=e.fillClassName,i=e.thumbClassName,r=e.label,s=e.value,c=e.min,f=e.max,p=e.showFill,h=e.autoHideThumb,v=e.onMouseDown,y=e.onTouchStart,b=u(e,["className","trackClassName","fillClassName","thumbClassName","label","value","min","max","showFill","autoHideThumb","onMouseDown","onTouchStart"]),w=this.state.isDragging,P=this._getPercent(this._getStickyValue(s),c,f);
return m.default.createElement("div",d({className:(0,g.default)(t,w&&I.default.isDragging,h&&I.default.hasAutoHideThumb),onMouseDown:(0,x.default)(this.onMouseDown,v),onTouchStart:(0,x.default)(this.onTouchStart,y)},b),m.default.createElement("div",{ref:"track",className:n},p&&{$$typeof:o,type:"div",key:null,ref:null,props:{className:a,style:{width:P+"%"}},_owner:null}),{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{className:i,style:{left:P+"%"},"aria-role":"slider",
"aria-labelledby":r,"aria-valuemin":c,"aria-valuemax":f,"aria-valuenow":s}),_owner:null})}}]),t}(h.Component);M.propTypes={className:h.PropTypes.string,trackClassName:h.PropTypes.string,fillClassName:h.PropTypes.string,thumbClassName:h.PropTypes.string,label:h.PropTypes.string,value:h.PropTypes.number.isRequired,min:h.PropTypes.number.isRequired,max:h.PropTypes.number.isRequired,stepSize:h.PropTypes.number.isRequired,stickiness:h.PropTypes.number.isRequired,showFill:h.PropTypes.bool.isRequired,autoHideThumb:h.PropTypes.bool.isRequired,
onMouseDown:h.PropTypes.func,onTouchStart:h.PropTypes.func,onChange:h.PropTypes.func.isRequired,onDragStart:h.PropTypes.func,onDragComplete:h.PropTypes.func},M.defaultProps={className:I.default.slider,trackClassName:I.default.track,fillClassName:I.default.fill,thumbClassName:I.default.thumb,min:0,max:100,stepSize:0,stickiness:10,showFill:!1,autoHideThumb:!1},t.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(43),m=c(h),v=n(556),g=c(v),y=n(1629),b=c(y),w={$$typeof:l,type:g.default,key:null,ref:null,props:o(g.default.defaultProps,{isSelected:!0}),_owner:null},P=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=u(e,["children"]);return p.default.createElement(m.default,d({className:b.default.button,
"aria-haspopup":!0,isSelected:!0},n),t,w)}}]),t}(f.Component);P.propTypes={children:f.PropTypes.node.isRequired},t.default=P,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.circleClassName,a=e.iconClassName,l=e.title,u=s(e,["className","circleClassName","iconClassName","title"]);return d.default.createElement(v.default,o({className:t},u),{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{
name:"plex-icon-play-560",className:a,"aria-label":(0,f.default)("Play {1}",l)}),_owner:null},className:n},_owner:null})}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(6),f=l(c),p=n(49),h=l(p),m=n(43),v=l(m),g=n(1631),y=l(g);a.propTypes={className:u.PropTypes.string,circleClassName:u.PropTypes.string,iconClassName:u.PropTypes.string,title:u.PropTypes.string.isRequired},a.defaultProps={className:y.default.playButton,
circleClassName:y.default.playCircle,iconClassName:y.default.playIcon},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(16).default,l=n(12).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(32),p=u(f),h=n(27),m=n(241),v=n(1638),g=u(v),y=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"onChange",
decorators:[h.autobind],value:function(e){this.props.onChange(e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.errorClassName,a=e.size,i=e.type,r=e.name,s=e.hasError,u=o(e,["className","errorClassName","size","type","name","hasError"]);return c.default.createElement("input",l({},u,{id:r,name:r,type:i,className:(0,p.default)(t,g.default[a],s&&n),onChange:this.onChange}))}}]),t}(d.Component);y.defaultProps={className:g.default.input,errorClassName:g.default.hasError,
size:m.LARGE,type:"text",hasError:!1},y.propTypes={className:d.PropTypes.string,errorClassName:d.PropTypes.string,size:d.PropTypes.oneOf([m.SMALL,m.LARGE]),type:d.PropTypes.oneOf(["text","password"]),name:d.PropTypes.string.isRequired,hasError:d.PropTypes.bool,onChange:d.PropTypes.func.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(14).default,u=n(13).default,d=n(16).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(27),m=n(29),v=c(m),g=n(118),y=c(g),b=n(927),w=c(b),P=n(511),_=c(P),S=n(239),x=c(S),C=n(508),T=c(C),k=n(86),I=c(k),M=n(1641),A=c(M),E=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isRestoringScrollPosition:!1,isMeasured:!1,width:null,height:null,scrollTop:0,scrollLeft:0},this._currentScrollIndex=0,e.scrollPositionStorageKey&&(this._scrollPositionKey=w.default.getPageKey()+"!scrollPosition!"+e.scrollPositionStorageKey);
}return i(t,e),r(t,[{key:"componentDidMount",value:function(){this.props.scrollIndex?this._scrollToIndex(this.props.scrollIndex):this._restoreScrollPosition()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"componentDidUpdate",value:function(e){var t=this.props.scrollIndex;t!==e.scrollIndex&&this._scrollToIndex(t)}},{key:"componentWillUnmount",value:function(){this._scrollPositionKey&&w.default.set(this._scrollPositionKey,{scrollTop:this.state.scrollTop,scrollLeft:this.state.scrollLeft
})}},{key:"_restoreScrollPosition",value:function(){var e=this;if(this._scrollPositionKey){var t=w.default.get(this._scrollPositionKey);t&&this.setState(o({isRestoringScrollPosition:!0},t),function(){e.setState({isRestoringScrollPosition:!1})})}}},{key:"_scrollToIndex",value:function(e){if(null!=e&&e!==this._currentScrollIndex){var t=this.props.layout,n=t.options,a=t.getPositionForIndex,i=a(Math.max(e,0)),r=n.outerPaddingTop||0,s=n.outerPaddingLeft||0;this.setState({scrollTop:i.cellY-r,scrollLeft:i.cellX-s
})}}},{key:"onScrollPositionChange",decorators:[h.autobind],value:function(e){var t=e.scrollTop,n=e.scrollLeft;this.setState({scrollTop:t,scrollLeft:n})}},{key:"onListUpdate",decorators:[h.autobind],value:function(e){var t=e.visibleStartIndex;this._currentScrollIndex=t,this.props.onListScrollIndexChange&&this.props.scrollIndex!==t&&this.props.onListScrollIndexChange(t)}},{key:"onMeasure",decorators:[h.autobind],value:function(e){var t=e.width,n=e.height;this.setState({isMeasured:!0,width:t,height:n
})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.scrollerClassName,a=e.ignoreWidth,i=e.ignoreHeight,r=e.scrollDirection,s=e.onListUpdate,c=d(e,["className","scrollerClassName","ignoreWidth","ignoreHeight","scrollDirection","onListUpdate"]),f=this.state,h=f.isMeasured,m=f.isRestoringScrollPosition,v=f.width,g=f.height,b=f.scrollTop,w=f.scrollLeft;return{$$typeof:u,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{children:h&&{$$typeof:u,type:I.default,key:null,
ref:null,props:l(I.default.defaultProps,{children:p.default.createElement(T.default,o({viewportWidth:v,viewportHeight:g,onListUpdate:(0,y.default)(this.onListUpdate,s)},c)),className:n,smoothScroll:!m,scrollDirection:r,scrollTop:b,scrollLeft:w,onScrollPositionChange:this.onScrollPositionChange}),_owner:null},className:t,ignoreWidth:a,ignoreHeight:i,ignorePosition:!0,onMeasure:this.onMeasure}),_owner:null}}}]),t}(f.Component);E.propTypes={className:f.PropTypes.string,scrollerClassName:f.PropTypes.string,
layout:_.default,ignoreWidth:f.PropTypes.bool,ignoreHeight:f.PropTypes.bool,scrollDirection:f.PropTypes.string,scrollIndex:f.PropTypes.number,scrollPositionStorageKey:f.PropTypes.string,onListUpdate:f.PropTypes.func,onListScrollIndexChange:f.PropTypes.func},E.defaultProps={scrollerClassName:A.default.scroller},t.default=E,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var l=n(3),u=o(l),d=n(7),c=o(d),f=n(11),p=n(27),h=n(29),m=o(h),v=n(118),g=o(v),y=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onPress",decorators:[p.autobind],value:function(e){(0,f.resolve)("metrics").trackClick(u.default.omit(this.props,"children"))}},{key:"render",value:function(){var e=c.default.Children.only(this.props.children);
return c.default.cloneElement(e,{onPress:(0,g.default)(this.onPress,e.props.onPress)})}}]),t}(d.Component);y.propTypes={children:d.PropTypes.element.isRequired,page:d.PropTypes.string.isRequired,action:d.PropTypes.string.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(12).default,d=n(1).default,c=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=d(f),h=n(66),m=d(h),v=n(27),g=n(246),y=c(g),b=n(29),w=d(b),P=n(151),_=d(P),S=n(363),x=c(S),C=n(163),T=d(C),k=n(506),I=d(k),M=n(240),A=d(M),E=n(49),O=d(E),D=n(43),R=d(D),L=n(1416),N=d(L),j=n(1648),U=d(j),F=(0,
_.default)(T.default.modalSpeed),B={appear:U.default.enter,appearActive:U.default.enterActive,enter:U.default.enter,enterActive:U.default.enterActive,leave:U.default.leave,leaveActive:U.default.leaveActive},z={$$typeof:l,type:O.default,key:null,ref:null,props:o(O.default.defaultProps,{name:"plex-icon-remove-560"}),_owner:null},$=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"componentDidMount",value:function(){
this.props.isOpen&&this._openModal()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen?this._openModal():e.isOpen&&!this.props.isOpen&&this._closeModal()}},{key:"componentWillUnmount",value:function(){this.props.isOpen&&this._closeModal()}},{key:"_openModal",value:function(){x.startScopedFocus(m.default.findDOMNode(this.refs.modal)),this._autoFocusTimeoutID=setTimeout(x.scopeAutoFocus,F),document.addEventListener("keydown",this.onKeyDown);
}},{key:"_closeModal",value:function(){clearTimeout(this._autoFocusTimeoutID),document.removeEventListener("keydown",this.onKeyDown)}},{key:"_isBackdropTarget",value:function(e){var t=this._findEventTarget(e);if(t){var n=m.default.findDOMNode(this.refs.modal);return!n||!n.contains(t)}return!1}},{key:"_findEventTarget",value: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)}}},{key:"onBackdropBeginPress",decorators:[v.autobind],
value:function(e){this._isBackdropPressed=this._isBackdropTarget(e)}},{key:"onBackdropEndPress",decorators:[v.autobind],value:function(e){this._isBackdropPressed&&this._isBackdropTarget(e)&&this.props.onModalClose(),this._isBackdropPressed=!1}},{key:"onTouchMove",decorators:[v.autobind],value:function(e){this._isBackdropPressed=!1}},{key:"onTouchCancel",decorators:[v.autobind],value:function(e){this._isBackdropPressed=!1}},{key:"onClosePress",decorators:[v.autobind],value:function(e){this.props.onModalClose();
}},{key:"onKeyDown",decorators:[v.autobind],value:function(e){var t=e.keyCode;t===y.TAB?x.scopeTabEvent(e):t===y.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.props.onModalClose(),x.restorePreviousFocus())}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.backdropClassName,a=e.children,i=e.metricsPage,r=e.metricsProperties,s=e.isOpen;return{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:{$$typeof:l,type:A.default,key:null,ref:null,props:o(A.default.defaultProps,{
children:s&&p.default.createElement(N.default,u({},r,{page:i}),{$$typeof:l,type:"div",key:null,ref:null,props:{children:p.default.createElement("div",{ref:"modal",className:t},{$$typeof:l,type:R.default,key:null,ref:null,props:o(R.default.defaultProps,{children:z,className:U.default.closeButton,onPress:this.onClosePress}),_owner:null},a),className:n,onMouseDown:this.onBackdropBeginPress,onMouseUp:this.onBackdropEndPress,onTouchStart:this.onBackdropBeginPress,onTouchEnd:this.onBackdropEndPress,onTouchMove:this.onTouchMove,
onTouchCancel:this.onTouchCancel},_owner:null}),className:U.default.modalContainer,transitionName:B,transitionAppearTimeout:F,transitionEnterTimeout:F,transitionLeaveTimeout:F}),_owner:null},isOpen:s,closeTimeout:F}),_owner:null}}}]),t}(f.Component);$.propTypes={className:f.PropTypes.string,backdropClassName:f.PropTypes.string,children:f.PropTypes.node,metricsPage:f.PropTypes.string.isRequired,metricsProperties:f.PropTypes.object,isOpen:f.PropTypes.bool.isRequired,onModalClose:f.PropTypes.func.isRequired
},$.defaultProps={className:U.default.modal,backdropClassName:U.default.modalBackdrop},t.default=$,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.bodyClassName,a=r(e,["children","bodyClassName"]);return u.default.createElement(c.default,s({className:p.default.modalScroller,autoScroll:!0},a),{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:n},_owner:null})}var i=n(13).default,r=n(16).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(7),u=o(l),d=n(86),c=o(d),f=n(1649),p=o(f);a.propTypes={children:l.PropTypes.node,bodyClassName:l.PropTypes.string},a.defaultProps={bodyClassName:p.default.modalBody},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=i(e,["children"]);return l.default.createElement("div",r({className:d.default.modalFooter},n),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1650),d=s(u);
a.propTypes={children:o.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=i(e,["children"]);return l.default.createElement("div",r({className:d.default.modalHeader},n),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1651),d=s(u);a.propTypes={children:o.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(27),m=n(29),v=c(m),g=n(118),y=c(g),b=n(1417),w=c(b),P=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isOpen:!1},this._isHovered=!1,this._isFocused=!1}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onMouseEnter",decorators:[h.autobind],value:function(e){this.props.showOnHover&&(this._isHovered=!0,
this.setState({isOpen:!0}))}},{key:"onMouseLeave",decorators:[h.autobind],value:function(e){this.props.showOnHover&&(this._isHovered=!1,this.setState({isOpen:this._isFocused}))}},{key:"onFocus",decorators:[h.autobind],value:function(e){this.props.showOnFocus&&(this._isFocused=!0,this.setState({isOpen:!0}))}},{key:"onBlur",decorators:[h.autobind],value:function(e){this.props.showOnFocus&&(this._isFocused=!1,this.setState({isOpen:this._isHovered}))}},{key:"onPress",decorators:[h.autobind],value:function(e){
this.props.hideOnPress&&(this._isHovered=!1,this._isFocused=!1,this.setState({isOpen:!1}))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.component,a=e.tooltip,i=e.tooltipClassName,r=e.tooltipAttachment,s=e.tooltipTarget,c=e.tooltipOptions,f=e.onMouseEnter,h=e.onMouseLeave,m=e.onFocus,v=e.onBlur,g=e.onPress,b=u(e,["children","component","tooltip","tooltipClassName","tooltipAttachment","tooltipTarget","tooltipOptions","onMouseEnter","onMouseLeave","onFocus","onBlur","onPress"]),P=this.state.isOpen;
return p.default.createElement(n,d({ref:"target",onMouseEnter:(0,y.default)(this.onMouseEnter,f),onMouseLeave:(0,y.default)(this.onMouseLeave,h),onFocus:(0,y.default)(this.onFocus,m),onBlur:(0,y.default)(this.onBlur,v),onPress:(0,y.default)(this.onPress,g)},b),{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:a,className:i,attachment:r,options:c,target:s||this.refs.target,isOpen:!!a&&P}),_owner:null},t)}}]),t}(f.Component);P.propTypes={children:f.PropTypes.node,
className:f.PropTypes.string,component:f.PropTypes.func.isRequired,tooltip:f.PropTypes.string,tooltipClassName:f.PropTypes.string,tooltipAttachment:f.PropTypes.string,tooltipTarget:f.PropTypes.object,tooltipOptions:f.PropTypes.object,showOnHover:f.PropTypes.bool.isRequired,showOnFocus:f.PropTypes.bool.isRequired,hideOnPress:f.PropTypes.bool.isRequired,onMouseEnter:f.PropTypes.func,onMouseLeave:f.PropTypes.func,onFocus:f.PropTypes.func,onBlur:f.PropTypes.func,onPress:f.PropTypes.func},P.defaultProps={
showOnHover:!0,showOnFocus:!0,hideOnPress:!0},t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(6),p=u(f),h=n(27),m=n(905),v=u(m),g=n(44),y=n(29),b=u(y),w=n(1525),P=u(w),_=n(49),S=u(_),x=n(43),C=u(x),T=n(561),k=u(T),I=n(1655),M=u(I),A=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={showActions:!1,enablePrevious:!1,enableNext:!1,listHeight:"auto",scrollIndex:0},this._isReady=!1}return i(t,e),r(t,[{key:"componentDidMount",value: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())}},{key:"shouldComponentUpdate",value:function(e,t){return(0,b.default)(this,e,t)}},{key:"onListUpdate",decorators:[h.autobind],value:function(e){
var t=e.visibleStartIndex,n=e.visibleEndIndex,a=e.renderEndIndex,i=e.listStyle,r=this.props.onListReady,s=this._isReady?void 0:r;this._isReady=!0,this._visibleStartIndex=t,this._visibleEndIndex=n,this._pageSize=this._visibleEndIndex-this._visibleStartIndex;var o=t>0,l=a>n;this.setState({showActions:o||l,enablePrevious:o,enableNext:l,listHeight:i.height},s)}},{key:"onListScrollIndexChange",decorators:[h.autobind],value:function(e){this.setState({scrollIndex:e})}},{key:"onPreviousPress",decorators:[h.autobind],
value:function(e){this.setState({scrollIndex:this._visibleStartIndex-this._pageSize-1})}},{key:"onNextPress",decorators:[h.autobind],value:function(e){this.setState({scrollIndex:this._visibleEndIndex+1})}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.hubLink,a=e.listType,i=e.listContext,r=e.size,s=e.more,u=e.random,d=e.totalSize,f=e.keyPropName,h=e.itemsOffset,m=e.items,y=e.cellRenderer,b=e.columnAdjustment,w=e.onPageRequest,_=this.state,x=_.showActions,T=_.enablePrevious,I=_.enableNext,A=_.listHeight;
if(!r&&!d)return null;var E=(0,v.default)(t),O=s?r+1:r,D={visibility:"auto"===A?"hidden":"inherit"},R={height:A,overflow:"hidden"};return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:n?{$$typeof:o,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{children:E,className:M.default.hubLink,to:n}),_owner:null}:E,className:M.default.hubTitle},_owner:null},x&&{$$typeof:o,
type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{children:{$$typeof:o,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{name:"plex-icon-hub-prev-560","aria-label":(0,p.default)("Previous Page")}),_owner:null},className:M.default.hubScrollButton,isDisabled:!T,onPress:this.onPreviousPress}),_owner:null},{$$typeof:o,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{children:{$$typeof:o,type:S.default,
key:null,ref:null,props:l(S.default.defaultProps,{name:"plex-icon-hub-next-560","aria-label":(0,p.default)("Next Page")}),_owner:null},className:M.default.hubScrollButton,isDisabled:!I,onPress:this.onNextPress}),_owner:null}],className:M.default.hubActions},_owner:null}],className:M.default.hubHeader},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:c.default.createElement(k.default,{ref:"list",ignoreHeight:!0,keyPropName:f,itemsOffset:h,items:m,listType:a,listContext:i,scrollDirection:g.scrollDirections.HORIZONTAL,
scrollIndex:this.state.scrollIndex,size:u?r:d||O,layout:(0,P.default)(a,i,b),cellRenderer:y,onListUpdate:this.onListUpdate,onListScrollIndexChange:this.onListScrollIndexChange,onPageRequest:w}),style:R},_owner:null}],className:M.default.hubContainer,style:D},_owner:null}}}]),t}(d.Component);A.propTypes={machineIdentifier:d.PropTypes.string,hubIdentifier:d.PropTypes.string.isRequired,containerKey:d.PropTypes.string,title:d.PropTypes.string.isRequired,hubLink:d.PropTypes.string,type:d.PropTypes.string.isRequired,
size:d.PropTypes.number.isRequired,more:d.PropTypes.bool,random:d.PropTypes.bool,listType:d.PropTypes.string.isRequired,listContext:d.PropTypes.string.isRequired,keyPropName:d.PropTypes.string.isRequired,itemsOffset:d.PropTypes.number.isRequired,items:d.PropTypes.array.isRequired,cellRenderer:d.PropTypes.func.isRequired,totalSize:d.PropTypes.number,columnAdjustment:d.PropTypes.number.isRequired,onListReady:d.PropTypes.func,onPageRequest:d.PropTypes.func},t.default=A,e.exports=t.default},function(e,t,n){
"use strict";function a(){return(0,g.createSelector)((0,P.default)(),S.default,function(e,t){var n=p.default.pick(e,"totalSize","populatedRange","allowSync","isPending","isPopulated","error","firstItemType","isFirstItemLibraryItem");return i({columnAdjustment:t.columnAdjustment,metadataItemEntityIDs:e.metadataItems},n)})}var i=n(12).default,r=n(21).default,s=n(22).default,o=n(28).default,l=n(20).default,u=n(16).default,d=n(1).default,c=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});
var f=n(3),p=d(f),h=n(7),m=d(h),v=n(34),g=n(30),y=n(27),b=n(79),w=n(456),P=d(w),_=n(244),S=d(_),x=n(187),C=c(x),T=function(e){function t(){l(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.metadataListEntityID;t!==this.props.metadataListEntityID&&this._populate(e)}},{key:"componentWillUnmount",value:function(){var e=this.props.metadataListEntityID;
this.props.deselectAllMetadataListItems({metadataListEntityID:e})}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.initialSize&&(0,b.scheduleImmediateUpdate)(function(){e.populateMetadataListRange({metadataListEntityID:e.metadataListEntityID,startIndex:0,endIndex:e.initialSize})})}},{key:"onPageRequest",decorators:[y.autobind],value:function(e){var t=this.props,n=t.metadataListEntityID,a=t.populateMetadataListRange;a(i({metadataListEntityID:n
},e))}},{key:"render",value:function(){var e=this.props,t=e.component,n=(e.populateMetadataListRange,u(e,["component","populateMetadataListRange"]));return m.default.createElement(t,i({onPageRequest:this.onPageRequest},n))}}]),t}(h.Component);T.propTypes={metadataListEntityID:h.PropTypes.string.isRequired,component:h.PropTypes.func.isRequired,initialSize:h.PropTypes.number,listKey:h.PropTypes.string,listTitle:h.PropTypes.string,populateMetadataListRange:h.PropTypes.func.isRequired,deselectAllMetadataListItems:h.PropTypes.func.isRequired
},t.default=(0,v.connect)(a,C)(T),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(6),m=c(h),v=n(325),g=c(v),y=n(29),b=c(y),w=n(330),P=c(w),_=n(329),S=c(_),x=n(99),C=c(x),T=n(593),k=c(T),I=n(203),M=c(I),A=n(1426),E=c(A),O=n(575),D=c(O),R=n(1656),L=c(R),N=function(e){function t(){s(this,t),
a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,b.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cellX,a=e.cellY,i=e.cellWidth,r=e.cellHeight,s=e.showScrollPlaceholder,c=e.showOffscreenPlaceholder,f=e.listType,h=e.listContext,v=e.type,y=e.extraType,b=u(e,["className","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext","type","extraType"]),w=!b.metadataKey,P=h===C.default.CONTINUE_WATCHING,_=!v||f&&"mixed"!==f,x=y&&g.default.get(y),T=x?x.typeString:v,I=_?f:T,A=(0,
k.default)(i,null,I,b,h),O=(0,M.default)(I,h);return{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{children:[p.default.createElement(E.default,d({type:v,extraType:y,cardWidth:A.width,cardHeight:A.height,imageUrl:A.url,isPlaceholder:w||s,isOffscreen:c},b)),{$$typeof:l,type:"div",key:null,ref:null,props:{children:w?(0,m.default)("Loading..."):O.map(function(e,t){return p.default.createElement(D.default,d({key:t,isSecondary:t>0,isSplitLeft:P&&0===t,isSplitRight:P&&1===t
},b,e))}),className:P?L.default.continueWatchingTitleContainer:L.default.titleContainer},_owner:null}],className:t,cellX:n,cellY:a,cellWidth:i,cellHeight:r}),_owner:null}}}]),t}(f.Component);N.propTypes={className:f.PropTypes.string,cellX:f.PropTypes.number.isRequired,cellY:f.PropTypes.number.isRequired,cellWidth:f.PropTypes.number.isRequired,cellHeight:f.PropTypes.number.isRequired,showScrollPlaceholder:f.PropTypes.bool,showOffscreenPlaceholder:f.PropTypes.bool,listType:f.PropTypes.string,listContext:f.PropTypes.string,
metadataKey:f.PropTypes.string,type:f.PropTypes.string,extraType:f.PropTypes.number,thumbTranscodeUrl:f.PropTypes.func,grandparentThumbTranscodeUrl:f.PropTypes.func,artTranscodeUrl:f.PropTypes.func},t.default=(0,P.default)(N),e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,m.createSelector)((0,w.default)(),(0,_.default)(),x.default,T.default,function(e,t,n,a){void 0===e&&(e={});var r=e.key,s=u(e,["key"]),o=n.activeSelectionType;return i({},s,{metadataKey:r,server:t,activeSelectionType:o,
activeSelectionIDs:a})})}var i=n(12).default,r=n(21).default,s=n(22).default,o=n(28).default,l=n(20).default,u=n(16).default,d=n(1).default,c=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=d(f),h=n(34),m=n(30),v=n(27),g=n(40),y=d(g),b=n(301),w=d(b),P=n(245),_=d(P),S=n(190),x=d(S),C=n(1137),T=d(C),k=n(243),I=c(k),M=n(1531),A=d(M),E=n(187),O=n(570),D=d(O),R=i({selectMetadataListItem:E.selectMetadataListItem,deselectMetadataListItem:E.deselectMetadataListItem},I),L=function(e){
function t(){l(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onSelectItem",decorators:[v.autobind],value:function(e){var t=this.props.metadataListEntityID;this.props.selectMetadataListItem(i({metadataListEntityID:t},e))}},{key:"onDeselectItem",decorators:[v.autobind],value:function(e){var t=this.props.metadataListEntityID;this.props.deselectMetadataListItem(i({metadataListEntityID:t},e))}},{key:"render",value:function(){var e=this.props,t=e.activeSelectionIDs,n=e.ratingKey,a=e.type,r=a&&y.default.getChildMediaType(a),s=r&&r.element;
return p.default.createElement(D.default,i({},this.props,{selectionKey:"ratingKey",selectionType:s,isSelected:(0,A.default)(t,n),onSelectItem:this.onSelectItem,onDeselectItem:this.onDeselectItem}))}}]),t}(f.Component);L.propTypes={serverEntityID:f.PropTypes.string.isRequired,metadataListEntityID:f.PropTypes.string,metadataItemEntityID:f.PropTypes.string,activeSelectionIDs:f.PropTypes.array.isRequired,ratingKey:f.PropTypes.string,type:f.PropTypes.string,selectMetadataListItem:f.PropTypes.func.isRequired,
deselectMetadataListItem:f.PropTypes.func.isRequired},t.default=(0,h.connect)(a,R)(L),e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return!!h.default.find(e,function(e){return t[e]})}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(12).default,u=n(14).default,d=n(13).default,c=n(16).default,f=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(3),h=f(p),m=n(7),v=(f(m),n(27)),g=n(29),y=f(g),b=n(6),w=f(b),P=n(44),_=n(159),S=f(_),x=n(137),C=f(x),T=n(1415),k=f(T),I=["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"],A={
$$typeof:d,type:k.default,key:null,ref:null,props:u(k.default.defaultProps,{}),_owner:null},E=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{serverEntityID:this.props.serverEntityID,metadataItemEntityID:this.props.metadataItemEntityID}}},{key:"onPlayPress",decorators:[v.autobind],value:function(e){
this.props.playMetadataItem(this._getActionPayload())}},{key:"onPlayVersionPress",decorators:[v.autobind],value:function(e){this.props.playMetadataItemVersion(this._getActionPayload())}},{key:"onPlayAllPress",decorators:[v.autobind],value:function(e){this.props.playMetadataItemAll(this._getActionPayload())}},{key:"onShufflePress",decorators:[v.autobind],value:function(e){this.props.shuffleMetadataItem(this._getActionPayload())}},{key:"onPlayNextPress",decorators:[v.autobind],value:function(e){this.props.playMetadataItemNext(this._getActionPayload());
}},{key:"onAddToQueuePress",decorators:[v.autobind],value:function(e){this.props.addMetadataItemToQueue(this._getActionPayload())}},{key:"onPlayPlexMixPress",decorators:[v.autobind],value:function(e){this.props.playRelatedMix(this._getActionPayload())}},{key:"onPlayPrimaryExtraPress",decorators:[v.autobind],value:function(e){this.props.playPrimaryExtra(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[v.autobind],value:function(e){this.props.addMetadataItemToPlaylist(this._getActionPayload());
}},{key:"onMarkWatchedPress",decorators:[v.autobind],value:function(e){this.props.markMetadataItemWatched(this._getActionPayload())}},{key:"onMarkUnwatchedPress",decorators:[v.autobind],value:function(e){this.props.markMetadataItemUnwatched(this._getActionPayload())}},{key:"onEditPress",decorators:[v.autobind],value:function(e){this.props.editMetadataItem(this._getActionPayload())}},{key:"onRefreshPress",decorators:[v.autobind],value:function(e){this.props.refreshMetadataItem(this._getActionPayload());
}},{key:"onAnalyzePress",decorators:[v.autobind],value:function(e){this.props.analyzeMetadataItem(this._getActionPayload())}},{key:"onFixMatchPress",decorators:[v.autobind],value:function(e){this.props.fixMetadataItemMatch(this._getActionPayload())}},{key:"onUnmatchPress",decorators:[v.autobind],value:function(e){this.props.unmatchMetadataItem(this._getActionPayload())}},{key:"onSplitApartPress",decorators:[v.autobind],value:function(e){this.props.splitMetadataItemApart(this._getActionPayload())}
},{key:"onSyncPress",decorators:[v.autobind],value:function(e){this.props.syncMetadataItem(this._getActionPayload())}},{key:"onOptimizePress",decorators:[v.autobind],value:function(e){this.props.optimizeMetadataItem(this._getActionPayload())}},{key:"onDownloadVersionPress",decorators:[v.autobind],value:function(e){this.props.downloadMetadataItemVersion(this._getActionPayload())}},{key:"onWatchLaterPress",decorators:[v.autobind],value:function(e){this.props.watchMetadataItemLater(this._getActionPayload());
}},{key:"onSharePress",decorators:[v.autobind],value:function(e){this.props.shareMetadataItem(this._getActionPayload())}},{key:"onRecommendPress",decorators:[v.autobind],value:function(e){this.props.recommendMetadataItem(this._getActionPayload())}},{key:"onDeletePress",decorators:[v.autobind],value:function(e){var t=this._getActionPayload();this.props.deleteMetadataItem(l({},t,{skipRedirect:!0}))}},{key:"onDeleteVersionPress",decorators:[v.autobind],value:function(e){this.props.deleteMetadataItemVersion(this._getActionPayload());
}},{key:"onGetInfoPress",decorators:[v.autobind],value:function(e){this.props.getMetadataItemInfo(this._getActionPayload())}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,i=e.onMenuClose,r=c(e,["target","isOpen","onMenuClose"]),s=a(I,r),o=a(M,r),l=s&&o;return{$$typeof:d,type:S.default,key:null,ref:null,props:u(S.default.defaultProps,{children:[r.showPlay&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:r.playLabel||(0,w.default)("Play"),
onPress:this.onPlayPress}),_owner:null},r.showPlayVersion&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Play Version..."),onPress:this.onPlayVersionPress}),_owner:null},r.showPlayAll&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Play All"),onPress:this.onPlayAllPress}),_owner:null},r.showShuffle&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Shuffle"),
onPress:this.onShufflePress}),_owner:null},r.showQueue&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Play Next"),onPress:this.onPlayNextPress}),_owner:null},r.showQueue&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Add to Queue"),onPress:this.onAddToQueuePress}),_owner:null},r.showPlayPlexMix&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Play Plex Mix"),
onPress:this.onPlayPlexMixPress}),_owner:null},r.showPlayTrailer&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Play Trailer"),onPress:this.onPlayPrimaryExtraPress}),_owner:null},r.showPlayMusicVideo&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Play Music Video"),onPress:this.onPlayPrimaryExtraPress}),_owner:null},r.showAddToPlaylist&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{
children:(0,w.default)("Add to Playlist..."),onPress:this.onAddToPlaylistPress}),_owner:null},l&&A,r.showEdit&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Edit"),onPress:this.onEditPress}),_owner:null},r.showMarkWatched&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Mark Watched"),onPress:this.onMarkWatchedPress}),_owner:null},r.showMarkUnwatched&&{$$typeof:d,type:C.default,key:null,ref:null,
props:u(C.default.defaultProps,{children:(0,w.default)("Mark Unwatched"),onPress:this.onMarkUnwatchedPress}),_owner:null},r.showRefresh&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Refresh"),onPress:this.onRefreshPress}),_owner:null},r.showAnalyze&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Analyze"),onPress:this.onAnalyzePress}),_owner:null},r.showFixMatch&&{$$typeof:d,type:C.default,
key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Fix Match..."),onPress:this.onFixMatchPress}),_owner:null},r.showMatch&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Match..."),onPress:this.onFixMatchPress}),_owner:null},r.showUnmatch&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Unmatch"),onPress:this.onUnmatchPress}),_owner:null},r.showSplitApart&&{$$typeof:d,
type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Split Apart"),onPress:this.onSplitApartPress}),_owner:null},r.showSync&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Sync..."),onPress:this.onSyncPress}),_owner:null},r.showOptimize&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Optimize..."),onPress:this.onOptimizePress}),_owner:null},r.showDownload&&{
$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Download"),to:r.downloadUrl&&r.downloadUrl(),download:!!r.downloadUrl,onPress:!r.downloadUrl&&this.onDownloadVersionPress}),_owner:null},r.showWatchLater&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Watch Later"),onPress:this.onWatchLaterPress}),_owner:null},r.showShare&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{
children:(0,w.default)("Share..."),onPress:this.onSharePress}),_owner:null},r.showRecommend&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Recommend..."),onPress:this.onRecommendPress}),_owner:null},r.showDelete&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Delete"),kind:P.kinds.DANGER,onPress:this.onDeletePress}),_owner:null},r.showDeleteVersion&&{$$typeof:d,type:C.default,key:null,ref:null,
props:u(C.default.defaultProps,{children:(0,w.default)("Delete Version"),kind:P.kinds.DANGER,onPress:this.onDeleteVersionPress}),_owner:null},r.showGetInfo&&{$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{children:(0,w.default)("Get Info"),onPress:this.onGetInfoPress}),_owner:null}],target:t,isOpen:n,onMenuClose:i}),_owner:null}}}]),t}(m.Component);E.propTypes={serverEntityID:m.PropTypes.string.isRequired,metadataItemEntityID:m.PropTypes.string.isRequired,target:m.PropTypes.object,
isOpen:m.PropTypes.bool.isRequired,onMenuClose:m.PropTypes.func.isRequired,playLabel:m.PropTypes.string,showPlay:m.PropTypes.bool,showPlayVersion:m.PropTypes.bool,showPlayAll:m.PropTypes.bool,showShuffle:m.PropTypes.bool,showQueue:m.PropTypes.bool,showPlayPlexMix:m.PropTypes.bool,showPlayTrailer:m.PropTypes.bool,showPlayMusicVideo:m.PropTypes.bool,showAddToPlaylist:m.PropTypes.bool,showEdit:m.PropTypes.bool,showMarkWatched:m.PropTypes.bool,showMarkUnwatched:m.PropTypes.bool,showRefresh:m.PropTypes.bool,
showAnalyze:m.PropTypes.bool,showFixMatch:m.PropTypes.bool,showMatch:m.PropTypes.bool,showUnmatch:m.PropTypes.bool,showSplitApart:m.PropTypes.bool,showSync:m.PropTypes.bool,showOptimize:m.PropTypes.bool,downloadUrl:m.PropTypes.func,showDownload:m.PropTypes.bool,showWatchLater:m.PropTypes.bool,showShare:m.PropTypes.bool,showRecommend:m.PropTypes.bool,showDelete:m.PropTypes.bool,showDeleteVersion:m.PropTypes.bool,showGetInfo:m.PropTypes.bool,playMetadataItem:m.PropTypes.func,playMetadataItemVersion:m.PropTypes.func,
playMetadataItemAll:m.PropTypes.func,shuffleMetadataItem:m.PropTypes.func,playMetadataItemNext:m.PropTypes.func,addMetadataItemToQueue:m.PropTypes.func,playRelatedMix:m.PropTypes.func,playPrimaryExtra:m.PropTypes.func,addMetadataItemToPlaylist:m.PropTypes.func,markMetadataItemWatched:m.PropTypes.func,markMetadataItemUnwatched:m.PropTypes.func,editMetadataItem:m.PropTypes.func,refreshMetadataItem:m.PropTypes.func,analyzeMetadataItem:m.PropTypes.func,fixMetadataItemMatch:m.PropTypes.func,unmatchMetadataItem:m.PropTypes.func,
splitMetadataItemApart:m.PropTypes.func,syncMetadataItem:m.PropTypes.func,optimizeMetadataItem:m.PropTypes.func,downloadMetadataItemVersion:m.PropTypes.func,watchMetadataItemLater:m.PropTypes.func,shareMetadataItem:m.PropTypes.func,recommendMetadataItem:m.PropTypes.func,deleteMetadataItem:m.PropTypes.func,deleteMetadataItemVersion:m.PropTypes.func,getMetadataItemInfo:m.PropTypes.func},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.type,a=e.width,s=e.height,o=h[n];
if(!o)return null;var l={fontSize:Math.max(14,Math.min(Math.round(a/4),42)),lineHeight:s+"px"};return{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{name:o,className:(0,u.default)(t,p.default.placeholderIcon),style:l}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(32)),u=s(l),d=n(49),c=s(d),f=n(1661),p=s(f),h={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"};a.propTypes={className:o.PropTypes.string,type:o.PropTypes.string,width:o.PropTypes.number.isRequired,height:o.PropTypes.number.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.type,n=e.isOffscreen,a=e.url,o=e.width,l=e.height,u=e.transitionProps,c=e.onLoad,p=e.onError;
s(e,["type","isOffscreen","url","width","height","transitionProps","onLoad","onError"]);return n?null:a?{$$typeof:r,type:d.default,key:null,ref:null,props:i(d.default.defaultProps,{url:a,width:o,height:l,backgroundPosition:"artist"===t?"center top":"center",transitionProps:u,onLoad:c,onError:p}),_owner:null}:{$$typeof:r,type:f.default,key:null,ref:null,props:i(f.default.defaultProps,{type:t,width:o,height:l}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(7),u=(o(l),n(347)),d=o(u),c=n(573),f=o(c);a.propTypes={type:l.PropTypes.string,isOffscreen:l.PropTypes.bool,width:l.PropTypes.number.isRequired,height:l.PropTypes.number.isRequired,url:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]),transitionProps:l.PropTypes.object,onLoad:l.PropTypes.func,onError:l.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.component,a=e.selectProps,s=e.isSecondary,o=e.isSplitLeft,u=e.isSplitRight,c=i(e,["className","component","selectProps","isSecondary","isSplitLeft","isSplitRight"]),p=a?a(c):c;
return l.default.createElement(n,r({className:(0,d.default)(t,f.default.title,s&&f.default.isSecondary,o&&f.default.isSplitLeft,u&&f.default.isSplitRight),isSecondary:s},p))}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(1664),f=s(c);a.propTypes={className:o.PropTypes.string,component:o.PropTypes.func.isRequired,selectProps:o.PropTypes.func,isSecondary:o.PropTypes.bool,isSplitLeft:o.PropTypes.bool,isSplitRight:o.PropTypes.bool
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.server,a=e.metadataKey,s=e.parentKey,o=e.title,l=e.parentTitle,u=e.index,d=e.parentIndex,f=e.originallyAvailableAt,h=e.isSecondary,v=e.onPress,g=encodeURIComponent(n.machineIdentifier),y=encodeURIComponent(a),P=encodeURIComponent(s),_=(0,c.default)({seasonIndex:d,noLeadingZero:!0}),S=(0,p.default)({episodeIndex:u,date:f,noLeadingZero:!0});return{$$typeof:i,type:"span",key:null,ref:null,props:{children:[u>0&&{
$$typeof:i,type:m.default,key:null,ref:null,props:r(m.default.defaultProps,{children:_,className:h&&b.default.isSecondary,title:l,to:"#!/server/"+g+"/details/"+P,onPress:v}),_owner:null},u>0&&w,{$$typeof:i,type:m.default,key:null,ref:null,props:r(m.default.defaultProps,{children:S,className:h&&b.default.isSecondary,title:o,to:"#!/server/"+g+"/details/"+y,onPress:v}),_owner:null}],className:t},_owner:null}}var i=n(13).default,r=n(14).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var o=n(7),l=(s(o),n(122)),u=s(l),d=n(872),c=s(d),f=n(181),p=s(f),h=n(43),m=s(h),v=n(352),g=s(v),y=n(1665),b=s(y),w={$$typeof:i,type:g.default,key:null,ref:null,props:r(g.default.defaultProps,{separator:"\xb7"}),_owner:null};a.propTypes={className:o.PropTypes.string,server:u.default.isRequired,metadataKey:o.PropTypes.string.isRequired,parentKey:o.PropTypes.string.isRequired,title:o.PropTypes.string,parentTitle:o.PropTypes.string,index:o.PropTypes.number,parentIndex:o.PropTypes.number,originallyAvailableAt:o.PropTypes.string,
isSecondary:o.PropTypes.bool.isRequired,onPress:o.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.server,a=e.id,s=e.reasonID,o=e.librarySectionType,u=e.tagType,c=e.tag,f=e.onPress,p=i(e,["className","server","id","reasonID","librarySectionType","tagType","tag","onPress"]),m=encodeURIComponent(n.machineIdentifier),v=encodeURIComponent(c),g=d.default.get(u),y=g.typeString;return l.default.createElement(h.default,r({className:t,title:c,
to:"#!/server/"+m+"/section/"+s+"/filter/"+o+"/"+y+"/"+a+"/"+v,onPress:f},p),c)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(326),d=s(u),c=n(122),f=s(c),p=n(43),h=s(p);a.propTypes={className:o.PropTypes.string,server:f.default.isRequired,id:o.PropTypes.number.isRequired,reasonID:o.PropTypes.number.isRequired,librarySectionType:o.PropTypes.number.isRequired,tagType:o.PropTypes.number.isRequired,tag:o.PropTypes.string,onPress:o.PropTypes.func
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return u.default.createElement(m.default,s({tooltip:(0,c.default)("Add to Playlist")},e),{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{name:"plex-icon-toolbar-add-to-playlist-560","aria-label":(0,c.default)("Add to Playlist")}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(49),p=o(f),h=n(160),m=o(h);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.playLabel,n=void 0===t?(0,f.default)("Play"):t,a=s(e,["playLabel"]);return d.default.createElement(v.default,o({tooltip:n},a),{$$typeof:r,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{name:"plex-icon-toolbar-play-560","aria-label":n}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(6),f=l(c),p=n(49),h=l(p),m=n(160),v=l(m);
a.propTypes={playLabel:u.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return u.default.createElement(m.default,s({tooltip:(0,c.default)("Shuffle")},e),{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{name:"plex-icon-toolbar-shuffle-560","aria-label":(0,c.default)("Shuffle")}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(49),p=o(f),h=n(160),m=o(h);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return u.default.createElement(m.default,s({tooltip:(0,c.default)("Sync")},e),{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{name:"plex-icon-toolbar-sync-560","aria-label":(0,c.default)("Sync")}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(49),p=o(f),h=n(160),m=o(h);t.default=a,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(34),o=n(30),l=n(460),u=a(l),d=n(459),c=a(d),f=n(81),p=n(1470),h=a(p),m=(0,o.createSelector)(u.default,function(e){return!!r.default.findWhere(e,{isDownForMaintenance:!0})}),v=(0,o.createSelector)(u.default,function(e){return!!r.default.findWhere(e,{hasFailedResources:!0})}),g=(0,o.createStructuredSelector)({outOfDateServers:c.default,isDownForMaintenance:m,hasFailedResources:v,
hasPlexPass:function(e){return e.user.hasPlexPass},isUserRestricted:function(e){return!!e.user.restricted}}),y={onDownloadServer:f.downloadServer},b=(0,s.connect)(function(e){return g(e)},y)(h.default);t.default=b,e.exports=t.default},function(e,t,n){"use strict";function a(e){return o.default.createElement(d.default,i({className:f.default.innerEmptyPage,contentClassName:f.default.innerEmptyPageContent,scrollDirection:l.scrollDirections.NONE},e))}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(7),o=r(s),l=n(44),u=n(202),d=r(u),c=n(620),f=r(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,p.createSelector)((0,b.default)(),function(e){return e.ui.hubsPage},x,function(e,t,n){return{friendlyName:e.friendlyName,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer,hasLibraries:!!e.desktop.libraries.length,hubEntityIDs:t.hubs||[],isHubsPending:t.isHubsPending,hubsError:t.hubsError,isEmpty:n}})}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(12).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(34),p=n(30),h=n(27),m=n(79),v=n(457),g=u(v),y=n(76),b=u(y),w=n(188),P=n(1130),_=n(1473),S=u(_),x=(0,p.createSelector)(g.default,function(e){return e.ui.hubsPage.hubs},function(e){for(var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=t.length;n--;){var a=t[n],i=e[a];if(i.size||i.totalSize)return!1}return!0}),C={addLibrary:w.addLibrary,initHubsPage:P.initHubsPage,fetchHubs:P.fetchHubs},T=function(e){function t(){
o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.hubKey;t!==this.props.hubKey&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.hubKey&&(0,m.scheduleImmediateUpdate)(function(){e.initHubsPage({serverEntityID:e.serverEntityID,hubKey:e.hubKey}),
e.fetchHubs({options:{onlyTransient:!0}})})}},{key:"onAddLibraryPress",decorators:[h.autobind],value:function(e){this.props.addLibrary({serverEntityID:this.props.serverEntityID})}},{key:"render",value:function(){return c.default.createElement(S.default,l({onAddLibraryPress:this.onAddLibraryPress},this.props))}}]),t}(d.Component);T.propTypes={serverEntityID:d.PropTypes.string.isRequired,hubKey:d.PropTypes.string.isRequired,addLibrary:d.PropTypes.func.isRequired,initHubsPage:d.PropTypes.func.isRequired,
fetchHubs:d.PropTypes.func.isRequired},t.default=(0,f.connect)(a,C)(T),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.title,n=e.isMetadataItem,a=e.isPlaceholder,l=e.onPlayPress,u=s(e,["title","isMetadataItem","isPlaceholder","onPlayPress"]),c=u.width,p=u.type,m=(0,f.default)(c,null,p,u),g={width:m.width,height:m.height,borderRadius:n?null:"50%"};return a?{$$typeof:i,type:"div",key:null,ref:null,props:{className:y.default.poster,style:g},_owner:null}:{$$typeof:i,type:"div",
key:null,ref:null,props:{children:[n&&{$$typeof:i,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{className:y.default.playButton,tabIndex:"-1",title:t,onPress:l}),_owner:null},d.default.createElement(v.default,o({},m,u,{title:t,isMetadataItem:n}))],className:y.default.card,style:g},_owner:null}}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(593),f=l(c),p=n(559),h=l(p),m=n(1491),v=l(m),g=n(1696),y=l(g);
a.propTypes={isPlaceholder:u.PropTypes.bool,isMetadataItem:u.PropTypes.bool.isRequired,type:u.PropTypes.string,width:u.PropTypes.number.isRequired,title:u.PropTypes.string.isRequired,onPlayPress:u.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.server,n=e.reason,a=e.reasonID,i=e.reasonTitle,r=e.librarySectionID,s=e.librarySectionType,o=encodeURIComponent(t.machineIdentifier),l=encodeURIComponent(i),u="#!/server/"+o+"/",d="actor"===n||"director"===n,c="section"===n;
return d?u+("section/"+r+"/filter/"+s+"/"+n+"/"+a+"/"+l):c?u+("section/"+a):void 0}function i(e){var t=e.className,n=e.originalTitle,i=e.reason,o=e.reasonTitle,l=e.onPress;if(!i)return null;if("originalTitle"===i)return{$$typeof:r,type:"span",key:null,ref:null,props:{children:n,className:t},_owner:null};if(!o)return null;var u=a(e),c={director:(0,d.default)("by"),actor:(0,d.default)("with"),section:(0,d.default)("in")};return u?{$$typeof:r,type:"span",key:null,ref:null,props:{children:[c[i]," ",{
$$typeof:r,type:h.default,key:null,ref:null,props:s(h.default.defaultProps,{children:o,title:o,tabIndex:"-1",to:u,onPress:l}),_owner:null}],className:t},_owner:null}:{$$typeof:r,type:"span",key:null,ref:null,props:{children:c[i]+" "+o,className:t},_owner:null}}var r=n(13).default,s=n(14).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=(o(l),n(6)),d=o(u),c=n(122),f=o(c),p=n(43),h=o(p);i.propTypes={className:l.PropTypes.string,server:f.default.isRequired,originalTitle:l.PropTypes.string,
reason:l.PropTypes.string,reasonID:l.PropTypes.number,reasonTitle:l.PropTypes.string,librarySectionID:l.PropTypes.string,librarySectionType:l.PropTypes.number,onPress:l.PropTypes.func},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,y.createSelector)(T.default,function(e,t){var n=t.searchResultEntityID;return n},function(e,t){return e[t]})}function i(){return(0,y.createSelector)((0,x.default)(),a(),I.default,function(e,t,n){var a,i=t.key,r=t.tagItem,l=t.metadataItem,u=f(t,["key","tagItem","metadataItem"]),d=l?n[l]:r,c=d.entityID,p=d.key,h=f(d,["entityID","key"]),m=l?"metadataKey":"tagKey";
return s((a={searchResultKey:i},o(a,m,p),o(a,"metadataItemEntityID",c),o(a,"server",e),o(a,"isMetadataItem",!!l),a),h,u)})}function r(){return(0,w.default)(i(),function(e){return e})}var s=n(12).default,o=n(52).default,l=n(21).default,u=n(22).default,d=n(50).default,c=n(20).default,f=n(16).default,p=n(1).default,h=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var m=n(7),v=p(m),g=n(34),y=n(30),b=n(300),w=p(b),P=n(29),_=p(P),S=n(245),x=p(S),C=n(1136),T=p(C),k=n(224),I=p(k),M=n(243),A=h(M),E=function(e){
function t(){c(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return u(t,e),d(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,_.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.component,n=f(e,["component"]);return v.default.createElement(t,n)}}]),t}(m.Component);E.propTypes={serverEntityID:m.PropTypes.string.isRequired,searchResultEntityID:m.PropTypes.string.isRequired,component:m.PropTypes.func.isRequired},t.default=(0,
g.connect)(r,A)(E),e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,h.createSelector)(g.default,b.default,(0,P.default)(),function(e,t,n){var a=t.activeSelectionItems,r=t.activeSelectionType;return{activeSelectionItems:a.map(function(t){return i({},t,{model:e[t.model]})}),activeSelectionType:r,server:n}})}var i=n(12).default,r=n(21).default,s=n(22).default,o=n(28).default,l=n(20).default,u=n(1).default,d=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=u(c),p=n(34),h=n(30),m=n(27),v=n(224),g=u(v),y=n(190),b=u(y),w=n(245),P=u(w),_=n(336),S=d(_),x=n(1493),C=u(x),T=function(e){
function t(){l(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onDeselectAllPress",decorators:[m.autobind],value:function(e){this.props.deselectAllItems()}},{key:"render",value:function(){return f.default.createElement(C.default,i({onDeselectAllPress:this.onDeselectAllPress},this.props))}}]),t}(c.Component);T.propTypes={deselectAllItems:c.PropTypes.func.isRequired},t.default=(0,p.connect)(a,S)(T),e.exports=t.default},function(e,t,n){
"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(32)),f=u(c),p=n(6),h=u(p),m=n(29),v=u(m),g=n(49),y=u(g),b=n(1707),w=u(b),P=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"render",
value:function(){var e=this.props,t=e.className,n=e.isConnected,a=e.isUnavailable,i=e.isSecure,r=e.isRelayed;return r?{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{className:(0,f.default)(t,w.default.warningIcon),name:"plex-icon-alert-round-560","aria-label":(0,h.default)("Indirect")}),_owner:null}:a?{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{className:(0,f.default)(t,w.default.alertIcon),name:"plex-icon-alert-560","aria-label":(0,h.default)("Unavailable")
}),_owner:null}:i&&n?{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{className:(0,f.default)(t,w.default.secureIcon),name:"plex-icon-lock-560","aria-label":(0,h.default)("Secure")}),_owner:null}:null}}]),t}(d.Component);P.propTypes={className:d.PropTypes.string,isConnected:d.PropTypes.bool,isUnavailable:d.PropTypes.bool,isSecure:d.PropTypes.bool,isRelayed:d.PropTypes.bool},t.default=P,e.exports=t.default},function(e,t){"use strict";function n(e){var t=e.cellWidth,n=e.aspectRatio,a=e.titleHeight,i=void 0===a?0:a;
return Math.floor(t/n+i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){var t=e.innerViewportWidth,n=e.innerHorizontalPadding,a=void 0===n?0:n,i=e.minCellWidth,r=e.minColumns,s=void 0===r?0:r,o=e.maxColumns,l=void 0===o?1/0:o,u=e.columnAdjustment,d=void 0===u?0:u,c=Math.floor((t+a)/(i+a)),f=void 0;return f=c<s?s:c>l?l:c,f=Math.max(f+d,1),Math.max(Math.floor((t+a)/f)-a,0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,
e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return function(n){return o.default.createElement(t,i({serverEntityID:e.serverEntityID,metadataListEntityID:e.metadataListEntityID,listType:e.listType,listContext:e.listContext},n))}}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(7),o=r(s);e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.thumbTranscodeUrl||e.parentThumbTranscodeUrl||e.grandparentThumbTranscodeUrl;
}function i(e){return e.artTranscodeUrl||e.parentArtTranscodeUrl||e.grandparentArtTranscodeUrl}function r(e,t,n){if(n)switch(n){case u.default.PRE_PLAY:switch(e){case"season":return t.thumbTranscodeUrl;case"episode":return t.thumbTranscodeUrl;case"album":return t.thumbTranscodeUrl;case"track":return t.thumbTranscodeUrl}break;case u.default.CONTINUE_WATCHING:switch(e){case"movie":return i(t);case"episode":return i(t)}}switch(e){case"movie":return t.thumbTranscodeUrl;case"show":return t.thumbTranscodeUrl;
case"season":return a(t);case"episode":return t.grandparentThumbTranscodeUrl;case"artist":return t.thumbTranscodeUrl;case"album":return a(t);case"track":return a(t);case"photo":return t.thumbTranscodeUrl;case"photoAlbum":return t.thumbTranscodeUrl;case"clip":return t.thumbTranscodeUrl;case"playlist":return t.compositeTranscodeUrl;default:return t.thumbTranscodeUrl}}function s(e,t,n,a,i){var s=null==e?(0,d.getWidth)(t,n,i):e,o=null==t?(0,d.getHeight)(e,n,i):t,l=r(n,a,i);return{url:l,width:s,height:o
}}var o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var l=n(99),u=o(l),d=n(261);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(151),r=a(i),s=n(163),o=a(s),l=n(1715),u=a(l),d=(0,r.default)(o.default.slowSpeed),c={transitionName:u.default,transitionAppear:!0,transitionAppearTimeout:d,transitionEnterTimeout:d,transitionLeaveTimeout:2*d};t.default=c,e.exports=t.default},function(e,t,n){e.exports={
"default":n(1543),__esModule:!0}},function(e,t,n){e.exports={"default":n(1550),__esModule:!0}},function(e,t,n){e.exports={"default":n(1552),__esModule:!0}},function(e,t,n){var a=n(366),i=n(102)("toStringTag"),r="Arguments"==a(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[i])?n:r?a(t):"Object"==(s=a(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){e.exports=!n(264)(function(){return 7!=Object.defineProperty({},"a",{
get:function(){return 7}}).a})},function(e,t,n){var a=n(207),i=n(71).getNames,r={}.toString,s="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return i(e)}catch(t){return s.slice()}};e.exports.get=function(e){return s&&"[object Window]"==r.call(e)?o(e):i(a(e))}},function(e,t,n){var a=n(366);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var a=n(603),i=n(101),r=n(604),s=n(370),o=n(369),l=n(164),u=n(1564),d=n(374),c=n(71).getProto,f=n(102)("iterator"),p=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){
return this};e.exports=function(e,t,n,y,b,w,P){u(n,t,y);var _,S,x=function(e){if(!p&&e in I)return I[e];switch(e){case m:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},C=t+" Iterator",T=b==v,k=!1,I=e.prototype,M=I[f]||I[h]||b&&I[b],A=M||x(b);if(M){var E=c(A.call(new e));d(E,C,!0),!a&&o(I,h)&&s(E,f,g),T&&M.name!==v&&(k=!0,A=function(){return M.call(this)})}if(a&&!P||!p&&!k&&I[f]||s(I,f,A),l[t]=A,l[C]=g,b)if(_={values:T?A:x(v),
keys:w?A:x(m),entries:T?x("entries"):A},P)for(S in _)S in I||r(I,S,_[S]);else i(i.P+i.F*(p||k),t,_);return _}},function(e,t){e.exports=!0},function(e,t,n){e.exports=n(370)},function(e,t,n){var a=n(265),i="__core-js_shared__",r=a[i]||(a[i]={});e.exports=function(e){return r[e]||(r[e]={})}},617,208,function(e,t,n){var a=n(598),i=n(102)("iterator"),r=n(164);e.exports=n(87).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||r[a(e)]}},function(e,t,n){n(1575);var a=n(164);a.NodeList=a.HTMLCollection=a.Array;
},,,,,,,,,,function(e,t){e.exports={isSecondary:"MetadataTitleEpisodeTitleIndex-isSecondary-2jbOu MetadataPosterTitle-isSecondary-2s6Ip"}},function(e,t){e.exports={innerEmptyPage:"InnerEmptyPage-innerEmptyPage-3Yx76 EmptyPage-emptyPage-1JClc resetFont-resetFont-GoU5_",innerEmptyPageContent:"InnerEmptyPage-innerEmptyPageContent-2Reex EmptyPage-content-1Asia"}},function(e,t,n){"use strict";var a=n(82),i={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){
e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:a}},registerDefault:function(){}};e.exports=i},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body;
}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function a(e){return s?void 0:r(!1),f.hasOwnProperty(e)||(e="*"),o.hasOwnProperty(e)||("*"===e?s.innerHTML="<link />":s.innerHTML="<"+e+"></"+e+">",o[e]=!s.firstChild),o[e]?f[e]:null}var i=n(64),r=n(33),s=i.canUseDOM?document.createElement("div"):null,o={},l=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],c=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={
"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:d,th:d},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(e){f[e]=c,
o[e]=!0}),e.exports=a},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function a(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(var s=0;s<a.length;s++)if(!i.call(t,a[s])||!n(e[a[s]],t[a[s]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;e.exports=a},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(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> '+m(n(2).call(e,"General",{hash:{},data:t}))+" </a></li> "}function o(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> '+m(n(2).call(e,"Tags",{hash:{},data:t}))+" </a></li> "}function l(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> '+m(n(2).call(e,"Sharing",{
hash:{},data:t}))+" </a></li> "}function u(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> '+m(n(2).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> '+m(n(2).call(e,"Banner",{hash:{},data:t}))+" </a></li> "}function c(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> '+m(n(2).call(e,"Background",{hash:{},data:t}))+" </a></li> "}function f(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> '+m(n(2).call(e,"Info",{hash:{},data:t}))+" </a></li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var p,h="",m=this.escapeExpression,v="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 pencil"></i> ',p=t&&t.paneTitle,p=typeof p===v?p.apply(t):p,(p||0===p)&&(h+=p),h+='</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"> ',p=a.if.call(t,(p=t&&t.panes,
null==p||p===!1?p:p.general),{hash:{},inverse:g.noop,fn:g.program(1,s,r),data:r}),(p||0===p)&&(h+=p),h+=" ",p=a.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.tags),{hash:{},inverse:g.noop,fn:g.program(3,o,r),data:r}),(p||0===p)&&(h+=p),h+=" ",p=a.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.sharing),{hash:{},inverse:g.noop,fn:g.program(5,l,r),data:r}),(p||0===p)&&(h+=p),h+=" ",p=a.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.poster),{hash:{},inverse:g.noop,fn:g.program(7,u,r),data:r}),(p||0===p)&&(h+=p),
h+=" ",p=a.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.banner),{hash:{},inverse:g.noop,fn:g.program(9,d,r),data:r}),(p||0===p)&&(h+=p),h+=" ",p=a.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.art),{hash:{},inverse:g.noop,fn:g.program(11,c,r),data:r}),(p||0===p)&&(h+=p),h+=" ",p=a.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.info),{hash:{},inverse:g.noop,fn:g.program(13,f,r),data:r}),(p||0===p)&&(h+=p),h+=' </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">'+m(n(2).call(t,"Cancel",{
hash:{},data:r}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+m(n(2).call(t,"Save Changes",{hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t){"use strict";function n(e){this.string=e}n.prototype.toString=function(){return""+this.string},t.default=n},,function(e,t,n){"use strict";var a=n(2037),i=window.Raven,r=new a;r.noConflict=function(){return window.Raven=i,r},r.afterLoad(),
e.exports=r},function(e,t){"use strict";function n(e){return void 0===e}function a(e){return"function"==typeof e}function i(e){return"[object String]"===m.toString.call(e)}function r(e){return"object"==typeof e&&null!==e}function s(e){for(var t in e)return!1;return!0}function o(e){return r(e)&&"[object Error]"===m.toString.call(e)||e instanceof Error}function l(e,t){var a,i;if(n(e.length))for(a in e)c(e,a)&&t.call(null,a,e[a]);else if(i=e.length)for(a=0;a<i;a++)t.call(null,a,e[a])}function u(e,t){
return t?(l(t,function(t,n){e[t]=n}),e):e}function d(e,t){return e.length<=t?e:e.substr(0,t)+"\u2026"}function c(e,t){return m.hasOwnProperty.call(e,t)}function f(e){for(var t,n=[],a=0,r=e.length;a<r;a++)t=e[a],i(t)?n.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&n.push(t.source);return new RegExp(n.join("|"),"i")}function p(e){var t=[];return l(e,function(e,n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.join("&")}function h(){var e=window.crypto||window.msCrypto;
if(!n(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var a=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return a(t[0])+a(t[1])+a(t[2])+a(t[3])+a(t[4])+a(t[5])+a(t[6])+a(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)})}var m=Object.prototype;e.exports={isUndefined:n,isFunction:a,isString:i,isObject:r,isEmptyObject:s,isError:o,
each:l,objectMerge:u,truncate:d,hasKey:c,joinRegExp:f,urlencode:p,uuid4:h}},function(e,t,n){"use strict";t.__esModule=!0;var a=n(7);t.default=a.PropTypes.shape({subscribe:a.PropTypes.func.isRequired,dispatch:a.PropTypes.func.isRequired,getState:a.PropTypes.func.isRequired})},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var a={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,
columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(a).forEach(function(e){i.forEach(function(t){a[n(t,e)]=a[e]})});var r={background:{backgroundAttachment:!0,
backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0
},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:a,shorthandPropertyExpansions:r};e.exports=s},function(e,t,n){"use strict";var a=n(632),i=n(64),r=(n(83),n(1718),n(2101)),s=n(1724),o=n(1728),l=(n(45),o(function(e){return s(e)})),u=!1,d="cssFloat";if(i.canUseDOM){var c=document.createElement("div").style;try{c.font=""}catch(f){u=!0}void 0===document.documentElement.style.cssFloat&&(d="styleFloat");
}var p={createMarkupForStyles:function(e,t){var n="";for(var a in e)if(e.hasOwnProperty(a)){var i=e[a];null!=i&&(n+=l(a)+":",n+=r(a,i,t)+";")}return n||null},setValueForStyles:function(e,t,n){var i=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=r(s,t[s],n);if("float"!==s&&"cssFloat"!==s||(s=d),o)i[s]=o;else{var l=u&&a.shorthandPropertyExpansions[s];if(l)for(var c in l)i[c]="";else i[s]=""}}}};e.exports=p},function(e,t,n){"use strict";function a(){this._callbacks=null,this._contexts=null}var i=n(54),r=n(126),s=n(33);
i(a.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?s(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e);
},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(a),e.exports=a},function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},function(e,t,n){"use strict";function a(e){return(""+e).replace(w,"$&/")}function i(e,t){this.func=e,this.context=t,this.count=0}function r(e,t,n){var a=e.func,i=e.context;a.call(i,t,e.count++)}function s(e,t,n){
if(null==e)return e;var a=i.getPooled(t,n);g(e,r,a),i.release(a)}function o(e,t,n,a){this.result=e,this.keyPrefix=t,this.func=n,this.context=a,this.count=0}function l(e,t,n){var i=e.result,r=e.keyPrefix,s=e.func,o=e.context,l=s.call(o,t,e.count++);Array.isArray(l)?u(l,i,n,v.thatReturnsArgument):null!=l&&(m.isValidElement(l)&&(l=m.cloneAndReplaceKey(l,r+(!l.key||t&&t.key===l.key?"":a(l.key)+"/")+n)),i.push(l))}function u(e,t,n,i,r){var s="";null!=n&&(s=a(n)+"/");var u=o.getPooled(t,s,i,r);g(e,l,u),
o.release(u)}function d(e,t,n){if(null==e)return e;var a=[];return u(e,a,null,t,n),a}function c(e,t,n){return null}function f(e,t){return g(e,c,null)}function p(e){var t=[];return u(e,t,null,v.thatReturnsArgument),t}var h=n(126),m=n(88),v=n(82),g=n(407),y=h.twoArgumentPooler,b=h.fourArgumentPooler,w=/\/+/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(i,y),o.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,
this.count=0},h.addPoolingTo(o,b);var P={forEach:s,map:d,mapIntoWithKeyPrefixInternal:u,count:f,toArray:p};e.exports=P},function(e,t,n){"use strict";function a(e,t){var n=_.hasOwnProperty(t)?_[t]:null;x.hasOwnProperty(t)&&(n!==w.OVERRIDE_BASE?v(!1):void 0),e&&(n!==w.DEFINE_MANY&&n!==w.DEFINE_MANY_MERGED?v(!1):void 0)}function i(e,t){if(t){"function"==typeof t?v(!1):void 0,p.isValidElement(t)?v(!1):void 0;var n=e.prototype,i=n.__reactAutoBindPairs;t.hasOwnProperty(b)&&S.mixins(e,t.mixins);for(var r in t)if(t.hasOwnProperty(r)&&r!==b){
var s=t[r],u=n.hasOwnProperty(r);if(a(u,r),S.hasOwnProperty(r))S[r](e,s);else{var d=_.hasOwnProperty(r),c="function"==typeof s,f=c&&!d&&!u&&t.autobind!==!1;if(f)i.push(r,s),n[r]=s;else if(u){var h=_[r];!d||h!==w.DEFINE_MANY_MERGED&&h!==w.DEFINE_MANY?v(!1):void 0,h===w.DEFINE_MANY_MERGED?n[r]=o(n[r],s):h===w.DEFINE_MANY&&(n[r]=l(n[r],s))}else n[r]=s}}}}function r(e,t){if(t)for(var n in t){var a=t[n];if(t.hasOwnProperty(n)){var i=n in S;i?v(!1):void 0;var r=n in e;r?v(!1):void 0,e[n]=a}}}function s(e,t){
e&&t&&"object"==typeof e&&"object"==typeof t?void 0:v(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?v(!1):void 0,e[n]=t[n]);return e}function o(e,t){return function(){var n=e.apply(this,arguments),a=t.apply(this,arguments);if(null==n)return a;if(null==a)return n;var i={};return s(i,n),s(i,a),i}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function d(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var a=t[n],i=t[n+1];
e[a]=u(e,i)}}var c=n(54),f=n(638),p=n(88),h=(n(278),n(277),n(651)),m=n(271),v=n(33),g=n(272),y=n(125),b=(n(45),y({mixins:null})),w=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),P=[],_={mixins:w.DEFINE_MANY,statics:w.DEFINE_MANY,propTypes:w.DEFINE_MANY,contextTypes:w.DEFINE_MANY,childContextTypes:w.DEFINE_MANY,getDefaultProps:w.DEFINE_MANY_MERGED,getInitialState:w.DEFINE_MANY_MERGED,getChildContext:w.DEFINE_MANY_MERGED,render:w.DEFINE_ONCE,componentWillMount:w.DEFINE_MANY,
componentDidMount:w.DEFINE_MANY,componentWillReceiveProps:w.DEFINE_MANY,shouldComponentUpdate:w.DEFINE_ONCE,componentWillUpdate:w.DEFINE_MANY,componentDidUpdate:w.DEFINE_MANY,componentWillUnmount:w.DEFINE_MANY,updateComponent:w.OVERRIDE_BASE},S={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=c({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=c({},e.contextTypes,t)},getDefaultProps:function(e,t){
e.getDefaultProps?e.getDefaultProps=o(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=c({},e.propTypes,t)},statics:function(e,t){r(e,t)},autobind:function(){}},x={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},C=function(){};c(C.prototype,f.prototype,x);var T={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindPairs.length&&d(this),
this.props=e,this.context=t,this.refs=m,this.updater=n||h,this.state=null;var a=this.getInitialState?this.getInitialState():null;"object"!=typeof a||Array.isArray(a)?v(!1):void 0,this.state=a};t.prototype=new C,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],P.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:v(!1);for(var n in _)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){P.push(e);
}}};e.exports=T},function(e,t,n){"use strict";function a(e,t,n){this.props=e,this.context=t,this.refs=r,this.updater=n||i}var i=n(651),r=(n(83),n(398),n(271)),s=n(33);n(45);a.prototype.isReactComponent={},a.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?s(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate");
};e.exports=a},function(e,t,n){"use strict";var a=n(390),i=n(2063),r={processChildrenUpdates:i.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:a.dangerouslyReplaceNodeWithMarkup,unmountIDFromEnvironment:function(e){}};e.exports=r},function(e,t,n){"use strict";var a=n(59),i=n(2074),r=n(647),s=n(171),o=n(91),l=n(654),u=n(2102),d=n(659),c=n(2106);n(45);i.inject();var f={findDOMNode:u,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:l,unstable_batchedUpdates:o.batchedUpdates,
unstable_renderSubtreeIntoContainer:c};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:a.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=d(e)),e?a.getNodeFromInstance(e):null}},Mount:r,Reconciler:s});e.exports=f},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function a(){
if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=l.getValue(e);null!=t&&i(this,Boolean(e.multiple),t)}}function i(e,t,n){var a,i,r=u.getNodeFromInstance(e).options;if(t){for(a={},i=0;i<n.length;i++)a[""+n[i]]=!0;for(i=0;i<r.length;i++){var s=a.hasOwnProperty(r[i].value);r[i].selected!==s&&(r[i].selected=s)}}else{for(a=""+n,i=0;i<r.length;i++)if(r[i].value===a)return void(r[i].selected=!0);r.length&&(r[0].selected=!0)}}function r(e){
var t=this._currentElement.props,n=l.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),d.asap(a,this),n}var s=n(54),o=n(273),l=n(394),u=n(59),d=n(91),c=(n(45),!1),f={getNativeProps:function(e,t){return s({},o.getNativeProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=l.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:r.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||c||(c=!0);
},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var a=l.getValue(t);null!=a?(e._wrapperState.pendingUpdate=!1,i(e,Boolean(t.multiple),a)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?i(e,Boolean(t.multiple),t.defaultValue):i(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=f},function(e,t,n){
"use strict";function a(){if(c.current){var e=c.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;r("uniqueKey",e,t)}}function r(e,t,n){var i=a();if(!i){var r="string"==typeof n?n:n.displayName||n.name;r&&(i=" Check the top-level render call using <"+r+">.")}var s=h[e]||(h[e]={});if(s[i])return null;s[i]=!0;var o={parentOrOwner:i,url:" See https://fb.me/react-warning-keys for more information.",
childOwner:null};return t&&t._owner&&t._owner!==c.current&&(o.childOwner=" It was passed a child from "+t._owner.getName()+"."),o}function s(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var a=e[n];u.isValidElement(a)&&i(a,t)}else if(u.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var r=f(e);if(r&&r!==e.entries)for(var s,o=r.call(e);!(s=o.next()).done;)u.isValidElement(s.value)&&i(s.value,t)}}function o(e,t,n,i){for(var r in t)if(t.hasOwnProperty(r)){
var s;try{"function"!=typeof t[r]?p(!1):void 0,s=t[r](n,r,e,i)}catch(o){s=o}if(s instanceof Error&&!(s.message in m)){m[s.message]=!0;a()}}}function l(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name;t.propTypes&&o(n,t.propTypes,e.props,d.prop),"function"==typeof t.getDefaultProps}}var u=n(88),d=n(278),c=(n(277),n(127)),f=(n(398),n(403)),p=n(33),h=(n(45),{}),m={},v={createElement:function(e,t,n){var a="string"==typeof e||"function"==typeof e,i=u.createElement.apply(this,arguments);
if(null==i)return i;if(a)for(var r=2;r<arguments.length;r++)s(arguments[r],e);return l(i),i},createFactory:function(e){var t=v.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var a=u.cloneElement.apply(this,arguments),i=2;i<arguments.length;i++)s(arguments[i],a.type);return l(a),a}};e.exports=v},function(e,t){"use strict";var n,a={injectEmptyComponentFactory:function(e){n=e}},i={create:function(e){return n(e)}};i.injection=a,e.exports=i},function(e,t){"use strict";var n={
logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function a(e){return r(document.documentElement,e)}var i=n(2067),r=n(1719),s=n(622),o=n(623),l={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=o();return{focusedElem:e,selectionRange:l.hasSelectionCapabilities(e)?l.getSelection(e):null}},restoreSelection:function(e){var t=o(),n=e.focusedElem,i=e.selectionRange;
t!==n&&a(n)&&(l.hasSelectionCapabilities(n)&&l.setSelection(n,i),s(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=i.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,a=t.end;
if(void 0===a&&(a=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(a,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var r=e.createTextRange();r.collapse(!0),r.moveStart("character",n),r.moveEnd("character",a-n),r.select()}else i.setOffsets(e,t)}};e.exports=l},function(e,t,n){"use strict";function a(e,t){for(var n=Math.min(e.length,t.length),a=0;a<n;a++)if(e.charAt(a)!==t.charAt(a))return a;return e.length===t.length?-1:n}function i(e){
return e?e.nodeType===O?e.documentElement:e.firstChild:null}function r(e){return e.getAttribute&&e.getAttribute(M)||""}function s(e,t,n,a,i){var r;if(b.logTopLevelRenders){var s=e._currentElement.props,o=s.type;r="React mount: "+("string"==typeof o?o:o.displayName||o.name),console.time(r)}var l=P.mountComponent(e,n,null,v(e,t),i);r&&console.timeEnd(r),e._renderedComponent._topLevelWrapper=e,j._mountImageIntoNode(l,t,e,a,n)}function o(e,t,n,a){var i=S.ReactReconcileTransaction.getPooled(!n&&g.useCreateElement);
i.perform(s,null,e,t,i,n,a),S.ReactReconcileTransaction.release(i)}function l(e,t,n){for(P.unmountComponent(e,n),t.nodeType===O&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function u(e){var t=i(e);if(t){var n=m.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function d(e){var t=i(e),n=t&&m.getInstanceFromNode(t);return n&&!n._nativeParent?n:null}function c(e){var t=d(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var f=n(170),p=n(139),h=n(276),m=(n(127),n(59)),v=n(2058),g=n(2062),y=n(88),b=n(645),w=(n(83),
n(2078)),P=n(171),_=n(653),S=n(91),x=n(271),C=n(662),T=n(33),k=n(405),I=n(406),M=(n(45),p.ID_ATTRIBUTE_NAME),A=p.ROOT_ATTRIBUTE_NAME,E=1,O=9,D=11,R={},L=1,N=function(){this.rootID=L++};N.prototype.isReactComponent={},N.prototype.render=function(){return this.props};var j={TopLevelWrapper:N,_instancesByReactRootID:R,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,a){return j.scrollMonitor(n,function(){_.enqueueElementInternal(e,t),a&&_.enqueueCallbackInternal(e,a)}),e},_renderNewRootComponent:function(e,t,n,a){
!t||t.nodeType!==E&&t.nodeType!==O&&t.nodeType!==D?T(!1):void 0,h.ensureScrollValueMonitoring();var i=C(e);S.batchedUpdates(o,i,t,n,a);var r=i._instance.rootID;return R[r]=i,i},renderSubtreeIntoContainer:function(e,t,n,a){return null==e||null==e._reactInternalInstance?T(!1):void 0,j._renderSubtreeIntoContainer(e,t,n,a)},_renderSubtreeIntoContainer:function(e,t,n,a){_.validateCallback(a,"ReactDOM.render"),y.isValidElement(t)?void 0:T(!1);var s=y(N,null,null,null,null,null,t),o=c(n);if(o){var l=o._currentElement,d=l.props;
if(I(d,t)){var f=o._renderedComponent.getPublicInstance(),p=a&&function(){a.call(f)};return j._updateRootComponent(o,s,n,p),f}j.unmountComponentAtNode(n)}var h=i(n),m=h&&!!r(h),v=u(n),g=m&&!o&&!v,b=j._renderNewRootComponent(s,n,g,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):x)._renderedComponent.getPublicInstance();return a&&a.call(b),b},render:function(e,t,n){return j._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==E&&e.nodeType!==O&&e.nodeType!==D?T(!1):void 0;
var t=c(e);if(!t){u(e),1===e.nodeType&&e.hasAttribute(A);return!1}return delete R[t._instance.rootID],S.batchedUpdates(l,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,r,s){if(!t||t.nodeType!==E&&t.nodeType!==O&&t.nodeType!==D?T(!1):void 0,r){var o=i(t);if(w.canReuseMarkup(e,o))return void m.precacheNode(n,o);var l=o.getAttribute(w.CHECKSUM_ATTR_NAME);o.removeAttribute(w.CHECKSUM_ATTR_NAME);var u=o.outerHTML;o.setAttribute(w.CHECKSUM_ATTR_NAME,l);var d=e,c=a(d,u);" (client) "+d.substring(c-20,c+20)+"\n (server) "+u.substring(c-20,c+20);
t.nodeType===O?T(!1):void 0}if(t.nodeType===O?T(!1):void 0,s.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else k(t,e),m.precacheNode(n,t.firstChild)}};e.exports=j},function(e,t,n){"use strict";var a=n(272),i=a({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=i},function(e,t,n){"use strict";function a(e){if("function"==typeof e.type)return e.type;var t=e.type,n=c[t];return null==n&&(c[t]=n=u(t)),n}function i(e){
return d?void 0:l(!1),new d(e)}function r(e){return new f(e)}function s(e){return e instanceof f}var o=n(54),l=n(33),u=null,d=null,c={},f=null,p={injectGenericComponentClass:function(e){d=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){o(c,e)}},h={getComponentClassForElement:a,createInternalComponent:i,createInstanceForText:r,isTextComponent:s,injection:p};e.exports=h},function(e,t,n){"use strict";var a=n(88),i=n(33),r={NATIVE:0,COMPOSITE:1,EMPTY:2,getType:function(e){
return null===e||e===!1?r.EMPTY:a.isValidElement(e)?"function"==typeof e.type?r.COMPOSITE:r.NATIVE:void i(!1)}};e.exports=r},function(e,t,n){"use strict";function a(e,t){}var i=(n(45),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){a(e,"forceUpdate")},enqueueReplaceState:function(e,t){a(e,"replaceState")},enqueueSetState:function(e,t){a(e,"setState")}});e.exports=i},function(e,t,n){"use strict";function a(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t;
}function i(e){function t(t,n,a,i,r,s){if(i=i||S,s=s||a,null==n[a]){var o=w[r];return t?new Error("Required "+o+" `"+s+"` was not specified in "+("`"+i+"`.")):null}return e(n,a,i,r,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function r(e){function t(t,n,a,i,r){var s=t[n],o=v(s);if(o!==e){var l=w[i],u=g(s);return new Error("Invalid "+l+" `"+r+"` of type "+("`"+u+"` supplied to `"+a+"`, expected ")+("`"+e+"`."))}return null}return i(t)}function s(){return i(P.thatReturns(null))}function o(e){
function t(t,n,a,i,r){if("function"!=typeof e)return new Error("Property `"+r+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var o=w[i],l=v(s);return new Error("Invalid "+o+" `"+r+"` of type "+("`"+l+"` supplied to `"+a+"`, expected an array."))}for(var u=0;u<s.length;u++){var d=e(s,u,a,i,r+"["+u+"]");if(d instanceof Error)return d}return null}return i(t)}function l(){function e(e,t,n,a,i){if(!b.isValidElement(e[t])){var r=w[a];return new Error("Invalid "+r+" `"+i+"` supplied to "+("`"+n+"`, expected a single ReactElement."));
}return null}return i(e)}function u(e){function t(t,n,a,i,r){if(!(t[n]instanceof e)){var s=w[i],o=e.name||S,l=y(t[n]);return new Error("Invalid "+s+" `"+r+"` of type "+("`"+l+"` supplied to `"+a+"`, expected ")+("instance of `"+o+"`."))}return null}return i(t)}function d(e){function t(t,n,i,r,s){for(var o=t[n],l=0;l<e.length;l++)if(a(o,e[l]))return null;var u=w[r],d=JSON.stringify(e);return new Error("Invalid "+u+" `"+s+"` of value `"+o+"` "+("supplied to `"+i+"`, expected one of "+d+"."))}return i(Array.isArray(e)?t:function(){
return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,a,i,r){if("function"!=typeof e)return new Error("Property `"+r+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var s=t[n],o=v(s);if("object"!==o){var l=w[i];return new Error("Invalid "+l+" `"+r+"` of type "+("`"+o+"` supplied to `"+a+"`, expected an object."))}for(var u in s)if(s.hasOwnProperty(u)){var d=e(s,u,a,i,r+"."+u);if(d instanceof Error)return d}return null;
}return i(t)}function f(e){function t(t,n,a,i,r){for(var s=0;s<e.length;s++){var o=e[s];if(null==o(t,n,a,i,r))return null}var l=w[i];return new Error("Invalid "+l+" `"+r+"` supplied to "+("`"+a+"`."))}return i(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function p(){function e(e,t,n,a,i){if(!m(e[t])){var r=w[a];return new Error("Invalid "+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return i(e);
}function h(e){function t(t,n,a,i,r){var s=t[n],o=v(s);if("object"!==o){var l=w[i];return new Error("Invalid "+l+" `"+r+"` of type `"+o+"` "+("supplied to `"+a+"`, expected `object`."))}for(var u in e){var d=e[u];if(d){var c=d(s,u,a,i,r+"."+u);if(c)return c}}return null}return i(t)}function m(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(m);if(null===e||b.isValidElement(e))return!0;var t=_(e);if(!t)return!1;
var n,a=t.call(e);if(t!==e.entries){for(;!(n=a.next()).done;)if(!m(n.value))return!1}else for(;!(n=a.next()).done;){var i=n.value;if(i&&!m(i[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function g(e){var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){return e.constructor&&e.constructor.name?e.constructor.name:S}var b=n(88),w=n(277),P=n(82),_=n(403),S="<<anonymous>>",x={
array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),any:s(),arrayOf:o,element:l(),instanceOf:u,node:p(),objectOf:c,oneOf:d,oneOfType:f,shape:h};e.exports=x},function(e,t,n){"use strict";function a(e){s.enqueueUpdate(e)}function i(e,t){var n=r.get(e);return n?n:null}var r=(n(127),n(397)),s=n(91),o=n(33),l=(n(45),{isMounted:function(e){var t=r.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var r=i(e);
return r?(r._pendingCallbacks?r._pendingCallbacks.push(t):r._pendingCallbacks=[t],void a(r)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],a(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,a(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,a(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var r=n._pendingStateQueue||(n._pendingStateQueue=[]);
r.push(t),a(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,a(e)},validateCallback:function(e,t){e&&"function"!=typeof e?o(!1):void 0}});e.exports=l},function(e,t){"use strict";e.exports="15.1.0"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function a(e,t){if(null==t?i(!1):void 0,null==e)return t;var n=Array.isArray(e),a=Array.isArray(t);
return n&&a?(e.push.apply(e,t),e):n?(e.push(t),e):a?[e].concat(t):[e,t]}var i=n(33);e.exports=a},function(e,t,n){"use strict";function a(e,t,n){var a=e,i=void 0===a[n];i&&null!=t&&(a[n]=t)}function i(e){if(null==e)return e;var t={};return r(e,a,t),t}var r=(n(393),n(407));n(45);e.exports=i},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function a(e){for(var t;(t=e._renderedNodeType)===i.COMPOSITE;)e=e._renderedComponent;
return t===i.NATIVE?e._renderedComponent:t===i.EMPTY?null:void 0}var i=n(650);e.exports=a},function(e,t,n){"use strict";function a(){return!r&&i.canUseDOM&&(r="textContent"in document.documentElement?"textContent":"innerText"),r}var i=n(64),r=null;e.exports=a},function(e,t,n){"use strict";function a(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function i(e){if(o[e])return o[e];if(!s[e])return e;var t=s[e];
for(var n in t)if(t.hasOwnProperty(n)&&n in l)return o[e]=t[n];return""}var r=n(64),s={animationend:a("Animation","AnimationEnd"),animationiteration:a("Animation","AnimationIteration"),animationstart:a("Animation","AnimationStart"),transitionend:a("Transition","TransitionEnd")},o={},l={};r.canUseDOM&&(l=document.createElement("div").style,"AnimationEvent"in window||(delete s.animationend.animation,delete s.animationiteration.animation,delete s.animationstart.animation),"TransitionEvent"in window||delete s.transitionend.transition),
e.exports=i},function(e,t,n){"use strict";function a(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e){var t,n=null===e||e===!1;if(n)t=o.create(i);else if("object"==typeof e){var r=e;!r||"function"!=typeof r.type&&"string"!=typeof r.type?u(!1):void 0,t="string"==typeof r.type?l.createInternalComponent(r):a(r.type)?new r.type(r):new d(r)}else"string"==typeof e||"number"==typeof e?t=l.createInstanceForText(e):u(!1);
t._mountIndex=0,t._mountImage=null;return t}var r=n(54),s=n(2055),o=n(644),l=n(649),u=(n(83),n(33)),d=(n(45),function(e){this.construct(e)});r(d.prototype,s.Mixin,{_instantiateReactComponent:i});e.exports=i},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&a[e.type]||"textarea"===t)}var a={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n;
},function(e,t,n){"use strict";function a(e){return i.isValidElement(e)?void 0:r(!1),e}var i=n(88),r=n(33);e.exports=a},function(e,t,n){"use strict";var a=n(64),i=n(281),r=n(405),s=function(e,t){e.textContent=t};a.canUseDOM&&("textContent"in document.documentElement||(s=function(e,t){r(e,i(t))})),e.exports=s},function(e,t){"use strict";function n(){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],n=t.slice(0,-1);
return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){function a(){h===p&&(h=p.slice())}function r(){return f}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return a(),h.push(e),function(){if(t){t=!1,a();var n=h.indexOf(e);h.splice(n,1)}}}function u(e){if(!(0,s.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");
if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,f=c(f,e)}finally{m=!1}for(var t=p=h,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.");c=e,u({type:o.INIT})}if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof 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 c=e,f=t,p=[],h=p,m=!1;return u({type:o.INIT}),{dispatch:u,subscribe:l,getState:r,replaceReducer:d}}t.__esModule=!0,t.ActionTypes=void 0,t.default=i;var r=n(389),s=a(r),o=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t.default=n},,,,,,function(e,t,n){
(function(e){+function(e){"use strict";var t=function(n,a){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,a)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,a=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[a]()),n[a](i[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){var t=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===t.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 a=e(this),i=a.data("bs.button"),r="object"==typeof n&&n;i||a.data("bs.button",i=new t(this,r)),"toggle"==n?i.toggle():n&&i.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(a).remove(),e(i).each(function(t){var a=n(e(this));a.hasClass("open")&&(a.trigger(t=e.Event("hide.bs.dropdown")),t.isDefaultPrevented()||a.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 a=n&&e(n);return a&&a.length?a:t.parent()}var a=".dropdown-backdrop",i="[data-toggle=dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(a){var i=e(this);if(!i.is(".disabled, :disabled")){var r=n(i),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(a=e.Event("show.bs.dropdown")),a.isDefaultPrevented())return;r.toggleClass("open").trigger("shown.bs.dropdown"),i.focus()}return!1}},r.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var a=e(this);if(t.preventDefault(),t.stopPropagation(),!a.is(".disabled, :disabled")){var r=n(a),s=r.hasClass("open");if(!s||s&&27==t.keyCode)return 27==t.which&&r.find(i).focus(),a.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),a=n.data("dropdown");a||n.data("dropdown",a=new r(this)),"string"==typeof t&&a[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",i,r.prototype.toggle).on("keydown.bs.dropdown.data-api",i+", [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,a=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(a),this.isShown||a.isDefaultPrevented()||(this.isShown=!0,
this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var a=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),a&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});a?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i);
}).emulateTransitionEnd(300):n.$element.focus().trigger(i)}))},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 a=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)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;a?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,a){return this.each(function(){var i=e(this),r=i.data("bs.modal"),s=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);
r||i.data("bs.modal",r=new t(this,s)),"string"==typeof n?r[n](a):s.show&&r.show(a)})},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),a=n.attr("href"),i=e(n.attr("data-target")||a&&a.replace(/.*(?=#[^\s]+$)/,"")),r=i.data("modal")?"toggle":e.extend({remote:!/#/.test(a)&&a},i.data(),n.data());t.preventDefault(),i.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,a){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(a);for(var i=this.options.trigger.split(" "),r=i.length;r--;){var s=i[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,a){
n[e]!=a&&(t[e]=a)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show()},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);
return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.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 a="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,r=i.test(a);
r&&(a=a.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(a),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(),d=a,c=document.documentElement.scrollTop||document.body.scrollTop,f="body"==this.options.container?window.innerWidth:u.outerWidth(),p="body"==this.options.container?window.innerHeight:u.outerHeight(),h="body"==this.options.container?0:u.offset().left;
a="bottom"==a&&s.top+s.height+l-c>p?"top":"top"==a&&s.top-c-l<0?"bottom":"right"==a&&s.right+o>f?"left":"left"==a&&s.left-o<h?"right":a,n.removeClass(d).addClass(a)}var m=this.getCalculatedOffset(a,s,o,l);this.applyPlacement(m,a),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,a=this.tip(),i=a[0].offsetWidth,r=a[0].offsetHeight,s=parseInt(a.css("margin-top"),10),o=parseInt(a.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(o)&&(o=0),e.top=e.top+s,e.left=e.left+o,
a.offset(e).addClass("in");var l=a[0].offsetWidth,u=a[0].offsetHeight;if("top"==t&&u!=r&&(n=!0,e.top=e.top+r-u),/bottom|top/.test(t)){var d=0;e.left<0&&(d=e.left*-2,e.left=0,a.offset(e),l=a[0].offsetWidth,u=a[0].offsetHeight),this.replaceArrow(d-i+l,l,"left")}else this.replaceArrow(u-r,u,"top");n&&a.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&&a.detach()}var n=this,a=this.tip(),i=e.Event("hide.bs."+this.type);if(this.$element.trigger(i),!i.isDefaultPrevented())return a.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?a.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,a){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-a,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-a/2,left:t.left-n}:{top:t.top+t.height/2-a/2,
left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.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 a=e(this),i=a.data("bs.tooltip"),r="object"==typeof n&&n;
i||a.data("bs.tooltip",i=new t(this,r)),"string"==typeof n&&i[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,a=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(a).trigger(e.support.transition.end)};return setTimeout(i,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"},a=/^(?:html)$/i,i=function(t,n){n=n||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle);var a=!(!document.defaultView||!document.defaultView.getComputedStyle),i={top:parseFloat(a?n.borderTopWidth:e.css(t,"borderTopWidth"))||0,left:parseFloat(a?n.borderLeftWidth:e.css(t,"borderLeftWidth"))||0,
bottom:parseFloat(a?n.borderBottomWidth:e.css(t,"borderBottomWidth"))||0,right:parseFloat(a?n.borderRightWidth:e.css(t,"borderRightWidth"))||0};return{top:i.top,left:i.left,bottom:i.bottom,right:i.right,vertical:i.top+i.bottom,horizontal:i.left+i.right}},r=function(t){var n=e(window),r=a.test(t[0].nodeName);return{border:r?{top:0,left:0,bottom:0,right:0}:i(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(i){i=e.extend({},n,i),i.direction=t["string"==typeof i.direction&&i.direction.toLowerCase()]||t.both;var s="";i.direction.x===!0&&(s="horizontal"),i.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(i.center){
var d=(u.s.rect.bottom-u.s.rect.top-(u.e.rect.bottom-u.e.rect.top))/2,c=(u.s.rect.right-u.s.rect.left-(u.e.rect.right-u.e.rect.left))/2;i.direction.y&&(u.e.rect.top-=d,u.e.rect.bottom+=d),i.direction.x&&(u.e.rect.left-=c,u.e.rect.right+=c)}var f={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={};
i.direction.y===!0&&(f.top<0?p.scrollTop=u.s.scroll.top+f.top:f.top>0&&f.bottom<0&&(p.scrollTop=u.s.scroll.top+Math.min(f.top,-f.bottom))),i.direction.x===!0&&(f.left<0?p.scrollLeft=u.s.scroll.left+f.left:f.left>0&&f.right<0&&(p.scrollLeft=u.s.scroll.left+Math.min(f.left,-f.right))),e.isEmptyObject(p)?e.isFunction(i.complete)&&i.complete.call(l[0]):(a.test(l[0].nodeName)&&(l=e("html,body")),l.animate(p,i.duration).eq(0).queue(function(t){e.isFunction(i.complete)&&i.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,i,r){var o=t["string"==typeof i[3]&&i[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:a.test(e.nodeName)};if(!u.x&&!u.y&&!u.isRoot)return!1;var d={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&&d.scrollableY()||o.x&&d.scrollableX()}})}(e)}).call(t,n(5))},function(e,t,n){var a,i;a=[n(5),n(2022)],i=function(e,t){"use strict";e.fn.translate=function(e,n){var a=t.csstransforms3d?"translate3d("+e+"px, "+n+"px, 0)":"translate("+e+"px, "+n+"px)";if(1===this.length){var i=this[0].style;"webkitTransform"in i?i.webkitTransform=a:"OTransform"in i?i.OTransform=a:i.transform=a;
}else this.css("transform",a)}}.apply(t,a),!(void 0!==i&&(e.exports=i))},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length?a.apply(void 0,t):i.apply(void 0,t)}function a(e){var t=void 0;return"undefined"!=typeof Reflect?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach(function(t){if("constructor"!==t){
var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,i(e,t,n))}}),e}function i(e,t,n){var a=n.value;if("function"!=typeof a)throw new Error("@autobind decorator can only be applied to methods not: "+typeof a);return{configurable:!0,get:function(){if(this===e.prototype)return a;var n=a.bind(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1611),r=a(i),s=n(31),o=a(s),l=o.default.extend({constructor:function(e){this.ga=this.createGaQueue(),(0,r.default)("create",e,"auto")},createGaQueue:function(){var e=function t(){t.queue.push(arguments)};return e.queue=[],e.run=function(){for(;e.queue.length;)r.default.apply(window,e.queue.shift())},e},enable:function(){this.ga.run&&this.ga.run(),this.ga=r.default},disable:function(){
this.ga=function(){}},set:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={name:"appName",version:"appVersion"},n={};for(var a in e)n[t[a]||a]=e[a];(0,r.default)("set",n)},trackView:function(e){this.ga("send",{hitType:"appview",description:e})},trackEvent:function(e){this.ga("send","event",e)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),r=a(i),s=n(26),o=a(s),l=r.default.extend({
enable:function(){(0,o.default)("[Analytics] Enabled")},disable:function(){(0,o.default)("[Analytics] Disabled")},set:function(e){(0,o.default)("[Analytics] Set options:",e)},trackView:function(e){(0,o.default)('[Analytics] Tracked view "%s"',e)},trackEvent:function(e){(0,o.default)("[Analytics] Tracked event:",e)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),r=a(i),s={init:function(e){(0,r.default)('[ErrorTracker] Initialized with id="%s"',e);
},enable:function(){(0,r.default)("[ErrorTracker] Enabled")},disable:function(){(0,r.default)("[ErrorTracker] Disabled")},set:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,r.default)("[ErrorTracker] Set options:",e)},capture:function(e,t){r.default.error("[ErrorTracker] Captured error:",e,t)}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o={defaults:{},
enabled:!0,url:"https://metrics.plex.tv/collect/event",enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},set:function(e){this.defaults=a({},this.defaults,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){if(this.enabled){var t=s.default.extend(!0,{},this.defaults,e),n=JSON.stringify(t);navigator.sendBeacon?navigator.sendBeacon(this.url,n):s.default.ajax({
type:"POST",url:this.url,contentType:"application/json",data:n})}}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(629),r=a(i);r.default.debug=!1;var s={},o={},l={userTitle:"username",userID:"id"},u=!1,d={init:function(e){r.default.config(e)},enable:function(){u||(u=!0,r.default.install())},disable:function(){u&&(u=!1,r.default.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?r.default.setRelease(n):l[t]?(o[l[t]]=n,r.default.setUserContext(o)):(s[t]=n,r.default.setTagsContext(s))}},capture:function(e,t){r.default.captureException(e,t)}};t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=["enable","disable","set","trackView","trackClick","trackEvent"];t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.get("machineIdentifier");t in k||(k[t]=0),
k[t]++,S.default.info("[Companion] Server %s has had %s poll errors",e.get("debugName"),k[t])}function i(e){var t=e.get("machineIdentifier");k[t]=0}function r(e){return k[e.get("machineIdentifier")]>=3}function s(e){return e&&!e.get("isCloud")&&"iOS"!==e.get("platform")&&e.supports("companionProxy")}function o(e){return e&&e.get("isPrivate")&&e.get("isConnected")&&!e.get("isPossiblyCrossNetworkProtected")}function l(e){return s(e)&&o(e.get("activeConnection"))&&!r(e)}function u(e){return l(e)&&!e.get("shared");
}var d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(5),f=d(c),p=n(3),h=d(p),m=n(11),v=n(31),g=d(v),y=n(504),b=d(y),w=n(46),P=d(w),_=n(26),S=d(_),x=n(48),C=d(x),T=f.default.Deferred().resolve(),k={},I=g.default.extend({mixins:[C.default],commandID:0,proxyServerDecisionDebounce:2e3,initialize:function(){h.default.bindAll(this,"_checkPollRequestStatus","_pickProxyServer","_poll","_sendResponse","onPollSuccess","onPollError")},getDeepLink:function(){return T.promise()},publish:function(e){
var t=this;if(this.proxyServer){if(this.timelineInflight)return void(this._pendingTimeline=e);this.timelineInflight=!0;var n=b.default.writeXml(e),a=h.default.result(this.proxyServer,"url"),i=this.proxyServer.getXHROptions(a+"player/proxy/timeline?commandID="+this.commandID);i.data="timeline="+encodeURIComponent(n),i.method="POST",i.contentType="application/x-www-form-urlencoded",f.default.ajax(i).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=(0,m.resolve)("appModel").get("servers"),this._debouncePickProxyServer=h.default.debounce(this._pickProxyServer,this.proxyServerDecisionDebounce),this.listenTo(this.servers,"change:connected",this._debouncePickProxyServer),this._debouncePickProxyServer())},unsubscribe:function(){this.started&&(this.started=!1,this.stopListening(this.servers,"change:connected",this._debouncePickProxyServer),this.callback=null,this.proxyServer=null,
this._clearPollRequestStatusCheck(),this.pollRequest&&(this.pollRequest.abort(),this.pollRequest=null))},registerPlayer:function(e,t){return this.cloudServer=e,this.clientID=t,this.playerRegistrationDeferred=f.default.Deferred(),this.playerRegistrationDeferred.promise()},_pickProxyServer:function(){this.started&&(this.proxyServer&&l(this.proxyServer)||(this.proxyServer=this.servers.find(u)||this.servers.find(l),this.proxyServer?(this._registerServer(),S.default.info("[Companion] Found proxy",this.proxyServer.get("friendlyName")),
this._poll()):S.default.warn("[Companion] No proxy found")))},_registerServer:function(){if(this.proxyServer&&this.cloudServer&&this.clientID){var e=h.default.result(this.cloudServer,"url"),t=e+"devices/"+this.clientID+"?proxiedBy="+this.proxyServer.id,n=this.cloudServer.getXHROptions(t);n.data="_method=PUT",n.method="POST",n.headers["X-Plex-Provides"]="player",f.default.ajax(n).done(this.playerRegistrationDeferred.resolve).fail(this.playerRegistrationDeferred.reject)}},_poll:function(){if(this.started){
var e=this.proxyServer;if(!e)return void S.default.info("[Companion] No proxy server available to long poll");if(this._isPollRequestPending())return void S.default.info("[Companion] Long poll already open");this._clearPollRequestStatusCheck(),this._checkPollRequestStatusLater();var t=h.default.result(e,"url"),n=e.getXHROptions(t+"player/proxy/poll");S.default.info("[Companion] Opening long poll to %s at %s",e.get("friendlyName"),t),n.data=h.default.extend(n.data||{},{deviceClass:"pc",protocolVersion:"1",
protocolCapabilities:"timeline,playback,navigation,mirror,playqueues"}),this.pollRequest=f.default.ajax(n).done(this.onPollSuccess).fail(this.onPollError)}},_isPollRequestPending:function(){return!!this.pollRequest&&"pending"===this.pollRequest.state()},_checkPollRequestStatus:function(){this._isPollRequestPending()&&(S.default.info("[Companion] Poll connection established successfully"),i(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,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]}},a="resolved"!==T.state();this.callback(n,a).always(function(e){a&&e&&e.deferredAction&&T.resolve(e.deferredAction),t._sendResponse(e.controllerResponse)})}},_sendResponse:function(e){if(this.proxyServer){var t=h.default.result(this.proxyServer,"url"),n=parseInt(e.commandID,10);this.commandID<n&&(this.commandID=n);var a=this.proxyServer.getXHROptions(t+"player/proxy/response?commandID="+e.commandID);
a.data="response="+encodeURIComponent(e.body),a.method="POST",a.contentType="application/x-www-form-urlencoded",f.default.ajax(a)}},onPollSuccess:function(e){var t=this,n=e&&P.default.parseXML(e),a=n&&n.Command;if(e?n?a||S.default.warn("[Companion] Poll succeeded without a Command response",n):S.default.warn("[Companion] Poll succeeded without a parseable response",e):S.default.warn("[Companion] Poll succeeded without a response"),!a)return void this.onPollError();this._clearPollRequestStatusCheck(),
i(this.proxyServer),this._poll();var r=h.default.isArray(a)?a:[a];r.forEach(function(e){try{S.default.info("[Companion] Received %s from %s",e.path,e.deviceName),t._processCommand(e)}catch(n){S.default.warn("[Companion] encountered %s while processing %s",n.message,e)}},this)},onPollError:function(){var e=this;arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(this.started){var t=this.proxyServer,n=t.get("isConnected"),i=t.get("debugName"),s=function(){S.default.warn("[Companion] Poll failed to %s; attempting to pick new proxy",i),
e._pickProxyServer()};return this.proxyServer=null,this._clearPollRequestStatusCheck(),a(t),r(t)?(S.default.warn("[Companion] Poll failed to %s; is no longer an eligible proxy",i),void s()):void(n?(S.default.warn("[Companion] Poll failed to %s; testing all connections",i),t.testAllConnections().done(function(){S.default.info("[Companion] Poll failed to %s; server is available",i)}).fail(function(){S.default.warn("[Companion] Poll failed to %s; unable to reconnect",i)}).always(s)):s())}}}),M=new I;
t.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1612),r=a(i),s=n(31),o=a(s),l=o.default.extend({load:function(e,t){this.dashPlayer&&this.stop(),this.dashPlayer=new r.default.BasicPlayer({url:e,mediaElement:t}),this.dashPlayer.init()},stop:function(){var e=this.dashPlayer;this.dashPlayer=null;try{e.destroy()}catch(t){}},canPause:function(e){return e.autopause_pending||e.autopaused}});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(42),o=a(s),l=n(234),u=a(l),d=n(148),c=a(d),f=n(415),p=a(f),h=p.default.extend({type:o.default.types.MUSIC,modelDefaults:function(){var e=p.default.prototype.modelDefaults.apply(this,arguments);return r.default.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 u.default.getPlayerDecision({type:this.type,profile:this.profile,item:e,offset:t.offset,fallbackServer:t.fallbackServer,transcoder:c.default})},shouldSkipOnError:function(){return!0}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(9),u=a(l),d=n(237),c=a(d),f=n(31),p=a(f),h=n(58),m=a(h),v=n(42),g=a(v),y=n(48),b=a(y),w=n(287),P=a(w),_=p.default.extend({
mixins:[b.default,P.default],type:g.default.types.PHOTO,slideshowDelay:5e3,skipTransition:!1,modelDefaults:function(){var e=P.default.modelDefaults.apply(this,arguments),t=r.default.first(e.metadataItem.get("Media")),n=t&&r.default.first(t.Part);return r.default.extend(e,{media:t,part:n,ready:!0,canPlayPause:!0,canStop:!0,showEnterFullscreen:m.default.hasFullscreen})},initialize:function(e){P.default.initialize.apply(this,arguments),this.loop=!(!e||!e.loop),r.default.bindAll(this,"skipPrevious","skipNext"),
this.listenTo(u.default,{"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}),c.default.registerPlayer(this),
o.default.Deferred().resolve().promise()},reset:function(e){this.currentItem&&this.timeline({state:g.default.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(r.default.result(this,"modelDefaults")),this.timeline().done(r.default.bind(this.updatePlayQueue,this)),e},play:function(){this.model.set({state:g.default.states.PLAYING,slideshowState:g.default.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)),this.startPlaybackTracking()},pause:function(){this.model.set({state:g.default.states.PAUSED,slideshowState:g.default.slideshowStates.PAUSED}),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),this.stopPlaybackTracking()},skipPrevious:function(e){return e||(e={}),this.skipTransition=!!e.manual,
this.previousItem&&(this.slideshowTimeout=clearTimeout(this.slideshowTimeout)),this.model.set("state",g.default.states.BUFFERING),P.default.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",g.default.states.BUFFERING),P.default.skipNext.apply(this,arguments)},stop:function(e,t){P.default.stop.apply(this,arguments),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),
this.stopPlaybackTracking(),this.trackPlaybackEvent(),c.default.unregisterPlayer(this),u.default.trigger("hide:player",t)},onStateChange:function(e,t){this.timeline().done(r.default.bind(this.updatePlayQueue,this))},onLoadedChange:function(e,t){t&&(this.model.get("slideshowState")===g.default.slideshowStates.PLAYING?(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay),this.model.set("state",g.default.states.PLAYING)):this.model.set("state",g.default.states.PAUSED));
},onErrorChange:function(e,t){t&&this.model.get("slideshowState")===g.default.slideshowStates.PLAYING&&(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2))}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(286),r=a(i),s=r.default.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.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(286),r=a(i);try{"string"==typeof localStorage.getItem&&delete localStorage.getItem,"string"==typeof localStorage.setItem&&delete localStorage.setItem,"string"==typeof localStorage.removeItem&&delete localStorage.removeItem,
"string"==typeof localStorage.clear&&delete localStorage.clear}catch(s){}var o=r.default.extend({name:"PersistentWebStorage",getStorage:function(){return window.localStorage}});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(286),r=a(i),s=r.default.extend({name:"VolatileWebStorage",getStorage:function(){return window.sessionStorage}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";function a(e){
return 401===e.status||403===e.status||406===e.status}function i(e){var t=e.server,n=e.connection;return!x.default.get("testPrivateConnectionsWhenPublicAddressDoesNotMatch")&&!t.get("isCloud")&&!t.get("isTransient")&&!t.get("publicAddressMatches")&&n.get("isPrivate")}function r(e,t){var n=t.server,a=n.get("debugName");return _.default.warn("[Connections] Aborting connection test for %s at %s because secure connections are disallowed",a,e),u(e,t)}function s(e,t){var n=t.server,a=n.get("debugName");
return _.default.warn("[Connections] Aborting connection test for %s at %s because location does not match",a,e),u(e,t)}function o(e,t){var n=t.server,a=n.get("debugName");return _.default.warn("[Connections] Aborting connection test for %s at %s due to mixed content prevention",a,e),u(e,t)}function l(e,t){var n=t.server,a=n.get("debugName");return _.default.warn("[Connections] Aborting connection test for %s at %s due to reject direct connection debug setting",a,e),u(e,t)}function u(e,t){var n=t.connection,a=v.default.Deferred();
return h.default.defer(function(){n.set({currentTest:null,testState:T.default.testStates.UNAVAILABLE}),a.reject(n)}),a.promise()}function d(e,t){function n(t){(0,_.default)("[Connections] %s connected at %s",l,e),s.set({currentTest:null,testState:T.default.testStates.CONNECTED,serverAttrs:t}),o.resolve(s)}function i(t){var n={currentTest:null};if(t.aborting)(0,_.default)("[Connections] Aborted pending connection test for %s at %s",l,e),n.testState=T.default.testStates.ABORTED;else{var i=a(t)?T.default.testStates.UNAUTHORIZED:T.default.testStates.UNAVAILABLE;
_.default.warn("[Connections] %s is %s at %s (Status %s)",l,i,e,t.status),n.testState=i}s.set(n),o.reject(s,t)}var r=t.server,s=t.connection,o=v.default.Deferred(),l=r.get("debugName");(0,_.default)("[Connections] Testing connection for %s at %s",l,e);var u=r.getXHROptions(e);u.timeout=r.connectionTestTimeout,x.default.get("emulateCNP")&&!x.default.get("proxied")&&s.get("isPrivate")&&(u.url="cnpfail"+u.url);var d=v.default.ajax(u);return s.set({currentTest:d,testState:T.default.testStates.PENDING
}),d.done(function(t,a,s){if(r.get("isCloud"))return void n();var o=r.parse(t),u=!!o.machineIdentifier;r.get("isTransient")&&o.machineIdentifier===r.get("originalMachineIdentifier")&&(o.machineIdentifier=r.get("machineIdentifier")),!u||r.id&&o.machineIdentifier!==r.id?(_.default.warn("[Connections] %s has an unexpected machine identifier at %s",l,e),i(s)):n(o)}),d.fail(i),o.promise()}function c(e){var t=e.server,n=e.connection,a=t.resolveUrl(e.url||"/",{connection:n});return x.default.get("allowHttpsMediaServerConnections")||!n.get("isHttps")||t.get("isCloudBased")?x.default.get("allowMixedContent")||!w.default.isHostedHttps||n.get("isHttps")?i(e)?s(a,e):t.get("isCloud")||n.get("relay")||!y.default.get("rejectDirectConnections")?d(a,e):l(a,e):o(a,e):r(a,e);
}var f=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var p=n(3),h=f(p),m=n(5),v=f(m),g=n(35),y=f(g),b=n(58),w=f(b),P=n(26),_=f(P),S=n(57),x=f(S),C=n(106),T=f(C);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(705),r=a(i);t.testServerConnection=r.default;var s=n(703),o=a(s);t.abortServerConnectionTest=o.default;var l=n(704),u=a(l);t.populateServerIdentity=u.default;var d=n(709),c=a(d);t.signIn=c.default;
var f=n(710),p=a(f);t.signOut=p.default;var h=n(708),m=a(h);t.resetUser=m.default;var v=n(711),g=a(v);t.switchUser=g.default;var y=n(707),b=a(y);t.authenticateWithServer=b.default;var w=n(706),P=a(w);t.authenticateWithHash=P.default;var _=n(699),S=a(_);t.selectStream=S.default;var x=n(700),C=a(x);t.updateWatchedStatus=C.default;var T=n(697),k=a(T);t.deleteFile=k.default;var I=n(698),M=a(I);t.deleteItem=M.default;var A=n(702),E=a(A);t.resumePlayQueue=E.default;var O=n(701),D=a(O);t.persistPlayQueue=D.default;
},function(e,t,n){"use strict";function a(e){var t,n=e.item,a=e.media,i=n.server;if(a){var r="/library/metadata/"+n.id+"/media/"+a.id,o=s.default.extend(i.getXHROptions(r),{type:"DELETE"});t=l.default.ajax(o),t.done(function(){var t=e.item.get("Media");t.splice(s.default.indexOf(t,a),1),n.trigger("change:Media",n,n.get("Media"))})}else t=n.destroy({wait:!0});return t.fail(function(e){var t=403===e.status?(0,d.default)("Ensure that media deletion is enabled for library content in your server settings."):(0,
d.default)("There was a problem deleting this item.");f.default.trigger("show:alert",{type:"error",message:t})}),t}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=p.default.execute("deleteFile",e);return t.done(function(){var t=e.item,n=i(t.get("parentKey"),e);if(!n)return void r(e);var a=n.get("children").getCollection();if(a.length)return void s(n.get("key"),e);
n.trigger("destroy",n,n.collection);var o=i(t.get("grandparentKey"),e);if(!o)return void r(e);var l=o.get("children").getCollection();l.length?s(o.get("key"),e):r(e)}),t}function i(e,t){if(!e)return!1;var n=new m.default({key:e},{server:t.item.server,onlyIfCached:!0});return!u.default.isEmpty(n)&&n}function r(e){if(!e.skipRedirect){var t=e.item;t.section?c.default.trigger("navigate","section",{serverID:t.server.id,sectionID:t.section.id,replace:!0}):c.default.trigger("navigate:back")}}function s(e,t){
if(!t.skipRedirect){var n=t.item;c.default.trigger("navigate","details",{serverID:n.server.id,key:e,replace:!0})}}var o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),d=n(9),c=o(d),f=n(17),p=o(f),h=n(56),m=o(h);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=u.default.Deferred(),n=e.item,a=n.server,i=e.media||o.default.first(n.get("Media")),r=e.part||i&&o.default.first(i.Part),s=e.streamType,l=e.streamID;if(!i||!r)return t.reject().promise();
var d={};d[s.key]=l,!e.media&&a.supports("allPartsStreamSelection")&&(d.allParts=1);var f=g.join(["/library/parts/",r.id],d),h=o.default.extend(a.getXHROptions(f),{type:"PUT"}),v=u.default.ajax(h);return v.done(function(){(0,m.default)(i,s,l),n.trigger("change:streams"),t.resolve()}),v.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem selecting the stream for this item.")}),t.reject(e)}),t.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(6),c=i(d),f=n(9),p=i(f),h=n(312),m=i(h),v=n(23),g=r(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t,n,a=e.watched;e.item?(t=e.item,n=[t]):e.items&&(n=e.items,t=n[0]);var s=u.default.map(n,function(e){var t=a?"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 s=b.join(["/:/",t],n),o=c.default.ajax(e.server.getXHROptions(s));
return o.done(function(){r(e,a),i(e,a)}),o}),o=c.default.when.apply(c.default,s);return o.fail(function(){var e;e=a?(0,p.default)("There was a problem marking this item as watched."):(0,p.default)("There was a problem marking this item as unwatched."),m.default.trigger("show:alert",{type:"error",message:e})}),o}function i(e,t){var n=g.default.get(e.get("type"));if(n&&"directory"===n.element){e.set({unviewedLeafCount:t?0:e.get("leafCount"),viewedLeafCount:t?e.get("leafCount"):0});var a=e.get("children")||e.get("items");
a&&a.getCollection().each(function(e){i(e,t)})}else e.set({viewOffset:0,viewCount:t?1:0})}function r(e,t){var n,a=g.default.get(e.get("type")),i=e.parent;if(i&&i.get("isMetadataList")&&(i=i.parent),i&&(n=g.default.get(i.get("type"))),n&&n.id===a.parent){var s,o="directory"===a.element;t?s=o?e.get("unviewedLeafCount"):1:(s=o?e.get("viewedLeafCount"):1,s*=-1),i.set({unviewedLeafCount:i.get("unviewedLeafCount")-s,viewedLeafCount:i.get("viewedLeafCount")+s}),r(i,t)}}var s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(3),u=s(l),d=n(5),c=s(d),f=n(6),p=s(f),h=n(9),m=s(h),v=n(40),g=s(v),y=n(23),b=o(y);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=t.playQueue;if(!n.get("playQueueID")||!n.server)return c.default.Deferred().reject().promise();var a=g.default.getTypeByElement(n.get("mediaType"));if("music"!==a)return c.default.Deferred().reject().promise();var i=u.default.pick(t,"position","autoplay","inline");return i=u.default.extend(i,{serverID:n.server.id,playQueueID:n.get("playQueueID"),
mediaType:a}),(0,m.default)(e.fetch()).then(u.default.bind(e.save,e,i))}function i(e){return e.destroy()}function r(e){var t=p.resolve("appModel"),n=t.get("user"),r=new b.default({},{user:n});return e?a(r,e):i(r)}var s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(5),c=s(d),f=n(11),p=o(f),h=n(116),m=s(h),v=n(42),g=s(v),y=n(439),b=s(y);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(5),s=a(r),o=n(11),l=i(o),u=n(42),d=a(u),c=n(17),f=a(c),p=n(439),h=a(p),m=function(e){var t=l.resolve("appModel"),n=new h.default({},{user:e}),a=n.fetch().then(function(){return t.get("servers").populateServer(n.get("serverID"))}).then(function(e){return e.get("playQueueManager").populateQueue(n.get("playQueueID"),d.default.getElementByType(n.get("mediaType")))}).then(function(e){return s.default.when(e,n.get("position"),n.get("autoplay"),n.get("mediaType"),n.get("inline"))}).then(function(e,t,n,a,i){
return"music"!==a?f.default.execute("persistPlayQueue",null):f.default.execute("playMedia",{type:a,item:e,playQueue:e,offset:t,autoplay:n,inline:i})}).fail(function(){f.default.execute("persistPlayQueue",null)});return a};t.default=m,e.exports=t.default},function(e,t,n){"use strict";function a(e){return(0,i.resolve)("serverConnectionTestManager").abortConnectionTest(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){
var t=e.server,n=e.connection;if(t.id)return l.default.Deferred().resolve(t.id).promise();var a=t.resolveUrl("/identity",{connection:n}),i=s.default.extend(t.getXHROptions(a),{timeout:t.connectionTestTimeout});(0,f.default)("[Identity] Requesting the machine identifier of "+t.get("debugName")+" at "+a);var r=l.default.ajax(i).promise();return r=r.then(function(e){var n=l.default.Deferred(),a=d.default.parseXML(e),i=a&&a.machineIdentifier;return i?((0,f.default)("[Identity] Machine identifier found for "+t.get("debugName")+": "+i),
!t.collection||t.collection.get(i)?n.resolve(i):(t.collection.populateServer({isCloud:!0}).done(function(e){e.get("resources").populate().always(function(){n.resolve(i)})}),t.collection.findServer({isCloud:!0}).done(function(e){e.populate().fail(function(){n.resolve(i)})}).fail(function(){n.resolve(i)}))):n.reject(),n.promise()}),r.fail(function(){f.default.warn("[Identity] Machine identifier not found for "+t.get("debugName")+" at "+a)}),r}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(46),d=i(u),c=n(26),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return(0,i.resolve)("serverConnectionTestManager").queueConnectionTest(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.Deferred().resolve().promise(),n=s.default.Deferred().reject().promise(),a=u.default.getActiveUser();if(!a)return n;var i=a.get("pin"),r=a.get("authToken");
if(!i&&!e.pin)return t;var l=(0,o.resolve)("appModel").get("user"),d=l.hashPIN(e.pin,r);return i===d?t:n}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(11),l=n(90),u=i(l);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.homeUser,n=u.resolve("appModel"),a=n.get("user"),i=t.get("uuid")||a.get("uuid"),r={pin:e.pin},s=c.join(["/api/v2/home/users/",i,"/switch"],r),l=t.server.getXHROptions(s,{type:"POST",xhrFields:{withCredentials:!1
}});return o.default.ajax(l).promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(11),u=r(l),d=n(23),c=r(d);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,r.resolve)("appModel"),t=e.get("user"),n=t.server,a=t.clearAccessToken();return a.fail(function(){p.default.warn("Failed to clear the access token and user storage")}).always(function(){e.set("history",[]),c.default.abortAll(),t.signOut(),t.uninitialize(),
t.initialize(),o.default.trigger("clearAll:cache"),n.cache.store(n)}),(0,u.default)(a)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),s=n(9),o=i(s),l=n(116),u=i(l),d=n(117),c=i(d),f=n(26),p=i(f);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,u.resolve)("appModel").get("user"),n=void 0;n=e.username&&e.password?t.server.getXHROptions("/api/v2/users/signin",{type:"POST",
data:{login:e.username,password:e.password}}):t.server.getXHROptions("/api/v2/user?X-Plex-Token="+e.accessToken);var a=l.default.ajax(n).promise();return a=a.then(function(n){return e.remember?c.default.restorePrevious():c.default.register(p.default.getInstance()),t.signIn(n)}),a.fail(function(t){var n=void 0;if(!e.silent){var a=t.responseText&&b.default.parseXML(t.responseText),i=a&&a.error,r=s.default.isArray(i)?s.default.first(i):i;n=r?s.default.isObject(r)?(0,w.getErrorText)(r):r:(0,m.default)("There was a problem signing in to Plex."),
g.default.trigger("show:alert",{type:"error",message:n})}}),a}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(11),d=n(84),c=i(d),f=n(217),p=i(f),h=n(6),m=i(h),v=n(9),g=i(v),y=n(46),b=i(y),w=n(228);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=u.default.execute("resetUser");return e=e.then(function(){return c.default.restoreDefaults(),c.default.save()}),e=e.then(function(){o.default.trigger("reset:servers")});
}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=(i(r),n(9)),o=i(s),l=n(17),u=i(l),d=n(90),c=i(d);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,s.resolve)("appModel").get("user"),n=t.get("signedIn"),a=t.id!==e.homeUser.id,r=e.allowGuestLock,o=a||r,l=n?d.default.execute("authenticateWithServer",e):d.default.execute("authenticateWithHash",e);return n&&o?l=l.then(function(t){
return i(t,e)}):l.done(function(){t.set("lockState",f.default.lockStates.UNLOCKED)}),l}function i(e,t){var n=(0,s.resolve)("appModel").get("user"),a=d.default.execute("resetUser");return a=a.then(function(){return n.activateStoredUser(t.homeUser.id),l.default.trigger("reset:servers"),n.signIn(e,{lockState:f.default.lockStates.UNLOCKED})})}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(11),o=n(9),l=r(o),u=n(17),d=r(u),c=n(128),f=r(c);t.default=a,e.exports=t.default},function(e,t,n){
"use strict";function a(){return s.default.ajaxPrefilter(l.default),d.default.startListening(),s.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(914),l=i(o),u=n(117),d=i(u);e.exports=t.default},function(e,t,n){"use strict";function a(){d.default.init("UA-6111912-18");var e={name:l.default.prop("X-Plex-Product"),version:l.default.prop("X-Plex-Version"),dimension1:l.default.prop("X-Plex-Product"),dimension2:l.default.prop("X-Plex-Client-Identifier"),
dimension3:l.default.prop("X-Plex-Platform"),dimension4:l.default.prop("X-Plex-Platform-Version"),dimension5:l.default.prop("X-Plex-Device"),dimension6:l.default.prop("X-Plex-Version")};return l.default.prop("X-Plex-Model")&&(e.dimension7=l.default.prop("X-Plex-Model")),l.default.prop("X-Plex-Device-Screen-Resolution")&&(e.screenResolution=l.default.prop("X-Plex-Device-Screen-Resolution")),d.default.set(e),d.default.enable(),s.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var r=n(5),s=i(r),o=n(141),l=i(o),u=n(140),d=i(u),c=n(683);i(c);e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=void 0;return e.get("clientID")?t=u.default.set("clientID",e.get("clientID")):(t=u.default.get("clientID"),t=t.then(function(t){e.set("clientID",t)},function(){var t=(0,p.default)();return e.set("clientID",t),u.default.set("clientID",t)})),t}function i(e){var t=u.default.get("skipSignIn");return t.always(function(t){e.set("skipSignIn","1"===t);
}),t}function r(){var e=(0,o.resolve)("appModel"),t=a(e),n=i(e);return(0,c.default)(t,n)}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(11),l=n(84),u=s(l),d=n(320),c=s(d),f=n(322),p=s(f);e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.get("isCloud")}function i(){var e=new f.default({name:"CloudServerEventManager",appModel:(0,l.resolve)("appModel"),isValidServer:a,supportsLongPolling:!0,showTimelineStatus:!1,ServerEventConnection:d.default,
ServerRetryManager:h.default});return e.start(),o.default.Deferred().resolve().promise()}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(5),o=r(s),l=n(11),u=n(899),d=r(u),c=n(418),f=r(c),p=n(416),h=r(p);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,u.resolve)("appModel"),t=e.get("cloudServer"),n=e.get("clientID");t.get("authorized")&&n&&n!==y&&(y=n,p.default.info('[Companion] Registering player with plex.tv, clientID="%s"',n),m.default.registerPlayer(t,n).done(function(){
p.default.info('[Companion] Registered player with plex.tv, clientID="%s"',n)}).fail(function(e){e||(e={}),y=null,p.default.warn('[Companion] Couldn\'t register player with plex.tv, status="%s", response="%s"',e.status,e.responseText&&e.responseText.substr(0,100))}))}function i(){var e=c.default.getInstance(),t=e.get("companion"),n=(0,u.resolve)("appModel"),i=n.get("cloudServer");t?(n.on("change:clientID",a),i.on("change:authorized",a),m.default.subscribe(g.default.onSignal)):(n.off("change:clientID",a),
i.off("change:authorized",a),m.default.unsubscribe())}function r(){var e=c.default.getInstance();return e.on("change:companion",i),i(),c.default.get("companion")?m.default.getDeepLink():l.default.Deferred().resolve().promise()}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(5),l=s(o),u=n(11),d=n(35),c=s(d),f=n(26),p=s(f),h=n(282),m=s(h),v=n(733),g=s(v),y=null;e.exports=t.default},function(e,t,n){"use strict";function a(){d.default.init("https://67349abf654648e18514f1fbcb1603c8@app.getsentry.com/34246");
var e={lifecycle:"started",release:"2530dc70b7edeee80ade0bce6bb3e07a36475f7d",version:l.default.prop("X-Plex-Version")};return l.default.props.forEach(function(t){var n=l.default.prop(t);n&&(e[t]=n)}),d.default.set(e),d.default.enable(),s.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(141),l=i(o),u=n(283),d=i(u),c=n(684);i(c);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,o.resolve)("appModel").get("user"),t=(0,
o.resolve)("metrics"),n=void 0;return n="bundled",t.set({userId:e.id,deviceIdentifier:u.default.prop("X-Plex-Client-Identifier"),context:{device:{product:u.default.prop("X-Plex-Product"),version:u.default.prop("X-Plex-Version"),platform:u.default.prop("X-Plex-Platform"),platformVersion:u.default.prop("X-Plex-Platform-Version"),device:u.default.prop("X-Plex-Device"),deviceName:u.default.prop("X-Plex-Device-Name"),model:u.default.prop("X-Plex-Model"),screenResolution:u.default.prop("X-Plex-Device-Screen-Resolution"),
environment:n}}}),t.enable(),s.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(11),l=n(141),u=i(l);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=f.default.get("connections");return e=e.then(function(e){if(e)try{var t=function(){var t=JSON.parse(e),n=t.users;if(!n)return{v:void 0};var a=[];return n.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&&s.default.each(n,function(e,t){e&&r.entitlements.push({id:t})}),i&&i.forEach(function(e){var t=e.connections,n=e.sources,a=!(!t||!t.length),i=!(!n||!n.length);if(e.machineIdentifier&&a&&i){var o={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:[]};s.default.contains(n,"myPlex")?t.sources.push({id:"myPlex"}):t.sources.push({id:"internal"}),o.connections.push(t)}),r.servers.push(o)}}),a.push(r)}),{v:f.default.set("users",JSON.stringify({users:a}))}}();if("object"==typeof t)return t.v}catch(n){(0,l.default)(!1,"Unable to migrate stored connections: "+n.message)}}),e=e.then(function(){return f.default.remove("connections");
}),(0,d.default)(e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(38),l=i(o),u=n(116),d=i(u),c=n(84),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){(0,g.default)("[Servers] Resetting...");var e=(0,y.resolve)("appModel"),t=e.get("servers");(0,y.resolve)("serverManager").stop(),(0,y.resolve)("primaryServerManager").stop(),(0,y.resolve)("manualServerManager").stop(),(0,y.resolve)("serverConnectionManager").stop(),(0,y.resolve)("serverConnectionTestManager").reset(),
t.uninitialize(),t.reset(),t.initialize(),i()}function i(){(0,g.default)("[Servers] Initializing..."),r(),s(),o(),l(),u(),(0,y.resolve)("serverManager").start(),(0,y.resolve)("primaryServerManager").start(),(0,y.resolve)("manualServerManager").start(),(0,y.resolve)("serverConnectionManager").start(),(0,g.default)("[Servers] Finished initialization")}function r(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=e.get("cloudServer");n.addConnection({scheme:w.default.get("myPlexScheme")||_.default.get("myPlexScheme"),
address:w.default.get("myPlexUrl")||_.default.get("myPlexUrl")}),t.add(n)}function s(e){var t=(0,y.resolve)("appModel"),n=t.get("servers"),a=x.default.getActiveServers();a&&a.each(function(e){if(e.get("connections").length)try{var a=new T.default(e.toJSON(),{parent:t});n.add(a)}catch(i){g.default.warn(i)}})}function o(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=_.default.get("primaryServer");if(n){var a=new T.default({machineIdentifier:n.machineIdentifier,friendlyName:n.name,isShared:n.shared,
superToken:n.superToken,accessToken:n.accessToken,sourceTitle:n.sourceTitle},{parent:e});a.addConnection({scheme:n.scheme,address:n.address,port:n.port}),t.add(a)}}function l(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=new T.default({isBundled:!0},{parent:e});n.addConnection({scheme:window.location.protocol.replace(":",""),address:window.location.hostname,port:window.location.port,isBundled:!0}),t.add(n)}function u(){if(_.default.get("allowLoopbackDiscovery")){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=new T.default({},{
parent:e});n.addConnection({scheme:"http",address:"127.0.0.1",port:"32400"}),t.add(n)}}function d(){return i(),m.default.on("reset:servers",a),p.default.Deferred().resolve().promise()}var c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=n(5),p=c(f),h=n(9),m=c(h),v=n(26),g=c(v),y=n(11),b=n(35),w=c(b),P=n(57),_=c(P),S=n(90),x=c(S),C=n(72),T=c(C);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=s.default.Deferred();return s.default.when(d.default.populate(),f.default.populate()).always(function(){
var t=d.default.get("language");l.default.load(t).always(function(){e.resolve()})}),e.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(216),l=i(o),u=n(35),d=i(u),c=n(90),f=i(c);e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,s.default)()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(719),s=i(r);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=s.default.Deferred(),t=u.default.get("myPlexAccessToken");
return t.done(function(e){var t=(0,o.resolve)("appModel").get("user"),n=c.default.get("users"),a=n.findWhere({authToken:e});a&&t.activateStoredUser(a.id)}),t.always(function(){e.resolve()}),e.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(11),l=n(84),u=i(l),d=n(90),c=i(d);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),r=a(i),s=n(48),o=a(s),l=n(140),u=a(l),d=n(443),c=a(d),f=r.default.extend({
mixins:o.default,start:function(){var e=c.default.populate();e.done(function(){var e=c.default.get("heartbeatTime")-c.default.get("startTime"),t=Math.round(e/1e3),n=c.default.get("playbackCount");u.default.trackEvent({eventCategory:"App",eventAction:"Shutdown",eventValue:t,metric1:n})}),e.always(function(){c.default.startSession(),u.default.trackEvent({eventCategory:"App",eventAction:"Start",eventValue:1,sessionControl:"start"})})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),r=a(i),s=n(31),o=a(s),l=n(9),u=a(l),d=n(48),c=a(d),f=n(38),p=a(f),h=n(35),m=a(h),v=n(90),g=a(v),y=n(57),b=a(y),w=n(128),P=a(w),_=o.default.extend({mixins:c.default,collectionNames:[],initialize:function(e){this.user=e},start:function(){var e=this,t=this.user;this.previousUserID=t.id;var n={change:this.onUserChange},a=["isSignedIn","isLocked","isUnlocked","hasInvalidToken"];a.forEach(function(a){var i=t.get(a),r=a.charAt(0).toUpperCase()+a.slice(1),s=e["on"+r+"Change"];
n["change:"+a]=s,i&&s.call(e,t,i)}),this.listenTo(t,n);var i=b.default.get("proxied")||m.default.get("autoLogin")||t.get("isUnlocked");(0,r.default)("[UserManager] autoLogin",i),i||this._lockIfInHome()},_lockIfInHome:function(){var e=g.default.getActiveUser();e&&e.get("home")&&this.user.set("lockState",P.default.lockStates.LOCKED)},onHasInvalidTokenChange:function(e,t){(0,p.default)(!1,"onHasInvalidTokenChange() must be implemented")},onIsUnlockedChange:function(e,t){(0,p.default)(!1,"onIsUnlockedChange() must be implemented");
},onUserChange:function(e){if(this.user.get("isSignedIn")){var t=g.default.getActiveUser();if(t)t.copyFromUser(e);else{var n=g.default.get("users");n.add(e.toJSON(),{parse:!0})}g.default.debouncedSave()}},onIsSignedInChange:function(e,t){if(!t)return void this.stopListening(e,"change:hasInvalidToken",this.onHasInvalidTokenChange);t&&e.get("isLocked")&&(this.previousUserID=e.id),this.listenTo(e,"change:hasInvalidToken",this.onHasInvalidTokenChange);var n={reset:!0};this.collectionNames.forEach(function(t){
return e.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";u.default.trigger(t)},0))}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),r=a(i),s=n(48),o=a(s),l=r.default.extend({mixins:o.default,start:function(){}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(100).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(31),s=i(r),o=n(9),l=i(o),u=n(48),d=i(u),c=n(72),f=i(c),p=n(806),h=i(p),m="manualServer",v=s.default.extend({mixins:[d.default],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers");
},start:function(){this.listenTo(h.default,"change",this.onManualConnectionChange),this.initManualServer()},stop:function(){this.stopListening()},initManualServer:function(){function e(e){var t=h.default.get("ip"+e),n=h.default.get("port"+e);t&&n&&this.addManualConnection(t,n,e)}e.call(this,1),e.call(this,2)},removeManualConnection:function(e,t,n){var a=this.appModel.get("primaryServer"),i=m+n,r=this.servers.find(function(e){return e.hasSource(i)});if(r){r.removeSource("internal"),r.removeSource(i);
var s=r.get("connections").findWhere({isConnected:!0});s||r!==a||l.default.trigger("navigate","dashboard",{replace:!0})}},addManualConnection:function(e,t,n){var a=m+n,i={scheme:"http",address:e,port:t.toString(),sources:{id:a}},r=new f.default({friendlyName:e});r.addConnection(i),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.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),r=n(31),s=a(r),o=n(48),l=a(o),u=s.default.extend({mixins:l.default,start:function(){var e=(0,i.resolve)("appModel").get("user");this.listenTo(e,"change:id",this.onUserIDChange)},onUserIDChange:function(e,t){(0,i.resolve)("metrics").set({userId:t})}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(5),r=a(i),s=n(31),o=a(s),l=n(48),u=a(l),d=n(26),c=a(d),f=n(57),p=(a(f),n(11)),h=n(452),m=n(838),v=o.default.extend({mixins:[u.default],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()},stop:function(){this.stopListening(),this._primaryServerPromise=null},fetchPrimaryRelations:function(e){},_setPrimaryServer:function(){var e=this;if(this._primaryServerPromise)return this._primaryServerPromise;var t=(0,p.resolve)("appStore");t.dispatch((0,h.resetPrimaryServer)());
var n=this._waitForPrimaryServer();return this._primaryServerPromise=n,n.done(function(a){if(n===e._primaryServerPromise){if(e._primaryServerPromise=null,e.appModel.get("primaryServer"))return;var i="0.9.16.0",r=!a.get("version")&&!a.get("isRejected");i&&(a.get("isOutOfDate")||r)?((0,c.default)("[Primary Server] The server, %s, is waiting for a version",a.get("debugName")),e._setPrimaryServer()):t.dispatch((0,h.changePrimaryServer)(a.id))}}).fail(function(){n===e._primaryServerPromise&&(e._primaryServerPromise=null,
e.appModel.set("isWaitingForPrimaryServer",!1))}),n},_waitForPrimaryServer:function(){var e=this,t=this.appModel.get("user"),n=t.get("lastPrimaryServerID"),a=void 0;return n?((0,c.default)("[Primary Server] Waiting for the last primary server, %s, to connect",n),a=this.servers.populateServer({machineIdentifier:n,isPrimaryEligible:!0,isOutOfDate:!1})):a=r.default.Deferred().reject().promise(),a=a.then(null,function(){return(0,c.default)("[Primary Server] Waiting for any owned server to connect"),e.servers.populateServer({
isFullOwnedServer:!0,isPrimaryEligible:!0,isOutOfDate:!1})}),a=a.then(null,function(){return(0,c.default)("[Primary Server] Waiting for any eligible server to connect"),e.servers.populateServer({isPrimaryEligible:!0,isOutOfDate:!1})}),a=a.then(null,function(){return(0,c.default)("[Primary Server] Waiting for any eligible server"),e.servers.findServer({isPrimaryEligible:!0,isOutOfDate:!1})})},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");if(n&&this.stopListening(n),t){c.default.info("[Primary Server] %s is now the primary server",t.get("debugName"));
var a=e.get("user");if(a.set("lastPrimaryServerID",t.id),t.get("isConnected")?this.fetchPrimaryRelations(t):this.listenTo(t,"change:isConnected",this.onPrimaryServerConnectedChange),t.get("isRelayed")){var i=(0,p.resolve)("appStore");i.dispatch((0,m.confirmRelayConnection)({serverEntityID:t.entityID()}))}}else e.get("isWaitingForPrimaryServer")?(0,c.default)("[Primary Server] Waiting to set the primary server"):c.default.warn("[Primary Server] No primary server found")},onPrimaryServerEligibleChange:function(e,t){
var n=this.appModel.get("user");t||((0,c.default)("[Primary Server] The previous primary server, %s, is unauthorized",e.get("debugName")),n.unset("lastPrimaryServerID"),this._setPrimaryServer())},onPrimaryServerOutOfDateChange:function(e,t){var n=this.appModel.get("user");t&&((0,c.default)("[Primary Server] The previous primary server, %s, is out of date",e.get("debugName")),n.unset("lastPrimaryServerID"),this._setPrimaryServer())},onPrimaryServerConnectedChange:function(e,t){t&&this.fetchPrimaryRelations(e);
},onWaitingForServersChange:function(e,t){if(t){var n=e.get("primaryServer"),a=!n||!this.servers.get(n.id),i=e.get("isWaitingForPrimaryServer");a&&!i&&this._setPrimaryServer()}},onPrimaryServerIsRelayedChange:function(e,t){if(t){var n=(0,p.resolve)("appStore");n.dispatch((0,m.confirmRelayConnection)({serverEntityID:e.entityID()}))}},onServersUpdate:function(){var e=this.appModel.get("user"),t=this.appModel.get("primaryServer");if(t){var n=t&&!this.servers.get(t.id);n&&((0,c.default)("[Primary Server] The previous primary server, %s, was removed",t.get("debugName")),
e.unset("lastPrimaryServerID"),this._setPrimaryServer())}else this._setPrimaryServer()}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(9),d=i(u),c=n(31),f=i(c),p=n(416),h=i(p),m=n(417),v=i(m),g=n(48),y=i(g),b=n(26),w=i(b),P=n(90),_=i(P),S=n(72),x=i(S),C=f.default.extend({mixins:[y.default],browserConnectionChangeDelay:2e3,initialize:function(e){s.default.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 h.default(t),this._primaryServerRetryManager=new v.default(a({},t,{appModel:this.appModel}))},start:function(){this.stop();var e=(0,l.default)(window);e.on("online",this.onBrowserConnectionChange),e.on("offline",this.onBrowserConnectionChange),this.listenTo(d.default,{"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=(0,l.default)(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,n=_.default.getActiveServers();if((0,w.default)("[Connections] Removed connection %s from %s",e.id,t.get("debugName")),t.abortConnectionTest(e),
n){var a=n.get(t.id),i=a&&a.get("connections");i&&i.get(e.id)&&(i.remove(e.id),i.length||n.remove(t.id),_.default.debouncedSave())}},onBrowserConnectionChange:function(e){var t=this;(0,w.default)("[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=_.default.getActiveServers(),n=void 0;if(e.abortAllConnectionTests(),this._stopFailedServerRetries(e),t)if(e.get("isMerged")){var a=e.previous("machineIdentifier");a&&(n=t.get(a),n&&(n.set("machineIdentifier",e.id),_.default.debouncedSave()))}else n=t.get(e.id),n&&(t.remove(e.id),_.default.debouncedSave())},onServersReset:function(e,t){var n=this,a=t.previousModels;
s.default.each(a,function(t){e.contains(t)||(t.abortAllConnectionTests(),n._stopFailedServerRetries(t))})},onServerConnectionError:function(e){if(w.default.warn("[Connections] Possible connection error for %s, retrying connection tests",e.get("debugName")),e.get("isCloud")){var t=this.appModel.get("user");t.signInWithStoredToken()}else e.testAllConnections()},onServerConnectionAdd:function(e){var t=e.server;(0,w.default)("[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,a=t.previousModels;s.default.each(a,function(t){e.contains(t)||n._removeConnection(t)})},onServerConnectionConnectedChange:function(e,t){var n=e.server,a=e.get("isBundled"),i=e.get("isFallback"),r=t&&!a&&!i,o=_.default.getActiveServers();if(n.id&&!n.get("isCloud")&&r&&o){var l=o.get(n.id);if(l)l.copyFromServer(n);else{var u=s.default.omit(n.toJSON(),"connections");l=o.add(u,{merge:!0,
parse:!0})}l.get("connections").add(e.toJSON(),{merge:!0,parse:!0}),_.default.debouncedSave()}},onServerConnectionSourcesChange:function(e,t){var n=e.server,a=_.default.getActiveServers(),i=a&&a.get(n.id);if(i){var r=i.get("connections"),s=r.get(e.id);if(s){var o=s.get("sources");o.set(t.toJSON()),_.default.debouncedSave()}}},onServerAccessTokenChange:function(e,t){e.get("isCloud")||((0,w.default)("[Connections] Access token for %s changed to %s",e.get("debugName"),t),e.get("isUnauthorized")&&e.set("connectionTestResult",x.default.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.default=C,e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){return function(a){return a.server===e&&a.connection.id===t.id&&a.url===n}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(11),d=n(26),c=i(d),f=n(31),p=i(f),h=n(117),m=i(h),v=n(57),g=i(v),y=p.default.extend({
initialize:function(e){this.appModel=e.appModel,this.queued=[],this.executing=[],this.maximumConcurrent=g.default.get("maximumConcurrentConnectionTests"),this.throttledStartProcessing=s.default.throttle(this._startProcessing.bind(this),50,{leading:!1})},queueConnectionTest:function(e){var t=e.server,n=e.connection,a=e.url,i=this._queuedOrExecuting(t,n,a);if(i)return i.deferred.promise();var r=l.default.Deferred();return this.queued.push({server:t,connection:n,url:a,deferred:r}),this._sortQueue(),
this.throttledStartProcessing(),r.promise()},abortConnectionTest:function(e){var t=e.server,n=e.connection,a=e.url;return this._abortCurrentTest(t,n,a),this._removeQueuedOrExecuting(t,n,a),l.default.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,a){var i=n.server,r=a.server,s=n.connection,o=a.connection,l=e._isManualConnection(s),u=e._isManualConnection(o),d=e._isMatchingLocation(i,s),c=e._isMatchingLocation(r,o);
return i.id===t&&r.id!==t?-1:r.id===t&&i.id!==t?1:i.get("isCloud")&&!r.get("isCloud")?-1:r.get("isCloud")&&!i.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:!i.get("isShared")&&r.get("isShared")?-1:!r.get("isShared")&&i.get("isShared")?1:i.get("isFullServer")&&!r.get("isFullServer")?-1:r.get("isFullServer")&&!i.get("isFullServer")?1:!i.get("isCloudSyncServer")&&r.get("isCloudSyncServer")?-1:!r.get("isCloudSyncServer")&&i.get("isCloudSyncServer")?1:l&&!u?-1:u&&!l?1:s.get("isBundled")&&!o.get("isBundled")?-1:o.get("isBundled")&&!s.get("isBundled")?1:d&&!c?-1:c&&!d?1:0;
})},_startProcessing:function(){s.default.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(),n=t.server,a=t.connection,i=t.url;this._abortCurrentTest(n,a,i);var r=(0,u.resolve)("testServerConnection"),s=r({server:n,connection:a,url:i});this.executing.push(t),s.done(function(e,n){t.deferred.resolve(e,n)}),s.fail(function(e,n){t.deferred.reject(e,n);
}),s.always(function(){var n=e.executing.indexOf(t);e.executing.splice(n,1),e._process()})}},_abortCurrentTest:function(e,t,n){var a=t.get("currentTest"),i=e.resolveUrl(n||"/",{connection:t});a&&"pending"===a.state()&&((0,c.default)("[Connections] Aborting pending connection test for %s at %s",e.get("debugName"),i),m.default.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"),a=t.get("isPrivate");return n&&a||!n&&!a},_queuedOrExecuting:function(e,t,n){var i=a(e,t,n);return s.default.find(this.executing,i)||s.default.find(this.queued,i)},_removeQueuedOrExecuting:function(e,t,n){var i=a(e,t,n),r=s.default.findIndex(this.executing,i),o=s.default.findIndex(this.queued,i);r>=0&&this.executing.splice(r,1),o>=0&&this.queued.splice(o,1)}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(100).default,i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r),o=n(31),l=i(o),u=n(9),d=i(u),c=n(26),f=i(c),p=n(48),h=i(p),m=n(72),v=i(m),g=n(442),y=i(g),b=n(90),w=i(b),P=a(y.default.prototype.syncedAttrs),_=l.default.extend({mixins:[h.default],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}),P.forEach(function(t){e.listenTo(e.servers,"change:"+t,e.onStoredServerAttributeChange.bind(e,t))}),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;(0,f.default)("[Servers] Finding resources through %s",e.get("debugName")),this._waitForServers();var n=e.get("resources"),a=n.fetch().done(function(){(0,f.default)("[Servers] Found %s resources through %s",n.length,e.get("debugName")),e.set({hasFailedResources:!1,
isDownForMaintenance:!1})}).fail(function(t,n){f.default.warn("[Servers] Failed to request resources through %s",e.get("debugName")),e.set({hasFailedResources:!0,isDownForMaintenance:503===n.status})}).always(function(){return t._checkFoundAllServers()});return a},_convertResourceToServer:function(e){(0,f.default)("[Servers] %s was found through %s",e.get("name"),e.server.get("debugName"));var t="Plex Media Server"===e.get("product"),n=new v.default({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"),presence:e.get("presence"),home:e.get("home"),synced:e.get("synced"),serverClass:t?void 0:v.default.serverClasses.SECONDARY,createdAt:e.get("createdAt"),lastSeenAt:e.get("lastSeenAt")},{parent:this.appModel});return e.get("connections").each(function(t){var a=[{id:e.server.id}],i=s.default.extend(t.toJSON(),{
sources:a});n.addConnection(i)}),n},_removeResource:function(e){(0,f.default)("[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 a=this.servers.at(n),i=t.get(a.id);if(i)for(var r=a.get("connections"),s=r.length-1;s>=0;){var o=r.at(s),l=o.get("sources");if(l.get(e.id)){var u=i.get("connections");u.get(o.id)||o.get("sources").remove(e.id);
}s--}else a.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)},_setMultiServer:function(){var e=this.servers.where({isConnected:!0,isCloud:!1});this.appModel.set("multiserver",e.length>1)},onServerPromiseStateChange:function(e,t){if(t===v.default.promiseStates.RESOLVED){var n=e.get("resources");n&&this._fetchResources(e)}this._setAuthorized(),this._setMultiServer(),
this._checkFoundAllServers()},onStoredServerAttributeChange:function(e,t,n){var a=w.default.getActiveServers(),i=a&&a.get(t.id);i&&null!=n&&i.get(e)!==n&&(i.set(e,n),w.default.debouncedSave())},onServerRemove:function(e){f.default.warn("[Servers] %s was removed",e.get("debugName")),e.cache.remove(e),d.default.trigger("clearWhere:cache",{server:e})},onServersUpdateReset:function(){this._setAuthorized(),this._setMultiServer(),this._checkFoundAllServers()},onResourceAdd:function(e){if(s.default.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,a=t.previousModels;s.default.each(a,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"))}});t.default=_,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(11),d=i(u),c=n(31),f=a(c),p=n(9),h=a(p),m=n(42),v=a(m),g=n(40),y=a(g),b=n(237),w=a(b),P=n(504),_=a(P),S=n(17),x=a(S),C=n(26),T=a(C),k=n(441),I=a(k),M=n(56),A=a(M),E=n(89),O=a(E),D=n(174),R=a(D),L=function(e,t,n){var a=_.default.writeXml({Response:{_code:t,_status:n}});return{commandID:e,body:a,responseCode:t}},N=f.default.extend({initialize:function(){
s.default.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=d.resolve("appModel");e.has("primaryPlayer")&&e.set("primaryPlayer",null),w.default.start()},stopTimeline:function(){w.default.stop();var e=d.resolve("appModel");e.has("transientServer")&&e.unset("transientServer")},onSignal:function(e){
var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],n=l.default.Deferred();this._signalInputActivity();var a=this.handlers[e.path];if(a){var i=a[0],r=s.default.rest(a,1);r.push(e.query,t);var o=i.apply(this,r)||l.default.Deferred().resolve().promise();o.done(function(t){var a=L(e.commandID,200,"OK");n.resolve({controllerResponse:a,deferredAction:t})}),o.fail(function(){var a,i=L(e.commandID,400,"Bad Request");(t&&"/player/mirror/details"===e.path||"/player/playback/playMedia"===e.path)&&(a={}),
n.resolve({controllerResponse:i,deferredAction:a})})}else T.default.warn("[Companion] controller manager found no handler for",e.path);return n.promise()},_signalInputActivity:function(){var e=d.resolve("appModel"),t=e.get("inputActivity");t&&t.notice()},_buildTransientServer:function(e){var t=d.resolve("appModel"),n=new I.default({accessToken:s.default.first(e.token),machineIdentifier:"transient-"+e.machineIdentifier[0],originalMachineIdentifier:e.machineIdentifier[0]});n.addConnection({scheme:e.protocol[0],
address:s.default.first(e.address),port:s.default.first(e.port),sources:[{id:"companion"}]});var a=n.populate();return a.done(function(e){t.set("transientServer",e)}),a.fail(function(){t.unset("transientServer")}),a},_populatePlayItem:function(e,t){var n=l.default.Deferred(),a=t.containerKey;a=a&&a[0]?decodeURIComponent(a[0]):null;var i=t.key[0]?decodeURIComponent(t.key[0]):null,r=new A.default({key:i},{server:e});return r.populate().done(s.default.bind(function(){var t,i=e.get("playQueueManager"),s=y.default.getChildMediaType(r.get("type")).element,o=R.default.prototype.getIdFromKey(a);
if(null!==o)t=i.populateQueue(o,s);else{var l=new O.default({containerKey:a},{server:e});t=l.populate(),t=t.then(function(){var e=i.createForType(s,{onServer:!1});return e.addContent(l.get("metadataItems"))})}t.done(function(){n.resolve(r)}).fail(function(){n.reject(this)})},this)).fail(function(){n.reject(this)}),n.promise()},_shouldReplaceRoute:function(){return/\/server\/transient-/.test(window.location.hash)},onMirrorDetails:function(e,t){if(!w.default.isPlaybackActive()){var n={server:null,key:decodeURIComponent(e.key[0]).replace("children","")
},a=this,i=x.default.execute("remoteUnlock");return i=i.then(function(){return a._buildTransientServer(e)}),i=i.then(function(e){n.server=e;var t=new A.default({key:n.key},{server:e});return t.fetch()}),i=i.then(function(e){return"season"===e.get("type")&&(n.key=e.get("parentKey")),l.default.Deferred().resolve().promise()}),i=i.then(function(){var e={serverID:n.server.id,key:n.key,replace:a._shouldReplaceRoute()};return t?l.default.Deferred().resolve({route:{name:"details",options:e}}).promise():void h.default.trigger("navigate","details",e);
})}},onPlayMedia:function(e,t){var n=this._shouldReplaceRoute(),a=function(t){return x.default.execute("playMedia",{item:t,siblings:t.get("type")===v.default.types.PHOTO,offset:s.default.first(e.offset),isFromCompanion:!0,replace:n})},i=this,r=x.default.execute("remoteUnlock");return r=r.then(function(){return i._buildTransientServer(e)}),r=r.then(function(t){return i._populatePlayItem(t,e)}),r=r.then(function(e){return t?{route:{name:"noop"},command:function(){return a(e)}}:a(e)})},onPlaybackAction:function(e){
h.default.trigger("companion:"+e)},onSeekTo:function(e){var t=parseInt(e.offset[0],10);h.default.trigger("companion:setPosition",t)},onRefreshPlayQueue:function(e){var t=d.resolve("appModel"),n=t.get("transientServer"),a=l.default.Deferred().reject().promise();if(!n)return a;var i=n.get("playQueueManager"),r=i.get(e.playQueueID[0]);return r?r.fetch():a},onSetParameters:function(e){var t=s.default.first(e.volume),n=s.default.first(e.repeat);null!=t&&h.default.trigger("companion:setVolume",parseInt(t,10)),
null!=n&&h.default.trigger("companion:setRepeat",parseInt(n,10))},onSetStreams:function(e){var t=s.default.first(e.subtitleStreamID);null!=t&&h.default.trigger("companion:setSubtitleStreamID",parseInt(t,10))},onSkipTo:function(e){var t=decodeURIComponent(e.key[0]);h.default.trigger("companion:skipTo",t)},onKey:function(e){h.default.trigger("companion:"+e),h.default.trigger("companion:key",e)},onNavigateHome:function(){var e=x.default.execute("remoteUnlock");return e.done(function(){h.default.trigger("navigate:refresh:dashboard");
}),e},onSetText:function(e){h.default.trigger("companion:setText",e.text[0])}});t.default=new N,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(105),o=a(s),l={bindings:r.default.extend({".artist-title":{modelAttribute:"parentTitle"},".album-title":{modelAttribute:"title"}},r.default.pick(o.default.defaultBindings,[".item-year",".item-genre"]))};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(105),o=a(s),l={bindings:r.default.pick(o.default.defaultBindings,[".item-title",".item-genre"])};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(105),o=a(s),l={bindings:r.default.pick(o.default.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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(105),o=a(s),l=n(115),u=a(l),d={bindings:r.default.extend({".show-title":{modelAttribute:"grandparentTitle"},".episode-title":{modelAttribute:"title"},".episode-index":{modelAttribute:"index",formatter:function(e){return(0,u.default)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,
separator:" \xb7 "})}}},r.default.pick(o.default.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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(105),o=a(s),l={bindings:r.default.pick(o.default.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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(105),o=a(s),l={bindings:r.default.pick(o.default.defaultBindings,[".item-title",".item-year",".item-duration",".item-genre",".item-content-rating",".details-unwatched-count-badge",".content-rating-flag-container",".studio-flag-container"])};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(496),u=a(l),d=n(9),c=a(d),f={},p={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,n=this.getLanguages();
return t=r.default.has(n,e)?r.default.has(this.translations,e)?o.default.Deferred().resolve().promise():o.default.ajax({dataType:"json",url:this.basePath+n[e]}):o.default.Deferred().reject().promise(),this.loadingLanguage=e,this.loadingPromise=t,t.done(r.default.bind(this.onLoadSuccess,this,t)),t.fail(r.default.bind(this.onLoadError,this,t)),t},t:function(e){if(!e)return"";var t,n,a=1,i=arguments.length;r.default.isObject(arguments[i-1])&&(n=arguments[i-1],i-=1);var s=this.getTranslation(e)||e;for(n&&n.escape&&(s=r.default.escape(s));a<i;)t=f[a],
t||(t=new RegExp((0,u.default)("{"+a+"}"),"g"),f[a]=t),s=s.replace(t,arguments[a]),a++;return s},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),c.default.trigger("change:language",n))},onLoadError:function(e){e===this.loadingPromise&&(this.loadingPromise=null,this.loadingLanguage=null)}};t.default=p,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var n={exclusiveBoolAttr:function(e){var t=this;this.listenTo(this,"change:"+e,function(n,a){a&&t.each(function(t){t.set(e,t===n&&a)})})}};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(2027),u=a(l),d=n(38),c=a(d),f=0,p=100,h={createASSRenderer:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];r.default.bindAll(this,"renderSubtitles","resizeSubtitles","getPosition","onSubtitleFailure"),
(0,c.default)(e.element,"No element defined for ASS renderer"),this.delay=e.delay||f,this.rendererOptions=e.rendererOptions||{},this.subtitleSize=e.subtitleSize||p,this.el=e.element,this.$el=(0,o.default)(this.el),this.clock=new u.default.renderers.AutoClock(this.getPosition,500),this.debouncedResize=r.default.debounce(this.resizeSubtitles,200),this.listenTo(this.model,{"change:playing":this.onPlayingChange,"change:paused":this.onPausedChange,"change:buffering":this.onPausedChange,"change:stopped":this.onStoppedChange,
"change:error":this.onStoppedChange,"change:showFullScreen":this.onShowFullScreenChange}),this.loadSubtitles().then(this.renderSubtitles,this.onSubtitleFailure)},loadSubtitles:function(){var e=this;this.xhr=new XMLHttpRequest;var t=new u.default.parser.XhrStream(this.xhr),n=new u.default.parser.StreamParser(t);return this.xhr.open("GET",this.model.get("subtitlesUrl"),!0),this.xhr.send(),this.xhr.onreadystatechange=function(){4===e.xhr.readyState&&200!==e.xhr.status&&e.onSubtitleFailure()},n.minimalASS;
},renderSubtitles:function(e){var t=r.default.defaults(this.rendererOptions,{enableSvg:!0,preciseOutlines:!1});this.renderer=new u.default.renderers.WebRenderer(e,this.clock,this.el,t),this.setSubtitleSize(),this.resizeSubtitles(),(0,o.default)(window).on("resize",this.debouncedResize)},setSubtitleSize:function(){var e=this.renderer._ass._properties,t=this.subtitleSize/100;e._resolutionX/=t,e._resolutionY/=t},resizeSubtitles:function(){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;return n},closeASSRenderer:function(){(0,o.default)(window).off("resize",this.debouncedResize),this.clock.disable(),this.xhr&&(this.xhr.onreadystatechange=null)},onPlayingChange:function(e,t){t&&this.clock.play()},onPausedChange:function(e,t){t&&this.clock.pause()},onStoppedChange:function(e,t){t&&this.clock.disable()},onShowFullScreenChange:function(e,t){this.resizeSubtitles()},onSubtitleFailure:function(){this.model.set("softSubtitlesFailed",!0);
}};t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(41),o=a(s),l=n(115),u=a(l),d={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 o.default.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=(0,u.default)({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",100*(this.secondsLeft/this.totalSeconds)),this.progressModel.set("text",Math.ceil(this.secondsLeft)),
this.countdownAnimator=window.requestAnimationFrame(r.default.bind(this.updateCountdown,this))):this.trigger("next")},onClose:function(){window.cancelAnimationFrame(this.countdownAnimator)}};t.default=d,e.exports=t.default},,function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(173),r=a(i),s=n(751),o=r.default.extend({defaults:s.defaultValues});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(9),r=a(i),s=n(38),o=a(s),l=n(18),u=a(l),d=n(19),c=a(d),f=n(798),p=a(f),h=n(72),m=a(h),v=n(789),g=a(v),y=n(441),b=a(y),w=n(128),P=a(w),_=c.default.extend({name:"AppModel",isStateTreeRoot:!0,sessionAttrs:{clientID:u.default.string,authorized:u.default.boolean.isRequired,multiserver:u.default.boolean.isRequired,skipSignIn:u.default.boolean.isRequired,isWaitingForServers:u.default.boolean.isRequired,isWaitingForPrimaryServer:u.default.boolean.isRequired,history:u.default.array.isRequired,
forwardHistory:u.default.array.isRequired},sessionRelations:{servers:{relationClass:p.default},cloudServer:{relationClass:m.default,deferred:!0},primaryServer:{relationClass:m.default,deferred:!0},transientServer:{relationClass:b.default,deferred:!0},user:{relationClass:P.default,deferred:!0}},defaults:function(){var e=new g.default({machineIdentifier:"myPlex"},{parent:this});return{authorized:!1,multiserver:!1,skipSignIn:!1,isWaitingForServers:!1,isWaitingForPrimaryServer:!1,history:[],forwardHistory:[],
cloudServer:e,user:new P.default({},{server:e,parent:this})}},constructor:function(){this._pendingEntities=[],this.listenTo(r.default,"change:entity",this.onEntityChange),c.default.prototype.constructor.apply(this,arguments)},initialize:function(){this._pendingEntities.forEach(this._addEntity.bind(this))},_addEntity:function(e){var t=e.type,n=e.id,a=e.model,i=this.get("entities");(0,o.default)(i,"Use `createEntitiesModelClass` to create an `entities` session relation in a platform's app model"),i.get(t).add({
id:n,model:a},{merge:!0})},onEntityChange:function(e){this.has("entities")?this._addEntity(e):this._pendingEntities.push(e)}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(748),o=a(s),l=r.default.extend({name:"EntityCollection",model:o.default,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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),s=i(r),o=n(19),l=i(o),u=l.default.extend({name:"EntityModel",sessionAttrs:{id:s.default.string.isRequired},sessionRelations:{model:{relationClass:l.default,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.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(41),o=a(s),l=n(31),u=a(l),d=n(48),c=a(d),f=u.default.extend({mixins:[c.default],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 o.default.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={};r.default.each(r.default.functions(o.default.Collection.prototype),function(n){r.default.contains(this.blacklistedMethods,n)||(t[n]=function(){return e[n].apply(e,arguments)})},this),r.default.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=r.default.toArray(arguments),a="change"===t||"change:"===t.slice(0,7);"reset"===t&&(this.models=e.models),r.default.contains(this.whitelistedEvents,t)?(r.default.contains(["add","remove","destroy"],t)?n[2]=this:r.default.contains(["reset","sort"],t)&&(n[1]=this),this.trigger.apply(this,n)):a&&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),r.default.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 r.default.keys(this._filters)},hasFilter:function(e){return r.default.contains(this.getFilters(),e)},refilter:function(e){return r.default.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(r.default.isFunction(e))return e;throw new Error("Unsupported filter type")},_execFilters:function(e){
e||(e={});var t=[];this.superset&&(t=this.superset.filter(r.default.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(r.default.has(this._filters,n)&&(r.default.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)r.default.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,a=t-1;a>=0;a-=1)if(this.contains(this.superset.at(a))){n=this.indexOf(this.superset.at(a))+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.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(67),r=a(i),s=r.default.extend({pageSize:10,pages:function(){return Math.max(Math.ceil(this.length/this.pageSize),1)},page:function(e,t){t||(t={});var n,a=0;
return n=t.reverse?this.length-e*this.pageSize:e*this.pageSize-this.pageSize,n<0&&(a=n,n=0),this.models.slice(n,n+this.pageSize+a)}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(866),u=a(l),d=n(865),c=a(d),f=n(463),p=a(f),h=window.PLEXWEB_INLINE&&window.PLEXWEB_INLINE.acceptLanguage,m=window.navigator,v=void 0;h?v=(0,u.default)(h):m.languages?v=m.languages:m.language?v=[m.language]:m.userLanguage&&(v=[m.userLanguage]);
var g=(0,c.default)(v)||"en",y={language:{type:o.default.string,defaultValue:g},autoLogin:{type:o.default.boolean,defaultValue:!1},extrasPrefixCount:{type:o.default.integer,defaultValue:0},debugLevel:{type:o.default.integer,defaultValue:p.default.DISABLED}},b=r.default.mapObject(y,function(e){return e.type});t.defaultTypes=b;var w=r.default.mapObject(y,function(e){return e.defaultValue});t.defaultValues=w,t.default=y},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(9),r=a(i),s=n(25),o=a(s),l=n(424),u=a(l),d=o.default.extend({name:"ChannelCollection",context:["server","channel"],model:u.default,url:function(){return this.containerKey},initialize:function(){this.listenTo(r.default,"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.default=d,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(41),u=a(l),d=n(9),c=a(d),f=n(35),p=a(f),h=n(755),m=a(h),v=n(754),g=a(v),y=/(auth_token=|accessToken=|X-Plex-Token=)(\"?\w+\"?)/g,b=/(email=)(\"?[^&]+\"?)/g,w=/(password=)([^&]+)/,P=/(address=|host=|uri=)(\"?[^&]+\"?)/g,_=function(e){return e=e.replace(y,"$1TOKEN"),e.replace(w,"$1PASSWORD")},S=function(e){return e&&e.hasOwnProperty("X-Plex-Token")&&(e["X-Plex-Token"]="TOKEN"),
e&&e.hasOwnProperty("Authorization")&&(e.Authorization="BASIC AUTHORIZATION"),e},x=function(e){if(e)return e=e.replace(y,'$1"TOKEN"'),e=e.replace(b,'$1"EMAIL"'),e=e.replace(P,'$1"IP ADRRESS"')},C=u.default.Collection.extend({model:g.default,initialize:function(e,t){r.default.bindAll(this,"onAjaxComplete"),this.parent=t.parent,m.default.parent=t.parent,this.listenTo(p.default,"change:instance",this.onSettingsAdapterInstanceChange),p.default.hasInstance()&&this.onSettingsAdapterInstanceChange(),this.reconfigure();
},reconfigure:function(){this.settings&&this.settings.get("debugLevel")?this.start():this.stop()},start:function(){this.enabled||(this.enabled=!0,this.reset(),this.listenTo(c.default,"log:message",this.onLogMessage),u.default.history.on("route",this.onRoute,this),(0,o.default)(document).on("ajaxComplete",this.onAjaxComplete))},stop:function(){this.enabled&&(this.enabled=!1,this.reset(),this.stopListening(c.default),u.default.history.off("route",this.onRoute,this),(0,o.default)(document).off("ajaxComplete",this.onAjaxComplete));
},destroy:function(){this.stop(),this.stopListening()},add:function(){this.length>200&&this.shift(),u.default.Collection.prototype.add.apply(this,arguments)},toJSON:function(){var e=u.default.Collection.prototype.toJSON.apply(this,arguments);return e.unshift(r.default.extend({type:"info"},m.default.toJSON())),e},toJSONString:function(){return JSON.stringify(this.toJSON(),null,2)},onSettingsAdapterInstanceChange:function(){this.settings&&(this.stopListening(this.settings),this.settings=null),p.default.hasInstance()&&(this.settings=p.default.getInstance(),
this.listenTo(this.settings,"change:debugLevel",this.reconfigure)),this.reconfigure()},onLogMessage:function(e){this.add(e)},onRoute:function(e,t,n){var a={type:"navigation",route:t,args:n,fragment:window.location.hash};this.add(a)},onAjaxComplete:function(e,t,n){var a={type:"ajax",url:_(n.url),status:t.status};r.default.isEmpty(n.headers)||(a.headers=S(n.headers)),r.default.isEmpty(n.data)||(a.params=n.data),200===t.status?2===this.settings.get("debugLevel")?a.response=x(t.responseText):a.responseLength=t.responseText?t.responseText.length:0:(a.statusText=t.statusText,
a.response=x(t.responseText)),this.add(a)}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(41),r=a(i),s=r.default.Model.extend({initialize:function(e,t){this.set("time",new Date)}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(41),o=a(s),l=n(62),u=a(l),d=o.default.Model.extend({initialize:function(e,t){
this.set("host",window.location.host),this.set("userAgent",window.navigator.userAgent),this.set("browser",u.default)},toJSON:function(){var e=this.parent.get("primaryServer"),t=this.parent.get("user"),n=t.get("features");return this.set("version","2.7.10"),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",r.default.keys(n).join(", ")),o.default.Model.prototype.toJSON.apply(this,arguments)}});t.default=new d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(427),o=a(s),l=o.default.extend({initialize:function(e){this.playQueue=e.playQueue,this.addFilter(r.default.bind(this.filterAfterUpNext,this)),this.listenForUpNextChanges();
},filterAfterUpNext:function(e){var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange();return t>n.end}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(23),d=i(u),c=n(130),f=a(c),p=n(131),h=a(p),m=n(53),v=a(m),g=n(175),y=a(g),b=n(39),w=a(b),P=v.default.extend({idAttribute:"ratingKey",whitelistedAttrs:["guid","addedAt","composite","duration","key","leafCount","playlistType","ratingKey","smart","summary","title","type","allowSync"],
defaults:function(){return{children:new y.default([],{server:this.server,parent:this,url:function(){var e,t="/playlists/"+this.parent.id+"/items";return"audio"===this.parent.get("playlistType")&&(e={includeRelated:1}),d.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 a=h.default.addVersionHeader(2,n);return v.default.prototype.sync.call(this,e,t,a)},parse:function(e){var t=this.convert(e);return t.Playlist&&(t=t.Playlist),w.default.parseInteger(t,["duration","leafCount","addedAt"]),w.default.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}:{},a=d.join([s.default.result(this,"url"),"/items/",e,"/move"],n),i=s.default.extend(this.server.getXHROptions(a),{
type:"PUT"}),r=l.default.ajax(i),o=this.get("children"),u=this.findItem(e);o.remove(u);var c=this.findItem(t),f=c?o.indexOf(c)+1:0;return o.add(u,{at:f}),r},removeItem:function(e){e=e.toString();var t=d.join([s.default.result(this,"url"),"/items/",e]),n=s.default.extend(this.server.getXHROptions(t),{type:"DELETE"}),a=l.default.ajax(n);a.then(s.default.bind(function(e){this.set(this.parse(e))},this));var i=this.get("children"),r=this.findItem(e);return i.remove(r),a},addContent:function(e,t){var n=this.isNew()?"POST":"PUT",a=[s.default.result(this,"url")],i={};
this.isNew()?(i.type=this.get("playlistType"),i.title=this.get("title"),i.smart=this.get("smart")?1:0):a.push("/items"),e.get("playQueueID")?i.playQueueID=e.get("playQueueID"):i.uri=f.default.uri(e,t);var r=d.join(a,i),o=s.default.extend(e.server.getXHROptions(r),{type:n}),u=l.default.ajax(o);return u.then(s.default.bind(function(e){this.set(this.parse(e))},this)),u.promise()},isLibraryItem:function(){return!0},isPlexMusicItem:function(){return!1}});t.default=P,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),r=a(i),s=n(431),o=a(s),l=n(435),u=a(l),d=r.default.extend({name:"PlaylistsSectionModel",defaults:function(){return{pseudo:!0,currentType:0,sorts:new o.default([],{section:this,server:this.server}),items:new u.default({},{section:this,server:this.server})}},url:function(){return"/playlists"}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(25),d=a(u),c=n(220),f=a(c),p=d.default.extend({name:"FilterCollection",context:["server","section","includeAdvanced"],model:f.default,comparator:"filterType",includeAdvanced:!0,url:function(){var e=s.default.result(this.section,"url"),t=this.section.get("currentType"),n={includeAdvanced:this.includeAdvanced?1:0};return t&&(n.type=t.id),l.join([e,"/filters"],n)},findUnwatchedFilter:function(){return this.get("unwatched")||this.get("unwatchedLeaves")}
});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"FilterOptionModel",context:["server","section","type","standalone"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:r.default.string,type:r.default.string,title:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(429),u=a(l),d=o.default.extend({name:"FirstCharacterCollection",context:["server","section"],model:u.default,url:function c(){var e=r.default.result(this.section,"url")+"/firstCharacter",t=this.getUrlParams(),c=t?e+"?"+t:e;return c},getUrlParams:function(){var e={},t=[],n=this.section.get("currentType");n&&(e.type=n.id);var a=this.section.get("currentFilters");return r.default.each(a,function(t){t.values.length&&(e[t.key]=t.values.join(","))}),r.default.each(e,function(n,a){
"unviewedLeafCount"===a?t.push(a+">="+e[a]):t.push(a+"="+e[a])}),t.join("&")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(763),u=a(l),d=o.default.extend({name:"LinearFilterCollection",context:["server","section"],model:u.default,url:function(){return r.default.result(this.section,"url")},filterBySecondary:function(){var e=this.filter(function(e){return e.get("secondary")});return this.clone(e);
}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(428),u=a(l),d=o.default.extend({name:"LinearFilterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{secondary:r.default.boolean,key:r.default.string,title:r.default.string},syncedRelations:{options:{relationClass:u.default}},defaults:{secondary:!1}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(765),o=a(s),l=r.default.extend({name:"LocationCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"LocationModel",context:["server","section"],rootPropertyName:"Location",syncedAttrs:{id:r.default.integer,
path:{type:r.default.string,save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(430),o=a(s),l=r.default.extend({name:"MediaTypeCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(290),u=a(l),d=o.default.extend({name:"SectionSubsetCollection",
context:["server","section"],model:u.default,url:function(){return r.default.result(this.section,"url")},filterPrimaries:function(){var e=this.filter(function(e){return e.get("primary")});return this.clone(e)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(116),u=a(l),d=n(503),c=a(d),f=n(40),p=a(f),h=n(290),m=a(h),v=n(53),g=a(v),y=g.default.extend({initialize:function(e,t){this.storage=t.storage,
this.section=t.section,this.type=t.type,this.filters=t.filters,this.sortKey=t.sortKey,this.sortDirection=t.sortDirection,this.subset=t.subset,this.debouncedStorageSave=r.default.debounce(r.default.bind(this.storage.save,this.storage),300)},_fetch:function(e){e=e||{};var t=(0,u.default)(this.storage.fetch());return t=t.done(r.default.bind(function(){this.type&&this.storage.set("typeID",this.type),this.sortKey&&this.sortDirection&&this.storage.set({sortKey:this.sortKey,sortDirection:this.sortDirection
}),this.subset&&this.storage.set("subset",this.subset),this.filters&&this.filters.length&&this.storage.set("filters",this.filters)},this)),t=t.then(r.default.bind(function(){return this.fetchSort().then(r.default.bind(function(e){e&&e.set("direction",this.storage.get("sortDirection")||e.get("defaultDirection"))},this))},this)),t=t.done(r.default.bind(this.storage.save,this.storage)),t.then(r.default.constant(this))},fetchSort:function(){if(!this.section.server.get("isFullServer"))return o.default.Deferred().reject().promise();
var e=this.section.get("sorts");e.typeID=this.storage.get("typeID");var t=e.fetch();return e.typeID=null,t=t.then(r.default.bind(function(){var t,n=this.storage.get("sortKey");return n&&(t=e.findWhere({key:n})),this.sort=t||e.findWhere({isDefault:!0}),this.sort},this))},getType:function(){var e=this.storage.get("typeID")||p.default.get(this.section.get("type")).id,t=this.section.get("types");return t.get(e)},getSubsetModel:function(){var e,t=this.storage.get("subset");t&&(e=c.default.get(t)),e||(this.storage.set("subset","all"),
e=c.default.get("all"));var n=new m.default(e,{server:this.section.server,section:this.section});return n},getSort:function(){return this.sort&&this.sort.set("selected",!0),this.sort},getFilters:function(){return this.storage.get("filters")||[]},refreshAttributes:function(){var e=this.section.get("currentType");e&&this.storage.set("typeID",e.get("id"));var t=this.section.get("currentSubset");t&&this.storage.set("subset",t.get("key"));var n=this.section.get("currentSort");n&&(this.storage.set("sortKey",n.get("key")),
this.storage.set("sortDirection",n.get("direction")||n.get("defaultDirection")));var a=this.section.get("currentFilters");this.storage.set("filters",a)},getSectionAttrs:function(){return{currentType:this.getType(),currentSubset:this.getSubsetModel(),currentSort:this.getSort(),currentFilters:this.getFilters()}},addListeners:function(){this.listenTo(this.section,{"change:currentType":this.onValueChange,"change:currentSort":this.onValueChange,"change:currentSubset":this.onValueChange,"change:currentFilters":this.onValueChange
}),this.listenTo(this.section.get("sorts"),"change:direction",this.onValueChange)},removeListeners:function(){this.stopListening(this.section),this.stopListening(this.section.get("sorts"))},onValueChange:function(){this.refreshAttributes(),this.debouncedStorageSave()}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(502),r=a(i),s=n(173),o=a(s),l=n(421),u=a(l),d=7776e6,c=o.default.extend({storageKey:"sectionViewState",
serialize:function(e){return o.default.prototype.serialize.call(this,r.default.augmentDictionary(e,{ttl:d}))}}),f=u.default.extend({initialize:function(e,t){u.default.prototype.initialize.apply(this,arguments),this.section=t.section,this.storage=new c},storageKey:function(){return this.section.getScopedKey("attrs")},toJSON:function(){var e=u.default.prototype.toJSON.apply(this,arguments);return r.default.augmentObj(e,d,!0)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(771),o=a(s),l=r.default.extend({name:"ChapterCollection",context:["server","section"],model:o.default,modelId:function(e){return e.id+"_"+e.index}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"ChapterModel",context:["server","section"],syncedAttrs:{id:r.default.integer,tag:r.default.string,
index:r.default.integer,startTimeOffset:r.default.integer,endTimeOffset:r.default.integer,thumb:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(773),o=a(s),l=r.default.extend({name:"ConcertCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"ConcertModel",context:["server","section"],syncedAttrs:{id:r.default.integer,at:r.default.integer,tag:r.default.string,venue:r.default.string,city:r.default.string,country:r.default.string,url:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"OverlayModel",context:["server","section"],
syncedAttrs:{key:r.default.string,marginTop:r.default.integer,marginRight:r.default.integer,marginBottom:r.default.integer,marginLeft:r.default.integer,width:r.default.integer,height:r.default.integer,alignHorizontal:r.default.string,alignVertical:r.default.string,relative:r.default.string,imageScaling:r.default.string,marginScaling:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(291),o=a(s),l=r.default.extend({
name:"PlaylistCollection",context:["server","containerKey"],model:o.default,url:function(){return this.containerKey}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(778),o=a(s),l=r.default.extend({name:"PlaylistItemCollection",context:["server","playlist"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(46),r=a(i),s=n(143),o=a(s),l=n(18),u=a(l),d=n(60),c=a(d),f=n(19),p=a(f),h=n(776),m=a(h),v=p.default.extend({mixins:[o.default],name:"PlaylistItemListModel",context:["server","playlist"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey"))},sessionAttrs:{containerKey:u.default.string,currentPageStart:u.default.integer,currentPageSize:u.default.integer,populatedRange:u.default.object},syncedAttrs:{totalSize:u.default.integer
},syncedRelations:{metadataItems:{relationClass:m.default,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===c.default.xml?r.default.replaceMetadataXMLElementNames(e):e}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(56),u=a(l),d=o.default.extend({name:"PlaylistItemModel",context:["server","playlist"],idAttribute:"playlistItemID",syncedAttrs:{playlistItemID:r.default.integer,key:r.default.string,type:r.default.string},syncedRelations:{metadataItem:{relationClass:u.default,deferred:!0}},augmentResponse:function(e){return{playlistItemID:e.playlistItemID,key:e.key,type:e.type,metadataItem:e}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(40),d=a(u),c=n(89),f=a(c),p={unviewedLeafCount:">="},h=f.default.extend({name:"SectionMetadataListModel",context:["server","section","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],url:function m(){var e=[],t=void 0,n=void 0,a=this.section.get("currentFolderKey");if(a)e.push(a);else if(e.push(s.default.result(this.section,"url")),t=this.section.get("currentSubset").id,this.section.get("allowAdvancedFilters"))"recentlyAdded"!==t&&"newest"!==t||(t="all"),
e.push(t),n=this.getParams();else{var i=this.section.get("currentFilters");i.length?e=[i[0].values[0]]:e.push(t)}var m=l.join(e,n);return m=this.replaceSpecialFilterOperators(m),this.set("containerKey",m),this.server.get("isFullServer")?this.getPaginatedUrl(m):m},getParams:function(){var e=this.getFilterParams(),t=this.getMediaTypeID(),n=this.getSort();return t&&t!==d.default.get("photo").id&&(e.type=t),n&&(e.sort=n),this.section.get("refreshing")&&this.server.supports("timelineState")&&(e.timelineState=1),
e},getFilterParams:function(){var e=this.section.get("currentFilters"),t={};return s.default.each(e,function(e){e.values.length&&(t[e.key]=e.values.map(decodeURIComponent).join(","))}),t},getMediaTypeID:function(){var e=this.section.get("currentSubset").id,t=this.section.get("currentType").id||d.default.get(this.section.get("type")).id;return/^(onDeck|recentlyAdded|recentlyViewed|newest)$/.test(e)?t===d.default.get("show").id||t===d.default.get("season").id?t=d.default.get("episode").id:t!==d.default.get("artist").id&&t!==d.default.get("track").id||(t=d.default.get("album").id):/^recentlyViewedShows$/.test(e)&&(t=d.default.get("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 s.default.each(p,function(t,n){e=e.replace(n+"=",n+t)}),e}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(436),o=a(s),l=r.default.extend({
name:"TagCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(782),o=a(s),l=r.default.extend({name:"LyricsLineCollection",context:["server","section"],model:o.default,eachSpan:function(e){this.each(function(t){t.get("spans").each(e)})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(783),u=a(l),d=o.default.extend({name:"LyricsLineModel",context:["server","section"],syncedAttrs:{startOffset:r.default.integer,endOffset:r.default.integer},syncedRelations:{spans:{relationClass:u.default,rootPropertyName:"Span"}},defaults:{startOffset:-1,endOffset:-1}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(784),o=a(s),l=r.default.extend({
name:"LyricsSpanCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=-1,u=-1,d=o.default.extend({name:"LyricsSpanModel",context:["server","section"],sessionAttrs:{active:r.default.boolean},syncedAttrs:{startOffset:r.default.integer,endOffset:r.default.integer,text:r.default.string},defaults:{startOffset:l,endOffset:u},isPositionWithin:function(e){
var t=this.get("startOffset"),n=this.get("endOffset");if(t===l)return!1;var a=e>=t,i=e<=n||n===u;return a&&i}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(741),o=a(s),l=n(786),u=a(l),d=r.default.extend({mixins:[o.default],name:"LyricsStreamCollection",context:["server","section"],model:u.default,initialize:function(){this.exclusiveBoolAttr("selected")}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var a=n(8).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=a(r),o=n(18),l=i(o),u=n(19),d=i(u),c=n(781),f=i(c),p=d.default.extend({name:"LyricsStreamModel",context:["server","section"],rootPropertyName:"Lyrics",url:function(){return s.join(this.get("key"),{format:"xml"})},sessionAttrs:{follow:l.default.boolean},syncedAttrs:{id:l.default.integer,key:l.default.string,streamType:l.default.integer,index:l.default.integer,title:l.default.string,selected:l.default.boolean,
codec:l.default.string,provider:l.default.string,format:l.default.string,minLines:l.default.integer,timed:l.default.boolean},syncedRelations:{lines:{relationClass:f.default,rootPropertyName:"Line"}},defaults:{follow:!0,selected:!1}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),r=n(25),s=a(r),o=n(440),l=a(o),u=s.default.extend({name:"PlexPlayerCollection",context:["server"],model:l.default,url:"/clients",
augmentResponse:function(e){var t=(0,i.resolve)("appModel"),n=t.get("clientID"),a=parseInt(e.size,10);return 1===a&&e.Server.machineIdentifier===n?(delete e.Server,e.size="0"):a>1&&(e.Server=e.Server.filter(function(e){return e.machineIdentifier!==n}),e.size=e.Server.length.toString()),e}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(6),o=a(s),l=n(53),u=a(l),d=36e5,c=u.default.extend({defaults:function(){
return{canSkipNext:!0,stationSkipsPerHour:1/0,skips:[]}},initialize:function(){var e=[this.get("stationSkipsPerHour"),0];e=r.default.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 n=e-d,a=r.default.filter(this.get("skips"),function(e){return e>=n}),i=a.length>=t?d-(e-r.default.last(a)):null,s=!i,l=s?"":(0,o.default)("You can skip {1} songs an hour per mix.",this.get("stationSkipsPerHour"));
this.set({canSkipNext:s,canSkipNextMessage:l}),i>0&&(this.timeout=setTimeout(r.default.bind(function(){this.updateTimeout((new Date).getTime())},this),i))}},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.default=c,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=a(r),o=n(26),l=i(o),u=n(17),d=i(u),c=n(18),f=i(c),p=n(57),h=i(p),m=n(72),v=i(m),g=n(295),y=i(g),b=n(106),w=i(b),P=n(426),_=i(P),S=n(792),x=i(S),C=n(898),T=i(C),k=v.default.connectionTestResults,I=v.default.promiseStates,M=v.default.extend({name:"CloudServerModel",connectionTestUrl:"/pms/:/ip",sessionAttrs:{connectionTestResult:f.default.oneOf(k.PENDING,k.CONNECTED,k.UNAVAILABLE,k.UNAUTHORIZED).isRequired,promiseState:f.default.oneOf(I.PENDING,I.RESOLVED,I.REJECTED).isRequired,
playQueueManager:f.default.instanceOf(_.default).isRequired,isShared:f.default.boolean.isRequired,isBundled:f.default.boolean.isRequired,isCloud:f.default.boolean.isRequired,isMerged:f.default.boolean.isRequired,isDownForMaintenance:f.default.boolean.isRequired,hasFailedResources:f.default.boolean.isRequired,friendlyName:f.default.string,accessToken:f.default.string,baseUrl:f.default.string.isRequired,plexPassUrl:f.default.string.isRequired,accountUrl:f.default.string.isRequired,cloudSyncUrl:f.default.string.isRequired,
appsUrl:f.default.string.isRequired,helpUrl:f.default.string.isRequired},sessionRelations:{activeConnection:{relationClass:w.default,deferred:!0},connections:{relationClass:y.default,options:function(){return{server:this}}},resources:{relationClass:x.default,options:function(){return{server:this}}}},defaults:function(){var e=h.default.get("myPlexScheme")+"://"+h.default.get("myPlexUrl");return{connectionTestResult:k.PENDING,promiseState:I.PENDING,playQueueManager:new _.default({server:this}),isShared:!1,
isBundled:!1,isCloud:!0,isMerged:!1,isDownForMaintenance:!1,hasFailedResources:!1,friendlyName:"plex.tv",baseUrl:e,plexPassUrl:s.join([e,"/subscription/about"]),accountUrl:s.join([e,"/users/edit"]),cloudSyncUrl:s.join([e,"/cloudsync/providers"]),appsUrl:s.join([e,"/downloads"]),helpUrl:"http://support.plex.tv/hc/en-us"}},swizzleNodeUrl:function(e){var t=this.parent.get("primaryServer"),n=t&&t.get("isConnected")&&t.get("isFullServer")&&t.get("allowChannelAccess");return n?t.swizzleUrl(e):this.swizzleUrl(e,{
connection:new w.default({scheme:"https",address:"node.plexapp.com",port:"32443"})})},testAllConnections:function(){var e=this,t=this.get("connections");(0,l.default)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName"));var n=t.map(function(t){return e.testConnection(t)});return(0,T.default)(n)},testConnection:function(e){var t={server:this,connection:e,url:this.connectionTestUrl},n=d.default.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this));
return n},abortConnectionTest:function(e){var t={server:this,connection:e,url:this.connectionTestUrl};d.default.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();l.default.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this.startCapturingChangeEvents(),
this.set({isDownForMaintenance:!1,connectionTestResult:k.CONNECTED,activeConnection:t}),this.releaseCapturedChangeEvents()},onConnectionTestError:function(e,t){e.get("isAborted")||this.get("connections").hasOnlyFailedConnections()&&this._reject({isDownForMaintenance:503===t.status})}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(791),o=a(s),l=r.default.extend({name:"ConnectionSourceCollection",
context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"ConnectionSourceModel",context:["server"],sessionAttrs:{id:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=a(r),o=n(57),l=i(o),u=n(25),d=i(u),c=n(793),f=i(c),p=d.default.extend({
model:f.default,context:["server"],url:function(){var e={};return l.default.get("allowHttpsMediaServerConnections")&&(e.includeHttps=1),l.default.get("allowMediaServerRelayConnections")&&(e.includeRelay=1),s.join("/api/resources",e)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(295),u=a(l),d=o.default.extend({name:"ResourceModel",context:["server"],idAttribute:"clientIdentifier",
rootPropertyName:"Device",urlRoot:"/api/resources",syncedAttrs:{clientIdentifier:r.default.string,name:r.default.string,sourceTitle:r.default.string,accessToken:r.default.string,product:r.default.string,productVersion:r.default.string,platform:r.default.string,platformVersion:r.default.string,device:r.default.string,provides:r.default.list,owned:r.default.boolean,home:r.default.boolean,synced:r.default.boolean,presence:r.default.boolean,publicAddressMatches:r.default.boolean,httpsRequired:r.default.boolean,
createdAt:r.default.integer,lastSeenAt:r.default.integer,ownerId:r.default.integer},syncedRelations:{connections:{relationClass:u.default,rootPropertyName:"Connection"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({idAttribute:"key",whitelistedAttrs:["key","name","defaultAudioLanguage","autoSelectAudio","defaultSubtitleLanguage","subtitleMode"],
url:function(){return this.get("key")},convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return t.Account&&(t=t.Account),o.default.parseBoolean(t,"autoSelectAudio"),t},parse:function(e){var t=this.convert(e);return t=r.default.pick(t,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(750),o=a(s),l=n(796),u=a(l),d=o.default.extend({model:u.default,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)),o.default.prototype.add.apply(this,arguments)},onSettingChange:function(e){
e.label&&this.add(r.default.extend({_type:"setting"},e),{parse:!0})},onTimeline:function(e){1===e.state||e.sectionID<0||this.add(r.default.extend({_type:"timeline"},e),{parse:!0})},onStatus:function(e){"ProgressNotification"!==e._elementType&&this.add(r.default.extend({_type:"status"},e),{parse:!0})},onPlaying:function(e){this.add(r.default.extend({_type:"playing"},e),{parse:!0})},onWebSocket:function(e){this.add(r.default.extend({_type:"websocket"},e),{parse:!0})}});t.default=d,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),r=a(i),s=0,o=r.default.extend({idAttribute:"id",parse:function(e){var t=e;return t.time=new Date,t.id="evt"+s++,"preference"===t._type&&(t.value=String(t.value)),t}});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.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=r.default.isObject(e)?e:o.default.parseXML(e);return r.default.defaults(t,r.default.result(this,"defaults")),t},parse:function(e){var t=this.convert(e);return t=r.default.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.default=d,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(!e.length)return"(none)";var t=s.default.map(e,function(e){return e.get("debugName")});return t.join(", ")}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(26),d=i(u),c=n(292),f=i(c),p=n(25),h=i(p),m=n(72),v=i(m),g=h.default.extend({mixins:[f.default],name:"ServerCollection",model:v.default,initialize:function(){this._resetPopulate()},comparator:function(e){var t=e.get("isFullOwnedServer"),n=e.get("isShared"),a=e.get("friendlyName")||"",i=t?"0":"1";return i+=n?"1":"0",i+=a.toLowerCase()},shouldWaitForInitialServers:function(){var e=this.filter(function(e){var t=!e.id||!!e.get("resources");return t&&e.hasPendingPopulate();
});return!!e.length&&((0,d.default)("[Servers] Waiting for initial servers =",a(e)),!0)},shouldWaitForResources:function(){var e=this.reduce(function(e,t){var n=t.get("isResolved"),a=t.get("resources"),i=a&&a.hasPendingPopulate();return n&&i&&e.push(t),e},[]);return!!e.length&&((0,d.default)("[Servers] Waiting for additional resources from",a(e)),!0)},shouldWaitForPendingServers:function(){if(this.findWhere({isConnected:!0}))return!1;var e=this.filter(function(e){return e.hasPendingPopulate()});return!!e.length&&((0,
d.default)("[Servers] Waiting for pending servers =",a(e)),!0)},waitForServers:function(){this._resetPopulate()},foundAllServers:function(){var e=this.where({isConnected:!0}),t=a(e);(0,d.default)("[Servers] Found all servers =",t),e.length?this._resolvePopulate():this._rejectPopulate()},populateAnyServer:function(){function e(e){var t=u.indexOf(e);t>-1&&(u.splice(t,1),this.hasOnlyRejectedServers(u)&&o.reject())}function t(e,t){var n=s.default.contains(u,e);n&&t&&o.resolve(e)}function n(e,t){var n=s.default.contains(u,e);
n&&t&&this.hasOnlyRejectedServers(u)&&o.reject()}var i=this,r=arguments.length<=0||void 0===arguments[0]?this.models:arguments[0],o=l.default.Deferred(),u=r.slice(0),c=s.default.find(u,function(e){return e.get("isResolved")});return c?((0,d.default)("[Servers] Populate any server chose %s where servers = %s",c.get("debugName"),a(u)),o.resolve(c).promise()):this.hasOnlyRejectedServers(u)?o.reject().promise():(this.on({remove:e,"change:isResolved":t,"change:isRejected":n},this),o.always(function(){
i.off("change:isResolved",t,i),i.off("change:isRejected",n,i)}),o.promise())},populateServer:function(e){return this.findServer(e,!0).then(function(e){return e.populate()})},findServer:function(e,t){function n(){var e=this,a=this.filterServers(i,t);a?(c=a,a.done(function(e){c===a&&o.resolve(e)}),a.fail(function(){c===a&&(r||!e.hasPendingPopulate()?o.reject():e.populate().always(n.bind(e)))})):this.hasPendingPopulate()||o.reject()}var a=this,i=s.default.isString(e)?{machineIdentifier:e}:e,r=s.default.has(i,"machineIdentifier"),o=l.default.Deferred(),u=s.default.map(s.default.keys(i),function(e){
return"change:"+e}),d="add "+u.join(" "),c=void 0;return n.call(this),this.on(d,n,this),this.populate().always(function(){c||o.reject()}),o.always(function(){a.off(d,n,a)}),o.promise()},filterServers:function(e,t){var n=this.where(e);if(n.length)return t?this.populateAnyServer(n):l.default.Deferred().resolve(n[0]).promise()},hasOnlyRejectedServers:function(){var e=arguments.length<=0||void 0===arguments[0]?this.models:arguments[0];return s.default.every(e,function(e){return e.get("isRejected")})},
hasLoopbackServer:function(){var e=arguments.length<=0||void 0===arguments[0]?this.models:arguments[0];return!!s.default.find(e,function(e){var t=e.get("activeConnection");return!!t&&t.get("isLoopback")})}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.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=r.default.isObject(e)?e:o.default.parseXML(e);return"bool"===t.type?o.default.parseBoolean(t,"value"):"int"!==t.type&&"enum"!==t.type||o.default.parseInteger(t,"value"),o.default.parseBoolean(t,["advanced","hidden"]),t},parse:function(e){var t=this.convert(e);if(t=r.default.pick(t,this.whitelistedAttrs),t.enumValues&&!r.default.isArray(t.enumValues)&&(t.enumValues=r.default.map(t.enumValues.split("|"),function(e){var n=e.indexOf(":"),a=n>0?e.slice(n+1):e,i=n>0?e.slice(0,n):e;
return"int"===t.type&&(i=parseInt(i,10)),{label:a,value:i}})),"enum"===t.type&&t.values&&!r.default.isArray(t.values)){var n=0;t.enumValues=r.default.map(t.values.split("|"),function(e){return{label:e,value:n++}})}return t},getSaveParams:function(e,t){if(r.default.has(e,"FriendlyName")&&this.server.set("friendlyName",e.FriendlyName),r.default.has(e,"allowMediaDeletion")&&this.server.set("allowMediaDeletion","1"===String(e.allowMediaDeletion)),r.default.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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(39),u=a(l),d=n(53),c=a(d),f=c.default.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")?c.default.prototype.fetch.apply(this,arguments):o.default.Deferred().reject().promise()},convert:function(e){var t=r.default.isObject(e)?e:u.default.parseXML(e);return u.default.parseBoolean(t,"canInstall"),u.default.parseInteger(t,"status"),t.Release&&u.default.parseInteger(t.Release,"progress"),t},parse:function(e,t){var n=this.convert(e);return n=r.default.extend(n,n.Release),n=r.default.pick(n,this.whitelistedAttrs),0!==n.status&&(n.state="error"),
n}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(175),r=a(i),s=n(802),o=a(s),l=r.default.extend({name:"SessionCollection",model:o.default,url:"/status/sessions"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(78),l=i(o),u=n(77),d=a(u),c=n(111),f=a(c),p=n(18),h=a(p),m=n(56),v=a(m),g=v.default.extend({
name:"SessionModel",entityType:l.SESSION_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,d.default)(this.entityType,e.sessionKey,this.server.entityID())},idAttribute:"sessionKey",cache:new f.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.sessionKey)},syncedAttrs:s.default.extend({},v.default.prototype.syncedAttrs,{sessionKey:h.default.string,Player:h.default.object,User:h.default.object,TranscodeSession:h.default.object
})});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(67),r=a(i),s=n(804),o=a(s),l=r.default.extend({model:o.default,url:"/sync/transcodeQueue",parse:function(e){return this.convert(e,"TranscodeJob")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({idAttribute:"syncItemId",
whitelistedAttrs:["syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","title","thumb"],convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,"syncItemId"),o.default.parseFloat(t,["progress","speed"]),t},parse:function(e){var t=this.convert(e);return t=r.default.pick(t,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({idAttribute:"key",whitelistedAttrs:["key","progress","throttled","speed","duration","videoDecision","audioDecision","protocol","container","videoCodec","audioCodec","audioChannels","width","height"],url:function(){return"/transcode/sessions/"+this.id},convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return t.TranscodeSession&&(t=t.TranscodeSession),o.default.parseBoolean(t,"throttled"),o.default.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=r.default.pick(t,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(173),r=a(i),s=r.default.extend({storageKey:"manualServers",defaults:{port1:"32400",port2:"32400"}});t.default=new s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(25),r=a(i),s=n(808),o=a(s),l=r.default.extend({name:"StoredConnectionCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(809),u=a(l),d=o.default.extend({name:"StoredConnectionModel",idAttribute:"uri",syncedAttrs:{uri:r.default.string,scheme:r.default.string,address:r.default.string,port:r.default.string,relay:r.default.boolean},syncedRelations:{
sources:{relationClass:u.default}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(810),o=a(s),l=r.default.extend({name:"StoredConnectionSourceCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"StoredConnectionSourceModel",syncedAttrs:{
id:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(442),o=a(s),l=r.default.extend({name:"StoredServerCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(296),o=a(s),l=r.default.extend({name:"SyncItemCollection",context:["server","device"],model:o.default
});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(131),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=n(812),c=a(d),f="active",p="snoozed",h="dead",m={ACTIVE:f,SNOOZED:p,DEAD:h},v=u.default.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:o.default.oneOf(f,p,h),
clientIdentifier:o.default.string,version:o.default.integer,itemsCompleteCount:o.default.integer,totalSize:o.default.integer},syncedRelations:{syncItems:{relationClass:c.default,rootPropertyName:"SyncItems"}},derivedAttrs:{isActive:function(){return this.get("status")===f}},augmentResponse:function(e){return e.SyncItems&&(e.SyncItems=e.SyncItems.SyncItem),e},sync:function(e,t,n){var a=r.default.addVersionHeaderForDevice(this.get("device"),n);return u.default.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:m});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(815),o=a(s),l=r.default.extend({name:"AnnouncementCollection",model:o.default,context:["server"],url:"api/announcements"});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"AnnouncementModel",context:["server"],rootPropertyName:"Announcement",syncedAttrs:{id:r.default.integer,title:r.default.string,content:r.default.string,imageUrl:r.default.string,style:r.default.string,url:r.default.string,expireAt:r.default.string,notifyAt:r.default.string,read:{type:r.default.boolean,save:!0}},markAsRead:function(){this.get("read")||this.save("read",!0);
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(817),u=a(l),d=o.default.extend({name:"DeviceCollection",context:["server"],model:u.default,url:"/devices.xml",filterSyncDevices:function(e){var t=!(!e||!e.channel),n=e&&e.get("isPlaylist"),a=this.filter(function(e){var a=e.get("syncList"),i=a&&a.get("version")>=2,r=t&&e.get("isCloudSync"),s=n&&!i;return e.supports("sync-target")&&!r&&!s;
}),i=r.default.sortBy(a,function(e){return!e.get("isCloudSync")});return this.clone(i)},filterByProducts:function(e){var t=this.filter(function(t){return r.default.contains(e,t.get("product"))});return this.clone(t)},products:function c(){var c=this.map(function(e){return e.get("product")});return r.default.uniq(c)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(813),u=a(l),d=o.default.extend({
name:"DeviceModel",context:["server"],rootPropertyName:"Device",url:function(){return"/devices/"+this.id+".xml"},syncedAttrs:{id:r.default.string,clientIdentifier:r.default.string,name:r.default.string,product:r.default.string,productVersion:r.default.string,platform:r.default.string,platformVersion:r.default.string,device:r.default.string,model:r.default.string,provides:r.default.list,screenResolution:r.default.string,screenDensity:r.default.string,lastSeenAt:r.default.integer},syncedRelations:{
syncList:{relationClass:u.default,rootPropertyName:"SyncList",deferred:!0,options:function(){return{device:this}}}},derivedAttrs:{isCloudSync:function(){return"cloudsync"===this.get("platform")}},supports:function(e){return this.get("provides").indexOf(e)!==-1}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(214),r=a(i),s=n(67),o=a(s),l=n(444),u=a(l),d=o.default.extend({model:u.default,url:"/api/users",parse:function(e){
return this.convert(e,"User")},filterByHome:function(){var e=new r.default(this);return e.filterBy(function(e){return e.get("home")}),e},filterByUnrestricted:function(){var e=new r.default(this);return e.filterBy(function(e){return!e.get("restricted")}),e},filterByServerShares:function(e){var t=new r.default(this);return t.filterBy(function(t){var n=t.get("serverShares");return!!n.findWhere({machineIdentifier:e})}),t}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({url:"/api/home",whitelistedAttrs:["id","guestUserID","guestEnabled","name"],convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,"id"),o.default.parseBoolean(t,["guestEnabled"]),t},parse:function(e){var t=this.convert(e);return t=r.default.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){return r.default.isEmpty(e)?{guestEnabled:this.get("guestEnabled")?"1":"0"
}:u.default.prototype.getSaveParams.apply(this,arguments)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(214),r=a(i),s=n(67),o=a(s),l=n(821),u=a(l),d=o.default.extend({model:u.default,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 r.default(this);return e.filterBy(function(e){
return e.get("home")}),e},filterByFriends:function(){var e=new r.default(this);return e.filterBy(function(e){return!e.get("home")}),e}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(39),l=a(o),u=n(23),d=i(u),c=n(53),f=a(c),p=f.default.extend({whitelistedAttrs:["id","friend","server","home","friendlyName","username","email","thumb","createdAt","Server"],urlRoot:"/api/invites/requests",
url:function h(){var e=this,h=void 0;return this.isNew()?h=s.default.result(this,"urlRoot"):!function(){var t=e.pick("friend","server","home");s.default.each(s.default.keys(t),function(e){t[e]=t[e]?"1":"0"}),h=e.collection?s.default.result(e.collection,"url"):s.default.result(e,"urlRoot"),h=h.replace(/([^\/])$/,"$1/")+encodeURIComponent(e.get("id")),h=d.join(h,t)}(),h},convert:function(e){var t=s.default.isObject(e)?e:l.default.parseXML(e);l.default.parseInteger(t,"createdAt"),l.default.parseBoolean(t,["friend","server","home"]),
l.default.parseArray(t,"Server");var n=t.Server;return s.default.each(n,function(e){l.default.parseInteger(e,"numLibraries")}),t},parse:function(e){var t=this.convert(e);return t=s.default.pick(t,this.whitelistedAttrs)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(67),o=a(s),l=n(823),u=a(l),d=o.default.extend({model:u.default,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 r.default.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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.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=r.default.isObject(e)?e:o.default.parseXML(e);t.SharedServer&&(t=t.SharedServer),o.default.parseInteger(t,["id","serverId","lastSeenAt","invitedAt","acceptedAt","numLibraries"]),o.default.parseBoolean(t,["owned","admin","pending","allLibraries","allowSync","allowCameraUpload","allowChannels"]),o.default.parseArray(t,"Section");var n=t.Section;return r.default.each(n,function(e){o.default.parseInteger(e,"id"),
o.default.parseBoolean(e,"shared")}),t},parse:function(e){var t=this.convert(e);return t=r.default.pick(t,this.whitelistedAttrs),!t.numLibraries&&t.Section.length&&(t.numLibraries=r.default.where(t.Section,{shared:!0}).length),t}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(67),r=a(i),s=n(825),o=a(s),l=r.default.extend({model:o.default,url:"/pms/social/networks",parse:function(e){return this.convert(e,"Directory");
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({idAttribute:"key",whitelistedAttrs:["key","title","linked","maxLength"],convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseBoolean(t,["linked","maxLength"]),t},parse:function(e){var t=this.convert(e);return t=r.default.pick(t,this.whitelistedAttrs)}});t.default=d,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"UserEntitlementModel",syncedAttrs:{id:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(828),o=a(s),l=r.default.extend({name:"UserFeatureCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"UserFeatureModel",syncedAttrs:{id:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(447),o=a(s),l=r.default.extend({name:"UserPlaylistItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],
model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"UserProviderModel",syncedAttrs:{id:r.default.string,territory:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"UserRoleModel",syncedAttrs:{
id:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(833),o=a(s),l=r.default.extend({name:"StoredUserCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=n(811),c=a(d),f=n(451),p=a(f),h=n(450),m=a(h),v=n(446),g=a(v),y=n(449),b=a(y),w=u.default.extend({
name:"StoredUserModel",additionalRelations:["servers"],syncedAttrs:{id:o.default.integer,authToken:o.default.string,username:o.default.string,email:o.default.string,title:o.default.string,thumb:o.default.string,pin:o.default.string,home:o.default.boolean,restricted:o.default.boolean,guest:o.default.boolean,hasAllEntitlements:o.default.boolean,lastPrimaryServerID:o.default.string},syncedRelations:{subscription:{relationClass:p.default},roles:{relationClass:m.default},entitlements:{relationClass:g.default
},providers:{relationClass:b.default},servers:{relationClass:c.default}},copyFromUser:function(e){var t=this,n={};r.default.each(this.syncedAttrs,function(t,a){n[a]=e.get(a)}),r.default.each(this.syncedRelations,function(n,a){if(!r.default.contains(t.additionalRelations,a)){var i=t.get(a),s=e.get(a);if(s){var o=s.toJSON();i.set(i.parse(o))}}}),this.set(n)},clearSensitiveAttributes:function(){this.unset("authToken"),this.unset("pin"),this.get("servers").reset()}});t.default=w,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(11),o=n(109),l=a(o),u=n(9),d=a(u),c=n(57),f=a(c),p=l.default.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=(0,s.resolve)("appModel"),n=t.get("servers"),a=n.findWhere({cloud:!0});d.default.trigger("show:loading"),a.populate().done(function(){
d.default.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});d.default.trigger("show:view",n)})},error:function(){d.default.trigger("show:view",this.viewFor("notFound",{type:"404"}))},unauthorized:function(e){var t=this,n=r.default.some(this.getUnauthorizedHandlers(),function(n){return n.call(t,e)});n||d.default.trigger("show:view",this.viewFor("notFound",{
type:"media"}))},getUnauthorizedHandlers:function(){return[this.handleLockState,this.handleAuthorized,this.handlePrimaryServer,this.handleServer,this.handleChannelError]},handleLockState:function(e){var t=(0,s.resolve)("appModel");return t.get("user").get("isLocked")},handleAuthorized:function(e){var t=(0,s.resolve)("appModel"),n=t.get("servers").findWhere({authorized:!0}),a=!n&&!t.get("skipSignIn");return a&&this.populateServersThenRecover(),a},handlePrimaryServer:function(e){var t=e.server,n=e.options;
return!(t||!n.primaryServer)&&(d.default.trigger("show:view",this.viewFor("serverRequired")),!0)},handleServer:function(e){var t=e.server,n=e.options,a=this.viewFor,i=(0,s.resolve)("appModel"),r=i.get("cloudServer"),o=void 0,l=void 0;return!(!n.serverID&&!n.primaryServer)&&(t?t.get("available")?t.get("authorized")||"resolved"!==r.populatePromise.state()?t.get("authorized")||(o=this.populateServersThenRecover()):l=a("unauthorized"):l=a("unavailable",{model:t}):l=a("notFound",{type:"server"}),l&&d.default.trigger("show:view",l),
!(!l&&!o))},handleChannelError:function(e){var t=e.options,n=!!t.channelID;return n&&d.default.trigger("show:view",this.viewFor("channelError")),n},populateServersThenRecover:function(){var e=(0,s.resolve)("appModel"),t=e.get("skipSignIn"),n=e.get("servers"),a=n.findWhere({cloud:!0}),i=this.viewFor;return n.populate().done(function(){var e=n.filter(function(e){return e.get("hasManualConnection")})[0];a.get("authorized")?d.default.trigger("navigate:refresh"):e?e.get("authorized")?d.default.trigger("navigate","dashboard"):d.default.trigger("show:view",i("unavailable",{
model:e})):t?d.default.trigger("show:view",i("serverRequired")):d.default.trigger("navigate","login",{silent:!0})}).fail(function(){f.default.get("requiresSignIn")?d.default.trigger("show:view",i("unavailable",{model:a})):d.default.trigger("show:view",i("serverRequired"))})}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(41),l=a(o),u=n(11),d=i(u),c=n(9),f=a(c),p=n(110),h=a(p),m=h.default.extend({
initialize:function(){h.default.prototype.initialize.apply(this,arguments),this.listenTo(f.default,{"navigate:back":this.onNavigateBack,"navigate:forward":this.onNavigateForward,"navigate:refresh":this.onNavigateRefresh,"navigate:refresh:dashboard":this.onNavigateRefreshDashboard})},onNavigateBack:function(){var e=d.resolve("appModel"),t=e.get("history"),n=e.get("forwardHistory");return t.length<2?this.navigate("",{trigger:!0}):(n.unshift(t.pop()),void this.navigate(s.default.last(t),{trigger:!0}));
},onNavigateForward:function(){var e=d.resolve("appModel"),t=e.get("forwardHistory");t.length&&this.navigate(t[0],{trigger:!0})},onNavigateRefresh:function(){l.default.history.loadUrl(l.default.history.getFragment())}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.key,n=e.getModel,a=e.pages,r=void 0===a?1:a,s=e.reloadThreshold,l=void 0===s?4:s,d=(0,u.default)(t),c="is"+d+"Pending",f="is"+d+"Populated",p=t?t+"Error":"error";return function(e,a){var s=a.startIndex,u=a.endIndex;
(0,o.default)("number"==typeof s,"A startIndex must be provided when populating a page of items"),(0,o.default)("number"==typeof u,"An endIndex must be provided when populating a page of items");var d=u-s,h=n(e,a),m=t?h.get(t):h,v=h.sessionAttrs;(0,o.default)(v&&v.hasOwnProperty(c),h.name+" is missing a session attribute for "+c),(0,o.default)(v&&v.hasOwnProperty(f),h.name+" is missing a session attribute for "+f),(0,o.default)(v&&v.hasOwnProperty(p),h.name+" is missing a session attribute for "+p),
h.set(c,!0),m.populateRange({start:s,end:s+d*r+1,reloadThreshold:d*l}).done(function(){var e;h.set((e={},i(e,c,!1),i(e,f,!0),i(e,p,null),e))}).fail(function(e,t){var n;h.set((n={},i(n,c,!1),i(n,p,t),n))})}}var i=n(52).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(38),o=r(s),l=n(147),u=r(l);e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.key,n=e.getModel,a=(0,u.default)(t),r="is"+a+"Pending",s="is"+a+"Populated",l=t?t+"Error":"error";
return function(e,a){var u=a.count,d=n(e,a),c=t?d.get(t):d,f=d.sessionAttrs;(0,o.default)(f&&f.hasOwnProperty(r),d.name+" is missing a session attribute for "+r),(0,o.default)(f&&f.hasOwnProperty(s),d.name+" is missing a session attribute for "+s),(0,o.default)(f&&f.hasOwnProperty(l),d.name+" is missing a session attribute for "+l),d.set(r,!0),c.repopulateRange(u).done(function(){var e;d.set((e={},i(e,r,!1),i(e,s,!0),i(e,l,null),e))}).fail(function(e,t){var n;d.set((n={},i(n,r,!1),i(n,l,t),n))})};
}var i=n(52).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(38),o=r(s),l=n(147),u=r(l);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(298),l=i(o),u=(0,s.default)(l.CONFIRM_RELAY_CONNECTION);t.confirmRelayConnection=u},function(e,t,n){"use strict";function a(e,t,n){function i(){h===p&&(h=p.slice())}function r(){return t.getState()}function o(e){(0,
l.default)("function"==typeof e,"Expected listener to be a function");var t=!0;return i(),h.push(e),function(){if(t){t=!1,i();var n=h.indexOf(e);h.splice(n,1)}}}function u(e){(0,l.default)((0,s.default)(e),"Actions must be plain objects");var n=e.type,a=!1;return(0,l.default)(null!=n,'Actions must have a "type" property. Have you misspelled a constant?'),m.forEach(function(n){n(t,e,u)&&(a=!0)}),(0,l.default)(a,'The type "'+n+'" does not have a registered action handler'),e}function c(e){(0,l.default)(Array.isArray(e),"Action handlers must be contained within an array"),
m=e}function f(){for(var e=p=h,t=0;t<e.length;t++)e[t]()}if((0,l.default)(Array.isArray(e),"Action handlers must be contained within an array"),(0,l.default)(t instanceof d.default,"A store's model must extend `AbstractModel`"),n)return(0,l.default)("function"==typeof n,"Expected enhancer to be a function"),n(a)(e,t);var p=[],h=p,m=e;return t.on("statechange",f),{dispatch:u,subscribe:o,getState:r,replaceActionHandlers:c}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;
var r=n(310),s=i(r),o=n(38),l=i(o),u=n(19),d=i(u);e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,s.createSelector)((0,l.default)(),function(e){return e?e.desktop.libraries:void 0})}function i(){return(0,s.createSelector)(d.default,a(),function(e,t){return t?t.map(function(t){return e[t]}):[]})}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(30),o=n(76),l=r(o),u=n(455),d=r(u);e.exports=t.default},function(e,t,n){"use strict";function a(){
return(0,r.createSelector)(function(e,t){var n=t.hubEntityID;return n},o.default,function(e,t){return t[e]})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(30),s=n(457),o=i(s);e.exports=t.default},function(e,t,n){"use strict";function a(e){for(var t=i(null),n=0,a=e.length;n<a;n++)t[e[n]]=!0;return t}var i=n(596).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(31),u=r(l),d=u.default.extend({initialize:function(){
this.pool=[],this.index={}},lockOrCreate:function(e,t,n){var i=a(e);o.default.each(e,function(e){if(!this.find(e)){var a=o.default.find(this.pool,function(e){return!i[e.id]},this);a||(a={},this.pool.push(a),a.view=t.call(n,a)),this.index[a.id]=void 0,this.index[e]=a,a.id=e}},this)},each:function(e,t){o.default.each(this.pool,e,t)},filter:function(e,t){var n=o.default.partition(this.pool,e,t),a=n[0],i=n[1];o.default.each(i,function(e){e.view.close(),e.view.$el.remove()}),this.pool=a},find:function(e){
var t=this.index[e];return t&&t.id===e?t:void 0},findByModel:function(e){return o.default.find(this.pool,function(t){return t.view.model===e})},close:function(){o.default.each(this.pool,function(e){e.view.close()}),this.pool=[],this.index={}},reindex:function(){var e=this.index={};o.default.each(this.pool,function(t){e[t.id]=t})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.get("metadataList").getCollection(),n=t.length,a=e.get("viewGroup");if("Pictures"===a)return o.tileList;
if("List"===a)return o.list;if(t.findWhere({type:"photo"}))return o.tileList;var i=s.default.compact(t.pluck("summary")),r=s.default.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 r.length>n/2&&u<30?o.tileList:i.length>n/2?o.detailsList:o.list}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o={tileList:"media-tile-list",detailsList:"media-details-list",list:"media-list"},l={types:o,getListType:a};t.default=l,
e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="playPause,stop,skipPrevious,skipNext,seekTo,stepBack,stepForward,subtitleStream";t.VIDEO=n;var a=n+",volume";t.VIDEO_WITH_VOLUME=a;var i="playPause,stop,skipPrevious,skipNext,seekTo,repeat";t.MUSIC=i;var r=i+",volume";t.MUSIC_WITH_VOLUME=r;var s="playPause,stop,skipPrevious,skipNext";t.PHOTO=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="analyzing";t.ANALYZING=n;
var a="thumbnailing";t.THUMBNAILING=a},function(e,t,n){"use strict";function a(e){var t=arguments.length<=1||void 0===arguments[1]?"HH:mm:ss":arguments[1];return e?(0,s.default)(e).format(t):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.limit;return e?("past"===n?e=Math.min(e,(0,s.default)().unix()):"future"===n&&(e=Math.max(e,(0,
s.default)().add(1,"second").unix())),s.default.unix(e).fromNow()):""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=u[e]||s.default.last(u);return{times:e+1,remindAfter:(0,l.default)().add(t,"days").unix()}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(65),l=i(o),u=[7,30,60,90,180];
t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(145),r=a(i);t.formatDate=r.default;var s=n(466),o=a(s);t.formatDays=o.default;var l=n(467),u=a(l);t.formatDaysHours=u.default;var d=n(178),c=a(d);t.formatDuration=c.default;var f=n(146),p=a(f);t.formatHoursMinutes=p.default;var h=n(468),m=a(h);t.formatMinutes=m.default;var v=n(179),g=a(v);t.formatDurationLeft=g.default;var y=n(112),b=a(y);t.formatPlayerTime=b.default;
var w=n(113),P=a(w);t.formatTimeAgo=P.default;var _=n(469),S=a(_);t.formatTimestamp=S.default;var x=n(846),C=a(x);t.formatTime=C.default},function(e,t,n){"use strict";function a(e){return function(t,n,a){var r=a.value;return a.value=(0,i.after)(e,r),a}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(3);e.exports=t.default},function(e,t,n){"use strict";function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,a){var r=a.value;return a.value=i.compose.apply(void 0,[r].concat(t)),
a}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(3);e.exports=t.default},function(e,t,n){"use strict";function a(e){return function(t,n,a){var r=a.value;return a.value=(0,i.debounce)(r,e),a}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(3);e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){var a=n.value;return n.value=(0,i.memoize)(a),n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(3);e.exports=t.default},function(e,t,n){
"use strict";function a(e,t,n){var a=n.value;return n.value=s.default.once(a),n}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(3),s=i(r);e.exports=t.default},function(e,t){"use strict";function n(e){return e.join(", ")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(469),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(314),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(315),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(321),r=a(i),s=n(69),o=a(s);
t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(500),r=a(i),s=n(69),o=a(s);t.default=(0,o.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n(69),s=a(r);t.default=(0,s.default)(i.getLastSegment),e.exports=t.default},,,,function(e,t,n){"use strict";function a(e){e=e||[];for(var t=0,n=e.length;t<n;t++){
var i=e[t];if("xx"!==i&&"xn"!==i){if(s.default[i])return i;var r=i.match(o),l=r&&a([r[1]]);if(l)return l}}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(229),s=i(r),o=/(^[^-]+)\-/;e.exports=t.default},function(e,t){"use strict";function n(e){return e&&e.match(/[a-zA-Z\-]{2,10}/g)||[]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(31),r=a(i),s=n(9),o=a(s),l=n(48),u=a(l),d=n(58),c=a(d),f=r.default.extend({mixins:u.default,name:"AbstractReporter",enabled:!1,destroyed:!1,_suspended:!1,initialize:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];e.enabled!==!1&&this.enable()},hasSupport:function(){return!0},enable:function(){this.enabled||this.destroyed||!this.hasSupport()||(this.enabled=!0,this.listenTo(o.default,{"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(c.default.hasConsole&&console.warn("[Logging] Ignored log reentrancy:",JSON.stringify(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.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(52).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(867),o=i(s),l=n(58),u=i(l),d=n(26),c=i(d),f=(r={},a(r,c.default.LEVEL_LOG,{method:"log",color:"black"}),a(r,c.default.LEVEL_DEBUG,{method:"debug",color:"#d500ff"}),a(r,c.default.LEVEL_INFO,{method:"info",color:"blue"}),a(r,c.default.LEVEL_WARN,{method:"warn",color:"#ff6600"}),a(r,c.default.LEVEL_ERROR,{method:"error",color:"red"}),r);t.config=f;
var p=o.default.extend({name:"ConsoleReporter",hasSupport:function(){return u.default.hasConsole},onLogMessage:function(e){var t=e.message,n=f[e.level],a=console[n&&n.method]||console.log;n&&n.color?a.call(console,"%c"+t,"color: "+n.color+";"):a.call(console,t)},onLogGroup:function(e){var t=console.group||console.log;t.call(console,e.message)},onLogGroupCollapsed:function(e){var t=console.groupCollapsed||console.log;t.call(console,e.message)},onLogGroupEnd:function(){console.groupEnd&&console.groupEnd();
}});t.default=p},function(e,t){"use strict";function n(e,t,n){var a=n;if(e.Part.length>1)for(var i=0,r=e.Part.length;i<r;i++){var s=e.Part[i];if(!s.duration)break;if(t.key===s.key)break;a+=s.duration}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.Part.length:0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){if(e.indexes){var n=e.indexes.split(",");
if(n.length)return s.default.indexOf(n,t)>-1?t:n[0]}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.seasonPrefix||"S{1}",n=e.seasonIndex;return n>1e3?n:(e.noLeadingZero||(n=(0,l.default)(n)),(0,s.default)(t,n))}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(317),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){
var t=e?s.default.first(e.get("Media")):null;return!(!t||t.container)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){if(!t)return s.default.Deferred().resolve().promise();(0,l.default)("[playMedia] ping transcoder");var n=e.supports("universalTranscoder")?"/video/:/transcode/universal/ping?session="+t:"/video/:/transcode/segmented/ping?session="+t;return s.default.ajax(e.getXHROptions(n));
}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(26),l=i(o);a.DELAY=3e4,t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){if(!t)return l.default.Deferred().resolve().promise();(0,d.default)("[playMedia] stop transcoder");var a=e.supports("universalTranscoder")?"/video/:/transcode/universal/stop?session="+t:"/video/:/transcode/segmented/stop?session="+t;return n=s.default.extend(e.getXHROptions(a),n),l.default.ajax(n)}var i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(26),d=i(u);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=e.playQueueItem,a=e.metadataItem,i=e.media,r=e.part,s=a.get("ratingKey"),l=a.get("type");if(!s)return u.default.Deferred().resolve().promise();var d={ratingKey:s,key:a.get("key"),state:e.state};if(e.continuing&&(d.continuing="1"),n.get("playQueueItemID")&&(d.playQueueItemID=n.get("playQueueItemID")),!("photo"===l||i&&r))return u.default.Deferred().resolve().promise();
if("photo"!==l){var f=a.get("viewOffset")||0,h=i.duration;if(o.default.isNumber(e.position)&&(f=e.position,f=(0,m.default)(i,r,f)),h||o.default.isNumber(e.duration)&&(h=e.duration,i.duration=h),!h)return u.default.Deferred().resolve().promise();f>h&&(f=h),d.time=f,d.duration=h,(0,g.default)(a,f,h)}var v="[Timeline] "+d.state;null!=d.time&&(v+=", "+d.time+"/"+d.duration),(0,p.default)(v);var y=c.join("/:/timeline",d);return t=o.default.extend(a.server.getXHROptions(y),t),e.playbackSessionID&&(t.headers["X-Plex-Session-Identifier"]=e.playbackSessionID),
u.default.ajax(t)}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(23),c=r(d),f=n(26),p=i(f),h=n(869),m=i(h),v=n(313),g=i(v);a.DELAY=1e4,t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){u+=1;var t=s.default.extend({},e.attributes,{playQueueItemID:u}),n=new l.default(t,{server:e.server,parent:e.parent,parse:!0});return n}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(219),l=i(o),u=0;
t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,t)).toFixed(2)+" "+a[t]}Object.defineProperty(t,"__esModule",{value:!0});var a=["B","KB","MB","GB","TB"];t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e=parseInt(e,10),(e/10).toFixed(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){
return e instanceof s.default.Collection?e:e.getCollection?e.getCollection():e.has("childrenKey")?e.get("children").getCollection():void 0}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(41),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(314),r=a(i);t.formatAudioChannels=r.default;var s=n(315),o=a(s);t.formatAudioCodec=o.default;var l=n(316),u=a(l);t.formatBitrate=u.default;
var d=n(878),c=a(d);t.formatBytes=c.default;var f=n(233),p=a(f);t.formatResolution=p.default;var h=n(487),m=a(h);t.formatStreamLanguage=m.default;var v=n(879),g=a(v);t.formatVideoLevel=g.default;var y=n(488),b=a(y);t.formatVideoQuality=b.default;var w=n(232),P=a(w);t.createImageTranscodeUrl=P.default},function(e,t){"use strict";function n(e){return e>=5&&e<9}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.get("type"),n="channelDirectory"===t,a=n||t&&"directory"===s.default.get(t).element||e.get("isFolder"),i=void 0===e.length;
return i&&!a}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(40),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=t.itemDecision,a=s.default.pick(t,"shuffle","unwatched","continuous","items","excludeSeedItem"),i="movie"===e.get("type")&&!e.get("viewOffset");return i&&t.supportsContinuous&&(a.extrasPrefixCount=l.default.get("extrasPrefixCount")),n.toPlay&&(a.firstItemKey=n.toPlay.get("key")),a}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r),o=n(35),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=s.default.Deferred(),a=e.server.get("playQueueManager"),i=a.getFor(t.itemDecision.toPlay||t.itemDecision.toAdd),r=(0,l.default)(e,t);return r.model=i.get("selectedItem"),r.playQueue=i,n.resolve(r).promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(318),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){
var n=t.itemDecision,a=e.server.get("playQueueManager"),i=a.getFor(n.toPlay||n.toAdd);return i&&i.get("hasUserAdditions")?t.confirmClearPlayQueue():s.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=s.default.Deferred();if(t.siblings&&e.collection){var a=e.playlist||e.collection,i=e.get("metadataItem")||e;return n.resolve({toPlay:i,toAdd:a
}).promise()}var r=e.get("type"),o="show"===r&&!e.get("isSection"),u="season"===r;return t.unwatched&&(o||u)?!function(){var a=o?e:new l.default({key:e.get("parentKey")},{server:e.server}),i=a.fetch({data:{includeOnDeck:"1"}});i.then(function(){var i=a.get("onDeck"),r=i&&o,s=i&&u&&i.get("parentRatingKey")===e.id;r||s?(t.offset=i.get("viewOffset"),n.resolve({toPlay:i,toAdd:e})):n.resolve({toAdd:e})}),i.fail(n.reject)}():n.resolve({toAdd:e}),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(5),s=i(r),o=n(56),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.get("isUserPlaylist")?"video":e.get("isPlaylist")?e.get("playlistType"):e.get("isMetadataList")?s.default.getChildMediaType(e.get("firstItemType")).element:s.default.getChildMediaType(e.get("type")).element}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(40),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){
var n=e.get("selectedItem"),a="track"===n.get("type");if(!a)return o.default.Deferred().resolve(e).promise();var i=n.server,r=n.get("librarySectionID")||n.section&&n.section.get("key");return i.get("sections").populate().then(function(e){var t=e.findWhere({key:r});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 i(e,t){if(t.playQueue)return a(t.playQueue,t);var n=t.itemDecision,i=e.server.get("playQueueManager").createFor(n.toAdd,n.toPlay);
if(!i){var r="Couldn't create play queue";return u.default.warn("[PlayMedia]",r),(0,c.default)(),o.default.Deferred().reject(r).promise()}var s=i.addContent(n.toAdd,(0,p.default)(e,t)).then(function(){if(i.get("collection").length)return a(i,t);var e=i.get("message");return o.default.Deferred().reject("Couldn't queue item; empty play queue. "+e).promise()});return s.fail(function(e){u.default.warn("[PlayMedia]",e),(0,c.default)()}),s}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var s=n(5),o=r(s),l=n(26),u=r(l),d=n(491),c=r(d),f=n(884),p=r(f);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return(0,h.default)(e,t)?t.isFromCompanion?(0,v.default)(e,t):(d.default.warn("[PlayMedia] Ignoring playback command for currently playing item"),l.default.Deferred().reject({silent:!0}).promise()):(0,y.default)(e,t).done(function(){t.notify(s.default.extend({loading:!0},(0,w.default)(e,t)))}).then(function(){return(0,_.default)(e,t)}).then(function(n){
return t.playQueue=n,(0,w.default)(e,t)}).done(function(){f.default.execute("persistPlayQueue",null)})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(3),s=i(r),o=n(5),l=i(o),u=n(26),d=i(u),c=n(17),f=i(c),p=n(891),h=i(p),m=n(885),v=i(m),g=n(886),y=i(g),b=n(318),w=i(b),P=n(889),_=i(P);e.exports=t.default},function(e,t){"use strict";function n(e,t){var n=t.itemDecision,a=e.server.get("playQueueManager"),i=a.getFor(n.toPlay||n.toAdd);return i&&i.get("selectedItem")&&i.get("selectedItem").get("key")===e.get("key");
}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e.controller}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(31),u=a(l),d=n(85),c=a(d),f=n(894),p=a(f),h=n(26),m=a(h),v=n(48),g=a(v),y=n(805),b=a(y),w=u.default.extend({mixins:g.default,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){r.default.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 p.default,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=o.default.Deferred(),t=this.determineReasonFromBuffer(),n=this.fetchTranscodeSession();return n.done(r.default.bind(function(n){var a=this.determineReasonFromTranscode(n);a===this.reasons.UNKNOWN&&(a=t),e.resolve(a)},this)),n.fail(r.default.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 o.default.Deferred().reject().promise();var e=this.model.get("transcodeSessionID"),t=this.model.get("transcodeServer"),n=new b.default({key:e},{server:t});return n.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 a=this.model.get("transcodeServer"),i=this.model.get("media"),s=c.default.getAvailableQualitiesFor(i,a);if(s.length&&this.model.get("canSetQuality")){var o=r.default.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(),a=this.model.get("position"),i=n-a;this._startedAt+this.startDelay>t?e.setPosition(a):i>this.warningThreshold?(e.setPosition(a),
this.model.get("buffering")||this.trigger("buffering"),this._hasWarned||(this._hasWarned=!0,this.determineReason().done(r.default.bind(function(e){m.default.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(a)):this._resyncedAt=t,this._syncChecker=null,this._scheduleSyncCheck()}});t.default=w,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(31),o=a(s),l=o.default.extend({_position:0,_timestamp:null,now:function(){return r.default.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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(319),o=a(s),l=r.default.extend({},o.default,{type:"music",qualities:{bitrate:[96,128,192,320]},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(6),o=a(s),l=n(319),u=a(l),d=r.default.extend({},u.default,{
type:"photo",qualities:{photoResolution:["720x480","1280x720","1920x1080","3840x2160"],photoQuality:[24,49,74,99],title:function(){return[(0,o.default)("Low"),(0,o.default)("Medium"),(0,o.default)("High"),(0,o.default)("Highest")]}},getNearestIndexToQuality:function(e){return this.getNearestIndex(this.qualities.photoQuality,e)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.Deferred();return e.then(t.resolve,t.reject,t.notify),{promise:t.promise(),cancel:function(){
t.reject({isCanceled:!0})}}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){if(!e.length)return l.default.Deferred().reject().promise();var t=l.default.Deferred(),n=e.length;return s.default.each(e,function(e){e.done(function(){n--,t.resolveWith(this,arguments)}).fail(function(){n--,0===n&&t.reject()})}),t.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(11),d=i(u),c=n(31),f=a(c),p=n(58),h=a(p),m=n(117),v=a(m),g=n(39),y=a(g),b=n(48),w=a(b),P=n(17),_=a(P),S=n(106),x=a(S),C=n(72),T=a(C),k=f.default.extend({lastModified:null,eTag:null,mixins:w.default,url:function I(){var e=d.resolve("appModel"),t=e.get("user"),n="/sub/"+this.requestType+"/"+t.id+"/"+e.get("clientID"),a=new x.default({
scheme:"websockets"===this.requestType?"wss":"https",address:"pubsub.plex.tv"}),I=this.server.resolveUrl(n,{connection:a,appendToken:!0});return I},initialize:function(e){s.default.bindAll(this,"onSocketOpen","onSocketClose","onSocketError","onSocketMessage","onPollSuccess","onPollError"),this.server=e.server},open:function(){return(this.socket||this.pollRequest)&&this.close(),h.default.hasWebSocket?(this._deferred=l.default.Deferred(),this.requestType="websockets",this.socket=new WebSocket(s.default.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&&(v.default.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=s.default.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=l.default.ajax(e).done(this.onPollSuccess).fail(this.onPollError),this.pollRequest.promise()},handleResponse:function(e){if(e){var t=y.default.parseXML(e);if(s.default.isObject(t)){
var n=this[t.command];s.default.isFunction(n)&&n.call(this,t)}}},addUnclaimedServer:function(e){var t=d.resolve("appModel"),n=new T.default({},{parent:t}),a=s.default.isArray(e.Device.Connection)?e.Device.Connection:[e.Device.Connection];s.default.each(a,function(e){var t=e.uri,a=e.port,i=e.address,r=e.protocol;n.addConnection({uri:t,port:a,address:i,scheme:r,sources:[{id:this.server.id}]})},this),h.default.isHostedHttps&&!n.get("isSecure")?_.default.execute("showClaimServerAlertBar",n):t.get("servers").add(n);
},onSocketOpen:function(e){this.trigger("open",this.server,e),this._deferred.resolve(this.server,e)},onSocketClose:function(e){this.close(),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.default=k,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t={};for(var n in e){var a=e[n];t[a]={relationClass:l.default}}return s.default.extend({sessionRelations:t})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(19),s=i(r),o=n(747),l=i(o);e.exports=t.default},function(e,t,n){
"use strict";function a(e,t){return(0,f.default)(e)?i(e,t):d.default.isArray(e)?r(e,t):e===t}function i(e,t){for(var n=e.possibleEntityContainers,i=n?n.length:0,r=0;r<i;r++){var s=n[r],o=e[s];if(a(o,t))return!0}return!1}function r(e,t){for(var n=0,i=e.length;n<i;n++){var r=e[n];if(a(r,t))return!0}return!1}function s(e){for(var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=null!=t.budget?t.budget:m,i=(0,h.default)(),r=e.entities,s=o(r),l=s.length,u={};++v<l;){var d=s[v],c=r[d],f=o(c),p=f.length;
for(g+1>=p&&v+1>=l&&(v=-1);++g<p;){var y=f[g];if(a(e,y)||(u[d]||(u[d]=[]),u[d].push(y)),(0,h.default)()-i>=n)return v--,u}g=-1}return v=-1,u}var o=n(100).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var u=n(3),d=l(u),c=n(310),f=l(c),p=n(493),h=l(p),m=1e3/60,v=-1,g=-1;e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=t.serverEntityID;return(0,p.default)(e,m.SERVER,n)}function i(e,t){var n=t.libraryEntityID;return(0,p.default)(e,m.LIBRARY,n);
}function r(e,t){var n=t.hubEntityID;return(0,p.default)(e,m.HUB,n)}function s(e,t){var n=t.metadataListEntityID;return(0,p.default)(e,m.METADATA_LIST,n)}function o(e,t){var n=t.metadataItemEntityID;return(0,p.default)(e,m.METADATA_ITEM,n)}function l(e,t){var n=t.sessionItemEntityID;return(0,p.default)(e,m.SESSION_ITEM,n)}function u(e,t){var n=t.userPlaylistItemID;return(0,p.default)(e,m.USER_PLAYLIST_ITEM,n)}var d=n(1).default,c=n(8).default;Object.defineProperty(t,"__esModule",{value:!0}),t.findServerModel=a,
t.findLibraryModel=i,t.findHubModel=r,t.findMetadataListModel=s,t.findMetadataItemModel=o,t.findSessionModel=l,t.findUserPlaylistItemModel=u;var f=n(494),p=d(f),h=n(78),m=c(h)},function(e,t){"use strict";function n(e){return e?e.toLowerCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.charAt(0).toLowerCase()+e.slice(1):""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){
"use strict";function n(e){var t=e.toUpperCase(),n=t.match(/(\d{4})S/);if(n){var a=n[1];t=t.replace(a+"S",a+"s")}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a={encode:function(e){var t="",a=void 0,i=void 0,r="",s=void 0,o=void 0,l=void 0,u="",d=0;do a=e.charCodeAt(d++),i=e.charCodeAt(d++),r=e.charCodeAt(d++),
s=a>>2,o=(3&a)<<4|i>>4,l=(15&i)<<2|r>>6,u=63&r,isNaN(i)?l=u=64:isNaN(r)&&(u=64),t=t+n.charAt(s)+n.charAt(o)+n.charAt(l)+n.charAt(u),a=i=r="",s=o=l=u="";while(d<e.length);return t},decode:function(e){var t="",a=void 0,i=void 0,r="",s=void 0,o=void 0,l=void 0,u="",d=0,c=/[^A-Za-z0-9\+\/\=]/g;if(c.exec(e))throw new Error('There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, "+", "/", and "="\nExpect errors in decoding.');e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");
do s=n.indexOf(e.charAt(d++)),o=n.indexOf(e.charAt(d++)),l=n.indexOf(e.charAt(d++)),u=n.indexOf(e.charAt(d++)),a=s<<2|o>>4,i=(15&o)<<4|l>>2,r=(3&l)<<6|u,t+=String.fromCharCode(a),64!==l&&(t+=String.fromCharCode(i)),64!==u&&(t+=String.fromCharCode(r)),a=i=r="",s=o=l=u="";while(d<e.length);return unescape(t)}};t.default=a,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={encode:function(e){for(var t="",n=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);
i<128||(i<2048?(a>n&&(t+=e.substring(n,a)),n=a+1,t+=String.fromCharCode(192|i>>>6),t+=String.fromCharCode(128|63&i)):(a>n&&(t+=e.substring(n,a)),n=a+1,t+=String.fromCharCode(224|i>>>12),t+=String.fromCharCode(128|i>>>6&63),t+=String.fromCharCode(128|63&i)))}return n>0&&n<e.length&&(t+=e.substring(n)),0===n?e:t}};t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){for(var t="",n=0,a=e.length;n<a;n++){var i=e.charAt(n),r=i.toUpperCase();t+=0===n?r:i===r?" "+r:i}return t}Object.defineProperty(t,"__esModule",{
value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(496),r=a(i);t.escapeRegExp=r.default;var s=n(183),o=a(s);t.pluralize=o.default;var l=n(322),u=a(l);t.random=u.default;var d=n(912),c=a(d);t.toStableJSON=c.default;var f=n(497),p=a(f);t.formatActionType=p.default;var h=n(498),m=a(h);t.formatBoolean=m.default;var v=n(908),g=a(v);t.formatPropertyLabel=g.default;var y=n(903),b=a(y);t.toLowerCase=b.default;
var w=n(904),P=a(w);t.toLowerCaseFirstLetter=P.default;var _=n(495),S=a(_);t.toTitleCase=S.default;var x=n(321),C=a(x);t.toUpperCase=C.default;var T=n(147),k=a(T);t.toUpperCaseFirstLetter=k.default;var I=n(906),M=a(I);t.base64=M.default;var A=n(907),E=a(A);t.utf8=E.default;var O=n(323),D=a(O);t.truncate=D.default;var R=n(500),L=a(R);t.truncateFilename=L.default;var N=n(324),j=a(N);t.truncateMiddle=j.default},function(e,t){"use strict";function n(e){return e?e.match(/^[^A-Z]+|[A-Z]+(?![^A-Z])|[A-Z][^A-Z]+/g)||[]:[];
}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e?(0,s.default)("<p>"+e+"<p>").text():""}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=s.default.keys(e).sort();return JSON.stringify(s.default.reduce(t,function(t,n){return t[n]=e[n],t},{}))}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(t){var n=s.default.escape((0,l.default)(t.tag,e.maxLen));if(!r||!t.id)return n;var a=["#!/server/"+encodeURIComponent(i.server.id),"/section/"+encodeURIComponent(i.id),"/filter","/"+encodeURIComponent(o.id),"/"+encodeURIComponent(e.key),"/"+encodeURIComponent(t.id),"/"+encodeURIComponent(t.tag)];return'<a class="pivot-link" href="'+a.join("")+'">'+n+"</a>"}var n=s.default.reject(e.tags,function(e){
return!e.tag}),a=e.model,i=a.section,r=i&&i.get("allowAdvancedFilters"),o=d.default.get(a.get("type")),u=e.separator||", ",c="";if(n&&n.length){var f=e.maxTags||n.length;f>n.length&&(f=n.length);for(var p=0;p<f;p++)c+=t(n[p]),p+1<f&&(c+=u)}return c}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(323),l=i(o),u=n(40),d=i(u);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t={},n={};for(var a in e){var i=g.test(a)?n:t;i[a]=e[a];
}return r({},t,n)}function i(e){var t=e.type,n=e.contentType,i=e.headers;if(h[t]){var r={},s=!1;if(u.default.each(i,function(e,t){m[t]||(g.test(t)?(s=!0,r[t]=e,delete i[t]):p.default.warn('Did not move header "%s" to query string. This can result in an unnecessary OPTIONS preflight request.',t))}),s){var o=c.parseUrl(e.url),l=u.default.extend({},r,o.params);"GET"===t&&e.data&&(u.default.extend(l,c.parseParams(e.data)),delete e.data);var d=a(l),f=o.origin,y=o.isAbsolute?f:"";e.url=c.join([y,o.pathname],d);
}n&&!v.test(n)&&p.default.warn('Sending %s request with Content-Type "%s". This can result in an unnecessary OPTIONS preflight request.',t,n)}}var r=n(12).default,s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var l=n(3),u=s(l),d=n(23),c=o(d),f=n(26),p=s(f),h={GET:!0,POST:!0,HEAD:!0},m={Accept:!0,"Accept-Language":!0,"Content-Language":!0,"Content-Type":!0},v=/^(text\/plain|multipart\/form-data|application\/x-www-form-urlencoded)/,g=/^X-Plex/i;e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(10),o=a(s),l=n(501),u=a(l),d=n(842),c=a(d),f=o.default.View.extend({constructor:function(){o.default.View.prototype.constructor.apply(this,arguments)},initialize:function(){o.default.View.prototype.initialize.apply(this,arguments),this.pool=new c.default(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=o.default.getOption(this,"itemView"),n=o.default.getOption(this,"itemViewOptions");r.default.isFunction(n)&&(n=n.call(this,e));var a=new t(n);return a._parentView=this,a.render(),this.$el.append(a.$el),a},scheduleFilling:function(e){u.default.cancel(this.cid),r.default.each(e,function(e){
var t=this.pool.find(e);t.filledWithIndex!==t.id&&u.default.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,a=t.filledWithIndex===-1,i=t.id>=e.from&&t.id<=e.to;!i||n||a||(this.clearCell(t),t.filledWithIndex=-1)},this)},_getImmediateChildren:function(){return r.default.pluck(this.pool.pool,"view");
},onClose:function(){u.default.cancel(this.cid),this.pool.close()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1744),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(742),c=a(d),f=u.default.ItemView.extend({mixins:[c.default],className:"video-subtitles-renderer",template:r.default,initialize:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=o.default.extend(e,{element:this.el
})},onRender:function(){this.createASSRenderer(this.options)},onClose:function(){this.closeASSRenderer()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1745),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(80),p=a(f),h=c.default.ItemView.extend({className:"video-image-overlay",template:r.default,initialize:function(e){this.videoAspectRatio=e.videoAspectRatio,this.overscan=e.overscan,this.throttledSetStyles=o.default.throttle(this.whenRendered(this.setStyles),100),
this.image=new p.default({model:this.model,modelAttribute:"key",width:this.model.get("width"),height:this.model.get("height"),background:!0}),this.setStyles(),"video"===this.model.get("relative")&&(0,u.default)(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"),a=this.model.get("height"),i=0,r=0,s=this.getOffset(),o={
position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto",backgroundSize:n+"px "+a+"px",backgroundRepeat:"no-repeat",width:n,height:a};"center"===e?(o.left="50%",i="-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("+i+", "+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=(0,u.default)(window).width(),n=(0,u.default)(window).height(),a=t/n;if(this.videoAspectRatio>a){var i=t/this.videoAspectRatio;e.y=(n-i)/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(){(0,u.default)(window).off("resize",this.throttledSetStyles),
this.image.close()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1746),r=a(i),s=n(10),o=a(s),l=n(434),u=a(l),d=n(917),c=a(d),f=o.default.CompositeView.extend({className:"video-image-overlays-container",template:r.default,itemView:c.default,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 u.default,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){var t=e.model;"video"===t.get("relative")&&(e.videoAspectRatio=n,e.setStyles())})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(150),o=a(s),l=o.default.extend({serializeData:function(){return{title:(0,r.default)("This channel is not responding.")}}});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(150),r=a(i),s=r.default.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.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(150),o=a(s),l=o.default.extend({initialize:function(e){
this.type=e.type||"404"},serializeData:function(){var e,t;return"404"===this.type?(e=(0,r.default)("You must be lost."),t=(0,r.default)("This page doesn't exist.")):"server"===this.type?(e=(0,r.default)("Media server not found."),t=(0,r.default)("The server you're trying to access doesn't seem to exist.")):(e=(0,r.default)("Media not found."),t=(0,r.default)("The media you're trying to access doesn't seem to exist.")),{title:e,subtitle:t}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(150),r=a(i),s=r.default.extend({});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(150),o=a(s),l=o.default.extend({serializeData:function(){return{title:(0,r.default)("No soup for you!"),subtitle:(0,r.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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(6),o=a(s),l=n(9),u=a(l),d=n(150),c=a(d),f=c.default.extend({modelEvents:{"change:isResolved":"onResolvedChange"},serializeData:function(){var e,t,n=this.model,a=n.get("friendlyName");return n.get("cloud")?n.get("isDownForMaintenance")?(e=(0,o.default)("Plex is down for maintenance."),t=(0,o.default)("Don't worry, it'll be back soon.")):(e=(0,
o.default)("Plex is not reachable."),t=(0,o.default)("Make sure your server has an internet connection and any firewalls or other programs are set to allow access.")):(e=(0,o.default)("Server unavailable."),t=a?(0,o.default)("We couldn't reach \"{1}\". Make sure it's online and try again.",r.default.escape(a)):(0,o.default)("We couldn't reach this server. Make sure it's online and try again.")),{title:e,subtitle:t}},onResolvedChange:function(e,t){t&&u.default.trigger("navigate:refresh")}});t.default=f,
e.exports=t.default},function(e,t,n){"use strict";function a(){function e(){var e=void 0;return a.length?e=a.shift():(e=n+o,o++),e}function t(e){delete i[e]}var n=arguments.length<=0||void 0===arguments[0]?"":arguments[0],a=[],i={},r={},o=0;return{getKeys:function(n,o,l,u,d){void 0===u&&(u=0),s.default.each(i,function(e,t){var i=e.item;if(null===i)a.push(t);else{var c=s.default.isString(i)?i:i[d],f=l.indexOf(i)+u;(f<n||f>o)&&(a.push(t),delete r[c])}});for(var c=n;c<=o;c++){var f=l[c-u]||null,p=f&&(s.default.isString(f)?f:f[d]),h=f&&r[p];
h||(h=e(),f&&(r[p]=h)),i[h]={index:c,item:f}}return a.forEach(t),a.length=0,s.default.extend({},i)}}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(3),s=i(r);e.exports=t.default},function(e,t){"use strict";function n(e,t){return Math.max(Math.min(e,t-1),0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={},a={getPageKey:function(){return window.location.hash;
},get:function(e){return n[e]},set:function(e,t){n[e]=t},remove:function(e){delete n[e]},clear:function(){n={}}};t.default=a,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="up";t.UP=n;var a="right";t.RIGHT=a;var i="down";t.DOWN=i;var r="left";t.LEFT=r;var s=[n,a,i,r];t.all=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="none";t.NONE=n;var a="vertical";t.VERTICAL=a;var i="horizontal";t.HORIZONTAL=i;var r="omni";
t.OMNI=r;var s=[n,a,i,r];t.all=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="topLeft";t.TOP_LEFT=n;var a="topCenter";t.TOP_CENTER=a;var i="topRight";t.TOP_RIGHT=i;var r="bottomLeft";t.BOTTOM_LEFT=r;var s="bottomCenter";t.BOTTOM_CENTER=s;var o="bottomRight";t.BOTTOM_RIGHT=o;var l="middleLeft";t.MIDDLE_LEFT=l;var u="middleRight";t.MIDDLE_RIGHT=u;var d=[n,a,i,r,s,o,l,u];t.all=d},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(9),r=a(i),s=n(31),o=a(s),l=n(547),u=a(l),d=o.default.extend({shortcuts:[{keys:["?"],fn:"help",group:"navigation",label:"Open Keyboard Shortcuts"},{keys:["esc"],fn:"escape",group:"navigation",label:"Close Modal or Close Player"},{keys:["`"],fn:"sidebar",group:"navigation",label:"Toggle Sidebar"},{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:"play",group:"actions",label:"Open Player"},{keys:["e"],fn:"edit",group:"actions",label:"Edit Library or Edit Item"},{keys:["#","del"],fn:"remove",group:"actions",
label:"Delete Library or Delete Item"},{keys:["shift+s"],fn:"save",group:"actions",label:"Save Changes"},{keys:["r"],fn:"refresh",group:"actions",label:"Update Library or Refresh Item"},{keys:["a"],fn:"analyze",group:"actions",label:"Analyze Library or Analyze Item"},{keys:["w"],fn:"markWatched",group:"actions",label:"Mark as Watched"},{keys:["u"],fn:"markUnwatched",group:"actions",label:"Mark as Unwatched"},{keys:["s"],fn:"sync",group:"actions",label:"Sync"},{keys:["i"],fn:"info",group:"actions",
label:"Info"},{keys:["space"],fn:"playPause",group:"player",label:"Play or 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"],fn:"skipPrevious",group:"player",label:"Skip to Previous Item"},{keys:["right"],fn:"skipNext",group:"player",label:"Skip to Next Item"}],triggerShortcut:function(e){var t="shortcut:"+e;if(r.default.hasListener(t))return r.default.trigger(t),!1},help:function(e){r.default.trigger("show:modal",new u.default({shortcuts:this.shortcuts
}))},escape:function(e){r.default.hasListener("shortcut:escape")?r.default.trigger("shortcut:escape"):r.default.hasListener("shortcut:stop")&&r.default.trigger("shortcut:stop")},sidebar:function(e){r.default.trigger("shortcut:sidebar")},dashboard:function(e){r.default.trigger("navigate","dashboard")},settings:function(e){r.default.trigger("navigate","settings")},activity:function(e){r.default.trigger("navigate","activity")},watchLater:function(e){r.default.trigger("navigate","userPlaylist",{key:"queue"
})},recommendations:function(e){r.default.trigger("navigate","userPlaylist",{key:"recommendations"})},users:function(e){r.default.trigger("navigate","users")},search:function(e){return this.triggerShortcut("search")},edit:function(e){return this.triggerShortcut("edit")},play:function(e){return this.triggerShortcut("play")},remove:function(e){return this.triggerShortcut("delete")},save:function(e){return this.triggerShortcut("save")},refresh:function(e){return this.triggerShortcut("refresh")},analyze:function(e){
return this.triggerShortcut("analyze")},markWatched:function(e){return this.triggerShortcut("markWatched")},markUnwatched:function(e){return this.triggerShortcut("markUnwatched")},sync:function(e){return this.triggerShortcut("sync")},info:function(e){return this.triggerShortcut("info")},playPause:function(e){return this.triggerShortcut("playPause")},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.default=d,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),r=a(i),s=n(740),o=a(s),l=n(35),u=a(l),d=r.default.extend({mixins:o.default,constructor:function(){this.basePath="translations/",this.translations={},u.default.getInstance().on("change:language",function(e,t){this.load(t)},this)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(629),o=a(s),l=n(686),u=a(l),d=r.default.extend({},u.default,{
init:function(e){o.default.config(e,{shouldSendCallback:function(e){return/(main|vendors)[\w\d\.]*\.js/.test(e.culprit)}})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),s=a(r),o=n(283),l=i(o),u=n(933),d=i(u),c=n(413),f=i(c),p=n(689),h=i(p),m=n(42),v=i(m),g=n(172),y=i(g),b=n(944),w=i(b),P=n(938),_=i(P),S=n(691),x=i(S),C=n(945),T=i(C),k=n(282),I=i(k),M=n(688),A=i(M),E={registerAll:function(){
l.default.register(d.default),f.default.register(new h.default);var e=new w.default,t=new _.default;y.default.register({protocol:"plex",type:"*",create:function(t,n){return e.createController(t,n)}}),y.default.register({protocol:"cast",type:"*",create:function(e,n){return t.createController(e,n)}}),y.default.register({protocol:"local",type:v.default.types.PHOTO,create:function(e){return new x.default({type:e})}}),s.register("companionPlayerProfile",T.default),I.default.register(A.default)}};t.default=E,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(934),r=a(i),s=n(84),o=a(s),l=n(217),u=a(l),d=n(693),c=a(d),f=n(694),p=a(f),h=n(141),m=a(h),v=n(936),g=a(v),y=n(140),b=a(y),w=n(682),P=a(w),_=n(284),S=a(_),x=n(931),C=a(x),T=n(285),k=a(T),I=n(946),M=a(I),A=n(42),E=a(A),O=n(172),D=a(O),R=n(942),L=a(R),N=n(941),j=a(N),U={registerAll:function(){var e=g.default.init();e.done(function(e){return m.default.register(e)});var t=new c.default;
return o.default.register(t),u.default.register(new p.default),b.default.register(P.default),S.default.register(new C.default),k.default.register(M.default),D.default.register({protocol:"local",type:E.default.types.VIDEO,create:function(e){return new L.default({type:e})}}),D.default.register({protocol:"local",type:E.default.types.MUSIC,create:function(e){return new j.default({type:e})}}),r.default.registerAll(),e}};t.default=U,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(5),r=a(i),s=n(11),o=n(62),l=a(o),u={init:function(){var e=(0,s.resolve)("appModel"),t=window.innerWidth+"x"+window.innerHeight,n=window.screen.width+"x"+window.screen.height,a={"X-Plex-Product":"Plex Web","X-Plex-Version":"2.7.10","X-Plex-Client-Identifier":e.get("clientID"),"X-Plex-Platform":l.default.name,"X-Plex-Platform-Version":l.default.version,"X-Plex-Device":l.default.platform,"X-Plex-Device-Name":"Plex Web ("+l.default.name+")","X-Plex-Device-Screen-Resolution":t+","+n
};return e.on("change:clientID",function(e,t){a["X-Plex-Client-Identifier"]=t}),r.default.Deferred().resolve(a).promise()}};t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(11),d=i(u),c=n(42),f=a(c),p=n(85),h=a(p),m=n(313),v=a(m),g=n(320),y=a(g),b=n(327),w=a(b),P=n(35),_=a(P),S=n(513),x=a(S),C=n(514),T=a(C),k=T.default.extend({modelDefaults:function(){var e=T.default.prototype.modelDefaults.apply(this,arguments),t=this.model.get("playQueue");
return s.default.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:this.type!==f.default.types.PHOTO,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showPlayQueue:t.supports({remoteRefresh:!0})})},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(),l.default.Deferred().resolve().promise();
var n=this.model.get("metadataItem"),a=n.server,i=d.resolve("appModel"),r=i.get("primaryServer"),o=e.offset/1e3||0,u=h.default.getCurrentQuality(n,_.default.getInstance()),c=i.get("user"),f={offset:o,directPlay:_.default.get("directPlay"),directStream:_.default.get("directStream"),bitrate:u.bitrate,subtitleSize:_.default.get("subtitleSize"),audioBoost:_.default.get("audioBoost"),server:this.getServerInfo(a,{isRequired:!0}),user:{username:c.get("username")}};if(!f.server)return l.default.Deferred().reject().promise();
var p=[];p.push(this.getTransientTokenFor(a,f.server)),r&&a.id!==r.id&&(f.primaryServer=this.getServerInfo(r),f.primaryServer&&p.push(this.getTransientTokenFor(r,f.primaryServer)));var m=l.default.Deferred().resolve().promise();return m=t.yieldOwnership({absoluteUrl:!0}).then(function(e){f.containerKey=e}),m=m.then(function(){return(0,y.default)(p)}),m.done(s.default.bind(function(){var e=new chrome.cast.media.MediaInfo(n.get("key"),this.type);e.customData=f;var t=new chrome.cast.media.LoadRequest(e);
t.currentTime=o,t.autoplay=!0,this.manager.loadMedia(t)},this)),m},mirror:function(e){var t=e.item,n=t.server,a=d.resolve("appModel"),i=a.get("primaryServer"),r=a.get("user"),o={server:this.getServerInfo(n,{isRequired:!0}),user:{username:r.get("username")}};if(!o.server)return l.default.Deferred().reject().promise();var u=[];u.push(this.getTransientTokenFor(n,o.server)),i&&n.id!==i.id&&(o.primaryServer=this.getServerInfo(i),o.primaryServer&&u.push(this.getTransientTokenFor(i,o.primaryServer)));var c=(0,
y.default)(u);return c.done(s.default.bind(function(){var e=new chrome.cast.media.MediaInfo(t.get("key"),this.type);e.customData=o;var n={type:x.default.SHOWDETAILS};n.media=e,this.manager.sendCustomMessage(n)},this)),c},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);if(n){var a=s.default.extend({machineIdentifier:e.id,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&&!w.default.isValidAddress(n.address)},n);return a}},getTransientTokenFor:function(e,t){var n=this.getTransientToken(e).then(function(e){t.accessToken=e});return n},play:function(){this.model.set("state",f.default.states.PLAYING),this.manager.sendCustomMessage({type:x.default.PLAY})},pause:function(){this.model.set("state",f.default.states.PAUSED),this.manager.sendCustomMessage({type:x.default.PAUSE})},setPosition:function(e){
if(this.canSeek(e)){this.model.set({state:f.default.states.BUFFERING,position:e});var t=e/1e3;this.manager.startSeek(t),this.sendPositionRequest(t)}},sendPositionRequest:s.default.debounce(function(e){this.manager.sendCustomMessage({type:x.default.SEEK,currentTime:e})},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e/100)},sendVolumeRequest:s.default.debounce(function(e){this.manager.sendSessionCommand("setReceiverVolumeLevel",e),e||this.manager.sendSessionCommand("setReceiverMuted",!0);
},200),skipPrevious:function(){this.manager.sendCustomMessage({type:x.default.PREVIOUS})},skipNext:function(){this.manager.sendCustomMessage({type:x.default.NEXT})},skipTo:function(e){this.manager.sendCustomMessage({type:x.default.SKIPTO,key:e})},stop:function(e){T.default.prototype.stop.apply(this,arguments),this.manager.sendCustomMessage({type:x.default.STOP})},refreshRemotePlayQueue:function(){this.manager.sendCustomMessage({type:x.default.REFRESHPLAYQUEUE})},setStream:function(e,t){this.manager.sendCustomMessage({
type:x.default.SETSTREAM,stream:{type:e,id:t}})},setQualityIndex:function(){var e=this.model.get("metadataItem"),t=h.default.getCurrentQuality(e,_.default.getInstance());this.manager.sendCustomMessage({type:x.default.SETQUALITY,bitrate:t.bitrate})},onTimeline:function(e){var t=this.model.get("playQueue"),n=this.model.get("playQueueItem");if(e.containerKey){var a=e.containerKey.split("?")[0],i=s.default.result(t,"url");if(i&&i!==a)return}if(e.key&&e.key!==n.get("key")){var r=t.get("collection");if(n=r.findWhere({
key:e.key}),!n)return;this.reset(n)}var o=null;if(e.transcodeServerID){var l=d.resolve("appModel"),u=l.get("servers");o=u.get(e.transcodeServerID)}var c=h.default.getNearestIndexToBitrate(e.bitrate),p=s.default.isNumber(e.audioStreamID)?e.audioStreamID:null,m=s.default.isNumber(e.subtitleStreamID)?e.subtitleStreamID:null;this.isTimelineChange=!0,this.model.set({mediaIndex:e.mediaIndex,partIndex:e.partIndex,qualityIndex:c,audioStreamID:p,subtitleStreamID:m,transcodeServer:o,state:e.state,ready:!0,
loaded:"photo"!==this.type,finished:e.state===f.default.states.STOPPED,errorMessage:e.errorMessage,duration:Math.round(1e3*e.duration),volume:Math.round(e.volume)}),this.model.hasAttr("slideshowState")&&this.model.set("slideshowState",f.default.getSlideshowStateByState(e.state)),this.isTimelineChange=!1,this.onProgress(e.position)},onProgress:function(e){var t=this.model.get("metadataItem"),n=this.model.get("duration"),a=Math.round(1e3*e);(0,v.default)(t,a,n),this.model.set("position",a)},onError:function(e){
this.model.set({state:f.default.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.default=k,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(11),l=i(o),u=n(6),d=a(u),c=n(9),f=a(c),p=n(62),h=a(p),m=n(226),v=a(m),g=n(42),y=a(g),b=n(148),w=a(b),P=n(525),_=a(P),S=n(513),x=a(S),C=n(26),T=a(C),k=n(35),I=a(k),M=n(515),A=a(M),E=n(437),O=a(E),D=n(937),R=a(D),L=A.default.extend({
protocol:"cast",namespace:"urn:x-cast:plex",progressDelay:100,controller:R.default,sessionWrapped:["loadMedia","sendSessionCommand","sendCustomMessage"],mediaSessionWrapped:["sendMediaCommand","startSeek"],appID:function(){var e=I.default.get("chromecastAppID"),t=I.default.get("chromecastCustomAppID");return e===_.default.CUSTOM&&t?t:e||_.default.PRODUCTION},initialize:function(){if("chrome"===h.default.id){s.default.bindAll(this,"onApiAvailable","onApiLoadSuccess","onApiLoadError","onReceiverAvailable","onReceiverAction","onCustomReceiversError","onSessionAvailable","onSessionError","onSessionUpdate","onMediaSessionDiscovered","onMediaSessionError","onMediaSessionUpdate"),
A.default.prototype.initialize.apply(this,arguments),this.sessionBacklog=new v.default,this.sessionBacklog.wrapAll(this.sessionWrapped,function(){return!!this.session},this),this.mediaSessionBacklog=new v.default,this.mediaSessionBacklog.wrapAll(this.mediaSessionWrapped,function(){return!!this.mediaSession},this),this.listenTo(f.default,"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(){I.default.populate({reset:!0}).always(s.default.bind(function(){var e=s.default.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))},loadCustomReceivers:function(){var e=l.resolve("appModel"),t=e.get("players");t.length&&(this.customReceivers=[],t.each(function(e){var t=new chrome.cast.Receiver(this.getCustomReceiverLabel(e),e.get("name"));
t.receiverType=chrome.cast.ReceiverType.CUSTOM,this.customReceivers.push(t)},this),chrome.cast.setCustomReceivers(this.customReceivers,this.onCustomReceiversSuccess,this.onCustomReceiversError))},getCustomReceiverLabel:function(e){return"custom-"+e.id},stop:function(){this.session&&this.session.stop(null,this.onSessionStopError),A.default.prototype.stop.apply(this,arguments)},loadMedia:function(e){(0,T.default)("[Cast] Load media command"),this.session.loadMedia(e,this.onMediaSessionDiscovered,this.onMediaSessionError);
},sendSessionCommand:function(e,t){(0,T.default)("[Cast] Sending session command: "+e),this.session[e](t,null,this.onMessageError)},sendMediaCommand:function(e,t){(0,T.default)("[Cast] Sending media command: "+e),this.mediaSession[e](t,null,this.onMessageError)},sendCustomMessage:function(e){(0,T.default)("[Cast] Sending custom message: "+e.type),e.type===x.default.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=l.resolve("appModel");f.default.trigger("show:alert",{type:"error",message:(0,d.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.default.extend({machineIdentifier:t.server.machineIdentifier,state:y.default.getStateByCastState(this.mediaSession.playerState),duration:e.duration,
position:this.mediaSession.currentTime,volume:this.getVolumeLevel(this.session.receiver.volume)},s.default.omit(t,["server","primaryServer","user"]));n.state===y.default.states.PLAYING&&"photo"!==e.contentType&&(this.progressInterval=setInterval(s.default.bind(this.onProgress,this),this.progressDelay)),this.mediaSession.idleReason===chrome.cast.media.IdleReason.ERROR&&(n.state=y.default.states.ERROR,n.errorMessage=t.errorMessage),this.trigger("timeline",n),this.updateNowPlaying(n)}},updateCustomReceiverDisplayStatus:function(e,t){
var n,a,i=l.resolve("appModel");if(t){var r=w.default.image(t.server,t.get("thumb"),{fallbackServer:i.get("primaryServer"),width:32,height:32,minSize:1});n=t.get("title"),a=[new chrome.cast.Image(r)]}else{var s=i.get("primaryPlayer");n=s.get("product")||"Plex"}e.displayStatus=new chrome.cast.ReceiverDisplayStatus(n,a),chrome.cast.setReceiverDisplayStatus(e)},updateVolumeState:function(){this.session&&this.trigger("volume",this.getVolumeLevel(this.session.receiver.volume))},getVolumeLevel:function(e){
return e.muted?0:100*e.level},resetCustomReceiverDisplayStatus:function(e){e.displayStatus=null,chrome.cast.setReceiverDisplayStatus(e)},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()},onPrimaryPlayerChange:function(e,t){
A.default.prototype.onPrimaryPlayerChange.apply(this,arguments);var n=l.resolve("appModel");if(this.activeCustomReceiver){var a=n.previous("primaryPlayer");a&&this.stopListening(a.get("nowPlaying")),this.resetCustomReceiverDisplayStatus(this.activeCustomReceiver),this.activeCustomReceiver=null}if(t){var i=s.default.findWhere(this.customReceivers,{label:this.getCustomReceiverLabel(t)});if(i){var r=t.get("nowPlaying");this.updateCustomReceiverDisplayStatus(i),this.activeCustomReceiver=i,this.listenTo(r,"add",this.onCustomNowPlayingAdd),
this.listenTo(r,"remove",this.onCustomNowPlayingRemove)}}},onCustomNowPlayingAdd:function(e){this.activeCustomReceiver&&this.updateCustomReceiverDisplayStatus(this.activeCustomReceiver,e)},onCustomNowPlayingRemove:function(e){this.activeCustomReceiver&&this.updateCustomReceiverDisplayStatus(this.activeCustomReceiver)},onApiAvailable:function(e,t){e?this.load():T.default.warn("[Cast] "+t)},onApiLoadSuccess:function(){var e=l.resolve("appModel");(0,T.default)("[Cast] Loaded the cast api"),e.set("isCastApiAvailable",!0),
this.listenTo(e.get("players"),"add remove reset",this.loadCustomReceivers),this.loadCustomReceivers(),chrome.cast.addReceiverActionListener(this.onReceiverAction)},onApiLoadError:function(e){var t=l.resolve("appModel");T.default.error("[Cast] Unable to load the cast api: "+JSON.stringify(e)),t.set("isCastApiAvailable",!1)},onReceiverAvailable:function(e){var t=l.resolve("appModel");e===chrome.cast.ReceiverAvailability.AVAILABLE?((0,T.default)("[Cast] Receivers are available"),t.set("isCastDeviceAvailable",!0)):(T.default.warn("[Cast] No receivers are available"),
t.set("isCastDeviceAvailable",!1))},onReceiverAction:function(e,t){(0,T.default)("[Cast] "+e.friendlyName+" -> "+t);var n=l.resolve("appModel"),a=/^custom-(.*)/.exec(e.label);if(a){T.default.info("[Cast] "+e.friendlyName+" is a custom receiver");var i=n.get("players"),r=i.get(a[1]);"cast"===t?n.set("primaryPlayer",r):"stop"===t&&n.set("primaryPlayer",null)}},onCustomReceiversSuccess:function(){(0,T.default)("[Cast] Custom receivers success")},onCustomReceiversError:function(e){T.default.warn("[Cast] Custom receivers error: "+JSON.stringify(e));
},onLaunch:function(){this.sessionBacklog.clear(),this.mediaSessionBacklog.clear(),chrome.cast.requestSession(this.onSessionAvailable,this.onSessionError)},onSessionAvailable:function(e){(0,T.default)("[Cast] Session: "+JSON.stringify(e));var t=l.resolve("appModel");if(this.session=e,e.sessionId===chrome.cast.Session.CUSTOM_RECEIVER_SESSION_ID){T.default.info("[Cast] Custom receiver: "+e.receiver.friendlyName);var n=/^custom-(.*)/.exec(e.receiver.label);if(n){var a=t.get("players");t.set("primaryPlayer",a.get(n[1]));
}}else t.set("primaryPlayer",new O.default(e.receiver,{parse:!0})),e.addUpdateListener(this.onSessionUpdate),e.addMediaListener(this.onMediaSessionDiscovered),e.media.length&&((0,T.default)("[Cast] Found existing media sessions."),this.onMediaSessionDiscovered(e.media[0])),this.sessionBacklog.process()},onSessionError:function(e){"cancel"!==e.code&&T.default.error("[Cast] Unable to launch new session: "+JSON.stringify(e))},onSessionUpdate:function(e){if(e)return void this.updateVolumeState();if((0,
T.default)("[Cast] Session ended"),this.resetSession(),this.resetMediaSession(),!this.activeCustomReceiver){var t=l.resolve("appModel");t.set("primaryPlayer",null)}},onSessionStopError:function(e){T.default.error("[Cast] Unable to stop session: "+JSON.stringify(e))},onMediaSessionDiscovered:function(e){return(0,T.default)("[Cast] Media session discovered: "+JSON.stringify(e)),e.playerState===y.default.castStates.STOPPED?void this.resetMediaSession():(this.mediaSession=e,e.addUpdateListener(this.onMediaSessionUpdate),
this.updatePlayer(),void this.mediaSessionBacklog.process())},onMediaSessionError:function(e){T.default.error("[Cast] Media session error: "+JSON.stringify(e)),this.resetMediaSession(),e.details&&e.details.customData&&this.trigger("error",e.details.customData.errorMessage)},onMediaSessionUpdate:function(e){return this.seeking?void(this.mediaSession.playerState=chrome.cast.media.PlayerState.BUFFERING):void this.updatePlayer()},onMessageError:function(e){T.default.warn("[Cast] Message error: "+JSON.stringify(e));
},onProgress:function(){this.trigger("progress",this.mediaSession.getEstimatedTime())}});t.default=L,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(1613),o=a(s),l=n(6),u=a(l),d=n(31),c=a(d),f=n(42),p=a(f),h=n(226),m=a(h),v=n(26),g=a(v);o.default.key="fv2ELs9q2gEZxE9uuiAGfhbE9Qhc4DyhZjt1j0GaxUI=";var y=c.default.extend({wrapped:["play","pause","playPause","getState","setVolume","setPosition","resume","stop"],
initialize:function(e){r.default.bindAll(this,"onReady","onPlay","onTime","onBuffer","onPause","onVolume","onComplete","onError"),this.type=e,this.backlog=new m.default,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(),r.default.defer(r.default.bind(function(){var t=(0,o.default)("flash-video-placeholder"),n=this.model.get("url");return r.default.isFunction(t.setup)?(g.default.group("Flash Player"),
(0,g.default)("URL: "+n),(0,g.default)("Autoplay: true"),(0,g.default)("Offset: "+this.offset),g.default.groupEnd(),this.model.set("ready",!0),void(this.video=t.setup({file:n,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}}))):void this.model.set({state:p.default.states.ERROR,errorMessage:(0,u.default)("Your browser does not support video streaming.")})},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(){(0,g.default)("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",p.default.states.PLAYING)},onTime:function(e){return this.offset?void this.resume():(this.model.set("duration",Math.round(1e3*e.duration)),void this.model.set("position",Math.round(1e3*e.position)))},onBuffer:function(){this.model.set("state",p.default.states.BUFFERING)},onPause:function(){this.model.set("state",p.default.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:p.default.states.ERROR,errorMessage:e.message})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(62),o=a(s),l=n(26),u=a(l),d=n(414),c=a(d),f=c.default.extend({load:function(e){c.default.prototype.load.apply(this,arguments),o.default.mobile&&this.model.set("ready",!0);
},resume:function(){(0,u.default)("resuming at "+this.offset);var e=this.offset;this.offset=0,this.autoplay&&(this.mediaElement.resume_pending=!0,this.pause()),this.resumePositionTimeout=setTimeout(r.default.bind(function(){this.setPosition(e)},this),1e3),this.autoplay&&(this.resumePlayTimeout=setTimeout(r.default.bind(function(){this.mediaElement.resume_pending=!1,this.play()},this),1500))},stop:function(){c.default.prototype.stop.apply(this,arguments),this.resumePositionTimeout=clearTimeout(this.resumePositionTimeout),
this.resumePlayTimeout=clearTimeout(this.resumePlayTimeout)},onReady:function(){c.default.prototype.onReady.apply(this,arguments);var e=this.model.get("showEnterFullscreen")||this.model.get("showExitFullscreen");!e&&this.mediaElement.webkitSupportsFullscreen&&this.model.set({showEnterFullscreen:!0,forceWebkitVideoFullscreen:!0})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(11),l=i(o),u=n(62),d=a(u),c=n(42),f=a(c),p=n(234),h=a(p),m=n(231),v=a(m),g=n(148),y=a(g),b=n(690),w=a(b),P=w.default.extend({
type:f.default.types.MUSIC,modelDefaults:function(){var e=w.default.prototype.modelDefaults.apply(this,arguments);return s.default.extend(e,{canPlayPause:!0,canStop:!0,canSetVolume:!d.default.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=l.resolve("appModel");return h.default.getPlayerDecision({type:this.type,profile:this.profile,item:e,offset:t.offset,fallbackServer:n.get("primaryServer"),transcoder:y.default,profileExtra:function(e){if(e.transcodeServer.supports("replaceTranscodeTarget"))return v.default.canPlayType("audio",'audio/ogg; codecs="opus"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=opus)":v.default.canPlayType("audio",'audio/ogg; codecs="vorbis"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=vorbis)":void 0;
}})}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(1614),l=a(o),u=n(11),d=i(u),c=n(6),f=a(c),p=n(58),h=a(p),m=n(62),v=a(m),g=n(42),y=a(g),b=n(311),w=a(b),P=n(85),_=a(P),S=n(234),x=a(S),C=n(231),T=a(C),k=n(176),I=a(k),M=n(148),A=a(M),E=n(35),O=a(E),D=n(415),R=a(D),L=n(940),N=a(L),j=n(939),U=a(j),F=n(108),B=a(F),z=R.default.extend({type:y.default.types.VIDEO,modelDefaults:function(){
var e=R.default.prototype.modelDefaults.apply(this,arguments);return s.default.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!v.default.mobile,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showSeekBar:!0,showPlayQueue:!0,showEnterFullscreen:h.default.hasFullscreen})},modelOverrides:function(){var e=R.default.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 n=this.populateItem(e);return n=n.then(s.default.bind(function(){var n=d.resolve("appModel"),a=_.default.getCurrentQuality(e,O.default.getInstance()),i=x.default.getPlayerDecision({type:this.type,profile:this.profile,item:e,media:t.media,part:t.part,offset:t.offset,fallbackServer:n.get("primaryServer"),allowDirectPlay:O.default.get("directPlay"),allowedAC3Containers:O.default.get("allowAC3")?"mp4":null,subtitlesBurnLevel:this.model.get("softSubtitlesFailed")?I.default.ALWAYS:O.default.get("subtitlesBurnLevel"),
hasFlash:this.canPlayFlash(),hasNativeHLS:this.canPlayHLS(),useOffsetHLS:!1,hasDASH:this.canPlayDASH(),hasStreamingMKV:this.canPlayStreamingMKV(),minVersionForStreamingMKV:B.default.streamingMKV,quality:a,transcoder:A.default,transcoderOptions:{directStream:O.default.get("directStream")?1:0,subtitleSize:O.default.get("subtitleSize"),audioBoost:O.default.get("audioBoost")},profileExtra:function(e){var t=[];return O.default.get("preferAAC")&&t.push("add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=aac)"),
"safari"===v.default.id&&"osx"===v.default.platformID&&(0,w.default)(v.default.platformVersion,"10.11")&&t.push("append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)"),t.length?t.join("+"):null}});return i.done(this.onDecisionSuccess),i.fail(this.onDecisionError),i},this),s.default.bind(function(){this.model.set({state:"error",errorMessage:(0,f.default)("Plex Media Server is not responding.")})},this))},getSubcontrollerByType:function(e){return d.resolve("metrics").trackEvent({
event:"playback:init",properties:{player:e}}),"flash"===e?new U.default(this.type):new N.default(this.type)},canPlayFlash:function(){return l.default.hasFlashPlayerVersion("10")},canPlayHLS:function $(){var e=this.profile.protocols;if(!e||!e.hls)return!1;var $=T.default.canPlayType("video",e.hls.mimeType),t="Android"===v.default.platform;return $||t},canPlayDASH:function(){var e=this.profile.directPlay;if(!e.hasOwnProperty("mp4"))return!1;var t=T.default.canPlayType("video",e.mp4.mimeType);return O.default.get("dash")&&t&&h.default.hasMediaSource;
},canPlayStreamingMKV:function(){var e=this.profile.directPlay,t=T.default.canPlayType("video",e.mp4.mimeType);return O.default.get("dash")&&"chrome"===v.default.id&&!v.default.mobile&&t},getErrorMessage:function(e){var t=R.default.prototype.getErrorMessage.apply(this,arguments);if(e.transcodeServer&&e.transcodeServer.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"allowDirectPlay":t+=" "+(0,f.default)("Please allow Direct Play in Settings > Web > Player > Show Advanced.");break;case"validateProfileProperty:maxBitrate":
default:t+=" "+(0,f.default)("Please increase the Streaming Quality in Settings > Web > Player.")}return t},onDecisionSuccess:function(e){var t=this.getMaxVideoBitrateQualityIndex(e);if(!t){var n=_.default.getCurrentQuality(e.item,O.default.getInstance());t=n.index}this.model.set("qualityIndex",t),R.default.prototype.onDecisionSuccess.apply(this,arguments)}});t.default=z,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0
});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(23),d=i(u),c=n(42),f=a(c),p=n(313),h=a(p),m=n(73),v=a(m),g=n(116),y=a(g),b=n(514),w=a(b),P=w.default.extend({modelDefaults:function(){var e=w.default.prototype.modelDefaults.apply(this,arguments),t=this.player.get("protocolCapabilities"),n=s.default.contains(t,"playqueues"),a=this.model.get("playQueue");return s.default.extend(e,{canStop:!0,showPlayQueue:!!(n&&a&&a.supports({remoteRefresh:!0}))})},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"),n=t.server,a=this.getServerInfo(n,{
isRequired:!0});if(!a)return l.default.Deferred().reject().promise();var i=this.model.get("playQueue");if(this.listenTo(i.get("collection"),"reset",this.onPlayQueueChange),e.silent)return l.default.Deferred().resolve().promise();var r=s.default.extend({key:t.get("key"),offset:e.offset||0},a),o=l.default.Deferred().resolve().promise(),u=this.getTransientTokenFor(n,r);return o=i.yieldOwnership().then(function(e){r.containerKey=e}),o=o.then(function(){return(0,y.default)(u)}),o=o.then(s.default.bind(function(){
var e=d.join("/player/playback/playMedia",r);return this.manager.request(this.player,e)},this))},mirror:function(e){if(s.default.contains(this.player.get("protocolCapabilities"),"mirror")){var t=e.item,n=t.server,a=this.getServerInfo(n,{isRequired:!0});if(!a)return l.default.Deferred().reject().promise();var i=s.default.extend({type:this.type,key:t.get("key")},a),r=(0,y.default)(this.getTransientTokenFor(n,i));return r=r.then(s.default.bind(function(){return this.manager.request(this.player,d.join("/player/mirror/details",i));
},this))}},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);if(n){var a=s.default.extend({machineIdentifier:e.id},n);return"myPlex"===a.machineIdentifier&&(a.machineIdentifier="node",a.address="node.plexapp.com"),a}},getTransientTokenFor:function(e,t){var n=this.getTransientToken(e).then(function(e){t.token=e});return n},reset:function(e){return this.hasStarted=!1,w.default.prototype.reset.apply(this,arguments)},play:function(){return this.model.set("state",f.default.states.PLAYING),
this.manager.request(this.player,"/player/playback/play?type="+this.type)},pause:function(){return this.model.set("state",f.default.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:s.default.throttle(function(e){var t={type:this.type,offset:e},n=d.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:s.default.throttle(function(e){var t={type:this.type,volume:e},n=d.join("/player/playback/setParameters",t);return this.manager.request(this.player,n)},500),setRepeat:s.default.debounce(function(e){var t={type:this.type,repeat:e},n=d.join("/player/playback/setParameters",t);return this.manager.request(this.player,n)},50),setStream:function(e,t){var n=v.default.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(s.default.contains(t,"playqueues")){var n=e.get("playQueueID");return this.manager.request(this.player,"/player/playback/refreshPlayQueue?playQueueID="+n)}return l.default.Deferred().resolve().promise()},skipPrevious:function(){return w.default.prototype.skipPrevious.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipPrevious?type="+this.type)},skipNext:function(){
return w.default.prototype.skipNext.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipNext?type="+this.type)},skipTo:function(e){return w.default.prototype.skipTo.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipTo?type="+this.type+"&key="+e)},stop:function(e){return w.default.prototype.stop.apply(this,arguments),this.manager.request(this.player,"/player/playback/stop?type="+this.type)},removeItem:function(){var e=w.default.prototype.removeItem.apply(this,arguments);
return e.then(s.default.bind(this.refreshRemotePlayQueue,this))},moveItem:function(){var e=w.default.prototype.moveItem.apply(this,arguments);return e.then(s.default.bind(this.refreshRemotePlayQueue,this))},onTimeline:function(e){if(this.type===e.type&&!e.continuing){var t=this.model.get("playQueue"),n=this.model.get("playQueueItem");if(e.key&&e.key!==n.get("key")){if(n=t.get("collection").findWhere({key:e.key}),!n)return;this.reset(n)}var a=parseInt(e.playQueueVersion,10);a&&a>t.get("playQueueVersion")&&t.fetch(),
e.state!==f.default.states.STOPPED&&(this.hasStarted=!0);var i=parseInt(e.audioStreamID,10),r=parseInt(e.subtitleStreamID,10);this.isTimelineChange=!0,this.model.set({mediaIndex:e.mediaIndex,partIndex:e.partIndex,partCount:e.partCount,audioStreamID:s.default.isNaN(i)?null:i,subtitleStreamID:s.default.isNaN(r)?null:r,state:e.state,ready:!0,loaded:"photo"!==this.type,finished:this.hasStarted&&e.state===f.default.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&&(0,h.default)(n.get("metadataItem"),e.time,e.duration)}}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(11),d=i(u),c=n(6),f=a(c),p=n(9),h=a(p),m=n(39),v=a(m),g=n(58),y=a(g),b=n(23),w=i(b),P=n(515),_=a(P),S=n(943),x=a(S),C=_.default.extend({protocol:"plex",controller:x.default,
playerRequestedDisconnect:!1,initialize:function(){s.default.bindAll(this,"error","stop"),_.default.prototype.initialize.apply(this,arguments)},start:function(e){_.default.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,_.default.prototype.stop.apply(this,arguments);
},request:function(e,t,n){n||(n={}),n.skipIncrement||this.commandID++,t=w.join(t,{commandID:this.commandID});var a=y.default.isHostedHttps?e.server:e,i=a.getXHROptions(t);return i.headers["X-Plex-Target-Client-Identifier"]=e.id,l.default.ajax(i).fail(s.default.bind(function(e){if(!this.stopPolling){var t,n=e.responseText,a=v.default.parseXML(n);t=a&&a.status?a.status:(0,f.default)("The player is unable to perform this action."),h.default.trigger("show:alert",{type:"error",message:t})}},this))},poll:function(e){
e||(e={});var t=w.join("/player/timeline/poll",{wait:e.wait?1:0});this.pollRequest=this.request(this.player,t,{skipIncrement:!0}),this.pollRequest.done(s.default.bind(function(t,n,a){if(this.player.id===a.getResponseHeader("X-Plex-Client-Identifier")){var i=v.default.parseXML(t);if(v.default.parseArray(i,"Timeline"),i.commandID>=this.commandID&&(this.onTimeline(i.Timeline),!e.ignoreDisconnected&&i.disconnected)){var r=d.resolve("appModel");return this.playerRequestedDisconnect=!0,void r.set("primaryPlayer",null);
}}this.poll({wait:!0})},this)),this.pollRequest.fail(s.default.bind(function(e){this.stopPolling||this.error()},this))},error:function(){var e=d.resolve("appModel");h.default.trigger("show:alert",{type:"error",message:(0,f.default)("There was a problem connecting to this player.")}),e.set("primaryPlayer",null),e.get("players").fetch({reset:!0})},onTimeline:function(e){s.default.each(e,function(e){v.default.parseInteger(e,["time","duration","volume","repeat"]),v.default.parseBoolean(e,["shuffle","continuing"]),
e.controllable?e.controllable=e.controllable.split(","):e.controllable=[],this.trigger("timeline",e),this.updateNowPlaying(e)},this)}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(844),i={video:a.VIDEO_WITH_VOLUME,music:a.MUSIC_WITH_VOLUME,photo:a.PHOTO};t.default=i,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(62),r=a(i),s={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:{generic:{audio:{maxBitrate:350}},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:{}}}}},directStream:{audio:{codecs:{mp3:{}},maxBitrate:320,maxChannels:2}}}};"ie"===r.default.id&&"9.0"===r.default.version&&(s.video.directPlay.mp4.optimizedForStreaming=!0),t.default=s,
e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.channel,n=t.get("identifier"),a=n?"/system/appstore/apps/"+n:t.get("key"),i=a+"/install",r=t.server.getXHROptions(i),o=s.default.ajax(r);return o.done(function(){t.set("installed",!0)}),o.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.channel,n=t.get("identifier"),a=n?"/system/appstore/apps/"+n:t.get("key"),i=a+"/reset",r=t.server.getXHROptions(i),o=l.default.ajax(r);
return o.done(function(e){var t,n=s.default.isObject(e)?e:h.default.parseXML(e);t=n.message?n.message:(0,d.default)("This channel was successfully reset."),f.default.trigger("show:alert",{type:"success",message:t})}),o.fail(function(){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem resetting this channel.")})}),o.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(39),h=i(p);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.channel,n=t.get("identifier"),a=n?"/system/appstore/apps/"+n:t.get("key"),i=a+"/restart",r=t.server.getXHROptions(i),o=l.default.ajax(r);return o.done(function(e){var t,n=s.default.isObject(e)?e:h.default.parseXML(e);t=n.message?n.message:(0,d.default)("This channel was successfully restarted."),f.default.trigger("show:alert",{type:"success",message:t})}),o.fail(function(){f.default.trigger("show:alert",{type:"error",
message:(0,d.default)("There was a problem restarting this channel.")})}),o.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(39),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var t=l.default.ajax(u);t.done(function(t){var i=s.default.isObject(t)?t:h.default.parseXML(t);a.set("installed",!1),i.message&&!e.skipConfirmation&&f.default.trigger("show:alert",{type:"success",
message:i.message}),n.resolve()}),t.fail(function(e){if(400===e.status){var t=new v.default({title:(0,d.default)("Unable to Uninstall Channel"),message:(0,d.default)("This channel could not be uninstalled, but you can disable it in the server settings."),confirmLabel:(0,d.default)("OK"),cancelLabel:(0,d.default)("Ignore")});t.promise.done(function(){f.default.trigger("navigate","serverSettings",{serverID:a.server.id,group:"channels"})}),f.default.trigger("show:modal",t)}else f.default.trigger("show:alert",{
type:"error",message:(0,d.default)("This channel could not be uninstalled.")});n.reject(e)})}var n=l.default.Deferred(),a=e.channel,i=a.get("identifier"),r=i?"/system/appstore/apps/"+i:a.get("key"),o=r+"/uninstall",u=a.server.getXHROptions(o);if(e.skipConfirmation)t();else{var c=new v.default({title:(0,d.default)("Uninstall Channel"),message:(0,d.default)("Are you sure you want to uninstall this channel?")}),p=c.promise;p.done(t),p.fail(function(){n.reject()}),f.default.trigger("show:modal",c)}return n.promise();
}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(39),h=i(p),m=n(37),v=i(m);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(e){var a=s.default.isObject(e)?e:h.default.parseXML(e);if(!a||!a.message&&!a.Directory)return void n();if(a.message)u||f.default.trigger("show:alert",{type:"success",message:a.message}),i.resolve();else{h.default.parseArray(a,"Directory");var r=a.Directory[0].key,d=l.default.ajax(o.getXHROptions(r));
d.done(t),d.fail(n)}}function n(e){u||f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem checking for updates.")}),i.reject(e)}var a,i=l.default.Deferred(),r=e.channel,o=r?r.server:e.server,u=e.silent;if(r){var c=r.get("identifier"),p=c?"/system/appstore/apps/"+c:r.get("key");a=p+"/update"}else a="/system/appstore/updates";var m=l.default.ajax(o.getXHROptions(a));return m.done(t),m.fail(n),i.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(39),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=c.resolve("appModel"),n=t.get("user"),a=n.server,i={url:e.item.get("url")},r=m.join("/pms/playlists/queue/items",i),s=o.default.extend(a.getXHROptions(r),{type:"POST"}),l=u.default.ajax(s).promise();return l.done(function(){g.default.trigger("show:alert",{type:"success",message:(0,p.default)("{1} added to Watch Later.",e.item.get("title"))
})}),l.fail(function(){g.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem adding to Watch Later.")})}),l}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(11),c=r(d),f=n(6),p=i(f),h=n(23),m=r(h),v=n(9),g=i(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(205).default,i=n(206).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(696);a(t,i(s,a));
var o=n(977),l=r(o);t.refreshMetadata=l.default;var u=n(954),d=r(u);t.analyzeItems=d.default;var c=n(955),f=r(c);t.analyzeSection=f.default;var p=n(972),h=r(p);t.markWatched=h.default;var m=n(971),v=r(m);t.markUnwatched=v.default;var g=n(979),y=r(g);t.unmatch=y.default;var b=n(978),w=r(b);t.splitApart=w.default;var P=n(974),_=r(P);t.merge=_.default;var S=n(964),x=r(S);t.deleteItems=x.default;var C=n(965),T=r(C);t.deleteMediaItem=T.default;var k=n(969),I=r(k);t.deleteVersions=I.default;var M=n(967),A=r(M);
t.deleteSection=A.default;var E=n(968),O=r(E);t.deleteSectionThumbnails=O.default;var D=n(966),R=r(D);t.deletePlaylist=R.default;var L=n(980),N=r(L);t.updateLibrary=N.default;var j=n(975),U=r(j);t.optimize=U.default;var F=n(958),B=r(F);t.cleanBundles=B.default;var z=n(970),$=r(z);t.emptyTrash=$.default;var V=n(973),H=r(V);t.match=H.default;var q=n(956),W=r(q);t.autoMatch=W.default;var K=n(957),Q=r(K);t.changeArtwork=Q.default;var Y=n(976),G=r(Y);t.rate=G.default;var X=n(962),J=r(X);t.enableVersionGenerator=J.default;
var Z=n(961),ee=r(Z);t.disableVersionGenerator=ee.default;var te=n(963),ne=r(te);t.reprocessVersionGenerator=ne.default;var ae=n(960),ie=r(ae);t.deleteVersionGenerator=ie.default;var re=n(959),se=r(re);t.deleteAllVersionGenerators=se.default;var oe=n(947),le=r(oe);t.installChannel=le.default;var ue=n(951),de=r(ue);t.updateChannel=de.default;var ce=n(949),fe=r(ce);t.restartChannel=fe.default;var pe=n(948),he=r(pe);t.resetChannel=he.default;var me=n(950),ve=r(me);t.uninstallChannel=ve.default;var ge=n(952),ye=r(ge);
t.watchLater=ye.default;var be=n(982),we=r(be);t.playMedia=we.default;var Pe=n(981),_e=r(Pe);t.playBackgroundMedia=_e.default;var Se=n(983),xe=r(Se);t.queueMedia=xe.default;var Ce=n(986),Te=r(Ce);t.connectServer=Te.default;var ke=n(988),Ie=r(ke);t.reconnectServer=Ie.default;var Me=n(990),Ae=r(Me);t.signInServer=Ae.default;var Ee=n(992),Oe=r(Ee);t.signUpServer=Oe.default;var De=n(991),Re=r(De);t.signOutServer=Re.default;var Le=n(989),Ne=r(Le);t.removeServer=Ne.default;var je=n(985),Ue=r(je);t.checkForServerUpdates=Ue.default;
var Fe=n(987),Be=r(Fe);t.installServerUpdates=Be.default;var ze=n(993),$e=r(ze);t.testServerImage=$e.default;var Ve=n(984),He=r(Ve);t.getTransientToken=He.default;var qe=n(995),We=r(qe);t.showTermsOfService=We.default;var Ke=n(994),Qe=r(Ke);t.showClaimServerAlertBar=Qe.default;var Ye=n(1010),Ge=r(Ye);t.showSyncModal=Ge.default;var Xe=n(1009),Je=r(Xe);t.showHomeWarningsModal=Je.default;var Ze=n(997),et=r(Ze);t.deleteSyncItem=et.default;var tt=n(1e3),nt=r(tt);t.refreshSyncLists=nt.default;var at=n(1003),it=r(at);
t.removeDevice=it.default;var rt=n(1004),st=r(rt);t.removeFriend=st.default;var ot=n(996),lt=r(ot);t.acceptInvite=lt.default;var ut=n(1001),dt=r(ut);t.rejectInvite=dt.default;var ct=n(1008),ft=r(ct);t.shareServer=ft.default;var pt=n(1006),ht=r(pt);t.removeServerShare=ht.default;var mt=n(1005),vt=r(mt);t.removeHomeUser=vt.default;var gt=n(1013),yt=r(gt);t.validateUsername=yt.default;var bt=n(1012),wt=r(bt);t.toggleGuest=wt.default;var Pt=n(998),_t=r(Pt);t.lockUser=_t.default;var St=n(1011),xt=r(St);
t.signUp=xt.default;var Ct=n(1007),Tt=r(Ct);t.share=Tt.default;var kt=n(999),It=r(kt);t.recommend=It.default;var Mt=n(1002),At=r(Mt);t.remoteUnlock=At.default},function(e,t,n){"use strict";function a(e){var t=e.items;return l.default.when.apply(l.default,s.default.map(t,function(e){var t="/library/metadata/"+e.id+"/analyze",n=s.default.extend(e.server.getXHROptions(t),{type:"PUT"});return l.default.ajax(n).promise()}))}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=l.default.ajax(r);e.done(function(){n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem analyzing the library.")}),n.reject(e)}),e.always(function(e){o.hide()})}var n=l.default.Deferred(),a=e.section,i="/library/sections/"+a.id+"/analyze",r=s.default.extend(a.server.getXHROptions(i),{type:"PUT"}),o=new h.default({title:(0,d.default)("Analyze Library"),
message:(0,d.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:(0,d.default)("Analyze"),cancelLabel:(0,d.default)("Cancel"),async:!0}),u=o.promise;return u.done(t),u.fail(function(){n.reject()}),f.default.trigger("show:modal",o),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=u.default.Deferred(),n=e.item,a=e.agent,i={agent:a.id,manual:0},r=g.join(["/library/metadata/",n.id,"/matches"],i),s=o.default.extend(n.server.getXHROptions(r)),l=u.default.ajax(s);return l.done(function(e){var a=o.default.isObject(e)?e:m.default.parseXML(e);if(a.SearchResult){var r=a.SearchResult;o.default.isArray(a.SearchResult)&&(r=a.SearchResult[0]),i={guid:r.guid,name:r.name};var s=g.join(["/library/metadata/",n.id,"/match"],i),l=o.default.extend(n.server.getXHROptions(s),{
type:"PUT"}),d=u.default.ajax(l);d.done(function(){t.resolve()}),d.fail(function(){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem matching this item.")}),t.reject()})}else p.default.trigger("show:alert",{type:"error",message:(0,c.default)("No matches were found using this agent.")}),t.reject()}),l.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem searching for matches.")}),t.reject(e)}),t.promise()}var i=n(1).default,r=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(6),c=i(d),f=n(9),p=i(f),h=n(39),m=i(h),v=n(23),g=r(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.item,n={url:e.artworkRatingKey},a=c.join(["/library/metadata/",t.id,e.artworkType],n),i=o.default.extend(t.server.getXHROptions(a),{type:"PUT"}),r=u.default.ajax(i);return r.done(function(n){t.set(f[e.artworkType],n)}),r.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(23),c=r(d),f={poster:"thumb",art:"art",banner:"banner"};t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=l.default.ajax(r);e.done(function(){f.default.trigger("show:alert",{type:"success",message:(0,d.default)("Unused bundles are being removed.")}),n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem removing unused bundles.")}),n.reject(e);
}),e.always(function(e){o.hide()})}var n=l.default.Deferred(),a=e.server,i="/library/clean/bundles",r=s.default.extend(a.getXHROptions(i),{type:"PUT"}),o=new h.default({title:(0,d.default)("Clean Bundles"),message:(0,d.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:(0,d.default)("Clean"),cancelLabel:(0,d.default)("Cancel"),
async:!0}),u=o.promise;return u.done(t),u.fail(function(){n.reject()}),f.default.trigger("show:modal",o),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=i(),n=t.promise;return n=n.then(function(){var n="/playlists/generators?type="+m.default.LOCAL,a=o.default.extend(e.server.getXHROptions(n),{type:"DELETE"}),i=u.default.ajax(a).promise();
return i.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem deleting all versions.")})}),i.always(function(){t.hide()}),i.promise()})}function i(){var e=new g.default({title:(0,c.default)("Delete All Versions"),message:(0,c.default)("Are you sure you want to delete all versions? This cannot be undone."),confirmLabel:(0,c.default)("Delete"),cancelLabel:(0,c.default)("Cancel"),async:!0,hasDanger:!0});return p.default.trigger("show:modal",e),e}var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(5),u=r(l),d=n(6),c=r(d),f=n(9),p=r(f),h=n(129),m=r(h),v=n(37),g=r(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.generator,n=i(e),a=n.promise.then(function(){var e=t.destroy();return e.fail(function(e){u.default.trigger("show:alert",{type:"error",message:(0,o.default)("Unable to stop generating these versions.")})}),e.always(function(){n.hide()}),e});return a}function i(e){var t=e.generator.get("title"),n=t?(0,
o.default)("Removing this item will delete all versions created by {1}. Are you sure you want to continue?",t):(0,o.default)("Removing this item will delete all related versions. Are you sure you want to continue?"),a=new c.default({title:(0,o.default)("Delete Versions"),message:n,confirmLabel:(0,o.default)("Remove"),cancelLabel:(0,o.default)("Cancel"),async:!0,hasDanger:!0});return u.default.trigger("show:modal",a),a}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),o=r(s),l=n(9),u=r(l),d=n(37),c=r(d);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.generator,n=o.default.result(t,"url")+"/"+e.ratingKey+"/disable",a=i(),r=a.promise.then(function(){var e=o.default.extend(t.server.getXHROptions(n),{type:"PUT"}),i=u.default.ajax(e).promise();return i.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem disabling this version.")})}),i.always(function(){a.hide()}),i});return r}function i(){var e=new m.default({title:(0,
c.default)("Remove Version"),message:(0,c.default)("Are you sure you want to delete this version? You can enable it again in Optimized Versions Settings."),confirmLabel:(0,c.default)("Remove"),cancelLabel:(0,c.default)("Cancel"),async:!0,hasDanger:!0});return p.default.trigger("show:modal",e),e}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(5),u=r(l),d=n(6),c=r(d),f=n(9),p=r(f),h=n(37),m=r(h);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){
var t=e.generator,n=s.default.result(t,"url")+"/"+e.ratingKey+"/enable",a=s.default.extend(t.server.getXHROptions(n),{type:"PUT"}),i=l.default.ajax(a).promise();return i.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem enabling this version.")})}),i}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){
var t=e.generator,n=e.ratingKey,a=s.default.result(t,"url");n&&(a+="/"+n),a+="/reprocess";var i=s.default.extend(t.server.getXHROptions(a),{type:"PUT"}),r=l.default.ajax(i).promise();return r.fail(function(e){var t=n?(0,d.default)("There was a problem processing this item."):(0,d.default)("There was a problem processing these items.");f.default.trigger("show:alert",{type:"error",message:t})}),r}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.items,n=e.item;t||(t=[n]),n||(n=o.default.first(t));var a=n.get("Media");if(1===t.length&&a.length>1&&n.server.supports("specificMediaDeletion"))return g.default.execute("deleteMediaItem",{item:n});var r=i({item:n,items:t}),s=r.promise,l=s.then(function(){var n=o.default.map(t,function(t){return g.default.execute("deleteItem",{item:t,skipRedirect:e.skipRedirect})});return u.default.when.apply(u.default,n).always(function(){
r.hide()})});return l}function i(e){var t,n,a=e.item,i=e.items,r=i.length>1,s=m.default.get(a.get("type"));r?(t=s.plural,n=(0,c.default)("Are you sure you want to delete {1} items from your filesystem?",i.length)):(t=s.title,n=(0,c.default)("Are you sure you want to delete this item from your filesystem?"));var o={title:(0,c.default)("Delete {1}",t),message:n,confirmLabel:(0,c.default)("Delete"),cancelLabel:(0,c.default)("Cancel"),async:!0,hasDanger:!0};(r||s.child)&&(o.requireDoubleConfirm=!0,o.doubleConfirmMessage=(0,
c.default)("Multiple files may be deleted."),o.doubleConfirmLabel=(0,c.default)("Yes, I'm sure"));var l=new b.default(o);return p.default.trigger("show:modal",l),l}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(5),u=r(l),d=n(6),c=r(d),f=n(9),p=r(f),h=n(40),m=r(h),v=n(17),g=r(v),y=n(37),b=r(y);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=i(e);return t=t.then(function(t){var n=r(),a=n.promise.then(function(){return h.default.execute("deleteFile",{
item:e.item,media:t}).always(function(){n.hide()})});return a})}function i(e){var t=l.default.Deferred(),n=e.item,a=n.get("Media");if(e.index in a)return t.resolve(a[e.index]).promise();var i=new v.default({model:n}),r=i.promise;return r.done(function(e){t.resolve(a[e])}),r.fail(function(){t.reject()}),f.default.trigger("show:modal",i),t.promise()}function r(){var e=new y.default({title:(0,d.default)("Delete File"),message:(0,d.default)("Are you sure you want to delete this file from your filesystem?"),
confirmLabel:(0,d.default)("Delete"),cancelLabel:(0,d.default)("Cancel"),async:!0,hasDanger:!0});return f.default.trigger("show:modal",e),e}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),l=s(o),u=n(6),d=s(u),c=n(9),f=s(c),p=n(17),h=s(p),m=n(1313),v=s(m),g=n(37),y=s(g);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var t=e.item.destroy();t.done(function(){d.default.trigger("navigate","playlists",{serverID:a.id}),n.resolve()}),
t.fail(function(e){d.default.trigger("show:alert",{type:"error",message:(0,l.default)("There was a problem deleting the playlist.")}),n.reject(e)}),t.always(function(e){i.hide()})}var n=s.default.Deferred(),a=e.item.server,i=new f.default({title:(0,l.default)("Delete Playlist"),message:(0,l.default)("Are you sure you want to delete {1}? This cannot be undone.",e.item.get("title")),confirmLabel:(0,l.default)("Delete"),cancelLabel:(0,l.default)("Cancel"),async:!0,hasDanger:!0}),r=i.promise;return r.done(t),
r.fail(function(){n.reject()}),d.default.trigger("show:modal",i),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(6),l=i(o),u=n(9),d=i(u),c=n(37),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=a.destroy({wait:!0});return e?(e.done(function(){var e=u.resolve("appStore");e.dispatch(m.repopulatePage()),n.resolve()}),void e.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,
c.default)("There was a problem deleting the library.")}),n.reject(e)})):void n.resolve()}var n=o.default.Deferred(),a=e.section,i=new g.default({title:(0,c.default)("Delete Library"),message:(0,c.default)("Are you sure you want to delete {1}?",a.get("title")),confirmLabel:(0,c.default)("Delete"),cancelLabel:(0,c.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:(0,c.default)("This cannot be undone."),doubleConfirmLabel:(0,c.default)("Yes, I'm sure"),async:!0,hasDanger:!0}),r=i.promise;
return r.done(t),r.fail(function(){n.reject()}),p.default.trigger("show:modal",i),n.promise().always(function(){i.hide()}),n.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(11),u=r(l),d=n(6),c=i(d),f=n(9),p=i(f),h=n(189),m=r(h),v=n(37),g=i(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=l.default.ajax(i);return e.done(function(e){f.default.trigger("show:alert",{type:"success",message:(0,
d.default)("The preview thumbnails for items in this library were deleted.")})}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem deleting the preview thumbnails for items in this library.")})}),e.always(function(e){r.hide()}),e}var n=e.section,a="/library/sections/"+n.id+"/indexes",i=s.default.extend(n.server.getXHROptions(a),{type:"DELETE"}),r=new h.default({title:(0,d.default)("Delete Preview Thumbnails"),message:(0,d.default)("Are you sure you want to delete the preview thumbnails for items in this library? This cannot be undone."),
confirmLabel:(0,d.default)("Delete"),cancelLabel:(0,d.default)("Cancel"),async:!0,hasDanger:!0}),o=r.promise;return o=o.then(function(){return t()}),f.default.trigger("show:modal",r),o}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.item,n=t.server,a=t.get("Media"),r=l.default.filter(a,function(e){return!!e.proxyType}),s=i({
item:t,versions:r}),o=s.promise,u=o.then(function(){var e=v.join(["/library/metadata/",t.id],{proxy:1}),i=l.default.extend(n.getXHROptions(e),{type:"DELETE"}),o=d.default.ajax(i);return o.done(function(){l.default.each(r,function(e){a.splice(l.default.indexOf(a,e),1)}),t.trigger("change:Media",t,t.get("Media"))}),o.fail(function(e){var t=403===e.status?(0,f.default)("Ensure that media deletion is enabled for library content in your server settings."):(0,f.default)("There was a problem deleting these versions.");
h.default.trigger("show:alert",{type:"error",message:t})}),o.always(function(){s.hide()}),o.promise()});return u}function i(e){var t,n=e.item,a=e.versions,i=a.length>1;if(i)t=(0,f.default)("Are you sure you want to delete {1} versions of {2}?",a.length,n.get("title"));else{var r=l.default.first(a);t=(0,f.default)("Are you sure you want to delete the {1} version of {2}?",r.title,n.get("title"))}var s=new y.default({title:i?(0,f.default)("Delete Versions"):(0,f.default)("Delete Version"),message:t,
confirmLabel:(0,f.default)("Delete"),cancelLabel:(0,f.default)("Cancel"),async:!0,hasDanger:!0});return h.default.trigger("show:modal",s),s}var r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=r(o),u=n(5),d=r(u),c=n(6),f=r(c),p=n(9),h=r(p),m=n(23),v=s(m),g=n(37),y=r(g);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){s.default.each(r,function(e){var t="/library/sections/"+e+"/emptyTrash",n=s.default.extend(i.getXHROptions(t),{
type:"PUT"});o.push(l.default.ajax(n))});var e=l.default.when.apply(l.default,o);e.done(function(){f.default.trigger("show:alert",{type:"success",message:(0,d.default)("The trash was emptied.")}),n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem emptying the trash.")}),n.reject(e)}),e.always(function(e){c.hide()})}var n=l.default.Deferred(),a=e.section,i=a?a.server:e.server,r=[],o=[];if(a)r.push(a.id);else{var u=i.get("sections");
u.each(function(e){r.push(e.id)})}var c=new h.default({title:(0,d.default)("Empty Trash"),message:(0,d.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:(0,d.default)("Empty"),cancelLabel:(0,d.default)("Cancel"),async:!0}),p=c.promise;return p.done(t),p.fail(function(){n.reject()}),f.default.trigger("show:modal",c),
n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t,n,a;e.item?(n=e.item,a=[n]):e.items&&(a=e.items,n=a[0]);var i=s.default.extend({},e,{watched:!1}),r=n.get("type"),o=f.default.get(r),u=o&&"directory"===o.element,c=(u||a.length>1)&&!e.force,p=1===a.length,m=p&&n.get("isSection")?n.getSyncTitle():n.get("title");if(c){
var g;switch(n.get("type")){case"movie":g=p?(0,l.default)("Are you sure you want to mark {1} as unwatched?",m):(0,l.default)("Are you sure you want to mark these movies as unwatched?");break;case"show":case"season":case"episode":g=p?(0,l.default)("Are you sure you want to mark all episodes of {1} as unwatched?",m):(0,l.default)("Are you sure you want to mark these episodes as unwatched?");break;default:g=p?(0,l.default)("Are you sure you want to mark {1} as unwatched?",m):(0,l.default)("Are you sure you want to mark these items as unwatched?");
}var y=new v.default({title:(0,l.default)("Mark as Unwatched"),message:g}),b=y.promise;t=b.then(function(){return h.default.execute("updateWatchedStatus",i)}),d.default.trigger("show:modal",y)}else t=h.default.execute("updateWatchedStatus",i);return t}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(6),l=i(o),u=n(9),d=i(u),c=n(40),f=i(c),p=n(17),h=i(p),m=n(37),v=i(m);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t,n,a;e.item?(n=e.item,
a=[n]):e.items&&(a=e.items,n=a[0]);var i=s.default.extend({},e,{watched:!0}),r=n.get("type"),o=f.default.get(r),u=o&&"directory"===o.element,c=(u||a.length>1)&&!e.force,p=1===a.length,m=p&&n.get("isSection")?n.getSyncTitle():n.get("title");if(c){var g;switch(n.get("type")){case"movie":g=p?(0,l.default)("Are you sure you want to mark {1} as watched?",m):(0,l.default)("Are you sure you want to mark these movies as watched?");break;case"show":case"season":case"episode":g=p?(0,l.default)("Are you sure you want to mark all episodes of {1} as watched?",m):(0,
l.default)("Are you sure you want to mark these episodes as watched?");break;default:g=p?(0,l.default)("Are you sure you want to mark {1} as watched?",m):(0,l.default)("Are you sure you want to mark these items as watched?")}var y=new v.default({title:(0,l.default)("Mark as Watched"),message:g}),b=y.promise;t=b.then(function(){return h.default.execute("updateWatchedStatus",i)}),d.default.trigger("show:modal",y)}else t=h.default.execute("updateWatchedStatus",i);return t}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r),o=n(6),l=i(o),u=n(9),d=i(u),c=n(40),f=i(c),p=n(17),h=i(p),m=n(37),v=i(m);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(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 a=c.join(["/library/metadata/",t.id,"/match"],n),i=o.default.extend(t.server.getXHROptions(a),{type:"PUT"});return u.default.ajax(i).promise();
}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(23),c=r(d);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=l.default.ajax(o);e.done(function(){n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem merging these items.")}),n.reject(e)}),e.always(function(e){u.hide()})}var n=l.default.Deferred(),a=e.item,i=s.default.pluck(e.items,"id").join(","),r="/library/metadata/"+a.id+"/merge?ids="+i,o=s.default.extend(a.server.getXHROptions(r),{
type:"PUT"}),u=new h.default({title:(0,d.default)("Merge"),message:(0,d.default)("Are you sure you want to merge these items together?"),async:!0}),c=u.promise;return c.done(t),c.fail(function(){n.reject()}),f.default.trigger("show:modal",u),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=l.default.ajax(r);
e.done(function(){f.default.trigger("show:alert",{type:"success",message:(0,d.default)("The database was optimized.")}),n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem optimizing this database.")}),n.reject(e)}),e.always(function(e){o.hide()})}var n=l.default.Deferred(),a=e.server,i="/library/optimize",r=s.default.extend(a.getXHROptions(i),{type:"PUT"}),o=new h.default({title:(0,d.default)("Optimize Database"),message:(0,d.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:(0,d.default)("Optimize"),cancelLabel:(0,d.default)("Cancel"),async:!0}),u=o.promise;return u.done(t),u.fail(function(){n.reject()}),f.default.trigger("show:modal",o),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.item,n=e.rating,a=t.get("userRating");if(t.set("userRating",n),e.passive)return o.default.Deferred().resolve().promise();
var i={key:t.get("ratingKey"),identifier:t.get("identifier"),rating:n},r=p.join("/:/rate",i),s=o.default.ajax(t.server.getXHROptions(r));return s.fail(function(){t.set("userRating",a),c.default.trigger("show:alert",{type:"error",message:(0,u.default)("There was a problem rating this item.")})}),s.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(6),u=i(l),d=n(9),c=i(d),f=n(23),p=r(f);t.default=a,e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t,n;return e.item?(t=e.item,n=[t]):(n=e.items,t=n[0]),l.default.when.apply(l.default,s.default.map(n,function(e){var n="/library/metadata/"+e.id+"/refresh",a=s.default.extend(t.server.getXHROptions(n),{type:"PUT"});return l.default.ajax(a).promise()})).fail(function(e){503===e.status?f.default.trigger("show:modal",new h.default({model:t.server})):f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem refreshing.")})})}var i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(251),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var t=s.default.extend(a.server.getXHROptions(i),{type:"PUT"}),o=l.default.ajax(t);o.done(function(){var t,i=a.get("type");t="show"===i||"artist"===i||"album"===i?"Location":"Media",a.set(t,a.get(t).slice(0,1)),e.skipNavigate||f.default.trigger("navigate:back"),n.resolve()}),o.fail(function(e){
f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem splitting this item apart.")}),n.reject(e)}),o.always(function(e){r.hide()})}var n=l.default.Deferred(),a=e.item,i="/library/metadata/"+a.id+"/split",r=new h.default({title:(0,d.default)("Split Apart"),message:(0,d.default)("Are you sure you want to split this item apart?"),async:!0}),o=r.promise;return o.done(t),o.fail(function(){n.reject()}),f.default.trigger("show:modal",r),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.item,n="/library/metadata/"+t.id+"/unmatch",a=s.default.extend(t.server.getXHROptions(n),{type:"PUT"}),i=l.default.ajax(a);return i.fail(function(){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem unmatching this item.")})}),i.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=l.default.ajax(m);e.done(function(){n.resolve()}),e.fail(function(e){if(503===e.status)f.default.trigger("show:modal",new v.default({model:o}));else{var t=r?(0,d.default)("There was a problem canceling the update."):(0,d.default)("There was a problem updating the library.");f.default.trigger("show:alert",{type:"error",message:t})}n.reject(e);
})}var n=l.default.Deferred(),a=e.section,i=a?a.id:"all",r=e.cancel,o=a?a.server:e.server,u=e.params||{},c={};u.force&&(c.force=1);var p="/library/sections/"+i+"/refresh",m=s.default.extend(o.getXHROptions(p),{data:c});if(r&&(m.type="DELETE",a&&a.set("refreshing",!1)),c.force){var g=new h.default({title:(0,d.default)("Refresh All"),message:(0,d.default)("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:(0,
d.default)("Refresh"),cancelLabel:(0,d.default)("Cancel")}),y=g.promise;y.done(t),y.fail(function(){n.reject()}),f.default.trigger("show:modal",g)}else t();return n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p),m=n(251),v=i(m);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){m&&(m.stop(),m.stopListening())}function i(e){a(),m=f.default.getInstance(e.type,{forceLocal:!0
});var t=new h.default({playQueueItem:e.model,playQueue:e.playQueue,volume:e.volume}),n=m.load({model:t,autoplay:e.autoplay,offset:e.offset});return m.listenTo(l.default,"audio:fadeOut",function(t){t.exceptKey!==e.model.get("key")&&m.fadeOut()}),m.listenTo(l.default,"audio:stop",function(){m.stop()}),m.listenTo(t,"change:stopped",function(e,t){t&&a()}),n}function r(e){return e?void(v||(0,d.default)(e).then(i)):a()}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),l=s(o),u=n(490),d=s(u),c=n(172),f=s(c),p=n(293),h=s(p),m=null,v=!1;
l.default.on("show:player",function(){v=!0}),l.default.on("hide:player",function(){v=!1}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=(0,o.resolve)("appModel").get("primaryPlayer");return e=s.default.extend({},e,{confirmClearPlayQueue:function(){var e=new m.default({title:(0,u.default)("Play Now"),message:(0,u.default)("This will clear the contents of Up Next and play the selection instead.")});return c.default.trigger("show:modal",e),e.promise},supportsContinuous:!t||(0,
s.default)(t.get("protocolCapabilities")).contains("playqueues")}),(0,p.default)(e).progress(function(e){return c.default.trigger("show:playerLoading",e)}).then(function(e){return c.default.trigger("show:player",e)}).fail(function(e){return c.default.trigger("hide:playerLoading",e)})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(11),l=n(6),u=i(l),d=n(9),c=i(d),f=n(490),p=i(f),h=n(37),m=i(h);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){
var t=e.item,n=t.server.get("playQueueManager").getFor(t);if(n){var a=c.resolve("appModel"),i=a.get("primaryPlayer");if(i){var r=i.get("protocolCapabilities");if(!o.default.contains(r,"playqueues"))return m.default.trigger("show:alert",{type:"error",message:(0,p.default)("The connected player doesn't support queueing.")}),u.default.Deferred().resolve().promise()}return n.queueContent(t,e)}return g.default.execute("playMedia",{item:t})}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(11),c=r(d),f=n(6),p=i(f),h=n(9),m=i(h),v=n(17),g=i(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=o.default.Deferred(),n=e.server;if(!n.supports("transientToken"))return t.resolve(n.get("accessToken")).promise();var a={type:e.type||"delegation",scope:e.scope||"all"},i=c.join("/security/token",a),r=o.default.ajax(n.getXHROptions(i));return r.done(function(e){var n=u.default.parseXML(e);t.resolve(n.token)}),r.fail(function(e){
t.reject(e)}),t.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(39),u=i(l),d=n(23),c=r(d);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.server,n={download:e.download===!1?"0":"1"},a=c.join("/updater/check",n),i=o.default.extend(t.getXHROptions(a),{type:"PUT"}),r=e.initialState||"checking",s=t.get("update");s.set("state",r);var l=u.default.ajax(i).promise();return l.fail(function(){s.set("state","error");
}),l}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(5),u=i(l),d=n(23),c=r(d);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var i=a.fetch();i.done(function(){var i=a.get("mappingState"),r=e.value&&"unknown"===i,s=!e.value&&"mapped"===i;"waiting"===i||r||s?n||(n=setInterval(t,u)):(n=clearInterval(n),a.isWaiting()&&a.set("remoteAccessState",""),o.resolve())})}var n,a=e.cloudAccount,i=a.server.get("settings"),r=i.get("PublishServerOnPlexOnlineKey"),o=s.default.Deferred(),u=500;
if(!a.isWaiting()){var c=e.value?"connecting":"disconnecting";a.set("remoteAccessState",c)}var f=a.previous("remoteAccessState"),p=r.save({PublishServerOnPlexOnlineKey:e.value},{timeout:0});return p.done(t),p.fail(function(t){var n;n=e.value?(0,l.default)("There was a problem connecting your server."):(0,l.default)("There was a problem disconnecting your server."),d.default.trigger("show:alert",{type:"error",message:n}),a.set("remoteAccessState",f),o.reject(t)}),o.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(5),s=i(r),o=n(6),l=i(o),u=n(9),d=i(u);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=a.get("update");e.set("state","installing");var t=l.default.ajax(r).promise();return t.fail(function(){e.set("state","error")}),t}var n,a=e.server,i="/updater/apply",r=s.default.extend(a.getXHROptions(i),{type:"PUT"});a.get("activeConnection").get("isLoopback")||(n=new h.default({title:(0,d.default)("Remote Installation"),confirmLabel:(0,d.default)("Continue"),
cancelLabel:(0,d.default)("Cancel"),message:(0,d.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}),f.default.trigger("show:modal",n));var o=n?n.promise:l.default.Deferred().resolve().promise();return o=o.then(function(){return t()})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(37),h=i(p);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.cloudAccount,n={cloudAccount:t,value:!1},a=l.default.execute("connectServer",n);return a=a.then(function(){return n.value=!0,l.default.execute("connectServer",n)}),a=a.then(function(){if(t.get("mappingError"))return s.default.Deferred().reject().promise()})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(17),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";
function a(e){var t=new w.default({machineIdentifier:e},{onlyIfCached:!0});if(!d.default.isEmpty(t))return t}function i(e){var t=e.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(l)e=l.destroy({wait:!0});else{var t="/api/servers/"+u.id,n=d.default.extend(o.server.getXHROptions(t),{type:"DELETE"});e=f.default.ajax(n)}if(u){if(u.get("connected")&&"ok"===u.get("myPlexSigninState")){
var a=u.get("cloudAccount");e=e.then(function(){return a.fetch()}),e=e.then(function(){return i(u)})}u.get("connected")===!1?r(u):e.always(function(){y.default.trigger("test:server",u),u.populate().fail(function(){r(u)})})}return e.always(function(){p.hide()}),e.promise()}var n,s=h.resolve("appModel"),o=s.get("user"),l=e.device,u=e.server||a(l.get("clientIdentifier"));n=l?(0,v.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."):(0,
v.default)("Are you sure you want to remove this server?");var c={title:(0,v.default)("Remove Server"),message:n,confirmLabel:(0,v.default)("Remove"),cancelLabel:(0,v.default)("Cancel"),async:!0,hasDanger:!0};l&&(c.requireDoubleConfirm=!0,c.doubleConfirmMessage=(0,v.default)("Are you sure you want to remove this server?"),c.doubleConfirmLabel=(0,v.default)("Yes, I'm sure"));var p=new _.default(c),m=p.promise;return m=m.then(function(){return t()}),y.default.trigger("show:modal",p),m}var o=n(1).default,l=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=o(u),c=n(5),f=o(c),p=n(11),h=l(p),m=n(6),v=o(m),g=n(9),y=o(g),b=n(72),w=o(b),P=n(37),_=o(P);t.default=s,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=d.default.Deferred(),n=e.cloudAccount,a=e.claim,r=void 0!==a&&a,s=(0,c.resolve)("appModel").get("cloudServer"),o=n.server,u=void 0;if(r){var f=s.getXHROptions("/api/claim/token");u=d.default.ajax(i({},f,{type:"GET"})),u=u.then(function(e){var t=b.default.parseXML(e),n=t.token,a=o.getXHROptions(p.join("/myplex/claim",{
token:n}));return d.default.ajax(i({},a,{type:"POST"}))})}else{var h=e.username,v=e.password,y=o.getXHROptions(p.join("/myplex/account",{username:h,password:v}));u=d.default.ajax(i({},y,{type:"PUT"}))}return u.done(function(a){var i=l.default.isObject(a)?a:b.default.parseXML(a);i&&"invalid"===i.signInState?(g.default.trigger("show:alert",{type:"error",message:(0,m.default)("The username or password is incorrect.")}),t.reject()):(o.get("accessToken")||o.set("accessToken",s.get("accessToken")),n.set("signedIn",!0),
o.set({myPlexSigninState:"ok",myPlexUsername:e.username}),t.resolve())}),u.fail(function(e){n.get("signedIn")===!0&&n.set("signedIn",!1);var a=void 0;a=401===e.status?(0,m.default)("The username or password is incorrect."):(0,m.default)("There was a problem signing in to Plex."),g.default.trigger("show:alert",{type:"error",message:a}),t.reject(e)}),t.promise()}var i=n(12).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=r(o),u=n(5),d=r(u),c=n(11),f=n(23),p=s(f),h=n(6),m=r(h),v=n(9),g=r(v),y=n(46),b=r(y);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.cloudAccount,n=t.destroy({timeout:0});return n.done(function(){t.server.set({myPlexSigninState:"none",myPlexSubscription:!1})}),n.fail(function(){l.default.trigger("show:alert",{type:"error",message:(0,s.default)("There was a problem signing the server out.")})}),n.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(9),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t=l.default.Deferred(),n=e.cloudAccount;n.set("signedIn",!1),n.set({username:"",email:"",password:""});var a=n.save({username:e.username,email:e.email,password:e.password});return a.done(function(e){var a=s.default.isObject(e)?e:h.default.parseXML(e);if(a&&"invalid"===a.signInState){var i;h.default.parseArray(a,"Error"),i=a.Error.length?s.default.first(a.Error).error:(0,d.default)("This account information is invalid."),f.default.trigger("show:alert",{type:"error",message:i
}),t.reject()}else n.set("signedIn",!0),t.resolve()}),a.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem signing up for a Plex account.")}),t.reject(e)}),t.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c),p=n(39),h=i(p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t,n=e.server,a=e.connection,i=n.get("friendlyName"),r=(new Date).getTime(),o=n.resolveUrl("/web/img/blank.png?cb="+r,{
connection:a}),u=s.default.Deferred();(0,l.default)("[Servers] Testing image for %s at %s",i,o);var d=new Image;return d.onload=function(){d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),l.default.info("[Servers] Image test for %s at %s was successful",i,o),u.resolve(n,a)},d.onerror=d.onabort=function(){d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),l.default.warn("[Servers] %s at %s unavailable",i,o),u.reject(n,a)},t=setTimeout(function(){d.onload=d.onerror=d.onabort=null,d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
l.default.warn("[Servers] %s at is unavailable (Timeout)",i,o),u.reject(n,a)},5e3),d.src=o,u.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(26),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=d.default.get("dismissedUnclaimedServers"),n=t.indexOf(e.id)>-1,a=s.default.history.getFragment();n||/^\!\/setup/.test(a)||l.default.trigger("show:bar","alertbar",new f.default({model:e}))}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var r=n(41),s=i(r),o=n(9),l=i(o),u=n(35),d=i(u),c=n(1163),f=i(c);e.exports=t.default},function(e,t,n){"use strict";function a(e){s.default.trigger("show:modal",new l.default({collection:e.collection}))}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),s=i(r),o=n(1317),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=n.save(null,{force:!0});n.trigger("destroy",n,a),e.done(function(){d.fetch(),l.get("friends").fetch(),
l.get("sentInvites").fetch(),n.get("server")&&l.server.get("resources").fetch(),f.resolve()}),e.fail(function(e){g.default.trigger("show:alert",{type:"error",message:(0,m.default)("There was a problem accepting this invite.")}),a.add(n,{at:s}),f.reject(e)})}var n=e.invite,a=n.collection,s=a.indexOf(n),o=p.resolve("appModel"),l=o.get("user"),d=l.get("homeUsers"),f=c.default.Deferred();u.default.extend(e,{homeUsers:d,signedInHomeUser:d.get(l.id)});var h=i(e);return h.done(function(){r(e).always(t)}),
h.fail(function(){f.reject()}),f.promise}function i(e){if(!e.invite.get("home"))return c.default.Deferred().resolve().promise();var t;t=e.homeUsers.length>1?e.signedInHomeUser.get("admin")?(0,m.default)("You are the admin in your current home. If you leave, the remaining users will be removed and managed users will be deleted."):(0,m.default)("Are you sure you want to join this home? You will leave your current home."):(0,m.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 n=new b.default({title:(0,m.default)("Join Home"),message:t,confirmLabel:(0,m.default)("Join"),cancelLabel:(0,m.default)("Cancel"),hasDanger:!0});return g.default.trigger("show:modal",n),n.promise}function r(e){if(e.invite.get("home")&&!e.signedInHomeUser.get("protected")){var t=new P.default({model:e.signedInHomeUser,isEditing:!0,isEditWarning:!0});return g.default.trigger("show:modal",t),t.promise}return c.default.Deferred().resolve().promise()}var s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(3),u=s(l),d=n(5),c=s(d),f=n(11),p=o(f),h=n(6),m=s(h),v=n(9),g=s(v),y=n(37),b=s(y),w=n(200),P=s(w);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.syncItem,n=e.server;if(!t.server.get("connected"))return c.default.trigger("show:alert",{type:"error",message:(0,u.default)("Please sign in to remove sync items.")}),o.default.Deferred().reject().promise();var a=i(),r=a.promise.then(function(){var e=t.destroy();return e.fail(function(e){c.default.trigger("show:alert",{
type:"error",message:(0,u.default)("There was a problem removing this sync item.")})}),e.always(function(){a.hide()}),e});return r=r.then(function(){return p.default.execute("refreshSyncLists",{server:n,silent:!0,skipContent:!0})})}function i(){var e=new m.default({title:(0,u.default)("Stop Syncing"),message:(0,u.default)("Are you sure you want to stop syncing this item? All files created by this job will be removed from the device."),confirmLabel:(0,u.default)("Remove"),cancelLabel:(0,u.default)("Cancel"),
async:!0,hasDanger:!0});return c.default.trigger("show:modal",e),e}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=r(s),l=n(6),u=r(l),d=n(9),c=r(d),f=n(17),p=r(f),h=n(37),m=r(h);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return i().then(r).then(s)}function i(){var e=d.default.Deferred(),t=f.resolve("appModel"),n=t.get("user"),a=!!n.get("subscription").get("features").get("home");if(a||n.get("homeUsers").length>1){var i=n.get("homeUsers").findWhere({
guest:!0}),r=n.get("homeDetails");if(i)e.resolve(i);else{var s=r.populate();s.done(function(){i=new v.default({id:r.get("guestUserID"),guest:!0},{server:n.server}),e.resolve(i)}),s.fail(function(){e.reject()})}}else e.reject();return e.promise()}function r(e){return h.default.execute("authenticateWithServer",{homeUser:e})}function s(e){var t=d.default.Deferred(),n=f.resolve("appModel"),a=n.get("user"),i=a.clearAccessToken();return i.always(function(){var n=a.signIn(e);n.always(function(){t.resolve();
})}),t.promise()}var o=n(1).default,l=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(5),d=o(u),c=n(11),f=l(c),p=n(17),h=o(p),m=n(297),v=o(m);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=c.resolve("appModel"),n=t.get("user"),a=[],i={url:e.item.get("url"),message:e.message};u.default.each(e.playlistIDs,function(e){var t=g.join(["/pms/playlists/",e,"/items"],i),r=u.default.extend(n.server.getXHROptions(t),{type:"POST"});a.push(o.default.ajax(r));
});var r=o.default.when.apply(o.default,a);return r.fail(function(e){m.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem recommending this item.")})}),r.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(3),u=i(l),d=n(11),c=r(d),f=n(6),p=i(f),h=n(9),m=i(h),v=n(23),g=r(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.server,n="/sync/refreshSynclists",a=s.default.extend(t.getXHROptions(n),{
type:"PUT"}),i=l.default.ajax(a);return e.skipContent||(i=i.then(function(e){var n="/sync/refreshContent",a=s.default.extend(t.getXHROptions(n),{type:"PUT"});return l.default.ajax(a)})),i.done(function(){e.silent||f.default.trigger("show:alert",{type:"success",message:(0,d.default)("Synced items were refreshed.")})}),i.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(6),d=i(u),c=n(9),f=i(c);t.default=a,e.exports=t.default},function(e,t,n){
"use strict";function a(e){function t(){var t=n.destroy({wait:!0});return t.done(function(){if(n.get("server")){var e=u.resolve("appModel"),t=e.get("user");t.get("friends").fetch()}}),t.fail(function(){r(e)}),t.always(function(){a.hide()}),t.promise()}var n=e.invite,a=i(e),s=a.promise;return s=s.then(function(){return t()}),p.default.trigger("show:modal",a),s}function i(e){var t,n;"requests"===e.subset?(t=(0,c.default)("Reject Invite"),n=(0,c.default)("Are you sure you want to reject this invite?")):(t=(0,
c.default)("Cancel Invite"),n=(0,c.default)("Are you sure you want to cancel this invite?"));var a=new m.default({title:t,message:n,async:!0});return a}function r(e){var t;t="requests"===e.subset?(0,c.default)("There was a problem rejecting this invite."):(0,c.default)("There was a problem canceling this invite."),p.default.trigger("show:alert",{type:"error",message:t})}var s=n(8).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(11),u=s(l),d=n(6),c=o(d),f=n(9),p=o(f),h=n(37),m=o(h);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=s.default.Deferred(),t=(0,o.resolve)("appModel"),n=t.get("user");return n.get("isLocked")?e.reject():e.resolve(),e.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(11);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=a.destroy({wait:!0});return e.fail(function(){l.default.trigger("show:alert",{type:"error",message:(0,s.default)("There was a problem removing this device.")
})}),e.always(function(){i.hide()}),e.promise()}var n,a=e.device;n=a.get("isCloudSync")?(0,s.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."):(0,s.default)("If you remove this device, you will need to sign in again on the device to restore access to Plex.");var i=new d.default({title:(0,s.default)("Remove Device"),message:n,confirmLabel:(0,s.default)("Remove"),cancelLabel:(0,s.default)("Cancel"),
async:!0,hasDanger:!0}),r=i.promise;return r=r.then(function(){return t()}),l.default.trigger("show:modal",i),r}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),s=i(r),o=n(9),l=i(o),u=n(37),d=i(u);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){a&&n.set("home",!1);var e=n.destroy({wait:!0});return e.done(function(){var e=l.resolve("appModel"),t=e.get("user"),i=n.get("serverShares");if(t.get("invites").fetch(),t.get("sentInvites").fetch(),
a){var r=t.get("homeUsers");r.fetch()}i.getLibraryCount({owned:!1})&&t.server.get("resources").fetch()}),e.fail(function(){a&&n.set("home",!0),f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem removing this friend.")})}),e.always(function(){r.hide()}),e.promise()}var n=e.friend,a=n.get("home"),r=i(e),s=r.promise;return s=s.then(function(){return t()}),f.default.trigger("show:modal",r),s}function i(e){var t=e.friend,n=t.get("serverShares"),a=n.getLibraryCount({
owned:!0}),i=n.getLibraryCount({owned:!1}),r=a+i,s=t.get("title"),o=(0,d.default)("Are you sure you want to remove {1}?",s),u=(0,h.default)((0,d.default)("library"),r,(0,d.default)("libraries"));if(a&&i?o+=" "+(0,d.default)("You are sharing {1} {2} with each other.",r,u):a?o+=" "+(0,d.default)("You are sharing {1} {2} with this friend.",a,u):i&&(o+=" "+(0,d.default)("This friend is sharing {1} {2} with you.",i,u)),t.get("home")){var c=l.resolve("appModel"),f=c.get("user"),p=f.get("homeUsers"),m=p.get(f.id);
o+=m.get("admin")?" "+(0,d.default)("This friend will be removed from your home."):" "+(0,d.default)("You will be leaving your home.")}var g=new v.default({title:(0,d.default)("Remove Friend"),message:o,confirmLabel:(0,d.default)("Remove"),cancelLabel:(0,d.default)("Cancel"),async:!0,hasDanger:!0});return g}var r=n(8).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),l=r(o),u=n(6),d=s(u),c=n(9),f=s(c),p=n(183),h=s(p),m=n(37),v=s(m);t.default=a,e.exports=t.default;
},function(e,t,n){"use strict";function a(e){function t(){var t=u.default.extend(n.server.getXHROptions(n.url()),{type:"DELETE"}),a=c.default.ajax(t);return a.done(function(){var e=l.get(n.id);e?(n.trigger("destroy",n,o),n.get("restricted")?e.trigger("destroy",e,l):e.set("home",!1)):(o.reset([n]),n.set("admin",!0),l.each(function(e){e.set("home",!1)}));var t=s.hasHome();if(s.set("home",t),!t){var a=s.get("homeDetails");a.clear()}}),a.fail(function(){r(e)}),a.always(function(){d.hide()}),a.promise();
}var n=e.homeUser,a=p.resolve("appModel"),s=a.get("user"),o=s.get("homeUsers"),l=s.get("friends"),d=i(e),f=d.promise;return f=f.then(function(){return t()}),g.default.trigger("show:modal",d),f}function i(e){var t,n,a,i=e.homeUser;e.isSignedInUser?(t=(0,m.default)("Leave Home"),a=(0,m.default)("Leave"),n=i.get("admin")?(0,m.default)("You are the admin in this home. If you leave, the remaining users will be removed and managed users will be deleted."):(0,m.default)("Are you sure you want to leave this home?")):(t=(0,
m.default)("Remove User"),a=(0,m.default)("Remove"),n=i.get("restricted")?(0,m.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."):(0,m.default)("You will no longer be able to switch to this user."));var r=new b.default({title:t,message:n,confirmLabel:a,cancelLabel:(0,m.default)("Cancel"),async:!0,hasDanger:!0});return r}function r(e){var t;t=e.isSignedInUser?(0,m.default)("There was a problem leaving this home."):(0,
m.default)("There was a problem removing this user."),g.default.trigger("show:alert",{type:"error",message:t})}var s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(5),c=s(d),f=n(11),p=o(f),h=n(6),m=s(h),v=n(9),g=s(v),y=n(37),b=s(y);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(){var e=i.destroy({wait:!0});return e.done(function(){var e=o.resolve("appModel"),t=e.get("user");t.get("friends").fetch(),t.get("invites").fetch(),
t.server.get("resources").fetch()}),e.fail(function(){var e;e=i.get("owned")?(0,u.default)("There was a problem removing this share."):(0,u.default)("There was a problem leaving this server."),c.default.trigger("show:alert",{type:"error",message:e})}),e.always(function(){r.hide()}),e.promise()}var n,a,i=e.serverShare;i.get("owned")?(n=(0,u.default)("Stop Sharing"),a=(0,u.default)("Are you sure you want to stop sharing with this friend?")):(n=(0,u.default)("Leave Server"),a=(0,u.default)("Are you sure you want to leave this server? You can rejoin at any time."));
var r=new p.default({title:n,message:a,async:!0,hasDanger:!0}),s=r.promise;return s=s.then(function(){return t()}),c.default.trigger("show:modal",r),s}var i=n(8).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(11),o=i(s),l=n(6),u=r(l),d=n(9),c=r(d),f=n(37),p=r(f);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=c.resolve("appModel"),n=t.get("user"),a=[],i={url:e.item.get("url"),message:e.message};u.default.each(e.networkIDs,function(e){
var t=g.join(["/pms/social/networks/",e,"/share"],i),r=u.default.extend(n.server.getXHROptions(t),{type:"POST"});a.push(o.default.ajax(r))});var r=o.default.when.apply(o.default,a);return r.fail(function(e){m.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem sharing this item.")})}),r.promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(3),u=i(l),d=n(11),c=r(d),f=n(6),p=i(f),h=n(9),m=i(h),v=n(23),g=r(v);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t,n=e.user,a=e.serverShare,i=a.get("Section");if(!i||!i.length)return l.default.Deferred().resolve().promise();t=a.get("allLibraries")?[]:s.default.pluck(s.default.where(i,{shared:!0}),"id");var r={server_id:a.get("machineIdentifier"),shared_server:{library_section_ids:t}};n.isNew()&&(r.sharing_settings=n.getSaveParams()),a.isNew()&&(n.isNew()?r.shared_server.invited_email=n.get("username"):r.shared_server.invited_id=n.id);
var o=a.url(),u=s.default.extend(n.server.getXHROptions(o),{type:a.isNew()?"POST":"PUT",contentType:"application/json",data:JSON.stringify(r)});return l.default.ajax(u).promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=(0,o.resolve)("appModel").get("user"),n=t.get("homeUsers"),a=n.get(t.id);if(a.get("protected")||n.length>1)return s.default.Deferred().reject().promise();
var i=new c.default({model:a,isEditing:!0,isEditWarning:!0});return i.promise.always(function(e){e||u.default.trigger("show:modal",new p.default({type:"home"}))}),u.default.trigger("show:modal",i),i.promise}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(11),l=n(9),u=i(l),d=n(200),c=i(d),f=n(551),p=i(f);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=u.resolve("appModel"),n=t.get("user"),a=e.item.server;if("ok"!==a.get("myPlexSigninState")){
var i=(0,c.default)("This server needs to be connected to Plex to sync its content.");return void p.default.trigger("show:alert",{type:"error",message:i})}if(!a.get("allowSync"))return void p.default.trigger("show:modal",new m.default({model:a}));var r=n.get("devices"),s=r.filterSyncDevices(e.item),l=o.default.clone(e);if(s.length>1){var d=new b.default({collection:s}),f=d.promise;f.done(function(e){l.device=s.get(e),p.default.trigger("show:modal",new g.default(l))}),p.default.trigger("show:modal",d);
}else l.device=s.first(),p.default.trigger("show:modal",new g.default(l))}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(11),u=r(l),d=n(6),c=i(d),f=n(9),p=i(f),h=n(548),m=i(h),v=n(550),g=i(v),y=n(1312),b=i(y);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,u.resolve)("appModel").get("user"),n=s.default.pick(e,"username","email","password"),a=t.server.getXHROptions("/api/v2/users",{
type:"POST",data:n}),i=l.default.ajax(a).promise();return i=i.then(function(n){return e.remember?c.default.restorePrevious():c.default.register(p.default.getInstance()),t.signIn(n,{lockState:_.default.lockStates.UNLOCKED})}),i.fail(function(e){var t=void 0;if(422===e.status){var n=e.responseText&&b.default.parseXML(e.responseText),a=n&&n.error,i=s.default.isArray(a)?s.default.first(a):a;t=i?s.default.isObject(i)?(0,w.getErrorText)(i):i:(0,m.default)("This account information is invalid.")}else t=(0,
m.default)("There was a problem connecting to Plex.");g.default.trigger("show:alert",{type:"error",message:t})}),i}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(11),d=n(84),c=i(d),f=n(217),p=i(f),h=n(6),m=i(h),v=n(9),g=i(v),y=n(46),b=i(y),w=n(228),P=n(128),_=i(P);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.user,n=t.get("homeDetails"),a=t.get("homeSize");n.set("guestEnabled",e.enable);var i=n.save();return i.done(function(){
t.get("homeUsers").fetch(),t.get("friends").fetch(),t.hasHome()||h.default.execute("showHomeWarningsModal"),e.enable||2!==a||n.clear()}),i.fail(function(t){var n=f.default.parseXML(t.responseText),a=n&&n.status;s.default.isString(a)||(a=e.enable?(0,l.default)("Unable to enable guest account"):(0,l.default)("Unable to disable guest account")),d.default.trigger("show:alert",{type:"error",message:a})}),i}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(6),l=i(o),u=n(9),d=i(u),c=n(39),f=i(c),p=n(17),h=i(p);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=l.default.Deferred(),n="/api/users/validate?invited_email="+encodeURIComponent(e.username),a=s.default.extend(e.server.getXHROptions(n),{type:"POST"}),i=l.default.ajax(a);return i.done(function(){t.resolve()}),i.fail(function(e){var n=e.responseText,a=d.default.parseXML(n);t.reject(e,a&&a.status)}),t.promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(5),l=i(o),u=n(39),d=i(u);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=a(i),s=n(1020),o=a(s),l=n(1016),u=a(l);n(1019);var d=new r.default.Application;d.addInitializer(function(){return(0,o.default)().then(function(){return(0,u.default)()})}),t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={allowFlash:!0,allowServerUpdates:!0,allowHttpsMediaServerConnections:!0,
allowMediaServerRelayConnections:!0,allowCloudSyncServers:!0,shouldCreateFlexModels:!0,shouldCreateStateTree:!0};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function a(){l.default.trigger("initialize:app");var e=(0,d.default)();return e=e.then(f.default),e=e.then(h.default),e=e.then(v.default),e=e.then(y.default),e=e.then(w.default),e=e.then(_.default),e=e.then(x.default),e=e.then(T.default),e=e.then(I.default),e=e.then(A.default),e=e.then(O.default),e=e.then(R.default),s.default.mobile&&(e=e.then(N.default)),
e=e.then(B.default),e=e.then(U.default),e=e.then($.default)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(62),s=i(r),o=n(9),l=i(o),u=n(1022),d=i(u),c=n(1031),f=i(c),p=n(1018),h=i(p),m=n(1026),v=i(m),g=n(714),y=i(g),b=n(712),w=i(b),P=n(1021),_=i(P),S=n(1023),x=i(S),C=n(1025),T=i(C),k=n(1027),I=i(k),M=n(715),A=i(M),E=n(1030),O=i(E),D=n(1024),R=i(D),L=n(1029),N=i(L),j=n(1028),U=i(j),F=n(716),B=i(F),z=n(1032),$=i(z);n(678),n(675),n(677),n(674),n(676),e.exports=t.default;
},function(e,t,n){"use strict";function a(){u.default.register(new c.default),p.default.register(new m.default),(0,o.registerAll)({metrics:[b.default,g.default],testServerConnection:P.default}),(0,o.registerAll)({UserFlexModel:k.default,ServerFlexModel:M.default});var e=new C.default;return(0,o.registerAll)({appModel:e,appStore:(0,S.default)(e),logs:new E.default([],{parent:e})}),(0,o.registerAll)({serverManager:new D.default({appModel:e}),primaryServerManager:new L.default({appModel:e}),manualServerManager:new j.default({
appModel:e}),serverConnectionManager:new F.default({appModel:e}),serverConnectionTestManager:new z.default({appModel:e}),serverUpdateManager:new V.default({appModel:e})}),s.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(11),l=n(35),u=i(l),d=n(1042),c=i(d),f=n(216),p=i(f),h=n(932),m=i(h),v=n(687),g=i(v),y=n(685),b=i(y),w=n(695),P=i(w),_=n(1135),S=i(_),x=n(1041),C=i(x),T=n(1100),k=i(T),I=n(1091),M=i(I),A=n(753),E=i(A),O=n(1038),D=i(O),R=n(1037),L=i(R),N=n(727),j=i(N),U=n(730),F=i(U),B=n(731),z=i(B),$=n(1040),V=i($);
e.exports=t.default},function(e,t,n){"use strict";function a(){return u.default.registerAll(c),o.default.Deferred().resolve().promise()}var i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(5),o=i(s),l=n(17),u=i(l),d=n(953),c=r(d);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(1963),r=a(i),s=n(1961),o=a(s),l=n(1962),u=a(l),d=n(1960),c=a(d),f=n(1964),p=a(f),h=n(1958),m=a(h),v=n(1959),g=a(v),y=n(4),b=a(y);b.default.registerPartial("setting",r.default),
b.default.registerPartial("lockableTagInput",o.default),b.default.registerPartial("lockableTextInput",u.default),b.default.registerPartial("lockableNumericInput",c.default),b.default.registerPartial("textInput",p.default),b.default.registerPartial("autocompleteTextInput",m.default),b.default.registerPartial("connectError",g.default)},function(e,t,n){"use strict";function a(){return(0,l.default)().then(function(){return s.default.registerAll()})}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var r=n(935),s=i(r),o=n(1017),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(713),s=i(r),o=n(1034),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var r=n(717),s=i(r),o=n(1035),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(718),s=i(r),o=n(1036),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,o.default)();return e.done(function(){(0,r.resolve)("serverUpdateManager").start()}),e}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var r=n(11),s=n(720),o=i(s);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,r.resolve)("appModel").get("experienceSettings"),t=(0,u.default)();return t=t.then(function(){return(0,o.default)(e.populate())})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(11),s=n(116),o=i(s),l=n(721),u=i(l);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=l.default.Deferred(),t=f.default.get("myPlexAccessToken");
return t.done(function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken||d.default.register(f.default.getInstance())}),t.always(function(){e.resolve()}),e.promise()}function i(){var e=l.default.Deferred(),t=d.default.set("plexTestToken",1);return t.done(function(){d.default.remove("plexTestToken")}),t.fail(function(e){var t=new h.default;v.default.warn("Storage module swapped for "+t.name+' due to exception: "'+e+'"'),f.default.register(t),d.default.register(t,{ignorePrevious:!0})}),t.always(function(){
e.resolve()}),e.promise()}function r(){return a().then(i).then(y.default)}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(5),l=s(o),u=n(84),d=s(u),c=n(217),f=s(c),p=n(692),h=s(p),m=n(26),v=s(m),g=n(722),y=s(g);e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,r.resolve)("appModel").get("user"),t=(0,o.default)();return t.done(function(){var t=new u.default(e);t.start();var n=new c.default;n.start()}),t}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var r=n(11),s=n(723),o=i(s),l=n(1039),u=i(l),d=n(1033),c=i(d);e.exports=t.default},function(e,t,n){"use strict";function a(){function e(e){if((n||arguments[1]instanceof KeyboardEvent&&"esc"===arguments[2])&&f.default.get("keyboardShortcuts"))return e.apply(t,s.default.toArray(arguments).slice(1))}var t=h.default.getInstance(),n=!0;return v.default.on("anyModalOpen",function(){n=!1}),v.default.on("allModalsClosed",function(){n=!0}),s.default.each(t.shortcuts,function(n){d.default.bind(n.keys,s.default.wrap(t[n.fn],e));
}),l.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(3),s=i(r),o=n(5),l=i(o),u=n(2032),d=i(u),c=n(35),f=i(c),p=n(284),h=i(p),m=n(9),v=i(m);e.exports=t.default},function(e,t,n){"use strict";function a(){function e(){s.default.each(m,function(t){document.body.removeEventListener(t,e,!0)});var n=t.src.slice(-h.default.length)===h.default;n&&t.play()}var t=(0,f.default)("audio",!0);try{t.style.cssText="position:absolute;width:1px;height:1px;",
t.setAttribute("src",h.default)}catch(n){d.default.error("An error occurred trying to initialize the audio element.")}return s.default.each(m,function(t){document.body.addEventListener(t,e,!0)}),l.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(3),s=i(r),o=n(5),l=i(o),u=n(26),d=i(u),c=n(465),f=i(c),p=n(1742),h=i(p),m=["touchstart","mousedown","mousemove","click","keydown","keypress"];e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t=!e.get("isShared")||e.supports("sharedSyncStatus");return e.get("isFullServer")&&t}function i(){var e=new f.default({name:"MediaServerEventManager",appModel:(0,l.resolve)("appModel"),isValidServer:a,supportsLongPolling:!1,showTimelineStatus:!0,ServerEventConnection:d.default,ServerRetryManager:h.default});return e.start(),o.default.Deferred().resolve().promise()}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(5),o=r(s),l=n(11),u=n(1142),d=r(u),c=n(418),f=r(c),p=n(417),h=r(p);
e.exports=t.default},function(e,t,n){"use strict";function a(){return new l.default,s.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(868),l=i(o);e.exports=t.default},function(e,t,n){"use strict";function a(){return new d.default,new f.default,new h.default,new v.default,new y.default,new w.default,new _.default,new x.default,l.default.history.start(),s.default.Deferred().resolve().promise()}var i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(5),s=i(r),o=n(41),l=i(o),u=n(1107),d=i(u),c=n(1115),f=i(c),p=n(1109),h=i(p),m=n(1105),v=i(m),g=n(1111),y=i(g),b=n(1113),w=i(b),P=n(1103),_=i(P),S=n(1117),x=i(S);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(11),o=n(31),l=a(o),u=n(9),d=a(u),c=n(48),f=a(c),p=n(1162),h=a(p),m=l.default.extend({mixins:f.default,announcementsUpdateDelay:36e5,
initialize:function(){this.user=(0,s.resolve)("appModel").get("user"),r.default.bindAll(this,"updateAnnouncements","onSignedInChange")},start:function(){var e=r.default.debounce(this.onAnnouncementsChange),t=r.default.debounce(this.onSignedInChange);this.listenTo(this.user,{"change:signedIn":t,"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("announcements").reset(),this.stopListening()},updateAnnouncements:function(){!this.user.get("restricted")&&this.user.server.get("isConnected")&&(this.user.get("announcements").fetch(),this.announcementsUpdateTimeout&&clearTimeout(this.announcementsUpdateTimeout),this.announcementsUpdateTimeout=setTimeout(this.updateAnnouncements,this.announcementsUpdateDelay))},onSignedInChange:function(){this.user.get("announcements").reset(),this.updateAnnouncements();
},onAnnouncementsChange:function(){if(this.user.get("isSignedIn")&&!this.user.get("restricted")){var e=this.user.get("announcements"),t=e.findWhere({style:"priority",read:!1});t&&d.default.trigger("show:bar","alertbar",new h.default({model:t}))}}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=a(i),s=n(140),o=a(s),l=n(724),u=a(l),d=n(334),c=a(d),f=u.default.extend({mixins:c.default,start:function(){u.default.prototype.start.apply(this,arguments),
this.listenTo(r.default,"show:modal",this.onShowModal),this.handleCollectUsageData(o.default)},onShowModal:function(e){e.name&&o.default.trackView(e.name)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(283),r=a(i),s=n(726),o=a(s),l=n(334),u=a(l),d=o.default.extend({mixins:u.default,start:function(){o.default.prototype.start.apply(this,arguments),this.handleCollectUsageData(r.default)}});t.default=d,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),r=n(728),s=a(r),o=n(334),l=a(o),u=s.default.extend({mixins:l.default,start:function(){s.default.prototype.start.apply(this,arguments),this.handleCollectUsageData((0,i.resolve)("metrics"))}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),r=a(i),s=n(729),o=a(s),l=o.default.extend({fetchPrimaryRelations:function(e){
var t=this,n=e.get("isFullOwnedServer"),a=e.get("isShared")&&e.supports("sharedSettings");if((n||a)&&!function(){var n=e.get("settings");n.populate().done(function(){var a=t.appModel.get("primaryServer");a&&a.id===e.id&&t.handlePrimarySettings(e,n)})}(),n){var i=e.get("sessions");i.fetch({reset:!0})}var r=e.get("home"),s=e.get("activeConnection"),o=s.get("isPrivate")||n||r;if(o){var l=this.appModel.get("players");l.reset(),l.setContext("server",e),l.fetch()}},handlePrimarySettings:function(e,t){var n=e.get("shared"),a=t.get("AcceptedEULA"),i=a&&a.get("value")===!1;
!n&&i&&r.default.execute("showTermsOfService",{collection:t})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(732),r=a(i),s=n(17),o=a(s),l=r.default.extend({start:function(){r.default.prototype.start.call(this),this.listenTo(this.servers,"change:isClaimed",this.onClaimedChange)},onClaimedChange:function(e,t){var n=e.get("isFullOwnedServer")&&e.get("isConnected"),a=t===!1&&!e.previous("isClaimed");n&&a&&o.default.execute("showClaimServerAlertBar",e);
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=i(r),o=n(9),l=i(o),u=n(6),d=i(u),c=n(17),f=i(c),p=n(725),h=i(p),m=n(37),v=i(m),g=n(200),y=i(g),b=h.default.prototype,w=h.default.extend({collectionNames:["devices","friends","homeDetails","homeUsers","invites","socialNetworks"],onIsSignedInChange:function(e,t){if(b.onIsSignedInChange.apply(this,arguments),e.get("isFullUser")&&t){var n=e.server.getXHROptions("/api/claim/subscribe");
s.default.ajax(a({},n,{type:"POST"}))}},onIsLockedChange:function(e,t){b.onIsLockedChange.apply(this,arguments),t&&l.default.trigger("show:modal",new y.default({isForced:!0}))},onIsUnlockedChange:function(e,t){t&&f.default.execute("resumePlayQueue",e)},onHasInvalidTokenChange:function(e,t){if(t){var n=new v.default({title:(0,d.default)("Invalid Credentials"),message:(0,d.default)("Your credentials have expired. Please sign in again."),confirmLabel:(0,d.default)("OK"),cancelLabel:(0,d.default)("Ignore")
});n.promise.done(function(){l.default.trigger("navigate","login",{silent:!0})}),l.default.trigger("show:modal",n)}}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(31),o=a(s),l=n(9),u=a(l),d=n(35),c=a(d),f=n(48),p=a(f),h=n(17),m=a(h),v=n(1164),g=a(v),y=o.default.extend({mixins:[p.default],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=r.default.last(t);return!(!n||!n.indexOf("fragment"))},isLastDismissedVersion:function(e){var t=e.get("shortVersion")||"unknown";return t===c.default.get("serverUpdateDismissedVersion")},checkForServerUpdates:function(e){if(e.get("isConnected")&&e.get("updater")){
var t=e.get("update");e.supports("updater")?t.fetch().then(function(){m.default.execute("checkForServerUpdates",{server:e,download:!1})}):this.isLastDismissedVersion(t)||u.default.trigger("show:bar","alertbar",new g.default({model:t}))}},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");return n&&this.stopListening(n.get("update")),t&&t.get("isFullOwnedServer")?(this.listenTo(t.get("update"),"change:state",this.onServerUpdateStateChange),void this.checkForServerUpdates(t)):void clearTimeout(this.bundleUpdatesTimeout);
},onPrimaryServerConnectedChange:function(e,t){this.checkForServerUpdates(e)},onServerUpdateStateChange:function(e,t){this.isLastDismissedVersion(e)||this.isLastHistoryEntry("/settings/server")||/^(available|downloaded|notify)$/.test(t)&&u.default.trigger("show:bar","alertbar",new g.default({model:e}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(8).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(247),o=i(s),l=n(900),u=r(l),d=n(18),c=r(d),f=n(746),p=r(f),h=n(787),m=r(h),v=n(440),g=r(v),y=n(437),b=r(y),w=n(1079),P=r(w),_=n(1094),S=r(_),x=n(1095),C=r(x),T=p.default.extend({
name:"DesktopAppModel",sessionAttrs:a({},p.default.prototype.sessionAttrs,{isFirstRun:c.default.boolean.isRequired,isCastApiAvailable:c.default.boolean.isRequired,isCastDeviceAvailable:c.default.boolean.isRequired,primaryPlayer:c.default.instanceOf(g.default,b.default)}),sessionRelations:a({},p.default.prototype.sessionRelations,{entities:{relationClass:(0,u.default)(o)},players:{relationClass:m.default},multiSelect:{relationClass:P.default},experienceSettings:{relationClass:S.default},ui:{relationClass:C.default
}}),defaults:function(){var e=p.default.prototype.defaults.apply(this,arguments);return a({},e,{isFirstRun:!1,isCastApiAvailable:!1,isCastDeviceAvailable:!1})}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(62),o=a(s),l=n(176),u=a(l),d=n(227),c=a(d),f=n(745),p=a(f),h=p.default.extend({storageKey:"settingsv2",defaults:r.default.extend({},p.default.prototype.defaults,{playThemeMusic:!1,keyboardShortcuts:!0,
showUnwatchedIcons:!1,showAdvancedSettings:!1,allowHttpFallback:c.default.NEVER,companion:!0,localQuality:-1,remoteQuality:8,channelQuality:-1,dash:!0,directPlay:!0,directStream:!0,preferAAC:"wiiu"===o.default.id||"edge"===o.default.id,allowAC3:!1,subtitleSize:100,subtitlesBurnLevel:u.default.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,n;return e=e||{},r.default.has(e,"mediaType")&&r.default.isObject(e.mediaType)&&(n=this.getListTypeKey(e.mediaType)),t=this.get(n)||this.get(e.fallbackKey)||this.get("listType");
},saveListType:function(e,t){var n=this.getListTypeKey(e);this.save(n,t),r.default.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.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(23),l=i(o),u=n(25),d=a(u),c=n(1044),f=a(c),p=d.default.extend({
name:"DownloadServerCollection",context:["server"],url:function(){var e=s.default.result(this.server,"url");return l.join([e,"api/downloads/1"])},model:f.default});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(1045),u=a(l),d=o.default.extend({name:"DownloadServerModel",context:["server"],rootPropertyName:"Type",idAttribute:"name",syncedAttrs:{name:r.default.string},syncedRelations:{
platforms:{rootPropertyName:"Platform",relationClass:u.default,options:function(e){return{type:e.name}}}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1046),o=a(s),l=r.default.extend({name:"DownloadServerPlatformCollection",context:["server","type"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(16).default,r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(18),o=r(s),l=n(19),u=r(l),d=n(1047),c=r(d),f=u.default.extend({name:"DownloadServerPlatformModel",context:["server","type"],rootPropertyName:"Platform",idAttribute:"id",syncedAttrs:{id:o.default.string,name:o.default.string,version:o.default.string,date:o.default.integer,requirements:o.default.string,fixed:o.default.string,added:o.default.string,info:o.default.string},syncedRelations:{releases:{rootPropertyName:"Release",relationClass:c.default}},derivedAttrs:{type:function(){return this.type;
}},augmentResponse:function(e){var t=e.release_date,n=e.extra_info,r=e.items_fixed,s=e.items_added,o=i(e,["release_date","extra_info","items_fixed","items_added"]);return a({},o,{info:n,fixed:r,added:s,date:t+"000"})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1048),o=a(s),l=r.default.extend({name:"DownloadServerReleaseCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"DownloadServerReleaseModel",context:["server"],modelId:function(){return this.get("build")+"-"+this.get("distro")},syncedAttrs:{label:r.default.string,build:r.default.string,distro:r.default.string,url:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(1050),u=a(l),d=o.default.extend({name:"ArtworkCollection",context:["server","artworkType"],model:u.default,url:function(){var e=r.default.result(this.parent,"url");return e+"/"+this.artworkType+"s"}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l={POSTER:"poster",ART:"art",BANNER:"banner"},u=o.default.extend({name:"ArtworkModel",context:["server","artworkType"],
idAttribute:"ratingKey",rootPropertyName:"Photo",syncedAttrs:{key:r.default.string,ratingKey:r.default.string,thumb:r.default.string,selected:r.default.boolean}},{types:l});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(518),u=a(l),d=o.default.extend({name:"FilePathModel",context:["server"],idAttribute:"key",rootPropertyName:"Path",sessionAttrs:{isBackShortcut:r.default.boolean
},sessionRelations:{children:function(){return{relationClass:u.default,options:{url:this.id}}}},syncedAttrs:{key:r.default.string,title:r.default.string,path:r.default.string,home:r.default.boolean,network:r.default.boolean}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(519),u=a(l),d=o.default.extend({name:"MatchResultModel",context:["server"],idAttribute:"guid",rootPropertyName:"SearchResult",
syncedAttrs:{id:r.default.integer,guid:r.default.string,name:r.default.string,parentGUID:r.default.string,parentName:r.default.string,type:r.default.string,index:r.default.integer,score:r.default.integer,thumb:r.default.string,year:r.default.integer,matched:r.default.boolean},syncedRelations:{children:function(){return{relationClass:u.default,rootPropertyName:"SearchResult"}}},derivedAttrs:{normalizedScore:function(){var e=this.get("score");if(null!=e)return Math.min(Math.max(e,0),100)}}});t.default=d,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(23),d=i(u),c=n(757),f=a(c),p=n(1058),h=a(p),m=f.default.extend({defaults:function(){return{children:new h.default([],{server:this.server,parent:this})}},findItem:function(e){return this.get("children").get(e)},addContent:function(e){var t=[s.default.result(this,"url"),"items",e.id],n=d.join(t,e.getSaveParams()),a=s.default.extend(e.server.getXHROptions(n),{
type:"PUT"}),i=l.default.ajax(a);return i.then(s.default.bind(function(e){this.set(this.parse(e))},this)),i.promise()}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(9),d=a(u),c=n(39),f=a(c),p=n(23),h=i(p),m=n(174),v=a(m),g=n(288),y=a(g),b=v.default.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=s.default.isObject(e)?e:f.default.parseXML(e);return f.default.parseBoolean(t,"playQueueShuffled"),f.default.parseInteger(t,["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueTotalCount","playQueueVersion"]),
f.default.parseArray(t,"Metadata"),t},parse:function(e,t){s.default.isString(e)&&(e=f.default.replaceXMLElementNames(e,this.metadataElementNames,"Metadata"));var n=this.convert(e);n.id&&(n.playQueueID=n.id);var a=s.default.pick(n,this.whitelistedAttrs);return this.set(a,{silent:!0}),this.pendingChanges=this.changed,this.parseItems(n),a},parseItems:function(e){var t=this.get("collection"),n=e.Metadata,a=!!n.length,i=s.default.pluck(n,"playQueueItemID").indexOf(e.playQueueSelectedItemID),r=e.playQueueSelectedItemOffset,o=r-i;
s.default.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:a}):(t=new y.default(n,{server:this.server,parent:this,parse:a}),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 l.default.Deferred().resolve().promise();
this.set("hasUserAdditions",!0);var n={after:t||-1},a=h.join([s.default.result(this,"url"),"/items/",e,"/move"],n);return this._ajax("PUT",a)},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),a=Math.max(n,0),i=a,r=this.get("playQueueLastAddedItemID");if(null!=r){var s=e.get(r),o=e.indexOf(s);o>a&&(i=o)}return{start:a,end:i}},_ajax:function(e,t){var n=s.default.extend(this.server.getXHROptions(t),{type:e}),a=l.default.ajax(n);
return a.done(s.default.bind(function(e){this.set(this.parse(e)),s.default.isEmpty(this.pendingChanges)||(s.default.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)),a.promise()},onMessageChange:function(e,t){t&&d.default.trigger("show:alert",{type:"error",message:t})}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({idAttribute:"key",whitelistedAttrs:["queueItemID","generatorID","targetTagID","syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","ratingKey","title","thumb"],convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,["queueItemID","generatorID","targetTagID","syncItemId","remaining","size"]),o.default.parseFloat(t,["progress","speed"]),t},parse:function(e){
var t=this.convert(e);return t=r.default.pick(t,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(129),r=a(i),s=n(67),o=a(s),l=n(1057),u=a(l),d=o.default.extend({model:u.default,url:"/clients/profiles?type="+r.default.LOCAL,parse:function(e){return this.convert(e,"Profile")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({idAttribute:"title",whitelistedAttrs:["title","selected"],convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseBoolean(t,"selected"),t},parse:function(e,t){var n=this.convert(e);return n=r.default.pick(n,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(8).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=a(r),o=n(129),l=i(o),u=n(25),d=i(u),c=n(186),f=i(c),p=d.default.extend({
name:"VersionGeneratorCollection",context:["server"],model:f.default,url:function(){return s.join(["playlists",this.parent.id,"items"],{type:l.default.LOCAL})}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"VersionGeneratorMediaSettingsModel",context:["server"],syncedAttrs:{videoQuality:{type:r.default.integer,save:!0},videoResolution:{type:r.default.string,
save:!0},maxVideoBitrate:{type:r.default.integer,save:!0},audioBoost:{type:r.default.integer,save:!0},subtitleSize:{type:r.default.integer,save:!0},musicBitrate:{type:r.default.integer,save:!0},photoQuality:{type:r.default.integer,save:!0},photoResolution:{type:r.default.string,save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1062),o=a(s),l=r.default.extend({name:"VersionGeneratorMetadataCollection",
context:["server","generator"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(46),l=a(o),u=n(23),d=i(u),c=n(143),f=a(c),p=n(18),h=a(p),m=n(60),v=a(m),g=n(19),y=a(g),b=n(1060),w=a(b),P=y.default.extend({mixins:[f.default],name:"VersionGeneratorMetadataListModel",context:["server","generator"],collectionName:"metadataItems",url:function _(){var _=d.join([s.default.result(this.generator,"url"),"items"]);
return this.getPaginatedUrl(_)},sessionAttrs:{currentPageStart:h.default.integer,currentPageSize:h.default.integer,populatedRange:h.default.object},syncedAttrs:{totalSize:h.default.integer,identifier:h.default.string,mediaTagPrefix:h.default.string,mediaTagVersion:h.default.string,viewGroup:h.default.string,title:h.default.string},syncedRelations:{metadataItems:{relationClass:w.default,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===v.default.xml?l.default.replaceMetadataXMLElementNames(e):e}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=n(56),c=a(d),f=u.default.extend({name:"VersionGeneratorMetadataModel",context:["server","generator"],idAttribute:"ratingKey",
syncedAttrs:r.default.extend({},c.default.prototype.syncedAttrs,{processingState:o.default.string,processingStateContext:o.default.string})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"VersionGeneratorPolicyModel",context:["server"],syncedAttrs:{scope:{type:r.default.string,save:!0},value:{type:r.default.integer,save:!0},unwatched:{type:r.default.boolean,
save:!0}},defaults:{unwatched:!1}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"VersionGeneratorStatusModel",context:["server"],syncedAttrs:{state:r.default.string,failureCode:r.default.string,failure:r.default.string,itemsCount:r.default.integer,itemsCompleteCount:r.default.integer,itemsSuccessfulCount:r.default.integer,itemsFailedCount:r.default.integer,
itemsDisabledCount:r.default.integer,totalSize:r.default.integer}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(129),r=a(i),s=n(67),o=a(s),l=n(1066),u=a(l),d=o.default.extend({model:u.default,url:"/library/tags?type="+r.default.LOCAL,comparator:function(e){return e.get("MediaSettings").maxVideoBitrate},parse:function(e){return this.convert(e,"Tag")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(39),o=a(s),l=n(53),u=a(l),d=u.default.extend({name:"VersionTargetModel",whitelistedAttrs:["id","tag","tagType","MediaSettings","Device"],convert:function(e){var t=r.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,"id"),t},parse:function(e,t){var n=this.convert(e);return n=r.default.pick(n,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1068),o=a(s),l=r.default.extend({name:"LockedFieldCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"LockedFieldModel",context:["server","section"],idAttribute:"name",syncedAttrs:{name:{type:r.default.string,save:!0},locked:{type:r.default.boolean,
save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"MetadataAutocompleteResultModel",context:["server","section","multiMetadataItem","query"],idAttribute:"ratingKey",rootPropertyName:"Metadata",syncedAttrs:{elementName:r.default.string,ratingKey:r.default.string,parentRatingKey:r.default.string,grandparentRatingKey:r.default.string,type:r.default.string,
title:r.default.string,parentTitle:r.default.string,grandparentTitle:r.default.string,tag:r.default.string,tagType:r.default.integer}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(52).default,i=n(262).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=r(o),u=n(130),d=r(u),c=n(23),f=s(c),p=n(40),h=r(p),m=n(18),v=r(m),g=n(19),y=r(g),b=n(780),w=r(b),P=n(1067),_=r(P),S={album:{title:"title",parentRatingKey:"artist.id",parentTitle:"artist.title"
},track:{parentRatingKey:"album.id",parentTitle:"album.title",grandparentRatingKey:"artist.id",grandparentTitle:"artist.title"}},x=y.default.extend({name:"MultiMetadataModel",context:["server","section"],rootPropertyName:"Common",isNew:function(){return!1},url:function(){return f.join([this.sectionUrl(),"common"],this.getUrlParams())},saveUrl:function(){return f.join([this.sectionUrl(),"all"],this.getUrlParams())},sectionUrl:function(){return l.default.result(this.section,"url")},tagRelations:["Collection","Director","Producer","Writer","Genre","Mood","Country","Label","Similar","Role"],
sessionAttrs:{metadataItems:v.default.array.isRequired,originalSaveParams:v.default.object,poster:v.default.string,banner:v.default.string,art:v.default.string},syncedAttrs:{mixedFields:v.default.list.isRequired,key:{type:v.default.string,save:!0},ratingKey:{type:v.default.string,save:!0},parentRatingKey:{type:v.default.string,save:!0},grandparentRatingKey:{type:v.default.string,save:!0},title:{type:v.default.string,save:!0},titleSort:{type:v.default.string,save:!0},originalTitle:{type:v.default.string,
save:!0},parentTitle:{type:v.default.string,save:!0},grandparentTitle:{type:v.default.string,save:!0},year:{type:v.default.string,save:!0},tagline:{type:v.default.string,save:!0},summary:{type:v.default.string,save:!0},studio:{type:v.default.string,save:!0},contentRating:{type:v.default.string,save:!0},originallyAvailableAt:{type:v.default.string,save:!0},rating:{type:v.default.float,save:!0},userRating:{type:v.default.float,save:!0},index:{type:v.default.integer,save:!0},parentIndex:{type:v.default.integer,
save:!0}},syncedRelations:{collections:{relationClass:w.default,rootPropertyName:"Collection",save:!0},directors:{relationClass:w.default,rootPropertyName:"Director",save:!0},producers:{relationClass:w.default,rootPropertyName:"Producer",save:!0},writers:{relationClass:w.default,rootPropertyName:"Writer",save:!0},genres:{relationClass:w.default,rootPropertyName:"Genre",save:!0},moods:{relationClass:w.default,rootPropertyName:"Mood",save:!0},countries:{relationClass:w.default,rootPropertyName:"Country",
save:!0},labels:{relationClass:w.default,rootPropertyName:"Label",save:!0},similar:{relationClass:w.default,rootPropertyName:"Similar",save:!0},roles:{relationClass:w.default,rootPropertyName:"Role",save:!0},lockedFields:{relationClass:_.default,rootPropertyName:"Field",save:!0}},derivedAttrs:{type:function(){var e=this.getSingleMetadataItem();if(e)return e.get("type")},aggregateTitle:function(){var e=this.get("metadataItems");if(e.length)return d.default.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",l.default.clone(t.metadataItems))},getSingleMetadataItem:function(){return l.default.first(this.get("metadataItems"))},getUrlParams:function(){var e=h.default.get(this.get("type")),t=l.default.map(this.get("metadataItems"),function(e){return e.get("ratingKey")});return{type:e.id,id:t.join(",")}},getSaveParams:function(){
var e=this,t=y.default.prototype.getSaveParams.apply(this,arguments),n=this.get("originalSaveParams");if(!n)return t;var a={};if(l.default.each(t,function(t,i){var r=n[i];l.default.isEqual(t,r)||l.default.extend(a,e.getSaveParam(i,t,r))}),a.isReparenting){delete a.isReparenting;var i=S[this.get("type")];l.default.each(i,function(t,n){var i=t+".value",r=e.getQueryAttrSibling(t),s=r+".value",o=l.default.has(a,i),u=l.default.has(a,s);if(o&&u&&i!==s&&delete a[s],!o&&!u){var d=e.get(n);d&&(a[i]=d)}})}
return a},getSaveParam:function(e,t,n){if("Field"===e)return this.getFieldSaveParams(e,t,n);if(this.tagRelations.indexOf(e)!==-1)return this.getTagSaveParams(e,t,n);var i=S[this.get("type")];{if(!i||!l.default.has(i,e))return a({},e+".value",t);var r=i[e];if(t)return a({isReparenting:!0},r+".value",t)}},getFieldSaveParams:function(e,t,n){var a=t.reduce(function(e,t){return e[t.name+".locked"]=t.locked,e},{});return a},getTagSaveParams:function(e,t,n){var a=l.default.map(t,function(e){return e.tag;
}),r=l.default.map(n,function(e){return e.tag}),s=l.default.without.apply(l.default,[r].concat(i(a))),o=e.toLowerCase(),u={};return a.forEach(function(e,t){u[o+"["+t+"].tag.tag"]=e}),s.length&&(u[o+"[].tag.tag-"]=l.default.map(s,encodeURIComponent).join(",")),u},getQueryAttr:function(e){var t=this.get("type"),n=S[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.default=x,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(46),r=a(i),s=n(60),o=a(s),l=n(25),u=a(l),d=n(522),c=a(d),f=u.default.extend({name:"SyncMetadataCollection",context:["server","device","syncItemId"],model:c.default,url:function(){return"/sync/items/"+this.syncItemId},augmentResponseText:function(e,t){return t===o.default.xml?r.default.replaceMetadataXMLElementNames(e):e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.pluck("results").reduce(function(e,t){
return e.concat(t.toArray())},[])}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(18),l=i(o),u=n(60),d=i(u),c=n(46),f=i(c),p=n(19),h=i(p),m=n(523),v=i(m),g=h.default.extend({name:"QuickSearchModel",context:["server"],url:"/hubs/search",defaults:{query:"",selectedResultEntityID:null,isSearchPending:!1,isSearchPopulated:!1},sessionAttrs:{query:l.default.string,type:l.default.string,placeholder:l.default.string,sectionID:l.default.string,isSearchPending:l.default.boolean,
isSearchPopulated:l.default.boolean,searchError:l.default.object,selectedResultEntityID:l.default.string},syncedRelations:{hubs:{relationClass:v.default,rootPropertyName:"Hub"}},augmentResponseText:function(e,t){return t===d.default.xml?f.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){return e.Hub=e.Hub.filter(function(e){return"0"!==e.size}),e},selectByOffset:function(e){var t=this,n=a(this.get("hubs")),i=s.default.findIndex(n,function(e){return e.entityID()===t.get("selectedResultEntityID");
}),r=n.length-1,o=-1,l=e>0?o:r,u=i+e,d=u<o||u>r,c=d?l:u,f=c===-1?null:n[c].entityID();this.set("selectedResultEntityID",f)},selectByEntityID:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];this.set("selectedResultEntityID",e)}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(1075),u=a(l),d=o.default.extend({name:"SearchHubModel",context:["server"],
idAttribute:"hubIdentifier",syncedAttrs:{hubIdentifier:r.default.string,size:r.default.integer,type:r.default.string,title:r.default.string},syncedRelations:{results:{relationClass:u.default,rootPropertyName:"Metadata"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(60),o=a(s),l=n(46),u=a(l),d=n(19),c=a(d),f=n(523),p=a(f),h=c.default.extend({name:"SearchModel",context:["server"],url:"/hubs/search",
defaults:{query:"",isSearchPending:!1,isSearchPopulated:!1},sessionAttrs:{query:r.default.string,isSearchPending:r.default.boolean,isSearchPopulated:r.default.boolean,searchError:r.default.object},syncedRelations:{hubs:{relationClass:p.default,rootPropertyName:"Hub"}},augmentResponseText:function(e,t){return t===o.default.xml?u.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){return e.Hub=e.Hub.filter(function(e){return"0"!==e.size}),e}});t.default=h,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1076),o=a(s),l=r.default.extend({name:"SearchResultCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(52).default,r=n(16).default,s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(18),u=s(l),d=n(247),c=o(d),f=n(77),p=s(f),h=n(19),m=s(h),v=n(436),g=s(v),y=n(56),b=s(y),w=m.default.extend({
name:"SearchResultModel",context:["server"],entityType:c.SEARCH_RESULT,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,p.default)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",syncedAttrs:{key:u.default.string,reasonID:u.default.integer,reason:u.default.string,reasonTitle:u.default.string},syncedRelations:{tagItem:{relationClass:g.default,deferred:!0},metadataItem:{relationClass:b.default,deferred:!0}},augmentResponse:function(e){
var t=e.key,n=e.reason,s=e.reasonTitle,o=e.reasonID,l=r(e,["key","reason","reasonTitle","reasonID"]),u=l.tag?"tagItem":"metadataItem";return i({key:t,reason:n,reasonTitle:s,reasonID:o},u,a({key:t},l))}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1078),o=a(s),l=r.default.extend({name:"MultiSelectItemCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"MultiSelectItemModel",sessionAttrs:{id:r.default.any.isRequired,type:r.default.string.isRequired},sessionRelations:{model:{relationClass:o.default,deferred:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=n(1077),c=a(d),f=u.default.extend({
name:"MultiSelectModel",sessionAttrs:{activeSelectionRange:o.default.object},sessionRelations:{activeSelectionItems:{relationClass:c.default}},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"),a=t.previousModels;r.default.each(a,function(t){e.contains(t)||n.remove(t.id)})},onCollectionRemove:function(e){var t=this.get("activeSelectionItems");t.remove(e.id)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(60),o=a(s),l=n(1081),u=a(l),d=r.default.extend({
name:"ActivityCollection",responseType:o.default.json,context:["server"],model:u.default,url:"/activities"});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),r=a(i),s=n(60),o=a(s),l=n(18),u=a(l),d=r.default.extend({name:"ActivityModel",responseType:o.default.json,context:["server"],idAttribute:"uuid",rootPropertyName:"Activity",syncedAttrs:{uuid:u.default.string,userID:u.default.integer,title:u.default.string,
subtitle:u.default.string,progress:u.default.integer,event:u.default.string,cancellable:u.default.boolean,type:u.default.string,context:u.default.object,response:u.default.object},defaults:function(){return{context:{},response:{}}},augmentResponse:function(e){return e.Context&&(e.context=e.Context[0],delete e.Context),e.Response&&(e.response=e.Response[0],delete e.Response),e}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(18),r=a(i),s=n(60),o=a(s),l=n(19),u=a(l),d=u.default.extend({name:"AgentAttributionModel",context:["server"],responseType:o.default.text,syncedAttrs:{content:r.default.string},url:function(){return"/system/agents/attribution?identifier="+this.parent.id},augmentResponse:function(e){return{content:e}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(1082),u=a(l),d=n(1085),c=a(d),f=o.default.extend({
name:"AgentModel",context:["server"],idAttribute:"identifier",rootPropertyName:"Agent",sessionAttrs:{isPrimary:r.default.boolean,selected:r.default.boolean},sessionRelations:{attribution:{relationClass:u.default}},syncedAttrs:{identifier:r.default.string,name:r.default.string,enabled:r.default.boolean,hasPrefs:r.default.boolean,order:r.default.string},syncedRelations:{languages:{relationClass:c.default,rootPropertyName:"Language"}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(214),o=a(s),l=o.default.extend({constructor:function(e,t,n,a){this.exclusiveScanners=t,this.scannerName=n,o.default.call(this,e,a),this.filterBy(r.default.bind(this.filterExclusiveScanner,this))},filterExclusiveScanner:function(e){var t=e.get("name"),n=this.exclusiveScanners;if(!n)return!0;var a=this.scannerName,i=n.indexOf(a)!==-1,r=n.indexOf(t)!==-1,s=i?t===a:!r;return s}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1086),o=a(s),l=r.default.extend({name:"LanguageCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(477),r=a(i),s=n(18),o=a(s),l=n(19),u=a(l),d=u.default.extend({name:"LanguageModel",context:["server"],idAttribute:"code",rootPropertyName:"Language",syncedAttrs:{code:o.default.string
},derivedAttrs:{name:function(){return(0,r.default)(this.get("code"))}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(25),o=a(s),l=n(1088),u=a(l),d=o.default.extend({name:"ScannerCollection",context:["server","sectionTypeID"],model:u.default,url:function(){return"/system/scanners/"+this.sectionTypeID},hasExclusiveScanner:function(e){return!!r.default.intersection(this.pluck("name"),e).length;
}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"ScannerModel",context:["server"],rootPropertyName:"Scanner",syncedAttrs:{name:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1090),o=a(s),l=r.default.extend({name:"SectionOverviewCollection",
context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"SectionOverviewModel",context:["server"],rootPropertyName:"Section",syncedAttrs:{id:r.default.integer,key:r.default.string,type:r.default.string,title:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(289),u=a(l),d=n(1074),c=a(d),f=n(1072),p=a(f),h=n(1080),m=a(h),v=o.default.extend({name:"ServerFlexModel",context:["server"],sessionAttrs:{isLibrariesPending:r.default.boolean.isRequired,isLibrariesPopulated:r.default.boolean.isRequired,librariesError:r.default.object},sessionRelations:{libraries:{relationClass:u.default},quickSearch:{relationClass:p.default},search:{relationClass:c.default},activities:{relationClass:m.default}},defaults:{isLibrariesPending:!0,
isLibrariesPopulated:!1,librariesError:null}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=a(i),s=n(1093),o=a(s),l=r.default.extend({name:"ServerOverviewCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(1089),u=a(l),d=o.default.extend({
name:"ServerOverviewModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",urlRoot:"/api/servers",syncedAttrs:{machineIdentifier:r.default.string,name:r.default.string,address:r.default.string,port:r.default.string,version:r.default.string,createdAt:r.default.integer,updatedAt:r.default.integer},syncedRelations:{sections:{relationClass:u.default,rootPropertyName:"Section"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(18),r=a(i),s=n(420),o=a(s),l=o.default.extend({name:"ExperienceSettingsModel",storageKey:"experience",syncedAttrs:{columnAdjustment:r.default.integer,searchAllServers:r.default.boolean,relayReminders:r.default.object},defaults:function(){return{columnAdjustment:0,searchAllServers:!1,relayReminders:{}}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),r=a(i),s=n(56),o=a(s),l=n(1096),u=a(l),d=n(1097),c=a(d),f=r.default.extend({
name:"DesktopUIModel",sessionRelations:{hubsPage:{relationClass:u.default},metadataListPage:{relationClass:c.default},metadataItem:{relationClass:o.default,deferred:!0}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(221),u=a(l),d=o.default.extend({name:"HubsPageModel",sessionAttrs:{isHubsPending:r.default.boolean.isRequired,isHubsPopulated:r.default.boolean.isRequired,hubsError:r.default.object
},sessionRelations:{hubs:{relationClass:u.default,deferred:!0}},defaults:{isHubsPending:!0,isHubsPopulated:!1,hubsError:null}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),r=a(i),s=n(89),o=a(s),l=r.default.extend({name:"MetadataListPageModel",sessionRelations:{metadataList:{relationClass:o.default,deferred:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(25),r=a(i),s=n(1099),o=a(s),l=r.default.extend({name:"SubscriptionPlanCollection",context:["server"],model:o.default,url:"/api/subscriptions/plans"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=o.default.extend({name:"SubscriptionPlanModel",context:["server"],rootPropertyName:"plan",syncedAttrs:{id:r.default.string,name:r.default.string,price:r.default.float,
formattedPrice:r.default.string,currency:r.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=a(i),s=n(19),o=a(s),l=n(448),u=a(l),d=n(1098),c=a(d),f=o.default.extend({name:"UserFlexModel",context:["server"],sessionAttrs:{isPlansPending:r.default.boolean.isRequired,isPlansPopulated:r.default.boolean.isRequired,plansError:r.default.object,isDeletingAvatar:r.default.boolean.isRequired,isUpdatingUser:r.default.boolean.isRequired,
updateUserError:r.default.object,isUnwatchedWatchLaterListPending:r.default.boolean.isRequired,isUnwatchedWatchLaterListPopulated:r.default.boolean.isRequired,unwatchedWatchLaterListError:r.default.object,isUnwatchedRecommendedListPending:r.default.boolean.isRequired,isUnwatchedRecommendedListPopulated:r.default.boolean.isRequired,unwatchedRecommendedListError:r.default.object},sessionRelations:{plans:{relationClass:c.default},unwatchedWatchLaterList:{relationClass:u.default,attrs:{key:u.default.keys.WATCH_LATER,
subset:u.default.subsets.UNWATCHED}},unwatchedRecommendedList:{relationClass:u.default,attrs:{key:u.default.keys.RECOMMENDED,subset:u.default.subsets.UNWATCHED}}},defaults:{isPlansPending:!0,isPlansPopulated:!1,plansError:null,isDeletingAvatar:!1,isUpdatingUser:!1,updateUserError:null,isUnwatchedWatchLaterListPending:!0,isUnwatchedWatchLaterListPopulated:!1,unwatchedWatchLaterListError:null,isUnwatchedRecommendedListPending:!0,isUnwatchedRecommendedListPopulated:!1,unwatchedRecommendedListError:null
}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=u.default.Region.extend({resizeSubscribersCallbacks:[],scrollSubscribersCallbacks:[],sidebarDelay:200,scrollDelay:100,initialize:function(e){r.default.bindAll(this,"onResize","onScroll","onScrollEvent","onSidebarChange"),this.$el=(0,o.default)(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(c.default,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(c.default,{resize:this.onResize,"show:bar hide:bar":this.onSidebarChange})),e(this.size)},onResizeUnsubscribe:function(e){this.resizeSubscribersCallbacks.splice(r.default.indexOf(this.resizeSubscribersCallbacks,e),1),
0===this.resizeSubscribersCallbacks.length&&this.stopListening(c.default,"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(r.default.indexOf(this.scrollSubscribersCallbacks,e),1),0===this.scrollSubscribersCallbacks.length&&this.$el.off("scroll",this.onScroll);
},onResize:function(){this.updateSize(),r.default.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(),r.default.each(this.scrollSubscribersCallbacks,function(e){e(this.scrollPosition)},this)},onSidebarChange:function(e){"sidebar"===e&&r.default.delay(this.onResize,this.sidebarDelay)}});t.default=f,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(11),d=i(u),c=n(6),f=a(c),p=n(9),h=a(p),m=n(109),v=a(m),g=n(520),y=a(g),b=n(185),w=a(b),P=n(335),_=a(P),S=n(1156),x=a(S),C=n(133),T=a(C),k=v.default.extend({activity:function(){var e=this.populateView({primaryServer:!0});e.done(s.default.bind(function(e){var t=e.server;t.get("shared")?this.sync(t.id):h.default.trigger("show:view",new x.default({
model:t,collection:t.get("alerts"),subset:"alerts"}))},this))},alerts:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){var t=e.server;h.default.trigger("show:view",new x.default({model:t,collection:t.get("alerts"),subset:"alerts"}))})},sync:function(e,t){var n=this.populateView({serverID:"myPlex"});n=n.then(s.default.bind(function(t){var n;return n=e?{serverID:e}:{primaryServer:!0},this.populateView(n)},this)),n.done(function(e){var n=d.resolve("appModel"),a=n.get("user"),i=a.get("devices"),r=i.populate();
r.done(function(){var n=i.filterSyncDevices(),a=t?n.get(t):null;h.default.trigger("show:view",new x.default({model:e.server,collection:n,selectedDevice:a,subset:"sync"}))}),r.fail(function(){h.default.trigger("show:view",new T.default({title:(0,f.default)("Sync status is unavailable.")}))})})},conversion:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){var t,n,a=e.server,i=new y.default([],{server:a,allowInCache:!0}),r=new w.default([],{server:a,
allowInCache:!0}),s=new _.default([],{server:a,allowInCache:!0}),o=l.default.when(i.populate(),r.fetch(),a.get("settings").fetch(),s.populate()).then(function(){t=i.first();var e=s.first();return t&&e?(n=e.get("children"),l.default.when(t.fetch(),n.fetch())):l.default.Deferred().reject().promise()});o.done(function(){h.default.trigger("show:view",new x.default({model:a,playQueue:t,transcodeJobs:r,generators:n,subset:"conversion"}))}),o.fail(function(){h.default.trigger("show:view",new T.default({
title:(0,f.default)("The conversion queue is unavailable.")}))})})},nowPlaying:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){var t=e.server;h.default.trigger("show:view",new x.default({model:t,collection:t.get("sessions"),subset:"nowPlaying"}))})}});t.default=k,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(110),r=a(i),s=n(1102),o=a(s),l=r.default.extend({controller:new o.default,
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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=a(i),s=n(9),o=a(s),l=n(109),u=a(l),d=n(423),c=a(d),f=n(1172),p=a(f),h=n(1173),m=a(h),v=n(1171),g=a(v),y=n(248),b=a(y),w=n(133),P=a(w),_=u.default.extend({channel:function(e,t,n){var a=this.populateView({serverID:e,channelID:t,channelKey:n});a.done(function(e){var t=e.channelItem?e.channelItem:e.channel;o.default.trigger("show:view",new p.default({model:t,listModel:t.get("metadataList")}))})},channelDetails:function(e,t,n){var a=this.populateView({
serverID:e,channelID:t,channelKey:n});a.done(function(e){var t=e.channelItem.get("metadataList").getCollection(),n=t.first();o.default.trigger("show:view",new b.default({model:n}))})},channels:function(e){var t=this.populateView({serverID:e});t.done(function(e){var t=new c.default({subset:"all"},{server:e.server}),n=t.get("channels");n.comparator=n.sortByTitle;var a=t.fetch({scope:"page"});a.done(function(){o.default.trigger("show:view",new m.default({collection:n}))}),a.fail(function(){o.default.trigger("show:view",new P.default({
title:(0,r.default)("Your channels are unavailable.")}))})})},directory:function(e,t,n){var a=this.populateView({serverID:e});a.done(function(e){if(e.server.get("shared"))return void o.default.trigger("show:view",new P.default({title:(0,r.default)("The channel directory is restricted from shared users.")}));var a=new c.default({key:"/system/appstore"},{server:e.server}),i=a.fetch({scope:"page"});i.done(function(){o.default.trigger("show:view",new g.default({collection:a.get("channels"),currentKey:t,
currentPath:n}))}),i.fail(function(){o.default.trigger("show:view",new P.default({title:(0,r.default)("The channel directory is unavailable.")}))})})}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(110),r=a(i),s=n(1104),o=a(s),l=r.default.extend({controller:new o.default,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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),s=a(r),o=n(23),l=i(o),u=n(11),d=i(u),c=n(17),f=a(c),p=n(834),h=a(p),m=n(1145),v=a(m),g=n(1176),y=a(g),b=n(1175),w=a(b),P=n(1174),_=a(P),S=n(527),x=a(S),C=n(1149),T=a(C),k=n(1148),I=a(k),M=n(1213),A=a(M),E=n(133),O=a(E),D=n(1214),R=a(D),L=n(1215),N=a(L),j=n(1216),U=a(j),F=n(1217),B=a(F),z=h.default.extend({
viewsByType:{signIn:x.default,error:O.default,channelError:A.default,notFound:R.default,serverRequired:N.default,unauthorized:U.default,unavailable:B.default},initialize:function(){h.default.prototype.initialize.apply(this,arguments),this.listenTo(s.default,"initialize:app",this.onAppInitialize)},dashboard:function(e,t){this.populateView().done(function(){s.default.trigger("show:view",new y.default({selectedServerID:e,selectedLibraryID:t}))})},list:function(e,t){var n=l.parseParams(t);this.populateView().done(function(){
s.default.trigger("show:view",new w.default({selectedServerID:e,key:n.key,type:n.type,title:n.title}))})},needsUpdate:function(e){this.populateView().done(function(){var e=d.resolve("appModel");e.get("servers").findWhere({isOutOfDate:!0})?s.default.trigger("show:view",new _.default):s.default.trigger("navigate","dashboard",{replace:!0})})},logout:function(){var e=this.viewFor;f.default.execute("signOut").done(function(){s.default.trigger("navigate","login",{silent:!0})}).fail(function(){s.default.trigger("show:view",e("logoutError"));
})},logs:function(){s.default.trigger("show:view",new T.default({collection:d.resolve("logs")}))},info:function(){s.default.trigger("show:view",new I.default)},onAppInitialize:function(){this.appView=new v.default,this.appView.render()}});t.default=z,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(41),r=a(i),s=n(9),o=a(s),l=n(835),u=a(l),d=n(1106),c=a(d),f=u.default.extend({controller:new c.default,appRoutes:{"!/dashboard":"dashboard",
"!(/server/:serverID)/dashboard(?library=:libraryID)":"dashboard","!(/server/:serverID)/list":"list","!/needsUpdate":"needsUpdate","":"dashboard","!/login":"login","!/unauthorized":"unauthorized","!/logs":"logs","!/info":"info","*404":"error"},onNavigateRefreshDashboard:function(){var e=r.default.history.getFragment();""===e||"!/dashboard"===e?r.default.history.loadUrl(""):o.default.trigger("navigate","dashboard")}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=a(i),s=n(109),o=a(s),l=n(1150),u=a(l),d=n(1370),c=a(d),f=n(248),p=a(f),h=o.default.extend({search:function(e,t){var n=this.populateView();n.done(function(){r.default.trigger("show:view",new u.default({serverID:e,query:t}))})},section:function(e,t,n){var a=this.populateView({serverID:e,sectionID:t});a.done(function(e){r.default.trigger("show:view",new c.default({model:e.section,subset:n}))})},sectionFolder:function(e,t,n){var a=this.populateView({
serverID:e,sectionID:t});a.done(function(e){var t=e.section.get("items");t.scrollPosition=0,r.default.trigger("show:view",new c.default({model:e.section,subset:"folder",folderKey:n}))})},sectionFilter:function(e,t,n,a,i,s){var o=this.populateView({serverID:e,sectionID:t});o.done(function(e){var t=e.section.get("currentFilters");t.length=0,s||(s=i),t.push({key:a,values:i.split(","),titles:s.split(",")}),r.default.trigger("show:view",new c.default({model:e.section,type:parseInt(n,10)}))})},sectionType:function(e,t,n,a,i){
var s=this.populateView({serverID:e,sectionID:t});s.done(function(e){r.default.trigger("show:view",new c.default({model:e.section,type:n,sortKey:a,sortDirection:i}))})},details:function(e,t){var n=this.populateView({serverID:e,key:t,populateData:{includeRelatedCount:"5",includePopularLeaves:"1",includeConcerts:"1"}});n.done(function(e){r.default.trigger("show:view",new p.default({model:e.item}))})}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(110),r=a(i),s=n(1108),o=a(s),l=r.default.extend({controller:new o.default,appRoutes:{"!/server/:serverID/search/:query":"search","!/server/:serverID/section/:sectionID(/:subset)":"section","!/server/:serverID/section/:sectionID/folder/:key":"sectionFolder","!/server/:serverID/section/:sectionID/filter/:type/:key/:value(/:title)":"sectionFilter","!/server/:serverID/section/:sectionID/type/:type/:sortKey/:sortDirection":"sectionType","!/server/:serverID/details/:key":"details"}});
t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=a(i),s=n(6),o=a(s),l=n(9),u=a(l),d=n(109),c=a(d),f=n(291),p=a(f),h=n(133),m=a(h),v=n(1368),g=a(v),y=n(248),b=a(y),w=c.default.extend({playlists:function(e){var t=this.populateView({serverID:e});t.done(function(e){var t=e.server.get("playlists"),n=e.server.get("sections").populate({scope:"page"}),a=t.get("items").fetch({scope:"page"}),i=t.get("sorts").populate().then(function(e){
var n=e.get("titleSort");n&&(t.set("currentSort",n),n.set("selected",!0))}),s=r.default.when(n,a,i);s.done(function(){u.default.trigger("show:view",new g.default({model:t}))}),s.fail(function(){u.default.trigger("show:view",new m.default({title:(0,o.default)("Playlists are unavailable for this server.")}))})})},playlist:function(e,t){var n=this.populateView({serverID:e});n.done(function(e){var n=e.server.get("sections").populate({scope:"page"}),a=new p.default({ratingKey:t},{server:e.server}),i=a.fetch({
scope:"page"});i.fail(function(){u.default.trigger("show:view",new m.default({title:(0,o.default)("Playlist not found.")}))}),r.default.when(n,i).done(function(){u.default.trigger("show:view",new b.default({model:a}))})})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(110),r=a(i),s=n(1110),o=a(s),l=r.default.extend({controller:new o.default,appRoutes:{"!/server/:serverID/playlists":"playlists","!/server/:serverID/playlist/:key":"playlist"
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=a(r),o=n(11),l=i(o),u=n(6),d=a(u),c=n(9),f=a(c),p=n(35),h=a(p),m=n(109),v=a(m),g=n(794),y=a(g),b=n(107),w=a(b),P=n(1375),_=a(P),S=n(133),x=a(S),C=v.default.extend({settings:function(){return this.webSettings()},webSettings:function(){var e=this.populateView();e.done(function(){function e(){f.default.trigger("show:view",new _.default({model:h.default.getInstance(),
subset:"web"}))}var t=l.resolve("appModel"),n=t.get("user"),a=n.get("homeUsers"),i=n.server.populate();i.done(function(){n.get("signedIn")?a.populate().always(e):e()}),i.fail(e)})},serverSettings:function(e,t){var n;n=e?{serverID:e}:{primaryServer:!0};var a=this.populateView(n);a.done(function(e){var n=e.server;if(n.get("shared"))return void f.default.trigger("show:view",new x.default({title:(0,d.default)("Server settings are restricted from shared users.")}));var a=n.get("settings"),i=new y.default({
key:"/accounts/1"},{server:n}),r=n.get("cloudAccount"),o=new w.default([],{server:n,url:"/system/:/prefs"}),l=s.default.when(a.fetch(),i.fetch({scope:"page"}),r.fetch({scope:"page"}),o.fetch({scope:"page"}));l.done(function(){f.default.trigger("show:view",new _.default({model:n,collection:n.get("settings"),account:i,cloudAccount:r,channelSettings:o,subset:"server",group:t}))}),l.fail(function(){f.default.trigger("show:view",new x.default({title:(0,d.default)("Server settings are unavailable.")}));
})})},users:function(e){var t=this.populateView({serverID:"myPlex"});t.done(function(t){var n=l.resolve("appModel"),a=n.get("user"),i=a.get("homeUsers"),r=a.get("friends"),o=a.get("invites"),u=a.get("sentInvites"),c=a.get("homeDetails"),p=s.default.Deferred(),h=c.fetch();h.done(function(){p.resolve()}),h.fail(function(e,t){404===t.status?p.resolve():p.reject()});var m=s.default.when(a.fetch({scope:"page"}),i.fetch({scope:"page"}),r.fetch({scope:"page"}),o.fetch({scope:"page"}),u.fetch({scope:"page"
}),p.promise());m.done(function(){var t=!1;"pin"===e?(e="home",t=!0):e||(e=o.length&&!o.findWhere({home:!0})?"friends":"home"),f.default.trigger("show:view",new _.default({model:n.get("user"),subset:"users",usersSubset:e,promptPIN:t}))}),m.fail(function(){var t;t="friends"===e?(0,d.default)("Your friends are unavailable."):(0,d.default)("Your home is unavailable."),f.default.trigger("show:view",new x.default({title:t}))})})},devices:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(e){
var t=l.resolve("appModel"),n=t.get("user"),a=n.get("devices"),i=a.fetch({scope:"page"});i.done(function(){f.default.trigger("show:view",new _.default({model:n,collection:a,subset:"devices"}))}),i.fail(function(){f.default.trigger("show:view",new x.default({title:(0,d.default)("Your devices are unavailable.")}))})})}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(110),r=a(i),s=n(1112),o=a(s),l=r.default.extend({
controller:new o.default,appRoutes:{"!/settings":"settings","!/settings/web":"webSettings","!/settings/server(/:serverID)(/:group)":"serverSettings","!/settings/users":"users","!/settings/users(/:subset)":"users","!/settings/devices":"devices"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=a(i),s=n(109),o=a(s),l=n(1395),u=a(l),d=o.default.extend({setupBasic:function(e){var t;t=e?{serverID:e}:{primaryServer:!0
};var n=this.populateView(t);n.done(function(e){r.default.trigger("show:view",new u.default({model:e.server,subset:"setupBasic"}))})},setupLibrary:function(){var e=this.populateView({primaryServer:!0});e.done(function(e){r.default.trigger("show:view",new u.default({model:e.server,subset:"setupLibrary"}))})},setupChannels:function(){var e=this.populateView({primaryServer:!0});e.done(function(e){r.default.trigger("show:view",new u.default({model:e.server,subset:"setupChannels"}))})},setupComplete:function(){
var e=this.populateView({primaryServer:!0});e.done(function(e){r.default.trigger("show:view",new u.default({model:e.server,subset:"setupComplete"}))})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(110),r=a(i),s=n(1114),o=a(s),l=r.default.extend({controller:new o.default,appRoutes:{"!/setup/library":"setupLibrary","!/setup/channels":"setupChannels","!/setup/complete":"setupComplete","!/setup(/:serverID)":"setupBasic"
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=a(r),o=n(11),l=i(o),u=n(6),d=a(u),c=n(9),f=a(c),p=n(79),h=i(p),m=n(109),v=a(m),g=n(1152),y=a(g),b=n(447),w=a(b),P=n(448),_=a(P),S=n(1400),x=a(S),C=n(1398),T=a(C),k=n(248),I=a(k),M=n(133),A=a(M),E=n(1399),O=a(E),D=v.default.extend({account:function(){var e=s.default.Deferred(),t=e.promise();n.e(0,function(){e.resolve()}),t=t.then(function(){
return this.populateView({serverID:"myPlex"})}.bind(this)),t.done(function(){h.scheduleImmediateUpdate(),f.default.trigger("show:view",new y.default)})},userPlaylist:function(e,t){var n=this.populateView({serverID:"myPlex"});n.done(function(n){var a=l.resolve("appModel"),i=a.get("user"),r=new _.default({key:e},{server:i.server,parent:i}),s=r.fetch({scope:"page"});s.done(function(){f.default.trigger("show:view",new x.default({model:a.get("user"),listModel:r,subset:t}))}),s.fail(function(){f.default.trigger("show:view",new A.default({
title:(0,d.default)("This playlist is unavailable.")}))})})},userPlaylistDetails:function(e,t){var n=this.populateView({serverID:"myPlex"});n.done(function(n){var a=l.resolve("appModel"),i=a.get("user"),r=new w.default({id:parseInt(t,10)},{server:n.server,parent:i,containerKey:e}),s=r.fetch({scope:"page"});s.done(function(){f.default.trigger("show:view",new I.default({model:r}))}),s.fail(function(){f.default.trigger("show:view",new A.default({title:(0,d.default)("This playlist item is unavailable.")
}))})})},queueHelp:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(){var e=l.resolve("appModel"),t=e.get("user");f.default.trigger("show:view",new O.default({queueEmail:t.get("queueEmail")}))})},announcements:function(){var e=this.populateView();e.done(function(){var e=l.resolve("appModel"),t=e.get("user"),n=t.get("announcements"),a=n.fetch({scope:"page"});a.done(function(){f.default.trigger("show:view",new T.default({collection:n}))}),a.fail(function(){f.default.trigger("show:view",new A.default({
title:(0,d.default)("Announcements are not available.")}))})})}});t.default=D,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(110),r=a(i),s=n(1116),o=a(s),l=r.default.extend({controller:new o.default,appRoutes:{"!/account":"account","!/playlist/queue/help":"queueHelp","!/playlist/:key(/:subset)":"userPlaylist","!/playlist/:key/details/:itemID":"userPlaylistDetails","!/announcements":"announcements"}});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1119),r=a(i),s=n(1124),o=a(s),l=n(1134),u=a(l),d=n(1128),c=a(d),f=n(1126),p=a(f),h=n(1125),m=a(h),v=n(1120),g=a(v),y=n(1123),b=a(y),w=n(1122),P=a(w),_=n(1133),S=a(_),x=n(1129),C=a(x),T=n(1131),k=a(T),I=[r.default,o.default,u.default,c.default,p.default,m.default,g.default,b.default,P.default,S.default,C.default,k.default];t.default=I,e.exports=t.default},function(e,t,n){"use strict";var a=n(52).default,i=n(1).default,r=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var s,o=n(3),l=i(o),u=n(9),d=i(u),c=n(75),f=i(c),p=n(901),h=i(p),m=n(1315),v=i(m),g=n(55),y=r(g),b=n(81),w=(0,f.default)((s={},a(s,y.SHOW_ALERT,function(e,t){d.default.trigger("show:alert",t)}),a(s,y.SAVE_SETTINGS,function(e,t){var n=t.name,a=t.settings;e.get(n).save(a)}),a(s,y.DOWNLOAD_SERVER,function(e,t){var n=new v.default({downloadType:t});d.default.trigger("show:modal",n)}),a(s,y.DISCOVER_SERVERS,function(e){var t=e.get("cloudServer");t.get("isResolved")&&t.get("resources").fetch(),
d.default.trigger("test:servers")}),a(s,y.RESET_PRIMARY_SERVER,function(e){e.set({primaryServer:null,isWaitingForPrimaryServer:!0})}),a(s,y.CHANGE_PRIMARY_SERVER,function(e,t,n){var a=e.get("servers");a.findServer(t).done(function(t){t.get("isOutOfDate")?n((0,b.redirectToRoute)({route:"needsUpdate",options:{replace:!0}})):t.get("isPrimaryEligible")?e.set({primaryServer:t,isWaitingForPrimaryServer:!1}):n((0,b.redirectToRoute)({route:"dashboard"}))}).fail(function(){n((0,b.redirectToRoute)({route:"dashboard"
}))})}),a(s,y.REDIRECT_TO_ROUTE,function(e,t){var n=t.route,a=t.options;l.default.defer(function(){d.default.trigger("navigate",n,a)})}),a(s,y.REDIRECT_TO_HTTP,function(e){var t=window.location.href.replace("https://","http://");window.location=t}),a(s,y.GARBAGE_COLLECT_ENTITIES,function(e){var t=(0,h.default)(e.getState()),n=e.get("entities");l.default.each(t,function(e,t){n.get(t).remove(e)})}),s));t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(52).default,i=n(1).default,r=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(9),o=i(s),l=n(96),u=n(75),d=i(u),c=n(135),f=i(c),p=n(55),h=r(p),m=(0,d.default)(a({},h.EDIT_LIBRARY,function(e,t){var n=(0,l.findLibraryModel)(e,t),a=new f.default({server:n.server,model:n});o.default.trigger("show:modal",a)}));t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.EDIT_LIBRARY);t.editLibrary=u;
},function(e,t,n){"use strict";var a=n(12).default,i=n(52).default,r=n(16).default,s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(6),d=s(u),c=n(9),f=s(c),p=n(96),h=n(17),m=s(h),v=n(75),g=s(v),y=n(454),b=s(y),w=n(453),P=s(w),_=n(343),S=s(_),x=n(121),C=s(x),T=n(56),k=s(T),I=n(134),M=s(I),A=n(251),E=s(A),O=n(546),D=s(O),R=n(136),L=s(R),N=n(342),j=s(N),U=n(199),F=s(U),B=n(198),z=s(B),$=n(197),V=s($),H=n(81),q=n(189),W=n(55),K=o(W),Q=(0,g.default)((l={},i(l,K.ADD_METADATA_ITEM_TO_PLAYLIST,function(e,t){
var n=(0,p.findMetadataItemModel)(e,t),a=new C.default({model:n,title:n.get("title")});f.default.trigger("show:modal",a)}),i(l,K.ANALYZE_METADATA_ITEM,function(e,t,n){var a=(0,p.findMetadataItemModel)(e,t);(0,P.default)(a).fail(function(e){n((0,H.showAlert)((0,d.default)("There was a problem analyzing this item.")))})}),i(l,K.DOWNLOAD_METADATA_ITEM_VERSION,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new j.default({model:n});f.default.trigger("show:modal",a)}),i(l,K.DELETE_METADATA_ITEM,function(e,t){
var n=t.metadataItemEntityID,i=r(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n});m.default.execute("deleteItems",a({item:s},i))}),i(l,K.DELETE_METADATA_ITEM_VERSION,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);m.default.execute("deleteVersions",{item:n})}),i(l,K.EDIT_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new M.default({model:n});f.default.trigger("show:modal",a)}),i(l,K.FIX_METADATA_ITEM_MATCH,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new D.default({
model:n});f.default.trigger("show:modal",a)}),i(l,K.GET_METADATA_ITEM_INFO,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new V.default({model:n});f.default.trigger("show:modal",a)}),i(l,K.MARK_METADATA_ITEM_WATCHED,function(e,t,n){var a=(0,p.findMetadataItemModel)(e,t);m.default.execute("markWatched",{item:a}).done(function(){n((0,q.repopulatePage)())})}),i(l,K.MARK_METADATA_ITEM_UNWATCHED,function(e,t,n){var a=(0,p.findMetadataItemModel)(e,t);m.default.execute("markUnwatched",{item:a}).done(function(){
n((0,q.repopulatePage)())})}),i(l,K.OPTIMIZE_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new L.default({item:n});f.default.trigger("show:modal",a)}),i(l,K.PLAY_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,i=r(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n}),o=s.get("type"),l={};"show"!==o&&"season"!==o||(l.unwatched=!0),"episode"===o&&(l.continuous=!0),"track"!==o&&"photo"!==o||(l.siblings=!0),m.default.execute("playMedia",a({
item:s},l,i))}),i(l,K.PLAY_METADATA_ITEM_VERSION,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new S.default({model:n});f.default.trigger("show:modal",a)}),i(l,K.PLAY_PRIMARY_EXTRA,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new k.default({key:n.get("primaryExtraKey"),type:"clip"},{server:n.server,section:n.section});m.default.execute("playMedia",{item:a})}),i(l,K.PLAY_RELATED_MIX,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=n.get("related"),i=a.findWhere({browse:!1});
i.set("type","track"),m.default.execute("playMedia",{item:i})}),i(l,K.QUEUE_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,i=r(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n});m.default.execute("queueMedia",a({item:s},i))}),i(l,K.RATE_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,i=r(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n});m.default.execute("rate",a({item:s},i))}),i(l,K.RECOMMEND_METADATA_ITEM,function(e,t){
var n=(0,p.findMetadataItemModel)(e,t),a=new z.default({model:n});f.default.trigger("show:modal",a)}),i(l,K.REFRESH_METADATA_ITEM,function(e,t,n){var a=(0,p.findMetadataItemModel)(e,t);(0,b.default)(a).fail(function(e){503===e.status?f.default.trigger("show:modal",new E.default({model:a.server})):n((0,H.showAlert)((0,d.default)("There was a problem refreshing this item.")))})}),i(l,K.SHARE_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),a=new F.default({model:n});f.default.trigger("show:modal",a);
}),i(l,K.SPLIT_METADATA_ITEM_APART,function(e,t,n){var a=(0,p.findMetadataItemModel)(e,t);m.default.execute("splitApart",{item:a,skipNavigate:!0}).done(function(){n((0,q.repopulatePage)())})}),i(l,K.SYNC_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);m.default.execute("showSyncModal",{item:n})}),i(l,K.UNMATCH_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);m.default.execute("unmatch",{item:n})}),i(l,K.WATCH_METADATA_ITEM_LATER,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);
m.default.execute("watchLater",{item:n})}),l));t.default=Q,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(52).default,r=n(16).default,s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(9),d=s(u),c=n(96),f=n(17),p=s(f),h=n(75),m=s(h),v=n(836),g=s(v),y=n(837),b=s(y),w=n(121),P=s(w),_=n(136),S=s(_),x=n(336),C=n(55),T=o(C),k=(0,m.default)((l={},i(l,T.POPULATE_METADATA_LIST_RANGE,(0,g.default)({getModel:c.findMetadataListModel})),i(l,T.REPOPULATE_METADATA_LIST_RANGE,(0,
b.default)({getModel:c.findMetadataListModel})),i(l,T.PLAY_METADATA_LIST,function(e,t){var n=t.metadataListEntityID,i=r(t,["metadataListEntityID"]),s=(0,c.findMetadataListModel)(e,{metadataListEntityID:n});p.default.execute("playMedia",a({item:s},i))}),i(l,T.ADD_METADATA_LIST_TO_PLAYLIST,function(e,t){var n=(0,c.findMetadataListModel)(e,t),a=new P.default({model:n,title:n.get("title")});d.default.trigger("show:modal",a)}),i(l,T.SYNC_METADATA_LIST,function(e,t){var n=(0,c.findMetadataListModel)(e,t);
p.default.execute("showSyncModal",{item:n})}),i(l,T.OPTIMIZE_METADATA_LIST,function(e,t){var n=(0,c.findMetadataListModel)(e,t),a=new S.default({item:n});d.default.trigger("show:modal",a)}),i(l,T.SELECT_METADATA_LIST_ITEM,function(e,t,n){var a=t.key,i=t.type,r=t.isRangeSelect,s=(0,c.findMetadataListModel)(e,t),o=s.getCollection(),l=o.get(a);l&&n((0,x.selectItem)({type:i,model:l,collection:o,isRangeSelect:r}))}),i(l,T.DESELECT_METADATA_LIST_ITEM,function(e,t,n){var a=t.key,i=(0,c.findMetadataListModel)(e,t),r=i.getCollection(),s=r.get(a);
s&&n((0,x.deselectModels)([s.id]))}),i(l,T.DESELECT_ALL_METADATA_LIST_ITEMS,function(e,t,n){var a=(0,c.findMetadataListModel)(e,t),i=a.getCollection();n((0,x.deselectCollection)(i))}),l));t.default=k,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(52).default,r=n(1542).default,s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(3),d=s(u),c=n(5),f=s(c),p=n(6),h=s(p),m=n(9),v=s(m),g=n(236),y=s(g),b=n(17),w=s(b),P=n(75),_=s(P),S=n(454),x=s(S),C=n(453),T=s(C),k=n(121),I=s(k),M=n(134),A=s(M),E=n(136),O=s(E),D=n(81),R=n(336),L=n(189),N=n(55),j=o(N),U=(0,
_.default)((l={},i(l,j.SELECT_ITEM,function(e,t,n){var a=t.type,i=t.model,r=t.collection,s=t.isRangeSelect,o=void 0!==s&&s,l=e.get("multiSelect"),u=l.get("activeSelectionType"),d=l.get("activeSelectionRange");if(!u||u===a){if(l.listenToCollection(r),!o||!d||d.collection!==r)return l.set("activeSelectionRange",{collection:r,startModel:i}),void n((0,R.selectModels)([{id:i.id,type:a,model:i}]));var c=d.startModel,f=d.endModel,p=r.indexOf(c),h=r.indexOf(i);if(f){var m=r.indexOf(f);n((0,R.deselectRange)({
collection:r,range:{start:p,end:m}}))}l.set("activeSelectionRange",{collection:r,startModel:c,endModel:i}),n((0,R.selectRange)({type:a,collection:r,range:{start:p,end:h}}))}}),i(l,j.SELECT_MODELS,function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems");a.add(t)}),i(l,j.DESELECT_ALL_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems");n.reset()}),i(l,j.DESELECT_MODELS,function(e,t){var n=e.get("multiSelect"),a=n.get("activeSelectionItems");a.remove(t)}),i(l,j.DESELECT_COLLECTION,function(e,t,n){
var a=e.get("multiSelect"),i=a.get("activeSelectionItems"),r=[];a.stopListening(t),t.each(function(e){i.get(e.id)&&r.push(e.id)}),r.length&&n((0,R.deselectModels)(r))}),i(l,j.SELECT_RANGE,function(e,t,n){var a=t.type,i=t.collection,r=t.range,s=e.get("multiSelect"),o=s.get("activeSelectionItems"),l=[];y.default.each(r,function(e){var t=i.at(e);t&&!o.get(t.id)&&l.push({id:t.id,type:a,model:t})}),l.length&&n((0,R.selectModels)(l))}),i(l,j.DESELECT_RANGE,function(e,t,n){var a=t.collection,i=t.range,r=e.get("multiSelect"),s=r.get("activeSelectionItems"),o=[];
y.default.each(i,function(e){var t=a.at(e);t&&s.get(t.id)&&o.push(t.id)}),o.length&&n((0,R.deselectModels)(o))}),i(l,j.PLAY_SELECTED_ITEMS,function(e,t){var n=e.get("multiSelect"),i=n.get("activeSelectionItems").pluck("model");w.default.execute("playMedia",a({items:i},t))}),i(l,j.ADD_SELECTED_ITEMS_TO_PLAYLIST,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),a=new I.default({model:d.default.first(n),items:n});v.default.trigger("show:modal",a)}),i(l,j.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(e,t,n){
var i=e.get("multiSelect"),r=i.get("activeSelectionItems").pluck("model"),s=f.default.Deferred().resolve().promise();r.forEach(function(e){s=s.then(function(){return w.default.execute("updateWatchedStatus",a({item:e},t))})}),s.fail(function(){var e=t.watched?(0,h.default)("There was an unexpected error marking an item watched."):(0,h.default)("There was an unexpected error marking an item unwatched.");n((0,D.showAlert)(e))}),s.always(function(){n((0,L.repopulatePage)())})}),i(l,j.EDIT_SELECTED_ITEMS,function(e){
var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),a=new A.default({items:n});v.default.trigger("show:modal",a)}),i(l,j.REFRESH_SELECTED_ITEMS,function(e,t,n){var a=e.get("multiSelect"),i=a.get("activeSelectionItems").pluck("model"),r=f.default.Deferred().resolve().promise();i.forEach(function(e){r=r.then(function(){return(0,x.default)(e)})}),r.fail(function(){n((0,D.showAlert)((0,h.default)("There was an unexpected error refreshing an item.")))})}),i(l,j.ANALYZE_SELECTED_ITEMS,function(e,t,n){
var a=e.get("multiSelect"),i=a.get("activeSelectionItems").pluck("model"),r=f.default.Deferred().resolve().promise();i.forEach(function(e){r=r.then(function(){return(0,T.default)(e)})}),r.fail(function(){n((0,D.showAlert)((0,h.default)("There was an unexpected error analyzing an item.")))})}),i(l,j.SYNC_METADATA_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model");w.default.execute("showSyncModal",{item:d.default.first(n),items:n})}),i(l,j.OPTIMIZE_METADATA_ITEMS,function(e){
var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),a=new O.default({item:d.default.first(n),items:n});v.default.trigger("show:modal",a)}),i(l,j.MERGE_SELECTED_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),a=r(n),i=a[0],s=a.slice(1);w.default.execute("merge",{item:i,items:s})}),i(l,j.DELETE_SELECTED_ITEMS,function(e,t,n){var a=e.get("multiSelect"),i=a.get("activeSelectionItems").pluck("model"),r=f.default.Deferred().resolve().promise();
i.forEach(function(e){r=r.then(function(){return e.destroy({wait:!0})})}),r.fail(function(e){var t=403===e.status?(0,h.default)("Ensure that media deletion is enabled for library content in your server settings."):(0,h.default)("There was an unexpected error deleting an item.");n((0,D.showAlert)(t))})}),l));t.default=U,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return(0,d.findServerModel)(e,t).get("desktop").get("quickSearch")}var i=n(52).default,r=n(1).default,s=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(9),u=r(l),d=n(96),c=n(326),f=r(c),p=n(55),h=s(p),m=n(75),v=r(m),g=n(154),y=n(243),b=(0,v.default)((o={},i(o,h.CHANGE_PRIMARY_SERVER,function(e,t,n){var a=e.get("servers");a.findServer(t).done(function(e){e.get("desktop").get("quickSearch").restoreDefaults()})}),i(o,h.RESET_QUICK_SEARCH,function(e,t){var n=a(e,t);n.restoreDefaults({sectionID:n.get("sectionID"),placeholder:n.get("placeholder"),type:n.get("type")})}),i(o,h.FETCH_QUICK_SEARCH,function(e,t,n){
var i=a(e,t),r=t.query,s=void 0===r?i.get("query"):r,o=t.limit;i.abortPendingPopulate(),i.set("isSearchPending",!0),i.fetch({data:{sectionId:i.get("sectionID"),query:s,limit:o}}).done(function(){i.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(e){i.set({isSearchPending:!1,searchError:e})})}),i(o,h.CHANGE_QUICK_SEARCH_QUERY,function(e,t,n){var i=a(e,t),r=t.query,s=t.serverEntityID;""===r.trim()?n((0,g.resetQuickSearch)({serverEntityID:s})):(i.get("query").length>1&&r.length<2&&n((0,
g.resetQuickSearch)({serverEntityID:s})),i.set("query",r))}),i(o,h.CHANGE_QUICK_SEARCH_SETTINGS,function(e,t){var n=a(e,t),i=t.sectionID,r=void 0===i?n.get("sectionID"):i,s=t.type,o=void 0===s?n.get("type"):s,l=t.placeholder,u=void 0===l?n.get("placeholder"):l;n.set({sectionID:r,type:o,placeholder:u})}),i(o,h.SELECT_QUICK_SEARCH_RESULT,function(e,t){var n=a(e,t);if(0!==n.get("hubs").length){var i=t.searchResultEntityID,r=t.offset;i?n.selectByEntityID(i):r&&n.selectByOffset(r)}}),i(o,h.NAVIGATE_QUICK_SEARCH_RESULT,function(e,t,n){
var i=a(e,t),r=t.serverEntityID,s=null!=t.searchResultEntityID?t.searchResultEntityID:i.get("selectedResultEntityID"),o=(0,d.findSearchResultModel)(e,{searchResultEntityID:s}),l=(0,d.findServerModel)(e,t),c=l.id;if(!o){var p=i.pick("query","type"),h=p.query,m=p.type;return m?u.default.trigger("search:"+m,h):u.default.trigger("navigate","search",{serverID:c,query:h}),void n((0,g.resetQuickSearch)({serverEntityID:r}))}var v=o.pick("tagItem","metadataItem"),y=v.tagItem,b=v.metadataItem;if(y){var w=f.default.get(y.get("tagType")),P=w.typeString;
return u.default.trigger("navigate","sectionFilter",{serverID:c,sectionID:o.get("reasonID"),type:y.get("librarySectionType"),key:P,value:y.get("id"),title:y.get("tag")}),void n((0,g.resetQuickSearch)({serverEntityID:r}))}var _=b.get("type"),S=void 0,x=void 0;switch(_){case"photo":return void n((0,g.playQuickSearchItem)({searchResultEntityID:s}));case"photoAlbum":case"show":case"episode":case"movie":case"album":case"artist":x="details",S=b.get("key");break;case"track":x="details",S=b.get("parentKey");
break;case"playlist":x="playlist",S=b.get("ratingKey")}u.default.trigger("navigate",x,{serverID:c,key:S}),n((0,g.resetQuickSearch)({serverEntityID:r}))}),i(o,h.PLAY_QUICK_SEARCH_RESULT,function(e,t,n){var i=a(e,t),r=t.serverEntityID,s=t.shuffle,o=void 0!==s&&s,l=null!=t.searchResultEntityID?t.searchResultEntityID:i.get("selectedResultEntityID"),u=(0,d.findSearchResultModel)(e,{searchResultEntityID:l});return u?void(u.get("metadataItem")&&(n((0,y.playMetadataItem)({metadataItemEntityID:u.get("metadataItem").entityID(),
shuffle:o})),n((0,g.resetQuickSearch)({serverEntityID:r})))):void n((0,g.navigateQuickSearchResult)(t.searchResultEntityID))}),o));t.default=b,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.get("desktop").get("search")}var i=n(52).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(96),l=n(75),u=r(l),d=n(55),c=s(d),f=(0,u.default)(i({},c.FETCH_SEARCH,function(e,t,n){var i=e.get("servers"),r=e.get("experienceSettings").get("searchAllServers"),s=t.query,l=t.limit,u=r?i.where({
isFullServer:!0}):[(0,o.findServerModel)(e,t)];u.forEach(function(e){var t=a(e);t.get("query")!==s&&t.restoreDefaults(),e.get("isConnected")&&(t.abortPendingPopulate(),t.set({isSearchPending:!0,isSearchPopulated:!!t.get("hubs").length,query:s}),t.fetch({data:{query:s,limit:l}}).done(function(){t.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(e){t.set({isSearchPending:!1,searchError:e})}))})}));t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.FETCH_SEARCH);t.fetchSearch=u},function(e,t,n){"use strict";function a(e,t){var n=(0,w.findServerModel)(e,t);return n.get("desktop")}var i=n(12).default,r=n(52).default,s=n(262).default,o=n(1).default,l=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var u,d=n(5),c=o(d),f=n(65),p=o(f),h=n(6),m=o(h),v=n(9),g=o(v),y=n(23),b=l(y),w=n(96),P=n(462),_=l(P),S=n(227),x=o(S),C=n(848),T=o(C),k=n(35),I=o(k),M=n(75),A=o(M),E=n(222),O=o(E),D=n(299),R=o(D),L=n(1310),N=o(L),j=n(135),U=o(j),F=n(155),B=o(F),z=n(1308),$=o(z),V=n(81),H=n(188),q=l(H),W=n(55),K=l(W),Q=(0,
A.default)((u={},r(u,K.TEST_SERVER,function(e,t){var n=(0,w.findServerModel)(e,t);g.default.trigger("test:server",n)}),r(u,K.CONFIRM_RELAY_CONNECTION,function(e,t,n){var a=(0,w.findServerModel)(e,t),i=e.get("experienceSettings"),r=i.get("relayReminders"),s=r[a.id]||{},o=s.remindAfter;if(!o||!p.default.unix(o).isAfter((0,p.default)())){var l=new N.default;g.default.trigger("show:modal",l),n(q.setRelayReminder(t))}}),r(u,K.SET_RELAY_REMINDER,function(e,t){var n=(0,w.findServerModel)(e,t),a=e.get("experienceSettings"),r=a.get("relayReminders"),s=r[n.id]||{};
r[n.id]=(0,T.default)(s.times),a.save("relayReminders",i({},r))}),r(u,K.FETCH_LIBRARIES,(0,O.default)({key:"libraries",getModel:a})),r(u,K.POPULATE_LIBRARIES,(0,R.default)({key:"libraries",getModel:a})),r(u,K.ADD_LIBRARY,function(e,t){var n=(0,w.findServerModel)(e,t),a=new U.default({server:n,redirect:!0});g.default.trigger("show:modal",a)}),r(u,K.START_LIBRARY_REFRESH,function(e,t,n){var i=(0,w.findServerModel)(e,t),r=a(e,t),s=r.get("libraries"),o=t.libraryID||"all",l=t.force?{force:1}:void 0,u=b.join(["/library/sections",o,"refresh"],l),d=i.getXHROptions(u);
if(t.cancel&&(d.type="DELETE"),c.default.ajax(d).done(function(){n(q.fetchLibraries({serverEntityID:t.serverEntityID}))}).fail(function(e){var a=t.cancel?(0,m.default)("There was a problem canceling the update."):(0,m.default)("There was a problem updating a library.");n((0,V.showAlert)(a))}),t.libraryID){var f=s.get(o);f&&f.set("refreshing",!t.cancel)}else t.cancel&&s.each(function(e){return e.set("refreshing",!1)})}),r(u,K.SHARE_LIBRARIES,function(e,t){var n=(0,w.findServerModel)(e,t);g.default.trigger("show:modal",new B.default({
defaultPaneType:"ownedServer",defaultPaneID:n.id}))}),r(u,K.ENABLE_HTTP_FALLBACK,function(e,t,n){var a=(0,w.findServerModel)(e,t),i=new $.default({server:a}),r=i.promise.then(function(){var e=a.get("publicAddressMatches")?x.default.SAME_NETWORK:x.default.ALWAYS;return I.default.save("allowHttpFallback",e)});r.done(function(){n(q.testServer({serverEntityID:t.serverEntityID}))}),g.default.trigger("show:modal",i)}),r(u,K.OPTIMIZE_DATABASE,function(e,t,n){var a=(0,w.findServerModel)(e,t),i=a.getXHROptions("/library/optimize",{
type:"PUT"});c.default.ajax(i).done(function(){n((0,V.showAlert)({type:_.SUCCESS,message:(0,m.default)("The database was optimized.")}))}).fail(function(e){n((0,V.showAlert)((0,m.default)("There was a problem optimizing the database.")))})}),r(u,K.CLEAN_BUNDLES,function(e,t,n){var a=(0,w.findServerModel)(e,t),i=a.getXHROptions("/library/clean/bundles",{type:"PUT"});c.default.ajax(i).done(function(){n((0,V.showAlert)({type:_.SUCCESS,message:(0,m.default)("Unused bundles are being removed.")}))}).fail(function(e){
n((0,V.showAlert)((0,m.default)("There was a problem removing unused bundles.")))})}),r(u,K.EMPTY_TRASH,function(e,t,n){var i=(0,w.findServerModel)(e,t),r=a(e,t),o=r.get("libraries"),l=t.libraryID,u=l?[l]:o.map(function(e){return e.id}),d=u.map(function(e){var t=i.getXHROptions("/library/sections/"+e+"/emptyTrash",{type:"PUT"});return c.default.ajax(t)});c.default.when.apply(c.default,s(d)).done(function(){n((0,V.showAlert)({type:_.SUCCESS,message:(0,m.default)("The trash was emptied.")}))}).fail(function(e){
n((0,V.showAlert)((0,m.default)("There was a problem emptying the trash.")))})}),r(u,K.DELETE_SERVER,function(e,t,n){var a=(0,w.findServerModel)(e,t),i=e.get("cloudServer");if(a){if(i.get("isResolved")){var r=i.getXHROptions("/api/servers/"+a.id,{type:"DELETE"});c.default.ajax(r)}var s=i.get("resources"),o=s.get(a.id);if(o&&o.trigger("destroy",o,o.collection),a.get("isFullOwnedServer")&&a.get("isConnected")){var l=a.get("cloudAccount");l.destroy().done(function(){a.set({myPlexSigninState:"none",myPlexSubscription:!1
})}).always(function(){n(q.testServer({serverEntityID:t.serverEntityID})),a.populate().fail(function(){a.trigger("destroy",a,a.collection)})})}else a.trigger("destroy",a,a.collection)}}),r(u,K.START_ACTIVITY,function(e,t){var n=a(e,t),i=n.get("activities");i.add([t.activity],{parse:!0})}),r(u,K.UPDATE_ACTIVITY,function(e,t){var n=a(e,t),i=n.get("activities");i.add([t.activity],{parse:!0,merge:!0})}),r(u,K.FINISH_ACTIVITY,function(e,t){var n=a(e,t),i=n.get("activities");i.remove(t.activity.uuid)}),
r(u,K.EVENT_CONNECTION_OPEN,function(e,t){var n=(0,w.findServerModel)(e,t),i=a(e,t),r=i.get("activities");n.get("isFullOwnedServer")&&r.fetch()}),u));t.default=Q,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.get("ui").get("hubsPage")}var i=n(52).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(96),u=n(221),d=r(u),c=n(222),f=r(c),p=n(299),h=r(p),m=n(75),v=r(m),g=n(187),y=n(55),b=s(y),w=(0,v.default)((o={},i(o,b.INIT_HUBS_PAGE,function(e,t){
var n=a(e),i=n.get("hubs"),r=(0,l.findServerModel)(e,t);if(!i||i.server!==r||i.hubKey!==t.hubKey){var s=new d.default([],{server:r,hubKey:t.hubKey,count:12,includeEmpty:!0,excludes:["playlists"]});s.reset(),s.abortPendingPopulate(),s.resetPopulatePromise(null),n.restoreDefaults({hubs:s})}}),i(o,b.FETCH_HUBS,(0,f.default)({key:"hubs",getModel:a})),i(o,b.POPULATE_HUBS,(0,h.default)({key:"hubs",getModel:a})),i(o,b.REPOPULATE_PAGE,function(e,t,n){var i=a(e),r=i.get("hubs");r&&r.each(function(e){var t=e.get("metadataList");
!e.get("random")&&t.get("containerKey")&&n((0,g.repopulateMetadataListRange)({metadataListEntityID:t.entityID(),count:r.count}))})}),o));t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.INIT_HUBS_PAGE);t.initHubsPage=u;var d=(0,s.default)(l.FETCH_HUBS);t.fetchHubs=d;var c=(0,s.default)(l.POPULATE_HUBS);t.populateHubs=c},function(e,t,n){"use strict";function a(e){
return e.get("ui").get("metadataListPage")}var i=n(52).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(96),u=n(89),d=r(u),c=n(75),f=r(c),p=n(187),h=n(55),m=s(h),v=(0,f.default)((o={},i(o,m.INIT_METADATA_LIST_PAGE,function(e,t){var n=a(e),i=n.get("metadataList"),r=(0,l.findServerModel)(e,t);if(!i||i.server!==r||i.get("containerKey")!==t.key){var s=new d.default({containerKey:t.key,containerTitle:t.title},{server:r});n.set("metadataList",s)}}),i(o,m.REPOPULATE_PAGE,function(e,t,n){
var i=a(e),r=i.get("metadataList");r&&n((0,p.repopulateMetadataListRange)({metadataListEntityID:r.entityID()}))}),o));t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(68),s=a(r),o=n(55),l=i(o),u=(0,s.default)(l.INIT_METADATA_LIST_PAGE);t.initMetadataListPage=u},function(e,t,n){"use strict";var a=n(52).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(96),o=n(75),l=i(o),u=n(222),d=i(u),c=n(55),f=r(c),p=(0,
l.default)(a({},f.VIEW_ITEM_DETAILS,(0,d.default)({getModel:function(e,t){var n=(0,s.findMetadataItemModel)(e,{metadataItemEntityID:t});return e.get("ui").set("metadataItem",n),n.get("children")}})));t.default=p,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e.get("user").get("desktop")}var i=n(52).default,r=n(16).default,s=n(123).default,o=n(1).default,l=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var u,d=n(3),c=o(d),f=n(5),p=o(f),h=n(46),m=o(h),v=n(75),g=o(v),y=n(222),b=o(y),w=n(299),P=o(w),_=n(55),S=l(_),x=(0,
g.default)((u={},i(u,S.FETCH_PLANS,(0,b.default)({key:"plans",getModel:a})),i(u,S.POPULATE_PLANS,(0,P.default)({key:"plans",getModel:a})),i(u,S.FETCH_UNWATCHED_WATCH_LATER_LIST,(0,b.default)({key:"unwatchedWatchLaterList",getModel:a})),i(u,S.POPULATE_UNWATCHED_WATCH_LATER_LIST,(0,P.default)({key:"unwatchedWatchLaterList",getModel:a})),i(u,S.FETCH_UNWATCHED_RECOMMENDED_LIST,(0,b.default)({key:"unwatchedRecommendedList",getModel:a})),i(u,S.POPULATE_UNWATCHED_RECOMMENDED_LIST,(0,P.default)({key:"unwatchedRecommendedList",
getModel:a})),i(u,S.CLEAR_UPDATE_USER_ERROR,function(e){var t=a(e);t.set("updateUserError",null)}),i(u,S.UPDATE_USER,function(e,t,n){var i=a(e),o=e.get("user"),l=t.avatar,u=r(t,["avatar"]);if(i.set({isUpdatingUser:!0,updateUserError:null}),l){for(var d=l.split(","),f=s(d,2),h=f[0],v=f[1],g=h.substr(5),y=atob(v),b=[],w=0;w<y.length;w++)b.push(y.charCodeAt(w));var P=new Uint8Array(b),_=new Blob([P],{type:g});u.avatar=_}var S=new FormData;c.default.each(u,function(e,t){S.append(t,e)});var x=o.server.getXHROptions(c.default.result(o,"url"),{
type:"PUT",processData:!1,contentType:!1,data:S});p.default.ajax(x).done(function(e){t.avatar&&o.fetch();var n=c.default.reduce(t,function(e,t,n){return o.hasAttr(n)&&(e[n]=t),e},{});o.set(n),i.set({isUpdatingUser:!1,updateUserError:null})}).fail(function(e){var t=m.default.parseXML(e.responseText),n=c.default.isArray(t)?t:[t.error],a=c.default.groupBy(n,function(e){return e.field?e.field:"request"});i.set({isUpdatingUser:!1,updateUserError:a})})}),u));t.default=x,e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t=(0,s.default)(l.default,e);return t}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=n(839),s=i(r),o=n(1118),l=i(o);e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),r=n(144),s=a(r),o=(0,i.createSelector)(s.default,function(e){return e.searchResults});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),r=a(i),s=n(30),o=n(190),l=a(o),u=void 0,d=(0,s.createSelector)(l.default,function(e){var t=r.default.pluck(e.activeSelectionItems,"id");return u&&r.default.isEqual(u,t)?u:(u=t,t)});t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NONE:100,SMALL:150,LARGE:200,HUGE:250};n.settings=[{value:n.NONE,title:"None"},{value:n.SMALL,title:"Small"},{value:n.LARGE,title:"Large"},{value:n.HUGE,title:"Huge"}],t.default=n,e.exports=t.default;
},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={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.default=n,e.exports=t.default},function(e,t){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={PENDING:"pending",FAILED:"failed",COMPLETE:"complete",failureCodes:{INVALID_PATH:"invalidPath",DISK_FULL:"diskFull",DISK_UNWRITABLE:"diskUnwritable"}};t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={TINY:50,SMALL:75,NORMAL:100,LARGE:125,HUGE:200};n.settings=[{value:n.TINY,title:"Tiny"},{value:n.SMALL,title:"Small"},{value:n.NORMAL,title:"Normal"},{value:n.LARGE,
title:"Large"},{value:n.HUGE,title:"Huge"}],t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=a(r),o=n(5),l=a(o),u=n(6),d=a(u),c=n(31),f=a(c),p=n(9),h=a(p),m=n(42),v=a(m),g=n(131),y=a(g),b=n(46),w=a(b),P=n(48),_=a(P),S=n(11),x=i(S),C=n(188),T=i(C),k=n(189),I=i(k),M=n(56),A=a(M),E=n(142),O=a(E),D=n(106),R=a(D),L=n(522),N=a(L),j=n(186),U=a(j),F=n(520),B=a(F),z=n(185),$=a(z),V=f.default.extend({
mixins:_.default,url:function H(){var e=this.server.get("activeConnection"),t=e.id.replace(/^http/,"ws"),H=this.server.resolveUrl("/:/websockets/notifications",{connection:new R.default({uri:t}),appendToken:!0});return H},initialize:function(e){s.default.bindAll(this,"onOpen","onClose","onError","onMessage"),this.server=e.server},open:function(){return this.socket&&this.close(),this._deferred=l.default.Deferred(),this.socket=new WebSocket(s.default.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("update");e&&"installing"===e.get("state")&&this.server.set("connected",null),
this.server.trigger("error:connection",this.server)}},preference:function(e){e.key=e.id,e.server=this.server,this.server.trigger("socket:setting",e)},timeline:function(e){e.server=this.server;var t={server:this.server,onlyIfCached:!0},n=new O.default({key:e.sectionID},t);if(!s.default.isEmpty(n)){t.section=n,e.section=n;var a="/library/metadata/"+e.itemID,i=new A.default({key:a},t);if(s.default.isEmpty(i)||(e.item=i,i.set({metadataState:e.metadataState,mediaState:e.mediaState}),i.trigger("socket:timeline",e)),
e.rootItemID){var r="/library/metadata/"+e.rootItemID,o=new A.default({key:r},t);s.default.isEmpty(o)||(o.fetch(),o.refreshChildren())}if(e.parentItemID){var l="/library/metadata/"+e.parentItemID,u=new A.default({key:l},t);s.default.isEmpty(u)||(u.fetch(),u.refreshChildren())}n.trigger("socket:timeline",e)}e.server.trigger("socket:timeline",e),h.default.trigger("timeline",e)},status:function q(e){var q=e.title+(e.description?": "+e.description:"");if(h.default.trigger("show:status",this.server,q),
this.server.trigger("socket:status",e),"LIBRARY_UPDATE"===e.notificationName){var t=x.resolve("appStore"),n=this.server.entityID();n&&(t.dispatch(T.fetchLibraries({serverEntityID:n})),t.dispatch(I.repopulatePage()))}},progress:function(e){h.default.trigger("show:status",this.server,e.message),this.server.trigger("socket:status",e)},playing:function(e){if(e.sessionKey&&!this.server.get("shared")){var t=this.server.get("sessions"),n=t.get(e.sessionKey);if(n&&n.get("key")===e.key)if(e.state===v.default.states.STOPPED){
n.trigger("destroy",n,n.collection),n.cache.remove(n);var a=x.resolve("appStore"),i=this.server.entityID();i&&a.dispatch(I.repopulatePage())}else{var r=n.get("Player");r&&(r.state=e.state,n.trigger("change:Player",n,r)),n.set("viewOffset",e.viewOffset)}else{if(t.hasPendingPopulate())return;var o=t.fetch();o.done(s.default.bind(function(){if(n=t.get(e.sessionKey)){var a=x.resolve("appModel"),i=a.get("user"),r=n.get("Player").title,o=n.get("User").title,l=n.get("grandparentTitle"),u=n.get("title");l&&(u=l+" - "+u);
var c=(0,d.default)("{1} started playing {2} on {3}.",o,u,r);o&&o!==i.get("username")&&h.default.trigger("show:status",this.server,c),this.server.trigger("socket:playing",s.default.extend(e,{username:o||(0,d.default)("Unknown"),title:u,player:r}))}},this))}}},syncState:function(e){var t=new N.default({key:e.key},{server:this.server,syncItemId:e.syncItemId,onlyIfCached:!0});if(!s.default.isEmpty(t)){var n=t.get("Media");s.default.each(n,function(n){var a=n.Part;s.default.each(a,function(n){n.transcodeState=e.syncFileState,
n.transcodeStateContext=e.syncFileStateContext,n.syncState=e.syncState,n.syncStateContext=e.syncStateContext;var a=y.default.getSyncStateFromPart(n);y.default.waitingRegex.test(a)&&(n.key="placeholder"),t.trigger("change:Media",t,t.get("Media"))})})}},backgroundGeneratorState:function(e){var t={server:this.server,onlyIfCached:!0},n=new U.default({id:e.generatorID},t);s.default.isEmpty(n)||n.fetch()},versionState:function(e){var t={server:this.server,onlyIfCached:!0},n=new U.default({id:e.generatorID
},t);if(!s.default.isEmpty(n)){var a=n.get("children").getCollection(),i=a.get(e.metadataItemID);i&&i.set({processingState:e.state,processingStateContext:e.stateContext})}},backgroundProcessingQueue:function(e){var t=new B.default([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.default.isEmpty(t)){var n=t.first();n&&n.fetch()}},"transcodeSession.start":function(e){if("static"===e.context){var t=new $.default([],{server:this.server,allowInCache:!0,onlyIfCached:!0});s.default.isEmpty(t)||t.fetch();
}},"transcodeSession.update":function(e){if("static"===e.context){var t=new $.default([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.default.isEmpty(t)){var n=t.get(e.key);n?n.set(n.parse(e)):t.fetch()}}},"transcodeSession.end":function(e){this["transcodeSession.start"].apply(this,arguments)},"update.statechange":function(e){var t=this.server.get("update"),n=s.default.pick(e,t.whitelistedAttrs);s.default.defaults(n,s.default.result(t,"defaults")),"downloading"===t.get("state")&&"available"===n.state&&(n.state="downloading"),
t.set(n)},reachability:function(e){var t=this.server.get("cloudAccount");t.fetch()},account:function(e){if(this.server.set("myPlexSubscription",e.hasPlexPass),this.server.supports("reachability")){var t="/myplex/refreshReachability",n=s.default.extend(this.server.getXHROptions(t),{type:"PUT"});l.default.ajax(n)}var a=x.resolve("appModel"),i=a.get("cloudServer"),r=a.get("user");r.get("isSignedIn")&&i.get("resources").fetch()},activity:function W(e){w.default.splitChildren(e);var t=x.resolve("appStore"),n=this.server.entityID(),W=e.Activity?e.Activity[0]:e;
W.Context?(W.context=W.Context[0],delete W.Context):W.context={},W.Response?(W.response=W.Response[0],delete W.Response):W.response={},n&&("started"===e.event?t.dispatch(T.startActivity({serverEntityID:n,activity:W})):"updated"===e.event?t.dispatch(T.updateActivity({serverEntityID:n,activity:W})):"ended"===e.event&&t.dispatch(T.finishActivity({serverEntityID:n,activity:W})))},onOpen:function(e){this.server.trigger("socket:websocket",{opened:!0}),this.trigger("open",this.server,e),this._deferred.resolve(this.server,e);
var t=x.resolve("appStore"),n=this.server.entityID();n&&t.dispatch(T.eventConnectionOpen({serverEntityID:n,event:e}))},onClose:function(e){this.close(),this.server.trigger("socket:websocket",{closed:!0}),this.trigger("close",this.server,e),this._deferred.reject(this.server,e),this.testConnection()},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()},onMessage:function(e){
var t;try{t=JSON.parse(e.data)}catch(n){return}var a=t.type,i=this[a];s.default.each(t._children,function(e){this.trigger("message",e),s.default.isFunction(i)&&i.call(this,e)},this)}});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1756),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({tagName:"span",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1757),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(26),p=a(f),h=n(80),m=a(h),v=u.default.ItemView.extend({className:"background-container",template:r.default,ui:{background:".background"},onlyAfterRender:["onTransitionIn","onTransitionOut","onImageLoad"],initialize:function(){o.default.bindAll(this,"onImageLoad"),this.image=new m.default({width:1280,height:720}),this.listenTo(c.default,"show:background",this.onTransitionIn),this.listenTo(c.default,"hide:background",this.onTransitionOut);
},load:function(e){if(!this.model)return void p.default.warn("A background cannot be loaded without a model, current key: "+this.currentKey);if(this.currentBackground!==e||!o.default.isEmpty(this.imageFilters)||this.image.hasFilters()){if(this.currentBackground=e,!e)return void this.ui.background.addClass("transition-out");this.image.server=this.model.server,this.image.setFilters(this.imageFilters),this.image.load(e,!0).done(this.onImageLoad)}},showBackground:function(e){this.ui.background.css("background-image","url("+e+")").removeClass("transition-out");
},onRender:function(){this.currentSrc&&this.showBackground(this.currentSrc)},onClose:function(){this.image.close()},onTransitionIn:function(e){return this.model&&this.model.id===e.model.id?void this.references++:(this.references=1,this.model=e.model,this.listenTo(this.model,"change:art",this.onArtChange),this.imageFilters=e.imageFilters||{},this.currentKey=this.model.get("key"),this.ui.background.toggleClass("dim",!!e.dim),void this.load(this.model.get("art")))},onTransitionOut:function(e){if(this.model&&this.model.id===e.id){
if(this.references>1)return void this.references--;this.image.cancel(),this.stopListening(this.model),this.model=null,this.currentBackground=null,this.currentSrc=null,this.ui.background.addClass("transition-out")}},onArtChange:function(e,t){this.load(t)},onImageLoad:function(e){this.currentBackground&&this.showBackground(e),this.currentSrc=e}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1758),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(9),v=a(m),g=n(42),y=a(g),b=n(57),w=a(b),P=n(526),_=a(P),S=n(1144),x=a(S),C=n(528),T=a(C),k=n(1165),I=a(k),M=n(1352),A=a(M),E=n(1351),O=a(E),D=n(1346),R=a(D),L=n(1345),N=a(L),j=n(1349),U=a(j),F=n(1347),B=a(F),z=n(1343),$=a(z),V=n(192),H=a(V),q=n(1101),W=a(q),K=f.default.Layout.extend({
el:"#plex",template:s.default,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(){l.default.bindAll(this,"triggerResizeEvent","onResize","onScroll");var e=h.resolve("appModel");this.user=e.get("user"),this.modals=[],this.playerConstructors={full:{},mini:{}},this.playerConstructors.full[y.default.types.VIDEO]=A.default,this.playerConstructors.full[y.default.types.PHOTO]=U.default,
this.playerConstructors.mini[y.default.types.VIDEO]=O.default,this.playerConstructors.mini[y.default.types.MUSIC]=R.default,this.playerConstructors.mini[y.default.types.PHOTO]=B.default,l.default.each(l.default.keys(this.customRegions),function(e){var t=this.customRegions[e],n=t.selector||l.default.uniqueId("r");t.scrollable?this.addRegion(e,new W.default({el:n,channelName:t.channelName})):this.addRegion(e,n)},this),this.listenTo(e,{"change:authorized":this.onAuthorizedChange,"change:isFirstRun":this.onFirstRunChange,
"change:multiserver":this.onMultiserverChange}),this.listenTo(this.user,{"change:locked":this.onUserLockedChange}),this.listenTo(v.default,{"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}),(0,d.default)(window).on("resize",this.onResize)},showCustomRegion:function(e,t){var n=this.customRegions[e],a=this[e];return this.user.get("locked")?(a.lockedView=t,void t.close()):void(n.append?a.append(t,this.$el):n.prepend?a.prepend(t,this.$el):a.show(t))},showLoading:function(){this.hideBar("alertbar"),this.user.get("locked")&&this.resetContentLockedRegions(),this.showCustomRegion("content",new _.default);
},showView:function(e){(0,d.default)(".tooltip").remove(),this.hideBackground(this.currentView,e),v.default.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 T.default(e);this.openAlerts[t]=!0,this.listenToOnce(n,"close",function(){delete this.openAlerts[t]}),this.$el.append(n.render().el)}},showAlertBar:function(){var e=w.default.get("alerts");e&&e.length&&(w.default.set("alerts",null),
this.showBar("alertbar",new H.default({alert:l.default.first(e)})))},showBar:function(e,t){var n=this.customRegions[e],a=n.modifier;a&&this.$el.addClass(this.customRegions[e].modifier),t&&this.showCustomRegion(e,t)},hideBar:function(e,t){t||(t={});var n=this.customRegions[e],a=n.modifier;a&&this.$el.removeClass(a),t.preserve||(this[e].lockedView=null,this[e].close())},showModal:function(e){this.modals.push(e);var t=(0,d.default)("body");e.transparent&&t.addClass("show-modal-transparent"),t.append(e.render().el);
},hideModal:function(e){var t=l.default.indexOf(this.modals,e);t>-1&&this.modals.splice(t,1)[0].close(),e.transparent&&!l.default.findWhere(this.modals,{transparent:!0})&&(0,d.default)("body").removeClass("show-modal-transparent")},showPlayer:function(e){this.hideLoadingMiniPlayerView(),(0,d.default)(".tooltip").remove();var t=this.player.currentView,n=t&&t.playQueue===e.playQueue;if(e.controller||!n){var a=e.useMiniPlayer||e.type===y.default.types.MUSIC,i=h.resolve("appModel"),r=i.get("primaryPlayer"),s=r&&"cast"===r.get("protocol"),o=s||e.type===y.default.types.VIDEO;
(o||e.isSwitchingPlayers)&&this.hidePlayer();var l=this.playerConstructors[a?"mini":"full"][e.type],u=new l(e);a?(this.showCustomRegion("miniPlayer",u),this.$el.addClass("show-mini-player")):this.showCustomRegion("player",u)}},showPlayerLoading:function(){this.showCustomRegion("miniPlayer",new N.default)},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.miniPlayer.close(),
this.$el.removeClass("show-mini-player"),this.player.close())},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;v.default.trigger("audio:fadeOut",{exceptKey:n}),e&&e.model&&v.default.trigger("hide:background",this.currentView.model)},hideLoadingMiniPlayerView:function(){this.miniPlayer.currentView instanceof N.default&&(this.miniPlayer.currentView.$el.remove(),this.miniPlayer.close())},lockAll:function(){
var e=l.default.map(l.default.keys(this.customRegions),function(e){return this[e]},this);l.default.each(e,function(e){e.close()},this)},resetContentLockedRegions:function(){l.default.each(l.default.keys(this.customRegions),function(e){var t=this.customRegions[e];if(!t.global){var n=this[e];n.lockedView&&(n.lockedView=null)}},this)},restoreAll:function(){var e=h.resolve("appModel");e.get("authorized")&&this.showBar("navbar",new $.default({model:e}),{prepend:!0}),this.showCustomRegion("background",this.backgroundView),
this.showCustomRegion("status",new I.default)},triggerResizeEvent:function(){v.default.trigger("resize")},onRender:function(){this.backgroundView=new x.default,this.restoreAll()},onAuthorizedChange:function(e,t){if(t){var n=h.resolve("appModel");this.showBar("navbar",new $.default({model:n}),{prepend:!0});var a=this.user.get("locked");a!==!1&&null!==a||this.showAlertBar()}else this.hideBar("navbar"),this.hidePlayer(),v.default.trigger("navigate:refresh")},onFirstRunChange:function(e,t){this.$el.toggleClass("show-first-run",t);
},onMultiserverChange:function(e,t){this.$el.toggleClass("show-multiserver",t)},onUserLockedChange:function(e,t){t?this.lockAll():t!==!1&&null!==t||(null===t&&(this.backgroundView=new x.default),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.default=K,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1759),s=i(r),o=n(10),l=i(o),u=l.default.ItemView.extend({template:s.default,className:"download-server-pane",serializeData:function(){
var e=this.model.toJSON();return a({shouldUseDropup:e.releases.length>4},e)}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1760),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(17),p=a(f),h=10,m=1,v=-1,g=u.default.ItemView.extend({tagName:"span",className:"rating heart-rating",template:r.default,disabled:!0,events:{"click .like-meh-btn":"onLikeMehClick","click .dislike-btn":"onDislikeClick"},bindings:{
".like-meh-btn":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===h;t.toggleClass("user-rating",n)}},".like-meh-btn > i":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===h;t.toggleClass("plex-icon-heart",n),t.toggleClass("plex-icon-heart-empty",!n)}},".dislike-btn":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===m;t.toggleClass("user-rating",n)}}},persistRating:function(e){return p.default.execute("rate",{
item:this.model,rating:e})},onUserRatingChange:function(e,t){this.render()},onLikeMehClick:function(e){this.persistRating(this.model.get("userRating")===h?v:h)},onDislikeClick:function(){return this.model.get("userRating")===m?void this.persistRating(v):void this.persistRating(m).done(o.default.bind(function(){var e=this.model.server.get("playQueueManager"),t=e.getFor(this.model);t.fetch().then(function(){c.default.trigger("shortcut:skipNext")})},this))}});t.default=g,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1761),s=a(r),o=n(10),l=a(o),u=n(11),d=i(u),c=n(62),f=a(c),p=l.default.ItemView.extend({template:s.default,initialize:function(){var e=d.resolve("appModel");this.listenTo(e,"change:primaryServer",this.render),this.listenTo(e.get("user"),"change:signedIn",this.render)},serializeData:function(){var e=d.resolve("appModel"),t=e.get("user"),n=e.get("primaryServer"),a={host:window.location.host,userAgent:window.navigator.userAgent,
browser:f.default,user:t.toJSON(),hasPlexPass:t.hasPlexPass(),cloudServer:t.server.toJSON(),cloudServerUrl:t.server.url()};return n&&(a.primaryServer=n.toJSON(),a.primaryServerUrl=n.url()),a}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1763),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"logs-container",template:r.default,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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(r(o),n(66)),u=r(l),d=n(34),c=n(11),f=n(78),p=s(f),h=n(77),m=r(h),v=n(191),g=r(v),y=n(1480),b=r(y),w=n(260),P=r(w),_=g.default.extend({mountReact:function(){var e=(0,
c.resolve)("appStore"),t=(0,m.default)(p.SERVER,this.options.serverID);u.default.render({$$typeof:i,type:d.Provider,key:null,ref:null,props:a(d.Provider.defaultProps,{children:{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{serverEntityID:t}),_owner:null},store:e}),_owner:null},this.ui.sidebar[0]),u.default.render({$$typeof:i,type:d.Provider,key:null,ref:null,props:a(d.Provider.defaultProps,{children:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{
machineIdentifier:this.options.serverID,serverEntityID:t,query:this.options.query}),_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1764),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=d.default.ItemView.extend({className:"sign-in-form",template:s.default,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,f.resolve("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},serializeData:function(){return{showRememberMe:this.showRememberMe
}},validateAll:function(e,t,n){var a=!0;return t||(t=this.validationFields),l.default.each(t,l.default.bind(function(t){var i=e[t];this.validate(i,n[t],n)||(a=!1)},this)),a},validate:function(e,t,n){var a,i=e.id;if(l.default.indexOf(this.validationFields,i)<0)return!0;var r=this.ui[i];return a="confirm"===e.id?t===e.form.password.value:!!t,r.toggleClass("has-error",!a),a},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"),f.resolve("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"),f.resolve("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.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(66)),l=r(o),u=n(34),d=n(11),c=n(191),f=r(c),p=n(1498),h=r(p),m=n(1453),v=r(m),g={$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{}),_owner:null},y={$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{}),_owner:null},b=f.default.extend({mountReact:function(){var e=(0,
d.resolve)("appStore");l.default.render({$$typeof:i,type:u.Provider,key:null,ref:null,props:a(u.Provider.defaultProps,{children:g,store:e}),_owner:null},this.ui.sidebar[0]),l.default.render({$$typeof:i,type:u.Provider,key:null,ref:null,props:a(u.Provider.defaultProps,{children:y,store:e}),_owner:null},this.ui.page[0])}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1767),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(23),y=i(g),b=n(17),w=a(b),P=n(343),_=a(P),S=n(342),x=a(S),C=n(121),T=a(C),k=n(134),I=a(k),M=n(545),A=a(M),E=n(546),O=a(E),D=n(199),R=a(D),L=n(198),N=a(L),j=n(197),U=a(j),F=n(136),B=a(F),z=["episode","movie","clip","userPlaylistItem"],$={
preventDefault:!0,stopPropagation:!1},V=f.default.ItemView.extend({className:"action-bar",template:s.default,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"},triggers:{"click .play-btn":"play","click .play-version-btn":l.default.extend({
event:"playVersion"},$),"click .download-btn":l.default.extend({event:"download"},$),"click .play-all-btn":l.default.extend({event:"play"},$),"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":l.default.extend({event:"analyze"},$),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .match-btn":l.default.extend({
event:"fixMatch"},$),"click .select-btn":"select","click .deselect-btn":"deselect","click .fix-match-btn":l.default.extend({event:"fixMatch"},$),"click .unmatch-btn":l.default.extend({event:"unmatch"},$),"click .split-apart-btn":l.default.extend({event:"splitApart"},$),"click .merge-btn":l.default.extend({event:"merge"},$),"click .sync-btn":"sync","click .convert-btn":l.default.extend({event:"convert"},$),"click .watch-later-btn":l.default.extend({event:"watchLater"},$),"click .share-btn":l.default.extend({
event:"share"},$),"click .recommend-btn":l.default.extend({event:"recommend"},$),"click .delete-btn":l.default.extend({event:"delete"},$),"click .delete-versions-btn":l.default.extend({event:"deleteVersions"},$),"click .delete-from-user-playlist-btn":l.default.extend({event:"deleteFromUserPlaylist"},$),"click .info-btn":l.default.extend({event:"info"},$),"click .play-next-btn":l.default.extend({event:"playNext"},$),"click .add-to-queue-btn":l.default.extend({event:"addToQueue"},$),"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",l.default.throttle(this.updateDropdown,50)),this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),
this.listenTo(v.default,{"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(v.default,"shortcut:play",this.onPlayUnwatched),this.listenTo(v.default,"shortcut:delete",this.onDeleteFromUserPlaylist)},serializeData:function(){var e=l.default.extend({},this.mediaActions.attributes);
if(e.isSingleItem=l.default.contains(z,this.type),this.mediaActions.get("showDownload")){e.downloadUrl=this.model.getDownloadUrl();var t=this.model.getFilepath();t&&(e.downloadName=y.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 a=this.ui.secondaryDivider,i=a.prevAll(":not(:has(.hidden))").length,r=a.nextAll(":not(:has(.hidden))").length;
a.toggleClass("hidden",!i||!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()||w.default.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayVersion:function(){this.ui.playVersionBtn.isDisabled()||v.default.trigger("show:modal",new _.default({model:this.model}))},onDownload:function(){this.model.get("Media").length>1?v.default.trigger("show:modal",new x.default({model:this.model})):window.location.href=this.model.getDownloadUrl()},onPlayUnwatched:function(){this.ui.playUnwatchedBtn.isDisabled()||w.default.execute("playMedia",{
items:this.mediaActions.getActionTargets(),unwatched:!0})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||w.default.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")});w.default.execute("playMedia",{items:[n]})}},onEdit:function(){this.ui.editBtn.isDisabled()||(this.model.get("isPlaylist")?v.default.trigger("show:modal",new A.default({
model:this.model})):v.default.trigger("show:modal",new I.default({mediaActions:this.mediaActions})))},onRefresh:function(){this.ui.refreshBtn.isDisabled()||w.default.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onAnalyze:function(){this.ui.analyzeBtn.isDisabled()||w.default.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||w.default.execute("markWatched",{items:this.mediaActions.getActionTargets()
})},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||w.default.execute("markUnwatched",{items:this.mediaActions.getActionTargets()})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1)},onFixMatch:function(){v.default.trigger("show:modal",new O.default({model:this.model}))},onUnmatch:function(){w.default.execute("unmatch",{item:this.model})},onSplitApart:function(){w.default.execute("splitApart",{item:this.model});
},onSync:function(){this.ui.syncBtn.isDisabled()||w.default.execute("showSyncModal",{item:this.model,items:this.mediaActions.getActionTargets()})},onConvert:function(){v.default.trigger("show:modal",new B.default({item:this.model,items:this.mediaActions.getActionTargets()}))},onWatchLater:function(){this.ui.watchLaterBtn.isDisabled()||w.default.execute("watchLater",{item:this.model})},onShare:function(){this.ui.shareBtn.isDisabled()||v.default.trigger("show:modal",new R.default({model:this.model}));
},onRecommend:function(){this.ui.recommendBtn.isDisabled()||v.default.trigger("show:modal",new N.default({model:this.model}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||(this.model.get("playlistType")?w.default.execute("deletePlaylist",{item:this.model}):w.default.execute("deleteItems",{items:this.mediaActions.getActionTargets()}))},onDeleteVersions:function(){this.ui.deleteBtn.isDisabled()||w.default.execute("deleteVersions",{item:this.model})},onDeleteFromUserPlaylist:function(){if(!this.ui.deleteFromUserPlaylistBtn.isDisabled()){
var e=this.model.destroy();e.done(l.default.bind(function(){(0,d.default)(".tooltip").remove(),v.default.trigger("navigate","userPlaylist",{key:this.model.userPlaylistKey})},this))}},onInfo:function(){this.ui.infoBtn.isDisabled()||v.default.trigger("show:modal",new U.default({model:this.model}))},onPlayNext:function(){this.ui.playNextBtn.isDisabled()||w.default.execute("queueMedia",{item:this.model,next:!0})},onAddToQueue:function(){this.ui.addToQueueBtn.isDisabled()||w.default.execute("queueMedia",{
item:this.model,next:!1})},onAddToPlaylist:function(){this.ui.addToPlaylistBtn.isDisabled()||v.default.trigger("show:modal",new T.default({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),t=l.default.first(e),n=e.slice(1);w.default.execute("merge",{item:t,items:n})}},onSelectedItemsChange:function(e,t){var n=t&&t.length?(0,h.default)("Play selected"):(0,
h.default)("Play All");this.ui.playBtn.attr("data-original-title",n)}});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1768),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(1396),p=a(f),h=u.default.Layout.extend({className:"playlists-side-bar-container",template:r.default,regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar"},onlyAfterRender:["onToggleSidebar"],initialize:function(){
this.listenTo(c.default,{"shortcut:sidebar":this.onToggleSidebar})},onRender:function(){this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.sidebar.append(new p.default({model:this.model}),this.$el)},onToggleSidebar:function(){(0,o.default)(".tooltip").remove();var e=this.sidebar.currentView;e.hidden?e.open():e.hide()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1769),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(6),v=a(m),g=n(9),y=a(g),b=n(17),w=a(b),P=n(1397),_=a(P),S=n(1305),x=a(S),C=n(121),T=a(C),k=n(134),I=a(k),M=n(135),A=a(M),E=n(136),O=a(E),D={
preventDefault:!0,stopPropagation:!1},R=f.default.Layout.extend({className:"section-side-bar-container",template:s.default,ui:{actionBar:".action-bar",secondaryActions:".dropdown-menu",playBtn:".play-btn",playShuffledBtn:".play-shuffled-btn",refreshBtn:".refresh-btn",analyzeBtn:".analyze-btn",markWatchedBtn:".mark-watched-btn",markUnwatchedBtn:".mark-unwatched-btn",addToCollectionBtn:".add-to-collection-btn",addToPlaylistBtn:".add-to-playlist-btn",mergeBtn:".merge-btn",syncBtn:".sync-btn",deleteBtn:".delete-btn"
},regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar","click .play-btn":"play","click .play-shuffled-btn":"playShuffled","click .select-btn":"select","click .deselect-btn":"deselect","click .edit-btn":"edit","click .refresh-btn":l.default.extend({event:"refresh"},D),"click .analyze-btn":l.default.extend({event:"analyze"},D),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .add-to-collection-btn":l.default.extend({event:"addToCollection"
},D),"click .add-to-playlist-btn":"addToPlaylist","click .merge-btn":l.default.extend({event:"merge"},D),"click .sync-btn":"sync","click .convert-btn":l.default.extend({event:"convert"},D),"click .delete-btn":l.default.extend({event:"delete"},D)},initialize:function(e){this.bindAllWhenRendered("updateDropdown");var t=h.resolve("appModel");this.mediaActions=e.mediaActions,this.type=this.model.get("type"),this.multiuser=this.model.server.get("multiuser"),this.signedIn=t.get("user").get("signedIn"),
this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(y.default,{"shortcut:sidebar":this.onToggleSidebar,"shortcut:play":this.onPlay,"shortcut:refresh":this.onRefresh,"shortcut:analyze":this.onAnalyze,"shortcut:markWatched":this.onMarkWatched,"shortcut:markUnwatched":this.onMarkUnwatched,"shortcut:sync":this.onSync,"shortcut:edit":this.onEdit,"shortcut:delete":this.onDelete})},updateDropdown:function(){var e=this.ui.secondaryActions.find("a:not(.hidden)"),t=e.hasClass("secondary-only"),n=e.length>2||t;
this.ui.actionBar.toggleClass("show-secondary-actions-dropdown",n)},bindingsModel:"mediaActions",bindings:{".play-btn":{modelAttribute:"showPlay",manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".select-btn":{modelAttribute:"selecting",modelListeners:["selecting","showSelect"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showSelect")&&!e}},".deselect-btn":{modelAttribute:"selecting",manual:!0,autohide:!0},".edit-btn":{modelAttribute:"selectedItems",
modelListeners:["selectedItems","showEdit"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showEdit")&&!(!e||!e.length)}},".refresh-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showRefresh"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showRefresh")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}},".analyze-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showAnalyze"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showAnalyze")&&(e&&e.length&&!this.model.get("hasSelectedFolder"));
}},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".add-to-collection-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showAddToCollection"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showAddToCollection")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",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")}},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showDelete"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showDelete")&&(e&&e.length&&!this.model.get("hasSelectedFolder"));
}}},onRender:function(){var e=new _.default({model:this.model,mediaActions:this.mediaActions});this.sidebar.append(e,this.$el),this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.updateDropdown()},onClose:function(){this.mediaActions.stopListening(),this.mediaActions.deselectAll()},onSelectedItemsChange:function(e,t){if(t){var n=t&&t.length?(0,v.default)("Play selected"):(0,v.default)("Play All");this.ui.playBtn.attr("data-original-title",n),l.default.defer(this.updateDropdown);
}},onToggleSidebar:function(){(0,d.default)(".tooltip").remove();var e=this.sidebar.currentView;e.hidden?e.open():e.hide()},onPlay:function(){this.ui.playBtn.isDisabled()||w.default.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||w.default.execute("playMedia",{items:this.mediaActions.getActionTargets(),shuffle:!0})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1);
},onEdit:function(){if(this.model.server.get("isFullOwnedServer")){var e=this.mediaActions.get("selectedItems");if(e.length){if(e.length>1&&!e[0].server.supports("batchEdit"))return;y.default.trigger("show:modal",new I.default({mediaActions:this.mediaActions}))}else y.default.trigger("show:modal",new A.default({server:this.model.server,model:this.model}))}},onRefresh:function(){return this.ui.refreshBtn.isDisabled()?void w.default.execute("updateLibrary",{section:this.model}):void w.default.execute("refreshMetadata",{
items:this.mediaActions.getActionTargets()})},onAnalyze:function(){return this.ui.analyzeBtn.isDisabled()?void w.default.execute("analyzeSection",{section:this.model}):void w.default.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||w.default.execute("markWatched",{items:this.mediaActions.getActionTargets()}).then(l.default.bind(function(){this.mediaActions.updateAll()},this))},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||w.default.execute("markUnwatched",{
items:this.mediaActions.getActionTargets()}).then(l.default.bind(function(){this.mediaActions.updateAll()},this))},onAddToCollection:function(){this.ui.addToCollectionBtn.isDisabled()||y.default.trigger("show:modal",new x.default({items:this.mediaActions.getActionTargets()}))},onAddToPlaylist:function(e){if(!this.ui.addToPlaylistBtn.isDisabled()){var t=this.mediaActions.getActionTargets();y.default.trigger("show:modal",new T.default({model:t[0],items:t,title:this.mediaActions.getActionTargetsTitle()
}))}},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),t=l.default.first(e),n=e.slice(1);w.default.execute("merge",{item:t,items:n})}},onSync:function(){if(!this.ui.syncBtn.isDisabled()){var e=this.mediaActions.getActionTargets();w.default.execute("showSyncModal",{item:e[0],items:e})}},onConvert:function(){var e=this.mediaActions.getActionTargets();y.default.trigger("show:modal",new O.default({item:e[0],items:e}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||w.default.execute("deleteItems",{
items:this.mediaActions.getActionTargets(),skipRedirect:!0})}});t.default=R,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1770),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(185),c=a(d),f=n(1157),p=a(f),h=n(1161),m=a(h),v=n(1158),g=a(v),y=n(1159),b=a(y),w={alerts:p.default,sync:m.default,conversion:g.default,nowPlaying:b.default},P=u.default.Layout.extend({className:"container",template:r.default,ui:{conversionBadge:".conversion-btn > .badge",
nowPlayingBadge:".now-playing-btn > .badge"},regions:{container:".activity-container"},initialize:function(e){this.options=e,this.subset=e.subset||"alerts";var t=new c.default([],{server:this.model,persistInCache:!0});this.subsets={conversion:t,nowPlaying:this.model.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};o.default.each(o.default.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=w[this.subset];this.container.show(new e(this.options)),this.updateBadges()}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1771),s=a(r),o=n(10),l=a(o),u=n(11),d=i(u),c=n(6),f=a(c),p=n(9),h=a(p),m=n(194),v=a(m),g=n(1219),y=a(g),b=l.default.Layout.extend({
className:"alerts-container",template:s.default,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=d.resolve("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((0,f.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 v.default),this.shared||this.list.append(new y.default({collection:this.listCollection}))},onPrimaryServerChange:function(e,t){t&&h.default.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.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1772),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(108),y=a(g),b=n(427),w=a(b),P=n(756),_=a(P),S=n(194),x=a(S),C=n(1228),T=a(C),k=n(1229),I=a(k),M=d.default.Layout.extend({
className:"conversion-container",template:s.default,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=f.resolve("appModel");this.playQueue=e.playQueue,
this.transcodeJobs=e.transcodeJobs,this.generators=e.generators,this.items=this.playQueue.get("collection"),this.upNextItems=new w.default(this.items,{playQueue:this.playQueue,includeSelectedItem:!0}),this.afterUpNextItems=new _.default(this.items,{playQueue:this.playQueue}),this.settings=this.model.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:y.default.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 I.default({
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?(0,h.default)("There was a problem converting 1 item."):(0,h.default)("There were problems converting {1} items.",e)},onRender:function(){this.filterBar.append(new x.default);
var e={playQueue:this.playQueue},t={playQueue:this.playQueue,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting};this.upNextList.show(new T.default(l.default.extend({},e,{collection:this.upNextItems,itemViewOptions:t,sortableOptions:{sort:!0,group:{name:"upNext",pull:!1,put:["afterUpNext"]}}}))),this.afterUpNextList.show(new T.default(l.default.extend({},e,{collection:this.afterUpNextItems,itemViewOptions:l.default.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&&v.default.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.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1773),s=a(r),o=n(10),l=a(o),u=n(11),d=i(u),c=n(9),f=a(c),p=n(108),h=a(p),m=n(194),v=a(m),g=n(1221),y=a(g),b=l.default.Layout.extend({className:"now-playing-container",template:s.default,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=d.resolve("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:h.default.publicNowPlaying}},onRender:function(){this.filterBar.append(new v.default),this.shouldShowList()&&this.list.show(new y.default({collection:this.collection}))},onPrimaryServerChange:function(e,t){t&&f.default.trigger("navigate","nowPlaying",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(1774),r=a(i),s=n(10),o=a(s),l=n(6),u=a(l),d=n(113),c=a(d),f=n(1224),p=a(f),h=o.default.Layout.extend({className:"sync-device-items-container",template:r.default,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 n=this.syncList.device,a=n.get("lastSeenAt");
if(!a)return;this.ui.deviceMessageText.text((0,u.default)("{1} was last seen {2}. Syncing will resume next time you launch Plex on this device.",n.get("name"),(0,c.default)(a)))}},updateSyncList:function(){var e=this.syncList;e&&this.list.show(new p.default({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.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1775),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(6),v=a(m),g=n(9),y=a(g),b=n(58),w=a(b),P=n(17),_=a(P),S=n(194),x=a(S),C=n(1160),T=a(C),k=f.default.Layout.extend({className:"sync-container",
template:s.default,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=h.resolve("appModel");this.selectedDevice=e.selectedDevice,this.user=t.get("user"),this.shared=this.model.get("shared"),this.transcodeJobs=this.model.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:w.default.hasTouchScreen,signedIn:this.signedIn,allowSync:this.allowSync,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(l.default.bind(this.fetchTranscodeJobs,this),this.transcodeJobDelay)},showList:function(){this.selectedDevice?this.container.show(new T.default({model:this.selectedDevice,server:this.model})):this.container.close()},getPlexPassInfo:function(){return this.signedIn||this.shared?{url:this.user.server.get("plexPassUrl"),
message:(0,v.default)("The server needs a Plex Pass to use sync."),buttonText:(0,v.default)("Learn More"),target:"_blank",showButton:!this.shared}:{url:"#!/settings/server",message:(0,v.default)("The server needs to be signed in with a Plex Pass to use sync."),buttonText:(0,v.default)("Sign In"),target:"_self",showButton:!0}},onRender:function(){this.filterBar.append(new x.default({showSharedServers:!0})),this.allowSync&&this.showList()},onClose:function(){clearTimeout(this.transcodeJobTimeout)},
onPrimaryServerChange:function(e,t){t&&y.default.trigger("navigate","sync",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onDeviceClick:function(e){e.preventDefault();var t=(0,d.default)(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(),(0,d.default)(e.currentTarget).toggleClass("selected"),this.$el.toggleClass("force-hover");
},onRefreshClick:function(e){e.preventDefault();var t=_.default.execute("refreshSyncLists",{server:this.model});this.selectedDevice&&t.always(this.whenRendered(function(){var e=this.selectedDevice.get("syncList");e.fetch({reset:!0,scope:"page"})}))},onCloudSyncSettingsClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=h.resolve("appModel"),n=t.get("user");window.open(n.server.get("cloudSyncUrl"))}});t.default=k,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(1778),r=a(i),s=n(3),o=a(s),l=n(911),u=a(l),d=n(192),c=a(d),f=c.default.extend({className:"alert-bar notify",template:r.default,events:o.default.extend({"click .info-link":"onInfoClick"},c.default.prototype.events),initialize:function(){this.listenTo(this.model,"change:read",this.hide)},serializeData:function(){var e=this.model.get("content");return{content:(0,u.default)(e),url:this.model.get("url")}},onInfoClick:function(e){this.hide(),this.model.markAsRead();
},onCloseClick:function(e){c.default.prototype.onCloseClick.apply(this,arguments),this.model.markAsRead()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1779),s=a(r),o=n(3),l=a(o),u=n(11),d=i(u),c=n(9),f=a(c),p=n(58),h=a(p),m=n(35),v=a(m),g=n(192),y=a(g),b=y.default.extend({name:"ClaimServerAlertBarView",className:"claim-server-alert-bar alert-bar notify",template:s.default,events:l.default.extend({
"click .claim-link":"onClaimClick","click .reload-link":"onReloadClick"},y.default.prototype.events),initialize:function(){y.default.prototype.initialize.apply(this,arguments);var e=v.default.get("viewedUnclaimedServers");this.model.id&&e.indexOf(this.model.id)===-1&&(d.resolve("metrics").trackView({page:"unclaimedServer",mode:"banner"},{interaction:!1}),v.default.save("viewedUnclaimedServers",e.concat(this.model.id)))},serializeData:function(){return{showInsecureMessage:h.default.isHostedHttps&&!this.model.get("isSecure")
}},onClaimClick:function(e){e.preventDefault(),d.resolve("metrics").trackClick({action:"claim",page:"unclaimedServer",mode:"banner"}),f.default.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){y.default.prototype.onCloseClick.apply(this,arguments);var t=v.default.get("dismissedUnclaimedServers");
this.model.id&&t.indexOf(this.model.id)===-1&&(d.resolve("metrics").trackClick({action:"dismiss",page:"unclaimedServer",mode:"banner"}),v.default.save("dismissedUnclaimedServers",t.concat(this.model.id)))}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1780),s=a(r),o=n(3),l=a(o),u=n(11),d=i(u),c=n(9),f=a(c),p=n(35),h=a(p),m=n(17),v=a(m),g=n(192),y=a(g),b=y.default.extend({className:"alert-bar notify",
template:s.default,events:l.default.extend({"click .download-link":"onDownloadClick","click .install-link":"onInstallClick"},y.default.prototype.events),initialize:function(){this.server=this.model.server},serializeData:function(){var e=d.resolve("appModel"),t=e.get("user").server;return{state:this.model.get("state"),downloadURL:this.model.get("downloadURL")||t.get("appsUrl")}},onDownloadClick:function(e){e.preventDefault(),v.default.execute("checkForServerUpdates",{server:this.server,download:!0,
initialState:"downloading"}),f.default.trigger("navigate","serverSettings",{serverID:this.server.id})},onInstallClick:function(e){e.preventDefault(),this.model.set("shouldInstall",!0),f.default.trigger("navigate","serverSettings",{serverID:this.server.id})},onCloseClick:function(e){y.default.prototype.onCloseClick.apply(this,arguments);var t=this.model.get("shortVersion")||"unknown";h.default.save("serverUpdateDismissedVersion",t)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(1781),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=u.default.ItemView.extend({className:"alert alert-status transition-out",template:r.default,coolDown:!1,alertDuration:5e3,coolDownDuration:5e3,ui:{status:".status"},events:{mouseover:"onMouseOver"},onlyAfterRender:["onShowStatus"],initialize:function(e){o.default.bindAll(this,"hide"),this.listenTo(c.default,"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(o.default.bind(function(){this.coolDown=!1},this),this.coolDownDuration)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1782),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(177),p=a(f),h=n(1273),m=a(h),v=u.default.Layout.extend({className:"action-bar alpha-bar",template:r.default,regions:{list:".alpha-bar-list"},modelEvents:{"change:currentFilters":"onListRefresh","socket:timeline":"onTimeline"},collectionEvents:{reset:"onReset"},initialize:function(e){this.listenTo(c.default,"resize",this.onResize),this.collection.clear(),this.updateCollection(),
this.debouncedUpdateCollection=o.default.debounce(this.updateCollection,2e3)},measure:function(){this.updateContainerHeight(),this.updateLineHeight()},updateContainerHeight:function(){this.containerHeight=this.$el.height()},updateLineHeight:function(){var e=this.collection.length;if(e){var t=this.containerHeight/e;this.$el.css("line-height",t+"px")}},updateCollection:function(){this.collection.fetch({reset:!0,scope:"page"})},onRender:function(){this.list.append(new m.default({collection:this.collection
}),this.$el),o.default.defer(o.default.bind(this.measure,this))},onListRefresh:function(){this.list.currentView.$el.addClass("hidden"),this.updateCollection()},onReset:function(e){return e.length<10?(this.$el.addClass("hidden"),void c.default.trigger("hide:bar","alphabar",{preserve:!0})):(this.containerHeight&&this.updateLineHeight(),this.$el.removeClass("hidden"),this.list.currentView.$el.removeClass("hidden"),void c.default.trigger("show:bar","alphabar"))},onResize:function(){this.updateContainerHeight(),
this.updateLineHeight()},onTimeline:function(e){e.state!==p.default.CREATED&&e.state!==p.default.DELETED||this.debouncedUpdateCollection()}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1783),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(9),p=a(f),h=n(107),m=a(h),v=n(250),g=a(v),y=c.default.Layout.extend({className:"breadcrumb-bar",template:r.default,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"),a="#!/server/"+encodeURIComponent(this.model.server.id);
a+="/channel/"+encodeURIComponent(n);var i=this.model.channel?this.model.get("title"):null;return{channelTitle:t,channelUrl:a,title:i,totalSize:this.model.get("metadataList").getCollection().length,showSettings:!!this.prefsKey&&!this.shared,listType:this.currentListType}},onSettingsClick:function(e){e.preventDefault();var t=new m.default([],{server:this.model.server,url:this.prefsKey});t.fetch().done(o.default.bind(function(){p.default.trigger("show:modal",new g.default({model:this.model.channel||this.model,
collection:t}))},this))},onListClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("type");this.trigger("change:listType",n),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1784),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(35),p=a(f),h=n(56),m=a(h),v=n(1189),g=a(v),y=u.default.Layout.extend({
className:"details-breadcrumb-bar breadcrumb-bar",template:r.default,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,a={server:this.model.server,section:this.model.section},i=this.parent=new m.default({key:t},a),r=i.populate({scope:"page"});r=r.then(function(){return n=i.get("children"),n.populate({scope:"page"})}),r.done(this.onSiblingsPopulate);var s=this.model.get("grandparentKey");if(s){var o=this.grandparent=new m.default({key:s},a),l=o.populate({
scope:"page"});l=l.then(function(){var e=o.get("children");return e.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(){var e="episodeListType",t=this.model.section||this.model.server;return t.getScopedKey(e)},getListType:function(){return"season"===this.model.get("type")?p.default.get(this.getListTypeSettingKey())||"episode-tile-list":null},previous:function(){this.previousSibling&&c.default.trigger("navigate","details",{serverID:this.model.server.id,key:this.previousSibling.get("key")})},next:function(){this.nextSibling&&c.default.trigger("navigate","details",{
serverID:this.model.server.id,key:this.nextSibling.get("key")})},onSiblingsPopulate:function(e){if(!e)return this.currentItem.show(new g.default({model:this.model,isLeaf:!0})),void this.currentItem.$el.removeClass("hidden");var t=e.get("metadataItems"),n=t.get(this.model.id),a=t.indexOf(n);a>0&&(this.previousSibling=t.at(a-1)),a<t.length-1&&(this.nextSibling=t.at(a+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 g.default({model:this.parent})),this.grandparentItem.$el.removeClass("hidden")),this.siblingsDropdown.show(new g.default({id:"siblings-dropdown",model:this.model,collection:t})),this.siblingsDropdown.$el.removeClass("hidden")},onParentsPopulate:function(e){this.grandparentItem.show(new g.default({model:this.grandparent})),this.grandparentItem.$el.removeClass("hidden"),this.parentsDropdown.show(new g.default({id:"parents-dropdown",
model:this.parent,collection:e.get("metadataItems")})),this.parentsDropdown.$el.removeClass("hidden")},onSectionClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget),n=t.data("key");c.default.trigger("navigate","section",{serverID:this.model.server.id,sectionID:n})},onPlaylistsClick:function(e){e.preventDefault(),c.default.trigger("navigate","playlists",{serverID:this.model.server.id})},onListClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget),n=t.data("type");
p.default.save(this.getListTypeSettingKey(),n),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.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1785),r=a(i),s=n(10),o=a(s),l=n(6),u=a(l),d=n(9),c=a(d),f=n(531),p=a(f),h=n(1192),m=a(h),v=n(1309),g=a(v),y=o.default.Layout.extend({
className:"breadcrumb-bar",template:r.default,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 p.default({title:(0,u.default)("Playlists"),model:this.model,collection:this.model.server.get("sections")})),this.typeDropdown.show(new m.default({model:this.model}))},onSizeChange:function(){this.ui.itemsBadge.text(this.model.get("items").get("playlists").length)},onImportClick:function(e){this.limited||(e.preventDefault(),c.default.trigger("show:modal",new g.default({
server:this.model.server})))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1786),r=a(i),s=n(5),o=a(s),l=n(3),u=a(l),d=n(10),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=n(35),g=a(v),y=n(17),b=a(y),w=n(531),P=a(w),_=n(1194),S=a(_),x=n(1195),C=a(x),T=n(135),k=a(T),I=n(155),M=a(I),A=c.default.Layout.extend({className:"breadcrumb-bar",template:r.default,ui:{listSelectedIcons:"#section-list-dropdown .dropdown-selected-icon",
itemsBadge:".items-badge",updateBtn:".update-btn"},regions:{sectionDropdown:".breadcrumb-dropdown",subsetDropdown:".breadcrumb-subset-dropdown",typeDropdown:".breadcrumb-type-dropdown"},events:{"click .list-btn":"onListClick","click .edit-btn":"onEditClick","click .share-btn":"onShareClick","click .update-btn":"onUpdateClick","click .analyze-btn":"onAnalyzeClick","click .force-refresh-btn":"onForceRefreshClick","click .empty-trash-btn":"onEmptyTrashClick","click .delete-btn":"onDeleteClick"},onlyAfterRender:["onTotalSizeChange"],
initialize:function(){var e=this.model.get("items");this.refreshing=this.model.get("refreshing"),this.updateTitle=(0,p.default)("Update Library"),this.updateTitleAlt=(0,p.default)("Cancel Update"),this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.limited=!(!this.shared&&!this.synced),this.listenTo(e,"change:totalSize",this.onTotalSizeChange),this.listenTo(this.model,"change:refreshing",this.onRefreshingChange),this.listenTo(this.model,"change:currentType",this.updateListViewDropdown);
},serializeData:function(){return{limited:this.limited,totalSize:this.model.get("items").get("totalSize"),listType:g.default.getInstance().getSectionListType(this.model),refreshing:this.refreshing,updateTitle:this.refreshing?this.updateTitleAlt:this.updateTitle,updateTitleAlt:this.refreshing?this.updateTitle:this.updateTitleAlt}},updateListViewDropdown:function(e){u.default.isString(e)||(e=g.default.getInstance().getSectionListType(this.model)),this.ui.listSelectedIcons.each(function(t,n){var a=(0,
o.default)(n),i=a.closest(".list-btn").data("type");a.toggleClass("hidden",!u.default.isEqual(e,i))})},onRender:function(){this.$el.tooltip({selector:".breadcrumb-actions > a",container:"body",placement:"bottom"}),this.sectionDropdown.show(new P.default({model:this.model,collection:this.model.server.get("sections")})),this.subsetDropdown.show(new S.default({model:this.model.get("currentSubset"),collection:this.model.get("subsets")})),this.typeDropdown.show(new C.default({model:this.model,collection:this.model.get("types")
}))},onTotalSizeChange:function(e,t){var n=null==t?0:t;this.ui.itemsBadge.toggleClass("hidden",0===n),this.ui.itemsBadge.text(n)},onEditClick:function(e){e.preventDefault(),this.limited||m.default.trigger("show:modal",new k.default({server:this.model.server,model:this.model}))},onUpdateClick:function(e){e.preventDefault(),this.limited||b.default.execute("updateLibrary",{section:this.model,cancel:this.model.get("refreshing")})},onShareClick:function(e){e.preventDefault(),this.limited||m.default.trigger("show:modal",new M.default({
defaultPaneType:"ownedServer",defaultPaneID:this.model.server.id}))},onAnalyzeClick:function(e){e.preventDefault(),this.limited||b.default.execute("analyzeSection",{section:this.model})},onForceRefreshClick:function(e){e.preventDefault(),this.limited||b.default.execute("updateLibrary",{section:this.model,params:{force:!0}})},onEmptyTrashClick:function(e){e.preventDefault(),this.limited||b.default.execute("emptyTrash",{section:this.model})},onDeleteClick:function(e){e.preventDefault(),this.onDelete();
},onListClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget),n=t.data("type"),a=this.model.get("currentType");g.default.getInstance().saveListType(a,n),this.updateListViewDropdown(n)},onDelete:function(){if(!this.limited){var e=b.default.execute("deleteSection",{section:this.model});e.done(function(){m.default.trigger("navigate","dashboard")})}},onRefreshingChange:function(e,t){var n=this.ui.updateBtn,a=this.ui.updateBtn.attr("data-original-title");if(this.ui.updateBtn.toggleClass("active",this.model.get("refreshing")),
a){var i=(0,o.default)(".tooltip > .tooltip-inner").html();u.default.contains([this.updateTitle,this.updateTitleAlt],i)&&(0,o.default)(".tooltip > .tooltip-inner").html(n.attr("data-title-alt")),n.attr("data-original-title",n.attr("data-title-alt")),n.attr("data-title-alt",a)}}});t.default=A,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1787),r=a(i),s=n(10),o=a(s),l=n(423),u=a(l),d=n(1231),c=a(d),f=n(1233),p=a(f),h=o.default.Layout.extend({
className:"container",template:r.default,regions:{list:".directory-container"},onlyAfterRender:["onUpdate"],initialize:function(e){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 u.default({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 p.default(t):new c.default(t),this.list.show(e)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1788),s=a(r),o=n(10),l=a(o),u=n(9),d=a(u),c=n(11),f=i(c),p=n(23),h=i(p),m=n(843),v=a(m),g=n(154),y=i(g),b=n(1167),w=a(b),P=n(540),_=a(P),S=n(538),x=a(S),C=n(539),T=a(C),k=l.default.Layout.extend({
className:"channel-container",template:s.default,regions:{list:".channel-list-container"},initialize:function(e){this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems");var t=this.model.get("header"),n=this.model.get("message");(t||n)&&d.default.trigger("show:alert",{message:n||t}),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")),
this.searchKey&&(f.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:"channel",placeholder:this.searchPlaceholder})),this.listenTo(d.default,"search:channel",this.onSearch)),this.listType=v.default.getListType(this.model);var a=new w.default({model:this.model,currentListType:this.listType});this.listenTo(a,"change:listType",this.onListTypeChange),d.default.trigger("show:bar","breadcrumbbar",a),d.default.trigger("show:background",{model:this.model,
dim:!0})},getListConstructor:function(){switch(this.listType){case v.default.types.tileList:return _.default;case v.default.types.detailsList:return x.default;default:return T.default}},onRender:function(){var e=this.getListConstructor();this.list.append(new e({listModel:this.listModel,collection:this.collection,paginated:!1}),this.$el)},onClose:function(){f.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:null,placeholder:null})),d.default.trigger("hide:bar","breadcrumbbar");
},onSearch:function(e){if(e){var t=this.model.channel||this.model,n=t.id?t.id:t.get("identifier"),a=h.join(this.searchKey,{query:e});d.default.trigger("navigate","channel",{serverID:this.model.server.id,channelID:n,key:a})}},onListTypeChange:function(e){this.listType=e,this.listModel.scrollPosition=0,this.list.currentView.scrollPosition=0,this.render()}});t.default=k,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1789),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(17),p=a(f),h=n(1235),m=a(h),v=c.default.Layout.extend({
className:"container",template:r.default,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(){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 m.default({collection:this.collection}))},onNavClick:function(e){this.ui.navLinks.removeClass("selected"),(0,u.default)(e.currentTarget).addClass("selected")},onAllClick:function(e){
e.preventDefault(),this.list.show(new m.default({collection:this.collection}))},onVideoClick:function(e){e.preventDefault(),this.list.show(new m.default({collection:this.videoCollection}))},onMusicClick:function(e){e.preventDefault(),this.list.show(new m.default({collection:this.musicCollection}))},onPhotoClick:function(e){e.preventDefault(),this.list.show(new m.default({collection:this.photoCollection}))},onCheckUpdatesClick:function(e){e.preventDefault();var t=this.ui.checkUpdatesBtn;if(!t.hasClass("active")){
t.addClass("active");var n=p.default.execute("updateChannel",{server:this.collection.server});n.always(o.default.bind(function(){t.removeClass("active")},this))}}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(66)),l=r(o),u=n(34),d=n(11),c=n(191),f=r(c),p=n(582),h=r(p),m=n(260),v=r(m),g={$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{}),
_owner:null},y={$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{}),_owner:null},b=f.default.extend({mountReact:function(){var e=(0,d.resolve)("appStore");l.default.render({$$typeof:i,type:u.Provider,key:null,ref:null,props:a(u.Provider.defaultProps,{children:g,store:e}),_owner:null},this.ui.sidebar[0]),l.default.render({$$typeof:i,type:u.Provider,key:null,ref:null,props:a(u.Provider.defaultProps,{children:y,store:e}),_owner:null},this.ui.page[0])}});t.default=b,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(66)),l=r(o),u=n(34),d=n(11),c=n(191),f=r(c),p=n(260),h=r(p),m=n(259),v=r(m),g=n(356),y=r(g),b=n(1475),w=r(b),P={$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{}),_owner:null},_=f.default.extend({mountReact:function(){var e=(0,d.resolve)("appStore");l.default.render({$$typeof:i,type:u.Provider,key:null,ref:null,props:a(u.Provider.defaultProps,{
children:P,store:e}),_owner:null},this.ui.sidebar[0]),l.default.render({$$typeof:i,type:u.Provider,key:null,ref:null,props:a(u.Provider.defaultProps,{children:{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{machineIdentifier:this.options.selectedServerID,listKey:this.options.key,listTitle:this.options.title,
listType:this.options.type}),_owner:null}}),_owner:null},machineIdentifier:this.options.selectedServerID}),_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(r(o),n(66)),u=r(l),d=n(34),c=n(11),f=n(78),p=s(f),h=n(77),m=r(h),v=n(191),g=r(v),y=n(1461),b=r(y),w=n(260),P=r(w),_={$$typeof:i,type:P.default,key:null,
ref:null,props:a(P.default.defaultProps,{}),_owner:null},S=g.default.extend({mountReact:function(){var e=(0,c.resolve)("appStore"),t=(0,m.default)(p.SERVER,this.options.selectedServerID),n=(0,m.default)(p.LIBRARY,this.options.selectedLibraryID,t);u.default.render({$$typeof:i,type:d.Provider,key:null,ref:null,props:a(d.Provider.defaultProps,{children:_,store:e}),_owner:null},this.ui.sidebar[0]),u.default.render({$$typeof:i,type:d.Provider,key:null,ref:null,props:a(d.Provider.defaultProps,{children:{
$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{machineIdentifier:this.options.selectedServerID,libraryEntityID:n}),_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1790),r=a(i),s=n(734),o=a(s),l=n(120),u=a(l),d=n(119),c=a(d),f=n(132),p=a(f),h=n(51),m=a(h),v=n(1266),g=a(v),y=u.default.extend({mixins:o.default,className:"album-details-row details-row",
template:r.default,allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.ListConstructor=g.default,this.listItemViewOptions={artistTitle:this.model.get("parentTitle"),mediaActions:this.mediaActions},this.starRatingView=new c.default({model:this.model}),this.summaryView=new p.default({model:this.model}),this.posterImage=new m.default({model:this.model,type:this.model.get("type"),width:this.posterWidth})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1791),r=a(i),s=n(3),o=a(s),l=n(9),u=a(l),d=n(177),c=a(d),f=n(735),p=a(f),h=n(120),m=a(h),v=n(1187),g=a(v),y=n(132),b=a(y),w=n(51),P=a(w),_=n(1239),S=a(_),x=n(1237),C=a(x),T=n(537),k=a(T),I=m.default.extend({mixins:p.default,className:"artist-details-row details-row",template:r.default,allowMirror:!0,ui:o.default.extend({concertRegion:".concert-region",popularTracksRegion:".popular-tracks-region",extrasRegion:".extras-region",
similarArtistsRegion:".similar-artists-region"},m.default.prototype.ui),regions:o.default.extend({concert:".concert-region",popularTracksList:".popular-tracks-region",extrasList:".extras-region",similarArtistsList:".similar-artists-region"},m.default.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(){m.default.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("updateConcerts","showConcert","updatePopularTracks","updateExtras","updateSimilarArtists","showSimilarArtistsList"),this.ListConstructor=C.default,this.listItemViewOptions={mediaActions:this.mediaActions
},this.summaryView=new b.default({model:this.model}),this.posterImage=new P.default({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 S.default({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 k.default({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 g.default({
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 C.default({collection:this.similarArtists.get("metadataItems")
})),this.listenTo(this.similarArtists.get("metadataItems"),"reset update",this.updateSimilarArtists))}this.updateSimilarArtists()},onRender:function(){m.default.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===c.default.DELETED&&u.default.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.section.id
})}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1792),s=a(r),o=n(11),l=i(o),u=n(736),d=a(u),c=n(120),f=a(c),p=n(119),h=a(p),m=n(132),v=a(m),g=n(338),y=a(g),b=n(51),w=a(b),P=n(238),_=a(P),S=f.default.extend({mixins:d.default,className:"clip-details-row details-row",template:s.default,allowMirror:!0,initialize:function(){f.default.prototype.initialize.apply(this,arguments),this.starRatingView=new h.default({
model:this.model,disabled:!0}),this.summaryView=new v.default({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new y.default({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new y.default({type:"subtitles",model:this.model,media:e}),this.posterImage=new w.default({model:this.model,type:this.model.get("type"),width:this.posterWidth});var t=this.model.server.get("isCloud"),n=l.resolve("appModel"),a=n.get("primaryServer");(!t||a&&!a.get("isCloudSyncServer"))&&(this.contentRatingFlag=new _.default({
model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new _.default({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new _.default({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new _.default({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new _.default({model:this.model,
modelAttribute:"studio",className:"studio-flag",width:200,height:40}))}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1794),r=a(i),s=n(737),o=a(s),l=n(120),u=a(l),d=n(119),c=a(d),f=n(132),p=a(f),h=n(338),m=a(h),v=n(51),g=a(v),y=n(238),b=a(y),w=u.default.extend({mixins:o.default,className:"episode-details-row details-row",template:r.default,allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),
this.starRatingView=new c.default({model:this.model}),this.summaryView=new p.default({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new m.default({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new m.default({type:"subtitles",model:this.model,media:e}),this.posterImage=new g.default({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new b.default({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",
width:70,height:30}),this.videoResolutionFlag=new b.default({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new b.default({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new b.default({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1795),r=a(i),s=n(3),o=a(s),l=n(738),u=a(l),d=n(120),c=a(d),f=n(119),p=a(f),h=n(132),m=a(h),v=n(338),g=a(v),y=n(51),b=a(y),w=n(238),P=a(w),_=n(537),S=a(_),x=c.default.extend({mixins:u.default,className:"movie-details-row details-row",template:r.default,allowMirror:!0,ui:o.default.extend({extrasRegion:".extras-region"},c.default.prototype.ui),regions:o.default.extend({extrasList:".extras-region"},c.default.prototype.regions),initialize:function(){c.default.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 p.default({model:this.model}),this.summaryView=new m.default({model:this.model});var t=this.getPreferredMedia();this.audioDropdown=new g.default({type:"audio",model:this.model,media:t}),this.subtitlesDropdown=new g.default({type:"subtitles",model:this.model,media:t}),this.posterImage=new b.default({model:this.model,type:this.model.get("type"),
width:this.posterWidth}),this.contentRatingFlag=new P.default({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new P.default({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new P.default({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new P.default({model:this.model,flag:"audioChannels",className:"media-flag",
width:100,height:20}),this.studioFlag=new P.default({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(){c.default.prototype.onRender.apply(this,arguments),this.extras&&(this.extrasList.append(new S.default({collection:this.extras})),this.updateExtras())}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default,s=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(1796),l=r(o),u=n(10),d=r(u),c=n(7),f=(r(c),n(66)),p=r(f),h=n(34),m=n(11),v=s(m),g=n(1468),y=r(g),b=n(1619),w=r(b),P=d.default.Layout.extend({className:"photo-album-details",template:l.default,ui:{photoAlbumPage:".photo-album-page"},serializeData:function(){return{styles:w.default}},mountReact:function(){var e=v.resolve("appStore"),t=this.model.entityID({ratingKey:this.model.get("ratingKey")});p.default.render({$$typeof:i,type:h.Provider,key:null,
ref:null,props:a(h.Provider.defaultProps,{children:{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{metadataItemEntityID:t}),_owner:null},store:e}),_owner:null},this.ui.photoAlbumPage[0])},unmountReact:function(){this.isRendered&&p.default.unmountComponentAtNode(this.ui.photoAlbumPage[0])},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1797),r=a(i),s=n(3),o=a(s),l=n(6),u=a(l),d=n(182),c=a(d),f=n(178),p=a(f),h=n(105),m=a(h),v=n(120),g=a(v),y=n(249),b=a(y),w=n(1259),P=a(w),_=g.default.extend({className:"playlist-details-row details-row",template:r.default,posterWidth:200,pageSize:50,compositeOptions:{audio:{media:"art",stripRatio:c.default.ratios.landscape,posterRatio:c.default.ratios.square},photo:{media:"thumb",stripRatio:c.default.ratios.square,posterRatio:c.default.ratios.square
},video:{media:"thumb",stripRatio:c.default.ratios.portrait,posterRatio:c.default.ratios.portrait}},ui:o.default.extend({sideStrip:".item-side-strip"},g.default.prototype.ui),bindings:o.default.extend(o.default.pick(m.default.defaultBindings,[".item-title",".item-summary"]),{".item-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return e?(0,p.default)(e):0}},".item-count":{modelAttribute:"leafCount",formatter:function(e){return 0===e?(0,u.default)("This playlist has no items."):1===e?(0,
u.default)("1 Item"):(0,u.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(){g.default.prototype.initialize.apply(this,arguments),
this.ListConstructor=P.default,this.listItemViewOptions={canEdit:!this.model.get("smart")};var e=this.compositeOptions[this.model.get("playlistType")];this.posterWidth=200,this.sideStripImage=new b.default({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 b.default({model:this.model,width:this.posterWidth,height:this.posterWidth/e.posterRatio,noPlaceholder:!0})},onRender:function(){g.default.prototype.onRender.apply(this,arguments),
this.sideStripImage.setElement(this.ui.sideStrip)},onClose:function(){return this.posterImage&&this.sideStripImage.close(),g.default.prototype.onClose.apply(this,arguments)}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1798),r=a(i),s=n(35),o=a(s),l=n(120),u=a(l),d=n(132),c=a(d),f=n(1247),p=a(f),h=n(1243),m=a(h),v=n(1245),g=a(v),y=u.default.extend({className:"season-details-row details-row",template:r.default,
allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.ListConstructor=this.getListConstructor(),this.summaryView=new c.default({model:this.model}),this.listenTo(o.default.getInstance(),"change:"+this.getListTypeSettingKey(),this.onListTypeChange)},getListTypeSettingKey:function(){var e="episodeListType",t=this.model.section||this.model.server;return t.getScopedKey(e)},getListConstructor:function(e){switch(e||(e=o.default.get(this.getListTypeSettingKey())),
e){case"episode-details-list":return m.default;case"episode-list":return g.default;default:return p.default}},bindings:{".show-title":{modelAttribute:"parentTitle"},".season-title":{modelAttribute:"title"}},onListTypeChange:function(e,t){this.ListConstructor=this.getListConstructor(t),this.render()}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1799),r=a(i),s=n(739),o=a(s),l=n(120),u=a(l),d=n(119),c=a(d),f=n(132),p=a(f),h=n(51),m=a(h),v=n(238),g=a(v),y=n(1262),b=a(y),w=u.default.extend({
mixins:o.default,className:"show-details-row details-row",template:r.default,allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.ListConstructor=b.default,this.starRatingView=new c.default({model:this.model}),this.summaryView=new p.default({model:this.model}),this.posterImage=new m.default({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new g.default({model:this.model,modelAttribute:"contentRating",className:"show-content-rating content-rating-flag",
width:70,height:30}),this.studioFlag=new g.default({model:this.model,modelAttribute:"studio",className:"show-studio studio-flag",width:200,height:40})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1800),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"container",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1801),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(65),c=a(d),f=u.default.ItemView.extend({className:"concert",template:r.default,bindings:{".concert-link":{modelAttribute:"url",manual:!0,formatter:function(e,t){t.attr("href",e)}},".concert-month":{modelAttribute:"at",formatter:function(e){return c.default.unix(e).format("MMM")}},".concert-day":{modelAttribute:"at",formatter:function(e){return c.default.unix(e).format("DD")}},".concert-name":{modelAttribute:"tag"},".concert-venue":{
modelAttribute:"venue"},".concert-city":{modelAttribute:"city",modelListeners:["city","country"],formatter:function(e){var t=o.default.compact([e,this.model.get("country")]);return t.join(", ")}}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1803),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(17),c=a(d),f=u.default.ItemView.extend({id:"auto-match-dropdown",tagName:"span",className:"dropdown",template:r.default,
collectionEvents:{reset:"render"},events:{"click .auto-match-agent":"onClick"},serializeData:function(){return{agents:this.collection.toJSON()}},onClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget).data("id"),n=this.model.agents.get(t);c.default.execute("autoMatch",{item:this.model,agent:n})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1804),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=u.default.ItemView.extend({
tagName:"span",className:"details-breadcrumb dropdown",template:r.default,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=(0,o.default)(e.currentTarget).data("key");
t&&c.default.trigger("navigate","details",{serverID:this.model.server.id,key:t})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1806),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({tagName:"li",className:"play-queue-list-item",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1810),s=a(r),o=n(5),l=a(o),u=n(10),d=a(u),c=n(6),f=a(c),p=n(9),h=a(p),m=n(23),v=i(m),g=n(40),y=a(g),b=n(17),w=a(b),P=n(95),_=a(P),S=n(121),x=a(S),C=n(199),T=a(C),k=n(197),I=a(k),M=n(198),A=a(M),E=d.default.ItemView.extend({
tagName:"ul",className:"dropdown-menu",template:s.default,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.mediaType=y.default.get(this.model.get("type")),this.mediaActions=new _.default({},{item:this.model,playQueue:e.playQueue}),(0,l.default)(".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=v.getLastSegment(n))}return{downloadUrl:e,downloadName:t}},bindingsModel:"mediaActions",bindings:{".play-mix-btn":{modelAttribute:"showPlayMix",manual:!0,autohide:!0,formatter:function(e,t){if(e){var n=this.model.get("related"),a=n.findWhere({browse:!1}),i=a.get("title");i&&t.text((0,f.default)("Queue {1}",i))}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"),w.default.execute("queueMedia",{item:n,excludeSeedItem:!0,next:!0})},onAddToPlaylistClick:function(e){return e.preventDefault(),(0,l.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void h.default.trigger("show:modal",new x.default({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onSyncClick:function(e){
e.preventDefault(),w.default.execute("showSyncModal",{item:this.model})},onShareClick:function(e){e.preventDefault(),h.default.trigger("show:modal",new T.default({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),h.default.trigger("show:modal",new A.default({model:this.model}))},onInfoClick:function(e){e.preventDefault(),h.default.trigger("show:modal",new I.default({model:this.model}))}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1811),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=c.default.ItemView.extend({id:"playlist-type-dropdown",tagName:"span",className:"dropdown",template:r.default,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:(0,o.default)(this.types).findWhere({key:this.model.get("currentType")
}),types:this.types}},onClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget).data("key");this.model.set("currentType",t)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1813),s=a(r),o=n(5),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(17),h=a(p),m=d.default.ItemView.extend({tagName:"ul",className:"dropdown-menu pull-right",template:s.default,events:{"click .local-player-btn":"onLocalPlayerClick",
"click .plex-player-btn":"onPlexPlayerClick","click .now-playing-btn":"onNowPlayingClick","click .refresh-btn":"onRefreshPlayersClick"},initialize:function(e){e||(e={});var t=f.resolve("appModel");this.showNowPlaying=e.showNowPlaying,this.players=t.get("players"),this.listenTo(this.players,"update reset",this.render)},serializeData:function(){var e=f.resolve("appModel"),t=e.get("primaryPlayer");return{showNowPlaying:this.showNowPlaying,primaryPlayer:t?t.toJSON():null,nowPlaying:t?t.get("nowPlaying").toJSON():null,
players:this.players.toJSON()}},onRefreshPlayersClick:function(e){e.preventDefault(),e.stopPropagation(),this.players.fetch()},onLocalPlayerClick:function(e){e.preventDefault();var t=f.resolve("appModel");t.set("primaryPlayer",null)},onPlexPlayerClick:function(e){e.preventDefault();var t=(0,l.default)(e.currentTarget).data("id"),n=this.players.get(t),a=f.resolve("appModel");a.set("primaryPlayer",n)},onNowPlayingClick:function(e){e.preventDefault();var t=f.resolve("appModel"),n=t.get("primaryPlayer"),a=n.get("nowPlaying"),i=(0,
l.default)(e.currentTarget).data("id"),r=a.get(i);h.default.execute("playMedia",{item:r})}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1816),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({id:"section-subset-dropdown",tagName:"span",className:"dropdown",template:r.default,collectionEvents:{reset:"render"},initialize:function(){this.collection.populate({reset:!0,scope:"page"})},serializeData:function(){
var e=this.collection.get(this.model.id)||this.model;return{showDropdown:this.collection.length>1,subsets:this.collection.toJSON(),currentSubset:e.toJSON(),serverID:this.model.server.id,sectionID:this.model.section.id}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1817),r=a(i),s=n(10),o=a(s),l=n(1196),u=a(l),d=o.default.CompositeView.extend({id:"section-type-dropdown",tagName:"span",className:"dropdown",
template:r.default,itemView:u.default,itemViewContainer:".dropdown-menu",modelEvents:{"change:currentType":"render","change:currentSubset":"render"},serializeData:function(){return{currentType:this.model.get("currentType").toJSON()}},onRender:function(){var e=this.collection.length<2,t=this.model.get("allowAdvancedFilters"),n="all"!==this.model.get("currentSubset").id;this.$el.toggleClass("hidden",e||!t||n)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1818),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({tagName:"li",template:r.default,events:{"click a":"onClick"},onClick:function(e){e.preventDefault();var t=this.model.section,n=t.get("currentType");n.set("selected",!1),this.model.set("selected",!0),this.model.section.set("currentType",this.model)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1748),r=a(i),s=n(10),o=a(s),l=n(1365),u=a(l),d=o.default.Layout.extend({
template:r.default,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 u.default({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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1824),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(58),p=a(f),h=n(56),m=a(h),v=n(1049),g=a(v),y=n(1241),b=a(y),w=c.default.Layout.extend({template:r.default,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 g.default([],{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:p.default.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=o.default.extend(this.model.server.getXHROptions(t),{
type:"POST",processData:!1}),a=[],i=o.default.bind(function(e){/image\//.test(e.type)&&(n.data=e,a.push(u.default.ajax(n)))},this);if(o.default.each(e,i),!a.length)return void this.ui.upload.addClass("show-error");this.ui.upload.addClass("show-progress"),this.monitorUpload(u.default.when.apply(u.default,a))}},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=o.default.extend(this.model.server.getXHROptions(e),{type:"POST"});this.monitorUpload(u.default.ajax(t))},monitorUpload:function(e){e.done(o.default.bind(function(){this.isClosed||this.ui.upload.addClass("show-success");var e={server:this.model.server,onlyIfCached:!0},t=new m.default({key:this.metadataItem.get("key")},e);o.default.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 b.default({collection:this.collection,itemViewOptions:{artworkType:this.type}}))},onDragEnter:function(e){this.dragStatus++,this.ui.upload.addClass("drag-hover")},onDragLeave:function(e){this.dragStatus--,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=(0,u.default)(e.currentTarget),n=t.data("ratingKey");this.$(".artwork-option.selected").removeClass("selected"),t.addClass("selected"),this.changes[this.type]=n}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1827),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(67),p=a(f),h=n(1200),m=a(h),v=c.default.CompositeView.extend({template:r.default,className:"files",itemView:m.default,itemViewContainer:"ul",initialize:function(){this.collection=new p.default,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 o.default.each(n,t),n}function t(e){o.default.each(e.Part,n);
}function n(e){a.push(e)}var a=this.collection,i=this.model.getSingleMetadataItem();if(e(i))return u.default.Deferred().resolve();var r=i.populate().then(function(){if(!e(i)&&i.has("childrenKey")){var t=i.get("children"),n=t.get("metadataItems");if(!n.length)return t.populate().then(function(){n.each(e)});n.each(e)}});return r},flushChanges:function(){}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1828),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({
template:r.default,tagName:"li",className:"well",serializeData:function(){var e={file:this.model.get("file")};return e}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1835),s=a(r),o=n(3),l=a(o),u=n(11),d=i(u),c=n(108),f=a(c),p=n(534),h=a(p),m=h.default.extend({templatesByType:{movie:s.default,show:s.default,album:s.default,photo:s.default},serializeData:function(){var e=d.resolve("appModel"),t=e.get("user"),n=h.default.prototype.serializeData.apply(this,arguments);
return l.default.extend(n,{showLabels:this.model.server.supports("labels"),labelsMinVersion:f.default.labels,hasContentFilterFeature:t.get("subscription").get("features").get("content_filter"),plexPassUrl:t.server.get("plexPassUrl")}),n}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(6),u=a(l),d=n(521),c=a(d),f=function(e,t){var n=(0,o.default)(t),a=n.attr("name"),i=a.replace(/parentTitle$/,"parentRatingKey");
i===a&&(i=null);var s,l=e.model.getQueryAttr(a),d=e.model.getQueryAttrSibling(a),f=l!==a,p=f?"title":a,h=f?"ratingKey":p,m=e.model.get("type");s=f?l.match(/(^.*)\./)[1]:"title"===p?m:null;var v=n.data("scopeToAttr"),g=n.data("scopeToParam"),y=n.data("ratingKey"),b=!y;y&&(y=y.toString());var w=!f,P={};g&&e.listenTo(e,"reset_selectize:"+g,function(){A.loadedSearches={}});var _,S,x=e.model["original.updateValues."+a];x?(_=x.updateAttr,S=x.altUpdateAttr):(_=e.model.get(a),i&&(S=parseInt(e.model.get(i),10)),
e.model["original.updateValues."+a]={updateAttr:_,altUpdateAttr:S});var C=e.model["original.general."+a];if(!C){C=[];var T={};T[p]=_,T.ratingKey=y,C=[T],e.model["original.general."+a]=C}var k=[e.model.get(i)||e.model.get(a)],I=function(){var e=A.$dropdown_content.children();A.$dropdown.toggleClass("hidden",e.length<=1)},M=function(){r.default.defer(I)};n.data("autocompleteAttr",p),n.data("updateAttr",a),i&&n.data("altUpdateAttr",i);var A=n.selectize({options:C,items:k,plugins:["restore_on_focus"],
delimiter:null,create:!0,maxItems:1,labelField:p,valueField:h,sortField:p,searchField:[p],selectOnTab:!0,hideSelected:!1,highlight:!1,openOnFocus:!0,selectOnBlur:!0,createOnBlur:!0,persist:!0,addPrecedence:!0,allowEmptyOption:!0,allowCreateEmpty:w,manualInputWidth:!0,loadingClass:"",onFocus:function(){A.preloaded||(A.preloaded=!0,A.onSearchChange(A.$control_input.val()))},createFilter:function(e){P[p]=e;var t=(0,r.default)(this.options).findWhere(P);return!t},load:function(t,n){if(!t.length)return void n();
var a={};if(a[l]=t,v){var i=e.model.get(v);if(!i)return void n();a[g]=i}var r=new c.default([],{server:e.model.server,multiMetadataItem:e.model,query:a});r.fetch().done(function(e){n(e.map(function(e){return e.toJSON()})),I()})},render:{option:function(e,t){var n,a=i?e.ratingKey===String(S):e[p]===_;return n=a?'<small class="autocomplete-annotate pull-right">('+(s&&!b?(0,u.default)("this {1}",s):(0,u.default)("original value"))+")</small>":"","<div>"+t(e[p])+n+"</div>"},option_create:function(e,t){
return e.input?'<div class="create">'+t(e.input)+"</div>":'<div class="create hidden"></div>'}},onDropdownClose:function(){A.$dropdown.addClass("hidden")},onDropdownOpen:function(){A.$dropdown.addClass("hidden"),M()},onType:r.default.bind(function(e){if(A.canCreate(e)){var t=(0,o.default)(A.$dropdown_content[0].childNodes[0]);A.setActiveOption(t)}M(),this.onLockableFieldChange({currentTarget:A.$input,force:!0})},e),onOptionAdd:function(e,t){var n=r.default.pick(t,p,"ratingKey"),a=r.default.findWhere(C,n);
a||C.splice(C.length,0,t)},onChange:function(t){var i=this.options[t];if(i){if(f){var s=i.ratingKey===i[p];n.data("isText",s)}e.flushChanges();var o=e.model.changedAttributes();r.default.has(o,l)||r.default.has(o,d)?e.trigger("focusSubmit"):r.default.defer(function(){A.onBlur()}),e.trigger("reset_selectize:"+a),I()}}})[0].selectize;A.$dropdown.addClass("hidden")};t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(5),o=a(s),l=n(6),u=a(l),d=n(40),c=a(d),f=n(220),p=a(f),h=n(521),m=a(h),v=function(e,t){
var n=(0,o.default)(t),a=n.data("name"),i=n.data("query")||n.data("name"),s=n.data("attr"),l=e.model.get(s).toJSON(),d=r.default.pluck(l,"tag"),f=e.model["original.tag."+a];f||(f=r.default.clone(l),e.model["original.tag."+a]=f);var h=r.default.difference(d,r.default.pluck(f,"tag"));if(h.length){var v=r.default.map(h,function(e){return{tag:e}});v.unshift(f.length,0),f.splice.apply(f,v)}var g=function(t){e.model["original.allTagsRequested."+a]=!0;var n=new p.default({filter:a,filterType:"string"},{
server:e.model.server,section:e.section,type:c.default.get(e.model.get("type")).id}),i=n.get("options");i.populate().then(r.default.bind(function(n){e.model["original.allTagsAvailable."+a]=!0,t(n.map(function(e){return{tag:e.attributes.title}}))},e))};n.data("original-value",n.val()),n.selectize({options:f,items:d,plugins:["remove_button"],create:!0,labelField:"tag",valueField:"tag",sortField:"tag",searchField:["tag"],highlight:!1,createFilter:function(e){var t=(0,r.default)(this.options).findWhere({
tag:e});return!t},onChange:function(){e.onLockableFieldChange(n)},onFocus:function(){this.onSearchChange("")},loadingClass:"",load:function(t,n){var r=!(i!==a||t.length&&e.canAutocomplete);if(r)return void(e.model["original.allTagsRequested."+a]?n():g.call(e,n));var s=e.model["original.allTagsAvailable."+a]||0===t.length;if(s)return void n();var o={};o[i]=t;var l=new m.default([],{server:e.model.server,multiMetadataItem:e.model,query:o}),u=i===a?function(e){return e.toJSON()}:function(e){return{tag:e.get(i)
}};l.fetch().done(function(e){var t=e.map(u);n(t)}).fail(function(){n()})},render:{item:function(e,t){var n=e.tag?t(e.tag):'<span class="autocomplete-annotate">('+(0,u.default)("blank")+")</span>";return'<div class="item">'+n+"</div>"},option:function(e,t){var n;return n=e.tag?t(e.tag):'<small class="autocomplete-annotate">('+(0,u.default)("blank")+")</small>",'<div class="item">'+n+"</div>"}}})};t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1985),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(17),c=a(d),f=n(195),p=a(f),h=n(1211),m=a(h),v=n(1205),g=a(v),y=p.default.extend({template:r.default,ui:o.default.extend({sectionAgent:"#edit-section-agent",sectionScanner:"#edit-section-scanner",thumbnailsCheckbox:'input[name="enableBIFGeneration"]',agentGroup:".agent-group",scannerGroup:".scanner-group"},p.default.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(p.default.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 m.default({model:this.model,collection:this.model.settings});this.sectionSettingsRegion.show(e)},renderSectionAgentSettings:function(){var e=new g.default({model:this.model,collection:this.model.agentSettings});this.agentSettingsRegion.show(e)},populateCollections:function(){var e=this.populateAgents(),t=this.populateScanners(),n=this.populateSectionSettings(),a=this.populateSectionAgentSettings();return this.populateAgentsProxy(),
this.populateScannersProxy(),e.then(o.default.bind(this.onAgentsPopulate,this)),t.then(o.default.bind(this.onScannersPopulate,this)),n.then(o.default.bind(this.renderSectionSettings,this)),a.then(o.default.bind(this.renderSectionAgentSettings,this)),u.default.when(e,t,n,a).then(o.default.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=(0,u.default)(e.currentTarget),n=t.val();this.model.set("agent",n),this.agentSettingsRegion.close();var a=this.model.agents.get(n);
if(a){var i=a.get("languages"),r=this.model.get("language");i.get(r)||this.model.set("language",i.first().get("code")),this.model.agentSettings=null,this.populateSectionAgentSettings().then(o.default.bind(this.renderSectionAgentSettings,this))}this.showValidationResult(this.validate(this.model))},onEditSectionScannerChange:function(e){var t=(0,u.default)(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();var t=c.default.execute("deleteSectionThumbnails",{section:this.model});t.done(this.whenRendered(function(){this.ui.thumbnailsCheckbox.prop("checked",!1)}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1840),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=u.default.ItemView.extend({template:r.default,
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=(0,o.default)(e.currentTarget),n=t.is(":checkbox")?t.prop("checked"):t.val(),a=this.collection.findWhere({id:t.attr("name")});a.set("value",n)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(1841),r=a(i),s=n(195),o=a(s),l=o.default.extend({template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1986),r=a(i),s=n(5),o=a(s),l=n(9),u=a(l),d=n(195),c=a(d),f=n(1209),p=a(f),h=n(1304),m=a(h),v=c.default.extend({template:r.default,fieldNames:["Location"],regions:{pathsRegion:".paths-region"},events:{"click .add-folder-btn":"onAddFolderClick",
"change input[name=path]":"onFolderChange"},onlyAfterRender:["renderSectionLocation"].concat(c.default.prototype.onlyAfterRender),initialize:function(){this.listenTo(this.model.get("locations"),{add:this.onCollectionChange,remove:this.onCollectionChange}),this.renderSectionLocation(),this.showValidationResult(this.validate(this.model))},validate:function(e){var t=[];return e.get("locations").length||t.push("locations"),t},renderSectionLocation:function(){var e=new p.default({collection:this.model.get("locations")
});this.pathsRegion.show(e)},onCollectionChange:function(){this.showValidationResult(this.validate(this.model))},onAddFolderClick:function(e){e.preventDefault();var t=new m.default({server:this.model.server});this.listenToOnce(t,"add:folder",this.onAddFolder),u.default.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=(0,o.default)(e.currentTarget),n=t.prop("defaultValue"),a=t.val();
if(!a)return void t.val(n);var i=this.model.get("locations").findWhere({path:n});i.set("path",a),t.prop("defaultValue",a)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1987),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default,className:"row",events:{"click .remove-path-btn":"onRemovePathClick"},onRemovePathClick:function(e){e.preventDefault(),this.model.trigger("destroy",this.model,this.model.collection);
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=a(i),s=n(1208),o=a(s),l=r.default.CollectionView.extend({itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1988),s=a(r),o=n(5),l=a(o),u=n(11),d=i(u),c=n(9),f=a(c),p=n(195),h=a(p),m=n(548),v=a(m),g=h.default.extend({template:s.default,
ui:{chooseAgent:".choose-agent"},events:{"click .choose-agent":"onChooseAgentClick"},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=d.resolve("appModel"),t=e.get("user"),n={hasPremiumMusic:this.hasPremiumMusic,plexPassUrl:t.server.get("plexPassUrl"),
hasLyrics:this.model.server.get("transcoderLyrics")};return n},updateSelectedOffering:function(){var e=this.model.get("agent"),t=this.model.get("scanner");this.ui.chooseAgent.find("input").prop("checked",!1);var n=this.ui.chooseAgent.filter('[data-agent="'+e+'"][data-scanner="'+t+'"]').find("input");n.length||(n=this.ui.chooseAgent.not("[data-agent][data-scanner]").find("input")),n.prop("checked",!0)},onChooseAgentClick:function(e){var t=(0,l.default)(e.currentTarget),n=t.data("agent"),a=t.data("scanner");
return!n&&!a||this.hasPremiumMusic?(this.model.agentSettings=null,void this.model.set({agent:n||this.getSectionType().defaultAgent,scanner:a||this.getSectionType().defaultScanner})):void f.default.trigger("show:modal",new v.default({model:this.model.server}))},onSectionAgentChange:function(){this.updateSelectedOffering()},onSectionScannerChange:function(){this.updateSelectedOffering()}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1989),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=u.default.ItemView.extend({template:r.default,events:{"change [name]":"onEditSectionSettingInputChange"},serializeData:function(){var e=this.model.isNew(),t="music"===this.model.get("type"),n={settings:this.collection.toJSON(),edit:!e,isNewMusicSection:e&&t&&this.model.server.supports("premiumMusic")};return n},onEditSectionSettingInputChange:function(e){var t=(0,o.default)(e.currentTarget),n=t.attr("name");if("importFromiTunes"===n)return void this.model.set(n,!0);
var a=t.is(":checkbox")?t.prop("checked"):t.val(),i=this.collection.findWhere({id:n});i.set("value",a)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1990),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(93),c=a(d),f=n(113),p=a(f),h=n(195),m=a(h),v=m.default.extend({template:r.default,ui:o.default.extend({sectionTypes:".wizard-block",sectionTitle:"#edit-section-title",sectionLanguage:"#edit-section-language"},m.default.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(m.default.prototype.onlyAfterRender),
initialize:function(e){this.populateCollections(),this.isDefaultSection=e.isDefaultSection},serializeData:function(){var e=m.default.prototype.serializeData.apply(this,arguments);e.sectionTypes=c.default.getAll();var t=this.getSectionType();t&&(e.currentSectionKey=t.key);var n=this.model.get("updatedAt");return n&&(e.updatedAt=(0,p.default)(n)),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(),a=u.default.when(n,e,t,this.model.server.get("myPlexSubscription")&&this.model.server.supports("premiumMusic"));return this.model.isNew()&&(a=a.then(o.default.bind(this.model.setAgentAndScanner,this.model))),a=a.then(e).then(o.default.bind(this.onAgentsPopulate,this)).then(o.default.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 a=this.model.get("type"),i=c.default.get(a),r=i.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=(0,u.default)(e.currentTarget);if(t.hasClass("selectable")){var n=t.data("key"),a={type:n},i=c.default.get(n);
this.model.get("title")||(a.title=i.title),this.model.set(a)}},onEditSectionTitleChange:function(e){var t=(0,u.default)(e.currentTarget);this.model.set("title",t.val()),this.showValidationResult(this.validate(this.model))},onEditSectionLanguageChange:function(e){var t=(0,u.default)(e.currentTarget);this.model.set("language",t.val()),this.showValidationResult(this.validate(this.model))},onSectionTypeChange:function(e,t){this.updateSectionTypesWizardBlocks();var n=c.default.get(t);if(!this.model.get("language")){
var a=n.defaultLanguage;this.model.set("language",a)}var i=this.model.get("title"),r=this.model.previous("type"),s=c.default.get(r),o=s&&s.title;i&&i!==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.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(169),r=a(i),s=n(919),o=a(s),l=o.default.extend({className:"container",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(169),r=a(i),s=n(921),o=a(s),l=o.default.extend({className:"container",template:r.default});t.default=l,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(169),r=a(i),s=n(6),o=a(s),l=n(922),u=a(l),d=u.default.extend({className:"container",template:r.default,serializeData:function(){return{title:(0,o.default)("You don't have any media servers yet."),subtitle:(0,o.default)("{1}Download and install{2} one and try again.",'<a href="https://plex.tv/downloads" target="_blank">',"</a>")}}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(169),r=a(i),s=n(923),o=a(s),l=o.default.extend({className:"container",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(169),r=a(i),s=n(924),o=a(s),l=o.default.extend({className:"container",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1842),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=u.default.ItemView.extend({className:"filter-bar filter-bar-fixed",template:r.default,events:{"click .clear-filters-btn":"onClearFiltersClick"},serializeData:function(){var e=this.model.get("currentFilters"),t=[];return o.default.each(e,function(e){t.push(e.titles.join(", "))}),{titles:t.join(", ")}},onClearFiltersClick:function(e){e.preventDefault();var t=this.model.get("currentFilters");t.length=0,this.model.trigger("change:currentFilters",this.model,t),
c.default.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.id,subset:this.model.get("subset"),trigger:!1})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1220),o=a(s),l=r.default.extend({tagName:"ul",className:"list card-list alert-list",itemView:o.default,reversed:!0});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1843),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=u.default.ItemView.extend({tagName:"li",className:"card-collapsed striped-list-item alert-list-item",template:r.default,serializeData:function(){var e=this.model.toJSON(),t={serverID:this.model.server.id,serverName:o.default.escape(this.model.server.get("friendlyName")),itemKey:"/library/metadata/"+this.model.get("itemID"),event:e};if(e.label=o.default.escape(e.label),e.value=o.default.escape(e.value),"playing"===e._type&&(e.username=o.default.escape(e.username),
e.title=o.default.escape(e.title),e.player=o.default.escape(e.player)),"timeline"===e._type)switch(e.sectionTitle=this.model.get("section")?this.model.get("section").get("title"):"section "+this.model.get("sectionID"),e.mediaTitle=this.model.get("title")||"an item",this.model.get("state")){case 0:e.stateString=(0,c.default)("Created");break;case 1:e.stateString=(0,c.default)("Progress for");break;case 2:e.stateString=(0,c.default)("Matching");break;case 3:e.stateString=(0,c.default)("Downloading metadata for");
break;case 4:e.stateString=(0,c.default)("Loading metadata for");break;case 5:e.stateString=(0,c.default)("Finished processing");break;case 6:e.stateString=(0,c.default)("Analyzing");break;case 9:e.stateString=(0,c.default)("Deleted")}return t}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1223),o=a(s),l=n(1222),u=a(l),d=r.default.extend({tagName:"ul",className:"tile-list session-tile-list",
itemView:o.default,emptyView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1844),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1845),r=a(i),s=n(3),o=a(s),l=n(6),u=a(l),d=n(471),c=a(d),f=n(42),p=a(f),h=n(484),m=a(h),v=n(495),g=a(v),y=n(17),b=a(y),w=n(97),P=a(w),_=n(51),S=a(_),x=P.default.extend({
className:"poster-item session-tile-list-item",template:r.default,screenshotPreferredIndex:"hd",screenshotInterval:null,screenshotIntervalDelay:2e3,screenshotCount:0,ui:{poster:".media-poster",posterFade:".media-poster-fade",userPoster:".user-poster"},events:o.default.extend({"click .info-btn":"onInfoClick","click .close-btn":"onInfoClick"},P.default.prototype.events),modelEvents:{"change:viewOffset":"onViewOffsetChange","change:Player":"onPlayerChange"},initialize:function(e){P.default.prototype.initialize.apply(this,arguments);
var t=this.getScreenshotUrl(this.model.get("Media"));this.image=new S.default({model:this.model,modelAttribute:"ratingKey",type:"clip",getUrl:this.getPosterUrl,width:350,url:t?t:null}),this.userImage=new S.default({model:this.model,modelAttribute:"User",type:"friend",getUrl:this.getUserPosterUrl,width:44}),this.posterFade=new S.default({model:this.model,modelAttribute:"Media",type:"clip",getUrl:o.default.bind(this.getScreenshotUrl,this),width:350});var n=this.model.get("Player");n&&n.state===p.default.states.PLAYING&&(this.screenshotInterval=setInterval(o.default.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)),
this.listenTo(this.model,"change:Player",this.onPlayerChange)},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=o.default.first(e);if(t){var n=this.model.get("viewOffset")||0,a=this.screenshotCount*this.screenshotIntervalDelay+n+4e3;return(0,m.default)(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=o.default.delay(this.whenRendered(function(){if(this.image.showImage(t),this.ui.posterFade.addClass("invisible"),e){var n=this.posterFade.cache,a=this.image.getTranscodeUrl(e),i=n.get(n.getItemCacheKey({
url:a}));i&&n.remove(i)}}),800)})))}},bindings:o.default.extend({},P.default.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=P.default.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments),n=P.default.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=c.default.getIcon(e.platform||e.product);
t.addClass("device-icon-"+n)}},".session-player":{modelAttribute:"Player",formatter:function(e){return e.title}},".session-state":{modelAttribute:"Player",formatter:function(e){return(0,g.default)(e.state)}},".session-transcode":{modelAttribute:"TranscodeSession",formatter:function(e){return e?(0,u.default)("Transcoding"):(0,u.default)("Direct Play")}},".session-transcode-throttled":{modelAttribute:"TranscodeSession",autohide:!0,formatter:function(e){return e&&"1"===e.throttled?(0,u.default)("(throttled)"):"";
}},".session-transcode-video-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var n=!(!e||!e.videoCodec);return t.parent().toggleClass("hidden",!n),n?"copy"===e.videoDecision?(0,u.default)("Direct Stream"):(0,u.default)("Transcode ({1})",e.videoCodec):""}},".session-transcode-audio-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var n=!(!e||!e.audioCodec);return t.parent().toggleClass("hidden",!n),n?"copy"===e.audioDecision?(0,u.default)("Direct Stream"):(0,
u.default)("Transcode ({1})",e.audioCodec):""}},".session-username":{modelAttribute:"User",formatter:function(e){return e.title}}}),onRender:function(){P.default.prototype.onRender.apply(this,arguments),this.userImage.setElement(this.ui.userPoster),this.posterFade.setElement(this.ui.posterFade)},onClose:function(){P.default.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!==p.default.states.PLAYING&&this.screenshotInterval?(this.screenshotInterval=clearInterval(this.screenshotInterval),this.screenshotCount=0):t.state!==p.default.states.PLAYING||this.screenshotInterval||(this.screenshotInterval=setInterval(o.default.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)))},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),b.default.execute("playMedia",{item:this.model,offset:this.model.get("viewOffset")
})},onInfoClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.$el.toggleClass("dim")}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1225),o=a(s),l=r.default.extend({tagName:"ul",className:"tile-list media-tile-list sync-tile-list show-context",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1846),r=a(i),s=n(3),o=a(s),l=n(41),u=a(l),d=n(10),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=n(131),g=a(v),y=n(179),b=a(y),w=n(17),P=a(w),_=n(1071),S=a(_),x=n(51),C=a(x),T=n(328),k=a(T),I=n(1316),M=a(I),A=n(550),E=a(A),O=c.default.Layout.extend({tagName:"li",className:"poster-item media-tile-list-item sync-tile-list-item",template:r.default,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,a=150;"episode"===t?t="show":"clip"===t||"userPlaylistItem"===t?a=250:"directory"===t&&(t="audio"===n?"track":"photo"===n?"photo":"movie"),this.$el.addClass(t),this.image=new C.default({server:this.server,type:t,width:a}),this.progressModel=new u.default.Model({current:0});var i=this.server.get("transcodeJobs");this.metadataItems=new S.default([],{server:this.server,device:this.model.device,syncItemId:this.model.id}),
this.listenTo(this.metadataItems,"reset",this.onMetadataItemsReset),this.listenTo(i,"reset",this.onTranscodeJobsReset),this.metadataItems.fetch({reset:!0}),this.server.supports("syncNotifications")?this.listenTo(this.metadataItems,"change:Media",this.onMediaChange):this.metadataItemsInterval=setInterval(o.default.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 a="complete",i=[],r=[],s=0;s<n;s++){var l=t[s],u=l.get("Media");if(i.push(l.get("grandparentKey")),r.push(l.get("parentKey")),u.length||(a="unknown"),"failed"!==a&&"unknown"!==a)for(var d=0,c=u.length;d<c;d++)for(var f=u[d].Part,p=0,h=f.length;p<h;p++){var m=f[p],v=g.default.getSyncStateFromPart(m);g.default.failedRegex.test(v)&&(a="failed"),g.default.processingRegex.test(v)&&(a="processing"),
g.default.waitingRegex.test(v)&&"processing"!==a&&(a=m.key?"waiting":"processing")}}return this.hasMultipleItems=n>1,this.hasSameGrandparents=1===o.default.compact(o.default.uniq(i)).length,this.hasSameParents=1===o.default.compact(o.default.uniq(r)).length,this.hasPoster||this.updatePoster(),a},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"rootTitle"}},onRender:function(){this.image.setElement(this.ui.poster),this.transcodeProgress.append(new k.default({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 n=t[0],a=n.get("progress");if(this.ui.statusIcons.addClass("hidden"),a>0){this.ui.transcodeStatus.removeClass("hidden");var i=n.get("type"),r=(0,
b.default)(n.get("remaining"));if(this.progressModel.set("progress",a),"download"===i)this.progressModel.set("text",a.toString()+"%"),this.ui.transcodeTimeRemaining.text((0,p.default)("Downloading"));else if("upload"===i)this.progressModel.set("text",a.toString()+"%"),this.ui.transcodeTimeRemaining.text((0,p.default)("Uploading"));else{var s=n.get("speed");if(s){var o=Math.round(10*n.get("speed"))/10;o>10&&(o=Math.round(o)),this.progressModel.set("text",o.toString()+"x")}else this.progressModel.set("text","");
this.ui.transcodeTimeRemaining.text(r)}this.updatePoster(n.get("thumb"))}else this.ui.transcodeStatus.addClass("hidden"),this.ui.processingIcon.removeClass("hidden")},onClick:function(e){e.preventDefault(),m.default.trigger("show:modal",new M.default({model:this.model,collection:this.metadataItems}))},onEditClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),m.default.trigger("show:modal",new E.default({model:this.model}))},onDeleteClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),
P.default.execute("deleteSyncItem",{syncItem:this.model,server:this.server})}});t.default=O,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1227),o=a(s),l=r.default.extend({tagName:"ul",className:"list sync-status-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1847),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=n(131),p=a(f),h=n(179),m=a(h),v=n(51),g=a(v),y=u.default.ItemView.extend({
tagName:"li",className:"sync-status-list-item",template:r.default,ui:{poster:".media-poster"},initialize:function(e){this.syncItem=e.syncItem,this.transcodeJobs=this.model.server.get("transcodeJobs"),this.$el.addClass(this.model.get("type")),this.image=new g.default({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(o.default.bind(function(t){if(this.syncItem.id===t.get("syncItemId")){var n=this.model.get("thumb"),a=this.model.get("title"),i=t.get("transcodeThumb"),r=t.get("title"),s=r&&r.indexOf(a)>-1,o=!0;if(n&&i){var l=new RegExp("(.+)"+t.get("thumb")+"$");o=l.exec(n)}s&&o&&(e=t)}},this)),
e&&e.get("progress")>0){var t=Math.round(10*e.get("speed"))/10,n=(0,m.default)(e.get("remaining"))||(0,c.default)("done"),a=Math.round(10*e.get("progress"))/10;return{active:!0,speed:t,remaining:n,progress:a,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,a=t.length;n<a;n++)for(var i=t[n].Part,r=0,s=i.length;r<s;r++){var o=i[r],l=p.default.getSyncStateFromPart(o);p.default.failedRegex.test(l)&&(e=p.default.getSyncStateContextFromPart(o)),
p.default.processingRegex.test(l)&&(e="downloading"===l?"downloading":"processing"),p.default.waitingRegex.test(l)&&"processing"!==e&&(e=o.key?"waiting":"processing")}return e},getErrorMessage:function(e){switch(e){case"sourceFileUnavailable":return(0,c.default)("This media is inaccessible. Please check that the file exists with the correct permissions.");case"sourceFileMetadataError":return(0,c.default)("The metadata for this media is invalid. Please reanalyze the media and try again.");case"clientProfileError":
return(0,c.default)("The client profile for the sync target is invalid.");case"ioError":return(0,c.default)("An error occurred processing this media. Please check that the disk is not full.");case"transcoderError":return(0,c.default)("The transcoder was unable to process this media.");case"mediaAnalysisError":return(0,c.default)("This media was unable to be analyzed.");case"downloadFailed":return(0,c.default)("This media was unable to be downloaded. Please check that it is still available and try again.");
case"unknownError":return(0,c.default)("An error occurred while syncing this media.")}return(0,c.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.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=a(i),s=n(3),o=a(s),l=n(213),u=a(l),d=n(6),c=a(d),f=n(9),p=a(f),h=n(37),m=a(h),v=n(36),g=a(v),y=n(1230),b=a(y),w=g.default.extend({
tagName:"ol",className:"list media-list playlist-items",itemView:b.default,sorted:!0,itemEvents:{sort:"onSort"},initialize:function(){o.default.bindAll(this,"onItemMove")},onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new u.default(this.el,o.default.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=(0,r.default)(e.item).data("queue-item-id"),n=(0,r.default)(e.item).prev().data("queue-item-id"),a=this.options.playQueue;if(n)return void a.moveItem(t,n);var i=a.get("selectedItem").get("title"),s=new m.default({title:(0,c.default)("Convert Immediately"),message:(0,c.default)("Do you want to start converting this item immediately? Any conversion progress for '{1}' will be lost.",i)}),l=s.promise;l.done(function(){a.moveItem(t)}),l.fail(o.default.bind(this.render,this)),
p.default.trigger("show:modal",s)}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1848),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default,serializeData:function(){return{serverID:this.model.id}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1849),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(6),h=a(p),m=n(130),v=a(m),g=n(235),y=a(g),b=n(17),w=a(b),P=n(296),_=a(P),S=n(186),x=a(S),C=n(51),T=a(C),k=n(535),I=a(k),M=d.default.Layout.extend({
className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:s.default,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=y.default[this.type];"movie"===this.type&&(t=y.default.art);var n="episode"===this.type?"show":this.type;this.image=new T.default({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 v.default.title(this.metadataItem)}},".generator-target":{modelAttribute:"target",
formatter:function(e){return this.model.get("syncItemId")?(0,h.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=f.resolve("appModel"),t=new _.default({id:this.model.get("syncItemId"),clientIdentifier:this.model.get("clientIdentifier")},{server:e.get("user").server});return w.default.execute("deleteSyncItem",{syncItem:t,server:this.model.server})},deleteGenerator:function(){var e=new x.default({id:this.model.get("generatorID")},{server:this.model.server,playlistID:this.metadataItem.get("playlistID")
});return w.default.execute("disableVersionGenerator",{generator:e,ratingKey:this.metadataItem.get("ratingKey")})},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new I.default({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",l.default.debounce(this.onCollectionSort));
var n=this.model.get("playQueueItemID"),a=this.playQueue.get("playQueueSelectedItemID");this.playQueue.moveItem(n,a)},onDeleteClick:function(e){e.preventDefault(),this.model.has("syncItemId")?this.deleteSyncItem():this.deleteGenerator()}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1232),o=a(s),l=r.default.extend({tagName:"ul",className:"list card-list",itemView:o.default});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1851),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(17),p=a(f),h=n(107),m=a(h),v=n(250),g=a(v),y=u.default.ItemView.extend({tagName:"li",className:"striped-list-item",template:r.default,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(),p.default.execute("updateChannel",{server:this.model.server});else if(/\/prefs$/.test(this.model.id)){e.preventDefault();var t=new m.default([],{server:this.model.server,url:this.model.id});t.fetch().done(o.default.bind(function(){c.default.trigger("show:modal",new g.default({model:this.model,collection:t}))},this))}}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1234),o=a(s),l=r.default.extend({tagName:"ul",className:"tile-list media-tile-list channel-directory-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1852),r=a(i),s=n(10),o=a(s),l=n(6),u=a(l),d=n(9),c=a(d),f=n(51),p=a(f),h=n(1307),m=a(h),v=o.default.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel-directory-tile-list-item channel",
template:r.default,ui:{poster:".media-poster",subtitle:".media-subtitle-1"},events:{"click a":"onClick"},initialize:function(e){this.closeOnInstall=e.closeOnInstall,this.image=new p.default({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 n=e?(0,u.default)("Installed"):"";return this.ui.subtitle.text(n),e}}},onRender:function(){this.image.setElement(this.ui.poster);
},onClose:function(){this.image.close()},onClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new m.default({model:this.model,closeOnInstall:this.closeOnInstall}))}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1236),o=a(s),l=r.default.extend({tagName:"ul",className:"tile-list media-tile-list channel-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1853),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=n(9),p=a(f),h=n(17),m=a(h),v=n(107),g=a(v),y=n(51),b=a(y),w=n(250),P=a(w),_=u.default.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel",template:r.default,ui:{poster:".media-poster"},events:{"click .settings-btn":"onSettingsClick","click .uninstall-btn":"onUninstallClick"},initialize:function(e){this.skipFirstRender=e.skipFirstRender,
this.image=new b.default({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(){return this.skipFirstRender?(this.skipFirstRender=!1,this):(this.visible=!0,void u.default.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?(0,c.default)("Video"):"music"===e?(0,c.default)("Music"):"photos"===e?(0,c.default)("Photo"):(0,c.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 g.default([],{server:this.model.server,url:this.model.id+"/:/prefs"}),n=t.fetch();n.done(o.default.bind(function(){p.default.trigger("show:modal",new P.default({model:this.model,collection:t}))},this)),n.always(o.default.bind(function(){this.$el.removeClass("active")},this))}},onUninstallClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");var t=m.default.execute("uninstallChannel",{channel:this.model});t.done(o.default.bind(function(){this.model.trigger("destroy",this.model,this.model.collection);
},this)),t.always(o.default.bind(function(){this.$el.removeClass("active")},this))}}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(152),r=a(i),s=n(36),o=a(s),l=n(1238),u=a(l),d=o.default.extend({mixins:[r.default],tagName:"ul",className:"tile-list media-tile-list album-tile-list",itemView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1854),r=a(i),s=n(3),o=a(s),l=n(97),u=a(l),d=n(196),c=a(d),f=n(51),p=a(f),h=u.default.extend({className:"poster-item media-tile-list-item",template:r.default,ui:c.default.prototype.ui,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.image=new p.default({model:this.model,type:"album",width:180})},bindings:o.default.extend({},u.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"year"}}),onMoreClick:function(e){
c.default.prototype.onMoreClick.apply(this,arguments)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(341),r=a(i),s=n(1240),o=a(s),l=r.default.extend({tagName:"ul",className:"list media-list track-list show-context",itemView:o.default,itemViewOptions:function(){return{collection:this.collection}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1855),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(9),p=a(f),h=n(112),m=a(h),v=n(17),g=a(v),y=n(56),b=a(y),w=n(95),P=a(w),_=n(193),S=a(_),x=c.default.ItemView.extend({tagName:"li",className:"striped-list-item",template:r.default,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){o.default.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new P.default({},{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)),
p.default.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&&(0,m.default)(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(),p.default.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(),g.default.execute("playMedia",{item:this.model,siblings:!0})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.model.server.getSectionForItem(this.model);if(!o.default.isEmpty(t)){var n=new b.default({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section
});g.default.execute("playMedia",{item:n})}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new S.default({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=(0,u.default)(e.currentTarget),n=this.ui.actions.position().top,a=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(a)},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.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(36),r=a(i),s=n(1242),o=a(s),l=r.default.extend({className:"artwork-options-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1856),r=a(i),s=n(10),o=a(s),l=n(182),u=a(l),d=n(235),c=a(d),f=n(80),p=a(f),h=o.default.Layout.extend({tagName:"span",template:r.default,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 p.default({className:"media-poster-image",model:this.model,modelAttribute:"thumb",placeholderClass:c.default[t],width:n,height:u.default.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.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1255),r=a(i),s=n(1244),o=a(s),l=r.default.extend({
tagName:"ul",className:"list media-list media-details-list episode-details-list show-context",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1857),r=a(i),s=n(3),o=a(s),l=n(181),u=a(l),d=n(340),c=a(d),f=n(51),p=a(f),h=c.default.extend({className:"striped-list-item media-list-item media-details-list-item episode-details-list-item",template:r.default,showRating:!0,bypassShowUnwatchedIconsSetting:!0,
createImageView:function(){this.image=new p.default({model:this.model,type:"episode",getUrl:this.getPosterUrl,height:110})},getPosterUrl:function(e){return e},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),(0,u.default)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});t.default=h,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(341),r=a(i),s=n(1246),o=a(s),l=r.default.extend({tagName:"ul",className:"list media-list episode-list show-context",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1858),r=a(i),s=n(3),o=a(s),l=n(181),u=a(l),d=n(97),c=a(d),f=c.default.extend({className:"striped-list-item media-list-item episode-list-item",
template:r.default,showRating:!0,bypassShowUnwatchedIconsSetting:!0,regions:{rating:".media-rating"},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),(0,u.default)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(152),r=a(i),s=n(36),o=a(s),l=n(1248),u=a(l),d=o.default.extend({mixins:[r.default],tagName:"ul",className:"tile-list media-tile-list episode-tile-list",itemView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1859),r=a(i),s=n(3),o=a(s),l=n(181),u=a(l),d=n(97),c=a(d),f=n(196),p=a(f),h=n(51),m=a(h),v=c.default.extend({className:"poster-item media-tile-list-item episode-tile-list-item",
template:r.default,ui:p.default.prototype.ui,bypassShowUnwatchedIconsSetting:!0,initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.image=new m.default({model:this.model,type:"episode",width:250})},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"index",formatter:function(e){return(0,u.default)({episodePrefix:"Episode {1}",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){p.default.prototype.onMoreClick.apply(this,arguments)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1860),r=a(i),s=n(325),o=a(s),l=n(97),u=a(l),d=n(196),c=a(d),f=n(51),p=a(f),h=u.default.extend({className:"poster-item media-tile-list-item extra-tile-list-item",
template:r.default,ui:c.default.prototype.ui,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.image=new p.default({model:this.model,type:"clip",width:250})},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"extraType",formatter:function(e){if(e){var t=o.default.get(e);return t&&t.title}}}}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1251),o=a(s),l=n(517),u=a(l),d=r.default.extend({
mixins:[u.default],tagName:"ul",itemView:o.default,className:"list"});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1861),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({tagName:"li",template:r.default,className:"striped-list-item",initialize:function(e){this.item=e.item}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1254),o=a(s),l=n(1253),u=a(l),d=r.default.extend({
tagName:"ul",className:"list match-result-list",itemView:o.default,emptyView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1862),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1863),r=a(i),s=n(10),o=a(s),l=n(17),u=a(l),d=n(1250),c=a(d),f=o.default.Layout.extend({
tagName:"li",className:"striped-list-item match-result-list-item row",template:r.default,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 c.default({collection:e})))}},onClick:function(e){e.preventDefault(),
u.default.execute("match",{item:this.item,guid:this.model.id,name:this.model.get("name"),children:this.model.get("children")})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(152),r=a(i),s=n(36),o=a(s),l=o.default.extend({mixins:[r.default]});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1866),r=a(i),s=n(10),o=a(s),l=n(482),u=a(l),d=o.default.ItemView.extend({
className:"hidden",template:r.default,bindings:{".media-progress-pct":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var n=this.model,a="track"===n.get("type")?0:(0,u.default)(e,n.get("duration"));a&&t.css("width",a+"%"),this.$el.toggleClass("hidden",!a)}}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1808),r=a(i),s=n(10),o=a(s),l=n(1258),u=a(l),d=o.default.Layout.extend({template:r.default,
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 u.default({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.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1809),s=i(r),o=n(115),l=i(o),u=n(146),d=i(u),c=n(536),f=i(c),p=f.default.extend({template:s.default,posterWidth:{video:70},bindings:a({},f.default.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 n=this.model.get("duration");return"movie"===this.type&&n&&(t=(0,d.default)(n)),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=(0,l.default)({seasonIndex:this.model.get("parentIndex"),
episodeIndex:this.model.get("index"),date:this.model.get("originallyAvailableAt")})),t&&(t=" - "+t),t||""}}}),serializeData:function(){var e=this.model.server.get("playQueueManager"),t=e.getFor(this.model);return{type:this.type,canDelete:!t.get("isRadio")}}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=a(i),s=n(3),o=a(s),l=n(213),u=a(l),d=n(36),c=a(d),f=n(1260),p=a(f),h=c.default.extend({tagName:"ol",
className:"list media-list playlist-items",itemView:p.default,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 u.default(this.el,{onUpdate:o.default.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=(0,r.default)(e.item).data("playlist-id"),n=(0,r.default)(e.item).prev().data("playlist-id");this.model.moveItem(t,n)},onClose:function(){this.sortable&&this.sortable.destroy()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1868),r=a(i),s=n(10),o=a(s),l=n(17),u=a(l),d=n(1261),c=a(d),f=o.default.Layout.extend({template:r.default,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 c.default({model:this.model.get("metadataItem"),canEdit:this.canEdit}))},onClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),u.default.execute("playMedia",{item:this.model,
siblings:!0})},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model.get("playlistItemID"))}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1869),s=i(r),o=n(9),l=i(o),u=n(115),d=i(u),c=n(145),f=i(c),p=n(146),h=i(p),m=n(112),v=i(m),g=n(536),y=i(g),b=y.default.extend({template:s.default,posterWidth:{video:103,photo:59},events:{"click .media-details":"onDetailsClick",
"click .media-primary-subtitle":"onGrandparentClick","click .media-secondary-subtitle":"onParentClick"},bindings:a({},y.default.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=(0,d.default)({seasonPrefix:"Season {1}",episodePrefix:"Episode {1}",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?(0,f.default)(this.model.get("originallyAvailableAt")):"track"===this.type?(0,v.default)(e):(0,h.default)(e)}}}),initialize:function(e){y.default.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(),l.default.trigger("navigate","details",{serverID:this.model.server.id,key:e
}))},onRender:function(){if(y.default.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.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(152),r=a(i),s=n(36),o=a(s),l=n(1263),u=a(l),d=o.default.extend({mixins:[r.default],tagName:"ul",className:"tile-list media-tile-list season-tile-list",itemView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1870),r=a(i),s=n(3),o=a(s),l=n(6),u=a(l),d=n(97),c=a(d),f=n(196),p=a(f),h=n(51),m=a(h),v=c.default.extend({className:"poster-item media-tile-list-item",template:r.default,ui:p.default.prototype.ui,
initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.image=new m.default({model:this.model,type:"season",width:150})},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"leafCount",formatter:function(e){return null==e?"":1===e?(0,u.default)("{1} episode",e):(0,u.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){p.default.prototype.onMoreClick.apply(this,arguments)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1265),o=a(s),l=r.default.extend({tagName:"ul",className:"list select-list select-playlist-list minimal-scroll",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1871),r=a(i),s=n(10),o=a(s),l=n(249),u=a(l),d=o.default.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",template:r.default,ui:{poster:".playlist-poster"},initialize:function(){this.image=new u.default({model:this.model,width:40})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),r=a(i),s=n(517),o=a(s),l=n(341),u=a(l),d=n(1267),c=a(d),f=u.default.extend({mixins:[o.default],initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.listenTo(this.collection,"change:parentIndex",r.default.debounce(this.onParentIndexChange))},tagName:"ul",className:"list media-list track-list show-context",itemView:c.default,onParentIndexChange:function(e,t){null!=e.previous("parentIndex")&&this.listModel.fetch()}});t.default=f,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1872),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(9),p=a(f),h=n(112),m=a(h),v=n(17),g=a(v),y=n(516),b=a(y),w=n(56),P=a(w),_=n(95),S=a(_),x=n(193),C=a(x),T=n(134),k=a(T),I=c.default.ItemView.extend({mixins:[b.default],tagName:"li",template:r.default,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){o.default.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new S.default({},{
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)),p.default.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&&(0,m.default)(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(),p.default.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e;
},onClick:function(e){this.stopTrackingSelecting(e,function(){e.preventDefault(),g.default.execute("playMedia",{item:this.model,siblings:!0})})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.model.server.getSectionForItem(this.model);if(!o.default.isEmpty(t)){var n=new P.default({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});g.default.execute("playMedia",{item:n});
}},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),p.default.trigger("show:modal",new k.default({mediaActions:this.mediaActions}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new C.default({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=(0,u.default)(e.currentTarget),n=this.ui.actions.position().top,a=this.dropdown.getPosition(t,this.containerSize,n);
this.ui.dropdown.css(a)},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.default=I,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=a(i),s=n(3),o=a(s),l=n(213),u=a(l),d=n(36),c=a(d),f=n(1270),p=a(f),h=n(1269),m=a(h),v=c.default.extend({tagName:"ol",className:"list media-list playlist-items",itemView:p.default,emptyView:m.default,sorted:!0,onRender:function(){this.sortable&&this.sortable.destroy(),
this.sortable=new u.default(this.el,{onUpdate:o.default.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=(0,r.default)(e.item).data("generator-id"),n=(0,r.default)(e.item).prev().data("generator-id");this.collection.parent.moveItem(t,n)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1873),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1874),r=a(i),s=n(10),o=a(s),l=n(6),u=a(l),d=n(9),c=a(d),f=n(182),p=a(f),h=n(1140),m=a(h),v=n(17),g=a(v),y=n(249),b=a(y),w=n(136),P=a(w),_=n(1328),S=a(_),x=o.default.ItemView.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",
template:r.default,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");var t=60;this.compositeImage=new b.default({model:this.model,width:p.default.getPosterWidth("movie",t),
height:t,rows:1,columns:1}),this.listenTo(this.transcodeJobs,"reset add remove",this.onTranscodeJobsChange)},resetState:function(){var e=["converting",m.default.PENDING,m.default.COMPLETE,m.default.FAILED];this.ui.status.removeClass(e.join(" "))},getState:function(e){return this.transcodeJobs.findWhere({generatorID:this.model.id})?"converting":e.get("itemsFailedCount")>0?m.default.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?(0,u.default)("1 failed item"):(0,u.default)("{1} failed items",e)}},".retry-btn":{model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,autohide:function(e){
return this.getState(this.status)===m.default.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(),c.default.trigger("show:modal",new S.default({model:this.model,listModel:this.model.get("children"),transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onRetryClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),g.default.execute("reprocessVersionGenerator",{generator:this.model})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),c.default.trigger("show:modal",new P.default({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),g.default.execute("deleteVersionGenerator",{generator:this.model})}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(36),r=a(i),s=n(1272),o=a(s),l=r.default.extend({tagName:"ul",className:"list version-generator-metadata-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1875),r=a(i),s=n(10),o=a(s),l=n(6),u=a(l),d=n(115),c=a(d),f=n(1139),p=a(f),h=n(17),m=a(h),v=n(51),g=a(v),y=n(535),b=a(y),w=o.default.Layout.extend({tagName:"li",className:"striped-list-item version-generator-metadata-list-item",
template:r.default,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 g.default({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(0,c.default)({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=p.default.contexts;switch(e){case t.FILE_UNAVAILABLE:return(0,u.default)("File unavailable");case t.METADATA_ERROR:return(0,u.default)("Invalid metadata");case t.PROFILE_ERROR:return(0,u.default)("Invalid profile");case t.ANALYSIS_ERROR:return(0,u.default)("Unable to analyze")}
return(0,u.default)("Unable to convert")},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new b.default({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(),m.default.execute("enableVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})},onRetryClick:function(e){e.preventDefault(),m.default.execute("reprocessVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1274),o=a(s),l=r.default.extend({tagName:"ul",className:"list alpha-bar-list",
itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1876),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({tagName:"li",className:"alpha-bar-list-item",template:r.default,events:{"click a":"onClick"},onClick:function(e){e.preventDefault(),this.model.section.set("currentFirstCharacter",this.model)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1877),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=u.default.ItemView.extend({className:"label-list section-current-filters-list",template:r.default,modelEvents:{"change:currentFilters":"render"},events:{"click .remove-filter-btn":"onRemoveFilterClick"},initialize:function(e){e.disabled&&this.$el.addClass("disabled")},serializeData:function(){return{currentFilters:this.model.get("currentFilters")}},onRemoveFilterClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget).data("key");
this.trigger("removeAllFilters",t)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1277),o=a(s),l=r.default.extend({tagName:"ul",className:"list side-bar-list",itemView:o.default,initialize:function(e){var t=this.collection.section;e.disabled?this.$el.addClass("disabled"):this.listenTo(t,"change:currentType",this.onCurrentTypeChange)},onCurrentTypeChange:function(e,t){this.collection.fetch({
reset:!0,scope:"page"})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1878),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=u.default.ItemView.extend({tagName:"li",template:r.default,ui:{btn:"a",selectedIcon:".selected-icon"},events:{"click .boolean-btn":"onBooleanFilterClick","click .filter-btn":"onFilterClick"},onlyAfterRender:["onCurrentFiltersChange"],initialize:function(){this.listenTo(this.model.section,"change:currentFilters",this.onCurrentFiltersChange);
},serializeData:function(){return{filter:this.model.toJSON(),selected:this.isCurrentFilter()}},isCurrentFilter:function(){var e=this.model.section.get("currentFilters");return!!o.default.findWhere(e,{key:this.model.id})},onBooleanFilterClick:function(e){e.preventDefault();var t={key:this.model.id,title:this.model.get("title"),value:1};this.ui.btn.hasClass("selected")?this.trigger("removeFilter",t):this.trigger("addFilter",t)},onFilterClick:function(e){e.preventDefault(),this.trigger("showOptions",this.model);
},onCurrentFiltersChange:function(e,t){var n=this.isCurrentFilter();this.ui.btn.toggleClass("selected",n),this.ui.selectedIcon.toggleClass("hidden",!n)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1879),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(1279),c=a(d),f=u.default.CompositeView.extend({classname:"filter-option-list-search-container",template:r.default,itemView:c.default,itemViewContainer:".side-bar-list",
query:"",ui:{searchForm:"#filter-options-search-form",searchInput:"#filter-options-search",loading:"#filter-options-loading"},events:{"keyup #filter-options-search":"onSearchKeyUp","submit #filter-options-search-form":"onSearchSubmit","click .filter-options-deselect-btn":"onDeselectClick"},initialize:function(){this.originalCollection=this.collection,this.listenToOnce(this.originalCollection,"reset",this.onCollectionReset),this.collection.fetch({reset:!0,scope:"page"})},serializeData:function(){return{
showSearch:this.collection.length>20,query:this.query,showLoading:!this.collection.length}},search:function(){this.query=o.default.trim(this.ui.searchInput.val()),this.query?this.rebase(this.originalCollection.search(this.query)):this.rebase(this.originalCollection)},selectExactMatch:function(){this.collection.each(function(e){var t=e.get("title");if(t&&t.toLowerCase()===this.query.toLowerCase()){var n={key:e.parent.id,title:t,value:e.id};this.trigger("addFilter",this,n)}},this)},onCollectionReset:function(e){
var t=e.length>20;this.ui.searchForm.toggleClass("hidden",!t),this.ui.loading.addClass("hidden")},onSearchKeyUp:function(e){this.search()},onSearchSubmit:function(e){e.preventDefault(),this.search(),this.query&&this.selectExactMatch()},onDeselectClick:function(e){e.preventDefault(),this.trigger("removeAllFilters",this.collection.parent.id)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1880),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=u.default.ItemView.extend({
tagName:"li",template:r.default,ui:{btn:"a",selectedIcon:".selected-icon"},events:{"click a":"onClick"},onlyAfterRender:["onCurrentFiltersChange"],initialize:function(){this.listenTo(this.model.section,"change:currentFilters",this.onCurrentFiltersChange)},serializeData:function(){return{filterOption:this.model.toJSON(),selected:this.isCurrentFilter()}},isCurrentFilter:function(){var e=this.model.section.get("currentFilters"),t=o.default.findWhere(e,{key:this.model.parent.id});if(!t)return!1;var n=t.values,a=o.default.find(n,o.default.bind(function(e){
return e===this.model.get("key")},this));return!!a},onClick:function(e){e.preventDefault();var t={key:this.model.parent.id,title:this.model.get("title"),value:this.model.id};this.ui.btn.hasClass("selected")?this.trigger("removeFilter",t):this.trigger("addFilter",t)},onCurrentFiltersChange:function(e,t){var n=this.isCurrentFilter();this.ui.btn.toggleClass("selected",n),this.ui.selectedIcon.toggleClass("hidden",!n)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1881),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({tagName:"li",template:r.default,events:{"click a":"onClick"},initialize:function(){var e=this.model.section.get("currentSort");if(!e){var t=this.model.get("isDefault");t&&(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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=a(i),s=n(5),o=a(s),l=n(1282),u=a(l),d=r.default.CollectionView.extend({tagName:"ul",className:"list browse-directory-list",itemView:u.default,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=(0,o.default)(e.currentTarget),n=t.data("key"),a=this.collection.get(n)||this.parentFilePath;this.trigger("change:path",a),this.options.isRoot||(a.parent?(this.parentFilePath=a.parent.clone(),this.parentFilePath.set({title:".. [Back]",isBackShortcut:!0})):this.parentFilePath=null)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1882),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({
tagName:"li",className:"striped-list-item browse-directory-list-item",template:r.default,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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(36),r=a(i),s=n(1284),o=a(s),l=r.default.extend({tagName:"ul",className:"agents-nav nav nav-pills nav-pills-sm",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1883),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({tagName:"li",template:r.default,bindings:{a:{modelAttribute:"selected",manual:!0,formatter:function(e){this.$el.toggleClass("active",!!e)}}}});t.default=l,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(213),r=a(i),s=n(36),o=a(s),l=n(1286),u=a(l),d=o.default.extend({tagName:"ul",className:"list contributor-list",itemView:u.default,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 r.default(this.$el[0],{draggable:".card-sortable",
animation:200})},onClose:function(){this.sortable.destroy()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1884),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(107),p=a(f),h=n(250),m=a(h),v=n(1306),g=a(v),y=u.default.ItemView.extend({tagName:"li",className:"card card-sortable",template:r.default,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 p.default([],{server:this.model.server,url:"/:/plugins/"+this.model.id+"/prefs"});t.fetch().done(o.default.bind(function(){
c.default.trigger("show:modal",new m.default({model:this.model,collection:t}))},this))},onInfoClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new g.default({model:this.model}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1289),o=a(s),l=n(1288),u=a(l),d=r.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default,emptyView:u.default});t.default=d,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1885),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1886),r=a(i),s=n(10),o=a(s),l=n(471),u=a(l),d=n(183),c=a(d),f=n(113),p=a(f),h=n(489),m=a(h),v=n(17),g=a(v),y=o.default.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",
template:r.default,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}return this.isServer},bindings:{".device-icon":{modelAttribute:"platform",manual:!0,formatter:function(e,t){var n=u.default.getIcon(e);t.addClass("device-icon-"+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(0,p.default)(e)}},".sync-count":{modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,n=e.get("itemsCompleteCount");
return n&&n>0&&(t=[n,(0,c.default)("item",n)].join(" "),this.ui.syncInfo.removeClass("hidden")),t}}},".sync-size":{modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,n=e.get("totalSize");return n&&n>0&&(t=["(",(0,m.default)(n),")"].join("")),t}}}},onRemoveClick:function(e){e.preventDefault(),this.isMediaServer()?g.default.execute("removeServer",{device:this.model}):g.default.execute("removeDevice",{device:this.model})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1292),o=a(s),l=n(1291),u=a(l),d=r.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default,emptyView:u.default,sorted:!0});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1887),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1888),r=a(i),s=n(10),o=a(s),l=n(9),u=a(l),d=n(17),c=a(d),f=n(94),p=a(f),h=n(542),m=a(h),v=n(155),g=a(v),y=o.default.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:r.default,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 p.default({model:this.model,type:"friend",width:80})},bindings:{".username":{modelAttribute:"title"}},onRender:function(){this.image.setElement(this.ui.poster),this.details.show(new m.default({model:this.model}))},onClose:function(){this.image.close()},onEditClick:function(e){e.preventDefault(),u.default.trigger("show:modal",new g.default({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),c.default.execute("removeFriend",{friend:this.model})}});t.default=y,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(543),o=a(s),l=n(1294),u=a(l),d=r.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default,emptyView:u.default,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)||r.default.prototype.addChildView.apply(this,arguments);
},showEmptyView:function(){this._showingEmptyView||this.children.each(function(e){this.removeChildView(e)},this),r.default.prototype.showEmptyView.apply(this,arguments)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1890),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(543),h=a(p),m=d.default.Layout.extend({template:s.default,regions:{card:".centered-home-user-container"},initialize:function(e){
this.itemViewOptions=e},serializeData:function(){var e=f.resolve("appModel"),t=e.get("user");return{hasHomeFeature:!!t.get("subscription").get("features").get("home"),plexPassUrl:t.server.get("plexPassUrl")}},onRender:function(){var e=f.resolve("appModel"),t=e.get("user"),n=t.get("homeUsers");n.length&&this.card.show(new h.default(l.default.extend({},this.itemViewOptions,{model:n.first()})))}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1892),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=n(183),p=a(f),h=n(113),m=a(h),v=n(17),g=a(v),y=n(94),b=a(y),w=u.default.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:r.default,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 b.default({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?(0,c.default)("invite sent {1}",(0,m.default)(t)):(0,c.default)("invite sent to {1}",this.model.get("email"))}var n=this.model.get("friend"),a=this.model.get("server"),i=this.model.get("home");if(a){var r=o.default.reduce(e,function(e,t){return e+=t.numLibraries;
},0),s=(0,p.default)((0,c.default)("library"),r,(0,c.default)("libraries"));return i?(0,c.default)("wants you to join their home and share {1} {2} with you",r,s):n?(0,c.default)("wants to be friends and share {1} {2} with you",r,s):(0,c.default)("wants to share {1} {2} with you",r,s)}return i?(0,c.default)("wants you to join their home"):(0,c.default)("wants to be friends")}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onAcceptClick:function(e){
e.preventDefault(),g.default.execute("acceptInvite",{invite:this.model})},onDeleteClick:function(e){e.preventDefault(),g.default.execute("rejectInvite",{invite:this.model,subset:this.subset})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1297),o=a(s),l=r.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1893),r=a(i),s=n(10),o=a(s),l=n(9),u=a(l),d=n(17),c=a(d),f=n(135),p=a(f),h={artist:"music",movie:"film",photo:"picture",show:"display"},m=o.default.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:r.default,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:h[t.type]}},bindings:{".section-title":{modelAttribute:"title"}},onEditClick:function(e){e.preventDefault();var t=this.model,n=new p.default({model:t,server:t.server,isDefaultSection:t.isNew()});t.isNew()&&n.promise.always(function(){t.trigger("destroy",t,t.collection)}),u.default.trigger("show:modal",n)},onDeleteClick:function(e){e.preventDefault(),c.default.execute("deleteSection",{section:this.model})}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1299),o=a(s),l=r.default.extend({className:"list announcement-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1894),r=a(i),s=n(10),o=a(s),l=n(80),u=a(l),d=o.default.ItemView.extend({className:"announcement-list-item",template:r.default,ui:{thumb:".thumb",unread:".unread"},initialize:function(){this.image=new u.default({
url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1301),o=a(s),l=r.default.extend({tagName:"ul",className:"list select-list select-friends-list dark-scrollbar",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1895),r=a(i),s=n(10),o=a(s),l=n(94),u=a(l),d=o.default.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",template:r.default,ui:{poster:".user-poster"},initialize:function(e){this.image=new u.default({model:this.model,type:"friend",width:80})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1303),o=a(s),l=r.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1896),r=a(i),s=n(3),o=a(s),l=n(17),u=a(l),d=n(340),c=a(d),f=c.default.extend({template:r.default,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(){var e=c.default.prototype.serializeData.apply(this,arguments);return e},bindings:o.default.extend({},c.default.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(),u.default.execute("playMedia",{item:this.model,siblings:this.canPlaySiblings()})},onMarkWatchedClick:function(e){e.preventDefault(),u.default.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),u.default.execute("markUnwatched",{item:this.model})},onDeleteClick:function(e){e.preventDefault(),this.model.destroy()}});t.default=f,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1897),r=a(i),s=n(3),o=a(s),l=n(6),u=a(l),d=n(9),c=a(d),f=n(117),p=a(f),h=n(518),m=a(h),v=n(47),g=a(v),y=n(1281),b=a(y),w=g.default.extend({name:"addFolderModal",className:"add-folder-modal modal fade",template:r.default,events:o.default.extend({"submit form":"onSubmitForm"},g.default.prototype.events),ui:{path:'input[name="path"]'},regions:{rootList:".home-directory-container",childrenList:".path-container"
},initialize:function(e){g.default.prototype.initialize.apply(this,arguments),this.rootPathCollection=new m.default([],{server:e.server}),this.childrenPathCollection=new m.default([],{server:e.server}),this.loadRootPaths()},loadRootPaths:function(){this.rootPathCollection.fetch().done(this.whenRendered(function(){var e=this.rootPathCollection.where({home:!0}),t=o.default.first(e)||this.rootPathCollection.first();this.rootList.currentView.startLoadingItem(t),this.loadChildrenPaths(t)}))},loadChildrenPaths:function(e){
p.default.abortAll("addFolderModal");var t=e.get("children"),n=t.fetch({scope:"addFolderModal"});n.done(this.whenRendered(function(){this.ui.path.val(e.get("path")),this.childrenPathCollection.reset(t.models)})),n.fail(this.whenRendered(function(){this.childrenList.currentView.unselectItem(e),c.default.trigger("show:alert",{type:"error",message:(0,u.default)("Unable to load contents of '{1}'",e.get("path"))})})),n.always(this.whenRendered(function(){this.rootList.currentView.stopLoadingItem(e)}));
},onRender:function(){g.default.prototype.onRender.apply(this,arguments);var e=new b.default({isRoot:!0,collection:this.rootPathCollection}),t=new b.default({collection:this.childrenPathCollection});this.listenTo(e,"change:path",this.onRootPathChange),this.listenTo(t,"change:path",this.onChildrenPathChange),this.rootList.show(e),this.childrenList.show(t)},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.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1898),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(6),c=a(d),f=n(9),p=a(f),h=n(220),m=a(h),v=n(47),g=a(v),y=n(98),b=a(y),w=b.default.extend({name:"addToCollectionModal",
className:"add-to-collection-modal select-modal modal modal-sm fade",template:r.default,ui:{addBtn:".add-btn",message:".message"},events:o.default.extend({"click .collection":"onCollectionClick","keyup .message":"onMessageKeyUp","click .add-btn":"onAddClick"},g.default.prototype.events),onlyAfterRender:["onReset"],initialize:function(e){b.default.prototype.initialize.apply(this,arguments),this.loading=!0,this.models=e.items,this.model=o.default.first(this.models),this.collectionIDs=[],this.filter=new m.default({
filter:"collection",filterType:"string",type:"filter",title:"Collection"},{server:this.model.server,section:this.model.section,standalone:!0}),this.collections=this.filter.get("options"),this.collections.fetch().always(o.default.bind(this.onReset,this))},serializeData:function(){return{loading:this.loading,collections:this.filter.get("options").toJSON()}},toggleAddButton:function(){var e=this.ui.message.val().trim();this.ui.addBtn.toggleClass("disabled",!this.collectionIDs.length&&!e)},onReset:function(){
this.loading=!1,this.render()},onCollectionClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("value");t.hasClass("selected")?this.collectionIDs.splice(o.default.indexOf(this.collectionIDs,n),1):this.collectionIDs.push(n),t.toggleClass("selected"),this.toggleAddButton()},onMessageKeyUp:function(){this.toggleAddButton()},onAddClick:function(e){e.preventDefault();var t=this.ui.addBtn;if(!t.isDisabled()){t.addClass("active");var n=this.ui.message.val().trim(),a=[];n&&a.push(this.model.batchAdd(this.models,"collection",n)),
o.default.each(this.collectionIDs,function(e){var t=this.collections.get(e);a.push(this.model.batchAdd(this.models,"collection",t.get("title")))},this);var i=u.default.when.apply(u.default,a);i.done(o.default.bind(this.hide,this)),i.fail(function(){t.removeClass("active"),p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem adding to this collection.")})})}}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1900),r=a(i),s=n(47),o=a(s),l=n(80),u=a(l),d=o.default.extend({name:"agentInfoModal",className:"agent-info-modal modal fade",template:r.default,regions:{icon:".agent-icon-container"},serializeData:function(){return{agent:this.model.toJSON(),attribution:this.model.get("attribution").get("content")}},onRender:function(){o.default.prototype.onRender.apply(this,arguments),this.icon.show(new u.default({model:this.model,url:"/system/agents/attribution/image?identifier="+this.model.id,
className:"agent-icon",width:100,height:100}))}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1901),r=a(i),s=n(3),o=a(s),l=n(9),u=a(l),d=n(17),c=a(d),f=n(47),p=a(f),h=n(51),m=a(h),v=p.default.extend({name:"channelModal",className:"channel-modal modal fade",template:r.default,ui:{poster:".media-poster",installBtn:".install-btn",updateBtn:".update-btn",uninstallBtn:".uninstall-btn"},events:o.default.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"},p.default.prototype.events),initialize:function(e){p.default.prototype.initialize.apply(this,arguments),this.closeOnInstall=e.closeOnInstall,this.image=new m.default({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(){p.default.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=o.default.last(t.split("/"));u.default.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=c.default.execute("installChannel",{channel:this.model});n.done(o.default.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");var n=c.default.execute("updateChannel",{
channel:this.model,skipConfirmation:!0});n.always(function(){t.removeClass("active")})}},onRestartClick:function(e){e.preventDefault(),c.default.execute("restartChannel",{channel:this.model})},onResetClick:function(e){e.preventDefault(),c.default.execute("resetChannel",{channel:this.model})},onUninstallClick:function(e){e.preventDefault();var t=this.ui.uninstallBtn;if(!t.hasClass("active")){t.addClass("active");var n=c.default.execute("uninstallChannel",{channel:this.model,skipConfirmation:!0});n.always(function(){
t.removeClass("active")})}}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1907),r=a(i),s=n(37),o=a(s),l=o.default.extend({template:r.default,initialize:function(e){o.default.prototype.initialize.apply(this,arguments),this.server=e.server},serializeData:function(){return this.server.toJSON()}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1908),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(6),c=a(d),f=n(9),p=a(f),h=n(47),m=a(h),v=m.default.extend({name:"importPlaylistsModal",className:"import-playlists-modal modal fade",template:r.default,ui:{importBtn:".import-btn",sections:"#section-list",importAll:"#import-all"},events:o.default.extend({"click .import-btn":"onImportClick"},m.default.prototype.events),initialize:function(e){m.default.prototype.initialize.apply(this,arguments),this.server=e.server,this.musicSections=e.server.get("sections").where({
type:"artist"})},serializeData:function(){var e=o.default.map(this.musicSections,function(e){return e.pick("key","title")});return{showSections:e.length>1,sections:e}},onImportClick:function(e){e.preventDefault();var t=this.ui.importBtn;t.addClass("active");var n=this.ui.sections.val(),a="/playlists/import/itunes?sectionID="+n;this.ui.importAll[0].checked&&(a+="&force=1");var i=o.default.extend(this.server.getXHROptions(a),{type:"PUT"}),r=u.default.ajax(i);r.done(o.default.bind(function(){p.default.trigger("show:alert",{
type:"success",message:(0,c.default)("Playlists have been imported.")}),this.server.get("playlists").get("items").fetch(),this.hide()},this)),r.fail(function(){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem importing.")})})}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1915),r=a(i),s=n(3),o=a(s),l=n(11),u=n(37),d=a(u),c=d.default.extend({template:r.default,events:o.default.extend({
"click .learn-more":"onLearnMoreClick"},d.default.prototype.events),onRender:function(){d.default.prototype.onRender.apply(this,arguments),(0,l.resolve)("metrics").trackView({page:"relayNotification",mode:"modal",action:"dismiss"},{interaction:!1})},onHide:function(e){d.default.prototype.onHide.apply(this,arguments),(0,l.resolve)("metrics").trackClick({page:"relayNotification",mode:"modal",action:"dismiss"})},onLearnMoreClick:function(){(0,l.resolve)("metrics").trackClick({page:"relayNotification",
mode:"modal",action:"learn"})}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";function a(e){return e?e.split("\n"):[]}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1916),s=i(r),o=n(47),l=i(o),u=l.default.extend({name:"releaseNotesModal",template:s.default,serializeData:function(){var e=this.model.toJSON();return e.version=e.version.replace(/\-.*/gi,""),e.added=a(e.added),e.fixed=a(e.fixed),e}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1917),r=a(i),s=n(98),o=a(s),l=o.default.extend({name:"selectDeviceModal",template:r.default,serializeData:function(){return{devices:this.collection.toJSON()}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1918),r=a(i),s=n(98),o=a(s),l=o.default.extend({name:"SelectMediaFileModal",template:r.default,serializeData:function(){var e=this.model.get("Media");
return{medias:e}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1919),r=a(i),s=n(112),o=a(s),l=n(98),u=a(l),d=u.default.extend({name:"selectOffsetModal",template:r.default,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.offset=e.offset},serializeData:function(){return{offset:this.offset,formattedOffset:(0,o.default)(this.offset)}}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1920),s=a(r),o=n(3),l=a(o),u=n(62),d=a(u),c=n(11),f=i(c),p=n(1043),h=a(p),m=n(47),v=a(m),g=n(184),y=a(g),b=n(1146),w=a(b),P={osx:"mac"},_=v.default.extend({mixins:[y.default],name:"serverDownloadModal",className:"server-download-modal modal modal-lg fade",template:s.default,ui:{downloadBtn:".download-btn",paneTabs:".show-pane-btn",loading:".server-download-loading"},regions:{paneRegion:".pane-region"
},events:l.default.extend({"click .show-pane-btn":"onShowPaneClick","click .download-btn":"onDownloadClick"},v.default.prototype.events),panesModel:"selectedModel",onlyAfterRender:["showPane"],initialize:function(e){var t=this;v.default.prototype.initialize.apply(this,arguments);var n=f.resolve("appModel");n.get("primaryServer")||this.listenTo(n,"change:primaryServer",function(e,n){n&&n.id&&t.hide()}),this.downloadType=e.downloadType;var a=new h.default([],{server:n.get("cloudServer")}),i=a.populate();
i.done(function(){t.collection=a.get(t.downloadType).get("platforms"),t.paneSetup(),t.render(),t.ui.loading.addClass("hidden")}),f.resolve("metrics").trackView({page:"downloads",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){var n=t.get("id");return e[n]={constructor:w.default},e},{});var e=d.default.platformID,t=P[e]||e;this.selectedModel=this.collection.get(t)||this.collection.first(),this.showPane(this.selectedModel.get("id"))},onRender:function(){v.default.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");f.resolve("metrics").trackClick({page:"downloads",firstRun:!0,action:"download",platform:this.downloadType,os:t})}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1922),r=a(i),s=n(47),o=a(s),l=n(1226),u=a(l),d=o.default.extend({name:"syncStatusModal",template:r.default,regions:{list:".sync-status-list-container"
},onRender:function(){o.default.prototype.onRender.apply(this,arguments),this.list.show(new u.default({collection:this.collection,itemViewOptions:{syncItem:this.model}}))}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1923),r=a(i),s=n(3),o=a(s),l=n(9),u=a(l),d=n(47),c=a(d),f=c.default.extend({name:"termsModal",template:r.default,isForced:!0,ui:{confirmBtn:".confirm-btn"},events:o.default.extend({"click .confirm-btn":"onConfirmClick"
},c.default.prototype.events),onConfirmClick:function(e){e.preventDefault();var t=this.ui.confirmBtn;if(!t.isDisabled()){t.addClass("active");var n=this.collection.first().save({AcceptedEULA:!0});n.always(o.default.bind(function(){this.hide(),u.default.trigger("navigate","setupBasic",{serverID:this.collection.server.id})},this))}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1924),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({
className:"modal-body",template:r.default,events:{"click .try-again-link":"onTryAgainClick"},serializeData:function(){return{status:this.options.status}},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","loading")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1925),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"convert-location-container form-group",template:r.default,
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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1927),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(85),c=a(d),f=u.default.ItemView.extend({
className:"convert-target-container form-group",template:r.default,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;t?this.selectedProfile=this.profiles.get(t):this.selectedProfile=this.profiles.findWhere({
selected:!0}),this.availableCustomQualities=c.default.getAvailableQualities().reverse();var n=this.model.get("mediaSettings").get("maxVideoBitrate");if(n){var a=c.default.getNearestIndexToBitrate(n);this.selectedCustomQuality=c.default.getQualityByIndex(a)}else this.selectedCustomQuality=o.default.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){var t=this.model.get("Device");t.profile=this.selectedProfile.get("title")},updateMediaSettings:function(e){var t=this.model.get("mediaSettings");t.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=c.default.getQualityByIndex(t),this.updateMediaSettings(this.selectedCustomQuality)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1928),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=n(39),p=a(f),h=n(130),m=a(h),v=n(142),g=a(v),y=n(186),b=a(y),w=n(549),P=a(w),_=n(1320),S=a(_),x=n(1319),C=a(x),T=u.default.Layout.extend({template:r.default,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 n=new g.default({key:t},{server:this.model.server,onlyIfCached:!0});o.default.isEmpty(n)||(this.tempModel.section=n)}}else{var a,i=e.item,r=e.items,s=i.has("childrenKey")?i.get("children"):i,l=i.server;if(i.get("isSection"))a=i;else{var u=l.getSectionForItem(i);o.default.isEmpty(u)||(a=u)}this.tempModel=new b.default({title:m.default.title(i,{items:r
}),targetTagID:this.targets.first().id,Location:{uri:m.default.uri(s,{items:r})}},{server:l,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 P.default({model:this.tempModel,isSync:!1,isCloudSync:!1})),this.targetsRegion.show(new S.default({model:this.tempModel,targets:this.targets,profiles:this.profiles})),this.locationRegion.show(new C.default({
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 n=this.tempModel.get("Device");this.tempModel.set("target",(0,c.default)("Custom: {1}",n.profile))}var a=this.playlist.addContent(this.tempModel);a.done(this.whenRendered(function(){if(this.model){var e=o.default.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=p.default.parseXML(t),a=n&&n.status;this.trigger("request:state","error",a)}))}}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1929),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"modal-body loading-container",template:r.default});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1931),r=a(i),s=n(10),o=a(s),l=n(9),u=a(l),d=o.default.ItemView.extend({className:"modal-body",template:r.default,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),u.default.trigger("navigate","conversion",{serverID:this.options.server.id})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(1932),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"modal-body",template:r.default,events:{"click .try-again-link":"onTryAgainClick"},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","form")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1933),r=a(i),s=n(10),o=a(s),l=n(40),u=a(l),d=n(85),c=a(d),f=n(895),p=a(f),h=n(896),m=a(h),v=n(35),g=a(v),y=o.default.ItemView.extend({
className:"sync-quality-container form-group",template:r.default,events:{"change select[name=videoQuality]":"onVideoQualityChange","change select[name=musicQuality]":"onMusicQualityChange","change select[name=photoQuality]":"onPhotoQualityChange"},initialize:function(e){this.mediaSettings=this.model.get("mediaSettings"),this.mediaSettings.has("audioBoost")||this.mediaSettings.set("audioBoost",g.default.get("audioBoost")),this.mediaSettings.has("subtitleSize")||this.mediaSettings.set("subtitleSize",g.default.get("subtitleSize")),
this.initVideoQuality(),this.initMusicQuality(),this.initPhotoQuality()},initVideoQuality:function(){this.availableVideoQualities=c.default.getAvailableQualities().reverse();var e=this.mediaSettings.get("maxVideoBitrate"),t=e?c.default.getNearestIndexToBitrate(e):g.default.get(c.default.getSyncQualityAttribute());this.updateVideoQuality(c.default.getQualityByIndex(t))},initMusicQuality:function(){this.availableMusicQualities=p.default.getAvailableQualities().reverse();var e=this.mediaSettings.get("musicBitrate"),t=e?p.default.getNearestIndexToBitrate(e):g.default.get(p.default.getSyncQualityAttribute());
this.updateMusicQuality(p.default.getQualityByIndex(t))},initPhotoQuality:function(){this.availablePhotoQualities=m.default.getAvailableQualities().reverse();var e=this.mediaSettings.get("photoQuality"),t=e?m.default.getNearestIndexToQuality(e):g.default.get(m.default.getSyncQualityAttribute());this.updatePhotoQuality(m.default.getQualityByIndex(t))},serializeData:function(){var e=this.model.get("metadataType"),t=u.default.get(e);return{typeElement:t.element,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.musicBitrate})},updatePhotoQuality:function(e){this.selectedPhotoQuality=e,this.mediaSettings.set({photoQuality:e.photoQuality,photoResolution:e.photoResolution})},saveQualityIndex:function(e,t){var n=parseInt(t,10);return g.default.save(e.getSyncQualityAttribute(),n),e.getQualityByIndex(n)},onVideoQualityChange:function(e){var t=this.saveQualityIndex(c.default,e.currentTarget.value);this.updateVideoQuality(t)},onMusicQualityChange:function(e){
var t=this.saveQualityIndex(p.default,e.currentTarget.value);this.updateMusicQuality(t)},onPhotoQualityChange:function(e){var t=this.saveQualityIndex(m.default,e.currentTarget.value);this.updatePhotoQuality(t)}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1934),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(130),h=a(p),m=n(40),v=a(m),g=n(17),y=a(g),b=n(296),w=a(b),P=n(549),_=a(P),S=n(1325),x=a(S),C={
video:"movie",audio:"track",photo:"photo"},T=d.default.Layout.extend({template:s.default,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=f.resolve("appModel");if(this.device=e.device,this.model)this.tempModel=this.model.clone();else{var n,a,i=e.item,r=e.items;i.get("isPlaylist")?(n=i,a=C[i.get("playlistType")]):i.get("isMetadataList")?(n=i,
a=v.default.getChildMediaType(i.get("firstItemType")).typeString):(n=i.has("childrenKey")?i.get("children"):i,a=v.default.getChildMediaType(i.get("type")).typeString),this.tempModel=new w.default({metadataType:a,title:h.default.title(i,{items:r}),rootTitle:this.getRootTitle(i),machineIdentifier:i.server.id,clientIdentifier:this.device.get("clientIdentifier"),Location:{uri:h.default.uri(n,{items:r})}},{parent:i.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 _.default({model:this.tempModel,isSync:!0,isCloudSync:this.device.get("isCloudSync")})),this.qualityRegion.show(new x.default({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(l.default.bind(function(){if(this.model){var e=this.model.get("version")||0,t=l.default.omit(this.tempModel.toJSON(),"children");t.version=e+1,this.model.set(this.model.parse(t))}},this)),n=n.then(l.default.bind(function(){return y.default.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.default=T,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1936),r=a(i),s=n(10),o=a(s),l=n(9),u=a(l),d=o.default.ItemView.extend({className:"modal-body",template:r.default,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),u.default.trigger("navigate","sync",{serverID:this.options.server.id,deviceID:this.options.device.id
})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1937),r=a(i),s=n(3),o=a(s),l=n(6),u=a(l),d=n(489),c=a(d),f=n(153),p=a(f),h=n(47),m=a(h),v=n(1271),g=a(v),y=m.default.extend({mixins:[p.default],name:"versionGeneratorMetadataModal",className:"version-generator-metadata-modal modal fade",template:r.default,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=o.default.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?(0,u.default)("{1} item",e):(0,u.default)("{1} items",e)}},".generator-total-size":{model:"status",modelAttribute:"totalSize",formatter:function(e){return e?(0,c.default)(e):(0,u.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(){m.default.prototype.onRender.apply(this,arguments),
this.ui.body.on("scroll",this.handleScroll),this.model.fetch(),this.populatePage(),this.listRegion.show(new g.default({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){var e=this.ui.body.prop("scrollHeight")-this.ui.body.innerHeight(),t=e-this.ui.body.scrollTop()<this.scrollThreshold;
t&&this.listModel.get("populatedRange").end<this.listModel.get("totalSize")&&this.populatePage()}}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1940),r=a(i),s=n(10),o=a(s),l=n(94),u=a(l),d=o.default.ItemView.extend({template:r.default,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 u.default({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.default=d,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1941),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(1331),c=a(d),f=u.default.Layout.extend({tagName:"ul",className:"list modal-nav-list",template:r.default,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 c.default({collection:this.serverOverviews,itemViewOptions:{paneType:"ownedServer"}})),this.sharedServerList.show(new c.default({collection:this.sharedServerShares,itemViewOptions:{paneType:"sharedServer"}}))},onChangePaneClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget);
if(!t.isDisabled()){var n=t.data("pane"),a=t.data("pane-id"),i={};"ownedServer"===n?i.serverOverview=this.model.get("serverOverviews").get(a):"sharedServer"===n&&(i.serverShare=this.model.get("serverShares").get(a)),this.trigger("change:pane",n,a,i)}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1332),o=a(s),l=r.default.extend({className:"server-nav-list",itemView:o.default});t.default=l,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1942),s=a(r),o=n(10),l=a(o),u=n(11),d=i(u),c=l.default.ItemView.extend({tagName:"a",className:"btn-gray change-pane-btn disabled",template:s.default,initialize:function(e){this.$el.attr({href:"#","data-pane":e.paneType,"data-pane-id":this.model.id});var t=d.resolve("appModel"),n=t.get("servers"),a=n.get(this.model.get("machineIdentifier"));a?this.attachServer(a):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.default=c,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1943),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(113),v=a(m),g=n(1336),y=a(g),b=f.default.Layout.extend({template:s.default,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=h.resolve("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"),a=n.find(":checked:visible"),i=[],r={machineIdentifier:e.id,
owned:!0,allLibraries:!1};return a.each(function(){return"all"===this.value?(r.allLibraries=!0,!1):void i.push(parseInt(this.value,10))}),r.allLibraries?r.numLibraries=t.length:r.numLibraries=i.length,r.Section=t.map(function(e){var t=e.toJSON();return t.shared=r.allLibraries||l.default.contains(i,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=(0,v.default)(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 y.default({model:this.model,serverOverview:this.serverOverview,itemViewOptions:this.itemViewOptions}))},onServerStatusClick:function(e){e.preventDefault();var t=(0,d.default)(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"));
}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1944),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(93),v=a(m),g=n(220),y=a(g);n(412);var b=f.default.ItemView.extend({className:"form-horizontal",template:s.default,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=h.resolve("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:v.default.get("movies").sectionTypeIcon,showsIcon:v.default.get("tv").sectionTypeIcon,musicIcon:v.default.get("music").sectionTypeIcon}},loadPresets:function(){l.default.each(this.filters,function(e,t){l.default.isEmpty(e.presets)||l.default.each(e.presets,function(e,n){var a=this.getSelectizeInputByFilterName(t,n),i=l.default.map(e,function(e){return{title:e,key:e}});a.addOption(i)},this)},this)},loadSections:function(){
var e=h.resolve("appModel"),t=e.get("servers"),n=this.model.get("serverShares"),a=n.filter(function(e){return e.isActive()&&e.get("owned")}),i=l.default.compact(l.default.map(a,function(e){return t.get(e.get("machineIdentifier"))}));l.default.each(i,function(e){if(e.get("connected")){var t=e.get("sections");t.populate().done(l.default.bind(function(){this.loadFilters(t)},this))}},this)},loadFilters:function(e){e.each(function(e){var t=e.get("type");l.default.each(this.filters,function(n,a){l.default.contains(n.sectionTypes,t)&&this.loadFilterOptions(e,a);
},this)},this)},loadFilterOptions:function(e,t){var n=new y.default({filter:t,filterType:"string"},{server:e.server,section:e}),a=n.get("options");a.populate().done(l.default.bind(function(){var n=this.getSelectizeInputByFilterName(t,e.get("type"));n.addOption(a.toJSON())},this))},getSelectizeInputByFilterName:function(e,t){var n="#filter-"+t+"-"+e;return this.$(n)[0].selectize},resetAllPlaceholders:function(){var e=[];l.default.each(this.filters,function(t){e=l.default.union(e,t.sectionTypes)}),
l.default.each(e,function(e){var t=this.model.get(this.filterByType[e]);this.resetPlaceholders(e,{restore:l.default.isEmpty(t)})},this)},resetPlaceholders:function(e,t){t||(t={});var n=this.$("input[data-section-type="+e+"]");n.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(){return this.hasContentFilterFeature?(this.ui.tagInputs.selectize({
plugins:["remove_button"],create:!0,labelField:"title",valueField:"title",sortField:"title",searchField:["title"]}),this.resetAllPlaceholders(),this.loadSections(),void this.loadPresets()):void this.$el.addClass("no-plex-pass")},onInputChange:function(e){var t=e.currentTarget,n=(0,d.default)(t),a=t.value,i=n.data("filter"),r=n.data("sectionType");if(this.hasContentFilterFeature||"allowChannels"===t.name){if(i){var s=this.changes[t.name]||this.model.get(t.name)||{};a?s[i]=a:s.hasOwnProperty(i)&&delete s[i],
this.resetPlaceholders(r,{restore:l.default.isEmpty(s)}),a=s}else"checkbox"===t.type&&(a=t.checked);this.changes[t.name]=a}}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1945),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(93),c=a(d),f=u.default.ItemView.extend({tagName:"li",className:"share-section-list-item",template:r.default,initialize:function(e){this.serverShare=e.serverShare},serializeData:function(){var e={
section:this.model.toJSON(),typeIcon:c.default.get(this.model.get("type")).sectionTypeIcon,isChecked:!1};if(this.serverShare&&!this.serverShare.get("allLibraries")){var t=this.serverShare.get("Section");e.isChecked=!!o.default.findWhere(t,{id:this.model.id,shared:!0})}return e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1946),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(1335),p=a(f),h=c.default.CompositeView.extend({
className:"share-server-container",template:r.default,itemView:p.default,itemViewContainer:".share-section-list",ui:{list:".share-section-list"},events:{"change input[name=share-all-libraries-cb]":"onAllLibrariesChange"},initialize:function(e){o.default.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=u.default.when.apply(u.default,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.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1947),s=a(r),o=n(1948),l=a(o),u=n(3),d=a(u),c=n(5),f=a(c),p=n(10),h=a(p),m=n(11),v=i(m),g=n(6),y=a(g),b=n(113),w=a(b),P=n(93),_=a(P),S=h.default.ItemView.extend({template:s.default,
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=v.resolve("appModel"),n=t.get("servers"),a=n.get(this.serverShare.get("machineIdentifier"));a?this.attachServer(a):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(0,w.default)(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="",
d.default.each(d.default.where(e,{shared:!0}),function(e){var n={section:e,typeIcon:_.default.get(e.type).sectionTypeIcon};t+=(0,l.default)(n)})):t=(0,l.default)({section:{title:(0,y.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=(0,f.default)(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.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1949),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(17),p=a(f),h=c.default.ItemView.extend({template:r.default,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=o.default.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=p.default.execute("validateUsername",{username:e,server:this.model.server});t.done(o.default.bind(function(){this.$el.addClass("is-valid-username"),this.$el.removeClass("is-invalid-username")},this)),t.fail(o.default.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(o.default.bind(this.focusInput,this),this.focusDelay)},onInputChange:function(e){var t=e.currentTarget,n=t.name,a=t.value;a!==this.changes[n]&&(this.changes[n]=a,this.trigger("change:errorMessage",""),this.trigger("enable:submit",!!a),"username"===n&&this.validate(a))},onAddExistingUserClick:function(e){e.preventDefault();var t=(0,u.default)(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=(0,u.default)(e.currentTarget);t.isDisabled()||(this.changes.restricted=!0,t.addClass("hidden"),this.ui.existingGroup.addClass("disabled"),this.ui.existingBtn.addClass("disabled"),this.focusInput())}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1952),r=a(i),s=n(192),o=a(s),l=o.default.extend({
className:"user-select-alert-bar",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1953),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(6),v=a(m),g=n(9),y=a(g),b=n(62),w=a(b),P=n(17),_=a(P),S=n(552),x=a(S),C=n(551),T=a(C),k=f.default.Layout.extend({className:"user-select-modal-pin-container",template:s.default,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=h.resolve("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(){
var e=this.isEditing&&!this.isEditConfirmation;return{isEditing:e,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");var t=this.savePIN(e);t.fail(this.whenRendered(function(){this.ui.saveBtn.removeClass("disabled"),
y.default.trigger("show:alert",{type:"error",message:(0,v.default)("This PIN could not be saved.")})}))}},removePIN:function(){if(!this.ui.removeBtn.isDisabled()){this.ui.removeBtn.addClass("disabled");var e=this.savePIN("");e.fail(this.whenRendered(function(){this.ui.removeBtn.removeClass("disabled"),y.default.trigger("show:alert",{type:"error",message:(0,v.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(l.default.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&&y.default.trigger("show:modal",new T.default({type:"pin"}))},this)),n.always(this.whenRendered(function(){this.ui.loading.addClass("hidden");
})),n},confirmUser:function(e){this.ui.loading.removeClass("hidden");var t=_.default.execute("switchUser",{homeUser:this.model,pin:e,allowGuestLock:!this.isEditing});t.done(l.default.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(a,i){var r=e[a]||"";r&&!n&&(r="&bull;"),(0,d.default)(i).toggleClass("current",a===t).html(r)})},onRender:function(){this.userList.show(new x.default({model:this.model,disabled:!0})),w.default.mobile||setTimeout(l.default.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,a=t>=96&&t<=105;
n||a||e.preventDefault()}},onInput:function(e){var t=(0,d.default)(e.currentTarget),n=t.val(),a=n.length,i=n.charAt(n.length-1);return/[0-9]/.test(i)?void(4===n.length&&(!this.isEditing||this.isEditConfirmation?(t.blur(),this.confirmUser(this.getPIN())):this.ui.saveBtn.focus())):void t.val(n.slice(0,a-1))},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){
(0,d.default)(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();return 4!==t.length?void y.default.trigger("show:alert",{type:"error",message:(0,v.default)("Please enter a 4 digit PIN.")}):void(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.default=k,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(552),o=a(s),l=r.default.extend({tagName:"ul",className:"tile-list user-select-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1955),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(17),h=a(p),m=n(90),v=a(m),g=n(128),y=a(g),b=n(445),w=a(b),P=n(1341),_=a(P),S=d.default.Layout.extend({className:"user-select-modal-users-container",template:s.default,ui:{loading:".loading"},regions:{body:".modal-body"},onlyAfterRender:["onUserPopulated","onHomeUsersPopulated","onError"],initialize:function(e){var t=f.resolve("appModel");this.user=t.get("user"),this.homeUsers=this.user.get("homeUsers"),this.user.server.populate().done(l.default.bind(this.onUserPopulated,this)).fail(l.default.bind(this.onError,this));
},showList:function(e){this.ui.loading.addClass("hidden"),this.body.show(new _.default({collection:e})),this.listenTo(this.body.currentView,"itemview:selectUser",this.onUserSelect)},selectUser:function(e){this.ui.loading.removeClass("hidden");var t=h.default.execute("switchUser",{homeUser:e,switchUser:!0,allowGuestLock:!0});t.done(l.default.bind(function(){this.trigger("resolve")},this)),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},onUserPopulated:function(){this.homeUsers.fetch().done(l.default.bind(this.onHomeUsersPopulated,this)).fail(l.default.bind(this.onError,this));
},onHomeUsersPopulated:function(e){var t=h.default.execute("lockUser");t.always(l.default.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=v.default.getActiveUser();if(e&&e.get("home")){var t={id:e.id,title:e.get("title"),"protected":!!e.get("pin")};this.showList(new w.default([t],{server:this.user.server,parent:this.user}))}else this.user.set("lockState",y.default.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.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(1956),l=r(o),u=n(3),d=r(u),c=n(10),f=r(c),p=n(7),h=(r(p),n(66)),m=r(h),v=n(34),g=n(9),y=r(g),b=n(11),w=s(b),P=n(185),_=r(P),S=n(1485),x=r(S),C=n(362),T=r(C),k=n(1344),I=r(k),M=n(530),A=r(M),E=f.default.Layout.extend({
className:"nav-bar",template:l.default,sectionSearchDelay:500,ui:{backBtn:".back-btn",plexPassBtn:".plex-pass-btn",activityBtn:".activity-btn",activityBadge:".activity-badge",search:".nav-bar-search-container",modalContainer:".modal-container"},regions:{navDropdown:".nav-bar-right",playerDropdown:".nav-bar-right"},events:{"click .back-btn":"onBackClick","click .activity-btn":"onActivityClick","click .plex-pass-btn":"onPlexPassClick"},modelEvents:{"change:history":"onHistoryChange","change:primaryServer":"onPrimaryServerChange"
},onlyAfterRender:["onSignedInChange","onHistoryChange","onPrimaryServerChange","onActivityChange"],initialize:function(){d.default.bindAll(this,"onPlexPassModalClose"),this.isPlexPassModalOpen=!1,this.listenTo(this.model.get("user"),{"change:signedIn":this.onSignedInChange,"change:homeSize":this.onHomeSizeChange}),this.listenTo(y.default,"change:language",this.render),this.setupServerListeners()},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("sessions"),this.transcodeJobs=new _.default([],{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(){var e=this.model.get("user");return{plexPassUrl:e.server.get("plexPassUrl"),
hasHistory:this.hasHistory(),canGoPremium:this.canGoPremium(),showActivity:!!this.primaryServer,activityCount:this.getActivityCount()}},mountReact:function(){m.default.render({$$typeof:i,type:v.Provider,key:null,ref:null,props:a(v.Provider.defaultProps,{children:{$$typeof:i,type:x.default,key:null,ref:null,props:a(x.default.defaultProps,{serverEntityID:this.primaryServer?this.primaryServer.entityID():void 0}),_owner:null},store:w.resolve("appStore")}),_owner:null},this.ui.search[0]),m.default.render({
$$typeof:i,type:v.Provider,key:null,ref:null,props:a(v.Provider.defaultProps,{children:{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{metricsProperties:{context:"navBar"},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose}),_owner:null},store:w.resolve("appStore")}),_owner:null},this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&(m.default.unmountComponentAtNode(this.ui.search[0]),m.default.unmountComponentAtNode(this.ui.modalContainer[0]));
},getActivityCount:function(){var e=this.sessions?this.sessions.length:0,t=this.transcodeJobs?this.transcodeJobs.length:0;return e+t},hasHistory:function(){var e=this.model.get("history");return e.length>1},canGoPremium:function(){var e=this.model.get("user");return e.get("canGoPremium")},showOrHidePremiumNotice:function(){this.ui.plexPassBtn.toggleClass("hidden",!this.canGoPremium())},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact(),this.playerDropdown.append(new A.default({
showNowPlaying:!0})),this.navDropdown.append(new I.default({model:this.model})),this.$el.tooltip({selector:'[data-toggle="tooltip"]',container:"body",placement:"bottom"})},onClose:function(){this.unmountReact()},onSignedInChange:function(e,t){this.showOrHidePremiumNotice()},onHistoryChange:function(e,t){this.ui.backBtn.toggleClass("hidden",!this.hasHistory())},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(),y.default.trigger("navigate:back")},onActivityClick:function(e){e.preventDefault(),this.transcodeJobs&&this.transcodeJobs.length?y.default.trigger("navigate","conversion"):this.sessions&&this.sessions.length?y.default.trigger("navigate","nowPlaying"):y.default.trigger("navigate","activity");
},onPlexPassClick:function(e){e.preventDefault(),this.isPlexPassModalOpen=!0,this.mountReact()},onPlexPassModalClose:function(){this.isPlexPassModalOpen=!1,this.mountReact()},onHomeSizeChange:function(){this.showOrHidePremiumNotice()}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1957),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(17),p=a(f),h=n(94),m=a(h),v=n(128),g=a(v),y=u.default.ItemView.extend({
id:"nav-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:r.default,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("invites"),this.image=new m.default({model:this.user,type:"friend",width:34});var e=o.default.debounce(this.updateBadges),t=o.default.debounce(this.onSignedInChange);this.listenTo(this.user,{"change:signedIn":t,"change:username":this.onUsernameChange,"change:home":this.onHomeChange,"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(){var e=this.user.get("announcements").where({read:!1});return e.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",g.default.lockStates.LOCKED)},onUsersClick:function(e){e.preventDefault(),c.default.trigger("navigate","users");
},onSignInClick:function(e){e.preventDefault(),c.default.trigger("navigate","login")},onSignOutClick:function(e){e.preventDefault(),p.default.execute("signOut").done(o.default.bind(function(){c.default.trigger("navigate:refresh:dashboard")},this))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1965),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default,className:"player mini-player"});t.default=l,
e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1966),s=a(r),o=n(11),l=i(o),u=n(294),d=a(u),c=n(345),f=a(c),p=n(346),h=a(p),m=f.default.extend({template:s.default,volumeSettingsKey:"musicPlayerVolume",initialize:function(e){f.default.prototype.initialize.apply(this,arguments),this.controlsView=new h.default({model:this.playerModel,upNextCollection:new d.default(null,{parent:this.playerModel})}),this.addListeners();
},startPlayback:function(e){e||(e={});var t=l.resolve("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),f.default.prototype.onRender.apply(this,arguments)}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(1967),r=a(i),s=n(345),o=a(s),l=n(346),u=a(l),d=n(438),c=a(d),f=o.default.extend({template:r.default,initialize:function(e){e||(e={}),e.playerModelClass=c.default,o.default.prototype.initialize.apply(this,arguments),this.controlsView=new u.default({model:this.playerModel}),this.addListeners()},addListeners:function(){o.default.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),o.default.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,t){o.default.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()},onPosterLoad:function(e){this.playerModel.set("loaded",!0)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1968),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(17),p=a(f),h=n(6),m=a(h),v=n(9),g=a(v),y=n(42),b=a(y),w=n(95),P=a(w),_=n(80),S=a(_),x=n(134),C=a(x),T=n(193),k=a(T),I=c.default.Layout.extend({
className:"photo-player-container",template:r.default,ui:{details:".photo-details",playBtn:".play-btn",pauseBtn:".pause-btn",dropdown:".photo-actions-dropdown",error:".error"},regions:{photo:".photo-details"},events:{"click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","click .play-video-btn":"onPlayClick","hide.bs.dropdown .photo-actions-dropdown":"onDropdownHide"},onlyAfterRender:["onPausedChange"],initialize:function(e){this.playerModel=e.playerModel,this.transition=e.transition,this.mediaActions=new P.default({},{
item:this.model});var t=this.getImageSize();this.imageWidth=t.width,this.imageHeight=t.height;var n;n="photo"===this.model.get("type")?this.model.getMediaKey():this.model.get("thumb"),this.photoImage=new S.default({model:this.model,url:n,width:this.imageWidth,height:this.imageHeight,resetOnError:!0}),this.updateImageSize(t),this.transition&&(this.$el.addClass(this.transition.type),this.transition.direction&&(this.$el.addClass(this.transition.direction),"left"===this.transition.direction?this.$el.css("left",this.windowWidth*-1):this.$el.css("left",this.windowWidth))),
this.listenTo(g.default,"resize",this.onResize),this.listenTo(this.playerModel,{"change:slideshowPaused":this.onPausedChange,"change:errorMessage":this.onErrorMessageChange,"change:showEnterFullscreen":this.onResize}),this.listenTo(this.photoImage,{load:this.onImageLoad,error:this.onImageError}),this.model.get("isLibraryItem")&&this.model.populate()},serializeData:function(){var e=this.collection.availableRange,t=e?e.start:0,n=t+this.collection.indexOf(this.playerModel.get("playQueueItem"))+1,a=this.collection.totalSize||this.collection.length;
return{player:this.playerModel.toJSON(),isVideo:"clip"===this.model.get("type"),index:n,total:a}},getImageSize:function(){return this.windowWidth=(0,u.default)(window).width(),this.windowHeight=(0,u.default)(window).height(),{width:Math.round(.8*this.windowWidth),height:Math.round(.7*this.windowHeight)}},updateImageSize:function(e){this.photoImage.$el.css({"max-width":e.width,"max-height":e.height}),e.width>=this.imageWidth&&e.height>=this.imageHeight&&(this.imageWidth=e.width,this.imageHeight=e.height,
this.photoImage.src=null,this.photoImage.width=this.imageWidth,this.photoImage.height=this.imageHeight,this.photoImage.render())},transitionIn:function(){this.transition&&(this.$el.triggerReflow(),this.$el.removeClass(this.transition.type),this.transition.direction&&this.$el.removeClass(this.transition.direction).css("left",0))},transitionOut:function(e){return e?(this.$el.addClass(e.type),e.direction&&("right"===e.direction?this.$el.addClass("left").css("left",this.windowWidth*-1):this.$el.addClass("right").css("left",this.windowWidth)),
void o.default.delay(o.default.bind(this.close,this),1e3)):void this.close()},bindings:{".photo-title":{modelAttribute:"title"},".photo-summary":{modelAttribute:"summary",autohide:!0},".edit-btn":{model:"mediaActions",modelAttribute:"showEdit",manual:!0,autohide:!0},".more-btn":{model:"mediaActions",modelAttribute:"showListDropdown",manual:!0,autohide:!0},".minimize-btn":{model:"playerModel",modelAttribute:"showMinimize",manual:!0,autohide:!0},".enter-fullscreen-btn":{model:"playerModel",modelAttribute:"showEnterFullscreen",
manual:!0,autohide:!0},".exit-fullscreen-btn":{model:"playerModel",modelAttribute:"showExitFullscreen",manual:!0,autohide:!0}},onRender:function(){this.photo.prepend(this.photoImage)},onImageLoad:function(e){this.model===this.playerModel.get("metadataItem")&&this.playerModel.set("loaded",!0)},onImageError:function(){this.model===this.playerModel.get("metadataItem")&&this.playerModel.set({state:b.default.states.ERROR,errorMessage:(0,m.default)("There was a problem loading '{1}'",this.model.get("title"))
})},onPausedChange:function(e,t){this.ui.playBtn.toggleClass("hidden",!t),this.ui.pauseBtn.toggleClass("hidden",t)},onErrorMessageChange:function(e,t){this.model===this.playerModel.get("metadataItem")&&t&&(this.ui.error.text(t),this.ui.error.removeClass("hidden"),this.ui.details.addClass("hidden"))},onResize:function(){var e=this.getImageSize();this.updateImageSize(e)},onEditClick:function(e){e.preventDefault(),g.default.trigger("show:modal",new C.default({mediaActions:this.mediaActions}))},onMoreClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new k.default({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.ui.details.addClass("force-hover")},onPlayClick:function(e){e.preventDefault(),p.default.execute("playMedia",{item:this.model})},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.ui.details.removeClass("force-hover"))}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1969),r=a(i),s=n(3),o=a(s),l=n(438),u=a(l),d=n(344),c=a(d),f=n(1348),p=a(f),h=c.default.extend({className:"photo-player dark-scrollbar",template:r.default,defaultTransition:{type:"fade"},ui:{loading:".loading",previousBtn:".previous-btn",nextBtn:".next-btn"},regions:{details:".photo-player-container"},events:o.default.extend({"click .player-close-btn":"onCloseClick","click .play-btn":"onPlayClick","click .pause-btn":"onPauseClick",
"click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick","click .minimize-btn":"onMinimizeClick","click .enter-fullscreen-btn":"onEnterFullscreenClick","click .exit-fullscreen-btn":"onExitFullscreenClick"},c.default.prototype.events),collectionEvents:{destroy:"onItemDestroy"},onlyAfterRender:["onPlayerCanSkipPreviousChange","onPlayerCanSkipNextChange"],initialize:function(e){e||(e={}),e.playerModelClass=u.default,c.default.prototype.initialize.call(this,e),this.addListeners()},addListeners:function(){
c.default.prototype.addListeners.apply(this,arguments),this.listenTo(this.playerModel,{"change:loaded":this.onPlayerLoadedChange,"change:error":this.onPlayerErrorChange,"change:canSkipPrevious":this.onPlayerCanSkipPreviousChange,"change:canSkipNext":this.onPlayerCanSkipNextChange})},startPlayback:function(){var e=this.controller.load({model:this.playerModel,autoplay:this.autoplay});return this.transition(),e},continuePlayback:function(){this.playerModel.set("loaded",!1),this.transition()},transition:function(e){
e||(e=this.defaultTransition),this.nextDetails=new p.default({model:this.metadataItem,collection:this.playQueue.get("collection"),playerModel:this.playerModel,transition:e}),this.ui.loading.removeClass("hidden"),this.$el.addClass("show-photo-loading"),this.$el.append(this.nextDetails.render().el),this.currentTransition=this.defaultTransition},skipPrevious:function(){this.currentTransition={type:"slide",direction:"left"},this.controller.skipPrevious()},skipNext:function(){this.currentTransition={type:"slide",
direction:"right"},this.controller.skipNext()},transitionToNewImage:function(){this.ui.loading.addClass("hidden"),this.$el.removeClass("show-photo-loading"),this.nextDetails.transitionIn(),this.currentDetails&&this.currentDetails.transitionOut(this.nextDetails.transition),this.currentDetails=this.nextDetails},onClose:function(){c.default.prototype.onClose.apply(this,arguments),this.currentDetails&&this.currentDetails.close(),this.nextDetails&&this.nextDetails.close()},onPlayerPlayQueueItemChange:function(e,t){
this.model=t,this.metadataItem=t.get("metadataItem"),this.transition(this.currentTransition),this.updatePageTitle()},onPlayerLoadedChange:function(e,t){t&&this.transitionToNewImage()},onPlayerErrorChange:function(e,t){t&&this.transitionToNewImage()},onPlayerCanSkipPreviousChange:function(e,t){this.ui.previousBtn.toggleClass("hidden",!t)},onPlayerCanSkipNextChange:function(e,t){this.ui.nextBtn.toggleClass("hidden",!t)},onItemDestroy:function(e){this.playerModel.get("playQueueItem")===e&&(this.playQueue.get("collection").length?this.skipNext():this.stop());
},onCloseClick:function(e){e.preventDefault(),this.stop()},onPlayClick:function(e){e.preventDefault(),this.controller.play()},onPauseClick:function(e){e.preventDefault(),this.controller.pause()},onPreviousClick:function(e){e.preventDefault(),this.skipPrevious()},onNextClick:function(e){e.preventDefault(),this.skipNext()},onMinimizeClick:function(e){e.preventDefault(),this.minimize()},onEnterFullscreenClick:function(e){e.preventDefault(),this.enterFullscreen()},onExitFullscreenClick:function(e){e.preventDefault(),
this.exitFullscreen()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1970),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(743),c=a(d),f=n(80),p=a(f),h=n(51),m=a(h),v=n(328),g=a(v);n(411);var y=u.default.Layout.extend({mixins:c.default,className:"video-post-play",template:r.default,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 m.default({model:this.previousMetadataItem,modelAttribute:n,
type:this.previousMetadataItem.get("type"),height:140}),this.nextPoster=new m.default({model:this.nextMetadataItem,modelAttribute:n,type:this.nextMetadataItem.get("type"),height:190}),this.backgroundImage=new p.default({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 g.default({
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(o.default.bind(this.updateCountdown,this),1e3))},onClose:function(){
c.default.onClose.apply(this,arguments),clearInterval(this.idleTimer)}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1971),r=a(i),s=n(294),o=a(s),l=n(345),u=a(l),d=n(346),c=a(d),f=u.default.extend({template:r.default,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.controlsView=new c.default({model:this.playerModel,upNextCollection:new o.default(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),u.default.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,t){u.default.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()}});t.default=f,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1972),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(11),f=i(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(58),y=a(g),b=n(62),w=a(b),P=n(117),_=a(P),S=n(42),x=a(S),C=n(325),T=a(C),k=n(17),I=a(k),M=n(344),A=a(M),E=n(37),O=a(E),D=n(1314),R=a(D),L=n(1355),N=a(L),j=n(1350),U=a(j),F=A.default.extend({className:"video-player dark-scrollbar buffering",template:s.default,volumeSettingsKey:"videoPlayerVolume",
controlsDelay:y.default.hasTouchScreen?4e3:2e3,ui:{container:".video-container"},regions:{controls:".video-controls-container",postPlay:".video-post-play-container"},events:l.default.extend({"click .player-close-btn":"onCloseClick",mousemove:"onMouseMove"},A.default.prototype.events),postPlayDuration:10,awakeTime:72e5,maximumDurationForAutoadvance:12e5,minimumDurationForPostPlay:3e5,initialize:function(e){this.playQueue=e.playQueue,A.default.prototype.initialize.apply(this,arguments),this.controlsView=new N.default({
model:this.playerModel}),I.default.execute("playBackgroundMedia"),this.startSleepProtection(),this.addListeners()},addListeners:function(){A.default.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(l.default.extend({},e,{silent:!0}));var t=d.default.Deferred(),n=this.resolveOffset(e);
return n.done(this.whenRendered(function(n){this.load(l.default.extend({},e,{offset:n,silent:!1})).done(l.default.bind(t.resolve,t)).fail(l.default.bind(t.reject,t))})),n.fail(l.default.bind(this.stop,this)).fail(l.default.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=d.default.Deferred(),n=e.offset||this.offset;if(l.default.isNumber(n))return t.resolve(n).promise();var a=this.metadataItem.get("viewOffset");if(!a)return t.resolve(0).promise();var i=new R.default({offset:a}),r=i.promise;return r.done(function(e){t.resolve(e)}),r.fail(function(){t.reject()}),v.default.trigger("show:modal",i),t.promise()},load:function(e){var t=f.resolve("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,n=d.default.Deferred().resolve().promise(),a=f.resolve("appModel"),i=!a.get("primaryPlayer");if(this.metadataItem&&i&&(e=this.metadataItem.server.get("playQueueManager"),t=e.getFor(this.metadataItem)),t&&t.get("hasUserAdditions")){var r=new O.default({title:(0,h.default)("Finish Watching Queue"),message:(0,h.default)("This will clear the contents of your play queue.")});n=r.promise,v.default.trigger("show:modal",r);
}return n.then(function(){v.default.trigger("hide:player")}),n},canAutoplay:function(e){return!w.default.mobile&&(null==e||e!==x.default.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(l.default.bind(this.onSleep,this),this.awakeTime))},onRender:function(){this.controls.show(this.controlsView),A.default.prototype.onRender.apply(this,arguments);
},onClose:function(){A.default.prototype.onClose.apply(this,arguments),this.controlsTimeout=clearTimeout(this.controlsTimeout),this.sleepTimeout=clearTimeout(this.sleepTimeout),this.controller.model&&!this.isContinuing&&_.default.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){A.default.prototype.onPlayerStateChange.apply(this,arguments),
this.controller.companion||(t===x.default.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,a=this.metadataItem.get("extraType")===T.default.get("trailer").id;if(this.model===this.playQueue.get("collection").last())this.model.server.get("playQueueManager").remove("video"),v.default.trigger("hide:player");else if(n||a)this.controller.skipNext();else{this.hideVideo();var i={model:this.model,collection:this.playQueue.get("collection")},r=this.metadataItem.get("duration")<this.maximumDurationForAutoadvance;
(!this.isPotentiallyAsleep||this.isDefinitelyAwake||r)&&(i.countdown=this.postPlayDuration);var s=new U.default(i);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.default=F,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(528),r=a(i),s=r.default.extend({
className:"video-player-alert alert alert-sm transition-in",alertDuration:5e3});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1976),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(484),c=a(d),f=n(182),p=a(f),h=n(112),m=a(h),v=n(80),g=a(v),y=u.default.ItemView.extend({className:"player-scrub-preview",template:r.default,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=o.default.throttle(this.whenRendered(this.showThumbnail),200),this.thumbnailImage=new g.default({model:this.model.get("metadataItem"),width:this.thumbnailWidth,height:p.default.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((0,m.default)(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(0,c.default)(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.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1977),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(6),v=a(m),g=n(62),y=a(g),b=n(9),w=a(b),P=n(58),_=a(P),S=n(112),x=a(S),C=n(35),T=a(C),k=n(294),I=a(k),M=n(80),A=a(M),E=n(51),O=a(E),D=n(916),R=a(D),L=n(918),N=a(L),j=n(553),U=a(j),F=n(252),B=a(F),z=n(1357),$=a(z),V=n(1358),H=a(V),q=n(1356),W=a(q),K=n(1354),Q=a(K),Y=n(1353),G=a(Y),X=n(529),J=a(X),Z=n(199),ee=a(Z),te=n(198),ne=a(te),ae=f.default.Layout.extend({
className:"video-controls transition-out",template:s.default,visible:!1,muted:!1,mutedVolume:0,ui:{video:"#html-video",poster:".media-poster",background:".video-background",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"},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(){l.default.bindAll(this,"onMobileVideoClose"),this.bindAllWhenRendered("transitionIn","transitionOut"),this.metadataItem=this.model.get("metadataItem"),this.upNextCollection=new I.default(null,{parent:this.model}),this.posterImage=new O.default({model:this.metadataItem,type:"movie",getUrl:this.getPosterUrl,
width:100}),this.backgroundImage=new A.default({server:this.metadataItem.server,width:1280,height:720}),this.seekBarView=new U.default({model:this.model}),this.playQueueDropdownView=new J.default({model:this.model,collection:this.upNextCollection}),this.volumeSlider=new B.default({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.playQueueDropdownView,"itemview:skip",this.onSkip),this.listenTo(this.playQueueDropdownView,"itemview:remove",this.onRemove),this.listenTo(this.playQueueDropdownView,"move",this.onMove)},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=(0,d.default)(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(l.default.bind(this.onErrorSkipInterval,this),1e3)},updateErrorSkipMessage:function(e){this.ui.errorSkipMessage.text((0,v.default)("Skipping in {1} seconds...",e));
},bindings:{".video-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e){return e.get("title")}},".video-background":{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 a=l.default.bind(function(e){this.currentArt=n,this.currentArtSrc=e,t.css("background-image","url("+e+")"),t.removeClass("transition-out");
},this);this.currentArt===n?a(this.currentArtSrc):this.backgroundImage.load(n,!0).done(a)}},".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(0,x.default)(e)}},".player-duration":{modelAttribute:"duration",formatter:function(e){
return(0,x.default)(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=h.resolve("appModel"),n=t.get("user"),a=l.default.contains(["clip","userPlaylistItem"],e.get("type"));
return e.get("url")&&n.get("signedIn")&&a}},".primary-player-name":{modelAttribute:"friendlyName",autohide:!0,formatter:function(e){if(e)return(0,v.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 Q.default({model:this.model})),this.qualityDropdown.append(new $.default({model:this.model}),this.ui.dropdowns),this.audioDropdown.append(new H.default({model:this.model,type:"audio"}),this.ui.dropdowns),this.subtitlesDropdown.append(new H.default({model:this.model,type:"subtitles"}),this.ui.dropdowns),this.playerDropdown.append(new W.default,this.ui.dropdowns),this.imageOverlaysRegion.show(new N.default({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){t?this.subtitles.show(new R.default({model:e,subtitleSize:T.default.get("subtitleSize"),rendererOptions:{enableSvg:"safari"!==y.default.id}})):this.subtitles.close()},onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onErrorMessageChange:function(e,t){var n=h.resolve("appModel"),a=n.has("primaryPlayer");if(this.ui.errorMessage.text(t),
this.ui.errorSkipMessage.text(""),t&&!a){var i=e.get("playQueue").get("collection");if(i.length>1){var r=e.get("playQueueItem"),s=i.at(i.length-1);r.id!==s.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 G.default({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)},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){w.default.trigger("hide:player")},onOverlayClick:function(e){e.preventDefault();var t=this.model.get("playing"),n=t?"pause":"play";return"pause"===n&&_.default.hasTouchScreen&&!this.visible?void this.trigger("toggleControls",{autohide:!0}):void this.trigger(n)},onShareClick:function(e){e.preventDefault(),w.default.trigger("show:modal",new ee.default({model:this.metadataItem}))},onRecommendClick:function(e){
e.preventDefault(),w.default.trigger("show:modal",new ne.default({model:this.metadataItem}))},onErrorMessageClick:function(e){e.preventDefault(),this.errorSkipInterval?this.trigger("next"):w.default.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.default=ae,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1978),r=a(i),s=n(530),o=a(s),l=o.default.extend({
id:"player-primary-player-dropdown",tagName:"span",className:"dropdown",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1979),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(85),p=a(f),h=n(35),m=a(h),v=n(230),g=a(v),y=c.default.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:r.default,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"),n=p.default.getAvailableQualitiesFor(t,e);if(!n.length||!this.model.get("canSetQuality"))return void this.model.set("showQuality",!1);this.model.set("showQuality",!0);var a=this.model.get("qualityIndex"),i=o.default.findWhere(n,{index:a}),r=e.get("maxUploadBitrate"),s=(0,g.default)(t),l=!(!s||!s.bitrate),u=!r||l&&r>s.bitrate;return i&&(i.selected=!0),
{availableQualities:n.reverse(),hasSelectedQuality:!!i,includeOriginal:u}},onQualityClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget);if(!t.hasClass("selected")){var n=p.default.getQualityAttribute(this.model.get("metadataItem")),a=parseInt(t.data("index"),10);m.default.save(n,a),this.model.set("qualityIndex",a)}}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1980),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(92),v=a(m),g=n(312),y=a(g),b=n(73),w=a(b),P=n(17),_=a(P),S=f.default.ItemView.extend({
id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:s.default,modelEvents:{"change:media":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=w.default.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 n=(0,v.default)(e,{streamType:this.streamType.id});if(n.length<2)return this.model.set(this.visibilityAttr,!1),{type:t};this.model.set(this.visibilityAttr,!0);
var a,i=(0,v.default)(e,{streamType:this.streamType.id,selected:!0});return i.length&&(a=i[0]),{type:t,streams:n,selectedStream:a}},onStreamClick:function(e){e.preventDefault();var t=h.resolve("appModel"),n=(0,d.default)(e.currentTarget),a=n.data("id");if(t.has("primaryPlayer"))(0,y.default)(this.model.get("media"),this.streamType,a),this.model.set(this.streamType.key,a);else{var i=_.default.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),
streamType:this.streamType,streamID:a});i.done(l.default.bind(function(){this.model.set(this.streamType.key,a)},this))}}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1749),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({initialize:function(e){this.reason=e.reason},template:r.default,className:"lyrics-error",serializeData:function(){return{reason:this.reason}}});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1750),r=a(i),s=n(10),o=a(s),l=n(1363),u=a(l),d=o.default.CollectionView.extend({initialize:function(){this.collection=this.model.get("spans")},template:r.default,className:function(){return["lyrics-line",0===this.model.get("spans").length?"lyrics-line-blank":""].join(" ")},itemView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1541).default,i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1751),s=i(r),o=n(3),l=n(10),u=i(l),d=n(1360),c=i(d),f=n(470),p=i(f);n(679);var h=u.default.CollectionView.extend(a([{key:"initialize",value:function(){this.listenTo(this.collection.parent,"change:follow",this.onFollowChange)}},{key:"template",initializer:function(){return s.default}},{key:"className",initializer:function(){return"lyrics-lines dropup-scrollbar"}},{key:"itemView",initializer:function(){return c.default}},{key:"modelEvents",initializer:function(){return{"change:position":"onPositionChange"
}}},{key:"onlyAfterRender",initializer:function(){return["onPositionChange"]}},{key:"activateSpansAtPosition",value:function(e){if(this.collection.parent.get("timed")){var t=void 0,n=this.shouldFollow();this.collection.eachSpan(function(a){var i=a.isPositionWithin(e);i&&!a.get("active")&&(t=a),a.set("active",n&&i)}),n&&this.scrollToSpan(t)}}},{key:"scrollToSpan",value:function(e){if(e){var t=this.children.findByModel(e.parent);t&&t.$el.scrollIntoView({center:!0})}}},{key:"scrollToActive",value:function(){
if(this.shouldFollow()){var e=void 0;this.collection.eachSpan(function(t){t.get("active")&&(e=t)}),this.scrollToSpan(e)}}},{key:"shouldFollow",value:function(){var e=this.collection.parent;return e.get("timed")&&e.get("follow")}},{key:"onRender",value:function(){this.activateSpansAtPosition(this.model.get("position")),(0,o.defer)((0,o.bind)(this.scrollToActive,this))}},{key:"onPositionChange",decorators:[(0,p.default)(200)],value:function(e,t){this.activateSpansAtPosition(t)}},{key:"onFollowChange",
value:function(e,t){t&&this.scrollToActive()}}]));t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1752),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default,className:"lyrics-loading"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1753),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default,
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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1754),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({template:r.default,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.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1755),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=n(1364),p=a(f),h=n(1361),m=a(h),v=n(1359),g=a(v),y=n(1362),b=a(y),w=u.default.Layout.extend({template:r.default,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=o.default.Deferred(),n=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection;n&&this.stopListening(n);var a=this.getLyricsStreams();if(!a)return t.reject((0,c.default)("No lyrics available.")).promise();var i=a.findWhere({selected:!0})||a.first();return this.populatingLyricsStream&&this.populatingLyricsStream!==i&&this.populatingLyricsStream.abortPendingPopulate(),
i.populate().always(function(){i.set("selected",!0),e.listenTo(a,"change:selected",e.onLyricsSelectedChange)}).fail(function(){t.reject((0,c.default)("An error occurred loading these lyrics."))}).then(function(){return t.resolve(i)}),this.populatingLyricsStream=i,t.promise()},renderLyrics:function(){var e=this,t=this.getLyricsStreams(),n=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection,a=t!==n,i=this.populateLyricsStream();"pending"===i.state()&&this.renderLyricsLoading(),
i.done(function(t){e.renderLyricsLines(t)}),i.fail(function(t){e.renderLyricsError(t)}),a&&i.always(function(){var t=e.getLyricsStreams();t?e.streamsRegion.show(new p.default({model:e.model,collection:e.getLyricsStreams()})):e.streamsRegion.close()})},renderLyricsLines:function(e){var t=new m.default({model:this.model,collection:e.get("lines")});this.lyricsRegion.show(t),t.scrollToActive()},renderLyricsError:function(e){this.lyricsRegion.show(new g.default({reason:e}))},renderLyricsLoading:function(){
this.lyricsRegion.show(new b.default)},onRender:function(){this.renderLyrics()},onLyricsSelectedChange:function(e,t){t&&this.renderLyrics()},onItemChange:function(){this.close()}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),r=a(i),s=n(1367),o=a(s),l=r.default.extend({tagName:"ul",className:"tile-list media-tile-list playlist-tile-list",itemView:o.default,modelEvents:{"change:currentSort":"onListRefresh",
"change:currentType":"onListRefresh"},onListRefresh:function(){var e=this.model.get("items");e.get("playlists").reset(),e.fetch({scope:"page"})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1981),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=n(178),g=a(v),y=n(17),b=a(y),w=n(249),P=a(w),_=n(193),S=a(_),x=n(545),C=a(x),T=c.default.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item playlist-tile-list-item playlist",
template:r.default,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?(0,g.default)(e):1===this.model.get("leafCount")?(0,
p.default)("1 Item"):(0,p.default)("{1} Items",this.model.get("leafCount"))}}},initialize:function(){o.default.bindAll(this,"onResize"),this.compositeImage=new P.default({model:this.model,width:150}),m.default.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(),m.default.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),b.default.execute("playMedia",{item:this.model})},onEditClick:function(e){e.preventDefault(),m.default.trigger("show:modal",new C.default({model:this.model}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new S.default({model:this.model
}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=(0,u.default)(e.currentTarget),n=this.ui.actions.position().top,a=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(a)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"))}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(1982),r=a(i),s=n(10),o=a(s),l=n(9),u=a(l),d=n(1154),c=a(d),f=n(1169),p=a(f),h=n(1366),m=a(h),v=o.default.Layout.extend({className:"section-container",template:r.default,regions:{list:".playlists-container"},initialize:function(){u.default.trigger("show:bar","actionbar",new c.default({model:this.model})),u.default.trigger("show:bar","breadcrumbbar",new p.default({model:this.model}))},onRender:function(){this.list.append(new m.default({model:this.model,collection:this.model.get("items").get("playlists")
}),this.$el)},onClose:function(){u.default.trigger("hide:bar","actionbar"),u.default.trigger("hide:bar","breadcrumbbar")}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1983),r=a(i),s=n(10),o=a(s),l=n(177),u=a(l),d=n(9),c=a(d),f=n(35),p=a(f),h=n(540),m=a(h),v=n(538),g=a(v),y=n(539),b=a(y),w=n(135),P=a(w),_=o.default.Layout.extend({className:"section-list-container",template:r.default,ui:{loading:".section-loading-container",
emptyMessageContainer:".empty-message"},regions:{list:"ul"},modelEvents:{"change:selecting":"onSelectingChange","change:currentType":"onCurrentTypeChange","change:currentFilters":"onListRefresh","change:currentSort":"onListRefresh","change:currentFirstCharacter":"onCurrentFirstCharacterChange","socket:timeline":"onTimeline","change:refreshing":"showEmptyMessage"},events:{"click .add-to-library-link":"onAddToLibraryLinkClick"},onlyAfterRender:["showLoading","hideLoading","showEmptyMessage"],initialize:function(e){
this.listenTo(p.default.getInstance(),"change:listType",this.onListTypeChange),this.listModel=e.listModel,this.mediaActions=e.mediaActions,this.listenTo(this.listModel,"change:totalSize",this.showEmptyMessage),this.fetchTotalSize()},serializeData:function(){return{canEdit:this.model.server.get("isFullOwnedServer")}},fetchTotalSize:function(){var e=this.list.currentView;e&&(e.isRefreshing=!0),this.listModel.abortPendingPopulate(),this.listModel.resetPopulatePromise(null),this.listModel.set({currentPageStart:null,
currentPageSize:null}),this.listModel.getCollection().reset(),this.listModel.fetchRange({start:0,size:0,scope:"page"}).done(this.whenRendered(function(){this.list.currentView&&(this.list.currentView.isRefreshing=!1,this.list.currentView.onCollectionReset(this.listModel.get("metadataItems"))),this.showEmptyMessage()}))},showLoading:function(e){e||(e={});var t=this.list.currentView,n=t.itemsPerPage,a=this.listModel.getTotalSize();this.ui.loading.toggleClass("has-scrollbar",a>n),this.ui.loading.toggleClass("bottom",!e.prepend),
this.ui.loading.removeClass("hidden")},hideLoading:function(){this.ui.loading.addClass("hidden")},showEmptyMessage:function(){this.ui.emptyMessageContainer.removeClass("folder filter refreshing default");var e=this.listModel.getTotalSize(),t=this.list.currentView;if(!(0!==e||t&&t.isRefreshing)){var n=this.model.get("currentSubset"),a=this.model.get("currentFilters");n&&"folder"===n.id?this.ui.emptyMessageContainer.addClass("folder"):n&&"all"!==n.id?this.ui.emptyMessageContainer.addClass("filter"):a&&a.length?this.ui.emptyMessageContainer.addClass("filter"):this.model.get("refreshing")?this.ui.emptyMessageContainer.addClass("refreshing"):this.ui.emptyMessageContainer.addClass("default");
}},getListConstructor:function(){var e=p.default.getInstance().getSectionListType(this.model);switch(e){case"media-details-list":return g.default;case"media-list":return b.default;default:return m.default}},onRender:function(){var e=this.getListConstructor();if(e){var t=new e({listModel:this.listModel,collection:this.listModel.get("metadataItems"),paginated:this.model.server.get("isFullServer"),mediaActions:this.mediaActions});this.list.append(t,this.$el),this.listenTo(this.list.currentView,{"change:loading":this.onLoadingChange
})}},onClose:function(){this.listModel.getCollection().reset()},onSelectingChange:function(e,t){this.$el.toggleClass("hide-actions",t)},onCurrentTypeChange:function(){this.onListRefresh();var e=p.default.getInstance().getSectionListType(this.model),t=p.default.getInstance().getSectionListType(this.model,this.model.previous("currentType"));e!==t&&this.render()},onListRefresh:function(){this.listModel.scrollPosition=0,this.fetchTotalSize(),this.showLoading()},onListTypeChange:function(e,t){this.list.currentView.scrollPosition=0,
this.listModel.get("populatedRange").start>0&&this.fetchTotalSize(),this.render()},onCurrentFirstCharacterChange:function(e,t){for(var n=e.get("firstCharacters"),a=0,i=0,r=n.length;i<r;i++){var s=n.at(i);if(t.id===s.id)break;a+=s.get("size")}this.list.currentView.scrollToIndex(a)},onTimeline:function(e){if(e.state===u.default.CREATED||e.state===u.default.DELETED){var t=this.model.get("currentSubset"),n=this.model.get("currentType");"folder"!==t.id&&e.type!==n.id||this.list.currentView.merge()}},onLoadingChange:function(e,t){
e?this.showLoading(t):this.hideLoading()},onAddToLibraryLinkClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new P.default({server:this.model.server,model:this.model,selectedPane:"folders"}))}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1984),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(9),f=a(c),p=n(11),h=i(p),m=n(154),v=i(m),g=n(95),y=a(g),b=n(768),w=a(b),P=n(769),_=a(P),S=n(1155),x=a(S),C=n(1170),T=a(C),k=n(1166),I=a(k),M=n(1369),A=a(M),E=d.default.Layout.extend({
className:"section-container",template:s.default,regions:{list:".section-list-container"},modelEvents:{"default:currentSort":"toggleAlphaBar","change:currentType":"toggleAlphaBar","change:currentSort":"toggleAlphaBar","change:currentSubset":"onCurrentSubsetChange"},initialize:function(e){h.resolve("appModel").get("primaryServer")===this.model.server&&h.resolve("appStore").dispatch(v.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),sectionID:this.model.id})),this.initViewState(e).always(l.default.bind(function(){
this.model.set("currentFolderKey",e.folderKey),f.default.trigger("show:bar","actionbar",new x.default({model:this.model,mediaActions:this.mediaActions})),f.default.trigger("show:bar","breadcrumbbar",new T.default({model:this.model})),this.toggleAlphaBar()},this))},initViewState:function(e){this.viewState=new w.default({},l.default.extend({storage:new _.default({},{section:this.model}),section:this.model,filters:this.model.get("currentFilters")},e));var t=this.model.get("currentSort");t&&t.set("selected",!1);
var n=this.viewState.fetch();return n.done(l.default.bind(function(){var e=this.viewState.getSectionAttrs();this.model.set(e),this.model.get("currentType").set("selected",!0),this.model.get("currentSubset").set("selected",!0);var t=this.model.get("currentSort");t&&t.set("selected",!0),this.viewState.addListeners()},this)),n.always(l.default.bind(function(){this.mediaActions=new y.default({},{section:this.model,showAdvanced:!0})},this)),n.always(this.whenRendered(function(){var e=new A.default({model:this.model,
listModel:this.model.get("items"),mediaActions:this.mediaActions});this.list.append(e,this.$el)})),n},toggleAlphaBar:function(){this.supportsAlphaPagination()?f.default.trigger("show:bar","alphabar",new I.default({model:this.model,collection:this.model.get("firstCharacters")})):f.default.trigger("hide:bar","alphabar")},supportsAlphaPagination:function(){if(!this.model.get("allowAdvancedFilters")||"all"!==this.model.get("currentSubset").get("key"))return!1;var e=this.model.get("currentType"),t=this.model.get("currentSort");
if(!t){var n=/^(season|episode|album|track)$/;return!n.test(e.get("typeString"))}var a=t.get("key"),i=t.get("direction");return"titleSort"===a&&"asc"===i},onCurrentSubsetChange:function(e,t){var n=e.previous("currentSubset"),a=n&&n.id,i=t&&t.id;a!==i&&(this.model.get("items").scrollPosition=0)},onClose:function(){f.default.trigger("hide:bar","actionbar"),f.default.trigger("hide:bar","breadcrumbbar"),f.default.trigger("hide:bar","alphabar"),h.resolve("appModel").get("primaryServer")===this.model.server&&h.resolve("appStore").dispatch(v.changeQuickSearchSettings({
serverEntityID:this.model.server.entityID(),sectionID:null})),this.viewState.removeListeners()}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";function a(e){return f.default.map(e,function(e){return'<option value="'+e.value+'"'+(e.selected?" selected":"")+">"+e.label+"</option>"}).join("\n")}function i(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){if(!e)return[];var n=e.get("languages"),a=n.map(function(e){
return{label:e.get("name"),value:e.id,selected:e.id===t}});return a}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(1991),l=s(o),u=n(10),d=s(u),c=n(3),f=s(c),p=n(242),h=s(p),m=n(524),v=s(m),g=d.default.ItemView.extend({template:l.default,ui:{agentSelect:"#match-search-agent",languageSelect:"#match-search-language"},events:{"change #match-search-agent":"onAgentSelectChange"},onlyAfterRender:["updateAgents","updateLanguages"],initialize:function(){var e=this.model.section.get("agent"),t=this.setupAgents(e);
t.then(f.default.bind(this.updateAgents,this,e)),t.then(f.default.bind(this.updateLanguages,this,e))},serializeData:function(){var e=this.model.section.get("agent"),t=this.model.agentsProxy.findWhere({identifier:e}),n={item:this.model.toJSON(),agents:i(this.model.agentsProxy,e),languages:r(t)};return n},setupAgents:function(e){if(this.model.agentsPromise)return this.model.agentsPromise;var t=this.model.section.getSectionType(),n=new h.default([],{server:this.model.server,mediaTypeID:t.typeID}),a=t.exclusiveAgents,i=new v.default(n,a,e);
return this.model.agents=n,this.model.agentsProxy=i,this.model.agentsPromise=this.model.agents.populate({reset:!0,cancelable:!0}),this.model.agentsPromise},updateAgents:function(e){this.ui.agentSelect.html(a(i(this.model.agentsProxy,e)))},updateLanguages:function(e){var t=this.model.agentsProxy.findWhere({identifier:e});if(!e)return void this.ui.languageSelect.empty();var n=this.model.section.get("language");this.ui.languageSelect.html(a(r(t,n)))},onAgentSelectChange:function(e){this.updateLanguages(e.currentTarget.value);
},onModalClose:function(){this.model.agents=null,this.model.agentsProxy=null,this.model.agentsPromise=null}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1992),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(519),c=a(d),f=n(1252),p=a(f),h=u.default.Layout.extend({template:r.default,regions:{resultRegion:".result-region"},onlyAfterRender:["updateResults"],initialize:function(){this.setupResults();var e=this.model.section,t={
manual:1},n={reset:!0,timeout:0,data:t};/com\.plexapp\.agents\.none\:\/\//.test(this.model.get("guid"))&&o.default.extend(n,{data:o.default.extend(t,{agent:e.get("agent"),language:e.get("language")}),processData:!0}),this.model.results.populate(n).then(o.default.bind(this.updateResults,this))},setupResults:function(){if(!this.model.results){var e=this.model.results||new c.default([],{server:this.model.server,parent:this.model});this.model.results=e}},updateResults:function(){this.resultRegion.show(new p.default({
collection:this.model.results,itemViewOptions:{item:this.model}}))},onModalClose:function(){this.model.results=null}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1993),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(1287),p=a(f),h=c.default.Layout.extend({className:"devices-container row",template:r.default,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"]},{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){var t=o.default.sortBy(e,function(e){return"all"===e.id?"":e.title.toLowerCase()});return t},getFilteredDeviceTypes:function(){var e=this.deviceTypes.filter(function(e){return"all"===e.id||o.default.intersection(this.products,e.ids).length>0},this);return this.sortDeviceTypes(e);
},addOtherIds:function(){var e=o.default.flatten(o.default.map(this.deviceTypes,function(e){return e.ids})),t=o.default.difference(this.products,e),n=o.default.find(this.deviceTypes,function(e){return"other"===e.id});o.default.each(t,function(e){n.ids.push(e)})},onRender:function(){this.list.show(new p.default({collection:this.collection}))},onDeviceTypeClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("id"),a=this.collection;if(this.ui.filters.removeClass("selected"),
t.addClass("selected"),"all"!==n){var i=o.default.findWhere(this.deviceTypes,{id:n});a=this.collection.filterByProducts(i.ids)}this.list.show(new p.default({collection:a}))}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1995),s=a(r),o=n(11),l=i(o),u=n(554),d=a(u),c=n(544),f=a(c),p=n(1293),h=a(p),m=d.default.extend({template:s.default,initialize:function(){var e=l.resolve("appModel"),t=e.get("user");
this.collection=t.get("homeUsers"),this.invites=t.get("invites").filterByHome(),this.sentInvites=t.get("sentInvites").filterByHome(),this.signedInHomeUser=this.collection.get(t.id),this.itemViewOptions={isAdmin:!(!this.signedInHomeUser||!this.signedInHomeUser.get("admin"))},this.addListeners()},addListeners:function(){d.default.prototype.addListeners.apply(this,arguments),this.signedInHomeUser&&this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange)},onRender:function(){this.friendList.show(new h.default({
collection:this.collection,itemViewOptions:this.itemViewOptions})),this.inviteList.show(new f.default({collection:this.invites})),this.pendingList.show(new f.default({collection:this.sentInvites})),this.updateHeaders()},onAdminChange:function(e,t){this.friendList.currentView&&(this.itemViewOptions.isAdmin=t)}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1996),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(9),h=a(p),m=n(1377),v=a(m),g=n(1389),y=a(g),b=n(1376),w=a(b),P=n(1373),_=a(P),S={
web:v.default,server:y.default,users:w.default,devices:_.default},x=d.default.Layout.extend({className:"container",template:s.default,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=f.resolve("appModel"),n=t.get("user"),a=n.get("invites");
this.subsets={users:a},this.listenTo(n,"change:signedIn",this.onSignedInChange),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(a,"reset add remove",this.onInvitesChange),this.listenTo(h.default,"change:language",this.render)},serializeData:function(){var e=f.resolve("appModel"),t=e.get("user"),n=e.get("primaryServer");return{subset:this.subset,signedIn:t.get("signedIn"),hasPrimaryServer:n&&!n.get("shared")}},updateBadges:function(){var e={users:this.subsets.users.length
};l.default.each(l.default.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=S[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.default=x,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1997),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(6),v=a(m),g=n(9),y=a(g),b=n(26),w=a(b),P=n(17),_=a(P),S=n(1374),x=a(S),C=n(554),T=a(C),k=n(155),I=a(k),M=n(200),A=a(M),E={home:x.default,friends:T.default},O=f.default.Layout.extend({className:"users-container",template:s.default,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=h.resolve("appModel");this.subset=e.usersSubset,this.user=t.get("user"),this.home=this.user.get("homeUsers"),
this.invites=this.user.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&&y.default.trigger("show:modal",new A.default({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=E[this.subset];t?this.container.append(new t):w.default.warn("Invalid subset: "+this.subset)},updateBadges:function(){var e={home:this.proxies.home.length,friends:this.proxies.friends.length};l.default.each(l.default.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(),_.default.execute("toggleGuest",{user:this.user,enable:t})},onRender:function(){this.showSubset(),this.updateBadges()},onClose:function(){
l.default.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=(0,d.default)(e.currentTarget);t.hasClass("selected")||(this.ui.navLinks.removeClass("selected"),t.addClass("selected"),this.showSubset(l.default.last(e.currentTarget.href.split("/"))),y.default.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?y.default.trigger("show:modal",new I.default({type:"home"})):y.default.trigger("show:alert",{type:"error",message:(0,
v.default)("You have reached the {1} person home limit.",t)})},onLeaveHomeClick:function(e){e.preventDefault(),_.default.execute("removeHomeUser",{homeUser:this.signedInHomeUser,isSignedInUser:!0})},onInviteFriendClick:function(e){e.preventDefault(),y.default.trigger("show:modal",new I.default({type:"friend"}))},onEnableGuestClick:function(e){this.toggleGuestAccount(e,!0)},onDisableGuestClick:function(e){this.toggleGuestAccount(e,!1)}});t.default=O,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1998),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(11),h=i(p),m=n(6),v=a(m),g=n(9),y=a(g),b=n(58),w=a(b),P=n(477),_=a(P),S=n(85),x=a(S),C=n(463),T=a(C),k=n(176),I=a(k),M=n(227),A=a(M),E=n(525),O=a(E),D=n(1141),R=a(D),L=n(1138),N=a(L),j=n(216),U=a(j),F=n(35),B=a(F),z=n(57),$=a(z),V=n(284),H=a(V),q=n(547),W=a(q),K=[{value:0,title:"None"},{value:1,title:"1"},{value:2,title:"2"},{value:3,title:"3"},{value:4,
title:"4"},{value:5,title:"5"}],Q=f.default.ItemView.extend({className:"web-settings-container",template:s.default,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","keyup input[type=text]":"onInputChange",
"change select[id]":"onInputChange","submit #web-settings-form":"onSubmit"},onlyAfterRender:["saveChanges"],initialize:function(){this.changes={};var e=h.resolve("appModel"),t=e.get("user");this.listenTo(t,"change:signedIn",this.onSignedInChange),this.listenTo(e,"change:primaryServer",this.render),this.listenTo(y.default,"shortcut:save",this.saveChanges);var n=B.default.get("showAdvancedSettings");this.$el.toggleClass("show-advanced",n)},serializeData:function(){var e=[],t=this.model.toJSON(),n=h.resolve("appModel"),a=n.get("user"),i=a.hasPlexPass(),r=a.hasHome(),s=a.isNinja();
return l.default.each(l.default.keys(U.default.getLanguages()),function(t){e.push({value:t,title:(0,_.default)(t)})}),{settings:t,hasPlexPass:i,hasHome:r,isNinja:s,showExperimentalPlayer:w.default.hasMediaSource&&$.default.get("allowFlash"),version:"2.7.10",languages:e,debugLevels:T.default.settings,subtitlesBurnLevels:I.default.settings,chromecastAppIDs:O.default.settings,availableQualities:x.default.getAvailableQualities().reverse(),subtitleSizes:R.default.settings,audioBoostLevels:N.default.settings,
httpFallbackOptions:A.default.settings,extrasPrefixCounts:K}},saveChanges:function(){var e=this.ui.submitBtn,t=this.ui.message;if(!e.isDisabled()){e.addClass("active");var n=!!this.changes.language,a=this.model.save(this.changes);a.done(l.default.bind(function(){this.changes={},n||(e.addClass("disabled"),t.text((0,v.default)("Your changes have been saved.")))},this)),a.fail(l.default.bind(function(){t.text((0,v.default)("Your changes could not be saved."))},this)),a.always(l.default.bind(function(){
n||e.removeClass("active")},this))}},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(),this.$el.toggleClass("show-advanced",!t),B.default.save("showAdvancedSettings",!t)},onSettingsGroupClick:function(e){e.preventDefault();var t=(0,d.default)(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(),y.default.trigger("show:modal",new W.default({shortcuts:H.default.prop("shortcuts")}))},onChromecastAppIDChange:function(e){var t=e.currentTarget.value===O.default.CUSTOM;this.ui.chromecastCustomGroup.toggleClass("hidden",!t)},onInputChange:function(e){var t=(0,d.default)(e.currentTarget),n=e.currentTarget,a=n.value;"checkbox"===n.type&&(a=t.prop("checked")),
"int"===t.data("type")&&(a=parseInt(a,10)),this.changes[n.id]=a,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},onSubmit:function(e){e.preventDefault(),this.saveChanges()}});t.default=Q,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1999),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(40),p=a(f),h=n(242),m=a(h),v=n(1283),g=a(v),y=n(1285),b=a(y),w=c.default.Layout.extend({template:r.default,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(p.default.get("movie")),this.agentTypes.push(p.default.get("show")),this.agentTypes.push(p.default.get("artist")),
this.agentTypes.push(p.default.get("album")),this.agentTypes.push(p.default.get("photo")),this.currentType=o.default.first(this.agentTypes),this.populateAgents()},serializeData:function(){return{currentType:this.currentType,agentTypes:this.agentTypes}},populateAgents:function(){this.agents=new m.default([],{server:this.model,mediaTypeID:this.currentType.id});var e=this.agents.populate({reset:!0,scope:"page"});e.done(o.default.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 m.default([],{server:this.model,mediaTypeID:this.currentType.id,relatedAgentID:e.id}),this.contributors=new m.default([],{server:this.model,mediaTypeID:this.currentType.id,primaryAgentID:e.id}),this.contributorsList.show(new b.default({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"}));var t=u.default.when.apply(u.default,e);t.done(o.default.bind(this.onContributorsReset,this))},onAgentsReset:function(){if(this.agentsList.show(new g.default({collection:this.agents})),this.agents.length){var e=this.agents.findWhere({selected:!0})||this.agents.first();this.selectAgent(e)}},onContributorsReset:function(){var e=o.default.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=(0,u.default)(e.currentTarget),n=t.data("type");this.currentType=p.default.get(n),this.populateAgents(),this.ui.typeNavItems.removeClass("active"),t.parent("li").addClass("active")},onAgentClick:function(e){e.preventDefault();var t=(0,u.default)(e.target),n=t.data("identifier"),a=this.agents.get(n);this.selectAgent(a)},onContributorsSave:function(e){
this.currentAgent.url="system/agents/"+this.currentAgent.id+"/config/"+this.currentType.id;var t=this.currentAgent.save({order:e});t.done(o.default.bind(function(){this.additionalAgents.fetch({silent:!0}),this.contributors.fetch({silent:!0})},this))}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(156),o=a(s),l=o.default.extend({prefix:"channel.",serializeData:function(){var e=o.default.prototype.serializeData.apply(this,arguments),t=this.options.channelSettings.toJSON();
return r.default.each(t,function(e){e.id=this.prefix+e.id},this),e.unshift.apply(e,t),e},updateModel:function(e,t){var n=o.default.prototype.updateModel.apply(this,arguments);if(n)return n;var a=e.replace(this.prefix,""),i=this.options.channelSettings.get(a);return i?i.set("value",t):void 0}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2e3),r=a(i),s=n(3),o=a(s),l=n(6),u=a(l),d=n(156),c=a(d),f=n(1385),p=a(f),h=n(1386),m=a(h),v=c.default.extend({
template:r.default,regions:{signIn:".sign-in-region",update:".update-region"},serializeData:function(){var e=c.default.prototype.serializeData.apply(this,arguments),t=o.default.findWhere(e,{id:"FriendlyName"});return t&&(t.placeholder=this.model.get("friendlyName")),e},bindings:{".version":{modelAttribute:"shortVersion",formatter:function(e){return(0,u.default)("Version {1}",e)}}},onRender:function(){c.default.prototype.onRender.apply(this,arguments),this.signIn.show(new p.default({model:this.model.get("cloudAccount"),
collection:this.collection})),this.model.get("updater")&&this.update.show(new m.default({model:this.model.get("update"),collection:this.collection}))}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=a(i),s=n(6),o=a(s),l=n(229),u=a(l),d=n(156),c=a(d),f=c.default.extend({prefix:"account.",serializeData:function(){var e=this.options.account,t=[],n=r.default.map(u.default,function(e,t){return{value:t,label:e
}});return t.push({id:this.prefix+"autoSelectAudio",label:(0,o.default)("Automatically select audio and subtitle tracks"),summary:(0,o.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:(0,o.default)("Prefer audio tracks in"),"default":"en",value:e.get("defaultAudioLanguage"),type:"text",group:"account.language",
advanced:!1,hidden:!1,enumValues:n}),t.push({id:this.prefix+"subtitleMode",label:(0,o.default)("Subtitle mode"),"default":1,value:parseInt(e.get("subtitleMode"),10),type:"int",group:"account.language",advanced:!1,hidden:!1,enumValues:[{value:0,label:(0,o.default)("Manually selected")},{value:1,label:(0,o.default)("Shown with foreign audio")},{value:2,label:(0,o.default)("Always enabled")}]}),t.push({id:this.prefix+"defaultSubtitleLanguage",label:(0,o.default)("Prefer subtitles in"),"default":"en",
value:e.get("defaultSubtitleLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:n}),t},updateModel:function(e,t){var n=c.default.prototype.updateModel.apply(this,arguments);if(n)return n;var a=e.replace(this.prefix,""),i=this.options.account;return i.has(a)?i.set(a,t):void 0}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=a(i),s=n(1383),o=a(s),l=r.default.CollectionView.extend({
tagName:"ul",className:"nav nav-cards",itemView:o.default,selectGroup:function(e){this.selectedView&&this.selectedView.deselect(),this.selectedView=this.children.findByModel(this.collection.get(e)),this.selectedView.select()},showDecorator:function(e,t){var n=this.children.findByModel(this.collection.get(e));n.showDecorator(t)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2001),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({
tagName:"li",className:"server-settings-nav-list-item",template:r.default,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.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2003),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(17),c=a(d),f=n(156),p=a(f),h=p.default.extend({className:"remote-access-container",template:r.default,ui:{manualPortMappingMode:"#ManualPortMappingMode",manualPortMappingPort:"#ManualPortMappingPort"},events:{"change .remote-access-error-container input[id]":"onInputChange","click .sign-in-link":"onSignInClick","click .remote-access-enable-btn":"onEnableClick",
"click .retry-btn":"onRetryClick","click .remote-access-disable-btn":"onDisableClick"},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"),a=this.cloudAccount.toJSON(),i=!e.get("value"),r=!a.signedIn,s=i||r;
return{isDisabled:i,isSignedOut:r,isUnavailable:s,hasPrivateAddress:!(!a.privateAddress||!a.privatePort),hasPublicAddress:!(!a.publicAddress||!a.publicPort),cloudAccount:a,hasMappingSettings:!(!t||!n),mappingModeSetting:t?t.toJSON():null,mappingPortSetting:n?n.toJSON():null}},enable:function(){},connect:function(){return c.default.execute("connectServer",{cloudAccount:this.cloudAccount,value:!0})},disconnect:function(){return c.default.execute("connectServer",{cloudAccount:this.cloudAccount,value:!1
})},reconnect:function(){return c.default.execute("reconnectServer",{cloudAccount:this.cloudAccount})},saveChanges:function(){if(o.default.isEmpty(this.changes))return u.default.Deferred().resolve().promise();var e=this.collection.first().save(this.changes);return e.done(o.default.bind(function(){this.changes={}},this)),e},onInputChange:function(e){p.default.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(o.default.bind(this.reconnect,this))}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(1).default,r=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(2004),o=i(s),l=n(3),u=i(l),d=n(5),c=i(d),f=n(10),p=i(f),h=n(11),m=r(h),v=n(17),g=i(v),y=n(94),b=i(y),w=p.default.ItemView.extend({className:"server-account-container",template:o.default,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=m.resolve("appModel");this.user=e.get("user"),this.image=new b.default({type:"friend",width:60}),this.listenTo(this.user,"change:isSignedIn",function(){this.isSigningIn||this.render()}),this.isSigningIn=!1,this.claimServerFailed=!1},serializeData:function(){var e=!this.claimServerFailed&&this.model.server.supports("claimServer")&&this.user.get("isSignedIn"),t=!this.model.server.get("isCloudPersonalServer");
return{showClaimMessage:e,showSignOut:t}},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=g.default.execute("signInServer",t);return n.done(u.default.bind(function(){this.model.fetch();
},this)),n},signInUser:function(e){return this.user.get("isSignedIn")?c.default.Deferred().resolve().promise():g.default.execute("signIn",{username:e.username,password:e.password})},signOut:function(){return this.ui.username.val(""),this.ui.password.val(""),g.default.execute("signOutServer",{cloudAccount:this.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(u.default.bind(function(){return this.signInServer(t)},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(u.default.bind(function(){this.model.fetch()},this)),t.always(this.whenRendered(function(){this.ui.signOutBtn.removeClass("active")}))}},onClaimClick:function(e){e.preventDefault(),this.ui.claimBtn.addClass("active");var t=m.resolve("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.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(2005),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(11),f=i(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(17),y=a(g),b=n(1311),w=a(b),P=d.default.ItemView.extend({tagName:"span",className:"check-for-updates-container",template:s.default,
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){
y.default.execute("checkForServerUpdates",{server:this.model.server,download:e.download,initialState:e.initialState})},installUpdates:function(){y.default.execute("installServerUpdates",{server:this.model.server})},waitForInstall:function(){this.listenTo(this.model.server,"change:isConnected",this.onServerConnectedChange)},showUpdateState:function(e){this.$el.removeClass(this.model.previous("state"));var t=e;this.model.get("canInstall")||"available"!==e||(t="notify"),this.$el.addClass(t);var n=!(!this.model.get("added")&&!this.model.get("fixed"));
if(this.$el.toggleClass("has-release-notes",n),"installing"===t)this.waitForInstall();else if("error"===t||"notify"===t){var a;this.model.get("error")?(a=this.model.get("error"),this.ui.installManualLink.addClass("hidden")):this.model.get("canInstall")?(a=(0,h.default)("Something went wrong."),this.ui.installManualLink.removeClass("hidden")):(a=(0,h.default)("An update is available."),this.ui.installManualLink.removeClass("hidden"));var i=f.resolve("appModel"),r=i.get("user").server,s=this.model.get("downloadURL")||r.get("appsUrl");
this.ui.installManualLink.attr("href",s),this.ui.updateErrorMessage.text(a)}},canCheckForUpdate:function(e){return"done"===e||"error"===e||"none"===e},onRender:function(){this.showUpdateState(this.model.get("state"))},onStateChange:function(e,t){this.isRendered&&(this.showUpdateState(t),this.ui.checkForUpdatesBtn.toggleClass("active",!this.canCheckForUpdate(t)))},onProgressChange:function(e,t){l.default.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&&(this.stopListening(e,"change:isConnected",this.onServerConnectedChange),y.default.execute("checkForServerUpdates",{server:this.model.server}))},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(),v.default.trigger("show:modal",new w.default({model:this.model}))}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2006),r=a(i),s=n(10),o=a(s),l=n(108),u=a(l),d=o.default.ItemView.extend({template:r.default,serializeData:function(){
return{isTranscoderRequired:!this.model.get("transcoderVideo"),isUpgradeRequired:!this.model.supports("streamReady"),minServerVersion:u.default.streamReady}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2007),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(17),c=a(d),f=n(153),p=a(f),h=n(335),m=a(h),v=n(185),g=a(v),y=n(526),b=a(y),w=n(1268),P=a(w),_=n(156),S=a(_),x=n(1387),C=a(x),T=S.default.extend({mixins:[p.default],
className:"versions-container",template:r.default,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 m.default([],{server:this.model,allowInCache:!0}),this.transcodeJobs=new g.default([],{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 b.default({inline:!0})),!e||!t)return void this.enterState("error");var n=u.default.when(this.playlists.populate(),this.transcodeJobs.fetch());n=n.then(o.default.bind(function(){return this.playlist=this.playlists.first(),this.playlist?(this.generators=this.playlist.get("children"),this.generators.fetch()):u.default.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 P.default({collection:this.generators,itemViewOptions:{transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onExit:function(){this.stopListening(this.generators)}},error:{onEnter:function(){this.listRegion.show(new C.default({model:this.model}))}}},toggleMessage:function(){
this.ui.message.toggleClass("hidden",!this.generators.length)},onRender:function(){this.enterNextState()},onDeleteAllVersionsClick:function(e){e.preventDefault(),c.default.execute("deleteAllVersionGenerators",{server:this.model}).then(o.default.bind(function(){return this.generators.fetch()},this))}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(2008),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(41),f=a(c),p=n(10),h=a(p),m=n(11),v=i(m),g=n(6),y=a(g),b=n(17),w=a(b),P=n(9),_=a(P),S=n(23),x=i(S),C=n(194),T=a(C),k=n(1382),I=a(k),M=n(1380),A=a(M),E=n(1384),O=a(E),D=n(1388),R=a(D),L=n(1378),N=a(L),j=n(1379),U=a(j),F=n(1381),B=a(F),z=n(156),$=a(z),V=n(35),H=a(V),q=n(133),W=a(q),K=h.default.Layout.extend({
className:"server-settings-container",template:s.default,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:A.default,group:"general",title:"General",isCustom:!0},remoteAccess:{constructor:O.default,group:"remoteAccess",title:"Remote Access",isCustom:!0},versions:{constructor:R.default,
group:"versions",title:"Optimized Versions",isCustom:!0},agents:{constructor:N.default,group:"agents",title:"Agents",isCustom:!0},library:{constructor:$.default,group:"library",title:"Library"},channels:{constructor:U.default,group:"channels",title:"Channels",isCustom:!0},network:{constructor:$.default,group:"network",title:"Network"},transcoder:{constructor:$.default,group:"transcoder",title:"Transcoder"},languages:{constructor:B.default,group:"account.language",title:"Languages",isCustom:!0},dlna:{
constructor:$.default,group:"dlna",title:"DLNA"},bonjour:{constructor:$.default,group:"bonjour",title:"Network Discovery"},butler:{constructor:$.default,group:"butler",title:"Scheduled Tasks"},extras:{constructor:$.default,group:"extras",title:"Extras"}},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=H.default.get("showAdvancedSettings");if(this.$el.toggleClass("show-advanced",t),this.initGroups(),this.model.supports("reachability")){var n="/myplex/refreshReachability",a=l.default.extend(this.model.getXHROptions(n),{type:"PUT"});d.default.ajax(a)}var i=v.resolve("appModel");i.set("primaryServer",this.model),this.listenTo(_.default,"shortcut:save",this.saveChanges),this.listenTo(i,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.cloudAccount,"change:remoteAccessState",this.onRemoteAccessStatusChange),
this.listenTo(this.model,"change:isClaimed",this.onClaimedChange)},initGroups:function(){var e=l.default.keys(this.panes),t=l.default.chain(this.collection.pluck("group")).unique().compact().value();this.groups=new f.default.Collection,l.default.each(e,function(e){var n=this.panes[e];(n.isCustom||l.default.contains(t,e))&&this.addGroup(e,n)},this),l.default.each(t,function(t){if(!l.default.contains(e,t)){var n={constructor:$.default,group:t,title:t};this.panes[t]=n,this.addGroup(t,n)}},this)},addGroup:function(e,t){
var n=l.default.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],n=t.constructor,a=new n({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}),_.default.trigger("navigate","serverSettings",{serverID:this.model.id,group:e,replace:!0,trigger:!1}),a},flushChanges:function(){this.currentPane.changes&&l.default.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(!l.default.isEmpty(t)){var a=this.channelSettings.first().getSaveParams(t),i=l.default.result(this.channelSettings,"url"),r=x.join([i,"/set"],a);e.push(d.default.ajax(this.model.getXHROptions(r)))}l.default.isEmpty(n)||e.push(this.account.save(n)),l.default.isEmpty(this.changes)||e.push(this.collection.first().save(this.changes));var s=d.default.when.apply(d.default,e);s.done(l.default.bind(function(){var e=l.default.keys(this.changes);l.default.each(e,function(e){var t=this.tempSettings.get(e),n=this.collection.get(e);
n.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(l.default.bind(function(){this.currentPane&&this.currentPane.triggerMethod("after:save",!1)},this))}},getPrefixedChanges:function(e){var t={};return l.default.each(this.changes,function(n,a){var i=0===a.lastIndexOf(e,0);i&&(t[a.substring(e.length)]=n,
delete this.changes[a])},this),t},onRender:function(){this.serverDropdown.append(new T.default);var e=new I.default({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){var n=this.model.get("update");return"installing"===n.get("state")?void this.listenTo(this.model,"change:connected",this.onServerConnectedChange):t?void _.default.trigger("navigate","serverSettings",{serverID:t.id}):void _.default.trigger("show:view",new W.default({title:(0,y.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);var n=v.resolve("appModel");n.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");this.$el.toggleClass("show-advanced",!t),H.default.save("showAdvancedSettings",!t);
},onButlerUpdateChannelChange:function(){var e=this.collection.get("ButlerTaskCheckForUpdates"),t=e&&e.get("value");t&&w.default.execute("checkForServerUpdates",{server:this.model,download:!1})}});t.default=K,e.exports=t.default},function(e,t,n){"use strict";var a=n(14).default,i=n(13).default,r=n(1).default,s=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(2009),l=r(o),u=n(3),d=r(u),c=n(5),f=r(c),p=n(10),h=r(p),m=n(7),v=(r(m),n(66)),g=r(v),y=n(11),b=s(y),w=n(6),P=r(w),_=n(9),S=r(_),x=n(17),C=r(x),T=n(362),k=r(T),I=h.default.ItemView.extend({
className:"setup-basic-container",template:l.default,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(){d.default.bindAll(this,"onPlexPassModalClose"),this.collection=this.model.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=b.resolve("appModel");this.isPlexPassModalOpen=!t.get("user").get("hasPlexPass")},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(){g.default.render({$$typeof:i,
type:k.default,key:null,ref:null,props:a(k.default.defaultProps,{store:b.resolve("appStore"),metricsProperties:{context:"setupWizard",firstRun:!0},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose}),_owner:null},this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&g.default.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(d.default.bind(function(){
this.ui.nextBtn.click()},this)),t.always(function(){e.removeClass("active")})}},save:function(){var e=this,t=d.default.isEmpty(this.changes)?f.default.Deferred().resolve().promise():this.collection.first().save(this.changes),n=b.resolve("appModel"),a=n.get("user").get("isSignedIn");return this.model.supports("claimServer")&&!this.model.get("superToken")&&a&&(t=t.then(function(){return e.model.get("isClaimed")?f.default.Deferred().resolve().promise():C.default.execute("signInServer",{claim:!0,cloudAccount:e.model.get("cloudAccount")
})})),t=t.fail(function(){S.default.trigger("show:alert",{type:"error",message:(0,P.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.default=I,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(2010),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(6),h=a(p),m=n(9),v=a(m),g=n(320),y=a(g),b=n(11),w=i(b),P=n(1735),_=a(P),S=f.default.ItemView.extend({className:"setup-complete-container",template:s.default,ui:{submitBtn:".submit-btn",doneBtn:".done-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange",
"submit #setup-complete-form":"onSubmit"},initialize:function(){this.collection=this.model.get("settings"),this.collection.populate({reset:!0}),this.changes={}},serializeData:function(){var e=this.collection.get("collectUsageData");return{devicesImage:_.default,collectUsageDataSetting:e?e.toJSON():null}},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");var t=this.save();t.always(this.whenRendered(function(){this.ui.doneBtn.click(),e.removeClass("active")}));
}},save:function(){l.default.has(this.changes,"collectUsageData")&&!this.changes.collectUsageData&&w.resolve("metrics").trackClick({action:"optOutMetrics",page:"setupWizard",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()}),n=d.default.when(e,(0,y.default)(t));return n.fail(function(){v.default.trigger("show:alert",{type:"error",message:(0,h.default)("There was a problem saving these settings.")
})}),n},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()}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2011),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"setup-error-container",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(2012),r=a(i),s=n(5),o=a(s),l=n(10),u=a(l),d=n(9),c=a(d),f=n(289),p=a(f),h=n(1296),m=a(h),v=n(135),g=a(v),y=u.default.Layout.extend({className:"setup-library-container",template:r.default,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"),a=new p.default([],{server:t,url:"/services/defaultLibraries"
});this.collection=n,this.model.supports("defaultSections")&&e.isFirstVisitToSubset&&o.default.when(a.populate(),n.populate()).done(function(){n.length||a.forEach(function(e){e.collection=n,n.add(e)})})},onRender:function(){this.list.show(new m.default({collection:this.collection}))},onAddSectionClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new g.default({server:this.model}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(2013),r=a(i),s=n(10),o=a(s),l=o.default.ItemView.extend({className:"setup-loading-container",template:r.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(2014),s=a(r),o=n(3),l=a(o),u=n(5),d=a(u),c=n(10),f=a(c),p=n(9),h=a(p),m=n(26),v=a(m),g=n(11),y=i(g),b=n(17),w=a(b),P=n(242),_=a(P),S=n(527),x=a(S),C=n(1394),T=a(C),k=n(1392),I=a(k),M=n(1390),A=a(M),E=n(1393),O=a(E),D=n(1391),R=a(D),L={
setupSignIn:x.default,setupLoading:T.default,setupError:I.default,setupBasic:A.default,setupLibrary:O.default,setupComplete:R.default},N={setupError:"error",setupBasic:"name",setupLibrary:"library",setupComplete:"complete"},j=["com.plexapp.agents.imdb","com.plexapp.agents.thetvdb","com.plexapp.agents.lastfm"],U=f.default.Layout.extend({className:"container",template:s.default,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){l.default.bindAll(this,"start","onAgentsSuccess","onAgentsFail","onUpdatesComplete"),this.subset=e.subset||"setupLoading",this.attempts=0,this._visitedSubsets={},v.default.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 this.navigate("setupLoading"),void this.start();var e=y.resolve("appModel"),t=e.get("user").server;t.populate().done(this.whenRendered(function(){this.navigate("setupLoading"),this.start()})).fail(this.whenRendered(function(){t.get("isConnected")?this.navigate("setupSignIn"):(this.navigate("setupLoading"),this.start())}))},start:function(){if(this.attempts>=this.maxAttempts)return v.default.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)(0,v.default)("Waiting for server to start ("+e+")"),this.model.fetch().done(l.default.delay(this.start,500));else{var t=new _.default([],{server:this.model}),n=t.fetch({scope:"page",timeout:0});n.done(this.onAgentsSuccess),n.fail(this.onAgentsFail)}},navigate:function(e){var t="setupSignIn"===e,n=L[e],a=N[e];this.previousSubset=this.subset,this.subset=e,a&&y.resolve("metrics").trackView({page:"setupWizard",pane:a,
firstRun:!0});var i=!this._visitedSubsets[e];this._visitedSubsets[e]=!0;var r=new n({model:this.model,isFirstRun:!0,isFirstVisitToSubset:i});this.container.show(r),t&&this.listenTo(r,"skipSignIn",this.onSignInSkip),this.ui.header.toggleClass("hidden",t),this.$el.addClass(e),this.previousSubset!==e&&this.$el.removeClass(this.previousSubset)},onRender:function(){var e=y.resolve("appModel");e.set("isFirstRun",!0),this.renderSubset()},onClose:function(){var e=y.resolve("appModel");e.set("isFirstRun",!1);
},onSignInSkip:function(){this.hasSkippedSignIn=!0,this.renderSubset()},onAgentsSuccess:function(e){(0,v.default)("Looking for a core agent");for(var t=0,n=j.length;t<n;t++){var a=j[t];if(e.get(a)){(0,v.default)(a+" found");var i=w.default.execute("updateChannel",{server:this.model,silent:!0});return void i.always(this.onUpdatesComplete)}}v.default.error("No core agents found"),this.navigate("setupError")},onAgentsFail:function(){v.default.warn("Unable to request agents"),l.default.delay(this.start,500);
},onUpdatesComplete:function(){this.navigate("setupBasic")},onNavClick:function(e){e.preventDefault();var t=(0,d.default)(e.currentTarget),n=t.data("subset"),a=t.hasClass("segment-btn")&&"setupBasic"===this.subset;a&&this.container.currentView?(e.preventDefault(),this.container.currentView.submit()):(this.navigate(n),h.default.trigger("navigate",n,{trigger:!1}))},onDoneClick:function(e){e.preventDefault(),y.resolve("metrics").trackClick({page:"setupWizard",action:"complete",firstRun:!0}),h.default.trigger("navigate","dashboard");
}});t.default=U,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2015),r=a(i),s=n(10),o=a(s),l=n(9),u=a(l),d=n(35),c=a(d),f=n(541),p=a(f),h=o.default.Layout.extend({className:"side-bar",template:r.default,ui:{sortContainer:".section-sort-container"},regions:{sort:".section-sort-list-container"},initialize:function(){this.hidden=!c.default.get("sidebarOpen"),this.hidden?this.$el.addClass("transition-out"):u.default.trigger("show:bar","sidebar");
},open:function(){this.hidden=!1,c.default.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),u.default.trigger("show:bar","sidebar")},hide:function(){this.hidden=!0,c.default.save("sidebarOpen",!1),this.$el.addClass("transition-out"),u.default.trigger("hide:bar","sidebar")},onRender:function(){this.sort.show(new p.default({collection:this.model.get("sorts")}))},onClose:function(){u.default.trigger("hide:bar","sidebar")}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default,i=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(2016),s=a(r),o=n(3),l=a(o),u=n(10),d=a(u),c=n(9),f=a(c),p=n(11),h=i(p),m=n(35),v=a(m),g=n(154),y=i(g),b=n(1218),w=a(b),P=n(1275),_=a(P),S=n(1276),x=a(S),C=n(1278),T=a(C),k=n(541),I=a(k),M=d.default.Layout.extend({className:"side-bar",template:s.default,ui:{newFilterBtn:".new-filter-icon-btn",filterOptionsHeader:".filter-options-header",typeContainer:".section-type-container",sortContainer:".section-sort-container"},regions:{currentFilters:".section-current-filters-list-container",
filters:".section-filters-list-container",filterOptions:".section-filter-option-list-container",sort:".section-sort-list-container"},modelEvents:{"change:currentFilters":"onCurrentFiltersChange","change:currentType":"onCurrentTypeChange","change:title":"onSectionTitleChange"},events:{"click .new-filter-btn":"onNewFilterClick","click .hide-btn":"onHideClick"},initialize:function(e){this.hidden=!v.default.get("sidebarOpen"),this.advancedFilters=!!this.model.get("allowAdvancedFilters"),this.linearFilters=!this.advancedFilters,
this.mediaActions=e.mediaActions,this.supportsQuickSearch=this.model.server.supports("quickSearch"),this.hidden?this.$el.addClass("transition-out"):f.default.trigger("show:bar","sidebar"),this.supportsQuickSearch||h.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:"section",placeholder:this.model.get("title"),query:this.getSearchValue()})),this.listenTo(f.default,"search:section",this.onSearch)},serializeData:function(){return{showNewFilterIconBtn:this.advancedFilters&&!!this.model.get("currentFilters").length
}},open:function(){this.hidden=!1,v.default.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),f.default.trigger("show:bar","sidebar")},hide:function(){this.hidden=!0,v.default.save("sidebarOpen",!1),this.$el.addClass("transition-out"),f.default.trigger("hide:bar","sidebar")},getSearchValue:function(){var e=this.model.get("currentFilters"),t=l.default.findWhere(e,{key:"title"});return t&&t.values.length?t.values[0]:""},addFilter:function(e,t){t||(t={});var n=this.model.get("currentFilters");
this.linearFilters&&n.length&&(n.length=0);var a=l.default.findWhere(n,{key:e.key});if(a){if(l.default.indexOf(a.values,e.value)>-1)return;t.replace?(a.titles=[e.title],a.values=[e.value]):(a.titles.push(e.title),a.values.push(e.value))}else n.push({key:e.key,titles:[e.title],values:[e.value]});this.model.trigger("change:currentFilters",this.model,n)},removeFilter:function(e){var t=this.model.get("currentFilters"),n=l.default.findWhere(t,{key:e.key});n&&(n.titles=l.default.reject(n.titles,function(t){
return t===e.title}),n.values=l.default.reject(n.values,function(t){return t===e.value}),n.values.length||t.splice(l.default.indexOf(t,n),1)),this.model.trigger("change:currentFilters",this.model,t)},removeAllFilters:function(e){var t=this.model.get("currentFilters"),n=l.default.findWhere(t,{key:e});t.splice(l.default.indexOf(t,n),1),this.model.trigger("change:currentFilters",this.model,t)},onRender:function(){var e="all"!==this.model.get("currentSubset").id,t=this.model.get("currentFilters");e&&(t.length=0);
var n=new _.default({model:this.model,disabled:e}),a=new I.default({collection:this.model.get("sorts"),disabled:e});if(this.listenTo(n,"removeAllFilters",this.onRemoveAllFilters),this.listenToOnce(a,"collection:rendered",this.onSortListRender),this.currentFilters.show(n),this.sort.show(a),!e){var i=this.model.get("filters").populate({reset:!0,scope:"page"});i.done(l.default.bind(function(t){if(!this.isClosed){var n=this.linearFilters?t.filterBySecondary():t,a=new x.default({collection:n,disabled:e
});this.listenTo(a,"itemview:addFilter",this.onAddFilter),this.listenTo(a,"itemview:removeFilter",this.onRemoveFilter),this.listenTo(a,"itemview:showOptions",this.onFilterListShowOptions),this.filters.show(a)}},this))}t.length&&f.default.trigger("show:bar","filterbar",new w.default({model:this.model}))},onClose:function(){this.supportsQuickSearch||h.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:void 0,placeholder:void 0})),f.default.trigger("hide:bar","sidebar"),
f.default.trigger("hide:bar","filterbar")},onCurrentFiltersChange:function(e,t){var n=!!t.length;this.ui.newFilterBtn.toggleClass("hidden",this.linearFilters||!n),this.supportsQuickSearch||h.resolve("appStore").dispatch(y.changeSearchQuery({serverEntityID:this.model.server.entityID(),query:this.getSearchValue()})),n?f.default.trigger("show:bar","filterbar",new w.default({model:this.model})):f.default.trigger("hide:bar","filterbar")},onCurrentTypeChange:function(e,t){this.$el.removeClass("show-filters show-filter-options"),
this.removeAllFilters()},onSectionTitleChange:function(e,t){this.model.server.supports("quickSearch")||h.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),placeholder:t}))},onSearch:function(e){return e?void this.addFilter({key:"title",value:e,title:e},{replace:!0}):void this.removeAllFilters("title")},onAddFilter:function(e,t){this.addFilter(t)},onRemoveFilter:function(e,t){this.removeFilter(t)},onRemoveAllFilters:function(e){this.removeAllFilters(e);
},onFilterListShowOptions:function(e,t){var n=t.get("title");this.$el.addClass("show-filter-options"),this.$el.removeClass("show-filters"),this.ui.filterOptionsHeader.text(n);var a=new T.default({collection:t.get("options")});this.listenTo(a,"addFilter",this.onAddFilter),this.listenTo(a,"removeAllFilters",this.onRemoveAllFilters),this.listenTo(a,"itemview:addFilter",this.onAddFilter),this.listenTo(a,"itemview:removeFilter",this.onRemoveFilter),this.filterOptions.show(a)},onSortListRender:function(e){
this.ui.sortContainer.toggleClass("hidden",!e.collection.length);var t=e.collection.length;t||this.listenToOnce(e,"before:item:added",this.onSortListItemAdded)},onSortListItemAdded:function(e){this.ui.sortContainer.removeClass("hidden")},onNewFilterClick:function(e){e.preventDefault(),this.$el.addClass("show-filters")},onHideClick:function(e){e.preventDefault(),this.$el.hasClass("show-filter-options")?(this.$el.removeClass("show-filter-options"),this.$el.addClass("show-filters")):this.$el.removeClass("show-filters");
}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2017),r=a(i),s=n(10),o=a(s),l=n(1298),u=a(l),d=o.default.Layout.extend({className:"container",template:r.default,regions:{list:".announcements-container"},onRender:function(){this.list.show(new u.default({collection:this.collection}))}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(2018),r=a(i),s=n(3),o=a(s),l=n(10),u=a(l),d=n(6),c=a(d),f=n(62),p=a(f),h=n(37),m=a(h),v=n(9),g=a(v),y=n(1732),b=a(y),w=n(1733),P=a(w),_=n(1734),S=a(_),x=u.default.ItemView.extend({className:"container queue-help-container",template:r.default,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"===p.default.id?(this.stepsImgSrc=b.default,this.modalText=(0,c.default)('Right click the "Plex It!" button and choose Add to Favorites so you can save videos to Watch Later.'),this.firstStepText=(0,c.default)("Add the button above to your favorites bar.")):(this.stepsImgSrc=P.default,this.modalText=(0,c.default)('Drag the "Plex it!" button to your Bookmarks Bar so you can save videos to your Watch Later.'),this.firstStepText=(0,c.default)("Drag the button above to your bookmarks bar."));
var t=["OSX","Windows","Linux"];if(o.default.indexOf(t,p.default.platform)!==-1){var n="OSX"===p.default.platform?(0,c.default)("\u2318 C"):(0,c.default)("Ctrl C");this.copyCommand=(0,c.default)("{1} to copy",n)}},serializeData:function(){return{queueEmail:this.queueEmail,copyCommand:this.copyCommand,stepsImgSrc:this.stepsImgSrc,emailImgSrc:S.default,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 m.default({title:(0,c.default)("Plex It!"),message:this.modalText,confirmLabel:(0,c.default)("OK"),hideCancel:!0});g.default.trigger("show:modal",t)},onPlexitMouseDown:function(){this.ui.plexitBtn.css("user-select","text")},onPlexitMouseUp:function(){this.ui.plexitBtn.css("user-select","none")}});t.default=x,e.exports=t.default},function(e,t,n){
"use strict";var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2019),r=a(i),s=n(3),o=a(s),l=n(5),u=a(l),d=n(10),c=a(d),f=n(6),p=a(f),h=n(9),m=a(h),v=n(35),g=a(v),y=n(1302),b=a(y),w=c.default.Layout.extend({className:"container",template:r.default,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"),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,n=this.listModel.get("key")+"!subset";t||(t=g.default.get(n)),t||(t="unwatched"),g.default.save(n,t),this.subset=t;
},serializeData:function(){var e=this.listModel.get("key");return{label:this.listModel.get("label"),helpRoute:this.listModel.get("helpRoute"),defaultTarget:"_self",filters:[{title:(0,p.default)("All"),key:e,subset:"all"},{title:(0,p.default)("Unwatched"),key:e,subset:"unwatched"},{title:(0,p.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.default.each(o.default.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 b.default({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"),
(0,u.default)(e.currentTarget).addClass("selected"),this.initSubset({subset:o.default.last(e.currentTarget.href.split("/"))}),this.list.show(new b.default({collection:this.subsets[this.subset]})),m.default.trigger("navigate","userPlaylist",{key:this.listModel.get("key"),subset:this.subset,trigger:!1})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.name,a=e.width,s=e.height,o=i(e,["className","name","width","height"]),u=n.toUpperCase().split(" "),c=u[0].charAt(0),p=u[u.length-1].charAt(0),h=u.length>1?""+c+p:n.charAt(0),m={
fontSize:Math.max(14,Math.min(Math.round(a/4),42)),lineHeight:s+"px"};return l.default.createElement("div",r({style:m,className:(0,d.default)(t,f.default.anagram)},o),h)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(1620),f=s(c);a.propTypes={className:o.PropTypes.string,width:o.PropTypes.number,height:o.PropTypes.number,name:o.PropTypes.string.isRequired},a.defaultProps={width:13,height:13},t.default=a,e.exports=t.default;
},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(6)),f=u(c),p=n(27),h=n(29),m=u(h),v=n(239),g=u(v),y=n(43),b=u(y),w=n(1622),P=u(w),_=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isCollapsible:!1,isCollapsed:!0}}return i(t,e),r(t,[{key:"shouldComponentUpdate",
value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onTogglePress",decorators:[p.autobind],value:function(){this.setState({isCollapsed:!this.state.isCollapsed})}},{key:"onMeasure",decorators:[p.autobind],value:function(e){var t=e.height;this.setState({isCollapsible:t>this.props.maximumHeight,actualHeight:t})}},{key:"render",value:function(){var e=this.state,t=e.actualHeight,n=e.isCollapsed,a=e.isCollapsible,i=this.props.maximumHeight,r={maxHeight:n?i:t,overflow:"hidden"};return{$$typeof:o,type:"div",
key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:g.default,key:null,ref:null,props:l(g.default.defaultProps,{children:this.props.children,onMeasure:this.onMeasure}),_owner:null},className:P.default.contents,style:r},_owner:null},a&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{children:n?(0,f.default)("More"):(0,f.default)("Less"),className:P.default.toggle,
onPress:this.onTogglePress}),_owner:null},className:P.default.divider},_owner:null}]},_owner:null}}}]),t}(d.Component);_.propTypes={children:d.PropTypes.node.isRequired,maximumHeight:d.PropTypes.number},_.defaultProps={maximumHeight:72},t.default=_,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=i(e,["className"]);return l.default.createElement(f.default,r({name:"plex-icon-pp-badge-560",className:(0,d.default)(h.default.plexPassIcon,t)},n))}var i=n(16).default,r=n(12).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(49),f=s(c),p=n(1624),h=s(p);a.propTypes={className:o.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.className,a=e.spinnerSize,l=e.isSpinning,u=s(e,["children","className","spinnerSize","isSpinning"]);return d.default.createElement(g.default,o({className:(0,f.default)(n,b.default.button,l&&b.default.isSpinning),isDisabled:l},u),{$$typeof:i,type:"span",
key:null,ref:null,props:{children:{$$typeof:i,type:m.default,key:null,ref:null,props:r(m.default.defaultProps,{className:b.default.spinner,size:a}),_owner:null},className:b.default.spinnerContainer},_owner:null},{$$typeof:i,type:"span",key:null,ref:null,props:{children:t,className:b.default.label},_owner:null})}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(32),f=l(c),p=n(44),h=n(70),m=l(h),v=n(157),g=l(v),y=n(1632),b=l(y);
a.propTypes={className:u.PropTypes.string,children:u.PropTypes.node,isSpinning:u.PropTypes.bool,spinnerSize:u.PropTypes.oneOf(p.sizes.all)},a.defaultProps={isSpinning:!1,spinnerSize:p.sizes.SMALL},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(16).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(32)),f=u(c),p=n(27),h=n(241),m=n(1633),v=u(m),g=function(e){
function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"onChange",decorators:[p.autobind],value:function(e){var t=e.target.checked,n=t?this.props.checkedValue:this.props.uncheckedValue;this.props.value!==n&&this.props.onChange(n)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.inputClassName,a=e.errorClassName,i=e.size,r=e.checkboxText,s=e.name,u=e.value,d=e.checkedValue,c=e.hasError;l(e,["className","inputClassName","errorClassName","size","checkboxText","name","value","checkedValue","hasError"]);
return{$$typeof:o,type:"label",key:null,ref:null,props:{children:[{$$typeof:o,type:"input",key:null,ref:null,props:{id:s,type:"checkbox",className:n,checked:u===d,onChange:this.onChange},_owner:null},r],className:(0,f.default)(t,v.default[i],c&&a),htmlFor:s},_owner:null}}}]),t}(d.Component);g.defaultProps={className:v.default.label,inputClassName:v.default.input,errorClassName:v.default.hasError,size:h.LARGE,value:!1,uncheckedValue:!1,checkedValue:!0,hasError:!1},g.propTypes={className:d.PropTypes.string,
inputClassName:d.PropTypes.string,errorClassName:d.PropTypes.string,size:d.PropTypes.oneOf([h.SMALL,h.LARGE]),checkboxText:d.PropTypes.node,name:d.PropTypes.string.isRequired,value:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.bool]),uncheckedValue:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.bool]),checkedValue:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.bool]),hasError:d.PropTypes.bool,onChange:d.PropTypes.func.isRequired},t.default=g,e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t=e.labelText,n=e.checkboxText,a=e.showErrors,u=e.errors,d=s(e,["labelText","checkboxText","showErrors","errors"]),f=o(u,1),p=f[0];return{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:[t&&{$$typeof:r,type:g.default,key:null,ref:null,props:i(g.default.defaultProps,{children:t}),_owner:null},c.default.createElement(b.default,l({},d,{hasError:a,checkboxText:{$$typeof:r,type:"span",key:null,ref:null,props:{children:[n,a&&p&&" \u2014 "+p]
},_owner:null}}))]}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(123).default,l=n(12).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(201),p=u(f),h=n(253),m=u(h),v=n(158),g=u(v),y=n(1405),b=u(y);a.propTypes={labelText:d.PropTypes.node,checkboxText:d.PropTypes.node.isRequired,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string)},a.defaultProps={showErrors:!1,errors:[]},t.default=(0,p.default)(a),e.exports=t.default;
},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(16).default,u=n(100).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(3),f=d(c),p=n(7),h=d(p),m=n(27),v=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={}}return i(t,e),r(t,[{key:"getChildContext",value:function(){return{formState:this.state,onInputChange:this.onInputChange,onFormReset:this.onFormReset
}}},{key:"componentDidUpdate",value:function(e,t){t!==this.state&&this.props.onChange(this.state)}},{key:"onInputChange",decorators:[m.autobind],value:function(e){this.setState(function(t){return o({},t,e)})}},{key:"onFormReset",decorators:[m.autobind],value:function(){var e=u(this.state).reduce(function(e,t){return e[t]=void 0,e},{});this.setState(e)}},{key:"onSubmit",decorators:[m.autobind],value:function(e){var t=this;e.preventDefault(),e.nativeEvent.preventDefault();var n=u(this.state).some(function(e){
var n=t.state[e];return 0!==n.errors.length});if(n){var a=f.default.mapObject(this.state,function(e){return o({},e,{showErrors:0!==e.errors.length})});this.setState(a)}else{var i=f.default.mapObject(this.state,function(e,t){return e.value});this.props.onSubmit(i,this.state)}}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.onChange,l(e,["children","onChange"]));return h.default.createElement("form",o({},n,{onSubmit:this.onSubmit}),t)}}]),t}(p.Component);v.childContextTypes={formState:p.PropTypes.object,
onInputChange:p.PropTypes.func,onFormReset:p.PropTypes.func},v.propTypes={children:p.PropTypes.node,onSubmit:p.PropTypes.func,onChange:p.PropTypes.func},v.defaultProps={onSubmit:function(){},onChange:function(){}},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.onErrorDismiss,n=e.errorMessage;return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:c.default,key:null,ref:null,props:r(c.default.defaultProps,{name:"plex-icon-alert-560",className:m.default.sectionErrorIcon
}),_owner:null},n?n:(0,u.default)("There was a problem saving your changes."),{$$typeof:i,type:p.default,key:null,ref:null,props:r(p.default.defaultProps,{children:v,className:m.default.sectionErrorDismiss,onPress:t}),_owner:null}],className:m.default.sectionError},_owner:null}}var i=n(13).default,r=n(14).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(49),c=s(d),f=n(43),p=s(f),h=n(1636),m=s(h),v={$$typeof:i,type:c.default,key:null,ref:null,
props:r(c.default.defaultProps,{name:"plex-icon-remove-560"}),_owner:null};a.propTypes={errorMessage:o.PropTypes.string,onErrorDismiss:o.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.labelText,n=e.name,a=e.value,u=e.showErrors,d=e.errors,f=s(e,["labelText","name","value","showErrors","errors"]),h=""===a?null:x[(0,p.default)(a).score],m=o(d,1),v=m[0];return{$$typeof:r,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{children:[{$$typeof:r,
type:P.default,key:null,ref:null,props:i(P.default.defaultProps,{children:[t,h&&!u&&{$$typeof:r,type:"span",key:null,ref:null,props:{children:[" \u2014 ",{$$typeof:r,type:"span",key:null,ref:null,props:{children:h.translateFn(),style:{color:h.color}},_owner:null}]},_owner:null},u&&" \u2014 "+v],hasError:u,name:n}),_owner:null},c.default.createElement(S.default,l({name:n,type:"password",value:a,hasError:u},f))]}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(123).default,l=n(12).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(409),p=u(f),h=n(6),m=u(h),v=n(201),g=u(v),y=n(253),b=u(y),w=n(158),P=u(w),_=n(560),S=u(_),x={0:{color:"#ff5533",translateFn:function(){return(0,m.default)("Too weak")}},1:{color:"#ee8833",translateFn:function(){return(0,m.default)("Very weak")}},2:{color:"#eebb00",translateFn:function(){return(0,m.default)("Somewhat weak")}},3:{color:"#bbbb33",translateFn:function(){return(0,m.default)("Somewhat Strong")}},4:{color:"#66bb55",translateFn:function(){
return(0,m.default)("Very Strong")}}};a.defaultProps={showErrors:!1},a.propTypes={labelText:d.PropTypes.node.isRequired,name:d.PropTypes.string.isRequired,value:d.PropTypes.string.isRequired,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string).isRequired},t.default=(0,g.default)(a),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(16).default,u=n(12).default,d=n(123).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(7),m=c(h),v=n(32),g=c(v),y=n(27),b=n(241),w=n(1637),P=c(w),_=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"onChange",decorators:[y.autobind],value:function(e){this.props.onChange(e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.errorClassName,a=e.size,i=e.name,r=e.value,s=e.values,c=e.hasError,f=l(e,["className","errorClassName","size","name","value","values","hasError"]);
return{$$typeof:o,type:"div",key:null,ref:null,props:{children:m.default.createElement("select",u({},f,{className:P.default.select,id:i,name:i,value:r,onChange:this.onChange}),s.map(function(e){if(p.default.isString(e))return{$$typeof:o,type:"option",key:e,ref:null,props:{children:e,value:e},_owner:null};var t=p.default.keys(e),n=d(t,1),a=n[0];return{$$typeof:o,type:"option",key:a,ref:null,props:{children:e[a],value:a},_owner:null}})),className:(0,g.default)(t,P.default[a],c&&n)},_owner:null}}}]),
t}(h.Component);_.defaultProps={className:P.default.input,errorClassName:P.default.hasError,size:b.LARGE,hasError:!1},_.propTypes={className:h.PropTypes.string,errorClassName:h.PropTypes.string,size:h.PropTypes.oneOf([b.SMALL,b.LARGE]),name:h.PropTypes.string.isRequired,value:h.PropTypes.string.isRequired,values:h.PropTypes.oneOfType([h.PropTypes.arrayOf(h.PropTypes.string),h.PropTypes.arrayOf(h.PropTypes.object)]),hasError:h.PropTypes.bool,onChange:h.PropTypes.func.isRequired},t.default=_,e.exports=t.default;
},function(e,t,n){"use strict";function a(e){var t=e.name,n=e.labelText,a=e.showErrors,u=e.errors,d=s(e,["name","labelText","showErrors","errors"]),f=o(u,1),p=f[0];return{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:[{$$typeof:r,type:g.default,key:null,ref:null,props:i(g.default.defaultProps,{children:[n,a&&p&&" \u2014 "+p],name:t,hasError:a}),_owner:null},c.default.createElement(b.default,l({name:t,hasError:a},d))]}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(123).default,l=n(12).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(201),p=u(f),h=n(253),m=u(h),v=n(158),g=u(v),y=n(1410),b=u(y);a.propTypes={name:d.PropTypes.string.isRequired,labelText:d.PropTypes.node.isRequired,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string).isRequired},t.default=(0,p.default)(a),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.name,n=e.labelText,a=e.showErrors,u=e.errors,d=s(e,["name","labelText","showErrors","errors"]),f=o(u,1),p=f[0];
return{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:[{$$typeof:r,type:g.default,key:null,ref:null,props:i(g.default.defaultProps,{children:[n,a&&p&&" \u2014 "+p],hasError:a,name:t}),_owner:null},c.default.createElement(b.default,l({name:t,hasError:a},d))]}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(123).default,l=n(12).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(201),p=u(f),h=n(253),m=u(h),v=n(158),g=u(v),y=n(560),b=u(y);
a.propTypes={name:d.PropTypes.string.isRequired,labelText:d.PropTypes.node.isRequired,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string).isRequired},t.default=(0,p.default)(a),e.exports=t.default},function(e,t,n){"use strict";function a(e){return{$$typeof:i,type:"div",key:null,ref:null,props:{children:l.default.createElement(d.default,r({},e,{background:!0})),className:f.default.avatar},_owner:null}}var i=n(13).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(7),l=s(o),u=n(505),d=s(u),c=n(1639),f=s(c);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.className,a=i(e,["children","className"]);return l.default.createElement("div",r({role:"menu",className:(0,d.default)(n,f.default.menu)},a),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(32),d=s(u),c=n(1643),f=s(c);a.propTypes={className:o.PropTypes.string,children:o.PropTypes.node.isRequired
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return{$$typeof:i,type:"div",key:null,ref:null,props:{className:l.default.separator},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(1645)),l=r(o);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),d=n(7),c=o(d),f=n(11),p=n(29),h=o(p),m=function(e){
function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"componentDidMount",value:function(){(0,f.resolve)("metrics").trackView(u.default.omit(this.props,"children"))}},{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"render",value:function(){return c.default.Children.only(this.props.children)}}]),t}(d.Component);m.propTypes={children:d.PropTypes.element.isRequired,page:d.PropTypes.string.isRequired
},t.default=m,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.className,a=e.target,r=e.attachment,u=e.options,d=e.isOpen,c=(e.onMenuClose,l(e,["children","className","target","attachment","options","isOpen","onMenuClose"]));return{$$typeof:o,type:w.default,key:null,ref:null,props:s(w.default.defaultProps,{children:{$$typeof:o,type:y.default,key:null,ref:null,props:s(y.default.defaultProps,{children:d&&f.default.createElement("div",i({className:(0,h.default)(n,C.default.tooltip,C.default[r])
},c),t),isOpen:d,transitionName:k,transitionAppearTimeout:T,transitionEnterTimeout:T,transitionLeaveTimeout:T}),_owner:null},className:C.default.tooltipPortal,target:a,options:u||M[r],isOpen:d,closeTimeout:T}),_owner:null}}var i=n(12).default,r=n(52).default,s=n(14).default,o=n(13).default,l=n(16).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d,c=n(7),f=u(c),p=n(32),h=u(p),m=n(151),v=u(m),g=n(240),y=u(g),b=n(507),w=u(b),P=n(163),_=u(P),S=n(44),x=n(1654),C=u(x),T=(0,v.default)(_.default.tooltipSpeed),k={
appear:C.default.enter,appearActive:C.default.enterActive,enter:C.default.enter,enterActive:C.default.enterActive,leave:C.default.leave,leaveActive:C.default.leaveActive},I={skipMoveElement:!0,constraints:[{to:"window",attachment:"together",pin:!0}]},M=(d={},r(d,S.tooltipAttachments.TOP_LEFT,i({},I,{attachment:"bottom left",targetAttachment:"top left"})),r(d,S.tooltipAttachments.TOP_CENTER,i({},I,{attachment:"bottom center",targetAttachment:"top center"})),r(d,S.tooltipAttachments.TOP_RIGHT,i({},I,{
attachment:"bottom right",targetAttachment:"top right"})),r(d,S.tooltipAttachments.BOTTOM_LEFT,i({},I,{attachment:"top left",targetAttachment:"bottom left"})),r(d,S.tooltipAttachments.BOTTOM_CENTER,i({},I,{attachment:"top center",targetAttachment:"bottom center"})),r(d,S.tooltipAttachments.BOTTOM_RIGHT,i({},I,{attachment:"top right",targetAttachment:"bottom right"})),r(d,S.tooltipAttachments.MIDDLE_LEFT,i({},I,{attachment:"middle right",targetAttachment:"middle left"})),r(d,S.tooltipAttachments.MIDDLE_RIGHT,i({},I,{
attachment:"middle left",targetAttachment:"middle right"})),d);a.propTypes={children:c.PropTypes.node,className:c.PropTypes.string,target:c.PropTypes.object,attachment:c.PropTypes.string,options:c.PropTypes.object,isOpen:c.PropTypes.bool.isRequired,onMenuClose:c.PropTypes.func},a.defaultProps={attachment:S.tooltipAttachments.BOTTOM_CENTER},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,f.createSelector)((0,h.default)(),(0,v.default)(),function(e,t){var n=l.default.pick(t,"hubIdentifier","title","type","size","more","random");
return r({machineIdentifier:e.machineIdentifier},n,{metadataListEntityID:t.metadataList,containerKey:t.key})})}function i(e){var t=e.title,n=e.hubIdentifier,a=e.type,i=e.containerKey,s=e.machineIdentifier,o=n.indexOf("music.video")!==-1?"musicVideo":a,l="home.continue"===n?y.default.CONTINUE_WATCHING:y.default.LIBRARY,u=encodeURIComponent(s),c=encodeURIComponent(i),f=encodeURIComponent(o),p=encodeURIComponent(t),h=i&&l!==y.default.CONTINUE_WATCHING?"#!/server/"+u+"/list?key="+c+"&type="+f+"&title="+p:null;
return d.default.createElement(w.default,r({listType:o,listContext:l,hubLink:h,component:_.default},e))}var r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(7),d=s(u),c=n(34),f=n(30),p=n(76),h=s(p),m=n(841),v=s(m),g=n(99),y=s(g),b=n(569),w=s(b),P=n(1420),_=s(P);i.propTypes={serverEntityID:u.PropTypes.string.isRequired,hubEntityID:u.PropTypes.string.isRequired,hubIdentifier:u.PropTypes.string.isRequired,type:u.PropTypes.string.isRequired,title:u.PropTypes.string.isRequired,
containerKey:u.PropTypes.string.isRequired,machineIdentifier:u.PropTypes.string.isRequired},t.default=(0,c.connect)(a)(i),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(27)),f=n(29),p=u(f),h=n(1418),m=u(h),v={visibility:"hidden"},g={visibility:"visible"},y=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isReady:!1},this._numReadyHubs=0}return i(t,e),r(t,[{key:"componentWillMount",value:function(){this._numInitialHubs=this.props.hubEntityIDs.length}},{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"onListReady",decorators:[c.autobind],value:function(){++this._numReadyHubs===this._numInitialHubs&&this.setState({isReady:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.serverEntityID,a=t.hubEntityIDs,i=this.state.isReady;return{$$typeof:o,
type:"div",key:null,ref:null,props:{children:a.map(function(t){return{$$typeof:o,type:m.default,key:t,ref:null,props:l(m.default.defaultProps,{serverEntityID:n,hubEntityID:t,onListReady:e.onListReady}),_owner:null}}),style:i?g:v},_owner:null}}}]),t}(d.Component);y.propTypes={serverEntityID:d.PropTypes.string.isRequired,hubEntityIDs:d.PropTypes.array.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.metadataItemEntityIDs,n=e.populatedRange,a=i(e,["metadataItemEntityIDs","populatedRange"]);
return l.default.createElement(h.default,r({},a,{keyPropName:"metadataItemEntityID",items:t,itemsOffset:n.start,cellRenderer:(0,f.default)(e,v.default)}))}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(512),d=s(u),c=n(592),f=s(c),p=n(568),h=s(p),m=n(571),v=s(m);a.propTypes={metadataItemEntityIDs:o.PropTypes.array.isRequired,populatedRange:d.default},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(29)),f=u(c),p=n(49),h=u(p),m=n(330),v=u(m),g=n(329),y=u(g),b=n(43),w=u(b),P=n(347),_=u(P),S=n(1657),x=u(S),C={$$typeof:l,type:h.default,key:null,ref:null,props:o(h.default.defaultProps,{name:"plex-icon-clips-560"}),_owner:null},T=function(e){function t(){s(this,n),a(Object.getPrototypeOf(n.prototype),"constructor",this).apply(this,arguments)}i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t);
}},{key:"render",value:function(){var e=this.props,t=e.cellX,n=e.cellY,a=e.cellWidth,i=e.cellHeight,r=e.metadataKey,s=e.machineIdentifier,u=e.type,d=e.title,c=e.url,f=e.showOffscreenPlaceholder,p="photoAlbum"===u,h="clip"===u,m=encodeURIComponent(s),v=encodeURIComponent(r);return{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",
key:null,ref:null,props:{children:[!f&&{$$typeof:l,type:_.default,key:r,ref:null,props:o(_.default.defaultProps,{url:c,width:a,height:i}),_owner:null},h&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:C,className:x.default.badge},_owner:null}],className:x.default.image},_owner:null},p?{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:{$$typeof:l,type:"span",key:null,ref:null,props:{children:d,className:x.default.albumTitle},_owner:null},className:x.default.albumLink,
to:"#!/server/"+m+"/details/"+v}),_owner:null}:{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{className:x.default.photoLink,onPress:this.props.onPlayPress}),_owner:null}],className:x.default.photo},_owner:null},className:x.default.photoContainer},_owner:null},cellX:t,cellY:n,cellWidth:a,cellHeight:i}),_owner:null}}}]);var n=t;return t=(0,v.default)(t)||t}(d.Component);T.propTypes={type:d.PropTypes.string.isRequired,title:d.PropTypes.string,metadataKey:d.PropTypes.string.isRequired,
machineIdentifier:d.PropTypes.string.isRequired,cellX:d.PropTypes.number.isRequired,cellY:d.PropTypes.number.isRequired,cellWidth:d.PropTypes.number.isRequired,cellHeight:d.PropTypes.number.isRequired,showOffscreenPlaceholder:d.PropTypes.bool,url:d.PropTypes.func,onPlayPress:d.PropTypes.func},t.default=T,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,p.createSelector)((0,m.default)(),(0,g.default)(),function(e,t){void 0===e&&(e={});var n=t.machineIdentifier,a=e.key,i=e.type,r=e.title,s=e.thumbTranscodeUrl;
return{metadataKey:a,type:i,title:r,url:s,machineIdentifier:n}})}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(12).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(34),p=n(30),h=n(301),m=u(h),v=n(76),g=u(v),y=n(27),b=n(243),w=n(1421),P=u(w),_=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),s(t,[{key:"onPlayPress",decorators:[y.autobind],value:function(e){
this.props.playMetadataItem({serverEntityID:this.props.serverEntityID,metadataItemEntityID:this.props.metadataItemEntityID})}},{key:"render",value:function(){return c.default.createElement(P.default,l({onPlayPress:this.onPlayPress},this.props))}}]),t}(d.Component);_.propTypes={serverEntityID:d.PropTypes.string.isRequired,metadataItemEntityID:d.PropTypes.string,playMetadataItem:d.PropTypes.func.isRequired},t.default=(0,f.connect)(a,{playMetadataItem:b.playMetadataItem})(_),e.exports=t.default},function(e,t,n){
"use strict";function a(e){var t=e.isMetadataItem,n=i(e,["isMetadataItem"]);return t?l.default.createElement(d.default,r({},n,{showSelect:!1})):l.default.createElement(f.default,r({},n,{isMetadataItem:!1}))}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(570),d=s(u),c=n(1424),f=s(c);a.propTypes={isMetadataItem:o.PropTypes.bool},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(29),m=c(h),v=n(330),g=c(v),y=n(329),b=c(y),w=n(203),P=c(w),_=n(585),S=c(_),x=n(575),C=c(x),T=n(577),k=c(T),I=n(1658),M=c(I),A=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cellX,a=e.cellY,i=e.cellWidth,r=e.cellHeight,s=e.showScrollPlaceholder,c=e.showOffscreenPlaceholder,f=e.listType,h=e.listContext,m=u(e,["className","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext"]),v=this.props.tag,g=(0,
P.default)(f,h);return{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[p.default.createElement(k.default,d({className:M.default.imageLink},m)),p.default.createElement(S.default,d({},m,{width:i,title:v,isPlaceholder:s,isOffscreen:c}))],className:M.default.imageContainer},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:g.map(function(e,t){return p.default.createElement(C.default,d({},m,e,{
key:t,isSecondary:t>0}))}),className:M.default.titleContainer},_owner:null}],className:t,cellX:n,cellY:a,cellWidth:i,cellHeight:r}),_owner:null}}}]),t}(f.Component);A.propTypes={className:f.PropTypes.string,tag:f.PropTypes.string.isRequired,cellX:f.PropTypes.number.isRequired,cellY:f.PropTypes.number.isRequired,cellWidth:f.PropTypes.number.isRequired,cellHeight:f.PropTypes.number.isRequired,showScrollPlaceholder:f.PropTypes.bool,showOffscreenPlaceholder:f.PropTypes.bool,listType:f.PropTypes.string.isRequired,
listContext:f.PropTypes.string.isRequired},t.default=(0,g.default)(A),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=(d(c),n(6)),p=d(f),h=n(27),m=n(29),v=d(m),g=n(349),y=d(g),b=n(137),w=d(b),P=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{metadataListEntityID:this.props.metadataListEntityID}}},{key:"onPlayAllPress",decorators:[h.autobind],value:function(e){this.props.playMetadataList(this._getActionPayload())}},{key:"onShufflePress",decorators:[h.autobind],value:function(e){this.props.shuffleMetadataList(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[h.autobind],
value:function(e){this.props.addMetadataListToPlaylist(this._getActionPayload())}},{key:"onSyncPress",decorators:[h.autobind],value:function(e){this.props.syncMetadataList(this._getActionPayload())}},{key:"onOptimizePress",decorators:[h.autobind],value:function(e){this.props.optimizeMetadataList(this._getActionPayload())}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,a=e.onMenuClose,i=u(e,["target","isOpen","onMenuClose"]);return{$$typeof:l,type:y.default,key:null,ref:null,
props:o(y.default.defaultProps,{children:[i.showPlayAll&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,p.default)("Play All"),onPress:this.onPlayAllPress}),_owner:null},i.showShuffle&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,p.default)("Shuffle"),onPress:this.onShufflePress}),_owner:null},i.showAddToPlaylist&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,p.default)("Add to Playlist..."),
onPress:this.onAddToPlaylistPress}),_owner:null},i.showSync&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,p.default)("Sync..."),onPress:this.onSyncPress}),_owner:null},i.showOptimize&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,p.default)("Optimize..."),onPress:this.onOptimizePress}),_owner:null}],target:t,isOpen:n,onMenuClose:a}),_owner:null}}}]),t}(c.Component);P.propTypes={metadataListEntityID:c.PropTypes.string.isRequired,
target:c.PropTypes.object,isOpen:c.PropTypes.bool.isRequired,onMenuClose:c.PropTypes.func.isRequired,showPlayAll:c.PropTypes.bool,showShuffle:c.PropTypes.bool,showAddToPlaylist:c.PropTypes.bool,showSync:c.PropTypes.bool,showOptimize:c.PropTypes.bool,playMetadataList:c.PropTypes.func,shuffleMetadataList:c.PropTypes.func,addMetadataListToPlaylist:c.PropTypes.func,syncMetadataList:c.PropTypes.func,optimizeMetadataList:c.PropTypes.func},t.default=P,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(16).default,u=n(12).default,d=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=d(c),p=n(32),h=d(p),m=n(27),v=n(29),g=d(v),y=n(151),b=d(y),w=n(163),P=d(w),_=n(1427),S=d(_),x=n(1659),C=d(x),T="faceFront",k="faceBack",I=(0,b.default)(P.default.posterFlipSpeed),M={transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionAppearTimeout:0,transitionEnterTimeout:0,transitionLeaveTimeout:0},A=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={visibleFace:T,isLoadingFace:!1,isFlippingFace:!1,previousImageUrl:null}}return i(t,e),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props.imageUrl,n=e.imageUrl&&t!==e.imageUrl,a=this.props.metadataKey===e.metadataKey;a&&n&&this._prepareFlip(t)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._cancelFlip()}},{key:"_prepareFlip",value:function(e){this._cancelFlip(),this.setState({isLoadingFace:!0,
isFlippingFace:!0,previousImageUrl:e})}},{key:"_flipCard",value:function(){this.setState({isLoadingFace:!1,visibleFace:this._getInverseFace(this.state.visibleFace)}),this._flipTimeoutID=setTimeout(this.onFlipComplete,I)}},{key:"_cancelFlip",value:function(){this._flipTimeoutID&&(this._flipTimeoutID=clearTimeout(this._flipTimeoutID))}},{key:"_getInverseFace",value:function(e){return e===T?k:T}},{key:"onImageLoad",decorators:[m.autobind],value:function(){this.state.isLoadingFace&&this._flipCard()}},{
key:"onImageError",decorators:[m.autobind],value:function(){this.state.isLoadingFace&&this._flipCard()}},{key:"onFlipComplete",decorators:[m.autobind],value:function(){this.setState({isFlippingFace:!1,previousImageUrl:null})}},{key:"render",value:function(){var e=this.props,t=e.cardWidth,n=e.cardHeight,a=e.isPlaceholder,i=e.metadataKey,r=e.imageUrl,s=e.isSelected,d=e.activeSelectionType,c=l(e,["cardWidth","cardHeight","isPlaceholder","metadataKey","imageUrl","isSelected","activeSelectionType"]),p=this.state,m=p.visibleFace,v=p.isLoadingFace,g=p.isFlippingFace,y=p.previousImageUrl,b=this._getInverseFace(m),w={
width:t,height:n};return a?{$$typeof:o,type:"div",key:null,ref:null,props:{className:(0,h.default)(C.default.poster,s&&C.default.isSelected,!!d&&!s&&C.default.isOtherItemSelected),style:w},_owner:null}:{$$typeof:o,type:"div",key:i,ref:null,props:{children:{$$typeof:o,type:"div",key:null,ref:null,props:{children:[f.default.createElement(S.default,u({key:m,isSelected:s,activeSelectionType:d,visibleFace:m,cardWidth:t,cardHeight:n,metadataKey:i,imageUrl:v?y:r,imageTransitionProps:g?M:void 0,onImageLoad:this.onImageLoad,
onImageError:this.onImageError},c)),g&&f.default.createElement(S.default,u({key:b,isSelected:s,activeSelectionType:d,visibleFace:b,cardWidth:t,cardHeight:n,metadataKey:i,imageUrl:v?r:y,imageTransitionProps:g?M:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},c))],className:(0,h.default)(C.default.card,m===k&&C.default.isFlipped),style:w},_owner:null},className:C.default.cardContainer},_owner:null}}}]),t}(c.Component);A.propTypes={cardWidth:c.PropTypes.number,cardHeight:c.PropTypes.number,
isPlaceholder:c.PropTypes.bool,metadataKey:c.PropTypes.string,imageUrl:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]),isSelected:c.PropTypes.bool,activeSelectionType:c.PropTypes.string},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.isSelected,n=e.visibleFace,a=e.cardWidth,l=e.cardHeight,u=e.isOffscreen,c=e.imageUrl,p=e.imageTransitionProps,m=e.onImageLoad,g=e.onImageError,b=s(e,["isSelected","visibleFace","cardWidth","cardHeight","isOffscreen","imageUrl","imageTransitionProps","onImageLoad","onImageError"]);
return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{type:b.type,isOffscreen:u,url:c,width:a,height:l,transitionProps:p,onLoad:m,onError:g}),_owner:null},d.default.createElement(v.default,o({isSelected:t},b))],className:(0,f.default)(y.default.face,y.default[n],t&&y.default.isSelected)},_owner:null}}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var u=n(7),d=l(u),c=n(32),f=l(c),p=n(574),h=l(p),m=n(1428),v=l(m),g=n(1660),y=l(g);a.propTypes={isSelected:u.PropTypes.bool,visibleFace:u.PropTypes.string.isRequired,cardWidth:u.PropTypes.number.isRequired,cardHeight:u.PropTypes.number.isRequired,isOffscreen:u.PropTypes.bool,imageUrl:u.PropTypes.oneOfType([u.PropTypes.func,u.PropTypes.string]),imageTransitionProps:u.PropTypes.object,onImageLoad:u.PropTypes.func,onImageError:u.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){
"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(16).default,d=n(12).default,c=n(1).default,f=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(7),h=c(p),m=n(32),v=c(m),g=n(6),y=c(g),b=n(27),w=n(40),P=c(w),_=n(464),S=f(_),x=n(29),C=c(x),T=n(44),k=n(122),I=c(k),M=n(364),A=c(M),E=n(1522),O=c(E),D=n(49),R=c(D),L=n(70),N=c(L),j=n(43),U=c(j),F=n(567),B=c(F),z=n(559),$=c(z),V=n(572),H=c(V),q=n(1662),W=c(q),K=function(e){
function t(e,t){s(this,n),a(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.state={isActionsMenuOpen:!1}}i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,C.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{serverEntityID:this.props.serverEntityID,metadataItemEntityID:this.props.metadataItemEntityID}}},{key:"onPlayPress",decorators:[b.autobind],value:function(e){this.props.playMetadataItem(this._getActionPayload())}},{key:"onEditPress",
decorators:[b.autobind],value:function(e){this.props.editMetadataItem(this._getActionPayload())}},{key:"onActionsPress",decorators:[b.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[b.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.server,a=e.metadataKey,i=e.type,r=e.title,s=e.duration,c=e.viewCount,f=e.viewOffset,p=e.unviewedLeafCount,m=e.extraType,g=e.metadataState,b=e.mediaState,w=e.deletedAt,_=e.isLibraryItem,x=e.Media,C=e.hasActiveSelection,k=e.isSelected,I=e.isOtherItemSelected,M=e.isConflictingTypeSelected,E=e.isModifierKeyPressed,O=e.onMouseEnter,D=e.onSelectPress,L=e.onDeselectPress,j=u(e,["className","server","metadataKey","type","title","duration","viewCount","viewOffset","unviewedLeafCount","extraType","metadataState","mediaState","deletedAt","isLibraryItem","Media","hasActiveSelection","isSelected","isOtherItemSelected","isConflictingTypeSelected","isModifierKeyPressed","onMouseEnter","onSelectPress","onDeselectPress"]),F=this.state.isActionsMenuOpen,z=(0,
A.default)(this.props),V=encodeURIComponent(n.machineIdentifier),q=encodeURIComponent(a),K=P.default.get(i),Q=P.default.getChildMediaType(i),Y=_&&!m&&"video"===K.element,G=_&&"directory"===K.element&&"video"===Q.element,X=Y&&x.length>1,J=g===S.MATCHING,Z=g===S.PROCESSING||g===S.LOADING,ee=!J&&!Z&&!!b,te=J||Z||ee,ne=!te&&!!w,ae=f&&f/s*100,ie=!m&&"photo"!==i&&"track"!==i,re=z.showSelect&&(E||I);return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,
props:{className:W.default.background},_owner:null},Y&&!c&&!f&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:"div",key:null,ref:null,props:{className:W.default.unwatchedTag},_owner:null},className:W.default.unwatchedTagContainer},_owner:null},G&&!!p&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:p,className:(0,v.default)(W.default.unwatchedBadge)},_owner:null},X&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:R.default,key:null,ref:null,
props:l(R.default.defaultProps,{name:"plex-icon-files-560",className:W.default.versionBadgeIcon}),_owner:null},x.length],className:(0,v.default)(W.default.versionBadge)},_owner:null},!!ae&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{className:W.default.progressTrack},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{style:{width:ae+"%"},className:W.default.progressBar},_owner:null}],className:W.default.progress},_owner:null},te&&{
$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:N.default,key:null,ref:null,props:l(N.default.defaultProps,{className:W.default.refreshingSpinner}),_owner:null},className:W.default.refreshingSpinnerContainer},_owner:null},J&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{name:"plex-icon-search-560","aria-label":(0,y.default)("Matching")}),_owner:null},className:(0,v.default)(W.default.refreshingCircle)
},_owner:null},Z&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{name:"plex-icon-tagging-560","aria-label":(0,y.default)("Downloading Metadata")}),_owner:null},className:(0,v.default)(W.default.refreshingCircle)},_owner:null},ee&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{name:"plex-icon-analyzing-560","aria-label":(0,y.default)("Analyzing")
}),_owner:null},className:(0,v.default)(W.default.refreshingCircle)},_owner:null},ne&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{name:"plex-icon-trash-560","aria-label":(0,y.default)("In Trash")}),_owner:null},className:(0,v.default)(W.default.trashCircle)},_owner:null},ie&&{$$typeof:o,type:U.default,key:null,ref:null,props:l(U.default.defaultProps,{className:W.default.link,to:"#!/server/"+V+"/details/"+q}),
_owner:null},re&&!M&&{$$typeof:o,type:U.default,key:null,ref:null,props:l(U.default.defaultProps,{className:W.default.selectCoverButton,onPress:D}),_owner:null},re&&M&&{$$typeof:o,type:B.default,key:null,ref:null,props:l(B.default.defaultProps,{className:W.default.selectCoverButton,component:U.default,tooltip:(0,y.default)("A different type is selected"),tooltipAttachment:T.tooltipAttachments.TOP_CENTER,tooltipTarget:this.refs.selectButton,showOnFocus:!1,hideOnPress:!1}),_owner:null},z.showPlay&&{
$$typeof:o,type:$.default,key:null,ref:null,props:l($.default.defaultProps,{className:ie?W.default.playButton:W.default.playCoverButton,circleClassName:W.default.playCircle,tabIndex:"-1",title:r,onPress:this.onPlayPress}),_owner:null},z.showEdit&&{$$typeof:o,type:U.default,key:null,ref:null,props:l(U.default.defaultProps,{children:{$$typeof:o,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{name:"plex-icon-edit-560","aria-label":(0,y.default)("Edit {1}",r)}),_owner:null},className:W.default.editButton,
tabIndex:"-1",onPress:this.onEditPress}),_owner:null},h.default.createElement(U.default,{ref:"moreButton",className:W.default.moreButton,tabIndex:"-1","aria-haspopup":!0,onPress:this.onActionsPress},{$$typeof:o,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{name:"plex-icon-more-560","aria-label":(0,y.default)("More Actions")}),_owner:null}),h.default.createElement(H.default,d({target:this.refs.moreButton,isOpen:F,onMenuClose:this.onActionsMenuClose},j,z,{showPlay:!1,showEdit:!1})),z.showSelect&&h.default.createElement(U.default,{
ref:"selectButton",className:W.default.selectButton,isDisabled:M,onPress:D},{$$typeof:o,type:"div",key:null,ref:null,props:{className:W.default.selectCircle},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:R.default,key:null,ref:null,props:l(R.default.defaultProps,{name:"plex-icon-selected-560",className:W.default.selectedIcon,"aria-label":(0,y.default)("Selected")}),_owner:null},className:W.default.selectedCircle},_owner:null}),k&&{$$typeof:o,type:U.default,
key:null,ref:null,props:l(U.default.defaultProps,{className:W.default.deselectCoverButton,onPress:L}),_owner:null}],className:(0,v.default)(t,W.default.overlay,C&&W.default.hasActiveSelection,k&&W.default.isSelected,I&&W.default.isOtherItemSelected,M&&W.default.isConflictingTypeSelected,z.showSelect&&E&&W.default.isModifierKeyPressed,te&&W.default.isRefreshing,ne&&W.default.isTrash,F&&W.default.isActionsMenuOpen),onMouseEnter:O},_owner:null}}}]);var n=t;return t=(0,O.default)(t)||t}(p.Component);K.propTypes={
className:p.PropTypes.string,serverEntityID:p.PropTypes.string.isRequired,metadataItemEntityID:p.PropTypes.string.isRequired,server:I.default.isRequired,metadataKey:p.PropTypes.string,type:p.PropTypes.string,title:p.PropTypes.string,duration:p.PropTypes.number,viewCount:p.PropTypes.number,viewOffset:p.PropTypes.number,unviewedLeafCount:p.PropTypes.number,extraType:p.PropTypes.number,metadataState:p.PropTypes.string,mediaState:p.PropTypes.string,deletedAt:p.PropTypes.number,isLibraryItem:p.PropTypes.bool,
Media:p.PropTypes.array,hasActiveSelection:p.PropTypes.bool,isSelected:p.PropTypes.bool,isOtherItemSelected:p.PropTypes.bool,isConflictingTypeSelected:p.PropTypes.bool,isModifierKeyPressed:p.PropTypes.bool,showPlay:p.PropTypes.bool,showEdit:p.PropTypes.bool,playMetadataItem:p.PropTypes.func.isRequired,editMetadataItem:p.PropTypes.func.isRequired,onMouseEnter:p.PropTypes.func,onSelectPress:p.PropTypes.func,onDeselectPress:p.PropTypes.func},t.default=K,e.exports=t.default},function(e,t,n){"use strict";
function a(e){switch(e){case"artist":return"track";default:return e}}function i(e){var t=e.isOffscreen,n=e.tagType,i=e.librarySectionType,l=e.title,u=e.url,d=e.width,f=e.height,h=e.transitionProps,v=e.onLoad,y=e.onError;o(e,["isOffscreen","tagType","librarySectionType","title","url","width","height","transitionProps","onLoad","onError"]);if(t)return null;if(u)return{$$typeof:s,type:b.default,key:null,ref:null,props:r(b.default.defaultProps,{url:u,width:d,height:f,transitionProps:h,backgroundPosition:"top center",
onLoad:v,onError:y}),_owner:null};var w=p.default.get(n),P=w.typeString;if("actor"===P||"director"===P||"writer"===P)return{$$typeof:s,type:m.default,key:null,ref:null,props:r(m.default.defaultProps,{name:l,width:d,height:f}),_owner:null};var _=c.default.get(i),S=_.typeString,x=a(S);return{$$typeof:s,type:g.default,key:null,ref:null,props:r(g.default.defaultProps,{type:x,width:d,height:f}),_owner:null}}var r=n(14).default,s=n(13).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var u=n(7),d=(l(u),n(93)),c=l(d),f=n(326),p=l(f),h=n(1401),m=l(h),v=n(573),g=l(v),y=n(347),b=l(y);i.propTypes={title:u.PropTypes.string.isRequired,tagType:u.PropTypes.oneOfType([u.PropTypes.number,u.PropTypes.string]).isRequired,librarySectionType:u.PropTypes.oneOfType([u.PropTypes.number,u.PropTypes.string]).isRequired,isOffscreen:u.PropTypes.bool,width:u.PropTypes.number.isRequired,height:u.PropTypes.number.isRequired,url:u.PropTypes.oneOfType([u.PropTypes.func,u.PropTypes.string]),transitionProps:u.PropTypes.object,
onLoad:u.PropTypes.func,onError:u.PropTypes.func},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(6)),f=u(c),p=n(27),h=n(29),m=u(h),v=n(49),g=u(v),y=n(557),b=u(y),w=n(1663),P=u(w),_=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={
sliderValue:e.columnAdjustment*-1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._clearTimeout()}},{key:"_clearTimeout",value:function(){this._columnAdjustmentTimeoutID&&clearTimeout(this._columnAdjustmentTimeoutID)}},{key:"onSliderChange",decorators:[p.autobind],value:function(e){var t=this,n=e.steppedValue;this.setState({sliderValue:n}),this._clearTimeout(),this._columnAdjustmentTimeoutID=setTimeout(function(){
t.props.onColumnAdjustmentChange(n*-1)},this.props.columnAdjustmentTimeout)}},{key:"render",value:function(){return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{className:P.default.slider,label:(0,f.default)("Poster Size"),value:this.state.sliderValue,min:-1,max:2,stepSize:1,onChange:this.onSliderChange}),_owner:null},{$$typeof:o,type:g.default,key:null,ref:null,props:l(g.default.defaultProps,{name:"plex-icon-toolbar-grid-560",
className:P.default.sliderIcon}),_owner:null}],className:P.default.sliderContainer},_owner:null}}}]),t}(d.Component);_.propTypes={columnAdjustment:d.PropTypes.number.isRequired,columnAdjustmentTimeout:d.PropTypes.number.isRequired,onColumnAdjustmentChange:d.PropTypes.func.isRequired},_.defaultProps={columnAdjustmentTimeout:500},t.default=_,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.title;return{$$typeof:i,type:"span",key:null,ref:null,props:{children:n,className:t
},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7);r(s);a.propTypes={className:s.PropTypes.string,title:s.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.childCount,a=void 0;return null!=n&&(a=1===n?(0,l.default)("{1} album",n):(0,l.default)("{1} albums",n)),{$$typeof:i,type:"span",key:null,ref:null,props:{children:a,className:t},_owner:null}}var i=n(13).default,r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(6)),l=r(o);a.propTypes={className:s.PropTypes.string,childCount:s.PropTypes.number},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.date;return{$$typeof:i,type:"span",key:null,ref:null,props:{children:(0,l.default)(n),className:t},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(145)),l=r(o);a.propTypes={className:s.PropTypes.string,
date:s.PropTypes.number},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.leafCount,a=void 0;return null!=n&&(a=1===n?(0,l.default)("{1} episode",n):(0,l.default)("{1} episodes",n)),{$$typeof:i,type:"span",key:null,ref:null,props:{children:a,className:t},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(6)),l=r(o);a.propTypes={className:s.PropTypes.string,leafCount:s.PropTypes.number
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.index,a=e.originallyAvailableAt,r=(0,l.default)({episodePrefix:"Episode {1}",episodeIndex:n,date:a,noLeadingZero:!0});return{$$typeof:i,type:"span",key:null,ref:null,props:{children:r,className:t},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(181)),l=r(o);a.propTypes={className:s.PropTypes.string,index:s.PropTypes.number,originallyAvailableAt:s.PropTypes.string
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=s(e,["className"]);return{$$typeof:i,type:"span",key:null,ref:null,props:{children:[{$$typeof:i,type:p.default,key:null,ref:null,props:r(p.default.defaultProps,{className:n.isSecondary&&b.default.isSecondary,server:n.server,linkKey:n.metadataKey,linkTitle:n.title}),_owner:null},w,u.default.createElement(g.default,n)],className:t},_owner:null}}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(122),c=o(d),f=n(351),p=o(f),h=n(352),m=o(h),v=n(576),g=o(v),y=n(619),b=o(y),w={$$typeof:i,type:m.default,key:null,ref:null,props:r(m.default.defaultProps,{}),_owner:null};a.propTypes={className:l.PropTypes.string,server:c.default,metadataKey:l.PropTypes.string,title:l.PropTypes.string,isSecondary:l.PropTypes.bool},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.leafCount,a=void 0;
return null!=n&&(a=1===n?(0,l.default)("{1} item",n):(0,l.default)("{1} items",n)),{$$typeof:i,type:"span",key:null,ref:null,props:{children:a,className:t},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(6)),l=r(o);a.propTypes={className:s.PropTypes.string,leafCount:s.PropTypes.number},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.duration,a=e.viewOffset,r=void 0;if(n&&a){var s=(n-a)/1e3;
s&&(r=(0,l.default)(s))}return{$$typeof:i,type:"div",key:null,ref:null,props:{children:r,className:t},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(179)),l=r(o);a.propTypes={className:s.PropTypes.string,duration:s.PropTypes.number,viewOffset:s.PropTypes.number},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.childCount,a=void 0;return null!=n&&(a=1===n?(0,l.default)("{1} season",n):(0,
l.default)("{1} seasons",n)),{$$typeof:i,type:"span",key:null,ref:null,props:{children:a,className:t},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(6)),l=r(o);a.propTypes={className:s.PropTypes.string,childCount:s.PropTypes.number},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.tabIndex,a=s(e,["className","tabIndex"]);return{$$typeof:i,type:"span",key:null,ref:null,props:{children:[{
$$typeof:i,type:f.default,key:null,ref:null,props:r(f.default.defaultProps,{className:a.isSecondary&&v.default.isSecondary,tabIndex:n,server:a.server,linkKey:a.grandparentKey,linkTitle:a.grandparentTitle}),_owner:null},g,{$$typeof:i,type:f.default,key:null,ref:null,props:r(f.default.defaultProps,{className:a.isSecondary&&v.default.isSecondary,tabIndex:n,server:a.server,linkKey:a.parentKey,linkTitle:a.parentTitle}),_owner:null}],className:t},_owner:null}}var i=n(13).default,r=n(14).default,s=n(16).default,o=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=(o(l),n(122)),d=o(u),c=n(351),f=o(c),p=n(352),h=o(p),m=n(619),v=o(m),g={$$typeof:i,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{}),_owner:null};a.propTypes={className:l.PropTypes.string,tabIndex:l.PropTypes.string,server:d.default.isRequired,isSecondary:l.PropTypes.bool},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.year;return{$$typeof:i,type:"span",key:null,ref:null,
props:{children:n,className:t},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7);r(s);a.propTypes={className:s.PropTypes.string,year:s.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(13).default,l=n(16).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=d(c),p=n(6),h=d(p),m=n(29),v=d(m),g=n(122),y=d(g),b=n(43),w=d(b),P=function(e){
function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.server,a=e.onPress,i=l(e,["className","server","onPress"]);if(!n.friendlyName)return null;var r=encodeURIComponent(n.machineIdentifier);return{$$typeof:o,type:"span",key:null,ref:null,props:{children:[(0,h.default)("on")," ",f.default.createElement(w.default,u({
title:n.friendlyName,to:"#!/server/"+r+"/dashboard",onPress:a},i),n.friendlyName)],className:t},_owner:null}}}]),t}(c.Component);P.propTypes={className:c.PropTypes.string,server:y.default.isRequired,onPress:c.PropTypes.func},t.default=P,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return!!p.default.find(e,function(e){return t[e]})}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(13).default,u=n(14).default,d=n(12).default,c=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var f=n(3),p=c(f),h=n(7),m=c(h),v=n(6),g=c(v),y=n(27),b=n(29),w=c(b),P=n(1425),_=c(P),S=n(579),x=c(S),C=n(580),T=c(C),k=n(578),I=c(k),M=n(581),A=c(M),E=n(353),O=c(E),D=["showOptimize"],R=function(e){function t(e,n){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1}}return r(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{metadataListEntityID:this.props.metadataListEntityID
}}},{key:"onPlayAllPress",decorators:[y.autobind],value:function(e){this.props.playMetadataList(this._getActionPayload())}},{key:"onShufflePress",decorators:[y.autobind],value:function(e){this.props.shuffleMetadataList(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[y.autobind],value:function(e){this.props.addMetadataListToPlaylist(this._getActionPayload())}},{key:"onSyncPress",decorators:[y.autobind],value:function(e){this.props.syncMetadataList(this._getActionPayload())}},{key:"onActionsPress",
decorators:[y.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[y.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.showPlayAll,n=e.showShuffle,i=e.showAddToPlaylist,r=e.showSync,s=this.state.isActionsMenuOpen,o=a(D,this.props);return{$$typeof:l,type:"div",key:null,ref:null,props:{children:[t&&{$$typeof:l,type:x.default,key:null,ref:null,props:u(x.default.defaultProps,{
playLabel:(0,g.default)("Play All"),onPress:this.onPlayAllPress}),_owner:null},n&&{$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{onPress:this.onShufflePress}),_owner:null},i&&{$$typeof:l,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{onPress:this.onAddToPlaylistPress}),_owner:null},r&&{$$typeof:l,type:A.default,key:null,ref:null,props:u(A.default.defaultProps,{onPress:this.onSyncPress}),_owner:null},o&&m.default.createElement(O.default,{ref:"moreButton",
icon:"plex-icon-toolbar-more-560",label:(0,g.default)("More..."),isMenuOpen:s,onPress:this.onActionsPress}),m.default.createElement(_.default,d({target:this.refs.moreButton,isOpen:s,onMenuClose:this.onActionsMenuClose},this.props,{showPlayAll:!1,showShuffle:!1,showAddToPlaylist:!1,showSync:!1}))]},_owner:null}}}]),t}(h.Component);R.propTypes={metadataListEntityID:h.PropTypes.string.isRequired,showPlayAll:h.PropTypes.bool,showShuffle:h.PropTypes.bool,showAddToPlaylist:h.PropTypes.bool,showSync:h.PropTypes.bool,
showOptimize:h.PropTypes.bool,playMetadataList:h.PropTypes.func,shuffleMetadataList:h.PropTypes.func,addMetadataListToPlaylist:h.PropTypes.func,syncMetadataList:h.PropTypes.func,optimizeMetadataList:h.PropTypes.func},t.default=R,e.exports=t.default},function(e,t,n){"use strict";function a(e){return u.default.createElement(m.default,s({tooltip:(0,c.default)("Edit")},e),{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{name:"plex-icon-toolbar-edit-560","aria-label":(0,c.default)("Edit")
}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(49),p=o(f),h=n(160),m=o(h);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=d(c),p=n(6),h=d(p),m=n(27),v=n(29),g=d(v),y=n(349),b=d(y),w=n(137),P=d(w),_=n(254),S=d(_),x=n(353),C=d(x),T=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMenuOpen:!1,isMarkWatchedModalOpen:!1,isMarkUnwatchedModalOpen:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"onMenuButtonPress",decorators:[m.autobind],value:function(e){this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[m.autobind],value:function(){this.setState({isMenuOpen:!1})}},{key:"onMarkWatchedPress",
decorators:[m.autobind],value:function(e){this.setState({isMarkWatchedModalOpen:!0})}},{key:"onMarkUnwatchedPress",decorators:[m.autobind],value:function(e){this.setState({isMarkUnwatchedModalOpen:!0})}},{key:"onMarkWatchedConfirm",decorators:[m.autobind],value:function(){this.setState({isMarkWatchedModalOpen:!1}),this.props.onMarkWatchedConfirm()}},{key:"onMarkWatchedCancel",decorators:[m.autobind],value:function(){this.setState({isMarkWatchedModalOpen:!1})}},{key:"onMarkUnwatchedConfirm",decorators:[m.autobind],
value:function(){this.setState({isMarkUnwatchedModalOpen:!1}),this.props.onMarkUnwatchedConfirm()}},{key:"onMarkUnwatchedCancel",decorators:[m.autobind],value:function(){this.setState({isMarkUnwatchedModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.numSelectedItems,n=e.showMarkWatched,a=e.showMarkUnwatched,i=this.state,r=i.isMenuOpen,s=i.isMarkWatchedModalOpen,d=i.isMarkUnwatchedModalOpen;return f.default.createElement(C.default,u({ref:"watchedButton",icon:"plex-icon-toolbar-watched-toggle-560",
label:(0,h.default)("Toggle Watched..."),isMenuOpen:r,onPress:this.onMenuButtonPress},this.props),{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[n&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Mark Watched"),onPress:this.onMarkWatchedPress}),_owner:null},a&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Mark Unwatched"),onPress:this.onMarkUnwatchedPress
}),_owner:null}],target:this.refs.watchedButton,isOpen:r,onMenuClose:this.onMenuClose}),_owner:null},{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{isOpen:s,metricsPage:"confirmMarkWatched",title:(0,h.default)("Mark Watched"),message:1===t?(0,h.default)("Are you sure you want to mark this item as watched?"):(0,h.default)("Are you sure you want to mark these {1} items as watched?",t),onConfirm:this.onMarkWatchedConfirm,onCancel:this.onMarkWatchedCancel}),_owner:null},{
$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{isOpen:d,metricsPage:"confirmMarkUnwatched",title:(0,h.default)("Mark Unwatched"),message:1===t?(0,h.default)("Are you sure you want to mark this item as unwatched?"):(0,h.default)("Are you sure you want to mark these {1} items as unwatched?",t),onConfirm:this.onMarkUnwatchedConfirm,onCancel:this.onMarkUnwatchedCancel}),_owner:null})}}]),t}(c.Component);T.propTypes={numSelectedItems:c.PropTypes.number.isRequired,showMarkWatched:c.PropTypes.bool.isRequired,
showMarkUnwatched:c.PropTypes.bool.isRequired,onMarkWatchedConfirm:c.PropTypes.func.isRequired,onMarkUnwatchedConfirm:c.PropTypes.func.isRequired},t.default=T,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=i(e,["children"]);return l.default.createElement(d.default,r({className:f.default.page},n),t)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(86),d=s(u),c=n(1667),f=s(c);a.propTypes={children:o.PropTypes.node
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.machineIdentifier,a=e.isWaitingForPrimaryServer,l=e.primaryServerEntityID,u=s(e,["children","machineIdentifier","isWaitingForPrimaryServer","primaryServerEntityID"]),d=(0,g.default)(m.SERVER,n),f=!d||d===l;return l&&f?c.default.createElement(C.default,o({serverEntityID:l},u),t):a||!f?{$$typeof:r,type:S.default,key:null,ref:null,props:i(S.default.defaultProps,{children:{$$typeof:r,type:b.default,key:null,
ref:null,props:i(b.default.defaultProps,{label:(0,p.default)("Connecting")}),_owner:null}}),_owner:null}:T}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(12).default,l=n(1).default,u=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=l(d),f=n(6),p=l(f),h=n(78),m=u(h),v=n(77),g=l(v),y=n(70),b=l(y),w=n(582),P=l(w),_=n(202),S=l(_),x=n(1450),C=l(x),T={$$typeof:r,type:P.default,key:null,ref:null,props:i(P.default.defaultProps,{}),_owner:null};a.propTypes={children:d.PropTypes.node.isRequired,
machineIdentifier:d.PropTypes.string,isWaitingForPrimaryServer:d.PropTypes.bool.isRequired,primaryServerEntityID:d.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.showLibrariesSpinner,a=e.showLibrariesError,o=s(e,["children","showLibrariesSpinner","showLibrariesError"]);if(n)return{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{
label:(0,c.default)("Loading libraries")}),_owner:null}}),_owner:null};if(a)return{$$typeof:r,type:g.default,key:null,ref:null,props:i(g.default.defaultProps,{title:(0,c.default)("There was an unexpected error loading libraries")}),_owner:null};var l=u.default.Children.only(t);return u.default.cloneElement(l,o)}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(70),p=o(f),h=n(202),m=o(h),v=n(358),g=o(v);
a.propTypes={children:l.PropTypes.node.isRequired,showLibrariesSpinner:l.PropTypes.bool.isRequired,showLibrariesError:l.PropTypes.bool.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.children,n=e.friendlyName,a=e.isConnected,o=e.isUnavailable,l=e.isUnauthorized,d=e.isFullServer,f=e.isFullOwnedServer,h=e.hasHttpsConnections,v=e.requiresFullServer,y=e.requiresFullOwnedServer,w=s(e,["children","friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections","requiresFullServer","requiresFullOwnedServer"]);
if(a){if(v&&!d||y&&!f)return{$$typeof:r,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{title:(0,c.default)("You're not supposed to be here"),description:n?(0,c.default)('This page is restricted from the server "{1}"',n):(0,c.default)("This page is restricted from this server")}),_owner:null};var P=u.default.Children.only(t);return u.default.cloneElement(P,w)}if(o){var _=void 0;return p.default.isHostedHttps&&!h&&(_=(0,c.default)('Tip: If "Secure connections" in your server\'s network settings is disabled, select "Preferred" to use the secure web app')),
{$$typeof:r,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{title:n?(0,c.default)('The server "{1}" is unavailable',n):(0,c.default)("This server is unavailable"),description:(0,c.default)("Plex will automatically try to reconnect to this server"),footer:_}),_owner:null}}if(l)return{$$typeof:r,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{title:(0,c.default)("No soup for you!"),description:(0,c.default)("You do not have access to this server")}),_owner:null};var S=n?(0,
c.default)("Connecting to {1}",n):(0,c.default)("Connecting");return{$$typeof:r,type:g.default,key:null,ref:null,props:i(g.default.defaultProps,{children:{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{label:S}),_owner:null}}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(58),p=o(f),h=n(70),m=o(h),v=n(202),g=o(v),y=n(138),b=o(y);a.propTypes={children:l.PropTypes.node.isRequired,
friendlyName:l.PropTypes.string,isConnected:l.PropTypes.bool.isRequired,isUnavailable:l.PropTypes.bool.isRequired,isUnauthorized:l.PropTypes.bool.isRequired,isFullServer:l.PropTypes.bool.isRequired,isFullOwnedServer:l.PropTypes.bool.isRequired,hasHttpsConnections:l.PropTypes.bool.isRequired,requiresFullServer:l.PropTypes.bool,requiresFullOwnedServer:l.PropTypes.bool},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,c.createSelector)((0,p.default)(),function(e){var t=o.default.pick(e,"friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections");
return t})}function i(e){return u.default.createElement(m.default,e)}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(7),u=r(l),d=n(34),c=n(30),f=n(76),p=r(f),h=n(1449),m=r(h);i.propTypes={serverEntityID:l.PropTypes.string.isRequired},t.default=(0,d.connect)(a)(i),e.exports=t.default},function(e,t,n){"use strict";function a(e){return p.default.createElement(k.default,l({component:"div"},e))}function i(e){var t=e.className,n=e.children;return{$$typeof:s,type:"div",
key:null,ref:null,props:{children:n,className:t},_owner:null}}function r(e){var t=e.children,n=e.closedNode,r=e.title,l=e.isOpen,u=e.updateUserError,d=e.isUpdatingUser,f=e.onSubmit,p=e.onErrorDismiss,h=e.onTogglePress,v=l?i:a;return{$$typeof:s,type:"div",key:null,ref:null,props:{children:[l&&u&&{$$typeof:s,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{errorMessage:(0,y.getErrorText)(c.default.first(u.request)),onErrorDismiss:p}),_owner:null},{$$typeof:s,type:v,key:null,ref:null,
props:o(v.defaultProps,{children:[{$$typeof:s,type:k.default,key:null,ref:null,props:o(k.default.defaultProps,{children:l?(0,g.default)("Cancel"):(0,g.default)("Edit"),className:E.default.sectionEditLink,onPress:h}),_owner:null},l?{$$typeof:s,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:[t,{$$typeof:s,type:"div",key:null,ref:null,props:{children:{$$typeof:s,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:(0,g.default)("Save Changes"),type:"submit",
isSpinning:d,kind:b.PRIMARY}),_owner:null},className:E.default.submitButton},_owner:null}],onSubmit:f}),_owner:null}:{$$typeof:s,type:"div",key:null,ref:null,props:{children:[{$$typeof:s,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{children:r,className:E.default.sectionLabel}),_owner:null},n],className:E.default.sectionDetails},_owner:null}],onPress:l?null:h,className:(0,m.default)(E.default.section,l?E.default.isOpen:E.default.isClosed)}),_owner:null}],className:E.default.sectionWrapper
},_owner:null}}var s=n(13).default,o=n(14).default,l=n(12).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=u(d),f=n(7),p=u(f),h=n(32),m=u(h),v=n(6),g=u(v),y=n(228),b=n(332),w=n(1407),P=u(w),_=n(158),S=u(_),x=n(1408),C=u(x),T=n(43),k=u(T),I=n(1404),M=u(I),A=n(1673),E=u(A);i.propTypes={className:f.PropTypes.string,children:f.PropTypes.node},r.propTypes={children:f.PropTypes.node,closedNode:f.PropTypes.node,title:f.PropTypes.string,isOpen:f.PropTypes.bool,isUpdatingUser:f.PropTypes.bool,
updateUserError:f.PropTypes.object,onSubmit:f.PropTypes.func,onTogglePress:f.PropTypes.func,onErrorDismiss:f.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.hasPlexPass;return t?{$$typeof:i,type:"h2",key:null,ref:null,props:{children:[(0,P.default)("Account")," \u2014 ",J],className:X.default.header},_owner:null}:{$$typeof:i,type:"h2",key:null,ref:null,props:{children:(0,P.default)("Account"),className:X.default.header},_owner:null}}var i=n(13).default,r=n(21).default,s=n(22).default,o=n(28).default,l=n(20).default,u=n(12).default,d=n(52).default,c=n(14).default,f=n(16).default,p=n(262).default,h=n(1).default,m=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var v=n(3),g=h(v),y=n(7),b=h(y),w=n(6),P=h(w),_=n(229),S=h(_),x=n(27),C=n(228),T=n(1524),k=m(T),I=n(158),M=h(I),A=n(1406),E=h(A),O=n(1412),D=h(O),R=n(1409),L=h(R),N=n(1411),j=h(N),U=n(255),F=h(U),B=n(138),z=h(B),$=n(1413),V=h($),H=n(1403),q=h(H),W=n(1451),K=h(W),Q=n(1454),Y=h(Q),G=n(1674),X=h(G),J={$$typeof:i,type:q.default,key:null,ref:null,props:c(q.default.defaultProps,{}),_owner:null};a.propTypes={hasPlexPass:y.PropTypes.bool.isRequired};var Z=function(e){
function t(e,n){l(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={AccountFormSections:{isUsernameOpen:!1,isEmailOpen:!1,isPasswordOpen:!1,isLocaleOpen:!1,isPhotoOpen:!1,isNewsletterOpen:!1}}}return s(t,e),o(t,[{key:"componentWillReceiveProps",value:function(e){if(this.props.isUpdatingUser&&!e.isUpdatingUser&&!e.updateUserError){var t=this.state.AccountFormSections;this.setState({AccountFormSections:g.default.mapObject(t,function(){return!1})})}}},{key:"onFormSubmit",
decorators:[x.autobind],value:function(e){this.props.updateUser(e)}},{key:"onErrorDismiss",decorators:[x.autobind],value:function(e){e.preventDefault(),this.props.clearUpdateUserError()}},{key:"createToggleHandler",decorators:[x.autobind],value:function(e){var t=this;return function(n){n.preventDefault();var a=t.state.AccountFormSections,i=a[e];t.props.updateUserError&&t.props.clearUpdateUserError(),t.setState({AccountFormSections:u({},g.default.mapObject(a,function(){return!1}),d({},e,!i))})}}},{
key:"getAccountFormSectionProps",decorators:[x.autobind],value:function(e,t){return{title:e,onTogglePress:this.createToggleHandler(t),isOpen:this.state.AccountFormSections[t],onSubmit:this.onFormSubmit,onErrorDismiss:this.onErrorDismiss,isUpdatingUser:this.props.isUpdatingUser,updateUserError:this.props.updateUserError}}},{key:"render",value:function(){var e=this.props,t=e.user,n=f(e,["user"]),r=g.default.mapObject(n.updateUserError,function(e){return e.map(function(e){return(0,C.getErrorText)(e);
})}),s=(0,P.default)("System Default"),o=g.default.map(S.default,function(e,t){return d({},t,e)});return t.restricted?{$$typeof:i,type:z.default,key:null,ref:null,props:c(z.default.defaultProps,{title:(0,P.default)("You're not supposed to be here"),description:(0,P.default)("Managed users are restricted from account settings")}),_owner:null}:{$$typeof:i,type:F.default,key:null,ref:null,props:c(F.default.defaultProps,{children:{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:a,
key:null,ref:null,props:c(a.defaultProps,{hasPlexPass:t.hasPlexPass}),_owner:null},b.default.createElement(K.default,u({},this.getAccountFormSectionProps((0,P.default)("Photo"),"isPhotoOpen"),{closedNode:{$$typeof:i,type:V.default,key:null,ref:null,props:c(V.default.defaultProps,{url:this.props.user.thumbTranscodeUrl,width:80,height:80}),_owner:null}}),{$$typeof:i,type:M.default,key:null,ref:null,props:c(M.default.defaultProps,{children:(0,P.default)("Photo")}),_owner:null},{$$typeof:i,type:Y.default,
key:null,ref:null,props:c(Y.default.defaultProps,{name:"avatar",width:180,height:180,isDeletingAvatar:this.props.isDeletingAvatar,initialValue:this.props.user.thumb,thumb:this.props.user.thumbTranscodeUrl}),_owner:null}),b.default.createElement(K.default,u({},this.getAccountFormSectionProps((0,P.default)("Language"),"isLocaleOpen"),{closedNode:S.default[t.locale]||s}),{$$typeof:i,type:j.default,key:null,ref:null,props:c(j.default.defaultProps,{labelText:(0,P.default)("Language"),name:"locale",initialValue:t.locale,
values:[{"":s}].concat(p(o))}),_owner:null},{$$typeof:i,type:"p",key:null,ref:null,props:{children:(0,P.default)("This sets the default language for Plex applications that do not provide their own language setting."),className:X.default.help},_owner:null}),b.default.createElement(K.default,u({},this.getAccountFormSectionProps((0,P.default)("Username"),"isUsernameOpen"),{closedNode:t.username}),{$$typeof:i,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{labelText:(0,P.default)("Username"),
name:"username",initialValue:t.username,errors:r.username,validations:[k.isUsernameRequired]}),_owner:null},{$$typeof:i,type:"p",key:null,ref:null,props:{children:(0,P.default)("Your username will be visible to friends with whom you have shared your server."),className:X.default.help},_owner:null},{$$typeof:i,type:E.default,key:null,ref:null,props:c(E.default.defaultProps,{name:"emailOnlyAuth",checkboxText:(0,P.default)("Allow username to be used when signing in"),initialValue:t.emailOnlyAuth,checkedValue:!1,
uncheckedValue:!0}),_owner:null},{$$typeof:i,type:"p",key:null,ref:null,props:{children:(0,P.default)("Your email address will be required to sign in when username sign-in is not allowed."),className:X.default.help},_owner:null}),b.default.createElement(K.default,u({},this.getAccountFormSectionProps((0,P.default)("Email Address"),"isEmailOpen"),{closedNode:t.email}),{$$typeof:i,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{labelText:(0,P.default)("Email Address"),name:"email",initialValue:t.email,
errors:r.email,validations:[k.isEmailRequired]}),_owner:null},{$$typeof:i,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{labelText:(0,P.default)("Password"),type:"password",name:"currentPassword",initialValue:"",validations:[k.isPasswordRequired]}),_owner:null}),b.default.createElement(K.default,u({},this.getAccountFormSectionProps((0,P.default)("Password"),"isPasswordOpen"),{closedNode:"**********"}),{$$typeof:i,type:L.default,key:null,ref:null,props:c(L.default.defaultProps,{labelText:(0,
P.default)("New Password"),name:"password",initialValue:"",errors:r.password,validations:[k.isPasswordRequired,k.password]}),_owner:null},{$$typeof:i,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{labelText:(0,P.default)("Confirm New Password"),type:"password",name:"passwordConfirmation",initialValue:"",validations:[k.isConfirmRequired,k.confirmPassword]}),_owner:null},{$$typeof:i,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{labelText:(0,P.default)("Current Password"),
type:"password",name:"currentPassword",initialValue:"",validations:[k.isCurrentPasswordRequired]}),_owner:null},{$$typeof:i,type:E.default,key:null,ref:null,props:c(E.default.defaultProps,{checkboxText:(0,P.default)("Sign out connected devices after password change"),name:"resetDevices",initialValue:!1}),_owner:null}),b.default.createElement(K.default,u({},this.getAccountFormSectionProps((0,P.default)("Plex News"),"isNewsletterOpen"),{closedNode:t.mailingListActive?(0,P.default)("You are currently subscribed"):(0,
P.default)("You are not subscribed")}),{$$typeof:i,type:E.default,key:null,ref:null,props:c(E.default.defaultProps,{name:"mailingListActive",initialValue:t.mailingListActive,labelText:(0,P.default)("Plex News"),checkboxText:(0,P.default)("Subscribe to our amazing, but infrequent email newsletter")}),_owner:null})],className:X.default.content},_owner:null},className:X.default.page}),_owner:null}}}]),t}(y.Component);Z.propTypes={isUpdatingUser:y.PropTypes.bool,isDeletingAvatar:y.PropTypes.bool,updateUserError:y.PropTypes.object,
user:y.PropTypes.shape({thumb:y.PropTypes.string,thumbTranscodeUrl:y.PropTypes.func,username:y.PropTypes.string,email:y.PropTypes.string}),updateUser:y.PropTypes.func,clearUpdateUserError:y.PropTypes.func},t.default=Z,e.exports=t.default},function(e,t,n){"use strict";function a(e){return l.default.createElement(m.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=i(r),o=n(7),l=i(o),u=n(34),d=n(30),c=n(225),f=i(c),p=n(337),h=n(1452),m=i(h),v=(0,d.createSelector)(f.default,function(e){
var t=e.desktop;return{user:s.default.pick(e,"username","email","emailOnlyAuth","thumb","thumbTranscodeUrl","locked","locale","hasPlexPass","mailingListActive","restricted"),isUpdatingUser:t.isUpdatingUser,updateUserError:t.updateUserError}}),g={updateUser:p.updateUser,clearUpdateUserError:p.clearUpdateUserError};t.default=(0,u.connect)(v,g)(a),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(13).default,u=n(14).default,d=n(1).default,c=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=d(f),h=n(7),m=d(h),v=n(27),g=n(23),y=c(g),b=n(6),w=d(b),P=n(180),_=d(P),S=n(29),x=d(S),C=n(49),T=d(C),k=n(557),I=d(k),M=n(157),A=d(M),E=n(201),O=d(E),D=n(1675),R=d(D),L={$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{name:"plex-icon-avatar-crop-min-560"}),_owner:null},N={$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{name:"plex-icon-avatar-crop-max-560"}),_owner:null},j=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={drag:!1,thumb:p.default.result(this.props,"thumb"),dragX:0,dragY:0,minScale:.1,maxScale:1,scale:.1,offsetX:0,offsetY:0}}return i(t,e),r(t,[{key:"componentDidMount",value:function(){this.paint(),this.loadImage(this.state.thumb)}},{key:"componentWillReceiveProps",value:function(e){if(this.props.thumb!==e.thumb){var t=p.default.result(this.props,"thumb");this.setState({thumb:t}),this.loadImage(t);
}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,x.default)(this,e,t)}},{key:"componentDidUpdate",value:function(){this.paint()}},{key:"componentWillUnmount",value:function(){this.stopListeningForDrag()}},{key:"listenForDrag",value: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));
}},{key:"stopListeningForDrag",value: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)}},{key:"startDrag",value:function(e,t,n){this.listenForDrag(n),this.setState({drag:!0,dragX:e,dragY:t})}},{key:"drag",value:function(e,t){var n=this;this.state.drag&&this.setState(function(a){
var i=a.offsetX,r=a.offsetY,s=a.dragX,l=a.dragY,u=a.scale,d=n.image.width*u,c=n.image.height*u,f=n.props.width-d,p=n.props.height-c,h=Math.max(f,Math.min(i-(s-e),0)),m=Math.max(p,Math.min(r-(l-t),0));return o({},a,{dragX:e,dragY:t,offsetX:h,offsetY:m})})}},{key:"stopDrag",value:function(){var e=this;this.stopListeningForDrag(),this.setState({drag:!1},function(){return e.props.onChange(e.getImage())})}},{key:"loadImage",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?this.props:arguments[1],a=new Image;
a.onload=function(){return t.imageOnLoad(a)},/^https?:\/\//.test(e)&&a.setAttribute("crossOrigin","anonymous");var i=e;if(0!==e.indexOf("data:")){var r=(0,_.default)(),s={width:Math.round(n.width*r),height:Math.round(n.height*r),minSize:1},o=e.indexOf("?");o>-1?(i=y.join(e.substring(0,o),s),i+=i.indexOf("?")===-1?"?":"&",i+=e.substring(o+1)):i=y.join(i,s)}a.src=i}},{key:"imageOnLoad",value:function(e){var t=this;this.image=e;var n=e.width>e.height?e.height:e.width,a=n>this.props.width?this.props.width/n:1,i=n<=this.props.width?2:1;
this.setState({drag:!1,dragX:0,dragY:0,minScale:a,maxScale:i,scale:a,offsetX:0,offsetY:0},function(){return t.props.onChange(t.getImage())})}},{key:"paint",value:function(){var e=this.props,t=e.width,n=e.height,a=this.refs.canvas.getContext("2d");a.clearRect(0,0,t,n),this.image&&this.drawImage(a);var i=document.createElement("canvas");i.width=t,i.height=n;var r=i.getContext("2d");r.fillStyle="rgba(0,0,0,0.6)",r.fillRect(0,0,i.width,i.height),r.globalCompositeOperation="destination-out",r.arc(t/2,n/2,t/2,0,2*Math.PI),
r.fill(),a.drawImage(i,0,0)}},{key:"drawImage",decorators:[v.autobind],value:function(e){e.drawImage(this.image,this.state.offsetX,this.state.offsetY,Math.max(this.props.width,this.image.width*this.state.scale),Math.max(this.props.height,this.image.height*this.state.scale))}},{key:"onMouseDown",decorators:[v.autobind],value:function(e){e.preventDefault(),this.startDrag(e.clientX,e.clientY)}},{key:"onTouchStart",decorators:[v.autobind],value:function(e){e.preventDefault();var t=e.touches.item(0);t&&this.startDrag(t.clientX,t.clientY,!0);
}},{key:"onTouchMove",decorators:[v.autobind],value:function(e){var t=e.touches.item(0);t&&this.drag(t.clientX,t.clientY)}},{key:"onMouseMove",decorators:[v.autobind],value:function(e){this.drag(e.clientX,e.clientY)}},{key:"onMouseUp",decorators:[v.autobind],value:function(){this.stopDrag()}},{key:"onTouchEnd",decorators:[v.autobind],value:function(){this.stopDrag()}},{key:"onFileDrop",decorators:[v.autobind],value:function(e){var t=this;e.stopPropagation(),e.preventDefault();var n=void 0;if(e.dataTransfer&&e.dataTransfer.files.length?n=e.dataTransfer.files[0]:e.target.files&&e.target.files.length&&(n=e.target.files[0]),
n){var a=new FileReader;a.onload=function(e){return t.loadImage(e.target.result)},a.readAsDataURL(n)}}},{key:"getImage",decorators:[v.autobind],value:function(){var e=document.createElement("canvas"),t=e.getContext("2d");e.height=this.props.height,e.width=this.props.width,this.drawImage(t);var n=e.toDataURL();return n}},{key:"onDragOver",value:function(e){var t=e||window.event;t.preventDefault()}},{key:"onSliderChange",decorators:[v.autobind],value:function(e){var t=this,n=e.steppedValue;this.setState(function(e){
return o({},e,{scale:n})},function(){return t.props.onChange(t.getImage())})}},{key:"render",value:function(){return{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[m.default.createElement("canvas",{ref:"canvas",width:this.props.width,height:this.props.height,onTouchStart:this.onTouchStart,onMouseDown:this.onMouseDown}),{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"span",key:null,ref:null,props:{children:L,
className:R.default.sliderEnd},_owner:null},{$$typeof:l,type:"span",key:null,ref:null,props:{children:{$$typeof:l,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{className:R.default.slider,min:this.state.minScale,max:this.state.maxScale,step:.1,value:this.state.scale,onChange:this.onSliderChange}),_owner:null},className:R.default.sliderWrapper},_owner:null},{$$typeof:l,type:"span",key:null,ref:null,props:{children:N,className:R.default.sliderEnd},_owner:null}],className:R.default.sliderContainer
},_owner:null}],className:R.default.avatarPane},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"p",key:null,ref:null,props:{children:{$$typeof:l,type:A.default,key:null,ref:null,props:u(A.default.defaultProps,{children:[(0,w.default)("Choose Photo"),{$$typeof:l,type:"input",key:null,ref:null,props:{style:{display:"none"},type:"file",onChange:this.onFileDrop,accept:"image/*"},_owner:null}],component:"label",className:R.default.avatarActionButtons}),_owner:null
}},_owner:null},{$$typeof:l,type:"p",key:null,ref:null,props:{children:(0,w.default)("You can scale your photo using the slider below, and adjust the crop by dragging it within the circle."),className:R.default.help},_owner:null}],className:R.default.avatarTextPane},_owner:null}],className:R.default.avatarContainer,onDrop:this.onFileDrop,onDragOver:this.onDragOver},_owner:null}}}]),t}(h.Component);j.propTypes={thumb:h.PropTypes.oneOfType([h.PropTypes.func,h.PropTypes.string]).isRequired,height:h.PropTypes.number,
width:h.PropTypes.number,onChange:h.PropTypes.func},j.defaultProps={height:200,width:200,onChange:function(){}},t.default=(0,O.default)(j),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.selectedLibraryEntityID,n=e.libraryEntityIDs,a=e.machineIdentifier,l=s(e,["selectedLibraryEntityID","libraryEntityIDs","machineIdentifier"]),u=encodeURIComponent(a);return d.default.createElement(m.default,o({scrollerProps:_},l),{$$typeof:r,type:g.default,key:"all",ref:null,props:i(g.default.defaultProps,{
children:(0,f.default)("All Libraries"),to:"#!/server/"+u+"/dashboard",isSelected:!t}),_owner:null},n.map(function(e){return{$$typeof:r,type:b.default,key:e,ref:null,props:i(b.default.defaultProps,{libraryEntityID:e,machineIdentifier:a,isSelected:t===e}),_owner:null}}))}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(6),f=l(c),p=n(44),h=n(159),m=l(h),v=n(348),g=l(v),y=n(1458),b=l(y),w=n(1676),P=l(w),_={
className:P.default.librariesMenuScroller,scrollDirection:p.scrollDirections.VERTICAL,autoScroll:!0};a.propTypes={selectedLibraryEntityID:u.PropTypes.string,libraryEntityIDs:u.PropTypes.array.isRequired,machineIdentifier:u.PropTypes.string.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(13).default,l=n(16).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(29),p=u(f),h=n(558),m=u(h),v=function(e){
function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.hasLibraries,n=e.title,a=l(e,["hasLibraries","title"]);return t?c.default.createElement(m.default,a,n):{$$typeof:o,type:"span",key:null,ref:null,props:{children:n},_owner:null}}}]),t}(d.Component);v.propTypes={hasLibraries:d.PropTypes.bool.isRequired,
title:d.PropTypes.string.isRequired},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.machineIdentifier,n=e.id,a=e.title,s=i(e,["machineIdentifier","id","title"]),o=encodeURIComponent(t),u=encodeURIComponent(n);return l.default.createElement(d.default,r({to:"#!/server/"+o+"/dashboard?library="+u},s),a)}var i=n(16).default,r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(348),d=s(u);a.propTypes={machineIdentifier:o.PropTypes.string.isRequired,
id:o.PropTypes.string.isRequired,title:o.PropTypes.string.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,u.createSelector)((0,c.default)(),function(e){return{id:e.key,title:e.title}})}function i(e){return o.default.createElement(p.default,e)}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(34),u=n(30),d=n(223),c=r(d),f=n(1457),p=r(f);i.propTypes={libraryEntityID:s.PropTypes.string.isRequired},t.default=(0,l.connect)(a)(i),
e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,h.createSelector)((0,v.default)(),function(e){return{libraryKey:e&&e.key}})}var i=n(21).default,r=n(22).default,s=n(50).default,o=n(20).default,l=n(16).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=d(c),p=n(34),h=n(30),m=n(223),v=d(m),g=n(81),y=n(584),b=d(y),w=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),s(t,[{key:"componentWillMount",value:function(){this.props.libraryKey||this.props.redirectToRoute({route:"dashboard"})}},{key:"componentWillReceiveProps",value:function(e){e.libraryKey||e.redirectToRoute({route:"dashboard"})}},{key:"render",value:function(){var e=this.props,t=e.libraryKey,n=l(e,["libraryKey"]);return t?f.default.createElement(b.default,u({hubKey:"/hubs/sections/"+encodeURIComponent(t)},n)):null}}]),t}(c.Component);w.propTypes={serverEntityID:c.PropTypes.string.isRequired,
libraryEntityID:c.PropTypes.string.isRequired,libraryKey:c.PropTypes.string,redirectToRoute:c.PropTypes.func.isRequired},t.default=(0,p.connect)(a,{redirectToRoute:g.redirectToRoute})(w),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.serverEntityID,n=e.libraryEntityID,a=e.activeSelectionType;s(e,["serverEntityID","libraryEntityID","activeSelectionType"]);return{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{children:[a?{$$typeof:r,type:g.default,
key:null,ref:null,props:i(g.default.defaultProps,{serverEntityID:t}),_owner:null}:{$$typeof:r,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{serverEntityID:t,libraryEntityID:n}),_owner:null},{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{children:n?{$$typeof:r,type:P.default,key:null,ref:null,props:i(P.default.defaultProps,{serverEntityID:t,libraryEntityID:n,activeSelectionType:a}),_owner:null}:{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{
serverEntityID:t,activeSelectionType:a,hubKey:"/hubs"}),_owner:null},innerClassName:S.default.dashboardContent}),_owner:null}],scrollDirection:u.scrollDirections.NONE}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=(o(l),n(44)),d=n(255),c=o(d),f=n(354),p=o(f),h=n(584),m=o(h),v=n(588),g=o(v),y=n(1463),b=o(y),w=n(1459),P=o(w),_=n(1677),S=o(_);a.propTypes={serverEntityID:l.PropTypes.string,libraryEntityID:l.PropTypes.string,
activeSelectionType:l.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(34)),f=n(30),p=n(190),h=u(p),m=n(259),v=u(m),g=n(356),y=u(g),b=n(1460),w=u(b),P=(0,f.createSelector)(h.default,function(e){return{activeSelectionType:e.activeSelectionType}}),_=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return i(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.libraryEntityID,a=e.activeSelectionType;return{$$typeof:l,type:v.default,key:null,ref:null,props:o(v.default.defaultProps,{children:{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{children:{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{libraryEntityID:n,activeSelectionType:a}),_owner:null}}),_owner:null},machineIdentifier:t}),_owner:null}}}]),t}(d.Component);
_.propTypes={machineIdentifier:d.PropTypes.string,libraryEntityID:d.PropTypes.string,activeSelectionType:d.PropTypes.string},t.default=(0,c.connect)(function(e){return P(e)})(_),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(6),p=u(f),h=n(27),m=n(29),v=u(m),g=n(350),y=u(g),b=n(256),w=u(b),P=n(257),_=u(P),S=n(258),x=u(S),C=n(1456),T=u(C),k=n(1455),I=u(k),M=n(1678),A=u(M),E={
$$typeof:l,type:x.default,key:null,ref:null,props:o(x.default.defaultProps,{children:{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{}),_owner:null}}),_owner:null},O=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isLibrariesMenuOpen:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onLibrariesMenuButtonPress",decorators:[h.autobind],value:function(e){
this.setState({isLibrariesMenuOpen:!this.state.isLibrariesMenuOpen})}},{key:"onLibrariesMenuClose",decorators:[h.autobind],value:function(){this.setState({isLibrariesMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.libraryEntityID,a=e.libraryEntityIDs,i=e.selectedLibraryTitle;return{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:[{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:[(0,
p.default)("Discover"),{$$typeof:l,type:"span",key:null,ref:null,props:{children:"\u2014",className:A.default.separator},_owner:null},c.default.createElement(T.default,{ref:"librariesMenuButton",hasLibraries:!!a.length,title:i?i:(0,p.default)("All Libraries"),onPress:this.onLibrariesMenuButtonPress}),{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{target:this.refs.librariesMenuButton,isOpen:this.state.isLibrariesMenuOpen,selectedLibraryEntityID:n,libraryEntityIDs:a,machineIdentifier:t,
onMenuClose:this.onLibrariesMenuClose}),_owner:null}]}),_owner:null},E]}),_owner:null}}}]),t}(d.Component);O.propTypes={machineIdentifier:d.PropTypes.string.isRequired,libraryEntityID:d.PropTypes.string,libraryEntityIDs:d.PropTypes.array.isRequired,selectedLibraryTitle:d.PropTypes.string},t.default=O,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,u.createSelector)((0,c.default)(),(0,p.default)(),function(e,t,n){return{machineIdentifier:e.machineIdentifier,libraryEntityIDs:e.desktop.libraries,
selectedLibraryTitle:t&&t.title}})}function i(e){return o.default.createElement(m.default,e)}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(34),u=n(30),d=n(76),c=r(d),f=n(223),p=r(f),h=n(1462),m=r(h);i.propTypes={serverEntityID:s.PropTypes.string.isRequired,libraryEntityID:s.PropTypes.string},t.default=(0,l.connect)(a)(i),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.title,n=e.summary;return{$$typeof:i,type:"div",key:null,ref:null,
props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:c.default.title},_owner:null},n&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:u.default,key:null,ref:null,props:r(u.default.defaultProps,{children:n}),_owner:null},className:c.default.summary},_owner:null}]},_owner:null}}var i=n(13).default,r=n(14).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(1402)),u=s(l),d=n(1679),c=s(d);a.propTypes={
title:o.PropTypes.string,summary:o.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=d(c),p=n(6),h=d(p),m=n(27),v=n(508),g=d(v),y=n(239),b=d(y),w=n(1527),P=d(w),_=n(1528),S=d(_),x=n(70),C=d(x),T=n(86),k=d(T),I=n(357),M=d(I),A=n(1422),E=d(A),O=n(1464),D=d(O),R=n(1680),L=d(R),N=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n);var i=e.aspectRatios,r=e.columns,o=e.margin,l=e.cellMargin,u=null;i&&i.length&&(u=this.createLayout(i,r,o,l)),this.state={isHeaderMeasured:!1,headerHeight:null,scrollTop:0,layout:u}}return i(t,e),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.aspectRatios,n=e.columns,a=e.margin,i=e.cellMargin;t===this.props.aspectRatios&&n===this.props.columns||this.setState({layout:this.createLayout(t,n,a,i)
})}},{key:"createLayout",value:function(e,t,n,a){var i=(0,S.default)({aspectRatios:e,columns:t});return(0,P.default)({columns:t,rows:i,margin:n,cellMargin:a})}},{key:"onHeaderMeasure",decorators:[m.autobind],value:function(e){var t=e.height;this.setState({isHeaderMeasured:!0,headerHeight:t})}},{key:"onScrollPositionChange",decorators:[m.autobind],value:function(e){var t=e.scrollTop;this.setState({scrollTop:t})}},{key:"renderCell",decorators:[m.autobind],value:function(e){return f.default.createElement(E.default,u({
serverEntityID:this.props.serverEntityID},e))}},{key:"render",value:function(){var e=this.props,t=e.metadataItems,n=e.width,a=e.height,i=e.summary,r=e.title,s=e.serverEntityID,u=e.itemsError,d=e.itemsIsPopulated,c=this.state,f=c.isHeaderMeasured,p=c.headerHeight,m=c.layout,v=c.scrollTop,y=m&&d&&f;return u?{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{title:(0,h.default)("There was an unexpected error loading the photo album")}),_owner:null}:{$$typeof:l,type:k.default,
key:null,ref:null,props:o(k.default.defaultProps,{children:[{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:{$$typeof:l,type:D.default,key:null,ref:null,props:o(D.default.defaultProps,{title:r,summary:i}),_owner:null},onMeasure:this.onHeaderMeasure}),_owner:null},y?{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:g.default,key:null,ref:null,props:o(g.default.defaultProps,{className:L.default.album,serverEntityID:s,items:t,keyPropName:"metadataItemEntityID",
size:t.length,cellRenderer:this.renderCell,viewportWidth:n,viewportHeight:a,scrollTop:v-p,layout:m}),_owner:null},className:L.default.body},_owner:null}:{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{label:(0,h.default)("Loading photos")}),_owner:null},className:L.default.spinner},_owner:null}],className:L.default.scroller,scrollTop:v,onScrollPositionChange:this.onScrollPositionChange}),_owner:null}}}]),t}(c.Component);
N.propTypes={serverEntityID:c.PropTypes.string,title:c.PropTypes.string,summary:c.PropTypes.string,metadataItems:c.PropTypes.array,aspectRatios:c.PropTypes.array,columns:c.PropTypes.number,margin:c.PropTypes.number,cellMargin:c.PropTypes.number,width:c.PropTypes.number,height:c.PropTypes.number,itemsError:c.PropTypes.object,itemsIsPopulated:c.PropTypes.bool},N.defaultProps={columns:1,margin:35,cellMargin:5},t.default=N,e.exports=t.default},function(e,t,n){"use strict";function a(){var e=(0,y.default)(),t=(0,
p.createSelector)(e,_.default,function(e,t){return void 0===e&&(e={}),t[e.children]}),n=(0,p.createSelector)(t,w.default,function(e,t){void 0===e&&(e={});var n=e.metadataItems;return n?n.map(function(e){var n=t[e],a=n.Media[0];if(!a||!a.Part[0])return 1;var i=a.width,r=a.height,s=l(a.Part,1),o=s[0].orientation;return(0,m.default)(o)?r/i:i/r}):[]});return(0,p.createSelector)(e,t,n,function(e,t,n){void 0===e&&(e={}),void 0===t&&(t={});var a=t.metadataItems,i=t.isPopulated,r=t.error,s=e.title,o=e.summary;
return{title:s,summary:o,metadataItems:a,aspectRatios:n,itemsError:r,itemsIsPopulated:i}})}var i=n(21).default,r=n(22).default,s=n(50).default,o=n(20).default,l=n(123).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(34),p=n(30),h=n(882),m=u(h),v=n(79),g=n(301),y=u(g),b=n(224),w=u(b),P=n(458),_=u(P),S=n(189),x=n(1467),C=u(x),T=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),
s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.metadataItemEntityID;t&&t!==this.props.metadataItemEntityID&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,v.scheduleImmediateUpdate)(function(){e.viewItemDetails(e.metadataItemEntityID)})}},{key:"render",value:function(){return c.default.createElement(C.default,this.props)}}]),t}(d.Component);
T.propTypes={metadataItemEntityID:d.PropTypes.string.isRequired,viewItemDetails:d.PropTypes.func.isRequired},t.default=(0,f.connect)(a,{viewItemDetails:S.viewItemDetails})(T),e.exports=t.default},function(e,t,n){"use strict";function a(e){return{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{children:function(t){var n=t.isMeasured,a=t.width,i=t.height;if(!n)return null;var r=Math.ceil(a/v);return u.default.createElement(p.default,s({className:m.default.album,columns:r,
width:a,height:i},e))},className:m.default.container}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(239),c=o(d),f=n(1465),p=o(f),h=n(1681),m=o(h),v=400;t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return{$$typeof:r,type:f.default,key:null,ref:null,props:i(f.default.defaultProps,{children:{$$typeof:r,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{
children:l.default.createElement(d.default,e)}),_owner:null},machineIdentifier:e.machineIdentifier}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1466),d=s(u),c=n(259),f=s(c),p=n(356),h=s(p);a.propTypes={machineIdentifier:o.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return u.default.createElement(g.default,s({title:(0,c.default)("Plex is down for maintenance"),
description:(0,c.default)("Don't worry, it will be back soon")},e),{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:"status.plex.tv",to:f.SYSTEM_STATUS_URL,target:"_blank",kind:p.kinds.PRIMARY}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(305),p=n(44),h=n(43),m=o(h),v=n(138),g=o(v);t.default=a,e.exports=t.default},function(e,t,n){"use strict";
function a(e){var t=e.outOfDateServers,n=e.isDownForMaintenance,a=e.hasFailedResources,s=e.hasPlexPass,o=e.isUserRestricted,l=e.onDownloadServer;return t.length?{$$typeof:r,type:g.default,key:null,ref:null,props:i(g.default.defaultProps,{outOfDateServers:t}),_owner:null}:n?w:a?P:o?{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{title:(0,u.default)("No shared libraries"),description:(0,u.default)("A user in your home needs to share a library with you")}),_owner:null}:{
$$typeof:r,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{hasPlexPass:s,onDownloadServer:l}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(138),c=s(d),f=n(358),p=s(f),h=n(1469),m=s(h),v=n(1472),g=s(v),y=n(1471),b=s(y),w={$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{}),_owner:null},P={$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{}),
_owner:null};a.propTypes={outOfDateServers:o.PropTypes.array.isRequired,isDownForMaintenance:o.PropTypes.bool.isRequired,hasFailedResources:o.PropTypes.bool.isRequired,hasPlexPass:o.PropTypes.bool.isRequired,isUserRestricted:o.PropTypes.bool.isRequired,onDownloadServer:o.PropTypes.func.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var d=n(7),c=(u(d),n(6)),f=u(c),p=n(27),h=n(44),m=n(29),v=u(m),g=n(86),y=u(g),b=n(43),w=u(b),P=n(157),_=u(P),S=n(362),x=u(S),C=n(1684),T=u(C),k=n(1731),I=u(k),M={context:"serverDownload",firstRun:!0},A=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDownloadStep:!0,isPlexPassModalOpen:!e.hasPlexPass}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onDownloadPress",
decorators:[p.autobind],value:function(e){this.setState({isDownloadStep:!1}),this.props.onDownloadServer(e.currentTarget.dataset.type)}},{key:"onPlexPassModalClose",decorators:[p.autobind],value:function(){this.setState({isPlexPassModalOpen:!1})}},{key:"render",value:function(){var e=this.state,t=e.isDownloadStep,n=e.isPlexPassModalOpen;return{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,
type:"img",key:null,ref:null,props:{className:T.default.pmsLogo,src:I.default},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:t?(0,f.default)("Get your Plex Media Server"):(0,f.default)("Install your new server"),className:T.default.title},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:t?(0,f.default)("To get started streaming your media everywhere, download and install Plex Media Server on the computer or device where you keep your media."):(0,f.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."),
className:T.default.description},_owner:null},t&&{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:(0,f.default)("Download Plex Media Server"),className:T.default.button,kind:h.kinds.PRIMARY,size:h.sizes.LARGE,"data-type":"computer",onPress:this.onDownloadPress}),_owner:null},!t&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:(0,f.default)("Need to download different server?"),className:T.default.downloadMessage},_owner:null},!t&&{$$typeof:l,type:w.default,
key:null,ref:null,props:o(w.default.defaultProps,{children:(0,f.default)("Download for Computer Platforms"),className:T.default.link,kind:h.kinds.PRIMARY,"data-type":"computer",onPress:this.onDownloadPress}),_owner:null},{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,f.default)("Download for NAS Platforms"),className:T.default.link,kind:h.kinds.PRIMARY,"data-type":"nas",onPress:this.onDownloadPress}),_owner:null}],className:T.default.content},_owner:null},{
$$typeof:l,type:x.default,key:null,ref:null,props:o(x.default.defaultProps,{metricsProperties:M,isOpen:n,onModalClose:this.onPlexPassModalClose}),_owner:null}],className:T.default.emptyPage}),_owner:null}}}]),t}(d.Component);A.propTypes={hasPlexPass:d.PropTypes.bool,onDownloadServer:d.PropTypes.func.isRequired},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.outOfDateServers,n="/web/index.html#!/settings/server",a="/web/index.html";return{$$typeof:r,type:g.default,
key:null,ref:null,props:i(g.default.defaultProps,{children:{$$typeof:r,type:"div",key:null,ref:null,props:{children:t.map(function(e){var t=e.activeConnection,s=e.isShared;return t?{$$typeof:r,type:m.default,key:e.machineIdentifier,ref:null,props:i(m.default.defaultProps,{children:e.friendlyName,className:b.default.updateLink,to:f.join([t.uri,s?a:n]),target:"_self",kind:p.kinds.PRIMARY,size:p.sizes.LARGE}),_owner:null}:{$$typeof:r,type:"span",key:e.machineIdentifier,ref:null,props:{children:(0,d.default)("{1} (Unavailable)",e.friendlyName),
className:b.default.updateDisabledLink},_owner:null}})},_owner:null},title:(0,d.default)("Update your Plex Media Server"),description:(0,d.default)("This version of the web app requires Plex Media Server {1} or higher. Use one of the links below to open an available server directly.","0.9.16.0")}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=(s(l),n(6)),d=s(u),c=n(23),f=o(c),p=n(44),h=n(43),m=s(h),v=n(138),g=s(v),y=n(1685),b=s(y);
a.propTypes={outOfDateServers:l.PropTypes.array.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.serverEntityID,n=e.friendlyName,a=e.isFullServer,s=e.isFullOwnedServer,o=e.hubEntityIDs,l=e.isHubsPending,c=e.hubsError,p=e.isEmpty,m=e.hasLibraries,g=e.onAddLibraryPress;return p?l?{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:{$$typeof:r,type:f.default,key:null,ref:null,props:i(f.default.defaultProps,{label:(0,u.default)("Loading dashboard")
}),_owner:null}}),_owner:null}:c&&a?{$$typeof:r,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{title:(0,u.default)("There was an unexpected error loading the dashboard")}),_owner:null}:c&&!a?{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{title:(0,u.default)('The server "{1}" does not support the dashboard',n),description:(0,u.default)("Browse libraries using the sidebar")}),_owner:null}:m&&s?{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{
title:(0,u.default)("The dashboard is empty"),description:(0,u.default)("Browse and manage your libraries using the sidebar"),footer:(0,u.default)('Tip: The "Include in dashboard" advanced setting for each library allows content to be displayed here')}),_owner:null}:!m&&s?{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:{$$typeof:r,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{children:(0,u.default)("Add Library"),kind:d.kinds.PRIMARY,size:d.sizes.LARGE,
onPress:g}),_owner:null},title:(0,u.default)("The dashboard is empty"),description:(0,u.default)("Add libraries with your media to make the most of Plex Media Server")}),_owner:null}:{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{title:(0,u.default)("The dashboard is empty"),description:(0,u.default)("Browse libraries using the sidebar")}),_owner:null}:{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{serverEntityID:t,hubEntityIDs:o}),_owner:null
}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(44),c=n(70),f=s(c),p=n(157),h=s(p),m=n(1419),v=s(m),g=n(583),y=s(g),b=n(357),w=s(b);a.propTypes={serverEntityID:o.PropTypes.string.isRequired,friendlyName:o.PropTypes.string.isRequired,isFullServer:o.PropTypes.bool.isRequired,isFullOwnedServer:o.PropTypes.bool.isRequired,hasLibraries:o.PropTypes.bool.isRequired,hubEntityIDs:o.PropTypes.array.isRequired,isHubsPending:o.PropTypes.bool.isRequired,
hubsError:o.PropTypes.object,isEmpty:o.PropTypes.bool.isRequired,onAddLibraryPress:o.PropTypes.func.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.serverEntityID,n=e.metadataListEntityID,a=e.listTitle,o=e.activeSelectionType;return{$$typeof:r,type:f.default,key:null,ref:null,props:i(f.default.defaultProps,{children:[o?{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{serverEntityID:t}),_owner:null}:{$$typeof:r,type:y.default,
key:null,ref:null,props:i(y.default.defaultProps,{serverEntityID:t,metadataListEntityID:n,listTitle:a}),_owner:null},u.default.createElement(h.default,s({component:w.default,initialSize:50},e))],scrollDirection:d.scrollDirections.NONE}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(12).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(44),c=n(255),f=o(c),p=n(569),h=o(p),m=n(588),v=o(m),g=n(1478),y=o(g),b=n(1476),w=o(b);a.propTypes={serverEntityID:l.PropTypes.string.isRequired,
metadataListEntityID:l.PropTypes.string.isRequired,listTitle:l.PropTypes.string.isRequired,activeSelectionType:l.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(34),c=n(30),f=n(190),p=o(f),h=n(79),m=n(1132),v=n(1474),g=o(v),y=(0,c.createSelector)(function(e){return e.ui.metadataListPage.metadataList},p.default,function(e,t){
return{metadataListEntityID:e,activeSelectionType:t.activeSelectionType}}),b=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.listKey;t!==this.props.listKey&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.listKey&&(0,
h.scheduleImmediateUpdate)(function(){e.initMetadataListPage({serverEntityID:e.serverEntityID,key:e.listKey,title:e.listTitle})})}},{key:"render",value:function(){return this.props.metadataListEntityID?u.default.createElement(g.default,this.props):null}}]),t}(l.Component);b.propTypes={serverEntityID:l.PropTypes.string.isRequired,metadataListEntityID:l.PropTypes.string,listKey:l.PropTypes.string.isRequired,listTitle:l.PropTypes.string.isRequired,initMetadataListPage:l.PropTypes.func.isRequired},t.default=(0,
d.connect)(function(e){return y(e)},{initMetadataListPage:m.initMetadataListPage})(b),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.serverEntityID,n=e.listTitle,a=e.listType,s=e.listContext,o=e.metadataItemEntityIDs,l=e.totalSize,d=e.populatedRange,c=e.firstItemType,f=e.isPending,p=e.isPopulated,h=e.error,v=e.columnAdjustment,y=e.onPageRequest,w=l||o.length;if(p&&w){var _=a||c;return{$$typeof:r,type:P.default,key:null,ref:null,props:i(P.default.defaultProps,{className:E.default.metadataListPageContent,
scrollerClassName:E.default.metadataListScroller,serverEntityID:t,listType:_,listContext:s,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:"metadataItemEntityID",items:o,itemsOffset:d.start,size:w,layout:(0,m.default)(_,s,v),cellRenderer:(0,g.default)(e,S.default),onPageRequest:y}),_owner:null}}return f?{$$typeof:r,type:C.default,key:null,ref:null,props:i(C.default.defaultProps,{children:{$$typeof:r,type:k.default,key:null,ref:null,props:i(k.default.defaultProps,{children:{$$typeof:r,
type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{label:n?(0,u.default)("Loading {1}",n):(0,u.default)("Loading list")}),_owner:null}}),_owner:null}}),_owner:null}:h?{$$typeof:r,type:C.default,key:null,ref:null,props:i(C.default.defaultProps,{children:{$$typeof:r,type:M.default,key:null,ref:null,props:i(M.default.defaultProps,{title:n?(0,u.default)("There was an unexpected error loading {1}",n):(0,u.default)("There was an unexpected error loading this list")}),_owner:null}}),_owner:null
}:{$$typeof:r,type:C.default,key:null,ref:null,props:i(C.default.defaultProps,{children:{$$typeof:r,type:k.default,key:null,ref:null,props:i(k.default.defaultProps,{title:(0,u.default)("Nothing to see here"),description:n?(0,u.default)("There are no items in {1}",n):(0,u.default)("There are no items in this list")}),_owner:null}}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(512),c=s(d),f=n(99),p=s(f),h=n(1526),m=s(h),v=n(592),g=s(v),y=n(70),b=s(y),w=n(561),P=s(w),_=n(571),S=s(_),x=n(354),C=s(x),T=n(583),k=s(T),I=n(357),M=s(I),A=n(1686),E=s(A);
a.propTypes={serverEntityID:o.PropTypes.string.isRequired,listTitle:o.PropTypes.string,listType:o.PropTypes.string,listContext:o.PropTypes.string.isRequired,metadataItemEntityIDs:o.PropTypes.array.isRequired,totalSize:o.PropTypes.number,populatedRange:c.default.isRequired,firstItemType:o.PropTypes.string,isPending:o.PropTypes.bool.isRequired,isPopulated:o.PropTypes.bool.isRequired,error:o.PropTypes.object,columnAdjustment:o.PropTypes.number.isRequired,onPageRequest:o.PropTypes.func},a.defaultProps={
listContext:p.default.LIBRARY},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.listTitle,n=e.metadataItems,a=e.totalSize,l=s(e,["listTitle","metadataItems","totalSize"]),u=(0,f.default)(e);return{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:[{$$typeof:r,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{children:[{$$typeof:r,type:"div",key:null,ref:null,props:{children:t,className:I.default.title},_owner:null
},{$$typeof:r,type:T.default,key:null,ref:null,props:i(T.default.defaultProps,{className:I.default.badge,count:a||n.length}),_owner:null}]}),_owner:null},{$$typeof:r,type:_.default,key:null,ref:null,props:i(_.default.defaultProps,{children:d.default.createElement(h.default,o({},l,u))}),_owner:null},M]}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(1529),f=l(c),p=n(1443),h=l(p),m=n(350),v=l(m),g=n(256),y=l(g),b=n(257),w=l(b),P=n(355),_=l(P),S=n(258),x=l(S),C=n(555),T=l(C),k=n(1687),I=l(k),M={
$$typeof:r,type:x.default,key:null,ref:null,props:i(x.default.defaultProps,{children:{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{}),_owner:null}}),_owner:null};a.propTypes={listTitle:u.PropTypes.string.isRequired,metadataItems:u.PropTypes.array.isRequired,totalSize:u.PropTypes.number},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,p.createSelector)((0,g.default)(),(0,m.default)(),function(e,t){var n=u.default.pick(t,"metadataItems","totalSize","allowSync","firstItemType","isFirstItemLibraryItem");
return r({},n,{server:e})})}function i(e){return c.default.createElement(P.default,e)}var r=n(12).default,s=n(1).default,o=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(7),c=s(d),f=n(34),p=n(30),h=n(456),m=s(h),v=n(245),g=s(v),y=n(187),b=o(y),w=n(1477),P=s(w);i.propTypes={serverEntityID:d.PropTypes.string.isRequired,metadataListEntityID:d.PropTypes.string.isRequired},t.default=(0,f.connect)(a,b)(i),e.exports=t.default},function(e,t,n){"use strict";function a(e){
var t=e.isSearchPending,n=e.searchAllServers,a=e.onSearchAllChange;s(e,["isSearchPending","searchAllServers","onSearchAllChange"]);return{$$typeof:r,type:f.default,key:null,ref:null,props:i(f.default.defaultProps,{children:[{$$typeof:r,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{isSearchPending:t,query:e.query,searchAllServers:n,onSearchAllChange:a}),_owner:null},u.default.createElement(v.default,e)],scrollDirection:d.scrollDirections.NONE}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(44),c=n(255),f=o(c),p=n(1482),h=o(p),m=n(1481),v=o(m);a.propTypes={isSearchPending:l.PropTypes.bool.isRequired,query:l.PropTypes.string.isRequired,searchAllServers:l.PropTypes.bool.isRequired,onSearchAllChange:l.PropTypes.func.isRequired},a.defaultProps={hubs:[]},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,S.createSelector)(function(e){return e.servers},function(e,t){var n=t.serverEntityID;
return n},E.default,D.default,function(e,t,n,a){var i=a.searchAllServers;return e.reduce(function(e,a){if(a!==t&&!i)return e;var r=n[a],s=P.default.isMatch(r,{isConnected:!0,isFullServer:!0});return s?e.concat(a):e},[])})}function i(){return(0,C.default)(a(),function(e){return e})}function r(){return(0,S.createSelector)(i(),E.default,function(e,t){return e.reduce(function(e,n){return e[n]=t[n].desktop.search,e},{})})}function s(){return(0,C.default)(r(),function(e){return e})}function o(){return(0,
S.createSelector)(s(),function(e){var t=v(e),n=!1,a=!1,i=t.reduce(function(t,i){var r=e[i];return r.isSearchPending&&(n=!0),r.isSearchPopulated&&(a=!0),r.hubs.forEach(function(e){var n=e.results.map(function(e){return{searchResultEntityID:e,serverEntityID:i}}),a=t[e.hubIdentifier];a?(a.size+=e.size,a.results=a.results.concat(n)):t[e.hubIdentifier]={hubIdentifier:e.hubIdentifier,size:e.size,type:e.type,title:e.title,results:[].concat(n)}}),t},{});return{isSearchCapable:!!t.length,isSearchPopulated:a,
isSearchPending:n,hubs:P.default.values(i)}})}function l(){return(0,S.createSelector)(o(),D.default,function(e,t){return u({searchAllServers:t.searchAllServers,columnAdjustment:t.columnAdjustment},e)})}var u=n(12).default,d=n(21).default,c=n(22).default,f=n(28).default,p=n(20).default,h=n(14).default,m=n(13).default,v=n(100).default,g=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var y=n(7),b=g(y),w=n(3),P=g(w),_=n(34),S=n(30),x=n(300),C=g(x),T=n(79),k=n(27),I=n(1127),M=n(81),A=n(302),E=g(A),O=n(244),D=g(O),R=n(259),L=g(R),N=n(1479),j=g(N),U=30,F={
saveSettings:M.saveSettings,fetchSearch:I.fetchSearch},B=function(e){function t(){p(this,t),d(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return c(t,e),f(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.query&&e.query!==this.props.query&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.isSearchCapable&&(0,T.scheduleImmediateUpdate)(function(){
e.fetchSearch({serverEntityID:e.serverEntityID,query:e.query,limit:U})})}},{key:"onSearchAllChange",decorators:[k.autobind],value:function(e){this.props.saveSettings({name:"experienceSettings",settings:{searchAllServers:e}}),this._populate()}},{key:"render",value:function(){return{$$typeof:m,type:L.default,key:null,ref:null,props:h(L.default.defaultProps,{children:b.default.createElement(j.default,u({},this.props,{onSearchAllChange:this.onSearchAllChange})),machineIdentifier:this.props.machineIdentifier
}),_owner:null}}}]),t}(y.Component);B.propTypes={machineIdentifier:y.PropTypes.string.isRequired,serverEntityID:y.PropTypes.string.isRequired,isSearchCapable:y.PropTypes.bool.isRequired,query:y.PropTypes.string.isRequired,saveSettings:y.PropTypes.func.isRequired,fetchSearch:y.PropTypes.func.isRequired},t.default=(0,_.connect)(l,F)(B),e.exports=t.default},function(e,t,n){"use strict";function a(e){return function(t){return d.default.createElement(w.default,o({component:y.default},e,t))}}function i(e){
var t=e.isSearchCapable,n=e.isSearchPopulated,i=e.hubs,l=e.searchAllServers,u=e.columnAdjustment;return t?n&&!i.length?{$$typeof:s,type:x.default,key:null,ref:null,props:r(x.default.defaultProps,{title:(0,f.default)("No Results"),description:(0,f.default)("Try a different query")}),_owner:null}:{$$typeof:s,type:_.default,key:null,ref:null,props:r(_.default.defaultProps,{children:i.map(function(e){var t=e.type,n=l?h.default.SEARCH_ALL_SERVERS:h.default.SEARCH;return d.default.createElement(v.default,o({},e,{
listType:t,listContext:n,keyPropName:"searchResultEntityID",size:e.results.length,items:e.results,itemsOffset:0,columnAdjustment:u,key:e.hubIdentifier,cellRenderer:a({listType:t,listContext:n})}))}),innerClassName:T.default.searchContent}),_owner:null}:{$$typeof:s,type:x.default,key:null,ref:null,props:r(x.default.defaultProps,{title:(0,f.default)("This server does not support search"),description:(0,f.default)("Browse libraries using the sidebar")}),_owner:null}}var r=n(14).default,s=n(13).default,o=n(12).default,l=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(6),f=l(c),p=n(99),h=l(p),m=n(568),v=l(m),g=n(1423),y=l(g),b=n(587),w=l(b),P=n(354),_=l(P),S=n(138),x=l(S),C=n(1688),T=l(C);i.propTypes={isSearchCapable:u.PropTypes.bool.isRequired,isSearchPopulated:u.PropTypes.bool.isRequired,hubs:u.PropTypes.arrayOf(u.PropTypes.object),columnAdjustment:u.PropTypes.number.isRequired,searchAllServers:u.PropTypes.bool.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(6),p=u(f),h=n(27),m=n(29),v=u(m),g=n(44),y=n(70),b=u(y),w=n(558),P=u(w),_=n(350),S=u(_),x=n(256),C=u(x),T=n(257),k=u(T),I=n(355),M=u(I),A=n(258),E=u(A),O=n(1483),D=u(O),R=n(1689),L=u(R),N={$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{children:{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{}),_owner:null}}),_owner:null},j=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isSearchMenuOpen:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onSearchMenuButtonPress",decorators:[h.autobind],value:function(e){this.setState({isSearchMenuOpen:!this.state.isSearchMenuOpen})}},{key:"onSearchMenuClose",decorators:[h.autobind],value:function(){this.setState({isSearchMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.isSearchPending,n=e.query,a=e.searchAllServers,i=e.onSearchAllChange;return{
$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:[{$$typeof:l,type:k.default,key:null,ref:null,props:o(k.default.defaultProps,{children:[(0,p.default)("Search"),{$$typeof:l,type:"span",key:null,ref:null,props:{children:"\u2014",className:L.default.separator},_owner:null},c.default.createElement(P.default,{ref:"sharedSearchMenuButton",onPress:this.onSearchMenuButtonPress},a?(0,p.default)("All Servers"):(0,p.default)("This Server")),{$$typeof:l,type:D.default,key:null,
ref:null,props:o(D.default.defaultProps,{onSearchAllChange:i,isSearchAll:a,target:this.refs.sharedSearchMenuButton,isOpen:this.state.isSearchMenuOpen,onMenuClose:this.onSearchMenuClose}),_owner:null}]}),_owner:null},{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:[{$$typeof:l,type:"span",key:null,ref:null,props:{children:t?(0,p.default)('Searching for "{1}"',n):(0,p.default)('Results for "{1}"',n)},_owner:null},t&&{$$typeof:l,type:b.default,key:null,ref:null,
props:o(b.default.defaultProps,{className:L.default.spinner,size:g.sizes.SMALL}),_owner:null}]}),_owner:null},N]}),_owner:null}}}]),t}(d.Component);j.propTypes={isSearchPending:d.PropTypes.bool.isRequired,query:d.PropTypes.string.isRequired,searchAllServers:d.PropTypes.bool.isRequired,onSearchAllChange:d.PropTypes.func.isRequired},t.default=j,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=d(c),p=n(6),h=d(p),m=n(27),v=n(159),g=d(v),y=n(348),b=d(y),w=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"onThisServerPress",decorators:[m.autobind],value:function(){this.props.onSearchAllChange(!1)}},{key:"onAllServersPress",decorators:[m.autobind],value:function(){this.props.onSearchAllChange(!0)}},{key:"render",value:function(){var e=this.props,t=e.isSearchAll,n=u(e,["isSearchAll"]);
return f.default.createElement(g.default,n,{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:(0,h.default)("This Server"),isSelected:!t,onPress:this.onThisServerPress}),_owner:null},{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:(0,h.default)("All Servers"),isSelected:t,onPress:this.onAllServersPress}),_owner:null})}}]),t}(c.Component);w.propTypes={isOpen:c.PropTypes.bool.isRequired,onSearchAllChange:c.PropTypes.func.isRequired,
isSearchAll:c.PropTypes.bool.isRequired},t.default=w,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default,f=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(7),h=c(p),m=n(66),v=c(m),g=n(32),y=c(g),b=n(62),w=c(b),P=n(27),_=n(246),S=f(_),x=n(29),C=c(x),T=n(363),k=f(T),I=n(365),M=c(I),A=n(1487),E=c(A),O=n(1489),D=c(O),R=n(1690),L=c(R),N=parseInt(M.default.searchResultHeight,10),j=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.isTabScoped=!1,this.state={scrollTop:0,isOpen:!1}}return i(t,e),r(t,[{key:"componentWillMount",value:function(){this._listenForPress()}},{key:"componentWillReceiveProps",value:function(e,t){var n=e.selectedResultEntityID,a=e.isSearchPending,i=e.query,r=this.props.query!==i,s=i.trim().length,o=this.state.isOpen;s&&!o&&r?this.setState({isOpen:!0}):!s&&o&&this.setState({isOpen:!1}),(a||null==n)&&this.setState({
scrollTop:0})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,C.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._stopListeningForPress()}},{key:"_listenForPress",value:function(){window.addEventListener("mouseup",this.onWindowPress),window.addEventListener("touchend",this.onWindowPress)}},{key:"_stopListeningForPress",value:function(){window.removeEventListener("mouseup",this.onWindowPress),window.removeEventListener("touchend",this.onWindowPress)}},{key:"onScrollIntoView",
decorators:[P.autobind],value:function(e){var t=e.scrollTop,n=v.default.findDOMNode(this.refs.results),a=n.clientHeight,i=a+this.state.scrollTop,r=t+N>i||t<this.state.scrollTop;this.setState({scrollTop:r?t:this.state.scrollTop})}},{key:"onWindowPress",decorators:[P.autobind],value:function(e){if(this.state.isOpen){var t=v.default.findDOMNode(this.refs.search),n=t&&t.contains(e.target);n||(this.isTabScoped&&(k.resetScopedFocus(),this.isTabScoped=!1),this.setState({isOpen:!1}))}}},{key:"onKeyDown",
decorators:[P.autobind],value:function(e){var t=this.props.serverEntityID,n=this.state.isOpen;switch(e.keyCode){case S.DOWN_ARROW:case S.UP_ARROW:n&&(e.stopPropagation(),e.preventDefault(),e.keyCode===S.UP_ARROW?this.props.selectQuickSearchResult({serverEntityID:t,offset:-1}):this.props.selectQuickSearchResult({serverEntityID:t,offset:1}),this.isTabScoped&&(k.restorePreviousFocus(),this.isTabScoped=!1));break;case S.ENTER:if(n){var a=w.default.platformID,i="osx"===a?e.metaKey:e.ctrlKey,r=e.shiftKey;
k.resetFocus(),this.isTabScoped=!1,i?r?this.props.playQuickSearchItem({serverEntityID:t,shuffle:!0}):this.props.playQuickSearchItem({serverEntityID:t}):this.props.navigateQuickSearchResult({serverEntityID:t})}break;case S.ESCAPE:e.nativeEvent.stopImmediatePropagation(),this.isTabScoped&&(k.restorePreviousFocus(),this.isTabScoped=!1),n?this.setState({isOpen:!1}):this.props.changeQuickSearchQuery({serverEntityID:t,query:""});break;case S.TAB:if(n){if(!this.isTabScoped){var s=v.default.findDOMNode(this.refs.results);
k.startScopedFocus(s),this.isTabScoped=!0}k.scopeTabEvent(e)}}}},{key:"onInputClick",decorators:[P.autobind],value:function(e){this.isTabScoped&&(k.restorePreviousFocus(),this.isTabScoped=!1),this.state.isOpen||""===this.props.query||this.setState({isOpen:!0})}},{key:"onPlayPress",decorators:[P.autobind],value:function(e){var t=this.props,n=t.serverEntityID,a=t.playQuickSearchItem;a({serverEntityID:n,searchResultEntityID:e})}},{key:"onLinkPress",decorators:[P.autobind],value:function(){var e=this.props,t=e.serverEntityID,n=e.resetQuickSearch;
n({serverEntityID:t})}},{key:"onResultFocus",decorators:[P.autobind],value:function(e){var t=this.props,n=t.serverEntityID,a=t.selectQuickSearchResult;a({serverEntityID:n,searchResultEntityID:e})}},{key:"onResultPress",decorators:[P.autobind],value:function(e){var t=this.props,n=t.serverEntityID,a=t.navigateQuickSearchResult;a({serverEntityID:n,searchResultEntityID:e}),this.isTabScoped&&(k.resetFocus(),this.isTabScoped=!1)}},{key:"onScrollPositionChange",decorators:[P.autobind],value:function(e){
var t=e.scrollTop;this.setState({scrollTop:t})}},{key:"onSearch",decorators:[P.autobind],value:function(){var e=this.props,t=e.serverEntityID,n=e.supportsQuickSearch,a=e.isServerUnavailable;n&&!a&&this.props.fetchQuickSearch({serverEntityID:t})}},{key:"onInputChange",decorators:[P.autobind],value:function(e){var t=this.props,n=t.serverEntityID,a=t.changeQuickSearchQuery;a({serverEntityID:n,query:e})}},{key:"render",value:function(){var e=this.props,t=e.query,n=u(e,["query"]);return h.default.createElement("div",{
ref:"search",className:(0,y.default)(L.default.container),onKeyDown:this.onKeyDown},{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{query:t,onChange:this.onInputChange,onSearch:this.onSearch,onClick:this.onInputClick}),_owner:null},this.state.isOpen&&h.default.createElement(D.default,d({ref:"results",query:t,scrollTop:this.state.scrollTop,onScrollPositionChange:this.onScrollPositionChange,onPlayPress:this.onPlayPress,onLinkPress:this.onLinkPress,onResultFocus:this.onResultFocus,
onResultPress:this.onResultPress,onScrollIntoView:this.onScrollIntoView},n)))}}]),t}(p.Component);j.propTypes={serverEntityID:p.PropTypes.string.isRequired,query:p.PropTypes.string.isRequired,searchType:p.PropTypes.string,searchPlaceholder:p.PropTypes.string,hubs:p.PropTypes.array.isRequired,supportsQuickSearch:p.PropTypes.bool.isRequired,isServerUnavailable:p.PropTypes.bool.isRequired,isSearchPopulated:p.PropTypes.bool.isRequired,isSearchPending:p.PropTypes.bool.isRequired,selectedResultEntityID:p.PropTypes.string,
changeQuickSearchQuery:p.PropTypes.func.isRequired,fetchQuickSearch:p.PropTypes.func.isRequired,navigateQuickSearchResult:p.PropTypes.func.isRequired,playQuickSearchItem:p.PropTypes.func.isRequired,selectQuickSearchResult:p.PropTypes.func.isRequired,resetQuickSearch:p.PropTypes.func.isRequired},t.default=j,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,h.createSelector)((0,v.default)(),y.default,function(e,t){var n=t.searchAllServers;if(!e)return{isWaitingForServer:!0};var a=e.desktop.quickSearch;
return i({isWaitingForServer:!1,supportsQuickSearch:(0,w.default)(e.shortVersion,x.default.quickSearch),isServerUnavailable:e.isUnavailable,searchAllServers:n},a)})}var i=n(12).default,r=n(21).default,s=n(22).default,o=n(50).default,l=n(20).default,u=n(1).default,d=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=u(c),p=n(34),h=n(30),m=n(76),v=u(m),g=n(244),y=u(g),b=n(311),w=u(b),P=n(1484),_=u(P),S=n(108),x=u(S),C=n(154),T=d(C),k=function(e){function t(){l(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return s(t,e),o(t,[{key:"render",value:function(){return this.props.isWaitingForServer?null:f.default.createElement(_.default,this.props)}}]),t}(c.Component);k.propTypes={serverEntityID:c.PropTypes.string,isWaitingForServer:c.PropTypes.bool.isRequired},t.default=(0,p.connect)(a,T)(k),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(13).default,l=n(16).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(7),f=d(c),p=n(29),h=d(p),m=n(587),v=d(m),g=n(1488),y=d(g),b=n(1691),w=d(b),P=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.selectedResultEntityID,a=e.results,i=l(e,["title","selectedResultEntityID","results"]);return{$$typeof:o,type:"div",key:null,ref:null,
props:{children:[{$$typeof:o,type:"h5",key:null,ref:null,props:{children:t,className:w.default.hubTitle},_owner:null},a.map(function(e,t){return f.default.createElement(v.default,u({},i,{isSelected:n===e,component:y.default,key:e,searchResultEntityID:e}))})]},_owner:null}}}]),t}(c.Component);P.propTypes={title:c.PropTypes.string.isRequired,selectedResultEntityID:c.PropTypes.string,results:c.PropTypes.arrayOf(c.PropTypes.string).isRequired},t.default=P,e.exports=t.default},function(e,t,n){"use strict";
var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(32),p=u(f),h=n(9),m=u(h),v=n(29),g=u(v),y=n(27),b=n(49),w=u(b),P=n(43),_=u(P),S=n(1692),x=u(S),C=function(e){function t(e){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isFocused:!1,query:""},this.searchTimeout=null}return i(t,e),r(t,[{key:"componentDidMount",value:function(){
m.default.on("shortcut:search",this.focusInput)}},{key:"componentWillReceiveProps",value:function(e){this.state.query!==e.query&&this.setState({query:e.query})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){m.default.off("shortcut:search",this.focusInput),this.searchTimeout&&clearTimeout(this.searchTimeout)}},{key:"focusInput",decorators:[y.autobind],value:function(){this.refs.input.focus()}},{key:"onClick",decorators:[y.autobind],
value:function(e){this.focusInput(),this.props.onClick()}},{key:"onFocus",decorators:[y.autobind],value:function(){this.setState({isFocused:!0})}},{key:"onBlur",decorators:[y.autobind],value:function(){this.setState({isFocused:!1})}},{key:"onInput",decorators:[y.autobind],value:function(e){var t=this,n=e.target.value;this.searchTimeout&&clearTimeout(this.searchTimeout),this.setState({query:n},function(){t.props.onChange(n),""!==n.trim()&&(t.searchTimeout=setTimeout(t.props.onSearch,100))})}},{key:"onClearPress",
decorators:[y.autobind],value:function(e){var t=this;e.stopPropagation(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.setState({query:""},function(){t.props.onChange(""),t.focusInput()})}},{key:"render",value:function(){var e=this.state,t=e.query,n=e.isFocused;return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{name:"plex-icon-search-560",className:x.default.searchIcon}),_owner:null},c.default.createElement("input",{
ref:"input",className:x.default.searchInput,value:t,type:"text",autoComplete:"off",spellCheck:"false",onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur}),t.length>0&&{$$typeof:o,type:_.default,key:null,ref:null,props:l(_.default.defaultProps,{children:{$$typeof:o,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{name:"plex-icon-close-560",className:x.default.closeIcon}),_owner:null},onPress:this.onClearPress}),_owner:null}],className:(0,p.default)(x.default.container,n&&x.default.focused),
onClick:this.onClick},_owner:null}}}]),t}(d.Component);C.propTypes={onChange:d.PropTypes.func,onSearch:d.PropTypes.func,onClick:d.PropTypes.func,onFocus:d.PropTypes.func,onBlur:d.PropTypes.func},C.defaultProps={onClick:d.PropTypes.func},t.default=C,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(12).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(7),p=c(f),h=n(66),m=c(h),v=n(32),g=c(v),y=n(27),b=n(29),w=c(b),P=n(99),_=c(P),S=n(261),x=n(203),C=c(x),T=n(364),k=c(T),I=n(49),M=c(I),A=n(43),E=c(A),O=n(572),D=c(O),R=n(585),L=c(R),N=n(1490),j=c(N),U=n(586),F=c(U),B=n(1693),z=c(B),$=function(e){
function t(e){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isMenuOpen:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"componentWillUpdate",value:function(e,t){if(e.isSelected!==this.props.isSelected&&e.isSelected){var n=m.default.findDOMNode(this);this.props.onScrollIntoView({scrollTop:n.offsetTop})}}},{key:"onItemPress",decorators:[y.autobind],value:function(e){e.preventDefault();var t=m.default.findDOMNode(this.refs.menuButton);
t&&t.contains(e.target)||this.props.onResultPress(this.props.searchResultEntityID)}},{key:"onItemFocus",decorators:[y.autobind],value:function(e){this.props.onResultFocus(this.props.searchResultEntityID)}},{key:"onPlayPress",decorators:[y.autobind],value:function(e){e.stopPropagation(),this.props.onPlayPress(this.props.searchResultEntityID)}},{key:"onLinkPress",decorators:[y.autobind],value:function(e){e.stopPropagation(),this.props.onLinkPress()}},{key:"onMenuIconPress",decorators:[y.autobind],value:function(e){
this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[y.autobind],value:function(){this.setState({isMenuOpen:!1})}},{key:"render",value:function(){var e=this,t=this.state.isMenuOpen,n=this.props,a=n.tag,i=n.isSelected,r=n.isMetadataItem,s=u(n,["tag","isSelected","isMetadataItem"]),c=s.type,f=s.title,h=void 0===f?a:f,m=s.reasonTitle,v=(0,g.default)(z.default.button,(i||t)&&z.default.selected),y=(0,C.default)(c,_.default.QUICK_SEARCH),b=m&&""!==m;return{$$typeof:l,type:E.default,
key:null,ref:null,props:o(E.default.defaultProps,{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:p.default.createElement(L.default,d({},s,{width:(0,S.getAspectRatio)(c)===S.PORTRAIT?28:36,onPlayPress:this.onPlayPress,title:h,isMetadataItem:r})),className:z.default.imageContainer},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:y.map(function(t,n){var a=t.component,i=u(t,["component"]),r=n>0;return p.default.createElement(j.default,d({},i,s,{className:r?null:z.default.title,
title:h,key:n,isSecondary:r,component:b&&r?F.default:a,onPress:e.onLinkPress}))}),className:z.default.titles},_owner:null},r&&p.default.createElement(E.default,{ref:"menuButton",tabIndex:"-1",onPress:this.onMenuIconPress,className:z.default.moreButton},{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{name:"plex-icon-more-560",className:z.default.moreIcon}),_owner:null}),r&&p.default.createElement(D.default,d({isOpen:t,target:this.refs.menuButton,onMenuClose:this.onMenuClose
},s,(0,k.default)(s),{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}))],component:"div",tabIndex:"1",className:v,onPress:this.onItemPress,onFocus:this.onItemFocus}),_owner:null}}}]),t}(f.Component);$.propTypes={tag:f.PropTypes.string,title:f.PropTypes.string,
type:f.PropTypes.string,isMetadataItem:f.PropTypes.bool,searchResultEntityID:f.PropTypes.string,isSelected:f.PropTypes.bool,onLinkPress:f.PropTypes.func,onPlayPress:f.PropTypes.func,onResultPress:f.PropTypes.func,onResultFocus:f.PropTypes.func,onScrollIntoView:f.PropTypes.func},$.defaultProps={isMetadataItem:!1},t.default=$,e.exports=t.default},function(e,t,n){"use strict";function a(e,t,n){return t?(0,y.default)("Search in {1}...",t):n?(0,y.default)("Search all servers...",e):(0,y.default)("Show more results...",e);
}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(14).default,u=n(13).default,d=n(16).default,c=n(12).default,f=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(7),h=f(p),m=n(32),v=f(m),g=n(6),y=f(g),b=n(27),w=n(29),P=f(w),_=n(86),S=f(_),x=n(70),C=f(x),T=n(43),k=f(T),I=n(1486),M=f(I),A=n(1694),E=f(A),O=function(e){function t(e){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={maxHeight:this.getMaxHeight()}}return r(t,e),
s(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onWindowResize)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onWindowResize)}},{key:"getMaxHeight",value:function(){return window.innerHeight-150}},{key:"onWindowResize",decorators:[b.autobind],value:function(){this.setState({maxHeight:this.getMaxHeight()})}},{key:"onPlaceholderPress",decorators:[b.autobind],
value:function(){this.props.onResultPress()}},{key:"onPlaceholderFocus",decorators:[b.autobind],value:function(){this.props.onResultFocus()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.scrollTop,i=e.hubs,r=e.query,s=e.searchAllServers,o=e.placeholder,f=e.selectedResultEntityID,p=e.isSearchPending,m=e.isSearchPopulated,g=e.onScrollPositionChange,y=d(e,["className","scrollTop","hubs","query","searchAllServers","placeholder","selectedResultEntityID","isSearchPending","isSearchPopulated","onScrollPositionChange"]),b=(0,
v.default)(E.default.placeholder,null==f&&E.default.placeholderSelected),w=p&&!m;return{$$typeof:u,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{children:w?{$$typeof:u,type:"div",key:null,ref:null,props:{children:{$$typeof:u,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{className:E.default.spinner}),_owner:null},className:E.default.spinnerContainer},_owner:null}:{$$typeof:u,type:"div",key:null,ref:null,props:{children:[{$$typeof:u,type:k.default,key:null,ref:null,
props:l(k.default.defaultProps,{children:a(r,o,s),className:b,tabIndex:"1",onPress:this.onPlaceholderPress,onFocus:this.onPlaceholderFocus}),_owner:null},i.map(function(e){return h.default.createElement(M.default,c({},y,{selectedResultEntityID:f,key:e.hubIdentifier,title:e.title,results:e.results}))})]},_owner:null},className:(0,v.default)(E.default.container,t),style:this.state,scrollTop:n,onScrollPositionChange:g}),_owner:null}}}]),t}(p.Component);O.propTypes={className:p.PropTypes.string,hubs:p.PropTypes.arrayOf(p.PropTypes.shape({
hubIdentifier:p.PropTypes.string.isRequired,title:p.PropTypes.string.isRequired,results:p.PropTypes.arrayOf(p.PropTypes.string).isRequired})).isRequired,query:p.PropTypes.string,searchAllServers:p.PropTypes.bool,isSearchPending:p.PropTypes.bool,isSearchPopulated:p.PropTypes.bool,placeholder:p.PropTypes.string,selectedResultEntityID:p.PropTypes.string,scrollTop:p.PropTypes.number,onDeckPress:p.PropTypes.func,onResultPress:p.PropTypes.func,onResultFocus:p.PropTypes.func,onScrollPositionChange:p.PropTypes.func
},t.default=O,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.className,n=e.component,a=e.selectProps,o=e.isSecondary,l=e.onPress,d=r(e,["className","component","selectProps","isSecondary","onPress"]),f=a?a(d):d;return{$$typeof:i,type:"div",key:null,ref:null,props:{children:u.default.createElement(n,s({tabIndex:"-1",isSecondary:o,onPress:l},f)),className:(0,c.default)(t,p.default.title,o&&p.default.isSecondary)},_owner:null}}var i=n(13).default,r=n(16).default,s=n(12).default,o=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),d=n(32),c=o(d),f=n(1695),p=o(f);a.propTypes={className:l.PropTypes.string,component:l.PropTypes.func,selectProps:l.PropTypes.func,isSecondary:l.PropTypes.bool,onPress:l.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.title,n=e.isMetadataItem,a=i(e,["title","isMetadataItem"]);return n?l.default.createElement(d.default,a):l.default.createElement(f.default,r({},a,{title:t}))}var i=n(16).default,r=n(12).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(574),d=s(u),c=n(1429),f=s(c);a.propTypes={isMetadataItem:o.PropTypes.bool.isRequired,title:o.PropTypes.string.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(16).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=(d(c),n(27)),p=n(6),h=d(p),m=n(29),v=d(m),g=n(44),y=n(349),b=d(y),w=n(137),P=d(w),_=function(e){
function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onPlaySelectedPress",decorators:[f.autobind],value:function(e){this.props.playSelectedItems()}},{key:"onShufflePress",decorators:[f.autobind],value:function(e){this.props.shuffleSelectedItems()}},{key:"onAddToPlaylistPress",decorators:[f.autobind],value:function(e){this.props.addSelectedItemsToPlaylist();
}},{key:"onMarkWatchedPress",decorators:[f.autobind],value:function(e){this.props.markSelectedItemsWatched()}},{key:"onMarkUnwatchedPress",decorators:[f.autobind],value:function(e){this.props.markSelectedItemsUnwatched()}},{key:"onEditPress",decorators:[f.autobind],value:function(e){this.props.editSelectedItems()}},{key:"onRefreshPress",decorators:[f.autobind],value:function(e){this.props.refreshSelectedItems()}},{key:"onAnalyzePress",decorators:[f.autobind],value:function(e){this.props.analyzeSelectedItems();
}},{key:"onMergePress",decorators:[f.autobind],value:function(e){this.props.mergeSelectedItems()}},{key:"onSyncPress",decorators:[f.autobind],value:function(e){this.props.syncSelectedItems()}},{key:"onOptimizePress",decorators:[f.autobind],value:function(e){this.props.optimizeSelectedItems()}},{key:"onDeletePress",decorators:[f.autobind],value:function(e){this.props.onDeletePress()}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,a=e.onMenuClose,i=u(e,["target","isOpen","onMenuClose"]);
return{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[i.showPlaySelected&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Play Selected"),onPress:this.onPlaySelectedPress}),_owner:null},i.showShuffle&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Shuffle"),onPress:this.onShufflePress}),_owner:null},i.showAddToPlaylist&&{$$typeof:l,type:P.default,key:null,
ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Add to Playlist..."),onPress:this.onAddToPlaylistPress}),_owner:null},i.showMarkWatched&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Mark Watched"),onPress:this.onMarkWatchedPress}),_owner:null},i.showMarkUnwatched&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Mark Unwatched"),onPress:this.onMarkUnwatchedPress}),_owner:null
},i.showEdit&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Edit"),onPress:this.onEditPress}),_owner:null},i.showRefresh&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Refresh"),onPress:this.onRefreshPress}),_owner:null},i.showAnalyze&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Analyze"),onPress:this.onAnalyzePress}),_owner:null},i.showMerge&&{
$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Merge"),onPress:this.onMergePress}),_owner:null},i.showSync&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Sync..."),onPress:this.onSyncPress}),_owner:null},i.showOptimize&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Optimize..."),onPress:this.onOptimizePress}),_owner:null},i.showDelete&&{
$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,h.default)("Delete"),kind:g.kinds.DANGER,onPress:this.onDeletePress}),_owner:null}],target:t,isOpen:n,onMenuClose:a}),_owner:null}}}]),t}(c.Component);_.propTypes={target:c.PropTypes.object,isOpen:c.PropTypes.bool.isRequired,onMenuClose:c.PropTypes.func.isRequired,showPlaySelected:c.PropTypes.bool,showShuffle:c.PropTypes.bool,showAddToPlaylist:c.PropTypes.bool,showMarkWatched:c.PropTypes.bool,showMarkUnwatched:c.PropTypes.bool,
showEdit:c.PropTypes.bool,showRefresh:c.PropTypes.bool,showAnalyze:c.PropTypes.bool,showMerge:c.PropTypes.bool,showSync:c.PropTypes.bool,showOptimize:c.PropTypes.bool,showDelete:c.PropTypes.bool,playSelectedItems:c.PropTypes.func.isRequired,shuffleSelectedItems:c.PropTypes.func.isRequired,addSelectedItemsToPlaylist:c.PropTypes.func.isRequired,markSelectedItemsWatched:c.PropTypes.func.isRequired,markSelectedItemsUnwatched:c.PropTypes.func.isRequired,editSelectedItems:c.PropTypes.func.isRequired,refreshSelectedItems:c.PropTypes.func.isRequired,
analyzeSelectedItems:c.PropTypes.func.isRequired,mergeSelectedItems:c.PropTypes.func.isRequired,syncSelectedItems:c.PropTypes.func.isRequired,optimizeSelectedItems:c.PropTypes.func.isRequired,onDeletePress:c.PropTypes.func.isRequired},t.default=_,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.activeSelectionItems,n=e.onDeselectAllPress,a=s(e,["activeSelectionItems","onDeselectAllPress"]),l=t.length,u=(0,h.default)(e);return{$$typeof:r,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{
children:[{$$typeof:r,type:_.default,key:null,ref:null,props:i(_.default.defaultProps,{children:{$$typeof:r,type:"div",key:null,ref:null,props:{children:[{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{name:"plex-icon-selected-560",className:A.default.icon}),_owner:null},1===l?(0,f.default)("{1} item selected",l):(0,f.default)("{1} items selected",l)],className:A.default.selectedTitle},_owner:null}}),_owner:null},{$$typeof:r,type:x.default,key:null,ref:null,props:i(x.default.defaultProps,{
children:d.default.createElement(I.default,o({numSelectedItems:l},a,u))}),_owner:null},{$$typeof:r,type:T.default,key:null,ref:null,props:i(T.default.defaultProps,{children:{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:[{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{name:"plex-icon-remove-560",className:A.default.icon}),_owner:null},(0,f.default)("Deselect All")],className:A.default.deselectLink,onPress:n}),_owner:null}}),_owner:null
}],className:A.default.multiSelectPageHeader}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(6),f=l(c),p=n(1530),h=l(p),m=n(49),v=l(m),g=n(43),y=l(g),b=n(256),w=l(b),P=n(257),_=l(P),S=n(355),x=l(S),C=n(258),T=l(C),k=n(1494),I=l(k),M=n(1697),A=l(M);a.propTypes={activeSelectionItems:u.PropTypes.array.isRequired,activeSelectionType:u.PropTypes.string.isRequired,onDeselectAllPress:u.PropTypes.func.isRequired
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return!!p.default.find(e,function(e){return t[e]})}var i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(13).default,u=n(14).default,d=n(12).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(7),m=c(h),v=n(6),g=c(v),y=n(27),b=n(29),w=c(b),P=n(254),_=c(P),S=n(579),x=c(S),C=n(580),T=c(C),k=n(578),I=c(k),M=n(1445),A=c(M),E=n(1444),O=c(E),D=n(581),R=c(D),L=n(353),N=c(L),j=n(1492),U=c(j),F=["showRefresh","showAnalyze","showMerge","showOptimize","showDelete"],B=function(e){
function t(e,n){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1,isDeleteModalOpen:!1}}return r(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"onPlaySelectedPress",decorators:[y.autobind],value:function(e){this.props.playSelectedItems()}},{key:"onShufflePress",decorators:[y.autobind],value:function(e){this.props.shuffleSelectedItems()}},{key:"onAddToPlaylistPress",decorators:[y.autobind],
value:function(e){this.props.addSelectedItemsToPlaylist()}},{key:"onMarkWatchedConfirm",decorators:[y.autobind],value:function(e){this.props.markSelectedItemsWatched()}},{key:"onMarkUnwatchedConfirm",decorators:[y.autobind],value:function(e){this.props.markSelectedItemsUnwatched()}},{key:"onEditPress",decorators:[y.autobind],value:function(e){this.props.editSelectedItems()}},{key:"onSyncPress",decorators:[y.autobind],value:function(e){this.props.syncSelectedItems()}},{key:"onActionsPress",decorators:[y.autobind],
value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[y.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"onDeletePress",decorators:[y.autobind],value:function(e){this.setState({isDeleteModalOpen:!0})}},{key:"onDeleteConfirm",decorators:[y.autobind],value:function(e){this.setState({isDeleteModalOpen:!1}),this.props.deleteSelectedItems()}},{key:"onDeleteCancel",decorators:[y.autobind],value:function(){this.setState({
isDeleteModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.numSelectedItems,n=e.showPlaySelected,i=e.showShuffle,r=e.showAddToPlaylist,s=e.showMarkWatched,o=e.showMarkUnwatched,c=e.showEdit,f=e.showSync,p=this.state,h=p.isActionsMenuOpen,v=p.isDeleteModalOpen,y=a(F,this.props);return{$$typeof:l,type:"div",key:null,ref:null,props:{children:[n&&{$$typeof:l,type:x.default,key:null,ref:null,props:u(x.default.defaultProps,{playLabel:(0,g.default)("Play Selected"),onPress:this.onPlaySelectedPress
}),_owner:null},i&&{$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{onPress:this.onShufflePress}),_owner:null},r&&{$$typeof:l,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{onPress:this.onAddToPlaylistPress}),_owner:null},(s||o)&&{$$typeof:l,type:A.default,key:null,ref:null,props:u(A.default.defaultProps,{numSelectedItems:t,showMarkWatched:s,showMarkUnwatched:o,onMarkWatchedConfirm:this.onMarkWatchedConfirm,onMarkUnwatchedConfirm:this.onMarkUnwatchedConfirm
}),_owner:null},c&&{$$typeof:l,type:O.default,key:null,ref:null,props:u(O.default.defaultProps,{onPress:this.onEditPress}),_owner:null},f&&{$$typeof:l,type:R.default,key:null,ref:null,props:u(R.default.defaultProps,{onPress:this.onSyncPress}),_owner:null},y&&m.default.createElement(N.default,{ref:"moreButton",icon:"plex-icon-toolbar-more-560",label:(0,g.default)("More..."),isMenuOpen:h,onPress:this.onActionsPress}),m.default.createElement(U.default,d({target:this.refs.moreButton,isOpen:h,onMenuClose:this.onActionsMenuClose,
onDeletePress:this.onDeletePress},this.props,{showPlaySelected:!1,showShuffle:!1,showAddToPlaylist:!1,showMarkWatched:!1,showMarkUnwatched:!1,showEdit:!1,showSync:!1})),{$$typeof:l,type:_.default,key:null,ref:null,props:u(_.default.defaultProps,{isOpen:v,metricsPage:"confirmDelete",title:(0,g.default)("Delete"),message:1===t?(0,g.default)("Are you sure you want to delete this item from your filesystem?"):(0,g.default)("Are you sure you want to delete these {1} items from your filesystem?",t),onConfirm:this.onDeleteConfirm,
onCancel:this.onDeleteCancel}),_owner:null}]},_owner:null}}}]),t}(h.Component);B.propTypes={numSelectedItems:h.PropTypes.number.isRequired,showPlaySelected:h.PropTypes.bool,showShuffle:h.PropTypes.bool,showAddToPlaylist:h.PropTypes.bool,showMarkWatched:h.PropTypes.bool,showMarkUnwatched:h.PropTypes.bool,showEdit:h.PropTypes.bool,showRefresh:h.PropTypes.bool,showAnalyze:h.PropTypes.bool,showMerge:h.PropTypes.bool,showSync:h.PropTypes.bool,showOptimize:h.PropTypes.bool,showDelete:h.PropTypes.bool,playSelectedItems:h.PropTypes.func.isRequired,
shuffleSelectedItems:h.PropTypes.func.isRequired,addSelectedItemsToPlaylist:h.PropTypes.func.isRequired,markSelectedItemsWatched:h.PropTypes.func.isRequired,markSelectedItemsUnwatched:h.PropTypes.func.isRequired,editSelectedItems:h.PropTypes.func.isRequired,syncSelectedItems:h.PropTypes.func.isRequired,deleteSelectedItems:h.PropTypes.func.isRequired},t.default=B,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(27),p=n(151),h=u(p),m=n(163),v=u(m),g=n(86),y=u(g),b=n(1507),w=u(b),P=n(1515),_=u(P),S=n(1500),x=u(S),C=n(1505),T=u(C),k=n(1698),I=u(k),M=(0,h.default)(v.default.menuSpeed),A={$$typeof:o,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{}),_owner:null},E=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMenuOpen:!1}}return i(t,e),r(t,[{key:"componentDidUpdate",
value:function(e,t){var n=this;!t.isMenuOpen&&this.state.isMenuOpen&&(this._openTimeoutID=setTimeout(function(){return n.props.onServerMenuOpen()},M))}},{key:"componentWillUnmount",value:function(){this._openTimeoutID&&clearTimeout(this._openTimeoutID)}},{key:"onMenuButtonPress",decorators:[f.autobind],value:function(e){this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[f.autobind],value:function(e){this.setState({isMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.primaryServerEntityID,n=e.serverEntityIDs;
return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[c.default.createElement(w.default,{ref:"menuButton",hasPrimaryServer:!!t,serverEntityID:t,onPress:this.onMenuButtonPress}),{$$typeof:o,type:y.default,key:null,ref:null,props:l(y.default.defaultProps,{children:{$$typeof:o,type:"div",key:null,ref:null,props:{children:t?{$$typeof:o,type:_.default,key:null,ref:null,props:l(_.default.defaultProps,{serverEntityID:t}),_owner:null}:A,className:I.default.sidebarContent},_owner:null},className:I.default.sidebarScroller,
autoScroll:!0}),_owner:null},{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{target:this.refs.menuButton,isOpen:this.state.isMenuOpen,serverEntityIDs:n,onMenuClose:this.onMenuClose}),_owner:null}],className:I.default.sidebar},_owner:null}}}]),t}(d.Component);E.propTypes={primaryServerEntityID:d.PropTypes.string,serverEntityIDs:d.PropTypes.array.isRequired,onServerMenuOpen:d.PropTypes.func.isRequired},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function a(e){
var t=e.count;return{$$typeof:r,type:u.default,key:null,ref:null,props:i(u.default.defaultProps,{className:c.default.sidebarListItemBadge,count:t}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(555)),u=s(l),d=n(1702),c=s(d);a.propTypes={count:o.PropTypes.number},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=c.default.get("myPlexScheme")+"://"+c.default.get("myPlexUrl");return{
$$typeof:r,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{children:[{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{children:[{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Account"),className:w.default.selected,to:"#!/account",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Subscriptions"),to:(0,f.join)([t,"/subscription"]),
target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Payments"),to:(0,f.join)([t,"/users/payments"]),target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Cloud Sync"),to:(0,f.join)([t,"/cloudsync/providers"]),target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:r,type:y.default,
key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Global App Settings"),to:(0,f.join)([t,"/users/profile"]),target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Authorized Devices"),to:"#!/settings/devices",icon:"plex-icon-settings-560"}),_owner:null}],title:e.username}),_owner:null},{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{children:[{
$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Plex Home"),to:"#!/settings/users",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:(0,u.default)("Sharing"),to:"#!/settings/users/friends",icon:"plex-icon-settings-560"}),_owner:null}],title:(0,u.default)("Family & Friends")}),_owner:null}],className:w.default.container,autoScroll:!0}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(57),c=s(d),f=n(23),p=n(86),h=s(p),m=n(360),v=s(m),g=n(161),y=s(g),b=n(1704),w=s(b);a.propTypes={username:o.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){return s.default.createElement(f.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),s=i(r),o=n(34),l=n(30),u=n(225),d=i(u),c=n(1497),f=i(c),p=(0,l.createSelector)(d.default,function(e){
return{username:e.username}});t.default=(0,o.connect)(p)(a),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.outOfDateServers,n=e.isWaitingForPrimaryServer,a=e.isUserRestricted;return n?v:t.length?{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{outOfDateServers:t}),_owner:null}:a?g:y}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(1501)),u=s(l),d=n(1502),c=s(d),f=n(1503),p=s(f),h=n(1504),m=s(h),v={
$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{}),_owner:null},g={$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{}),_owner:null},y={$$typeof:r,type:u.default,key:null,ref:null,props:i(u.default.defaultProps,{}),_owner:null};a.propTypes={outOfDateServers:o.PropTypes.array.isRequired,isWaitingForPrimaryServer:o.PropTypes.bool.isRequired,isUserRestricted:o.PropTypes.bool.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";
var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(34),r=n(30),s=n(459),o=a(s),l=n(1499),u=a(l),d=(0,r.createStructuredSelector)({outOfDateServers:o.default,isWaitingForPrimaryServer:function(e){return e.isWaitingForPrimaryServer},isUserRestricted:function(e){return!!e.user.restricted}}),c=(0,i.connect)(function(e){return d(e)})(u.default);t.default=c,e.exports=t.default},function(e,t,n){"use strict";function a(){return{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{
children:{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{children:(0,u.default)("Where is my server?"),to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560"}),_owner:null},message:(0,u.default)("A server could not be found. Download and install Plex Media Server, and it will appear here.")}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(162),c=s(d),f=n(161),p=s(f);
t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{children:{$$typeof:r,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{children:(0,u.default)("Learn more"),to:"https://support.plex.tv/hc/en-us/articles/204234313-Example-Plex-Home-Setup",target:"_blank",icon:"plex-icon-help-560"}),_owner:null},message:(0,u.default)("No one in your home has shared a library with you.")}),_owner:null
}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(162),c=s(d),f=n(161),p=s(f);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.outOfDateServers,n=t.map(function(e){return'"'+e.friendlyName+'"'}),a=(0,c.default)(n),s=void 0;return s=1===t.length?(0,u.default)("The server {1} needs an update.",a):(0,u.default)("The servers {1} need updates.",a),{$$typeof:r,type:p.default,key:null,
ref:null,props:i(p.default.defaultProps,{message:s}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(499),c=s(d),f=n(162),p=s(f);a.propTypes={outOfDateServers:o.PropTypes.array.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return{$$typeof:r,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{message:(0,u.default)("Please wait while servers are discovered.")
}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(6)),u=s(l),d=n(162),c=s(d);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.target,n=e.isOpen,a=e.serverEntityIDs,s=e.onMenuClose;return{$$typeof:r,type:d.default,key:null,ref:null,props:i(d.default.defaultProps,{children:a.map(function(e){return{$$typeof:r,type:f.default,key:e,ref:null,props:i(f.default.defaultProps,{serverEntityID:e
}),_owner:null}}),className:h.default.serverMenu,target:t,isOpen:n,scrollerProps:m,onMenuClose:s}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=(s(o),n(44)),u=n(159),d=s(u),c=n(1509),f=s(c),p=n(1705),h=s(p),m={className:h.default.serverMenuScroller,scrollDirection:l.scrollDirections.VERTICAL,autoScroll:!0};a.propTypes={target:o.PropTypes.object,isOpen:o.PropTypes.bool,serverEntityIDs:o.PropTypes.array.isRequired,onMenuClose:o.PropTypes.func.isRequired
},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.hasPrimaryServer,n=l(e,["hasPrimaryServer"]);return t?f.default.createElement(r,n):f.default.createElement(i,n)}function i(e){return f.default.createElement(P.default,u({className:C.default.serverMenuButton,isSelected:!0,isDisabled:!0},e),{$$typeof:s,type:"div",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:(0,h.default)("Looking for servers..."),className:C.default.serverMenuTitle
},_owner:null},{$$typeof:s,type:g.default,key:null,ref:null,props:o(g.default.defaultProps,{size:m.sizes.SMALL,className:C.default.serverMenuSpinner}),_owner:null}],className:C.default.serverMenuButtonContainer},_owner:null})}function r(e){var t=e.friendlyName,n=e.sourceTitle,a=e.isConnected,i=e.isUnavailable,r=e.isSecure,d=e.isRelayed,c=l(e,["friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed"]),p=void 0;return d&&n?p=(0,h.default)("Indirect {1}","("+n+")"):d?p=(0,h.default)("Indirect"):n&&(p=n),
f.default.createElement(P.default,u({className:C.default.serverMenuButton,"aria-haspopup":!0,isSelected:!0},c),{$$typeof:s,type:"div",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:t,className:C.default.serverMenuFriendlyName},_owner:null},T],className:C.default.serverMenuFriendlyNameContainer},_owner:null},p&&{$$typeof:s,type:"span",key:null,
ref:null,props:{children:p,className:C.default.serverMenuUsername},_owner:null}],className:C.default.serverMenuTitle},_owner:null},{$$typeof:s,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{className:C.default.icon,isConnected:a,isUnavailable:i,isSecure:r}),_owner:null}],className:C.default.serverMenuButtonContainer},_owner:null})}var s=n(13).default,o=n(14).default,l=n(16).default,u=n(12).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),f=d(c),p=n(6),h=d(p),m=n(44),v=n(70),g=d(v),y=n(556),b=d(y),w=n(43),P=d(w),_=n(589),S=d(_),x=n(1706),C=d(x);
a.propTypes={hasPrimaryServer:c.PropTypes.bool.isRequired};var T={$$typeof:s,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{isSelected:!0}),_owner:null};r.propTypes={friendlyName:c.PropTypes.string.isRequired,sourceTitle:c.PropTypes.string,isConnected:c.PropTypes.bool.isRequired,isUnavailable:c.PropTypes.bool.isRequired,isSecure:c.PropTypes.bool.isRequired,isRelayed:c.PropTypes.bool.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,c.createSelector)((0,
p.default)(),function(e){var t=o.default.pick(e,"friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed");return t})}function i(e){return u.default.createElement(m.default,e)}var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(7),u=r(l),d=n(34),c=n(30),f=n(76),p=r(f),h=n(1506),m=r(h);i.propTypes={serverEntityID:l.PropTypes.string},t.default=(0,d.connect)(a)(i),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.activeConnection,n=!1,a=void 0;
return e.isConnected&&t?a=e.isCloudSyncServer?(0,y.default)("Cloud"):e.isOutOfDate?(0,y.default)("Needs Update"):t.relay?(0,y.default)("Indirect"):t.isPrivate?(0,y.default)("Nearby"):(0,y.default)("Remote"):e.isRelayed?a=(0,y.default)("Indirect"):e.isUnavailable?a=(0,y.default)("Unavailable"):(n=!0,a=(0,y.default)("Connecting")),e.sourceTitle&&(a+=" ("+e.sourceTitle+")"),{isDisabled:n,status:a}}var i=n(21).default,r=n(22).default,s=n(50).default,o=n(20).default,l=n(13).default,u=n(14).default,d=n(16).default,c=n(12).default,f=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var p=n(7),h=f(p),m=n(32),v=f(m),g=n(6),y=f(g),b=n(29),w=f(b),P=n(49),_=f(P),S=n(137),x=f(S),C=n(589),T=f(C),k=n(1708),I=f(k),M=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"render",value:function(){if(!this.props.isPrimaryEligible||!this.props.friendlyName)return null;var e=this.props,t=e.className,n=e.isSelected,i=(e.onPress,
d(e,["className","isSelected","onPress"])),r=a(i),s=r.isDisabled,o=r.status;return h.default.createElement(x.default,c({className:(0,v.default)(t,I.default.serverMenuItem,(s||i.isUnavailable)&&I.default.disabledServerMenuItem,n&&I.default.selectedServerMenuItem),to:"#!/server/"+i.machineIdentifier+"/dashboard",isDisabled:s,onPress:this.onPress},i),{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,
props:{children:i.friendlyName,className:I.default.serverMenuFriendlyName},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:o,className:I.default.serverMenuStatus},_owner:null}],className:I.default.serverMenuTitle},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[n&&{$$typeof:l,type:_.default,key:null,ref:null,props:u(_.default.defaultProps,{name:"plex-icon-selected-560",className:(0,v.default)(I.default.serverMenuIcon,I.default.selectedIcon),"aria-label":(0,
y.default)("Selected")}),_owner:null},{$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{className:I.default.serverMenuIcon,isConnected:i.isConnected,isUnavailable:i.isUnavailable,isSecure:i.isSecure,isRelayed:!n&&i.isRelayed}),_owner:null}],className:I.default.serverMenuIconContainer},_owner:null}],className:I.default.serverMenuItemContainer},_owner:null})}}]),t}(p.Component);M.propTypes={className:p.PropTypes.string,machineIdentifier:p.PropTypes.string,friendlyName:p.PropTypes.string,
sourceTitle:p.PropTypes.string,isConnected:p.PropTypes.bool.isRequired,isUnavailable:p.PropTypes.bool.isRequired,isSecure:p.PropTypes.bool.isRequired,isOutOfDate:p.PropTypes.bool.isRequired,isRelayed:p.PropTypes.bool.isRequired,isCloudSyncServer:p.PropTypes.bool.isRequired,isPrimaryEligible:p.PropTypes.bool.isRequired,activeConnection:p.PropTypes.object,isSelected:p.PropTypes.bool.isRequired,onPress:p.PropTypes.func},t.default=M,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,
f.createSelector)((0,h.default)(),function(e){return e.primaryServer},function(e,t){var n=l.default.pick(e,"machineIdentifier","friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isCloudSyncServer","isPrimaryEligible","activeConnection","isOutOfDate","isRelayed");return r({},n,{isSelected:e.entityID===t})})}function i(e){return d.default.createElement(v.default,e)}var r=n(12).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(7),d=s(u),c=n(34),f=n(30),p=n(76),h=s(p),m=n(1508),v=s(m);
i.propTypes={serverEntityID:u.PropTypes.string.isRequired},t.default=(0,c.connect)(a)(i),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(13).default,l=n(14).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=u(d),f=n(32),p=u(f),h=n(6),m=u(h),v=n(27),g=n(29),y=u(g),b=n(49),w=u(b),P=n(43),_=u(P),S=n(254),x=u(S),C=n(1511),T=u(C),k=n(1709),I=u(k),M=function(e){function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isActionsMenuOpen:!1,isOptimizeModalOpen:!1,isCleanBundlesModalOpen:!1,isEmptyTrashModalOpen:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"onActionsPress",decorators:[v.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen}),this.props.onActionsMenuOpen&&this.props.onActionsMenuOpen()}},{key:"onActionsMenuClose",decorators:[v.autobind],value:function(){this.setState({isActionsMenuOpen:!1
}),this.props.onActionsMenuClose&&this.props.onActionsMenuClose()}},{key:"onOptimizeDatabasePress",decorators:[v.autobind],value:function(e){this.setState({isOptimizeModalOpen:!0})}},{key:"onOptimizeConfirm",decorators:[v.autobind],value:function(){this.setState({isOptimizeModalOpen:!1}),this.props.onOptimizeDatabaseConfirm()}},{key:"onOptimizeCancel",decorators:[v.autobind],value:function(){this.setState({isOptimizeModalOpen:!1})}},{key:"onCleanBundlesPress",decorators:[v.autobind],value:function(e){
this.setState({isCleanBundlesModalOpen:!0})}},{key:"onCleanBundlesConfirm",decorators:[v.autobind],value:function(){this.setState({isCleanBundlesModalOpen:!1}),this.props.onCleanBundlesConfirm()}},{key:"onCleanBundlesCancel",decorators:[v.autobind],value:function(){this.setState({isCleanBundlesModalOpen:!1})}},{key:"onEmptyTrashPress",decorators:[v.autobind],value:function(e){this.setState({isEmptyTrashModalOpen:!0})}},{key:"onEmptyTrashConfirm",decorators:[v.autobind],value:function(){this.setState({
isEmptyTrashModalOpen:!1}),this.props.onEmptyTrashConfirm()}},{key:"onEmptyTrashCancel",decorators:[v.autobind],value:function(){this.setState({isEmptyTrashModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.actionClassName,a=e.isLibraryRefreshing;return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:_.default,key:null,ref:null,props:l(_.default.defaultProps,{children:{$$typeof:o,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{
name:"plex-icon-add-560","aria-label":(0,m.default)("Add Library")}),_owner:null},className:(0,p.default)(n,I.default.librariesAction),role:"menuitem",onPress:this.props.onAddLibraryPress}),_owner:null},c.default.createElement(_.default,{ref:"actionsMenuButton",className:(0,p.default)(n,I.default.librariesAction),role:"menuitem","aria-haspopup":!0,onPress:this.onActionsPress},{$$typeof:o,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{name:"plex-icon-more-560","aria-label":(0,m.default)("More Actions")
}),_owner:null}),{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{target:this.refs.actionsMenuButton,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:a,onMenuClose:this.onActionsMenuClose,onSharePress:this.props.onSharePress,onUpdateLibrariesPress:this.props.onUpdateLibrariesPress,onCancelUpdatePress:this.props.onCancelUpdatePress,onOptimizeDatabasePress:this.onOptimizeDatabasePress,onCleanBundlesPress:this.onCleanBundlesPress,onEmptyTrashPress:this.onEmptyTrashPress
}),_owner:null},{$$typeof:o,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{isOpen:this.state.isOptimizeModalOpen,metricsPage:"confirmOptimizeDatabase",title:(0,m.default)("Optimize Database"),message:(0,m.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:(0,m.default)("Optimize"),onConfirm:this.onOptimizeConfirm,onCancel:this.onOptimizeCancel
}),_owner:null},{$$typeof:o,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{isOpen:this.state.isCleanBundlesModalOpen,metricsPage:"confirmCleanBundles",title:(0,m.default)("Clean Bundles"),message:(0,m.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:(0,m.default)("Clean"),onConfirm:this.onCleanBundlesConfirm,
onCancel:this.onCleanBundlesCancel}),_owner:null},{$$typeof:o,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:"confirmEmptyTrash",title:(0,m.default)("Empty Trash"),message:(0,m.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:(0,m.default)("Empty"),
onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}),_owner:null}],className:(0,p.default)(t,I.default.librariesActions,this.state.isActionsMenuOpen&&I.default.isActionsMenuOpen),role:"menu"},_owner:null}}}]),t}(d.Component);M.propTypes={className:d.PropTypes.string,actionClassName:d.PropTypes.string,isLibraryRefreshing:d.PropTypes.bool.isRequired,onActionsMenuOpen:d.PropTypes.func,onActionsMenuClose:d.PropTypes.func,onAddLibraryPress:d.PropTypes.func.isRequired,onSharePress:d.PropTypes.func.isRequired,
onUpdateLibrariesPress:d.PropTypes.func.isRequired,onCancelUpdatePress:d.PropTypes.func.isRequired,onOptimizeDatabaseConfirm:d.PropTypes.func.isRequired,onCleanBundlesConfirm:d.PropTypes.func.isRequired,onEmptyTrashConfirm:d.PropTypes.func.isRequired},t.default=M,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.isLibraryRefreshing,n=e.onSharePress,a=e.onUpdateLibrariesPress,o=e.onCancelUpdatePress,l=e.onOptimizeDatabasePress,d=e.onCleanBundlesPress,f=e.onEmptyTrashPress,h=s(e,["isLibraryRefreshing","onSharePress","onUpdateLibrariesPress","onCancelUpdatePress","onOptimizeDatabasePress","onCleanBundlesPress","onEmptyTrashPress"]);
return u.default.createElement(p.default,h,{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:(0,c.default)("Share..."),onPress:n}),_owner:null},t?{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:(0,c.default)("Cancel Update"),onPress:o}),_owner:null}:{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:(0,c.default)("Update Libraries"),onPress:a}),_owner:null},{$$typeof:r,type:m.default,key:null,
ref:null,props:i(m.default.defaultProps,{children:(0,c.default)("Optimize Database"),onPress:l}),_owner:null},{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:(0,c.default)("Clean Bundles"),onPress:d}),_owner:null},{$$typeof:r,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:(0,c.default)("Empty Trash"),onPress:f}),_owner:null})}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var l=n(7),u=o(l),d=n(6),c=o(d),f=n(159),p=o(f),h=n(137),m=o(h);a.propTypes={isLibraryRefreshing:l.PropTypes.bool.isRequired,onSharePress:l.PropTypes.func.isRequired,onUpdateLibrariesPress:l.PropTypes.func.isRequired,onCancelUpdatePress:l.PropTypes.func.isRequired,onOptimizeDatabasePress:l.PropTypes.func.isRequired,onCleanBundlesPress:l.PropTypes.func.isRequired,onEmptyTrashPress:l.PropTypes.func.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.id,n=e.type,a=e.agent,o=e.title,l=void 0===o?"":o,u=e.refreshing,c=s(e,["id","type","agent","title","refreshing"]),p="movie"===n&&"com.plexapp.agents.none"===a,m=p?"videos":n,g=encodeURIComponent(c.machineIdentifier),b=encodeURIComponent(t),P=l.trim();
return{$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:[{$$typeof:r,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{children:P,to:"#!/server/"+g+"/section/"+b,icon:f.default.get(m).sectionTypeIcon,className:_.default.libraryLink,showSpinner:c.isFullOwnedServer&&u}),_owner:null},c.isFullOwnedServer&&{$$typeof:r,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{children:{$$typeof:r,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{
name:"plex-icon-edit-560","aria-label":(0,d.default)("Edit {1}",P)}),_owner:null},className:_.default.editLibraryLink,onPress:c.onEditLibraryPress}),_owner:null}],className:_.default.libraryItem}),_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=(o(l),n(6)),d=o(u),c=n(93),f=o(c),p=n(49),h=o(p),m=n(43),v=o(m),g=n(361),y=o(g),b=n(359),w=o(b),P=n(1710),_=o(P);a.propTypes={machineIdentifier:l.PropTypes.string,
isFullOwnedServer:l.PropTypes.bool,id:l.PropTypes.string,type:l.PropTypes.string,agent:l.PropTypes.string,title:l.PropTypes.string,refreshing:l.PropTypes.bool,onEditLibraryPress:l.PropTypes.func.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(12).default,i=n(21).default,r=n(22).default,s=n(28).default,o=n(20).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),c=n(7),f=l(c),p=n(34),h=n(30),m=n(27),v=n(223),g=l(v),y=n(1121),b=n(1512),w=l(b),P=function(){
return(0,h.createSelector)((0,g.default)(),function(e){var t=d.default.pick(e,"title","type","agent","refreshing");return a({},t,{id:e.key})})},_=function(e){function t(){o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),s(t,[{key:"onEditLibraryPress",decorators:[m.autobind],value:function(e){this.props.editLibrary({libraryEntityID:this.props.libraryEntityID})}},{key:"render",value:function(){return f.default.createElement(w.default,a({onEditLibraryPress:this.onEditLibraryPress
},this.props))}}]),t}(c.Component);_.propTypes={libraryEntityID:c.PropTypes.string.isRequired,editLibrary:c.PropTypes.func.isRequired},t.default=(0,p.connect)(P,{editLibrary:y.editLibrary})(_),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.machineIdentifier,n=e.allowChannelAccess,a=e.isFullOwnedServer,s=e.isConnected,o=e.isClaimed;return s?{$$typeof:i,type:"div",key:null,ref:null,props:{children:[a&&{$$typeof:i,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{
children:[{$$typeof:i,type:v.default,key:"status",ref:null,props:r(v.default.defaultProps,{children:(0,d.default)("Status"),to:"#!/status",icon:"plex-icon-status-560"}),_owner:null},{$$typeof:i,type:v.default,key:"settings",ref:null,props:r(v.default.defaultProps,{children:[(0,d.default)("Settings"),!o&&{$$typeof:i,type:f.default,key:null,ref:null,props:r(f.default.defaultProps,{name:"plex-icon-alert-560",className:x.default.unclaimedIcon,"aria-label":(0,d.default)("Unclaimed")}),_owner:null}],to:"#!/settings/server",
icon:"plex-icon-settings-560"}),_owner:null}],title:(0,d.default)("Manage")}),_owner:null},l.default.createElement(w.default,e),{$$typeof:i,type:y.default,key:null,ref:null,props:r(y.default.defaultProps,{machineIdentifier:t,showChannels:!(!a&&!n)}),_owner:null}]},_owner:null}:l.default.createElement(_.default,e)}var i=n(13).default,r=n(14).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(6),d=s(u),c=n(49),f=s(c),p=n(360),h=s(p),m=n(161),v=s(m),g=n(1518),y=s(g),b=n(1516),w=s(b),P=n(1519),_=s(P),S=n(1711),x=s(S);
a.propTypes={machineIdentifier:o.PropTypes.string.isRequired,isConnected:o.PropTypes.bool.isRequired,isFullOwnedServer:o.PropTypes.bool.isRequired,isClaimed:o.PropTypes.bool,allowChannelAccess:o.PropTypes.bool},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(){return(0,g.createSelector)((0,S.default)(),function(e){return p.default.some(p.default.pluck(e,"refreshing"))})}function i(){return(0,g.createSelector)((0,P.default)(),a(),function(e,t){var n=p.default.pick(e,"machineIdentifier","friendlyName","promiseState","presence","allowChannelAccess","isConnected","isFullServer","isFullOwnedServer","isBundled","isClaimed","hasHttpsConnections","hasFallbackConnections"),a=p.default.pick(e&&e.desktop,"libraries","isLibrariesPending","librariesError");
return r({},n,a,{isLibraryRefreshing:t})})}var r=n(12).default,s=n(21).default,o=n(22).default,l=n(28).default,u=n(20).default,d=n(1).default,c=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=d(f),h=n(7),m=d(h),v=n(34),g=n(30),y=n(27),b=n(79),w=n(76),P=d(w),_=n(840),S=d(_),x=n(81),C=n(188),T=c(C),k=n(1514),I=d(k),M=r({redirectToHttp:x.redirectToHttp},T),A=function(e){function t(){u(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),
l(t,[{key:"componentWillMount",value:function(){var e=this.props.isConnected;e&&this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.serverEntityID,a=t.isConnected,i=e.serverEntityID,r=e.isConnected,s=n!==i,o=a!==r;r&&(s||o)&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,b.scheduleImmediateUpdate)(function(){e.fetchLibraries({serverEntityID:e.serverEntityID})})}},{key:"onReloadHttpPress",
decorators:[y.autobind],value:function(e){this.props.redirectToHttp()}},{key:"onDeleteServerConfirm",decorators:[y.autobind],value:function(){this.props.deleteServer({serverEntityID:this.props.serverEntityID})}},{key:"onAddLibraryPress",decorators:[y.autobind],value:function(e){this.props.addLibrary({serverEntityID:this.props.serverEntityID})}},{key:"onSharePress",decorators:[y.autobind],value:function(e){this.props.shareLibraries({serverEntityID:this.props.serverEntityID})}},{key:"onUpdateLibrariesPress",
decorators:[y.autobind],value:function(e){this.props.startLibraryRefresh({serverEntityID:this.props.serverEntityID})}},{key:"onCancelUpdatePress",decorators:[y.autobind],value:function(e){this.props.cancelLibraryRefresh({serverEntityID:this.props.serverEntityID})}},{key:"onOptimizeDatabaseConfirm",decorators:[y.autobind],value:function(e){this.props.optimizeDatabase({serverEntityID:this.props.serverEntityID})}},{key:"onCleanBundlesConfirm",decorators:[y.autobind],value:function(e){this.props.cleanBundles({
serverEntityID:this.props.serverEntityID})}},{key:"onEmptyTrashConfirm",decorators:[y.autobind],value:function(e){this.props.emptyTrash({serverEntityID:this.props.serverEntityID})}},{key:"onTryAgainPress",decorators:[y.autobind],value:function(e){this.props.testServer({serverEntityID:this.props.serverEntityID})}},{key:"onAllowFallbackPress",decorators:[y.autobind],value:function(e){this.props.enableHttpFallback({serverEntityID:this.props.serverEntityID})}},{key:"render",value:function(){return m.default.createElement(I.default,r({
onReloadHttpPress:this.onReloadHttpPress,onDeleteServerConfirm:this.onDeleteServerConfirm,onAddLibraryPress:this.onAddLibraryPress,onSharePress:this.onSharePress,onUpdateLibrariesPress:this.onUpdateLibrariesPress,onCancelUpdatePress:this.onCancelUpdatePress,onOptimizeDatabaseConfirm:this.onOptimizeDatabaseConfirm,onCleanBundlesConfirm:this.onCleanBundlesConfirm,onEmptyTrashConfirm:this.onEmptyTrashConfirm,onTryAgainPress:this.onTryAgainPress,onAllowFallbackPress:this.onAllowFallbackPress},this.props));
}}]),t}(h.Component);A.propTypes={serverEntityID:h.PropTypes.string.isRequired,isConnected:h.PropTypes.bool.isRequired,redirectToHttp:h.PropTypes.func.isRequired,deleteServer:h.PropTypes.func.isRequired,fetchLibraries:h.PropTypes.func.isRequired,addLibrary:h.PropTypes.func.isRequired,shareLibraries:h.PropTypes.func.isRequired,startLibraryRefresh:h.PropTypes.func.isRequired,cancelLibraryRefresh:h.PropTypes.func.isRequired,optimizeDatabase:h.PropTypes.func.isRequired,cleanBundles:h.PropTypes.func.isRequired,
emptyTrash:h.PropTypes.func.isRequired,testServer:h.PropTypes.func.isRequired,enableHttpFallback:h.PropTypes.func.isRequired},t.default=(0,v.connect)(i,M)(A),e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=(e.serverEntityID,e.isFullServer),n=e.isFullOwnedServer,a=e.libraries,l=s(e,["serverEntityID","isFullServer","isFullOwnedServer","libraries"]),u=l.isLibrariesPending&&!a.length,c=!!l.librariesError&&!a.length,p=n&&!a.length,m=encodeURIComponent(l.machineIdentifier);return u?{
$$typeof:r,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{containerClassName:A.default.librariesSpinnerContainer,label:(0,h.default)("Loading libraries")}),_owner:null}:{$$typeof:r,type:"div",key:null,ref:null,props:{children:[{$$typeof:r,type:"div",key:null,ref:null,props:{children:[{$$typeof:r,type:"div",key:null,ref:null,props:{children:(0,h.default)("Libraries"),className:A.default.librariesTitle},_owner:null},n&&d.default.createElement(T.default,o({actionClassName:A.default.librariesAction
},l))],className:A.default.librariesListHeader,role:"header"},_owner:null},t&&{$$typeof:r,type:_.default,key:"playlists",ref:null,props:i(_.default.defaultProps,{children:{$$typeof:r,type:x.default,key:null,ref:null,props:i(x.default.defaultProps,{children:(0,h.default)("Playlists"),to:"#!/server/"+m+"/playlists",icon:"plex-icon-playlists-560",className:A.default.libraryLink}),_owner:null},className:A.default.libraryItem}),_owner:null},p&&{$$typeof:r,type:_.default,key:"addLibrary",ref:null,props:i(_.default.defaultProps,{
children:{$$typeof:r,type:x.default,key:null,ref:null,props:i(x.default.defaultProps,{children:(0,h.default)("Add Library"),icon:"plex-icon-add-560",className:A.default.libraryLink,onPress:l.onAddLibraryPress}),_owner:null},className:A.default.libraryItem}),_owner:null},c?{$$typeof:r,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{message:(0,h.default)("There was an unexpected error loading libraries.")}),_owner:null}:a.map(function(e){return{$$typeof:r,type:I.default,key:e,ref:null,
props:i(I.default.defaultProps,{libraryEntityID:e,machineIdentifier:l.machineIdentifier,isFullOwnedServer:n}),_owner:null}})],className:(0,f.default)(A.default.librariesList,v.default.hasTouchScreen&&A.default.touchLibrariesList),role:"navigation"},_owner:null}}var i=n(14).default,r=n(13).default,s=n(16).default,o=n(12).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=l(u),c=n(32),f=l(c),p=n(6),h=l(p),m=n(58),v=l(m),g=n(70),y=l(g),b=n(162),w=l(b),P=n(361),_=l(P),S=n(359),x=l(S),C=n(1510),T=l(C),k=n(1513),I=l(k),M=n(1712),A=l(M);
a.propTypes={serverEntityID:u.PropTypes.string.isRequired,machineIdentifier:u.PropTypes.string.isRequired,allowChannelAccess:u.PropTypes.bool,isFullServer:u.PropTypes.bool.isRequired,isFullOwnedServer:u.PropTypes.bool.isRequired,libraries:u.PropTypes.array.isRequired,isLibrariesPending:u.PropTypes.bool.isRequired,librariesError:u.PropTypes.object,onAddLibraryPress:u.PropTypes.func.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(6)),f=u(c),p=n(360),h=u(p),m=n(161),v=u(m),g=n(1496),y=u(g),b=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.showChannels,a=e.isUserRestricted,i=e.unwatchedWatchLaterCount,r=e.unwatchedRecommendedCount,s=!a,u=encodeURIComponent(t);return n||s?{$$typeof:l,type:h.default,key:null,
ref:null,props:o(h.default.defaultProps,{children:[n&&{$$typeof:l,type:v.default,key:"channels",ref:null,props:o(v.default.defaultProps,{children:(0,f.default)("Channels"),to:"#!/server/"+u+"/channels",icon:"plex-icon-channels-560"}),_owner:null},s&&{$$typeof:l,type:v.default,key:"watchLater",ref:null,props:o(v.default.defaultProps,{children:[(0,f.default)("Watch Later"),{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{count:i}),_owner:null}],to:"#!/playlist/queue",icon:"plex-icon-watch-later-560"
}),_owner:null},s&&{$$typeof:l,type:v.default,key:"recommended",ref:null,props:o(v.default.defaultProps,{children:[(0,f.default)("Recommended"),{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{count:r}),_owner:null}],to:"#!/playlist/recommendations",icon:"plex-icon-recommended-560"}),_owner:null}],title:(0,f.default)("Online Content")}),_owner:null}:null}}]),t}(d.Component);b.propTypes={machineIdentifier:d.PropTypes.string.isRequired,showChannels:d.PropTypes.bool.isRequired,
isUserRestricted:d.PropTypes.bool.isRequired,unwatchedWatchLaterCount:d.PropTypes.number.isRequired,unwatchedRecommendedCount:d.PropTypes.number.isRequired},t.default=b,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(50).default,s=n(20).default,o=n(1).default,l=n(8).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),d=o(u),c=n(34),f=n(30),p=n(79),h=n(225),m=o(h),v=n(337),g=l(v),y=n(1517),b=o(y),w=(0,f.createSelector)(m.default,function(e){
var t=e.desktop;return{isSignedIn:e.isSignedIn,isUserRestricted:!!e.restricted,unwatchedWatchLaterCount:t.unwatchedWatchLaterList.metadataItems.length,unwatchedRecommendedCount:t.unwatchedRecommendedList.metadataItems.length}}),P={populateUnwatchedWatchLaterList:g.populateUnwatchedWatchLaterList,populateUnwatchedRecommendedList:g.populateUnwatchedRecommendedList},_=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{
key:"componentWillMount",value:function(){this.props.isSignedIn&&this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.isSignedIn,n=t!==this.props.isSignedIn;t&&n&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,p.scheduleImmediateUpdate)(function(){e.populateUnwatchedWatchLaterList(),e.populateUnwatchedRecommendedList()})}},{key:"render",value:function(){return d.default.createElement(b.default,this.props);
}}]),t}(u.Component);_.propTypes={isSignedIn:u.PropTypes.bool.isRequired,populateUnwatchedWatchLaterList:u.PropTypes.func.isRequired,populateUnwatchedRecommendedList:u.PropTypes.func.isRequired},t.default=(0,c.connect)(function(e){return w(e)},P)(_),e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(14).default,l=n(13).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),c=(u(d),n(6)),f=u(c),p=n(27),h=n(58),m=u(h),v=n(57),g=u(v),y=n(72),b=u(y),w=n(29),P=u(w),_=n(44),S=n(254),x=u(S),C=n(161),T=u(C),k=n(162),I=u(k),M=function(e){
function t(e,n){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isRemoveModalOpen:!1}}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"onRemoveServerPress",decorators:[p.autobind],value:function(e){this.setState({isRemoveModalOpen:!0})}},{key:"onRemoveConfirm",decorators:[p.autobind],value:function(){this.setState({isRemoveModalOpen:!1}),this.props.onDeleteServerConfirm(this.props.machineIdentifier);
}},{key:"onRemoveCancel",decorators:[p.autobind],value:function(){this.setState({isRemoveModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.friendlyName,n=e.presence,a=e.promiseState,i=e.isBundled,r=e.isFullServer,s=e.isFullOwnedServer,u=e.hasHttpsConnections,d=e.hasFallbackConnections,c=e.onTryAgainPress,p=e.onReloadHttpPress,h=e.onAllowFallbackPress,v=m.default.isHostedHttps,y=r&&n,w=u&&!d,P=!v||g.default.get("allowMixedContent"),S=!P&&y,C=P&&y&&w,k=S||C,M=k?(0,f.default)("The selected server cannot be reached securely. An insecure connection may be possible."):(0,
f.default)("The selected server is unreachable. Make sure it's running, double check your network, and try again."),A=a===b.default.promiseStates.PENDING,E=A?(0,f.default)("Connecting"):(0,f.default)("Try again");return{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:[{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{children:E,icon:"plex-icon-reload-560",showSpinner:A,isDisabled:A,onPress:c}),_owner:null},S&&{$$typeof:l,type:T.default,
key:null,ref:null,props:o(T.default.defaultProps,{children:(0,f.default)("Reload app insecurely"),icon:"plex-icon-unlock-560",onPress:p}),_owner:null},C&&{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{children:(0,f.default)("Allow insecure connection"),icon:"plex-icon-unlock-560",onPress:h}),_owner:null},k&&{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{children:(0,f.default)("Learn more"),to:"https://support.plex.tv/hc/en-us/articles/206225077",
target:"_blank",icon:"plex-icon-help-560"}),_owner:null},!k&&{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{children:(0,f.default)("Where is my server?"),to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560"}),_owner:null},s&&!i&&{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{children:(0,f.default)("Remove server"),icon:"plex-icon-remove-560",onPress:this.onRemoveServerPress}),_owner:null},{$$typeof:l,type:x.default,
key:null,ref:null,props:o(x.default.defaultProps,{isOpen:this.state.isRemoveModalOpen,metricsPage:"confirmRemoveServer",kind:_.kinds.DANGER,title:(0,f.default)('Remove "{1}"',t),message:(0,f.default)("If this server is restarted, it will automatically be added to your account again.",t),confirmLabel:(0,f.default)("Remove"),onConfirm:this.onRemoveConfirm,onCancel:this.onRemoveCancel}),_owner:null}],message:M}),_owner:null}}}]),t}(d.Component);M.propTypes={machineIdentifier:d.PropTypes.string,friendlyName:d.PropTypes.string,
promiseState:d.PropTypes.string,presence:d.PropTypes.bool,isFullServer:d.PropTypes.bool,isFullOwnedServer:d.PropTypes.bool,isBundled:d.PropTypes.bool,hasHttpsConnections:d.PropTypes.bool,hasFallbackConnections:d.PropTypes.bool,onTryAgainPress:d.PropTypes.func.isRequired,onAllowFallbackPress:d.PropTypes.func.isRequired,onReloadHttpPress:d.PropTypes.func.isRequired,onDeleteServerConfirm:d.PropTypes.func.isRequired},t.default=M,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.img,n=e.title,a=e.description;
return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"img",key:null,ref:null,props:{className:l.default.featureImage,src:t},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:n,className:l.default.featureTitle},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:a,className:l.default.featureDescription},_owner:null}],className:l.default.featureContainer},_owner:null}],className:l.default.feature
},_owner:null}}var i=n(13).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=(r(s),n(1713)),l=r(o);a.propTypes={img:s.PropTypes.string.isRequired,title:s.PropTypes.string.isRequired,description:s.PropTypes.string.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var a=n(21).default,i=n(22).default,r=n(28).default,s=n(20).default,o=n(12).default,l=n(14).default,u=n(13).default,d=n(16).default,c=n(1).default,f=n(8).default;Object.defineProperty(t,"__esModule",{
value:!0});var p=n(7),h=c(p),m=n(32),v=c(m),g=n(11),y=n(6),b=c(y),w=n(27),P=n(23),_=f(P),S=n(305),x=f(S),C=n(44),T=n(29),k=c(T),I=n(118),M=c(I),A=n(70),E=c(A),O=n(43),D=c(O),R=n(157),L=c(R),N=n(562),j=c(N),U=n(563),F=c(U),B=n(566),z=c(B),$=n(564),V=c($),H=n(565),q=c(H),W=n(1520),K=c(W),Q=n(1740),Y=c(Q),G=n(1738),X=c(G),J=n(1741),Z=c(J),ee=n(1736),te=c(ee),ne=n(1737),ae=c(ne),ie=n(1739),re=c(ie),se=n(1714),oe=c(se),le="plexpass",ue={$$typeof:u,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{}),
_owner:null},de=function(e){function t(){s(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,k.default)(this,e,t)}},{key:"onModalClose",decorators:[w.autobind],value:function(){var e=(0,g.resolve)("metrics");e.trackClick(o({},this.props.metricsProperties,{page:le,action:"skip"}))}},{key:"render",value:function(){var e=this.props,t=e.metricsProperties,n=e.plans,a=e.isPlansPending,i=e.isPlansPopulated,r=e.plansError,s=e.onModalClose,c=d(e,["metricsProperties","plans","isPlansPending","isPlansPopulated","plansError","onModalClose"]);
return h.default.createElement(F.default,o({metricsPage:le,metricsProperties:t,onModalClose:(0,M.default)(this.onModalClose,s)},c),{$$typeof:u,type:z.default,key:null,ref:null,props:l(z.default.defaultProps,{children:[{$$typeof:u,type:"div",key:null,ref:null,props:{children:(0,b.default)("Plex Pass"),className:oe.default.plexPassTitle},_owner:null},(0,b.default)("Enhance your Plex experience with exclusive premium features")],className:oe.default.header}),_owner:null},{$$typeof:u,type:V.default,key:null,
ref:null,props:l(V.default.defaultProps,{children:[{$$typeof:u,type:K.default,key:null,ref:null,props:l(K.default.defaultProps,{img:Y.default,title:(0,b.default)("Mobile Sync"),description:(0,b.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),_owner:null},{$$typeof:u,type:K.default,key:null,ref:null,props:l(K.default.defaultProps,{img:X.default,title:(0,b.default)("Exclusive Forum Access"),description:(0,b.default)("Let your voice be heard in special members-only forums")
}),_owner:null},{$$typeof:u,type:K.default,key:null,ref:null,props:l(K.default.defaultProps,{img:Z.default,title:(0,b.default)("Trailers & Extras"),description:(0,b.default)("See movie trailers, cast interviews, and other bonus features")}),_owner:null},{$$typeof:u,type:K.default,key:null,ref:null,props:l(K.default.defaultProps,{img:te.default,title:(0,b.default)("Camera Upload"),description:(0,b.default)("Sync photos from your mobile devices to Plex Media Server")}),_owner:null},{$$typeof:u,type:K.default,
key:null,ref:null,props:l(K.default.defaultProps,{img:ae.default,title:(0,b.default)("Cloud Sync"),description:(0,b.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),_owner:null},{$$typeof:u,type:K.default,key:null,ref:null,props:l(K.default.defaultProps,{img:re.default,title:(0,b.default)("Gracenote Music Magic"),description:(0,b.default)("Song identification, album reviews, artist bios, and Plex Mix playlists")}),_owner:null},{$$typeof:u,type:"div",key:null,ref:null,
props:{children:{$$typeof:u,type:D.default,key:null,ref:null,props:l(D.default.defaultProps,{children:(0,b.default)("...plus more exclusive features!"),className:oe.default.link,to:x.PLEX_PASS_INFO_URL,target:"_self"}),_owner:null},className:oe.default.moreFeatures},_owner:null}],bodyClassName:oe.default.body}),_owner:null},{$$typeof:u,type:q.default,key:null,ref:null,props:l(q.default.defaultProps,{children:[a&&{$$typeof:u,type:"div",key:null,ref:null,props:{children:ue,className:oe.default.spinnerContainer
},_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:[!a&&i&&n.map(function(e){var n=_.join(x.PLEX_PASS_SUBSCRIBE_URL,{plan:e.id,"continue":window.location.href});return h.default.createElement(j.default,o({key:e.id},t,{page:le,action:"subscribe",plan:e.id}),{$$typeof:u,type:L.default,key:null,ref:null,props:l(L.default.defaultProps,{children:[e.formattedPrice," \u2014 ",e.name],className:oe.default.planButton,to:n,target:"_self",kind:C.kinds.PRIMARY,size:C.sizes.LARGE}),_owner:null
})}),!a&&r&&h.default.createElement(j.default,o({},t,{page:le,action:"subscribe",plan:"unknown"}),{$$typeof:u,type:L.default,key:null,ref:null,props:l(L.default.defaultProps,{children:(0,b.default)("Subscribe"),className:oe.default.planButton,to:x.PLEX_PASS_SUBSCRIBE_URL,target:"_self",kind:C.kinds.PRIMARY,size:C.sizes.LARGE}),_owner:null})],className:(0,v.default)(oe.default.plansContainer,a&&oe.default.isPlansPending)},_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:[(0,b.default)("Subscribe today"),{
$$typeof:u,type:"span",key:null,ref:null,props:{children:"\u2014",className:oe.default.linkSeparator},_owner:null},h.default.createElement(j.default,o({},t,{page:le,action:"gift"}),{$$typeof:u,type:D.default,key:null,ref:null,props:l(D.default.defaultProps,{children:(0,b.default)("or give Plex Pass as a gift!"),className:oe.default.link,to:x.PLEX_PASS_GIFT_URL,target:"_self"}),_owner:null})]},_owner:null}],className:oe.default.footer}),_owner:null})}}]),t}(p.Component);de.propTypes={metricsProperties:p.PropTypes.object,
plans:p.PropTypes.array.isRequired,isPlansPending:p.PropTypes.bool.isRequired,isPlansPopulated:p.PropTypes.bool.isRequired,plansError:p.PropTypes.object,onModalClose:p.PropTypes.func.isRequired},t.default=de,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=function(t){function n(e,t){l(this,n),r(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.state={pressedModifierKeys:[]}}return s(n,t),o(n,[{key:"componentDidMount",value: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)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"componentWillUnmount",value: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)}},{key:"onKeyDown",decorators:[v.autobind],value:function(e){var t=this.state.pressedModifierKeys;S[e.which]&&t.indexOf(e.which)===-1&&this.setState({pressedModifierKeys:t.concat(e.which)
})}},{key:"onKeyUp",decorators:[v.autobind],value:function(e){var t=this.state.pressedModifierKeys,n=t.indexOf(e.which);n>-1&&this.setState({pressedModifierKeys:t.slice(0,n).concat(t.slice(n+1))})}},{key:"onMouseDown",decorators:[v.autobind],value:function(e){this._isMouseDown=!0}},{key:"onMouseUp",decorators:[v.autobind],value:function(e){this._isMouseDown=!1}},{key:"onFocusChange",decorators:[v.autobind],value:function(e){this.state.pressedModifierKeys.length&&this.setState({pressedModifierKeys:[]
}),this._isMouseDown=!1}},{key:"onMouseEnter",decorators:[v.autobind],value:function(e){var t=this.props,n=t.activeSelectionType,a=t.selectionType;this._isMouseDown&&n&&n===a&&this.onSelectPress(e)}},{key:"onSelectPress",decorators:[v.autobind],value:function(e){var t=this.props,n=t.selectionKey,a=t.selectionType,i=t.isSelected,r=t.onSelectItem;i||r({key:this.props[n],type:a,isRangeSelect:e.shiftKey})}},{key:"onDeselectPress",decorators:[v.autobind],value:function(e){var t=this.props,n=t.selectionKey,a=t.isSelected,i=t.onDeselectItem;
a&&i({key:this.props[n]})}},{key:"render",value:function(){var t=this.props,n=t.activeSelectionType,a=t.selectionType,i=t.isSelected,r=u(t,["activeSelectionType","selectionType","isSelected"]),s=this.state.pressedModifierKeys,o=!!n;return m.default.createElement(e,d({hasActiveSelection:o,isSelected:i,isOtherItemSelected:o&&!i,isConflictingTypeSelected:o&&n!==a,isModifierKeyPressed:s.length>0,onMouseEnter:this.onMouseEnter,onSelectPress:this.onSelectPress,onDeselectPress:this.onDeselectPress},r))}
}]),n}(h.Component);return t.displayName="Selectable("+(0,_.default)(e)+")",t.WrappedComponent=e,t.propTypes={activeSelectionType:h.PropTypes.string,selectionKey:h.PropTypes.string.isRequired,selectionType:h.PropTypes.string.isRequired,isSelected:h.PropTypes.bool.isRequired,onSelectItem:h.PropTypes.func.isRequired,onDeselectItem:h.PropTypes.func.isRequired},t.defaultProps={disableSelection:!1},t}var i=n(52).default,r=n(21).default,s=n(22).default,o=n(28).default,l=n(20).default,u=n(16).default,d=n(12).default,c=n(1).default,f=n(8).default;
Object.defineProperty(t,"__esModule",{value:!0});var p,h=n(7),m=c(h),v=n(27),g=n(246),y=f(g),b=n(29),w=c(b),P=n(331),_=c(P),S=(p={},i(p,y.SHIFT,!0),i(p,y.CONTROL,!0),i(p,y.META_1,!0),i(p,y.META_2,!0),i(p,y.META_3,!0),p);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function a(e){var t=e.tabIndex;return null===t&&(t=void 0),!isNaN(t)&&t>=0&&i(e)}function i(e){if(!e.offsetParent)return!1;var t=e.nodeName.toLowerCase();return/input|select|textarea|button|object/.test(t)?!e.disabled:"a"!==t||e.href;
}function r(e){if(!e)return[];var t=[].slice.call(e.getElementsByTagName("*"),0).filter(function(e){return a(e)});return l.default.sortBy(t,function(e){return 0===e.tabIndex?1/0:e.tabIndex})}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(3),l=s(o);e.exports=t.default},function(e,t,n){"use strict";function a(e){if(!e)return(0,f.default)("Username is required")}function i(e){if(!e)return(0,f.default)("Email address is required")}function r(e){if(!e)return(0,
f.default)("Password is required")}function s(e){if(!e)return(0,f.default)("Password confirmation is required")}function o(e){if(!e)return(0,f.default)("Current password is required")}function l(e){if(e&&e.length<8)return(0,f.default)("Password must be at least 8 characters")}function u(e,t){if(e!==t.password.value)return(0,f.default)("Passwords must match")}var d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.isUsernameRequired=a,t.isEmailRequired=i,t.isPasswordRequired=r,t.isConfirmRequired=s,
t.isCurrentPasswordRequired=o,t.password=l,t.confirmPassword=u;var c=n(6),f=d(c)},function(e,t,n){"use strict";function a(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];t===c.default.CONTINUE_WATCHING&&n<0&&n++;var a=e+t+n;if(b.hasOwnProperty(a))return b[a];var r=(0,h.getAspectRatio)(e,t),l=parseInt(u.default.posterTitleHeight,10),d=parseInt(u.default.posterTitlePadding,10),f=void 0,m=void 0,g=void 0,w=void 0;t===c.default.CONTINUE_WATCHING?(f=2,m=300,g=1,w=4,d*=2):(f="mixed"===e?3:(0,
p.default)(e,t).length,m=r>1?180:120,g=2,w=11);var P=f*l+d,_=(0,o.default)({direction:s.HORIZONTAL,rows:1,overscan:4,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:10,outerPaddingRight:5,outerPaddingBottom:5,outerPaddingLeft:5,getCellWidth:function(e){return(0,v.default)(i({},e,{minCellWidth:m,minColumns:g,maxColumns:w,columnAdjustment:n,aspectRatio:r}))},getCellHeight:function(e){return(0,y.default)(i({},e,{aspectRatio:r,titleHeight:P}))}});return _.cellOptions={minCellWidth:m,
minColumns:g,maxColumns:w,columnAdjustment:n,aspectRatio:r,titleHeight:P},b[a]=_,_}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(510),o=r(s),l=n(365),u=r(l),d=n(99),c=r(d),f=n(203),p=r(f),h=n(261),m=n(591),v=r(m),g=n(590),y=r(g),b={};e.exports=t.default},function(e,t,n){"use strict";function a(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],a=e+t+n;if(g.hasOwnProperty(a))return g[a];var r=(0,f.getAspectRatio)(e,t),l=parseInt(u.default.posterTitleHeight,10),d=parseInt(u.default.posterTitlePadding,10),p="mixed"===e?3:(0,
c.default)(e).length,m=p*l+d,y=r>1?180:120,b=2,w=11,P=(0,o.default)({direction:s.VERTICAL,overscan:2,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:30,outerPaddingRight:60,outerPaddingBottom:30,outerPaddingLeft:60,getCellWidth:function(e){return(0,h.default)(i({},e,{minCellWidth:y,minColumns:b,maxColumns:w,columnAdjustment:n,aspectRatio:r}))},getCellHeight:function(e){return(0,v.default)(i({},e,{aspectRatio:r,titleHeight:m}))}});return P.cellOptions={minCellWidth:y,minColumns:b,
maxColumns:w,columnAdjustment:n,aspectRatio:r,titleHeight:m},g[a]=P,P}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(510),o=r(s),l=n(365),u=r(l),d=n(203),c=r(d),f=n(261),p=n(591),h=r(p),m=n(590),v=r(m),g={};e.exports=t.default},function(e,t,n){"use strict";function a(e){function t(e){P=e.viewportHeight;var t=e.viewportWidth-2*m;_=t/l;var n=c.reduce(function(e,t){return e+t.height},0);return{height:n*_,width:t}}function n(e){(0,u.default)(void 0!==P,"`getListStyle` must be called before `getPositionForIndex`");
var t=o.default.find(y,function(t){var n=t.last;return e<=n}),n=o.default.find(t.cellLayouts,function(t){var n=t.cellIndex;return n===e});return{cellX:Math.round(n.left*_)+g,cellY:Math.round(t.top*_)+g,cellWidth:Math.round(n.width*_)-2*g,cellHeight:Math.round(t.height*_)-2*g}}function a(e){if(e<0)return y[0];var t=o.default.find(y,function(t){var n=t.bottom;return e<(n+1)*_});return t||o.default.last(y)}function r(e,t,n,i){void 0===e&&(e=0),(0,u.default)(void 0!==P,"`getListStyle` must be called before `getRangesForPosition`");
var r=e+P-1,s=e-P,o=r+P,l=a(s).first,d=a(o).last,c=a(e).first,f=a(r).last,p=c,h=f;return{renderStartIndex:l,renderEndIndex:d,visibleStartIndex:c,visibleEndIndex:f,partiallyVisibleStartIndex:p,partiallyVisibleEndIndex:h}}var s=e.columns,l=void 0===s?1:s,d=e.rows,c=void 0===d?[]:d,f=e.offset,p=void 0===f?0:f,h=e.margin,m=void 0===h?0:h,v=e.cellMargin,g=void 0===v?0:v,y=[],b=0,w=p;c.forEach(function(e){var t=b;b+=e.height;var n=b-1,a=w;w+=e.widths.length;var r=w-1,s=[],o=0;e.widths.forEach(function(e,t){
var n=o;o+=e,s.push({width:e,left:n,cellIndex:a+t})}),y.push(i({},e,{top:t,bottom:n,first:a,last:r,cellLayouts:s}))});var P=void 0,_=void 0;return{getListStyle:t,getPositionForIndex:n,getRangesForPosition:r}}var i=n(12).default,r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(3),o=r(s),l=n(38),u=r(l);e.exports=t.default},function(e,t){"use strict";function n(e){return Math.abs(e.actual-e.desired)/e.actual}function a(e){if(0===e.cells.length)return 1/0;var t=e.cells.reduce(function(e,t){
return e+n(t)},0),a=t/e.cells.length,i=Math.abs(e.scale-1);return a+i}function i(e,t){var n=e.cells,a=n.reduce(function(e,t){return e+t.desired},0),i=t/a;return{scale:i,cells:n.map(function(e){var t=e.desired;return{desired:t,actual:t*i}})}}function r(e){var t=e.aspectRatios,n=e.columns,r=void 0===n?4:n,s=e.minAspectRatio,o=void 0===s?.4:s,l=e.maxAspectRatio,u=void 0===l?5:l,d=t.map(function(e){return Math.max(o,Math.min(u,e))}),c=[],f={scale:null,cells:[]};d.forEach(function(e){var t={desired:e},n={
scale:0,cells:f.cells.slice(0)};n.cells.push(t),n=i(n,r),a(n)<=a(f)?f=n:(c.push(f),f=i({scale:0,cells:[t]},r))});var p=1/Math.max(1,f.scale);return f.scale=Math.min(1,f.scale),f.cells=f.cells.map(function(e){var t=e.desired,n=e.actual;return{desired:t,actual:n*p}}),c.push(f),c.map(function(e){var t=e.scale,n=e.cells;return{height:t,widths:n.map(function(e){return e.actual})}})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";function a(e){
return!0}function i(e){return!0}function r(e){var t=e.server.isFullServer;return!(!t||!e.isFirstItemLibraryItem)}function s(e){var t=e.server.isFullServer&&e.server.allowSync;return!!(t&&e.isFirstItemLibraryItem&&e.allowSync)}function o(e){var t=e.server.isFullOwnedServer&&e.server.transcoderVideo;return!(!t||!e.isFirstItemLibraryItem)}function l(e){var t=e.firstItemType||"mixed",n=m[t];(0,p.default)(c.default.isArray(n),"getMetadataListActionProps: Invalid type, "+t+", provided");var a=n.reduce(function(n,a){
var i=h[a];return(0,p.default)(c.default.isFunction(i),"getMetadataListActionProps: Invalid action, "+a+", for "+t),c.default.has(e,a)?n[a]=e[a]:n[a]=i(e),n},{});return a}var u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var d=n(3),c=u(d),f=n(38),p=u(f),h={showPlayAll:a,showShuffle:i,showAddToPlaylist:r,showSync:s,showOptimize:o},m={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"]};e.exports=t.default},function(e,t,n){"use strict";function a(e,t){return S.default.every(t,function(t){return t[e]})}function i(e,t){return S.default.some(t,function(t){return t[e]})}function r(e){var t=e.activeSelectionItems;return t.map(function(e){return e.model.type})}function s(e,t){return a("showPlay",t)}function o(e,t){return a("showPlay",t)}function l(e,t){return a("showAddToPlaylist",t)}function u(e,t){return i("showMarkWatched",t);
}function d(e,t){return i("showMarkUnwatched",t)}function c(e,t){var n=r(e);return!(S.default.uniq(n).length>1)&&a("showEdit",t)}function f(e,t){return a("showRefresh",t)}function p(e,t){return a("showAnalyze",t)}function h(e,t){var n=r(e);return 1!==n.length&&(!(S.default.uniq(n).length>1)&&S.default.every(n,function(e){return A.indexOf(e)!==-1}))}function m(e,t){return a("showSync",t)}function v(e,t){return a("showOptimize",t)}function g(e,t){return a("showDelete",t)}function y(e){var t=e.activeSelectionItems;
return t.map(function(t){return(0,k.default)(w({},e,t.model))})}function b(e){var t=e.activeSelectionType,n=M[t],a=y(e);(0,C.default)(S.default.isArray(n),"getMultiSelectActionProps: Invalid type, "+t+", provided");var i=n.reduce(function(n,i){var r=I[i];return(0,C.default)(S.default.isFunction(r),"getMultiSelectActionProps: Invalid action, "+i+", for "+t),S.default.has(e,i)?n[i]=e[i]:n[i]=r(e,a),n},{});return i}var w=n(12).default,P=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;
var _=n(3),S=P(_),x=n(38),C=P(x),T=n(364),k=P(T),I={showPlaySelected:s,showShuffle:o,showAddToPlaylist:l,showMarkWatched:u,showMarkUnwatched:d,showEdit:c,showRefresh:f,showAnalyze:p,showMerge:h,showSync:m,showOptimize:v,showDelete:g},M={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"]},A=["movie","season","artist","album"];e.exports=t.default},function(e,t){"use strict";function n(e,t){if(!e)return!1;if(e===i&&a.hasOwnProperty(t))return a[t];e!==i&&(i=e,a={});var n=e.indexOf(t)!==-1;return a[t]=n,n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var a={},i=void 0;e.exports=t.default},function(e,t,n){e.exports={"default":n(1544),__esModule:!0
}},function(e,t,n){e.exports={"default":n(1545),__esModule:!0}},function(e,t,n){e.exports={"default":n(1546),__esModule:!0}},,,function(e,t,n){e.exports={"default":n(1549),__esModule:!0}},function(e,t,n){e.exports={"default":n(1553),__esModule:!0}},function(e,t,n){e.exports={"default":n(1555),__esModule:!0}},function(e,t,n){e.exports={"default":n(1556),__esModule:!0}},function(e,t,n){"use strict";var a=n(204).default;t.default=function(e){for(var t={},n=0;n<e.length;n++){var i=e[n],r=i.decorators,s=i.key;
if(delete i.key,delete i.decorators,i.enumerable=!0,i.configurable=!0,("value"in i||i.initializer)&&(i.writable=!0),r)for(var o=0;o<r.length;o++){var l=r[o];if("function"!=typeof l)throw new TypeError("The decorator for method "+i.key+" is of the invalid type "+typeof l);i=l(t,s,i)||i}i.initializer&&(i.value=i.initializer.call(t)),a(t,s,i)}return t},t.__esModule=!0},function(e,t,n){"use strict";var a=n(595).default;t.default=function(e){return Array.isArray(e)?e:a(e)},t.__esModule=!0},function(e,t,n){
n(376),n(1574),e.exports=n(87).Array.from},function(e,t,n){n(609),n(376),e.exports=n(1572)},function(e,t,n){n(609),n(376),e.exports=n(1573)},function(e,t,n){n(1576),e.exports=n(87).Number.isInteger},,,function(e,t,n){n(1579),e.exports=n(87).Object.assign},function(e,t,n){var a=n(71);e.exports=function(e,t){return a.create(e,t)}},function(e,t,n){var a=n(71);e.exports=function(e,t,n){return a.setDesc(e,t,n)}},function(e,t,n){var a=n(71);n(1580),e.exports=function(e,t){return a.getDesc(e,t)}},function(e,t,n){
var a=n(71);n(1581),e.exports=function(e){return a.getNames(e)}},,function(e,t,n){n(1583),e.exports=n(87).Object.setPrototypeOf},function(e,t,n){n(1585),n(1584),e.exports=n(87).Symbol},,function(e,t){e.exports=function(){}},function(e,t,n){var a=n(71);e.exports=function(e){var t=a.getKeys(e),n=a.getSymbols;if(n)for(var i,r=n(e),s=a.isEnum,o=0;r.length>o;)s.call(e,i=r[o++])&&t.push(i);return t}},function(e,t,n){var a=n(164),i=n(102)("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||r[i]===e);
}},function(e,t,n){var a=n(366);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,n){var a=n(371),i=Math.floor;e.exports=function(e){return!a(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var a=n(263);e.exports=function(e,t,n,i){try{return i?t(a(n)[0],n[1]):t(n)}catch(r){var s=e.return;throw void 0!==s&&a(s.call(e)),r}}},function(e,t,n){"use strict";var a=n(71),i=n(373),r=n(374),s={};n(370)(s,n(102)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=a.create(s,{
next:i(1,n)}),r(e,t+" Iterator")}},function(e,t,n){var a=n(102)("iterator"),i=!1;try{var r=[7][a]();r.return=function(){i=!0},Array.from(r,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var r=[7],s=r[a]();s.next=function(){return{done:n=!0}},r[a]=function(){return s},e(r)}catch(o){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var a=n(71),i=n(207);e.exports=function(e,t){for(var n,r=i(e),s=a.getKeys(r),o=s.length,l=0;o>l;)if(r[n=s[l++]]===t)return n;
}},function(e,t,n){var a=n(71),i=n(375),r=n(601);e.exports=n(264)(function(){var e=Object.assign,t={},n={},a=Symbol(),i="abcdefghijklmnopqrst";return t[a]=7,i.split("").forEach(function(e){n[e]=e}),7!=e({},t)[a]||Object.keys(e({},n)).join("")!=i})?function(e,t){for(var n=i(e),s=arguments,o=s.length,l=1,u=a.getKeys,d=a.getSymbols,c=a.isEnum;o>l;)for(var f,p=r(s[l++]),h=d?u(p).concat(d(p)):u(p),m=h.length,v=0;m>v;)c.call(p,f=h[v++])&&(n[f]=p[f]);return n}:Object.assign},function(e,t,n){var a=n(71).getDesc,i=n(371),r=n(263),s=function(e,t){
if(r(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(367)(Function.call,a(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(r){t=!0}return function(e,n){return s(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:s}},function(e,t,n){var a=n(606),i=n(368);e.exports=function(e){return function(t,n){var r,s,o=String(i(t)),l=a(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):(r-55296<<10)+(s-56320)+65536)}}},function(e,t,n){var a=n(606),i=Math.min;e.exports=function(e){return e>0?i(a(e),9007199254740991):0}},function(e,t,n){var a=n(263),i=n(608);e.exports=n(87).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return a(t.call(e))}},function(e,t,n){var a=n(598),i=n(102)("iterator"),r=n(164);e.exports=n(87).isIterable=function(e){
var t=Object(e);return void 0!==t[i]||"@@iterator"in t||r.hasOwnProperty(a(t))}},function(e,t,n){"use strict";var a=n(367),i=n(101),r=n(375),s=n(1563),o=n(1560),l=n(1571),u=n(608);i(i.S+i.F*!n(1565)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,d,c=r(e),f="function"==typeof this?this:Array,p=arguments,h=p.length,m=h>1?p[1]:void 0,v=void 0!==m,g=0,y=u(c);if(v&&(m=a(m,h>2?p[2]:void 0,2)),void 0==y||f==Array&&o(y))for(t=l(c.length),n=new f(t);t>g;g++)n[g]=v?m(c[g],g):c[g];else for(d=y.call(c),
n=new f;!(i=d.next()).done;g++)n[g]=v?s(d,m,[i.value,g],!0):i.value;return n.length=g,n}})},function(e,t,n){"use strict";var a=n(1558),i=n(1566),r=n(164),s=n(207);e.exports=n(602)(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,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),r.Arguments=r.Array,a("keys"),a("values"),a("entries")},function(e,t,n){var a=n(101);a(a.S,"Number",{isInteger:n(1562)
})},,,function(e,t,n){var a=n(101);a(a.S+a.F,"Object",{assign:n(1568)})},function(e,t,n){var a=n(207);n(372)("getOwnPropertyDescriptor",function(e){return function(t,n){return e(a(t),n)}})},function(e,t,n){n(372)("getOwnPropertyNames",function(){return n(600).get})},,function(e,t,n){var a=n(101);a(a.S,"Object",{setPrototypeOf:n(1569).set})},function(e,t){},function(e,t,n){"use strict";var a=n(71),i=n(265),r=n(369),s=n(599),o=n(101),l=n(604),u=n(264),d=n(605),c=n(374),f=n(607),p=n(102),h=n(1567),m=n(600),v=n(1559),g=n(1561),y=n(263),b=n(207),w=n(373),P=a.getDesc,_=a.setDesc,S=a.create,x=m.get,C=i.Symbol,T=i.JSON,k=T&&T.stringify,I=!1,M=p("_hidden"),A=a.isEnum,E=d("symbol-registry"),O=d("symbols"),D="function"==typeof C,R=Object.prototype,L=s&&u(function(){
return 7!=S(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a})?function(e,t,n){var a=P(R,t);a&&delete R[t],_(e,t,n),a&&e!==R&&_(R,t,a)}:_,N=function(e){var t=O[e]=S(C.prototype);return t._k=e,s&&I&&L(R,e,{configurable:!0,set:function(t){r(this,M)&&r(this[M],e)&&(this[M][e]=!1),L(this,e,w(1,t))}}),t},j=function(e){return"symbol"==typeof e},U=function(e,t,n){return n&&r(O,t)?(n.enumerable?(r(e,M)&&e[M][t]&&(e[M][t]=!1),n=S(n,{enumerable:w(0,!1)})):(r(e,M)||_(e,M,w(1,{})),e[M][t]=!0),L(e,t,n)):_(e,t,n);
},F=function(e,t){y(e);for(var n,a=v(t=b(t)),i=0,r=a.length;r>i;)U(e,n=a[i++],t[n]);return e},B=function(e,t){return void 0===t?S(e):F(S(e),t)},z=function(e){var t=A.call(this,e);return!(t||!r(this,e)||!r(O,e)||r(this,M)&&this[M][e])||t},$=function(e,t){var n=P(e=b(e),t);return!n||!r(O,t)||r(e,M)&&e[M][t]||(n.enumerable=!0),n},V=function(e){for(var t,n=x(b(e)),a=[],i=0;n.length>i;)r(O,t=n[i++])||t==M||a.push(t);return a},H=function(e){for(var t,n=x(b(e)),a=[],i=0;n.length>i;)r(O,t=n[i++])&&a.push(O[t]);
return a},q=function(e){if(void 0!==e&&!j(e)){for(var t,n,a=[e],i=1,r=arguments;r.length>i;)a.push(r[i++]);return t=a[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!j(t))return t}),a[1]=t,k.apply(T,a)}},W=u(function(){var e=C();return"[null]"!=k([e])||"{}"!=k({a:e})||"{}"!=k(Object(e))});D||(C=function(){if(j(this))throw TypeError("Symbol is not a constructor");return N(f(arguments.length>0?arguments[0]:void 0))},l(C.prototype,"toString",function(){return this._k;
}),j=function(e){return e instanceof C},a.create=B,a.isEnum=z,a.getDesc=$,a.setDesc=U,a.setDescs=F,a.getNames=m.get=V,a.getSymbols=H,s&&!n(603)&&l(R,"propertyIsEnumerable",z,!0));var K={"for":function(e){return r(E,e+="")?E[e]:E[e]=C(e)},keyFor:function(e){return h(E,e)},useSetter:function(){I=!0},useSimple:function(){I=!1}};a.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=p(e);K[e]=D?t:N(t)}),
I=!0,o(o.G+o.W,{Symbol:C}),o(o.S,"Symbol",K),o(o.S+o.F*!D,"Object",{create:B,defineProperty:U,defineProperties:F,getOwnPropertyDescriptor:$,getOwnPropertyNames:V,getOwnPropertySymbols:H}),T&&o(o.S+o.F*(!D||W),"JSON",{stringify:q}),c(C,"Symbol"),c(Math,"Math",!0),c(i.JSON,"JSON",!0)},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=n(386),i=n(627).default,r=n(387).default,s=n(388),o=n(2020),l=function(){var e=new a.HandlebarsEnvironment;return s.extend(e,a),e.SafeString=i,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),a=0;a<t;a++)n[a]=e.charCodeAt(a);return n}function a(e){for(var t="",n=0;n<e.length;n++)t+=SHA256_hexchars[e[n]>>4]+SHA256_hexchars[15&e[n]];return t}function i(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){"string"==typeof e?SHA256_buf=SHA256_buf.concat(n(e)):SHA256_buf=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 delete SHA256_H,delete SHA256_buf,delete SHA256_len,t}function l(e){var t;return r(),s(e),t=o(),a(t)}function u(e){"string"==typeof e?HMAC_SHA256_key=n(e):HMAC_SHA256_key=(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 d(e){s(e)}function c(){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 delete HMAC_SHA256_key,o()}function f(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 h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function m(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function v(e,t,n){return n^e&(t^n)}function g(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]+f(t[n-15])+t[n-16]&4294967295;for(var a=(new Array).concat(e),n=0;n<64;n++){var i=a[7]+m(a[4])+v(a[4],a[5],a[6])+SHA256_K[n]+t[n],r=h(a[0])+g(a[0],a[1],a[2]);a.pop(),a.unshift(i+r&4294967295),a[4]=a[4]+i&4294967295}for(var n=0;n<8;n++)e[n]=e[n]+a[n]&4294967295;
}function b(e,t){for(var n=new Array(16),a=0;a<16;a++)n[a]=t[4*a+0]<<24|t[4*a+1]<<16|t[4*a+2]<<8|t[4*a+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=i,t.SHA256_hash=l,t.HMAC_SHA256_init=u,t.HMAC_SHA256_write=d,t.HMAC_SHA256_finalize=c},function(e,t,n){(function(t){!function(){function e(e,t){return e.name=t}function t(e,t){return e.href=t}function n(e){ye.set(e)}function a(e){return"function"==typeof e}function i(e){return void 0!=e&&-1<(e.constructor+"")[H]("String")}function r(){return N.round(2147483647*N.random())}function s(e){var t=Se[Q]("img");return t.width=1,t.height=1,t.src=e,t}function o(){}function l(e){return D instanceof Function?D(e):(n(28),
e)}function u(e){return l(e)[z](/\(/g,"%28")[z](/\)/g,"%29")}function d(e,t){if(e){var n=Se[Q]("script");n.type="text/javascript",n.async=!0,n.src=e,n.id=t;var a=Se.getElementsByTagName("script")[0];a[me].insertBefore(n,a)}}function c(){var e=""+Se[ae][ie];return 0==e[H]("www.")?e[ce](4):e}function f(e){var t=Se.referrer;if(/^https?:\/\//i.test(t)){if(e)return t;e="//"+Se[ae][ie];var n=t[H](e);if((5==n||6==n)&&(e=t.charAt(n+e[Z]),"/"==e||"?"==e||""==e||":"==e))return;return t}}function p(e,t){if(1==t[Z]&&null!=t[0]&&"object"==typeof t[0])return t[0];
for(var n={},a=N.min(e[Z]+1,t[Z]),i=0;i<a;i++){if("object"==typeof t[i]){for(var r in t[i])t[i].hasOwnProperty(r)&&(n[r]=t[i][r]);break}i<e[Z]&&(n[e[i]]=t[i])}return n}function h(e){if(100!=e.get(mn)&&O(ze(e,an))%1e4>=100*$e(e,mn))throw"abort"}function m(e){if(xe(ze(e,rn)))throw"abort"}function v(){var e=Se[ae][le];if("http:"!=e&&"https:"!=e)throw"abort"}function g(e){e.set(ot,$e(e,ot)+1);var t=[];Fe.map(function(n,a){if(a.p){var i=e.get(n);void 0!=i&&i!=a[W]&&("boolean"==typeof i&&(i*=1),t[U](a.p+"="+l(""+i)));
}}),t[U]("z="+r()),e.set(st,t[ve]("&"),!0)}function y(e){De(ze(e,st),e.get(rt)),e.set(rt,o,!0)}function b(e){var t=_e.gaData;t&&(t.expId&&e.set(jt,t.expId),t.expVar&&e.set(Ut,t.expVar))}function w(){if(_e[he]&&"preview"==_e[he].loadPurpose)throw"abort"}function P(e){var t=$e(e,$t);500<=t&&n(15);var a=ze(e,it);if("transaction"!=a&&"item"!=a){var a=$e(e,Ht),i=(new Date)[X](),r=$e(e,Vt);if(0==r&&e.set(Vt,i),r=N.round(2*(i-r)/1e3),0<r&&(a=N.min(a+r,20),e.set(Vt,i)),0>=a)throw"abort";e.set(Ht,--a)}e.set($t,++t);
}function _(){var e=Xn;S("create",e,e.create,3),S("getByName",e,e.j,5),S("getAll",e,e.K,6),e=$n[ee],S("get",e,e.get,7),S("set",e,e.set,4),S("send",e,e.send,2),e=Ue[ee],S("get",e,e.get),S("set",e,e.set),(_e.gaplugins=_e.gaplugins||{}).Linker=Rn,e=Rn[ee],Yn.C("linker",Rn),S("decorate",e,e.Q,20),S("autoLink",e,e.S,25),Yn.C("displayfeatures",Bn)}function S(e,t,a,i){t[e]=function(){try{return i&&n(i),a[pe](this,arguments)}catch(t){var s=t&&t[G];if(!(1<=100*N.random()||xe("?"))){var o=["t=error","_e=exc","_v=j15","sr=1"];
e&&o[U]("_f="+e),s&&o[U]("_m="+l(s[ce](0,100))),o[U]("aip=1"),o[U]("z="+r()),De(o[ve]("&"))}throw t}}}function x(){var e,t,n;if((n=(n=_e[he])?n.plugins:null)&&n[Z])for(var a=0;a<n[Z]&&!t;a++){var i=n[a];-1<i[G][H]("Shockwave Flash")&&(t=i.description)}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),t=e.GetVariable("$version")}catch(r){}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),t="WIN 6,0,21,0",e.AllowScriptAccess="always",t=e.GetVariable("$version")}catch(s){}
if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),t=e.GetVariable("$version")}catch(o){}return t&&(e=t[q](/[\d]+/g))&&3<=e[Z]&&(t=e[0]+"."+e[1]+" r"+e[2]),t||void 0}function C(e,t,n){"none"==t&&(t="");var a=[],i=Te(e);e="__utma"==e?6:2;for(var r=0;r<i[Z];r++){var s=(""+i[r])[ne](".");s[Z]>=e&&a[U]({hash:s[0],R:i[r],O:s})}return 0==a[Z]?void 0:1==a[Z]?a[0]:T(t,a)||T(n,a)||T(null,a)||a[0]}function T(e,t){var n,a;null==e?n=a=1:(n=O(e),a=O(0==e[H](".")?e[ce](1):"."+e));for(var i=0;i<t[Z];i++)if(t[i][F]==n||t[i][F]==a)return t[i];
}function k(e){e=e.get(an);var t=I(e,0);return"_ga=1."+l(t+"."+e)}function I(e,t){for(var n=new Date,a=_e.screen||{},i=_e[he],r=i.plugins||[],n=[e,i.userAgent,a.width,a.height,n.getTimezoneOffset(),n.getYear(),n.getDate(),n.getHours(),n.getMinutes()+t],a=0;a<r[Z];++a)n[U](r[a].description);return O(n[ve]("."))}function M(e,t){if(t==Se[ae][ie])return!1;for(var n=0;n<e[Z];n++)if(0<=t[H](e[n]))return!0;return!1}function A(){var e=_e.gaGlobal=_e.gaGlobal||{};return e.hid=e.hid||r()}function E(e){function n(e){
var t=(e[ie]||"")[ne](":")[0][ge](),n=(e[le]||"")[ge](),n=1*e[K]||("http:"==n?80:"https:"==n?443:"");return e=e.pathname||"",0==e[H]("/")||(e="/"+e),[t,""+n,e]}var a=Se[Q]("a");t(a,Se[ae][de]);var i=(a[le]||"")[ge](),r=n(a),s=a[re]||"",o=i+"//"+r[0]+(r[1]?":"+r[1]:"");return 0==e[H]("//")?e=i+e:0==e[H]("/")?e=o+e:e&&0!=e[H]("?")?0>e[ne]("/")[0][H](":")&&(e=o+r[2][ce](0,r[2].lastIndexOf("/"))+"/"+e):e=o+r[2]+(e||s),t(a,e),i=n(a),{protocol:(a[le]||"")[ge](),host:i[0],port:i[1],path:i[2],G:a[re]||"",
url:e||""}}function O(e){var t,n=1,a=0;if(e)for(n=0,t=e[Z]-1;0<=t;t--)a=e.charCodeAt(t),n=(n<<6&268435455)+a+(a<<14),a=266338304&n,n=0!=a?n^a>>21:n;return n}var D=encodeURIComponent,R=window,L=setTimeout,N=Math,j=RegExp,U="push",F="hash",B="slice",z="replace",$="data",V="cookie",H="indexOf",q="match",W="defaultValue",K="port",Q="createElement",Y="setAttribute",G="name",X="getTime",J="host",Z="length",ee="prototype",te="clientWidth",ne="split",ae="location",ie="hostname",re="search",se="target",oe="call",le="protocol",ue="clientHeight",de="href",ce="substring",fe="action",pe="apply",he="navigator",me="parentNode",ve="join",ge="toLowerCase",ye=new function(){
var e=[];this.set=function(t){e[t]=!0},this.M=function(){for(var t=[],n=0;n<e[Z];n++)e[n]&&(t[N.floor(n/6)]=t[N.floor(n/6)]^1<<n%6);for(n=0;n<t[Z];n++)t[n]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(t[n]||0);return t[ve]("")+"~"}},be=function(e,t,a,i){try{e.addEventListener?e.addEventListener(t,a,!!i):e.attachEvent&&e.attachEvent("on"+t,a)}catch(r){n(27)}},we=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},Pe=function(){
this.keys=[],this.w={},this.m={}};Pe[ee].set=function(e,t,n){this.keys[U](e),n?this.m[":"+e]=t:this.w[":"+e]=t},Pe[ee].get=function(e){return this.m.hasOwnProperty(":"+e)?this.m[":"+e]:this.w[":"+e]},Pe[ee].map=function(e){for(var t=0;t<this.keys[Z];t++){var n=this.keys[t],a=this.get(n);a&&e(n,a)}};var _e=R,Se=document,xe=function(e){var t=_e._gaUserPrefs;if(t&&t.ioo&&t.ioo()||e&&!0===_e["ga-disable-"+e])return!0;try{var n=_e.external;if(n&&n._gaUserPrefs&&"oo"==n._gaUserPrefs)return!0}catch(a){}
return!1},Ce=function(e){L(e,100)},Te=function(e){var t=[],n=Se[V][ne](";");e=j("^\\s*"+e+"=\\s*(.*?)\\s*$");for(var a=0;a<n[Z];a++){var i=n[a][q](e);i&&t[U](i[1])}return t},ke=function(e,t,a,i,r,s){if(r=!xe(r)&&!(Me.test(Se[ae][ie])||"/"==a&&Ie.test(i)),!r)return!1;if(t&&200<t[Z]&&(t=t[ce](0,200),n(24)),a=e+"="+t+"; path="+a+"; ",s&&(a+="expires="+new Date((new Date)[X]()+s).toGMTString()+"; "),i&&"none"!=i&&(a+="domain="+i+";"),i=Se[V],Se.cookie=a,!(i=i!=Se[V]))e:{for(e=Te(e),i=0;i<e[Z];i++)if(t==e[i]){
i=!0;break e}i=!1}return i},Ie=j(/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/),Me=j(/(^|\.)doubleclick\.net$/i),Ae=function(){return(et||"https:"==Se[ae][le]?"https:":"http:")+"//www.google-analytics.com"},Ee=function(t){e(this,"len"),this.message=t+"-8192"},Oe=function(t){e(this,"ff2post"),this.message=t+"-2036"},De=function(e,t){if(t=t||o,2036>=e[Z])Re(e,t);else{if(!(8192>=e[Z]))throw new Ee(e[Z]);var n=t;if(0<=_e[he].userAgent[H]("Firefox")&&![].reduce)throw new Oe(e[Z]);Le(e,n)||Ne(e,n)}},Re=function(e,t){
var n=s(Ae()+"/collect?"+e);n.onload=n.onerror=function(){n.onload=null,n.onerror=null,t()}},Le=function(e,t){var n,a=_e.XDomainRequest;if(a?(n=new a,n.open("POST",Ae()+"/collect")):(a=_e.XMLHttpRequest)&&(a=new a,"withCredentials"in a&&(n=a,n.open("POST",Ae()+"/collect",!0),n.setRequestHeader("Content-Type","text/plain"))),n)return n.onreadystatechange=function(){4==n.readyState&&(t(),n=null)},n.send(e),!0},Ne=function(t,n){if(Se.body){t=D(t);try{var a=Se[Q]('<iframe name="'+t+'"></iframe>')}catch(i){
a=Se[Q]("iframe"),e(a,t)}a.height="0",a.width="0",a.style.display="none",a.style.visibility="hidden";var r=Se[ae],r=Ae()+"/analytics_iframe.html#"+D(r[le]+"//"+r[J]+"/favicon.ico"),s=function(){a.src="",a[me]&&a[me].removeChild(a)};be(_e,"beforeunload",s);var o=!1,l=0,u=function(){if(!o){try{if(9<l||a.contentWindow[ae][J]==Se[ae][J])return o=!0,s(),we(_e,"beforeunload",s),void n()}catch(e){}l++,L(u,200)}};be(a,"load",u),Se.body.appendChild(a),a.src=r}else Ce(function(){Ne(t,n)})},je=function(){this.t=[];
};je[ee].add=function(e){this.t[U](e)},je[ee].execute=function(e){try{for(var t=0;t<this.t[Z];t++){var n=e.get(this.t[t]);n&&a(n)&&n[oe](_e,e)}}catch(i){}t=e.get(rt),t!=o&&a(t)&&(e.set(rt,o,!0),L(t,10))};var Ue=function(){this.data=new Pe},Fe=new Pe,Be=[];Ue[ee].get=function(e){var t=We(e),n=this[$].get(e);return t&&void 0==n&&(n=a(t[W])?t[W]():t[W]),t&&t.n?t.n(this,e,n):n};var ze=function(e,t){var n=e.get(t);return void 0==n?"":""+n},$e=function(e,t){var n=e.get(t);return void 0==n||""===n?0:1*n;
};Ue[ee].set=function(e,t,n){if(e)if("object"==typeof e)for(var a in e)e.hasOwnProperty(a)&&He(this,a,e[a],n);else He(this,e,t,n)};var Ve,He=function(e,t,n,a){var i=We(t);i&&i.o?i.o(e,t,n,a):e[$].set(t,n,a)},qe=function(t,n,a,i,r){e(this,t),this.p=n,this.n=i,this.o=r,this.defaultValue=a},We=function(e){var t=Fe.get(e);if(!t)for(var n=0;n<Be[Z];n++){var a=Be[n],i=a[0].exec(e);if(i){t=a[1](i),Fe.set(t[G],t);break}}return t},Ke=function(e){var t;return Fe.map(function(n,a){a.p==e&&(t=a)}),t&&t[G]},Qe=function(e,t,n,a,i){
return e=new qe(e,t,n,a,i),Fe.set(e[G],e),e[G]},Ye=function(e,t){Be[U]([j("^"+e+"$"),t])},Ge=function(e,t,n){return Qe(e,t,n,void 0,Xe)},Xe=function(){};if(Ve=i(R.GoogleAnalyticsObject)){var Je=R.GoogleAnalyticsObject;Ve=Je?Je[z](/^[\s\xa0]+|[\s\xa0]+$/g,""):""}var Ze=Ve||"ga",et=!1,tt=Ge("apiVersion","v"),nt=Ge("clientVersion","_v");Qe("anonymizeIp","aip");var at=Qe("adSenseId","a"),it=Qe("hitType","t"),rt=Qe("hitCallback"),st=Qe("hitPayload");Qe("nonInteraction","ni"),Qe("currencyCode","cu"),Qe("sessionControl","sc",""),
Qe("queueTime","qt");var ot=Qe("_s","_s");Qe("description","cd");var lt=Qe("location","dl",""),ut=Qe("referrer","dr"),dt=Qe("page","dp","");Qe("hostname","dh");var ct=Qe("language","ul"),ft=Qe("encoding","de");Qe("title","dt",function(){return Se.title||void 0}),Ye("contentGroup([0-9]+)",function(e){return new qe(e[0],"cg"+e[1])});var pt=Qe("screenColors","sd"),ht=Qe("screenResolution","sr"),mt=Qe("viewportSize","vp"),vt=Qe("javaEnabled","je"),gt=Qe("flashVersion","fl");Qe("campaignId","ci"),Qe("campaignName","cn"),
Qe("campaignSource","cs"),Qe("campaignMedium","cm"),Qe("campaignKeyword","ck"),Qe("campaignContent","cc");var yt=Qe("eventCategory","ec"),bt=Qe("eventAction","ea"),wt=Qe("eventLabel","el"),Pt=Qe("eventValue","ev"),_t=Qe("socialNetwork","sn"),St=Qe("socialAction","sa"),xt=Qe("socialTarget","st"),Ct=Qe("l1","plt"),Tt=Qe("l2","pdt"),kt=Qe("l3","dns"),It=Qe("l4","rrt"),Mt=Qe("l5","srt"),At=Qe("l6","tcp"),Et=Qe("l7","dit"),Ot=Qe("l8","clt"),Dt=Qe("timingCategory","utc"),Rt=Qe("timingVar","utv"),Lt=Qe("timingLabel","utl"),Nt=Qe("timingValue","utt");
Qe("appName","an"),Qe("appVersion","av",""),Qe("appId","aid",""),Qe("appInstallerId","aiid",""),Qe("exDescription","exd"),Qe("exFatal","exf");var jt=Qe("expId","xid"),Ut=Qe("expVar","xvar"),Ft=Qe("_utma","_utma"),Bt=Qe("_utmz","_utmz"),zt=Qe("_utmht","_utmht"),$t=Qe("_hc",void 0,0),Vt=Qe("_ti",void 0,0),Ht=Qe("_to",void 0,20);Ye("dimension([0-9]+)",function(e){return new qe(e[0],"cd"+e[1])}),Ye("metric([0-9]+)",function(e){return new qe(e[0],"cm"+e[1])}),Qe("linkerParam",void 0,void 0,k,Xe),Qe("usage","_u",void 0,function(){
return ye.M()},Xe),Qe("forceSSL",void 0,void 0,function(){return et},function(e,t,n){et=!!n});var qt=Qe("joinId","jid");Ye("\\&(.*)",function(e){var t=new qe(e[0],e[1]),n=Ke(e[0][ce](1));return n&&(t.n=function(e){return e.get(n)},t.o=function(e,t,a,i){e.set(n,a,i)},t.p=void 0),t});var Wt=Ge("oot"),Kt=Qe("previewTask"),Qt=Qe("checkProtocolTask"),Yt=Qe("checkStorageTask"),Gt=Qe("historyImportTask"),Xt=Qe("samplerTask"),Jt=Ge("rateLimiterTask"),Zt=Qe("buildHitTask"),en=Qe("sendHitTask"),tn=Qe("ceTask"),nn=Ge("name"),an=Ge("clientId","cid"),rn=Ge("trackingId","tid"),sn=Ge("cookieName",void 0,"_ga"),on=Ge("cookieDomain"),ln=Ge("cookiePath",void 0,"/"),un=Ge("cookieExpires",void 0,63072e3),dn=Ge("legacyCookieDomain"),cn=Ge("legacyHistoryImport",void 0,!0),fn=Ge("storage",void 0,"cookie"),pn=Ge("allowLinker",void 0,!1),hn=Ge("allowAnchor",void 0,!0),mn=Ge("sampleRate","sf",100),vn=Ge("siteSpeedSampleRate",void 0,1),gn=Ge("alwaysSendReferrer",void 0,!1),yn=function(e,t){
var n=N.min($e(e,vn),100);if(!(O(ze(e,an))%100>=n)&&(n={},bn(n)||wn(n))){var a=n[Ct];void 0==a||1/0==a||isNaN(a)||(0<a?(Pn(n,kt),Pn(n,At),Pn(n,Mt),Pn(n,Tt),Pn(n,It),Pn(n,Et),Pn(n,Ot),t(n)):be(_e,"load",function(){yn(e,t)},!1))}},bn=function(e){var t=_e.performance||_e.webkitPerformance,t=t&&t.timing;if(!t)return!1;var n=t.navigationStart;return 0!=n&&(e[Ct]=t.loadEventStart-n,e[kt]=t.domainLookupEnd-t.domainLookupStart,e[At]=t.connectEnd-t.connectStart,e[Mt]=t.responseStart-t.requestStart,e[Tt]=t.responseEnd-t.responseStart,
e[It]=t.fetchStart-n,e[Et]=t.domInteractive-n,e[Ot]=t.domContentLoadedEventStart-n,!0)},wn=function(e){if(_e.top!=_e)return!1;var t=_e.external,n=t&&t.onloadT;return t&&!t.isValidLoadTime&&(n=void 0),2147483648<n&&(n=void 0),0<n&&t.setPageReadyTime(),void 0!=n&&(e[Ct]=n,!0)},Pn=function(e,t){var n=e[t];(isNaN(n)||1/0==n||0>n)&&(e[t]=void 0)},_n=!1,Sn=function(e){if("cookie"==ze(e,fn)){var t=ze(e,sn),a=Tn(e),i=An(ze(e,ln)),r=In(ze(e,on)),s=1e3*$e(e,un),o=ze(e,rn);if("auto"!=r)ke(t,a,i,r,o,s)&&(_n=!0);else{
n(32);var l;if(a=[],r=c()[ne]("."),4!=r[Z]||(l=r[r[Z]-1],parseInt(l,10)!=l)){for(l=r[Z]-2;0<=l;l--)a[U](r[B](l)[ve]("."));a[U]("none"),l=a}else l=["none"];for(var u=0;u<l[Z];u++)if(r=l[u],e[$].set(on,r),a=Tn(e),ke(t,a,i,r,o,s))return void(_n=!0);e[$].set(on,"auto")}}},xn=function(e){if("cookie"==ze(e,fn)&&!_n&&(Sn(e),!_n))throw"abort"},Cn=function(e){if(e.get(cn)){var t=ze(e,on),a=ze(e,dn)||c(),i=C("__utma",a,t);i&&(n(19),e.set(zt,(new Date)[X](),!0),e.set(Ft,i.R),(t=C("__utmz",a,t))&&i[F]==t[F]&&e.set(Bt,t.R));
}},Tn=function(e){var t=u(ze(e,an)),n=Mn(ze(e,on));return e=En(ze(e,ln)),1<e&&(n+="-"+e),["GA1",n,t][ve](".")},kn=function(e,t,n){for(var a,i=[],r=[],s=0;s<e[Z];s++){var o=e[s];o.r[n]==t?i[U](o):void 0==a||o.r[n]<a?(r=[o],a=o.r[n]):o.r[n]==a&&r[U](o)}return 0<i[Z]?i:r},In=function(e){return 0==e[H](".")?e.substr(1):e},Mn=function(e){return In(e)[ne](".")[Z]},An=function(e){return e?(1<e[Z]&&e.lastIndexOf("/")==e[Z]-1&&(e=e.substr(0,e[Z]-1)),0!=e[H]("/")&&(e="/"+e),e):"/"},En=function(e){return e=An(e),
"/"==e?1:e[ne]("/")[Z]},On=j(/^https?:\/\/([^\/:]+)/),Dn=/(.*)([?&#])(?:_ga=[^&]*)(?:&?)(.*)/,Rn=function(e){this.target=e,this.T=!1};Rn[ee].Q=function(e,n){if(e.tagName){if("a"==e.tagName[ge]())return void(e[de]&&t(e,Ln(this,e[de],n)));if("form"==e.tagName[ge]())return Nn(this,e)}if("string"==typeof e)return Ln(this,e,n)};var Ln=function(e,t,n){var a=Dn.exec(t);a&&3<=a[Z]&&(t=a[1]+(a[3]?a[2]+a[3]:"")),e=e[se].get("linkerParam");var i=t[H]("?"),a=t[H]("#");return n?t+=(-1==a?"#":"&")+e:(n=-1==i?"?":"&",
t=-1==a?t+(n+e):t[ce](0,a)+n+e+t[ce](a)),t},Nn=function(e,t){if(t&&t[fe]){var n=e[se].get("linkerParam")[ne]("=")[1];if("get"==t.method[ge]()){for(var a=t.childNodes||[],i=0;i<a[Z];i++)if("_ga"==a[i][G])return void a[i][Y]("value",n);a=Se[Q]("input"),a[Y]("type","hidden"),a[Y]("name","_ga"),a[Y]("value",n),t.appendChild(a)}else"post"==t.method[ge]()&&(t.action=Ln(e,t[fe]))}};Rn[ee].S=function(e,a,i){function r(i){try{i=i||_e.event;var r;e:{var o=i[se]||i.srcElement;for(i=100;o&&0<i;){if(o[de]&&o.nodeName[q](/^a(?:rea)?$/i)){
r=o;break e}o=o[me],i--}r={}}("http:"==r[le]||"https:"==r[le])&&M(e,r[ie]||"")&&r[de]&&t(r,Ln(s,r[de],a))}catch(l){n(26)}}var s=this;if(this.T||(this.T=!0,be(Se,"mousedown",r,!1),be(Se,"touchstart",r,!1),be(Se,"keyup",r,!1)),i){i=function(t){if(t=t||_e.event,(t=t[se]||t.srcElement)&&t[fe]){var n=t[fe][q](On);n&&M(e,n[1])&&Nn(s,t)}};for(var o=0;o<Se.forms[Z];o++)be(Se.forms[o],"submit",i)}};var jn,Un=function(e){return e.get(nn)&&"t0"!=e.get(nn)?"_dc_"+u(e.get(nn)):"_dc"},Fn=function(e){if(e.get(qt)){
var t=new Pe,n=function(n){t.set(We(n).p,e.get(n))};n(tt),n(nt),n(rn),n(an),n(qt);var a=$e(e,"forceSSL")||"https:"==Se[ae][le]?"https:":"http:",a=a+"//stats.g.doubleclick.net/collect?t=dc&aip=1&";t.map(function(e,t){a+=l(e)+"="+l(""+t)+"&"}),a+="z="+r(),s(a),e.set(qt,"",!0)}},Bn=function(e){n(29),e=e.b;var t=e.get(Zt);e.set(Zt,function(e){return e.get(qt)||(-1!=Se[V][H](Un(e)+"=1")?e.set(qt,"",!0):(Un(e),ke(Un(e),"1",e.get(ln),e.get(on),e.get(rn),6e5)?e.set(qt,""+r(),!0):n(30))),t(e)});var a=e.get(en);
e.set(en,function(e){var t=a(e);return Fn(e),t})},zn=function(e,t,n){if(!jn){var a;a=Se[ae][F];var i=_e[G],s=/^#?gaso=([^&]*)/;(i=(a=(a=a&&a[q](s)||i&&i[q](s))?a[1]:Te("GASO")[0]||"")&&a[q](/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))&&(ke("GASO",""+a,n,t,e,0),R._udo||(R._udo=t),R._utcp||(R._utcp=n),e=i[1],d("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(e?"prefix="+e+"&":"")+r(),"_gasojs")),jn=!0}},$n=function(e){function t(e,t){a.b[$].set(e,t)}function n(e,n){t(e,n),a.filters.add(e);
}var a=this;this.b=new Ue,this.filters=new je,t(nn,e[nn]),t(rn,e[rn]),t(sn,e[sn]),t(on,e[on]||c()),t(ln,e[ln]),t(un,e[un]),t(dn,e[dn]),t(cn,e[cn]),t(pn,e[pn]),t(hn,e[hn]),t(mn,e[mn]),t(vn,e[vn]),t(gn,e[gn]),t(fn,e[fn]),t(tt,1),t(nt,"j15"),n(Wt,m),n(Kt,w),n(Qt,v),n(Yt,xn),n(Gt,Cn),n(Xt,h),n(Jt,P),n(tn,b),n(Zt,g),n(en,y),Vn(this.b,e[an]),Hn(this.b),this.b.set(at,A()),zn(this.b.get(rn),this.b.get(on),this.b.get(ln))},Vn=function(e,t){if("cookie"==ze(e,fn)){_n=!1;var a;e:{var i=Te(ze(e,sn));if(i&&!(1>i[Z])){
a=[];for(var s=0;s<i[Z];s++){var o;o=i[s][ne](".");var u=o.shift();("GA1"==u||"1"==u)&&1<o[Z]?(u=o.shift()[ne]("-"),1==u[Z]&&(u[1]="1"),u[0]*=1,u[1]*=1,o={r:u,s:o[ve](".")}):o=void 0,o&&a[U](o)}if(1==a[Z]){n(13),a=a[0].s;break e}if(0!=a[Z]){if(n(14),i=Mn(ze(e,on)),a=kn(a,i,0),1==a[Z]){a=a[0].s;break e}i=En(ze(e,ln)),a=kn(a,i,1),a=a[0]&&a[0].s;break e}n(12)}a=void 0}a||(a=ze(e,on),i=ze(e,dn)||c(),a=C("__utma",i,a),(a=void 0==a?void 0:a.O[1]+"."+a.O[2])&&n(10)),a&&(e[$].set(an,a),_n=!0)}if(a=e.get(hn),
(s=(a=Se[ae][a?"href":"search"][q]("(?:&|#|\\?)"+l("_ga")[z](/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==a[Z]?a[1]:"")&&(e.get(pn)?(a=s[H]("."),-1==a?n(22):(i=s[ce](a+1),"1"!=s[ce](0,a)?n(22):(a=i[H]("."),-1==a?n(22):(s=i[ce](0,a),a=i[ce](a+1),s!=I(a,0)&&s!=I(a,-1)&&s!=I(a,-2)?n(23):(n(11),e[$].set(an,a)))))):n(21)),t&&(n(9),e[$].set(an,l(t))),!e.get(an))if(a=(a=_e.gaGlobal&&_e.gaGlobal.vid)&&-1!=a[re](/^(?:utma\.)?\d+\.\d+$/)?a:void 0)n(17),e[$].set(an,a);else{for(n(8),a=_e[he],a=a.appName+a.version+a.platform+a.userAgent+(Se[V]?Se[V]:"")+(Se.referrer?Se.referrer:""),
i=a[Z],s=_e.history[Z];0<s;)a+=s--^i++;e[$].set(an,[r()^2147483647&O(a),N.round((new Date)[X]()/1e3)][ve]("."))}Sn(e)},Hn=function(e){var t=_e[he],a=_e.screen,i=Se[ae];if(e.set(ut,f(e.get(gn))),i){var r=i.pathname||"";"/"!=r.charAt(0)&&(n(31),r="/"+r),e.set(lt,i[le]+"//"+i[ie]+r+i[re])}a&&e.set(ht,a.width+"x"+a.height),a&&e.set(pt,a.colorDepth+"-bit");var a=Se.documentElement,s=(r=Se.body)&&r[te]&&r[ue],o=[];if(a&&a[te]&&a[ue]&&("CSS1Compat"===Se.compatMode||!s)?o=[a[te],a[ue]]:s&&(o=[r[te],r[ue]]),
a=0>=o[0]||0>=o[1]?"":o[ve]("x"),e.set(mt,a),e.set(gt,x()),e.set(ft,Se.characterSet||Se.charset),e.set(vt,t&&"function"==typeof t.javaEnabled&&t.javaEnabled()||!1),e.set(ct,(t&&(t.language||t.browserLanguage)||"")[ge]()),i&&e.get(hn)&&(t=Se[ae][F])){for(t=t[ce](1),t=t[ne]("&"),i=[],a=0;a<t[Z];++a)0!=t[a][H]("utm_id")&&0!=t[a][H]("utm_campaign")&&0!=t[a][H]("utm_source")&&0!=t[a][H]("utm_medium")&&0!=t[a][H]("utm_term")&&0!=t[a][H]("utm_content")||i[U](t[a]);0<i[Z]&&(t="#"+i[ve]("&"),e.set(lt,e.get(lt)+t));
}};$n[ee].get=function(e){return this.b.get(e)},$n[ee].set=function(e,t){this.b.set(e,t)};var qn={pageview:[dt],event:[yt,bt,wt,Pt],social:[_t,St,xt],timing:[Dt,Rt,Nt,Lt]};$n[ee].send=function(e){if(!(1>arguments[Z])){var t,n;"string"==typeof arguments[0]?(t=arguments[0],n=[][B][oe](arguments,1)):(t=arguments[0]&&arguments[0][it],n=arguments),t&&(n=p(qn[t]||[],n),n[it]=t,this.b.set(n,void 0,!0),this.filters.execute(this.b),"pageview"==t&&Wn(this),this.b[$].m={})}};var Wn=function(e){e.I||(e.I=!0,
yn(e.b,function(t){e.send("timing",t)}))},Kn=function(e){return"prerender"!=Se.webkitVisibilityState&&(e(),!0)},Qn=function(e){if(!Kn(e)){n(16);var t=!1,a=function(){!t&&Kn(e)&&(t=!0,we(Se,"webkitvisibilitychange",a))};be(Se,"webkitvisibilitychange",a)}},Yn={F:"/plugins/ua/",D:/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/};Yn.k=new Pe,Yn.f=[];var Gn=function(e){if(a(e[0]))this.u=e[0];else{var t=Yn.D.exec(e[0]);if(null!=t&&4==t[Z]&&(this.c=t[1]||"t0",this.e=t[2]||"",this.d=t[3],this.a=[][B][oe](e,1),this.e||(this.A="create"==this.d,
this.i="require"==this.d,this.g="provide"==this.d)),!a(e[0])){if(t=e[1],e=e[2],!this.d)throw"abort";if(this.i&&(!i(t)||""==t))throw"abort";if(this.g&&(!i(t)||""==t||!a(e)))throw"abort";if(0<=this.c[H](".")||0<=this.c[H](":")||0<=this.e[H](".")||0<=this.e[H](":"))throw"abort";if(this.g&&"t0"!=this.c)throw"abort"}}};Yn.B=function(e,t,n){var i=Yn.k.get(e);return!!a(i)&&(t.plugins_=t.plugins_||new Pe,t.plugins_.set(e,new i(t,n||{})),!0)},Yn.C=function(e,t){Yn.k.set(e,t)},Yn.execute=function(e){var t=Yn.J[pe](Yn,arguments),t=Yn.f.concat(t);
for(Yn.f=[];0<t[Z]&&!Yn.v(t[0])&&(t.shift(),!(0<Yn.f[Z])););Yn.f=Yn.f.concat(t)},Yn.J=function(e){for(var t=[],n=0;n<arguments[Z];n++)try{var i=new Gn(arguments[n]);if(i.g)Yn.v(i);else{if(i.i){var r=i.a[1];if(!a(Yn.k.get(i.a[0]))&&!i.H&&r){var s,o=r+"",r=o&&0<=o[H]("/")?o:"//www.google-analytics.com"+Yn.F+o,l=E(""+r),u=l[le],c=Se[ae][le];s="https:"==u||u==c||"http:"==u&&"http:"==c;var f;if(f=s){var o=l,p=E(Se[ae][de]);if(o.G||0<=o.url[H]("?")||0<=o.path[H]("://"))f=!1;else if(o[J]==p[J]&&o[K]==p[K])f=!0;else{
var h="http:"==o[le]?80:443;f="www.google-analytics.com"==o[J]&&(o[K]||h)==h&&0==o.path[H]("/plugins/")}}f&&(i.H=!!d(l.url))}}t[U](i)}}catch(m){}return t},Yn.v=function(e){try{if(e.u)e.u[oe](_e,Xn.j("t0"));else if(e.g)Yn.C(e.a[0],e.a[1]);else{var t=e.c==Ze?Xn:Xn.j(e.c);if(e.A)"t0"==e.c&&Xn.create[pe](Xn,e.a);else if(t)if(e.i){if(!Yn.B(e.a[0],t,e.a[2]))return!0}else e.e&&(t=t.plugins_.get(e.e)),t[e.d][pe](t,e.a)}}catch(n){}};var Xn=function(e){n(1),Yn.execute[pe](Yn,[arguments])};Xn.h={},Xn.P=[],Xn.L=0,
Xn.answer=42;var Jn=[rn,on,nn];Xn.create=function(e){var t=p(Jn,[][B][oe](arguments));t[nn]||(t[nn]="t0");var n=""+t[nn];return Xn.h[n]?Xn.h[n]:(t=new $n(t),Xn.h[n]=t,Xn.P[U](t),t)},Xn.j=function(e){return Xn.h[e]},Xn.K=function(){return Xn.P[B](0)},Xn.N=function(){var e=_e[Ze];if(!e||42!=e.answer){Xn.L=e&&e.l,Xn.loaded=!0,_e[Ze]=Xn,_();var t=e&&e.q;"[object Array]"==Object[ee].toString[oe](Object(t))&&Qn(function(){Yn.execute[pe](Xn,t)})}},Xn.N()}(window),e.exports=ga}).call(t,n(5))},function(e,t){
!function(){"use strict";var e={};!function(){function t(){a||console.log.apply(console,arguments);for(var e=Math.round(Date.now()-r),t=[],n=0;n<arguments.length;n++){var i=""+arguments[n];"[obj"!=i.slice(0,4)&&t.push(i)}var s=e+": "+t.join(", "),o=document.getElementById("console");o&&(o.value+=s+"\n"),a&&console.log(s)}function n(e){e<=i&&t.apply(null,arguments)}var a=!!(window.console&&window.console.log&&window.console.log.call),i=0,r=(new Date).getTime();e.dlog=n,e.log=t,e.DLOG_LEVEL=i}(),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 a=[];if(null==n)return a;for(var i=n.firstElementChild;null!=i;i=i.nextElementSibling)i.nodeName==e&&a.push(t.call(this,i));return a},t.prototype.parseAttributes_=function(e,t){
var n={};for(var a in e)null!=t.attributes.getNamedItem(a)&&(n[a]=e[a](t.attributes[a].value));return n},t.prototype.parseTime_=function(e){var t=e.split(":"),n=3600*parseFloat(t[0])+60*parseFloat(t[1])+parseFloat(t[2])+parseFloat(t[3])/this.frameRate_;return n},t.prototype.parseTextTrack_=function(e){var t=this.xmlDecode_(e.replace(/[\r\n]+/g,"").replace(/ {2,}/g," ").replace(/<[^>]+>/g,"").replace(/<br\s*\/>/g,"\n"));return t.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){var t=this.parseChildElements_("div",this.parse_div_,e);return t[0]},t.prototype.parse_ttml_=function(e){var t=this.parseChildElements_("body",this.parse_body_,e);return t[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=0,n=1,a=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};a.prototype.ccType=function(){return t},a.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()},a.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")},a.prototype.getCCInfo=function(){return this._ccInfo},a.prototype.onCCError=function(t){var n="Error geting captions from "+this._url;return e.log(n),this._callback(n)},a.prototype.onCCLoad=function(a){e.dlog(2,"Close Captions Info received");var i=null;if(200!==a.target.status||a.target.status>299)return i="HTTP error "+a.target.status+" retrieving close captions from "+this._url,e.log(i),this._callback(i);
switch(this.ccType()){case t:this._ccInfo=new e.Ttml(a.target.responseText).parse();break;case n:throw new Error("VTT parsing not implemented yet")}return null===this._ccInfo?(i="Error parsing the close captions info",e.log(i),this._callback(i)):this._callback(i,this._ccInfo)},e.CloseCaptionsLoader=a}(),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 a(e,t,n){var a=[];if(null==n)return a;for(var i=n.firstElementChild;null!=i;i=i.nextElementSibling)i.nodeName==e&&a.push(t(i));return a}function i(e,t,n){return a(e,t,n)[0]||null}function r(e,t,n){n=n||{};for(var a in e)null!=t.attributes.getNamedItem(a)&&(n[a]=e[a](t.attributes[a].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]),a=parseInt(t[2]);
return{start:n,end:a,length:a-n+1}}function l(e){return r(P,e)}function u(e){return e.textContent}function d(e){return o(e.attributes.range.value)}function c(e){var t=r(_,e);return t.initialization=i("Initialization",d,e),t}function f(e){return r(S,e)}function p(e){var t=c(e);return t.timescale&&t.duration?t.durationSeconds=t.duration/t.timescale:t.durationSeconds=t.duration,t.segmentURLs=a("SegmentURL",l,e),t}function h(e){var t=r(C,e);return t.baseURLs=a("BaseURL",u,e),t.segmentBase=i("SegmentBase",c,e),
t.segmentList=i("SegmentList",p,e),t.contentProtection=i("ContentProtection",x,e),t}function m(e){var t=h(e);return r(T,e,t),t}function v(e){var t=h(e);t.representations=a("Representation",m,e),t.segmentTemplate=i("SegmentTemplate",f,e);for(var n=0;n<t.representations.length;n++)t.representations[n].segmentTemplate=t.segmentTemplate;return t}function g(e){var t=h(e);return r(k,e,t),t.adaptationSets=a("AdaptationSet",v,e),t}function y(e){var t={};return r({mediaPresentationDuration:n},e,t),t.periods=a("Period",g,e),
t.baseURLs=a("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 w(e,t){var n=new DOMParser,a=n.parseFromString(e,"text/xml");return b(y(a.firstChild),t)}var P={media:t,mediaRange:o,index:t,indexRange:o},_={timescale:parseInt,duration:parseInt,indexRange:o,presentationTimeOffset:parseInt,startNumber:parseInt},S={timescale:parseInt,duration:parseInt,initialization:t,media:t,startNumber:parseInt},x=function(e){var t=e.attributes.schemeIdUri;if(!t||"http://youtube.com/drm/2012/10/10"!=t.textContent)return null;for(var n={},a=e.firstElementChild;null!=a;a=a.nextElementSibling)if("yt:SystemURL"==a.nodeName){
var i=a.attributes.type.textContent;n[i]=a.textContent}return n},C={id:t,profiles:t,width:parseInt,height:parseInt,frameRate:s,audioSamplingRate:parseInt,mimeType:t,codecs:t},T={bandwidth:parseInt,qualityRanking:parseInt},k={id:parseInt,start:n,duration:n};e.parseDASHManifest=w}(),function(){function t(e){for(var t=new DataView(e),n=0;n<e.byteLength;){var a=t.getUint32(n+4,!1);if(1936286840==a||1836019558==a)break;n+=t.getUint32(n,!1)}return new Uint8Array(e.slice(0,n))}function n(e,t){for(var n=new DataView(e),a=0;1936286840!=n.getUint32(a+4,!1);)if(a+=n.getUint32(a,!1),
a>=e.byteLength)throw"Could not find sidx";var i=n.getUint32(a,!1)+a;if(i>e.byteLength)throw"sidx terminates after array buffer";var r=n.getUint8(a+8);a+=12;var s=n.getUint32(a+4,!1);a+=8;var o,l;0==r?(o=n.getUint32(a,!1),l=n.getUint32(a+4,!1),a+=8):(o=(n.getUint32(a,!1)<<32)+n.getUint32(a+4,!1),l=(n.getUint32(a+8,!1)<<32)+n.getUint32(a+12,!1),a+=16),l+=i+(t||0);var u=n.getUint16(a+2,!1);a+=4;for(var d=l,c=o,f=[],p=0;p<u;p++){var h=n.getUint32(a,!1),m=2147483648&h;if(m)throw"Unhandled indirect reference";
h=2147483647&h;var v=n.getUint32(a+4,!1);a+=12,f.push({size:h,offset:d,duration:v/s,time:c/s}),d+=h,c+=v}if(a!=i)throw"Error: final pos "+a+" differs from SIDX end "+i;return f}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 a=new ArrayBuffer(t-e),i=new Uint8Array(a),r=0;r<i.length;r++)i[r]=n[r+e];return a}),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),a=0;a<e.length;a+=2)n[a/2]=parseInt(e.substr(a,2),16);return n}function a(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t}function i(e){return n(e.replace(/[{}-]/g,""))}function r(e,t,n){var a=[];if(null==n)return a;for(var i=n.firstElementChild;null!=i;i=i.nextElementSibling)i.nodeName==e&&a.push(t(i));return a}function s(e,t,n){n=n||{};for(var a in e)null!=t.attributes.getNamedItem(a)&&(n[a]=e[a](t.attributes[a].value));
return n}function o(t){var n={},i=t.split("00000001");return 3!==i.length?(t||(e.log("Warning, Audio codec private data is not specified."),t="1210"),n=a(t)):(n.SPS=a(i[1]),n.PPS=a(i[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 d(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 c(e){var t=[];if(null==e)return t;for(var n=-1,a=e.firstElementChild;null!=a;a=a.nextElementSibling)if("c"==a.nodeName){var i={};if(n==-1&&(n=null!=a.attributes.getNamedItem("t")?parseInt(a.attributes.t.value):0),i.time=n/1e7,i.timeURL=n,null==a.attributes.getNamedItem("d"))throw"Expected attribute 'd' not found";
var r=parseInt(a.attributes.d.value);i.duration=r/1e7,i.durationURL=r,n+=r,t.push(i)}return t}function f(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",d,e)),n.Fragments=c(e),n}function p(e,t){for(var n=[],a=[],i=!1,r=!1,s=e.length-1;s>=0&&(r||"video"!==e[s].Type||(a.push(s),r=!0),i||"audio"!==e[s].Type||(a.push(s),i=!0),!r||!i);s--);for(var s=0;s<e.length;s++)if(a.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 h(e){for(var t=atob(e.trim()),n=new ArrayBuffer(t.length),a=new Uint8Array(n),i=0;i<t.length;i++)a[i]=t.charCodeAt(i);
return{ab:n,u8:a}}function m(e){for(var t=0,n=[],a=[],i=new Uint16Array(e),r=e.byteLength/2;t<r&&(0===n.length||0===a.length);){for(;t<r&&60!==i[t];)t++;if(75===i[t+1]&&73===i[t+2]&&68===i[t+3]&&62===i[t+4])for(t+=5;t<r&&60!==i[t];)n.push(i[t]),t++;else if(76===i[t+1]&&65===i[t+2]&&95===i[t+3]&&85===i[t+4]&&82===i[t+5]&&76===i[t+6]&&62===i[t+7])for(t+=8;t<r&&60!==i[t];)a.push(i[t]),t++;else t++}return{kid:String.fromCharCode.apply(null,n),url:String.fromCharCode.apply(null,a)}}function v(e){var t={};
s({SystemID:i},e,t);var n=h(e.textContent),a=m(n.ab);return t.KID=h(a.kid).u8,t.url=a.url,t.PrHeader=n.u8,t}function g(e){var t={};return t.ProtectionHeader=r("ProtectionHeader",v,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",f,e);var n=r("Protection",g,e);n&&n[0]&&(t.Protection=n[0]),t.duration=t.Duration/t.TimeScale;var a;return t.Protection&&(a={},t.Protection.ProtectionHeader.url?a.playready=t.Protection.ProtectionHeader.url:a.playready="http://playready.directtaps.net/pr/svc/rightsmanager.asmx"),
t.adaptationSets=p(t.StreamIndexes,a),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 w(e,t){for(var n,a=new DOMParser,i=a.parseFromString(e,"text/xml"),r=0;r<i.childNodes.length;r++)if("SmoothStreamingMedia"===i.childNodes[r].nodeName){n=i.childNodes[r];break}return b(y(n),t);
}e.parseSSManifest=w}(),function(){function t(e,t,n){e.setUint32(t,n)}function n(e,t,n){for(var a=0;a<4;a++)e.setUint8(t+4+a,n.charCodeAt(a));return 8}function a(e,t,n,a,i){return n.set(i,a),a+i.length}function i(e,a,i,r,s,o){var l=r;return r+=n(a,r,s),o&&(r=o(e,a,i,r)),t(a,l,r-l),r}function r(e,t,n,r,s,o){return i(e,t,n,r,s,function(e,t,n,i){return a(e,t,n,i,o)})}function s(e,t,n,a){return r(e,t,n,a,"smhd",[0,0,0,0,0,0,0,0])}function o(e,t,n,a){return r(e,t,n,a,"vmhd",[0,0,0,1,0,0,0,0,0,0,0,0])}
function l(e,t,n,r){return i(e,t,n,r,"esds",function(e,t,n,i){var r=e.audio_codec_private_data[0],s=e.audio_codec_private_data[1];return i=a(e,t,n,i,[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,r,s,6,1,2])})}function u(e,t,n,r){return i(e,t,n,r,"avcC",function(e,t,n,i){return i=a(e,t,n,i,[1,77,64,30,255,225]),t.setUint16(i,e.sps.length),i+=2,i=a(e,t,n,i,e.sps),t.setUint8(i,1),i+=1,t.setUint16(i,e.pps.length),i+=2,i=a(e,t,n,i,e.pps)})}function d(e,t,n){for(var a=n-t+1,i=0,r=t;r<t+a/2;r++)i=e[r],
e[r]=e[n-r+t],e[n-r+t]=i}function c(e){var t=new ArrayBuffer(e.length),n=new Uint8Array(t);return n.set(e),d(n,0,3),d(n,4,5),d(n,6,7),n}function f(e,t,n,r){return i(e,t,n,r,"tenc",function(e,t,n,i){i=a(e,t,n,i,[0,0,0,0,0,0,1]),t.setUint8(i,e.pr.ivsize),i++;var r=c(e.pr.kid);return i=a(e,t,n,i,r)})}function p(e,t,n,a){return i(e,t,n,a,"schi",function(e,t,n,a){return a=f(e,t,n,a)})}function h(e,t,n,a){return r(e,t,n,a,"schm",[0,0,0,0,99,101,110,99,0,1,0,0])}function m(e,t,n,a){return"audio/mp4"!==e.mime?r(e,t,n,a,"frma",[97,118,99,49]):r(e,t,n,a,"frma",[109,112,52,97]);
}function v(e,t,n,a){return i(e,t,n,a,"sinf",function(e,t,n,a){return a=m(e,t,n,a),a=h(e,t,n,a),a=p(e,t,n,a)})}function g(e,t,n,r,s){return i(e,t,n,r,s,function(e,t,n,i){var r=e.audio_sample_rate>>8&255,o=255&e.audio_sample_rate;return i=a(e,t,n,i,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,r,o,0,0]),i=l(e,t,n,i),"enca"===s&&(i=v(e,t,n,i)),i})}function y(e,t,n,r,s){return i(e,t,n,r,s,function(e,t,n,i){return i=a(e,t,n,i,[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(i,e.width),
i+=2,t.setUint16(i,e.height),i+=2,i=a(e,t,n,i,[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]),i=u(e,t,n,i),"encv"===s&&(i=v(e,t,n,i)),i})}function b(e,t,n,r){return i(e,t,n,r,"stsd",function(e,t,n,i){return i=a(e,t,n,i,[0,0,0,0,0,0,0,1]),"audio/mp4"!==e.mime?(e.pr&&(i=y(e,t,n,i,"encv")),i=y(e,t,n,i,"avc1")):(e.pr&&(i=g(e,t,n,i,"enca")),i=g(e,t,n,i,"mp4a")),i})}function w(e,t,n,r){return i(e,t,n,r,"stbl",function(e,t,n,i){return i=b(e,t,n,i),
i="audio/mp4"!==e.mime?a(e,t,n,i,[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]):a(e,t,n,i,[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 P(e,t,n,a){return r(e,t,n,a,"url ",[0,0,0,1])}function _(e,t,n,r){
return i(e,t,n,r,"dref",function(e,t,n,i){return i=a(e,t,n,i,[0,0,0,0,0,0,0,1]),i=P(e,t,n,i)})}function S(e,t,n,a){return i(e,t,n,a,"dinf",function(e,t,n,a){return a=_(e,t,n,a)})}function x(e,t,n,a){return i(e,t,n,a,"minf",function(e,t,n,a){return a=S(e,t,n,a),a=w(e,t,n,a),a="audio/mp4"!==e.mime?o(e,t,n,a):s(e,t,n,a)})}function C(e,t,n,a){return"audio/mp4"!==e.mime?r(e,t,n,a,"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,a,"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 T(e,t,n,a){return r(e,t,n,a,"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 k(e,t,n,a){return i(e,t,n,a,"mdia",function(e,t,n,a){return a=T(e,t,n,a),a=C(e,t,n,a),a=x(e,t,n,a)})}function I(e,t,n,r){return i(e,t,n,r,"tkhd",function(e,t,n,i){return i=a(e,t,n,i,[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(i,e.width),
i+=4,t.setUint32(i,e.height),i+=4,t.setUint16(i,0),i+=2})}function M(e,t,n,a){return i(e,t,n,a,"trak",function(e,t,n,a){return a=I(e,t,n,a),a=k(e,t,n,a)})}function A(e,t,n,a){return r(e,t,n,a,"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 E(e,t,n,a){return i(e,t,n,a,"mvex",function(e,t,n,a){return a=A(e,t,n,a)})}function O(e,t,n,r){return i(e,t,n,r,"pssh",function(e,t,n,i){return i=a(e,t,n,i,[0,0,0,0]),i=a(e,t,n,i,e.pr.systemId),t.setUint32(i,e.pr.prHeader.length),i+=4,i=a(e,t,n,i,e.pr.prHeader);
})}function D(e,t,n,a){return r(e,t,n,a,"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 R(e,t,n,a){return i(e,t,n,a,"moov",function(e,t,n,a){return a=D(e,t,n,a),e.pr&&(a=O(e,t,n,a)),a=E(e,t,n,a),a=M(e,t,n,a)})}function L(e){var t=new ArrayBuffer(2e4),n=new DataView(t),a=new Uint8Array(t),i=0,r=0;i=R(e,n,a,i),
r=i-1;var s={};return s.data=t.slice(0,i),s.init={},s.init.start=0,s.init.end=r,s}function N(e,t,n){for(var a=0,i=t,r=0;r<4;r++)a<<=8,a+=n.charCodeAt(r);for(;e.getUint32(i+4,!1)!=a;)if(i+=e.getUint32(i),i>=e.byteLength)throw"Could not find box: "+n;return i}function j(e,t){var n=N(e,t,"traf");n=N(e,n+8,"tfhd"),e.setUint32(n+12,1)}function U(e,t,n,a){var i=N(e,t,n),r=e.getUint32(i);return e.setUint32(i,r+a),i}function F(e,t,n){var a=0;if(a=U(e,a,"moof",t),a=U(e,a+8,"traf",t),a=N(e,a+8,"trun"),1&e.getUint32(a+8)){
var i=a+16;e.setUint32(i,n)}return a}function B(e,t,n){var a=0;if(a=U(e,a,"moof",t),a=U(e,a+8,"traf",t),a=N(e,a+8,"trun"),1&e.getUint32(a+8)){var i=a+16,r=e.getUint32(i);e.setUint32(i,r+n)}return a}function z(e,t){var n=[0,0,0,20,116,102,100,116,1,0,0,0],a=n.length+8,i=new ArrayBuffer(e.byteLength+a),r=(new Uint8Array(e),new DataView(e)),s=new Uint8Array(i),o=new DataView(i),l=0;return j(r,8),l=B(r,a,a),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+a),i}function $(e,t,n,a,i){if(!i)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+a),o=a+2+6*s,r[u]=o,l+=o;return r}function V(e,t,n,r,s,o){return i(e,t,n,r,"mdat",function(e,t,n,i){return i=a(e,t,n,i,s),i=a(e,t,n,i,o)})}function H(e,t,n,r){return i(e,t,n,r,"saio",function(e,t,n,i){i=a(e,t,n,i,[0,0,0,0,0,0,0,1]);var r=i+4+8;return t.setUint32(i,r),i+=4})}function q(e,t,n,r,s,o,l,u){return i(e,t,n,r,"saiz",function(e,t,n,i){
return i=l?a(e,t,n,i,[0,0,0,0,0]):a(e,t,n,i,[0,0,0,0,u]),t.setUint32(i,s),i+=4,n.set(o,i),i+=o.length})}function W(e){var t=new DataView(e),n=0,a=0,i=0,r=t.getUint32(n);n=N(t,n+8,"traf"),n=N(t,n+8,"trun"),a=t.getUint32(n+12),n=N(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(a!==l)throw"Samples count does not match "+a+" "+l;var u=t.getUint32(n);i=u-32;var d=200,c=new ArrayBuffer(e.byteLength+d),f=new Uint8Array(c),p=new DataView(c);
f.set(new Uint8Array(e,0,n));var h=n,m=8,v=n+32,g=n+u,y=t.getUint32(g),b=$(t,v,a,m,o);if(h=q(null,p,f,h,a,b,o,m),h=H(null,p,f,h),o){for(var w=0,P=0;P<b.length;P++)w+=b[P];if(w!==i)throw"Samples size does not match "+w+" "+i}else if(m*a!==i)throw"Samples size does not match "+m*a+" "+i;var _=new Uint8Array(e,v,i),S=new Uint8Array(e,g+8,y-8),x=h-r,C=h;return h=V(null,p,f,h,_,S),F(p,x,C+8+i),new Uint8Array(c,0,h)}function K(e,t,n){var a=z(e,t);return n?W(a):new Uint8Array(a)}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=L,e.process_traf=K}(),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 a=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))};a.kMime='video/mp4; codecs="avc1.640028"',
a.kFlavorToSystem={clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.youtube.playready","com.microsoft.playready"]},a.prototype.init=function(e,t,n){this.chooseFlavor(a.kMime,e,t),this.isClearKey="clearkey"==this.flavor},a.prototype.destroy=function(){this.removeAllMediaEventListeners(),this.video=null},a.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.video.addEventListener(e,n),this.mediaEvents_[e]=n},a.prototype.removeMediaEventListener=function(e){
this.video.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.chooseFlavor=function(e,t,n){for(var i in t)if(!n||i==n){var r=a.kFlavorToSystem[i];if(r)for(var s in r)if(this.video.canPlayType(e,r[s]))return this.flavor=i,this.keySystem=r[s],void(this.licenseServerURL=t[i])}throw"Could not find a compatible key system"},a.prototype.extractBMFFClearKeyID=function(e){
var t=new ArrayBuffer(e.length),n=new Uint8Array(t);n.set(e);for(var a=new DataView(t),i=0;i<t.byteLength;){var r=a.getUint32(i,!1),s=a.getUint32(i+4,!1);if(1886614376!=s)throw"Box type "+s.toString(16)+' not equal to "pssh"';if(1477738184==a.getUint32(i+12,!1)&&69420633==a.getUint32(i+16,!1)&&2464609580==a.getUint32(i+20,!1)&&1558758348==a.getUint32(i+24,!1)){var o=a.getUint32(i+28,!1);if(16!=o)throw"Unexpected KID size "+o;return new Uint8Array(t.slice(i+32,i+32+o))}if(3991899049==a.getUint32(i+12,!1)&&2044086990==a.getUint32(i+16,!1)&&2747803612==a.getUint32(i+20,!1)&&3575456237==a.getUint32(i+24,!1))return new Uint8Array(t.slice(i+36,i+52));
i+=r}return e},a.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)},a.prototype.onKeyMessage=function(t){e.dlog(2,"onKeyMessage() Sending request: "+this.licenseServerURL+" "+t.sessionId);var n=this.initDataQueue.shift(),a=new XMLHttpRequest;
a.open("POST",this.licenseServerURL),a.setRequestHeader("content-type","text/xml;charset=utf-8"),a.addEventListener("load",this.onLoad.bind(this,n,t.sessionId)),a.responseType="arraybuffer",a.send(t.message)},a.prototype.onKeyError=function(t){e.dlog(2,"onKeyError("+t.keySystem+", "+t.errorCode.code+", "+t.systemCode+")")},a.prototype.onLoad=function(a,i,r){if(e.dlog(2,"onLoad("+this.licenseServerURL+"): "+i),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),a,i)},e.EMEManager=a}(),function(){var t=function(e,t,n,a,i,r,s){this.url=e,this.bandwidth=t,this.width=n,this.height=a,this.sps=i,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,a,i,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=a,this.resetReason=null,this.active=!0,this.type=i,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,a=this.representations_[this.currentRep].bandwidth,i=this.representations_[t].bandwidth;e.dlog(2,"bandwidthChange["+this.mime+"]: "+a+" "+i),n=a>i?"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),a=n&&n.end||0;if(null!==this.segIndex){
var i=this.representations_[this.currentRep].segs[this.segIndex].time;a=i>a?i:a}if(n){var r=Math.abs(n.end-a);r>.001&&e.dlog(2,"Difference in available data: "+n.end+" "+a)}return a-t},n.prototype.findSegmentIndexForTime=function(t){for(var n=this.representations_[this.currentRep].segs,a=0;a<n.length;a++){var i=n[a];if(i.time<=t&&i.time+i.duration>=t)return a==n.length-1&&i.time+i.duration+.5<t?null:a}return e.dlog(5,"Could not find segment for time "+t),null},n.prototype.identifyNextFragment=function(n){
var a=this.findRangeForPlaybackTime(n),i=a&&a.end||n;if(i>n+t.ENOUGH)return e.dlog(3,"Enough buffering currentTime in rage: "+this.mime+" "+n+"  "+i),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(i),null===this.segIndex)return this.active=!1,null;e.dlog(4,"New Index["+this.mime+"]: "+i+" "+this.segIndex)}else{null==a&&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 i},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,a=0;a<this.segmentQueue.length;a++)n+=this.segmentQueue[a].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,a=this.representations_[this.currentRep].segs[this.segIndex].time,i=a+this.representations_[this.currentRep].segs[this.segIndex].duration;e.dlog(4,"Appending Response ["+this.mime+"] : ["+a+","+i+"]"),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;var n;return n="/"==t[0]?e.match(/^[a-z]*:\/\/[^\/]*/)[0]:e.replace(/\/[^\/]*$/,"/"),n+t},t.prototype.displaySourceBuffers=function(t){for(var n=0;n<this.mediaSrc_.sourceBuffers.length;n++){
var a=this.mediaSrc_.sourceBuffers[n];e.dlog(5,t+" SourceBuffer["+a.mime+"]: "+a.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 a=null;if(null!=t.segmentList){a=t.segmentList.initialization,
n.segs=[];for(var i=0;i<t.segmentList.segmentURLs.length;i++){var r=t.segmentList.segmentURLs[i],s={start:r.mediaRange.start,end:r.mediaRange.end,index:r.indexRange&&r.indexRange.end||null,time:t.segmentList.durationSeconds*i,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;a=r.initialization,null!=r.indexRange&&(n.indexRequestData=r.indexRange)}n.segs=[s]}return this.type!==e.StreamingType.SMOOTH_STREAMING&&(n.initRequestData={start:a&&a.start||0,
end:a&&a.end||n.segs[0].index||null}),n},t.prototype.onSourceOpen=function(t,n,a){e.dlog(2,"onSourceOpen()");var i,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),i=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,i,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,a){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,a)),this.attachHandler_("webkitsourceopen",this.onSourceOpen.bind(this,n,a)),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 a in t){e=t[a];for(var i=0;i<e.length;i++)n.removeEventListener(a,e[i]);e.length=0}},e.MediaSourceManager=t}(),function(){var t=0,n=1,a=function(e){if(null==e)throw new Error("A url for the manifest is required");this.url_=e,this.callback_=null,this.manifest_=null};a.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")},a.prototype.getManifest=function(){return this.manifest_},a.prototype.manifestType_=function(){return this.url_.lastIndexOf(".mpd")!=-1?t:n},a.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()},a.prototype.onManifestError_=function(t){var n="Error retrieving manifest from "+this.url_;
return e.log(n),this.callback_(n)},a.prototype.onManifestLoad_=function(a){e.dlog(2,"Manifest received");var i=null;if(a.target.status<200||a.target.status>299)return i="HTTP error "+a.target.status+" retrieving manifest from "+this.url_,e.log(i),this.callback_(i);switch(this.manifestType_()){case t:this.manifest_=e.parseDASHManifest(a.target.responseText,this.url_);break;case n:this.manifest_=e.parseSSManifest(a.target.responseText,this.url_)}return null===this.manifest_?(i="Error parsing the manifest",
e.log(i),this.callback_(i)):this.callback_(i,this.manifest_)},e.ManifestLoader=a}(),function(){var t=.99,n=.98,a=5e5,i=5e5,r=function(e,t,n){this.bitrates_=e,this.levelCount_=this.bitrates_.length,this.algorithm_=t||"adaptive",this.cooldownPeriod_=2,n&&(this.level_=parseInt(n))};r.prototype.onBandwithTracking=function(r){var s=r.target;if(null!=s.lastTime&&r.timeStamp!=s.lastTime){var o=8e3*(r.loaded-s.lastSize)/(r.timeStamp-s.lastTime);a=t*a+(1-t)*o,i=n*i+(1-n)*o}s.lastTime=r.timeStamp,s.lastSize=r.loaded,
e.dlog(5,"Calculated bandwidth: "+a+" "+i)},r.prototype.adapt=function(t){if(!this.bitrates_||this.bitrates_.length<=1)return-1;var n=-1;if("fixed"===this.algorithm_)n=this.level_;else if("random"===this.algorithm_)Math.random()>.5&&(n=Math.floor(Math.random()*this.levelCount_));else if("adaptive"===this.algorithm_)if(this.cooldownPeriod_)this.cooldownPeriod_--;else{var r=0,s=0,o=.85,l=Math.min(a,i);e.dlog(5,"Calculated Bandwidth: "+l+" globalSlowBandwidth: "+a+" globalFastBandwidth: "+i);for(var u=0;u<this.bitrates_.length;u++){
var d=this.bitrates_[u];d>r&&d<o*l-128e3&&(r=d,s=u)}if(s!==t)return e.dlog(2,"Selected new rate "+r+" for bandwidth "+l+" (from "+a+", "+i+")"),this.cooldownPeriod_=8,s}return t!==n&&n!==-1?(e.dlog(2,"Selected new bitrate level: "+n),n):-1},e.AdaptiveManager=r}(),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){return this.fragmentRequest_!==t.target?void e.log("Received error of untracked XHR."):(e.log("Received error of XHR."),void(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)return n.status>=300?void e.log("HTTP Request failure, status="+n.status):(n.is_index&&(e.dlog(2,"Index Response"),this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs=e.parseSIDX(n.response,n.startByte)),n.is_init?(e.dlog(2,"Init Response"),this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(n.response),void(this.mediaSrcMgr_.isInitialized(this.bufferIndex_)||this.appendInit())):void 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_),a=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,i=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).bandwidth,r=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[n].timeURL;if(a=a.replace("{bitrate}",i),a=a.replace("{start time}",r),t.open("GET",a),
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==a)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="+a),t},t.prototype.makeXHR=function(t){var n,a,i=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,a=s.initRequestData.end,null!=s.indexRequestData&&(a=s.indexRequestData.end,u=!0)):(n=l.offset,a=l.offset+l.size-1);var d=null;null!=n&&null!=a&&(d="bytes="+n+"-"+a);var c=!!/youtube.com/.exec(o);if(d&&c&&(o=o.replace(/&range=[^&]*/,""),o+="&range="+d.substring(6)),i.open("GET",o),i.responseType="arraybuffer",i.startByte=n,null==d||c||i.setRequestHeader("Range",d),
i.addEventListener("load",this.onXHRLoad.bind(this)),null==o)throw"Null URL";return i.is_init=t,i.is_index=u,i.lastTime=null,i.lastSize=null,i.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),i.send(),e.dlog(2,"Sent XHR: url="+o+", range="+d),i},t.prototype.findRangeForPlaybackTime=function(e,t){for(var n=e.buffered,a=0;a<n.length;a++)if(n.start(a)<=t&&n.end(a)>=t)return{start:n.start(a),end:n.end(a)}},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},a=e.createSSInit(n);
return this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(a.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 a=-1;this.mediaSrcMgr_.mime(this.bufferIndex_).indexOf("video")>=0&&(a=this.adaptiveManager_.adapt(this.mediaSrcMgr_.getLevel(this.bufferIndex_))),a>=0?(this.cancelRequests(),this.mediaSrcMgr_.changeQuality(this.bufferIndex_,a)):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"],a=0;a<n.length;a++){var i=t(n[a]);e[n[a]]=i}if(e&&e.url)for(var r in e)e.hasOwnProperty(r)&&(this.options[r]=e[r])}var a={Audio_Type:"audio",Video_Type:"video",Image_Type:"img",MSE_Type:"mse"},i=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};i.prototype.destroy=function(){return this.destroyed_?void e.log("Refusing to destroy a second time"):(this.removeAllMediaEventListeners(),
this.mediaElementType_!==a.Image_Type&&this.mediaElement_.pause(),this.mediaElementType_===a.MSE_Type&&this.stopProgressTimer(),this.mediaSrcMgr_&&this.mediaSrcMgr_.destroy(),delete e.player,delete this.mediaElement_,delete this.imageElement_,void(this.destroyed_=!0))},i.prototype.getMediaElement=function(){return this.mediaElement_},i.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},i.prototype.onPlay=function(t){e.log("Playing"),this.mediaElement_.autopause_pending=!1,this.mediaElement_.autopaused=!1,this.mediaElement_.autopause_time=null},i.prototype.onError=function(t){e.log("Error ("+this.mediaElement_.error.code+")")},i.prototype.cancelRequests=function(){for(var e=0;e<this.fragmentManagers_.length;e++)this.fragmentManagers_[e].cancelRequests()},i.prototype.onSeeking=function(t){e.log("Seeking"),this.cancelRequests(),this.mediaSrcMgr_.resetAll("seeking");
},i.prototype.onSeeked=function(t){e.log("Seeked")},i.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 a=!1,i=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&&(a=!0);
}else i++;return i>0?void(i===this.fragmentManagers_.length&&this.mediaSrcMgr_.endOfStream()):void(this.mediaElement_.paused?this.mediaElement_.autopaused&&s===this.fragmentManagers_.length&&(e.dlog(2,"Autoresuming"),this.mediaElement_.play()):a&&(e.dlog(2,"Autopausing"),this.mediaElement_.autopause_pending=!0,this.mediaElement_.pause()))},i.prototype.createMediaElement=function(){var t=document.getElementById("mediaElement");this.mediaElement_=document.createElement(a.Video_Type),this.imageElement_=document.createElement(a.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")},i.prototype.showMediaElement=function(t){var n=document.getElementById("mediaElement");this.mediaElementType_===a.MSE_Type&&(this.removeMediaEventListener("seeking"),this.removeMediaEventListener("seeked"),
this.removeMediaEventListener("pause"),this.removeMediaEventListener("play"),this.removeMediaEventListener("error"),t!==a.MSE_Type&&(this.stopProgressTimer(),this.mediaSrcMgr_.destroy(),this.mediaSrcMgr_=new e.MediaSourceManager)),this.mediaElementType_!==a.Image_Type&&(this.mediaElement_.play(0),this.mediaElement_.pause());var i=n.children;if(i&&i.length>0)for(var r=0;r<i.length;r++)"VIDEO"===i[r].nodeName&&t!==a.Image_Type?i[r].style.display="block":"IMG"===i[r].nodeName&&t===a.Image_Type?i[r].style.display="block":(i[r].style.display="none",
i[r].src=null);this.mediaElementType_=t},i.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.mediaElement_.addEventListener(e,n),this.mediaEvents_[e]=n},i.prototype.removeMediaEventListener=function(e){this.mediaElement_.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.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"},i.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))},i.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,a=e[0].end,i=[],r=0;r<e.length;r++){var s=new TextTrackCue(e[r].start,e[r].end,e[r].caption);if(n===e[r].start&&a===e[r].end&&i.push(s),n!==e[r].start||a!==e[r].end||r===e.length-1){for(var o=i.length-1;o>=0;o--)t.addCue(i[o]);
i.length=0,n=e[r].start,a=e[r].end,r<e.length&&i.push(s)}}},i.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()},
i.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))},i.prototype.stopProgressTimer=function(){null!==this.progressTimer_&&(e.dlog(2,"Deregistering progress timer"),window.clearInterval(this.progressTimer_),this.progressTimer_=null)},i.prototype.startProgressTimer=function(){
null===this.progressTimer_&&(e.dlog(2,"Starting progress timer"),this.progressTimer_=setInterval(this.onProgress.bind(this),250))},i.prototype.initializeSimplePlayer=function(e,t){e!==a.Image_Type?(this.mediaElement_.src=t,this.mediaElement_.play()):this.imageElement_.src=t},i.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()},i.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))},i.prototype.getMediaType=function(t){var n=t.length;if(n<5)return e.log("Error invalid url"),null;var i=t.substring(t.length-4,t.length);switch(i){case".webm":case".mkv":case".mp4":return a.Video_Type;
case".mp3":return a.Audio_Type;case".jpg":return a.Image_Type;case".mpd":return a.MSE_Type;default:return a.MSE_Type}},i.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===a.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=i}(),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,a,i){return function(){var r,o;if(i)n(e);else{try{if((r=e.responseXML)&&(o=r.firstChild,r.lastChild&&"parsererror"===r.lastChild.nodeName))return void(a&&a("Invalid XML"))}catch(l){}if(r&&o)return n(e);(r=s.parseXML(e.responseText))&&r.firstChild?(e=s.extend({},e,{responseXML:r}),n(e)):a&&a(e.responseText?"Invalid XML":t)}}}var a=document,i=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=a.location.href),s.exists(e)){var n;if(s.exists(e)){n=e.indexOf("://");var i=e.indexOf("?");n=0<n&&(0>i||i>n)}else n=void 0;if(n)return e;n=t.substring(0,t.indexOf("://")+3);var r,i=t.substring(n.length,t.indexOf("/",n.length+1));0===e.indexOf("/")?r=e.split("/"):(r=t.split("?")[0],r=r.substring(n.length+i.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+i+"/"+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(a){}});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){a.cookie="jwplayer."+e+"="+t+"; path=/"},s.getCookies=function(){for(var e={},t=a.cookie.split("; "),n=0;n<t.length;n++){var i=t[n].split("=");0===i[0].indexOf("jwplayer.")&&(e[i[0].substring(9,i[0].length)]=i[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 a=s.extend({},n);if(t!=e.events.JWPLAYER_FULLSCREEN||a.fullscreen)if("object"==typeof a.data){var i=a.data;delete a.data,a=s.extend(a,i)}else"object"==typeof a.metadata&&s.deepReplaceKeyName(a.metadata,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]);else a.fullscreen="true"==a.message,delete a.message;return s.foreach(["position","duration","offset"],function(e,t){
a[t]&&(a[t]=Math.round(1e3*a[t])/1e3)}),a},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(n){}if("undefined"!=typeof i.ActiveXObject)try{if(e=new i.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseInt(e.GetVariable("$version").split(" ")[1].split(",")[0],10)}catch(a){}return 0},s.getScriptPath=function(e){for(var t=a.getElementsByTagName("script"),n=0;n<t.length;n++){
var i=t[n].src;if(i&&0<=i.indexOf(e))return i.substr(0,i.indexOf(e))}return""},s.deepReplaceKeyName=function(t,n,a){switch(e.utils.typeOf(t)){case"array":for(var i=0;i<t.length;i++)t[i]=e.utils.deepReplaceKeyName(t[i],n,a);break;case"object":s.foreach(t,function(i,r){var s;if(n instanceof Array&&a instanceof Array){if(n.length!=a.length)return;s=n}else s=[n];for(var o=i,l=0;l<s.length;l++)o=o.replace(RegExp(n[l],"g"),a[l]);t[o]=e.utils.deepReplaceKeyName(r,n,a),i!=o&&delete t[i]})}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(t){return""}},s.isRtmp=function(e,t){return 0===e.indexOf("rtmp")||"rtmp"==t},s.foreach=function(e,t){var n,a;for(n in e)"function"==s.typeOf(e.hasOwnProperty)?e.hasOwnProperty(n)&&(a=e[n],t(n,a)):(a=e[n],t(n,a))},s.isHTTPS=function(){return 0===i.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(n){}return t},s.ajax=function(e,t,a,r){var o;if(0<e.indexOf("#")&&(e=e.replace(/#.*$/,"")),e&&0<=e.indexOf("://")&&e.split("/")[2]!=i.location.href.split("/")[2]&&s.exists(i.XDomainRequest))o=new i.XDomainRequest,o.onload=n(o,e,t,a,r),o.ontimeout=o.onprogress=function(){},o.timeout=5e3;else{if(!s.exists(i.XMLHttpRequest))return a&&a(),o;var l=o=new i.XMLHttpRequest,u=e;o.onreadystatechange=function(){if(4===l.readyState)switch(l.status){case 200:n(l,u,t,a,r)();break;case 404:a("File not found");
}}}return o.overrideMimeType&&o.overrideMimeType("text/xml"),o.onerror=function(){a("Error loading file")},setTimeout(function(){try{o.open("GET",e,!0),o.send()}catch(t){a&&a(e)}},0),o},s.parseXML=function(e){var t;try{if(i.DOMParser){if(t=(new i.DOMParser).parseFromString(e,"text/xml"),t.childNodes&&t.childNodes.length&&"parsererror"==t.childNodes[0].firstChild.nodeName)return}else t=new i.ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)}catch(n){return}return t},s.filterPlaylist=function(e,t){
var n,a,i,r,o=[];for(n=0;n<e.length;n++)if(a=s.extend({},e[n]),a.sources=s.filterSources(a.sources),0<a.sources.length){for(i=0;i<a.sources.length;i++)r=a.sources[i],r.label||(r.label=i.toString());o.push(a)}if(t&&0===o.length)for(n=0;n<e.length;n++)if(a=s.extend({},e[n]),a.sources=s.filterSources(a.sources,!0),0<a.sources.length){for(i=0;i<a.sources.length;i++)r=a.sources[i],r.label||(r.label=i.toString());o.push(a)}return o},s.filterSources=function(t,n){var a,i,r=s.extensionmap;if(t){i=[];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)&&(a||(a=l),l==a&&i.push(s.extend({},t[o]))):s.canPlayHTML5(l)&&(a||(a=l),l==a&&i.push(s.extend({},t[o])))}}return i},s.canPlayHTML5=function(t){return(!s.isAndroid()||"hls"!=t&&"m3u"!=t&&"m3u8"!=t)&&(t=s.extensionmap.types[t],!!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,a={mp4:t+"mp4",vorbis:"audio/ogg",ogg:t+"ogg",webm:t+"webm",aac:"audio/mp4",mp3:"audio/mpeg",hls:"application/vnd.apple.mpegurl"},i={mp4:a.mp4,f4v:a.mp4,m4v:a.mp4,mov:a.mp4,m4a:a.aac,
f4a:a.aac,aac:a.aac,mp3:a.mp3,ogv:a.ogg,ogg:a.vorbis,oga:a.vorbis,webm:a.webm,m3u8:a.hls,hls:a.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(i,function(e,t){r[e]={html5:t}}),n(t,function(e,t){r[e]||(r[e]={}),r[e].flash=t}),r.types=a,r.mimeType=function(e){var t;return n(a,function(n,a){!t&&a==e&&(t=n)}),t},r.extType=function(e){return r.mimeType(i[e])}}(jwplayer.utils),function(e){var t=e.loaderstatus={NEW:0,LOADING:1,
ERROR:2,COMPLETE:3},n=document;e.scriptloader=function(a){function i(){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[a];if(!l||l.getStatus()!=t.NEW&&l.getStatus()!=t.LOADING){if(e.scriptloader.loaders[a]=this,s==t.NEW){s=t.LOADING;var u=n.createElement("script");u.addEventListener?(u.onload=r,u.onerror=i):u.readyState&&(u.onreadystatechange=function(){
("loaded"==u.readyState||"complete"==u.readyState)&&r()}),n.getElementsByTagName("head")[0].appendChild(u),u.src=a}}else l.addEventListener(o.ERROR,i),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(a){function i(e){
e.type==n?(l=!0,d=s(f.DRAG_START,e)):e.type==t?l&&(c||(r(f.DRAG_START,e,d),c=!0),r(f.DRAG,e)):(l&&(c?r(f.DRAG_END,e):(e.cancelBubble=!0,r(f.TAP,e))),l=c=!1,d=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 a=o.getBoundingClientRect(),n={type:e,target:o,
x:n.pageX-window.pageXOffset-a.left,y:n.pageY,deltaX:0,deltaY:0};return e!=f.TAP&&d&&(n.deltaX=n.x-d.x,n.deltaY=n.y-d.y),n}var o=a,l=!1,u={},d=null,c=!1,f=e.touchEvents;return document.addEventListener(t,i),document.addEventListener("touchend",function(e){l&&c&&r(f.DRAG_END,e),l=c=!1,d=null}),document.addEventListener("touchcancel",i),a.addEventListener(n,i),a.addEventListener("touchend",i),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,a,i;this.edition=function(){return i&&i.getTime()<(new Date).getTime()?"invalid":n},this.token=function(){return a},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)?(a=r[1],r[2]&&0<parseInt(r[2])&&(i=new Date,i.setTime(String(r[2])))):n="invalid":n="free";
}catch(s){n="invalid"}}}(jwplayer.utils),function(e){var t=e.tea={};t.encrypt=function(e,i){if(0==e.length)return"";var r=t.strToLongs(a.encode(e));1>=r.length&&(r[1]=0);for(var s,o=t.strToLongs(a.encode(i).slice(0,16)),l=r.length,u=r[l-1],d=r[0],c=Math.floor(6+52/l),f=0;0<c--;){f+=2654435769,s=f>>>2&3;for(var p=0;p<l;p++)d=r[(p+1)%l],u=(u>>>5^d<<2)+(d>>>3^u<<4)^(f^d)+(o[3&p^s]^u),u=r[p]+=u}return r=t.longsToStr(r),n.encode(r)},t.decrypt=function(e,i){if(0==e.length)return"";for(var r,s=t.strToLongs(n.decode(e)),o=t.strToLongs(a.encode(i).slice(0,16)),l=s.length,u=s[l-1],d=s[0],c=2654435769*Math.floor(6+52/l);0!=c;){
r=c>>>2&3;for(var f=l-1;0<=f;f--)u=s[0<f?f-1:l-1],u=(u>>>5^d<<2)+(d>>>3^u<<4)^(c^d)+(o[3&f^r]^u),d=s[f]-=u;c-=2654435769}return s=t.longsToStr(s),s=s.replace(/\0+$/,""),a.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 i,r,s,o,l,u,d=[],c="",f=n.code;if(u=("undefined"==typeof t?0:t)?a.encode(e):e,l=u.length%3,0<l)for(;3>l++;)c+="=",u+="\0";for(l=0;l<u.length;l+=3)i=u.charCodeAt(l),r=u.charCodeAt(l+1),s=u.charCodeAt(l+2),o=i<<16|r<<8|s,i=o>>18&63,r=o>>12&63,s=o>>6&63,o&=63,d[l/3]=f.charAt(i)+f.charAt(r)+f.charAt(s)+f.charAt(o);return d=d.join(""),d=d.slice(0,d.length-c.length)+c},decode:function(e,t){
t="undefined"!=typeof t&&t;var i,r,s,o,l,u,d=[],c=n.code;u=t?a.decode(e):e;for(var f=0;f<u.length;f+=4)i=c.indexOf(u.charAt(f)),r=c.indexOf(u.charAt(f+1)),o=c.indexOf(u.charAt(f+2)),l=c.indexOf(u.charAt(f+3)),s=i<<18|r<<12|o<<6|l,i=s>>>16&255,r=s>>>8&255,s&=255,d[f/4]=String.fromCharCode(i,r,s),64==l&&(d[f/4]=String.fromCharCode(i,r)),64==o&&(d[f/4]=String.fromCharCode(i));return o=d.join(""),t?a.decode(o):o}},a={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,a){function i(e,n,a){if(e)for(var i=0;i<e.length;i++){var r=e[i];if(r){null!==r.count&&0===--r.count&&delete e[i];
try{r.listener(n)}catch(s){t.log('Error handling "'+a+'" event listener ['+i+"]: "+s.toString(),r.listener,n)}}}}var r,s;this.resetEventListeners=function(){r={},s=[]},this.resetEventListeners(),this.addEventListener=function(e,n,a){try{t.exists(r[e])||(r[e]=[]),"string"==t.typeOf(n)&&(n=new Function("return "+n)()),r[e].push({listener:n,count:a||null})}catch(i){t.log("error",i)}return!1},this.removeEventListener=function(e,n){if(r[e]){try{for(var a=0;a<r[e].length;a++)if(r[e][a].listener.toString()==n.toString()){
r[e].splice(a,1);break}}catch(i){t.log("error",i)}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(a){t.log("error",a)}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(a){t.log("error",a)}return!1}},this.sendEvent=function(o,l){t.exists(l)||(l={}),t.extend(l,{id:n,version:e.version,type:o}),a&&t.log(o,l),i(r[o],l,o),
i(s,l,o)}}}(window.jwplayer),function(e){var t={},n={};e.plugins=function(){},e.plugins.loadPlugins=function(a,i){return n[a]=new e.plugins.pluginloader(new e.plugins.model(t),i),n[a]},e.plugins.registerPlugin=function(n,a,i,r){var s=e.utils.getPluginName(n);t[s]||(t[s]=new e.plugins.plugin(n)),t[s].registerPlugin(n,a,i,r)}}(jwplayer),function(e){e.plugins.model=function(t){this.addPlugin=function(n){var a=e.utils.getPluginName(n);return t[a]||(t[a]=new e.plugins.plugin(n)),t[a]},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(a){function i(){switch(t.getPluginPathType(a)){case t.pluginPathType.ABSOLUTE:return a;case t.pluginPathType.RELATIVE:return t.getAbsolutePath(a,window.location.href)}}function r(){d=setTimeout(function(){c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE)},1e3)}function s(){c=t.loaderstatus.ERROR,f.sendEvent(n.ERROR)}var o,l,u,d,c=t.loaderstatus.NEW,f=new n.eventdispatcher;
t.extend(this,f),this.load=function(){if(c==t.loaderstatus.NEW)if(0<a.lastIndexOf(".swf"))o=a,c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE);else if(t.getPluginPathType(a)==t.pluginPathType.CDN)c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE);else{c=t.loaderstatus.LOADING;var e=new t.scriptloader(i());e.addEventListener(n.COMPLETE,r),e.addEventListener(n.ERROR,s),e.load()}},this.registerPlugin=function(e,a,i,r){d&&(clearTimeout(d),d=void 0),u=a,i&&r?(o=r,l=i):"string"==typeof i?o=i:"function"==typeof i?l=i:!i&&!r&&(o=e),
c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE)},this.getStatus=function(){return c},this.getPluginName=function(){return t.getPluginName(a)},this.getFlashPath=function(){if(o)switch(t.getPluginPathType(o)){case t.pluginPathType.ABSOLUTE:return o;case t.pluginPathType.RELATIVE:return 0<a.lastIndexOf(".swf")?t.getAbsolutePath(o,window.location.href):t.getAbsolutePath(o,i())}return null},this.getJS=function(){return l},this.getTarget=function(){return u},this.getPluginmode=function(){return"undefined"!=typeof o&&"undefined"!=typeof l?e.pluginmodes.HYBRID:"undefined"!=typeof o?e.pluginmodes.FLASH:"undefined"!=typeof l?e.pluginmodes.JAVASCRIPT:void 0;
},this.getNewInstance=function(e,t,n){return new l(e,t,n)},this.getURL=function(){return a}}}(jwplayer.plugins),function(e){var t=e.utils,n=e.events,a=t.foreach;e.plugins.pluginloader=function(i,r){function s(){c?p.sendEvent(n.ERROR,{message:l}):d||(d=!0,u=t.loaderstatus.COMPLETE,p.sendEvent(n.COMPLETE))}function o(){if(f||s(),!d&&!c){var n=0,a=i.getPlugins();t.foreach(f,function(i){i=t.getPluginName(i);var r=a[i];i=r.getJS();var o=r.getTarget(),r=r.getStatus();r==t.loaderstatus.LOADING||r==t.loaderstatus.NEW?n++:i&&(!o||parseFloat(o)>parseFloat(e.version))&&(c=!0,
l="Incompatible player version",s())}),0==n&&s()}}var l,u=t.loaderstatus.NEW,d=!1,c=!1,f=r,p=new n.eventdispatcher;t.extend(this,p),this.setupPlugins=function(e,n,r){var s={length:0,plugins:{}},o=0,l={},u=i.getPlugins();return a(n.plugins,function(a,i){var d=t.getPluginName(a),c=u[d],f=c.getFlashPath(),p=c.getJS(),h=c.getURL();f&&(s.plugins[f]=t.extend({},i),s.plugins[f].pluginmode=c.getPluginmode(),s.length++);try{if(p&&n.plugins&&n.plugins[h]){var m=document.createElement("div");m.id=e.id+"_"+d,
m.style.position="absolute",m.style.top=0,m.style.zIndex=o+10,l[d]=c.getNewInstance(e,t.extend({},n.plugins[h]),m),o++,e.onReady(r(l[d],m,!0)),e.onResize(r(l[d],m))}}catch(v){t.log("ERROR: Failed to load "+d+".")}}),e.plugins=l,s},this.load=function(){if(!t.exists(r)||"object"==t.typeOf(r)){u=t.loaderstatus.LOADING,a(r,function(e){t.exists(e)&&(e=i.addPlugin(e),e.addEventListener(n.COMPLETE,o),e.addEventListener(n.ERROR,h))});var e=i.getPlugins();a(e,function(e,t){t.load()})}o()};var h=this.pluginFailed=function(){
c||(c=!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,a){
for(var i=[],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 a.sources,i.push({file:s(l,"file"),"default":s(l,"default"),label:s(l,"label"),type:s(l,"type")})):"track"==u?(delete a.tracks,r.push({file:s(l,"file"),"default":s(l,"default"),kind:s(l,"kind"),label:s(l,"label")})):(a[u]=e.utils.serialize(t.textContent(l)),"file"==u&&a.sources&&delete a.sources)}a.file||(a.file=a.link)}if(i.length)for(a.sources=[],
o=0;o<i.length;o++)0<i[o].file.length&&(i[o].default="true"==i[o].default,i[o].label.length||delete i[o].label,a.sources.push(i[o]));if(r.length)for(a.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,a.tracks.push(r[o]));return a}}(jwplayer),function(e){var t=jwplayer.utils,n=t.xmlAttribute,a=e.localName,i=e.textContent,r=e.numChildren,s=e.mediaparser=function(){};s.parseGroup=function(e,o){
var l,u,d=[];for(u=0;u<r(e);u++)if(l=e.childNodes[u],"media"==l.prefix&&a(l))switch(a(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=i(l);break;case"description":o.description=i(l);break;case"guid":o.mediaid=i(l);break;case"thumbnail":o.image||(o.image=n(l,"url"));break;case"group":
s.parseGroup(l,o);break;case"subtitle":var c={};if(c.file=n(l,"url"),c.kind="captions",0<n(l,"lang").length){var f=c;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,f.label=l}d.push(c)}for(o.hasOwnProperty("tracks")||(o.tracks=[]),u=0;u<d.length;u++)o.tracks.push(d[u]);return o}}(jwplayer.parsers),function(e){function t(t){for(var i={},r=0;r<t.childNodes.length;r++){var o=t.childNodes[r],l=s(o);
if(l)switch(l.toLowerCase()){case"enclosure":i.file=n.xmlAttribute(o,"url");break;case"title":i.title=a(o);break;case"guid":i.mediaid=a(o);break;case"pubdate":i.date=a(o);break;case"description":i.description=a(o);break;case"link":i.link=a(o);break;case"category":i.tags=i.tags?i.tags+a(o):a(o)}}return i=e.mediaparser.parseGroup(t,i),i=e.jwparser.parseEntry(t,i),new jwplayer.playlist.item(i)}var n=jwplayer.utils,a=e.textContent,i=e.getChildNode,r=e.numChildren,s=e.localName;e.rssparser={},e.rssparser.parse=function(e){
for(var n=[],a=0;a<r(e);a++){var o=i(e,a);if("channel"==s(o).toLowerCase())for(var l=0;l<r(o);l++){var u=i(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 a=0;a<t.length;a++)n.push(new e.playlist.item(t[a]));else n.push(new e.playlist.item(t));return n}}(jwplayer),function(e){var t=e.item=function(n){var a=jwplayer.utils,i=a.extend({},t.defaults,n);i.tracks=n&&a.exists(n.tracks)?n.tracks:[],
0==i.sources.length&&(i.sources=[new e.source(i)]);for(var r=0;r<i.sources.length;r++){var s=i.sources[r].default;i.sources[r].default=!!s&&"true"==s.toString(),i.sources[r]=new e.source(i.sources[r])}if(i.captions&&!a.exists(n.tracks)){for(n=0;n<i.captions.length;n++)i.tracks.push(i.captions[n]);delete i.captions}for(r=0;r<i.tracks.length;r++)i.tracks[r]=new e.track(i.tracks[r]);return i};t.defaults={description:"",image:"",mediaid:"",title:"",sources:[],tracks:[]}}(jwplayer.playlist),function(e){
var t=jwplayer,n=t.utils,a=t.events,i=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"==i.localName(t)&&(t=t.nextSibling),"rss"!=i.localName(t))s("Not a valid RSS feed");else{var l=new e(i.rssparser.parse(t));o.sendEvent(a.JWPLAYER_PLAYLIST_LOADED,{playlist:l})}}catch(u){s()}}function r(e){s(e.match(/invalid/i)?"Not a valid RSS feed":"")}function s(e){o.sendEvent(a.JWPLAYER_ERROR,{message:e?e:"Error loading file"
})}var o=new a.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 a=t.extend({},n);return t.foreach(n,function(n){t.exists(e[n])&&(a[n]=e[n],delete e[n])}),a.type&&0<a.type.indexOf("/")&&(a.type=t.extensionmap.mimeType(a.type)),"m3u8"==a.type&&(a.type="hls"),"smil"==a.type&&(a.type="rtmp"),a}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={
file:void 0,label:void 0,kind:"captions","default":!1};e.track=function(e){var a=t.extend({},n);return e||(e={}),t.foreach(n,function(n){t.exists(e[n])&&(a[n]=e[n],delete e[n])}),a}}(jwplayer.playlist),function(e){function t(e,t,a){var i=e.style;i.backgroundColor="#000",i.color="#FFF",i.width=n.styleDimension(a.width),i.height=n.styleDimension(a.height),i.display="table",i.opacity=1,a=document.createElement("p"),i=a.style,i.verticalAlign="middle",i.textAlign="center",i.display="table-cell",i.font="15px/20px Arial, Helvetica, sans-serif",
a.innerHTML=t.replace(":",":<br>"),e.innerHTML="",e.appendChild(a)}var n=e.utils,a=e.events,i=!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 d(){if(!C)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(!x)if("string"==n.typeOf(b.playlist)){var t=new e.playlist.loader;t.addEventListener(a.JWPLAYER_PLAYLIST_LOADED,function(e){
b.playlist=e.playlist,x=r,d()}),t.addEventListener(a.JWPLAYER_ERROR,function(e){x=r,p(e)}),x=i,t.load(b.playlist)}else if(S.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),f=new o[b.modes[t].type](v,b.modes[t],s,S,l);if(f.supportsConfig())return f.addEventListener(a.ERROR,c),f.embed(),u(l,s.events),l}var m;b.fallback?(m="No suitable players found and fallback enabled",T=setTimeout(function(){h(m,i)},10),n.log(m),new o.download(v,b,p)):(m="No suitable players found and fallback disabled",
h(m,r),n.log(m),v.parentNode.replaceChild(y,v))}}function c(e){m(_+e.message)}function f(e){m("Could not load plugins: "+e.message)}function p(e){m(e&&e.message?"Error loading playlist: "+e.message:_+"No playable sources found")}function h(e,t){T&&(clearTimeout(T),T=null),T=setTimeout(function(){T=null,l.dispatchEvent(a.JWPLAYER_SETUP_ERROR,{message:e,fallback:t})},0)}function m(e){C||(b.fallback?(C=i,t(v,e,b),h(e,i)):h(e,r))}var v,g,y,b=new o.config(l.config),w=b.width,P=b.height,_="Error loading player: ",S=e.plugins.loadPlugins(l.id,b.plugins),x=r,C=r,T=null;
return b.fallbackDiv&&(y=b.fallbackDiv,delete b.fallbackDiv),b.id=l.id,g=s.getElementById(l.id),b.aspectratio?l.config.aspectratio=b.aspectratio:delete l.config.aspectratio,v=s.createElement("div"),v.id=g.id,v.style.width=0<w.toString().indexOf("%")?w:w+"px",v.style.height=0<P.toString().indexOf("%")?P:P+"px",g.parentNode.replaceChild(v,g),this.embed=function(){C||(S.addEventListener(a.COMPLETE,d),S.addEventListener(a.ERROR,f),S.load())},this.errorScreen=m,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 i(e.playlist[t]);else{var r={};a.foreach(i.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 i(r)]}}function n(e,t,n){a.exists(e[n])&&(t[n]=e[n],delete e[n])}var a=e.utils,i=e.playlist.item;(e.embed.config=function(n){var i={fallback:!0,height:270,primary:"html5",width:480,base:n.base?n.base:a.getScriptPath("jwplayer.js"),
aspectratio:""};n=a.extend(i,e.defaults,n);var i={type:"html5",src:n.base+"jwplayer.html5.js"},r={type:"flash",src:n.base+"jwplayer.flash.swf"};if(n.modes="flash"==n.primary?[r,i]:[i,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&&(i.src=n.html5player),t(n),r=n.aspectratio,"string"==typeof r&&a.exists(r)){var s=r.indexOf(":");-1==s?i=0:(i=parseFloat(r.substr(0,s)),r=parseFloat(r.substr(s+1)),
i=0>=i||0>=r?0:100*(r/i)+"%")}else i=0;return-1==n.width.toString().indexOf("%")?delete n.aspectratio:i?n.aspectratio=i:delete n.aspectratio,n}).addConfig=function(e,n){return t(n),a.extend(e,n)}}(jwplayer),function(e){var t=e.utils,n=document;e.embed.download=function(e,a,i){function r(e,a){for(var i=n.querySelectorAll(e),r=0;r<i.length;r++)t.foreach(a,function(e,t){i[r].style[e]=t})}function s(e,t,a){return e=n.createElement(e),t&&(e.className="jwdownload"+t),a&&a.appendChild(e),e}var o,l=t.extend({},a),u=l.width?l.width:480,d=l.height?l.height:320;
a=a.logo?a.logo:{prefix:t.repo(),file:"logo.png",margin:10};var c,f,p,h,l=l.playlist,m=["mp4","aac","mp3"];if(l&&l.length){for(h=l[0],o=h.sources,l=0;l<o.length;l++){var v=o[l],g=v.type?v.type:t.extensionmap.extType(t.extension(v.file));v.file&&t.foreach(m,function(e){g==m[e]?(c=v.file,f=h.image):t.isYouTube(v.file)&&(p=v.file)})}c?(o=c,i=f,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,d)),background:"black center no-repeat "+(i?"url("+i+")":""),backgroundSize:"contain",position:"relative",border:"none",display:"block"}),r(l+"display div",{position:"absolute",width:"100%",height:"100%"}),r(l+"logo",{top:a.margin+"px",right:a.margin+"px",background:"top right no-repeat url("+a.prefix+a.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?(a=p,e=s("iframe","",e),e.src="http://www.youtube.com/embed/"+t.youTubeID(a),e.width=u,e.height=d,e.style.border="none"):i()}}}(jwplayer),function(e){var t=e.utils,n=e.events,a={};(e.embed.flash=function(r,s,o,l,u){function d(e,t,n){var a=document.createElement("param");a.setAttribute("name",t),a.setAttribute("value",n),e.appendChild(a)}function c(e,t,n){return function(){try{n&&document.getElementById(u.id+"_wrapper").appendChild(t);var a=document.getElementById(u.id).getPluginConfig("display");
"function"==typeof e.resize&&e.resize(a.width,a.height),t.style.left=a.x,t.style.top=a.h}catch(i){}}}function f(e){if(!e)return{};var n={},a=[];return t.foreach(e,function(e,i){var r=t.getPluginName(e);a.push(e),t.foreach(i,function(e,t){n[r+"."+e]=t})}),n.plugins=a.join(","),n}var p=new e.events.eventdispatcher,h=t.flashVersion();t.extend(this,p),this.embed=function(){if(o.id=u.id,10>h)return p.sendEvent(n.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;var e,i,m=u.config.listbar,v=t.extend({},o);
if(r.id+"_wrapper"==r.parentNode.id)e=document.getElementById(r.id+"_wrapper");else{if(e=document.createElement("div"),i=document.createElement("div"),i.style.display="none",i.id=r.id+"_aspect",e.id=r.id+"_wrapper",e.style.position="relative",e.style.display="block",e.style.width=t.styleDimension(v.width),e.style.height=t.styleDimension(v.height),u.config.aspectratio){var g=parseFloat(u.config.aspectratio);i.style.display="block",i.style.marginTop=u.config.aspectratio,e.style.height="auto",e.style.display="inline-block",
m&&("bottom"==m.position?i.style.paddingBottom=m.size+"px":"right"==m.position&&(i.style.marginBottom=-1*m.size*(g/100)+"px"))}r.parentNode.replaceChild(e,r),e.appendChild(r),e.appendChild(i)}for(e=l.setupPlugins(u,v,c),0<e.length?t.extend(v,f(e.plugins)):delete v.plugins,"undefined"!=typeof v["dock.position"]&&"false"==v["dock.position"].toString().toLowerCase()&&(v.dock=v["dock.position"],delete v["dock.position"]),e=v.wmode?v.wmode:v.height&&40>=v.height?"transparent":"opaque",i="height width modes events primary base fallback volume".split(" "),
m=0;m<i.length;m++)delete v[i[m]];i=t.getCookies(),t.foreach(i,function(e,t){"undefined"==typeof v[e]&&(v[e]=t)}),i=window.location.href.split("/"),i.splice(i.length-1,1),i=i.join("/"),v.base=i+"/",a[r.id]=v,t.isIE()?(i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" " width="100%" height="100%"id="'+r.id+'" name="'+r.id+'" tabindex=0"">',i+='<param name="movie" value="'+s.src+'">',i+='<param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always">',i+='<param name="seamlesstabbing" value="true">',
i+='<param name="wmode" value="'+e+'">',i+='<param name="bgcolor" value="#000000">',i+="</object>",r.outerHTML=i,e=document.getElementById(r.id)):(i=document.createElement("object"),i.setAttribute("type","application/x-shockwave-flash"),i.setAttribute("data",s.src),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("bgcolor","#000000"),i.setAttribute("id",r.id),i.setAttribute("name",r.id),i.setAttribute("tabindex",0),d(i,"allowfullscreen","true"),d(i,"allowscriptaccess","always"),
d(i,"seamlesstabbing","true"),d(i,"wmode",e),r.parentNode.replaceChild(i,r),e=i),u.config.aspectratio&&(e.style.position="absolute"),u.container=e,u.setPlayer(e,"flash")},this.supportsConfig=function(){if(h){if(!o)return!0;if("string"==t.typeOf(o.playlist))return!0;try{var e=o.playlist[0].sources;if("undefined"==typeof e)return!0;for(var n=0;n<e.length;n++)if(e[n].file&&i(e[n].file,e[n].type))return!0}catch(a){}}return!1}}).getVars=function(e){return a[e]};var i=e.embed.flashCanPlay=function(e,n){
if(t.isYouTube(e)||t.isRtmp(e,n)||"hls"==n)return!0;var a=t.extensionmap[n?n:t.extension(e)];return!!a&&!!a.flash}}(jwplayer),function(e){var t=e.utils,n=t.extensionmap,a=e.events;e.embed.html5=function(i,r,s,o,l){function u(e,t,n){return function(){try{var a=document.querySelector("#"+i.id+" .jwmain");n&&a.appendChild(t),"function"==typeof e.resize&&(e.resize(a.clientWidth,a.clientHeight),setTimeout(function(){e.resize(a.clientWidth,a.clientHeight)},400)),t.left=a.style.left,t.top=a.style.top}catch(r){}
}}function d(e){c.sendEvent(e.type,{message:"HTML5 player not found"})}var c=this,f=new a.eventdispatcher;t.extend(c,f),c.embed=function(){if(e.html5){o.setupPlugins(l,s,u),i.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(a.ERROR,d),n.addEventListener(a.COMPLETE,c.embed),n.load()},c.supportsConfig=function(){if(e.vid.canPlayType)try{if("string"==t.typeOf(s.playlist))return!0;
for(var a=s.playlist[0].sources,i=0;i<a.length;i++){var r,o=a[i].file,l=a[i].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,d=n[l?l:t.extension(o)];if(!d||d.flash&&!d.html5)u=!1;else{var c=d.html5,f=e.vid;if(c)try{u=!!f.canPlayType(c)}catch(p){u=!1}else u=!0}r=u}if(r)return!0}}catch(h){}return!1}}}(jwplayer),function(e){var t=e.embed,n=e.utils,a=/\.(js|swf)$/;e.embed=n.extend(function(i){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,i.config),d=i.config,c=u.plugins,f=u.analytics,p=o+"jwpsrv.js",h=o+"sharing.js",m=o+"related.js",v=o+"gapro.js",l=e.key?e.key:l.key,g=new e.utils.key(l).edition(),c=c?c:{};switch("ads"==g&&u.advertising&&(a.test(u.advertising.client)?c[u.advertising.client]=u.advertising:c[o+u.advertising.client+".js"]=u.advertising),delete d.advertising,d.key=l,u.analytics&&a.test(u.analytics.client)&&(p=u.analytics.client),
delete d.analytics,f&&"ads"!==g&&delete f.enabled,"free"!=g&&f&&!1===f.enabled||(c[p]=f?f:{}),delete c.sharing,delete c.related,g){case"ads":if(d.sitecatalyst)try{window.s&&window.s.hasOwnProperty("Media")?new e.embed.sitecatalyst(i):r()}catch(y){r()}case"premium":u.related&&(a.test(u.related.client)&&(m=u.related.client),c[m]=u.related),u.ga&&(a.test(u.ga.client)&&(v=u.ga.client),c[v]=u.ga);case"pro":u.sharing&&(a.test(u.sharing.client)&&(h=u.sharing.client),c[h]=u.sharing),u.skin&&(d.skin=u.skin.replace(/^(beelden|bekle|five|glow|modieus|roundster|stormtrooper|vapor)$/i,n.repo()+"skins/$1.xml"));
}return d.plugins=c,i.config=d,i=new t(i),s&&i.errorScreen(s),i},e.embed)}(jwplayer),function(e){var t=jwplayer.utils;e.sitecatalyst=function(e){function n(e){f.debug&&t.log(e)}function a(e){return e=e.split("/"),e=e[e.length-1],e=e.split("?"),e[0]}function i(){if(!h){h=!0;var e=c.getPosition();n("stop: "+o+" : "+e),s.Media.stop(o,e)}}function r(){m||(i(),m=!0,n("close: "+o),s.Media.close(o),d=!0,u=0)}var o,l,u,d,c=e,f=t.extend({},c.config.sitecatalyst),p={onPlay:function(){if(!d){var e=c.getPosition();
h=!1,n("play: "+o+" : "+e),s.Media.play(o,e)}},onPause:i,onBuffer:i,onIdle:r,onPlaylistItem:function(e){try{d=!0,r(),u=0;var n;if(f.mediaName)n=f.mediaName;else{var i=c.getPlaylistItem(e.index);n=i.title?i.title:i.file?a(i.file):i.sources&&i.sources.length?a(i.sources[0].file):""}o=n,l=f.playerName?f.playerName:c.id}catch(s){t.log(s)}},onTime:function(){if(d){var e=c.getDuration();if(-1==e)return;m=h=d=!1,n("open: "+o+" : "+e+" : "+l),s.Media.open(o,e,l),n("play: "+o+" : 0"),s.Media.play(o,0)}if(e=c.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},h=!0,m=!0;t.foreach(p,function(e){c[e](p[e])})}}(jwplayer.embed),function(e,t){var n=[],a=e.utils,i=e.events,r=i.state,s=document,o=e.api=function(n){function l(e,t){return function(n){return t(e,n)}}function u(e,t){return g[e]||(g[e]=[],c(i.JWPLAYER_PLAYER_STATE,function(t){var n=t.newstate;if(t=t.oldstate,n==e){var a=g[n];if(a)for(var i=0;i<a.length;i++){
var r=a[i];"function"==typeof r&&r.call(this,{oldstate:t,newstate:n})}}})),g[e].push(t),m}function d(e,t){try{e.jwAddEventListener(t,'function(dat) { jwplayer("'+m.id+'").dispatchEvent("'+t+'", dat); }')}catch(n){a.log("Could not add internal listener")}}function c(e,t){return v[e]||(v[e]=[],p&&y&&d(p,e)),v[e].push(t),m}function f(){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,h,m=this,v={},g={},y=!1,b=[],w={},P={};m.container=n,m.id=n.id,m.getBuffer=function(){return f("jwGetBuffer")},m.getContainer=function(){return m.container},m.addButton=function(e,t,n,i){try{P[i]=n,f("jwDockAddButton",e,t,"jwplayer('"+m.id+"').callback('"+i+"')",i)}catch(r){a.log("Could not add dock button"+r.message);
}},m.removeButton=function(e){f("jwDockRemoveButton",e)},m.callback=function(e){P[e]&&P[e]()},m.forceState=function(e){return f("jwForceState",e),m},m.releaseState=function(){return f("jwReleaseState")},m.getDuration=function(){return f("jwGetDuration")},m.getFullscreen=function(){return f("jwGetFullscreen")},m.getHeight=function(){return f("jwGetHeight")},m.getLockState=function(){return f("jwGetLockState")},m.getMeta=function(){return m.getItemMeta()},m.getMute=function(){return f("jwGetMute")},
m.getPlaylist=function(){var e=f("jwGetPlaylist");return"flash"==m.renderingMode&&a.deepReplaceKeyName(e,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),e},m.getPlaylistItem=function(e){return a.exists(e)||(e=m.getPlaylistIndex()),m.getPlaylist()[e]},m.getPlaylistIndex=function(){return f("jwGetPlaylistIndex")},m.getPosition=function(){return f("jwGetPosition")},m.getRenderingMode=function(){return m.renderingMode},m.getState=function(){return f("jwGetState")},m.getVolume=function(){
return f("jwGetVolume")},m.getWidth=function(){return f("jwGetWidth")},m.setFullscreen=function(e){return a.exists(e)?f("jwSetFullscreen",e):f("jwSetFullscreen",!f("jwGetFullscreen")),m},m.setMute=function(e){return a.exists(e)?f("jwSetMute",e):f("jwSetMute",!f("jwGetMute")),m},m.lock=function(){return m},m.unlock=function(){return m},m.load=function(e){return f("jwLoad",e),m},m.playlistItem=function(e){return f("jwPlaylistItem",parseInt(e,10)),m},m.playlistPrev=function(){return f("jwPlaylistPrev"),
m},m.playlistNext=function(){return f("jwPlaylistNext"),m},m.resize=function(e,t){if("flash"!==m.renderingMode)f("jwResize",e,t);else{var n=s.getElementById(m.id+"_wrapper"),i=s.getElementById(m.id+"_aspect");i&&(i.style.display="none"),n&&(n.style.display="block",n.style.width=a.styleDimension(e),n.style.height=a.styleDimension(t))}return m},m.play=function(e){return e===t?(e=m.getState(),f(e==r.PLAYING||e==r.BUFFERING?"jwPause":"jwPlay")):f("jwPlay",e),m},m.pause=function(e){return e===t?(e=m.getState(),
f(e==r.PLAYING||e==r.BUFFERING?"jwPause":"jwPlay")):f("jwPause",e),m},m.stop=function(){return f("jwStop"),m},m.seek=function(e){return f("jwSeek",e),m},m.setVolume=function(e){return f("jwSetVolume",e),m},m.createInstream=function(){return new o.instream(this,p)},m.setInstream=function(e){return h=e},m.loadInstream=function(e,t){return h=m.setInstream(m.createInstream()).init(t),h.loadItem(e),h},m.getQualityLevels=function(){return f("jwGetQualityLevels")},m.getCurrentQuality=function(){return f("jwGetCurrentQuality");
},m.setCurrentQuality=function(e){f("jwSetCurrentQuality",e)},m.getCaptionsList=function(){return f("jwGetCaptionsList")},m.getCurrentCaptions=function(){return f("jwGetCurrentCaptions")},m.setCurrentCaptions=function(e){f("jwSetCurrentCaptions",e)},m.getControls=function(){return f("jwGetControls")},m.getSafeRegion=function(){return f("jwGetSafeRegion")},m.setControls=function(e){f("jwSetControls",e)},m.destroyPlayer=function(){f("jwPlayerDestroy")},m.playAd=function(t){var n=e(m.id).plugins;n.vast&&n.vast.jwPlayAd(t);
},m.pauseAd=function(){var t=e(m.id).plugins;t.vast?t.vast.jwPauseAd():f("jwPauseAd")};var _={onBufferChange:i.JWPLAYER_MEDIA_BUFFER,onBufferFull:i.JWPLAYER_MEDIA_BUFFER_FULL,onError:i.JWPLAYER_ERROR,onSetupError:i.JWPLAYER_SETUP_ERROR,onFullscreen:i.JWPLAYER_FULLSCREEN,onMeta:i.JWPLAYER_MEDIA_META,onMute:i.JWPLAYER_MEDIA_MUTE,onPlaylist:i.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:i.JWPLAYER_PLAYLIST_ITEM,onPlaylistComplete:i.JWPLAYER_PLAYLIST_COMPLETE,onReady:i.API_READY,onResize:i.JWPLAYER_RESIZE,
onComplete:i.JWPLAYER_MEDIA_COMPLETE,onSeek:i.JWPLAYER_MEDIA_SEEK,onTime:i.JWPLAYER_MEDIA_TIME,onVolume:i.JWPLAYER_MEDIA_VOLUME,onBeforePlay:i.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:i.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:i.JWPLAYER_DISPLAY_CLICK,onControls:i.JWPLAYER_CONTROLS,onQualityLevels:i.JWPLAYER_MEDIA_LEVELS,onQualityChange:i.JWPLAYER_MEDIA_LEVEL_CHANGED,onCaptionsList:i.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:i.JWPLAYER_CAPTIONS_CHANGED,onAdError:i.JWPLAYER_AD_ERROR,onAdClick:i.JWPLAYER_AD_CLICK,
onAdImpression:i.JWPLAYER_AD_IMPRESSION,onAdTime:i.JWPLAYER_AD_TIME,onAdComplete:i.JWPLAYER_AD_COMPLETE,onAdCompanions:i.JWPLAYER_AD_COMPANIONS,onAdSkipped:i.JWPLAYER_AD_SKIPPED};a.foreach(_,function(e){m[e]=l(_[e],c)});var S={onBuffer:r.BUFFERING,onPause:r.PAUSED,onPlay:r.PLAYING,onIdle:r.IDLE};return a.foreach(S,function(e){m[e]=l(S[e],u)}),m.remove=function(){if(!y)throw"Cannot call remove() before player is ready";b=[],o.destroyPlayer(this.id)},m.setup=function(t){if(e.embed){var n=s.getElementById(m.id);
return n&&(t.fallbackDiv=n),n=m,b=[],o.destroyPlayer(n.id),n=e(m.id),n.config=t,new e.embed(n).embed(),n}return m},m.registerPlugin=function(t,n,a,i){e.plugins.registerPlugin(t,n,a,i)},m.setPlayer=function(e,t){p=e,m.renderingMode=t},m.detachMedia=function(){if("html5"==m.renderingMode)return f("jwDetachMedia")},m.attachMedia=function(e){if("html5"==m.renderingMode)return f("jwAttachMedia",e)},m.removeEventListener=function(e,t){var n=v[e];if(n)for(var a=n.length;a--;)n[a]===t&&n.splice(a,1)},m.dispatchEvent=function(e,t){
var n=v[e];if(n)for(var n=n.slice(0),r=a.translateEventResponse(e,t),s=0;s<n.length;s++){var o=n[s];if("function"==typeof o)try{e===i.JWPLAYER_PLAYLIST_LOADED&&a.deepReplaceKeyName(r.playlist,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),o.call(this,r)}catch(l){a.log("There was an error calling back an event handler")}}},m.dispatchInstreamEvent=function(e){h&&h.dispatchEvent(e,arguments)},m.callInternal=f,m.playerReady=function(e){for(y=!0,p||m.setPlayer(s.getElementById(e.id)),
m.container=s.getElementById(m.id),a.foreach(v,function(e){d(p,e)}),c(i.JWPLAYER_PLAYLIST_ITEM,function(){w={}}),c(i.JWPLAYER_MEDIA_META,function(e){a.extend(w,e.metadata)}),m.dispatchEvent(i.API_READY);0<b.length;)f.apply(this,b.shift())},m.getItemMeta=function(){return w},m.isBeforePlay=function(){return f("jwIsBeforePlay")},m.isBeforeComplete=function(){return f("jwIsBeforeComplete")},m};o.selectPlayer=function(e){var t;return a.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,i=-1,r=0;r<n.length;r++)n[r].id==e&&(i=r,t=n[r]);return 0<=i&&(e=t.id,r=s.getElementById(e+("flash"==t.renderingMode?"_wrapper":"")),a.clearCss&&a.clearCss("#"+e),r&&("html5"==t.renderingMode&&t.destroyPlayer(),
t=s.createElement("div"),t.id=e,r.parentNode.replaceChild(t,r)),n.splice(i,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,a=t.state;e.api.instream=function(e,i){function r(t,n){return u[t]||(u[t]=[],i.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+e.id+'").dispatchInstreamEvent("'+t+'", dat); }')),u[t].push(n),this}function s(e,n){return d[e]||(d[e]=[],r(t.JWPLAYER_PLAYER_STATE,function(t){
var n=t.newstate,a=t.oldstate;if(n==e){var i=d[n];if(i)for(var r=0;r<i.length;r++){var s=i[r];"function"==typeof s&&s.call(this,{oldstate:a,newstate:n,type:t.type})}}})),d[e].push(n),this}var o,l,u={},d={},c=this;c.type="instream",c.init=function(){return e.callInternal("jwInitInstream"),c},c.loadItem=function(t,a){o=t,l=a||{},"array"==n.typeOf(t)?e.callInternal("jwLoadArrayInstream",o,l):e.callInternal("jwLoadItemInstream",o,l)},c.removeEvents=function(){u=d={}},c.removeEventListener=function(e,t){
var n=u[e];if(n)for(var a=n.length;a--;)n[a]===t&&n.splice(a,1)},c.dispatchEvent=function(e,t){var a=u[e];if(a)for(var a=a.slice(0),i=n.translateEventResponse(e,t[1]),r=0;r<a.length;r++){var s=a[r];"function"==typeof s&&s.call(this,i)}},c.onError=function(e){return r(t.JWPLAYER_ERROR,e)},c.onMediaError=function(e){return r(t.JWPLAYER_MEDIA_ERROR,e)},c.onFullscreen=function(e){return r(t.JWPLAYER_FULLSCREEN,e)},c.onMeta=function(e){return r(t.JWPLAYER_MEDIA_META,e)},c.onMute=function(e){return r(t.JWPLAYER_MEDIA_MUTE,e);
},c.onComplete=function(e){return r(t.JWPLAYER_MEDIA_COMPLETE,e)},c.onPlaylistComplete=function(e){return r(t.JWPLAYER_PLAYLIST_COMPLETE,e)},c.onPlaylistItem=function(e){return r(t.JWPLAYER_PLAYLIST_ITEM,e)},c.onTime=function(e){return r(t.JWPLAYER_MEDIA_TIME,e)},c.onBuffer=function(e){return s(a.BUFFERING,e)},c.onPause=function(e){return s(a.PAUSED,e)},c.onPlay=function(e){return s(a.PLAYING,e)},c.onIdle=function(e){return s(a.IDLE,e)},c.onClick=function(e){return r(t.JWPLAYER_INSTREAM_CLICK,e)},
c.onInstreamDestroyed=function(e){return r(t.JWPLAYER_INSTREAM_DESTROYED,e)},c.onAdSkipped=function(e){return r(t.JWPLAYER_AD_SKIPPED,e)},c.play=function(e){i.jwInstreamPlay(e)},c.pause=function(e){i.jwInstreamPause(e)},c.hide=function(){e.callInternal("jwInstreamHide")},c.destroy=function(){c.removeEvents(),e.callInternal("jwInstreamDestroy")},c.setText=function(e){i.jwInstreamSetText(e?e:"")},c.getState=function(){return i.jwInstreamState()},c.setClick=function(e){i.jwInstreamClick&&i.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,a){e.plugins.registerPlugin(t,n,a)}}}}(jwplayer)),e.exports=jwplayer},function(e,t){var n=function(){function e(){if(!H){try{var e=j.getElementsByTagName("body")[0].appendChild(g("span"));e.parentNode.removeChild(e)}catch(t){return}H=!0;for(var n=B.length,a=0;a<n;a++)B[a]()}}function t(e){H?e():B[B.length]=e}function a(e){if(typeof N.addEventListener!=M)N.addEventListener("load",e,!1);else if(typeof j.addEventListener!=M)j.addEventListener("load",e,!1);else if(typeof N.attachEvent!=M)y(N,"onload",e);else if("function"==typeof N.onload){
var t=N.onload;N.onload=function(){t(),e()}}else N.onload=e}function i(){F?r():s()}function r(){var e=j.getElementsByTagName("body")[0],t=g(A);t.setAttribute("type",D);var n=e.appendChild(t);if(n){var a=0;!function(){if(typeof n.GetVariable!=M){var i=n.GetVariable("$version");i&&(i=i.split(" ")[1].split(","),K.pv=[parseInt(i[0],10),parseInt(i[1],10),parseInt(i[2],10)])}else if(a<10)return a++,void setTimeout(arguments.callee,10);e.removeChild(t),n=null,s()}()}else s()}function s(){var e=z.length;if(e>0)for(var t=0;t<e;t++){
var n=z[t].id,a=z[t].callbackFn,i={success:!1,id:n};if(K.pv[0]>0){var r=v(n);if(r)if(!b(z[t].swfVersion)||K.wk&&K.wk<312)if(z[t].expressInstall&&l()){var s={};s.data=z[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 c={},f=r.getElementsByTagName("param"),p=f.length,h=0;h<p;h++)"movie"!=f[h].getAttribute("name").toLowerCase()&&(c[f[h].getAttribute("name")]=f[h].getAttribute("value"));
u(s,c,n,a)}else d(r),a&&a(i);else P(n,!0),a&&(i.success=!0,i.ref=o(n),a(i))}else if(P(n,!0),a){var m=o(n);m&&typeof m.SetVariable!=M&&(i.success=!0,i.ref=m),a(i)}}}function o(e){var t=null,n=v(e);if(n&&"OBJECT"==n.nodeName)if(typeof n.SetVariable!=M)t=n;else{var a=n.getElementsByTagName(A)[0];a&&(t=a)}return t}function l(){return!q&&b("6.0.65")&&(K.win||K.mac)&&!(K.wk&&K.wk<312)}function u(e,t,n,a){q=!0,C=a||null,T={success:!1,id:n};var i=v(n);if(i){"OBJECT"==i.nodeName?(S=c(i),x=null):(S=i,x=n),
e.id=R,(typeof e.width==M||!/%$/.test(e.width)&&parseInt(e.width,10)<310)&&(e.width="310"),(typeof e.height==M||!/%$/.test(e.height)&&parseInt(e.height,10)<137)&&(e.height="137"),j.title=j.title.slice(0,47)+" - Flash Player Installation";var r=K.ie&&K.win?"ActiveX":"PlugIn",s="MMredirectURL="+N.location.toString().replace(/&/g,"%26")+"&MMplayerType="+r+"&MMdoctitle="+j.title;if(typeof t.flashvars!=M?t.flashvars+="&"+s:t.flashvars=s,K.ie&&K.win&&4!=i.readyState){var o=g("div");n+="SWFObjectNew",o.setAttribute("id",n),
i.parentNode.insertBefore(o,i),i.style.display="none",function(){4==i.readyState?i.parentNode.removeChild(i):setTimeout(arguments.callee,10)}()}f(e,t,n)}}function d(e){if(K.ie&&K.win&&4!=e.readyState){var t=g("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(c(e),t),e.style.display="none",function(){4==e.readyState?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(c(e),e)}function c(e){var t=g("div");if(K.win&&K.ie)t.innerHTML=e.innerHTML;else{
var n=e.getElementsByTagName(A)[0];if(n){var a=n.childNodes;if(a)for(var i=a.length,r=0;r<i;r++)1==a[r].nodeType&&"PARAM"==a[r].nodeName||8==a[r].nodeType||t.appendChild(a[r].cloneNode(!0))}}return t}function f(e,t,n){var a,i=v(n);if(K.wk&&K.wk<312)return a;if(i)if(typeof e.id==M&&(e.id=n),K.ie&&K.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]+'" />');i.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+r+">"+o+"</object>",$[$.length]=e.id,a=v(e.id)}else{var u=g(A);u.setAttribute("type",D);for(var d in e)e[d]!=Object.prototype[d]&&("styleclass"==d.toLowerCase()?u.setAttribute("class",e[d]):"classid"!=d.toLowerCase()&&u.setAttribute(d,e[d]));for(var c in t)t[c]!=Object.prototype[c]&&"movie"!=c.toLowerCase()&&p(u,c,t[c]);i.parentNode.replaceChild(u,i),
a=u}return a}function p(e,t,n){var a=g("param");a.setAttribute("name",t),a.setAttribute("value",n),e.appendChild(a)}function h(e){var t=v(e);t&&"OBJECT"==t.nodeName&&(K.ie&&K.win?(t.style.display="none",function(){4==t.readyState?m(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function m(e){var t=v(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function v(e){var t=null;try{t=j.getElementById(e)}catch(n){}return t}function g(e){return j.createElement(e);
}function y(e,t,n){e.attachEvent(t,n),V[V.length]=[e,t,n]}function b(e){var t=K.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 w(e,t,n,a){if(!K.ie||!K.mac){var i=j.getElementsByTagName("head")[0];if(i){var r=n&&"string"==typeof n?n:"screen";if(a&&(k=null,I=null),!k||I!=r){var s=g("style");s.setAttribute("type","text/css"),s.setAttribute("media",r),k=i.appendChild(s),K.ie&&K.win&&typeof j.styleSheets!=M&&j.styleSheets.length>0&&(k=j.styleSheets[j.styleSheets.length-1]),
I=r}K.ie&&K.win?k&&typeof k.addRule==A&&k.addRule(e,t):k&&typeof j.createTextNode!=M&&k.appendChild(j.createTextNode(e+" {"+t+"}"))}}}function P(e,t){if(W){var n=t?"visible":"hidden";H&&v(e)?v(e).style.visibility=n:w("#"+e,"visibility:"+n)}}function _(e){var t=/[\\\"<>\.;]/,n=null!=t.exec(e);return n&&typeof encodeURIComponent!=M?encodeURIComponent(e):e}var S,x,C,T,k,I,M="undefined",A="object",E="Shockwave Flash",O="ShockwaveFlash.ShockwaveFlash",D="application/x-shockwave-flash",R="SWFObjectExprInst",L="onreadystatechange",N=window,j=document,U=navigator,F=!1,B=[i],z=[],$=[],V=[],H=!1,q=!1,W=!0,K=function(){
var e=typeof j.getElementById!=M&&typeof j.getElementsByTagName!=M&&typeof j.createElement!=M,t=U.userAgent.toLowerCase(),n=U.platform.toLowerCase(),a=n?/win/.test(n):/win/.test(t),i=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 U.plugins!=M&&typeof U.plugins[E]==A)l=U.plugins[E].description,!l||typeof U.mimeTypes!=M&&U.mimeTypes[D]&&!U.mimeTypes[D].enabledPlugin||(F=!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 N.ActiveXObject!=M)try{var u=new ActiveXObject(O);u&&(l=u.GetVariable("$version"),l&&(s=!0,l=l.split(" ")[1].split(","),o=[parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)]))}catch(d){}return{w3:e,pv:o,wk:r,ie:s,win:a,mac:i}}();(function(){K.w3&&((typeof j.readyState!=M&&"complete"==j.readyState||typeof j.readyState==M&&(j.getElementsByTagName("body")[0]||j.body))&&e(),
H||(typeof j.addEventListener!=M&&j.addEventListener("DOMContentLoaded",e,!1),K.ie&&K.win&&(j.attachEvent(L,function(){"complete"==j.readyState&&(j.detachEvent(L,arguments.callee),e())}),N==top&&!function(){if(!H){try{j.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,0)}e()}}()),K.wk&&!function(){if(!H)return/loaded|complete/.test(j.readyState)?void e():void setTimeout(arguments.callee,0)}(),a(e)))})(),function(){K.ie&&K.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 a=$.length,i=0;i<a;i++)h($[i]);for(var r in K)K[r]=null;K=null;for(var s in n)n[s]=null;n=null})}();return{registerObject:function(e,t,n,a){if(K.w3&&e&&t){var i={};i.id=e,i.swfVersion=t,i.expressInstall=n,i.callbackFn=a,z[z.length]=i,P(e,!1)}else a&&a({success:!1,id:e})},getObjectById:function(e){if(K.w3)return o(e)},embedSWF:function(e,n,a,i,r,s,o,d,c,p){var h={success:!1,id:n};K.w3&&!(K.wk&&K.wk<312)&&e&&n&&a&&i&&r?(P(n,!1),
t(function(){a+="",i+="";var t={};if(c&&typeof c===A)for(var m in c)t[m]=c[m];t.data=e,t.width=a,t.height=i;var v={};if(d&&typeof d===A)for(var g in d)v[g]=d[g];if(o&&typeof o===A)for(var y in o)typeof v.flashvars!=M?v.flashvars+="&"+y+"="+o[y]:v.flashvars=y+"="+o[y];if(b(r)){var w=f(t,v,n);t.id==n&&P(n,!0),h.success=!0,h.ref=w}else{if(s&&l())return t.data=s,void u(t,v,n,p);P(n,!0)}p&&p(h)})):p&&p(h)},switchOffAutoHideShow:function(){W=!1},ua:K,getFlashPlayerVersion:function(){return{major:K.pv[0],
minor:K.pv[1],release:K.pv[2]}},hasFlashPlayerVersion:b,createSWF:function(e,t,n){return K.w3?f(e,t,n):void 0},showExpressInstall:function(e,t,n,a){K.w3&&l()&&u(e,t,n,a)},removeSWF:function(e){K.w3&&h(e)},createCSS:function(e,t,n,a){K.w3&&w(e,t,n,a)},addDomLoadEvent:t,addLoadEvent:a,getQueryParamValue:function(e){var t=j.location.search||j.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return _(t);for(var n=t.split("&"),a=0;a<n.length;a++)if(n[a].substring(0,n[a].indexOf("="))==e)return _(n[a].substring(n[a].indexOf("=")+1));
}return""},expressInstallCallback:function(){if(q){var e=v(R);e&&S&&(e.parentNode.replaceChild(S,e),x&&(P(x,!0),K.ie&&K.win&&(S.style.display="block")),C&&C(T)),q=!1}}}}();e.exports=n},function(e,t){},function(e,t){e.exports={container:"Measure-container-1oSok",scrollContainer:"Measure-scrollContainer-XDXhZ",expandContent:"Measure-expandContent-2j6fO",shrinkContent:"Measure-shrinkContent-1ZPYn Measure-expandContent-2j6fO"}},function(e,t){e.exports={cell:"virtualized-cell-2SrtX",isMoving:"virtualized-isMoving-2370q"
}},function(e,t){e.exports={wrapper:"ReactPageView-wrapper-2bkJO",sidebarContainer:"ReactPageView-sidebarContainer-2epZQ",pageContainer:"ReactPageView-pageContainer-3zNQy"}},function(e,t){e.exports={page:"PhotoAlbumDetailsView-page-ssOMe"}},function(e,t){e.exports={anagram:"Anagram-anagram-39ajt"}},function(e,t){e.exports={badge:"Badge-badge-3ZQoD",isHidden:"Badge-isHidden-3yWIV","default":"Badge-default-112l0",primary:"Badge-primary-3bxe7",success:"Badge-success-3y0xB",danger:"Badge-danger-1rqm4"
}},function(e,t){e.exports={contents:"CollapsibleText-contents-DLstZ",divider:"CollapsibleText-divider-3kXr4",toggle:"CollapsibleText-toggle-3axSt"}},function(e,t){e.exports={disclosureArrow:"DisclosureArrow-disclosureArrow-4Pa5f","default":"DisclosureArrow-default-298Tb",primary:"DisclosureArrow-primary-VQCL_",success:"DisclosureArrow-success-1Q1Xh",danger:"DisclosureArrow-danger-2rmeZ",small:"DisclosureArrow-small-3wfHo",up:"DisclosureArrow-up-1lliy",down:"DisclosureArrow-down-10vJj",right:"DisclosureArrow-right-3eHYd",
left:"DisclosureArrow-left-32B9y",medium:"DisclosureArrow-medium-1-SCw",large:"DisclosureArrow-large-3ef1m",isSelected:"DisclosureArrow-isSelected-1Nyvd"}},function(e,t){e.exports={plexPassIcon:"PlexPassBadge-plexPassIcon-3MIvo"}},function(e,t){e.exports={scroller:"Scroller-scroller-116Av",none:"Scroller-none-3S1mG",vertical:"Scroller-vertical-2IRDv",auto:"Scroller-auto-3EJeK",horizontal:"Scroller-horizontal-3NpG8",omni:"Scroller-omni-1qlEj"}},function(e,t){e.exports={slider:"Slider-slider-K8cT9",
thumb:"Slider-thumb-TqUXp Link-link-5rkZv",isDragging:"Slider-isDragging-2HSnI",hasAutoHideThumb:"Slider-hasAutoHideThumb-1z9FD",track:"Slider-track-2AXv0 absoluteCenter-absoluteCenter-1jDHd",fill:"Slider-fill-1bnYC"}},function(e,t){e.exports={spinner:"Spinner-spinner-3jChT spin-spin-2Djb5",spinnerContainer:"Spinner-spinnerContainer-17f1b",spinnerLabel:"Spinner-spinnerLabel-2oFjm",small:"Spinner-small-2xeXE Spinner-spinner-3jChT spin-spin-2Djb5",medium:"Spinner-medium-wiHhv Spinner-spinner-3jChT spin-spin-2Djb5",
large:"Spinner-large-1YoJp Spinner-spinner-3jChT spin-spin-2Djb5"}},function(e,t){e.exports={button:"Button-button-1kwns Link-link-5rkZv","default":"Button-default-nIbzg",primary:"Button-primary-1_XVl",success:"Button-success-3nLyc",danger:"Button-danger-2L1CF",small:"Button-small-2uQB7",medium:"Button-medium-1khNu",large:"Button-large-1MXVD"}},function(e,t){e.exports={button:"DisclosureArrowButton-button-2Qja4"}},function(e,t){e.exports={link:"Link-link-5rkZv","default":"Link-default-2S6gV",primary:"Link-primary-2CG6h",
success:"Link-success-10Cqv",danger:"Link-danger-3Epdw",small:"Link-small-ULtPk",medium:"Link-medium-SskbP",large:"Link-large-2-nFd",isSelected:"Link-isSelected-2qunu"}},function(e,t){e.exports={playButton:"PlayButton-playButton-1iAGl",playCircle:"PlayButton-playCircle-2IY6H absoluteCenter-absoluteCenter-1jDHd",playIcon:"PlayButton-playIcon-330_d"}},function(e,t){e.exports={button:"SpinnerButton-button-2t-EU Button-button-1kwns Link-link-5rkZv",spinnerContainer:"SpinnerButton-spinnerContainer-37JWu",
spinner:"SpinnerButton-spinner-2tJTD Spinner-spinner-3jChT spin-spin-2Djb5",label:"SpinnerButton-label-3P3t2",isSpinning:"SpinnerButton-isSpinning-cBo4-"}},function(e,t){e.exports={input:"CheckInput-input-2wxri",label:"CheckInput-label-2zld0",small:"CheckInput-small-1rBSn",large:"CheckInput-large-2IIVa",hasError:"CheckInput-hasError-1UXbV"}},function(e,t){e.exports={group:"FormGroup-group-gcQ0L"}},function(e,t){e.exports={label:"FormLabel-label-2QnAc",hasError:"FormLabel-hasError-3o2nr"}},function(e,t){
e.exports={sectionError:"FormSectionError-sectionError-G9Rg2",sectionErrorIcon:"FormSectionError-sectionErrorIcon-QN8n6",sectionErrorDismiss:"FormSectionError-sectionErrorDismiss-1aZ_N"}},function(e,t){e.exports={input:"SelectInput-input-OUVuX input-input-32LMp",small:"SelectInput-small-17RcF input-small-3PwyU",select:"SelectInput-select-3C9iH",large:"SelectInput-large-35kOG input-large-bubXx",hasError:"SelectInput-hasError-2W9GF"}},function(e,t){e.exports={input:"TextInput-input-35bjh input-input-32LMp",
small:"TextInput-small-3i-3x input-small-3PwyU",large:"TextInput-large-38nqp input-large-bubXx",hasError:"TextInput-hasError-2F31e"}},function(e,t){e.exports={avatar:"AvatarImg-avatar-3xJy6"}},function(e,t){e.exports={imageContainer:"PosterCardImg-imageContainer-1kk64 cover-cover-2a-ek"}},function(e,t){e.exports={scroller:"VirtualListScroller-scroller-2EIJt"}},function(e,t){e.exports={menuPortal:"Menu-menuPortal-20t-X",menu:"Menu-menu-2EjwW",enter:"Menu-enter-tjdPQ",enterActive:"Menu-enterActive-1Mqj3",
leave:"Menu-leave-1w8JO",leaveActive:"Menu-leaveActive-1aZlS"}},function(e,t){e.exports={menu:"MenuContainer-menu-27j2V resetFont-resetFont-GoU5_"}},function(e,t){e.exports={menuItem:"MenuItem-menuItem-MQyxO","default":"MenuItem-default-1vAoF",primary:"MenuItem-primary-vslr-",success:"MenuItem-success-3hvdG",danger:"MenuItem-danger-3nlch"}},function(e,t){e.exports={separator:"MenuSeparator-separator-Urv9r"}},function(e,t){e.exports={menuItemContainer:"SelectedMenuItem-menuItemContainer-2_Zpb",menuLabel:"SelectedMenuItem-menuLabel-3dKTE",
selectedIcon:"SelectedMenuItem-selectedIcon-6QPNd",isSelected:"SelectedMenuItem-isSelected-1P74r"}},function(e,t){e.exports={confirmModal:"ConfirmModal-confirmModal-1Izjf Modal-modal-3X8-5",modalHeader:"ConfirmModal-modalHeader-1bZRv ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9",modalBody:"ConfirmModal-modalBody-3a_XE ModalBody-modalBody-1F4VV",accordLabel:"ConfirmModal-accordLabel-2pzsN",accordInput:"ConfirmModal-accordInput-3BkLJ",modalFooter:"ConfirmModal-modalFooter-2uCEE ModalFooter-modalFooter-2pHcU",
cancelButton:"ConfirmModal-cancelButton-19CWm",confirmButton:"ConfirmModal-confirmButton-1Dheg"}},function(e,t){e.exports={modalContainer:"Modal-modalContainer-2mNaA resetFont-resetFont-GoU5_",modalTransitionContainer:"Modal-modalTransitionContainer-X4XFT",modalBackdrop:"Modal-modalBackdrop-1fCs9",modal:"Modal-modal-3X8-5",closeButton:"Modal-closeButton-fnqGz",enter:"Modal-enter-30zlX",enterActive:"Modal-enterActive-1M0vF",leave:"Modal-leave-1zIVx",leaveActive:"Modal-leaveActive-1whSn"}},function(e,t){
e.exports={modalScroller:"ModalBody-modalScroller-3xzMd",modalBody:"ModalBody-modalBody-1F4VV"}},function(e,t){e.exports={modalFooter:"ModalFooter-modalFooter-2pHcU"}},function(e,t){e.exports={modalHeader:"ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9"}},function(e,t){e.exports={toolbarButton:"ToolbarButton-toolbarButton-3X0Wu",toolbarTooltip:"ToolbarButton-toolbarTooltip-w3bU4 Tooltip-tooltip-1JcHx resetFont-resetFont-GoU5_"}},function(e,t){e.exports={toolbarMenu:"ToolbarMenu-toolbarMenu-3IGak Menu-menu-2EjwW"
}},function(e,t){e.exports={tooltipPortal:"Tooltip-tooltipPortal-2tb29",tooltip:"Tooltip-tooltip-1JcHx resetFont-resetFont-GoU5_",tooltipArrow:"Tooltip-tooltipArrow-8GsfY",tooltipBottomArrow:"Tooltip-tooltipBottomArrow-1a_Nr",tooltipTopArrow:"Tooltip-tooltipTopArrow-1QpMb",tooltipRightArrow:"Tooltip-tooltipRightArrow-Amc3s",tooltipLeftArrow:"Tooltip-tooltipLeftArrow-2niz8",tooltipCenterAlignArrow:"Tooltip-tooltipCenterAlignArrow-fxDLp",tooltipLeftAlignArrow:"Tooltip-tooltipLeftAlignArrow-1ZQ5K",tooltipRightAlignArrow:"Tooltip-tooltipRightAlignArrow-25Hh7",
tooltipMiddleAlignArrow:"Tooltip-tooltipMiddleAlignArrow-Krtyd",topLeft:"Tooltip-topLeft-280T4 Tooltip-tooltipArrow-8GsfY Tooltip-tooltipBottomArrow-1a_Nr Tooltip-tooltipLeftAlignArrow-1ZQ5K",topCenter:"Tooltip-topCenter-2VFFf Tooltip-tooltipArrow-8GsfY Tooltip-tooltipBottomArrow-1a_Nr Tooltip-tooltipCenterAlignArrow-fxDLp",topRight:"Tooltip-topRight-JBp4f Tooltip-tooltipArrow-8GsfY Tooltip-tooltipBottomArrow-1a_Nr Tooltip-tooltipRightAlignArrow-25Hh7",bottomLeft:"Tooltip-bottomLeft-2PXcI Tooltip-tooltipArrow-8GsfY Tooltip-tooltipTopArrow-1QpMb Tooltip-tooltipLeftAlignArrow-1ZQ5K",
bottomCenter:"Tooltip-bottomCenter-iePHM Tooltip-tooltipArrow-8GsfY Tooltip-tooltipTopArrow-1QpMb Tooltip-tooltipCenterAlignArrow-fxDLp",bottomRight:"Tooltip-bottomRight-16uRC Tooltip-tooltipArrow-8GsfY Tooltip-tooltipTopArrow-1QpMb Tooltip-tooltipRightAlignArrow-25Hh7",middleLeft:"Tooltip-middleLeft-2x5aN Tooltip-tooltipArrow-8GsfY Tooltip-tooltipRightArrow-Amc3s Tooltip-tooltipMiddleAlignArrow-Krtyd",middleRight:"Tooltip-middleRight-3iocO Tooltip-tooltipArrow-8GsfY Tooltip-tooltipLeftArrow-2niz8 Tooltip-tooltipMiddleAlignArrow-Krtyd",
enter:"Tooltip-enter-3bcka",enterActive:"Tooltip-enterActive-3RrHV",leave:"Tooltip-leave-2MvR6",leaveActive:"Tooltip-leaveActive-PpgFi"}},function(e,t){e.exports={hubContainer:"HubCell-hubContainer-2t4jR",hubHeader:"HubCell-hubHeader-3EOQP",hubTitle:"HubCell-hubTitle-18L-k truncate-truncate-2GZ-9",hubLink:"HubCell-hubLink-3ge9X",hubActions:"HubCell-hubActions-3-mux",hubScrollButton:"HubCell-hubScrollButton-2RPNr"}},function(e,t){e.exports={titleContainer:"MetadataPosterCell-titleContainer-1wENc",
continueWatchingTitleContainer:"MetadataPosterCell-continueWatchingTitleContainer-3Fh9m"}},function(e,t){e.exports={photoContainer:"PhotoCell-photoContainer-5eAv5",photo:"PhotoCell-photo-2D8H_",image:"PhotoCell-image-1xHJJ",badge:"PhotoCell-badge-sVFch",albumLink:"PhotoCell-albumLink-1uyF1 cover-cover-2a-ek",albumTitle:"PhotoCell-albumTitle-1dyWr absoluteCenter-absoluteCenter-1jDHd",photoLink:"PhotoCell-photoLink-3drN0 cover-cover-2a-ek"}},function(e,t){e.exports={titleContainer:"TagPosterCell-titleContainer-3Oo_k",
imageContainer:"TagPosterCell-imageContainer-2pYnK",imageLink:"TagPosterCell-imageLink-v_JEI cover-cover-2a-ek"}},function(e,t){e.exports={cardContainer:"MetadataPosterCard-cardContainer-5LAl5",card:"MetadataPosterCard-card-3wQTg",isFlipped:"MetadataPosterCard-isFlipped-1xXhy",poster:"MetadataPosterCard-poster-2Ha5J",isSelected:"MetadataPosterCard-isSelected-3rIcO",isOtherItemSelected:"MetadataPosterCard-isOtherItemSelected-3N2sC"}},function(e,t){e.exports={face:"MetadataPosterCardFace-face-1WDd2 cover-cover-2a-ek MetadataPosterCard-poster-2Ha5J",
isSelected:"MetadataPosterCardFace-isSelected-1u5LU",faceFront:"MetadataPosterCardFace-faceFront-31JFm",faceBack:"MetadataPosterCardFace-faceBack-CPUrP"}},function(e,t){e.exports={placeholderIcon:"MetadataPosterCardIcon-placeholderIcon-PpNID"}},function(e,t){e.exports={overlay:"MetadataPosterCardOverlay-overlay-3rrpZ cover-cover-2a-ek",background:"MetadataPosterCardOverlay-background-WgDKv cover-cover-2a-ek",link:"MetadataPosterCardOverlay-link-3HBRY cover-cover-2a-ek",badge:"MetadataPosterCardOverlay-badge-3xslj",
versionBadge:"MetadataPosterCardOverlay-versionBadge-3mtqm MetadataPosterCardOverlay-badge-3xslj",versionBadgeIcon:"MetadataPosterCardOverlay-versionBadgeIcon-3uUxX",unwatchedBadge:"MetadataPosterCardOverlay-unwatchedBadge-BaRjO MetadataPosterCardOverlay-badge-3xslj",unwatchedTagContainer:"MetadataPosterCardOverlay-unwatchedTagContainer-37vs7",unwatchedTag:"MetadataPosterCardOverlay-unwatchedTag-1-kuh MetadataPosterCardOverlay-unwatchedBadge-BaRjO MetadataPosterCardOverlay-badge-3xslj",progress:"MetadataPosterCardOverlay-progress-2xw9N",
progressTrack:"MetadataPosterCardOverlay-progressTrack-1xS-M cover-cover-2a-ek",progressBar:"MetadataPosterCardOverlay-progressBar-G7pcw cover-cover-2a-ek",button:"MetadataPosterCardOverlay-button-1tlig",centerCircle:"MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",playButton:"MetadataPosterCardOverlay-playButton-1jjl- absoluteCenter-absoluteCenter-1jDHd PlayButton-playButton-1iAGl MetadataPosterCardOverlay-button-1tlig",playCoverButton:"MetadataPosterCardOverlay-playCoverButton-2gU0x MetadataPosterCardOverlay-playButton-1jjl- absoluteCenter-absoluteCenter-1jDHd PlayButton-playButton-1iAGl MetadataPosterCardOverlay-button-1tlig",
playCircle:"MetadataPosterCardOverlay-playCircle-1i899 PlayButton-playCircle-2IY6H absoluteCenter-absoluteCenter-1jDHd MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",selectButton:"MetadataPosterCardOverlay-selectButton-1h7pl MetadataPosterCardOverlay-button-1tlig",selectCircle:"MetadataPosterCardOverlay-selectCircle-c0HXe absoluteCenter-absoluteCenter-1jDHd",selectedCircle:"MetadataPosterCardOverlay-selectedCircle-AKc6g absoluteCenter-absoluteCenter-1jDHd",selectedIcon:"MetadataPosterCardOverlay-selectedIcon-B_NxW",
coverButton:"MetadataPosterCardOverlay-coverButton-eY337 cover-cover-2a-ek",selectCoverButton:"MetadataPosterCardOverlay-selectCoverButton-TCjUg MetadataPosterCardOverlay-coverButton-eY337 cover-cover-2a-ek",deselectCoverButton:"MetadataPosterCardOverlay-deselectCoverButton-3HjXQ MetadataPosterCardOverlay-coverButton-eY337 cover-cover-2a-ek",editButton:"MetadataPosterCardOverlay-editButton-2WHy3 MetadataPosterCardOverlay-button-1tlig",moreButton:"MetadataPosterCardOverlay-moreButton-3Sg2r MetadataPosterCardOverlay-button-1tlig",
isActionsMenuOpen:"MetadataPosterCardOverlay-isActionsMenuOpen-3ZT-K",isOtherItemSelected:"MetadataPosterCardOverlay-isOtherItemSelected-2t7Y5",hasActiveSelection:"MetadataPosterCardOverlay-hasActiveSelection-2Zb0p",refreshingCircle:"MetadataPosterCardOverlay-refreshingCircle-3fSYW MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",trashCircle:"MetadataPosterCardOverlay-trashCircle-2NF_c MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",
isSelected:"MetadataPosterCardOverlay-isSelected-b8jUT",isConflictingTypeSelected:"MetadataPosterCardOverlay-isConflictingTypeSelected-oafjJ",isModifierKeyPressed:"MetadataPosterCardOverlay-isModifierKeyPressed-29iEX",isRefreshing:"MetadataPosterCardOverlay-isRefreshing-29qfX",isTrash:"MetadataPosterCardOverlay-isTrash-1HRrr",refreshingSpinnerContainer:"MetadataPosterCardOverlay-refreshingSpinnerContainer-2qGOb absoluteCenter-absoluteCenter-1jDHd",refreshingSpinner:"MetadataPosterCardOverlay-refreshingSpinner-3F2n6",
refreshingIcon:"MetadataPosterCardOverlay-refreshingIcon-2JY0W"}},function(e,t){e.exports={sliderContainer:"PosterSizeSlider-sliderContainer-1UnwS",sliderIcon:"PosterSizeSlider-sliderIcon-XKFG9",slider:"PosterSizeSlider-slider-15Exl Slider-slider-K8cT9"}},function(e,t){e.exports={title:"MetadataPosterTitle-title-2j7mN truncate-truncate-2GZ-9",isSecondary:"MetadataPosterTitle-isSecondary-2s6Ip",isSplitLeft:"MetadataPosterTitle-isSplitLeft-2Uj4y",isSplitRight:"MetadataPosterTitle-isSplitRight-3_Jx6"
}},function(e,t){e.exports={isSecondary:"MetadataTitleSeasonEpisodeIndex-isSecondary-1iqH7 MetadataPosterTitle-isSecondary-2s6Ip"}},function(e,t){e.exports={separator:"MetadataTitleSeparator-separator-1XdAO MetadataPosterTitle-isSecondary-2s6Ip"}},function(e,t){e.exports={page:"Page-page-cSwP- resetFont-resetFont-GoU5_"}},function(e,t){e.exports={pageContent:"PageContent-pageContent-1RBiI",innerPageContent:"PageContent-innerPageContent-BWoYT"}},function(e,t){e.exports={pageHeader:"PageHeader-pageHeader-2N2RK"
}},function(e,t){e.exports={pageHeaderCenter:"PageHeaderCenter-pageHeaderCenter-3w3iI pageHeaderColumn-pageHeaderColumn-WZn4E"}},function(e,t){e.exports={pageHeaderLeft:"PageHeaderLeft-pageHeaderLeft-2yO9H pageHeaderColumn-pageHeaderColumn-WZn4E"}},function(e,t){e.exports={pageHeaderRight:"PageHeaderRight-pageHeaderRight-1N5WH pageHeaderColumn-pageHeaderColumn-WZn4E"}},function(e,t){e.exports={sectionWrapper:"AccountFormSection-sectionWrapper-2tLz6",section:"AccountFormSection-section-2b6Aj",isClosed:"AccountFormSection-isClosed-2rLvw",
sectionLabel:"AccountFormSection-sectionLabel-1pNg9 FormLabel-label-2QnAc",isOpen:"AccountFormSection-isOpen-3aRX7",sectionEditLink:"AccountFormSection-sectionEditLink-1lfDc",submitButton:"AccountFormSection-submitButton-MgSmz",sectionDetails:"AccountFormSection-sectionDetails-2MQBA",sectionForm:"AccountFormSection-sectionForm-1gizZ"}},function(e,t){e.exports={page:"AccountPage-page-2HE2E Page-page-cSwP- resetFont-resetFont-GoU5_",header:"AccountPage-header-8Diva",content:"AccountPage-content-z4amS",
help:"AccountPage-help-26d05"}},function(e,t){e.exports={avatarContainer:"AvatarEditor-avatarContainer-ko61E",avatarPane:"AvatarEditor-avatarPane-2LyHz",sliderContainer:"AvatarEditor-sliderContainer-1IUDw",sliderEnd:"AvatarEditor-sliderEnd-16gNu",sliderWrapper:"AvatarEditor-sliderWrapper-b24X9",slider:"AvatarEditor-slider-1_Kc1 Slider-slider-K8cT9",help:"AvatarEditor-help-2-9CP",avatarTextPane:"AvatarEditor-avatarTextPane-1p4wu",avatarActionButtons:"AvatarEditor-avatarActionButtons-127gy"}},function(e,t){
e.exports={librariesMenuScroller:"DashboardLibrariesMenu-librariesMenuScroller-3og0O Scroller-vertical-2IRDv"}},function(e,t){e.exports={dashboardContent:"DashboardPage-dashboardContent-3TmGe PageContent-innerPageContent-BWoYT"}},function(e,t){e.exports={separator:"DashboardPageHeader-separator-1mZyN"}},function(e,t){e.exports={title:"DetailsHeader-title-3YoKR",summary:"DetailsHeader-summary-2pVzJ"}},function(e,t){e.exports={scroller:"PhotoAlbum-scroller-1g_Mi",body:"PhotoAlbum-body-363x0",album:"PhotoAlbum-album-nSrSB",
spinner:"PhotoAlbum-spinner-2OIz5"}},function(e,t){e.exports={container:"PhotoAlbumContainer-container-1PjXY"}},function(e,t){e.exports={emptyPage:"EmptyPage-emptyPage-1JClc resetFont-resetFont-GoU5_",content:"EmptyPage-content-1Asia",icon:"EmptyPage-icon-2ig_N","default":"EmptyPage-default-1l3EZ",primary:"EmptyPage-primary-23b5c",success:"EmptyPage-success-3Y34O",danger:"EmptyPage-danger-2HrFZ",title:"EmptyPage-title-1twcl",description:"EmptyPage-description-gCbqC",footer:"EmptyPage-footer-3QMNd"
}},function(e,t){e.exports={icon:"ErrorPage-icon-2Vezy EmptyPage-icon-2ig_N"}},function(e,t){e.exports={emptyPage:"ServerDownloadRequiredPage-emptyPage-33d02 EmptyPage-emptyPage-1JClc resetFont-resetFont-GoU5_",content:"ServerDownloadRequiredPage-content-1Fpf9 EmptyPage-content-1Asia",title:"ServerDownloadRequiredPage-title-2T5TE EmptyPage-title-1twcl",description:"ServerDownloadRequiredPage-description-2h0bL EmptyPage-description-gCbqC",pmsLogo:"ServerDownloadRequiredPage-pmsLogo-29BGs",button:"ServerDownloadRequiredPage-button-DVifD",
downloadMessage:"ServerDownloadRequiredPage-downloadMessage-3XFQ8"}},function(e,t){e.exports={updateLink:"ServerUpdateRequiredPage-updateLink-WuF3B",updateDisabledLink:"ServerUpdateRequiredPage-updateDisabledLink-vXnC9 ServerUpdateRequiredPage-updateLink-WuF3B"}},function(e,t){e.exports={metadataListPageContent:"MetadataListPageContent-metadataListPageContent-oyJ9H PageContent-pageContent-1RBiI",metadataListScroller:"MetadataListPageContent-metadataListScroller-3TSBt"}},function(e,t){e.exports={title:"MetadataListPageHeader-title-_MpLt truncate-truncate-2GZ-9",
badge:"MetadataListPageHeader-badge-J2Pm9"}},function(e,t){e.exports={searchContent:"SearchPageContent-searchContent-1koFg DashboardPage-dashboardContent-3TmGe PageContent-innerPageContent-BWoYT"}},function(e,t){e.exports={spinner:"SearchPageHeader-spinner-2o0G4",separator:"SearchPageHeader-separator-2gaQL"}},function(e,t){e.exports={container:"QuickSearch-container-2V8m3 resetFont-resetFont-GoU5_"}},function(e,t){e.exports={hubTitle:"QuickSearchHub-hubTitle-nUJnZ"}},function(e,t){e.exports={container:"QuickSearchInput-container-KSXwP resetFont-resetFont-GoU5_",
focused:"QuickSearchInput-focused-CtYPJ",searchIcon:"QuickSearchInput-searchIcon-rGwJf",closeIcon:"QuickSearchInput-closeIcon-xl5u9",searchInput:"QuickSearchInput-searchInput-wnRxj"}},function(e,t){e.exports={button:"QuickSearchResult-button-xsMFe",title:"QuickSearchResult-title-2dspi",selected:"QuickSearchResult-selected-2JW0R",imageContainer:"QuickSearchResult-imageContainer-24SkC",titles:"QuickSearchResult-titles-XWf3c",moreButton:"QuickSearchResult-moreButton-y2-Ay",moreIcon:"QuickSearchResult-moreIcon-201py"
}},function(e,t){e.exports={container:"QuickSearchResults-container-2v0_M",spinnerContainer:"QuickSearchResults-spinnerContainer-3d7rG",noResults:"QuickSearchResults-noResults-2nuJS",placeholder:"QuickSearchResults-placeholder-1qHj9",placeholderSelected:"QuickSearchResults-placeholderSelected-Cek9W",spinner:"QuickSearchResults-spinner-1JArD"}},function(e,t){e.exports={title:"QuickSearchTitle-title-dH6Qf truncate-truncate-2GZ-9",isSecondary:"QuickSearchTitle-isSecondary-KmXWZ"}},function(e,t){e.exports={
card:"SearchCard-card-1HRU-",poster:"SearchCard-poster-1EmKT",playButton:"SearchCard-playButton-18JPy PlayButton-playButton-1iAGl absoluteCenter-absoluteCenter-1jDHd"}},function(e,t){e.exports={multiSelectPageHeader:"MultiSelectPageHeader-multiSelectPageHeader-1_MY- PageHeader-pageHeader-2N2RK",selectedTitle:"MultiSelectPageHeader-selectedTitle-2XANL truncate-truncate-2GZ-9",deselectLink:"MultiSelectPageHeader-deselectLink-1_0B- truncate-truncate-2GZ-9",icon:"MultiSelectPageHeader-icon-x4vHO"}},function(e,t){
e.exports={sidebar:"Sidebar-sidebar-2Wjsb resetFont-resetFont-GoU5_",sidebarScroller:"Sidebar-sidebarScroller-1lsqX",sidebarContent:"Sidebar-sidebarContent-8WmmW"}},function(e,t){e.exports={sidebarLink:"SidebarLink-sidebarLink-2VFCH Link-default-2S6gV",sidebarLinkIcon:"SidebarLink-sidebarLinkIcon-hkeJI",sidebarLinkSpinner:"SidebarLink-sidebarLinkSpinner-isL9P"}},function(e,t){e.exports={sidebarListHeader:"SidebarList-sidebarListHeader-3okoq truncate-truncate-2GZ-9"}},function(e,t){e.exports={sidebarListItem:"SidebarListItem-sidebarListItem-2tR7j"
}},function(e,t){e.exports={sidebarListItemBadge:"SidebarListItemBadge-sidebarListItemBadge-1QAVb"}},function(e,t){e.exports={sidebarMessage:"SidebarMessage-sidebarMessage-c1R1N"}},function(e,t){e.exports={container:"UserSidebar-container-2Xgpm",selected:"UserSidebar-selected-2P7zM"}},function(e,t){e.exports={serverMenu:"ServerMenu-serverMenu-2tFgY",serverMenuScroller:"ServerMenu-serverMenuScroller-3cdNz"}},function(e,t){e.exports={serverMenuButton:"ServerMenuButton-serverMenuButton-3b703",serverMenuButtonContainer:"ServerMenuButton-serverMenuButtonContainer-2uPEL",
serverMenuSpinner:"ServerMenuButton-serverMenuSpinner-2GRwh",serverMenuTitle:"ServerMenuButton-serverMenuTitle-QnGXI",serverMenuFriendlyNameContainer:"ServerMenuButton-serverMenuFriendlyNameContainer-3J71A",serverMenuFriendlyName:"ServerMenuButton-serverMenuFriendlyName-2fA1r truncate-truncate-2GZ-9",serverMenuUsername:"ServerMenuButton-serverMenuUsername-28rcn truncate-truncate-2GZ-9",icon:"ServerMenuButton-icon-2D2mY"}},function(e,t){e.exports={secureIcon:"ServerMenuIcon-secureIcon-1oXbF",alertIcon:"ServerMenuIcon-alertIcon-2CDqq",
warningIcon:"ServerMenuIcon-warningIcon-2SL_j"}},function(e,t){e.exports={serverMenuItem:"ServerMenuItem-serverMenuItem-1HlOA",disabledServerMenuItem:"ServerMenuItem-disabledServerMenuItem-2QRFs",selectedServerMenuItem:"ServerMenuItem-selectedServerMenuItem-bp_0h",serverMenuItemContainer:"ServerMenuItem-serverMenuItemContainer-2WPZp",serverMenuTitle:"ServerMenuItem-serverMenuTitle-2UtQC",serverMenuFriendlyName:"ServerMenuItem-serverMenuFriendlyName-2EZ0S truncate-truncate-2GZ-9",serverMenuStatus:"ServerMenuItem-serverMenuStatus-3IhIj truncate-truncate-2GZ-9",
serverMenuIconContainer:"ServerMenuItem-serverMenuIconContainer-2v7Ec",serverMenuIcon:"ServerMenuItem-serverMenuIcon-3CZzN",selectedIcon:"ServerMenuItem-selectedIcon-1pXXe",secureIcon:"ServerMenuItem-secureIcon-6pJoG"}},function(e,t){e.exports={librariesActions:"SidebarLibrariesActionsContainer-librariesActions-2FXXq",librariesAction:"SidebarLibrariesActionsContainer-librariesAction-F_NfT",isActionsMenuOpen:"SidebarLibrariesActionsContainer-isActionsMenuOpen-Y-2Sj"}},function(e,t){e.exports={libraryLink:"SidebarLibraryItem-libraryLink-Ov4kW",
editLibraryLink:"SidebarLibraryItem-editLibraryLink-_TicF",libraryItem:"SidebarLibraryItem-libraryItem-2OicE"}},function(e,t){e.exports={unclaimedIcon:"SidebarServerContent-unclaimedIcon-2VpOx"}},function(e,t){e.exports={librariesSpinnerContainer:"SidebarServerLibraries-librariesSpinnerContainer-3iNgH",librariesListHeader:"SidebarServerLibraries-librariesListHeader-1bv_F SidebarList-sidebarListHeader-3okoq truncate-truncate-2GZ-9",librariesTitle:"SidebarServerLibraries-librariesTitle-yIAPk truncate-truncate-2GZ-9",
touchLibrariesList:"SidebarServerLibraries-touchLibrariesList-2Jdlf",librariesAction:"SidebarServerLibraries-librariesAction-2etst",librariesList:"SidebarServerLibraries-librariesList-1nFi7"}},function(e,t){e.exports={feature:"PlexPassFeature-feature-1Z1RP",featureImage:"PlexPassFeature-featureImage-19mpe",featureContainer:"PlexPassFeature-featureContainer-3OshN",featureTitle:"PlexPassFeature-featureTitle-EitKV",featureDescription:"PlexPassFeature-featureDescription-iQBc9"}},function(e,t){e.exports={
plexPassTitle:"PlexPassModal-plexPassTitle-3rfVU",header:"PlexPassModal-header-2DxmV ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9",body:"PlexPassModal-body-3sRxa ModalBody-modalBody-1F4VV",feature:"PlexPassModal-feature-3MRki",featureImage:"PlexPassModal-featureImage-1t6kv",featureTitle:"PlexPassModal-featureTitle-2D86w",featureDescription:"PlexPassModal-featureDescription-2NBND",moreFeatures:"PlexPassModal-moreFeatures-29fV7",footer:"PlexPassModal-footer-2yRrA ModalFooter-modalFooter-2pHcU",
planButton:"PlexPassModal-planButton-13Cix truncate-truncate-2GZ-9",link:"PlexPassModal-link-354zf",linkSeparator:"PlexPassModal-linkSeparator-1alFe",spinnerContainer:"PlexPassModal-spinnerContainer-3OGok",plansContainer:"PlexPassModal-plansContainer-1VCC1",isPlansPending:"PlexPassModal-isPlansPending-1N8FT"}},function(e,t){e.exports={appear:"crossFadeTransition-appear-2v290",enter:"crossFadeTransition-enter-29fpN",appearActive:"crossFadeTransition-appearActive-2ng0_",enterActive:"crossFadeTransition-enterActive-Q5Ff8",
leave:"crossFadeTransition-leave-2_da2",leaveActive:"crossFadeTransition-leaveActive-2Zow1"}},function(e,t,n){"use strict";function a(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var a=n.querySelectorAll(t);return Array.prototype.indexOf.call(a,e)!==-1}var i=n(33),r={addClass:function(e,t){return/\s/.test(t)?i(!1):void 0,t&&(e.classList?e.classList.add(t):r.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)?i(!1):void 0,t&&(e.classList?e.classList.remove(t):r.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),
e},conditionClass:function(e,t,n){return(n?r.addClass:r.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)?i(!1):void 0,e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return a(e,t)};return n.call(e,t)}};e.exports=r},function(e,t){"use strict";function n(e){return e.replace(a,function(e,t){return t.toUpperCase()})}var a=/-(.)/g;
e.exports=n},function(e,t,n){"use strict";function a(e){return i(e.replace(r,"ms-"))}var i=n(1717),r=/^-ms-/;e.exports=a},function(e,t,n){"use strict";function a(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?a(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(1726);e.exports=a},function(e,t,n){"use strict";function a(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?s(!1):void 0,"number"!=typeof t?s(!1):void 0,
0===t||t-1 in e?void 0:s(!1),"function"==typeof e.callee?s(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var a=Array(t),i=0;i<t;i++)a[i]=e[i];return a}function i(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function r(e){return i(e)?Array.isArray(e)?e.slice():a(e):[e]}var s=n(33);e.exports=r},function(e,t,n){"use strict";function a(e){var t=e.match(d);
return t&&t[1].toLowerCase()}function i(e,t){var n=u;u?void 0:l(!1);var i=a(e),r=i&&o(i);if(r){n.innerHTML=r[1]+e+r[2];for(var d=r[0];d--;)n=n.lastChild}else n.innerHTML=e;var c=n.getElementsByTagName("script");c.length&&(t?void 0:l(!1),s(c).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var r=n(64),s=n(1720),o=n(624),l=n(33),u=r.canUseDOM?document.createElement("div"):null,d=/^\s*<(\w+)/;e.exports=i},function(e,t){"use strict";function n(e){return e===window?{
x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(a,"-$1").toLowerCase()}var a=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function a(e){return i(e).replace(r,"-ms-")}var i=n(1723),r=/^ms-/;e.exports=a},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName));
}e.exports=n},function(e,t,n){"use strict";function a(e){return i(e)&&3==e.nodeType}var i=n(1725);e.exports=a},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var i={};for(var r in e)a.call(e,r)&&(i[r]=t.call(n,e[r],r,e));return i}var a=Object.prototype.hasOwnProperty;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){"use strict";var a,i=n(64);i.canUseDOM&&(a=window.performance||window.msPerformance||window.webkitPerformance),
e.exports=a||{}},function(e,t,n){"use strict";var a,i=n(1729);a=i.now?function(){return i.now()}:function(){return Date.now()},e.exports=a},function(e,t,n){e.exports=n.p+"img/base/pms-logo.70f6a544befb024685e4a294f6e5505e.svg"},function(e,t,n){e.exports=n.p+"img/desktop/queue/bookmarklet-steps-ie.3cbda4e75b0dd0e186e0c24999ab0d1d.png"},function(e,t,n){e.exports=n.p+"img/desktop/queue/bookmarklet-steps.abc5147d9257f0ec59f7b2257db9cb8f.png"},function(e,t,n){e.exports=n.p+"img/desktop/queue/email-links.f1b12dd82ea85b39a4c0fa07dd6df095.png";
},function(e,t,n){e.exports=n.p+"img/desktop/setup/setup-devices.4c444242863ca1234c65de48ef80a5e8.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-camera-upload.c292737601a4452f02cb86a5ff46cd7f.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-cloud-sync.58594567e630cc4dae0ad42b6573f225.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-forum.a35de654d388b5416cd87ddd45e904f7.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-gracenote.47143d9a798b6044bb41469630e662db.svg";
},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-mobile-sync.6a66674e2cb992f1134481602860f06f.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-trailers-extras.1ad0852cbe3bde7198f897afd6bc14dd.svg"},function(e,t,n){e.exports=n.p+"mp3/null.2036f08ba858d37814b7f6982d26414a.mp3"},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r="";return r})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="video-player-image-overlays"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),i=i||{};var r,s="",o="function",l=this.escapeExpression;return s+='<div class="sidebar-container '+l((r=t&&t.styles,r=null==r||r===!1?r:r.sidebarContainer,typeof r===o?r.apply(t):r))+'"></div> <div class="page-container '+l((r=t&&t.styles,r=null==r||r===!1?r:r.pageContainer,typeof r===o?r.apply(t):r))+'"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return(s=n.reason)?r=s.call(t,{hash:{},data:i}):(s=t&&t.reason,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+" "})},1744,1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<span class="loading loading-inline"></span> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return(s=n.text)?r=s.call(t,{hash:{},data:i}):(s=t&&t.text,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="lyrics-region"></div> <div class="lyrics-streams-region"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+=o(n(2).call(t,"Your mix will resume shortly",{hash:{},data:r}))+" "});
},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="background transition-out"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div id="content" class="scroll-container dark-scrollbar"></div> <div class="scroll-shadow transition-out"></div> '})},function(e,t,n){var a=n(4);
e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+="<p>"+h(n(2).call(e,"Reqirements",{hash:{},data:t}))+": ",a=e&&e.requirements,a=typeof a===m?a.apply(e):a,(a||0===a)&&(i+=a),i+="</p>"}function o(e,t){var n,a="";return a+="<p>",n=e&&e.info,n=typeof n===m?n.apply(e):n,(n||0===n)&&(a+=n),a+="</p>"}function l(e,t){var i,r="";return r+=' <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"> '+h(n(2).call(e,"Download",{
hash:{},data:t}))+' <span class="caret"></span> </button> <ul class="dropdown-menu"> ',i=a.each.call(e,e&&e.releases,{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(i||0===i)&&(r+=i),r+=" </ul> </div> "}function u(e,t){var n,a="";return a+=' <li><a href="'+h((n=e&&e.url,typeof n===m?n.apply(e):n))+'" download class="download-btn">'+h((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,c,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function c(e,t){var n,a="";return a+=' <a href="'+h((n=e&&e.url,typeof n===m?n.apply(e):n))+'" download class="btn btn-primary download-btn">'+h((n=e&&e.label,typeof n===m?n.apply(e):n))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var f,p="",h=this.escapeExpression,m="function",v=this;return p+='<div class="type-'+h((f=t&&t.type,typeof f===m?f.apply(t):f))+" platform-logo platform-"+h((f=t&&t.id,
typeof f===m?f.apply(t):f))+'"></div> <h2><strong>'+h((f=t&&t.name,typeof f===m?f.apply(t):f))+"</strong> "+h(n(2).call(t,"Download",{hash:{},data:r}))+"</h2> <h5>"+h(n(2).call(t,"Version",{hash:{},data:r}))+" "+h((f=t&&t.version,typeof f===m?f.apply(t):f))+"</h5> <h5>"+h(n(472).call(t,t&&t.date,{hash:{},data:r}))+'</h5> <div class="more-info"> ',f=a.if.call(t,t&&t.requirements,{hash:{},inverse:v.noop,fn:v.program(1,s,r),data:r}),(f||0===f)&&(p+=f),p+=" ",f=a.if.call(t,t&&t.info,{hash:{},inverse:v.noop,
fn:v.program(3,o,r),data:r}),(f||0===f)&&(p+=f),p+=" </div> ",f=a.if.call(t,t&&t.shouldUseDropup,{hash:{},inverse:v.program(8,d,r),fn:v.program(5,l,r),data:r}),(f||0===f)&&(p+=f),p+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"(Plex Pass)"}function o(e,t){var n,a="";return a+=' <p><span class="text-muted">Name:</span> '+f((n=e&&e.primaryServer,n=null==n||n===!1?n:n.friendlyName,typeof n===c?n.apply(e):n))+'</p> <p><span class="text-muted">URL:</span> '+f((n=e&&e.primaryServerUrl,typeof n===c?n.apply(e):n))+'</p> <p><span class="text-muted">Version:</span> '+f((n=e&&e.primaryServer,n=null==n||n===!1?n:n.version,typeof n===c?n.apply(e):n))+'</p> <p><span class="text-muted">Token:</span> '+f((n=e&&e.primaryServer,
n=null==n||n===!1?n:n.accessToken,typeof n===c?n.apply(e):n))+"</p> "}function l(e,t){return' <p><span class="text-muted">none</span></p> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<h3>Browser</h3> <p><span class="text-muted">Host:</span> '+f((u=t&&t.host,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">User Agent:</span> '+f((u=t&&t.userAgent,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Name:</span> '+f((u=t&&t.browser,
u=null==u||u===!1?u:u.name,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Version:</span> '+f((u=t&&t.browser,u=null==u||u===!1?u:u.version,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Platform:</span> '+f((u=t&&t.browser,u=null==u||u===!1?u:u.platform,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Mobile:</span> '+f(n(308).call(t,(u=t&&t.browser,null==u||u===!1?u:u.mobile),{hash:{},data:r}))+'</p> <h3>User</h3> <p><span class="text-muted">Username:</span> '+f((u=t&&t.user,
u=null==u||u===!1?u:u.username,typeof u===c?u.apply(t):u))+" ",u=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='</p> <p><span class="text-muted">Email:</span> '+f((u=t&&t.user,u=null==u||u===!1?u:u.email,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Token:</span> '+f((u=t&&t.user,u=null==u||u===!1?u:u.accessToken,typeof u===c?u.apply(t):u))+'</p> <h3>plex.tv</h3> <p><span class="text-muted">URL:</span> '+f((u=t&&t.cloudServerUrl,
typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Available:</span> '+f(n(308).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.available),{hash:{},data:r}))+'</p> <p><span class="text-muted">Authorized:</span> '+f(n(308).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.authorized),{hash:{},data:r}))+"</p> <h3>Primary Server</h3> ",u=a.if.call(t,t&&t.primaryServer,{hash:{},inverse:p.program(5,l,r),fn:p.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+=" "})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<textarea class="form-control">',(s=n.logs)?r=s.call(t,{hash:{},data:i}):(s=t&&t.logs,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+"</textarea> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <div class="remember-group checkbox"> <label class="control-label"> <input type="checkbox" id="remember" checked> '+u(n(2).call(e,"Remember me",{
hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<div class="row"> <div class="col-sm-12"> <h2 class="sign-in-header"> <a class="sign-in-btn selected" href="#">'+u(n(2).call(t,"Sign In",{hash:{},data:r}))+'</a> <span class="sign-in-header-divider">'+u(n(2).call(t,"or",{hash:{},data:r}))+'</span> <a class="sign-up-btn" href="#">'+u(n(2).call(t,"Sign Up",{hash:{},data:r}))+'</a> </h2> </div> </div> <div class="username-group form-group"> <label for="username" class="control-label"> '+u(n(2).call(t,"Username",{
hash:{},data:r}))+' <span class="control-error">'+u(n(2).call(t,"Required",{hash:{},data:r}))+'</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"> '+u(n(2).call(t,"Email",{hash:{},data:r}))+' <span class="control-error">'+u(n(2).call(t,"Required",{hash:{},data:r}))+'</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"> '+u(n(2).call(t,"Password",{
hash:{},data:r}))+' <span class="control-error">'+u(n(2).call(t,"Required",{hash:{},data:r}))+'</span> </label> <input type="password" id="password" class="form-control"> </div> <div class="confirm-group form-group"> <label for="confirm" class="control-label"> '+u(n(2).call(t,"Confirm Password",{hash:{},data:r}))+' <span class="control-error">'+u(n(2).call(t,"Passwords do not match",{hash:{},data:r}))+'</span> </label> <input type="password" id="confirm" class="form-control"> </div> <div class="age-disclaimer form-group"> '+u(n(2).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:r}))+' </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">'+u(n(2).call(t,"Sign In",{hash:{},data:r}))+'</span> <span class="sign-up-label btn-label">'+u(n(2).call(t,"Sign Up",{hash:{},data:r}))+"</span> </button> ",o=a.if.call(t,t&&t.showRememberMe,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return' <form id="user-account-form"></form> '}function o(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.showWhySignIn,{hash:{},inverse:p.program(6,u,t),fn:p.program(4,l,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function l(e,t){var a="";return a+=" <p>"+f(n(2).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(n(2).call(e,"Any connections between your media server and players WILL NOT BE SECURE",{
hash:{},data:t}))+"</li> <li>"+f(n(2).call(e,"You may experience degraded streaming performance",{hash:{},data:t}))+"</li> <li>"+f(n(2).call(e,"It will be more difficult, and sometimes impossible, to find your server and discover players",{hash:{},data:t}))+"</li> <li>"+f(n(2).call(e,"You will not be able to access your media server from outside your home",{hash:{},data:t}))+"</li> <li>"+f(n(2).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(n(2).call(e,"Sign In",{
hash:{},data:t}))+'</button></p> <p><a class="skip-btn" href="#">'+f(n(2).call(e,"Skip and accept limited functionality",{hash:{},data:t}))+"</a></p> </div> "}function u(e,t){var a="";return a+=' <div class="skip-sign-in-container"> <a class="why-sign-in-btn" href="#">'+f(n(2).call(e,"What's this?",{hash:{},data:t}))+"</a> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f=this.escapeExpression,p=this;return c+='<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"> ',
d=a.unless.call(t,t&&t.showWhySignIn,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" ",d=a.if.call(t,t&&t.showSkip,{hash:{},inverse:p.noop,fn:p.program(3,o,r),data:r}),(d||0===d)&&(c+=d),c+=" </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){function r(e,t){var a,i="";return i+='<span class="star"><i class="star-icon glyphicon ',a=n.if.call(e,e,{hash:{},inverse:d.program(4,o,t),fn:d.program(2,s,t),data:t}),(a||0===a)&&(i+=a),
i+='"></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),i=i||{};var l,u="",d=this;return l=n.each.call(t,t&&t.stars,{hash:{},inverse:d.noop,fn:d.program(1,r,i),data:i}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return c(n(2).call(e,"Play",{hash:{},data:t}))}function o(e,t){return c(n(2).call(e,"Play All",{
hash:{},data:t}))}function l(e,t){var a,i="";return i+=' <li><a class="download-btn secondary-only" href="'+c((a=e&&e.downloadUrl,typeof a===f?a.apply(e):a))+'" download="'+c((a=e&&e.downloadName,typeof a===f?a.apply(e):a))+'">'+c(n(2).call(e,"Download",{hash:{},data:t}))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c=this.escapeExpression,f="function",p=this;return d+='<ul class="nav action-bar-nav"> <li> <a class="play-btn btn-gray" href="#" title="',
u=a.if.call(t,t&&t.isSingleItem,{hash:{},inverse:p.program(3,o,r),fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-unwatched-btn btn-gray" href="#" title="'+c(n(2).call(t,"Play Unwatched",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+c(n(2).call(t,"Shuffle",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="play-trailer-btn btn-gray" href="#" title="'+c(n(2).call(t,"Play Trailer",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="plex-icon-play-strip"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+c(n(2).call(t,"Edit",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+c(n(2).call(t,"Add to playlist",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="refresh-btn btn-gray" href="#" title="'+c(n(2).call(t,"Refresh",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon repeat"></i></a> </li> <li> <a class="analyze-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Analyze",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon magic"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+c(n(2).call(t,"Mark as Watched",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+c(n(2).call(t,"Mark as Unwatched",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+c(n(2).call(t,"Select",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+c(n(2).call(t,"Deselect All",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+c(n(2).call(t,"Sync",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon download"></i></a> </li> <li> <a class="share-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Share",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon share"></i></a> </li> <li> <a class="recommend-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Recommend",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon share-alt"></i></a> </li> <li> <a class="delete-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Delete",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="delete-from-user-playlist-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Delete",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="info-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Info",{hash:{},data:r}))+'" 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="#">'+c(n(2).call(t,"Play Version...",{
hash:{},data:r}))+'</a></li> <li><a class="play-all-btn secondary-only" href="#">',u=a.if.call(t,t&&t.isSingleItem,{hash:{},inverse:p.program(3,o,r),fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='</a></li> <li><a class="play-next-btn secondary-only" href="#">'+c(n(2).call(t,"Play Next",{hash:{},data:r}))+'</a></li> <li><a class="add-to-queue-btn secondary-only" href="#">'+c(n(2).call(t,"Add to Queue",{hash:{},data:r}))+'</a></li> <li class="secondary-divider divider"></li> <li><a class="convert-btn" href="#">'+c(n(2).call(t,"Optimize...",{
hash:{},data:r}))+'</a></li> <li><a class="analyze-btn" href="#">'+c(n(2).call(t,"Analyze",{hash:{},data:r}))+'</a></li> <li><a class="match-btn secondary-only" href="#">'+c(n(2).call(t,"Match",{hash:{},data:r}))+'</a></li> <li><a class="fix-match-btn secondary-only" href="#">'+c(n(2).call(t,"Fix Incorrect Match",{hash:{},data:r}))+'</a></li> <li><a class="unmatch-btn secondary-only" href="#">'+c(n(2).call(t,"Unmatch",{hash:{},data:r}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+c(n(2).call(t,"Merge",{
hash:{},data:r}))+'</a></li> <li><a class="split-apart-btn secondary-only" href="#">'+c(n(2).call(t,"Split Apart",{hash:{},data:r}))+"</a></li> ",u=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:p.noop,fn:p.program(5,l,r),data:r}),(u||0===u)&&(d+=u),d+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+c(n(2).call(t,"Watch Later",{hash:{},data:r}))+'</a></li> <li><a class="share-btn" href="#">'+c(n(2).call(t,"Share",{hash:{},data:r}))+'</a></li> <li><a class="recommend-btn" href="#">'+c(n(2).call(t,"Recommend",{
hash:{},data:r}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+c(n(2).call(t,"Delete",{hash:{},data:r}))+'</a></li> <li><a class="delete-versions-btn has-danger secondary-only" href="#">'+c(n(2).call(t,"Delete Versions",{hash:{},data:r}))+'</a></li> <li><a class="delete-from-user-playlist-btn has-danger" href="#">'+c(n(2).call(t,"Delete",{hash:{},data:r}))+'</a></li> <li><a class="info-btn" href="#">'+c(n(2).call(t,"Info",{hash:{},data:r}))+"</a></li> </ul> </li> </ul> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="action-bar"> <ul class="nav action-bar-nav"> <li> <a class="options-btn btn-gray" href="#" title="'+o(n(2).call(t,"Options",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> </ul> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="action-bar"> <ul class="nav action-bar-nav"> <li> <a class="options-btn btn-gray" href="#" title="'+o(n(2).call(t,"Options",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> <li> <a class="play-btn btn-gray" href="#" title="'+o(n(2).call(t,"Play All",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+o(n(2).call(t,"Shuffle",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+o(n(2).call(t,"Add to playlist",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+o(n(2).call(t,"Select",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+o(n(2).call(t,"Deselect All",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+o(n(2).call(t,"Edit",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+o(n(2).call(t,"Mark as Watched",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+o(n(2).call(t,"Mark as Unwatched",{
hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+o(n(2).call(t,"Sync",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon download"></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="convert-btn secondary-only" href="#">'+o(n(2).call(t,"Optimize...",{
hash:{},data:r}))+'</a></li> <li><a class="refresh-btn secondary-only" href="#">'+o(n(2).call(t,"Refresh",{hash:{},data:r}))+'</a></li> <li><a class="analyze-btn secondary-only" href="#">'+o(n(2).call(t,"Analyze",{hash:{},data:r}))+'</a></li> <li><a class="add-to-collection-btn secondary-only" href="#">'+o(n(2).call(t,"Add to Collection...",{hash:{},data:r}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+o(n(2).call(t,"Merge",{hash:{},data:r}))+'</a></li> <li><a class="delete-btn has-danger secondary-only" href="#">'+o(n(2).call(t,"Delete",{
hash:{},data:r}))+"</a></li> </ul> </li> </ul> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this,d=this.escapeExpression;return l+='<ul class="nav nav-header pull-right"> <li class="alerts-nav-item"><a class="alerts-btn btn-gray ',o=n(15).call(t,t&&t.subset,"alerts",{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='" href="#!/status/alerts">'+d(n(2).call(t,"Alerts",{
hash:{},data:r}))+'</a></li> <li class="sync-nav-item"><a class="sync-btn btn-gray ',o=n(15).call(t,t&&t.subset,"sync",{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='" href="#!/status/sync">'+d(n(2).call(t,"Sync",{hash:{},data:r}))+'</a></li> <li class="conversion-nav-item"><a class="conversion-btn btn-gray ',o=n(15).call(t,t&&t.subset,"conversion",{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='" href="#!/status/conversion">'+d(n(2).call(t,"Conversion",{
hash:{},data:r}))+'<span class="badge"></span></a></li> <li class="now-playing-nav-item"><a class="now-playing-btn btn-gray ',o=n(15).call(t,t&&t.subset,"nowPlaying",{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='" href="#!/status/playing">'+d(n(2).call(t,"Now Playing",{hash:{},data:r}))+'<span class="badge"></span></a></li> </ul> <h2>'+d(n(2).call(t,"Status",{hash:{},data:r}))+'</h2> <div class="activity-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var i,r="";return r+=' <div class="filter-bar-right"> <span class="page-count">'+f(n(2).call(e,"{1} of {2}",e&&e.page,e&&e.pages,{hash:{},data:t}))+'</span> <a class="previous-btn btn-gray ',i=a.unless.call(e,e&&e.enablePrevious,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#"> <i class="glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray ',i=a.unless.call(e,e&&e.enableNext,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(i||0===i)&&(r+=i),
r+='" href="#"> <i class="glyphicon chevron-right"></i> </a> </div> '}function o(e,t){return"disabled"}function l(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">'+f(n(2).call(e,"Alerts are restricted from shared users.",{hash:{},data:t}))+"</h4> </div> </div> "}function u(e,t){return' <div class="alert-list-container"></div> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f=this.escapeExpression,p=this;
return c+='<div class="filter-bar"> ',d=a.unless.call(t,t&&t.shared,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" </div> ",d=a.if.call(t,t&&t.shared,{hash:{},inverse:p.program(6,u,r),fn:p.program(4,l,r),data:r}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <div class="filter-bar-right"> <button class="pause-btn btn btn-sm btn-default ',i=a.if.call(e,e&&e.isPaused,{
hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='">'+m(n(2).call(e,"Pause",{hash:{},data:t}))+'</button> <button class="resume-btn btn btn-sm btn-primary ',i=a.unless.call(e,e&&e.isPaused,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='">'+m(n(2).call(e,"Resume",{hash:{},data:t}))+"</button> </div> "}function o(e,t){return"hidden"}function l(e,t){var a,i="";return i+=' <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(n(2).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 u(e,t){var a="";return a+=' <p class="conversion-status-message">'+m(n(2).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:h.noop,fn:h.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+='"> <div class="conversion-queue-after-up-next-list-region"></div> '}function c(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center"> '+m(n(2).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),r=r||{};var f,p="",h=this,m=this.escapeExpression,v="function";
return p+='<div class="conversion-filter-bar filter-bar"> ',f=a.if.call(t,t&&t.hasPausedSetting,{hash:{},inverse:h.noop,fn:h.program(1,s,r),data:r}),(f||0===f)&&(p+=f),p+=" </div> ",f=a.if.call(t,t&&t.errorMessage,{hash:{},inverse:h.program(6,u,r),fn:h.program(4,l,r),data:r}),(f||0===f)&&(p+=f),p+=" ",f=a.if.call(t,t&&t.shouldShowList,{hash:{},inverse:h.program(10,c,r),fn:h.program(8,d,r),data:r}),(f||0===f)&&(p+=f),p+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){return' <div class="sessions-list-container"></div> '}function o(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,u,t),fn:m.program(4,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </h4> </div> "}function l(e,t){var a="";return a+=" "+h(n(2).call(e,"Now Playing is restricted from shared users.",{hash:{},data:t}))+" "}function u(e,t){var n;return n=a.if.call(e,e&&e.synced,{hash:{},inverse:m.program(9,c,t),
fn:m.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var a="";return a+=" "+h(n(2).call(e,"Now Playing is unavailable with synced servers.",{hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+h(n(2).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),r=r||{};var f,p="",h=this.escapeExpression,m=this;return p+='<div class="filter-bar"></div> ',f=a.if.call(t,t&&t.shouldShowList,{
hash:{},inverse:m.program(3,o,r),fn:m.program(1,s,r),data:r}),(f||0===f)&&(p+=f),p+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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"> '+o(n(2).call(t,"Nothing is synced to this device.",{
hash:{},data:r}))+' </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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return'<a class="edit-btn btn-gray" href="#"><i class="glyphicon pencil"></i></a>'}function o(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.devices,{hash:{},inverse:P.program(14,h,t),fn:P.program(4,l,t),
data:t}),(n||0===n)&&(i+=n),i+=" "}function l(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:P.noop,fn:P.programWithDepth(5,u,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 u(e,t,i){var r,s="";return s+=' <li> <a class="card btn-gray ',r=n(15).call(e,(r=i&&i.selectedDevice,null==r||r===!1?r:r.id),e&&e.id,{hash:{},
inverse:P.noop,fn:P.program(6,d,t),data:t}),(r||0===r)&&(s+=r),s+='" data-id="'+w((r=e&&e.id,typeof r===b?r.apply(e):r))+'" href="#"> ',r=a.if.call(e,e&&e.name,{hash:{},inverse:P.program(10,f,t),fn:P.program(8,c,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:P.noop,fn:P.program(12,p,t),data:t}),(r||0===r)&&(s+=r),s+=" </a> </li> "}function d(e,t){return"selected"}function c(e,t){var n;return w((n=e&&e.name,typeof n===b?n.apply(e):n))}function f(e,t){var n;return w((n=e&&e.device,
typeof n===b?n.apply(e):n))}function p(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 h(e,t){var a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+w(n(2).call(e,"You have no sync capable devices.",{hash:{},data:t}))+"</h4> </div> "}function m(e,t){var n,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+w((n=e&&e.plexPassInfo,
n=null==n||n===!1?n:n.message,typeof n===b?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:P.noop,fn:P.program(17,v,t),data:t}),(n||0===n)&&(i+=n),i+='"> <a class="btn btn-sm btn-primary" href="'+w((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.url,typeof n===b?n.apply(e):n))+'" target="'+w((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.target,typeof n===b?n.apply(e):n))+'">'+w((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.buttonText,
typeof n===b?n.apply(e):n))+"</a> </p> </div> "}function v(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var g,y="",b="function",w=this.escapeExpression,P=this;return y+='<div class="filter-bar"> <div class="filter-bar-right"> ',g=a.if.call(t,t&&t.hasTouchScreen,{hash:{},inverse:P.noop,fn:P.program(1,s,r),data:r}),(g||0===g)&&(y+=g),y+=' <a class="refresh-btn btn-gray" href="#"><i class="glyphicon repeat"></i></a> </div> </div> ',g=a.if.call(t,t&&t.allowSync,{
hash:{},inverse:P.program(16,m,r),fn:P.program(3,o,r),data:r}),(g||0===g)&&(y+=g),y+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=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:i}):(s=t&&t.message,r=typeof s===l?s.call(t,{
hash:{},data:i}):s),o+=u(r)+"</span> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"circle-ok"}function o(e,t){return"circle-exclamation-mark"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c="function";return u+='<button class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <i class="alert-icon glyphicon ',l=n(15).call(t,t&&t.type,"success",{hash:{},inverse:d.program(3,o,r),fn:d.program(1,s,r),
data:r}),(l||0===l)&&(u+=l),u+='"></i> <h4>',l=t&&t.message,l=typeof l===c?l.apply(t):l,(l||0===l)&&(u+=l),u+="</h4> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=' <a class="info-link link" href="'+d((a=e&&e.url,typeof a===u?a.apply(e):a))+'" target="_blank">'+d(n(2).call(e,"More Info",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u="function",d=this.escapeExpression,c=this;
return l+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+d((o=t&&t.content,typeof o===u?o.apply(t):o))+"</span> ",o=a.if.call(t,t&&t.url,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <span class="message">'+d(n(2).call(e,"An insecure media server has been found on your network.",{
hash:{},data:t}))+'</span> <a class="reload-link link" href="#">'+d(n(2).call(e,"Reload app insecurely",{hash:{},data:t}))+"</a> "}function o(e,t){var a="";return a+=' <span class="message">'+d(n(2).call(e,"An unclaimed media server has been found on your network.",{hash:{},data:t}))+'</span> <a class="claim-link link" href="#">'+d(n(2).call(e,"Claim it now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c=this;return u+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> ',
l=a.if.call(t,t&&t.showInsecureMessage,{hash:{},inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <a class="download-link link" href="#">'+f(n(2).call(e,"Download now",{hash:{},data:t}))+"</a> "}function o(e,t){var a;return a=n(15).call(e,e&&e.state,"downloaded",{hash:{},inverse:h.program(6,u,t),fn:h.program(4,l,t),data:t}),a||0===a?a:""}function l(e,t){
var a="";return a+=' <a class="install-link link" href="#">'+f(n(2).call(e,"Install now",{hash:{},data:t}))+"</a> "}function u(e,t){var a,i="";return i+=' <a class="link" href="'+f((a=e&&e.downloadURL,typeof a===p?a.apply(e):a))+'" target="_blank">'+f(n(2).call(e,"Download now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f=this.escapeExpression,p="function",h=this;return c+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+f(n(2).call(t,"A Plex Media Server update is available!",{
hash:{},data:r}))+"</span> ",d=n(15).call(t,t&&t.state,"available",{hash:{},inverse:h.program(3,o,r),fn:h.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<i class="alert-icon glyphicon cardio"></i> <span class="status"></span> '})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return'<a class="settings-btn btn-gray" href="#"><i class="glyphicon cogwheel"></i></a>';
}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c=this.escapeExpression,f="function";return u+='<div class="breadcrumb-actions pull-right"> ',l=a.if.call(t,t&&t.showSettings,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' <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="#">'+c(n(2).call(t,"Posters",{
hash:{},data:r}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(63).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+c(n(2).call(t,"Details",{hash:{},data:r}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(63).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+c(n(2).call(t,"List",{
hash:{},data:r}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(63).call(t,t&&t.listType,"media-list",{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"><a href="'+c((l=t&&t.channelUrl,typeof l===f?l.apply(t):l))+'">'+c((l=t&&t.channelTitle,typeof l===f?l.apply(t):l))+'</a></span> <span class="breadcrumb-subset-dropdown ',l=a.unless.call(t,t&&t.title,{hash:{},inverse:d.noop,fn:d.program(3,o,r),
data:r}),(l||0===l)&&(u+=l),u+='"><span class="dropdown-placeholder">'+c((l=t&&t.title,typeof l===f?l.apply(t):l))+'</span></span> <span class="list-badge badge badge-lg">'+c((l=t&&t.totalSize,typeof l===f?l.apply(t):l))+"</span> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=' <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(n(2).call(e,"Posters",{
hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=n(63).call(e,e&&e.listType,"episode-tile-list",{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i></a></li> <li><a class="list-btn" data-type="episode-details-list" href="#">'+v(n(2).call(e,"Details",{hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=n(63).call(e,e&&e.listType,"episode-details-list",{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i></a></li> <li><a class="list-btn" data-type="episode-list" href="#">'+v(n(2).call(e,"List",{
hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',a=n(63).call(e,e&&e.listType,"episode-list",{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i></a></li> </ul> </span> '}function o(e,t){return"hidden"}function l(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:g.program(7,d,t),fn:g.program(5,u,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:g.noop,fn:g.program(9,c,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.each.call(e,e&&e.sections,{hash:{},inverse:g.noop,fn:g.programWithDepth(12,p,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> </span> "}function u(e,t){var n,a="";return a+=' <a class="section-btn btn-gray" data-key="'+v((n=e&&e.section,n=null==n||n===!1?n:n.key,typeof n===y?n.apply(e):n))+'" href="#">'+v((n=e&&e.section,n=null==n||n===!1?n:n.title,typeof n===y?n.apply(e):n))+"</a> "}function d(e,t){
var a="";return a+=' <a class="playlists-btn btn-gray" href="#">'+v(n(2).call(e,"Playlists",{hash:{},data:t}))+"</a> "}function c(e,t){var i,r="";return r+=' <li><a class="playlists-btn" href="#"><span class="dropdown-truncated-label">'+v(n(2).call(e,"Playlists",{hash:{},data:t}))+"</span>",i=a.unless.call(e,(i=e&&e.section,null==i||i===!1?i:i.key),{hash:{},inverse:g.noop,fn:g.program(10,f,t),data:t}),(i||0===i)&&(r+=i),r+="</a></li> "}function f(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>';
}function p(e,t,a){var i,r="";return r+=' <li><a class="section-btn" data-key="'+v((i=e&&e.key,typeof i===y?i.apply(e):i))+'" href="#"><span class="dropdown-truncated-label">'+v((i=e&&e.title,typeof i===y?i.apply(e):i))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',i=n(63).call(e,(i=a&&a.section,null==i||i===!1?i:i.key),e&&e.key,{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i></a></li> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};
var h,m="",v=this.escapeExpression,g=this,y="function";return m+='<div class="breadcrumb-actions pull-right"> ',h=a.if.call(t,t&&t.listType,{hash:{},inverse:g.noop,fn:g.program(1,s,r),data:r}),(h||0===h)&&(m+=h),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> ',h=a.if.call(t,t&&t.showSectionDropdown,{hash:{},inverse:g.noop,fn:g.program(4,l,r),data:r}),(h||0===h)&&(m+=h),
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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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="#">'+u(n(2).call(e,"Import from iTunes",{
hash:{},data:t}))+"</a></li> </ul> </span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d=this,c="function";return l+='<div class="breadcrumb-actions pull-right"> ',o=a.if.call(t,t&&t.canImportPlaylists,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' </div> <span class="breadcrumb-dropdown"></span> <span class="breadcrumb-subset-dropdown"></span> <span class="breadcrumb-items-dropdown"> <span class="items-badge badge badge-lg">'+u((o=t&&t.totalSize,
typeof o===c?o.apply(t):o))+"</span> </span> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <a class="update-btn btn-gray btn-loading btn-loading-replace btn-loading-static ',i=a.if.call(e,e&&e.refreshing,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#" title="'+p((i=e&&e.updateTitle,typeof i===f?i.apply(e):i))+'" data-title-alt="'+p((i=e&&e.updateTitleAlt,typeof i===f?i.apply(e):i))+'" data-toggle="tooltip"> <span class="loading loading-bc"></span> <i class="btn-label-alt glyphicon ban"></i> <i class="btn-label glyphicon repeat"></i> </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="edit-btn btn-gray" href="#">'+p(n(2).call(e,"Edit Library",{
hash:{},data:t}))+'</a></li> <li><a class="share-btn" href="#">'+p(n(2).call(e,"Share...",{hash:{},data:t}))+'</a></li> <li><a class="analyze-btn" href="#">'+p(n(2).call(e,"Analyze",{hash:{},data:t}))+'</a></li> <li><a class="force-refresh-btn" href="#">'+p(n(2).call(e,"Refresh All",{hash:{},data:t}))+'</a></li> <li><a class="empty-trash-btn" href="#">'+p(n(2).call(e,"Empty Trash",{hash:{},data:t}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+p(n(2).call(e,"Delete Library",{hash:{},
data:t}))+"</a></li> </ul> </span> "}function o(e,t){return"active"}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c=this,f="function",p=this.escapeExpression;return d+='<div class="breadcrumb-actions pull-right"> ',u=a.unless.call(t,t&&t.limited,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=' <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="media-tile-list" href="#">'+p(n(2).call(t,"Posters",{
hash:{},data:r}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(63).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:c.noop,fn:c.program(4,l,r),data:r}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+p(n(2).call(t,"Details",{hash:{},data:r}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(63).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:c.noop,fn:c.program(4,l,r),data:r}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+p(n(2).call(t,"List",{
hash:{},data:r}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(63).call(t,t&&t.listType,"media-list",{hash:{},inverse:c.noop,fn:c.program(4,l,r),data:r}),(u||0===u)&&(d+=u),d+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"></span> <span class="breadcrumb-subset-dropdown"></span> <span class="breadcrumb-type-dropdown"></span> <span class="breadcrumb-items-dropdown"> <span class="items-badge badge badge-lg">'+p((u=t&&t.totalSize,typeof u===f?u.apply(t):u))+"</span> </span> ";
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t,a){var i,r="";return r+=' <li><a class="card btn-gray ',i=n(15).call(e,a&&a.currentKey,e&&e.key,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#!/server/'+c(n(61).call(e,a&&a.serverID,{hash:{},data:t}))+"/directory/"+c(n(61).call(e,e&&e.key,{hash:{},data:t}))+'">'+c(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</a></li> "}function o(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c=this.escapeExpression;return u+="<h2>"+c(n(2).call(t,"Channel Directory",{hash:{},data:r}))+'</h2> <div class="filter-bar"> <a class="btn btn-sm btn-default pull-right" href="#!/server/'+c(n(61).call(t,t&&t.serverID,{hash:{},data:r}))+'/channels">'+c(n(2).call(t,"Browse Channels",{hash:{},data:r}))+'</a> </div> <div class="row"> <div class="col-md-3"> <ul class="nav nav-cards"> ',l=a.each.call(t,t&&t.directories,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,s,r,t),
data:r}),(l||0===l)&&(u+=l),u+=' </ul> </div> <div class="directory-container col-md-9"></div> </div> '})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,a="";return a+='<span class="badge">'+h((n=e&&e.allCount,typeof n===p?n.apply(e):n))+"</span>"}function o(e,t){var n,a="";return a+='<span class="badge">'+h((n=e&&e.videoCount,typeof n===p?n.apply(e):n))+"</span>"}function l(e,t){var n,a="";return a+='<span class="badge">'+h((n=e&&e.musicCount,
typeof n===p?n.apply(e):n))+"</span>"}function u(e,t){var n,a="";return a+='<span class="badge">'+h((n=e&&e.photoCount,typeof n===p?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/'+h(n(61).call(e,e&&e.serverID,{hash:{},data:t}))+'/directory">'+h(n(2).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">'+h(n(2).call(e,"Check for Updates",{
hash:{},data:t}))+"</span> </a> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var c,f="",p="function",h=this.escapeExpression,m=this;return f+='<ul class="nav nav-header pull-right"> <li><a class="all-btn btn-gray selected" href="#">'+h(n(2).call(t,"All",{hash:{},data:r})),c=a.if.call(t,t&&t.allCount,{hash:{},inverse:m.noop,fn:m.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+='</a></li> <li><a class="video-btn btn-gray" href="#">'+h(n(2).call(t,"Video",{hash:{},data:r})),
c=a.if.call(t,t&&t.videoCount,{hash:{},inverse:m.noop,fn:m.program(3,o,r),data:r}),(c||0===c)&&(f+=c),f+='</a></li> <li><a class="music-btn btn-gray" href="#">'+h(n(2).call(t,"Music",{hash:{},data:r})),c=a.if.call(t,t&&t.musicCount,{hash:{},inverse:m.noop,fn:m.program(5,l,r),data:r}),(c||0===c)&&(f+=c),f+='</a></li> <li><a class="photo-btn btn-gray" href="#">'+h(n(2).call(t,"Photo",{hash:{},data:r})),c=a.if.call(t,t&&t.photoCount,{hash:{},inverse:m.noop,fn:m.program(7,u,r),data:r}),(c||0===c)&&(f+=c),
f+="</a></li> </ul> <h2>"+h(n(2).call(t,"Channels",{hash:{},data:r}))+"</h2> ",c=a.unless.call(t,t&&t.shared,{hash:{},inverse:m.noop,fn:m.program(9,d,r),data:r}),(c||0===c)&&(f+=c),f+=' <div class="channels-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var o,l,u="",d="function",c=this.escapeExpression,f=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:i}):(l=t&&t.serverID,o=typeof l===d?l.call(t,{hash:{},data:i}):l),u+=c(o)+"/details/",(l=n.parentKey)?o=l.call(t,{hash:{},data:i}):(l=t&&t.parentKey,
o=typeof l===d?l.call(t,{hash:{},data:i}):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:f.program(3,s,i),fn:f.program(1,r,i),data:i}),(o||0===o)&&(u+=o),u+=" </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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 o(e,t){
return' <div class="artist-poster item-poster media-poster"></div> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c=this;return u+='<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(n(2).call(t,"Popular Tracks",{
hash:{},data:r}))+'</h3> </div> <div class="albums-region details-list-region"> <h3 class="albums-header">'+d(n(2).call(t,"Albums",{hash:{},data:r}))+'</h3> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+d(n(2).call(t,"Music Videos",{hash:{},data:r}))+'</h3> </div> <div class="concert-region hidden"> <h3 class="concert-header"> '+d(n(2).call(t,"On Tour",{hash:{},data:r}))+'<div class="concert-api-logo"></div> </h3> </div> <div class="similar-artists-region hidden"> <h3 class="similar-artists-header">'+d(n(2).call(t,"Similar Artists",{
hash:{},data:r}))+'</h3> </div> </div> <div class="details-poster-container"> ',l=a.if.call(t,t&&t.canPlay,{hash:{},inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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">'+o(n(2).call(t,"Director",{
hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Writer",{hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Cast",{hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+o(n(2).call(t,"Audio",{
hash:{},data:r}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Subtitles",{hash:{},data:r}))+'</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> ';
})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l="function",u=this.escapeExpression;return o+='<div class="details-title-container"> <h1><a class="show-title btn-metadata-link" href="#!/server/'+u((s=t&&t.serverID,typeof s===l?s.apply(t):s))+"/details/"+u((s=t&&t.grandparentKey,typeof s===l?s.apply(t):s))+'"></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(n(2).call(t,"Unwatched",{
hash:{},data:r}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+u(n(2).call(t,"Unavailable",{hash:{},data:r}))+'</a> </p> <div class="item-director metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Director",{hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Writer",{hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Cast",{
hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+u(n(2).call(t,"Audio",{hash:{},data:r}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Subtitles",{hash:{},data:r}))+'</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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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">'+o(n(2).call(t,"Unwatched",{
hash:{},data:r}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+o(n(2).call(t,"Unavailable",{hash:{},data:r}))+'</a> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Director",{hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Writer",{
hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Cast",{hash:{},data:r}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+o(n(2).call(t,"Audio",{hash:{},data:r}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Subtitles",{hash:{},data:r
}))+'</span> </div> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+o(n(2).call(t,"Extras",{hash:{},data:r}))+'</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){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s="",o="function",l=this.escapeExpression;return s+='<div class="photo-album-page '+l((r=t&&t.styles,r=null==r||r===!1?r:r.page,typeof r===o?r.apply(t):r))+'"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <div class="playlist-poster item-poster media-poster '+f((n=e&&e.type,
typeof n===c?n.apply(e):n))+'"> ',n=a.if.call(e,e&&e.smart,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function o(e,t){return' <span class="smart-badge badge badge-round"> <i class="icon glyphicon cogwheel"></i> </span> '}function l(e,t){var n,i="";return i+=" ",n=a.unless.call(e,e&&e.hasComposite,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+=" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c="function",f=this.escapeExpression,p=this;
return d+='<div class="details-title-container '+f((u=t&&t.type,typeof u===c?u.apply(t):u))+'"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container '+f((u=t&&t.type,typeof u===c?u.apply(t):u))+'"> <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">'+f(n(2).call(t,"Failed to load items for this playlist.",{
hash:{},data:r}))+'</h1> <div class="loading-container"> <div class="loading loading-inline"></div> </div> </div> <div class="details-poster-container '+f((u=t&&t.type,typeof u===c?u.apply(t):u))+'"> ',u=a.if.call(t,t&&t.hasComposite,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=' <div class="playlist-side-strip item-side-strip media-poster '+f((u=t&&t.type,typeof u===c?u.apply(t):u))+'"> ',u=a.if.call(t,t&&t.smart,{hash:{},inverse:p.noop,fn:p.program(4,l,r),data:r}),
(u||0===u)&&(d+=u),d+=" </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=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:i}):(s=t&&t.serverID,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+"/details/",(s=n.parentKey)?r=s.call(t,{
hash:{},data:i}):(s=t&&t.parentKey,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};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,i),fn:u.program(1,r,i),data:i}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>'+o(n(2).call(t,"This media type does not have a details page.",{hash:{},data:r}))+"</h1> </div> </div> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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){var a=n(4);
e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<p class="item-summary metadata-summary"></p> <div class="summary-divider hidden"> <button type="button" class="summary-divider-btn">'+o(n(2).call(t,"More",{hash:{},data:r}))+"</button> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,a="";return a+=' <li><a class="auto-match-agent" href="#" data-id="'+d((n=e&&e.identifier,
typeof n===u?n.apply(e):n))+'">'+d((n=e&&e.name,typeof n===u?n.apply(e):n))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<a class="dropdown-toggle" href="#auto-match-dropdown" data-toggle="dropdown">'+d(n(2).call(t,"Auto Match",{hash:{},data:r}))+' <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu"> ',o=a.each.call(t,t&&t.agents,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r
}),(o||0===o)&&(l+=o),l+=" </ul> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <a class="breadcrumb-btn btn-gray" data-key="'+h((n=e&&e.item,n=null==n||n===!1?n:n.key,typeof n===p?n.apply(e):n))+'" href="#"><span class="breadcrumb-truncated-label">'+h((n=e&&e.item,n=null==n||n===!1?n:n.title,typeof n===p?n.apply(e):n))+'</span></a> <a class="btn-gray dropdown-toggle split-dropdown-toggle" href="#'+h((n=e&&e.id,typeof n===p?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,o,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function o(e,t,a){var i,r="";return r+=' <li><a class="breadcrumb-btn" data-key="'+h((i=e&&e.key,typeof i===p?i.apply(e):i))+'" href="#"><span class="dropdown-truncated-label">'+h((i=e&&e.title,typeof i===p?i.apply(e):i))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',i=n(63).call(e,(i=a&&a.item,null==i||i===!1?i:i.key),e&&e.key,{hash:{},inverse:m.noop,fn:m.program(3,l,t),
data:t}),(i||0===i)&&(r+=i),r+='"></i></a></li> '}function l(e,t){return"hidden"}function u(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">'+h((n=e&&e.item,n=null==n||n===!1?n:n.title,typeof n===p?n.apply(e):n))+"</span> </a> "}function d(e,t){var n,a="";return a+='data-key="'+h((n=e&&e.item,n=null==n||n===!1?n:n.key,typeof n===p?n.apply(e):n))+'"';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var c,f="",p="function",h=this.escapeExpression,m=this;return c=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:m.program(5,u,r),fn:m.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+='<li><a class="download-btn" href="'+d((a=e&&e.downloadUrl,typeof a===u?a.apply(e):a))+'" download="'+d((a=e&&e.downloadName,typeof a===u?a.apply(e):a))+'" tabindex="-1">'+d(n(2).call(e,"Download",{
hash:{},data:t}))+"</a></li>"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<li><a class="play-version-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Version...",{hash:{},data:r}))+'</a></li> <li><a class="play-all-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play All",{hash:{},data:r}))+'</a></li> <li><a class="play-shuffled-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Shuffle",{hash:{},data:r}))+'</a></li> <li><a class="play-next-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Next",{
hash:{},data:r}))+'</a></li> <li><a class="add-to-queue-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Add to Queue",{hash:{},data:r}))+'</a></li> <li><a class="play-mix-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Plex Mix",{hash:{},data:r}))+'</a></li> <li><a class="play-trailer-btn play-primary-extra-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Trailer",{hash:{},data:r}))+'</a></li> <li><a class="play-music-video-btn play-primary-extra-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Music Video",{
hash:{},data:r}))+'</a></li> <li><a class="add-to-playlist-btn btn-link" href="#" tabindex="-1">'+d(n(2).call(t,"Add to Playlist...",{hash:{},data:r}))+'</a></li> <li class="divider"></li> <li><a class="refresh-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Refresh",{hash:{},data:r}))+'</a></li> <li><a class="mark-watched-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Mark as Watched",{hash:{},data:r}))+'</a></li> <li><a class="mark-unwatched-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Mark as Unwatched",{
hash:{},data:r}))+'</a></li> <li><a class="sync-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Sync...",{hash:{},data:r}))+'</a></li> <li><a class="convert-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Optimize...",{hash:{},data:r}))+"</a></li> ",o=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Watch Later",{hash:{},data:r}))+'</a></li> <li><a class="share-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Share...",{
hash:{},data:r}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Recommend...",{hash:{},data:r}))+'</a></li> <li><a class="delete-btn has-danger" href="#" tabindex="-1">'+d(n(2).call(t,"Delete",{hash:{},data:r}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Info",{hash:{},data:r}))+"</a></li> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
r=r||{};var s="",o=this.escapeExpression;return s+='<div class="play-queue-empty-message">'+o(n(2).call(t,"Nothing queued",{hash:{},data:r}))+"</div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}function o(e,t){return"readonly"}function l(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),r=r||{};var u,d="",c=this,f=this.escapeExpression;
return d+='<button class="btn-link dropdown-toggle ',u=a.unless.call(t,t&&t.canEdit,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),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 ',u=a.unless.call(t,t&&t.canEdit,{hash:{},inverse:c.noop,fn:c.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+='"> <li class="dropdown-header play-queue-header"> ',u=a.if.call(t,t&&t.canPlaylist,{
hash:{},inverse:c.noop,fn:c.program(5,l,r),data:r}),(u||0===u)&&(d+=u),d+=' <i class="glyphicon show-thumbnails-with-lines"></i> '+f(n(2).call(t,"Up Next",{hash:{},data:r}))+" </li> </ol> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<a class="play-queue-metadata-region" href="#"></a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){function r(e,t){
return' <button class="delete-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var s,o,l="",u="function",d=this.escapeExpression,c=this;return l+='<div class="media-poster ',(o=n.type)?s=o.call(t,{hash:{},data:i}):(o=t&&t.type,s=typeof o===u?o.call(t,{hash:{},data:i}):o),l+=d(s)+'"></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> ',
s=n.if.call(t,t&&t.canDelete,{hash:{},inverse:c.noop,fn:c.program(1,r,i),data:i}),(s||0===s)&&(l+=s),l+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+='<li><a class="download-btn" href="'+d((a=e&&e.downloadUrl,typeof a===u?a.apply(e):a))+'" download="'+d((a=e&&e.downloadName,typeof a===u?a.apply(e):a))+'" tabindex="-1">'+d(n(2).call(e,"Download",{hash:{},data:t}))+"</a></li>"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
r=r||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<li><a class="play-mix-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Plex Mix",{hash:{},data:r}))+'</a></li> <li><a class="add-to-playlist-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Add to Playlist...",{hash:{},data:r}))+'</a></li> <li class="divider"></li> <li><a class="sync-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Sync...",{hash:{},data:r}))+"</a></li> ",o=a.if.call(t,t&&t.downloadUrl,{hash:{},inverse:c.noop,fn:c.program(1,s,r),
data:r}),(o||0===o)&&(l+=o),l+=' <li><a class="share-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Share...",{hash:{},data:r}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Recommend...",{hash:{},data:r}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Info",{hash:{},data:r}))+"</a></li> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t,a){var i,r="";return r+=' <li><a href="#" class="type-btn" data-key="'+c((i=e&&e.key,
typeof i===d?i.apply(e):i))+'">'+c(n(2).call(e,e&&e.title,{hash:{},data:t}))+" ",i=n(15).call(e,(i=a&&a.currentType,null==i||i===!1?i:i.key),e&&e.key,{hash:{},inverse:f.noop,fn:f.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="</a></li> "}function o(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<a class="btn-gray dropdown-toggle" href="#playlist-type-dropdown" data-toggle="dropdown">'+c(n(2).call(t,(l=t&&t.currentType,
null==l||l===!1?l:l.title),{hash:{},data:r}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',l=a.each.call(t,t&&t.types,{hash:{},inverse:f.noop,fn:f.programWithDepth(1,s,r,t),data:r}),(l||0===l)&&(u+=l),u+=" </ul> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){function r(e,t){var a,i="";return i+=' <a class="dropdown-toggle ',a=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(a||0===a)&&(i+=a),i+='" href="#primary-player-dropdown" data-toggle="dropdown"> <i class="',
a=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i><i class="caret-icon"></i> </a> '}function s(e,t){return"active"}function o(e,t){return"plex-icon-companion-cast-active"}function l(e,t){return"plex-icon-companion-cast"}function u(e,t){var a,i="";return i+=' <a class="cast-btn ',a=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(a||0===a)&&(i+=a),i+="\" href='#'> <i class=\"",a=n.if.call(e,e&&e.primaryPlayer,{
hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i> </a> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var d,c="",f=this;return d=n.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(8,u,i),fn:f.program(1,r,i),data:i}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <li class="dropdown-header"><span class="dropdown-truncated-label">',
i=a.if.call(e,e&&e.nowPlaying,{hash:{},inverse:b.noop,fn:b.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=g((i=e&&e.primaryPlayer,i=null==i||i===!1?i:i.name,typeof i===y?i.apply(e):i))+"</span></li> ",i=a.if.call(e,e&&e.showNowPlaying,{hash:{},inverse:b.noop,fn:b.program(4,l,t),data:t}),(i||0===i)&&(r+=i),r+=' <li> <a class="local-player-btn" href="#"> <i class="glyphicon ban"></i> '+g(n(2).call(e,"Disconnect",{hash:{},data:t}))+" </a> </li> "}function o(e,t){var a="";return a+=g(n(2).call(e,"Casting on",{
hash:{},data:t}))+" "}function l(e,t){var n,i="";return i+=" ",n=a.each.call(e,e&&e.nowPlaying,{hash:{},inverse:b.noop,fn:b.program(5,u,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var n,a="";return a+=' <li> <a class="now-playing-btn" data-id="'+g((n=e&&e.ratingKey,typeof n===y?n.apply(e):n))+'" href="#"> <i class="glyphicon play"></i> <span class="dropdown-truncated-label">'+g((n=e&&e.title,typeof n===y?n.apply(e):n))+"</span> </a> </li> "}function d(e,t){var i,r="";return r+=' <li class="dropdown-header primary-player"><a class="pull-right btn-grey refresh-btn"><i class="glyphicon repeat" href="#" tabindex="-1"></i></a> '+g(n(2).call(e,"Players",{
hash:{},data:t}))+'</li> <li class="divider"></li> ',i=a.if.call(e,e&&e.players,{hash:{},inverse:b.program(12,h,t),fn:b.program(8,c,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function c(e,t){var n,i="";return i+=" ",n=a.each.call(e,e&&e.players,{hash:{},inverse:b.noop,fn:b.program(9,f,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function f(e,t){var n,i="";return i+=' <li> <a class="plex-player-btn" data-id="'+g((n=e&&e.machineIdentifier,typeof n===y?n.apply(e):n))+'" href="#"> <i class="dropdown-item-icon plex-icon-companion-plex"></i> <span class="dropdown-truncated-label">'+g((n=e&&e.name,
typeof n===y?n.apply(e):n))+"</span> ",n=a.if.call(e,e&&e.selected,{hash:{},inverse:b.noop,fn:b.program(10,p,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function p(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function h(e,t){var a="";return a+=' <li class="dropdown-menu-item"> <a class="disabled">'+g(n(2).call(e,"No players found",{hash:{},data:t}))+"</a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var m,v="",g=this.escapeExpression,y="function",b=this;
return m=a.if.call(t,t&&t.primaryPlayer,{hash:{},inverse:b.program(7,d,r),fn:b.program(1,s,r),data:r}),(m||0===m)&&(v+=m),v+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <a class="dropdown-toggle" href="#primary-server-dropdown" data-toggle="dropdown"> <span class="dropdown-friendly-name">'+p((n=e&&e.currentServer,n=null==n||n===!1?n:n.friendlyName,typeof n===f?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:h.noop,fn:h.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function o(e,t,a){var i,r="";return r+=' <li><a data-id="'+p((i=e&&e.machineIdentifier,typeof i===f?i.apply(e):i))+'" href="#"><span class="dropdown-truncated-label">'+p((i=e&&e.friendlyName,typeof i===f?i.apply(e):i))+"</span>",i=n(15).call(e,(i=a&&a.currentServer,null==i||i===!1?i:i.machineIdentifier),e&&e.machineIdentifier,{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t
}),(i||0===i)&&(r+=i),r+="</a></li> "}function l(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t){var n,a="";return a+=' <span class="dropdown-placeholder"> <span class="dropdown-friendly-name">'+p((n=e&&e.currentServer,n=null==n||n===!1?n:n.friendlyName,typeof n===f?n.apply(e):n))+"</span> </span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f="function",p=this.escapeExpression,h=this;return d=a.if.call(t,t&&t.showDropdown,{hash:{},
inverse:h.program(5,u,r),fn:h.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <a class="dropdown-toggle" href="#section-dropdown" data-toggle="dropdown">'+p((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:h.noop,fn:h.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(i+=n),
i+=" ",n=a.each.call(e,e&&e.sections,{hash:{},inverse:h.noop,fn:h.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function o(e,t,i){var r,s="";return s+=' <li><a href="#!/server/'+p(n(61).call(e,i&&i.serverID,{hash:{},data:t}))+'/playlists"><span class="dropdown-truncated-label">'+p(n(2).call(e,"Playlists",{hash:{},data:t}))+"</span>",r=a.unless.call(e,e&&e.currentSectionKey,{hash:{},inverse:h.noop,fn:h.program(3,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>'}function u(e,t,a){var i,r="";return r+=' <li><a href="#!/server/'+p(n(61).call(e,a&&a.serverID,{hash:{},data:t}))+"/section/"+p(n(61).call(e,e&&e.key,{hash:{},data:t}))+'"><span class="dropdown-truncated-label">'+p((i=e&&e.title,typeof i===m?i.apply(e):i))+"</span>",i=n(15).call(e,a&&a.currentSectionKey,e&&e.key,{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+="</a></li> "}function d(e,t){var n,a="";return a+=" "+p((n=e&&e.currentSectionTitle,
typeof n===m?n.apply(e):n))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var c,f="",p=this.escapeExpression,h=this,m="function";return c=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(7,d,r),fn:h.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <a class="btn-gray dropdown-toggle" href="#section-subset-dropdown" data-toggle="dropdown">'+p(n(2).call(e,(i=e&&e.currentSubset,
null==i||i===!1?i:i.title),{hash:{},data:t}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',i=a.each.call(e,e&&e.subsets,{hash:{},inverse:h.noop,fn:h.programWithDepth(2,o,t,e),data:t}),(i||0===i)&&(r+=i),r+=" </ul> "}function o(e,t,n){var i,r="";return r+=" ",i=a.if.call(e,e&&e.primary,{hash:{},inverse:h.noop,fn:h.programWithDepth(3,l,t,n),data:t}),(i||0===i)&&(r+=i),r+=" "}function l(e,t,a){var i,r="";return r+=' <li><a href="#!/server/'+p(n(61).call(e,a&&a.serverID,{hash:{},data:t
}))+"/section/"+p(n(61).call(e,a&&a.sectionID,{hash:{},data:t}))+"/"+p(n(61).call(e,e&&e.key,{hash:{},data:t}))+'">'+p(n(2).call(e,e&&e.title,{hash:{},data:t}))+" ",i=n(15).call(e,(i=a&&a.currentSubset,null==i||i===!1?i:i.key),e&&e.key,{hash:{},inverse:h.noop,fn:h.program(4,u,t),data:t}),(i||0===i)&&(r+=i),r+="</a></li> "}function u(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function d(e,t){var a,i="";return i+=' <span class="dropdown-placeholder">'+p(n(2).call(e,(a=e&&e.currentSubset,
null==a||a===!1?a:a.title),{hash:{},data:t}))+"</span> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var c,f="",p=this.escapeExpression,h=this;return c=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(6,d,r),fn:h.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<a class="btn-gray dropdown-toggle" href="#section-type-dropdown" data-toggle="dropdown">'+l(n(2).call(t,(s=t&&t.currentType,
null==s||s===!1?s:s.plural),{hash:{},data:r}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"></ul> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<a href="#">'+u(n(2).call(t,t&&t.plural,{hash:{},data:r}))+" ",o=a.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,
fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+="</a> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <a class="dropdown-toggle" href="#'+p((i=e&&e.type,typeof i===f?i.apply(e):i))+'-dropdown" data-toggle="dropdown"> '+p(n(307).call(e,e&&e.selectedStream,{hash:{},data:t}))+' <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',i=a.each.call(e,e&&e.streams,{hash:{},inverse:h.noop,fn:h.program(2,o,t),
data:t}),(i||0===i)&&(r+=i),r+=" </ul> "}function o(e,t){var i,r="";return r+=' <li> <a data-id="'+p((i=e&&e.id,typeof i===f?i.apply(e):i))+'" href="#"> '+p(n(307).call(e,e,{hash:{},data:t}))+" ",i=a.if.call(e,e&&e.selected,{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+=" </a> </li> "}function l(e,t){return' <i class="dropdown-selected-icon glyphicon ok-2"></i> '}function u(e,t){var a="";return a+=" "+p(n(307).call(e,e&&e.selectedStream,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var d,c="",f="function",p=this.escapeExpression,h=this;return d=a.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(5,u,r),fn:h.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=' <div class="row"> <div class="col-md-12 selectize"> '+f(n(24).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 o(e,t){var a,i="";return i+=' <div class="col-md-4"> '+f(n(24).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 l(e,t){return"9"}function u(e,t){return"5"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f=this.escapeExpression,p=this;return c+='<form class="edit-metadata-form"> ',d=a.if.call(t,t&&t.canReparent,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=' <div class="row"> <div class="col-md-12 selectize"> '+f(n(24).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:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(n(24).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:r}))+' </div> </div> <div class="row"> <div class="col-md-3"> <label>'+f(n(2).call(t,"Rating",{hash:{},data:r}))+'</label> <div class="rating-region"></div> </div> ',d=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:p.noop,fn:p.program(3,o,r),data:r}),(d||0===d)&&(c+=d),c+=' <div class="col-md-',d=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:p.program(7,u,r),fn:p.program(5,l,r),data:r}),(d||0===d)&&(c+=d),
c+=' "> '+f(n(24).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:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(n(24).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:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(n(24).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:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)},data:r}))+" </div> </div> </form> ";
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Artist",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),locked:(s=t&&t.locked,null==s||s===!1?s:s.title),
ratingKey:(s=t&&t.item,null==s||s===!1?s:s.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Sort Artist",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort),ratingKey:(s=t&&t.item,null==s||s===!1?s:s.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{
hash:{label:"Biography",name:"summary",value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=' <div class="row"> <div class="col-md-12"> '+u(n(24).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),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(n(24).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(n(24).call(t,"lockableTagInput",{
hash:{label:"Collections",name:"collection",attribute:"collections",locked:(o=t&&t.locked,null==o||o===!1?o:o.collection)},data:r}))+" </div> </div> ",o=a.if.call(t,t&&t.canEditSimilarArtists,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=" </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <div class="upload-artwork-container"> <div class="upload-prompt"> ',i=a.if.call(e,e&&e.showFileUpload,{
hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=' <a class="upload-url-btn" href="#">'+d(n(2).call(e,"enter a url",{hash:{},data:t}))+'</a> </div> <div class="upload-progress"> '+d(n(2).call(e,"Uploading artwork...",{hash:{},data:t}))+' </div> <div class="upload-success"> '+d(n(2).call(e,"this artwork was uploaded successfully",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(n(2).call(e,"{1}upload another{2}",'<a class="upload-back-btn" href="#">',"</a>",{
hash:{},data:t}))+' </div> <div class="upload-error"> '+d(n(2).call(e,"there was an error uploading this artwork",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(n(2).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(n(2).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(n(2).call(e,"enter to {1}upload{2}",'<a class="submit-url-btn" href="#">',"</a>",{
hash:{},data:t}))+'</div> <div class="pull-left">'+d(n(2).call(e,"esc to {1}cancel{2}",'<a class="cancel-url-btn" href="#">',"</a>",{hash:{},data:t}))+"</div> </div> </form> </div> "}function o(e,t){var a="";return a+=' <span class="artwork-file-container"> <input type="file" class="artwork-file-control" multiple> <a href="#">'+d(n(2).call(e,"choose an image",{hash:{},data:t}))+'</a> </span> <span class="upload-prompt-divider">&middot;</span> '+d(n(2).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),r=r||{};var l,u="",d=this.escapeExpression,c=this;return l=a.if.call(t,t&&t.showUpload,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' <div class="artwork-list-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{
hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),locked:(s=t&&t.locked,null==s||s===!1?s:s.title)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort)
},data:r}))+' </div> </div> <div class="row"> <div class="col-md-6"> '+l(n(24).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(s=t&&t.item,null==s||s===!1?s:s.rating),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.rating),locked:(s=t&&t.locked,null==s||s===!1?s:s.rating)},data:r}))+' </div> <div class="col-md-6"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(s=t&&t.item,null==s||s===!1?s:s.originallyAvailableAt),
placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.originallyAvailableAt),locked:(s=t&&t.locked,null==s||s===!1?s:s.originallyAvailableAt)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:r}))+" </div> </div> </form> ";
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||s===!1?s:s.writer)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{
hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||s===!1?s:s.director)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+="<h4>"+o(n(2).call(t,"Files",{hash:{},data:r}))+'</h4> <ul class="media-info-file-list"></ul> <div class="loading-container"><div class="loading"></div></div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return(s=n.file)?r=s.call(t,{hash:{},data:i}):(s=t&&t.file,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=" "+p(n(24).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 o(e,t){var a,i="";return i+=" "+p(n(24).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 l(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var a,i="";return i+=' <div class="col-md-6"> '+p(n(24).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),
r=r||{};var c,f="",p=this.escapeExpression,h=this;return f+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(c=t&&t.item,null==c||c===!1?c:c.title),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.title),locked:(c=t&&t.locked,null==c||c===!1?c:c.title),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(24).call(t,"lockableTextInput",{
hash:{label:"Sort Title",name:"titleSort",value:(c=t&&t.item,null==c||c===!1?c:c.titleSort),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.titleSort),locked:(c=t&&t.locked,null==c||c===!1?c:c.titleSort),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Original Title",name:"originalTitle",value:(c=t&&t.item,null==c||c===!1?c:c.originalTitle),placeholder:(c=t&&t.placeholders,
null==c||c===!1?c:c.originalTitle),locked:(c=t&&t.locked,null==c||c===!1?c:c.originalTitle),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',c=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(3,o,r),fn:h.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=' </div> <div class="col-md-4"> '+p(n(24).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(c=t&&t.item,null==c||c===!1?c:c.rating),placeholder:(c=t&&t.placeholders,
null==c||c===!1?c:c.rating),locked:(c=t&&t.locked,null==c||c===!1?c:c.rating)},data:r}))+' </div> <div class="col-md-4 selectize"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(c=t&&t.item,null==c||c===!1?c:c.contentRating),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.contentRating),locked:(c=t&&t.locked,null==c||c===!1?c:c.contentRating),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-',
c=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(7,u,r),fn:h.program(5,l,r),data:r}),(c||0===c)&&(f+=c),f+=' selectize"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Studio",name:"studio",value:(c=t&&t.item,null==c||c===!1?c:c.studio),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.studio),locked:(c=t&&t.locked,null==c||c===!1?c:c.studio),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+" </div> ",c=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.noop,
fn:h.program(9,d,r),data:r}),(c||0===c)&&(f+=c),f+=' </div> <div class="row"> <div class="col-md-12"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",value:(c=t&&t.item,null==c||c===!1?c:c.tagline),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.tagline),locked:(c=t&&t.locked,null==c||c===!1?c:c.tagline)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(c=t&&t.item,
null==c||c===!1?c:c.summary),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.summary),type:"textarea",rows:"5",locked:(c=t&&t.locked,null==c||c===!1?c:c.summary)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+l(n(24).call(t,"lockableTagInput",{
hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||s===!1?s:s.director)},data:r}))+' </div> <div class="col-md-6"> '+l(n(24).call(t,"lockableTagInput",{hash:{label:"Country",name:"country",attribute:"countries",locked:(s=t&&t.locked,null==s||s===!1?s:s.country)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)
},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||s===!1?s:s.writer)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||s===!1?s:s.collection)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);
e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),locked:(s=t&&t.locked,null==s||s===!1?s:s.title)},data:r}))+' </div> <div class="col-md-6"> '+l(n(24).call(t,"lockableTextInput",{
hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,
null==s||s===!1?s:s.summary)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-9"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),
locked:(s=t&&t.locked,null==s||s===!1?s:s.title)},data:r}))+' </div> <div class="col-md-3"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Year",name:"year",value:(s=t&&t.item,null==s||s===!1?s:s.year),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.year),locked:(s=t&&t.locked,null==s||s===!1?s:s.year)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),
placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:r}))+" </div> </div> </form> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"textInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"textInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,
null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5"},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",
value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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:p.program(4,l,t),fn:p.program(2,o,t),
data:t}),(n||0===n)&&(i+=n),i+=" </div> </div> </form> "}function o(e,t){var a,i="";return i+=" "+f(n(24).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 l(e,t){var a="";return a+=' <div class="form-group"> <label>'+f(n(2).call(e,"Labels",{hash:{},data:t}))+"</label> <p>"+f(n(2).call(e,"Labels require Plex Media Server {1} or later.",e&&e.labelsMinVersion,{hash:{},data:t}))+"</p> </div> "}function u(e,t){
var a,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+f(n(2).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="'+f((a=e&&e.plexPassUrl,typeof a===h?a.apply(e):a))+'" target="_blank">'+f(n(2).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f=this.escapeExpression,p=this,h="function";return d=a.if.call(t,t&&t.hasContentFilterFeature,{
hash:{},inverse:p.program(6,u,r),fn:p.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=" "+p(n(24).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 o(e,t){var a,i="";return i+=" "+p(n(24).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 l(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var a,i="";return i+=' <div class="col-md-6"> '+p(n(24).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),r=r||{};var c,f="",p=this.escapeExpression,h=this;return f+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",
value:(c=t&&t.item,null==c||c===!1?c:c.title),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.title),locked:(c=t&&t.locked,null==c||c===!1?c:c.title),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(c=t&&t.item,null==c||c===!1?c:c.titleSort),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.titleSort),locked:(c=t&&t.locked,
null==c||c===!1?c:c.titleSort),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',c=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(3,o,r),fn:h.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=' </div> <div class="col-md-4"> '+p(n(24).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(c=t&&t.item,null==c||c===!1?c:c.rating),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.rating),locked:(c=t&&t.locked,
null==c||c===!1?c:c.rating)},data:r}))+' </div> <div class="col-md-4 selectize"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(c=t&&t.item,null==c||c===!1?c:c.contentRating),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.contentRating),locked:(c=t&&t.locked,null==c||c===!1?c:c.contentRating),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(24).call(t,"lockableTextInput",{
hash:{label:"Original Title",name:"originalTitle",value:(c=t&&t.item,null==c||c===!1?c:c.originalTitle),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.originalTitle),locked:(c=t&&t.locked,null==c||c===!1?c:c.originalTitle),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-',c=a.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(7,u,r),fn:h.program(5,l,r),data:r}),(c||0===c)&&(f+=c),f+=' selectize"> '+p(n(24).call(t,"lockableTextInput",{
hash:{label:"Studio",name:"studio",value:(c=t&&t.item,null==c||c===!1?c:c.studio),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.studio),locked:(c=t&&t.locked,null==c||c===!1?c:c.studio),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:r}))+" </div> ",c=a.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.noop,fn:h.program(9,d,r),data:r}),(c||0===c)&&(f+=c),f+=' </div> <div class="row"> <div class="col-md-12"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",
value:(c=t&&t.item,null==c||c===!1?c:c.tagline),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.tagline),locked:(c=t&&t.locked,null==c||c===!1?c:c.tagline)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(n(24).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(c=t&&t.item,null==c||c===!1?c:c.summary),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.summary),type:"textarea",rows:"5",locked:(c=t&&t.locked,null==c||c===!1?c:c.summary)},data:r}))+" </div> </div> </form> ";
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{
hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||s===!1?s:s.collection)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=' <div class="row"> <div class="col-md-12 selectize"> '+u(n(24).call(e,"autocompleteTextInput",{hash:{label:"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"> '+u(n(24).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),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<form class="edit-metadata-form"> ',o=a.if.call(t,t&&t.canReparent,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' <div class="row"> <div class="col-md-12"> '+u(n(24).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:r}))+' </div> </div> <div class="row"> <div class="col-md-4"> <label>'+u(n(2).call(t,"Rating",{hash:{},data:r}))+'</label> <div class="rating-region"></div> </div> <div class="col-md-4"> '+u(n(24).call(t,"lockableNumericInput",{hash:{label:"Track",name:"index",value:(o=t&&t.item,null==o||o===!1?o:o.index),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.index),locked:(o=t&&t.locked,null==o||o===!1?o:o.index),disabled:t&&t.disableIndices},
data:r}))+' </div> <div class="col-md-4"> '+u(n(24).call(t,"lockableNumericInput",{hash:{label:"Disc",name:"parentIndex",value:(o=t&&t.item,null==o||o===!1?o:o.parentIndex),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.parentIndex),locked:(o=t&&t.locked,null==o||o===!1?o:o.parentIndex),disabled:t&&t.disableIndices},data:r}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(n(24).call(t,"lockableTextInput",{hash:{label:"Track Artist",name:"originalTitle",value:(o=t&&t.item,
null==o||o===!1?o:o.originalTitle),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.originalTitle),locked:(o=t&&t.locked,null==o||o===!1?o:o.originalTitle),ratingKey:(o=t&&t.item,null==o||o===!1?o:o.ratingKey)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(24).call(t,"lockableTagInput",{
hash:{label:"Moods",name:"mood",attribute:"moods",locked:(s=t&&t.locked,null==s||s===!1?s:s.mood)},data:r}))+" </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <div class="setup-agent-section"> <div class="setup-agent-title">'+d(n(2).call(e,"{1} Settings",e&&e.agentName,{hash:{},data:t}))+'</div> <p class="setup-agent-disclaimer">'+d(n(2).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"> ',i=a.each.call(e,e&&e.settings,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=" </div> </div> "}function o(e,t){var a="";return a+=" "+d(n(24).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c=this;return l=a.if.call(t,t&&t.settings,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" ";
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<form class="edit-section-type-form settings-container"> <p>'+o(n(2).call(t,"There was an error adding this library.",{hash:{},data:r}))+"</p> <p>"+o(n(2).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:r}))+"</p> </form>"})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<div class="filter-bar-right"> <a class="clear-filters-btn btn-gray" href="#"><i class="glyphicon remove-2"></i></a> </div> <h4>',(s=n.titles)?r=s.call(t,{hash:{},data:i}):(s=t&&t.titles,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+"</h4> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return' <i class="server-alert-icon glyphicon cogwheel"></i> '}function o(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"status",{hash:{},inverse:z.program(6,u,t),fn:z.program(4,l,t),data:t}),a||0===a?a:""}function l(e,t){return' <i class="server-alert-icon glyphicon bullhorn"></i> '}function u(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"playing",{hash:{},inverse:z.program(9,c,t),
fn:z.program(7,d,t),data:t}),a||0===a?a:""}function d(e,t){return' <i class="server-alert-icon glyphicon imac"></i> '}function c(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"websocket",{hash:{},inverse:z.program(13,h,t),fn:z.program(10,f,t),data:t}),a||0===a?a:""}function f(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:z.program(11,p,t),fn:z.program(4,l,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function p(e,t){return' <i class="server-alert-icon glyphicon warning-sign"></i> ';
}function h(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),0,{hash:{},inverse:z.program(16,v,t),fn:z.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=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),5,{hash:{},inverse:z.program(19,y,t),fn:z.program(17,g,t),data:t}),a||0===a?a:""}function g(e,t){return' <i class="server-alert-icon glyphicon ok-2"></i> '}function y(e,t){var a;
return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),6,{hash:{},inverse:z.program(22,w,t),fn:z.program(20,b,t),data:t}),a||0===a?a:""}function b(e,t){return' <i class="server-alert-icon glyphicon magic"></i> '}function w(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a.state),9,{hash:{},inverse:z.program(25,_,t),fn:z.program(23,P,t),data:t}),a||0===a?a:""}function P(e,t){return' <i class="server-alert-icon glyphicon bin"></i> '}function _(e,t){return' <i class="server-alert-icon glyphicon tags"></i> ';
}function S(e,t){var a,i="";return i+=" "+$(n(2).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 x(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"status",{hash:{},inverse:z.program(36,M,t),fn:z.program(30,C,t),data:t}),a||0===a?a:""}function C(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:z.program(33,k,t),fn:z.program(31,T,t),
data:t}),(n||0===n)&&(i+=n),i+=" "}function T(e,t){var a,i="";return i+=" "+$(n(2).call(e,(a=e&&e.event,null==a||a===!1?a:a.message),{hash:{},data:t}))+" "}function k(e,t){var i,r="";return r+=" "+$(n(2).call(e,(i=e&&e.event,null==i||i===!1?i:i.title),{hash:{},data:t})),i=a.if.call(e,(i=e&&e.event,null==i||i===!1?i:i.description),{hash:{},inverse:z.noop,fn:z.program(34,I,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function I(e,t){var a,i="";return i+=": "+$(n(2).call(e,(a=e&&e.event,null==a||a===!1?a:a.description),{
hash:{},data:t}))}function M(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"timeline",{hash:{},inverse:z.program(39,E,t),fn:z.program(37,A,t),data:t}),a||0===a?a:""}function A(e,t){var a,i="";return i+=" "+$(n(2).call(e,(a=e&&e.event,null==a||a===!1?a:a.stateString),{hash:{},data:t}))+' <a href="#!/server/'+$(n(61).call(e,e&&e.serverID,{hash:{},data:t}))+"/details/"+$(n(61).call(e,e&&e.itemKey,{hash:{},data:t}))+'">'+$((a=e&&e.event,a=null==a||a===!1?a:a.mediaTitle,typeof a===V?a.apply(e):a))+"</a> "+$(n(2).call(e,"in",{
hash:{},data:t}))+' <a href="#!/server/'+$(n(61).call(e,e&&e.serverID,{hash:{},data:t}))+"/section/"+$(n(61).call(e,(a=e&&e.event,null==a||a===!1?a:a.sectionID),{hash:{},data:t}))+'">'+$((a=e&&e.event,a=null==a||a===!1?a:a.sectionTitle,typeof a===V?a.apply(e):a))+"</a> "}function E(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"playing",{hash:{},inverse:z.program(42,D,t),fn:z.program(40,O,t),data:t}),a||0===a?a:""}function O(e,t){var a,i="";return i+=" "+$(n(2).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 D(e,t){var a;return a=n(15).call(e,(a=e&&e.event,null==a||a===!1?a:a._type),"websocket",{hash:{},inverse:z.noop,fn:z.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:z.program(46,N,t),fn:z.program(44,L,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function L(e,t){
var a="";return a+=" "+$(n(2).call(e,"Opened connection to {1}, listening for events.",e&&e.serverName,{hash:{},data:t}))+" "}function N(e,t){var n;return n=a.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.closed),{hash:{},inverse:z.program(49,U,t),fn:z.program(47,j,t),data:t}),n||0===n?n:""}function j(e,t){var a="";return a+=" "+$(n(2).call(e,"Connection to {1} closed.",e&&e.serverName,{hash:{},data:t}))+" "}function U(e,t){var a="";return a+=" "+$(n(2).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),r=r||{};var F,B="",z=this,$=this.escapeExpression,V="function";return B+='<div class="striped-list-inner-item alert-list-inner-item"> ',F=n(15).call(t,(F=t&&t.event,null==F||F===!1?F:F._type),"setting",{hash:{},inverse:z.program(3,o,r),fn:z.program(1,s,r),data:r}),(F||0===F)&&(B+=F),B+=' <div class="server-alert-details"> <span class="server-alert-time">'+$(n(472).call(t,(F=t&&t.event,null==F||F===!1?F:F.time),"LT",{
hash:{},data:r}))+"</span> ",F=n(15).call(t,(F=t&&t.event,null==F||F===!1?F:F._type),"setting",{hash:{},inverse:z.program(29,x,r),fn:z.program(27,S,r),data:r}),(F||0===F)&&(B+=F),B+=" </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> '+o(n(2).call(t,"Nothing is currently being played.",{
hash:{},data:r}))+" </h4> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hide-actions"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',l=a.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="'+f((l=t&&t.url,typeof l===c?l.apply(t):l))+'"> <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 ',
l=a.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),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="info-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon circle-info"></i></button> </div> <button class="close-btn btn-link btn-gray" href="#"><i class="glyphicon remove-2"></i></button> <i class="device-icon"></i> <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">'+f(n(2).call(t,"Video",{
hash:{},data:r}))+'</span> <span class="session-transcode-video-decision"></span> </p> <p class="session-transcode-audio"> <span class="session-transcode-label">'+f(n(2).call(t,"Audio",{hash:{},data:r}))+'</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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var l,u="",d=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:d.program(3,s,i),fn:d.program(1,r,i),data:i}),(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:d.noop,fn:d.program(5,o,i),data:i}),(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:d.noop,fn:d.program(5,o,i),data:i}),(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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <i class="glyphicon cloud-download"></i> <span class="cloud-sync-waiting">'+d(n(2).call(e,"Waiting to be uploaded",{hash:{},data:t}))+'</span> <span class="cloud-sync-uploading hidden">'+d(n(2).call(e,"Uploading",{hash:{},data:t}))+' &middot; <span class="transcode-progress"></span>%</span> '}function o(e,t){var a="";return a+=' <i class="glyphicon circle-arrow-down"></i> '+d(n(2).call(e,"Waiting to be downloaded",{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c=this;return u+='<div class="media-poster"></div> <p class="title"></p> <p class="complete-subtitle subtitle hidden"> <i class="glyphicon ok-2"></i> '+d(n(2).call(t,"Synced",{hash:{},data:r}))+' </p> <p class="waiting-subtitle subtitle hidden"> ',l=a.if.call(t,t&&t.isCloudSync,{hash:{},inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' </p> <p class="downloading-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(n(2).call(t,"Downloading",{
hash:{},data:r}))+' &middot; <span class="transcode-progress"></span>% </p> <p class="converting-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(n(2).call(t,"Converting",{hash:{},data:r}))+' &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(n(2).call(t,"Waiting to be converted",{hash:{},data:r}))+' </p> <p class="unknown-subtitle subtitle hidden"> <i class="glyphicon circle-question-mark"></i> '+d(n(2).call(t,"Unknown",{
hash:{},data:r}))+' </p> <p class="failed-subtitle subtitle hidden"> <i class="glyphicon warning-sign"></i> <span class="error-message"></span> </p> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+o(n(2).call(t,"Conversions for sync and media optimization will appear here.",{hash:{},
data:r}))+"</p> <p>"+o(n(2).call(t,"Manage your optimized versions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",t&&t.serverID,{hash:{},data:r}))+"</p> </h4> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var s,o,l="",u="function",d=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:i}):(o=t&&t.type,s=typeof o===u?o.call(t,{hash:{},data:i}):o),l+=d(s)+'"> <div class="media-actions media-reorder"> ',s=n.unless.call(t,t&&t.hideDragHandle,{hash:{},inverse:c.noop,fn:c.program(1,r,i),data:i}),(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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression,u="function";return o+='<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">'+l(n(2).call(t,"Converting",{hash:{},data:r}))+'</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> '+l(n(2).call(t,"Complete",{
hash:{},data:r}))+' </div> <div class="conversion-status-container conversion-status-disabled"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> '+l(n(2).call(t,"Deleted",{hash:{},data:r}))+' <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">'+l((s=t&&t.initialErrorMessage,
typeof s===u?s.apply(t):s))+'</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">'+l(n(2).call(t,"Waiting",{hash:{},data:r}))+"</span> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression;return o+='<a class="card-collapsed" href="#!/server/'+l(n(61).call(t,t&&t.serverID,{hash:{},data:r}))+"/directory/"+l(n(61).call(t,t&&t.currentKey,{hash:{},data:r}))+"/"+l(n(61).call(t,(s=t&&t.channel,null==s||s===!1?s:s.key),{hash:{},data:r}))+'"> <span class="media-title media-heading"></span> </a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
i=i||{},'<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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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,o,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 o(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),r=r||{};var l,u="",d=this,c=this.escapeExpression;return u+='<a class="media-poster-container" href="#!/server/'+c(n(61).call(t,t&&t.serverID,{
hash:{},data:r}))+"/channel/"+c(n(61).call(t,(l=t&&t.item,null==l||l===!1?l:l.key),{hash:{},data:r}))+'"> <div class="media-poster"> ',l=a.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' <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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,r,i),data:i}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:i}):(l=t&&t.url,o=typeof l===c?l.call(t,{hash:{},data:i}):l),u+=f(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:d.noop,fn:d.program(3,s,i),data:i}),(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){function r(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var s,o,l="",u=this,d="function",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,i),data:i}),(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:i}):(o=t&&t.index,s=typeof o===d?o.call(t,{hash:{},data:i}):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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<a class="artwork-option media-poster-container" data-rating-key="',(s=n.ratingKey)?r=s.call(t,{hash:{},data:i}):(s=t&&t.ratingKey,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+'" href="#"> <div class="media-poster"></div> </a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){
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),i=i||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,r,i),data:i}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:i}):(l=t&&t.url,o=typeof l===c?l.call(t,{hash:{},data:i}):l),u+=f(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:d.noop,fn:d.program(3,s,i),data:i}),(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,r,i),data:i}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:i}):(l=t&&t.url,
o=typeof l===c?l.call(t,{hash:{},data:i}):l),u+=f(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:d.noop,fn:d.program(3,s,i),data:i}),(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,r,i),data:i}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:i}):(l=t&&t.url,o=typeof l===c?l.call(t,{
hash:{},data:i}):l),u+=f(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:d.noop,fn:d.program(3,s,i),data:i}),(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<a class="media-poster-container play-btn" href="',(s=n.url)?r=s.call(t,{hash:{},data:i}):(s=t&&t.url,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"missing"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d="function",c=this;return l+='<div class="row disc-number hidden"> '+u(n(2).call(t,"Disc {1}",t&&t.parentIndex,{hash:{},data:r}))+' </div> <div class="row striped-list-inner-item"> <span class="col-xs-1 match-index"> '+u((o=t&&t.index,typeof o===d?o.apply(t):o))+'. </span> <span class="col-xs-11 match-track-name ',
o=a.unless.call(t,t&&t.matched,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='"> '+u((o=t&&t.name,typeof o===d?o.apply(t):o))+" </span> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="match-empty-message">'+o(n(2).call(t,"No matches found.",{hash:{},data:r}))+"</div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var n,a="";return a+=' <span class="match-name">'+f((n=e&&e.parentName,typeof n===c?n.apply(e):n))+'</span> &ndash; <span class="match-name">'+f((n=e&&e.name,typeof n===c?n.apply(e):n))+"</span> "}function o(e,t){var n,a="";return a+=' <span class="match-name">'+f((n=e&&e.name,typeof n===c?n.apply(e):n))+"</span> "}function l(e,t){var n,a="";return a+=' <span class="match-year">'+f((n=e&&e.year,typeof n===c?n.apply(e):n))+'</span> <span class="match-separator">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<a class="match-result col-xs-12" href="#"> <div class="row"> <div class="col-xs-9 match-title-info"> ',u=a.if.call(t,t&&t.parentName,{hash:{},inverse:p.program(3,o,r),fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=' </div> <div class="col-xs-3 match-score-info" title="'+f(n(2).call(t,"Score {1}",t&&t.normalizedScore,{hash:{},data:r}))+'"> ',u=a.if.call(t,t&&t.year,{hash:{},inverse:p.noop,fn:p.program(5,l,r),
data:r}),(u||0===u)&&(d+=u),d+=' <span class="match-score"><i class="match-score-icon glyphicon certificate"></i>'+f((u=t&&t.normalizedScore,typeof u===c?u.apply(t):u))+'</span> </div> </div> <div class="row match-extended-info hidden"> <div class="col-xs-4"> <img class="match-art" src="'+f((u=t&&t.thumb,typeof u===c?u.apply(t):u))+'"/> </div> <div class="col-xs-8 children-region"></div> </div> </a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){
return"show-actions"}function o(e,t){return"selected"}function l(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=n(15).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,f,t),fn:w.program(10,c,t),data:t}),a||0===a?a:""}function c(e,t){return' <span class="media-available-at"></span> '}function f(e,t){var a;return a=n(15).call(e,e&&e.sort,"rating",{hash:{},inverse:w.program(15,h,t),fn:w.program(13,p,t),data:t}),a||0===a?a:"";
}function p(e,t){return' <span class="media-rating"></span> '}function h(e,t){var a;return a=n(15).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.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=n(15).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,fn:w.program(19,g,t),data:t}),a||0===a?a:""}function g(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var y,b="",w=this,P="function",_=this.escapeExpression;return b+='<a class="media-list-inner-item ',y=a.if.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,s,r),data:r}),(y||0===y)&&(b+=y),b+=" ",y=a.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,o,r),data:r}),(y||0===y)&&(b+=y),b+='" href="'+_((y=t&&t.url,typeof y===P?y.apply(t):y))+'"> <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 ',
y=a.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(5,l,r),data:r}),(y||0===y)&&(b+=y),b+='"> <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"> ',
y=n(15).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,d,r),fn:w.program(7,u,r),data:r}),(y||0===y)&&(b+=y),b+=' </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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"show-actions"}function o(e,t){return"selected"}function l(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=n(15).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,f,t),fn:w.program(10,c,t),data:t}),a||0===a?a:""}function c(e,t){return' <span class="media-available-at"></span> '}function f(e,t){var a;return a=n(15).call(e,e&&e.sort,"rating",{
hash:{},inverse:w.program(15,h,t),fn:w.program(13,p,t),data:t}),a||0===a?a:""}function p(e,t){return' <span class="media-rating"></span> '}function h(e,t){var a;return a=n(15).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.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=n(15).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,fn:w.program(19,g,t),data:t}),a||0===a?a:""}function g(e,t){return' <span class="media-duration"></span> ';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var y,b="",w=this,P="function",_=this.escapeExpression;return b+='<a class="media-list-inner-item ',y=a.if.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,s,r),data:r}),(y||0===y)&&(b+=y),b+=" ",y=a.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,o,r),data:r}),(y||0===y)&&(b+=y),b+='" href="'+_((y=t&&t.url,typeof y===P?y.apply(t):y))+'"> <div class="media-actions ',y=a.unless.call(t,t&&t.showActions,{
hash:{},inverse:w.noop,fn:w.program(5,l,r),data:r}),(y||0===y)&&(b+=y),b+='"> <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"> ',
y=n(15).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,d,r),fn:w.program(7,u,r),data:r}),(y||0===y)&&(b+=y),b+=' </span> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="media-progress-track"></div> <div class="media-progress-pct"></div> '});
},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hide-actions"}function o(e,t){return"selected"}function l(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function d(e,t){var a;return a=n(15).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,f,t),fn:w.program(10,c,t),data:t}),a||0===a?a:""}function c(e,t){return' <span class="media-available-at"></span> '}function f(e,t){var a;return a=n(15).call(e,e&&e.sort,"rating",{
hash:{},inverse:w.program(15,h,t),fn:w.program(13,p,t),data:t}),a||0===a?a:""}function p(e,t){return' <span class="media-rating"></span> '}function h(e,t){var a;return a=n(15).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.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=n(15).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,fn:w.program(19,g,t),data:t}),a||0===a?a:""}function g(e,t){return' <span class="media-duration"></span> ';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var y,b="",w=this,P="function",_=this.escapeExpression;return b+='<a class="media-poster-container ',y=a.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,s,r),data:r}),(y||0===y)&&(b+=y),b+=" ",y=a.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,o,r),data:r}),(y||0===y)&&(b+=y),b+='" href="'+_((y=t&&t.url,typeof y===P?y.apply(t):y))+'"> <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 ',
y=a.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(5,l,r),data:r}),(y||0===y)&&(b+=y),b+='"> <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"> ',
y=n(15).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,d,r),fn:w.program(7,u,r),data:r}),(y||0===y)&&(b+=y),b+=' </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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
i=i||{},'<a class="playlist-metadata-region" href="#"></a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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 o(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 l(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 u(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),r=r||{};var c,f="",p="function",h=this.escapeExpression,m=this;return f+='<div class="show-actions playlist-inner-item '+h((c=t&&t.type,typeof c===p?c.apply(t):c))+'"> ',
c=a.if.call(t,t&&t.canEdit,{hash:{},inverse:m.noop,fn:m.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=' <div class="media-index media-heading secondary"> <i class="glyphicon volume-up"></i> </div> ',c=n(63).call(t,t&&t.type,"track",{hash:{},inverse:m.noop,fn:m.program(3,o,r),data:r}),(c||0===c)&&(f+=c),f+=" ",c=a.if.call(t,t&&t.canEdit,{hash:{},inverse:m.noop,fn:m.program(5,l,r),data:r}),(c||0===c)&&(f+=c),f+=' <div class="media-item '+h((c=t&&t.type,typeof c===p?c.apply(t):c))+" ",c=a.if.call(t,t&&t.canEdit,{
hash:{},inverse:m.noop,fn:m.program(7,u,r),data:r}),(c||0===c)&&(f+=c),f+='"> <div class="media-details"> <div class="media-detail media-heading"> <span class="media-title ',c=a.if.call(t,t&&t.hasDetails,{hash:{},inverse:m.noop,fn:m.program(9,d,r),data:r}),(c||0===c)&&(f+=c),f+='"></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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,r,i),data:i}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:i}):(l=t&&t.url,o=typeof l===c?l.call(t,{
hash:{},data:i}):l),u+=f(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:d.noop,fn:d.program(3,s,i),data:i}),(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<a class="playlist" data-id="',(s=n.ratingKey)?r=s.call(t,{hash:{},data:i}):(s=t&&t.ratingKey,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+'" href="#"> <span class="media-poster playlist-poster"></span> ',(s=n.title)?r=s.call(t,{hash:{},data:i}):(s=t&&t.title,r=typeof s===l?s.call(t,{
hash:{},data:i}):s),o+=u(r)+" </a>"})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"selected"}function o(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),r=r||{};var l,u="",d=this.escapeExpression,c=this;return u+='<div class="disc-number hidden"> '+d(n(2).call(t,"Disc {1}",'<span class="track-parent-index"></span>',{
hash:{},data:r}))+' </div> <div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',l=a.if.call(t,t&&t.selected,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#"> <div class="track-actions media-actions"> ',l=a.if.call(t,t&&t.showEdit,{hash:{},inverse:c.noop,fn:c.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+=' <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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+o(n(2).call(t,'Choose "Optimize..." on items in your library and optimized versions will appear here.',{hash:{},data:r}))+"</p> <p>"+o(n(2).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{
hash:{},data:r}))+"</p> </h4> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l="function",u=this.escapeExpression;return o+='<a class="show-actions playlist-inner-item '+u((s=t&&t.type,typeof s===l?s.apply(t):s))+'" 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(n(2).call(t,"Complete",{
hash:{},data:r}))+' </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(n(2).call(t,"Failed",{hash:{},data:r}))+'</span> </div> <div class="generator-status-container generator-status-converting"> <i class="generator-status-icon glyphicon restart"></i> '+u(n(2).call(t,"Converting",{hash:{},data:r}))+' </div> <div class="generator-status-container generator-status-pending"> <i class="generator-status-icon glyphicon clock"></i> '+u(n(2).call(t,"Waiting",{
hash:{},data:r}))+" </div> </div> </div> </div> </a> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=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:i}):(s=t&&t.title,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(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:i}):(s=t&&t.year,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+"</div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};
var r,s,o="",l="function",u=this.escapeExpression;return o+='<a class="btn-gray" href="#">',(s=n.title)?r=s.call(t,{hash:{},data:i}):(s=t&&t.title,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+"</a> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <div class="label-list-item"> <a class="new-filter-btn label label-btn label-default" href="#"><i class="label-icon glyphicon circle-plus"></i> '+d(n(2).call(e,"New Filter",{
hash:{},data:t}))+"</a> </div> "}function o(e,t){var a,i="";return i+=' <div class="label-list-item"> <a class="remove-filter-btn label label-btn label-primary" data-key="'+d((a=e&&e.key,typeof a===c?a.apply(e):a))+'" href="#"><i class="label-icon glyphicon circle-remove"></i> <span class="label-truncate">'+d(n(855).call(e,e&&e.titles,{hash:{},data:t}))+"</span></a> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c="function",f=this;return l=a.unless.call(t,t&&t.currentFilters,{
hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=a.each.call(t,t&&t.currentFilters,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"boolean-btn"}function o(e,t){return"filter-btn"}function l(e,t){return"selected"}function u(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f=this,p=this.escapeExpression;
return c+='<a class="',d=n(15).call(t,(d=t&&t.filter,null==d||d===!1?d:d.filterType),"boolean",{hash:{},inverse:f.program(3,o,r),fn:f.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" btn-gray ",d=a.if.call(t,t&&t.selected,{hash:{},inverse:f.noop,fn:f.program(5,l,r),data:r}),(d||0===d)&&(c+=d),c+='" href="#"> '+p(n(2).call(t,(d=t&&t.filter,null==d||d===!1?d:d.title),{hash:{},data:r}))+' <i class="selected-icon glyphicon ok-2 ',d=a.unless.call(t,t&&t.selected,{hash:{},inverse:f.noop,fn:f.program(7,u,r),
data:r}),(d||0===d)&&(c+=d),c+='"></i> </a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this,d="function",c=this.escapeExpression;return l+='<form id="filter-options-search-form" class="',o=a.unless.call(t,t&&t.showSearch,{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='"> <div class="form-group form-group-search"> <label class="control-label-search" for="filter-options-search"><i class="glyphicon search"></i></label> <input type="search" id="filter-options-search" class="form-control form-control-search" value="'+c((o=t&&t.query,
typeof o===d?o.apply(t):o))+'"> </div> </form> <div id="filter-options-loading" class="loading ',o=a.unless.call(t,t&&t.showLoading,{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='"></div> <ul class="list side-bar-list"> <li><a class="filter-options-deselect-btn btn-gray" href="#">'+c(n(2).call(t,"Deselect All",{hash:{},data:r}))+"</a> </ul> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"selected"}function o(e,t){
return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c=this.escapeExpression;return u+='<a class="filter-option-btn btn-gray ',l=a.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#"> '+c(n(2).call(t,(l=t&&t.filterOption,null==l||l===!1?l:l.title),{hash:{},data:r}))+' <i class="selected-icon glyphicon ok-2 ',l=a.unless.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),
(l||0===l)&&(u+=l),u+='"></i> </a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<a class="sort-btn btn-gray" href="#"> '+o(n(2).call(t,t&&t.title,{hash:{},data:r}))+' <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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){
function r(e,t){return"left-arrow"}function s(e,t){var a;return a=n.if.call(e,(a=e&&e.filePath,null==a||a===!1?a:a.home),{hash:{},inverse:m.program(6,l,t),fn:m.program(4,o,t),data:t}),a||0===a?a:""}function o(e,t){return"home"}function l(e,t){var a;return a=n.if.call(e,(a=e&&e.filePath,null==a||a===!1?a:a.network),{hash:{},inverse:m.program(9,d,t),fn:m.program(7,u,t),data:t}),a||0===a?a:""}function u(e,t){return"globe"}function d(e,t){var a;return a=n.if.call(e,e&&e.isRoot,{hash:{},inverse:m.program(12,f,t),
fn:m.program(10,c,t),data:t}),a||0===a?a:""}function c(e,t){return"hdd"}function f(e,t){return"folder-open"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var p,h="",m=this,v="function",g=this.escapeExpression;return h+='<a class="striped-list-item" href="#" data-key="'+g((p=t&&t.filePath,p=null==p||p===!1?p:p.key,typeof p===v?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:m.program(3,s,i),
fn:m.program(1,r,i),data:i}),(p||0===p)&&(h+=p),h+='"></i> '+g((p=t&&t.filePath,p=null==p||p===!1?p:p.title,typeof p===v?p.apply(t):p))+' <div class="loading loading-sm loading-inline hidden"></div> </a> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<a class="btn-gray" data-identifier="',(s=n.identifier)?r=s.call(t,{hash:{},data:i}):(s=t&&t.identifier,
r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+'" href="#">',(s=n.name)?r=s.call(t,{hash:{},data:i}):(s=t&&t.name,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+"</a> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"checked"}function o(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<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="'+c((l=t&&t.identifier,
typeof l===d?l.apply(t):l))+'"> <input id="'+c((l=t&&t.identifier,typeof l===d?l.apply(t):l))+'" name="'+c((l=t&&t.identifier,typeof l===d?l.apply(t):l))+'" type="checkbox" ',l=a.if.call(t,t&&t.enabled,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=a.if.call(t,t&&t.isPrimary,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+="> "+c(n(2).call(t,t&&t.name,{hash:{},data:r}))+" </label> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="row-padded"> <h4 class="text-muted text-center">'+o(n(2).call(t,"No devices found",{hash:{},data:r}))+"</h4> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="card card-device"> <i class="card-poster device-icon"></i> <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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<h4 class="text-muted text-center">'+o(n(2).call(t,"No friends yet. {1}Invite a friend{2} and share your libraries.",'<a class="invite-friend-btn" href="#">',"</a>",{hash:{},data:r}))+"</h4> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),i=i||{},'<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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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===g?n.apply(e):n))+" ",n=a.unless.call(e,e&&e.canEdit,{hash:{},inverse:y.noop,fn:y.program(2,o,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:y.program(6,u,t),fn:y.program(4,l,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function o(e,t){return"disabled"}function l(e,t){var a,i="";return i+=" "+v(n(2).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 u(e,t){var a,i="";return i+=" "+v(n(2).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===g?n.apply(e):n))+" ",n=a.unless.call(e,e&&e.canEdit,{hash:{},inverse:y.noop,fn:y.program(2,o,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:y.program(11,f,t),fn:y.program(9,c,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function c(e,t){var a,i="";return i+=" "+v(n(2).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 f(e,t){var a,i="";return i+=" "+v(n(2).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 p(e,t){var a="";return a+=' <p class="user-summary server-share-empty-message">'+v(n(2).call(e,"no shared libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var h,m="",v=this.escapeExpression,g="function",y=this;return h=a.if.call(t,(h=t&&t.shared,null==h||h===!1?h:h.numLibraries),{hash:{},inverse:y.noop,fn:y.program(1,s,r),data:r}),
(h||0===h)&&(m+=h),m+=" ",h=a.if.call(t,(h=t&&t.owned,null==h||h===!1?h:h.numLibraries),{hash:{},inverse:y.noop,fn:y.program(8,d,r),data:r}),(h||0===h)&&(m+=h),m+=" ",h=a.if.call(t,t&&t.showEmptyMessage,{hash:{},inverse:y.noop,fn:y.program(13,p,r),data:r}),(h||0===h)&&(m+=h),m+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <h4 class="text-muted text-center">'+d(n(2).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 o(e,t){var a,i="";return i+=' <h4 class="text-muted text-center">'+d(n(2).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===c?a.apply(e):a))+'" target="_blank">'+d(n(2).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c="function",f=this;
return l=a.if.call(t,t&&t.hasHomeFeature,{hash:{},inverse:f.program(3,o,r),fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' <ul class="list centered-home-user-container"></ul> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){function r(e,t){return'<div class="selected-user-icon"></div>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};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,i),data:i}),(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};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,i),data:i}),(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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=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:i}):(s=t&&t.icon,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+'"></i> <span class="section-title"></span> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}function o(e,t){var n,a="";return a+=' <h4><a href="'+f((n=e&&e.url,typeof n===c?n.apply(e):n))+'" target="_blank">'+f((n=e&&e.title,typeof n===c?n.apply(e):n))+'</a></h4> <a href="'+f((n=e&&e.url,typeof n===c?n.apply(e):n))+'" target="_blank"> <img class="thumb"/> </a> ';
}function l(e,t){var n,a="";return a+=" <h4>"+f((n=e&&e.title,typeof n===c?n.apply(e):n))+'</h4> <img class="thumb"/> '}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<div class="card card-announcement"> <div class="unread ',u=a.if.call(t,t&&t.read,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='"></div> ',u=a.if.call(t,t&&t.url,{hash:{},inverse:p.program(5,l,r),fn:p.program(3,o,r),data:r
}),(u||0===u)&&(d+=u),d+=' <div class="date">'+f(n(856).call(t,t&&t.notifyAt,{hash:{},data:r}))+'</div> <div class="description">',u=t&&t.content,u=typeof u===c?u.apply(t):u,(u||0===u)&&(d+=u),d+="</div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l="function",u=this.escapeExpression;return o+='<a class="friend" data-id="'+u((s=t&&t.recommendationsPlaylistId,typeof s===l?s.apply(t):s))+'" href="#"> <span class="media-poster user-poster"></span> '+u(n(309).call(t,t&&t.title,20,{
hash:{},data:r}))+" </a> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<a class="card card-user-playlist" href="',(s=n.url)?r=s.call(t,{hash:{},data:i}):(s=t&&t.url,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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> '+o(n(2).call(t,"Add Folder",{
hash:{},data:r}))+'</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="path-container col-md-7"></div> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+o(n(2).call(t,"Cancel",{hash:{},
data:r}))+'</button> <button type="submit" class="add-btn btn btn-primary">'+o(n(2).call(t,"Add",{hash:{},data:r}))+"</button> </div> </form> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <ul class="list select-list select-collections-list dark-scrollbar"> ',n=a.each.call(e,e&&e.collections,{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function o(e,t){var n,a="";return a+=' <li class="striped-list-item select-list-item"> <a class="collection" data-value="'+h((n=e&&e.key,
typeof n===p?n.apply(e):n))+'" href="#">'+h((n=e&&e.title,typeof n===p?n.apply(e):n))+"</a> </li> "}function l(e,t){var n;return n=a.if.call(e,e&&e.loading,{hash:{},inverse:m.program(7,d,t),fn:m.program(5,u,t),data:t}),n||0===n?n:""}function u(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function d(e,t){var a="";return a+=' <div class="empty-message">'+h(n(2).call(e,"There are no collections in this library.",{hash:{},data:t}))+"</div> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var c,f="",p="function",h=this.escapeExpression,m=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 folder-plus"></i> '+h(n(2).call(t,"Select a Collection",{hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',c=a.if.call(t,t&&t.collections,{
hash:{},inverse:m.program(4,l,r),fn:m.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=' <div class="message-container"> <input class="message form-control" placeholder="'+h(n(2).call(t,"New collection...",{hash:{},data:r}))+'"> </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">'+h(n(2).call(t,"Add",{hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return v(n(2).call(e,"Select a Playlist",{hash:{},data:t}))}function o(e,t){return v(n(2).call(e,"Create Playlist",{hash:{},data:t}))}function l(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.hasPlaylists,{hash:{},inverse:g.program(8,d,t),fn:g.program(6,u,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(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:g.program(11,f,t),fn:g.program(9,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function c(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function f(e,t){var a="";return a+=' <div class="empty-message">'+v(n(2).call(e,"There are no playlists on this server.",{hash:{},data:t}))+"</div> "}function p(e,t){return"only-control"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var h,m="",v=this.escapeExpression,g=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> ',
h=a.if.call(t,t&&t.showExisting,{hash:{},inverse:g.program(3,o,r),fn:g.program(1,s,r),data:r}),(h||0===h)&&(m+=h),m+=' </h4> </div> <div class="modal-body modal-body-scroll minimal-scroll"> ',h=a.if.call(t,t&&t.showExisting,{hash:{},inverse:g.noop,fn:g.program(5,l,r),data:r}),(h||0===h)&&(m+=h),m+=' <div class="message-container ',h=a.unless.call(t,t&&t.showExisting,{hash:{},inverse:g.noop,fn:g.program(13,p,r),data:r}),(h||0===h)&&(m+=h),m+='"> <input class="message form-control" placeholder="'+v(n(2).call(t,"New playlist...",{
hash:{},data:r}))+'"> </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(n(2).call(t,"Add",{hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=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> '+u((r=t&&t.agent,
r=null==r||r===!1?r:r.name,typeof r===l?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:i}):(s=t&&t.attribution,r=typeof s===l?s.call(t,{hash:{},data:i}):s),(r||0===r)&&(o+=r),o+="</p> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+='<button class="browse-btn btn btn-primary">'+u(n(2).call(e,"Browse",{hash:{},data:t
}))+"</button>"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d="function",c=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">'+u((o=t&&t.channel,o=null==o||o===!1?o:o.title,typeof o===d?o.apply(t):o))+'</h4> </div> <div class="modal-body"> <div class="channel-poster-container"> <div class="channel-poster media-poster"></div> <div class="installed-actions-container"> ',
o=a.unless.call(t,t&&t.agent,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' <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">'+u(n(2).call(t,"Update",{hash:{},data:r}))+'</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="#">'+u(n(2).call(t,"Restart",{
hash:{},data:r}))+'</a></li> <li><a class="reset-btn" href="#">'+u(n(2).call(t,"Reset",{hash:{},data:r}))+'</a></li> </ul> </div> <button class="uninstall-btn btn btn-danger btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(n(2).call(t,"Uninstall",{hash:{},data:r}))+'</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">'+u(n(2).call(t,"Install",{
hash:{},data:r}))+'</span> </button> </div> </div> <div class="channel-details"> '+u((o=t&&t.channel,o=null==o||o===!1?o:o.summary,typeof o===d?o.apply(t):o))+" </div> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" "+c(n(2).call(e,"Directory Settings",{hash:{},data:t}))+" "}function o(e,t){var a="";return a+=" "+c(n(2).call(e,"{1} Settings",e&&e.title,{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=" "+c(n(24).call(e,"setting",{
hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c=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 cogwheel"></i> ',u=n(15).call(t,t&&t.title,"Preferences...",{hash:{},inverse:f.program(3,o,r),fn:f.program(1,s,r),
data:r}),(u||0===u)&&(d+=u),d+=' </h4> </div> <form id="channel-settings-form"> <div class="modal-body settings-container"> ',u=a.each.call(t,t&&t.settings,{hash:{},inverse:f.noop,fn:f.program(5,l,r),data:r}),(u||0===u)&&(d+=u),d+=' </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+c(n(2).call(t,"Cancel",{hash:{},data:r}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(t,"Save",{
hash:{},data:r}))+"</span> </button> </div> </form> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+c(n(2).call(e,e&&e.cancelLabel,{hash:{},data:t}))+"</button> "}function o(e,t){return"btn-danger"}function l(e,t){return"btn-primary"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c=this.escapeExpression,f="function",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> '+c((u=t&&t.title,typeof u===f?u.apply(t):u))+'</h4> </div> <div class="modal-body"> <p class="confirm-message">'+c((u=t&&t.message,typeof u===f?u.apply(t):u))+'</p> <p class="double-confirm-message text-warning"></p> </div> <div class="modal-footer"> ',
u=a.unless.call(t,t&&t.hideCancel,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=' <button type="button" class="confirm-btn btn btn-lg ',u=a.if.call(t,t&&t.hasDanger,{hash:{},inverse:p.program(5,l,r),fn:p.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+=' btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(t,t&&t.confirmLabel,{hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item download-list-item"> <a class="media" data-value="'+h((n=null==t||t===!1?t:t.index,typeof n===p?n.apply(e):n))+'" href="'+h((n=e&&e.downloadUrl,typeof n===p?n.apply(e):n))+'" download="'+h((n=e&&e.downloadName,typeof n===p?n.apply(e):n))+'"> ',n=a.if.call(e,e&&e.title,{hash:{},inverse:m.noop,fn:m.program(2,o,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,l,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 o(e,t){var n,a="";return a+=" "+h((n=e&&e.title,typeof n===p?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function l(e,t){var i,r="";return r+=" "+h(n(474).call(e,e&&e.videoResolution,{hash:{},data:t})),i=a.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(5,u,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function u(e,t){
return","}function d(e,t){var a="";return a+=" "+h(n(473).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var c,f="",p="function",h=this.escapeExpression,m=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> '+h(n(2).call(t,"Download a Version",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list download-list"> ',c=a.each.call(t,t&&t.mediaItems,{hash:{},inverse:m.noop,fn:m.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=" </ul> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <i class="modal-icon glyphicon plus"></i> '+y(n(2).call(e,"Add {1} Library",'<span class="section-type-title"></span>',{
hash:{},data:t}))+" "}function o(e,t){var a="";return a+=' <i class="modal-icon glyphicon pencil"></i> '+y(n(2).call(e,"Edit Library",{hash:{},data:t}))+" "}function l(e,t){return" selected"}function u(e,t){var a="";return a+=" "+y(n(2).call(e,"Select type",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=" "+y(n(2).call(e,"General",{hash:{},data:t}))+" "}function c(e,t){return"disabled"}function f(e,t){var i,r="";return r+=' <li> <a class="btn-gray change-pane-btn create-btn',i=n(15).call(e,e&&e.selectedPane,"create",{
hash:{},inverse:b.noop,fn:b.program(5,l,t),data:t}),(i||0===i)&&(r+=i),r+=" ",i=a.if.call(e,e&&e.add,{hash:{},inverse:b.noop,fn:b.program(11,c,t),data:t}),(i||0===i)&&(r+=i),r+=' hidden" data-pane="create" href="#"> <i class="modal-nav-icon glyphicon magic"></i> '+y(n(2).call(e,"Create",{hash:{},data:t}))+" </a> </li> "}function p(e,t){var a="";return a+=' <button type="button" class="delete-btn btn btn-danger pull-left" data-dismiss="modal">'+y(n(2).call(e,"Delete Library",{hash:{},data:t}))+"</button> ";
}function h(e,t){var a="";return a+=" "+y(n(2).call(e,"Add Library",{hash:{},data:t}))+" "}function m(e,t){var a="";return a+=" "+y(n(2).call(e,"Save Changes",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var v,g="",y=this.escapeExpression,b=this;return g+='<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"> ',
v=a.if.call(t,t&&t.add,{hash:{},inverse:b.program(3,o,r),fn:b.program(1,s,r),data:r}),(v||0===v)&&(g+=v),g+=' </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"> <li> <a class="btn-gray change-pane-btn type-btn',v=n(15).call(t,t&&t.selectedPane,"type",{hash:{},inverse:b.noop,fn:b.program(5,l,r),data:r}),(v||0===v)&&(g+=v),g+='" data-pane="type" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> ',
v=a.if.call(t,t&&t.add,{hash:{},inverse:b.program(9,d,r),fn:b.program(7,u,r),data:r}),(v||0===v)&&(g+=v),g+=' </a> </li> <li> <a class="btn-gray change-pane-btn folders-btn',v=n(15).call(t,t&&t.selectedPane,"folders",{hash:{},inverse:b.noop,fn:b.program(5,l,r),data:r}),(v||0===v)&&(g+=v),g+=" ",v=a.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,c,r),data:r}),(v||0===v)&&(g+=v),g+='" data-pane="folders" href="#"> <i class="modal-nav-icon glyphicon folder-open"></i> '+y(n(2).call(t,"Add folders",{
hash:{},data:r}))+" </a> </li> ",v=a.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(13,f,r),data:r}),(v||0===v)&&(g+=v),g+=' <li> <a class="btn-gray change-pane-btn advanced-btn',v=n(15).call(t,t&&t.selectedPane,"advanced",{hash:{},inverse:b.noop,fn:b.program(5,l,r),data:r}),(v||0===v)&&(g+=v),g+=" ",v=a.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,c,r),data:r}),(v||0===v)&&(g+=v),g+='" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+y(n(2).call(t,"Advanced",{
hash:{},data:r}))+' </a> </li> </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> </div> <div class="modal-footer"> ',v=a.if.call(t,t&&t.canDelete,{hash:{},inverse:b.noop,fn:b.program(15,p,r),data:r}),(v||0===v)&&(g+=v),g+=' <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+y(n(2).call(t,"Cancel",{hash:{},data:r}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading ',v=a.if.call(t,t&&t.add,{
hash:{},inverse:b.noop,fn:b.program(11,c,r),data:r}),(v||0===v)&&(g+=v),g+='"> <div class="loading loading-sm"></div> <span class="btn-label"> <span class="save-btn-label-next">'+y(n(2).call(t,"Next",{hash:{},data:r}))+'</span> <span class="save-btn-label-save"> ',v=a.if.call(t,t&&t.add,{hash:{},inverse:b.program(19,m,r),fn:b.program(17,h,r),data:r}),(v||0===v)&&(g+=v),g+=" </span> </span> </button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var a="";return a+=' <div class="match-location"> '+c(n(2).call(e,"Location",{hash:{},data:t}))+": "+c(n(475).call(e,e&&e.location,60,12,{hash:{},data:t}))+" </div> "}function o(e,t){var a="";return a+=' <ul class="list modal-list"> <li class="modal-list-item"><a class="search-options-btn" href="#">'+c(n(2).call(e,"Search Options",{hash:{},data:t}))+'</a></li> <li class="auto-match-dropdown-region modal-list-item"></li> </ul> '}function l(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">'+c(n(2).call(e,"Search",{
hash:{},data:t}))+"</span> </button> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c=this.escapeExpression,f=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> ',u=a.if.call(t,t&&t.location,{
hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=' </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',u=a.if.call(t,t&&t.showNavigation,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(u||0===u)&&(d+=u),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">'+c(n(2).call(t,"Cancel",{hash:{},data:r}))+"</button> ",u=a.if.call(t,t&&t.showNavigation,{
hash:{},inverse:f.noop,fn:f.program(5,l,r),data:r}),(u||0===u)&&(d+=u),d+=" </div> </div> </form> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" "+d(n(2).call(e,"Insecure connections will only be allowed when you're on the same network as the server.",{hash:{},data:t}))+" "}function o(e,t){var a="";return a+=" "+d(n(2).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),r=r||{};var l,u="",d=this.escapeExpression,c=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 circle-exclamation-mark"></i> '+d(n(2).call(t,"Server Unreachable",{hash:{},data:r}))+' </h4> </div> <div class="modal-body"> <p> ',l=a.if.call(t,t&&t.publicAddressMatches,{hash:{},
inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" </p> <p>"+d(n(2).call(t,"The Allow Fallback to Insecure Connections setting can be changed in Web Settings. Would you like to allow insecure connections?",{hash:{},data:r}))+'</p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+d(n(2).call(t,"No",{hash:{},data:r}))+'</button> <button type="button" class="confirm-btn btn btn-lg btn-danger">'+d(n(2).call(t,"Yes",{
hash:{},data:r}))+"</button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}function o(e,t){var n,a="";return a+=' <option value="'+c((n=e&&e.key,typeof n===d?n.apply(e):n))+'">'+c((n=e&&e.title,typeof n===d?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d="function",c=this.escapeExpression,f=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-import"></i> '+c(n(2).call(t,"Import from iTunes",{
hash:{},data:r}))+' </h4> </div> <div class="modal-body"> <p class="help-block">'+c(n(2).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:r}))+'</p> <div class="form-group ',l=a.unless.call(t,t&&t.showSections,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r
}),(l||0===l)&&(u+=l),u+='"> <label class="control-label"> '+c(n(2).call(t,"Add to library: ",{hash:{},data:r}))+' <select id="section-list"> ',l=a.each.call(t,t&&t.sections,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+=' </select> </label> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="import-all"> '+c(n(2).call(t,"Overwrite existing playlists",{hash:{},data:r}))+' </label> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+c(n(2).call(t,"Cancel",{
hash:{},data:r}))+'</button> <button type="button" class="import-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(t,"Import",{hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <h5 class="keyboard-shortcuts-header">'+m((n=e&&e.label,typeof n===h?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,o,t),data:t}),(n||0===n)&&(i+=n),i+=" </ul> "}function o(e,t){var i,r="";return r+=' <li> <span class="keyboard-shortcuts-keys"> ',i=a.each.call(e,e&&e.keys,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+=' </span> <span class="keyboard-shortcuts-label text-muted">'+m(n(2).call(e,e&&e.label,{hash:{},data:t}))+"</span> </li> "}function l(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.plain,{hash:{},inverse:v.noop,
fn:v.program(4,u,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,c,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function u(e,t){var n,a="";return a+=' <span class="keyboard-shortcuts-keys-plain">'+m((n=e&&e.s,typeof n===h?n.apply(e):n))+"</span> "}function d(e,t){var n,a="";return a+=' <span class="keyboard-shortcuts-keys-key">'+m((n=e&&e.s,typeof n===h?n.apply(e):n))+"</span> ";
}function c(e,t){return" <br> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var f,p="",h="function",m=this.escapeExpression,v=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 keyboard-wireless"></i> '+m(n(2).call(t,"Keyboard Shortcuts",{hash:{},data:r}))+' </h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
f=a.each.call(t,t&&t.groups,{hash:{},inverse:v.noop,fn:v.program(1,s,r),data:r}),(f||0===f)&&(p+=f),p+=" </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" "+v(n(2).call(e,"Internet Required",{hash:{},data:t}))+" "}function o(e,t){var a="";return a+=" "+v(n(2).call(e,"Plex Pass Required",{hash:{},data:t}))+" "}function l(e,t){var a="";return a+=" "+v(n(2).call(e,"This server cannot reach the Internet. Please verify connectivity and try again.",{
hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+v(n(2).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(n(2).call(e,"OK",{hash:{},data:t}))+"</button> "}function c(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===g?n.apply(e):n))+'"> ',n=a.if.call(e,e&&e.isSignedIn,{
hash:{},inverse:y.program(14,p,t),fn:y.program(12,f,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> "}function f(e,t){var a="";return a+=" "+v(n(2).call(e,"Settings",{hash:{},data:t}))+" "}function p(e,t){var a="";return a+=" "+v(n(2).call(e,"Sign In",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var h,m="",v=this.escapeExpression,g="function",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 circle-exclamation-mark"></i> ',
h=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:y.program(3,o,r),fn:y.program(1,s,r),data:r}),(h||0===h)&&(m+=h),m+=' </h4> </div> <div class="modal-body"> <p class="confirm-message"> ',h=a.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:y.program(7,u,r),fn:y.program(5,l,r),data:r}),(h||0===h)&&(m+=h),m+=' </p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+v(n(2).call(t,"Ignore",{hash:{},data:r}))+"</button> ",h=a.if.call(t,t&&t.hasPlexPass,{
hash:{},inverse:y.program(11,c,r),fn:y.program(9,d,r),data:r}),(h||0===h)&&(m+=h),m+=" </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hide-streams-column"}function o(e,t){var i,r="";return r+=' <div class="files"> <h4>'+O(n(2).call(e,"Files",{hash:{},data:t}))+"</h4> ",i=a.each.call(e,e&&e.media,{hash:{},inverse:R.noop,fn:R.programWithDepth(4,l,t,e),data:t}),(i||0===i)&&(r+=i),r+=" </div> "}function l(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,u,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,f,t,n),data:t}),(i||0===i)&&(r+=i),r+=" </ul> "}function u(e,t){var a,i="";return i+=' <a href="#" data-media-item="'+O((a=null==t||t===!1?t:t.index,typeof a===D?a.apply(e):a))+'" class="delete-btn text-danger pull-right"> <i class="glyphicon bin"></i> ',a=n(15).call(e,(a=e&&e.Part,
null==a||a===!1?a:a.length),"1",{hash:{},inverse:R.program(8,c,t),fn:R.program(6,d,t),data:t}),(a||0===a)&&(i+=a),i+=" </a> "}function d(e,t){var a="";return a+=" "+O(n(2).call(e,"Delete File",{hash:{},data:t}))+" "}function c(e,t){var a="";return a+=" "+O(n(2).call(e,"Delete Files",{hash:{},data:t}))+" "}function f(e,t,n){var i,r="";return r+=" <li> ",i=a.if.call(e,n&&n.showFilepath,{hash:{},inverse:R.program(13,h,t),fn:R.program(11,p,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 p(e,t){var n,a="";return a+=" "+O((n=e&&e.file,typeof n===D?n.apply(e):n))+" "}function h(e,t){var a="";return a+=" "+O(n(861).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,g,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="'+O(n(2).call(e,"Please check the permissions for this file.",{
hash:{},data:t}))+'">'+O(n(2).call(e,"Inaccessible",{hash:{},data:t}))+"</span> "}function g(e,t){var a="";return a+=' <span class="label label-danger" data-toggle="tooltip" title="'+O(n(2).call(e,"Please check that this file exists and the necessary drive is mounted.",{hash:{},data:t}))+'">'+O(n(2).call(e,"Unavailable",{hash:{},data:t}))+"</span> "}function y(e,t,i){var r,s="";return s+=' <div class="media"> <div class="props"> <h4>'+O(n(2).call(e,"Media",{hash:{},data:t}))+"</h4> <ul> ",r=a.each.call(e,e&&e.properties,{
hash:{},inverse:R.noop,fn:R.program(21,b,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> </div> ",r=a.each.call(e,e&&e.Part,{hash:{},inverse:R.noop,fn:R.programWithDepth(23,w,t,i),data:t}),(r||0===r)&&(s+=r),s+=" </div> "}function b(e,t){var a,i="";return i+=' <li> <span class="detail-label">'+O(n(2).call(e,e&&e.name,{hash:{},data:t}))+'</span> <span class="detail">'+O((a=e&&e.value,typeof a===D?a.apply(e):a))+"</span> </li> "}function w(e,t,i){var r,s="";return s+=' <div class="part"> <div class="props"> <h4>'+O(n(2).call(e,"Part",{
hash:{},data:t}))+"</h4> <ul> ",r=a.each.call(e,e&&e.properties,{hash:{},inverse:R.noop,fn:R.program(21,b,t),data:t}),(r||0===r)&&(s+=r),s+=' </ul> </div> <div class="streams"> ',r=a.each.call(e,e&&e.Stream,{hash:{},inverse:R.noop,fn:R.program(24,P,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=a.if.call(e,i&&i.loading,{hash:{},inverse:R.noop,fn:R.program(33,k,t),data:t}),(r||0===r)&&(s+=r),s+=" </div> </div> "}function P(e,t){var i,r="";return r+=' <div class="props"> ',i=n(15).call(e,e&&e.streamType,"1",{
hash:{},inverse:R.program(27,S,t),fn:R.program(25,_,t),data:t}),(i||0===i)&&(r+=i),r+=" <ul> ",i=a.each.call(e,e&&e.properties,{hash:{},inverse:R.noop,fn:R.program(21,b,t),data:t}),(i||0===i)&&(r+=i),r+=" </ul> </div> "}function _(e,t){var a="";return a+=" <h4>"+O(n(2).call(e,"Video",{hash:{},data:t}))+"</h4> "}function S(e,t){var a;return a=n(15).call(e,e&&e.streamType,"2",{hash:{},inverse:R.program(30,C,t),fn:R.program(28,x,t),data:t}),a||0===a?a:""}function x(e,t){var a="";return a+=" <h4>"+O(n(2).call(e,"Audio",{
hash:{},data:t}))+"</h4> "}function C(e,t){var a;return a=n(15).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>"+O(n(2).call(e,"Subtitles",{hash:{},data:t}))+"</h4> "}function k(e,t){var a="";return a+=' <div class="props"> <h4>'+O(n(2).call(e,"Loading",{hash:{},data:t}))+"...</h4> </div> "}function I(e,t,n){var i;return i=a.if.call(e,n&&n.showFilepath,{hash:{},inverse:R.noop,fn:R.program(36,M,t),data:t}),i||0===i?i:"";
}function M(e,t){var a,i="";return i+=' <div class="modal-footer"> <div class="pull-left"> <a href="'+O((a=e&&e.url,typeof a===D?a.apply(e):a))+'" target="_blank">'+O(n(2).call(e,"View XML",{hash:{},data:t}))+"</a> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var A,E="",O=this.escapeExpression,D="function",R=this;return E+='<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> '+O(n(2).call(t,"Media Info",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="position-ref ',A=a.unless.call(t,t&&t.hasStreams,{hash:{},inverse:R.noop,fn:R.program(1,s,r),data:r}),(A||0===A)&&(E+=A),E+='"> ',A=a.if.call(t,t&&t.hasFiles,{hash:{},inverse:R.noop,fn:R.program(3,o,r),data:r}),(A||0===A)&&(E+=A),E+=" ",A=a.each.call(t,t&&t.media,{hash:{},inverse:R.noop,fn:R.programWithDepth(20,y,r,t),data:r}),(A||0===A)&&(E+=A),E+=" </div> </div> ",A=a.if.call(t,t&&t.key,{hash:{},
inverse:R.noop,fn:R.programWithDepth(35,I,r,t),data:r}),(A||0===A)&&(E+=A),E+=" </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+h((n=null==t||t===!1?t:t.index,typeof n===p?n.apply(e):n))+'" href="#"> ',n=a.if.call(e,e&&e.title,{hash:{},inverse:m.noop,fn:m.program(2,o,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,l,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 o(e,t){var n,a="";return a+=" "+h((n=e&&e.title,typeof n===p?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function l(e,t){var i,r="";return r+=" "+h(n(474).call(e,e&&e.videoResolution,{hash:{},data:t})),i=a.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(5,u,t),data:t
}),(i||0===i)&&(r+=i),r+=" "}function u(e,t){return","}function d(e,t){var a="";return a+=" "+h(n(473).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var c,f="",p="function",h=this.escapeExpression,m=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 adjust-alt"></i> '+h(n(2).call(t,"Select a Version",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',c=a.each.call(t,t&&t.mediaItems,{hash:{},inverse:m.noop,fn:m.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=" </ul> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <p class="text-muted">'+d(n(2).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 o(e,t){var a="";return a+=' <p class="text-muted">'+d(n(2).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),r=r||{};var l,u="",d=this.escapeExpression,c=this,f="function";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 circle-arrow-right"></i> '+d(n(2).call(t,"Go Premium",{
hash:{},data:r}))+' </h4> </div> <div class="modal-body"> <p class="text-center"><i class="plex-image plex-pass"></i></p> <h4 class="text-center">'+d(n(2).call(t,"This feature requires a Plex Pass subscription.",{hash:{},data:r}))+"</h4> ",l=a.if.call(t,t&&t.isClaimed,{hash:{},inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+d((l=t&&t.plexPassUrl,typeof l===f?l.apply(t):l))+'" target="_blank">'+d(n(2).call(t,"Learn More",{
hash:{},data:r}))+"</a> </p> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <div class="friends-container"></div> <div class="message-container invisible"> <textarea class="message form-control" placeholder="'+d(n(2).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function o(e,t){var a="";return a+=' <div class="empty-message"> '+d(n(2).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),r=r||{};var l,u="",d=this.escapeExpression,c=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 share-alt"></i> '+d(n(2).call(t,"Select Friends",{hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
l=a.if.call(t,t&&t.hasFriends,{hash:{},inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' </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(n(2).call(t,"Send",{hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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> '+o(n(2).call(t,"Limited Connection",{hash:{},data:r}))+' </h4> </div> <div class="modal-body"> <p> '+o(n(2).call(t,"You are not connected directly to this server so streaming quality may be limited. You may be able to connect directly by changing your home network settings. {1}Learn more{2}",'<a href="https://plex.tv/relay" target="_blank" class="learn-more">',"</a>",{
hash:{},data:r}))+' </p> </div> <div class="modal-footer"> <button type="button" class="confirm-btn btn btn-lg btn-primary">'+o(n(2).call(t,"OK",{hash:{},data:r}))+"</button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t,i){var r,s="";return s+=' <h4 class="update-list-title">'+f(n(2).call(e,"New",{hash:{},data:t}))+"</h4> <ul> ",r=a.each.call(e,i&&i.added,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(r||0===r)&&(s+=r),
s+=" </ul> "}function o(e,t){var n="";return n+=" <li>"+f(typeof e===c?e.apply(e):e)+"</li> "}function l(e,t,i){var r,s="";return s+=' <h4 class="update-list-title">'+f(n(2).call(e,"Fixes",{hash:{},data:t}))+"</h4> <ul> ",r=a.each.call(e,i&&i.fixed,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(r||0===r)&&(s+=r),s+=" </ul> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c="function",f=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-info"></i> '+f(n(2).call(t,"Plex Media Server Release Notes",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <span class="text-muted">'+f(n(2).call(t,"Version {1}",t&&t.version,{hash:{},data:r}))+"</span> ",u=a.if.call(t,t&&t.added,{hash:{},inverse:p.noop,fn:p.programWithDepth(1,s,r,t),data:r}),(u||0===u)&&(d+=u),d+=" ",u=a.if.call(t,t&&t.fixed,{hash:{},inverse:p.noop,fn:p.programWithDepth(4,l,r,t),data:r}),(u||0===u)&&(d+=u),d+=" </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+f((n=e&&e.id,typeof n===p?n.apply(e):n))+'" href="#"> ',n=a.if.call(e,e&&e.name,{hash:{},inverse:h.program(4,l,t),fn:h.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:h.noop,fn:h.program(6,u,t),data:t}),(n||0===n)&&(i+=n),i+=" </a> </li> "}function o(e,t){var a="";return a+=" "+f(n(309).call(e,e&&e.name,25,{hash:{},data:t}))+" "}function l(e,t){
var a="";return a+=" "+f(n(309).call(e,e&&e.device,25,{hash:{},data:t}))+" "}function u(e,t){return'<i class="cloud-sync-icon glyphicon cloud"></i>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f=this.escapeExpression,p="function",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 iphone"></i> '+f(n(2).call(t,"Choose Destination",{
hash:{},data:r}))+'</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:h.noop,fn:h.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" </ul> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+d((a=null==t||t===!1?t:t.index,typeof a===u?a.apply(e):a))+'" href="#"> ',
a=n(860).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)&&(i+=a),i+=" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u="function",d=this.escapeExpression,c=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 file"></i> '+d(n(2).call(t,"Select a File",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',o=a.each.call(t,t&&t.medias,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=" </ul> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression,u="function";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-arrow-right"></i> '+l(n(2).call(t,"Resume",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body"> <ul class="list select-list"> <li class="striped-list-item select-list-item"><a class="offset" data-value="'+l((s=t&&t.offset,typeof s===u?s.apply(t):s))+'" href="#">'+l(n(2).call(t,"Resume from {1}",t&&t.formattedOffset,{hash:{},data:r}))+'</a></li> <li class="striped-list-item select-list-item"><a class="offset" data-value="0" href="#">'+l(n(2).call(t,"Start from beginning",{hash:{},data:r}))+"</a></li> </ul> </div> </div> </div> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a,i="";return i+=' <li><a class="btn-gray show-pane-btn type-btn',a=n(15).call(e,e&&e.selectedPane,e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='" href="#" data-pane="'+f((a=e&&e.id,typeof a===c?a.apply(e):a))+'">'+f((a=e&&e.name,typeof a===c?a.apply(e):a))+"</a></li> "}function o(e,t){return" selected"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c="function",f=this.escapeExpression;
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 plex-icon-plex-chevron"></i> '+f(n(2).call(t,"Plex Media Server Downloads",{hash:{},data:r}))+' </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"> ',l=a.each.call(t,t&&t.items,{
hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' </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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <ul class="list select-list select-networks-list dark-scrollbar"> ',i=a.each.call(e,e&&e.networks,{hash:{},inverse:g.noop,fn:g.programWithDepth(2,o,t,e),
data:t}),(i||0===i)&&(r+=i),r+=' </ul> <div class="message-container ',i=a.unless.call(e,e&&e.autoSelect,{hash:{},inverse:g.noop,fn:g.program(10,f,t),data:t}),(i||0===i)&&(r+=i),r+='"> <textarea class="message form-control" placeholder="'+b(n(2).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function o(e,t,i){var r,s="";return s+=' <li class="striped-list-item select-list-item"> <a class="network ',r=a.if.call(e,i&&i.autoSelect,{hash:{},inverse:g.noop,fn:g.program(3,l,t),
data:t}),(r||0===r)&&(s+=r),s+='" data-id="'+b((r=e&&e.key,typeof r===y?r.apply(e):r))+'" href="#"> ',r=n(15).call(e,e&&e.key,"facebook",{hash:{},inverse:g.program(7,d,t),fn:g.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+=" "+b((r=e&&e.title,typeof r===y?r.apply(e):r))+" </a> </li> "}function l(e,t){return"selected"}function u(e,t){return' <i class="network-icon glyphicon glyphicon-social facebook"></i> '}function d(e,t){var a,i="";return i+=" ",a=n(15).call(e,e&&e.key,"twitter",{hash:{},inverse:g.noop,
fn:g.program(8,c,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function c(e,t){return' <i class="network-icon glyphicon glyphicon-social twitter"></i> '}function f(e,t){return"invisible"}function p(e,t){var a="";return a+=' <div class="empty-message"> '+b(n(2).call(e,"You need to {1}link your account{2}.",'<a href="{3}" target="_blank">',"</a>",e&&e.accountUrl,{hash:{},data:t}))+" </div> "}function h(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var m,v="",g=this,y="function",b=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> '+b(n(2).call(t,"Share",{hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',m=a.if.call(t,t&&t.networks,{hash:{},inverse:g.program(12,p,r),fn:g.program(1,s,r),data:r}),(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:g.noop,fn:g.program(14,h,r),data:r}),(m||0===m)&&(v+=m),v+='"> <div class="loading loading-sm"></div> <span class="btn-label">'+b(n(2).call(t,"Share",{hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,a="";return a+=' <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===u?n.apply(e):n))+"</p> ";
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u="function",d=this.escapeExpression,c=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 download"></i> '+d(n(2).call(t,"Sync Status",{hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4 class="sync-item-title">'+d((o=t&&t.rootTitle,
typeof o===u?o.apply(t):o))+" &middot; "+d((o=t&&t.title,typeof o===u?o.apply(t):o))+"</h4> ",o=a.if.call(t,(o=t&&t.Status,null==o||o===!1?o:o.failure),{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' <div class="sync-status-list-container"></div> </div> </div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),i=this.merge(i,e.partials),r=r||{};var s,o="",l=this.escapeExpression,u=this;
return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+l(n(2).call(t,"Plex Terms of Service",{hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',s=u.invokePartial(n(1938),"terms",t,a,i,r),(s||0===s)&&(o+=s),o+=' </div> <div class="modal-footer"> <button type="button" class="confirm-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+l(n(2).call(t,"Agree",{
hash:{},data:r}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,a="";return a+=" "+c((n=e&&e.status,typeof n===d?n.apply(e):n))+" "}function o(e,t){var a="";return a+=" "+c(n(2).call(e,"There was a problem preparing for optimization.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<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=a.if.call(t,t&&t.status,{hash:{},inverse:f.program(3,o,r),fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' </h4> <h4><a class="try-again-link" href="#">'+c(n(2).call(t,"Try again",{hash:{},data:r}))+"</a></h4> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"disabled"}function o(e,t){return"selected"}function l(e,t,a){var i,r="";return r+=' <option value="'+f((i=e&&e.id,typeof i===c?i.apply(e):i))+'" ',i=n(15).call(e,a&&a.selectedLocationID,e&&e.id,{
hash:{},inverse:p.noop,fn:p.program(3,o,t),data:t}),(i||0===i)&&(r+=i),r+=">"+f(n(475).call(e,e&&e.path,50,20,{hash:{},data:t}))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<label class="control-label" for="convert-storage-location">'+f(n(2).call(t,"Version storage location",{hash:{},data:r}))+'</label> <select id="convert-storage-location" class="storage-location-select" name="storageLocation" ',
u=a.if.call(t,t&&t.disableLocation,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='> <option value="-1" ',u=n(15).call(t,t&&t.selectedLocationID,-1,{hash:{},inverse:p.noop,fn:p.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+=">"+f(n(2).call(t,"In folders with original items",{hash:{},data:r}))+"</option> ",u=a.each.call(t,t&&t.locations,{hash:{},inverse:p.noop,fn:p.programWithDepth(5,l,r,t),data:r}),(u||0===u)&&(d+=u),d+=' </select> <p class="help-block">'+f(n(2).call(t,'A "Plex Versions" folder will be created in your chosen location.',{
hash:{},data:r}))+"</p> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}function o(e,t){return"checked"}function l(e,t){var n,a="";return a+='value="'+v((n=e&&e.policy,n=null==n||n===!1?n:n.value,typeof n===m?n.apply(e):n))+'"'}function u(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.isCloudSync,{hash:{},inverse:g.program(10,c,t),fn:g.program(8,d,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function d(e,t){var a="";return a+=" "+v(n(2).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 c(e,t){var a="";return a+=" "+v(n(2).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 f(e,t){var a="";return a+=" "+v(n(2).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),r=r||{};
var p,h="",m="function",v=this.escapeExpression,g=this;return h+='<div class="form-group ',p=a.unless.call(t,t&&t.showUnwatched,{hash:{},inverse:g.noop,fn:g.program(1,s,r),data:r}),(p||0===p)&&(h+=p),h+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-unwatched" name="policyUnwatched" ',p=a.if.call(t,(p=t&&t.policy,null==p||p===!1?p:p.unwatched),{hash:{},inverse:g.noop,fn:g.program(3,o,r),data:r}),(p||0===p)&&(h+=p),h+="> "+v(n(2).call(t,"Unwatched only",{hash:{},data:r
}))+' </label> </div> <div class="form-group ',p=a.unless.call(t,t&&t.isDirectory,{hash:{},inverse:g.noop,fn:g.program(1,s,r),data:r}),(p||0===p)&&(h+=p),h+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-scope" name="policyScope" value="count" ',p=n(15).call(t,(p=t&&t.policy,null==p||p===!1?p:p.scope),"count",{hash:{},inverse:g.noop,fn:g.program(3,o,r),data:r}),(p||0===p)&&(h+=p),h+="> "+v(n(2).call(t,"Limit to",{hash:{},data:r}))+' <input type="number" id="convert-policy-value" name="policyValue" class="policy-value-control form-control" ',
p=a.if.call(t,(p=t&&t.policy,null==p||p===!1?p:p.value),{hash:{},inverse:g.noop,fn:g.program(5,l,r),data:r}),(p||0===p)&&(h+=p),h+="> "+v(n(2).call(t,"items",{hash:{},data:r}))+' </label> <p class="convert-warning help-block ',p=a.unless.call(t,t&&t.showLimitWarning,{hash:{},inverse:g.noop,fn:g.program(1,s,r),data:r}),(p||0===p)&&(h+=p),h+='"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> ',p=a.if.call(t,t&&t.isSync,{hash:{},inverse:g.program(12,f,r),
fn:g.program(7,u,r),data:r}),(p||0===p)&&(h+=p),h+=" </span> </p> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"disabled"}function o(e,t,i){var r,s="";return s+=' <option value="'+h((r=e&&e.id,typeof r===m?r.apply(e):r))+'" ',r=n(15).call(e,(r=i&&i.item,null==r||r===!1?r:r.targetTagID),e&&e.id,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(r||0===r)&&(s+=r),s+="> "+h((r=e&&e.tag,typeof r===m?r.apply(e):r)),r=a.if.call(e,(r=e&&e.mediaSettings,
null==r||r===!1?r:r.videoResolution),{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(r||0===r)&&(s+=r),s+=" </option> "}function l(e,t){return"selected"}function u(e,t){var a="";return a+=" - "+h(n(114).call(e,e&&e.mediaSettings,{hash:{},data:t}))}function d(e,t,a){var i,r="";return r+=' <option value="'+h((i=e&&e.title,typeof i===m?i.apply(e):i))+'" ',i=n(15).call(e,(i=a&&a.selectedProfile,null==i||i===!1?i:i.title),e&&e.title,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(i||0===i)&&(r+=i),
r+="> "+h((i=e&&e.title,typeof i===m?i.apply(e):i))+" </option> "}function c(e,t,a){var i,r="";return r+=' <option value="'+h((i=e&&e.index,typeof i===m?i.apply(e):i))+'" ',i=n(15).call(e,(i=a&&a.selectedCustomQuality,null==i||i===!1?i:i.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(i||0===i)&&(r+=i),r+="> "+h(n(114).call(e,e,{hash:{},data:t}))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var f,p="",h=this.escapeExpression,m="function",v=this;
return p+='<select class="convert-target-select" name="target" ',f=a.if.call(t,t&&t.disableTarget,{hash:{},inverse:v.noop,fn:v.program(1,s,r),data:r}),(f||0===f)&&(p+=f),p+="> ",f=a.each.call(t,t&&t.targets,{hash:{},inverse:v.noop,fn:v.programWithDepth(3,o,r,t),data:r}),(f||0===f)&&(p+=f),p+=' <option value="-1" ',f=a.unless.call(t,(f=t&&t.item,null==f||f===!1?f:f.targetTagID),{hash:{},inverse:v.noop,fn:v.program(4,l,r),data:r}),(f||0===f)&&(p+=f),p+=">"+h(n(2).call(t,"Custom",{hash:{},data:r}))+'</option> </select> <div class="convert-custom-target-container"> <input type="text" class="convert-target-title form-control" name="targetTitle" class="form-control" value="'+h((f=t&&t.item,
f=null==f||f===!1?f:f.target,typeof f===m?f.apply(t):f))+'" placeholder="'+h(n(2).call(t,"Quality Name",{hash:{},data:r}))+'"> <select class="convert-target-profile-select" name="targetProfile"> ',f=a.each.call(t,t&&t.profiles,{hash:{},inverse:v.noop,fn:v.programWithDepth(8,d,r,t),data:r}),(f||0===f)&&(p+=f),p+=' </select> <select class="convert-target-quality-select" name="targetQuality"> ',f=a.each.call(t,t&&t.availableCustomQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(10,c,r,t),data:r
}),(f||0===f)&&(p+=f),p+=' </select> </div> <p class="help-block">'+h(n(2).call(t,"Plex will convert your media to this quality. Each version will be stored in a separate file.",{hash:{},data:r}))+"</p> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}function o(e,t){return c(n(2).call(e,"Optimize",{hash:{},data:t}))}function l(e,t){return c(n(2).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),
r=r||{};var u,d="",c=this.escapeExpression,f=this,p="function";return d+='<form id="convert-form" class="settings-container"> <div class="modal-body"> <div class="form-group ',u=a.unless.call(t,t&&t.showRemuxOnlyWarning,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='"> <p class="convert-warning help-block"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> '+c(n(2).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:r}))+' </span> </p> </div> <div class="form-group"> <label class="control-label" for="convert-title">'+c(n(2).call(t,"Title",{hash:{},data:r}))+'</label> <input type="text" id="convert-title" name="title" class="form-control" value="'+c((u=t&&t.conversionItem,u=null==u||u===!1?u:u.title,typeof u===p?u.apply(t):u))+'" placeholder="'+c((u=t&&t.conversionItem,u=null==u||u===!1?u:u.title,typeof u===p?u.apply(t):u))+'"> </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">'+c(n(2).call(t,"Cancel",{
hash:{},data:r}))+'</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:f.program(5,l,r),fn:f.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+="</span> </button> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="loading loading-inline"></div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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> '+o(n(2).call(t,"Optimize",{hash:{},data:r}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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>'+o(n(2).call(t,"This media is being converted.",{hash:{},data:r}))+"</h4> <h4>"+o(n(2).call(t,"Watch the status of the conversion {1}here{2}.",'<a class="status-link" href="#">',"</a>",{
hash:{},data:r}))+"</h4> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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>'+o(n(2).call(t,"There was a problem syncing this media.",{hash:{},data:r
}))+'</h4> <h4><a class="try-again-link" href="#">'+o(n(2).call(t,"Try again",{hash:{},data:r}))+"</a></h4> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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,o,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,u,t,e),
data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function o(e,t){var a,i="";return i+=' <option value="-1" ',a=n(15).call(e,(a=e&&e.selectedVideoQuality,null==a||a===!1?a:a.index),-1,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+="> "+g(n(2).call(e,"Original",{hash:{},data:t}))+" </option> "}function l(e,t){return"selected"}function u(e,t,a){var i,r="";return r+=' <option value="'+g((i=e&&e.index,typeof i===y?i.apply(e):i))+'" ',i=n(15).call(e,(i=a&&a.selectedVideoQuality,
null==i||i===!1?i:i.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+="> "+g(n(114).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,c,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function c(e,t,a){var i,r="";return r+=' <option value="'+g((i=e&&e.index,typeof i===y?i.apply(e):i))+'" ',
i=n(15).call(e,(i=a&&a.selectedMusicQuality,null==i||i===!1?i:i.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+="> "+g(n(114).call(e,e,{hash:{},data:t}))+" </option> "}function f(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,p,t,e),data:t}),(n||0===n)&&(i+=n),i+=" </select> "}function p(e,t,a){var i,r="";return r+=' <option value="'+g((i=e&&e.index,
typeof i===y?i.apply(e):i))+'" ',i=n(15).call(e,(i=a&&a.selectedPhotoQuality,null==i||i===!1?i:i.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+="> "+g((i=e&&e.title,typeof i===y?i.apply(e):i))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var h,m="",v=this,g=this.escapeExpression,y="function";return h=n(15).call(t,t&&t.typeElement,"video",{hash:{},inverse:v.noop,fn:v.program(1,s,r),data:r}),(h||0===h)&&(m+=h),m+=" ",
h=n(15).call(t,t&&t.typeElement,"audio",{hash:{},inverse:v.noop,fn:v.program(7,d,r),data:r}),(h||0===h)&&(m+=h),m+=" ",h=n(15).call(t,t&&t.typeElement,"photo",{hash:{},inverse:v.noop,fn:v.program(10,f,r),data:r}),(h||0===h)&&(m+=h),m+=' <p class="help-block">'+g(n(2).call(t,"Plex will convert your media to this quality and transfer the converted media to your device.",{hash:{},data:r}))+"</p> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return d(n(2).call(e,"Sync",{
hash:{},data:t}))}function o(e,t){return d(n(2).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c="function",f=this;return u+='<form id="sync-form" class="settings-container"> <div class="modal-body"> <div class="form-group"> <label class="control-label" for="sync-title">'+d(n(2).call(t,"Title",{hash:{},data:r}))+'</label> <input type="text" id="sync-title" name="title" class="form-control" value="'+d((l=t&&t.syncItem,
l=null==l||l===!1?l:l.title,typeof l===c?l.apply(t):l))+'" placeholder="'+d((l=t&&t.syncItem,l=null==l||l===!1?l:l.title,typeof l===c?l.apply(t):l))+'"> </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(n(2).call(t,"Cancel",{hash:{},data:r}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',
l=a.if.call(t,t&&t.isNew,{hash:{},inverse:f.program(3,o,r),fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+="</span> </button> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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> '+o(n(2).call(t,"Sync",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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>'+o(n(2).call(t,"This media is being synced.",{
hash:{},data:r}))+"</h4> <h4>"+o(n(2).call(t,"Watch the status of the sync {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:r}))+"</h4> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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"> '+o(n(2).call(t,"There was a problem loading these items.",{
hash:{},data:r}))+" </span> </div> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<p> Thank you for using Plex! By accessing, using, downloading, or visiting any Plex "Service(s)", which includes the Plex website, Plex software and products described <a href="https://plex.tv/downloads" target="_blank">here</a>, and any other products or materials provided by Plex GmbH, a Swiss company, and its affiliates (together, "Plex"), you agree to the terms ("Terms") listed in this agreement ("Agreement"). Plex reserves the right to amend these Terms at any time and without notice. Any revisions to the Terms will be posted on the Plex website. By continuing to access or use the Services, you accept any changes or revisions to the Terms. </p> <h4>Plex Software</h4> <ol> <li>Plex grants you a personal, non-commercial, worldwide, royalty-free, revocable, non-transferable, non-sublicensable, and non-exclusive license to use the software provided to you by Plex as part of the Services ("Software"). This license is for the sole purpose of enabling you to use and enjoy the benefit of the Services in the manner permitted by these Terms.</li> <li>The Software includes certain executable modules that Plex has licensed from <a href="https://support.plex.tv/hc/en-us/articles/204096476-License-Information" target="_blank">third party providers</a> ("Third Party Components") that may be subject to different end user license terms as specified in the license agreement(s) provided with such Third Party Components.</li> <li>Except as provided in the next section, you may not, or allow anyone else to, directly or indirectly to: (1) copy, modify, distribute, sell, or lease any part of the Software; (2) reverse engineer, disassemble, decompile, or otherwise attempt to discover the source code or structure, sequence, and/or organization of all or any part of the Software, unless laws prohibit those restrictions or you have our written permission; (3) rent, lease, or use the Software for timesharing or service bureau purposes; (4) develop any improvement, modification, or derivative works of the Software, or include any portion thereof in any other product, software, work, equipment, or item (except that you may customize and/or modify the Software only as set forth in the documentation or as authorized in any license agreement of Plex\'s third party licensors and applicable to Third Party Components); or (5) allow the transfer, transmission, export, or re-export of the Software or any portion thereof or any technical data associated with any Software.</li> <li>Plex grants you a personal, non-commercial, worldwide, royalty-free, revocable, non-transferable, non-sublicensable, and non-exclusive license to reproduce the Plex Media Server Software (PMS Software) in copies and distribute the copies to others, provided that: you may not charge a fee for the PMS Software, and you may not individually charge for installing it; you may copy, distribute and install the PMS Software only as others actually need the PMS Software, and not more than five (5) times per calendar day or more than twenty-five (25) times per calendar month; you may not offer the PMS Software to the public for downloading on or in connection with any commercial online site, whether or not a fee is charged for the PMS Software; you shall comply with all other terms and conditions set forth in this document; you agree that Plex may revoke or terminate the license granted to you under this paragraph at any time for any reason in its sole discretion. As an example, this section is intended to permit reasonable copying and distribution of the PMS Software in connection with services such as home theater or home media center installation in which you install the PMS Software on the computers of your customers as a convenience in connection with other services or products that you are providing to them, and/or in Arch Linux repositories and similar distributions.</li> <li>You shall maintain and shall not remove nor obscure any proprietary notices on the Software, and shall reproduce such notices exactly on all permitted copies of the Software.</li> <li>You may reverse engineer the Software solely (1) as permitted by applicable law, or (2) for the purpose of debugging modifications made by you to certain third party files in source code format that are licensed under the GNU Lesser General Public License (LGPL) or under the GNU General Public License version 2 (GPL2) and only provided that you have made, prior to any such reverse engineering permitted under this sentence, unsuccessful prior reasonable good faith efforts to debug such modifications using techniques other than the reverse engineering of the Software.</li> <li>As between the parties and except as otherwise provided in any license agreement for Third Party Components, Plex shall own all title, ownership rights, and intellectual property rights in and to the Software, and any copies or derivative works thereof, except that by downloading the Software, you retain any title that you may own in and to the recording media on which the Software is recorded.</li> <li>You understand that Plex or its licensors may modify or discontinue offering the Services at any time.</li> <li>You shall not make, or assist others in making, any use of data adapters or similar technologies used by or with the Services that are designed to receive and use data from Plex, its third party data providers, and their affiliates and third parties, other than to receive and use such data in accordance with these Terms and your agreement with the third party data providers, and their affiliates and third parties, including without limitation any data passing through the Services or otherwise effectively made available by any Service through an API, a download, a database, or the like.</li> <li>This Agreement does not entitle you to any support, upgrades, patches, enhancements, or \ufb01xes (collectively, "Support") for the Services. Any such Support for the Services that may be made available by Plex, in its sole discretion, shall become part of the Services and will be subject to these Terms.</li> </ol> <h4>Data</h4> <p> Data provided by Plex or other third party data providers may be delayed or unavailable as specified by Plex or such third party data providers. Plex does not verify any data provided by Plex or other third party data providers and disclaims any obligation to do so. Plex, its third party data providers, and each of their affiliates and business partners: (1) expressly disclaim the availability, accuracy, adequacy, or completeness of any data or third party data provider, and (2) shall not be liable for any errors, omissions, or other defects in, unavailability of, delays or interruptions in such data or third party data provider. </p> <h4>Acceptable Use</h4> <ol> <li> You may not, or allow anyone else to, use any of the Services to do the following: <ol> <li>Infringe the intellectual property rights, proprietary rights, or rights of publicity or privacy of any third party;</li> <li>Violate any law, statute, ordinance, or regulation, or perform any other action that would incur civil liability or constitute a crime;</li> <li>Disseminate, transfer or store information or materials in any form or format that is harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, or otherwise objectionable, or that otherwise violate any law or right of any third party; or</li> <li>Disseminate any software viruses or any other computer code, files, programs, or the like that may without limitation interrupt, destroy, or limit the functionality of any computer software or hardware or telecommunications equipment, violate the security of any computer network, or the like.</li> </ol> </li> <li>If the occurrence of any prohibited use comes to our attention, we reserve the right to disable any accounts associated with prohibited use or otherwise terminate your access to the Services.</li> </ol> <h4>Your Content</h4> <ol> <li>You continue to retain any ownership rights you have in content you make available via the Services, or otherwise use in conjunction with the Services. However, by using the Services with particular content, for example by using the Services to share particular content or access particular content, you grant to Plex (and to each of the third parties with whom we work to provide you with the Services) a worldwide license to reproduce, modify, create derivative works, transmit, publish, publicly perform, publicly display, distribute, and otherwise use the particular content and metadata associated with the content, such as images of you or images otherwise associated with your account. The rights you grant us in this license are only for the limited purpose of providing you with our Services. You may not use the Services in connection with any content for which you do not have the right to grant us this license.</li> <li>The Services may include features that allow you to share your content with others. Please be careful when choosing to share content with other users; Plex is not responsible for how others use your content. Additionally, you hereby grant to any user with whom you share content a non-exclusive license to access the content through the Service, and to use, reproduce in copies, distribute, display and perform the shared content as permitted through the functionality of the Service and under this Agreement. You may not share any content with others via the Services if you do not have the right to grant this license to any user with whom you share the content.</li> <li>You understand that Plex may delete any content that you post in or contribute to a message forum or similar service that Plex hosts, in its sole discretion, for any reason.</li> </ol> <h4>Content of Others</h4> <ol> <li>You acknowledge that all content that you access through use of the Software or other Services is accessed at your own risk, and you will be solely responsible for any damage or liability to any party resulting from such access.</li> <li>You understand that by using the Services you may encounter content that you may find offensive, indecent, or objectionable. Plex does not inspect, screen, or otherwise control the content that is posted, shared or made available via the Services, and Plex does not guarantee the accuracy, integrity or quality of such content.</li> <li>You acknowledge that unauthorized use of copyrighted content of others may subject you to civil and criminal penalties, including possible monetary damages, for copyright infringement.</li> </ol> <h4>Developers and Interfacing Software</h4> <ol> <li>"Interfacing Software" means any software that you obtain or provide and that accesses or calls any Software provided by Plex as part of the Services including, but not limited to, plug-ins for the Services, channel plug-ins, metadata agents, and client applications that communicate directly or indirectly with the Services.</li> <li> By making, or assisting others in making, Interfacing Software, you agree to the following terms: <ol> <li>You grant Plex and its affiliates worldwide a worldwide, non-exclusive, and royalty-free right and license to use (including testing, hosting and linking to), copy, publicly perform, publicly display, reproduce in copies for distribution, and distribute the copies of any Interfacing Software made by you or with your assistance. </li> <li>You will include in the source code of the Interfacing Software a copyright notice of the form: Copyright \xa9 &lt;year&gt; &lt;copyright holders&gt;. You grant, and authorize Plex to grant on your behalf if necessary, a license, free of charge, to any person obtaining a copy of the Interfacing Software and associated documentation files from Plex, to deal in the Interfacing Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Interfacing Software, and to permit persons to whom the Interfacing Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Interfacing Software. THE INTERFACING SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE INTERFACING SOFTWARE.</li> <li> You may notify us at legal@plex.tv if you do not wish for Plex to use, distribute, copy, publicly perform, publicly display, reproduce in copies for distribution, or distribute copies of any Interfacing Software that was created by you. Plex will comply with such a request but Plex must be granted a transition period of thirty (30) days after receipt of the request to comply. A request to take down Interfacing Software must include (1) an identification of the Interfacing Software you wish to be removed; (2) your signature in either electronic or physical form; and (3) the following statements: <ul> <li>"I swear under penalty of perjury that I am the owner of the Interfacing Software or I am authorized to act on behalf of the owner of the Interfacing Software."</li> <li>"I swear under penalty of perjury that the information in this notification is accurate."</li> </ul> </li> <li>You shall protect the privacy and legal rights of Plex users. If the users provide, or the Interfacing Software accesses or uses, user names, passwords, or other login information or personal information, you must make the users aware that such information will be available to the Interfacing Software, and you must provide privacy notices and protection for those users in compliance with applicable law. Further, the Interfacing Software may use that information only for the limited purposes for which the user has given you permission to do so. If the Interfacing Software stores personally identifying information of users or information that a reasonable user would consider to be sensitive, then the Interfacing Software must do so securely and only for as long as it is needed. However, if the user has opted or entered into a separate agreement with you that allows you or the Interfacing Software to store or use personally identifying information of users or information that a reasonable user would consider to be sensitive, then the terms of that separate agreement will govern your use of such information. If the user provides the Interfacing Software with Plex account information, the Interfacing Software may only use that information to access the user\'s Plex account when, and for the limited purposes for which, the user has given you permission to do so.</li> <li> Prohibited Uses. Plex prohibits performing certain actions using the Interfacing Software. You shall not make, or assist others in making, any Interfacing Software that: <ol> <li>Knowingly violates a third party\'s terms of service;</li> <li>Violates any applicable laws or regulations;</li> <li>Interferes with, disrupts, damages, harms, or accesses in an unauthorized manner the machines, hardware. devices, servers, networks, data, or other properties or services of any other party including, but not limited to, Plex users, Plex or any network operator;</li> <li>Posts misleading information about an application\'s purpose;</li> <li>Infringes on the intellectual property rights of others; or</li> <li>Performs any other prohibited action listed under "Acceptable Use" above.</li> </ol> </li> <li>You will require your end users to comply with any applicable law and these Terms. You will not knowingly enable your end users to violate applicable law or these Terms.</li> <li>You shall indemnify and hold harmless Plex and its officers, directors, employees, contractors, licensors, suppliers, distributors, contractors, agents, and third party contributors from any claims, damages, liabilities, costs and fees (including reasonable attorney fees) arising from any use of the Interfacing Software or from Plex\'s distribution of the Interfacing Software.</li> <li> Brand Features and Attribution <ol> <li>"Brand Features" is defined as the trade names, trademarks, service marks, logos, domain names, and other distinctive brand features of a party. Except where expressly stated, these terms do not grant either party any right, title, or interest in or to the other party\'s Brand Features. Any use by you of Plex\'s Brand Features (including any goodwill associated therewith) will inure to the benefit of Plex. Plex Brand Features include the Plex Play Logo ("&gt;" in stylized format) and the trademarks, trade names and designs as may be identified from time to time in the Plex Trademark Notice that is posted at <a href="https://plex.tv/legal" target="_blank">plex.tv/legal</a>.</li> <li>You must seek prior written approval from Plex to display Plex\'s Brand Features, including for the purpose of promoting or advertising that your Interfacing Software is for use in conjunction with Plex Services. Plex, in its sole discretion and in a separate writing such as an e-mail from an authorized representative of Plex, may grant you a revocable, non-transferable, nonexclusive license, without right of sub-license, to display Plex\'s Brand Features for the purpose of promoting or advertising that your Interfacing Software is for use in conjunction with Plex Services. You understand and agree that Plex has the sole discretion to determine whether your attribution(s) and use of Plex\'s Brand Features are in accordance with the above requirements and guidelines and that Plex may revoke the license granted herein at any time, or may require you to modify your use of Plex\'s Brand Features, for any reason in its sole discretion.</li> <li>You will not make any statement that suggests a partnership with, sponsorship by, or endorsement by Plex, without Plex\'s express prior written approval.</li> <li>In the course of promoting, marketing, or demonstrating the Services, Plex may produce and distribute incidental depictions, including screenshots, video, or other content from your Interfacing Software, and may use your company or product name. You grant us all necessary rights for the above purposes.</li> </ol> </li> </ol> </li> </ol> <h4>Children</h4> <p> While Plex does distribute products that may be used by children, the Services are not intended to be used by children, without involvement, supervision, and approval of a parent or legal guardian. Therefore, if an account owner sets parental controls or establishes sub-accounts that the account owner intends to permit a child to use, the account owner should not reveal the account password to the child. Plex and its contributors may not provide controls that restrict the maturity level of content available via Plex and an adult account owner has sole responsibility for determining what maturity level is appropriate for or accessible to any children whom the account owner permits to use the Plex service or a sub-account. </p> <h4>NO WARRANTY</h4> <ol> <li>PLEX SERVICES ARE PROVIDED "AS IS". PLEX MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND PLEX EXPRESSLY DISCLAIMS ALL WARRANTIES WITH RESPECT TO THE PLEX SERVICES, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FURTHER, PLEX DOES NOT WARRANT AGAINST ERRORS, OMISSIONS, RESULTS OF USE, OR THAT PLEX SERVICES ARE BUG FREE OR ERROR FREE OR THAT USE WILL BE UNINTERRUPTED. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THE AGREEMENT. ALL THE FOREGOING DISCLAIMERS ALSO APPLY IN FULL WITH RESPECT TO PLEX\'S LICENSORS, SUPPLIERS, DISTRIBUTORS, CONTRACTORS, AGENTS, AND THIRD PARTY CONTRIBUTORS. SOME STATES DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.</li> <li>You agree that Plex and its officers, directors, employees, and contractors are not responsible for any fault, inaccuracy, error, omission, delay or any other failure of your equipment and/or services caused by Plex\'s hardware, software, cabling, network services, or the like, or arising from Plex\'s use of such equipment and/or services.</li> <li>The above disclaimer of warranty applies to software developed by Plex and any software developed by a third party and provided by Plex including, but not limited to, Interfacing Software developed by any Plex user.</li> </ol> <h4>Limitation of Liability and Damages</h4> <ol> <li>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, INCLUDING, BUT NOT LIMITED TO, TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY, OR OTHERWISE, SHALL PLEX BE LIABLE TO YOU OR ANY OTHER PERSON OR ENTITY: (I) FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, ACCURACY OF RESULTS, COMPUTER FAILURE OR MALFUNCTION, LOSS OF DATA, OR OTHER DAMAGES RESULTING FROM YOUR USE OF THE SOFTWARE; OR (II) FOR ANY MATTER BEYOND ITS REASONABLE CONTROL. PLEX\'S AGGREGATE LIABILITY FOR DAMAGES OF ANY KIND WHATSOEVER ARISING OUT OF THIS AGREEMENT SHALL BE LIMITED TO THE LESSER OF THE TOTAL FEES PAID BY YOU TO PLEX (IF ANY) FOR THE PORTION OF THE SOFTWARE THAT GAVE RISE TO SUCH DAMAGES OR $100 (U.S.), EXCEPT WHERE NOT PERMITTED BY APPLICABLE LAW, IN WHICH CASE PLEX\'S LIABILITY SHALL BE LIMITED TO THE MINIMUM AMOUNT PERMITTED BY SUCH APPLICABLE LAW. ALL THE FOREGOING LIMITATIONS SHALL APPLY EVEN IF EITHER PARTY HAS BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. ALL THE FOREGOING LIMITATIONS ALSO APPLY WITH RESPECT TO PLEX\'S SUPPLIERS, LICENSORS, DISTRIBUTORS, CONTRACTORS, AGENTS, AND THIRD PARTY CONTRIBUTORS. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION AND EXCLUSION MAY NOT APPLY TO YOU.</li> <li>The above limitations and exclusions apply to software developed by Plex and any software developed by a third party and provided by Plex including, but not limited to, Interfacing Software developed by Plex user.</li> </ol> <h4>Third-Party Materials</h4> <p> This website and other Services may provide links to websites, software, or other materials provided by third parties. Plex does not endorse and is not responsible or liable for the availability, accuracy, safety, or intellectual property rights of or relating to such content. Plex is not liable for any harm caused by any such materials. </p> <h4>Malware</h4> <p> "Malware" means any known, discovered, envisioned, or invented, or any yet to be known, discovered, envisioned, or invented: (i) virus, Trojan horse, or any other harmful, harassing, or malicious software; or (ii) method, use, or means by which any software, firmware, equipment, device, communications medium, person, entity, or the like directly or indirectly engages in or is used for: (a) any unauthorized access; (b) any unauthorized communication; or (c) any cracks, hacks, exploits, or other activity, method, use, or means, that may cause harassment, harm, data loss, data theft, loss of communication, loss of privacy, or the like. You acknowledge that the Internet, Internet service providers, shared or dedicated telecommunication lines, wireless access points and wireless networks, other forms of communication, online resources including websites and cloud computing environments, or other means that you use to connect to the Software may not be secure and may be vulnerable to attack by third parties, and that it is possible to receive Malware by using the Internet, dedicated lines, other forms of communication, or other means. In order to protect the Software, you shall regularly obtain, use, and update appropriate third party software or other means to protect yourself from Malware and to detect and remove Malware that may be downloaded using the Internet, dedicated lines, other forms of communication, or other means. Plex does not warrant that the Software will be free of Malware including, but not limited to, Malware that is introduced by third parties, the Internet, dedicated lines, other forms of communication, or other means. </p> <h4>Waiver and Indemnity</h4> <p> You agree that Plex and its licensors, distributors, contractors, agents, and third party contributors shall have no liability whatsoever for any use you make of the Services. You shall indemnify and hold harmless Plex and its licensors, suppliers, distributors, contractors, agents, and third party contributors from any claims, damages, liabilities, costs and fees (including reasonable attorney fees) arising from your use of the Plex Services as well as from your failure to comply with any of the Terms, or any losses, damages, claims, costs, and/or attorneys\' fees arising from any use of or reliance upon any information received in connection with the Services that comprises or is based upon data provided by Plex or any third party. </p> <h4>Termination of Services</h4> <p> Plex may at any time, with or without cause and with or without prior notice, immediately terminate or suspend your Plex account or otherwise terminate or suspend your access to all or a portion of the Services. Cause for such termination may include: (a) violations of the Terms or any other policies or guidelines that are referenced herein; (b) a request by you to cancel or terminate your account; (c) a request and/or order from law enforcement, a judicial body, or other government agency; (d) where providing the Services to you is or may become unlawful; (e) unexpected technical or security issues or problems; or (f) your participation in fraudulent or illegal activities. Any such termination or suspension shall be made by Plex in its sole discretion and Plex will not be responsible to you or any third party for any damages that may result or arise out of such termination or suspension of your access to the Services. </p> <h4>Miscellaneous</h4> <ol> <li>This Agreement does not give you any rights not expressly and unambiguously granted herein.</li> <li>No agency, partnership, joint venture, or employment is created as a result of this Agreement and you do not have any authority of any kind to bind Plex in any respect whatsoever.</li> <li>If any provision of this Agreement is found to be unenforceable or invalid, that provision shall be limited or eliminated to the minimum extent necessary so that this Agreement shall otherwise remain in full force and effect and enforceable.</li> <li>This Agreement is not assignable, transferable, or sublicensable by you except with Plex\'s prior written consent. Plex may transfer, assign, or delegate this Agreement and its rights and obligations without consent.</li> <li>Plex\'s failure to enforce any right or provisions in this Agreement will not constitute a waiver of such or any other provision.</li> <li>This Agreement shall be governed by and construed in accordance with the laws of the state of California, as if made within California between two residents thereof, and the parties submit to the exclusive jurisdiction of the Superior Court of Santa Clara County and the United States District Court for the Northern District of California. Notwithstanding the foregoing sentence, but without limiting Plex\'s right to seek injunctive or other equitable relief in any court of competent jurisdiction, any disputes arising with respect to this Agreement shall be referred to an arbitrator affiliated with the Judicial Arbitration and Mediation Services, Inc. ("JAMS"). The arbitrator shall be selected by joint agreement of the parties. In the event the parties cannot agree on an arbitrator within thirty (30) days of the initiating party providing the other party with written notice that it plans to seek arbitration, the parties shall each select an arbitrator affiliated with JAMS, which arbitrators shall jointly select a third such arbitrator to resolve the dispute. The written decision of the arbitrator shall be final and binding on the parties. The arbitration proceeding shall be carried on and heard in Santa Clara County, California using the English language and pursuant to the rules of (and administered by) JAMS. In any action or proceeding to enforce rights under this Agreement, the prevailing party will be entitled to recover costs and reasonable attorneys\' fees from the other party. A separate written license agreement or order and signed by Plex and you or your company, employer, or principal may state other terms and conditions that apply to you, including terms relating to price, payment, delivery, confidential information, support services, and the like. You are solely responsible to review such terms or conditions with your company, employer or principal. In the event of any conflict in terms, the terms of the separate license agreement shall supersede the terms of this Agreement.</li> <li>Both parties agree that this Agreement is the complete and exclusive statement of the mutual understanding of the parties and supersedes and cancels all previous written and oral agreements, communications, and other understandings relating to the subject matter of this Agreement.</li> </ol> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,a="";return a+=" "+g((n=e&&e.title,typeof n===v?n.apply(e):n))+" "}function o(e,t){var a,i="";return i+=" ",a=n(15).call(e,e&&e.type,"home",{hash:{},inverse:y.program(6,u,t),fn:y.program(4,l,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function l(e,t){var a="";return a+=" "+g(n(2).call(e,"Add User",{hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+g(n(2).call(e,"Invite Friend",{hash:{},
data:t}))+" "}function d(e,t){var a="";return a+=" "+g(n(2).call(e,"Save Changes",{hash:{},data:t}))+" "}function c(e,t){var a,i="";return i+=" ",a=n(15).call(e,e&&e.type,"home",{hash:{},inverse:y.program(13,p,t),fn:y.program(11,f,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function f(e,t){var a="";return a+=" "+g(n(2).call(e,"Add",{hash:{},data:t}))+" "}function p(e,t){var a="";return a+=" "+g(n(2).call(e,"Invite",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};
var h,m="",v="function",g=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> <div class="modal-poster media-poster img-circle placeholder-friend"></div> <h4 class="modal-title"> ',h=a.if.call(t,t&&t.title,{hash:{},inverse:y.program(3,o,r),fn:y.program(1,s,r),data:r}),(h||0===h)&&(m+=h),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">'+g(n(2).call(t,"Cancel",{
hash:{},data:r}))+'</button> <button type="submit" class="next-btn btn btn-lg btn-primary disabled">'+g(n(2).call(t,"Next",{hash:{},data:r}))+'</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"> ',h=a.if.call(t,t&&t.title,{hash:{},inverse:y.program(10,c,r),fn:y.program(8,d,r),data:r}),(h||0===h)&&(m+=h),m+=" </span> </button> </div> </form> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var a,i="";return i+=' <div class="restricted-name-group form-group"> <input type="text" id="restricted-title" name="title" class="form-control" placeholder="'+P(n(2).call(e,"Name",{hash:{},data:t}))+'" value="'+P((a=e&&e.homeUser,a=null==a||a===!1?a:a.title,typeof a===_?a.apply(e):a))+'"> </div> '}function o(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:S.program(6,u,t),fn:S.program(4,l,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:S.program(10,c,t),fn:S.program(8,d,t),data:t}),(n||0===n)&&(i+=n),i+=" </p> "}function l(e,t){var n,a="";return a+=" "+P((n=e&&e.friend,n=null==n||n===!1?n:n.title,typeof n===_?n.apply(e):n))+" "}function u(e,t){var n,a="";return a+=" "+P((n=e&&e.friend,n=null==n||n===!1?n:n.username,typeof n===_?n.apply(e):n))+" "}function d(e,t){var n,a="";return a+=" "+P((n=e&&e.friend,
n=null==n||n===!1?n:n.email,typeof n===_?n.apply(e):n))+" "}function c(e,t){var a="";return a+=" "+P(n(2).call(e,"An invite will be sent to this user.",{hash:{},data:t}))+" "}function f(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:S.program(18,v,t),fn:S.program(13,p,t),data:t}),(n||0===n)&&(i+=n),i+=" </div> "}function p(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:S.program(16,m,t),fn:S.program(14,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function h(e,t){var a="";return a+=' <button type="button" class="disable-guest-btn btn btn-sm btn-danger">'+P(n(2).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">'+P(n(2).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:S.noop,fn:S.program(19,g,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=a.if.call(e,e&&e.canRemoveHomeUser,{hash:{},inverse:S.noop,fn:S.program(21,y,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function g(e,t){var a="";return a+=' <button type="button" class="remove-friend-btn btn btn-sm btn-danger">'+P(n(2).call(e,"Remove this friend",{hash:{},data:t}))+"</button> "}function y(e,t){var a="";return a+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+P(n(2).call(e,"Remove from home",{
hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var b,w="",P=this.escapeExpression,_="function",S=this;return w+='<div class="edit-friend-header"> <div class="media-poster img-circle placeholder-friend"></div> ',b=a.if.call(t,(b=t&&t.homeUser,null==b||b===!1?b:b.restricted),{hash:{},inverse:S.program(3,o,r),fn:S.program(1,s,r),data:r}),(b||0===b)&&(w+=b),w+=" </div> ",b=a.if.call(t,t&&t.showActions,{hash:{},inverse:S.noop,fn:S.program(12,f,r),data:r
}),(b||0===b)&&(w+=b),w+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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> '+o(n(2).call(t,"General",{hash:{},data:r}))+' </a> </li> <li class="owned-list-header modal-nav-list-header">'+o(n(2).call(t,"My Servers",{
hash:{},data:r}))+'</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> '+o(n(2).call(t,"Restrictions",{hash:{},data:r}))+' </a> </li> <li class="shared-list-header modal-nav-list-header">'+o(n(2).call(t,"Shared With Me",{hash:{},data:r}))+'</li> <li class="shared-servers-container"></li> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<span class="modal-nav-icon friend-server-status ',(s=n.status)?r=s.call(t,{hash:{},data:i}):(s=t&&t.status,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(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> '+u((r=t&&t.server,
r=null==r||r===!1?r:r.name,typeof r===l?r.apply(t):r))+" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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">'+o(n(2).call(t,"Available",{hash:{},data:r}))+'</span> <span class="server-status-label unavailable">'+o(n(2).call(t,"Unavailable",{
hash:{},data:r}))+'</span> <span class="server-status-label unauthorized">'+o(n(2).call(t,"Unauthorized",{hash:{},data:r}))+'</span> <span class="server-status-label unknown">'+o(n(2).call(t,"Unknown",{hash:{},data:r}))+'</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>'+o(n(2).call(t,"Info",{hash:{},data:r}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Version",{
hash:{},data:r}))+'</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">'+o(n(2).call(t,"Last Seen",{hash:{},data:r}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Address",{hash:{},data:r}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Port",{
hash:{},data:r}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+o(n(2).call(t,"Share",{hash:{},data:r}))+"</h4> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <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" ',
i=a.if.call(e,(i=e&&e.user,null==i||i===!1?i:i.allowChannels),{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="> "+f(n(2).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">'+f(n(2).call(e,"Plex Pass restrictions",{hash:{},data:t}))+'</span> <a href="'+f((i=e&&e.plexPassUrl,typeof i===p?i.apply(e):i))+'" target="_blank">'+f(n(2).call(e,"Learn More",{
hash:{},data:t}))+'</a> </h4> <p class="text-center"> </p> </div> '}function o(e,t){return"checked"}function l(e,t){var i,r="";return r+=' <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',i=a.if.call(e,(i=e&&e.user,null==i||i===!1?i:i.allowChannels),{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="> "+f(n(2).call(e,"Allow Channels",{hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var u,d="",c=this,f=this.escapeExpression,p="function";return u=a.unless.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),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" ',u=a.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowSync),{
hash:{},inverse:c.noop,fn:c.program(2,o,r),data:r}),(u||0===u)&&(d+=u),d+="> "+f(n(2).call(t,"Allow Sync",{hash:{},data:r}))+' </label> </div> <div class="checkbox"> <label for="allow-camera-upload-images-cb"> <input type="checkbox" id="allow-camera-upload-images-cb" name="allowCameraUpload" ',u=a.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowCameraUpload),{hash:{},inverse:c.noop,fn:c.program(2,o,r),data:r}),(u||0===u)&&(d+=u),d+="> "+f(n(2).call(t,"Allow Camera Upload",{hash:{},data:r}))+' </label> <p class="help-block">'+f(n(2).call(t,"Enabling this option will allow this user to upload media to your server.",{
hash:{},data:r}))+"</p> </div> ",u=a.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:c.noop,fn:c.program(4,l,r),data:r}),(u||0===u)&&(d+=u),d+=' </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+f((u=t&&t.moviesIcon,typeof u===p?u.apply(t):u))+'"></i> '+f(n(2).call(t,"Movies",{hash:{},data:r}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+f(n(2).call(t,"Only allow movies matching the ratings or labels below.",{
hash:{},data:r}))+' </div> </div> <div class="form-group"> <label for="filter-movie-contentRating" class="col-sm-3 control-label"> '+f(n(2).call(t,"Ratings",{hash:{},data:r}))+' </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="'+f(n(2).call(t,"Allow all ratings",{hash:{},data:r}))+'" value="'+f((u=t&&t.user,u=null==u||u===!1?u:u.filterMovies,
u=null==u||u===!1?u:u.contentRating,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label for="filter-movie-label" class="col-sm-3 control-label"> '+f(n(2).call(t,"Labels",{hash:{},data:r}))+' </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="'+f(n(2).call(t,"Allow all labels",{hash:{},data:r}))+'" value="'+f((u=t&&t.user,u=null==u||u===!1?u:u.filterMovies,
u=null==u||u===!1?u:u.label,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+f((u=t&&t.showsIcon,typeof u===p?u.apply(t):u))+'"></i> '+f(n(2).call(t,"TV Shows",{hash:{},data:r}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+f(n(2).call(t,"Only allow TV shows matching the ratings or labels below.",{hash:{},data:r}))+' </div> </div> <div class="form-group"> <label for="filter-show-contentRating" class="col-sm-3 control-label"> '+f(n(2).call(t,"Ratings",{
hash:{},data:r}))+' </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="'+f(n(2).call(t,"Allow all ratings",{hash:{},data:r}))+'" value="'+f((u=t&&t.user,u=null==u||u===!1?u:u.filterTelevision,u=null==u||u===!1?u:u.contentRating,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label for="filter-show-label" class="col-sm-3 control-label"> '+f(n(2).call(t,"Labels",{
hash:{},data:r}))+' </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="'+f(n(2).call(t,"Allow all labels",{hash:{},data:r}))+'" value="'+f((u=t&&t.user,u=null==u||u===!1?u:u.filterTelevision,u=null==u||u===!1?u:u.label,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+f((u=t&&t.musicIcon,
typeof u===p?u.apply(t):u))+'"></i> '+f(n(2).call(t,"Albums",{hash:{},data:r}))+' </label> </div> <div class="form-group"> <label for="filter-artist-label" class="col-sm-3 control-label"> '+f(n(2).call(t,"Labels",{hash:{},data:r}))+' </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="'+f(n(2).call(t,"Allow all labels",{hash:{},data:r}))+'" value="'+f((u=t&&t.user,
u=null==u||u===!1?u:u.filterMusic,u=null==u||u===!1?u:u.label,typeof u===p?u.apply(t):u))+'"> </div> </div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){function r(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var s,o,l="",u="function",d=this.escapeExpression,c=this;return l+='<div class="checkbox"> <label for="share-section-'+d((s=t&&t.section,s=null==s||s===!1?s:s.id,typeof s===u?s.apply(t):s))+'-cb"> <input type="checkbox" id="share-section-'+d((s=t&&t.section,
s=null==s||s===!1?s:s.id,typeof s===u?s.apply(t):s))+'-cb" value="'+d((s=t&&t.section,s=null==s||s===!1?s:s.id,typeof s===u?s.apply(t):s))+'" ',s=n.if.call(t,t&&t.isChecked,{hash:{},inverse:c.noop,fn:c.program(1,r,i),data:i}),(s||0===s)&&(l+=s),l+='> <i class="section-type-icon glyphicon ',(o=n.typeIcon)?s=o.call(t,{hash:{},data:i}):(o=t&&t.typeIcon,s=typeof o===u?o.call(t,{hash:{},data:i}):o),l+=d(s)+'"></i> '+d((s=t&&t.section,s=null==s||s===!1?s:s.title,typeof s===u?s.apply(t):s))+" </label> </div> ";
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"show-libraries"}function o(e,t){var i,r="";return r+=' <li class="share-section-list-item"> <div class="checkbox"> <label for="share-all-libraries-'+g((i=e&&e.server,i=null==i||i===!1?i:i.machineIdentifier,typeof i===v?i.apply(e):i))+'-cb"> <input type="checkbox" id="share-all-libraries-'+g((i=e&&e.server,i=null==i||i===!1?i:i.machineIdentifier,typeof i===v?i.apply(e):i))+'-cb" name="share-all-libraries-cb" value="all" ',
i=a.if.call(e,e&&e.allLibraries,{hash:{},inverse:y.noop,fn:y.program(4,l,t),data:t}),(i||0===i)&&(r+=i),r+="> "+g(n(2).call(e,"All Libraries",{hash:{},data:t}))+" </label> </div> </li> "}function l(e,t){return"checked"}function u(e,t){var a="";return a+=' <p class="text-muted">'+g(n(2).call(e,"Loading...",{hash:{},data:t}))+"</p> "}function d(e,t){var n;return n=a.if.call(e,e&&e.hasFailed,{hash:{},inverse:y.program(11,f,t),fn:y.program(9,c,t),data:t}),n||0===n?n:""}function c(e,t){var a,i="";return i+=' <p class="text-muted">'+g(n(2).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 f(e,t){var n;return n=a.unless.call(e,e&&e.hasSections,{hash:{},inverse:y.noop,fn:y.program(12,p,t),data:t}),n||0===n?n:""}function p(e,t){var a="";return a+=' <p class="text-muted">'+g(n(2).call(e,"No libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var h,m="",v="function",g=this.escapeExpression,y=this;return m+='<ul id="'+g((h=t&&t.server,h=null==h||h===!1?h:h.machineIdentifier,
typeof h===v?h.apply(t):h))+'-section-list" class="list share-section-list ',h=a.unless.call(t,t&&t.allLibraries,{hash:{},inverse:y.noop,fn:y.program(1,s,r),data:r}),(h||0===h)&&(m+=h),m+='"> ',h=a.if.call(t,t&&t.hasSections,{hash:{},inverse:y.noop,fn:y.program(3,o,r),data:r}),(h||0===h)&&(m+=h),m+=" </ul> ",h=a.if.call(t,t&&t.isPending,{hash:{},inverse:y.program(8,d,r),fn:y.program(6,u,r),data:r}),(h||0===h)&&(m+=h),m+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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">'+o(n(2).call(t,"Available",{hash:{},data:r}))+'</span> <span class="server-status-label unavailable">'+o(n(2).call(t,"Unavailable",{hash:{},data:r}))+'</span> <span class="server-status-label unauthorized">'+o(n(2).call(t,"Unauthorized",{
hash:{},data:r}))+'</span> <span class="server-status-label unknown">'+o(n(2).call(t,"Unknown",{hash:{},data:r}))+'</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>'+o(n(2).call(t,"Info",{hash:{},data:r}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Version",{hash:{},data:r}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Last Seen",{
hash:{},data:r}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Address",{hash:{},data:r}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Port",{hash:{},data:r}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+o(n(2).call(t,"Sharing",{
hash:{},data:r}))+'</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> '+o(n(2).call(t,"Sync Allowed",{hash:{},data:r}))+' </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">'+o(n(2).call(t,"Leave Server",{hash:{},data:r}))+"</button> </div> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=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:i}):(s=t&&t.typeIcon,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+'"></i> '+u((r=t&&t.section,r=null==r||r===!1?r:r.title,typeof r===l?r.apply(t):r))+" </li> "})},function(e,t,n){
var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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(n(2).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-existing-user-btn btn btn-primary">'+d(n(2).call(e,"Add an Existing Plex User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(n(2).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(n(2).call(e,"Name",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-restricted-user-btn btn btn-primary">'+d(n(2).call(e,"Create a Managed User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(n(2).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 o(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(n(2).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <p class="help-block">'+d(n(2).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),r=r||{};var l,u="",d=this.escapeExpression,c=this;return l=n(15).call(t,t&&t.type,"home",{hash:{},inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),
(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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> '+o(n(2).call(t,"Welcome to Plex Home",{
hash:{},data:r}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <p>'+o(n(2).call(t,"{1}, so we've made a few changes to help keep your media safe.",t&&t.intro,{hash:{},data:r}))+"</p> <ol> <li>"+o(n(2).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:r}))+"</li> <li>"+o(n(2).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:r}))+"</li> </ol> <p>"+o(n(2).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:r}))+'</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-lg btn-primary" data-dismiss="modal">'+o(n(2).call(t,"OK",{hash:{},data:r}))+"</button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="modal-dialog"> <div class="modal-alert"></div> <div class="modal-content"></div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<span class="message">',(s=n.message)?r=s.call(t,{hash:{},data:i}):(s=t&&t.message,r=typeof s===l?s.call(t,{hash:{},
data:i}):s),o+=u(r)+"</span> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return' <a class="back-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> '}function o(e,t){var a="";return a+=' <i class="modal-icon glyphicon pencil"></i> '+y(n(2).call(e,"Edit PIN",{hash:{},data:t}))+" "}function l(e,t){var n;return n=a.if.call(e,e&&e.isEditConfirmation,{hash:{},inverse:b.program(8,d,t),fn:b.program(6,u,t),data:t}),n||0===n?n:""}function u(e,t){
var a="";return a+=" "+y(n(2).call(e,"Confirm Current PIN",{hash:{},data:t}))+" "}function d(e,t){var a="";return a+=" "+y(n(2).call(e,"Enter PIN",{hash:{},data:t}))+" "}function c(e,t){var a="";return a+=' <p class="help-block"> '+y(n(2).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 f(e,t){var i,r="";return r+=' <div class="modal-footer"> ',i=a.if.call(e,e&&e.hasCurrentPIN,{hash:{},inverse:b.noop,fn:b.program(13,p,t),
data:t}),(i||0===i)&&(r+=i),r+=" ",i=a.if.call(e,e&&e.isEditWarning,{hash:{},inverse:b.program(17,m,t),fn:b.program(15,h,t),data:t}),(i||0===i)&&(r+=i),r+=' <button type="submit" class="save-btn btn-link">'+y(n(2).call(e,"Save",{hash:{},data:t}))+"</button> </div> "}function p(e,t){var a="";return a+=' <button type="button" class="remove-btn btn-gray pull-left">'+y(n(2).call(e,"Remove",{hash:{},data:t}))+"</button> "}function h(e,t){var a="";return a+=' <button type="button" class="skip-btn btn-gray" data-dismiss="modal">'+y(n(2).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">'+y(n(2).call(e,"Cancel",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var v,g="",y=this.escapeExpression,b=this;return g+='<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:b.noop,fn:b.program(1,s,r),
data:r}),(v||0===v)&&(g+=v),g+=" ",v=a.if.call(t,t&&t.isEditing,{hash:{},inverse:b.program(5,l,r),fn:b.program(3,o,r),data:r}),(v||0===v)&&(g+=v),g+=' <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:b.noop,fn:b.program(10,c,r),data:r}),(v||0===v)&&(g+=v),g+=" </div> ",v=a.if.call(t,t&&t.isEditing,{hash:{},inverse:b.noop,fn:b.program(12,f,r),data:r}),(v||0===v)&&(g+=v),g+=" </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var u,d="",c=this;return u=n.if.call(t,t&&t.disabled,{hash:{},inverse:c.program(3,s,i),fn:c.program(1,r,i),data:i}),(u||0===u)&&(d+=u),d+=' <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:c.program(7,l,i),
fn:c.program(5,o,i),data:i}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="modal-header"> <h4 class="modal-title"> '+o(n(2).call(t,"Select User",{hash:{},data:r}))+' <span class="loading loading-sm"></span> </h4> </div> <div class="modal-body"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){return"hidden"}function o(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c=this.escapeExpression,f="function";return u+='<ul class="nav nav-bar-nav"> <li><a class="back-btn ',l=a.unless.call(t,t&&t.hasHistory,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" 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 ',
l=a.unless.call(t,t&&t.canGoPremium,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#"><span class="plex-pass-label label label-primary">'+c(n(2).call(t,"Go Premium",{hash:{},data:r}))+'</span></a></li> <li class="',l=a.if.call(t,t&&t.activityCount,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"><a class="activity-btn ',l=a.unless.call(t,t&&t.showActivity,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#!/status" title="'+c(n(2).call(t,"Status",{
hash:{},data:r}))+'" data-toggle="tooltip"><span class="activity-badge badge badge-transparent ',l=a.unless.call(t,t&&t.activityCount,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='">'+c((l=t&&t.activityCount,typeof l===f?l.apply(t):l))+'</span><i class="glyphicon cardio"></i></a></li> <li><a class="settings-btn" href="#!/settings" title="'+c(n(2).call(t,"Settings",{hash:{},data:r}))+'" data-toggle="tooltip"><i class="glyphicon settings"></i></a></li> </ul> <div class="modal-container"></div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}function o(e,t){return"signed-in"}function l(e,t){return"full-user"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c=this,f="function",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 ',
u=a.unless.call(t,t&&t.totalCount,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='">'+p((u=t&&t.totalCount,typeof u===f?u.apply(t):u))+'</span> </a> <ul class="dropdown-menu ',u=a.if.call(t,t&&t.signedIn,{hash:{},inverse:c.noop,fn:c.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+=" ",u=a.if.call(t,t&&t.isFullUser,{hash:{},inverse:c.noop,fn:c.program(5,l,r),data:r}),(u||0===u)&&(d+=u),d+='"> <li class="signed-in-item dropdown-header username-header"></li> <li class="signed-in-item full-user-item"><a href="#!/account">'+p(n(2).call(t,"Account",{
hash:{},data:r}))+'</a></li> <li class="signed-in-item"><a class="users-btn" href="#">'+p(n(2).call(t,"Users",{hash:{},data:r}))+' <span class="invites-badge badge ',u=a.unless.call(t,t&&t.invitesCount,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='">'+p((u=t&&t.invitesCount,typeof u===f?u.apply(t):u))+'</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(n(2).call(t,"Watch Later",{
hash:{},data:r}))+'</a></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/recommendations">'+p(n(2).call(t,"Recommended",{hash:{},data:r}))+'</a></li> <li class="signed-in-item divider"></li> <li class="announcements-item ',u=a.if.call(t,t&&t.isRestricted,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='"><a href="#!/announcements">'+p(n(2).call(t,"Announcements",{hash:{},data:r}))+' <span class="announcements-badge badge ',u=a.unless.call(t,t&&t.unreadAnnouncementsCount,{
hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='">'+p((u=t&&t.unreadAnnouncementsCount,typeof u===f?u.apply(t):u))+'</span></a></li> <li><a href="'+p((u=t&&t.appsUrl,typeof u===f?u.apply(t):u))+'" target="_blank">'+p(n(2).call(t,"Get Plex apps",{hash:{},data:r}))+'</a></li> <li><a href="'+p((u=t&&t.helpUrl,typeof u===f?u.apply(t):u))+'" target="_blank">'+p(n(2).call(t,"Help",{hash:{},data:r}))+'</a></li> <li class="divider"></li> <li class="signed-in-item switch-user-item ',
u=a.unless.call(t,t&&t.home,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='"><a class="switch-user-btn" href="#">'+p(n(2).call(t,"Switch User...",{hash:{},data:r}))+'</a></li> <li class="signed-out-item"><a class="sign-in-btn" href="#">'+p(n(2).call(t,"Sign In",{hash:{},data:r}))+'</a></li> <li class="signed-in-item full-user-item"><a class="sign-out-btn" href="#">'+p(n(2).call(t,"Sign Out",{hash:{},data:r}))+"</a></li> </ul> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var n,a="";return a+='data-scope-to-attr="'+d((n=e&&e.scopeToAttr,typeof n===u?n.apply(e):n))+'" data-scope-to-param="'+d((n=e&&e.scopeToParam,typeof n===u?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<div class="form-group" data-attr="'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'"> <label for="text-'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'" class="control-label">'+d(n(2).call(t,t&&t.label,{
hash:{},data:r}))+'<span class="control-error"></span></label> <div class="input-group selectize-group"> <input type="text" id="text-'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'" class="form-control text-field" name="'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'" placeholder="'+d((o=t&&t.placeholder,typeof o===u?o.apply(t):o))+'" data-rating-key="'+d((o=t&&t.ratingKey,typeof o===u?o.apply(t):o))+'" data-title="'+d((o=t&&t.title,typeof o===u?o.apply(t):o))+'" ',o=a.if.call(t,t&&t.scopeToAttr,{hash:{},
inverse:c.noop,fn:c.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+="> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+p(n(2).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(2).call(e,"Plex was unable to authenticate your server. Please sign your server out and try again.",{hash:{},data:t}))+"</p> "}function o(e,t){var a,i="";return a=n(15).call(e,e&&e.mappingError,"myplexgone",{
hash:{},inverse:h.program(6,u,t),fn:h.program(4,l,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function l(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+p(n(2).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(2).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 u(e,t){var a="";return a+=' <h4 class="server-connect-error-header">'+p(n(2).call(e,"Signed in to Plex",{
hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(2).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">'+p(n(2).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),
r=r||{};var c,f="",p=this.escapeExpression,h=this;return c=n(15).call(t,t&&t.mappingError,"badauth",{hash:{},inverse:h.program(3,o,r),fn:h.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=" ",c=n(63).call(t,t&&t.context,"settings",{hash:{},inverse:h.noop,fn:h.program(8,d,r),data:r}),(c||0===c)&&(f+=c),f+=' <p class="text-muted">'+p(n(2).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:r}))+"</p> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"locked"}function o(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<div class="form-group"> <label for="lockable-'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'">'+c(n(2).call(t,t&&t.label,{hash:{},data:r}))+'</label> <div class="input-group"> <a href="#" data-field="'+c((l=t&&t.name,
typeof l===d?l.apply(t):l))+'" class="input-group-addon edit-lock-addon ',l=a.if.call(t,t&&t.locked,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=a.if.call(t,t&&t.disabled,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='" tabindex="-1"><i class="glyphicon lock"></i></a> <input type="number" id="lockable-'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" class="form-control lockable-field" name="'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" value="'+c((l=t&&t.value,
typeof l===d?l.apply(t):l))+'" placeholder="'+c((l=t&&t.placeholder,typeof l===d?l.apply(t):l))+'" ',l=a.if.call(t,t&&t.disabled,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+="> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return" locked"}function o(e,t){var n,a="";return a+='data-query="'+c((n=e&&e.query,typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};
var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<div class="form-group"> <label for="lockable-'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'">'+c(n(2).call(t,t&&t.label,{hash:{},data:r}))+'</label> <div class="input-group selectize-group"> <a href="#" data-field="'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" class="input-group-addon edit-lock-addon',l=a.if.call(t,t&&t.locked,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon lock"></i></a> <input type="text" id="lockable-'+c((l=t&&t.name,
typeof l===d?l.apply(t):l))+'" class="form-control lockable-field tag-input-hidden" data-name="'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" data-attr="'+c((l=t&&t.attribute,typeof l===d?l.apply(t):l))+'" ',l=a.if.call(t,t&&t.query,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+="> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return" locked"}function o(e,t){var n,i="";return i+=' <textarea class="form-control lockable-field" id="lockable-'+m((n=e&&e.name,
typeof n===h?n.apply(e):n))+'" name="'+m((n=e&&e.name,typeof n===h?n.apply(e):n))+'"',n=a.if.call(e,e&&e.rows,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(n||0===n)&&(i+=n),i+=' placeholder="'+m((n=e&&e.placeholder,typeof n===h?n.apply(e):n))+'">'+m((n=e&&e.value,typeof n===h?n.apply(e):n))+"</textarea> "}function l(e,t){var n,a="";return a+=' rows="'+m((n=e&&e.rows,typeof n===h?n.apply(e):n))+'"'}function u(e,t){var n,i="";return i+=' <input type="text" id="lockable-'+m((n=e&&e.name,typeof n===h?n.apply(e):n))+'" class="form-control lockable-field" name="'+m((n=e&&e.name,
typeof n===h?n.apply(e):n))+'" value="'+m((n=e&&e.value,typeof n===h?n.apply(e):n))+'" placeholder="'+m((n=e&&e.placeholder,typeof n===h?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,c,t),data:t}),(n||0===n)&&(i+=n),i+="> "}function d(e,t){var n,a="";return a+='data-scope-to-attr="'+m((n=e&&e.scopeToAttr,typeof n===h?n.apply(e):n))+'" data-scope-to-param="'+m((n=e&&e.scopeToParam,
typeof n===h?n.apply(e):n))+'"'}function c(e,t){var n,a="";return a+='data-rating-key="'+m((n=e&&e.ratingKey,typeof n===h?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var f,p="",h="function",m=this.escapeExpression,v=this;return p+='<div class="form-group selectize-group" data-attr="'+m((f=t&&t.name,typeof f===h?f.apply(t):f))+'"> <label for="lockable-'+m((f=t&&t.name,typeof f===h?f.apply(t):f))+'">'+m(n(2).call(t,t&&t.label,{hash:{},data:r}))+'</label> <div class="input-group"> <a href="#" data-field="'+m((f=t&&t.name,
typeof f===h?f.apply(t):f))+'" class="input-group-addon edit-lock-addon',f=a.if.call(t,t&&t.locked,{hash:{},inverse:v.noop,fn:v.program(1,s,r),data:r}),(f||0===f)&&(p+=f),p+='" tabindex="-1"><i class="glyphicon lock"></i></a> ',f=n(15).call(t,t&&t.type,"textarea",{hash:{},inverse:v.program(6,u,r),fn:v.program(3,o,r),data:r}),(f||0===f)&&(p+=f),p+=" </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"advanced-setting"}function o(e,t){
var i,r="";return r+=' <label class="control-label" for="input_'+w((i=e&&e.id,typeof i===P?i.apply(e):i))+w((i=e&&e.idSuffix,typeof i===P?i.apply(e):i))+'"> <input type="checkbox" id="input_'+w((i=e&&e.id,typeof i===P?i.apply(e):i))+w((i=e&&e.idSuffix,typeof i===P?i.apply(e):i))+'" name="'+w((i=e&&e.id,typeof i===P?i.apply(e):i))+'" value="1" ',i=a.if.call(e,e&&e.value,{hash:{},inverse:_.noop,fn:_.program(4,l,t),data:t}),(i||0===i)&&(r+=i),r+="> "+w(n(2).call(e,e&&e.label,{hash:{},data:t}))+" </label> ",
i=a.if.call(e,e&&e.summary,{hash:{},inverse:_.noop,fn:_.program(6,u,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function l(e,t){return"checked"}function u(e,t){var a="";return a+=' <p class="help-block">'+w(n(2).call(e,e&&e.summary,{hash:{},data:t}))+"</p> "}function d(e,t){var i,r="";return r+=' <label class="control-label" for="input_'+w((i=e&&e.id,typeof i===P?i.apply(e):i))+w((i=e&&e.idSuffix,typeof i===P?i.apply(e):i))+'">'+w(n(2).call(e,e&&e.label,{hash:{},data:t}))+"</label> ",i=a.if.call(e,e&&e.enumValues,{
hash:{},inverse:_.program(13,h,t),fn:_.program(9,c,t),data:t}),(i||0===i)&&(r+=i),r+=" ",i=a.if.call(e,e&&e.summary,{hash:{},inverse:_.noop,fn:_.program(6,u,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function c(e,t){var n,i="";return i+=' <select id="input_'+w((n=e&&e.id,typeof n===P?n.apply(e):n))+w((n=e&&e.idSuffix,typeof n===P?n.apply(e):n))+'" name="'+w((n=e&&e.id,typeof n===P?n.apply(e):n))+'"> ',n=a.each.call(e,e&&e.enumValues,{hash:{},inverse:_.noop,fn:_.programWithDepth(10,f,t,e),data:t}),(n||0===n)&&(i+=n),
i+=" </select> "}function f(e,t,a){var i,r="";return r+=' <option value="'+w((i=e&&e.value,typeof i===P?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,a&&a.value,{hash:{},inverse:_.noop,fn:_.program(11,p,t),data:t}),(i||0===i)&&(r+=i),r+=">"+w(n(2).call(e,e&&e.label,{hash:{},data:t}))+"</option> "}function p(e,t){return'selected="selected"'}function h(e,t){var i,r="";return r+=' <input type="',i=n(15).call(e,e&&e.option,"hidden",{hash:{},inverse:_.program(16,v,t),fn:_.program(14,m,t),data:t}),(i||0===i)&&(r+=i),
r+='" id="input_'+w((i=e&&e.id,typeof i===P?i.apply(e):i))+w((i=e&&e.idSuffix,typeof i===P?i.apply(e):i))+'" class="form-control" name="'+w((i=e&&e.id,typeof i===P?i.apply(e):i))+'" value="'+w((i=e&&e.value,typeof i===P?i.apply(e):i))+'" ',i=a.if.call(e,e&&e.placeholder,{hash:{},inverse:_.noop,fn:_.program(18,g,t),data:t}),(i||0===i)&&(r+=i),r+="> "}function m(e,t){return"password"}function v(e,t){return"text"}function g(e,t){var n,a="";return a+='placeholder="'+w((n=e&&e.placeholder,typeof n===P?n.apply(e):n))+'"';
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var y,b="",w=this.escapeExpression,P="function",_=this;return b+='<div class="form-group ',y=a.if.call(t,t&&t.advanced,{hash:{},inverse:_.noop,fn:_.program(1,s,r),data:r}),(y||0===y)&&(b+=y),b+='"> ',y=n(15).call(t,t&&t.type,"bool",{hash:{},inverse:_.program(8,d,r),fn:_.program(3,o,r),data:r}),(y||0===y)&&(b+=y),b+=" </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";
return i+=' <textarea class="form-control text-field" id="text-'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'" name="'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'"',n=a.if.call(e,e&&e.rows,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+=' placeholder="'+p((n=e&&e.placeholder,typeof n===f?n.apply(e):n))+'">'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+"</textarea> "}function o(e,t){var n,a="";return a+=' rows="'+p((n=e&&e.rows,typeof n===f?n.apply(e):n))+'"'}function l(e,t){
var n,i="";return i+=' <input type="text" id="text-'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'" class="form-control text-field" name="'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'" value="'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+'" placeholder="'+p((n=e&&e.placeholder,typeof n===f?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.excludeParam,{hash:{},inverse:h.noop,fn:h.program(5,u,t),data:t}),(n||0===n)&&(i+=n),i+="> "}function u(e,t){var n,a="";return a+='data-exclude-param="'+p((n=e&&e.excludeParam,
typeof n===f?n.apply(e):n))+'" data-exclude-value="'+p((n=e&&e.excludeValue,typeof n===f?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f="function",p=this.escapeExpression,h=this;return c+='<div class="form-group"> <label for="text-'+p((d=t&&t.name,typeof d===f?d.apply(t):d))+'">'+p(n(2).call(t,t&&t.label,{hash:{},data:r}))+"</label> ",d=n(15).call(t,t&&t.type,"textarea",{hash:{},inverse:h.program(4,l,r),fn:h.program(1,s,r),data:r}),(d||0===d)&&(c+=d),
c+=" </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="mini-controls"> <div class="loading loading-inline"></div> </div> '})},1744,1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return' <a class="play-video-btn btn-gray" href=""> <div class="photo-video-overlay"> <span class="video-badge badge badge-round"> <i class="glyphicon facetime-video"></i> </span> </div> </a> ';
}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c=this.escapeExpression;return u+='<div class="photo-details-container"> <div class="error hidden"></div> <div class="photo-details"> <div class="photo-loading-overlay"></div> ',l=a.if.call(t,t&&t.isVideo,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' <div class="photo-details-info"> <div class="media-actions"> <button class="play-btn media-action-btn btn-link ',
l=a.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.slideshowPaused),{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=a.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.canPlayPause),{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon play"></i></button> <button class="pause-btn media-action-btn btn-link ',l=a.if.call(t,(l=t&&t.player,null==l||l===!1?l:l.slideshowPaused),{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r
}),(l||0===l)&&(u+=l),u+=" ",l=a.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.canPlayPause),{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon pause"></i></button> <button class="edit-btn media-action-btn btn-link hidden"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link hidden"><i class="glyphicon more"></i></button> <button class="minimize-btn media-action-btn btn-link hidden"><i class="glyphicon chevron-down"></i></button> <button class="enter-fullscreen-btn media-action-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn media-action-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <div class="photo-actions-dropdown media-actions-dropdown dropup pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> <h4 class="photo-title"></h4> <span class="photo-subtitle">'+c(n(2).call(t,"{1} of {2}",t&&t.index,t&&t.total,{
hash:{},data:r}))+'</span> <div class="photo-summary"></div> </div> </div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<a class="player-close-btn btn-gray" href="#"> <i class="glyphicon remove-2"></i> </a> <div class="loading loading-inline"></div> <div class="photo-player-controls"> <a class="previous-btn btn-gray hidden" href="#"> <i class="previous-icon glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray hidden" href="#"> <i class="next-icon glyphicon chevron-right"></i> </a> </div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression,u="function";return o+='<div class="post-play-background background"></div> <div class="post-play-footer"> <div class="item-previous"> <div class="item-poster"> <h1>'+l(n(2).call(t,"Previous",{hash:{},data:r}))+'</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">'+l((s=t&&t.previous,
s=null==s||s===!1?s:s.title,typeof s===u?s.apply(t):s))+'</h1> <h2 class="media-subtitle-1">',s=t&&t.previous,s=null==s||s===!1?s:s.subtitle,s=typeof s===u?s.apply(t):s,(s||0===s)&&(o+=s),o+='</h2> </div> </div> <div class="item-next"> <div class="item-poster"> <h1>'+l(n(2).call(t,"Playing Next",{hash:{},data:r}))+'</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">'+l((s=t&&t.next,
s=null==s||s===!1?s:s.title,typeof s===u?s.apply(t):s))+'</h1> <h2 class="media-subtitle-1">'+l((s=t&&t.next,s=null==s||s===!1?s:s.subtitle,typeof s===u?s.apply(t):s))+'</h2> <h3 class="media-subtitle-2">',s=t&&t.next,s=null==s||s===!1?s:s.index,s=typeof s===u?s.apply(t):s,(s||0===s)&&(o+=s),o+="</h3> <p>"+l((s=t&&t.next,s=null==s||s===!1?s:s.summary,typeof s===u?s.apply(t):s))+"</p> </div> </div> </div> "})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),i=i||{},'<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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="player-slider-track"> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
i=i||{},'<div class="video-background"></div> <video id="html-video" class="html-video"></video> <div class="video-subtitles-container"></div> <div class="flash-video"> <div id="flash-video-placeholder"></div> </div> <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 a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){function r(e,t){var a,i="";return i+=' <button class="btn-link dropdown-toggle ',a=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(a||0===a)&&(i+=a),i+='" href="#player-primary-player-dropdown" data-toggle="dropdown"> <i class="',a=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i> </button> '}function s(e,t){
return"active"}function o(e,t){return"plex-icon-companion-cast-active"}function l(e,t){return"plex-icon-companion-cast"}function u(e,t){var a,i="";return i+=' <button class="btn-link cast-btn ',a=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(a||0===a)&&(i+=a),i+="\" href='#'> <i class=\"",a=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i> </button> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
i=i||{};var d,c="",f=this;return d=n.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(8,u,i),fn:f.program(1,r,i),data:i}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <li> <a class="',i=a.unless.call(e,e&&e.hasSelectedQuality,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='" data-index="-1" href="#"> '+f(n(2).call(e,"Original",{hash:{},data:t}))+' <i class="player-dropdown-selected-icon selected-icon glyphicon ok-2"></i> </a> </li> ';
}function o(e,t){return"selected"}function l(e,t){var i,r="";return r+=' <li> <a class="',i=a.if.call(e,e&&e.selected,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='" data-index="'+f((i=e&&e.index,typeof i===p?i.apply(e):i))+'" href="#"> '+f(n(114).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),r=r||{};var u,d="",c=this,f=this.escapeExpression,p="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"> ',u=a.if.call(t,t&&t.includeOriginal,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=" ",u=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:c.noop,fn:c.program(4,l,r),data:r}),(u||0===u)&&(d+=u),d+=" </ul> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){return"plex-icon-audio"}function o(e,t){return"plex-icon-subtitles-alt"}function l(e,t,i){var r,s="";return s+=' <li><a class="',r=a.if.call(e,e&&e.selected,{hash:{},inverse:P.noop,fn:P.program(6,u,t),data:t}),(r||0===r)&&(s+=r),s+='" data-id="'+w((r=e&&e.id,typeof r===b?r.apply(e):r))+'" href="#">',r=a.if.call(e,e&&e.language,{hash:{},inverse:P.program(10,c,t),fn:P.program(8,d,t),data:t}),(r||0===r)&&(s+=r),r=n(15).call(e,i&&i.type,"subtitles",{hash:{},inverse:P.noop,fn:P.program(12,f,t),
data:t}),(r||0===r)&&(s+=r),r=n(15).call(e,i&&i.type,"audio",{hash:{},inverse:P.noop,fn:P.program(16,m,t),data:t}),(r||0===r)&&(s+=r),s+=' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i></a></li> '}function u(e,t){return"selected"}function d(e,t){var n;return w((n=e&&e.language,typeof n===b?n.apply(e):n))}function c(e,t){return w(n(2).call(e,"Unknown",{hash:{},data:t}))}function f(e,t){var n;return n=a.if.call(e,e&&e.format,{hash:{},inverse:P.noop,fn:P.program(13,p,t),
data:t}),n||0===n?n:""}function p(e,t){var i,r="";return r+=" ("+w(n(859).call(e,e&&e.format,{hash:{},data:t})),i=a.if.call(e,e&&e.forced,{hash:{},inverse:P.noop,fn:P.program(14,h,t),data:t}),(i||0===i)&&(r+=i),r+=")"}function h(e,t){var a="";return a+=" "+w(n(2).call(e,"Forced",{hash:{},data:t}))}function m(e,t){var n;return n=a.if.call(e,e&&e.codec,{hash:{},inverse:P.noop,fn:P.program(17,v,t),data:t}),n||0===n?n:""}function v(e,t){var a="";return a+=" ("+w(n(858).call(e,e&&e.codec,{hash:{},data:t
}))+" "+w(n(857).call(e,e&&e.channels,{hash:{},data:t}))+")"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var g,y="",b="function",w=this.escapeExpression,P=this;return y+='<button class="btn-link dropdown-toggle" href="#player-'+w((g=t&&t.type,typeof g===b?g.apply(t):g))+'-dropdown" data-toggle="dropdown"> <i class="',g=n(15).call(t,t&&t.type,"audio",{hash:{},inverse:P.program(3,o,r),fn:P.program(1,s,r),data:r}),(g||0===g)&&(y+=g),y+='"></i> </button> <ul class="dropdown-menu pull-right"> ',
g=a.each.call(t,t&&t.streams,{hash:{},inverse:P.noop,fn:P.programWithDepth(5,l,r,t),data:r}),(g||0===g)&&(y+=g),y+=" </ul> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){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),i=i||{};var s,o,l="",u="function",d=this.escapeExpression,c=this;return l+='<a class="media-poster-container" href="',
(o=n.url)?s=o.call(t,{hash:{},data:i}):(o=t&&t.url,s=typeof o===u?o.call(t,{hash:{},data:i}):o),l+=d(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,i),data:i}),(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> ';
})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" "+u(n(2).call(e,"Click {1}here{2} to add content to the library.",'<a href="#" class="add-to-library-link">',"</a>",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<div class="section-loading-container hidden"> <div class="loading loading-inline"></div> </div> <h4 class="empty-message text-muted text-center"> <span class="empty-default"> '+u(n(2).call(t,"The library has no content yet.",{
hash:{},data:r}))+" ",o=a.if.call(t,t&&t.canEdit,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' </span> <span class="empty-refreshing"> '+u(n(2).call(t,"The library is still being refreshed. Hang on while we look for your content.",{hash:{},data:r}))+' </span> <span class="empty-filter"> '+u(n(2).call(t,"There is no content matching your active filter.",{hash:{},data:r}))+' </span> <span class="empty-folder"> '+u(n(2).call(t,"There is no content in the selected folder.",{
hash:{},data:r}))+" </span> </h4> "})},1744,function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l="function",u=this.escapeExpression;return o+='<form class="edit-section-advanced-form settings-container"> <div class="language-group"> <input type="hidden" name="language" value="'+u((s=t&&t.section,s=null==s||s===!1?s:s.language,typeof s===l?s.apply(t):s))+'"> </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(n(2).call(t,"Scanner",{
hash:{},data:r}))+' <span class="control-error">'+u(n(2).call(t,"A scanner is required.",{hash:{},data:r}))+'</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(n(2).call(t,"Agent",{hash:{},data:r}))+' <span class="control-error">'+u(n(2).call(t,"An agent is required.",{hash:{},data:r}))+'</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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<form class="edit-section-folders-form settings-container"> <label> '+o(n(2).call(t,"Add folders to your library",{hash:{},data:r}))+' </label> <div class="form-group Location-group"> <div class="paths-region"></div> <p class="add-folder-container"> <button type="button" class="add-folder-btn btn btn-icon-label btn-default"><i class="glyphicon folder-plus"></i> '+o(n(2).call(t,"Browse for media folder",{
hash:{},data:r}))+'</button> </p> <p class="control-error">'+o(n(2).call(t,"At least one folder is required.",{hash:{},data:r}))+'</p> </div> <p class="help-block">'+o(n(2).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:r}))+"</p> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),i=i||{};var r,s,o="",l="function",u=this.escapeExpression;return o+='<div class="col-md-12"> <div class="form-group path-group"> <input type="text" name="path" class="form-control" value="',(s=n.path)?r=s.call(t,{hash:{},data:i}):(s=t&&t.path,r=typeof s===l?s.call(t,{hash:{},data:i}):s),o+=u(r)+'"> <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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var a="";return a+=' <p class="help-block"> '+d(n(2).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 o(e,t){return'<div class="vendor-logo vendor-logo-lyricfind"></div>'}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this.escapeExpression,c=this;return u+='<div class="choose-agent use-premium-agent" data-agent="com.plexapp.agents.plexmusic" data-scanner="Plex Premium Music Scanner"> <div class="row"> <div class="col-xs-12"> <div class="row use-agent-header use-premium-agent-header"> <div class="col-xs-12"> <input type="radio"> <span class="header-text"> '+d(n(2).call(t,"Create a premium Plex music library!",{
hash:{},data:r}))+' </span> </div> </div> <div class="row use-premium-agent-body"> <div class="col-xs-8"> <ul> <li>'+d(n(2).call(t,"Access to the best artwork, artist bios, album reviews, and more",{hash:{},data:r}))+"</li> <li>"+d(n(2).call(t,"Smart mixes based on track or mood",{hash:{},data:r}))+"</li> <li>"+d(n(2).call(t,"Improved music recognition and matching",{hash:{},data:r}))+"</li> </ul> ",l=a.unless.call(t,t&&t.hasPremiumMusic,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),
u+=' </div> <div class="col-xs-4 vendor-logos"> ',l=a.if.call(t,t&&t.hasLyrics,{hash:{},inverse:c.noop,fn:c.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+=' <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-agent use-basic-agent"> <div class="row use-agent-header"> <div class="col-xs-12"> <input type="radio"> '+d(n(2).call(t,"Create a basic music library",{hash:{},data:r}))+" </div> </div> </div> ";
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var i,r="";return r+=' <div class="form-group"> <label class="control-label" for="input_importFromItunes_c"> <input type="checkbox" id="input_importFromItunes_c" name="importFromiTunes" value="1" ',i=a.if.call(e,e&&e.value,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="> "+h(n(2).call(e,"Import from iTunes",{hash:{},data:t}))+' </label> <p class="help-block">'+h(n(2).call(e,"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.",{
hash:{},data:t}))+"</p> </div> "}function o(e,t){return"checked"}function l(e,t,i){var r,s="";return s+=" "+h(n(24).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" ",r=a.if.call(e,i&&i.edit,{hash:{},inverse:p.noop,fn:p.program(5,u,t),data:t}),(r||0===r)&&(s+=r),s+=" "}function u(e,t){var a,i="";return i+=" ",a=n(15).call(e,e&&e.id,"enableBIFGeneration",{hash:{},inverse:p.noop,fn:p.program(6,d,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function d(e,t){var a="";return a+=' <div class="form-group"> <button type="button" class="delete-thumbnails-btn btn btn-sm btn-danger">'+h(n(2).call(e,"Delete Preview Thumbnails",{
hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var c,f="",p=this,h=this.escapeExpression;return c=a.if.call(t,t&&t.isNewMusicSection,{hash:{},inverse:p.noop,fn:p.program(1,s,r),data:r}),(c||0===c)&&(f+=c),f+=" ",c=a.each.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.programWithDepth(4,l,r,t),data:r}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"section-type-chosen";
}function o(e,t){var a="";return a+=' <p class="prompt">'+g(n(2).call(e,"Select your library type",{hash:{},data:t}))+"</p> "}function l(e,t){var a="";return a+=" <label>"+g(n(2).call(e,"Library type",{hash:{},data:t}))+"</label> "}function u(e,t,i){var r,s="";return s+=' <a class="wizard-block section-type ',r=a.if.call(e,i&&i.canChangeType,{hash:{},inverse:y.noop,fn:y.program(8,d,t),data:t}),(r||0===r)&&(s+=r),s+=" ",r=n(15).call(e,i&&i.currentSectionKey,e&&e.key,{hash:{},inverse:y.noop,fn:y.program(10,c,t),
data:t}),(r||0===r)&&(s+=r),s+='" data-key="'+g((r=e&&e.key,typeof r===b?r.apply(e):r))+'" href="#"> <i class="wizard-block-icon '+g((r=e&&e.sectionTypeIcon,typeof r===b?r.apply(e):r))+'"></i> '+g((r=e&&e.title,typeof r===b?r.apply(e):r))+" </a> "}function d(e,t){return"selectable"}function c(e,t){return"selected"}function f(e,t){var a="";return a+=' <div class="row"> <div class="col-xs-12"> <p class="prompt">'+g(n(2).call(e,"Name your library and choose language.",{hash:{},data:t}))+"</p> </div> </div> ";
}function p(e,t){var a="";return a+=" "+g(n(2).call(e,"Last updated {1}",e&&e.updatedAt,{hash:{},data:t}))+" "}function h(e,t){var a="";return a+=" "+g(n(2).call(e,"Each library should only contain one type of media.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var m,v="",g=this.escapeExpression,y=this,b="function";return v+='<form class="edit-section-type-form settings-container ',m=a.if.call(t,(m=t&&t.section,null==m||m===!1?m:m.type),{hash:{},inverse:y.noop,
fn:y.program(1,s,r),data:r}),(m||0===m)&&(v+=m),v+='"> ',m=a.if.call(t,t&&t.add,{hash:{},inverse:y.program(5,l,r),fn:y.program(3,o,r),data:r}),(m||0===m)&&(v+=m),v+=' <div class="wizard-blocks-group form-group type-group"> ',m=a.each.call(t,t&&t.sectionTypes,{hash:{},inverse:y.noop,fn:y.programWithDepth(7,u,r,t),data:r}),(m||0===m)&&(v+=m),v+=' <label class="control-label"> <span class="control-error">'+g(n(2).call(t,"You must select a media type.",{hash:{},data:r}))+'</span> </label> </div> <div class="visible-once-section-type-chosen"> ',
m=a.if.call(t,t&&t.hasType,{hash:{},inverse:y.noop,fn:y.program(12,f,r),data:r}),(m||0===m)&&(v+=m),v+=' <div class="row"> <div class="col-md-7"> <div class="form-group title-group"> <div> <label for="edit-section-title" class="control-label"> '+g(n(2).call(t,"Name",{hash:{},data:r}))+' <span class="control-error">'+g(n(2).call(t,"A library name is required.",{hash:{},data:r}))+'</span> </label> </div> <input type="text" id="edit-section-title" name="title" class="form-control" value="'+g((m=t&&t.section,
m=null==m||m===!1?m:m.title,typeof m===b?m.apply(t):m))+'"> </div> </div> <div class="col-md-5"> <div class="form-group language-group"> <div> <label for="edit-section-language" class="control-label"> '+g(n(2).call(t,"Language",{hash:{},data:r}))+' <span class="control-error">'+g(n(2).call(t,"A language is required.",{hash:{},data:r}))+'</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"> ',
m=a.if.call(t,t&&t.updatedAt,{hash:{},inverse:y.program(16,h,r),fn:y.program(14,p,r),data:r}),(m||0===m)&&(v+=m),v+=" </span> </div> </div> </div> </form> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=' <option value="'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+'" ',n=a.if.call(e,e&&e.selected,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+=">"+p((n=e&&e.label,typeof n===f?n.apply(e):n))+"</option> ";
}function o(e,t){return"selected"}function l(e,t){var a="";return a+=' <option value="">'+p(n(2).call(e,"Loading...",{hash:{},data:t}))+"</option> "}function u(e,t){var n,a="";return a+=' <option value="'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+'">'+p((n=e&&e.label,typeof n===f?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var d,c="",f="function",p=this.escapeExpression,h=this;return c+='<div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-title">'+p(n(2).call(t,"Title",{
hash:{},data:r}))+'</label> <input type="text" id="match-search-title" name="title" class="form-control" value="'+p((d=t&&t.item,d=null==d||d===!1?d:d.title,typeof d===f?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-agent">'+p(n(2).call(t,"Agent",{hash:{},data:r}))+'</label> <select id="match-search-agent" name="agent"> ',d=a.each.call(t,t&&t.agents,{hash:{},inverse:h.program(4,l,r),fn:h.program(1,s,r),data:r}),(d||0===d)&&(c+=d),
c+=' </select> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-year">'+p(n(2).call(t,"Year",{hash:{},data:r}))+'</label> <input type="text" id="match-search-year" name="year" class="form-control" value="'+p((d=t&&t.item,d=null==d||d===!1?d:d.year,typeof d===f?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-language">'+p(n(2).call(t,"Language",{
hash:{},data:r}))+'</label> <select id="match-search-language" name="language"> ',d=a.each.call(t,t&&t.languages,{hash:{},inverse:h.program(4,l,r),fn:h.program(6,u,r),data:r}),(d||0===d)&&(c+=d),c+=" </select> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,n,a,i){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),i=i||{},'<div class="result-region"> <div class="loading loading-inline"></div> </div> '})},function(e,t,n){var a=n(4);
e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,i="";return i+=" ",n=a.if.call(e,e&&e.title,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function o(e,t){var a,i="";return i+=' <li> <a class="card btn-gray ',a=n(15).call(e,e&&e.id,"all",{hash:{},inverse:c.noop,fn:c.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+='" data-id="'+p((a=e&&e.id,typeof a===f?a.apply(e):a))+'" href="#">'+p(n(2).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),r=r||{};var u,d="",c=this,f="function",p=this.escapeExpression;return d+='<div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',u=a.each.call(t,t&&t.deviceTypes,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=' </ul> </div> <div class="device-list-container col-sm-8 col-md-9"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+o(n(2).call(t,"Invites",{hash:{},data:r}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+o(n(2).call(t,"Friends",{hash:{},data:r}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+o(n(2).call(t,"Pending",{hash:{},data:r}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+o(n(2).call(t,"Invites",{hash:{},data:r}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+o(n(2).call(t,"My Home",{hash:{},data:r}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+o(n(2).call(t,"Pending",{hash:{},data:r}))+'</h3> <div class="pending-list-container"></div> </div> '});
},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"selected"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c=this.escapeExpression;return u+='<ul class="nav nav-header pull-right"> <li class="web-nav-item"><a class="web-btn btn-gray ',l=n(15).call(t,t&&t.subset,"web",{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#!/settings/web">'+c(n(2).call(t,"Web",{
hash:{},data:r}))+'</a></li> <li class="server-nav-item ',l=a.unless.call(t,t&&t.hasPrimaryServer,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"><a class="server-btn btn-gray ',l=n(15).call(t,t&&t.subset,"server",{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#!/settings/server">'+c(n(2).call(t,"Server",{hash:{},data:r}))+'</a></li> <li class="users-nav-item ',l=a.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,o,r),
data:r}),(l||0===l)&&(u+=l),u+='"><a class="users-btn btn-gray ',l=n(15).call(t,t&&t.subset,"users",{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#!/settings/users">'+c(n(2).call(t,"Users",{hash:{},data:r}))+'<span class="badge"></span></a></li> <li class="devices-nav-item ',l=a.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+='"><a class="devices-btn btn-gray ',l=n(15).call(t,t&&t.subset,"devices",{hash:{},
inverse:d.noop,fn:d.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+='" href="#!/settings/devices">'+c(n(2).call(t,"Devices",{hash:{},data:r}))+"</a></li> </ul> <h2>"+c(n(2).call(t,"Settings",{hash:{},data:r}))+'</h2> <div class="settings-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}function o(e,t){return"selected"}function l(e,t){var a,i="";return i+=' <li> <a class="friends-card card btn-gray ',a=n(15).call(e,e&&e.subset,"friends",{
hash:{},inverse:c.noop,fn:c.program(3,o,t),data:t}),(a||0===a)&&(i+=a),i+='" href="#!/settings/users/friends"> <span class="badge"></span> '+f(n(2).call(e,"Friends",{hash:{},data:t}))+" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var u,d="",c=this,f=this.escapeExpression;return d+='<div class="filter-bar"> <div class="filter-bar-right"> <span class="user-actions ',u=a.unless.call(t,t&&t.showUserActions,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),
d+='"> <button class="add-user-btn btn btn-sm btn-default">'+f(n(2).call(t,"Add User",{hash:{},data:r}))+'</button> <button class="enable-guest-btn btn btn-sm btn-default ',u=a.unless.call(t,t&&t.showEnableGuest,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='">'+f(n(2).call(t,"Enable Guest",{hash:{},data:r}))+'</button> <button class="disable-guest-btn btn btn-sm btn-danger ',u=a.unless.call(t,t&&t.showDisableGuest,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),
(u||0===u)&&(d+=u),d+='">'+f(n(2).call(t,"Disable Guest",{hash:{},data:r}))+'</button> </span> <button class="leave-home-btn btn btn-sm btn-danger ',u=a.unless.call(t,t&&t.showLeaveHome,{hash:{},inverse:c.noop,fn:c.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+='">'+f(n(2).call(t,"Leave Home",{hash:{},data:r}))+'</button> <button class="invite-friend-btn btn btn-sm btn-default">'+f(n(2).call(t,"Invite Friend",{hash:{},data:r}))+'</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 ',
u=n(15).call(t,t&&t.subset,"home",{hash:{},inverse:c.noop,fn:c.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+='" href="#!/settings/users/home"> <span class="badge"></span> '+f(n(2).call(t,"My Home",{hash:{},data:r}))+" </a> </li> ",u=a.if.call(t,t&&t.showFriends,{hash:{},inverse:c.noop,fn:c.program(5,l,r),data:r}),(u||0===u)&&(d+=u),d+=" </ul> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,
typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,null==i||i===!1?i:i.language),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="> "+T((i=e&&e.title,typeof i===C?i.apply(e):i))+" </option> "}function o(e,t){return"selected"}function l(e,t){var i,r="";return r+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="autoLogin" ',i=a.if.call(e,(i=e&&e.settings,null==i||i===!1?i:i.autoLogin),{hash:{},inverse:k.noop,fn:k.program(5,u,t),
data:t}),(i||0===i)&&(r+=i),r+="> "+T(n(2).call(e,"Automatically Sign In",{hash:{},data:t}))+' </label> <p class="help-block">'+T(n(2).call(e,"Do not prompt to select a user or enter a PIN during startup on this device.",{hash:{},data:t}))+"</p> </div> "}function u(e,t){return"checked"}function d(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,null==i||i===!1?i:i.allowHttpFallback),{hash:{},inverse:k.noop,fn:k.program(2,o,t),
data:t}),(i||0===i)&&(r+=i),r+=">"+T(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function c(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,null==i||i===!1?i:i.debugLevel),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=">"+T(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function f(e,t){var i,r="";return r+=' <div class="form-group"> <label for="chromecastAppID">Chromecast Receiver</label> <select id="chromecastAppID"> ',
i=a.each.call(e,e&&e.chromecastAppIDs,{hash:{},inverse:k.noop,fn:k.programWithDepth(12,p,t,e),data:t}),(i||0===i)&&(r+=i),r+=' </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 ',i=n(63).call(e,(i=e&&e.settings,null==i||i===!1?i:i.chromecastAppID),"custom",{hash:{},inverse:k.noop,fn:k.program(14,h,t),data:t}),(i||0===i)&&(r+=i),r+='"> <label for="chromecastCustomAppID">Custom Chromecast Application ID</label> <input type="text" id="chromecastCustomAppID" class="form-control" placeholder="Application ID" value="'+T((i=e&&e.settings,
i=null==i||i===!1?i:i.chromecastCustomAppID,typeof i===C?i.apply(e):i))+'"> <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="'+T((i=e&&e.settings,i=null==i||i===!1?i:i.myPlexScheme,typeof i===C?i.apply(e):i))+'"> </div> <div class="form-group"> <label for="myPlexUrl">Plex.tv Address</label> <input type="text" id="myPlexUrl" class="form-control" placeholder="plex.tv" value="'+T((i=e&&e.settings,
i=null==i||i===!1?i:i.myPlexUrl,typeof i===C?i.apply(e):i))+'"> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="rejectDirectConnections" ',i=a.if.call(e,(i=e&&e.settings,null==i||i===!1?i:i.rejectDirectConnections),{hash:{},inverse:k.noop,fn:k.program(5,u,t),data:t}),(i||0===i)&&(r+=i),r+='> 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 p(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,null==i||i===!1?i:i.chromecastAppID),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=">"+T(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function h(e,t){return"hidden"}function m(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.index,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.index,(i=a&&a.settings,
null==i||i===!1?i:i.localQuality),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="> "+T(n(114).call(e,e,{hash:{},data:t}))+" </option> "}function v(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.index,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.index,(i=a&&a.settings,null==i||i===!1?i:i.remoteQuality),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="> "+T(n(114).call(e,e,{hash:{},data:t}))+" </option> "}function g(e,t,a){var i,r="";
return r+=' <option value="'+T((i=e&&e.index,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.index,(i=a&&a.settings,null==i||i===!1?i:i.channelQuality),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+="> "+T(n(114).call(e,e,{hash:{},data:t}))+" </option> "}function y(e,t){var i,r="";return r+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="dash" ',i=a.if.call(e,(i=e&&e.settings,null==i||i===!1?i:i.dash),{hash:{},inverse:k.noop,fn:k.program(5,u,t),
data:t}),(i||0===i)&&(r+=i),r+="> "+T(n(2).call(e,"HTML5 Player",{hash:{},data:t}))+' </label> <p class="help-block">'+T(n(2).call(e,"Prefer the HTML5 video player over the Flash player.",{hash:{},data:t}))+"</p> </div> "}function b(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,null==i||i===!1?i:i.audioBoost),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=">"+T(n(2).call(e,e&&e.title,{
hash:{},data:t}))+"</option> "}function w(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,null==i||i===!1?i:i.subtitleSize),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=">"+T(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function P(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,
null==i||i===!1?i:i.subtitlesBurnLevel),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=">"+T(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function _(e,t,a){var i,r="";return r+=' <option value="'+T((i=e&&e.value,typeof i===C?i.apply(e):i))+'" ',i=n(15).call(e,e&&e.value,(i=a&&a.settings,null==i||i===!1?i:i.extrasPrefixCount),{hash:{},inverse:k.noop,fn:k.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+=">"+T(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var S,x="",C="function",T=this.escapeExpression,k=this;return x+='<div class="filter-bar"> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right basic-setting">'+T(n(2).call(t,"Show Advanced",{hash:{},data:r}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right advanced-setting">'+T(n(2).call(t,"Hide Advanced",{hash:{},data:r}))+'</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">'+T(n(2).call(t,"General",{
hash:{},data:r}))+'</a></li> <li class="advanced-setting"><a class="card btn-gray" href="#debug-web-group">'+T(n(2).call(t,"Debug",{hash:{},data:r}))+'</a></li> <li><a class="card btn-gray" href="#player-web-group">'+T(n(2).call(t,"Player",{hash:{},data:r}))+'</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"> '+T(n(2).call(t,"Version",{hash:{},data:r}))+" "+T((S=t&&t.version,typeof S===C?S.apply(t):S))+' </h4> <div class="form-group"> <label for="language">'+T(n(2).call(t,"Language",{
hash:{},data:r}))+'</label> <select id="language"> ',S=a.each.call(t,t&&t.languages,{hash:{},inverse:k.noop,fn:k.programWithDepth(1,s,r,t),data:r}),(S||0===S)&&(x+=S),x+=' </select> <p class="help-block">'+T(n(2).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:r}))+"</p> </div> ",S=a.if.call(t,t&&t.hasHome,{hash:{},inverse:k.noop,fn:k.program(4,l,r),data:r}),(S||0===S)&&(x+=S),x+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="playThemeMusic" ',
S=a.if.call(t,(S=t&&t.settings,null==S||S===!1?S:S.playThemeMusic),{hash:{},inverse:k.noop,fn:k.program(5,u,r),data:r}),(S||0===S)&&(x+=S),x+="> "+T(n(2).call(t,"Play Theme Music",{hash:{},data:r}))+' </label> <p class="help-block">'+T(n(2).call(t,"Automatically play theme music in the background when available.",{hash:{},data:r}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="showUnwatchedIcons" ',S=a.if.call(t,(S=t&&t.settings,null==S||S===!1?S:S.showUnwatchedIcons),{
hash:{},inverse:k.noop,fn:k.program(5,u,r),data:r}),(S||0===S)&&(x+=S),x+="> "+T(n(2).call(t,"Show Unwatched Icons",{hash:{},data:r}))+' </label> <p class="help-block">'+T(n(2).call(t,"Show unwatched icons in list items.",{hash:{},data:r}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="keyboardShortcuts" ',S=a.if.call(t,(S=t&&t.settings,null==S||S===!1?S:S.keyboardShortcuts),{hash:{},inverse:k.noop,fn:k.program(5,u,r),data:r}),(S||0===S)&&(x+=S),x+="> "+T(n(2).call(t,"Enable Keyboard Shortcuts",{
hash:{},data:r}))+' </label> <p class="help-block">'+T(n(2).call(t,"Press ? to view the list of {1}available shortcuts{2}.",'<a class="keyboard-shortcuts-btn" href="#">',"</a>",{hash:{},data:r}))+'</p> </div> <div class="form-group"> <label for="allowHttpFallback">'+T(n(2).call(t,"Allow Fallback to Insecure Connections",{hash:{},data:r}))+'</label> <select id="allowHttpFallback"> ',S=a.each.call(t,t&&t.httpFallbackOptions,{hash:{},inverse:k.noop,fn:k.programWithDepth(7,d,r,t),data:r}),(S||0===S)&&(x+=S),
x+=' </select> <p class="help-block">'+T(n(2).call(t,"Allow this browser to make insecure connections to Plex Media Server if secure connections fail.",{hash:{},data:r}))+'</p> </div> </div> <div id="debug-web-group" class="settings-group"> <div class="form-group"> <label for="debugLevel">'+T(n(2).call(t,"Debug Level",{hash:{},data:r}))+'</label> <select id="debugLevel" data-type="int"> ',S=a.each.call(t,t&&t.debugLevels,{hash:{},inverse:k.noop,fn:k.programWithDepth(9,c,r,t),data:r}),(S||0===S)&&(x+=S),
x+=' </select> <p class="help-block">'+T(n(2).call(t,"You can view the debug logs {1}here{2}.",'<a href="#!/logs">',"</a>",{hash:{},data:r}))+"</p> </div> ",S=a.if.call(t,t&&t.isNinja,{hash:{},inverse:k.noop,fn:k.program(11,f,r),data:r}),(S||0===S)&&(x+=S),x+=' </div> <div id="player-web-group" class="settings-group"> <h4 class="settings-header">'+T(n(2).call(t,"Streaming Quality",{hash:{},data:r}))+'</h4> <div class="form-group"> <label for="localQuality">'+T(n(2).call(t,"Local Quality",{hash:{},
data:r}))+'</label> <select id="localQuality" data-type="int"> <option value="-1">'+T(n(2).call(t,"Original",{hash:{},data:r}))+"</option> ",S=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:k.noop,fn:k.programWithDepth(16,m,r,t),data:r}),(S||0===S)&&(x+=S),x+=' </select> </div> <div class="form-group"> <label for="remoteQuality">'+T(n(2).call(t,"Remote Quality",{hash:{},data:r}))+'</label> <select id="remoteQuality" data-type="int"> <option value="-1">'+T(n(2).call(t,"Original",{hash:{},data:r
}))+"</option> ",S=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:k.noop,fn:k.programWithDepth(18,v,r,t),data:r}),(S||0===S)&&(x+=S),x+=' </select> </div> <div class="form-group"> <label for="channelQuality">'+T(n(2).call(t,"Online Quality",{hash:{},data:r}))+'</label> <select id="channelQuality" data-type="int"> <option value="-1">'+T(n(2).call(t,"Original",{hash:{},data:r}))+"</option> ",S=a.each.call(t,t&&t.availableQualities,{hash:{},inverse:k.noop,fn:k.programWithDepth(20,g,r,t),data:r
}),(S||0===S)&&(x+=S),x+=" </select> </div> ",S=a.if.call(t,t&&t.showExperimentalPlayer,{hash:{},inverse:k.noop,fn:k.program(22,y,r),data:r}),(S||0===S)&&(x+=S),x+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directPlay" ',S=a.if.call(t,(S=t&&t.settings,null==S||S===!1?S:S.directPlay),{hash:{},inverse:k.noop,fn:k.program(5,u,r),data:r}),(S||0===S)&&(x+=S),x+="> "+T(n(2).call(t,"Direct Play",{hash:{},data:r}))+' </label> <p class="help-block">'+T(n(2).call(t,"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:r}))+'</p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directStream" ',S=a.if.call(t,(S=t&&t.settings,null==S||S===!1?S:S.directStream),{hash:{},inverse:k.noop,fn:k.program(5,u,r),data:r}),(S||0===S)&&(x+=S),x+="> "+T(n(2).call(t,"Direct Stream",{hash:{},data:r}))+' </label> <p class="help-block">'+T(n(2).call(t,"Allows the server to copy compatible audio and video streams without converting them.",{hash:{},data:r}))+'</p> </div> <h4 class="settings-header">'+T(n(2).call(t,"Audio & Subtitles",{
hash:{},data:r}))+'</h4> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="allowAC3" ',S=a.if.call(t,(S=t&&t.settings,null==S||S===!1?S:S.allowAC3),{hash:{},inverse:k.noop,fn:k.program(5,u,r),data:r}),(S||0===S)&&(x+=S),x+="> "+T(n(2).call(t,"Allow Direct Play of AC3 Audio",{hash:{},data:r}))+' </label> <p class="help-block">'+T(n(2).call(t,"Allow MP4 videos with AC3 audio to be played directly. Browser support for AC3 audio is limited.",{hash:{},data:r
}))+'</p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="preferAAC" ',S=a.if.call(t,(S=t&&t.settings,null==S||S===!1?S:S.preferAAC),{hash:{},inverse:k.noop,fn:k.program(5,u,r),data:r}),(S||0===S)&&(x+=S),x+="> "+T(n(2).call(t,"Prefer AAC Audio",{hash:{},data:r}))+' </label> <p class="help-block">'+T(n(2).call(t,"Prefer AAC over MP3 when transcoding audio. Some devices, like the Wii U, only support HLS with AAC audio.",{hash:{},data:r}))+'</p> </div> <div class="form-group"> <label for="audioBoost">'+T(n(2).call(t,"Multi-Channel Audio Boost",{
hash:{},data:r}))+'</label> <select id="audioBoost" data-type="int"> ',S=a.each.call(t,t&&t.audioBoostLevels,{hash:{},inverse:k.noop,fn:k.programWithDepth(24,b,r,t),data:r}),(S||0===S)&&(x+=S),x+=' </select> <p class="help-block">'+T(n(2).call(t,"Boost volume when converting multi-channel audio to stereo.",{hash:{},data:r}))+'</p> </div> <div class="form-group"> <label for="subtitleSize">'+T(n(2).call(t,"Subtitle Size",{hash:{},data:r}))+'</label> <select id="subtitleSize" data-type="int"> ',S=a.each.call(t,t&&t.subtitleSizes,{
hash:{},inverse:k.noop,fn:k.programWithDepth(26,w,r,t),data:r}),(S||0===S)&&(x+=S),x+=' </select> </div> <div class="form-group"> <label for="subtitlesBurnLevel">'+T(n(2).call(t,"Burn Subtitles",{hash:{},data:r}))+'</label> <select id="subtitlesBurnLevel"> ',S=a.each.call(t,t&&t.subtitlesBurnLevels,{hash:{},inverse:k.noop,fn:k.programWithDepth(28,P,r,t),data:r}),(S||0===S)&&(x+=S),x+=' </select> <p class="help-block">'+T(n(2).call(t,"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:r}))+'</p> </div> <h4 class="settings-header">'+T(n(2).call(t,"Extras",{hash:{},data:r}))+'</h4> <div class="form-group"> <label for="extrasPrefixCount">'+T(n(2).call(t,"Cinema Trailers to Play Before Movies",{hash:{},data:r}))+'</label> <select id="extrasPrefixCount" data-type="int"> ',S=a.each.call(t,t&&t.extrasPrefixCounts,{hash:{},inverse:k.noop,fn:k.programWithDepth(30,_,r,t),data:r}),(S||0===S)&&(x+=S),x+=' </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">'+T(n(2).call(t,"Save Changes",{
hash:{},data:r}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t,a){var i,r="";return r+=' <li class="',i=n(15).call(e,(i=a&&a.currentType,null==i||i===!1?i:i.id),e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='"> <a class="btn-gray" data-type="'+f((i=e&&e.typeString,typeof i===c?i.apply(e):i))+'" href="#">'+f(n(2).call(e,e&&e.plural,{
hash:{},data:t}))+"</a> </li> "}function o(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d=this,c="function",f=this.escapeExpression;return u+='<ul class="agent-types-nav nav nav-pills"> ',l=a.each.call(t,t&&t.agentTypes,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,s,r,t),data:r}),(l||0===l)&&(u+=l),u+=' </ul> <div class="agents-list-container"></div> <p class="help-block sortable-help-block">'+f(n(2).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:r}))+'</p> <div class="contributors-list-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" "+u(n(24).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<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> ',
o=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' <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">'+u(n(2).call(t,"Save Changes",{hash:{},data:r}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],
a=this.merge(a,e.helpers),r=r||{};var s,o="",l="function",u=this.escapeExpression;return o+='<a class="card btn-gray" href="#" data-group="'+u((s=t&&t.id,typeof s===l?s.apply(t):s))+'"> <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(n(2).call(t,t&&t.title,{
hash:{},data:r}))+" </a> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" "+u(n(24).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<form id="server-settings-form"> ',o=a.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' <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">'+u(n(2).call(t,"Save Changes",{
hash:{},data:r}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+N(n(2).call(e,"Connecting server...",{hash:{},data:t}))+" </h4> "}function o(e,t){var a;return a=n(15).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"disconnecting",{hash:{},inverse:j.program(6,u,t),
fn:j.program(4,l,t),data:t}),a||0===a?a:""}function l(e,t){var a="";return a+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+N(n(2).call(e,"Disconnecting server...",{hash:{},data:t}))+" </h4> "}function u(e,t){var n;return n=a.if.call(e,e&&e.isUnavailable,{hash:{},inverse:j.program(12,p,t),fn:j.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var i,r="";return r+=' <h4 class="status-header text-danger">'+N(n(2).call(e,"Not available outside your network",{
hash:{},data:t}))+"</h4> ",i=a.if.call(e,e&&e.isSignedOut,{hash:{},inverse:j.program(10,f,t),fn:j.program(8,c,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function c(e,t){var a="";return a+=' <span class="status-description help-block">'+N(n(2).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 f(e,t){var a="";return a+=' <span class="status-description help-block">'+N(n(2).call(e,"Enable to access your server from anywhere.",{
hash:{},data:t}))+'</span> <button class="remote-access-enable-btn btn btn-sm btn-primary">'+N(n(2).call(e,"Enable Remote Access",{hash:{},data:t}))+"</button> "}function p(e,t){var i,r="";return r+=" ",i=n(15).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.remoteAccessState),"unreachable",{hash:{},inverse:j.program(19,y,t),fn:j.program(13,h,t),data:t}),(i||0===i)&&(r+=i),r+=' <button class="remote-access-disable-btn btn btn-sm btn-default">'+N(n(2).call(e,"Disable Remote Access",{hash:{},data:t
}))+"</button> ",i=a.if.call(e,(i=e&&e.mappingModeSetting,null==i||i===!1?i:i.value),{hash:{},inverse:j.noop,fn:j.program(21,b,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function h(e,t){var a,i="";return i+=' <h4 class="status-header text-danger">'+N(n(2).call(e,"Not available outside your network",{hash:{},data:t}))+'</h4> <span class="unreachable-description status-description help-block">'+N(n(2).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=n(15).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),"jumboframes",{hash:{},inverse:j.program(16,v,t),fn:j.program(14,m,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function m(e,t){var a="";return a+=' <span class="jumbo-frames-description status-details help-block"> <span class="help-tip">'+N(n(2).call(e,"Tip:",{hash:{},data:t}))+"</span> "+N(n(2).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=n(15).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),"doublenat",{hash:{},inverse:j.noop,fn:j.program(17,g,t),data:t}),a||0===a?a:""}function g(e,t){var a="";return a+=' <span class="double-nat-description status-details help-block"> <span class="help-tip">'+N(n(2).call(e,"Tip:",{hash:{},data:t}))+"</span> "+N(n(2).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 y(e,t){var a="";return a+=' <h4 class="status-header status-header-single text-success">'+N(n(2).call(e,"Fully accessible outside your network",{hash:{},data:t}))+"</h4> "}function b(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> '+N(n(2).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 w(e,t){var a,i="";return i+=" ",a=n(63).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"disconnecting",{hash:{},inverse:j.noop,fn:j.program(24,P,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function P(e,t){var i,r="";return r+=' <div class="remote-access-advanced"> <div class="remote-access-mapping-container ',i=a.unless.call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.mappingError),{hash:{},inverse:j.noop,fn:j.program(25,_,t),data:t}),(i||0===i)&&(r+=i),
r+='"> <hr> <h4 class="mapping-header">'+N(n(2).call(e,"Server Mapping",{hash:{},data:t}))+'</h4> <i class="plex-image server server-xs server-logo"></i> <div class="remote-access-mapping"> <span class="mapping-label text-muted">'+N(n(2).call(e,"Private",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',i=a.if.call(e,e&&e.hasPrivateAddress,{hash:{},inverse:j.program(29,x,t),fn:j.program(27,S,t),data:t}),(i||0===i)&&(r+=i),r+=" </span> ",i=a.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:j.program(33,T,t),
fn:j.program(31,C,t),data:t}),(i||0===i)&&(r+=i),r+=' <span class="mapping-label text-muted">'+N(n(2).call(e,"Public",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',i=a.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:j.program(29,x,t),fn:j.program(35,k,t),data:t}),(i||0===i)&&(r+=i),r+=" </span> ",i=n(15).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.remoteAccessState),"ok",{hash:{},inverse:j.program(33,T,t),fn:j.program(31,C,t),data:t}),(i||0===i)&&(r+=i),r+=' <span class="mapping-internet ',
i=n(63).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.remoteAccessState),"ok",{hash:{},inverse:j.noop,fn:j.program(37,I,t),data:t}),(i||0===i)&&(r+=i),r+='"> <i class="mapping-internet-icon glyphicon globe text-muted"></i> '+N(n(2).call(e,"Internet",{hash:{},data:t}))+" </span> </div> </div> ",i=a.if.call(e,e&&e.hasMappingSettings,{hash:{},inverse:j.noop,fn:j.program(39,M,t),data:t}),(i||0===i)&&(r+=i),r+=" </div> "}function _(e,t){return"advanced-setting"}function S(e,t){var a,i="";return i+=' <span class="mapping-value">'+N((a=e&&e.cloudAccount,
a=null==a||a===!1?a:a.privateAddress,typeof a===U?a.apply(e):a))+'</span> <span class="mapping-separator text-muted">'+N(n(2).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+N((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.privatePort,typeof a===U?a.apply(e):a))+"</span> "}function x(e,t){var a="";return a+=' <span class="mapping-empty-value">'+N(n(2).call(e,"Unknown IP",{hash:{},data:t}))+"</span> "}function C(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 k(e,t){var a,i="";return i+=' <span class="mapping-value">'+N((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.publicAddress,typeof a===U?a.apply(e):a))+'</span> <span class="mapping-separator text-muted">'+N(n(2).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+N((a=e&&e.cloudAccount,a=null==a||a===!1?a:a.publicPort,typeof a===U?a.apply(e):a))+"</span> "}function I(e,t){return"unreachable";
}function M(e,t){var i,r="";return r+=' <div class="remote-access-error-container ',i=a.unless.call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.mappingError),{hash:{},inverse:j.noop,fn:j.program(25,_,t),data:t}),(i||0===i)&&(r+=i),r+='"> <div class="form-inline"> <div class="checkbox"> <label> <input type="checkbox" id="'+N((i=e&&e.mappingModeSetting,i=null==i||i===!1?i:i.id,typeof i===U?i.apply(e):i))+'" name="'+N((i=e&&e.mappingModeSetting,i=null==i||i===!1?i:i.id,typeof i===U?i.apply(e):i))+'" value="1" ',
i=a.if.call(e,(i=e&&e.mappingModeSetting,null==i||i===!1?i:i.value),{hash:{},inverse:j.noop,fn:j.program(40,A,t),data:t}),(i||0===i)&&(r+=i),r+="> "+N(n(2).call(e,"Manually specify public port",{hash:{},data:t}))+' </label> </div> <div class="form-group"> <input type="text" id="'+N((i=e&&e.mappingPortSetting,i=null==i||i===!1?i:i.id,typeof i===U?i.apply(e):i))+'" name="'+N((i=e&&e.mappingPortSetting,i=null==i||i===!1?i:i.id,typeof i===U?i.apply(e):i))+'" class="form-control" value="'+N((i=e&&e.mappingPortSetting,
i=null==i||i===!1?i:i.value,typeof i===U?i.apply(e):i))+'" ',i=a.unless.call(e,(i=e&&e.mappingModeSetting,null==i||i===!1?i:i.value),{hash:{},inverse:j.noop,fn:j.program(42,E,t),data:t}),(i||0===i)&&(r+=i),r+='> </div> <button class="retry-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',i=n(15).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.remoteAccessState),"unreachable",{hash:{},inverse:j.program(46,D,t),fn:j.program(44,O,t),data:t}),(i||0===i)&&(r+=i),
r+='</span> </button> </div> <p class="help-block">'+N(n(2).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 A(e,t){return"checked"}function E(e,t){return"disabled"}function O(e,t){return N(n(2).call(e,"Retry",{
hash:{},data:t}))}function D(e,t){return N(n(2).call(e,"Apply",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var R,L="",N=this.escapeExpression,j=this,U="function";return L+='<i class="remote-access-status-icon glyphicon globe"></i> <div class="remote-access-status-message"> ',R=n(15).call(t,(R=t&&t.cloudAccount,null==R||R===!1?R:R.remoteAccessState),"connecting",{hash:{},inverse:j.program(3,o,r),fn:j.program(1,s,r),data:r}),(R||0===R)&&(L+=R),L+=" </div> ",
R=n(63).call(t,(R=t&&t.cloudAccount,null==R||R===!1?R:R.remoteAccessState),"connecting",{hash:{},inverse:j.noop,fn:j.program(23,w,r),data:r}),(R||0===R)&&(L+=R),L+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(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">'+c(n(2).call(e,"Sign Out",{hash:{},data:t}))+"</span> </button> "}function o(e,t){var a="";
return a+=' <div class="server-claim-container"> <div class="server-claim-info"> <h4>'+c(n(2).call(e,"This server is unclaimed and not secure",{hash:{},data:t}))+'</h4> <p class="help-block"> '+c(n(2).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">'+c(n(2).call(e,"Claim Server",{
hash:{},data:t}))+"</span> </button> </div> "}function l(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="'+c(n(2).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="'+c(n(2).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">'+c(n(2).call(e,"Sign In",{
hash:{},data:t}))+'</span> </button> <p class="help-block">'+c(n(2).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),r=r||{};var u,d="",c=this.escapeExpression,f=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">'+c(n(2).call(t,"Server signed in as",{
hash:{},data:r}))+'</div> <div class="server-account-username"></div> </div> ',u=a.if.call(t,t&&t.showSignOut,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(u||0===u)&&(d+=u),d+=" </div> ",u=a.if.call(t,t&&t.showClaimMessage,{hash:{},inverse:f.program(5,l,r),fn:f.program(3,o,r),data:r}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};
var o,l="",u=this,d=this.escapeExpression;return l+='<a href="#" class="check-for-updates-btn label label-btn label-primary ',o=a.unless.call(t,t&&t.canCheckForUpdate,{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='"> <i class="label-icon glyphicon upload"></i> '+d(n(2).call(t,"Check for Updates",{hash:{},data:r}))+' </a> <a href="#" class="checking-for-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(n(2).call(t,"Checking for Updates",{
hash:{},data:r}))+' </a> <a href="#" class="available-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+d(n(2).call(t,"Download Updates",{hash:{},data:r}))+' </a> <span class="downloading-updates-container label label-btn label-progress active"> <i class="label-icon glyphicon download"></i> '+d(n(2).call(t,"Downloading Update",{hash:{},data:r}))+' <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(n(2).call(t,"Install Update",{
hash:{},data:r}))+' </a> <a href="#" class="installing-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(n(2).call(t,"Installing",{hash:{},data:r}))+' </a> <span class="install-info-label up-to-date-label"> <i class="success-icon glyphicon ok-2"></i> '+d(n(2).call(t,"Up to date",{hash:{},data:r}))+' </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(n(2).call(t,"Please install manually.",{
hash:{},data:r}))+'</a> </span> <a href="#" class="release-notes-btn label label-btn label-default"> <i class="label-icon glyphicon circle-info"></i> '+d(n(2).call(t,"What's New",{hash:{},data:r}))+" </a> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" "+f(n(2).call(e,"Optimized Versions requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" "}function o(e,t){var n;return n=a.if.call(e,e&&e.isTranscoderRequired,{
hash:{},inverse:p.program(6,u,t),fn:p.program(4,l,t),data:t}),n||0===n?n:""}function l(e,t){var a="";return a+=" "+f(n(2).call(e,"This Plex Media Server platform is not capable of converting video.",{hash:{},data:t}))+" "}function u(e,t){var a="";return a+=" "+f(n(2).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),r=r||{};var d,c="",f=this.escapeExpression,p=this;return c+='<div class="row row-padded"> <h4 class="text-muted text-center"> ',
d=a.if.call(t,t&&t.isUpgradeRequired,{hash:{},inverse:p.program(3,o,r),fn:p.program(1,s,r),data:r}),(d||0===d)&&(c+=d),c+=" </h4> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<p class="versions-status-message hidden"> <button class="delete-all-btn btn btn-sm btn-danger pull-right">'+o(n(2).call(t,"Delete All Versions",{hash:{},data:r}))+"</button> "+o(n(2).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{
hash:{},data:r}))+' </p> <div class="background-processing-list-region"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=' <div class="filter-bar-right"> <button class="toggle-advanced-btn btn btn-sm btn-default basic-setting">'+u(n(2).call(e,"Show Advanced",{hash:{},data:t}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default advanced-setting">'+u(n(2).call(e,"Hide Advanced",{hash:{},data:t}))+"</button> </div> ";
}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this.escapeExpression,d=this;return l+='<div class="filter-bar"> ',o=a.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+=' </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){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){
var a,i="";return i+=' <div class="setup-basic-form-group form-group"> <p class="text-muted"> '+d(n(2).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===c?a.apply(e):a))+'" class="form-control" value="'+d((a=e&&e.friendlyNameSetting,a=null==a||a===!1?a:a.value,typeof a===c?a.apply(e):a))+'" placeholder="'+d((a=e&&e.server,a=null==a||a===!1?a:a.friendlyName,
typeof a===c?a.apply(e):a))+'"> </div> '}function o(e,t){var a,i="";return i+=' <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===c?a.apply(e):a))+'"> <input type="checkbox" id="'+d((a=e&&e.publishSetting,a=null==a||a===!1?a:a.id,typeof a===c?a.apply(e):a))+'" checked> '+d(n(2).call(e,"Allow me to access my media outside my home",{hash:{},data:t}))+' </label> </div> <p class="text-muted"> '+d(n(2).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),r=r||{};var l,u="",d=this.escapeExpression,c="function",f=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+d(n(2).call(t,"Great, we found a server!",{hash:{},data:r}))+'</h4> <form id="setup-basic-form" class="settings-container"> ',l=a.if.call(t,t&&t.friendlyNameSetting,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" ",l=a.if.call(t,t&&t.publishSetting,{
hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+=' <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(n(2).call(t,"Next",{hash:{},data:r}))+'</span> </button> <button class="next-btn hidden" data-subset="setupLibrary"></button> </div> </form> </div> </div> <div class="modal-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
function s(e,t){var i,r="";return r+=' <div class="checkbox"> <label for="'+c((i=e&&e.collectUsageDataSetting,i=null==i||i===!1?i:i.id,typeof i===d?i.apply(e):i))+'"> <input type="checkbox" id="'+c((i=e&&e.collectUsageDataSetting,i=null==i||i===!1?i:i.id,typeof i===d?i.apply(e):i))+'" name="'+c((i=e&&e.collectUsageDataSetting,i=null==i||i===!1?i:i.id,typeof i===d?i.apply(e):i))+'" value="1" ',i=a.if.call(e,(i=e&&e.collectUsageDataSetting,null==i||i===!1?i:i.value),{hash:{},inverse:f.noop,fn:f.program(2,o,t),
data:t}),(i||0===i)&&(r+=i),r+="> "+c(n(2).call(e,"Send anonymous usage data to Plex",{hash:{},data:t}))+' </label> </div> <p class="setup-complete-help text-muted"> '+c(n(2).call(e,"Help us improve everyone's Plex experience by sending anonymous usage data.",{hash:{},data:t}))+" </p> "}function o(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <div class="setup-apps-container"> <img class="setup-apps-image" src="'+c((l=t&&t.devicesImage,
typeof l===d?l.apply(t):l))+'"> <a href="https://plex.tv/downloads" target="_blank" class="btn btn-default btn-lg">'+c(n(2).call(t,"Get Plex Apps",{hash:{},data:r}))+'</a> </div> <p class="text-muted">'+c(n(2).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:r}))+'</p> <form id="setup-complete-form" class="settings-container"> ',
l=a.if.call(t,t&&t.collectUsageDataSetting,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=' <div class="setup-footer setup-done-footer"> <button class="next-btn btn btn-default btn-lg" data-subset="setupLibrary">'+c(n(2).call(t,"Back",{hash:{},data:r}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(t,"Done",{hash:{},data:r}))+'</span> </button> <button class="done-btn btn btn-primary btn-lg hidden"></button> </div> </form> </div> </div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var a="";return a+=" <h1>"+d(n(2).call(e,"Setup is not allowed for shared servers.",{hash:{},data:t}))+"</h1> "}function o(e,t){var a="";return a+=" <h1>"+d(n(2).call(e,"A problem has been detected with a core component of Plex Media Server.",{hash:{},data:t}))+'</h1> <h2 class="text-muted">'+d(n(2).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),r=r||{};var l,u="",d=this.escapeExpression,c=this;return u+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> ',l=a.if.call(t,t&&t.shared,{hash:{},inverse:c.program(3,o,r),fn:c.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;
return s+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+o(n(2).call(t,"Organize Your Media",{hash:{},data:r}))+'</h4> <p class="text-muted">'+o(n(2).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:r}))+'</p> <p class="setup-add-section-container"> <button class="add-section-btn btn btn-default">'+o(n(2).call(t,"Add Library",{hash:{},data:r}))+'</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">'+o(n(2).call(t,"Back",{
hash:{},data:r}))+'</button> <button class="next-btn btn btn-primary btn-lg" data-subset="setupComplete">'+o(n(2).call(t,"Next",{hash:{},data:r}))+"</button> </div> </div> </div> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="loading loading-inline"></div> <p class="loading-title">'+o(n(2).call(t,"Please wait a moment while Plex starts.",{
hash:{},data:r}))+"</p> "})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<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>'+o(n(2).call(t,"Server Setup",{hash:{},data:r}))+'</h2> <div class="setup-progress"> <div class="basic-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupBasic" href="#">'+o(n(2).call(t,"Name",{
hash:{},data:r}))+'</a> </div> <div class="library-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupLibrary" href="#">'+o(n(2).call(t,"Media Library",{hash:{},data:r}))+'</a> </div> <div class="complete-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupComplete" href="#">'+o(n(2).call(t,"Finish",{hash:{},data:r}))+'</a> </div> </div> </div> </div> <div class="setup-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){
this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+='<div class="side-bar-page main-page minimal-scroll"> <div class="section-sort-container"> <h5>'+o(n(2).call(t,"Sort",{hash:{},data:r}))+'</h5> <div class="section-sort-list-container"></div> </div> </div>'})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var o,l="",u=this,d=this.escapeExpression;
return l+='<div class="side-bar-page main-page dark-scrollbar"> <div class="section-current-filters-container"> <div class="side-bar-actions"> <a class="new-filter-icon-btn new-filter-btn btn-gray ',o=a.unless.call(t,t&&t.showNewFilterIconBtn,{hash:{},inverse:u.noop,fn:u.program(1,s,r),data:r}),(o||0===o)&&(l+=o),l+='" href="#"><i class="glyphicon plus"></i></a> </div> <h5>'+d(n(2).call(t,"Filters",{hash:{},data:r}))+'</h5> <div class="section-current-filters-list-container"></div> </div> <div class="section-sort-container hidden"> <h5>'+d(n(2).call(t,"Sort",{
hash:{},data:r}))+'</h5> <div class="section-sort-list-container"></div> </div> </div> <div class="side-bar-page filters-page dark-scrollbar"> <div class="section-filters-container"> <div class="side-bar-actions"> <a class="hide-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> </div> <h5>'+d(n(2).call(t,"Select A Filter",{hash:{},data:r}))+'</h5> <div class="section-filters-list-container"></div> </div> </div> <div class="side-bar-page filter-options-page dark-scrollbar"> <div class="section-filter-options-container"> <div class="side-bar-actions"> <a class="hide-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> </div> <h5 class="filter-options-header"></h5> <div class="section-filter-option-list-container"></div> </div> </div> ';
})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s="",o=this.escapeExpression;return s+="<h2>"+o(n(2).call(t,"Announcements",{hash:{},data:r}))+'</h2> <div class="announcements-container"></div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var s,o="",l=this.escapeExpression,u="function";
return o+="<h2>"+l(n(2).call(t,"Watch Later Help",{hash:{},data:r}))+'</h2> <div class="filter-bar"> <h4>'+l(n(2).call(t,"Add videos from your browser",{hash:{},data:r}))+'</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>'+l((s=t&&t.firstStepText,
typeof s===u?s.apply(t):s))+"</li> <li>"+l(n(2).call(t,'To save a video to Watch Later, click "Plex It!" in your Bookmarks Bar.',{hash:{},data:r}))+"</li> <li>"+l(n(2).call(t,"A panel will appear on the left side of the page to let you know the video has been saved.",{hash:{},data:r}))+"</li> <li>"+l(n(2).call(t,'You can also recommend the video to friends or "fling" it to a Plex player and watch it there.',{hash:{},data:r}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="plexit-img" src="'+l((s=t&&t.stepsImgSrc,
typeof s===u?s.apply(t):s))+'"/> </div> </div> <div class="filter-bar"> <h4>'+l(n(2).call(t,"Add videos by email",{hash:{},data:r}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="queue-email form-control input-lg disabled" title="'+l((s=t&&t.copyCommand,typeof s===u?s.apply(t):s))+'" tabindex="-1">'+l((s=t&&t.queueEmail,typeof s===u?s.apply(t):s))+'</div> <ol class="steps-list"> <li>'+l(n(2).call(t,"Send an email to the address above with any link(s) you want added to Watch Later.",{
hash:{},data:r}))+"</li> <li>"+l(n(2).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:r}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="email-links" src="'+l((s=t&&t.emailImgSrc,typeof s===u?s.apply(t):s))+'"/> </div> </div> '})},function(e,t,n){var a=n(4);e.exports=(a.default||a).template(function(e,t,a,i,r){function s(e,t){var n,a="";return a+=' <li><a class="'+c((n=e&&e.subset,typeof n===d?n.apply(e):n))+'-btn btn-gray" href="#!/playlist/'+c((n=e&&e.key,
typeof n===d?n.apply(e):n))+"/"+c((n=e&&e.subset,typeof n===d?n.apply(e):n))+'">'+c((n=e&&e.title,typeof n===d?n.apply(e):n))+'<span class="badge"></span></a></li> '}function o(e,t){var n,a="";return a+=' <a class="user-playlist-help" href="'+c((n=e&&e.helpRoute,typeof n===d?n.apply(e):n))+'" target="'+c((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),r=r||{};var l,u="",d="function",c=this.escapeExpression,f=this;
return u+='<ul class="nav nav-header pull-right"> ',l=a.each.call(t,t&&t.filters,{hash:{},inverse:f.noop,fn:f.program(1,s,r),data:r}),(l||0===l)&&(u+=l),u+=" </ul> <h2> "+c(n(2).call(t,t&&t.label,{hash:{},data:r}))+" ",l=a.if.call(t,t&&t.helpRoute,{hash:{},inverse:f.noop,fn:f.program(3,o,r),data:r}),(l||0===l)&&(u+=l),u+=' </h2> <div class="user-playlist-container"></div> '})},function(e,t,n){"use strict";function a(e){var t=e&&e[0]||1,n=c;if(t!==n){if(t<n){var a=f[n],i=f[t];throw new d("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+a+") or downgrade your runtime to an older version ("+i+").");
}throw new d("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function i(e,t){if(!t)throw new d("No environment passed to template");var n=function(e,n,a,i,r,s){var o=t.VM.invokePartial.apply(this,arguments);if(null!=o)return o;if(t.compile){var l={helpers:i,partials:r,data:s};return r[n]=t.compile(e,{data:void 0!==s},t),r[n](a,l)}throw new d("The partial "+n+" could not be compiled when running in runtime-only mode");
},a={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var a=this.programs[e];return n?a=s(e,t,n):a||(a=this.programs[e]=s(e,t)),a},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,i){i=i||{};var r,s,o=i.partial?i:t;i.partial||(r=i.helpers,s=i.partials);var l=e.call(a,o,n,r,s,i.data);return i.partial||t.VM.checkRevision(a.compilerInfo),
l}}function r(e,t,n){var a=Array.prototype.slice.call(arguments,3),i=function(e,i){return i=i||{},t.apply(this,[e,i.data||n].concat(a))};return i.program=e,i.depth=a.length,i}function s(e,t,n){var a=function(e,a){return a=a||{},t(e,a.data||n)};return a.program=e,a.depth=0,a}function o(e,t,n,a,i,r){var s={partial:!0,helpers:a,partials:i,data:r};if(void 0===e)throw new d("The partial "+t+" could not be found");if(e instanceof Function)return e(n,s)}function l(){return""}var u=n(388),d=n(387).default,c=n(386).COMPILER_REVISION,f=n(386).REVISION_CHANGES;
t.checkRevision=a,t.template=i,t.programWithDepth=r,t.program=s,t.invokePartial=o,t.noop=l},function(e,t){"use strict";var n={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 i=Object.getOwnPropertyNames(t),r=0;r<i.length;++r)n[i[r]]||a[i[r]]||(e[i[r]]=t[i[r]]);return e}},function(e,t){(function(){window.Modernizr=function(e,t,n){
function a(e){g.cssText=e}function i(e,t){return typeof e===t}function r(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var a in e){var i=e[a];if(!r(i,"-")&&g[i]!==n)return"pfx"!=t||i}return!1}function o(e,t,a){for(var r in e){var s=t[e[r]];if(s!==n)return a===!1?e[r]:i(s,"function")?s.bind(a||t):s}return!1}function l(e,t,n){var a=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+w.join(a+" ")+a).split(" ");return i(t,"string")||i(t,"undefined")?s(r,t):(r=(e+" "+P.join(a+" ")+a).split(" "),o(r,t,n));
}var u,d,c,f="2.8.3",p={},h=t.documentElement,m="modernizr",v=t.createElement(m),g=v.style,y=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),b="Webkit Moz O ms",w=b.split(" "),P=b.toLowerCase().split(" "),_={},S=[],x=S.slice,C=function(e,n,a,i){var r,s,o,l,u=t.createElement("div"),d=t.body,c=d||t.createElement("body");if(parseInt(a,10))for(;a--;)o=t.createElement("div"),o.id=i?i[a]:m+(a+1),u.appendChild(o);return r=["&#173;",'<style id="s',m,'">',e,"</style>"].join(""),u.id=m,(d?u:c).innerHTML+=r,
c.appendChild(u),d||(c.style.background="",c.style.overflow="hidden",l=h.style.overflow,h.style.overflow="hidden",h.appendChild(c)),s=n(u,e),d?u.parentNode.removeChild(u):(c.parentNode.removeChild(c),h.style.overflow=l),!!s},T={}.hasOwnProperty;c=i(T,"undefined")||i(T.call,"undefined")?function(e,t){return t in e&&i(e.constructor.prototype[t],"undefined")}:function(e,t){return T.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;
var n=x.call(arguments,1),a=function(){if(this instanceof a){var i=function(){};i.prototype=t.prototype;var r=new i,s=t.apply(r,n.concat(x.call(arguments)));return Object(s)===s?s:r}return t.apply(e,n.concat(x.call(arguments)))};return a}),_.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in h.style&&C("@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 k in _)c(_,k)&&(d=k.toLowerCase(),
p[d]=_[k](),S.push((p[d]?"":"no-")+d));return p.addTest=function(e,t){if("object"==typeof e)for(var a in e)c(e,a)&&p.addTest(a,e[a]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof enableClasses&&enableClasses&&(h.className+=" "+(t?"":"no-")+e),p[e]=t}return p},a(""),v=u=null,p._version=f,p._prefixes=y,p._domPrefixes=P,p._cssomPrefixes=w,p.testProp=function(e){return s([e])},p.testAllProps=l,p.testStyles=C,p}(this,this.document),e.exports=window.Modernizr;
}).call(window)},function(e,t){(function(n){var a={},i="undefined"!=typeof e&&e.exports&&"undefined"!=typeof n?n:this||a;(i._gsQueue||(i._gsQueue=[])).push(function(){"use strict";i._gsDefine("easing.Back",["easing.Ease"],function(e){var t,n,a,r=i.GreenSockGlobals||i,s=r.com.greensock,o=2*Math.PI,l=Math.PI/2,u=s._class,d=function(t,n){var a=u("easing."+t,function(){},!0),i=a.prototype=new e;return i.constructor=a,i.getRatio=n,a},c=e.register||function(){},f=function(e,t,n,a,i){var r=u("easing."+e,{
easeOut:new t,easeIn:new n,easeInOut:new a},!0);return c(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)},h=function(t,n){var a=u("easing."+t,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),i=a.prototype=new e;return i.constructor=a,i.getRatio=n,i.config=function(e){return new a(e)},a},m=f("Back",h("BackOut",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),h("BackIn",function(e){return e*e*((this._p1+1)*e-this._p1)}),h("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)})),v=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),g=v.prototype=new e;return g.constructor=v,g.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;
},v.ease=new v(.7,.7),g.config=v.config=function(e,t,n){return new v(e,t,n)},t=u("easing.SteppedEase",function(e){e=e||1,this._p1=1/e,this._p2=e+1},!0),g=t.prototype=new e,g.constructor=t,g.getRatio=function(e){return e<0?e=0:e>=1&&(e=.999999999),(this._p2*e>>0)*this._p1},g.config=t.config=function(e){return new t(e)},n=u("easing.RoughEase",function(t){t=t||{};for(var n,a,i,r,s,o,l=t.taper||"none",u=[],d=0,c=0|(t.points||20),f=c,h=t.randomize!==!1,m=t.clamp===!0,v=t.template instanceof e?t.template:null,g="number"==typeof t.strength?.4*t.strength:.4;--f>-1;)n=h?Math.random():1/c*f,
a=v?v.getRatio(n):n,"none"===l?i=g:"out"===l?(r=1-n,i=r*r*g):"in"===l?i=n*n*g:n<.5?(r=2*n,i=r*r*.5*g):(r=2*(1-n),i=r*r*.5*g),h?a+=Math.random()*i-.5*i:f%2?a+=.5*i:a-=.5*i,m&&(a>1?a=1:a<0&&(a=0)),u[d++]={x:n,y:a};for(u.sort(function(e,t){return e.x-t.x}),o=new p(1,1,null),f=c;--f>-1;)s=u[f],o=new p(s.x,s.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0),g=n.prototype=new e,g.constructor=n,g.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},g.config=function(e){return new n(e)},n.ease=new n,f("Bounce",d("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}),d("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)}),d("BounceInOut",function(e){var t=e<.5;return e=t?1-2*e:2*e-1,
e=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,t?.5*(1-e):.5*e+.5})),f("Circ",d("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),d("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),d("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),a=function(t,n,a){var i=u("easing."+t,function(e,t){this._p1=e>=1?e:1,this._p2=(t||a)/(e<1?e:1),this._p3=this._p2/o*(Math.asin(1/this._p1)||0),
this._p2=o/this._p2},!0),r=i.prototype=new e;return r.constructor=i,r.getRatio=n,r.config=function(e,t){return new i(e,t)},i},f("Elastic",a("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),a("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2))},.3),a("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)),f("Expo",d("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),d("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),d("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),f("Sine",d("SineOut",function(e){return Math.sin(e*l)}),d("SineIn",function(e){return-Math.cos(e*l)+1}),d("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),u("easing.EaseLookup",{find:function(t){return e.map[t]}},!0),c(r.SlowMo,"SlowMo","ease,"),c(n,"RoughEase","ease,"),
c(t,"SteppedEase","ease,"),m},!0)}),i._gsDefine&&i._gsQueue.pop()(),t.Power1=Power1,t.Power2=Power2,t.Power3=Power3}).call(t,function(){return this}())},function(e,t,n){var a,i;(function(r){var 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(r,s){"use strict";var o=r.GreenSockGlobals=r.GreenSockGlobals||r;if(!o.TweenLite){var l,u,d,c,f,p=function(e){var t,n=e.split("."),a=o;for(t=0;t<n.length;t++)a[n[t]]=a=a[n[t]]||{};return a},h=p("com.greensock"),m=1e-10,v=function(e){var t,n=[],a=e.length;for(t=0;t!==a;n.push(e[t++]));return n},g=function(){},y=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)}}(),b={},w=function(r,l,u,d){
this.sc=b[r]?b[r].sc:[],b[r]=this,this.gsClass=null,this.func=u;var c=[];this.check=function(f){for(var h,m,v,g,y,P=l.length,_=P;--P>-1;)(h=b[l[P]]||new w(l[P],[])).gsClass?(c[P]=h.gsClass,_--):f&&h.sc.push(this);if(0===_&&u)for(m=("com.greensock."+r).split("."),v=m.pop(),g=p(m.join("."))[v]=this.gsClass=u.apply(u,c),d&&(o[v]=g,y="undefined"!=typeof e&&e.exports,!y&&n(2112)?(a=[],i=function(){return g}.apply(t,a),!(void 0!==i&&(e.exports=i))):r===s&&y&&(e.exports=g)),P=0;P<this.sc.length;P++)this.sc[P].check();
},this.check(!0)},P=r._gsDefine=function(e,t,n,a){return new w(e,t,n,a)},_=h._class=function(e,t,n){return t=t||function(){},P(e,[],function(){return t},n),t};P.globals=o;var S=[0,0,1,1],x=[],C=_("easing.Ease",function(e,t,n,a){this._func=e,this._type=n||0,this._power=a||0,this._params=t?S.concat(t):S},!0),T=C.map={},k=C.register=function(e,t,n,a){for(var i,r,s,o,l=t.split(","),u=l.length,d=(n||"easeIn,easeOut,easeInOut").split(",");--u>-1;)for(r=l[u],i=a?_("easing."+r,null,!0):h.easing[r]||{},s=d.length;--s>-1;)o=d[s],
T[r+"."+o]=T[o+r]=i[o]=e.getRatio?e:e[o]||new e};for(d=C.prototype,d._calcEnd=!1,d.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,n=this._power,a=1===t?1-e:2===t?e:e<.5?2*e:2*(1-e);return 1===n?a*=a:2===n?a*=a*a:3===n?a*=a*a*a:4===n&&(a*=a*a*a*a),1===t?1-a:2===t?a:e<.5?a/2:1-a/2},l=["Linear","Quad","Cubic","Quart","Quint,Strong"],u=l.length;--u>-1;)d=l[u]+",Power"+u,k(new C(null,null,1,u),d,"easeOut",!0),k(new C(null,null,2,u),d,"easeIn"+(0===u?",easeNone":"")),
k(new C(null,null,3,u),d,"easeInOut");T.linear=h.easing.Linear.easeIn,T.swing=h.easing.Quad.easeInOut;var I=_("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});d=I.prototype,d.addEventListener=function(e,t,n,a,i){i=i||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<i&&(l=s+1);o.splice(l,0,{c:t,s:n,up:a,pr:i}),this!==c||f||c.wake()},d.removeEventListener=function(e,t){var n,a=this._listeners[e];
if(a)for(n=a.length;--n>-1;)if(a[n].c===t)return void a.splice(n,1)},d.dispatchEvent=function(e){var t,n,a,i=this._listeners[e];if(i)for(t=i.length,n=this._eventTarget;--t>-1;)a=i[t],a&&(a.up?a.c.call(a.s||n,{type:e,target:n}):a.c.call(a.s||n))};var M=r.requestAnimationFrame,A=r.cancelAnimationFrame,E=Date.now||function(){return(new Date).getTime()},O=E();for(l=["ms","moz","webkit","o"],u=l.length;--u>-1&&!M;)M=r[l[u]+"RequestAnimationFrame"],A=r[l[u]+"CancelAnimationFrame"]||r[l[u]+"CancelRequestAnimationFrame"];
_("Ticker",function(e,t){var n,a,i,r,s,o=this,l=E(),u=!(t===!1||!M)&&"auto",d=500,p=33,h="tick",v=function(e){var t,u,c=E()-O;c>d&&(l+=c-p),O+=c,o.time=(O-l)/1e3,t=o.time-s,(!n||t>0||e===!0)&&(o.frame++,s+=t+(t>=r?.004:r-t),u=!0),e!==!0&&(i=a(v)),u&&o.dispatchEvent(h)};I.call(o),o.time=o.frame=0,o.tick=function(){v(!0)},o.lagSmoothing=function(e,t){d=e||1/m,p=Math.min(t,d,0)},o.sleep=function(){null!=i&&(u&&A?A(i):clearTimeout(i),a=g,i=null,o===c&&(f=!1))},o.wake=function(e){null!==i?o.sleep():e?l+=-O+(O=E()):o.frame>10&&(O=E()-d+5),
a=0===n?g:u&&M?M:function(e){return setTimeout(e,1e3*(s-o.time)+1|0)},o===c&&(f=!0),v(2)},o.fps=function(e){return arguments.length?(n=e,r=1/(n||60),s=this.time+r,void o.wake()):n},o.useRAF=function(e){return arguments.length?(o.sleep(),u=e,void o.fps(n)):u},o.fps(e),setTimeout(function(){"auto"===u&&o.frame<5&&"hidden"!==document.visibilityState&&o.useRAF(!1)},1500)}),d=h.Ticker.prototype=new h.events.EventDispatcher,d.constructor=h.Ticker;var D=_("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,J){f||c.wake();var n=this.vars.useFrames?X:J;n.add(this,n._time),this.vars.paused&&this.paused(!0)}});c=D.ticker=new h.Ticker,d=D.prototype,d._dirty=d._gc=d._initted=d._paused=!1,d._totalTime=d._time=0,d._rawPrevTime=-1,d._next=d._last=d._onUpdate=d._timeline=d.timeline=null,d._paused=!1;var R=function(){f&&E()-O>2e3&&c.wake(),
setTimeout(R,2e3)};R(),d.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},d.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},d.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},d.seek=function(e,t){return this.totalTime(Number(e),t!==!1)},d.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,t!==!1,!0)},d.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1);
},d.render=function(e,t,n){},d.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},d.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},d._enabled=function(e,t){return f||c.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},d._kill=function(e,t){return this._enabled(!1,!1)},d.kill=function(e,t){return this._kill(e,t),this},d._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},d._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},d._callback=function(e){var t=this.vars;t[e].apply(t[e+"Scope"]||t.callbackScope||this,t[e+"Params"]||x)},d.eventCallback=function(e,t,n,a){if("on"===(e||"").substr(0,2)){var i=this.vars;if(1===arguments.length)return i[e];
null==t?delete i[e]:(i[e]=t,i[e+"Params"]=y(n)&&n.join("").indexOf("{self}")!==-1?this._swapSelfInParams(n):n,i[e+"Scope"]=a),"onUpdate"===e&&(this._onUpdate=t)}return this},d.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},d.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)},d.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},d.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},d.totalTime=function(e,t,n){if(f||c.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!n&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var a=this._totalDuration,i=this._timeline;
if(e>a&&!n&&(e=a),this._startTime=(this._paused?this._pauseTime:i._time)-(this._reversed?a-e:e)/this._timeScale,i._dirty||this._uncache(!1),i._timeline)for(;i._timeline;)i._timeline._time!==(i._startTime+i._totalTime)/i._timeScale&&i.totalTime(i._totalTime,!0),i=i._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===e&&0!==this._duration||(F.length&&ee(),this.render(e,t,!1),F.length&&ee())}return this},d.progress=d.totalProgress=function(e,t){var n=this.duration();return arguments.length?this.totalTime(n*e,t):n?this._time/n:this.ratio;
},d.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},d.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},d.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||m,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)},d.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},d.paused=function(e){if(!arguments.length)return this._paused;var t,n,a=this._timeline;return e!=this._paused&&a&&(f||e||c.wake(),t=a.rawTime(),n=t-this._pauseTime,!e&&a.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=a.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,this.render(t,t===this._totalTime,!0))),this._gc&&!e&&this._enabled(!0,!1),this};var L=_("core.SimpleTimeline",function(e){D.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});d=L.prototype=new D,d.constructor=L,d.kill()._gc=!1,d._first=d._last=d._recent=null,d._sortChildren=!1,d.add=d.insert=function(e,t,n,a){
var i,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),i=this._last,this._sortChildren)for(r=e._startTime;i&&i._startTime>r;)i=i._prev;return i?(e._next=i._next,i._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=i,this._recent=e,this._timeline&&this._uncache(!0),this},d._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},d.render=function(e,t,n){var a,i=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;i;)a=i._next,(i._active||e>=i._startTime&&!i._paused)&&(i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,n):i.render((e-i._startTime)*i._timeScale,t,n)),
i=a},d.rawTime=function(){return f||c.wake(),this._totalTime};var N=_("TweenLite",function(e,t,n){if(D.call(this,t,n),this.render=N.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:N.selector(e)||e;var a,i,s,o=e.jquery||e.length&&e!==r&&e[0]&&(e[0]===r||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?G[N.defaultOverwrite]:"number"==typeof l?l>>0:G[l],(o||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=v(e),
this._propLookup=[],this._siblings=[],a=0;a<s.length;a++)i=s[a],i?"string"!=typeof i?i.length&&i!==r&&i[0]&&(i[0]===r||i[0].nodeType&&i[0].style&&!i.nodeType)?(s.splice(a--,1),this._targets=s=s.concat(v(i))):(this._siblings[a]=te(i,this,!1),1===l&&this._siblings[a].length>1&&ae(i,this,null,1,this._siblings[a])):(i=s[a--]=N.selector(i),"string"==typeof i&&s.splice(a+1,1)):s.splice(a--,1);else this._propLookup={},this._siblings=te(e,this,!1),1===l&&this._siblings.length>1&&ae(e,this,null,1,this._siblings);
(this.vars.immediateRender||0===t&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(-this._delay))},!0),j=function(e){return e&&e.length&&e!==r&&e[0]&&(e[0]===r||e[0].nodeType&&e[0].style&&!e.nodeType)},U=function(e,t){var n,a={};for(n in e)Y[n]||n in t&&"transform"!==n&&"x"!==n&&"y"!==n&&"width"!==n&&"height"!==n&&"className"!==n&&"border"!==n||!(!W[n]||W[n]&&W[n]._autoCSS)||(a[n]=e[n],delete e[n]);e.css=a};d=N.prototype=new D,d.constructor=N,d.kill()._gc=!1,d.ratio=0,
d._firstPT=d._targets=d._overwrittenProps=d._startAt=null,d._notifyPluginsOfEnabled=d._lazy=!1,N.version="1.18.1",N.defaultEase=d._ease=new C(null,null,1,1),N.defaultOverwrite="auto",N.ticker=c,N.autoSleep=120,N.lagSmoothing=function(e,t){c.lagSmoothing(e,t)},N.selector=r.$||r.jQuery||function(e){var t=r.$||r.jQuery;return t?(N.selector=t,t(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var F=[],B={},z=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,$=function(e){
for(var t,n=this._firstPT,a=1e-6;n;)t=n.blob?e?this.join(""):this.start:n.c*e+n.s,n.r?t=Math.round(t):t<a&&t>-a&&(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,a){var i,r,s,o,l,u,d,c=[e,t],f=0,p="",h=0;for(c.start=e,n&&(n(c),e=c[0],t=c[1]),c.length=0,i=e.match(z)||[],r=t.match(z)||[],a&&(a._next=null,a.blob=1,c._firstPT=a),l=r.length,o=0;o<l;o++)d=r[o],u=t.substr(f,t.indexOf(d,f)-f),p+=u||!o?u:",",f+=u.length,h?h=(h+1)%5:"rgba("===u.substr(-5)&&(h=1),d===i[o]||i.length<=o?p+=d:(p&&(c.push(p),
p=""),s=parseFloat(i[o]),c.push(s),c._firstPT={_next:c._firstPT,t:c,p:c.length-1,s:s,c:("="===d.charAt(1)?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-s)||0,f:0,r:h&&h<4}),f+=d.length;return p+=t.substr(f),p&&c.push(p),c.setRatio=$,c},H=function(e,t,n,a,i,r,s,o){var l,u,d="get"===n?e[t]:n,c=typeof e[t],f="string"==typeof a&&"="===a.charAt(1),p={t:e,p:t,s:d,f:"function"===c,pg:0,n:i||t,r:r,pr:0,c:f?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-d||0};if("number"!==c&&("function"===c&&"get"===n&&(u=t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),
p.s=d=s?e[u](s):e[u]()),"string"==typeof d&&(s||isNaN(d))?(p.fp=s,l=V(d,a,o||N.defaultStringFilter,p),p={t:l,p:"setRatio",s:0,c:1,f:2,pg:0,n:i||t,pr:0}):f||(p.s=parseFloat(d),p.c=parseFloat(a)-p.s||0)),p.c)return(p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p,p},q=N._internals={isArray:y,isSelector:j,lazyTweens:F,blobDif:V},W=N._plugins={},K=q.tweenLookup={},Q=0,Y=q.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},G={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},X=D._rootFramesTimeline=new L,J=D._rootTimeline=new L,Z=30,ee=q.lazyRender=function(){
var e,t=F.length;for(B={};--t>-1;)e=F[t],e&&e._lazy!==!1&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);F.length=0};J._startTime=c.time,X._startTime=c.frame,J._active=X._active=!0,setTimeout(ee,1),D._updateRoot=N.render=function(){var e,t,n;if(F.length&&ee(),J.render((c.time-J._startTime)*J._timeScale,!1,!1),X.render((c.frame-X._startTime)*X._timeScale,!1,!1),F.length&&ee(),c.frame>=Z){Z=c.frame+(parseInt(N.autoSleep,10)||120);for(n in K){for(t=K[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);
0===t.length&&delete K[n]}if(n=J._first,(!n||n._paused)&&N.autoSleep&&!X._first&&1===c._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||c.sleep()}}},c.addEventListener("tick",D._updateRoot);var te=function(e,t,n){var a,i,r=e._gsTweenID;if(K[r||(e._gsTweenID=r="t"+Q++)]||(K[r]={target:e,tweens:[]}),t&&(a=K[r].tweens,a[i=a.length]=t,n))for(;--i>-1;)a[i]===t&&a.splice(i,1);return K[r].tweens},ne=function(e,t,n,a){var i,r,s=e.vars.onOverwrite;return s&&(i=s(e,t,n,a)),s=N.onOverwrite,s&&(r=s(e,t,n,a)),
i!==!1&&r!==!1},ae=function(e,t,n,a,i){var r,s,o,l;if(1===a||a>=4){for(l=i.length,r=0;r<l;r++)if((o=i[r])!==t)o._gc||o._kill(null,e,t)&&(s=!0);else if(5===a)break;return s}var u,d=t._startTime+m,c=[],f=0,p=0===t._duration;for(r=i.length;--r>-1;)(o=i[r])===t||o._gc||o._paused||(o._timeline!==t._timeline?(u=u||ie(t,0,p),0===ie(o,u,p)&&(c[f++]=o)):o._startTime<=d&&o._startTime+o.totalDuration()/o._timeScale>d&&((p||!o._initted)&&d-o._startTime<=2e-10||(c[f++]=o)));for(r=f;--r>-1;)if(o=c[r],2===a&&o._kill(n,e,t)&&(s=!0),
2!==a||!o._firstPT&&o._initted){if(2!==a&&!ne(o,t))continue;o._enabled(!1,!1)&&(s=!0)}return s},ie=function(e,t,n){for(var a=e._timeline,i=a._timeScale,r=e._startTime;a._timeline;){if(r+=a._startTime,i*=a._timeScale,a._paused)return-100;a=a._timeline}return r/=i,r>t?r-t:n&&r===t||!e._initted&&r-t<2*m?m:(r+=e.totalDuration()/e._timeScale/i)>t+m?0:r-t-m};d._init=function(){var e,t,n,a,i,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()),i={};for(a in r.startAt)i[a]=r.startAt[a];if(i.overwrite=!1,i.immediateRender=!0,i.lazy=l&&r.lazy!==!1,i.startAt=i.delay=null,this._startAt=N.to(this.target,0,i),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(a in r)Y[a]&&"autoCSS"!==a||(n[a]=r[a]);if(n.overwrite=0,n.data="isFromStart",n.lazy=l&&r.lazy!==!1,n.immediateRender=l,
this._startAt=N.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):T[u]||N.defaultEase:N.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&&N._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},d._initProps=function(e,t,n,a){var i,s,o,l,u,d;if(null==e)return!1;B[e._gsTweenID]&&ee(),this.vars.css||e.style&&e!==r&&e.nodeType&&W.css&&this.vars.autoCSS!==!1&&U(this.vars,e);for(i in this.vars)if(d=this.vars[i],Y[i])d&&(d instanceof Array||d.push&&y(d))&&d.join("").indexOf("{self}")!==-1&&(this.vars[i]=d=this._swapSelfInParams(d,this));else if(W[i]&&(l=new W[i])._onInitTween(e,this.vars[i],this)){
for(this._firstPT=u={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:i,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[i]=H.call(this,e,i,"get",d,i,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&&ae(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)&&(B[e._gsTweenID]=!0),o)},d.render=function(e,t,n){var a,i,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||(a=!0,i="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||u===m&&"isPause"!==this.data)&&u!==e&&(n=!0,
u>m&&(i="onReverseComplete")),this._rawPrevTime=s=!t||e||u===e?e:m);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)&&(i="onReverseComplete",a=this._reversed),e<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||n)&&(u>=0&&(u!==m||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=s=!t||e||u===e?e:m)),this._initted||(n=!0);else if(this._totalTime=this._time=e,this._easeType){var d=e/l,c=this._easeType,f=this._easePower;(1===c||3===c&&d>=.5)&&(d=1-d),
3===c&&(d*=2),1===f?d*=d:2===f?d*=d*d:3===f?d*=d*d*d:4===f&&(d*=d*d*d*d),1===c?this.ratio=1-d:2===c?this.ratio=d:e/l<.5?this.ratio=d/2:this.ratio=1-d/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,F.push(this),void(this._lazy=[e,t]);this._time&&!a?this.ratio=this._ease.getRatio(this._time/l):a&&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):i||(i="_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||a)&&this._callback("onUpdate")),i&&(this._gc&&!n||(e<0&&this._startAt&&!this._onUpdate&&e!==-1e-4&&this._startAt.render(e,t,n),
a&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[i]&&this._callback(i),0===l&&this._rawPrevTime===m&&s!==m&&(this._rawPrevTime=0)))}},d._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:N.selector(t)||t;var a,i,r,s,o,l,u,d,c,f=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline;if((y(t)||j(t))&&"number"!=typeof t[0])for(a=t.length;--a>-1;)this._kill(e,t[a],n)&&(l=!0);else{
if(this._targets){for(a=this._targets.length;--a>-1;)if(t===this._targets[a]){o=this._propLookup[a]||{},this._overwrittenProps=this._overwrittenProps||[],i=this._overwrittenProps[a]=e?this._overwrittenProps[a]||{}:"all";break}}else{if(t!==this.target)return!1;o=this._propLookup,i=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(o){if(u=e||o,d=e!==i&&"all"!==i&&e!==o&&("object"!=typeof e||!e._tempKill),n&&(N.onOverwrite||this.vars.onOverwrite)){for(r in u)o[r]&&(c||(c=[]),c.push(r));if((c||!e)&&!ne(this,n,t,c))return!1;
}for(r in u)(s=o[r])&&(f&&(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]),d&&(i[r]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},d.invalidate=function(){return this._notifyPluginsOfEnabled&&N._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,
this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(-this._delay)),this},d._enabled=function(e,t){if(f||c.wake(),e&&this._gc){var n,a=this._targets;if(a)for(n=a.length;--n>-1;)this._siblings[n]=te(a[n],this,!0);else this._siblings=te(this.target,this,!0)}return D.prototype._enabled.call(this,e,t),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&N._onPluginEvent(e?"_onEnable":"_onDisable",this);
},N.to=function(e,t,n){return new N(e,t,n)},N.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new N(e,t,n)},N.fromTo=function(e,t,n,a){return a.startAt=n,a.immediateRender=0!=a.immediateRender&&0!=n.immediateRender,new N(e,t,a)},N.delayedCall=function(e,t,n,a,i){return new N(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:a,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:i,overwrite:0})},N.set=function(e,t){return new N(e,0,t);
},N.getTweensOf=function(e,t){if(null==e)return[];e="string"!=typeof e?e:N.selector(e)||e;var n,a,i,r;if((y(e)||j(e))&&"number"!=typeof e[0]){for(n=e.length,a=[];--n>-1;)a=a.concat(N.getTweensOf(e[n],t));for(n=a.length;--n>-1;)for(r=a[n],i=n;--i>-1;)r===a[i]&&a.splice(n,1)}else for(a=te(e).concat(),n=a.length;--n>-1;)(a[n]._gc||t&&!a[n].isActive())&&a.splice(n,1);return a},N.killTweensOf=N.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var a=N.getTweensOf(e,t),i=a.length;--i>-1;)a[i]._kill(n,e);
};var re=_("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],this._priority=t||0,this._super=re.prototype},!0);if(d=re.prototype,re.version="1.18.0",re.API=2,d._firstPT=null,d._addTween=H,d.setRatio=$,d._kill=function(e){var t,n=this._overwriteProps,a=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(;a;)null!=e[a.n]&&(a._next&&(a._next._prev=a._prev),a._prev?(a._prev._next=a._next,
a._prev=null):this._firstPT===a&&(this._firstPT=a._next)),a=a._next;return!1},d._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},N._onPluginEvent=function(e,t){var n,a,i,r,s,o=t._firstPT;if("_onInitAllProps"===e){for(;o;){for(s=o._next,a=i;a&&a.pr>o.pr;)a=a._next;(o._prev=a?a._prev:r)?o._prev._next=o:i=o,(o._next=a)?a._prev=o:r=o,o=s}o=t._firstPT=i}for(;o;)o.pg&&"function"==typeof o.t[e]&&o.t[e]()&&(n=!0),
o=o._next;return n},re.activate=function(e){for(var t=e.length;--t>-1;)e[t].API===re.API&&(W[(new e[t])._propName]=e[t]);return!0},P.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,a=e.priority||0,i=e.overwriteProps,r={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},s=_("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){re.call(this,n,a),this._overwriteProps=i||[]},e.global===!0),o=s.prototype=new re(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,re.activate([s]),s},l=r._gsQueue){for(u=0;u<l.length;u++)l[u]();for(d in b)b[d].func||r.console.log("GSAP encountered missing dependency: com.greensock."+d)}f=!1}}("undefined"!=typeof e&&e.exports&&"undefined"!=typeof r?r:this||s,"TweenLite"),e.exports=TweenLite}).call(t,function(){return this}())},function(e,t,n){"use strict";var a=function(e,t,n,a,i,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,a,i,r,s,o],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=a},function(e,t,n){var a,i,r;/*!
	 * jQuery Mousewheel 3.1.13
	 *
	 * Copyright jQuery Foundation and other contributors
	 * Released under the MIT license
	 * http://jquery.org/license
	 */
!function(s){i=[n(5)],a=s,r="function"==typeof a?a.apply(t,i):a,!(void 0!==r&&(e.exports=r))}(function(e){function t(t){var s=t||window.event,o=l.call(arguments,1),u=0,c=0,f=0,p=0,h=0,m=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(f=s.detail*-1),"wheelDelta"in s&&(f=s.wheelDelta),"wheelDeltaY"in s&&(f=s.wheelDeltaY),"wheelDeltaX"in s&&(c=s.wheelDeltaX*-1),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(c=f*-1,f=0),u=0===f?c:f,"deltaY"in s&&(f=s.deltaY*-1,u=f),"deltaX"in s&&(c=s.deltaX,0===f&&(u=c*-1)),
0!==f||0!==c){if(1===s.deltaMode){var v=e.data(this,"mousewheel-line-height");u*=v,f*=v,c*=v}else if(2===s.deltaMode){var g=e.data(this,"mousewheel-page-height");u*=g,f*=g,c*=g}if(p=Math.max(Math.abs(f),Math.abs(c)),(!r||p<r)&&(r=p,a(s,p)&&(r/=40)),a(s,p)&&(u/=40,c/=40,f/=40),u=Math[u>=1?"floor":"ceil"](u/r),c=Math[c>=1?"floor":"ceil"](c/r),f=Math[f>=1?"floor":"ceil"](f/r),d.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();h=t.clientX-y.left,m=t.clientY-y.top;
}return t.deltaX=c,t.deltaY=f,t.deltaFactor=r,t.offsetX=h,t.offsetY=m,t.deltaMode=0,o.unshift(t,u,c,f),i&&clearTimeout(i),i=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,o)}}function n(){r=null}function a(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var i,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 d=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",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.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),a=n["offsetParent"in e.fn?"offsetParent":"parent"]();return a.length||(a=e("body")),parseInt(a.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 a,i;!function(n,r){var s=this;a=[],i=function(){return r(s)}.apply(t,a),!(void 0!==i&&(e.exports=i))}(this,function(e){"use strict";return function(e){function t(a){if(n[a])return n[a];var i=n[a]=Object.create(null);return e[a](i,t),i}var n=Object.create(null);return t(0)}([function(e,t){var n=t(23),a=t(23);e.debugMode=a.debugMode,e.verboseMode=a.verboseMode;var i=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 d=t(37);e.webworker=d;var c=t(8);e.parts=c;var f=t(1);e.parser=f;var p=t(14);e.renderers=p;var h=t(24);e.ASS=h.ASS;var m=t(25);e.Attachment=m.Attachment,e.AttachmentType=m.AttachmentType;var v=t(26);e.Dialogue=v.Dialogue;var g=t(28);e.ScriptProperties=g.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 i.Set},set:i.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 a=t(5);e.BrowserReadableStream=a.BrowserReadableStream,e.StringStream=a.StringStream,e.XhrStream=a.XhrStream;var i=t(4);e.StreamParser=i.StreamParser,e.SrtStreamParser=i.SrtStreamParser},function(e,t){function n(e){var t=e.indexOf(":");
if(t===-1)return null;var n=e.substr(0,t),a=e.substr(t+1).replace(/^\s+/,"");return{name:n,value:a}}function a(e,t){var a=n(e);if(null===a)return null;var r=a.value.split(",");r.length>t.length&&(r[t.length-1]=r.slice(t.length-1).join(","));var s=new i.Map;return t.forEach(function(e,t){s.set(e,r[t])}),{type:a.name,template:s}}var i=t(30);e.parseLineIntoProperty=n,e.parseLineIntoTypedTemplate=a},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 a(e,t,n,a){l.prototype["parse_tag_"+e]=function(i){var r=this,s=new f(i);if(null===r.read(s,e))return i.pop(),null;var o=n.call(r,s);if(null!==o)s.value=new t(o.value);else{if(a)return i.pop(),null;s.value=new t(null)}return s}}var i=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 f(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,a=new f(e);for(a.value=[];this._haveMore();){var r=this.parse_enclosedTags(a);if(null!==r)(t=a.value).push.apply(t,r.value);else{var s=this.parse_newline(a)||this.parse_hardspace(a)||this.parse_text(a);if(null===s)return e.pop(),null;if(s.value instanceof i.Text&&a.value[a.value.length-1]instanceof i.Text){var o=a.value[a.value.length-1];a.value[a.value.length-1]=new i.Text(o.value+s.value.value);
}else a.value.push(s.value)}}var l=!1;return a.value.forEach(function(e,t){e instanceof i.DrawingMode?l=0!==e.scale:e instanceof i.Text&&l&&(a.value[t]=new i.DrawingInstructions(n(e.value,"drawingInstructions")))}),a},e.prototype.parse_enclosedTags=function(e){var t=new f(e);if(t.value=[],null===this.read(t,"{"))return e.pop(),null;for(var n=this._peek();this._haveMore()&&"}"!==n;n=this._peek()){var a=null;if(null!==this.read(t,"\\")&&(a=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),
null===a&&t.pop()),null===a&&(a=this.parse_comment(t)),null===a)return e.pop(),null;a.value instanceof i.Comment&&t.value[t.value.length-1]instanceof i.Comment?t.value[t.value.length-1]=new i.Comment(t.value[t.value.length-1].value+a.value.value):t.value.push(a.value)}return null===this.read(t,"}")?(e.pop(),null):t},e.prototype.parse_newline=function(e){var t=new f(e);return null===this.read(t,"\\N")?(e.pop(),null):(t.value=new i.NewLine,t)},e.prototype.parse_hardspace=function(e){var t=new f(e);return null===this.read(t,"\\h")?(e.pop(),
null):(t.value=new i.Text("\xa0"),t)},e.prototype.parse_text=function(e){var t=this._peek(),n=new f(e),a=new f(n,t);return n.value=new i.Text(a.value),n},e.prototype.parse_comment=function(e){var t=this._peek(),n=new f(e),a=new f(n,t);return n.value=new i.Comment(a.value),n},e.prototype.parse_tag_a=function(e){var t=new f(e);if(null===this.read(t,"a"))return e.pop(),null;var n=this._peek();switch(n){case"1":var a=this._peek(2);switch(a){case"10":case"11":n=a}break;case"2":case"3":case"5":case"6":
case"7":case"9":break;default:return e.pop(),null}var r=new f(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 i.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 f(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 a=new f(t,n);return t.value=new i.Alignment(parseInt(a.value)),t},e.prototype.parse_tag_b=function(e){var t=new f(e);if(null===this.read(t,"b"))return e.pop(),null;var n=null,a=this._peek();return a>="1"&&a<="9"&&(a=this._peek(3),"00"===a.substr(1)&&(n=new f(t,a),n.value=parseInt(n.value))),null===n&&(n=this.parse_enableDisable(t)),null!==n?t.value=new i.Bold(n.value):t.value=new i.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 f(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 a=this.parse_decimal(t);return null===a?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new i.Fade(n.value/1e3,a.value/1e3),t)},e.prototype.parse_tag_fade=function(e){var t=new f(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 a=this.parse_decimal(t);if(null===a)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 i.ComplexFade(1-n.value/255,1-a.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 f(e);if(null===this.read(t,"fn"))return e.pop(),null;for(var n=new f(t,""),a=this._peek();this._haveMore()&&"\\"!==a&&"}"!==a;a=this._peek())n.value+=a;return n.value.length>0?t.value=new i.FontName(n.value):t.value=new i.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 f(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 i.FontSizePlus(n.value),t)},e.prototype.parse_tag_fsminus=function(e){var t=new f(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 i.FontSizeMinus(n.value),t)},e.prototype.parse_tag_fscx=function(e){var t=new f(e);if(null===this.read(t,"fscx"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new i.FontScaleX(n.value/100):t.value=new i.FontScaleX(null),
t},e.prototype.parse_tag_fscy=function(e){var t=new f(e);if(null===this.read(t,"fscy"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new i.FontScaleY(n.value/100):t.value=new i.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 f(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 i.ColorKaraoke(n.value/100),t)},e.prototype.parse_tag_K=function(e){var t=new f(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 i.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_kf=function(e){var t=new f(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 i.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_ko=function(e){var t=new f(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 i.OutlineKaraoke(n.value/100),t)},e.prototype.parse_tag_move=function(e){var t=new f(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 a=this.parse_decimal(t);if(null===a)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(o=this.parse_decimal(t),null===o)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;if(l=this.parse_decimal(t),null===l)return e.pop(),null}return null===this.read(t,")")?(e.pop(),
null):(t.value=new i.Move(n.value,a.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 f(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 a=this.parse_decimal(t);return null===a?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new i.RotationOrigin(n.value,a.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 f(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 a=this.parse_decimal(t);return null===a?(e.pop(),null):null===this.read(t,")")?(e.pop(),
null):(t.value=new i.Position(n.value,a.value),t)},e.prototype.parse_tag_q=function(e){var t=new f(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 a=new f(t,n);return t.value=new i.WrappingStyle(parseInt(a.value)),t},e.prototype.parse_tag_r=function(e){var t=new f(e);if(null===this.read(t,"r"))return e.pop(),null;for(var n=new f(t,""),a=this._peek();this._haveMore()&&"\\"!==a&&"}"!==a;a=this._peek())n.value+=a;return n.value.length>0?t.value=new i.Reset(n.value):t.value=new i.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 f(e);if(null===this.read(t,"t"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=null,a=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,a=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=[],d=this._peek();this._haveMore()&&")"!==d&&"}"!==d;d=this._peek()){var c=null;if(null!==this.read(t,"\\")&&(c=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),
null===c&&t.pop()),null===c&&(c=this.parse_comment(t)),null===c)return e.pop(),null;c.value instanceof i.Comment&&u[u.length-1]instanceof i.Comment?u[u.length-1]=new i.Comment(u[u.length-1].value+c.value.value):u.push(c.value)}return this.read(t,")"),t.value=new i.Transform(null!==n?n.value/1e3:null,null!==a?a.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 f(e),n=null,a=[];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){a.push(r),"m"===n&&2===a.length?(t.value.push(new i.drawing.MoveInstruction(a[0].value,a[1].value)),a.splice(0,a.length)):"l"===n&&2===a.length?(t.value.push(new i.drawing.LineInstruction(a[0].value,a[1].value)),a.splice(0,a.length)):"b"===n&&6===a.length&&(t.value.push(new i.drawing.CubicBezierCurveInstruction(a[0].value,a[1].value,a[2].value,a[3].value,a[4].value,a[5].value)),a.splice(0,a.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,a.splice(0,a.length)}}for(;null!==this.read(t," "););return t},e.prototype.parse_decimalInt32=function(e){for(var t=new f(e),n=null!==this.read(t,"-"),a=new f(t,""),i=this._peek();this._haveMore()&&i>="0"&&i<="9";i=this._peek())a.value+=i;if(0===a.value.length)return e.pop(),null;var r=parseInt(a.value);return r>=4294967295?r=4294967295:n&&(r=-r),t.value=r,t},e.prototype.parse_hexInt32=function(e){for(var t=new f(e),n=null!==this.read(t,"-"),a=new f(t,""),i=this._peek();this._haveMore()&&(i>="0"&&i<="9"||i>="a"&&i<="f"||i>="A"&&i<="F");i=this._peek())a.value+=i;
if(0===a.value.length)return e.pop(),null;var r=parseInt(a.value,16);return r>=4294967295?r=4294967295:n&&(r=-r),t.value=r,t},e.prototype.parse_decimalOrHexInt32=function(e){var t=new f(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 f(e),n=null!==this.read(t,"-"),a=this.parse_unsignedDecimal(t);return null===a?(e.pop(),null):(t.value=a.value,
n&&(t.value=-t.value),t)},e.prototype.parse_unsignedDecimal=function(e){for(var t=new f(e),n=new f(t,""),a=null,i=this._peek();this._haveMore()&&i>="0"&&i<="9";i=this._peek())n.value+=i;if(0===n.value.length)return e.pop(),null;if(null!==this.read(t,".")){a=new f(t,"");for(var i=this._peek();this._haveMore()&&i>="0"&&i<="9";i=this._peek())a.value+=i;if(0===a.value.length)return e.pop(),null}return t.value=parseFloat(n.value+(null!==a?"."+a.value:"")),t},e.prototype.parse_enableDisable=function(e){
var t=this._peek();if("0"===t||"1"===t){var n=new f(e,t);return n.value="1"===n.value,n}return null},e.prototype.parse_color=function(e){for(var t=new f(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);if(null===n)return e.pop(),null;var a=n.value;for(t.value=new i.Color(255&a,a>>8&255,a>>16&255);null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_alpha=function(e){for(var t=new f(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);
if(null===n)return e.pop(),null;var a=n.value;for(t.value=1-(255&a)/255;null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_colorWithAlpha=function(e){var t=new f(e),n=this.parse_decimalOrHexInt32(t);if(null===n)return e.pop(),null;var a=n.value;return t.value=new i.Color(255&a,a>>8&255,a>>16&255,1-(a>>24&255)/255),t},e.prototype.read=function(e,t){return this._peek(t.length)!==t?null:new f(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 a=new f(t);if(null===this.read(a,e))return t.pop(),null;if(null===this.read(a,"("))return t.pop(),null;var r=null,s=null,o=null,l=null,u=null,d=null,c=this.parse_decimal(a);if(null!==c){if(null===this.read(a,","))return t.pop(),null;var p=this.parse_decimal(a);null!==p?(r=c,o=p):u=c}if(null!==r&&null!==o){if(null===this.read(a,","))return t.pop(),null;if(s=this.parse_decimal(a),
null===this.read(a,","))return t.pop(),null;l=this.parse_decimal(a),a.value=new i.RectangularClip(r.value,o.value,s.value,l.value,"clip"===e)}else{d=new f(a,"");for(var h=this._peek();this._haveMore()&&")"!==h&&"}"!==h;h=this._peek())d.value+=h;a.value=new i.VectorClip(null!==u?u.value:1,n(d.value,"drawingInstructions"),"clip"===e)}return null===this.read(a,")")?(t.pop(),null):a},e}();a("alpha",i.Alpha,l.prototype.parse_alpha,!1),a("be",i.Blur,l.prototype.parse_decimal,!1),a("blur",i.GaussianBlur,l.prototype.parse_decimal,!1),
a("bord",i.Border,l.prototype.parse_decimal,!1),a("c",i.PrimaryColor,l.prototype.parse_color,!1),a("fax",i.SkewX,l.prototype.parse_decimal,!1),a("fay",i.SkewY,l.prototype.parse_decimal,!1),a("fr",i.RotateZ,l.prototype.parse_decimal,!1),a("frx",i.RotateX,l.prototype.parse_decimal,!1),a("fry",i.RotateY,l.prototype.parse_decimal,!1),a("frz",i.RotateZ,l.prototype.parse_decimal,!1),a("fs",i.FontSize,l.prototype.parse_decimal,!1),a("fsp",i.LetterSpacing,l.prototype.parse_decimal,!1),a("i",i.Italic,l.prototype.parse_enableDisable,!1),
a("p",i.DrawingMode,l.prototype.parse_decimal,!0),a("pbo",i.DrawingBaselineOffset,l.prototype.parse_decimal,!0),a("s",i.StrikeThrough,l.prototype.parse_enableDisable,!1),a("shad",i.Shadow,l.prototype.parse_decimal,!1),a("u",i.Underline,l.prototype.parse_enableDisable,!1),a("xbord",i.BorderX,l.prototype.parse_decimal,!1),a("xshad",i.ShadowX,l.prototype.parse_decimal,!1),a("ybord",i.BorderY,l.prototype.parse_decimal,!1),a("yshad",i.ShadowY,l.prototype.parse_decimal,!1),a("1a",i.PrimaryAlpha,l.prototype.parse_alpha,!1),
a("1c",i.PrimaryColor,l.prototype.parse_color,!1),a("2a",i.SecondaryAlpha,l.prototype.parse_alpha,!1),a("2c",i.SecondaryColor,l.prototype.parse_color,!1),a("3a",i.OutlineAlpha,l.prototype.parse_alpha,!1),a("3c",i.OutlineColor,l.prototype.parse_color,!1),a("4a",i.ShadowAlpha,l.prototype.parse_alpha,!1),a("4c",i.ShadowColor,l.prototype.parse_color,!1);for(var u=0,d=Object.keys(l.prototype);u<d.length;u++){var c=d[u];0===c.indexOf("parse_")&&"function"==typeof l.prototype[c]&&o.set(c.substr("parse_".length),l.prototype[c]);
}var f=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),h=t(36),m=t(38);m.registerWorkerCommand(h.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 a=e.charCodeAt(n)-33;if(a<0||a>63)throw new Error("Out-of-range character code "+a+" at index "+n+" in string "+e);t+=a<26?String.fromCharCode("A".charCodeAt(0)+a):a<52?String.fromCharCode("a".charCodeAt(0)+a-26):a<62?String.fromCharCode("0".charCodeAt(0)+a-52):62===a?"+":"/";
}return t}var a,i=t(23),r=t(24),s=t(29),o=t(26),l=t(25),u=t(30),d=t(32),c=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"}(a||(a={}));var f=function(){function e(e){var t=this;this._stream=e,this._ass=new r.ASS,this._minimalDeferred=new d.DeferredPromise,this._deferred=new d.DeferredPromise,this._shouldSwallowBom=!0,this._currentSection=a.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===a.ScriptInfo&&e!==a.ScriptInfo&&this._minimalDeferred.resolve(this._ass),e===a.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=a.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=a.ScriptInfo;else if("[V4+ Styles]"===e||"[V4 Styles]"===e)this.currentSection=a.Styles;else if("[Events]"===e)this.currentSection=a.Events;else if("[Fonts]"===e)this.currentSection=a.Fonts;else if("[Graphics]"===e)this.currentSection=a.Graphics;else switch(null===this._currentAttachment&&"["===e[0]&&"]"===e[e.length-1]&&(this.currentSection=a.Other),
this.currentSection){case a.ScriptInfo:var r=c.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 a.Styles:if(null===this._ass.stylesFormatSpecifier){var s=c.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(o){i.debugMode&&console.error("Could not parse style from line "+e+" - "+(o.stack||o))}break;case a.Events:if(null===this._ass.dialoguesFormatSpecifier){var u=c.parseLineIntoProperty(e);null!==u&&"Format"===u.name&&(this._ass.dialoguesFormatSpecifier=u.value.split(",").map(function(e){return e.trim()}))}else try{this._ass.addEvent(e)}catch(o){i.debugMode&&console.error("Could not parse event from line "+e+" - "+(o.stack||o))}break;case a.Fonts:
case a.Graphics:var d=this.currentSection===a.Fonts?/^fontname:(.+)/:/^filename:(.+)/,f=d.exec(e);if(null!==f)null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentAttachment=new l.Attachment(f[1].trim(),this.currentSection===a.Fonts?l.AttachmentType.Font:l.AttachmentType.Graphic);else if(null!==this._currentAttachment)try{this._currentAttachment.contents+=n(e)}catch(o){i.debugMode&&console.error("Encountered error while reading font "+this._currentAttachment.filename+": %o",o),
this._currentAttachment=null}break;case a.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=f;var p=function(){function e(e){var t=this;this._stream=e,this._ass=new r.ASS,this._deferred=new d.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,a){
return"{c&H"+a+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 a=n(32),i=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=a.Promise.resolve(this._str.substring(this._readTill,t)),
this._readTill=t+1):(e=a.Promise.resolve(this._str.substr(this._readTill)),this._readTill=this._str.length)}else e=a.Promise.resolve(null);return e},e}();t.StringStream=i;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 a.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 a.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,a=t.done;a?(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)),a=0;a<t.length;a++)n[a]=t.charCodeAt(a);for(var i={dataView:new DataView(n.buffer),position:0},r=d.read(i),s=null,a=0;a<r.numTables;a++){var o=c.read(i);if(o.c1+o.c2+o.c3+o.c4==="name"){s=o;break}}i.position=s.offset;for(var u=f.read(i),h=new l.Set,a=0;a<u.count;a++){var m=p.read(i);switch(m.nameId){case 1:case 4:case 6:var v=s.offset+u.stringOffset+m.offset,g=n.subarray(v,v+m.length);switch(m.platformId){
case 1:for(var y="",b=0;b<g.length;b++)y+=String.fromCharCode(g[b]);h.add(y);break;case 3:for(var w="",b=0;b<g.length;b+=2)w+=String.fromCharCode((g[b]<<8)+g[b+1]);h.add(w)}}}return h}function a(e){var t=e.__fields;return e.read=function(n){for(var a=new e,i=0;i<t.length;i++){var s=t[i],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}a[s.field]=o}return a},e}function i(e){var t=u.get(e);return void 0===t&&(t=function(t,n){var a=t.constructor;void 0===a.__fields&&(a.__fields=[]),a.__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,d=function(){function e(){}return s([i(r.Uint16)],e.prototype,"majorVersion",void 0),s([i(r.Uint16)],e.prototype,"minorVersion",void 0),s([i(r.Uint16)],e.prototype,"numTables",void 0),
s([i(r.Uint16)],e.prototype,"searchRange",void 0),s([i(r.Uint16)],e.prototype,"entrySelector",void 0),s([i(r.Uint16)],e.prototype,"rangeShift",void 0),e=s([a],e)}(),c=function(){function e(){}return s([i(r.Char)],e.prototype,"c1",void 0),s([i(r.Char)],e.prototype,"c2",void 0),s([i(r.Char)],e.prototype,"c3",void 0),s([i(r.Char)],e.prototype,"c4",void 0),s([i(r.Uint32)],e.prototype,"checksum",void 0),s([i(r.Uint32)],e.prototype,"offset",void 0),s([i(r.Uint32)],e.prototype,"length",void 0),e=s([a],e);
}(),f=function(){function e(){}return s([i(r.Uint16)],e.prototype,"formatSelector",void 0),s([i(r.Uint16)],e.prototype,"count",void 0),s([i(r.Uint16)],e.prototype,"stringOffset",void 0),e=s([a],e)}(),p=function(){function e(){}return s([i(r.Uint16)],e.prototype,"platformId",void 0),s([i(r.Uint16)],e.prototype,"encodingId",void 0),s([i(r.Uint16)],e.prototype,"languageId",void 0),s([i(r.Uint16)],e.prototype,"nameId",void 0),s([i(r.Uint16)],e.prototype,"length",void 0),s([i(r.Uint16)],e.prototype,"offset",void 0),
e=s([a],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 a=function(){function e(e,t,n,a,i,r){this._x1=e,this._y1=t,this._x2=n,this._y2=a,this._x3=i,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=a},function(e,t){var n=t(7);e.drawing=n;var a=function(){function e(e,t,n,a){void 0===a&&(a=1),this._red=e,this._green=t,this._blue=n,this._alpha=a}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=a;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.Comment=i;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 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.StrikeThrough=d;
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.Border=c;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.BorderX=f;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 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.Shadow=h;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.ShadowX=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.ShadowY=v;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.Blur=g;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 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.FontSize=w;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.FontSizePlus=P;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.FontSizeMinus=_;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.FontScaleX=S;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.FontScaleY=x;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.LetterSpacing=C;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.RotateX=T;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.RotateY=k;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.RotateZ=I;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.SkewX=M;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 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.PrimaryColor=E;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.SecondaryColor=O;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.OutlineColor=D;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.ShadowColor=R;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.Alpha=L;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.PrimaryAlpha=N;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 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.OutlineAlpha=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.ShadowAlpha=F;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.Alignment=B;var z=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=z;var $=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=$;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.OutlineKaraoke=V;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.WrappingStyle=H;var q=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=q;var W=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=W;var K=function(){function e(e,t,n,a,i,r){this._x1=e,this._y1=t,this._x2=n,this._y2=a,this._t1=i,
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=K;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.RotationOrigin=Q;var Y=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=Y;var G=function(){function e(e,t,n,a,i,r,s){this._a1=e,this._a2=t,this._a3=n,this._t1=a,this._t2=i,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=G;var X=function(){function e(e,t,n,a){this._start=e,this._end=t,this._accel=n,this._tags=a}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=X;var J=function(){function e(e,t,n,a,i){this._x1=e,this._y1=t,this._x2=n,this._y2=a,this._inside=i}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 Z=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=Z;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 ae=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?" ":"")+"}"}}},ie=t(38),re=0,se=Object.keys(e);re<se.length;re++){var oe=se[re],le=e[oe];le instanceof Function&&(ae(le,oe),ie.registerClassPrototype(le.prototype))}for(var ue=0,de=Object.keys(n);ue<de.length;ue++){var oe=de[ue],le=n[oe];le instanceof Function&&(ae(le,"Drawing"+oe),ie.registerClassPrototype(le.prototype))}},function(e,t){var n=t(23),a=t(11),i=function(){function e(e,t){this._getCurrentTime=e,this._autoPauseAfter=t,this._manualClock=new a.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 a=this._manualClock.currentTime,i=this._getCurrentTime();this._manualClock.paused?a!==i&&(this._lastKnownExternalTime=i,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(i)):null!==this._lastKnownExternalTime&&i===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=i,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(i)),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=i},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 a=0;a<n.length;a++){
var i=n[a];i.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),a=t(30),i=t(10),r=function(){function e(){this._currentTime=-1,this._rate=1,this._enabled=!0,this._paused=!0,this._eventListeners=new a.Map}return e.prototype.play=function(){this._enabled&&this._paused&&(this._paused=!1,this._dispatchEvent(i.ClockEvent.Play,[]))},e.prototype.tick=function(e){
this._enabled&&this._currentTime!==e&&(this.play(),this._currentTime=e,this._dispatchEvent(i.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(i.ClockEvent.Pause,[])))},e.prototype.stop=function(){this._dispatchEvent(i.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(i.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,[i.EventSource])},function(e,t){var n=t(9),a=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=a},function(e,t){var n=t(34).__extends,a=t(12),i=t(21),r=function(e){function t(t,n,i){e.call(this,n,new a.VideoClock(t),document.createElement("div"),i),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,a=this._video.offsetWidth,i=this._video.offsetHeight,r=Math.min(a/t,i/n),s=t*r,o=n*r,l=(a-s)/2,u=(i-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}(i.WebRenderer);e.DefaultRenderer=r},function(e,t){var n=t(10);
e.ClockEvent=n.ClockEvent,e.EventSource=n.EventSource;var a=t(9);e.AutoClock=a.AutoClock;var i=t(11);e.ManualClock=i.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),a=t(16),i=t(23),r=function(){function e(t,i,r){var s=this;this._ass=t,this._clock=i,this._id=++e._lastRendererId,this._settings=a.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(){i.verboseMode&&console.log("NullRenderer._onClockPlay")},e.prototype._onClockTick=function(){var e=this._clock.currentTime;i.verboseMode&&console.log("NullRenderer._onClockTick: currentTime = "+e);
for(var t=0,n=this._ass.dialogues;t<n.length;t++){var a=n[t];a.end>e&&(a.start<=e?this.draw(a):a.start<=e+this._settings.preRenderTime&&this.preRender(a))}},e.prototype._onClockPause=function(){i.verboseMode&&console.log("NullRenderer._onClockPause")},e.prototype._onClockStop=function(){i.verboseMode&&console.log("NullRenderer._onClockStop")},e.prototype._onClockRateChange=function(){i.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 a=t(30),i=function(){function e(){}return e.makeFontMapFromStyleElement=function(e){for(var t=new a.Map,i=e.sheet,r=0;r<i.cssRules.length;r++){var s=i.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,a=n.fontMap,i=void 0===a?null:a,r=n.preRenderTime,s=void 0===r?5:r,o=n.preciseOutlines,l=void 0!==o&&o,u=n.enableSvg,d=void 0===u||u,c=n.fallbackFonts,f=void 0===c?'Arial, Helvetica, sans-serif, "Segoe UI Symbol"':c,p=n.useAttachedFonts,h=void 0!==p&&p,m=new e;return m.fontMap=i,m.preRenderTime=s,m.preciseOutlines=l,m.enableSvg=d,m.fallbackFonts=f,m.useAttachedFonts=h,m},e}();e.RendererSettings=i},function(e,t){var n=t(30),a=function(){
function e(t,a){this._style=a,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,a=null,i=0;i<t.length;i++){var r=t[i];
null===n&&(n=r.time),a=r.time}for(var s="",o=0;o<t.length;o++){var r=t[o];s+="\t"+(100*(a-n===0?1:(r.time-n)/(a-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+" "+((a-n)/this._rate).toFixed(3)+"s "+e,
this._animationDelays.set(l,n)},e._nextId=0,e}();e.AnimationCollection=a},function(e,t){var n=t(8),a=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 a=Math.pow(2,this._scale-1),i=this._outputScaleX/a,r=this._outputScaleY/a,s=document.createElementNS("http://www.w3.org/2000/svg","path"),o=0,l=0,u=0,d=e.instructions;u<d.length;u++){
var c=d[u];c instanceof n.drawing.MoveInstruction?(s.pathSegList.appendItem(s.createSVGPathSegMovetoAbs(c.x,c.y+this._baselineOffset)),o=Math.max(o,c.x),l=Math.max(l,c.y+this._baselineOffset)):c instanceof n.drawing.LineInstruction?(s.pathSegList.appendItem(s.createSVGPathSegLinetoAbs(c.x,c.y+this._baselineOffset)),o=Math.max(o,c.x),l=Math.max(l,c.y+this._baselineOffset)):c instanceof n.drawing.CubicBezierCurveInstruction&&(s.pathSegList.appendItem(s.createSVGPathSegCurvetoCubicAbs(c.x3,c.y3+this._baselineOffset,c.x1,c.y1+this._baselineOffset,c.x2,c.y2+this._baselineOffset)),
o=Math.max(o,c.x1,c.x2,c.x3),l=Math.max(l,c.y1+this._baselineOffset,c.y2+this._baselineOffset,c.y3+this._baselineOffset))}var f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("version","1.1"),f.width.baseVal.valueAsString=(o*i).toFixed(3)+"px",f.height.baseVal.valueAsString=(l*r).toFixed(3)+"px";var p=document.createElementNS("http://www.w3.org/2000/svg","g");return f.appendChild(p),p.setAttribute("transform","scale("+i.toFixed(3)+" "+r.toFixed(3)+")"),p.appendChild(s),
s.setAttribute("fill",t.toString()),f},e}();e.DrawingStyles=a},function(e,t){function n(e,t,n,a){var i='"'+e+'"';""!==n&&(i+=", "+n),a.style.fontFamily=i,a.style.fontSize=t+"px"}function a(e,t,a,i){return n(e,t,a,i),new u.Promise(function(e){return setTimeout(function(){return e(i.offsetHeight)},1e3)})}function i(e,t,a,i){return n(e,t,a,i),i.offsetHeight}function r(e,t){return[e,180/(t-e)]}function s(e,t,n){return a(e,180,t,n).then(function(i){return a(e,360,t,n).then(function(e){return r(i,e)})});
}function o(e,t,n){return 180+(e-t)*n}function l(e,t,n,a,s){var l=s.get(e);if(void 0===l){var u=i(e,180,n,a),d=i(e,360,n,a);s.set(e,l=r(u,d))}var c=l[0],f=l[1];return o(t,c,f)}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 a=n(34).__extends,i=n(17),r=n(18),s=n(19),o=n(20),l=n(22),u=n(10),d=n(15),c=n(6),f=n(8),p=n(23),h=n(25),m=n(27),v=n(31),g=n(30),y=n(32),b=/^(url|local)\(["']?(.+?)["']?\)$/,w=function(t){function n(n,a,i,r){var s=this;t.call(this,n,a,function(){if(!(i instanceof HTMLDivElement)){var e=r;r=i,i=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=i,this._layerWrappers=[],this._layerAlignmentWrappers=[],this._fontMetricsCache=new g.Map,this._currentSubs=new g.Map,this._preRenderedSubs=new g.Map,this._eventListeners=new g.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 g.Map,u=null===this.settings.fontMap?new g.Map:this.settings.fontMap,d=new g.Map;this.settings.useAttachedFonts&&n.attachments.forEach(function(e){if(e.type===h.AttachmentType.Font){var t=null;try{t=c.getTtfNames(e)}catch(n){return void console.error(n)}var a="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(a);else{var n=d.get(e);void 0===n&&d.set(e,n=[]),n.push(a)}else u.set(e,[a])})}}),u.forEach(function(t,n){var a;if(e.document.fonts&&e.document.fonts.add){var i="string"==typeof t?t:t.map(function(e){return null!==e.match(b)?e:'url("'+e+'")'}).join(", "),r=d.get(n);if(void 0!==r)for(var u=0;u<r.length;u++){var c=r[u];i+=', url("'+c+'")'}var f=[];e.document.fonts.forEach(function(e){e.family!==n&&e.family!=='"'+n+'"'||f.push(e)});var h;if(0===f.length){
var m=new FontFace(n,i),v=new FontFace('"'+n+'"',i);e.document.fonts.add(m),e.document.fonts.add(v),h=y.any([m.load(),v.load()])}else h=y.any(f.map(function(e){return e.load()}));a=s._calculateFontMetricsAfterFetch(n,h.catch(function(e){return console.warn("Fetching fonts for "+n+" at "+i+" failed: %o",e),null}))}else{var g=("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=d.get(n);void 0!==r&&(g=g.concat(r));var w=g.map(function(e){var t=l.get(e);return void 0===t&&(t=new y.Promise(function(t,n){var a=new XMLHttpRequest;a.addEventListener("load",function(){p.debugMode&&console.log("Preloaded "+e+"."),t(null)}),a.addEventListener("error",function(e){n(e)}),a.open("GET",e,!0),a.send()}),l.set(e,t)),t}),P=0===w.length?y.Promise.resolve(null):y.first(w).catch(function(e){return console.warn("Fetching fonts for "+n+" at "+g.join(", ")+" failed: %o",e),null});a=s._calculateFontMetricsAfterFetch(n,P);
}o.push(a.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 a(n,t),Object.defineProperty(n.prototype,"libjassSubsWrapper",{get:function(){return this._libjassSubsWrapper},enumerable:!0,configurable:!0}),n.prototype.resize=function(e,t,n,a){void 0===n&&(n=0),void 0===a&&(a=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=a.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,a=this._preRenderedSubs.get(e.id);if(a)return a;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 d=document.createElement("style");d.id="libjass-animation-styles-"+this.id+"-"+e.id,d.type="text/css";var c=new i.AnimationCollection(this,d),h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("version","1.1"),
h.setAttribute("class","libjass-filters"),h.width.baseVal.valueAsString="0",h.height.baseVal.valueAsString="0";var v=document.createElementNS("http://www.w3.org/2000/svg","defs");h.appendChild(v);var y=null,b=new l.SpanStyles(this,e,this._scaleX,this._scaleY,this.settings,this._fontSizeElement,v,this._fontMetricsCache),w=null,P=!1,_=function(e){null!==y&&y.hasChildNodes()&&u.appendChild(b.setStylesOnSpan(y,w)),null!==w&&w.animationDelays.forEach(function(e,t){return c.animationDelays.set(t,e)}),e&&(P?u.appendChild(b.makeNewLine()):u.appendChild(document.createElement("br"))),
y=document.createElement("span"),w=new i.AnimationCollection(t,d),P=e};_(!1);for(var S=new r.DrawingStyles(this._scaleX,this._scaleY),x=this.ass.properties.wrappingStyle,C=0,T=0,k=e.parts;T<k.length;T++){var I=k[T];if(I instanceof f.Italic)b.italic=I.value;else if(I instanceof f.Bold)b.bold=I.value;else if(I instanceof f.Underline)b.underline=I.value;else if(I instanceof f.StrikeThrough)b.strikeThrough=I.value;else if(I instanceof f.Border)b.outlineWidth=I.value,b.outlineHeight=I.value;else if(I instanceof f.BorderX)b.outlineWidth=I.value;else if(I instanceof f.BorderY)b.outlineHeight=I.value;else if(I instanceof f.Shadow)b.shadowDepthX=I.value,
b.shadowDepthY=I.value;else if(I instanceof f.ShadowX)b.shadowDepthX=I.value;else if(I instanceof f.ShadowY)b.shadowDepthY=I.value;else if(I instanceof f.Blur)b.blur=I.value;else if(I instanceof f.GaussianBlur)b.gaussianBlur=I.value;else if(I instanceof f.FontName)b.fontName=I.value;else if(I instanceof f.FontSize)b.fontSize=I.value;else if(I instanceof f.FontSizePlus)b.fontSize+=I.value;else if(I instanceof f.FontSizeMinus)b.fontSize-=I.value;else if(I instanceof f.FontScaleX)b.fontScaleX=I.value;else if(I instanceof f.FontScaleY)b.fontScaleY=I.value;else if(I instanceof f.LetterSpacing)b.letterSpacing=I.value;else if(I instanceof f.RotateX)b.rotationX=I.value;else if(I instanceof f.RotateY)b.rotationY=I.value;else if(I instanceof f.RotateZ)b.rotationZ=I.value;else if(I instanceof f.SkewX)b.skewX=I.value;else if(I instanceof f.SkewY)b.skewY=I.value;else if(I instanceof f.PrimaryColor)b.primaryColor=I.value;else if(I instanceof f.SecondaryColor)b.secondaryColor=I.value;else if(I instanceof f.OutlineColor)b.outlineColor=I.value;else if(I instanceof f.ShadowColor)b.shadowColor=I.value;else if(I instanceof f.Alpha)b.primaryAlpha=I.value,
b.secondaryAlpha=I.value,b.outlineAlpha=I.value,b.shadowAlpha=I.value;else if(I instanceof f.PrimaryAlpha)b.primaryAlpha=I.value;else if(I instanceof f.SecondaryAlpha)b.secondaryAlpha=I.value;else if(I instanceof f.OutlineAlpha)b.outlineAlpha=I.value;else if(I instanceof f.ShadowAlpha)b.shadowAlpha=I.value;else if(I instanceof f.Alignment);else if(I instanceof f.ColorKaraoke)_(!1),w.add("step-end",[new o.Keyframe(0,new g.Map([["color",b.secondaryColor.withAlpha(b.secondaryAlpha).toString()]])),new o.Keyframe(C,new g.Map([["color",b.primaryColor.withAlpha(b.primaryAlpha).toString()]]))]),
C+=I.duration;else if(I instanceof f.WrappingStyle)x=I.value;else if(I instanceof f.Reset)b.reset(this.ass.styles.get(I.value));else if(I instanceof f.Position)u.style.position="absolute",u.style.left=(this._scaleX*I.x).toFixed(3)+"px",u.style.top=(this._scaleY*I.y).toFixed(3)+"px";else if(I instanceof f.Move)u.style.position="absolute",c.add("linear",[new o.Keyframe(0,new g.Map([["left",(this._scaleX*I.x1).toFixed(3)+"px"],["top",(this._scaleY*I.y1).toFixed(3)+"px"]])),new o.Keyframe(I.t1,new g.Map([["left",(this._scaleX*I.x1).toFixed(3)+"px"],["top",(this._scaleY*I.y1).toFixed(3)+"px"]])),new o.Keyframe(I.t2,new g.Map([["left",(this._scaleX*I.x2).toFixed(3)+"px"],["top",(this._scaleY*I.y2).toFixed(3)+"px"]])),new o.Keyframe(e.end-e.start,new g.Map([["left",(this._scaleX*I.x2).toFixed(3)+"px"],["top",(this._scaleY*I.y2).toFixed(3)+"px"]]))]);else if(I instanceof f.Fade)c.add("linear",[new o.Keyframe(0,new g.Map([["opacity","0"]])),new o.Keyframe(I.start,new g.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start-I.end,new g.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start,new g.Map([["opacity","0"]]))]);else if(I instanceof f.ComplexFade)c.add("linear",[new o.Keyframe(0,new g.Map([["opacity",I.a1.toFixed(3)]])),new o.Keyframe(I.t1,new g.Map([["opacity",I.a1.toFixed(3)]])),new o.Keyframe(I.t2,new g.Map([["opacity",I.a2.toFixed(3)]])),new o.Keyframe(I.t3,new g.Map([["opacity",I.a2.toFixed(3)]])),new o.Keyframe(I.t4,new g.Map([["opacity",I.a3.toFixed(3)]])),new o.Keyframe(e.end-e.start,new g.Map([["opacity",I.a3.toFixed(3)]]))]);else if(I instanceof f.Transform)for(var M=s<=I.start?0:s>=I.end?1:Math.pow((s-I.start)/(I.end-I.start),I.accel),A=0,E=I.tags;A<E.length;A++){
var O=E[A];O instanceof f.Border?(b.outlineWidth+=M*(O.value-b.outlineWidth),b.outlineHeight+=M*(O.value-b.outlineHeight)):O instanceof f.BorderX?b.outlineWidth+=M*(O.value-b.outlineWidth):O instanceof f.BorderY?b.outlineHeight+=M*(O.value-b.outlineHeight):O instanceof f.Shadow?(b.shadowDepthX+=M*(O.value-b.shadowDepthX),b.shadowDepthY+=M*(O.value-b.shadowDepthY)):O instanceof f.ShadowX?b.shadowDepthX+=M*(O.value-b.shadowDepthX):O instanceof f.ShadowY?b.shadowDepthY+=M*(O.value-b.shadowDepthY):O instanceof f.Blur?b.blur+=M*(O.value-b.blur):O instanceof f.GaussianBlur?b.gaussianBlur+=M*(O.value-b.gaussianBlur):O instanceof f.FontSize?b.fontSize+=M*(O.value-b.fontSize):O instanceof f.FontSizePlus?b.fontSize+=M*O.value:O instanceof f.FontSizeMinus?b.fontSize-=M*O.value:O instanceof f.FontScaleX?b.fontScaleX+=M*(O.value-b.fontScaleX):O instanceof f.FontScaleY?b.fontScaleY+=M*(O.value-b.fontScaleY):O instanceof f.LetterSpacing?b.letterSpacing+=M*(O.value-b.letterSpacing):O instanceof f.RotateX?b.rotationX+=M*(O.value-b.rotationX):O instanceof f.RotateY?b.rotationY+=M*(O.value-b.rotationY):O instanceof f.RotateZ?b.rotationZ+=M*(O.value-b.rotationZ):O instanceof f.SkewX?b.skewX+=M*(O.value-b.skewX):O instanceof f.SkewY?b.skewY+=M*(O.value-b.skewY):O instanceof f.PrimaryColor?b.primaryColor=b.primaryColor.interpolate(O.value,M):O instanceof f.SecondaryColor?b.secondaryColor=b.secondaryColor.interpolate(O.value,M):O instanceof f.OutlineColor?b.outlineColor=b.outlineColor.interpolate(O.value,M):O instanceof f.ShadowColor?b.shadowColor=b.shadowColor.interpolate(O.value,M):O instanceof f.Alpha?(b.primaryAlpha+=M*(O.value-b.primaryAlpha),
b.secondaryAlpha+=M*(O.value-b.secondaryAlpha),b.outlineAlpha+=M*(O.value-b.outlineAlpha),b.shadowAlpha+=M*(O.value-b.shadowAlpha)):O instanceof f.PrimaryAlpha?b.primaryAlpha+=M*(O.value-b.primaryAlpha):O instanceof f.SecondaryAlpha?b.secondaryAlpha+=M*(O.value-b.secondaryAlpha):O instanceof f.OutlineAlpha?b.outlineAlpha+=M*(O.value-b.outlineAlpha):O instanceof f.ShadowAlpha&&(b.shadowAlpha+=M*(O.value-b.shadowAlpha))}else I instanceof f.DrawingMode?0!==I.scale&&(S.scale=I.scale):I instanceof f.DrawingBaselineOffset?S.baselineOffset=I.value:I instanceof f.DrawingInstructions?(y.appendChild(S.toSVG(I,b.primaryColor.withAlpha(b.primaryAlpha))),
_(!1)):I instanceof f.Text?(y.appendChild(document.createTextNode(I.value+"\u200c")),_(!1)):p.debugMode&&I instanceof f.Comment?(y.appendChild(document.createTextNode(I.value)),_(!1)):I instanceof f.NewLine&&_(!0)}for(var D=0,R=e.parts;D<R.length;D++){var I=R[D];if(I instanceof f.Position||I instanceof f.Move){var L=n._transformOrigins[e.alignment],N="translate("+-L[0]+"%, "+-L[1]+"%) translate(-"+u.style.marginLeft+", -"+u.style.marginTop+")",j=L[0]+"% "+L[1]+"%";u.style.webkitTransform=N,u.style.webkitTransformOrigin=j,
u.style.transform=N,u.style.transformOrigin=j;break}}switch(x){case m.WrappingStyle.EndOfLineWrapping:u.style.whiteSpace="pre-wrap";break;case m.WrappingStyle.NoLineWrapping:u.style.whiteSpace="pre";break;case m.WrappingStyle.SmartWrappingWithWiderTopLine:case m.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=c.animationStyle,u.style.animation=c.animationStyle,u.setAttribute("data-dialogue-id",this.id+"-"+e.id),""!==d.textContent&&u.appendChild(d),v.hasChildNodes()&&u.appendChild(h);var U={sub:u,animationDelays:c.animationDelays};return e.containsTransformTag||this._preRenderedSubs.set(e.id,U),U},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 a=n.sub.cloneNode(!0),i=function(a){var i=a.style.animationName||a.style.webkitAnimationName;if(void 0!==i&&""!==i){var r=i.split(",").map(function(a){a=a.trim();var i=n.animationDelays.get(a);return((i+e.start-t.clock.currentTime)/t.clock.rate).toFixed(3)+"s"}).join(", ");a.style.webkitAnimationDelay=r,a.style.animationDelay=r}};i(a);for(var r=a.querySelectorAll('[style*="animation:"]'),s=0;s<r.length;s++)i(r[s]);var o=e.layer,l="absolute"===a.style.position?0:e.alignment;
if(void 0===this._layerWrappers[o]){var u=document.createElement("div");u.className="layer layer"+o;for(var d=null,c=o+1;c<this._layerWrappers.length&&null===d;c++)void 0!==this._layerWrappers[c]&&(d=this._layerWrappers[c]);this._subsWrapper.insertBefore(u,d),this._layerWrappers[o]=u,this._layerAlignmentWrappers[o]=[]}if(void 0===this._layerAlignmentWrappers[o][l]){var f=document.createElement("div");f.className="an an"+l;for(var u=this._layerWrappers[o],d=null,h=l+1;h<this._layerAlignmentWrappers[o].length&&null===d;h++)void 0!==this._layerAlignmentWrappers[o][h]&&(d=this._layerAlignmentWrappers[o][h]);
u.insertBefore(f,d),this._layerAlignmentWrappers[o][l]=f}this._layerAlignmentWrappers[o][l].appendChild(a);var m=a.getElementsByTagName("style")[0];if(void 0!==m){var v=m.sheet;0===v.cssRules.length&&(v.cssText=m.textContent)}this._currentSubs.set(e,a)}},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,a){(a.start>n||a.end<n||a.containsTransformTag)&&(e._currentSubs.delete(a),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}(d.NullRenderer);t.WebRenderer=w,v.mixin(w,[u.EventSource])},function(e,t){var n=t(19),a=function(){function e(e,t,n,a,i,r,s,o){this._scaleX=n,this._scaleY=a,this._settings=i,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,a){var i=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*(i?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 d="";if(i?this._fontScaleY!==this._fontScaleX&&(d+="scaleY("+(this._fontScaleY/this._fontScaleX).toFixed(3)+") "):(1!==this._fontScaleX&&(d+="scaleX("+this._fontScaleX+") "),1!==this._fontScaleY&&(d+="scaleY("+this._fontScaleY+") ")),null!==this._rotationY&&(d+="rotateY("+this._rotationY+"deg) "),null!==this._rotationX&&(d+="rotateX("+this._rotationX+"deg) "),0!==this._rotationZ&&(d+="rotateZ("+-1*this._rotationZ+"deg) "),
null!==this._skewX||null!==this._skewY){var c=e._valueOrDefault(this._skewX,0),f=e._valueOrDefault(this._skewY,0);d+="matrix(1, "+f+", "+c+", 1, 0, 0) "}""!==d&&(t.style.webkitTransform=d,t.style.webkitTransformOrigin="50% 50%",t.style.transform=d,t.style.transformOrigin="50% 50%",t.style.display="inline-block"),t.style.letterSpacing=(this._scaleX*this._letterSpacing).toFixed(3)+"px";var p=this._scaleX*this._outlineWidth,h=this._scaleY*this._outlineHeight,m=document.createElement("span");m.appendChild(t);
var v=this._primaryColor.withAlpha(this._primaryAlpha),g=this._outlineColor.withAlpha(this._outlineAlpha),y=this._shadowColor.withAlpha(this._shadowAlpha);if(this._settings.enableSvg||(0!==p||0!==h)&&g.alpha!==v.alpha||(0!==this._shadowDepthX||0!==this._shadowDepthY)&&y.alpha!==v.alpha||(v=this._primaryColor.withAlpha(1),g=this._outlineColor.withAlpha(1),y=this._shadowColor.withAlpha(1),t.style.opacity=this._primaryAlpha.toFixed(3)),t.style.color=v.toString(),this._settings.enableSvg?this._setSvgOutlineOnSpan(m,p,h,g,this._primaryAlpha):this._setTextShadowOutlineOnSpan(t,p,h,g),
0!==this._shadowDepthX||0!==this._shadowDepthY){var b=y.toString()+" "+(this._shadowDepthX*this._scaleX).toFixed(3)+"px "+(this._shadowDepthY*this._scaleY).toFixed(3)+"px 0px";""===t.style.textShadow?t.style.textShadow=b:t.style.textShadow+=", "+b}return 0===this._rotationX&&0===this._rotationY||(m.style.display="inline-block"),t.style.webkitAnimation=a.animationStyle,t.style.animation=a.animationStyle,m},e.prototype._setSvgOutlineOnSpan=function(e,t,n,a,i){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 a;for(a=0;a<=t;a+=l)e(a,n/t*Math.sqrt(t*t-a*a));a!==t+l&&e(t,0)}else e(0,n);else if(n>0){var i;for(i=0;i<=n;i+=l)e(t/n*Math.sqrt(n*n-i*i),i);i!==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 d=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");u.appendChild(d),d.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
d.slope.baseVal=0===i?1:1/i,d.intercept.baseVal=0;var c=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(c);for(var f=0;f<o;f++){var p=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");c.appendChild(p),p.in1.baseVal="outline"+f}var h=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.appendChild(h),h.setAttribute("color-interpolation-filters","sRGB");var m=document.createElementNS("http://www.w3.org/2000/svg","feFuncR");h.appendChild(m),
m.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,m.slope.baseVal=0,m.intercept.baseVal=a.red/255*a.alpha;var v=document.createElementNS("http://www.w3.org/2000/svg","feFuncG");h.appendChild(v),v.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,v.slope.baseVal=0,v.intercept.baseVal=a.green/255*a.alpha;var g=document.createElementNS("http://www.w3.org/2000/svg","feFuncB");h.appendChild(g),g.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
g.slope.baseVal=0,g.intercept.baseVal=a.blue/255*a.alpha;var y=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");if(h.appendChild(y),y.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,y.slope.baseVal=a.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 f=0;f<this._blur;f++){
var w=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(w),w.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),w.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}var P=document.createElementNS("http://www.w3.org/2000/svg","feComposite");s.appendChild(P),P.in2.baseVal="source",P.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT;var _=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(_);var S=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");
_.appendChild(S);var x=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");_.appendChild(x),x.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 f=0;f<this._blur;f++){var w=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(w),w.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),
w.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,a){var i=this;if(t>0||n>0){var r="";!function(e){for(var a=0;a<=t;a++)for(var i=0===t?n:n*Math.sqrt(1-a*a/(t*t)),r=0;r<=i;r++)e(a,r),0!==a&&e(-a,r),0!==r&&e(a,-r),0!==a&&0!==r&&e(-a,-r)}(function(e,t){r+=", "+a.toString()+" "+e+"px "+t+"px "+i._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=a},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 a=n(26),i=n(29),r=n(28),s=n(27),o=n(23),l=n(1),u=n(2),d=n(30),c=n(32),f=function(){function t(){if(this._properties=new r.ScriptProperties,this._styles=new d.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 i.Style(new d.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 a="";n.forEach(function(e,t){return a+=t+" = "+e+", "}),console.log("Read style: "+a)}var r=new i.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 i="";n.forEach(function(e,t){return i+=t+" = "+e+", "}),console.log("Read dialogue: "+i)}this.dialogues.push(new a.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,a){void 0===a&&(a=s.Format.ASS);var i;return i="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",a)}):c.Promise.reject(new Error("Not supported.")),i.catch(function(e){console.warn("fetch() failed, falling back to XHR: %o",e);var i=new XMLHttpRequest,r=t.fromStream(new l.XhrStream(i),a);return i.open("GET",n,!0),i.send(),r})},t.fromReadableStream=function(e,n,a){return void 0===n&&(n="utf-8"),void 0===a&&(a=s.Format.ASS),
t.fromStream(new l.BrowserReadableStream(e,n),a)},t}();t.ASS=f},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),a=t(3),i=t(8),r=t(23),s=t(30),o=function(){function e(t,a){this._parts=null,this._containsTransformTag=!1;var i=new s.Map;t.forEach(function(e,t){i.set(t.toLowerCase(),e)}),t=i,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=a.styles.get(o),
void 0===this._style&&(r.debugMode&&console.warn("Unrecognized style "+o+'. Falling back to "Default"'),this._style=a.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=a.parse(this._rawPartsString,"dialogueParts"),this._alignment=this._style.alignment,this._parts.forEach(function(t,n){t instanceof i.Alignment?e._alignment=t.value:t instanceof i.Move?null!==t.t1&&null!==t.t2||(e._parts[n]=new i.Move(t.x1,t.y1,t.x2,t.y2,0,e._end-e._start)):t instanceof i.Transform&&(null!==t.start&&null!==t.end&&null!==t.accel||(e._parts[n]=new i.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 i.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,a,i){var r=e.get(t);if(void 0===r)return n(i);
try{var s=n(r);if(null!==a&&!a(s))throw new Error("Validation failed.");return s}catch(o){throw new Error("Property "+t+" has invalid value "+r+" - "+o.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),a=t(3),i=t(30),r=function(){function e(e){var t=new i.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 a.parse(e,"colorWithAlpha")},null,"&H00FFFFFF"),this._secondaryColor=n.valueOrDefault(e,"secondarycolour",function(e){return a.parse(e,"colorWithAlpha")},null,"&H00FFFF00"),this._outlineColor=n.valueOrDefault(e,"outlinecolour",function(e){return a.parse(e,"colorWithAlpha")},null,"&H00000000"),this._shadowColor=n.valueOrDefault(e,"backcolour",function(e){return a.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){null!==e?t.Map=e:t.Map=a}t.Map=e.Map;var a=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,a=Object.keys(this._keys);n<a.length;n++){var i=a[n];e.call(t,this._values[i],this._keys[i],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=a),t.setImplementation=n},function(e){function t(e,t){for(var n=0;n<t.length;n++)for(var a=t[n],i=0,r=Object.getOwnPropertyNames(a.prototype);i<r.length;i++){var s=r[i];e.prototype[s]=a.prototype[s]}}e.mixin=t},function(t){function n(e){null!==e?t.Promise=e:t.Promise=l}function a(e){return i(e,[])}function i(e,n){if(0===e.length)return t.Promise.reject(n);var a=e[0],r=e.slice(1);return a.catch(function(e){return i(r,n.concat(e));
})}function r(e){return new t.Promise(function(n,a){return t.Promise.all(e.map(function(e){return e.then(n,function(e){return e})})).then(a)})}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=[],a=!1,i=document.createElement("div"),r=new t(function(){for(var e=n.splice(0,n.length),t=0;t<e.length;t++){
var r=e[t];r()}a=!1,n.length>0&&(i.classList.toggle("foo"),a=!0)});return r.observe(i,{attributes:!0}),function(e){n.push(e),a||(i.classList.toggle("foo"),a=!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,a=t.reject;try{
e(n,a)}catch(i){a(i)}}return e.prototype.then=function(e,t){var n=new d;"function"!=typeof e&&(e=function(e){return e}),"function"!=typeof t&&(t=function(e){throw e});var a={capabilities:n,handler:e},i={capabilities:n,handler:t};switch(this._state){case u.PENDING:this._fulfillReactions.push(a),this._rejectReactions.push(i);break;case u.FULFILLED:this._enqueueFulfilledReactionJob(a,this._fulfilledValue);break;case u.REJECTED:this._enqueueRejectedReactionJob(i,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,a){var i=[],r=e.length;return 0===r?void n(i):void e.forEach(function(e,s){return t.Promise.resolve(e).then(function(e){i[s]=e,r--,0===r&&n(i)},a)})})},e.race=function(e){return new t.Promise(function(n,a){for(var i=0;i<e.length;i++){var r=e[i];
t.Promise.resolve(r).then(n,a)}})},e.prototype._createResolvingFunctions=function(){var e=this,t=!1,n=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 a=n.then}catch(i){return void e._reject(i)}return"function"!=typeof a?void e._fulfill(n):void o(function(){return e._resolveWithThenable(n,a)})}},a=function(n){t||(t=!0,e._reject(n))};return{resolve:n,reject:a}},e.prototype._resolveWithThenable=function(e,t){
var n=this._createResolvingFunctions(),a=n.resolve,i=n.reject;try{t.call(e,a,i)}catch(r){i(r)}},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 a=t[n];this._enqueueFulfilledReactionJob(a,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 a=t[n];this._enqueueRejectedReactionJob(a,e)}},e.prototype._enqueueFulfilledReactionJob=function(e,t){o(function(){var n,a=e.capabilities,i=a.resolve,r=a.reject,s=e.handler;try{n=s(t)}catch(o){return void r(o)}i(n)})},e.prototype._enqueueRejectedReactionJob=function(e,t){o(function(){var n,a=e.capabilities,i=a.resolve,r=a.reject,s=e.handler;try{n=s(t)}catch(o){return void r(o)}i(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 d=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=d,t.first=a,t.any=r,t.lastly=s},function(t){function n(e){null!==e?t.Set=e:t.Set=a}t.Set=e.Set;
var a=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,a=Object.keys(this._elements);n<a.length;n++){var i=a[n],r=this._elements[i];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=a),t.setImplementation=n},function(e){function t(e,t){function n(){this.constructor=e}for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);n.prototype=t.prototype,e.prototype=new n}function n(e,t,n){return arguments.length<3?a(e.reverse(),t):void i(e.reverse(),t,n)}function a(e,t){for(var n=0;n<e.length;n++){var a=e[n];t=a(t)||t}return t}function i(e,t,n){for(var a=0;a<e.length;a++){var i=e[a];i(t,n)}}e.__extends=t,e.__decorate=n},function(e,t){
var n=t(30),a=t(32),i=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 i=new a.DeferredPromise,s=++e._lastRequestId;this._pendingRequests.set(s,i);var o={requestId:s,command:t,parameters:n};return this._comm.postMessage(r.serialize(o)),i.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,a=e.result;n instanceof Error&&(n={message:n.message,stack:n.stack}),this._comm.postMessage(r.serialize({command:i.WorkerCommands.Response,requestId:t,error:n,result:a}))},e.prototype._onMessage=function(e){var t=this,n=r.deserialize(e);if(n.command===i.WorkerCommands.Response){var a=n,s=this._pendingRequests.get(a.requestId);void 0!==s&&(this._pendingRequests.delete(a.requestId),null===a.error?s.resolve(a.result):s.reject(a.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(i.WorkerCommands.Ping,function(){return new a.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 a(e){return void 0===e&&(e=s.src),new i.WorkerChannelImpl(new Worker(e))}var i=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=a,"undefined"!=typeof WorkerGlobalScope&&e instanceof WorkerGlobalScope&&new i.WorkerChannelImpl(e);
},function(e,t){function n(e,t){l.set(e,t)}function a(e){return l.get(e)}function i(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)),a=0,i=Object.keys(t);a<i.length;a++){var r=i[a];"_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=a,e.registerClassPrototype=i,e.serialize=r,e.deserialize=s}])})},function(e,t,n){var a=n(2030),i=Object.getPrototypeOf,r=a(i,Object);e.exports=r},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){var a;!function(i,r,s){function o(e,t,n){
return e.addEventListener?void e.addEventListener(t,n,!1):void 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 P[e.which]?P[e.which]:_[e.which]?_[e.which]:String.fromCharCode(e.which).toLowerCase()}function u(e,t){return e.sort().join(",")===t.sort().join(",")}function d(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 c(e){
return e.preventDefault?void e.preventDefault():void(e.returnValue=!1)}function f(e){return e.stopPropagation?void e.stopPropagation():void(e.cancelBubble=!0)}function p(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function h(){if(!w){w={};for(var e in P)e>95&&e<112||P.hasOwnProperty(e)&&(w[P[e]]=e)}return w}function m(e,t,n){return n||(n=h()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function v(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function g(e,t){
var n,a,i,r=[];for(n=v(e),i=0;i<n.length;++i)a=n[i],x[a]&&(a=x[a]),t&&"keypress"!=t&&S[a]&&(a=S[a],r.push("shift")),p(a)&&r.push(a);return t=m(a,r,t),{key:a,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 w)e[t]?n=!0:w[t]=0;n||(S=!1)}function n(e,t,n,a,i,r){var s,o,l=[],d=n.type;if(!v._callbacks[e])return[];for("keyup"==d&&p(e)&&(t=[e]),s=0;s<v._callbacks[e].length;++s)if(o=v._callbacks[e][s],(a||!o.seq||w[o.seq]==o.level)&&d==o.action&&("keypress"==d&&!n.metaKey&&!n.ctrlKey||u(t,o.modifiers))){
var c=!a&&o.combo==i,f=a&&o.seq==a&&o.level==r;(c||f)&&v._callbacks[e].splice(s,1),l.push(o)}return l}function a(e,t,n,a){v.stopCallback(t,t.target||t.srcElement,n,a)||e(t,n)===!1&&(c(t),f(t))}function i(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=l(e);if(t)return"keyup"==e.type&&P===t?void(P=!1):void v.handleKey(t,d(e),e)}function s(){clearTimeout(y),y=setTimeout(t,1e3)}function h(e,n,i,r){function o(t){return function(){S=t,++w[e],s()}}function u(n){a(i,n,e),"keyup"!==r&&(P=l(n)),setTimeout(t,10);
}w[e]=0;for(var d=0;d<n.length;++d){var c=d+1===n.length,f=c?u:o(r||g(n[d+1]).action);m(n[d],f,r,e,d)}}function m(e,t,a,i,r){v._directMap[e+":"+a]=t,e=e.replace(/\s+/g," ");var s,o=e.split(" ");return o.length>1?void h(e,o,t,a):(s=g(e,a),v._callbacks[s.key]=v._callbacks[s.key]||[],n(s.key,s.modifiers,{type:s.action},i,e,r),void v._callbacks[s.key][i?"unshift":"push"]({callback:t,modifiers:s.modifiers,action:s.action,seq:i,level:r,combo:e}))}var v=this;if(e=e||r,!(v instanceof b))return new b(e);v.target=e,
v._callbacks={},v._directMap={};var y,w={},P=!1,_=!1,S=!1;v._handleKey=function(e,i,r){var s,o=n(e,i,r),l={},u=0,d=!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;d=!0,l[o[s].seq]=1,a(o[s].callback,r,o[s].combo,o[s].seq)}else d||a(o[s].callback,r,o[s].combo);var c="keypress"==r.type&&_;r.type!=S||p(e)||c||t(l),_=d&&"keydown"==r.type},v._bindMultiple=function(e,t,n){for(var a=0;a<e.length;++a)m(e[a],t,n)},o(e,"keypress",i),
o(e,"keydown",i),o(e,"keyup",i)}for(var w,P={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"},_={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},S={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-",
"+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},x={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},C=1;C<20;++C)P[111+C]="f"+C;for(C=0;C<=9;++C)P[C+96]=C;b.prototype.bind=function(e,t,n){var a=this;return e=e instanceof Array?e:[e],a._bindMultiple.call(a,e,t,n),a},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(),i.Mousetrap=b,"undefined"!=typeof e&&e.exports&&(e.exports=b),a=function(){return b}.call(t,n,t,e),!(a!==s&&(e.exports=a))}(window,document)},,,,function(e,t){"use strict";function n(e){this.name="RavenConfigError",this.message=e}n.prototype=new Error,n.prototype.constructor=n,e.exports=n},function(e,t,n){(function(t){"use strict";function a(){return+new Date}function i(){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:100},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalConsole=window.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=a();for(var e in this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e];
}var r=n(2038),s=n(2036),o=n(630),l=o.isFunction,u=o.isUndefined,d=o.isError,c=o.isEmptyObject,f=o.hasKey,p=o.joinRegExp,h=o.each,m=o.objectMerge,v=o.truncate,g=o.urlencode,y=o.uuid4,b="source protocol user pass host port path".split(" "),w=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;i.prototype={VERSION:"2.0.5",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;
var a=this._parseDSN(e),i=a.path.lastIndexOf("/"),s=a.path.substr(1,i);return t&&h(t,function(e,t){"tags"==e||"extra"==e?n._globalContext[e]=t:n._globalOptions[e]=t}),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=a.user,this._globalProject=a.path.substr(i+1),this._globalServer="//"+a.host+(a.port?":"+a.port:"")+"/"+s+"api/"+this._globalProject+"/store/",a.protocol&&(this._globalServer=a.protocol+":"+this._globalServer),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._ignoreOnError||e._handleStackInfo.apply(e,arguments)}),this._wrapBuiltIns(),this._drainPlugins(),this._isRavenInstalled=!0),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=[],i=arguments.length,r=!e||e&&e.deep!==!1;i--;)n[i]=r?a.wrap(e,arguments[i]):arguments[i];try{return t.apply(this,n)}catch(s){
throw a._ignoreNextOnError(),a.captureException(s,e),s}}var a=this;if(u(t)&&!l(e))return e;if(l(e)&&(t=e,e=void 0),!l(t))return t;if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__;for(var i in t)f(t,i)&&(n[i]=t[i]);return t.__raven_wrapper__=n,n.prototype=t.prototype,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return r.report.uninstall(),this._isRavenInstalled=!1,this},captureException:function(e,t){if(!d(e))return this.captureMessage(e,t);this._lastCapturedException=e;
try{var n=r.computeStackTrace(e);this._handleStackInfo(n,t)}catch(a){if(e!==a)throw a}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e))return this._send(m({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._logDebug("error","Error: Raven has not been configured."),this.ravenNotConfiguredError=!0,!1))},afterLoad:function(){var e=window.RavenConfig;e&&this.config(e.dsn,e.config).install()},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,
setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var n,a;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(a in t)f(t,a)&&(n[a]=t[a]);if(document.createEvent)document.dispatchEvent(n);else try{document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(i){}}},_wrapBuiltIns:function(){function e(e,t,n){var a=e[t];e[t]=n(a);
}function n(e){return function(t,n){var i=[].slice.call(arguments),r=i[0];return"function"==typeof r&&(i[0]=a.wrap(r)),e.apply?e.apply(this,i):e(i[0],i[1])}}var a=this;e(window,"setTimeout",n),e(window,"setInterval",n),window.requestAnimationFrame&&e(window,"requestAnimationFrame",function(e){return function(t){return e(a.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,i,r){try{n&&n.handleEvent&&(n.handleEvent=a.wrap(n.handleEvent))}catch(s){}return e.call(this,t,a.wrap(n),i,r)}}),e(n,"removeEventListener",function(e){return function(t,n,a,i){return n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n),e.call(this,t,n,a,i)}}))});var i;"XMLHttpRequest"in window&&(i=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(t){
var n=this;"onreadystatechange onload onerror onprogress".replace(/\w+/g,function(t){t in n&&"[object Function]"===Object.prototype.toString.call(n[t])&&e(n,t,function(e){return a.wrap(e)})}),i.apply(this,arguments)});var r,s=t||window.$;s&&s.fn&&s.fn.ready&&(r=s.fn.ready,s.fn.ready=function(e){return r.call(this,a.wrap(e))})},_drainPlugins:function(){var e=this;h(this._plugins,function(t,n){var a=n[0],i=n[1];a.apply(e,[e].concat(i))})},_parseDSN:function(e){var t=w.exec(e),n={},a=7;try{for(;a--;)n[b[a]]=t[a]||"";
}catch(i){throw new s("Invalid DSN: "+e)}if(n.pass)throw new s("Do not specify your private key in the DSN!");return n},_handleStackInfo:function(e,t){var n=this,a=[];e.stack&&e.stack.length&&h(e.stack,function(e,t){var i=n._normalizeFrame(t);i&&a.push(i)}),this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,a,t)},_normalizeFrame:function(e){if(e.url){var t,n={filename:e.url,lineno:e.line,colno:e.column,"function":e.func||"?"},a=this._extractContextFromFrame(e);
if(a){var i=["pre_context","context_line","post_context"];for(t=3;t--;)n[i[t]]=a[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),a=t.length,i=!1;a--;)if(t[a].length>300){i=!0;break}if(i){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,a,i,r){var s,o;if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t))&&(t+="",t=v(t,this._globalOptions.maxMessageLength),o=e+": "+t,o=v(o,this._globalOptions.maxMessageLength),i&&i.length?(n=i[0].filename||n,i.reverse(),s={frames:i}):n&&(s={frames:[{filename:n,lineno:a,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){
var l=m({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=v(e.message,t),e.exception){var n=e.exception.values[0];n.value=v(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,i={project:this._globalProject,logger:n.logger,platform:"javascript"},r=this._getHttpData();r&&(i.request=r),e=m(i,e),e.tags=m(m({},this._globalContext.tags),e.tags),e.extra=m(m({},this._globalContext.extra),e.extra),e.extra["session:duration"]=a()-this._startTime,c(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),n.release&&(e.release=n.release),
l(n.dataCallback)&&(e=n.dataCallback(e)||e),e&&!c(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()&&(n.transport||this._makeRequest).call(this,{url:this._globalServer,auth:{sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey},data:e,options:n,onSuccess:function(){t._triggerEvent("success",{data:e,src:t._globalServer})},onError:function(){
t._triggerEvent("failure",{data:e,src:t._globalServer})}})))},_makeImageRequest:function(e){e.auth.sentry_data=JSON.stringify(e.data);var t=this._newImage(),n=e.url+"?"+g(e.auth),a=e.options.crossOrigin;(a||""===a)&&(t.crossOrigin=a),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,a=e.url;n=new XMLHttpRequest,"withCredentials"in n?n.onreadystatechange=function(){4===n.readyState&&t();
}:(n=new XDomainRequest,a=a.replace(/^https?:/,""),n.onload=t),n.open("POST",a+"?"+g(e.auth)),n.send(JSON.stringify(e.data))},_makeRequest:function(e){var t="withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest;return(t?this._makeXhrRequest:this._makeImageRequest)(e)},_newImage:function(){return document.createElement("img")},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&this._originalConsoleMethods[e].apply(this._originalConsole,[].slice.call(arguments,1));
},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=m(this._globalContext[e]||{},t)}},i.prototype.setUser=i.prototype.setUserContext,i.prototype.setReleaseContext=i.prototype.setRelease,e.exports=i}).call(t,n(5))},function(e,t,n){"use strict";function a(){return"undefined"==typeof document?"":document.location.href}var i=n(630),r=i.hasKey,s=i.isString,o=i.isUndefined,l={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7,debug:!1},u=[].slice,d="?";l.report=function(){
function e(e){o(),m.push(e)}function t(e){for(var t=m.length-1;t>=0;--t)m[t]===e&&m.splice(t,1)}function n(){d(),m=[]}function i(e,t){var n=null;if(!t||l.collectWindowErrors){for(var a in m)if(r(m,a))try{m[a].apply(null,[e].concat(u.call(arguments,2)))}catch(i){n=i}if(n)throw n}}function s(e,t,n,r,s){var o=null;if(y)l.computeStackTrace.augmentStackTraceWithInitialElement(y,t,n,e),c();else if(s)o=l.computeStackTrace(s),i(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:a(),stack:[u]},i(o,!0)}return!!p&&p.apply(this,arguments)}function o(){h||(p=window.onerror,window.onerror=s,h=!0)}function d(){h&&(window.onerror=p,h=!1,p=void 0)}function c(){var e=y,t=v;v=null,y=null,g=null,i.apply(null,[e,!1].concat(t))}function f(e,t){var n=u.call(arguments,1);if(y){if(g===e)return;c()}var a=l.computeStackTrace(e);if(y=a,g=e,v=n,window.setTimeout(function(){g===e&&c()},a.incomplete?2e3:0),t!==!1)throw e;
}var p,h,m=[],v=null,g=null,y=null;return f.subscribe=e,f.unsubscribe=t,f.uninstall=n,f}(),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")}},n=t();return n.open("GET",e,!1),n.send(""),n.responseText}catch(a){return""}}function t(t){if(!s(t))return[];if(!r(P,t)){var n="",a="";try{a=document.domain}catch(i){}t.indexOf(a)!==-1&&(n=e(t)),P[t]=n?n.split("\n"):[];
}return P[t]}function n(e,n){var a,i=/function ([^(]*)\(([^)]*)\)/,r=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,s="",l=10,u=t(e);if(!u.length)return d;for(var c=0;c<l;++c)if(s=u[n-c]+s,!o(s)){if(a=r.exec(s))return a[1];if(a=i.exec(s))return a[1]}return d}function i(e,n){var a=t(e);if(!a.length)return null;var i=[],r=Math.floor(l.linesOfContext/2),s=r+l.linesOfContext%2,u=Math.max(0,n-r-1),d=Math.min(a.length,n+s-1);n-=1;for(var c=u;c<d;++c)o(a[c])||i.push(a[c]);return i.length>0?i:null;
}function u(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function c(e){return u(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function f(e,n){for(var a,i,r=0,s=n.length;r<s;++r)if((a=t(n[r])).length&&(a=a.join("\n"),i=e.exec(a)))return{url:n[r],line:a.substring(0,i.index).split("\n").length,column:i.index-a.lastIndexOf("\n",i.index)-1};return null}function p(e,n,a){var i,r=t(n),s=new RegExp("\\b"+u(e)+"\\b");
return a-=1,r&&r.length>a&&(i=s.exec(r[a]))?i.index:null}function h(e){if("undefined"!=typeof document){for(var t,n,a,i,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*$/,d=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,p=0;p<s.length;++p){var h=s[p];h.src&&r.push(h.src)}if(a=l.exec(o)){var m=a[1]?"\\s+"+a[1]:"",v=a[2].split(",").join("\\s*,\\s*");t=u(a[3]).replace(/;$/,";?"),n=new RegExp("function"+m+"\\s*\\(\\s*"+v+"\\s*\\)\\s*{\\s*"+t+"\\s*}");
}else n=new RegExp(u(o).replace(/\s+/g,"\\s+"));if(i=f(n,r))return i;if(a=d.exec(o)){var g=a[1];if(t=c(a[2]),n=new RegExp("on"+g+"=[\\'\"]\\s*"+t+"\\s*[\\'\"]","i"),i=f(n,r[0]))return i;if(n=new RegExp(t),i=f(n,r))return i}return null}}function m(e){if(!o(e.stack)&&e.stack){for(var t,r,s=/^\s*at (.*?) ?\(?((?:(?:file|https?|chrome-extension):.*?)|<anonymous>):(\d+)(?::(\d+))?\)?\s*$/i,l=/^\s*(.*?)(?:\((.*?)\))?@((?:file|https?|chrome).*?):(\d+)(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=e.stack.split("\n"),f=[],h=/^(.*) is undefined$/.exec(e.message),m=0,v=c.length;m<v;++m){
if(t=l.exec(c[m]))r={url:t[3],func:t[1]||d,args:t[2]?t[2].split(","):"",line:+t[4],column:t[5]?+t[5]:null};else if(t=s.exec(c[m]))r={url:t[2],func:t[1]||d,line:+t[3],column:t[4]?+t[4]:null};else{if(!(t=u.exec(c[m])))continue;r={url:t[2],func:t[1]||d,line:+t[3],column:t[4]?+t[4]:null}}!r.func&&r.line&&(r.func=n(r.url,r.line)),r.line&&(r.context=i(r.url,r.line)),f.push(r)}return f.length?(f[0].line&&!f[0].column&&h?f[0].column=p(h[1],f[0].url,f[0].line):f[0].column||o(e.columnNumber)||(f[0].column=e.columnNumber+1),
{name:e.name,message:e.message,url:a(),stack:f}):null}}function v(e){var t=e.stacktrace;if(!o(e.stacktrace)&&e.stacktrace){for(var r,s=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,l=t.split("\n"),u=[],d=0,c=l.length;d<c;d+=2)if(r=s.exec(l[d])){var f={line:+r[1],column:+r[2],func:r[3]||r[4],args:r[5]?r[5].split(","):[],url:r[6]};if(!f.func&&f.line&&(f.func=n(f.url,f.line)),f.line)try{f.context=i(f.url,f.line)}catch(p){}f.context||(f.context=[l[d+1]]),
u.push(f)}return u.length?{name:e.name,message:e.message,url:a(),stack:u}:null}}function g(e){var s=e.message.split("\n");if(s.length<4)return null;var o,l,u,d,p=/^\s*Line (\d+) of linked script ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,h=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,m=/^\s*Line (\d+) of function script\s*$/i,v=[],g=document.getElementsByTagName("script"),y=[];for(l in g)r(g,l)&&!g[l].src&&y.push(g[l]);for(l=2,u=s.length;l<u;l+=2){
var b=null;if(o=p.exec(s[l]))b={url:o[2],func:o[3],line:+o[1]};else if(o=h.exec(s[l])){b={url:o[3],func:o[4]};var w=+o[1],P=y[o[2]-1];if(P&&(d=t(b.url))){d=d.join("\n");var _=d.indexOf(P.innerText);_>=0&&(b.line=w+d.substring(0,_).split("\n").length)}}else if(o=m.exec(s[l])){var S=window.location.href.replace(/#.*$/,""),x=o[1],C=new RegExp(c(s[l+1]));d=f(C,[S]),b={url:S,line:d?d.line:x,func:""}}if(b){b.func||(b.func=n(b.url,b.line));var T=i(b.url,b.line),k=T?T[Math.floor(T.length/2)]:null;T&&k.replace(/^\s*/,"")===s[l+1].replace(/^\s*/,"")?b.context=T:b.context=[s[l+1]],
v.push(b)}}return v.length?{name:e.name,message:s[0],url:a(),stack:v}:null}function y(e,t,a,r){var s={url:t,line:a};if(s.url&&s.line){e.incomplete=!1,s.func||(s.func=n(s.url,s.line)),s.context||(s.context=i(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 i,r,s,o=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],c={},f=!1,m=b.caller;m&&!f;m=m.caller)if(m!==w&&m!==l.report){if(r={url:null,func:d,line:null,column:null},m.name?r.func=m.name:(i=o.exec(m.toString()))&&(r.func=i[1]),"undefined"==typeof r.func)try{r.func=i.input.substring(0,i.input.indexOf("{"))}catch(v){}if(s=h(m)){r.url=s.url,r.line=s.line,r.func===d&&(r.func=n(r.url,r.line));var g=/ '([^']+)' /.exec(e.message||e.description);
g&&(r.column=p(g[1],s.url,s.line))}c[""+m]?f=!0:c[""+m]=!0,u.push(r)}t&&u.splice(0,t);var P={name:e.name,message:e.message,url:a(),stack:u};return y(P,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),P}function w(e,t){var n=null;t=null==t?0:+t;try{if(n=v(e))return n}catch(i){if(l.debug)throw i}try{if(n=m(e))return n}catch(i){if(l.debug)throw i}try{if(n=g(e))return n}catch(i){if(l.debug)throw i}try{if(n=b(e,t+1))return n}catch(i){if(l.debug)throw i}return{name:e.name,message:e.message,
url:a()}}var P={};return w.augmentStackTraceWithInitialElement=y,w.computeStackTraceFromStackProp=m,w.guessFunctionName=n,w.gatherContext=i,w}(),e.exports=l},function(e,t,n){e.exports=n(2052)},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function i(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,t.default=void 0;var o=n(7),l=n(631),u=a(l),d=function(e){function t(n,a){i(this,t);var s=r(this,e.call(this,n,a));return s.store=n.store,s}return s(t,e),t.prototype.getChildContext=function(){
return{store:this.store}},t.prototype.render=function(){var e=this.props.children;return o.Children.only(e)},t}(o.Component);t.default=d,d.propTypes={store:u.default.isRequired,children:o.PropTypes.element.isRequired},d.childContextTypes={store:u.default.isRequired}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function i(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){return e.displayName||e.name||"Component"}function l(e,t){return(0,S.default)((0,b.default)(e),"`%sToProps` must return an object. Instead received %s.",t?"mapDispatch":"mapState",e),
e}function u(e,t,n){function a(e,t,n){var a=y(e,t,n);return(0,S.default)((0,b.default)(a),"`mergeProps` must return an object. Instead received %s.",a),a}var u=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],f=Boolean(e),h=e||x,v=(0,b.default)(t)?(0,g.default)(t):t||C,y=n||T,w=u.pure,_=void 0===w||w,I=u.withRef,M=void 0!==I&&I,A=_&&y!==T,E=k++;return function(e){var t=function(t){function n(e,a){i(this,n);var s=r(this,t.call(this,e,a));s.version=E,s.store=e.store||a.store,(0,S.default)(s.store,'Could not find "store" in either the context or '+('props of "'+s.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+s.constructor.displayName+'".'));
var o=s.store.getState();return s.state={storeState:o},s.clearCache(),s}return s(n,t),n.prototype.shouldComponentUpdate=function(){return!_||this.haveOwnPropsChanged||this.hasStoreStateChanged},n.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),a=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return l(a)},n.prototype.configureFinalMapState=function(e,t){var n=h(e.getState(),t),a="function"==typeof n;
return this.finalMapStateToProps=a?n:h,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,a?this.computeStateProps(e,t):l(n)},n.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,a=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return l(a,!0)},n.prototype.configureFinalMapDispatch=function(e,t){var n=v(e.dispatch,t),a="function"==typeof n;
return this.finalMapDispatchToProps=a?n:v,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,a?this.computeDispatchProps(e,t):l(n,!0)},n.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,m.default)(e,this.stateProps))&&(this.stateProps=e,!0)},n.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,m.default)(e,this.dispatchProps))&&(this.dispatchProps=e,
!0)},n.prototype.updateMergedPropsIfNeeded=function(){var e=a(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&A&&(0,m.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){f&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),
this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillReceiveProps=function(e){_&&(0,m.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},n.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,
this.finalMapStateToProps=null},n.prototype.handleChange=function(){if(this.unsubscribe){var e=this.state.storeState,t=this.store.getState();_&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},n.prototype.getWrappedInstance=function(){return(0,S.default)(M,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},n.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,a=this.renderedElement;
this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var i=!0,r=!0;_&&a&&(i=n||t&&this.doStatePropsDependOnOwnProps,r=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,o=!1;i&&(s=this.updateStatePropsIfNeeded()),r&&(o=this.updateDispatchPropsIfNeeded());var l=!0;return l=!!(s||o||t)&&this.updateMergedPropsIfNeeded(),!l&&a?a:(M?this.renderedElement=(0,c.createElement)(e,d({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,c.createElement)(e,this.mergedProps),this.renderedElement);
},n}(c.Component);return t.displayName="Connect("+o(e)+")",t.WrappedComponent=e,t.contextTypes={store:p.default},t.propTypes={store:p.default},(0,P.default)(t,e)}}var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.__esModule=!0,t.default=u;var c=n(7),f=n(631),p=a(f),h=n(2042),m=a(h),v=n(2043),g=a(v),y=n(389),b=a(y),w=n(2021),P=a(w),_=n(2025),S=a(_),x=function(e){return{}},C=function(e){
return{dispatch:e}},T=function(e,t,n){return d({},n,e,t)},k=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var i=Object.prototype.hasOwnProperty,r=0;r<n.length;r++)if(!i.call(t,n[r])||e[n[r]]!==t[n[r]])return!1;return!0}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function a(e){return function(t){return(0,i.bindActionCreators)(e,t)}}t.__esModule=!0,t.default=a;var i=n(2110)},function(e,t,n){"use strict";
var a=n(59),i=n(622),r={focusDOMComponent:function(){i(a.getNodeFromInstance(this))}};e.exports=r},function(e,t,n){"use strict";function a(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function i(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function r(e){switch(e){case I.topCompositionStart:return M.compositionStart;case I.topCompositionEnd:return M.compositionEnd;case I.topCompositionUpdate:return M.compositionUpdate;
}}function s(e,t){return e===I.topKeyDown&&t.keyCode===P}function o(e,t){switch(e){case I.topKeyUp:return w.indexOf(t.keyCode)!==-1;case I.topKeyDown:return t.keyCode!==P;case I.topKeyPress:case I.topMouseDown:case I.topBlur:return!0;default:return!1}}function l(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function u(e,t,n,a){var i,u;if(_?i=r(e):E?o(e,n)&&(i=M.compositionEnd):s(e,n)&&(i=M.compositionStart),!i)return null;C&&(E||i!==M.compositionStart?i===M.compositionEnd&&E&&(u=E.getData()):E=v.getPooled(a));
var d=g.getPooled(i,t,n,a);if(u)d.data=u;else{var c=l(n);null!==c&&(d.data=c)}return h.accumulateTwoPhaseDispatches(d),d}function d(e,t){switch(e){case I.topCompositionEnd:return l(t);case I.topKeyPress:var n=t.which;return n!==T?null:(A=!0,k);case I.topTextInput:var a=t.data;return a===k&&A?null:a;default:return null}}function c(e,t){if(E){if(e===I.topCompositionEnd||o(e,t)){var n=E.getData();return v.release(E),E=null,n}return null}switch(e){case I.topPaste:return null;case I.topKeyPress:return t.which&&!i(t)?String.fromCharCode(t.which):null;
case I.topCompositionEnd:return C?null:t.data;default:return null}}function f(e,t,n,a){var i;if(i=x?d(e,n):c(e,n),!i)return null;var r=y.getPooled(M.beforeInput,t,n,a);return r.data=i,h.accumulateTwoPhaseDispatches(r),r}var p=n(103),h=n(211),m=n(64),v=n(2050),g=n(2092),y=n(2095),b=n(125),w=[9,13,27,32],P=229,_=m.canUseDOM&&"CompositionEvent"in window,S=null;m.canUseDOM&&"documentMode"in document&&(S=document.documentMode);var x=m.canUseDOM&&"TextEvent"in window&&!S&&!a(),C=m.canUseDOM&&(!_||S&&S>8&&S<=11),T=32,k=String.fromCharCode(T),I=p.topLevelTypes,M={
beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[I.topCompositionEnd,I.topKeyPress,I.topTextInput,I.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[I.topBlur,I.topCompositionEnd,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null
})},dependencies:[I.topBlur,I.topCompositionStart,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[I.topBlur,I.topCompositionUpdate,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]}},A=!1,E=null,O={eventTypes:M,extractEvents:function(e,t,n,a){return[u(e,t,n,a),f(e,t,n,a)]}};e.exports=O},function(e,t,n){"use strict";function a(e){var t=e.nodeName&&e.nodeName.toLowerCase();
return"select"===t||"input"===t&&"file"===e.type}function i(e){var t=x.getPooled(A.change,O,e,C(e));w.accumulateTwoPhaseDispatches(t),S.batchedUpdates(r,t)}function r(e){b.enqueueEvents(e),b.processEventQueue(!1)}function s(e,t){E=e,O=t,E.attachEvent("onchange",i)}function o(){E&&(E.detachEvent("onchange",i),E=null,O=null)}function l(e,t){if(e===M.topChange)return t}function u(e,t,n){e===M.topFocus?(o(),s(t,n)):e===M.topBlur&&o()}function d(e,t){E=e,O=t,D=e.value,R=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),
Object.defineProperty(E,"value",j),E.attachEvent?E.attachEvent("onpropertychange",f):E.addEventListener("propertychange",f,!1)}function c(){E&&(delete E.value,E.detachEvent?E.detachEvent("onpropertychange",f):E.removeEventListener("propertychange",f,!1),E=null,O=null,D=null,R=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==D&&(D=t,i(e))}}function p(e,t){if(e===M.topInput)return t}function h(e,t,n){e===M.topFocus?(c(),d(t,n)):e===M.topBlur&&c()}function m(e,t){if((e===M.topSelectionChange||e===M.topKeyUp||e===M.topKeyDown)&&E&&E.value!==D)return D=E.value,
O}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t){if(e===M.topClick)return t}var y=n(103),b=n(210),w=n(211),P=n(64),_=n(59),S=n(91),x=n(104),C=n(402),T=n(404),k=n(663),I=n(125),M=y.topLevelTypes,A={change:{phasedRegistrationNames:{bubbled:I({onChange:null}),captured:I({onChangeCapture:null})},dependencies:[M.topBlur,M.topChange,M.topClick,M.topFocus,M.topInput,M.topKeyDown,M.topKeyUp,M.topSelectionChange]}},E=null,O=null,D=null,R=null,L=!1;
P.canUseDOM&&(L=T("change")&&(!("documentMode"in document)||document.documentMode>8));var N=!1;P.canUseDOM&&(N=T("input")&&(!("documentMode"in document)||document.documentMode>11));var j={get:function(){return R.get.call(this)},set:function(e){D=""+e,R.set.call(this,e)}},U={eventTypes:A,extractEvents:function(e,t,n,i){var r,s,o=t?_.getNodeFromInstance(t):window;if(a(o)?L?r=l:s=u:k(o)?N?r=p:(r=m,s=h):v(o)&&(r=g),r){var d=r(e,t);if(d){var c=x.getPooled(A.change,d,n,i);return c.type="change",w.accumulateTwoPhaseDispatches(c),
c}}s&&s(e,o,t)}};e.exports=U},function(e,t,n){"use strict";function a(e){return e.substring(1,e.indexOf(" "))}var i=n(170),r=n(64),s=n(1721),o=n(82),l=n(624),u=n(33),d=/^(<[^ \/>]+)/,c="data-danger-index",f={dangerouslyRenderMarkup:function(e){r.canUseDOM?void 0:u(!1);for(var t,n={},i=0;i<e.length;i++)e[i]?void 0:u(!1),t=a(e[i]),t=l(t)?t:"*",n[t]=n[t]||[],n[t][i]=e[i];var f=[],p=0;for(t in n)if(n.hasOwnProperty(t)){var h,m=n[t];for(h in m)if(m.hasOwnProperty(h)){var v=m[h];m[h]=v.replace(d,"$1 "+c+'="'+h+'" ');
}for(var g=s(m.join(""),o),y=0;y<g.length;++y){var b=g[y];b.hasAttribute&&b.hasAttribute(c)&&(h=+b.getAttribute(c),b.removeAttribute(c),f.hasOwnProperty(h)?u(!1):void 0,f[h]=b,p+=1)}}return p!==f.length?u(!1):void 0,f.length!==e.length?u(!1):void 0,f},dangerouslyReplaceNodeWithMarkup:function(e,t){if(r.canUseDOM?void 0:u(!1),t?void 0:u(!1),"HTML"===e.nodeName?u(!1):void 0,"string"==typeof t){var n=s(t,o)[0];e.parentNode.replaceChild(n,e)}else i.replaceChildWithTree(e,t)}};e.exports=f},function(e,t,n){
"use strict";var a=n(125),i=[a({ResponderEventPlugin:null}),a({SimpleEventPlugin:null}),a({TapEventPlugin:null}),a({EnterLeaveEventPlugin:null}),a({ChangeEventPlugin:null}),a({SelectEventPlugin:null}),a({BeforeInputEventPlugin:null})];e.exports=i},function(e,t,n){"use strict";var a=n(103),i=n(211),r=n(59),s=n(279),o=n(125),l=a.topLevelTypes,u={mouseEnter:{registrationName:o({onMouseEnter:null}),dependencies:[l.topMouseOut,l.topMouseOver]},mouseLeave:{registrationName:o({onMouseLeave:null}),dependencies:[l.topMouseOut,l.topMouseOver]
}},d={eventTypes:u,extractEvents:function(e,t,n,a){if(e===l.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==l.topMouseOut&&e!==l.topMouseOver)return null;var o;if(a.window===a)o=a;else{var d=a.ownerDocument;o=d?d.defaultView||d.parentWindow:window}var c,f;if(e===l.topMouseOut){c=t;var p=n.relatedTarget||n.toElement;f=p?r.getClosestInstanceFromNode(p):null}else c=null,f=t;if(c===f)return null;var h=null==c?o:r.getNodeFromInstance(c),m=null==f?o:r.getNodeFromInstance(f),v=s.getPooled(u.mouseLeave,c,n,a);
v.type="mouseleave",v.target=h,v.relatedTarget=m;var g=s.getPooled(u.mouseEnter,f,n,a);return g.type="mouseenter",g.target=m,g.relatedTarget=h,i.accumulateEnterLeaveDispatches(v,g,c,f),[v,g]}};e.exports=d},function(e,t,n){"use strict";function a(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var i=n(54),r=n(126),s=n(660);i(a.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[s()];
},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,a=n.length,i=this.getText(),r=i.length;for(e=0;e<a&&n[e]===i[e];e++);var s=a-e;for(t=1;t<=s&&n[a-t]===i[r-t];t++);var o=t>1?1-t:void 0;return this._fallbackText=i.slice(e,o),this._fallbackText}}),r.addPoolingTo(a),e.exports=a},function(e,t,n){"use strict";var a=n(139),i=a.injection.MUST_USE_PROPERTY,r=a.injection.HAS_BOOLEAN_VALUE,s=a.injection.HAS_SIDE_EFFECTS,o=a.injection.HAS_NUMERIC_VALUE,l=a.injection.HAS_POSITIVE_NUMERIC_VALUE,u=a.injection.HAS_OVERLOADED_BOOLEAN_VALUE,d={
isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+a.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:r,allowTransparency:0,alt:0,async:r,autoComplete:0,autoPlay:r,capture:r,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:i|r,cite:0,classID:0,className:0,cols:l,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:r,coords:0,crossOrigin:0,data:0,dateTime:0,"default":r,defer:r,dir:0,disabled:r,download:u,draggable:0,
encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:r,formTarget:0,frameBorder:0,headers:0,height:0,hidden:r,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:r,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:i|r,muted:i|r,name:0,nonce:0,noValidate:r,open:r,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,
radioGroup:0,readOnly:r,rel:0,required:r,reversed:r,role:0,rows:l,rowSpan:o,sandbox:0,scope:0,scoped:r,scrolling:0,seamless:r,selected:i|r,shape:0,size:l,sizes:0,span:l,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:o,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:i|s,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:r,itemType:0,itemID:0,itemRef:0,
results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=d},function(e,t,n){"use strict";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 ReactCSSTransitionGroup: 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)")}}}var i=n(54),r=n(275),s=n(2086),o=n(2053),l=r.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:o.propTypes.name,transitionAppear:r.PropTypes.bool,transitionEnter:r.PropTypes.bool,transitionLeave:r.PropTypes.bool,transitionAppearTimeout:a("Appear"),transitionEnterTimeout:a("Enter"),transitionLeaveTimeout:a("Leave")},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,
transitionLeave:!0}},_wrapChild:function(e){return r.createElement(o,{name:this.props.transitionName,appear:this.props.transitionAppear,enter:this.props.transitionEnter,leave:this.props.transitionLeave,appearTimeout:this.props.transitionAppearTimeout,enterTimeout:this.props.transitionEnterTimeout,leaveTimeout:this.props.transitionLeaveTimeout},e)},render:function(){return r.createElement(s,i({},this.props,{childFactory:this._wrapChild}))}});e.exports=l},function(e,t,n){"use strict";var a=n(275),i=n(640),r=n(1716),s=n(2085),o=n(664),l=17,u=a.createClass({
displayName:"ReactCSSTransitionGroupChild",propTypes:{name:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.shape({enter:a.PropTypes.string,leave:a.PropTypes.string,active:a.PropTypes.string}),a.PropTypes.shape({enter:a.PropTypes.string,enterActive:a.PropTypes.string,leave:a.PropTypes.string,leaveActive:a.PropTypes.string,appear:a.PropTypes.string,appearActive:a.PropTypes.string})]).isRequired,appear:a.PropTypes.bool,enter:a.PropTypes.bool,leave:a.PropTypes.bool,appearTimeout:a.PropTypes.number,
enterTimeout:a.PropTypes.number,leaveTimeout:a.PropTypes.number},transition:function(e,t,n){var a=i.findDOMNode(this);if(!a)return void(t&&t());var o=this.props.name[e]||this.props.name+"-"+e,l=this.props.name[e+"Active"]||o+"-active",u=null,d=function(e){e&&e.target!==a||(clearTimeout(u),r.removeClass(a,o),r.removeClass(a,l),s.removeEndEventListener(a,d),t&&t())};r.addClass(a,o),this.queueClass(l),n?(u=setTimeout(d,n),this.transitionTimeouts.push(u)):s.addEndEventListener(a,d)},queueClass:function(e){
this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,l))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(r.addClass.bind(r,i.findDOMNode(this))),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[],this.transitionTimeouts=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)})},componentWillAppear:function(e){
this.props.appear?this.transition("appear",e,this.props.appearTimeout):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e,this.props.enterTimeout):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e,this.props.leaveTimeout):e()},render:function(){return o(this.props.children)}});e.exports=u},function(e,t,n){"use strict";function a(e,t,n){var a=void 0===e[n];null!=t&&a&&(e[n]=r(t))}var i=n(171),r=n(662),s=(n(393),n(406)),o=n(407),l=(n(45),{instantiateChildren:function(e,t,n){
if(null==e)return null;var i={};return o(e,a,i),i},updateChildren:function(e,t,n,a,o){if(t||e){var l,u;for(l in t)if(t.hasOwnProperty(l)){u=e&&e[l];var d=u&&u._currentElement,c=t[l];if(null!=u&&s(d,c))i.receiveComponent(u,c,a,o),t[l]=u;else{u&&(n[l]=i.getNativeNode(u),i.unmountComponent(u,!1));var f=r(c);t[l]=f}}for(l in e)!e.hasOwnProperty(l)||t&&t.hasOwnProperty(l)||(u=e[l],n[l]=i.getNativeNode(u),i.unmountComponent(u,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];
i.unmountComponent(a,t)}}});e.exports=l},function(e,t,n){"use strict";function a(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function i(e){}function r(e,t){}function s(e){return e.prototype&&e.prototype.isReactComponent}var o=n(54),l=n(395),u=n(127),d=n(88),c=n(396),f=n(397),p=(n(83),n(650)),h=n(278),m=(n(277),n(171)),v=n(653),g=n(271),y=n(33),b=n(406);n(45);i.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);
return r(e,t),t};var w=1,P={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._nativeParent=null,this._nativeContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,a){
this._context=a,this._mountOrder=w++,this._nativeParent=t,this._nativeContainerInfo=n;var o,l=this._processProps(this._currentElement.props),u=this._processContext(a),c=this._currentElement.type,p=this._constructComponent(l,u);s(c)||null!=p&&null!=p.render||(o=p,r(c,o),null===p||p===!1||d.isValidElement(p)?void 0:y(!1),p=new i(c));p.props=l,p.context=u,p.refs=g,p.updater=v,this._instance=p,f.set(p,this);var h=p.state;void 0===h&&(p.state=h=null),"object"!=typeof h||Array.isArray(h)?y(!1):void 0,this._pendingStateQueue=null,
this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var m;return m=p.unstable_handleError?this.performInitialMountWithErrorHandling(o,t,n,e,a):this.performInitialMount(o,t,n,e,a),p.componentDidMount&&e.getReactMountReady().enqueue(p.componentDidMount,p),m},_constructComponent:function(e,t){return this._constructComponentWithoutOwner(e,t)},_constructComponentWithoutOwner:function(e,t){var n,a=this._currentElement.type;return n=s(a)?new a(e,t,v):a(e,t,v)},performInitialMountWithErrorHandling:function(e,t,n,a,i){
var r,s=a.checkpoint();try{r=this.performInitialMount(e,t,n,a,i)}catch(o){a.rollback(s),this._instance.unstable_handleError(o),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),s=a.checkpoint(),this._renderedComponent.unmountComponent(!0),a.rollback(s),r=this.performInitialMount(e,t,n,a,i)}return r},performInitialMount:function(e,t,n,a,i){var r=this._instance;r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),
void 0===e&&(e=this._renderValidatedComponent()),this._renderedNodeType=p.getType(e),this._renderedComponent=this._instantiateReactComponent(e);var s=m.mountComponent(this._renderedComponent,a,t,n,this._processChildContext(i));return s},getNativeNode:function(){return m.getNativeNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";
c.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(m.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;
if(!n)return g;var a={};for(var i in n)a[i]=e[i];return a},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,a=n.getChildContext&&n.getChildContext();if(a){"object"!=typeof t.childContextTypes?y(!1):void 0;for(var i in a)i in t.childContextTypes?void 0:y(!1);return o({},e,a)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var i=this.getName();for(var r in e)if(e.hasOwnProperty(r)){
var s;try{"function"!=typeof e[r]?y(!1):void 0,s=e[r](t,r,i,n)}catch(o){s=o}if(s instanceof Error){a(this);n===h.prop}}},receiveComponent:function(e,t,n){var a=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(t,a,e,i,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?m.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null;
},updateComponent:function(e,t,n,a,i){var r,s,o=this._instance,l=!1;this._context===i?r=o.context:(r=this._processContext(i),l=!0),t===n?s=n.props:(s=this._processProps(n.props),l=!0),l&&o.componentWillReceiveProps&&o.componentWillReceiveProps(s,r);var u=this._processPendingState(s,r),d=!0;!this._pendingForceUpdate&&o.shouldComponentUpdate&&(d=o.shouldComponentUpdate(s,u,r)),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,s,u,r,e,i)):(this._currentElement=n,
this._context=i,o.props=s,o.state=u,o.context=r)},_processPendingState:function(e,t){var n=this._instance,a=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!a)return n.state;if(i&&1===a.length)return a[0];for(var r=o({},i?a[0]:n.state),s=i?1:0;s<a.length;s++){var l=a[s];o(r,"function"==typeof l?l.call(n,r,e,t):l)}return r},_performComponentUpdate:function(e,t,n,a,i,r){var s,o,l,u=this._instance,d=Boolean(u.componentDidUpdate);d&&(s=u.props,
o=u.state,l=u.context),u.componentWillUpdate&&u.componentWillUpdate(t,n,a),this._currentElement=e,this._context=r,u.props=t,u.state=n,u.context=a,this._updateRenderedComponent(i,r),d&&i.getReactMountReady().enqueue(u.componentDidUpdate.bind(u,s,o,l),u)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,a=n._currentElement,i=this._renderValidatedComponent();if(b(a,i))m.receiveComponent(n,i,e,this._processChildContext(t));else{var r=m.getNativeNode(n);m.unmountComponent(n,!1),this._renderedNodeType=p.getType(i),
this._renderedComponent=this._instantiateReactComponent(i);var s=m.mountComponent(this._renderedComponent,e,this._nativeParent,this._nativeContainerInfo,this._processChildContext(t));this._replaceNodeWithMarkup(r,s,n)}},_replaceNodeWithMarkup:function(e,t,n){l.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;u.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext();
}finally{u.current=null}return null===e||e===!1||d.isValidElement(e)?void 0:y(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?y(!1):void 0;var a=t.getPublicInstance(),i=n.refs===g?n.refs={}:n.refs;i[e]=a},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;
return e instanceof i?null:e},_instantiateReactComponent:null},_={Mixin:P};e.exports=_},function(e,t,n){"use strict";var a=n(273),i={getNativeProps:a.getNativeProps};e.exports=i},function(e,t,n){"use strict";function a(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?R(!1):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?R(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&V in t.dangerouslySetInnerHTML?void 0:R(!1)),null!=t.style&&"object"!=typeof t.style?R(!1):void 0);
}function i(e,t,n,a){if(!(a instanceof O)){var i=e._nativeContainerInfo,s=i._node&&i._node.nodeType===q,o=s?i._node:i._ownerDocument;F(t,o),a.getReactMountReady().enqueue(r,{inst:e,registrationName:t,listener:n})}}function r(){var e=this;w.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;I.postMountWrapper(e)}function o(){var e=this;e._rootNodeID?void 0:R(!1);var t=U(e);switch(t?void 0:R(!1),e._tag){case"iframe":case"object":e._wrapperState.listeners=[_.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];
break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in W)W.hasOwnProperty(n)&&e._wrapperState.listeners.push(_.trapBubbledEvent(b.topLevelTypes[n],W[n],t));break;case"img":e._wrapperState.listeners=[_.trapBubbledEvent(b.topLevelTypes.topError,"error",t),_.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[_.trapBubbledEvent(b.topLevelTypes.topReset,"reset",t),_.trapBubbledEvent(b.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":
case"textarea":e._wrapperState.listeners=[_.trapBubbledEvent(b.topLevelTypes.topInvalid,"invalid",t)]}}function l(){M.postUpdateWrapper(this)}function u(e){J.call(X,e)||(G.test(e)?void 0:R(!1),X[e]=!0)}function d(e,t){return e.indexOf("-")>=0||null!=t.is}function c(e){var t=e.type;u(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._nativeNode=null,this._nativeParent=null,this._rootNodeID=null,
this._domID=null,this._nativeContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var f=n(54),p=n(2044),h=n(633),m=n(170),v=n(635),g=n(139),y=n(391),b=n(103),w=n(210),P=n(274),_=n(276),S=n(639),x=n(2056),C=n(641),T=n(59),k=n(2064),I=n(2066),M=n(642),A=n(2069),E=(n(83),n(2079)),O=n(2083),D=(n(82),n(281)),R=n(33),L=(n(404),n(125)),N=(n(625),n(408),n(45),C),j=w.deleteListener,U=T.getNodeFromInstance,F=_.listenTo,B=P.registrationNameModules,z={string:!0,number:!0},$=L({
style:null}),V=L({__html:null}),H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},q=11,W={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",
topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},K={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Q={listing:!0,pre:!0,textarea:!0},Y=f({menuitem:!0},K),G=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,X={},J={}.hasOwnProperty,Z=1;c.displayName="ReactDOMComponent",c.Mixin={mountComponent:function(e,t,n,i){this._rootNodeID=Z++,this._domID=n._idCounter++,
this._nativeParent=t,this._nativeContainerInfo=n;var r=this._currentElement.props;switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(o,this);break;case"button":r=x.getNativeProps(this,r,t);break;case"input":k.mountWrapper(this,r,t),r=k.getNativeProps(this,r),e.getReactMountReady().enqueue(o,this);break;case"option":I.mountWrapper(this,r,t),r=I.getNativeProps(this,r);break;case"select":M.mountWrapper(this,r,t),
r=M.getNativeProps(this,r),e.getReactMountReady().enqueue(o,this);break;case"textarea":A.mountWrapper(this,r,t),r=A.getNativeProps(this,r),e.getReactMountReady().enqueue(o,this)}a(this,r);var l,u;null!=t?(l=t._namespaceURI,u=t._tag):n._tag&&(l=n._namespaceURI,u=n._tag),(null==l||l===v.svg&&"foreignobject"===u)&&(l=v.html),l===v.html&&("svg"===this._tag?l=v.svg:"math"===this._tag&&(l=v.mathml)),this._namespaceURI=l;var d;if(e.useCreateElement){var c,f=n._ownerDocument;if(l===v.html)if("script"===this._tag){
var h=f.createElement("div"),g=this._currentElement.type;h.innerHTML="<"+g+"></"+g+">",c=h.removeChild(h.firstChild)}else c=f.createElement(this._currentElement.type,r.is||null);else c=f.createElementNS(l,this._currentElement.type);T.precacheNode(this,c),this._flags|=N.hasCachedChildNodes,this._nativeParent||y.setAttributeForRoot(c),this._updateDOMProperties(null,r,e);var b=m(c);this._createInitialChildren(e,r,i,b),d=b}else{var w=this._createOpenTagMarkupAndPutListeners(e,r),P=this._createContentMarkup(e,r,i);
d=!P&&K[this._tag]?w+"/>":w+">"+P+"</"+this._currentElement.type+">"}switch(this._tag){case"button":case"input":case"select":case"textarea":r.autoFocus&&e.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(s,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var a in t)if(t.hasOwnProperty(a)){var r=t[a];if(null!=r)if(B.hasOwnProperty(a))r&&i(this,a,r,e);else{a===$&&(r&&(r=this._previousStyleCopy=f({},t.style)),
r=h.createMarkupForStyles(r,this));var s=null;null!=this._tag&&d(this._tag,t)?H.hasOwnProperty(a)||(s=y.createMarkupForCustomAttribute(a,r)):s=y.createMarkupForProperty(a,r),s&&(n+=" "+s)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var a="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(a=i.__html);else{var r=z[typeof t.children]?t.children:null,s=null!=r?null:t.children;
if(null!=r)a=D(r);else if(null!=s){var o=this.mountChildren(s,e,n);a=o.join("")}}return Q[this._tag]&&"\n"===a.charAt(0)?"\n"+a:a},_createInitialChildren:function(e,t,n,a){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&m.queueHTML(a,i.__html);else{var r=z[typeof t.children]?t.children:null,s=null!=r?null:t.children;if(null!=r)m.queueText(a,r);else if(null!=s)for(var o=this.mountChildren(s,e,n),l=0;l<o.length;l++)m.queueChild(a,o[l])}},receiveComponent:function(e,t,n){var a=this._currentElement;
this._currentElement=e,this.updateComponent(t,a,e,n)},updateComponent:function(e,t,n,i){var r=t.props,s=this._currentElement.props;switch(this._tag){case"button":r=x.getNativeProps(this,r),s=x.getNativeProps(this,s);break;case"input":k.updateWrapper(this),r=k.getNativeProps(this,r),s=k.getNativeProps(this,s);break;case"option":r=I.getNativeProps(this,r),s=I.getNativeProps(this,s);break;case"select":r=M.getNativeProps(this,r),s=M.getNativeProps(this,s);break;case"textarea":A.updateWrapper(this),r=A.getNativeProps(this,r),
s=A.getNativeProps(this,s)}a(this,s),this._updateDOMProperties(r,s,e),this._updateDOMChildren(r,s,e,i),"select"===this._tag&&e.getReactMountReady().enqueue(l,this)},_updateDOMProperties:function(e,t,n){var a,r,s;for(a in e)if(!t.hasOwnProperty(a)&&e.hasOwnProperty(a)&&null!=e[a])if(a===$){var o=this._previousStyleCopy;for(r in o)o.hasOwnProperty(r)&&(s=s||{},s[r]="");this._previousStyleCopy=null}else B.hasOwnProperty(a)?e[a]&&j(this,a):(g.properties[a]||g.isCustomAttribute(a))&&y.deleteValueForProperty(U(this),a);
for(a in t){var l=t[a],u=a===$?this._previousStyleCopy:null!=e?e[a]:void 0;if(t.hasOwnProperty(a)&&l!==u&&(null!=l||null!=u))if(a===$)if(l?l=this._previousStyleCopy=f({},l):this._previousStyleCopy=null,u){for(r in u)!u.hasOwnProperty(r)||l&&l.hasOwnProperty(r)||(s=s||{},s[r]="");for(r in l)l.hasOwnProperty(r)&&u[r]!==l[r]&&(s=s||{},s[r]=l[r])}else s=l;else if(B.hasOwnProperty(a))l?i(this,a,l,n):u&&j(this,a);else if(d(this._tag,t))H.hasOwnProperty(a)||y.setValueForAttribute(U(this),a,l);else if(g.properties[a]||g.isCustomAttribute(a)){
var c=U(this);null!=l?y.setValueForProperty(c,a,l):y.deleteValueForProperty(c,a)}}s&&h.setValueForStyles(U(this),s,this)},_updateDOMChildren:function(e,t,n,a){var i=z[typeof e.children]?e.children:null,r=z[typeof t.children]?t.children:null,s=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,o=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,l=null!=i?null:e.children,u=null!=r?null:t.children,d=null!=i||null!=s,c=null!=r||null!=o;null!=l&&null==u?this.updateChildren(null,n,a):d&&!c&&this.updateTextContent(""),
null!=r?i!==r&&this.updateTextContent(""+r):null!=o?s!==o&&this.updateMarkup(""+o):null!=u&&this.updateChildren(u,n,a)},getNativeNode:function(){return U(this)},unmountComponent:function(e){switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":R(!1)}this.unmountChildren(e),T.uncacheNode(this),w.deleteAllListeners(this),S.unmountIDFromEnvironment(this._rootNodeID),
this._rootNodeID=null,this._domID=null,this._wrapperState=null},getPublicInstance:function(){return U(this)}},f(c.prototype,c.Mixin,E.Mixin),e.exports=c},function(e,t,n){"use strict";function a(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===i?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var i=(n(408),9);e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a,i,r){}var i=n(2071),r=(n(45),[]),s={addDevtool:function(e){
r.push(e)},removeDevtool:function(e){for(var t=0;t<r.length;t++)r[t]===e&&(r.splice(t,1),t--)},onCreateMarkupForProperty:function(e,t){a("onCreateMarkupForProperty",e,t)},onSetValueForProperty:function(e,t,n){a("onSetValueForProperty",e,t,n)},onDeleteValueForProperty:function(e,t){a("onDeleteValueForProperty",e,t)}};s.addDevtool(i),e.exports=s},function(e,t,n){"use strict";var a=n(54),i=n(170),r=n(59),s=function(e){this._currentElement=null,this._nativeNode=null,this._nativeParent=null,this._nativeContainerInfo=null,
this._domID=null};a(s.prototype,{mountComponent:function(e,t,n,a){var s=n._idCounter++;this._domID=s,this._nativeParent=t,this._nativeContainerInfo=n;var o=" react-empty: "+this._domID+" ";if(e.useCreateElement){var l=n._ownerDocument,u=l.createComment(o);return r.precacheNode(this,u),i(u)}return e.renderToStaticMarkup?"":"<!--"+o+"-->"},receiveComponent:function(){},getNativeNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),e.exports=s},function(e,t,n){
"use strict";function a(e){return i.createFactory(e)}var i=n(88),r=(n(643),n(1727)),s=r({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",
embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",
option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",
circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},a);e.exports=s},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var a=n(390),i=n(59),r={dangerouslyProcessChildrenUpdates:function(e,t){var n=i.getNodeFromInstance(e);
a.processUpdates(n,t)}};e.exports=r},function(e,t,n){"use strict";function a(){this._rootNodeID&&f.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);d.asap(a,this);var i=t.name;if("radio"===t.type&&null!=i){for(var r=u.getNodeFromInstance(this),s=r;s.parentNode;)s=s.parentNode;for(var o=s.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),f=0;f<o.length;f++){var p=o[f];if(p!==r&&p.form===r.form){var h=u.getInstanceFromNode(p);h?void 0:c(!1),
d.asap(a,h)}}}return n}var r=n(54),s=n(273),o=n(391),l=n(394),u=n(59),d=n(91),c=n(33),f=(n(45),{getNativeProps:function(e,t){var n=l.getValue(t),a=l.getChecked(t),i=r({type:void 0},s.getNativeProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=a?a:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return i},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,
listeners:null,onChange:i.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&o.setValueForProperty(u.getNodeFromInstance(e),"checked",n||!1);var a=l.getValue(t);null!=a&&o.setValueForProperty(u.getNodeFromInstance(e),"value",""+a)}});e.exports=f},function(e,t,n){"use strict";var a=n(2059);e.exports={debugTool:a}},function(e,t,n){"use strict";var a=n(54),i=n(636),r=n(59),s=n(642),o=(n(45),{mountWrapper:function(e,t,n){var a=null;if(null!=n){var i=n;"optgroup"===i._tag&&(i=i._nativeParent),
null!=i&&"select"===i._tag&&(a=s.getSelectValueContext(i))}var r=null;if(null!=a)if(r=!1,Array.isArray(a)){for(var o=0;o<a.length;o++)if(""+a[o]==""+t.value){r=!0;break}}else r=""+a==""+t.value;e._wrapperState={selected:r}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=r.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getNativeProps:function(e,t){var n=a({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);
var r="";return i.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(r+=e))}),r&&(n.children=r),n}});e.exports=o},function(e,t,n){"use strict";function a(e,t,n,a){return e===n&&t===a}function i(e){var t=document.selection,n=t.createRange(),a=n.text.length,i=n.duplicate();i.moveToElementText(e),i.setEndPoint("EndToStart",n);var r=i.text.length,s=r+a;return{start:r,end:s}}function r(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;
var n=t.anchorNode,i=t.anchorOffset,r=t.focusNode,s=t.focusOffset,o=t.getRangeAt(0);try{o.startContainer.nodeType,o.endContainer.nodeType}catch(l){return null}var u=a(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),d=u?0:o.toString().length,c=o.cloneRange();c.selectNodeContents(e),c.setEnd(o.startContainer,o.startOffset);var f=a(c.startContainer,c.startOffset,c.endContainer,c.endOffset),p=f?0:c.toString().length,h=p+d,m=document.createRange();m.setStart(n,i),m.setEnd(r,s);var v=m.collapsed;
return{start:v?h:p,end:v?p:h}}function s(e,t){var n,a,i=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,a=n):t.start>t.end?(n=t.end,a=t.start):(n=t.start,a=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",a-n),i.select()}function o(e,t){if(window.getSelection){var n=window.getSelection(),a=e[d()].length,i=Math.min(t.start,a),r=void 0===t.end?i:Math.min(t.end,a);if(!n.extend&&i>r){var s=r;r=i,i=s}var o=u(e,i),l=u(e,r);
if(o&&l){var c=document.createRange();c.setStart(o.node,o.offset),n.removeAllRanges(),i>r?(n.addRange(c),n.extend(l.node,l.offset)):(c.setEnd(l.node,l.offset),n.addRange(c))}}}var l=n(64),u=n(2104),d=n(660),c=l.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:c?i:r,setOffsets:c?s:o};e.exports=f},function(e,t,n){"use strict";var a=n(54),i=n(390),r=n(170),s=n(59),o=(n(83),n(281)),l=n(33),u=(n(408),function(e){this._currentElement=e,this._stringText=""+e,this._nativeNode=null,
this._nativeParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});a(u.prototype,{mountComponent:function(e,t,n,a){var i=n._idCounter++,l=" react-text: "+i+" ",u=" /react-text ";if(this._domID=i,this._nativeParent=t,e.useCreateElement){var d=n._ownerDocument,c=d.createComment(l),f=d.createComment(u),p=r(d.createDocumentFragment());return r.queueChild(p,r(c)),this._stringText&&r.queueChild(p,r(d.createTextNode(this._stringText))),r.queueChild(p,r(f)),s.precacheNode(this,c),
this._closingComment=f,p}var h=o(this._stringText);return e.renderToStaticMarkup?h:"<!--"+l+"-->"+h+"<!--"+u+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var a=this.getNativeNode();i.replaceDelimitedText(a[0],a[1],n)}}},getNativeNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?l(!1):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){
this._closingComment=n;break}n=n.nextSibling}return e=[this._nativeNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=u},function(e,t,n){"use strict";function a(){this._rootNodeID&&f.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);return d.asap(a,this),n}var r=n(54),s=n(273),o=n(391),l=n(394),u=n(59),d=n(91),c=n(33),f=(n(45),{getNativeProps:function(e,t){
null!=t.dangerouslySetInnerHTML?c(!1):void 0;var n=r({},s.getNativeProps(e,t),{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=t.defaultValue,a=t.children;null!=a&&(null!=n?c(!1):void 0,Array.isArray(a)&&(a.length<=1?void 0:c(!1),a=a[0]),n=""+a),null==n&&(n="");var r=l.getValue(t);e._wrapperState={initialValue:""+(null!=r?r:n),listeners:null,onChange:i.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getValue(t);
null!=n&&o.setValueForProperty(u.getNodeFromInstance(e),"value",""+n)}});e.exports=f},function(e,t,n){"use strict";function a(e,t){"_nativeNode"in e?void 0:l(!1),"_nativeNode"in t?void 0:l(!1);for(var n=0,a=e;a;a=a._nativeParent)n++;for(var i=0,r=t;r;r=r._nativeParent)i++;for(;n-i>0;)e=e._nativeParent,n--;for(;i-n>0;)t=t._nativeParent,i--;for(var s=n;s--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function i(e,t){"_nativeNode"in e?void 0:l(!1),"_nativeNode"in t?void 0:l(!1);
for(;t;){if(t===e)return!0;t=t._nativeParent}return!1}function r(e){return"_nativeNode"in e?void 0:l(!1),e._nativeParent}function s(e,t,n){for(var a=[];e;)a.push(e),e=e._nativeParent;var i;for(i=a.length;i-- >0;)t(a[i],!1,n);for(i=0;i<a.length;i++)t(a[i],!0,n)}function o(e,t,n,i,r){for(var s=e&&t?a(e,t):null,o=[];e&&e!==s;)o.push(e),e=e._nativeParent;for(var l=[];t&&t!==s;)l.push(t),t=t._nativeParent;var u;for(u=0;u<o.length;u++)n(o[u],!0,i);for(u=l.length;u-- >0;)n(l[u],!1,r)}var l=n(33);e.exports={
isAncestor:i,getLowestCommonAncestor:a,getParentInstance:r,traverseTwoPhase:s,traverseEnterLeave:o}},function(e,t,n){"use strict";var a,i=(n(139),n(274),n(45),{onCreateMarkupForProperty:function(e,t){a(e)},onSetValueForProperty:function(e,t,n){a(t)},onDeleteValueForProperty:function(e,t){a(t)}});e.exports=i},function(e,t,n){"use strict";function a(e,t,n,a,i,r){}function i(e){}var r=(n(64),n(1730),n(45),[]),s={addDevtool:function(e){r.push(e)},removeDevtool:function(e){for(var t=0;t<r.length;t++)r[t]===e&&(r.splice(t,1),
t--)},beginProfiling:function(){},endProfiling:function(){},getFlushHistory:function(){},onBeginFlush:function(){a("onBeginFlush")},onEndFlush:function(){a("onEndFlush")},onBeginLifeCycleTimer:function(e,t){i(e),a("onBeginLifeCycleTimer",e,t)},onEndLifeCycleTimer:function(e,t){i(e),a("onEndLifeCycleTimer",e,t)},onBeginReconcilerTimer:function(e,t){i(e),a("onBeginReconcilerTimer",e,t)},onEndReconcilerTimer:function(e,t){i(e),a("onEndReconcilerTimer",e,t)},onBeginProcessingChildContext:function(){a("onBeginProcessingChildContext");
},onEndProcessingChildContext:function(){a("onEndProcessingChildContext")},onNativeOperation:function(e,t,n){i(e),a("onNativeOperation",e,t,n)},onSetState:function(){a("onSetState")},onSetDisplayName:function(e,t){i(e),a("onSetDisplayName",e,t)},onSetChildren:function(e,t){i(e),a("onSetChildren",e,t)},onSetOwner:function(e,t){i(e),a("onSetOwner",e,t)},onSetText:function(e,t){i(e),a("onSetText",e,t)},onMountRootComponent:function(e){i(e),a("onMountRootComponent",e)},onMountComponent:function(e){i(e),
a("onMountComponent",e)},onUpdateComponent:function(e){i(e),a("onUpdateComponent",e)},onUnmountComponent:function(e){i(e),a("onUnmountComponent",e)}};e.exports=s},function(e,t,n){"use strict";function a(){this.reinitializeTransaction()}var i=n(54),r=n(91),s=n(280),o=n(82),l={initialize:o,close:function(){f.isBatchingUpdates=!1}},u={initialize:o,close:r.flushBatchedUpdates.bind(r)},d=[u,l];i(a.prototype,s.Mixin,{getTransactionWrappers:function(){return d}});var c=new a,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,a,i,r){
var s=f.isBatchingUpdates;f.isBatchingUpdates=!0,s?e(t,n,a,i,r):c.perform(e,null,t,n,a,i,r)}};e.exports=f},function(e,t,n){"use strict";function a(){_||(_=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginUtils.injectComponentTree(c),g.EventPluginUtils.injectTreeTraversal(p),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:P,EnterLeaveEventPlugin:o,ChangeEventPlugin:r,SelectEventPlugin:w,BeforeInputEventPlugin:i}),g.NativeComponent.injectGenericComponentClass(d),
g.NativeComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(l),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(m),g.Component.injectEnvironment(u))}var i=n(2045),r=n(2046),s=n(2048),o=n(2049),l=n(2051),u=n(639),d=n(2057),c=n(59),f=n(2060),p=n(2070),h=n(2068),m=n(2073),v=n(2076),g=n(2077),y=n(2081),b=n(2087),w=n(2088),P=n(2089),_=!1;e.exports={
inject:a}},function(e,t,n){"use strict";function a(e){i.enqueueEvents(e),i.processEventQueue(!1)}var i=n(210),r={handleTopLevel:function(e,t,n,r){var s=i.extractEvents(e,t,n,r);a(s)}};e.exports=r},function(e,t,n){"use strict";function a(e){for(;e._nativeParent;)e=e._nativeParent;var t=c.getNodeFromInstance(e),n=t.parentNode;return c.getClosestInstanceFromNode(n)}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function r(e){var t=p(e.nativeEvent),n=c.getClosestInstanceFromNode(t),i=n;
do e.ancestors.push(i),i=i&&a(i);while(i);for(var r=0;r<e.ancestors.length;r++)n=e.ancestors[r],m._handleTopLevel(e.topLevelType,n,e.nativeEvent,p(e.nativeEvent))}function s(e){var t=h(window);e(t)}var o=n(54),l=n(621),u=n(64),d=n(126),c=n(59),f=n(91),p=n(402),h=n(1722);o(i.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),d.addPoolingTo(i,d.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){
m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var a=n;return a?l.listen(a,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var a=n;return a?l.capture(a,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=s.bind(null,e);l.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=i.getPooled(e,t);try{f.batchedUpdates(r,n)}finally{i.release(n)}}}};e.exports=m;
},function(e,t,n){"use strict";var a=n(139),i=n(210),r=n(392),s=n(395),o=n(637),l=n(644),u=n(276),d=n(649),c=n(91),f={Component:s.injection,Class:o.injection,DOMProperty:a.injection,EmptyComponent:l.injection,EventPluginHub:i.injection,EventPluginUtils:r.injection,EventEmitter:u.injection,NativeComponent:d.injection,Updates:c.injection};e.exports=f},function(e,t,n){"use strict";var a=n(2100),i=/\/?>/,r=/^<\!\-\-/,s={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=a(e);
return r.test(e)?e:e.replace(i," "+s.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(s.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=a(e);return i===n}};e.exports=s},function(e,t,n){"use strict";function a(e,t,n){return{type:c.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function i(e,t,n){return{type:c.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getNativeNode(e),toIndex:n,afterNode:t}}function r(e,t){return{type:c.REMOVE_NODE,
content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function s(e){return{type:c.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function o(e){return{type:c.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function l(e,t){return t&&(e=e||[],e.push(t)),e}function u(e,t){d.processChildrenUpdates(e,t)}var d=n(395),c=(n(83),n(648)),f=(n(127),n(171)),p=n(2054),h=(n(82),n(657)),m=n(33),v={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){
return p.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,a,i){var r;return r=h(t),p.updateChildren(e,r,n,a,i),r},mountChildren:function(e,t,n){var a=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=a;var i=[],r=0;for(var s in a)if(a.hasOwnProperty(s)){var o=a[s],l=f.mountComponent(o,t,this,this._nativeContainerInfo,n);o._mountIndex=r++,i.push(l)}return i},updateTextContent:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&m(!1);
var a=[o(e)];u(this,a)},updateMarkup:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&m(!1);var a=[s(e)];u(this,a)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var a=this._renderedChildren,i={},r=this._reconcilerUpdateChildren(a,e,i,t,n);if(r||a){var s,o=null,d=0,c=0,p=null;for(s in r)if(r.hasOwnProperty(s)){var h=a&&a[s],m=r[s];h===m?(o=l(o,this.moveChild(h,p,c,d)),d=Math.max(h._mountIndex,d),h._mountIndex=c):(h&&(d=Math.max(h._mountIndex,d)),
o=l(o,this._mountChildAtIndex(m,p,c,t,n))),c++,p=f.getNativeNode(m)}for(s in i)i.hasOwnProperty(s)&&(o=l(o,this._unmountChild(a[s],i[s])));o&&u(this,o),this._renderedChildren=r}},unmountChildren:function(e){var t=this._renderedChildren;p.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,a){if(e._mountIndex<a)return i(e,t,n)},createChild:function(e,t,n){return a(n,t,e._mountIndex)},removeChild:function(e,t){return r(e,t)},_mountChildAtIndex:function(e,t,n,a,i){var r=f.mountComponent(e,a,this,this._nativeContainerInfo,i);
return e._mountIndex=n,this.createChild(e,t,r)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=v},function(e,t,n){"use strict";var a=n(33),i={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){i.isValidOwner(n)?void 0:a(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){i.isValidOwner(n)?void 0:a(!1);var r=n.getPublicInstance();r&&r.refs[t]===e.getPublicInstance()&&n.detachRef(t);
}};e.exports=i},function(e,t,n){"use strict";function a(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=r.getPooled(null),this.useCreateElement=e}var i=n(54),r=n(634),s=n(126),o=n(276),l=n(646),u=n(280),d={initialize:l.getSelectionInformation,close:l.restoreSelection},c={initialize:function(){var e=o.isEnabled();return o.setEnabled(!1),e},close:function(e){o.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll();
}},p=[d,c,f],h={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){r.release(this.reactMountReady),this.reactMountReady=null}};i(a.prototype,u.Mixin,h),s.addPoolingTo(a),e.exports=a},function(e,t,n){"use strict";function a(e,t,n){"function"==typeof e?e(t.getPublicInstance()):r.addComponentAsRefTo(t,e,n)}function i(e,t,n){
"function"==typeof e?e(null):r.removeComponentAsRefFrom(t,e,n)}var r=n(2080),s={};s.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&a(n,e,t._owner)}},s.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,a=null===t||t===!1;return n||a||t._owner!==e._owner||t.ref!==e.ref},s.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&i(n,e,t._owner)}},e.exports=s},function(e,t,n){"use strict";function a(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1;
}var i=n(54),r=n(126),s=n(280),o=[],l={enqueue:function(){}},u={getTransactionWrappers:function(){return o},getReactMountReady:function(){return l},destructor:function(){},checkpoint:function(){},rollback:function(){}};i(a.prototype,s.Mixin,u),r.addPoolingTo(a),e.exports=a},function(e,t,n){"use strict";var a=n(657),i={getChildMapping:function(e){return e?a(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var a={},i=[];for(var r in e)t.hasOwnProperty(r)?i.length&&(a[r]=i,
i=[]):i.push(r);var s,o={};for(var l in t){if(a.hasOwnProperty(l))for(s=0;s<a[l].length;s++){var u=a[l][s];o[a[l][s]]=n(u)}o[l]=n(l)}for(s=0;s<i.length;s++)o[i[s]]=n(i[s]);return o}};e.exports=i},function(e,t,n){"use strict";function a(){var e=o("animationend"),t=o("transitionend");e&&l.push(e),t&&l.push(t)}function i(e,t,n){e.addEventListener(t,n,!1)}function r(e,t,n){e.removeEventListener(t,n,!1)}var s=n(64),o=n(661),l=[];s.canUseDOM&&a();var u={addEndEventListener:function(e,t){return 0===l.length?void window.setTimeout(t,0):void l.forEach(function(n){
i(e,n,t)})},removeEndEventListener:function(e,t){0!==l.length&&l.forEach(function(n){r(e,n,t)})}};e.exports=u},function(e,t,n){"use strict";var a=n(54),i=n(275),r=n(2084),s=n(82),o=i.createClass({displayName:"ReactTransitionGroup",propTypes:{component:i.PropTypes.any,childFactory:i.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:s.thatReturnsArgument}},getInitialState:function(){return{children:r.getChildMapping(this.props.children)}},componentWillMount:function(){
this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t=r.getChildMapping(e.children),n=this.state.children;this.setState({children:r.mergeChildMappings(n,t)});var a;for(a in t){var i=n&&n.hasOwnProperty(a);!t[a]||i||this.currentlyTransitioningKeys[a]||this.keysToEnter.push(a)}for(a in n){var s=t&&t.hasOwnProperty(a);!n[a]||s||this.currentlyTransitioningKeys[a]||this.keysToLeave.push(a);
}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];
var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e);
},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)?this.performEnter(e):this.setState(function(t){var n=a({},t.children);return delete n[e],{children:n}})},render:function(){
var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(i.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}return i.createElement(this.props.component,this.props,e)}});e.exports=o},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},a={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",
ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",
contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",
focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",
ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",
mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",
pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",
speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",
surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",
vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",
xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(a).forEach(function(e){i.Properties[e]=0,a[e]&&(i.DOMAttributeNames[e]=a[e])}),e.exports=i},function(e,t,n){"use strict";
function a(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(e,t){if(P||null==y||y!==c())return null;var n=a(y);if(!w||!h(w,n)){
w=n;var i=d.getPooled(g.select,b,e,t);return i.type="select",i.target=y,s.accumulateTwoPhaseDispatches(i),i}return null}var r=n(103),s=n(211),o=n(64),l=n(59),u=n(646),d=n(104),c=n(623),f=n(663),p=n(125),h=n(625),m=r.topLevelTypes,v=o.canUseDOM&&"documentMode"in document&&document.documentMode<=11,g={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[m.topBlur,m.topContextMenu,m.topFocus,m.topKeyDown,m.topMouseDown,m.topMouseUp,m.topSelectionChange]
}},y=null,b=null,w=null,P=!1,_=!1,S=p({onSelect:null}),x={eventTypes:g,extractEvents:function(e,t,n,a){if(!_)return null;var r=t?l.getNodeFromInstance(t):window;switch(e){case m.topFocus:(f(r)||"true"===r.contentEditable)&&(y=r,b=t,w=null);break;case m.topBlur:y=null,b=null,w=null;break;case m.topMouseDown:P=!0;break;case m.topContextMenu:case m.topMouseUp:return P=!1,i(n,a);case m.topSelectionChange:if(v)break;case m.topKeyDown:case m.topKeyUp:return i(n,a)}return null},didPutListener:function(e,t,n){
t===S&&(_=!0)}};e.exports=x},function(e,t,n){"use strict";var a=n(103),i=n(621),r=n(211),s=n(59),o=n(2090),l=n(2091),u=n(104),d=n(2094),c=n(2096),f=n(279),p=n(2093),h=n(2097),m=n(2098),v=n(212),g=n(2099),y=n(82),b=n(400),w=n(33),P=n(125),_=a.topLevelTypes,S={abort:{phasedRegistrationNames:{bubbled:P({onAbort:!0}),captured:P({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:P({onAnimationEnd:!0}),captured:P({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{
bubbled:P({onAnimationIteration:!0}),captured:P({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:P({onAnimationStart:!0}),captured:P({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:P({onBlur:!0}),captured:P({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:P({onCanPlay:!0}),captured:P({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:P({onCanPlayThrough:!0}),captured:P({onCanPlayThroughCapture:!0})}},
click:{phasedRegistrationNames:{bubbled:P({onClick:!0}),captured:P({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:P({onContextMenu:!0}),captured:P({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:P({onCopy:!0}),captured:P({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:P({onCut:!0}),captured:P({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:P({onDoubleClick:!0}),captured:P({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{
bubbled:P({onDrag:!0}),captured:P({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:P({onDragEnd:!0}),captured:P({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:P({onDragEnter:!0}),captured:P({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:P({onDragExit:!0}),captured:P({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:P({onDragLeave:!0}),captured:P({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:P({
onDragOver:!0}),captured:P({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:P({onDragStart:!0}),captured:P({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:P({onDrop:!0}),captured:P({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:P({onDurationChange:!0}),captured:P({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:P({onEmptied:!0}),captured:P({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:P({
onEncrypted:!0}),captured:P({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:P({onEnded:!0}),captured:P({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:P({onError:!0}),captured:P({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:P({onFocus:!0}),captured:P({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:P({onInput:!0}),captured:P({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:P({onInvalid:!0}),captured:P({onInvalidCapture:!0
})}},keyDown:{phasedRegistrationNames:{bubbled:P({onKeyDown:!0}),captured:P({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:P({onKeyPress:!0}),captured:P({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:P({onKeyUp:!0}),captured:P({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:P({onLoad:!0}),captured:P({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:P({onLoadedData:!0}),captured:P({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{
bubbled:P({onLoadedMetadata:!0}),captured:P({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:P({onLoadStart:!0}),captured:P({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:P({onMouseDown:!0}),captured:P({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:P({onMouseMove:!0}),captured:P({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:P({onMouseOut:!0}),captured:P({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{
bubbled:P({onMouseOver:!0}),captured:P({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:P({onMouseUp:!0}),captured:P({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:P({onPaste:!0}),captured:P({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:P({onPause:!0}),captured:P({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:P({onPlay:!0}),captured:P({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:P({onPlaying:!0}),captured:P({
onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:P({onProgress:!0}),captured:P({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:P({onRateChange:!0}),captured:P({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:P({onReset:!0}),captured:P({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:P({onScroll:!0}),captured:P({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:P({onSeeked:!0}),captured:P({onSeekedCapture:!0})
}},seeking:{phasedRegistrationNames:{bubbled:P({onSeeking:!0}),captured:P({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:P({onStalled:!0}),captured:P({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:P({onSubmit:!0}),captured:P({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:P({onSuspend:!0}),captured:P({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:P({onTimeUpdate:!0}),captured:P({onTimeUpdateCapture:!0})}},touchCancel:{
phasedRegistrationNames:{bubbled:P({onTouchCancel:!0}),captured:P({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:P({onTouchEnd:!0}),captured:P({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:P({onTouchMove:!0}),captured:P({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:P({onTouchStart:!0}),captured:P({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:P({onTransitionEnd:!0}),captured:P({onTransitionEndCapture:!0
})}},volumeChange:{phasedRegistrationNames:{bubbled:P({onVolumeChange:!0}),captured:P({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:P({onWaiting:!0}),captured:P({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:P({onWheel:!0}),captured:P({onWheelCapture:!0})}}},x={topAbort:S.abort,topAnimationEnd:S.animationEnd,topAnimationIteration:S.animationIteration,topAnimationStart:S.animationStart,topBlur:S.blur,topCanPlay:S.canPlay,topCanPlayThrough:S.canPlayThrough,
topClick:S.click,topContextMenu:S.contextMenu,topCopy:S.copy,topCut:S.cut,topDoubleClick:S.doubleClick,topDrag:S.drag,topDragEnd:S.dragEnd,topDragEnter:S.dragEnter,topDragExit:S.dragExit,topDragLeave:S.dragLeave,topDragOver:S.dragOver,topDragStart:S.dragStart,topDrop:S.drop,topDurationChange:S.durationChange,topEmptied:S.emptied,topEncrypted:S.encrypted,topEnded:S.ended,topError:S.error,topFocus:S.focus,topInput:S.input,topInvalid:S.invalid,topKeyDown:S.keyDown,topKeyPress:S.keyPress,topKeyUp:S.keyUp,
topLoad:S.load,topLoadedData:S.loadedData,topLoadedMetadata:S.loadedMetadata,topLoadStart:S.loadStart,topMouseDown:S.mouseDown,topMouseMove:S.mouseMove,topMouseOut:S.mouseOut,topMouseOver:S.mouseOver,topMouseUp:S.mouseUp,topPaste:S.paste,topPause:S.pause,topPlay:S.play,topPlaying:S.playing,topProgress:S.progress,topRateChange:S.rateChange,topReset:S.reset,topScroll:S.scroll,topSeeked:S.seeked,topSeeking:S.seeking,topStalled:S.stalled,topSubmit:S.submit,topSuspend:S.suspend,topTimeUpdate:S.timeUpdate,
topTouchCancel:S.touchCancel,topTouchEnd:S.touchEnd,topTouchMove:S.touchMove,topTouchStart:S.touchStart,topTransitionEnd:S.transitionEnd,topVolumeChange:S.volumeChange,topWaiting:S.waiting,topWheel:S.wheel};for(var C in x)x[C].dependencies=[C];var T=P({onClick:null}),k={},I={eventTypes:S,extractEvents:function(e,t,n,a){var i=x[e];if(!i)return null;var s;switch(e){case _.topAbort:case _.topCanPlay:case _.topCanPlayThrough:case _.topDurationChange:case _.topEmptied:case _.topEncrypted:case _.topEnded:
case _.topError:case _.topInput:case _.topInvalid:case _.topLoad:case _.topLoadedData:case _.topLoadedMetadata:case _.topLoadStart:case _.topPause:case _.topPlay:case _.topPlaying:case _.topProgress:case _.topRateChange:case _.topReset:case _.topSeeked:case _.topSeeking:case _.topStalled:case _.topSubmit:case _.topSuspend:case _.topTimeUpdate:case _.topVolumeChange:case _.topWaiting:s=u;break;case _.topKeyPress:if(0===b(n))return null;case _.topKeyDown:case _.topKeyUp:s=c;break;case _.topBlur:case _.topFocus:
s=d;break;case _.topClick:if(2===n.button)return null;case _.topContextMenu:case _.topDoubleClick:case _.topMouseDown:case _.topMouseMove:case _.topMouseOut:case _.topMouseOver:case _.topMouseUp:s=f;break;case _.topDrag:case _.topDragEnd:case _.topDragEnter:case _.topDragExit:case _.topDragLeave:case _.topDragOver:case _.topDragStart:case _.topDrop:s=p;break;case _.topTouchCancel:case _.topTouchEnd:case _.topTouchMove:case _.topTouchStart:s=h;break;case _.topAnimationEnd:case _.topAnimationIteration:
case _.topAnimationStart:s=o;break;case _.topTransitionEnd:s=m;break;case _.topScroll:s=v;break;case _.topWheel:s=g;break;case _.topCopy:case _.topCut:case _.topPaste:s=l}s?void 0:w(!1);var y=s.getPooled(i,t,n,a);return r.accumulateTwoPhaseDispatches(y),y},didPutListener:function(e,t,n){if(t===T){var a=e._rootNodeID,r=s.getNodeFromInstance(e);k[a]||(k[a]=i.listen(r,"click",y))}},willDeleteListener:function(e,t){if(t===T){var n=e._rootNodeID;k[n].remove(),delete k[n]}}};e.exports=I},function(e,t,n){
"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(104),r={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(a,r),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(104),r={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};i.augmentClass(a,r),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(104),r={data:null};i.augmentClass(a,r),
e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(279),r={dataTransfer:null};i.augmentClass(a,r),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(212),r={relatedTarget:null};i.augmentClass(a,r),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(104),r={data:null};i.augmentClass(a,r),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a);
}var i=n(212),r=n(400),s=n(2103),o=n(401),l={key:s,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:o,charCode:function(e){return"keypress"===e.type?r(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?r(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};i.augmentClass(a,l),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}
var i=n(212),r=n(401),s={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};i.augmentClass(a,s),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(104),r={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(a,r),e.exports=a},function(e,t,n){"use strict";function a(e,t,n,a){return i.call(this,e,t,n,a)}var i=n(279),r={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0;
},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(a,r),e.exports=a},function(e,t){"use strict";function n(e){for(var t=1,n=0,i=0,r=e.length,s=r&-4;i<s;){for(var o=Math.min(i+4096,s);i<o;i+=4)n+=(t+=e.charCodeAt(i))+(t+=e.charCodeAt(i+1))+(t+=e.charCodeAt(i+2))+(t+=e.charCodeAt(i+3));t%=a,n%=a}for(;i<r;i++)n+=t+=e.charCodeAt(i);return t%=a,n%=a,t|n<<16}var a=65521;e.exports=n},function(e,t,n){
"use strict";function a(e,t,n){var a=null==t||"boolean"==typeof t||""===t;if(a)return"";var i=isNaN(t);if(i||0===t||r.hasOwnProperty(e)&&r[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var i=n(632),r=(n(45),i.isUnitlessNumber);e.exports=a},function(e,t,n){"use strict";function a(e){if(null==e)return null;if(1===e.nodeType)return e;var t=r.get(e);return t?(t=s(t),t?i.getNodeFromInstance(t):null):void o(("function"==typeof e.render,!1))}var i=(n(127),n(59)),r=n(397),s=n(659),o=n(33);
n(45);e.exports=a},function(e,t,n){"use strict";function a(e){if(e.key){var t=r[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?s[e.keyCode]||"Unidentified":""}var i=n(400),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s={
8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=a},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e;
}function a(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var i=n(e),r=0,s=0;i;){if(3===i.nodeType){if(s=r+i.textContent.length,r<=t&&s>=t)return{node:i,offset:t-r};r=s}i=n(a(i))}}e.exports=i},function(e,t,n){"use strict";function a(e){return'"'+i(e)+'"'}var i=n(281);e.exports=a},function(e,t,n){"use strict";var a=n(647);e.exports=a.renderSubtreeIntoContainer},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}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,a,i){var s=e(n,a,i),l=s.dispatch,u=[],d={getState:s.getState,dispatch:function(e){return l(e)}};return u=t.map(function(e){return e(d)}),l=o.default.apply(void 0,u)(s.dispatch),r({},s,{dispatch:l})}}}t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.default=i;var s=n(666),o=a(s)},function(e,t){"use strict";function n(e,t){return function(){
return t(e.apply(void 0,arguments))}}function a(e,t){if("function"==typeof e)return n(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 a=Object.keys(e),i={},r=0;r<a.length;r++){var s=a[r],o=e[s];"function"==typeof o&&(i[s]=n(o,t))}return i}t.__esModule=!0,t.default=a},function(e,t,n){"use strict";
function a(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n=t&&t.type,a=n&&'"'+n.toString()+'"'||"an action";return"Given action "+a+', 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],a=n(void 0,{type:o.ActionTypes.INIT});if("undefined"==typeof a)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.');
var i="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:i}))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={},a=0;a<t.length;a++){var s=t[a];"function"==typeof e[s]&&(n[s]=e[s])}var o,l=Object.keys(n);try{r(n)}catch(u){o=u}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(o)throw o;for(var a=!1,r={},s=0;s<l.length;s++){var u=l[s],d=n[u],c=e[u],f=d(c,t);if("undefined"==typeof f){var p=i(u,t);throw new Error(p)}r[u]=f,a=a||f!==c}return a?r:e}}t.__esModule=!0,t.default=s;var o=n(667),l=n(389),u=(a(l),n(668));a(u);
},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var i=n(667),r=a(i),s=n(2109),o=a(s),l=n(2108),u=a(l),d=n(2107),c=a(d),f=n(666),p=a(f),h=n(668);a(h);t.createStore=r.default,t.combineReducers=o.default,t.bindActionCreators=u.default,t.applyMiddleware=c.default,t.compose=p.default},function(e,t,n){var a,i;/*! tether 1.3.0 */
!function(r,s){a=s,i="function"==typeof a?a.call(t,n,t,e):a,!(void 0!==i&&(e.exports=i))}(this,function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){var t=getComputedStyle(e)||{},n=t.position,a=[];if("fixed"===n)return[e];for(var i=e;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return a.push(i),a;var o=r,l=o.overflow,u=o.overflowX,d=o.overflowY;
/(auto|scroll)/.test(l+d+u)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(r.position)>=0)&&a.push(i)}return a.push(document.body),a}function r(){document.body.removeChild(x),x=void 0}function s(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var n=t.documentElement,a={},i=e.getBoundingClientRect();for(var r in i)a[r]=i[r];var s=k();return a.top-=s.top,a.left-=s.left,"undefined"==typeof a.width&&(a.width=document.body.scrollWidth-a.left-a.right),"undefined"==typeof a.height&&(a.height=document.body.scrollHeight-a.top-a.bottom),
a.top=a.top-n.clientTop,a.left=a.left-n.clientLeft,a.right=t.body.clientWidth-a.width-a.left,a.bottom=t.body.clientHeight-a.height-a.top,a}function o(e){return e.offsetParent||document.documentElement}function l(){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");u(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 a=e.offsetWidth;n===a&&(a=t.clientWidth),document.body.removeChild(t);var i=n-a;return{width:i,height:i}}function u(){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("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.remove(t)});else{
var n=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),a=p(e).replace(n," ");h(e,a)}}function c(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.add(t)});else{d(e,t);var n=p(e)+(" "+t);h(e,n)}}function f(e,t){if("undefined"!=typeof e.classList)return e.classList.contains(t);var n=p(e);return new RegExp("(^| )"+t+"( |$)","gi").test(n)}function p(e){return e.className instanceof SVGAnimatedString?e.className.baseVal:e.className}function h(e,t){e.setAttribute("class",t);
}function m(e,t,n){n.forEach(function(n){t.indexOf(n)===-1&&f(e,n)&&d(e,n)}),t.forEach(function(t){f(e,t)||c(e,t)})}function a(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 g(e,t){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+n>=t&&t>=e-n}function y(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function b(){for(var e={top:0,left:0},t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return n.forEach(function(t){var n=t.top,a=t.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof a&&(a=parseFloat(a,10)),e.top+=n,e.left+=a}),e}function w(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 P(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),"undefined"!=typeof t.nodeType&&!function(){var e=s(t),n=e,a=getComputedStyle(t);t=[n.left,n.top,e.width+n.left,e.height+n.top],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 _=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),S=void 0;"undefined"==typeof S&&(S={modules:[]});var x=null,C=function(){var e=0;return function(){return++e}}(),T={},k=function(){var e=x;e||(e=document.createElement("div"),e.setAttribute("data-tether-id",C()),u(e.style,{top:0,left:0,position:"absolute"
}),document.body.appendChild(e),x=e);var t=e.getAttribute("data-tether-id");if("undefined"==typeof T[t]){T[t]={};var n=e.getBoundingClientRect();for(var a in n)T[t][a]=n[a];M(function(){delete T[t]})}return T[t]},I=[],M=function(e){I.push(e)},A=function(){for(var e=void 0;e=I.pop();)e()},E=function(){function e(){a(this,e)}return _(e,[{key:"on",value:function(e,t,n){var a=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[e]&&(this.bindings[e]=[]),
this.bindings[e].push({handler:t,ctx:n,once:a})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){if("undefined"==typeof this.bindings||"undefined"==typeof this.bindings[e])if("undefined"==typeof 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("undefined"!=typeof this.bindings&&this.bindings[e]){for(var t=0,n=arguments.length,a=Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];
for(;t<this.bindings[e].length;){var r=this.bindings[e][t],s=r.handler,o=r.ctx,l=r.once,u=o;"undefined"==typeof u&&(u=this),s.apply(u,a),l?this.bindings[e].splice(t,1):++t}}}}]),e}();S.Utils={getScrollParents:i,getBounds:s,getOffsetParent:o,extend:u,addClass:c,removeClass:d,hasClass:f,updateClasses:m,defer:M,flush:A,uniqueId:C,Evented:E,getScrollBarSize:l,removeUtilElements:r};var O=function(){function e(e,t){var n=[],a=!0,i=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(a=(s=o.next()).done)&&(n.push(s.value),
!t||n.length!==t);a=!0);}catch(l){i=!0,r=l}finally{try{!a&&o.return&&o.return()}finally{if(i)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")}}(),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),
a&&e(t,a),t}}(),D=function(e,t,n){for(var a=!0;a;){var i=e,r=t,s=n;a=!1,null===i&&(i=Function.prototype);var o=Object.getOwnPropertyDescriptor(i,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(i);if(null===u)return;e=u,t=r,n=s,a=!0,o=u=void 0}};if("undefined"==typeof S)throw new Error("You must include the utils.js file before tether.js");var R=S.Utils,i=R.getScrollParents,s=R.getBounds,o=R.getOffsetParent,u=R.extend,c=R.addClass,d=R.removeClass,m=R.updateClasses,M=R.defer,A=R.flush,l=R.getScrollBarSize,r=R.removeUtilElements,L=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 a=t[n];if(void 0!==e.style[a])return a}}(),N=[],j=function(){N.forEach(function(e){e.position(!1)}),A()};!function(){var e=null,t=null,n=null,a=function i(){return"undefined"!=typeof t&&t>16?(t=Math.min(t-16,250),void(n=setTimeout(i,250))):void("undefined"!=typeof e&&y()-e<10||("undefined"!=typeof n&&(clearTimeout(n),n=null),
e=y(),j(),t=y()-e))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,a)})}();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%"},z=function(e,t){var n=e.left,a=e.top;return"auto"===n&&(n=U[t.left]),"auto"===a&&(a=F[t.top]),{left:n,top:a}},$=function(e){var t=e.left,n=e.top;return"undefined"!=typeof B[e.left]&&(t=B[e.left]),
"undefined"!=typeof B[e.top]&&(n=B[e.top]),{left:t,top:n}},V=function(e){var t=e.split(" "),n=O(t,2),a=n[0],i=n[1];return{top:a,left:i}},H=V,q=function(e){function t(e){var n=this;a(this,t),D(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.position=this.position.bind(this),N.push(this),this.history=[],this.setOptions(e,!1),S.modules.forEach(function(e){"undefined"!=typeof e.initialize&&e.initialize.call(n)}),this.position()}return v(t,e),_(t,[{key:"getClass",value:function(){
var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return"undefined"!=typeof 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],a={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=u(a,e);var r=this.options,s=r.element,o=r.target,l=r.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("undefined"==typeof t[e])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),c(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&c(this.target,this.getClass("target")),
!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=H(this.options.targetAttachment),this.attachment=H(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=i(this.target),this.options.enabled!==!1&&this.enable(n)}},{key:"getTargetBounds",value:function(){
if("undefined"==typeof this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var e=s(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=s(n);var a=getComputedStyle(n),i=n.scrollWidth>n.clientWidth||[a.overflow,a.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;
i&&(r=15);var o=e.height-parseFloat(a.borderTopWidth)-parseFloat(a.borderBottomWidth)-r,t={width:15,height:.975*o*(o/n.scrollHeight),left:e.left+e.width-parseFloat(a.borderLeftWidth)-15},l=0;o<408&&this.target===document.body&&(l=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(t.height=Math.max(t.height,24));var u=this.target.scrollTop/(n.scrollHeight-o);return t.top=u*(o-t.height-l)+e.top+parseFloat(a.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"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof 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&&c(this.target,this.getClass("enabled")),c(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(t){
t!==document&&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,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.position)})}},{key:"destroy",value:function(){var e=this;this.disable(),N.forEach(function(t,n){t===e&&N.splice(n,1)}),0===N.length&&r()}},{key:"updateAttachClasses",value:function(e,t){
var n=this;e=e||this.attachment,t=t||this.targetAttachment;var a=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;e.top&&i.push(this.getClass("element-attached")+"-"+e.top),e.left&&i.push(this.getClass("element-attached")+"-"+e.left),t.top&&i.push(this.getClass("target-attached")+"-"+t.top),
t.left&&i.push(this.getClass("target-attached")+"-"+t.left);var r=[];a.forEach(function(e){r.push(n.getClass("element-attached")+"-"+e),r.push(n.getClass("target-attached")+"-"+e)}),M(function(){"undefined"!=typeof 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=z(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var a=this.cache("element-bounds",function(){return s(e.element)}),i=a.width,r=a.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var u=this.lastSize;i=u.width,r=u.height}else this.lastSize={width:i,height:r};var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),c=d,f=w($(this.attachment),{width:i,height:r}),p=w($(n),c),h=w(this.offset,{width:i,height:r}),m=w(this.targetOffset,c);
f=b(f,h),p=b(p,m);for(var v=d.left+p.left-f.left,g=d.top+p.top-f.top,y=0;y<S.modules.length;++y){var P=S.modules[y],_=P.position.call(this,{left:v,top:g,targetAttachment:n,targetPos:d,elementPos:a,offset:f,targetOffset:p,manualOffset:h,manualTargetOffset:m,scrollbarSize:C,attachment:this.attachment});if(_===!1)return!1;"undefined"!=typeof _&&"object"==typeof _&&(g=_.top,v=_.left)}var x={page:{top:g,left:v},viewport:{top:g-pageYOffset,bottom:pageYOffset-g-r+innerHeight,left:v-pageXOffset,right:pageXOffset-v-i+innerWidth
}},C=void 0;return document.body.scrollWidth>window.innerWidth&&(C=this.cache("scrollbar-size",l),x.viewport.bottom-=C.height),document.body.scrollHeight>window.innerHeight&&(C=this.cache("scrollbar-size",l),x.viewport.right-=C.width),["","static"].indexOf(document.body.style.position)!==-1&&["","static"].indexOf(document.body.parentElement.style.position)!==-1||(x.page.bottom=document.body.scrollHeight-g-r,x.page.right=document.body.scrollWidth-v-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){
var t=e.cache("target-offsetparent",function(){return o(e.target)}),n=e.cache("target-offsetparent-bounds",function(){return s(t)}),a=getComputedStyle(t),i=n,r={};if(["Top","Left","Bottom","Right"].forEach(function(e){r[e.toLowerCase()]=parseFloat(a["border"+e+"Width"])}),n.right=document.body.scrollWidth-n.left-i.width+r.right,n.bottom=document.body.scrollHeight-n.top-i.height+r.bottom,x.page.top>=n.top+r.top&&x.page.bottom>=n.bottom&&x.page.left>=n.left+r.left&&x.page.right>=n.right){var l=t.scrollTop,u=t.scrollLeft;
x.offset={top:x.page.top-n.top+l-r.top,left:x.page.left-n.left+u-r.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),t&&A(),!0}}},{key:"move",value:function(e){var t=this;if("undefined"!=typeof this.element.parentNode){var n={};for(var a in e){n[a]={};for(var i in e[a]){for(var r=!1,s=0;s<this.history.length;++s){var l=this.history[s];if("undefined"!=typeof l[a]&&!g(l[a][i],e[a][i])){r=!0;break}}r||(n[a][i]=!0)}}var d={top:"",left:"",right:"",bottom:""},c=function(e,n){
var a="undefined"!=typeof t.options.optimizations,i=a?t.options.optimizations.gpu:null;if(i!==!1){var r=void 0,s=void 0;e.top?(d.top=0,r=n.top):(d.bottom=0,r=-n.bottom),e.left?(d.left=0,s=n.left):(d.right=0,s=-n.right),d[L]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==L&&(d[L]+=" translateZ(0)")}else e.top?d.top=n.top+"px":d.bottom=n.bottom+"px",e.left?d.left=n.left+"px":d.right=n.right+"px"},f=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(d.position="absolute",
c(n.page,e.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(d.position="fixed",c(n.viewport,e.viewport)):"undefined"!=typeof n.offset&&n.offset.top&&n.offset.left?!function(){d.position="absolute";var a=t.cache("target-offsetparent",function(){return o(t.target)});o(t.element)!==a&&M(function(){t.element.parentNode.removeChild(t.element),a.appendChild(t.element)}),c(n.offset,e.offset),f=!0}():(d.position="absolute",c({top:!0,left:!0},e.page)),!f){for(var p=!0,h=this.element.parentNode;h&&1===h.nodeType&&"BODY"!==h.tagName;){
if("static"!==getComputedStyle(h).position){p=!1;break}h=h.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}var m={},v=!1;for(var i in d){var y=d[i],b=this.element.style[i];b!==y&&(v=!0,m[i]=y)}v&&M(function(){u(t.element.style,m)})}}}]),t}(E);q.modules=[],S.position=j;var W=u(q,S),O=function(){function e(e,t){var n=[],a=!0,i=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(a=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);a=!0);}catch(l){
i=!0,r=l}finally{try{!a&&o.return&&o.return()}finally{if(i)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=S.Utils,s=R.getBounds,u=R.extend,m=R.updateClasses,M=R.defer,K=["left","top","right","bottom"];S.modules.push({position:function(e){var t=this,n=e.top,a=e.left,i=e.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){
return s(t.element)}),o=r.height,l=r.width;if(0===l&&0===o&&"undefined"!=typeof this.lastSize){var d=this.lastSize;l=d.width,o=d.height}var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),f=c.height,p=c.width,h=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,n=e.pinnedClass;t&&h.push(t),n&&h.push(n)}),h.forEach(function(e){["left","top","right","bottom"].forEach(function(t){h.push(e+"-"+t)})});var v=[],g=u({},i),y=u({},this.attachment);
return this.options.constraints.forEach(function(e){var r=e.to,s=e.attachment,u=e.pin;"undefined"==typeof s&&(s="");var d=void 0,c=void 0;if(s.indexOf(" ")>=0){var h=s.split(" "),m=O(h,2);c=m[0],d=m[1]}else d=c=s;var b=P(t,r);"target"!==c&&"both"!==c||(n<b[1]&&"top"===g.top&&(n+=f,g.top="bottom"),n+o>b[3]&&"bottom"===g.top&&(n-=f,g.top="top")),"together"===c&&("top"===g.top&&("bottom"===y.top&&n<b[1]?(n+=f,g.top="bottom",n+=o,y.top="top"):"top"===y.top&&n+o>b[3]&&n-(o-f)>=b[1]&&(n-=o-f,g.top="bottom",
y.top="bottom")),"bottom"===g.top&&("top"===y.top&&n+o>b[3]?(n-=f,g.top="top",n-=o,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*o-f)<=b[3]&&(n+=o-f,g.top="top",y.top="top")),"middle"===g.top&&(n+o>b[3]&&"top"===y.top?(n-=o,y.top="bottom"):n<b[1]&&"bottom"===y.top&&(n+=o,y.top="top"))),"target"!==d&&"both"!==d||(a<b[0]&&"left"===g.left&&(a+=p,g.left="right"),a+l>b[2]&&"right"===g.left&&(a-=p,g.left="left")),"together"===d&&(a<b[0]&&"left"===g.left?"right"===y.left?(a+=p,g.left="right",a+=l,y.left="left"):"left"===y.left&&(a+=p,
g.left="right",a-=l,y.left="right"):a+l>b[2]&&"right"===g.left?"left"===y.left?(a-=p,g.left="left",a-=l,y.left="right"):"right"===y.left&&(a-=p,g.left="left",a+=l,y.left="left"):"center"===g.left&&(a+l>b[2]&&"left"===y.left?(a-=l,y.left="right"):a<b[0]&&"right"===y.left&&(a+=l,y.left="left"))),"element"!==c&&"both"!==c||(n<b[1]&&"bottom"===y.top&&(n+=o,y.top="top"),n+o>b[3]&&"top"===y.top&&(n-=o,y.top="bottom")),"element"!==d&&"both"!==d||(a<b[0]&&("right"===y.left?(a+=l,y.left="left"):"center"===y.left&&(a+=l/2,
y.left="left")),a+l>b[2]&&("left"===y.left?(a-=l,y.left="right"):"center"===y.left&&(a-=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 w=[],_=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],w.push("top")):_.push("top")),n+o>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-o,w.push("bottom")):_.push("bottom")),a<b[0]&&(u.indexOf("left")>=0?(a=b[0],w.push("left")):_.push("left")),a+l>b[2]&&(u.indexOf("right")>=0?(a=b[2]-l,
w.push("right")):_.push("right")),w.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),v.push(e),w.forEach(function(t){v.push(e+"-"+t)})}(),_.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),v.push(e),_.forEach(function(t){v.push(e+"-"+t)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=g.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=g.top=!1),
g.top===i.top&&g.left===i.left&&y.top===t.attachment.top&&y.left===t.attachment.left||(t.updateAttachClasses(y,g),t.trigger("update",{attachment:y,targetAttachment:g}))}),M(function(){t.options.addTargetClasses!==!1&&m(t.target,v,h),m(t.element,v,h)}),{top:n,left:a}}});var R=S.Utils,s=R.getBounds,m=R.updateClasses,M=R.defer;S.modules.push({position:function(e){var t=this,n=e.top,a=e.left,i=this.cache("element-bounds",function(){return s(t.element)}),r=i.height,o=i.width,l=this.getTargetBounds(),u=n+r,d=a+o,c=[];
n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(e){var t=l[e];t!==a&&t!==d||c.push(e)}),a<=l.right&&d>=l.left&&["top","bottom"].forEach(function(e){var t=l[e];t!==n&&t!==u||c.push(e)});var f=[],p=[],h=["left","top","right","bottom"];return f.push(this.getClass("abutted")),h.forEach(function(e){f.push(t.getClass("abutted")+"-"+e)}),c.length&&p.push(this.getClass("abutted")),c.forEach(function(e){p.push(t.getClass("abutted")+"-"+e)}),M(function(){t.options.addTargetClasses!==!1&&m(t.target,p,f),
m(t.element,p,f)}),!0}});var O=function(){function e(e,t){var n=[],a=!0,i=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(a=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);a=!0);}catch(l){i=!0,r=l}finally{try{!a&&o.return&&o.return()}finally{if(i)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 S.modules.push({position:function(e){var t=e.top,n=e.left;
if(this.options.shift){var a=this.options.shift;"function"==typeof this.options.shift&&(a=this.options.shift.call(this,{top:t,left:n}));var i=void 0,r=void 0;if("string"==typeof a){a=a.split(" "),a[1]=a[1]||a[0];var s=a,o=O(s,2);i=o[0],r=o[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=a.top,r=a.left;return t+=i,n+=r,{top:t,left:n}}}}),W})},function(e,t){(function(t){e.exports=t}).call(t,{})}]);