"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[90186],{8450:function(e,t,r){r.r(t),r(29305),r(32733),r(84701),r(81678),r(44962),r(4754),r(94),r(36947),r(78557),r(90076),r(45309),r(83994),r(82367);var n=r(5898),o=r(86191),i=r(41177),a=r(38783);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name="Playback validation",this.type=a.Q.PreplayIntercept,this.id="playaccessvalidation",this.order=-2},(t=[{key:"intercept",value:function(e){var t=e.item;if(!t)return Promise.resolve();var r=t.ServerId;return r?o.A.getApiClient(r).getCurrentUser().then((function(t){return t.Policy.EnableMediaPlayback?Promise.resolve():e.fullscreen?(0,i.A)(n.Ay.translate("MessagePlayAccessRestricted")).finally((function(){return Promise.reject()})):Promise.reject()})):Promise.resolve()}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=s}}]);