@mtgame/core 0.0.61 → 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/mtgame-core.umd.js +8 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/models/basketball-statistic.js +5 -1
- package/esm5/models/basketball-statistic.js +9 -1
- package/fesm2015/mtgame-core.js +4 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +8 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/basketball-statistic.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function m(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){return(f=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function d(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function h(t,e){return function(n,o){e(n,o,t)}}function g(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{u(o.next(t))}catch(t){r(t)}}function s(t){try{u(o.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((o=o.apply(t,e||[])).next())}))}function _(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function v(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}var k=[{id:1,code:"АГРЕС",title:"Агрессор в драке"},{id:2,code:"АТ-В-ГОЛ",title:"Атака в голову или шею"},{id:3,code:"АТ-ВР",title:"Атака вратаря"},{id:4,code:"АТ-СЗ",title:"Атака сзади"},{id:5,code:"БЛОК",title:"Блокировка"},{id:6,code:"БР-КЛ",title:"Бросок клюшки"},{id:7,code:"ВБ-ШБ",title:"Выброс шайбы"},{id:8,code:"ГРУБ",title:"Грубость"},{id:9,code:"ДИСЦ",title:"Дисциплинарный штраф"},{id:10,code:"ДИС-КН",title:"Дисциплинарный до конца матча"},{id:11,code:"ДРАКА",title:"Драка"},{id:12,code:"ЗАЧИН",title:"Зачинщик драки"},{id:13,code:"ЗД-ИГ",title:"Задержка игры"},{id:14,code:"ЗД-КЛ-СП",title:"Задержка клюшки соперника"},{id:15,code:"ЗД-КЛ",title:"Задержка клюшкой"},{id:16,code:"ЗД-СП",title:"Задержка соперника"},{id:17,code:"ЗД-ШБ",title:"Задержка шайбы руками"},{id:18,code:"СЛ-КЛ",title:"Игра со сломанной клюшкой"},{id:19,code:"ВП-КЛ",title:"Игра высоко поднятой клюшкой"},{id:20,code:"КЛ-УД",title:"Колющий удар"},{id:21,code:"СК-ШТ",title:"Малый скамеечный штраф"},{id:22,code:"МШ",title:"Матч-штраф"},{id:23,code:"НП-АТ",title:"Неправильная атака"},{id:24,code:"ЧС-СТ",title:"Нарушение численного состава"},{id:25,code:"НС-КЛ",title:"Нестандартная клюшка"},{id:26,code:"НАР-ЭК",title:"Опасное снаряжение"},{id:27,code:"НС-ПВ",title:"Оскорбление судей и неспортивное поведение"},{id:28,code:"ОТ-ИГ",title:"Отказ начать игру"},{id:29,code:"ОТСЧ",title:"Отсечение"},{id:30,code:"ПЛЕВОК",title:"Плевок"},{id:31,code:"ПОДН",title:"Подножка"},{id:32,code:"ПОДС",title:"Подсечка"},{id:33,code:"ПР-ИН",title:"Предупреждение инфекций"},{id:34,code:"ПК-СК",title:"Покидание скамейки во время конфликта"},{id:35,code:"СД-ВР",title:"Сдвиг ворот"},{id:36,code:"СИМ",title:"Симуляция"},{id:37,code:"ТЛ-БР",title:"Толчок на борт"},{id:38,code:"ТЛ-КЛ",title:"Толчок клюшкой"},{id:39,code:"УД-ГОЛ",title:"Удар головой"},{id:40,code:"УД-КЛ",title:"Удар клюшкой"},{id:41,code:"УД-К-КЛ",title:"Удар концом клюшки"},{id:42,code:"УД-КОЛ",title:"Удар коленом"},{id:43,code:"УД-ЛОК",title:"Удар локтем"},{id:44,code:"УД-НГ",title:"Удар ногой"},{id:45,code:"УКУС",title:"Укус"},{id:46,code:"КН-ЗР",title:"Физический контакт со зрителем"},{id:47,code:"ШТ-ВР",title:"Штраф вратаря"}],T=function(){function t(t){var e,n;if(t)try{for(var o=v(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;this[r]=t[r]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}return t.toFront=function(t){},t.toBack=function(t){},t}();function S(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function P(){return{toFront:function(t){return t?"object"==typeof t?t:k.find((function(e){return e.id===t})):null},toBack:function(t){return t?"object"==typeof t?t.id:t:null}}}function F(t){return{toFront:function(e){return Array.isArray(e)?t.toFront(e):[]},toBack:function(e){return Array.isArray(e)?t.toBack(e):[]}}}var w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds())).toISOString().slice(0,10):void 0},e}(T),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){if(t){new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()));return t.toISOString()}},e}(T);function C(t){return function(e){t&&(t.mappingFields&&(e._mapping_fields_=t.mappingFields),t.relation&&(e._relation_=t.relation),e._to_front_=function(t,n){return function t(e,n,o){var i,r;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a=new e,s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=v(Object.keys(s)),c=l.next();!c.done;c=l.next()){var p=c.value,m=s[p],f=j(p,n);u&&u.hasOwnProperty(m)?a[m]=u[m].toFront(f):a[m]=f}}catch(t){i={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)},e._to_back_=function(t,n){return function t(e,n,o){var i,r;if(!n)return n;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a={},s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=v(Object.keys(s)),c=l.next();!c.done;c=l.next()){var p=c.value,m=s[p];u&&u.hasOwnProperty(m)&&void 0!==n[m]?a[p]=u[m].toBack(n[m]):a[p]=n[m]}}catch(t){i={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)})}}var I,U=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_front_;if(o)return o(e[0],e.length>1?e[1]:void 0)}}},B=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_back_;if(o)return o(e[0])}}};function j(t,e){var n,o;if(e){var i=t.split(".");if(1===i.length)return t in e?e[t]:void 0;try{for(var r=v(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(!e||!(s in e))return;e=e[s]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return e}}(I=t.FileEngine||(t.FileEngine={}))[I.django=1]="django",I[I.s3=2]="s3";var L,A=function(){function e(){}return e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",path:"path",mime_type:"mimeType",size:"size",engine:"engine",created_at:"createdAt"},relation:{engine:S(t.FileEngine),createdAt:G}})],e)}();(L=t.SportTypes||(t.SportTypes={}))[L.basketball=1]="basketball",L[L.volleyball=2]="volleyball",L[L.classic_basketball=3]="classic_basketball",L[L.streetball=4]="streetball",L[L.classic_volleyball=5]="classic_volleyball",L[L.beach_volleyball=6]="beach_volleyball",L[L.hockey=7]="hockey",L[L.ice_hockey=8]="ice_hockey",L[L.ball_hockey=9]="ball_hockey",L[L.football=10]="football",L[L.classic_football=11]="classic_football",L[L.mini_football=12]="mini_football";var O,H,x=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.isBasketball=function(){return this.id===t.SportTypes.basketball||this.parentId===t.SportTypes.basketball},n.prototype.isClassicBasketball=function(){return this.id===t.SportTypes.classic_basketball},n.prototype.isStreetball=function(){return this.id===t.SportTypes.streetball},n.prototype.isVolleyball=function(){return this.id===t.SportTypes.volleyball||this.parentId===t.SportTypes.volleyball},n.prototype.isClassicVolleyball=function(){return this.id===t.SportTypes.classic_volleyball},n.prototype.isBeachVolleyball=function(){return this.id===t.SportTypes.beach_volleyball},n.prototype.isHockey=function(){return this.id===t.SportTypes.hockey||this.parentId===t.SportTypes.hockey},n.prototype.isIceHockey=function(){return this.id===t.SportTypes.ice_hockey},n.prototype.isBallHockey=function(){return this.id===t.SportTypes.ball_hockey},n.prototype.isFootball=function(){return this.id===t.SportTypes.football||this.parentId===t.SportTypes.football},n.prototype.isClassicFootball=function(){return this.id===t.SportTypes.classic_football},n.prototype.isMiniFootball=function(){return this.id===t.SportTypes.mini_football},n.toFront=function(t){return null},n.toBack=function(t){return null},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(T),V=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([C({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name"}})],e)}(T);(O=t.GameBasketballPosition||(t.GameBasketballPosition={}))[O.point_guard=1]="point_guard",O[O.shooting_guard=2]="shooting_guard",O[O.small_forward=3]="small_forward",O[O.power_forward=4]="power_forward",O[O.center=5]="center",(H=t.WorkHand||(t.WorkHand={}))[H.left=1]="left",H[H.right=2]="right";var E,z,N=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameBasketballPosition),workHand:S(t.WorkHand)}})],n)}(T);(E=t.GameVolleyballPosition||(t.GameVolleyballPosition={}))[E.setter=1]="setter",E[E.libero=2]="libero",E[E.middle_player=3]="middle_player",E[E.receiver_attacker=4]="receiver_attacker",E[E.dioganal=5]="dioganal",(z=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[z.left=1]="left",z[z.right=2]="right";var D,R,W=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameVolleyballPosition),workHand:S(t.VolleyballWorkHand)}})],n)}(T);(D=t.GameHockeyPosition||(t.GameHockeyPosition={}))[D.defensemen=1]="defensemen",D[D.forward=2]="forward",D[D.goaltender=3]="goaltender",(R=t.HockeyWorkHand||(t.HockeyWorkHand={}))[R.left=1]="left",R[R.right=2]="right";var q,$,X=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameHockeyPosition),workHand:S(t.HockeyWorkHand)}})],n)}(T);(q=t.GameFootballPosition||(t.GameFootballPosition={}))[q.defensemen=1]="defensemen",q[q.midfielder=2]="midfielder",q[q.forward=3]="forward",q[q.goalkeeper=4]="goalkeeper",($=t.FootballWorkFoot||(t.FootballWorkFoot={}))[$.left=1]="left",$[$.right=2]="right",$[$.both=3]="both";var J,Y=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_foot:"workFoot"},relation:{position:S(t.GameFootballPosition),workFoot:S(t.FootballWorkFoot)}})],n)}(T);(J=t.UserGender||(t.UserGender={}))[J.male=1]="male",J[J.female=2]="female";var K,Z=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){return null},n.toBack=function(t){return null},Object.defineProperty(n.prototype,"fullName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"age",{get:function(){if(!this.birthDate)return null;var t=(new Date).getTime()-this.birthDate.getTime();return Math.floor(t/31536e6)},enumerable:!0,configurable:!0}),d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",last_name:"lastName",first_name:"firstName",middle_name:"middleName",email:"email",phone:"phone",birth_date:"birthDate",photo:"photo",profile:"profile",basketball_profile:"basketballProfile",volleyball_profile:"volleyballProfile",hockey_profile:"hockeyProfile",football_profile:"footballProfile",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:w,photo:A,profile:V,basketballProfile:N,volleyballProfile:W,hockeyProfile:X,footballProfile:Y,city:M,gender:S(t.UserGender)}})],n)}(T),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),this.sport.isHockey()&&t.push("empty-logo-hockey"),this.sport.isFootball()&&t.push("empty-logo-football"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",sport:"sport",logo:"logo",owner:"owner",city:"city",users_count:"usersCount",won_games_count:"wonGamesCount",games_count:"gamesCount",score_sum:"scoreSum",closest_game_datetime:"closestGameDatetime"},relation:{sport:x,logo:A,owner:Z,city:M,closestGameDatetime:w}})],e)}(T),tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:Z}})],e)}(T),et=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.regulationFiles=[],e}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"vkLink",{get:function(){return this.socialLinks.find((function(t){return"https://vk.com/"===t.substr(0,15)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fbLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.facebook.com/"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instaLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.instagram.com"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",logo:"logo",contact_email:"contactEmail",contact_phone:"contactPhone",name:"name",alias:"alias",sport:"sport",description:"description",social_links:"socialLinks",links:"links",organization:"organization",tournaments_count:"tournamentsCount",closest_game_datetime:"closestGameDatetime",cover:"cover",about:"about",regulation_files:"regulationFiles"},relation:{organization:tt,logo:A,cover:A,sport:x,regulationFiles:F(A)}})],e)}(T);(K=t.TournamentSeasonStatuses||(t.TournamentSeasonStatuses={}))[K.open=0]="open",K[K.in_progress=1]="in_progress",K[K.closed=2]="closed";var nt,ot,it,rt,at,st,ut,lt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",status:"status",start_date:"startDate",closed_date:"closedDate"},relation:{logo:A,cover:A,previewImage:A,status:S(t.TournamentSeasonStatuses),startDate:w,closedDate:w}})],n)}(T);(nt=t.TournamentTypes||(t.TournamentTypes={})).group="group",nt.elimination="elimination",nt.fiba="fiba",(ot=t.TournamentStatuses||(t.TournamentStatuses={}))[ot.open=0]="open",ot[ot.in_progress=1]="in_progress",ot[ot.closed=2]="closed",(it=t.TournamentGender||(t.TournamentGender={}))[it.male=1]="male",it[it.female=2]="female",it[it.all=3]="all",(rt=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[rt.standard=1]="standard",rt[rt.light=2]="light",rt[rt.advanced=3]="advanced",(at=t.VolleyballStatisticTypes||(t.VolleyballStatisticTypes={}))[at.standard=1]="standard",at[at.light=2]="light",at[at.advanced=3]="advanced",(st=t.GameTimeTypes||(t.GameTimeTypes={}))[st.clean=1]="clean",st[st.dirty=2]="dirty",(ut=t.OvertimeTypes||(t.OvertimeTypes={}))[ut.to_score_total=1]="to_score_total",ut[ut.to_score_diff=2]="to_score_diff",ut[ut.time=3]="time",ut[ut.without_overtime=4]="without_overtime",ut[ut.to_first_goal=5]="to_first_goal",ut[ut.to_first_goal_and_bullitts=6]="to_first_goal_and_bullitts",ut[ut.bullitts=7]="bullitts",ut[ut.penalties=8]="penalties",ut[ut.time_and_penalties=9]="time_and_penalties";var ct,pt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",gender:"gender",age_from:"ageFrom",age_to:"ageTo",max_team_players:"maxTeamPlayers",max_game_players:"maxGamePlayers",type:"type",tours_count:"toursCount",periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",game_up_to_score:"gameUpToScore",volleyball_score_in_set:"volleyballScoreInSet",volleyball_score_in_last_set:"volleyballScoreInLastSet",manage_team_application:"manageTeamApplication",recruitment_is_open:"recruitmentIsOpen",transfer_is_open:"transferIsOpen",basketball_statistic_type:"basketballStatisticType",volleyball_statistic_type:"volleyballStatisticType",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType",with_result_table:"withResultTable"},relation:{type:S(t.TournamentTypes),gender:S(t.TournamentGender),basketballStatisticType:S(t.BasketballStatisticTypes),volleyballStatisticType:S(t.VolleyballStatisticTypes),gameTimeType:S(t.GameTimeTypes),overtimeType:S(t.OvertimeTypes)}})],n)}(T),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",team:"team",points:"points"},relation:{team:Q}})],e)}(T),ft=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),this.sport.isHockey()&&t.push("empty-logo-hockey"),this.sport.isFootball()&&t.push("empty-logo-football"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",city:"city",sport:"sport",location:"location",description:"description",date:"date",price:"price",regulation_files:"regulationFiles",settings:"settings",league:"league",teams_count:"teamsCount",closest_game_datetime:"closestGameDatetime",status:"status",team_winner:"teamWinner",team_second:"teamSecond",team_third:"teamThird",season:"season",season_id:"seasonId"},relation:{logo:A,cover:A,previewImage:A,city:M,sport:x,regulationFile:A,settings:pt,date:G,league:et,status:S(t.TournamentStatuses),teamWinner:mt,teamSecond:mt,teamThird:mt,season:lt}})],n)}(T),dt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",game_up_to_score:"gameUpToScore",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",statistic_type:"statisticType",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType"},relation:{overtimeType:S(t.OvertimeTypes),statisticType:S(t.BasketballStatisticTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(T);(ct=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[ct.best_of_five=1]="best_of_five",ct[ct.best_of_three=2]="best_of_three";var ht,gt,_t=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"setsCount",{get:function(){return this.gameType===t.VolleyballGameTypes.best_of_three?3:5},enumerable:!0,configurable:!0}),n.prototype.getSetMaxScore=function(t){return t===this.setsCount?this.scoreInLastSet:this.scoreInSet},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",score_in_set:"scoreInSet",score_in_last_set:"scoreInLastSet",statistic_type:"statisticType"},relation:{gameType:S(t.VolleyballGameTypes),statisticType:S(t.VolleyballStatisticTypes)}})],n)}(T),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(T),yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isVideo",{get:function(){return Boolean(this.videoUrl)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",original_photo:"originalPhoto",list_photo:"listPhoto",detail_photo:"detailPhoto",game:"game",tournament:"tournament",game_id:"gameId",tournament_id:"tournament_id",video_url:"videoUrl",video_preview:"videoPreview",is_live:"isLive"},relation:{originalPhoto:A,listPhoto:A,detailPhoto:A,videoPreview:A}})],e)}(T),bt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",game_time_type:"gameTimeType"},relation:{overtimeType:S(t.OvertimeTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(T),kt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",game_time_type:"gameTimeType"},relation:{overtimeType:S(t.OvertimeTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(T);(ht=t.GameStatuses||(t.GameStatuses={}))[ht.open=1]="open",ht[ht.in_progress=2]="in_progress",ht[ht.closed=3]="closed",ht[ht.archived=4]="archived",ht[ht.draft=5]="draft",(gt=t.GameResultTypes||(t.GameResultTypes={}))[gt.team_won=1]="team_won",gt[gt.competitor_team_won=2]="competitor_team_won",gt[gt.team_technical_defeat=3]="team_technical_defeat",gt[gt.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var Tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"scoreByPeriodList",{get:function(){var t=this;return this.scoreByPeriod?Object.keys(this.scoreByPeriod).map((function(e){return{period:+e,teamScore:t.scoreByPeriod[e][0],competitorTeamScore:t.scoreByPeriod[e][1]}})):[]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.status===t.GameStatuses.closed},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isTeamWon",{get:function(){return this.teamScore>this.competitorTeamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCompetitorTeamWon",{get:function(){return this.competitorTeamScore>this.teamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"teamWinnerId",{get:function(){return this.status!==t.GameStatuses.closed||this.teamScore===this.competitorTeamScore?null:this.team.id?this.teamScore>this.competitorTeamScore?this.team.id:this.competitorTeam.id:this.teamScore>this.competitorTeamScore?this.teamId:this.competitorTeamId},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",status:"status",team:"team",tournament_team_id:"tournamentTeamId",team_id:"teamId",competitor_team:"competitorTeam",competitor_tournament_team_id:"competitorTournamentTeamId",competitor_team_id:"competitorTeamId",competitor_team_name:"competitorTeamName",datetime:"datetime",location:"location",team_score:"teamScore",competitor_team_score:"competitorTeamScore",result_type:"resultType",playoff_number:"playoffNumber",tournament_id:"tournamentId",tournament_tour:"tournamentTour",basketball_game_config:"basketballGameConfig",volleyball_game_config:"volleyballGameConfig",hockey_game_config:"hockeyGameConfig",football_game_config:"footballGameConfig",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_court:"tournamentCourt",media_count:"mediaCount",media_live_count:"mediaLiveCount",media:"media",tournament:"tournament"},relation:{status:S(t.GameStatuses),team:Q,competitorTeam:Q,datetime:G,resultType:S(t.GameResultTypes),basketballGameConfig:dt,volleyballGameConfig:_t,hockeyGameConfig:bt,footballGameConfig:kt,tournamentCourt:vt,media:F(yt),tournament:ft}})],n)}(T);function St(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(o&&Ct(o)){if(!o(t))return t}else if(t.id!==e.id)return t;return t.updatedAt&&e.updatedAt&&!n&&t.updatedAt>e.updatedAt?t:e})):t}function Pt(t,e,n,o){return void 0===n&&(n=!1),e.forEach((function(e){t=St(t,e,n,o)})),t}function Ft(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return Ct(o)?o(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function wt(t,e,n,o){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=Ft(t,e,n,o)})),t}function Gt(t,e){return Array.isArray(t)?Ct(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function Ct(t){return t&&"[object Function]"==={}.toString.call(t)}var It,Ut=function(){function t(t){this.engine=t,this.data={}}return t.prototype.get=function(t){return this.getSubject(t).pipe(o.filter((function(t){return void 0!==t})))},t.prototype.value=function(t){return this.getSubject(t).value},t.prototype.save=function(t,e){this.getSubject(t).next(e),this.engine&&this.engine.save(t,e)},t.prototype.appendItem=function(t,e,n){this.save(t,Ft(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,wt(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,Ft(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,wt(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,o){this.save(t,St(this.value(t)||[],e,n,o))},t.prototype.updateItems=function(t,e,n,o){this.save(t,Pt(this.value(t)||[],e,n,o))},t.prototype.deleteItem=function(t,e){this.save(t,Gt(this.value(t)||[],e))},t.prototype.dispose=function(){var t,e;try{for(var n=v(Object.keys(this.data)),o=n.next();!o.done;o=n.next()){var i=o.value;this.data[i].complete(),delete this.data[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.clearStorageData=function(){this.engine&&this.engine.clear()},t.prototype.getEngine=function(){return this.engine},t.prototype.getSubject=function(t){return this.data[t]||(this.data[t]=new i.BehaviorSubject(this.engine?this.engine.get(t):void 0)),this.data[t]},t}(),Bt=function(){function t(){this.store=new Ut}return t.prototype.dispose=function(){this.store.dispose()},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),jt=function(t){function n(e){var n=t.call(this)||this;return n.configData=e,e&&n.initialize(e),n}return m(n,t),Object.defineProperty(n.prototype,"config$",{get:function(){return this.store.get("config")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"config",{get:function(){return this.store.value("config")||{}},enumerable:!0,configurable:!0}),n.prototype.initialize=function(t){this.store.save("config",t)},n.prototype.set=function(t,e){var n;this.store.save("config",f(f({},this.config),((n={})[t]=e,n)))},n.prototype.get=function(t){return this.store.value("config")&&this.store.value("config")[t]},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:["mtg-core-config-data"]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject("mtg-core-config-data",8))},token:n,providedIn:"root"}),n=d([e.Injectable({providedIn:"root"}),h(0,e.Optional()),h(0,e.Inject("mtg-core-config-data"))],n)}(Bt),Lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",tournament_stage_id:"tournamentStageId"}})],e)}(T),At=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",tournament:"tournament",team:"team",group:"group",final_standing:"finalStanding",games_count:"gamesCount",won_games_count:"wonGamesCount",draw_games_count:"drawGamesCount",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",score_sum:"scoreSum",missed_sum:"missedSum",score_points_sum:"scorePointsSum",missed_points_sum:"missedPointsSum",points:"points",users_count:"usersCount",games:"games",notifications_count:"notificationsCount",win_normal_time_games_count:"winNormalTimeGamesCount",lose_normal_time_games_count:"loseNormalTimeGamesCount",win_overtime_games_count:"winOvertimeGamesCount",lose_overtime_games_count:"loseOvertimeGamesCount"},relation:{tournament:ft,team:Q,group:Lt,games:Tt}})],e)}(T);(It=t.TeamUserRole||(t.TeamUserRole={}))[It.member=1]="member",It[It.moderator=2]="moderator",It[It.admin=3]="admin",It[It.coach=4]="coach",It[It.head_coach=5]="head_coach",It[It.playing_coach=6]="playing_coach",It[It.manager=7]="manager",It[It.head_manager=8]="head_manager",It[It.captain=9]="captain",It[It.assistant=10]="assistant";var Ot,Ht=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:Z,team:Q,role:S(t.TeamUserRole)}})],n)}(T),xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:w,dateTo:w}})],e)}(T),Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"fullName",{get:function(){return[this.lastName,this.firstName,this.middleName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team:"tournamentTeam",team_user:"teamUser",disqualified:"disqualified",first_name:"firstName",last_name:"lastName",middle_name:"middleName",photo:"photo",disqualification:"disqualification",has_changes:"hasChanges",rating:"rating"},relation:{tournamentTeam:At,teamUser:Ht,photo:A,disqualification:xt}})],e)}(T),Mt=function(){},Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"totalFouls",{get:function(){return this.personalFouls+this.technicalFouls+this.unsportsmanlikeFouls},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",free_throws_made:"freeThrowsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",two_point_percent:"twoPointPercent",three_point_percent:"threePointPercent",free_throw_percent:"freeThrowPercent",one_point_percent:"onePointPercent",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",newbie:"newbie"},relation:{tournamentTeamUser:Vt,team:Q,teamUser:Ht,user:Z,tournamentTeam:At,month:w}})],e)}(Mt),zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Et,competitorTeam:Et}})],e)}(T),Nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"totalFouls",{get:function(){return(this.personalFouls||0)+(this.technicalFouls||0)+(this.unsportsmanlikeFouls||0)},enumerable:!0,configurable:!0}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",points:"points",free_throws_made:"freeThrowsMade",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",updated_at:"updatedAt"},relation:{updatedAt:G}})],e)}(T);(Ot=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[Ot.enter_game=1]="enter_game",Ot[Ot.exit_game=2]="exit_game",Ot[Ot.remove_game=3]="remove_game",Ot[Ot.two_point_made=4]="two_point_made",Ot[Ot.three_point_made=5]="three_point_made",Ot[Ot.free_throw_made=6]="free_throw_made",Ot[Ot.two_point_attempt=7]="two_point_attempt",Ot[Ot.three_point_attempt=8]="three_point_attempt",Ot[Ot.free_throw_attempt=9]="free_throw_attempt",Ot[Ot.assist=10]="assist",Ot[Ot.block=11]="block",Ot[Ot.rebound=12]="rebound",Ot[Ot.offensive_rebound=13]="offensive_rebound",Ot[Ot.defensive_rebound=14]="defensive_rebound",Ot[Ot.steal=15]="steal",Ot[Ot.turnover=16]="turnover",Ot[Ot.personal_foul=17]="personal_foul",Ot[Ot.technical_foul=18]="technical_foul",Ot[Ot.unsportsmanlike_foul=19]="unsportsmanlike_foul",Ot[Ot.one_point_attempt=20]="one_point_attempt",Ot[Ot.one_point_made=21]="one_point_made",Ot[Ot.timeout=22]="timeout";var Dt,Rt,Wt=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.isPointsType=function(){return[t.BasketballGameLogTypes.two_point_made,t.BasketballGameLogTypes.three_point_made,t.BasketballGameLogTypes.free_throw_made,t.BasketballGameLogTypes.one_point_made].indexOf(this.logType)>-1},n.prototype.isReboundType=function(){return[t.BasketballGameLogTypes.rebound,t.BasketballGameLogTypes.offensive_rebound,t.BasketballGameLogTypes.defensive_rebound].indexOf(this.logType)>-1},n.prototype.isFoulType=function(){return[t.BasketballGameLogTypes.personal_foul,t.BasketballGameLogTypes.technical_foul,t.BasketballGameLogTypes.unsportsmanlike_foul].indexOf(this.logType)>-1},n.prototype.getScore=function(){var e;return((e={})[t.BasketballGameLogTypes.one_point_made]=1,e[t.BasketballGameLogTypes.free_throw_made]=1,e[t.BasketballGameLogTypes.two_point_made]=2,e[t.BasketballGameLogTypes.three_point_made]=3,e)[this.logType]},n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight"},relation:{datetime:G,logType:S(t.BasketballGameLogTypes)}})],n)}(T),qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",is_mvp:"isMvp",updated_at:"updatedAt"},relation:{teamUser:Ht,tournamentTeamUser:Vt,updatedAt:G}})],e)}(T),$t=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},t.prototype.getMvp=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/mvp/").pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Xt=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return zt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return Nt.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/logs/").pipe(o.map((function(t){return Wt.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/game_protocol/?file_type="+e,{responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadFibaProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/game_protocol_fiba/?file_type="+e,{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t),Jt=function(){function t(){}return t.toFront=function(t){return null},t.toBack=function(t){return null},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([C({mappingFields:{id:"id",theme:"theme",message:"message",files:"files",email:"email",captcha:"captcha"},relation:{files:A}})],t)}(),Yt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.sendFeedback=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/feedback/",Jt.toBack(t)).pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()]}))}))},t.prototype.sendLeagueFeedback=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/feedback/",Jt.toBack(e)).pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Kt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.upload=function(t,e){return g(this,void 0,void 0,(function(){var n;return _(this,(function(i){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/",n).pipe(o.map((function(t){return A.toFront(t)}))).toPromise()]}))}))},t.prototype.createZipArchive=function(t){return g(this,void 0,void 0,(function(){var e,n,o,i,r,a;return _(this,(function(s){e=new FormData;try{for(n=v(t),o=n.next();!o.done;o=n.next())i=o.value,e.append("files",i.file,i.filename)}catch(t){r={error:t}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/zip_archive/",e,{responseType:"blob"}).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();(Dt=t.HockeyGameLogTypes||(t.HockeyGameLogTypes={}))[Dt.enter_game=1]="enter_game",Dt[Dt.exit_game=2]="exit_game",Dt[Dt.shot_miss=3]="shot_miss",Dt[Dt.shot_on_goal=4]="shot_on_goal",Dt[Dt.shot_blocked=5]="shot_blocked",Dt[Dt.goal=6]="goal",Dt[Dt.shootout_attempt=7]="shootout_attempt",Dt[Dt.shootout_goal=8]="shootout_goal",Dt[Dt.assist=9]="assist",Dt[Dt.block_shot=10]="block_shot",Dt[Dt.minor_penalty=11]="minor_penalty",Dt[Dt.major_penalty=12]="major_penalty",Dt[Dt.misconduct_penalty=13]="misconduct_penalty",Dt[Dt.game_misconduct_penalty=14]="game_misconduct_penalty",Dt[Dt.match_penalty=15]="match_penalty",Dt[Dt.penalty_shot=16]="penalty_shot",Dt[Dt.face_off_lose=17]="face_off_lose",Dt[Dt.face_off_win=18]="face_off_win",Dt[Dt.save=19]="save",Dt[Dt.timeout=20]="timeout",Dt[Dt.penalty_start=21]="penalty_start",Dt[Dt.penalty_end=22]="penalty_end",(Rt=t.HockeyAdvantageTypes||(t.HockeyAdvantageTypes={}))[Rt.power_play=1]="power_play",Rt[Rt.shorthanded=2]="shorthanded",Rt[Rt.even_strength=3]="even_strength";var Zt,Qt=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),Object.defineProperty(n.prototype,"penalizedGameUserId",{get:function(){return this._penalizedGameUserId?this._penalizedGameUserId:this.gameUserId},set:function(t){this._penalizedGameUserId=t},enumerable:!0,configurable:!0}),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return[t.HockeyGameLogTypes.goal,t.HockeyGameLogTypes.shootout_goal].indexOf(this.logType)>-1},n.prototype.isPenaltyType=function(){return[t.HockeyGameLogTypes.minor_penalty,t.HockeyGameLogTypes.major_penalty,t.HockeyGameLogTypes.misconduct_penalty,t.HockeyGameLogTypes.game_misconduct_penalty,t.HockeyGameLogTypes.penalty_shot,t.HockeyGameLogTypes.match_penalty].indexOf(this.logType)>-1},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",advantage:"advantage",advantage_num:"advantageNum",is_goalie:"isGoalie",penalty_type:"penaltyType",penalized_game_user_id:"penalizedGameUserId",mutual_penalty:"mutualPenalty"},relation:{datetime:G,logType:S(t.HockeyGameLogTypes),advantage:S(t.HockeyAdvantageTypes),penaltyType:P()}})],n)}(T),te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsOnGoal",{get:function(){return(this.evShotsOnGoal||0)+(this.ppShotsOnGoal||0)+(this.shShotsOnGoal||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsBlocked",{get:function(){return(this.evShotsBlocked||0)+(this.ppShotsBlocked||0)+(this.shShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotMisses",{get:function(){return(this.evShotMisses||0)+(this.ppShotMisses||0)+(this.shShotMisses||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ppShots",{get:function(){return(this.ppShotMisses||0)+(this.ppShotsOnGoal||0)+(this.ppShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"evShots",{get:function(){return(this.evShotMisses||0)+(this.evShotsOnGoal||0)+(this.evShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shShots",{get:function(){return(this.shShotMisses||0)+(this.shShotsOnGoal||0)+(this.shShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shots",{get:function(){return this.ppShots+this.evShots+this.shShots},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"goals",{get:function(){return(this.ppGoals||0)+(this.shGoals||0)+(this.evGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"assists",{get:function(){return(this.ppAssists||0)+(this.evAssists||0)+(this.shAssists||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceOffs",{get:function(){return(this.faceOffWins||0)+(this.faceOffLosses||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shootOuts",{get:function(){return(this.shootoutAttempts||0)+(this.shootoutGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsAgainst",{get:function(){return(this.saves||0)+(this.goalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",updated_at:"updatedAt",points:"points",pp_shot_misses:"ppShotMisses",pp_shots_on_goal:"ppShotsOnGoal",pp_shots_blocked:"ppShotsBlocked",ev_shot_misses:"evShotMisses",ev_shots_on_goal:"evShotsOnGoal",ev_shots_blocked:"evShotsBlocked",sh_shot_misses:"shShotMisses",sh_shots_on_goal:"shShotsOnGoal",sh_shots_blocked:"shShotsBlocked",pp_goals:"ppGoals",ev_goals:"evGoals",sh_goals:"shGoals",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus"},relation:{updatedAt:G}})],e)}(T),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"assists",{get:function(){return(this.ppAssists||0)+(this.shAssists||0)+(this.evAssists||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",lose_games_count:"loseGamesCount",points:"points",pp_shots:"ppShots",pp_shot_misses:"ppShotMisses",pp_shots_on_goal:"ppShotsOnGoal",pp_shots_blocked:"ppShotsBlocked",ev_shots:"evShots",ev_shot_misses:"evShotMisses",ev_shots_on_goal:"evShotsOnGoal",ev_shots_blocked:"evShotsBlocked",sh_shots:"shShots",sh_shot_misses:"shShotMisses",sh_shots_on_goal:"shShotsOnGoal",sh_shots_blocked:"shShotsBlocked",pp_goals_percent:"ppGoalsPercent",pp_goals:"ppGoals",ev_goals_percent:"evGoalsPercent",ev_goals:"evGoals",sh_goals_percent:"shGoalsPercent",goals:"goals",sh_goals:"shGoals",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots:"shots",goals_percent:"goalsPercent",shots_against:"shotsAgainst",saves_percent:"savesPercent",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",face_offs:"faceOffs",face_off_percent:"faceOffPercent",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie"},relation:{tournamentTeamUser:Vt,team:Q,teamUser:Ht,user:Z,tournamentTeam:At,month:w}})],e)}(Mt),ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:ee,competitorTeam:ee}})],e)}(T),oe=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/team_statistic/").pipe(o.map((function(t){return ne.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/user_statistic/").pipe(o.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/logs/").pipe(o.map((function(t){return Qt.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadApplication=function(t,e,o){return g(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/game_application_file/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t);(Zt=t.FootballGameLogTypes||(t.FootballGameLogTypes={}))[Zt.enter_game=1]="enter_game",Zt[Zt.exit_game=2]="exit_game",Zt[Zt.shot_miss=3]="shot_miss",Zt[Zt.shot_on_goal=4]="shot_on_goal",Zt[Zt.shot_blocked=5]="shot_blocked",Zt[Zt.goal=6]="goal",Zt[Zt.penalty_attempt=7]="penalty_attempt",Zt[Zt.penalty_goal=8]="penalty_goal",Zt[Zt.penalty_save=9]="penalty_save",Zt[Zt.small_penalty_attempt=10]="small_penalty_attempt",Zt[Zt.small_penalty_goal=11]="small_penalty_goal",Zt[Zt.small_penalty_save=12]="small_penalty_save",Zt[Zt.assist=13]="assist",Zt[Zt.block_shot=14]="block_shot",Zt[Zt.corner=15]="corner",Zt[Zt.free_kick=16]="free_kick",Zt[Zt.foul=17]="foul",Zt[Zt.save=18]="save",Zt[Zt.yellow_card=19]="yellow_card",Zt[Zt.red_card=20]="red_card",Zt[Zt.perfect_pass=21]="perfect_pass",Zt[Zt.loss=22]="loss",Zt[Zt.steal=23]="steal",Zt[Zt.out=24]="out",Zt[Zt.timeout=25]="timeout";var ie,re=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return[t.FootballGameLogTypes.goal,t.FootballGameLogTypes.penalty_goal,t.FootballGameLogTypes.small_penalty_goal].indexOf(this.logType)>-1},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",is_goalie:"isGoalie"},relation:{datetime:G,logType:S(t.FootballGameLogTypes)}})],n)}(T),ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shots",{get:function(){return(this.shotMisses||0)+(this.shotsOnGoal||0)+(this.shotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoals",{get:function(){return(this.goals||0)+(this.penaltyGoals||0)+(this.smallPenaltyGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"goalsPercent",{get:function(){return this.shots&&this.totalGoals?Math.round(1e3*this.totalGoals/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsOnGoalPercent",{get:function(){return this.shotsOnGoal&&this.shots?Math.round(1e3*this.shotsOnGoal/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penalties",{get:function(){return(this.penaltyGoals||0)+(this.penaltyAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyGoalsPercent",{get:function(){return this.penaltyAttempts&&this.penaltyGoals?Math.round(1e3*this.penaltyGoals/this.penaltyAttempts)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenalties",{get:function(){return(this.smallPenaltyGoals||0)+(this.smallPenaltyAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltyGoalsPercent",{get:function(){return this.smallPenaltyAttempts&&this.smallPenaltyGoals?Math.round(1e3*this.smallPenaltyGoals/this.smallPenaltyAttempts)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsAgainst",{get:function(){return(this.saves||0)+(this.goalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyShotsAgainst",{get:function(){return(this.penaltySaves||0)+(this.penaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltyShotsAgainst",{get:function(){return(this.smallPenaltySaves||0)+(this.smallPenaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoalsAgainst",{get:function(){return(this.goalsAgainst||0)+(this.penaltyGoalsAgainst||0)+(this.smallPenaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalSaves",{get:function(){return(this.saves||0)+(this.penaltySaves||0)+(this.smallPenaltySaves||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltySavesPercent",{get:function(){return this.penaltyShotsAgainst&&this.penaltySaves?Math.round(1e3*this.penaltySaves/this.penaltyShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltySavesPercent",{get:function(){return this.smallPenaltyShotsAgainst&&this.smallPenaltySaves?Math.round(1e3*this.smallPenaltySaves/this.smallPenaltyShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",updated_at:"updatedAt",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",goals:"goals",assists:"assists",corners:"corners",free_kicks:"freeKicks",penalty_goals:"penaltyGoals",penalty_attempts:"penaltyAttempts",penalty_goals_against:"penaltyGoalsAgainst",penalty_saves:"penaltySaves",small_penalty_goals:"smallPenaltyGoals",small_penalty_attempts:"smallPenaltyAttempts",small_penalty_goals_against:"smallPenaltyGoalsAgainst",small_penalty_saves:"smallPenaltySaves",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",game_time:"gameTime",plus_minus:"plusMinus",fouls:"fouls",yellow_cards:"yellowCards",red_cards:"redCards",perfect_passes:"perfectPasses",losses:"losses",steals:"steals",outs:"outs",block_shots:"blockShots"},relation:{updatedAt:G}})],e)}(T),se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots_on_goal_percent:"shotsOnGoalPercent",shots:"shots",goals:"goals",goals_percent:"goalsPercent",total_goals:"totalGoals",assists:"assists",penalty_goals:"penaltyGoals",penalty_attempts:"penaltyAttempts",penalty_goals_percent:"penaltyGoalsPercent",penalty_saves:"penaltySaves",penalty_goals_against:"penaltyGoalsAgainst",penalty_shots_against:"penaltyShotsAgainst",penalty_saves_percent:"penaltySavesPercent",small_penalty_goals:"smallPenaltyGoals",small_penalty_attempts:"smallPenaltyAttempts",small_penalty_goals_percent:"smallPenaltyGoalsPercent",small_penalty_saves:"smallPenaltySaves",small_penalty_goals_against:"smallPenaltyGoalsAgainst",small_penalty_shots_against:"smallPenaltyShotsAgainst",small_penalty_saves_percent:"smallPenaltySavesPercent",saves:"saves",saves_percent:"savesPercent",total_saves:"totalSaves",goals_against:"goalsAgainst",total_goals_against:"totalGoalsAgainst",shots_against:"shotsAgainst",safety_rate:"safetyRate",fouls:"fouls",yellow_cards:"yellowCards",red_cards:"redCards",perfect_passes:"perfectPasses",losses:"losses",steals:"steals",outs:"outs",block_shots:"blockShots",corners:"corners",free_kicks:"freeKicks",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie"},relation:{tournamentTeamUser:Vt,team:Q,teamUser:Ht,user:Z,tournamentTeam:At,month:w}})],e)}(Mt),ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:se,competitorTeam:se}})],e)}(T),le=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/team_statistic/").pipe(o.map((function(t){return ue.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/user_statistic/").pipe(o.map((function(t){return ae.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/logs/").pipe(o.map((function(t){return re.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadApplication=function(t,e,o){return g(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/game_application_file/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:A,author:Z,createdAt:G}})],e)}(T),pe=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([C({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount"}})],t)}(),me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:F(pe)}})],e)}(T);(ie=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[ie.open=0]="open",ie[ie.in_progress=1]="in_progress",ie[ie.closed=2]="closed";var fe,de=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:w,status:S(t.TournamentStageStatuses)}})],n)}(T);function he(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}(fe=t.PlayoffTypes||(t.PlayoffTypes={})).double_elimination="double_elimination",fe.elimination="elimination";var ge,_e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount",type:"type"},relation:{type:S(t.PlayoffTypes)}})],n)}(T),ve=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stages=[],e}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"stagesCount",{get:function(){return Math.log(this.settings.teamsCount)/Math.log(2)},enumerable:!0,configurable:!0}),e.prototype.getPlayoffStages=function(){var t=this;if(0===this.stages.length&&this.settings.teamsCount){var e=Math.log(this.settings.teamsCount)/Math.log(2);this.stages=he(e).map((function(e){var n=t.settings.teamsCount/Math.pow(2,e);return{value:e,title:1===n?"Финал":"1 / "+n}}))}return this.stages},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:_e}})],e)}(T),ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",tournament_team:"tournamentTeam",user:"user",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",serve_percent:"servePercent",ace_percent:"acePercent",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",block_percent:"blockPercent",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",attack_percent:"attackPercent",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",receive_percent:"receivePercent",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",serve_receive_percent:"serveReceivePercent",points:"points",faults:"faults",newbie:"newbie"},relation:{team:Q,teamUser:Ht,tournamentTeamUser:Vt,tournamentTeam:At,user:Z,month:w}})],e)}(Mt),be=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team:"tournamentTeam",group:"group",tournament_stage_id:"tournamentStageId",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",missed_sum:"missedSum",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",points:"points",final_standing:"finalStanding",received_points:"receivedPoints"},relation:{tournamentTeam:At,group:Lt}})],e)}(T);(ge=t.LeagueNewsType||(t.LeagueNewsType={}))[ge.text=1]="text",ge[ge.video=2]="video";var ke,Te=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",title:"title",datetime:"datetime",preview_text:"previewText",detail_text:"detailText",picture:"picture",cover:"cover",mobile_picture:"mobilePicture",is_main:"isMain",tournaments:"tournaments",type:"type",video_link:"videoLink",tag:"tag"},relation:{datetime:G,picture:A,cover:A,mobilePicture:A,tournaments:F(ft),type:S(t.LeagueNewsType)}})],n)}(T);(ke=t.TournamentEventTypes||(t.TournamentEventTypes={}))[ke.game_closed=1]="game_closed",ke[ke.media_added=2]="media_added",ke[ke.news=3]="news";var Se,Pe,Fe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",game:"game",news:"news",league:"league",tournaments:"tournaments",event:"event",datetime:"datetime"},relation:{game:Tt,news:Te,league:et,tournaments:F(ft),datetime:w,event:S(t.TournamentEventTypes)}})],n)}(T);!function(t){t[t.admin=1]="admin",t[t.moderator=2]="moderator",t[t.game_manager=3]="game_manager"}(Se||(Se={})),function(t){t[t.settings=1]="settings",t[t.users=2]="users",t[t.teams=3]="teams",t[t.media=4]="media",t[t.news=5]="news",t[t.game_export=6]="game_export",t[t.schedule=7]="schedule",t[t.game_management=8]="game_management"}(Pe||(Pe={}));!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}m(e,t),Object.defineProperty(e.prototype,"role",{get:function(){return this._role},set:function(t){this._role=Se[t]},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",user:"user",role:"role",permissions:"permissions"},relation:{user:Z,permissions:F(S(Pe))}})],e)}(T);var we=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/"+e+"/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getNews=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(o.map((function(t){return ce.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Fe.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentStages=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoff=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffGames=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(o.map((function(t){return me.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return void 0===r&&(r={}),g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=Ge(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Tt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getStageTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(o.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(o.map((function(t){return Vt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserGames=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/games/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getBasketballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e}).pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e}).pipe(o.map((function(t){return ye.toFront(t)}))).toPromise()]}))}))},i.prototype.getHockeyStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/hockey_statistic/",{params:e}).pipe(o.map((function(t){return ee.toFront(t)}))).toPromise()]}))}))},i.prototype.getFootballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/football_statistic/",{params:e}).pipe(o.map((function(t){return se.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeamUsers=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/users/").pipe(o.map((function(t){return Vt.toFront(t)}))).toPromise()]}))}))},i.prototype.myPermission=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/permission/").pipe(o.map((function(t){return(t.permissions||[]).map((function(t){return Pe[t]}))}))).toPromise()]}))}))},i.prototype.getTournamentTeamTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentUserTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();function Ge(e,n){if(e.tournamentIds&&(n=n.set("tournament_ids",e.tournamentIds.join(","))),e.tournamentStageId&&(n=n.set("tournament_stage_id",e.tournamentStageId.toString())),e.tournamentTour&&(n=n.set("tournament_tour",e.tournamentTour.toString())),e.playoffStage&&(n=n.set("playoff_stage",e.playoffStage.toString())),e.teamId&&(n=n.set("team_id",e.teamId.toString())),e.status&&(n=n.set("status",t.GameStatuses[e.status])),e.statuses){var o=e.statuses.map((function(e){return t.GameStatuses[e]}));n=n.set("statuses",o.join(","))}return e.tournamentCourtId&&(n=n.set("tournament_court_id",e.tournamentCourtId.toString())),e.userId&&(n=n.set("user_id",e.userId.toString())),n}var Ce,Ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort"},relation:{picture:A}})],e)}(T);(Ce=t.BannerLocation||(t.BannerLocation={})).slider="slider",Ce.central="central",Ce.media="media";var Ue,Be=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort",location:"location"},relation:{picture:A,location:S(t.BannerLocation)}})],n)}(T),je=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(o.map((function(t){return et.toFront(t)}))).toPromise()]}))}))},i.prototype.getByDomain=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(o.map((function(t){return et.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Fe.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentSeasons=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=Ge(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Tt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getSeasons=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=(new n.HttpParams).set("not_closed",e?"1":""),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/",{params:i}).pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getPartners=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/partners/").pipe(o.map((function(t){return Ie.toFront(t)}))).toPromise()]}))}))},i.prototype.getBanners=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=e?(new n.HttpParams).set("location",e):new n.HttpParams,[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/banners/",{params:i}).pipe(o.map((function(t){return Be.toFront(t)}))).toPromise()]}))}))},i.prototype.getCourts=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/courts/").pipe(o.map((function(t){return vt.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Le=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getLeagueNewsList=function(e,i,r,a){return void 0===a&&(a=t.LeagueNewsType.text),g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()).set("type",t.LeagueNewsType[a]),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/news/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Te.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getMainLeagueNews=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/?is_main=true").pipe(o.map((function(t){return t&&t.length>0?Te.toFront(t[0]):null}))).toPromise()]}))}))},i.prototype.getMainLeagueNewsList=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/?is_main=true").pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.getNewsById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_news/"+t+"/").pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentNewsList=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/",{observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Te.toFront(t.body)}}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Ae=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getMedia=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Tt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Tt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueMedia=function(t,e,i,r){return void 0===r&&(r={}),g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()).set("size",i.toString()),r.mediaType&&(a=a.set("media_type",r.mediaType)),r.sort&&(a=a.set("sort",r.sort)),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/media/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMediaById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGameMedia=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.createZip=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadMedia=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/download/",{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();(Ue=t.PollStatuses||(t.PollStatuses={}))[Ue.open=1]="open",Ue[Ue.closed=2]="closed",Ue[Ue.archived=3]="archived";var Oe,He=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{uuid:"uuid",name:"name"}})],e)}(T),xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:Z}})],e)}(T),Ve=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.variantsWithAnswers=[],t}return m(n,e),Object.defineProperty(n.prototype,"variants",{get:function(){return this._variants},set:function(t){this._variants=t||[],this._answers&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"answers",{get:function(){return this._answers},set:function(t){this._answers=t||[],this._variants&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),n.prototype.calculateAnswersPercentage=function(){var t=this;if(this._answers.length){var e=this._variants.map((function(t){return t.uuid})),n=this._answers.reduce((function(t,n){return e.indexOf(n.answerUuid)<0||(t[n.answerUuid]||(t[n.answerUuid]=0),t[n.answerUuid]++),t}),{});this.variantsWithAnswers=this._variants.map((function(e){return{variant:e,percent:n[e.uuid]?Math.round(100*n[e.uuid]/t._answers.length):0}})).sort((function(t,e){return t.percent>e.percent?-1:1}))}},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",active:"active",status:"status",team_id:"teamId",name:"name",description:"description",variants:"variants",author:"author",answers:"answers",multiple_answer:"multipleAnswer",anonymous:"anonymous",created_at:"createdAt"},relation:{status:S(t.PollStatuses),variants:He,author:Z,answers:xe,createdAt:G}})],n)}(T),Me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",user_id:"userId",user:"user",team:"team",team_id:"teamId",user_accept:"userAccept",team_accept:"teamAccept",users_count:"usersCount",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",created_at:"createdAt",updated_at:"updatedAt"},relation:{user:Z,team:Q,createdAt:G,updateAt:G}})],e)}(T);(Oe=t.GameInviteStatus||(t.GameInviteStatus={}))[Oe.accepted=1]="accepted",Oe[Oe.declined=2]="declined";var Ee,ze,Ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:Tt,teamUser:Ht,status:S(t.GameInviteStatus)}})],n)}(T);(Ee=t.TeamEventTypes||(t.TeamEventTypes={}))[Ee.training=1]="training",Ee[Ee.other=2]="other";var De,Re=((ze={})[t.TeamEventTypes.training]="Тренировка",ze[t.TeamEventTypes.other]="Другое",ze),We=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return this.eventType===t.TeamEventTypes.other?this.eventCustomName:Re[this.eventType]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.datetime.getTime()<(new Date).getTime()},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:S(t.TeamEventTypes),team:Q,datetime:G}})],n)}(T);(De=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[De.accepted=1]="accepted",De[De.declined=2]="declined";var qe,$e,Xe=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:S(t.TeamEventInviteStatuses)}})],e)}(),Je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:Ht}})],e)}(T),Ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return(null===this.teamAccept||null===this.organizationAccept)&&!1!==this.teamAccept&&!1!==this.organizationAccept},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team:"team",tournament:"tournament",team_accept:"teamAccept",organization_accept:"organizationAccept",user_invites_count:"userInvitesCount",user_invites:"userInvites",notifications_count:"notificationsCount"},relation:{team:Q,tournament:ft,userInvites:Je}})],e)}(T);(qe=t.NotificationType||(t.NotificationType={}))[qe.team_updated=1]="team_updated",qe[qe.team_invited=2]="team_invited",qe[qe.team_join_request=3]="team_join_request",qe[qe.team_join_declined_by_team=4]="team_join_declined_by_team",qe[qe.team_join_declined_by_user=5]="team_join_declined_by_user",qe[qe.team_join_canceled_by_team=6]="team_join_canceled_by_team",qe[qe.team_join_canceled_by_user=7]="team_join_canceled_by_user",qe[qe.team_joined_for_user=8]="team_joined_for_user",qe[qe.team_joined_for_team=9]="team_joined_for_team",qe[qe.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",qe[qe.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",qe[qe.team_user_number_changed=12]="team_user_number_changed",qe[qe.team_user_deleted_for_user=13]="team_user_deleted_for_user",qe[qe.team_user_deleted_for_team=14]="team_user_deleted_for_team",qe[qe.team_user_left=15]="team_user_left",qe[qe.game_updated=16]="game_updated",qe[qe.game_invited=17]="game_invited",qe[qe.game_invite_accepted=18]="game_invite_accepted",qe[qe.game_invite_declined=19]="game_invite_declined",qe[qe.game_remind=20]="game_remind",qe[qe.game_won=21]="game_won",qe[qe.game_losing=22]="game_losing",qe[qe.game_tech_defeat=23]="game_tech_defeat",qe[qe.game_tech_victory=24]="game_tech_victory",qe[qe.poll_created=25]="poll_created",qe[qe.poll_closed=26]="poll_closed",qe[qe.team_event_invited=27]="team_event_invited",qe[qe.team_event_accepted=28]="team_event_accepted",qe[qe.team_event_declined=29]="team_event_declined",qe[qe.team_event_remind=30]="team_event_remind",qe[qe.tournament_invited=31]="tournament_invited",qe[qe.tournament_joined=32]="tournament_joined",qe[qe.tournament_join_declined=33]="tournament_join_declined",qe[qe.tournament_join_canceled=34]="tournament_join_canceled",qe[qe.tournament_user_invited=35]="tournament_user_invited",qe[qe.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",qe[qe.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",qe[qe.tournament_user_added=38]="tournament_user_added",qe[qe.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",qe[qe.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",qe[qe.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",qe[qe.tournament_user_deleted=42]="tournament_user_deleted",qe[qe.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",qe[qe.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",qe[qe.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",qe[qe.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",qe[qe.tournament_team_deleted=47]="tournament_team_deleted",qe[qe.org_tournament_invite_created=48]="org_tournament_invite_created",qe[qe.org_tournament_invite_declined=49]="org_tournament_invite_declined",qe[qe.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",qe[qe.org_tournament_invite_changed=51]="org_tournament_invite_changed",qe[qe.org_tournament_user_deleted=52]="org_tournament_user_deleted",qe[qe.org_tournament_user_invited=53]="org_tournament_user_invited",qe[qe.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",qe[qe.org_tournament_team_leave=55]="org_tournament_team_leave",($e=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[$e.public=1]="public",$e[$e.org=2]="org";var Ke,Ze=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"important",{get:function(){return!0},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",event_type:"event",data:"data",initiator:"initiator",team:"team",team_invite:"teamInvite",team_user:"teamUser",poll:"poll",game:"game",game_invite:"gameInvite",team_event:"teamEvent",team_event_invite:"teamEventInvite",tournament:"tournament",tournament_invite:"tournamentInvite",tournament_team:"tournamentTeam",viewed:"viewed",protected:"protected",service:"service",created_at:"createdAt"},relation:{event:S(t.NotificationType),initiator:Z,team:Q,teamInvite:Me,teamUser:Ht,poll:Ve,game:Tt,gameInvite:Ne,teamEvent:We,teamEventInvite:Xe,tournament:ft,tournamentInvite:Ye,tournamentTeam:At,service:S(t.NotificationServiceEnum),createdAt:G}})],n)}(T);(Ke=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[Ke.all=1]="all",Ke[Ke.important=2]="important",Ke[Ke.none=3]="none";var Qe,tn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:S(t.NotificationAllowTypes),browser:S(t.NotificationAllowTypes)}})],n)}(T),en=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCount=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/count/").pipe(o.map((function(t){return+t}))).toPromise()]}))}))},t.prototype.getList=function(t,e,i){return void 0===i&&(i={}),g(this,void 0,void 0,(function(){var r,a,s,u,l,c;return _(this,(function(p){r=(new n.HttpParams).set("page",t.toString()).set("size",e.toString());try{for(a=v(Object.keys(i)),s=a.next();!s.done;s=a.next())u=s.value,r=r.set(u,i[u])}catch(t){l={error:t}}finally{try{s&&!s.done&&(c=a.return)&&c.call(a)}finally{if(l)throw l.error}}return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/",{params:r,observe:"response"}).pipe(o.map((function(t){var e=Ze.toFront(t.body);return{total:+t.headers.get("x-page-count"),data:e}}))).toPromise()]}))}))},t.prototype.markViewed=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/"+t+"/viewed/",{viewed:e}).pipe(o.map((function(t){return Ze.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(o.map((function(t){return Ze.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(o.map((function(t){return tn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",tn.toBack(t)).pipe(o.map((function(t){return tn.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),nn=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(en),on=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/org/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(en),rn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCities=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(o.map((function(t){return M.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(o.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(T);(Qe=t.TeamPermissionTypes||(t.TeamPermissionTypes={}))[Qe.for_all=1]="for_all",Qe[Qe.for_users=2]="for_users",Qe[Qe.for_team=3]="for_team";var sn,un=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{players:"players",games:"games",statistic:"statistic",polls:"polls",events:"events"},relation:{players:S(t.TeamPermissionTypes),games:S(t.TeamPermissionTypes),statistic:S(t.TeamPermissionTypes),polls:S(t.TeamPermissionTypes),events:S(t.TeamPermissionTypes)}})],n)}(T),ln=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{can_edit:"canEdit",can_view_users:"canViewUsers",can_manage_permission:"canManagePermission",can_change_owner:"canChangeOwner",can_delete:"canDelete",can_manage_invites:"canManageInvites",can_view_invites:"canViewInvites",can_manage_polls:"canManagePolls",can_view_polls:"canViewPolls",can_answer_poll:"canAnswerPoll",can_manage_games:"canManageGames",can_view_games:"canViewGames",can_view_statistic:"canViewStatistic",can_promote_users:"canPromoteUsers",can_edit_users:"canEditUsers",can_delete_users:"canDeleteUsers",can_view_events:"canViewEvents",can_manage_events:"canManageEvents",can_view_tournaments:"canViewTournaments",can_manage_tournaments:"canManageTournaments",role:"role"},relation:{role:S(t.TeamUserRole)}})],n)}(T),cn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.search=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=(new n.HttpParams).set("search",t),e&&(i=i.set("sport",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/",{params:i}).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.create=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/",Q.toBack(t)).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/").pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamAccess=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/access/").pipe(o.map((function(t){return ln.toFront(t)}))).toPromise()]}))}))},i.prototype.update=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/",Q.toBack(e)).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.delete=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.id+"/").toPromise()]}))}))},i.prototype.getPermission=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/").pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.updatePermission=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/",un.toBack(e)).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsers=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=new n.HttpParams,e&&(i=i.set("tournament_id",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/",{params:i}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserRole=function(e,n,i){return g(this,void 0,void 0,(function(){return _(this,(function(r){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+e+"/users/"+n+"/role/",{role:t.TeamUserRole[i]}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserNumber=function(t,e,n){return g(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/"+e+"/number/",{number:n.toString()}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteUser=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.teamId+"/users/"+t.id+"/").toPromise()]}))}))},i.prototype.changeOwner=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/owner/",{id:e.id}).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvites=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/").pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInvite=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/",{user:e}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/accept/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/decline/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.resendInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/resend/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvitesExternal=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/").pipe(o.map((function(t){return an.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInviteExternal=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/",an.toBack(e)).pipe(o.map((function(t){return an.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteInviteExternal=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/").toPromise()]}))}))},i.prototype.resendInviteExternal=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/resend/",{}).pipe(o.map((function(t){return an.toFront(t)}))).toPromise()]}))}))},i.prototype.getPolls=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/"+(e?"?archive=1":"")).pipe(o.map((function(t){return Ve.toFront(t)}))).toPromise()]}))}))},i.prototype.createPoll=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/",Ve.toBack(e)).pipe(o.map((function(t){return Ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsersStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/statistics/").pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return ye.toFront(t)}))).toPromise()]}))}))},i.prototype.joinTeam=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/join/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.leaveTeam=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/leave/",{}).toPromise()]}))}))},i.prototype.getGames=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/"+(e?"?archive=1":"")).pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.createGame=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/",Tt.toBack(e)).pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/").pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},i.prototype.createTeamEvent=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/",We.toBack(e)).pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_teams/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentInvites=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_invites/").pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",i.toString()),r&&(a=a.set("size",r.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/"+e+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Tt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.acceptTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/accept/",{}).pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},i.prototype.declineTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/decline/",{}).pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},i.prototype.registerLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/lazy_user/",{user:Z.toBack(e)}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getLazyUser=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.updateLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/",{user:Z.toBack(e)}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteLazyUser=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").toPromise()]}))}))},i.prototype.resendLazyUserEmail=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/resend_email/",{}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),pn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamEvent=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},t.prototype.updateTeamEvent=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team_event/"+t.id+"/",We.toBack(t)).pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},t.prototype.deleteTeamEvent=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").toPromise()]}))}))},t.prototype.getTeamEventInvites=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/").pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.prototype.createTeamEventInvite=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/",{team_user_id:e}).pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/accept/",{}).pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.prototype.declineTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/decline/",{}).pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"usersCount",{get:function(){return this.validUsersCount+this.invalidUsersCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.hasAccess&&!this.inviteSent&&!this.alreadyInTournament},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(T),fn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",join_data:"joinData"},relation:{team:Q,joinData:mn}})],e)}(T),dn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamsForJoin=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams_for_join/").pipe(o.map((function(t){return fn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={team:{id:e},user_invites:Je.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",i).pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),hn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/"+e+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=Ge(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Tt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Fe.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Tt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/teams/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/games_stages/").pipe(o.map((function(t){return me.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),gn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(o.map((function(t){return Lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(o.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),_n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{edit:"edit",personal_data:"personalData",teams:"teams",statistic:"statistic",games:"games"}})],e)}(T);(sn=t.UserPermissionTypes||(t.UserPermissionTypes={}))[sn.denied=1]="denied",sn[sn.for_all=2]="for_all",sn[sn.for_users=3]="for_users",sn[sn.for_team=4]="for_team";var vn,yn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",personal_data:"personalData",games:"games",teams:"teams",statistic:"statistic"},relation:{personalData:S(t.UserPermissionTypes),games:S(t.UserPermissionTypes),teams:S(t.UserPermissionTypes),statistic:S(t.UserPermissionTypes)}})],n)}(T),bn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCurrentUser=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/").pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/").pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.getAccess=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/access/").pipe(o.map((function(t){return _n.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUser=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/",Z.toBack(e)).pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPhoto=function(t,e){return g(this,void 0,void 0,(function(){var n;return _(this,(function(i){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/photo/",n).pipe(o.map((function(t){return A.toFront(t)}))).toPromise()]}))}))},t.prototype.changePassword=function(t,e,n,o){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={old_password:e,password:n,password_confirm:o},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_password/",i).toPromise()]}))}))},t.prototype.changeEmail=function(t,e,n){return g(this,void 0,void 0,(function(){var o;return _(this,(function(i){return o={email:e,password:n},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email/",o).toPromise()]}))}))},t.prototype.changeEmailConfirm=function(t,e,n,o){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={email:e,password:n,token:o},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email_confirm/",i).toPromise()]}))}))},t.prototype.getUserProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/profile/").pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.getBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/basketball_profile/").pipe(o.map((function(t){return N.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_profile/").pipe(o.map((function(t){return W.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/profile/",V.toBack(t)).pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/basketball_profile/",N.toBack(t)).pipe(o.map((function(t){return N.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserVolleyballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/volleyball_profile/",W.toBack(t)).pipe(o.map((function(t){return W.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserPermissions=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/permission/").pipe(o.map((function(t){return yn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPermission=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/current/permission/",yn.toBack(t)).pipe(o.map((function(t){return yn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/teams/").pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},t.prototype.getInvites=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/invites/").pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/accept/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},t.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/decline/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},t.prototype.getStatistics=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/statistics/").pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},t.prototype.getStreetballStatistics=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/streetball_statistics/").pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return ye.toFront(t)}))).toPromise()]}))}))},t.prototype.getGames=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/games/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},t.prototype.getGameInvites=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/").pipe(o.map((function(t){return Ne.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptGameInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/accept/",{}).pipe(o.map((function(t){return Ne.toFront(t)}))).toPromise()]}))}))},t.prototype.declineGameInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/decline/",{}).pipe(o.map((function(t){return Ne.toFront(t)}))).toPromise()]}))}))},t.prototype.searchUsers=function(t){return g(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=(new n.HttpParams).set("search",t),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/",{params:e}).pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.setWizardShowed=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.put(this.configService.get("apiUrl")+"/api/v1/user/current/wizards/",{wizard:t}).pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/team_events/").pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:ye,competitorTeam:ye}})],e)}(T),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attacks",{get:function(){return this.attackSpikes+this.attackShots},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blocks",{get:function(){return this.stuffBlocks+this.blockRebounds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalReceives",{get:function(){return this.receives+this.excellentReceives},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",points:"points",faults:"faults",yellow_cards:"yellowCards"}})],e)}(T);(vn=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[vn.enter_game=1]="enter_game",vn[vn.exit_game=2]="exit_game",vn[vn.remove_game=3]="remove_game",vn[vn.serve_hit=4]="serve_hit",vn[vn.serve_fault=5]="serve_fault",vn[vn.serve_ace=6]="serve_ace",vn[vn.stuff_block=7]="stuff_block",vn[vn.block_fault=8]="block_fault",vn[vn.block_rebound=9]="block_rebound",vn[vn.attack_spike=10]="attack_spike",vn[vn.attack_fault=11]="attack_fault",vn[vn.attack_shot=12]="attack_shot",vn[vn.receive=13]="receive",vn[vn.receive_fault=14]="receive_fault",vn[vn.excellent_receive=15]="excellent_receive",vn[vn.point=16]="point",vn[vn.fault=17]="fault",vn[vn.serve_receive=18]="serve_receive",vn[vn.serve_receive_fault=19]="serve_receive_fault",vn[vn.excellent_serve_receive=20]="excellent_serve_receive",vn[vn.timeout=21]="timeout",vn[vn.yellow_card=22]="yellow_card";var Sn,Pn,Fn,wn,Gn,Cn,In,Un,Bn,jn,Ln,An,On,Hn,xn,Vn,Mn=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],En=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],zn=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.rally===t.rally&&this.set===t.set?this.datetime&&t.datetime?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.id<t.id?1:-1:this.set===t.set?this.rally<t.rally?1:-1:this.set<t.set?1:-1},n.prototype.isScoreType=function(){return Mn.includes(this.logType)},n.prototype.isFaultType=function(){return En.includes(this.logType)},n.prototype.isServe=function(){return[t.VolleyballGameLogType.serve_hit,t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.serve_fault].includes(this.logType)},n.prototype.isAttack=function(){return[t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.attack_shot].includes(this.logType)},n.prototype.isReceive=function(){return[t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.receive,t.VolleyballGameLogType.excellent_receive].includes(this.logType)},n.prototype.isServeReceive=function(){return[t.VolleyballGameLogType.serve_receive_fault,t.VolleyballGameLogType.serve_receive,t.VolleyballGameLogType.excellent_serve_receive].includes(this.logType)},n.prototype.isBlock=function(){return[t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.block_rebound,t.VolleyballGameLogType.stuff_block].includes(this.logType)},n.prototype.isEnterExit=function(){return[t.VolleyballGameLogType.enter_game,t.VolleyballGameLogType.exit_game,t.VolleyballGameLogType.timeout].includes(this.logType)},n.prototype.isComboType=function(){return![t.VolleyballGameLogType.receive,t.VolleyballGameLogType.serve_receive].includes(this.logType)},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",log_type:"logType",set:"set",rally:"rally",position:"position",team_id:"teamId",datetime:"datetime"},relation:{logType:S(t.VolleyballGameLogType),datetime:G}})],n)}(T),Nn=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return kn.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return Tn.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/logs/").pipe(o.map((function(t){return zn.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t),Dn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_team/"+t+"/").pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()},t.prototype.getTournamentTeams=function(t,e){var i=(new n.HttpParams).set("league_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_team/"+t+"/tournament_teams/",{params:i}).pipe(o.map((function(t){return At.toFront(t)}))).toPromise()},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Rn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/").pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()},t.prototype.getTournaments=function(t,e){var i=(new n.HttpParams).set("league_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/tournaments/",{params:i}).pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()},t.prototype.getTournamentUser=function(t,e){var i=(new n.HttpParams).set("season_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/tournament_user/",{params:i}).pipe(o.map((function(t){return Vt.toFront(t)}))).toPromise()},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Wn=((Sn={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",Sn[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",Sn[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",Sn[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",Sn[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",Sn[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",Sn[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",Sn[t.BasketballGameLogTypes.two_point_made]="2 очка",Sn[t.BasketballGameLogTypes.three_point_made]="3 очка",Sn[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",Sn[t.BasketballGameLogTypes.one_point_made]="1 очко",Sn[t.BasketballGameLogTypes.assist]="Передача",Sn[t.BasketballGameLogTypes.block]="Блокшот",Sn[t.BasketballGameLogTypes.rebound]="Подбор",Sn[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",Sn[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",Sn[t.BasketballGameLogTypes.steal]="Перехват",Sn[t.BasketballGameLogTypes.turnover]="Потеря",Sn[t.BasketballGameLogTypes.personal_foul]="Фол",Sn[t.BasketballGameLogTypes.technical_foul]="Технический фол",Sn[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",Sn[t.BasketballGameLogTypes.timeout]="Таймаут",Sn),qn=((Pn={})[t.HockeyGameLogTypes.enter_game]="Выход на площадку",Pn[t.HockeyGameLogTypes.exit_game]="Ушел с площадки",Pn[t.HockeyGameLogTypes.shot_miss]="Бросок мимо",Pn[t.HockeyGameLogTypes.shot_on_goal]="Бросок по воротам",Pn[t.HockeyGameLogTypes.shot_blocked]="Заблокированный бросок",Pn[t.HockeyGameLogTypes.goal]="Гол",Pn[t.HockeyGameLogTypes.shootout_attempt]="Булит промах",Pn[t.HockeyGameLogTypes.shootout_goal]="Булит гол",Pn[t.HockeyGameLogTypes.assist]="Передача",Pn[t.HockeyGameLogTypes.block_shot]="Блокировка броска",Pn[t.HockeyGameLogTypes.minor_penalty]="Малый штраф",Pn[t.HockeyGameLogTypes.major_penalty]="Большой штраф",Pn[t.HockeyGameLogTypes.misconduct_penalty]="Дисциплинарный штраф",Pn[t.HockeyGameLogTypes.game_misconduct_penalty]="Дисциплинарный штраф до конца игры",Pn[t.HockeyGameLogTypes.match_penalty]="Матч-штраф",Pn[t.HockeyGameLogTypes.penalty_shot]="Штрафной бросок",Pn[t.HockeyGameLogTypes.face_off_lose]="Проигрыш в вбрасывании",Pn[t.HockeyGameLogTypes.face_off_win]="Победа в вбрасывании",Pn[t.HockeyGameLogTypes.save]="Отражен бросок",Pn[t.HockeyGameLogTypes.timeout]="Таймаут",Pn[t.HockeyGameLogTypes.penalty_start]="Начало штрафного времени",Pn[t.HockeyGameLogTypes.penalty_end]="Конец штрафного времени",Pn),$n=((Fn={})[t.FootballGameLogTypes.enter_game]="Выход на поле",Fn[t.FootballGameLogTypes.exit_game]="Ушел с поля",Fn[t.FootballGameLogTypes.shot_miss]="Удар мимо",Fn[t.FootballGameLogTypes.shot_on_goal]="Удар в створ",Fn[t.FootballGameLogTypes.shot_blocked]="Заблокированный удар",Fn[t.FootballGameLogTypes.goal]="Гол",Fn[t.FootballGameLogTypes.assist]="Передача",Fn[t.FootballGameLogTypes.penalty_attempt]="Пенальти промах",Fn[t.FootballGameLogTypes.penalty_goal]="Пенальти гол",Fn[t.FootballGameLogTypes.small_penalty_attempt]="10-метровый промах",Fn[t.FootballGameLogTypes.small_penalty_goal]="10-метровый гол",Fn[t.FootballGameLogTypes.block_shot]="Блокировка удара",Fn[t.FootballGameLogTypes.corner]="Угловой",Fn[t.FootballGameLogTypes.free_kick]="Штрафной удар",Fn[t.FootballGameLogTypes.save]="Отражен удар",Fn[t.FootballGameLogTypes.penalty_save]="Отражен пенальти",Fn[t.FootballGameLogTypes.small_penalty_save]="Отражен 10 метровый",Fn[t.FootballGameLogTypes.foul]="Фол",Fn[t.FootballGameLogTypes.yellow_card]="Желтая карточка",Fn[t.FootballGameLogTypes.red_card]="Красная карточка",Fn[t.FootballGameLogTypes.perfect_pass]="Пас",Fn[t.FootballGameLogTypes.loss]="Потеря",Fn[t.FootballGameLogTypes.steal]="Перехват",Fn[t.FootballGameLogTypes.out]="Аут",Fn[t.FootballGameLogTypes.timeout]="Таймаут",Fn),Xn=((wn={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",wn[t.OvertimeTypes.to_score_total]="До N очков",wn[t.OvertimeTypes.time]="По времени",wn[t.OvertimeTypes.without_overtime]="Без овертайма",wn[t.OvertimeTypes.to_first_goal]="На N минут до первой шайбы",wn[t.OvertimeTypes.to_first_goal_and_bullitts]="На N минут до первой шайбы + буллиты",wn[t.OvertimeTypes.bullitts]="Буллиты",wn[t.OvertimeTypes.penalties]="Пенальти",wn[t.OvertimeTypes.time_and_penalties]="Дополнительное время + пенальти",wn),Jn=((Gn={})[t.TeamUserRole.member]="Пользователь",Gn[t.TeamUserRole.moderator]="Модератор",Gn[t.TeamUserRole.admin]="Владелец",Gn[t.TeamUserRole.coach]="Тренер",Gn[t.TeamUserRole.head_coach]="Главный тренер",Gn[t.TeamUserRole.playing_coach]="Играющий тренер",Gn[t.TeamUserRole.manager]="Менеджер",Gn[t.TeamUserRole.head_manager]="Генеральный менеджер",Gn[t.TeamUserRole.captain]="Капитан",Gn[t.TeamUserRole.assistant]="Ассистент",Gn),Yn=((Cn={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",Cn[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",Cn[t.GameBasketballPosition.small_forward]="Легкий форвард",Cn[t.GameBasketballPosition.power_forward]="Мощный форвард",Cn[t.GameBasketballPosition.center]="Центровой",Cn),Kn=((In={})[t.GameBasketballPosition.point_guard]="PG",In[t.GameBasketballPosition.shooting_guard]="SG",In[t.GameBasketballPosition.small_forward]="SF",In[t.GameBasketballPosition.power_forward]="PF",In[t.GameBasketballPosition.center]="C",In),Zn=((Un={})[t.WorkHand.left]="Левая",Un[t.WorkHand.right]="Правая",Un),Qn=((Bn={})[t.GameVolleyballPosition.setter]="Связующий",Bn[t.GameVolleyballPosition.libero]="Либеро",Bn[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",Bn[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",Bn[t.GameVolleyballPosition.dioganal]="Диагональный",Bn),to=((jn={})[t.GameVolleyballPosition.setter]="S",jn[t.GameVolleyballPosition.libero]="L",jn[t.GameVolleyballPosition.middle_player]="MP",jn[t.GameVolleyballPosition.receiver_attacker]="RA",jn[t.GameVolleyballPosition.dioganal]="D",jn),eo=((Ln={})[t.GameVolleyballPosition.setter]="связ.",Ln[t.GameVolleyballPosition.libero]="либеро",Ln[t.GameVolleyballPosition.middle_player]="блок.",Ln[t.GameVolleyballPosition.receiver_attacker]="доигр.",Ln[t.GameVolleyballPosition.dioganal]="диаг.",Ln),no=((An={})[t.VolleyballWorkHand.left]="Левая",An[t.VolleyballWorkHand.right]="Правая",An),oo=((On={})[t.GameHockeyPosition.goaltender]="Вратарь",On[t.GameHockeyPosition.defensemen]="Защитник",On[t.GameHockeyPosition.forward]="Нападающий",On),io=((Hn={})[t.GameFootballPosition.goalkeeper]="Вратарь",Hn[t.GameFootballPosition.defensemen]="Защитник",Hn[t.GameFootballPosition.midfielder]="Полузащитник",Hn[t.GameFootballPosition.forward]="Нападающий",Hn),ro=((xn={})[t.FootballWorkFoot.left]="Левая",xn[t.FootballWorkFoot.right]="Правая",xn[t.FootballWorkFoot.both]="Обе",xn),ao=((Vn={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",Vn[t.VolleyballGameLogType.exit_game]="Уход с площадки",Vn[t.VolleyballGameLogType.remove_game]="Удаление с площадки",Vn[t.VolleyballGameLogType.serve_ace]="Эйс",Vn[t.VolleyballGameLogType.serve_hit]="Подача",Vn[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",Vn[t.VolleyballGameLogType.attack_spike]="Результативная атака",Vn[t.VolleyballGameLogType.attack_shot]="Атака",Vn[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",Vn[t.VolleyballGameLogType.stuff_block]="Результативный блок",Vn[t.VolleyballGameLogType.block_rebound]="Блок",Vn[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",Vn[t.VolleyballGameLogType.excellent_receive]="Отличный прием",Vn[t.VolleyballGameLogType.receive]="Прием",Vn[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",Vn[t.VolleyballGameLogType.serve_receive]="Прием подачи",Vn[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",Vn[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",Vn[t.VolleyballGameLogType.point]="Очко",Vn[t.VolleyballGameLogType.fault]="Ошибка",Vn[t.VolleyballGameLogType.timeout]="Таймаут",Vn[t.VolleyballGameLogType.yellow_card]="Предупреждение",Vn),so=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",files:"files",key_code:"keyCode"},relation:{files:F(A)}})],e)}(T),uo=function(){function t(t,e){this.httpClient=t,this.configService=e,this.channels$={},this.subscriptions={},this.connectedSubject=new i.BehaviorSubject(!1)}return Object.defineProperty(t.prototype,"connected$",{get:function(){return this.connectedSubject},enumerable:!0,configurable:!0}),t.prototype.listen=function(t){var e=this;if(t in this.channels$)return this.channels$[t];this.channels$[t]=new r.Subject;var n=this.connect().subscribe((function(o){e.subscriptions[t]=e.addEngineSubscription(t),setTimeout((function(){n.unsubscribe()}))}));return this.channels$[t]},t.prototype.unsubscribe=function(t){this.subscriptions[t]&&(this.subscriptions[t].unsubscribe(),delete this.subscriptions[t]),this.channels$[t]&&(this.channels$[t].complete(),delete this.channels$[t])},t.prototype.connect=function(){var t=this;return this.initializeEngineSubject||(this.initializeEngineSubject=new a.ReplaySubject(1),this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/centrifugo/").subscribe((function(e){t.initializeEngine({url:t.configService.get("centrifugoUrl"),user:e.user,timestamp:e.timestamp,token:e.token,transports:["websocket"]}),t.centrifuge.connect(),t.centrifuge.on("connect",(function(){t.initializeEngineSubject.next(!0),t.connectedSubject.next(!0)})),t.centrifuge.on("disconnect",(function(){t.connectedSubject.next(!1)}))}))),this.initializeEngineSubject},t.prototype.publish=function(t,e){var n=this;return new i.Observable((function(o){n.connect().subscribe((function(){n.subscriptions[t]||(n.subscriptions[t]=n.addEngineSubscription(t)),n.subscriptions[t].publish(e).then((function(t){o.next(t),o.complete()}),(function(t){throw t}))}))}))},t.prototype.disconnect=function(){this.centrifuge.disconnect(),this.initializeEngineSubject=void 0,this.channels$={},this.subscriptions={}},t.prototype.initializeEngine=function(t){this.centrifuge=new s(t)},t.prototype.addEngineSubscription=function(t){return this.centrifuge.subscribe(t,this.resolveMessage.bind(this))},t.prototype.resolveMessage=function(t){var e=t.channel;this.channels$[e]&&this.channels$[e].next(t.data)},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),lo=function(){function t(t,e){this.modelClass=e,this.defaultValue=t}return t.prototype.toFront=function(t){return this.modelClass?this.modelClass.toFront(t):t},t.prototype.toBack=function(t){return this.modelClass?this.modelClass.toBack(t):t},t}(),co=function(){function t(t,e){this.name=t,this.fields=e}return t.prototype.addField=function(t,e){this.fields[t]=e},t.prototype.save=function(t,e){this.fields[t]&&this.setItem(this.name+"_"+t,this.fields[t].toBack(e))},t.prototype.get=function(t){if(this.fields[t]){var e=this.getItem(this.name+"_"+t);return null===e&&(e=this.fields[t].defaultValue),null==e?e:this.fields[t].toFront(e)}},t.prototype.clear=function(){var t,e;try{for(var n=v(Object.keys(this.fields)),o=n.next();!o.done;o=n.next()){var i=o.value;this.removeItem(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.getItem=function(t){throw new Error("Function getItem for store engine "+typeof this+" not implemented")},t.prototype.setItem=function(t,e){throw new Error("Function setItem for store engine "+typeof this+" not implemented")},t.prototype.removeItem=function(t){throw new Error("Function deleteItem for store engine "+typeof this+" not implemented")},t}(),po=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.setItem=function(t,e){localStorage.setItem(t,JSON.stringify(e))},e.prototype.getItem=function(t){try{return JSON.parse(localStorage.getItem(t))}catch(t){return}},e.prototype.removeItem=function(t){localStorage.removeItem(t)},e}(co);function mo(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function fo(t){return[{rel:"apple-touch-icon",sizes:"180x180",href:"/assets/favicon/"+t+"apple-touch-icon.png"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/assets/favicon/"+t+"favicon-32x32.png"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/assets/favicon/"+t+"favicon-16x16.png"},{rel:"shortcut icon",href:"/assets/favicon/"+t+"favicon.ico"},{rel:"manifest",href:"/assets/favicon/"+t+"site.webmanifest"},{rel:"mask-icon",href:"/assets/favicon/"+t+"safari-pinned-tab.svg",color:"#ff0000"}]}var ho=function(){function t(t,e){this.injector=t,this.platformId=e,this.isBrowser=c.isPlatformBrowser(this.platformId)}return t.prototype.intercept=function(t,e){if(!this.isBrowser)return e.handle(t);t=t.clone({withCredentials:!0});var n=mo("csrftoken");return n&&(t=t.clone({setHeaders:{"X-CSRFToken":n}})),e.handle(t)},t.ctorParameters=function(){return[{type:e.Injector},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t=d([e.Injectable(),h(1,e.Inject(e.PLATFORM_ID))],t)}();t.BaseModel=T,t.BaseService=Bt,t.BaseStatistic=Mt,t.BasketballGameApi=Xt,t.BasketballGameConfig=dt,t.BasketballGameLog=Wt,t.BasketballGameLogTypeLocalization=Wn,t.BasketballGameStatistic=Nt,t.BasketballGameTeamStatistic=zt,t.BasketballProfile=N,t.BasketballStatistic=Et,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=uo,t.City=M,t.ConfigService=jt,t.DateField=w,t.DateTimeField=G,t.FAULT_LOG_TYPES=En,t.Feedback=Jt,t.FeedbackApi=Yt,t.File=A,t.FileApi=Kt,t.FootballGameApi=le,t.FootballGameConfig=kt,t.FootballGameLog=re,t.FootballGameLogTypeLocalization=$n,t.FootballGameStatistic=ae,t.FootballGameTeamStatistic=ue,t.FootballProfile=Y,t.FootballStatistic=se,t.FootballWorkFootLocalization=ro,t.Game=Tt,t.GameBasketballPositionLocalization=Yn,t.GameBasketballPositionShortLocalization=Kn,t.GameFootballPositionLocalization=io,t.GameHockeyPositionLocalization=oo,t.GameInvite=Ne,t.GameTimelineStageItem=pe,t.GameTimelineStages=me,t.GameUser=qt,t.GameVolleyballPositionLocalization=Qn,t.GameVolleyballPositionShortLocalization=to,t.GameVolleyballPositionShortRuLocalization=eo,t.HockeyGameApi=oe,t.HockeyGameConfig=bt,t.HockeyGameLog=Qt,t.HockeyGameLogTypeLocalization=qn,t.HockeyGameStatistic=te,t.HockeyGameTeamStatistic=ne,t.HockeyPenaltyTypes=k,t.HockeyProfile=X,t.HockeyStatistic=ee,t.HttpCookieInterceptor=ho,t.League=et,t.LeagueApi=je,t.LeagueBanner=Be,t.LeagueCourt=vt,t.LeagueNews=Te,t.LeagueNewsApi=Le,t.LeaguePartner=Ie,t.LeaguePlaylist=so,t.LocalStorageEngine=po,t.MediaApi=Ae,t.MediaItem=yt,t.ModelInstance=C,t.Notification=Ze,t.NotificationApi=nn,t.NotificationBaseApi=en,t.NotificationSettings=tn,t.OrgNotificationApi=on,t.Organization=tt,t.OvertimeTypeLocalization=Xn,t.Playoff=ve,t.PlayoffSettings=_e,t.Poll=Ve,t.PollAnswer=xe,t.PollVariant=He,t.PublicTeamApi=Dn,t.PublicUserApi=Rn,t.ReferenceApi=rn,t.SCORE_LOG_TYPES=Mn,t.Sport=x,t.StorageEngine=co,t.StorageEngineField=lo,t.Store=Ut,t.Team=Q,t.TeamAccess=ln,t.TeamApi=cn,t.TeamEvent=We,t.TeamEventApi=pn,t.TeamEventInvite=Xe,t.TeamEventTypeLocalization=Re,t.TeamInvite=Me,t.TeamInviteExternal=an,t.TeamPermission=un,t.TeamUser=Ht,t.TeamUserRoleLocalization=Jn,t.ToBackHook=B,t.ToFrontHook=U,t.Tournament=ft,t.TournamentApi=we,t.TournamentDisqualification=xt,t.TournamentEvent=Fe,t.TournamentGroup=Lt,t.TournamentInvite=Ye,t.TournamentJoinApi=dn,t.TournamentJoinData=mn,t.TournamentJoinTeam=fn,t.TournamentNews=ce,t.TournamentSeason=lt,t.TournamentSeasonApi=hn,t.TournamentSettings=pt,t.TournamentStage=de,t.TournamentStageApi=gn,t.TournamentStageTeam=be,t.TournamentTeam=At,t.TournamentTeamUser=Vt,t.TournamentTeamUserInvite=Je,t.TournamentTeamWinner=mt,t.UntilDestroy=function(t){var e,n=(e=t).ɵcmp||e.ɵdir,o=n.onDestroy;t.__componentDestroyed$=new r.Subject,n.onDestroy=function(){t.__componentDestroyed$.next(),t.__componentDestroyed$.complete(),o.apply(this)}},t.User=Z,t.UserAccess=_n,t.UserApi=bn,t.UserPermission=yn,t.UserProfile=V,t.VolleyballGameApi=Nn,t.VolleyballGameConfig=_t,t.VolleyballGameLog=zn,t.VolleyballGameLogTypeLocalization=ao,t.VolleyballGameStatistic=Tn,t.VolleyballGameTeamStatistic=kn,t.VolleyballProfile=W,t.VolleyballStatistic=ye,t.VolleyballWorkHandLocalization=no,t.WorkHandLocalization=Zn,t.addItemInArray=Ft,t.changeFavicons=function(t,e){var n,o,i,r,a="";"ablmoscow"===e&&(a="abl/");var s=fo(a);try{for(var u=v(s),l=u.next();!l.done;l=u.next()){var c=l.value,p=t.createElement("link");try{for(var m=(i=void 0,v(Object.keys(c))),f=m.next();!f.done;f=m.next()){var d=f.value;p.setAttribute(d,c[d])}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=m.return)&&r.call(m)}finally{if(i)throw i.error}}t.head.appendChild(p)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}},t.componentDestroyed=function(t){if(t.constructor.__componentDestroyed$)return t.constructor.__componentDestroyed$;throw new Error("Use @UntilDestroy decorator in class")},t.deleteItemFromArray=Gt,t.enumField=S,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=he,t.getArrayChunks=function(t,e){var n=[],o=Math.ceil(t.length/e);if(0===o)return[t];for(var i=0;i<o;i++)n.push(t.slice(i*e,(i+1)*e));return n},t.getCookie=mo,t.getEnumOptions=function(t){return Object.keys(t).map((function(e){return t[e]})).filter((function(t){return!1===isNaN(+t)})).map((function(t){return+t}))},t.getIconsData=fo,t.handleError=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),(!t||0!==t.status&&404!==t.status||e&&0!==t.status)&&u.captureException(t),n||console.error(t)},t.isTouchDevice=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch)return!0;var e,n=["(",t.join("touch-enabled),("),"heartz",")"].join("");return e=n,window.matchMedia(e).matches},t.listField=F,t.markFormGroupTouched=function t(e){Object.values(e.controls).forEach((function(e){e.markAsTouched(),e.markAsDirty(),e instanceof l.FormGroup?t(e):e.controls&&e.controls.forEach((function(e){e instanceof l.FormGroup?t(e):(e.markAsTouched(),e.markAsDirty())}))}))},t.minLengthArrayValidator=function(t){return function(e){return e.value.length<t?{minLengthArray:{valid:!1}}:null}},t.patchItemInArray=function(t,e,n){return Array.isArray(t)?t.map((function(t){if(n&&Ct(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.updateItemInArray=St,t.updateItemsInArray=Pt,t.validateDate=function(t){return!t.value||/\d{2}\.\d{2}\.\d{4}/gi.test(t.value)?null:{invalidDate:{valid:!1}}},t.validateEmail=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=[]);var r=i.of(null).pipe(o.delay(500));return function(a){return n.indexOf(a.value)>-1?i.of(null):r.pipe(o.switchMap((function(){return t.checkEmail(a.value,e).pipe(o.map((function(t){return t?null:{emailTaken:!0}})))})))}},t.validatePhone=function(t){return t.value?11===(""+t.value).replace(/\D/gi,"").length?null:{invalidPhone:{valid:!1}}:null},t.validateUrl=function(t){return!t.value||/^(?:http(s)?:\/\/)[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(t.value)?null:{invalidUrl:!0}},t.ɵa=P,t.ɵb=$t,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function m(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){return(f=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function d(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function h(t,e){return function(n,o){e(n,o,t)}}function g(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{u(o.next(t))}catch(t){r(t)}}function s(t){try{u(o.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((o=o.apply(t,e||[])).next())}))}function _(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function v(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}var T=[{id:1,code:"АГРЕС",title:"Агрессор в драке"},{id:2,code:"АТ-В-ГОЛ",title:"Атака в голову или шею"},{id:3,code:"АТ-ВР",title:"Атака вратаря"},{id:4,code:"АТ-СЗ",title:"Атака сзади"},{id:5,code:"БЛОК",title:"Блокировка"},{id:6,code:"БР-КЛ",title:"Бросок клюшки"},{id:7,code:"ВБ-ШБ",title:"Выброс шайбы"},{id:8,code:"ГРУБ",title:"Грубость"},{id:9,code:"ДИСЦ",title:"Дисциплинарный штраф"},{id:10,code:"ДИС-КН",title:"Дисциплинарный до конца матча"},{id:11,code:"ДРАКА",title:"Драка"},{id:12,code:"ЗАЧИН",title:"Зачинщик драки"},{id:13,code:"ЗД-ИГ",title:"Задержка игры"},{id:14,code:"ЗД-КЛ-СП",title:"Задержка клюшки соперника"},{id:15,code:"ЗД-КЛ",title:"Задержка клюшкой"},{id:16,code:"ЗД-СП",title:"Задержка соперника"},{id:17,code:"ЗД-ШБ",title:"Задержка шайбы руками"},{id:18,code:"СЛ-КЛ",title:"Игра со сломанной клюшкой"},{id:19,code:"ВП-КЛ",title:"Игра высоко поднятой клюшкой"},{id:20,code:"КЛ-УД",title:"Колющий удар"},{id:21,code:"СК-ШТ",title:"Малый скамеечный штраф"},{id:22,code:"МШ",title:"Матч-штраф"},{id:23,code:"НП-АТ",title:"Неправильная атака"},{id:24,code:"ЧС-СТ",title:"Нарушение численного состава"},{id:25,code:"НС-КЛ",title:"Нестандартная клюшка"},{id:26,code:"НАР-ЭК",title:"Опасное снаряжение"},{id:27,code:"НС-ПВ",title:"Оскорбление судей и неспортивное поведение"},{id:28,code:"ОТ-ИГ",title:"Отказ начать игру"},{id:29,code:"ОТСЧ",title:"Отсечение"},{id:30,code:"ПЛЕВОК",title:"Плевок"},{id:31,code:"ПОДН",title:"Подножка"},{id:32,code:"ПОДС",title:"Подсечка"},{id:33,code:"ПР-ИН",title:"Предупреждение инфекций"},{id:34,code:"ПК-СК",title:"Покидание скамейки во время конфликта"},{id:35,code:"СД-ВР",title:"Сдвиг ворот"},{id:36,code:"СИМ",title:"Симуляция"},{id:37,code:"ТЛ-БР",title:"Толчок на борт"},{id:38,code:"ТЛ-КЛ",title:"Толчок клюшкой"},{id:39,code:"УД-ГОЛ",title:"Удар головой"},{id:40,code:"УД-КЛ",title:"Удар клюшкой"},{id:41,code:"УД-К-КЛ",title:"Удар концом клюшки"},{id:42,code:"УД-КОЛ",title:"Удар коленом"},{id:43,code:"УД-ЛОК",title:"Удар локтем"},{id:44,code:"УД-НГ",title:"Удар ногой"},{id:45,code:"УКУС",title:"Укус"},{id:46,code:"КН-ЗР",title:"Физический контакт со зрителем"},{id:47,code:"ШТ-ВР",title:"Штраф вратаря"}],k=function(){function t(t){var e,n;if(t)try{for(var o=v(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;this[r]=t[r]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}return t.toFront=function(t){},t.toBack=function(t){},t}();function S(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function P(){return{toFront:function(t){return t?"object"==typeof t?t:T.find((function(e){return e.id===t})):null},toBack:function(t){return t?"object"==typeof t?t.id:t:null}}}function F(t){return{toFront:function(e){return Array.isArray(e)?t.toFront(e):[]},toBack:function(e){return Array.isArray(e)?t.toBack(e):[]}}}var w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds())).toISOString().slice(0,10):void 0},e}(k),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){if(t){new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()));return t.toISOString()}},e}(k);function C(t){return function(e){t&&(t.mappingFields&&(e._mapping_fields_=t.mappingFields),t.relation&&(e._relation_=t.relation),e._to_front_=function(t,n){return function t(e,n,o){var i,r;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a=new e,s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=v(Object.keys(s)),c=l.next();!c.done;c=l.next()){var p=c.value,m=s[p],f=j(p,n);u&&u.hasOwnProperty(m)?a[m]=u[m].toFront(f):a[m]=f}}catch(t){i={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)},e._to_back_=function(t,n){return function t(e,n,o){var i,r;if(!n)return n;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a={},s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=v(Object.keys(s)),c=l.next();!c.done;c=l.next()){var p=c.value,m=s[p];u&&u.hasOwnProperty(m)&&void 0!==n[m]?a[p]=u[m].toBack(n[m]):a[p]=n[m]}}catch(t){i={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)})}}var I,U=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_front_;if(o)return o(e[0],e.length>1?e[1]:void 0)}}},B=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_back_;if(o)return o(e[0])}}};function j(t,e){var n,o;if(e){var i=t.split(".");if(1===i.length)return t in e?e[t]:void 0;try{for(var r=v(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(!e||!(s in e))return;e=e[s]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return e}}(I=t.FileEngine||(t.FileEngine={}))[I.django=1]="django",I[I.s3=2]="s3";var L,A=function(){function e(){}return e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",path:"path",mime_type:"mimeType",size:"size",engine:"engine",created_at:"createdAt"},relation:{engine:S(t.FileEngine),createdAt:G}})],e)}();(L=t.SportTypes||(t.SportTypes={}))[L.basketball=1]="basketball",L[L.volleyball=2]="volleyball",L[L.classic_basketball=3]="classic_basketball",L[L.streetball=4]="streetball",L[L.classic_volleyball=5]="classic_volleyball",L[L.beach_volleyball=6]="beach_volleyball",L[L.hockey=7]="hockey",L[L.ice_hockey=8]="ice_hockey",L[L.ball_hockey=9]="ball_hockey",L[L.football=10]="football",L[L.classic_football=11]="classic_football",L[L.mini_football=12]="mini_football";var O,H,x=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.isBasketball=function(){return this.id===t.SportTypes.basketball||this.parentId===t.SportTypes.basketball},n.prototype.isClassicBasketball=function(){return this.id===t.SportTypes.classic_basketball},n.prototype.isStreetball=function(){return this.id===t.SportTypes.streetball},n.prototype.isVolleyball=function(){return this.id===t.SportTypes.volleyball||this.parentId===t.SportTypes.volleyball},n.prototype.isClassicVolleyball=function(){return this.id===t.SportTypes.classic_volleyball},n.prototype.isBeachVolleyball=function(){return this.id===t.SportTypes.beach_volleyball},n.prototype.isHockey=function(){return this.id===t.SportTypes.hockey||this.parentId===t.SportTypes.hockey},n.prototype.isIceHockey=function(){return this.id===t.SportTypes.ice_hockey},n.prototype.isBallHockey=function(){return this.id===t.SportTypes.ball_hockey},n.prototype.isFootball=function(){return this.id===t.SportTypes.football||this.parentId===t.SportTypes.football},n.prototype.isClassicFootball=function(){return this.id===t.SportTypes.classic_football},n.prototype.isMiniFootball=function(){return this.id===t.SportTypes.mini_football},n.toFront=function(t){return null},n.toBack=function(t){return null},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(k),V=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([C({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name"}})],e)}(k);(O=t.GameBasketballPosition||(t.GameBasketballPosition={}))[O.point_guard=1]="point_guard",O[O.shooting_guard=2]="shooting_guard",O[O.small_forward=3]="small_forward",O[O.power_forward=4]="power_forward",O[O.center=5]="center",(H=t.WorkHand||(t.WorkHand={}))[H.left=1]="left",H[H.right=2]="right";var E,z,N=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameBasketballPosition),workHand:S(t.WorkHand)}})],n)}(k);(E=t.GameVolleyballPosition||(t.GameVolleyballPosition={}))[E.setter=1]="setter",E[E.libero=2]="libero",E[E.middle_player=3]="middle_player",E[E.receiver_attacker=4]="receiver_attacker",E[E.dioganal=5]="dioganal",(z=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[z.left=1]="left",z[z.right=2]="right";var D,R,W=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameVolleyballPosition),workHand:S(t.VolleyballWorkHand)}})],n)}(k);(D=t.GameHockeyPosition||(t.GameHockeyPosition={}))[D.defensemen=1]="defensemen",D[D.forward=2]="forward",D[D.goaltender=3]="goaltender",(R=t.HockeyWorkHand||(t.HockeyWorkHand={}))[R.left=1]="left",R[R.right=2]="right";var q,$,X=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameHockeyPosition),workHand:S(t.HockeyWorkHand)}})],n)}(k);(q=t.GameFootballPosition||(t.GameFootballPosition={}))[q.defensemen=1]="defensemen",q[q.midfielder=2]="midfielder",q[q.forward=3]="forward",q[q.goalkeeper=4]="goalkeeper",($=t.FootballWorkFoot||(t.FootballWorkFoot={}))[$.left=1]="left",$[$.right=2]="right",$[$.both=3]="both";var J,Y=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",user_id:"userId",position:"position",work_foot:"workFoot"},relation:{position:S(t.GameFootballPosition),workFoot:S(t.FootballWorkFoot)}})],n)}(k);(J=t.UserGender||(t.UserGender={}))[J.male=1]="male",J[J.female=2]="female";var K,Z=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){return null},n.toBack=function(t){return null},Object.defineProperty(n.prototype,"fullName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"age",{get:function(){if(!this.birthDate)return null;var t=(new Date).getTime()-this.birthDate.getTime();return Math.floor(t/31536e6)},enumerable:!0,configurable:!0}),d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",last_name:"lastName",first_name:"firstName",middle_name:"middleName",email:"email",phone:"phone",birth_date:"birthDate",photo:"photo",profile:"profile",basketball_profile:"basketballProfile",volleyball_profile:"volleyballProfile",hockey_profile:"hockeyProfile",football_profile:"footballProfile",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:w,photo:A,profile:V,basketballProfile:N,volleyballProfile:W,hockeyProfile:X,footballProfile:Y,city:M,gender:S(t.UserGender)}})],n)}(k),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),this.sport.isHockey()&&t.push("empty-logo-hockey"),this.sport.isFootball()&&t.push("empty-logo-football"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",sport:"sport",logo:"logo",owner:"owner",city:"city",users_count:"usersCount",won_games_count:"wonGamesCount",games_count:"gamesCount",score_sum:"scoreSum",closest_game_datetime:"closestGameDatetime"},relation:{sport:x,logo:A,owner:Z,city:M,closestGameDatetime:w}})],e)}(k),tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:Z}})],e)}(k),et=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.regulationFiles=[],e}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"vkLink",{get:function(){return this.socialLinks.find((function(t){return"https://vk.com/"===t.substr(0,15)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fbLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.facebook.com/"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instaLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.instagram.com"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",logo:"logo",contact_email:"contactEmail",contact_phone:"contactPhone",name:"name",alias:"alias",sport:"sport",description:"description",social_links:"socialLinks",links:"links",organization:"organization",tournaments_count:"tournamentsCount",closest_game_datetime:"closestGameDatetime",cover:"cover",about:"about",regulation_files:"regulationFiles"},relation:{organization:tt,logo:A,cover:A,sport:x,regulationFiles:F(A)}})],e)}(k);(K=t.TournamentSeasonStatuses||(t.TournamentSeasonStatuses={}))[K.open=0]="open",K[K.in_progress=1]="in_progress",K[K.closed=2]="closed";var nt,ot,it,rt,at,st,ut,lt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",status:"status",start_date:"startDate",closed_date:"closedDate"},relation:{logo:A,cover:A,previewImage:A,status:S(t.TournamentSeasonStatuses),startDate:w,closedDate:w}})],n)}(k);(nt=t.TournamentTypes||(t.TournamentTypes={})).group="group",nt.elimination="elimination",nt.fiba="fiba",(ot=t.TournamentStatuses||(t.TournamentStatuses={}))[ot.open=0]="open",ot[ot.in_progress=1]="in_progress",ot[ot.closed=2]="closed",(it=t.TournamentGender||(t.TournamentGender={}))[it.male=1]="male",it[it.female=2]="female",it[it.all=3]="all",(rt=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[rt.standard=1]="standard",rt[rt.light=2]="light",rt[rt.advanced=3]="advanced",(at=t.VolleyballStatisticTypes||(t.VolleyballStatisticTypes={}))[at.standard=1]="standard",at[at.light=2]="light",at[at.advanced=3]="advanced",(st=t.GameTimeTypes||(t.GameTimeTypes={}))[st.clean=1]="clean",st[st.dirty=2]="dirty",(ut=t.OvertimeTypes||(t.OvertimeTypes={}))[ut.to_score_total=1]="to_score_total",ut[ut.to_score_diff=2]="to_score_diff",ut[ut.time=3]="time",ut[ut.without_overtime=4]="without_overtime",ut[ut.to_first_goal=5]="to_first_goal",ut[ut.to_first_goal_and_bullitts=6]="to_first_goal_and_bullitts",ut[ut.bullitts=7]="bullitts",ut[ut.penalties=8]="penalties",ut[ut.time_and_penalties=9]="time_and_penalties";var ct,pt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",gender:"gender",age_from:"ageFrom",age_to:"ageTo",max_team_players:"maxTeamPlayers",max_game_players:"maxGamePlayers",type:"type",tours_count:"toursCount",periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",game_up_to_score:"gameUpToScore",volleyball_score_in_set:"volleyballScoreInSet",volleyball_score_in_last_set:"volleyballScoreInLastSet",manage_team_application:"manageTeamApplication",recruitment_is_open:"recruitmentIsOpen",transfer_is_open:"transferIsOpen",basketball_statistic_type:"basketballStatisticType",volleyball_statistic_type:"volleyballStatisticType",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType",with_result_table:"withResultTable"},relation:{type:S(t.TournamentTypes),gender:S(t.TournamentGender),basketballStatisticType:S(t.BasketballStatisticTypes),volleyballStatisticType:S(t.VolleyballStatisticTypes),gameTimeType:S(t.GameTimeTypes),overtimeType:S(t.OvertimeTypes)}})],n)}(k),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",team:"team",points:"points"},relation:{team:Q}})],e)}(k),ft=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),this.sport.isHockey()&&t.push("empty-logo-hockey"),this.sport.isFootball()&&t.push("empty-logo-football"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",city:"city",sport:"sport",location:"location",description:"description",date:"date",price:"price",regulation_files:"regulationFiles",settings:"settings",league:"league",teams_count:"teamsCount",closest_game_datetime:"closestGameDatetime",status:"status",team_winner:"teamWinner",team_second:"teamSecond",team_third:"teamThird",season:"season",season_id:"seasonId"},relation:{logo:A,cover:A,previewImage:A,city:M,sport:x,regulationFile:A,settings:pt,date:G,league:et,status:S(t.TournamentStatuses),teamWinner:mt,teamSecond:mt,teamThird:mt,season:lt}})],n)}(k),dt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",game_up_to_score:"gameUpToScore",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",statistic_type:"statisticType",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType"},relation:{overtimeType:S(t.OvertimeTypes),statisticType:S(t.BasketballStatisticTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(k);(ct=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[ct.best_of_five=1]="best_of_five",ct[ct.best_of_three=2]="best_of_three";var ht,gt,_t=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"setsCount",{get:function(){return this.gameType===t.VolleyballGameTypes.best_of_three?3:5},enumerable:!0,configurable:!0}),n.prototype.getSetMaxScore=function(t){return t===this.setsCount?this.scoreInLastSet:this.scoreInSet},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",score_in_set:"scoreInSet",score_in_last_set:"scoreInLastSet",statistic_type:"statisticType"},relation:{gameType:S(t.VolleyballGameTypes),statisticType:S(t.VolleyballStatisticTypes)}})],n)}(k),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(k),yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isVideo",{get:function(){return Boolean(this.videoUrl)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",original_photo:"originalPhoto",list_photo:"listPhoto",detail_photo:"detailPhoto",game:"game",tournament:"tournament",game_id:"gameId",tournament_id:"tournament_id",video_url:"videoUrl",video_preview:"videoPreview",is_live:"isLive"},relation:{originalPhoto:A,listPhoto:A,detailPhoto:A,videoPreview:A}})],e)}(k),bt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",game_time_type:"gameTimeType"},relation:{overtimeType:S(t.OvertimeTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(k),Tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",game_time_type:"gameTimeType"},relation:{overtimeType:S(t.OvertimeTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(k);(ht=t.GameStatuses||(t.GameStatuses={}))[ht.open=1]="open",ht[ht.in_progress=2]="in_progress",ht[ht.closed=3]="closed",ht[ht.archived=4]="archived",ht[ht.draft=5]="draft",(gt=t.GameResultTypes||(t.GameResultTypes={}))[gt.team_won=1]="team_won",gt[gt.competitor_team_won=2]="competitor_team_won",gt[gt.team_technical_defeat=3]="team_technical_defeat",gt[gt.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var kt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"scoreByPeriodList",{get:function(){var t=this;return this.scoreByPeriod?Object.keys(this.scoreByPeriod).map((function(e){return{period:+e,teamScore:t.scoreByPeriod[e][0],competitorTeamScore:t.scoreByPeriod[e][1]}})):[]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.status===t.GameStatuses.closed},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isTeamWon",{get:function(){return this.teamScore>this.competitorTeamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCompetitorTeamWon",{get:function(){return this.competitorTeamScore>this.teamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"teamWinnerId",{get:function(){return this.status!==t.GameStatuses.closed||this.teamScore===this.competitorTeamScore?null:this.team.id?this.teamScore>this.competitorTeamScore?this.team.id:this.competitorTeam.id:this.teamScore>this.competitorTeamScore?this.teamId:this.competitorTeamId},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",status:"status",team:"team",tournament_team_id:"tournamentTeamId",team_id:"teamId",competitor_team:"competitorTeam",competitor_tournament_team_id:"competitorTournamentTeamId",competitor_team_id:"competitorTeamId",competitor_team_name:"competitorTeamName",datetime:"datetime",location:"location",team_score:"teamScore",competitor_team_score:"competitorTeamScore",result_type:"resultType",playoff_number:"playoffNumber",tournament_id:"tournamentId",tournament_tour:"tournamentTour",basketball_game_config:"basketballGameConfig",volleyball_game_config:"volleyballGameConfig",hockey_game_config:"hockeyGameConfig",football_game_config:"footballGameConfig",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_court:"tournamentCourt",media_count:"mediaCount",media_live_count:"mediaLiveCount",media:"media",tournament:"tournament"},relation:{status:S(t.GameStatuses),team:Q,competitorTeam:Q,datetime:G,resultType:S(t.GameResultTypes),basketballGameConfig:dt,volleyballGameConfig:_t,hockeyGameConfig:bt,footballGameConfig:Tt,tournamentCourt:vt,media:F(yt),tournament:ft}})],n)}(k);function St(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(o&&Ct(o)){if(!o(t))return t}else if(t.id!==e.id)return t;return t.updatedAt&&e.updatedAt&&!n&&t.updatedAt>e.updatedAt?t:e})):t}function Pt(t,e,n,o){return void 0===n&&(n=!1),e.forEach((function(e){t=St(t,e,n,o)})),t}function Ft(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return Ct(o)?o(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function wt(t,e,n,o){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=Ft(t,e,n,o)})),t}function Gt(t,e){return Array.isArray(t)?Ct(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function Ct(t){return t&&"[object Function]"==={}.toString.call(t)}var It,Ut=function(){function t(t){this.engine=t,this.data={}}return t.prototype.get=function(t){return this.getSubject(t).pipe(o.filter((function(t){return void 0!==t})))},t.prototype.value=function(t){return this.getSubject(t).value},t.prototype.save=function(t,e){this.getSubject(t).next(e),this.engine&&this.engine.save(t,e)},t.prototype.appendItem=function(t,e,n){this.save(t,Ft(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,wt(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,Ft(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,wt(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,o){this.save(t,St(this.value(t)||[],e,n,o))},t.prototype.updateItems=function(t,e,n,o){this.save(t,Pt(this.value(t)||[],e,n,o))},t.prototype.deleteItem=function(t,e){this.save(t,Gt(this.value(t)||[],e))},t.prototype.dispose=function(){var t,e;try{for(var n=v(Object.keys(this.data)),o=n.next();!o.done;o=n.next()){var i=o.value;this.data[i].complete(),delete this.data[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.clearStorageData=function(){this.engine&&this.engine.clear()},t.prototype.getEngine=function(){return this.engine},t.prototype.getSubject=function(t){return this.data[t]||(this.data[t]=new i.BehaviorSubject(this.engine?this.engine.get(t):void 0)),this.data[t]},t}(),Bt=function(){function t(){this.store=new Ut}return t.prototype.dispose=function(){this.store.dispose()},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),jt=function(t){function n(e){var n=t.call(this)||this;return n.configData=e,e&&n.initialize(e),n}return m(n,t),Object.defineProperty(n.prototype,"config$",{get:function(){return this.store.get("config")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"config",{get:function(){return this.store.value("config")||{}},enumerable:!0,configurable:!0}),n.prototype.initialize=function(t){this.store.save("config",t)},n.prototype.set=function(t,e){var n;this.store.save("config",f(f({},this.config),((n={})[t]=e,n)))},n.prototype.get=function(t){return this.store.value("config")&&this.store.value("config")[t]},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:["mtg-core-config-data"]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject("mtg-core-config-data",8))},token:n,providedIn:"root"}),n=d([e.Injectable({providedIn:"root"}),h(0,e.Optional()),h(0,e.Inject("mtg-core-config-data"))],n)}(Bt),Lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",tournament_stage_id:"tournamentStageId"}})],e)}(k),At=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",tournament:"tournament",team:"team",group:"group",final_standing:"finalStanding",games_count:"gamesCount",won_games_count:"wonGamesCount",draw_games_count:"drawGamesCount",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",score_sum:"scoreSum",missed_sum:"missedSum",score_points_sum:"scorePointsSum",missed_points_sum:"missedPointsSum",points:"points",users_count:"usersCount",games:"games",notifications_count:"notificationsCount",win_normal_time_games_count:"winNormalTimeGamesCount",lose_normal_time_games_count:"loseNormalTimeGamesCount",win_overtime_games_count:"winOvertimeGamesCount",lose_overtime_games_count:"loseOvertimeGamesCount"},relation:{tournament:ft,team:Q,group:Lt,games:kt}})],e)}(k);(It=t.TeamUserRole||(t.TeamUserRole={}))[It.member=1]="member",It[It.moderator=2]="moderator",It[It.admin=3]="admin",It[It.coach=4]="coach",It[It.head_coach=5]="head_coach",It[It.playing_coach=6]="playing_coach",It[It.manager=7]="manager",It[It.head_manager=8]="head_manager",It[It.captain=9]="captain",It[It.assistant=10]="assistant";var Ot,Ht=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:Z,team:Q,role:S(t.TeamUserRole)}})],n)}(k),xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:w,dateTo:w}})],e)}(k),Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"fullName",{get:function(){return[this.lastName,this.firstName,this.middleName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team:"tournamentTeam",team_user:"teamUser",disqualified:"disqualified",first_name:"firstName",last_name:"lastName",middle_name:"middleName",photo:"photo",disqualification:"disqualification",has_changes:"hasChanges",rating:"rating"},relation:{tournamentTeam:At,teamUser:Ht,photo:A,disqualification:xt}})],e)}(k),Mt=function(){},Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"totalFouls",{get:function(){return this.personalFouls+this.technicalFouls+this.unsportsmanlikeFouls},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",free_throws_made:"freeThrowsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",two_point_percent:"twoPointPercent",three_point_percent:"threePointPercent",free_throw_percent:"freeThrowPercent",one_point_percent:"onePointPercent",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",game_time:"gameTime",newbie:"newbie"},relation:{tournamentTeamUser:Vt,team:Q,teamUser:Ht,user:Z,tournamentTeam:At,month:w}})],e)}(Mt),zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Et,competitorTeam:Et}})],e)}(k),Nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"totalFouls",{get:function(){return(this.personalFouls||0)+(this.technicalFouls||0)+(this.unsportsmanlikeFouls||0)},enumerable:!0,configurable:!0}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",points:"points",free_throws_made:"freeThrowsMade",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",updated_at:"updatedAt"},relation:{updatedAt:G}})],e)}(k);(Ot=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[Ot.enter_game=1]="enter_game",Ot[Ot.exit_game=2]="exit_game",Ot[Ot.remove_game=3]="remove_game",Ot[Ot.two_point_made=4]="two_point_made",Ot[Ot.three_point_made=5]="three_point_made",Ot[Ot.free_throw_made=6]="free_throw_made",Ot[Ot.two_point_attempt=7]="two_point_attempt",Ot[Ot.three_point_attempt=8]="three_point_attempt",Ot[Ot.free_throw_attempt=9]="free_throw_attempt",Ot[Ot.assist=10]="assist",Ot[Ot.block=11]="block",Ot[Ot.rebound=12]="rebound",Ot[Ot.offensive_rebound=13]="offensive_rebound",Ot[Ot.defensive_rebound=14]="defensive_rebound",Ot[Ot.steal=15]="steal",Ot[Ot.turnover=16]="turnover",Ot[Ot.personal_foul=17]="personal_foul",Ot[Ot.technical_foul=18]="technical_foul",Ot[Ot.unsportsmanlike_foul=19]="unsportsmanlike_foul",Ot[Ot.one_point_attempt=20]="one_point_attempt",Ot[Ot.one_point_made=21]="one_point_made",Ot[Ot.timeout=22]="timeout";var Dt,Rt,Wt=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.isPointsType=function(){return[t.BasketballGameLogTypes.two_point_made,t.BasketballGameLogTypes.three_point_made,t.BasketballGameLogTypes.free_throw_made,t.BasketballGameLogTypes.one_point_made].indexOf(this.logType)>-1},n.prototype.isReboundType=function(){return[t.BasketballGameLogTypes.rebound,t.BasketballGameLogTypes.offensive_rebound,t.BasketballGameLogTypes.defensive_rebound].indexOf(this.logType)>-1},n.prototype.isFoulType=function(){return[t.BasketballGameLogTypes.personal_foul,t.BasketballGameLogTypes.technical_foul,t.BasketballGameLogTypes.unsportsmanlike_foul].indexOf(this.logType)>-1},n.prototype.getScore=function(){var e;return((e={})[t.BasketballGameLogTypes.one_point_made]=1,e[t.BasketballGameLogTypes.free_throw_made]=1,e[t.BasketballGameLogTypes.two_point_made]=2,e[t.BasketballGameLogTypes.three_point_made]=3,e)[this.logType]},n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight"},relation:{datetime:G,logType:S(t.BasketballGameLogTypes)}})],n)}(k),qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",is_mvp:"isMvp",updated_at:"updatedAt"},relation:{teamUser:Ht,tournamentTeamUser:Vt,updatedAt:G}})],e)}(k),$t=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},t.prototype.getMvp=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/mvp/").pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Xt=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return zt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return Nt.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/logs/").pipe(o.map((function(t){return Wt.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/game_protocol/?file_type="+e,{responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadFibaProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/game_protocol_fiba/?file_type="+e,{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t),Jt=function(){function t(){}return t.toFront=function(t){return null},t.toBack=function(t){return null},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([C({mappingFields:{id:"id",theme:"theme",message:"message",files:"files",email:"email",captcha:"captcha"},relation:{files:A}})],t)}(),Yt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.sendFeedback=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/feedback/",Jt.toBack(t)).pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()]}))}))},t.prototype.sendLeagueFeedback=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/feedback/",Jt.toBack(e)).pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Kt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.upload=function(t,e){return g(this,void 0,void 0,(function(){var n;return _(this,(function(i){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/",n).pipe(o.map((function(t){return A.toFront(t)}))).toPromise()]}))}))},t.prototype.createZipArchive=function(t){return g(this,void 0,void 0,(function(){var e,n,o,i,r,a;return _(this,(function(s){e=new FormData;try{for(n=v(t),o=n.next();!o.done;o=n.next())i=o.value,e.append("files",i.file,i.filename)}catch(t){r={error:t}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/zip_archive/",e,{responseType:"blob"}).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();(Dt=t.HockeyGameLogTypes||(t.HockeyGameLogTypes={}))[Dt.enter_game=1]="enter_game",Dt[Dt.exit_game=2]="exit_game",Dt[Dt.shot_miss=3]="shot_miss",Dt[Dt.shot_on_goal=4]="shot_on_goal",Dt[Dt.shot_blocked=5]="shot_blocked",Dt[Dt.goal=6]="goal",Dt[Dt.shootout_attempt=7]="shootout_attempt",Dt[Dt.shootout_goal=8]="shootout_goal",Dt[Dt.assist=9]="assist",Dt[Dt.block_shot=10]="block_shot",Dt[Dt.minor_penalty=11]="minor_penalty",Dt[Dt.major_penalty=12]="major_penalty",Dt[Dt.misconduct_penalty=13]="misconduct_penalty",Dt[Dt.game_misconduct_penalty=14]="game_misconduct_penalty",Dt[Dt.match_penalty=15]="match_penalty",Dt[Dt.penalty_shot=16]="penalty_shot",Dt[Dt.face_off_lose=17]="face_off_lose",Dt[Dt.face_off_win=18]="face_off_win",Dt[Dt.save=19]="save",Dt[Dt.timeout=20]="timeout",Dt[Dt.penalty_start=21]="penalty_start",Dt[Dt.penalty_end=22]="penalty_end",(Rt=t.HockeyAdvantageTypes||(t.HockeyAdvantageTypes={}))[Rt.power_play=1]="power_play",Rt[Rt.shorthanded=2]="shorthanded",Rt[Rt.even_strength=3]="even_strength";var Zt,Qt=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),Object.defineProperty(n.prototype,"penalizedGameUserId",{get:function(){return this._penalizedGameUserId?this._penalizedGameUserId:this.gameUserId},set:function(t){this._penalizedGameUserId=t},enumerable:!0,configurable:!0}),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return[t.HockeyGameLogTypes.goal,t.HockeyGameLogTypes.shootout_goal].indexOf(this.logType)>-1},n.prototype.isPenaltyType=function(){return[t.HockeyGameLogTypes.minor_penalty,t.HockeyGameLogTypes.major_penalty,t.HockeyGameLogTypes.misconduct_penalty,t.HockeyGameLogTypes.game_misconduct_penalty,t.HockeyGameLogTypes.penalty_shot,t.HockeyGameLogTypes.match_penalty].indexOf(this.logType)>-1},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",advantage:"advantage",advantage_num:"advantageNum",is_goalie:"isGoalie",penalty_type:"penaltyType",penalized_game_user_id:"penalizedGameUserId",mutual_penalty:"mutualPenalty"},relation:{datetime:G,logType:S(t.HockeyGameLogTypes),advantage:S(t.HockeyAdvantageTypes),penaltyType:P()}})],n)}(k),te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsOnGoal",{get:function(){return(this.evShotsOnGoal||0)+(this.ppShotsOnGoal||0)+(this.shShotsOnGoal||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsBlocked",{get:function(){return(this.evShotsBlocked||0)+(this.ppShotsBlocked||0)+(this.shShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotMisses",{get:function(){return(this.evShotMisses||0)+(this.ppShotMisses||0)+(this.shShotMisses||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ppShots",{get:function(){return(this.ppShotMisses||0)+(this.ppShotsOnGoal||0)+(this.ppShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"evShots",{get:function(){return(this.evShotMisses||0)+(this.evShotsOnGoal||0)+(this.evShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shShots",{get:function(){return(this.shShotMisses||0)+(this.shShotsOnGoal||0)+(this.shShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shots",{get:function(){return this.ppShots+this.evShots+this.shShots},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"goals",{get:function(){return(this.ppGoals||0)+(this.shGoals||0)+(this.evGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"assists",{get:function(){return(this.ppAssists||0)+(this.evAssists||0)+(this.shAssists||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceOffs",{get:function(){return(this.faceOffWins||0)+(this.faceOffLosses||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shootOuts",{get:function(){return(this.shootoutAttempts||0)+(this.shootoutGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsAgainst",{get:function(){return(this.saves||0)+(this.goalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",updated_at:"updatedAt",points:"points",pp_shot_misses:"ppShotMisses",pp_shots_on_goal:"ppShotsOnGoal",pp_shots_blocked:"ppShotsBlocked",ev_shot_misses:"evShotMisses",ev_shots_on_goal:"evShotsOnGoal",ev_shots_blocked:"evShotsBlocked",sh_shot_misses:"shShotMisses",sh_shots_on_goal:"shShotsOnGoal",sh_shots_blocked:"shShotsBlocked",pp_goals:"ppGoals",ev_goals:"evGoals",sh_goals:"shGoals",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus"},relation:{updatedAt:G}})],e)}(k),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"assists",{get:function(){return(this.ppAssists||0)+(this.shAssists||0)+(this.evAssists||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",lose_games_count:"loseGamesCount",points:"points",pp_shots:"ppShots",pp_shot_misses:"ppShotMisses",pp_shots_on_goal:"ppShotsOnGoal",pp_shots_blocked:"ppShotsBlocked",ev_shots:"evShots",ev_shot_misses:"evShotMisses",ev_shots_on_goal:"evShotsOnGoal",ev_shots_blocked:"evShotsBlocked",sh_shots:"shShots",sh_shot_misses:"shShotMisses",sh_shots_on_goal:"shShotsOnGoal",sh_shots_blocked:"shShotsBlocked",pp_goals_percent:"ppGoalsPercent",pp_goals:"ppGoals",ev_goals_percent:"evGoalsPercent",ev_goals:"evGoals",sh_goals_percent:"shGoalsPercent",goals:"goals",sh_goals:"shGoals",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots:"shots",goals_percent:"goalsPercent",shots_against:"shotsAgainst",saves_percent:"savesPercent",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",face_offs:"faceOffs",face_off_percent:"faceOffPercent",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie"},relation:{tournamentTeamUser:Vt,team:Q,teamUser:Ht,user:Z,tournamentTeam:At,month:w}})],e)}(Mt),ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:ee,competitorTeam:ee}})],e)}(k),oe=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/team_statistic/").pipe(o.map((function(t){return ne.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/user_statistic/").pipe(o.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/logs/").pipe(o.map((function(t){return Qt.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadApplication=function(t,e,o){return g(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/game_application_file/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t);(Zt=t.FootballGameLogTypes||(t.FootballGameLogTypes={}))[Zt.enter_game=1]="enter_game",Zt[Zt.exit_game=2]="exit_game",Zt[Zt.shot_miss=3]="shot_miss",Zt[Zt.shot_on_goal=4]="shot_on_goal",Zt[Zt.shot_blocked=5]="shot_blocked",Zt[Zt.goal=6]="goal",Zt[Zt.penalty_attempt=7]="penalty_attempt",Zt[Zt.penalty_goal=8]="penalty_goal",Zt[Zt.penalty_save=9]="penalty_save",Zt[Zt.small_penalty_attempt=10]="small_penalty_attempt",Zt[Zt.small_penalty_goal=11]="small_penalty_goal",Zt[Zt.small_penalty_save=12]="small_penalty_save",Zt[Zt.assist=13]="assist",Zt[Zt.block_shot=14]="block_shot",Zt[Zt.corner=15]="corner",Zt[Zt.free_kick=16]="free_kick",Zt[Zt.foul=17]="foul",Zt[Zt.save=18]="save",Zt[Zt.yellow_card=19]="yellow_card",Zt[Zt.red_card=20]="red_card",Zt[Zt.perfect_pass=21]="perfect_pass",Zt[Zt.loss=22]="loss",Zt[Zt.steal=23]="steal",Zt[Zt.out=24]="out",Zt[Zt.timeout=25]="timeout";var ie,re=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return[t.FootballGameLogTypes.goal,t.FootballGameLogTypes.penalty_goal,t.FootballGameLogTypes.small_penalty_goal].indexOf(this.logType)>-1},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",is_goalie:"isGoalie"},relation:{datetime:G,logType:S(t.FootballGameLogTypes)}})],n)}(k),ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shots",{get:function(){return(this.shotMisses||0)+(this.shotsOnGoal||0)+(this.shotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoals",{get:function(){return(this.goals||0)+(this.penaltyGoals||0)+(this.smallPenaltyGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"goalsPercent",{get:function(){return this.shots&&this.totalGoals?Math.round(1e3*this.totalGoals/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsOnGoalPercent",{get:function(){return this.shotsOnGoal&&this.shots?Math.round(1e3*this.shotsOnGoal/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penalties",{get:function(){return(this.penaltyGoals||0)+(this.penaltyAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyGoalsPercent",{get:function(){return this.penaltyAttempts&&this.penaltyGoals?Math.round(1e3*this.penaltyGoals/this.penaltyAttempts)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenalties",{get:function(){return(this.smallPenaltyGoals||0)+(this.smallPenaltyAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltyGoalsPercent",{get:function(){return this.smallPenaltyAttempts&&this.smallPenaltyGoals?Math.round(1e3*this.smallPenaltyGoals/this.smallPenaltyAttempts)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsAgainst",{get:function(){return(this.saves||0)+(this.goalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyShotsAgainst",{get:function(){return(this.penaltySaves||0)+(this.penaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltyShotsAgainst",{get:function(){return(this.smallPenaltySaves||0)+(this.smallPenaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoalsAgainst",{get:function(){return(this.goalsAgainst||0)+(this.penaltyGoalsAgainst||0)+(this.smallPenaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalSaves",{get:function(){return(this.saves||0)+(this.penaltySaves||0)+(this.smallPenaltySaves||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltySavesPercent",{get:function(){return this.penaltyShotsAgainst&&this.penaltySaves?Math.round(1e3*this.penaltySaves/this.penaltyShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltySavesPercent",{get:function(){return this.smallPenaltyShotsAgainst&&this.smallPenaltySaves?Math.round(1e3*this.smallPenaltySaves/this.smallPenaltyShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",updated_at:"updatedAt",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",goals:"goals",assists:"assists",corners:"corners",free_kicks:"freeKicks",penalty_goals:"penaltyGoals",penalty_attempts:"penaltyAttempts",penalty_goals_against:"penaltyGoalsAgainst",penalty_saves:"penaltySaves",small_penalty_goals:"smallPenaltyGoals",small_penalty_attempts:"smallPenaltyAttempts",small_penalty_goals_against:"smallPenaltyGoalsAgainst",small_penalty_saves:"smallPenaltySaves",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",game_time:"gameTime",plus_minus:"plusMinus",fouls:"fouls",yellow_cards:"yellowCards",red_cards:"redCards",perfect_passes:"perfectPasses",losses:"losses",steals:"steals",outs:"outs",block_shots:"blockShots"},relation:{updatedAt:G}})],e)}(k),se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots_on_goal_percent:"shotsOnGoalPercent",shots:"shots",goals:"goals",goals_percent:"goalsPercent",total_goals:"totalGoals",assists:"assists",penalty_goals:"penaltyGoals",penalty_attempts:"penaltyAttempts",penalty_goals_percent:"penaltyGoalsPercent",penalty_saves:"penaltySaves",penalty_goals_against:"penaltyGoalsAgainst",penalty_shots_against:"penaltyShotsAgainst",penalty_saves_percent:"penaltySavesPercent",small_penalty_goals:"smallPenaltyGoals",small_penalty_attempts:"smallPenaltyAttempts",small_penalty_goals_percent:"smallPenaltyGoalsPercent",small_penalty_saves:"smallPenaltySaves",small_penalty_goals_against:"smallPenaltyGoalsAgainst",small_penalty_shots_against:"smallPenaltyShotsAgainst",small_penalty_saves_percent:"smallPenaltySavesPercent",saves:"saves",saves_percent:"savesPercent",total_saves:"totalSaves",goals_against:"goalsAgainst",total_goals_against:"totalGoalsAgainst",shots_against:"shotsAgainst",safety_rate:"safetyRate",fouls:"fouls",yellow_cards:"yellowCards",red_cards:"redCards",perfect_passes:"perfectPasses",losses:"losses",steals:"steals",outs:"outs",block_shots:"blockShots",corners:"corners",free_kicks:"freeKicks",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie"},relation:{tournamentTeamUser:Vt,team:Q,teamUser:Ht,user:Z,tournamentTeam:At,month:w}})],e)}(Mt),ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:se,competitorTeam:se}})],e)}(k),le=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/team_statistic/").pipe(o.map((function(t){return ue.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/user_statistic/").pipe(o.map((function(t){return ae.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/logs/").pipe(o.map((function(t){return re.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadApplication=function(t,e,o){return g(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/game_application_file/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:A,author:Z,createdAt:G}})],e)}(k),pe=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([C({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount"}})],t)}(),me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:F(pe)}})],e)}(k);(ie=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[ie.open=0]="open",ie[ie.in_progress=1]="in_progress",ie[ie.closed=2]="closed";var fe,de=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:w,status:S(t.TournamentStageStatuses)}})],n)}(k);function he(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}(fe=t.PlayoffTypes||(t.PlayoffTypes={})).double_elimination="double_elimination",fe.elimination="elimination";var ge,_e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount",type:"type"},relation:{type:S(t.PlayoffTypes)}})],n)}(k),ve=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stages=[],e}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"stagesCount",{get:function(){return Math.log(this.settings.teamsCount)/Math.log(2)},enumerable:!0,configurable:!0}),e.prototype.getPlayoffStages=function(){var t=this;if(0===this.stages.length&&this.settings.teamsCount){var e=Math.log(this.settings.teamsCount)/Math.log(2);this.stages=he(e).map((function(e){var n=t.settings.teamsCount/Math.pow(2,e);return{value:e,title:1===n?"Финал":"1 / "+n}}))}return this.stages},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:_e}})],e)}(k),ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",tournament_team:"tournamentTeam",user:"user",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",serve_percent:"servePercent",ace_percent:"acePercent",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",block_percent:"blockPercent",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",attack_percent:"attackPercent",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",receive_percent:"receivePercent",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",serve_receive_percent:"serveReceivePercent",points:"points",faults:"faults",newbie:"newbie"},relation:{team:Q,teamUser:Ht,tournamentTeamUser:Vt,tournamentTeam:At,user:Z,month:w}})],e)}(Mt),be=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team:"tournamentTeam",group:"group",tournament_stage_id:"tournamentStageId",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",missed_sum:"missedSum",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",points:"points",final_standing:"finalStanding",received_points:"receivedPoints"},relation:{tournamentTeam:At,group:Lt}})],e)}(k);(ge=t.LeagueNewsType||(t.LeagueNewsType={}))[ge.text=1]="text",ge[ge.video=2]="video";var Te,ke=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",title:"title",datetime:"datetime",preview_text:"previewText",detail_text:"detailText",picture:"picture",cover:"cover",mobile_picture:"mobilePicture",is_main:"isMain",tournaments:"tournaments",type:"type",video_link:"videoLink",tag:"tag"},relation:{datetime:G,picture:A,cover:A,mobilePicture:A,tournaments:F(ft),type:S(t.LeagueNewsType)}})],n)}(k);(Te=t.TournamentEventTypes||(t.TournamentEventTypes={}))[Te.game_closed=1]="game_closed",Te[Te.media_added=2]="media_added",Te[Te.news=3]="news";var Se,Pe,Fe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",game:"game",news:"news",league:"league",tournaments:"tournaments",event:"event",datetime:"datetime"},relation:{game:kt,news:ke,league:et,tournaments:F(ft),datetime:w,event:S(t.TournamentEventTypes)}})],n)}(k);!function(t){t[t.admin=1]="admin",t[t.moderator=2]="moderator",t[t.game_manager=3]="game_manager"}(Se||(Se={})),function(t){t[t.settings=1]="settings",t[t.users=2]="users",t[t.teams=3]="teams",t[t.media=4]="media",t[t.news=5]="news",t[t.game_export=6]="game_export",t[t.schedule=7]="schedule",t[t.game_management=8]="game_management"}(Pe||(Pe={}));!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}m(e,t),Object.defineProperty(e.prototype,"role",{get:function(){return this._role},set:function(t){this._role=Se[t]},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",user:"user",role:"role",permissions:"permissions"},relation:{user:Z,permissions:F(S(Pe))}})],e)}(k);var we=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/"+e+"/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getNews=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(o.map((function(t){return ce.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Fe.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentStages=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoff=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffGames=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(o.map((function(t){return me.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return void 0===r&&(r={}),g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=Ge(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:kt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getStageTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(o.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(o.map((function(t){return Vt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserGames=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/games/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getBasketballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e}).pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e}).pipe(o.map((function(t){return ye.toFront(t)}))).toPromise()]}))}))},i.prototype.getHockeyStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/hockey_statistic/",{params:e}).pipe(o.map((function(t){return ee.toFront(t)}))).toPromise()]}))}))},i.prototype.getFootballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return _(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(",")))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/football_statistic/",{params:e}).pipe(o.map((function(t){return se.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeamUsers=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/users/").pipe(o.map((function(t){return Vt.toFront(t)}))).toPromise()]}))}))},i.prototype.myPermission=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/permission/").pipe(o.map((function(t){return(t.permissions||[]).map((function(t){return Pe[t]}))}))).toPromise()]}))}))},i.prototype.getTournamentTeamTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentUserTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();function Ge(e,n){if(e.tournamentIds&&(n=n.set("tournament_ids",e.tournamentIds.join(","))),e.tournamentStageId&&(n=n.set("tournament_stage_id",e.tournamentStageId.toString())),e.tournamentTour&&(n=n.set("tournament_tour",e.tournamentTour.toString())),e.playoffStage&&(n=n.set("playoff_stage",e.playoffStage.toString())),e.teamId&&(n=n.set("team_id",e.teamId.toString())),e.status&&(n=n.set("status",t.GameStatuses[e.status])),e.statuses){var o=e.statuses.map((function(e){return t.GameStatuses[e]}));n=n.set("statuses",o.join(","))}return e.tournamentCourtId&&(n=n.set("tournament_court_id",e.tournamentCourtId.toString())),e.userId&&(n=n.set("user_id",e.userId.toString())),n}var Ce,Ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort"},relation:{picture:A}})],e)}(k);(Ce=t.BannerLocation||(t.BannerLocation={})).slider="slider",Ce.central="central",Ce.media="media";var Ue,Be=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort",location:"location"},relation:{picture:A,location:S(t.BannerLocation)}})],n)}(k),je=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(o.map((function(t){return et.toFront(t)}))).toPromise()]}))}))},i.prototype.getByDomain=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(o.map((function(t){return et.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Fe.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentSeasons=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=Ge(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:kt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getSeasons=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=(new n.HttpParams).set("not_closed",e?"1":""),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/",{params:i}).pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getPartners=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/partners/").pipe(o.map((function(t){return Ie.toFront(t)}))).toPromise()]}))}))},i.prototype.getBanners=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=e?(new n.HttpParams).set("location",e):new n.HttpParams,[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/banners/",{params:i}).pipe(o.map((function(t){return Be.toFront(t)}))).toPromise()]}))}))},i.prototype.getCourts=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/courts/").pipe(o.map((function(t){return vt.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Le=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getLeagueNewsList=function(e,i,r,a){return void 0===a&&(a=t.LeagueNewsType.text),g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()).set("type",t.LeagueNewsType[a]),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/news/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:ke.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getMainLeagueNews=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/?is_main=true").pipe(o.map((function(t){return t&&t.length>0?ke.toFront(t[0]):null}))).toPromise()]}))}))},i.prototype.getMainLeagueNewsList=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/?is_main=true").pipe(o.map((function(t){return ke.toFront(t)}))).toPromise()]}))}))},i.prototype.getNewsById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_news/"+t+"/").pipe(o.map((function(t){return ke.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentNewsList=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/",{observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:ke.toFront(t.body)}}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Ae=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getMedia=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:kt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:kt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueMedia=function(t,e,i,r){return void 0===r&&(r={}),g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()).set("size",i.toString()),r.mediaType&&(a=a.set("media_type",r.mediaType)),r.sort&&(a=a.set("sort",r.sort)),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/media/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMediaById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGameMedia=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.createZip=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadMedia=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/download/",{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();(Ue=t.PollStatuses||(t.PollStatuses={}))[Ue.open=1]="open",Ue[Ue.closed=2]="closed",Ue[Ue.archived=3]="archived";var Oe,He=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{uuid:"uuid",name:"name"}})],e)}(k),xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:Z}})],e)}(k),Ve=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.variantsWithAnswers=[],t}return m(n,e),Object.defineProperty(n.prototype,"variants",{get:function(){return this._variants},set:function(t){this._variants=t||[],this._answers&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"answers",{get:function(){return this._answers},set:function(t){this._answers=t||[],this._variants&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),n.prototype.calculateAnswersPercentage=function(){var t=this;if(this._answers.length){var e=this._variants.map((function(t){return t.uuid})),n=this._answers.reduce((function(t,n){return e.indexOf(n.answerUuid)<0||(t[n.answerUuid]||(t[n.answerUuid]=0),t[n.answerUuid]++),t}),{});this.variantsWithAnswers=this._variants.map((function(e){return{variant:e,percent:n[e.uuid]?Math.round(100*n[e.uuid]/t._answers.length):0}})).sort((function(t,e){return t.percent>e.percent?-1:1}))}},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",active:"active",status:"status",team_id:"teamId",name:"name",description:"description",variants:"variants",author:"author",answers:"answers",multiple_answer:"multipleAnswer",anonymous:"anonymous",created_at:"createdAt"},relation:{status:S(t.PollStatuses),variants:He,author:Z,answers:xe,createdAt:G}})],n)}(k),Me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",user_id:"userId",user:"user",team:"team",team_id:"teamId",user_accept:"userAccept",team_accept:"teamAccept",users_count:"usersCount",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",created_at:"createdAt",updated_at:"updatedAt"},relation:{user:Z,team:Q,createdAt:G,updateAt:G}})],e)}(k);(Oe=t.GameInviteStatus||(t.GameInviteStatus={}))[Oe.accepted=1]="accepted",Oe[Oe.declined=2]="declined";var Ee,ze,Ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:kt,teamUser:Ht,status:S(t.GameInviteStatus)}})],n)}(k);(Ee=t.TeamEventTypes||(t.TeamEventTypes={}))[Ee.training=1]="training",Ee[Ee.other=2]="other";var De,Re=((ze={})[t.TeamEventTypes.training]="Тренировка",ze[t.TeamEventTypes.other]="Другое",ze),We=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return this.eventType===t.TeamEventTypes.other?this.eventCustomName:Re[this.eventType]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.datetime.getTime()<(new Date).getTime()},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:S(t.TeamEventTypes),team:Q,datetime:G}})],n)}(k);(De=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[De.accepted=1]="accepted",De[De.declined=2]="declined";var qe,$e,Xe=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:S(t.TeamEventInviteStatuses)}})],e)}(),Je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:Ht}})],e)}(k),Ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return(null===this.teamAccept||null===this.organizationAccept)&&!1!==this.teamAccept&&!1!==this.organizationAccept},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team:"team",tournament:"tournament",team_accept:"teamAccept",organization_accept:"organizationAccept",user_invites_count:"userInvitesCount",user_invites:"userInvites",notifications_count:"notificationsCount"},relation:{team:Q,tournament:ft,userInvites:Je}})],e)}(k);(qe=t.NotificationType||(t.NotificationType={}))[qe.team_updated=1]="team_updated",qe[qe.team_invited=2]="team_invited",qe[qe.team_join_request=3]="team_join_request",qe[qe.team_join_declined_by_team=4]="team_join_declined_by_team",qe[qe.team_join_declined_by_user=5]="team_join_declined_by_user",qe[qe.team_join_canceled_by_team=6]="team_join_canceled_by_team",qe[qe.team_join_canceled_by_user=7]="team_join_canceled_by_user",qe[qe.team_joined_for_user=8]="team_joined_for_user",qe[qe.team_joined_for_team=9]="team_joined_for_team",qe[qe.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",qe[qe.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",qe[qe.team_user_number_changed=12]="team_user_number_changed",qe[qe.team_user_deleted_for_user=13]="team_user_deleted_for_user",qe[qe.team_user_deleted_for_team=14]="team_user_deleted_for_team",qe[qe.team_user_left=15]="team_user_left",qe[qe.game_updated=16]="game_updated",qe[qe.game_invited=17]="game_invited",qe[qe.game_invite_accepted=18]="game_invite_accepted",qe[qe.game_invite_declined=19]="game_invite_declined",qe[qe.game_remind=20]="game_remind",qe[qe.game_won=21]="game_won",qe[qe.game_losing=22]="game_losing",qe[qe.game_tech_defeat=23]="game_tech_defeat",qe[qe.game_tech_victory=24]="game_tech_victory",qe[qe.poll_created=25]="poll_created",qe[qe.poll_closed=26]="poll_closed",qe[qe.team_event_invited=27]="team_event_invited",qe[qe.team_event_accepted=28]="team_event_accepted",qe[qe.team_event_declined=29]="team_event_declined",qe[qe.team_event_remind=30]="team_event_remind",qe[qe.tournament_invited=31]="tournament_invited",qe[qe.tournament_joined=32]="tournament_joined",qe[qe.tournament_join_declined=33]="tournament_join_declined",qe[qe.tournament_join_canceled=34]="tournament_join_canceled",qe[qe.tournament_user_invited=35]="tournament_user_invited",qe[qe.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",qe[qe.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",qe[qe.tournament_user_added=38]="tournament_user_added",qe[qe.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",qe[qe.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",qe[qe.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",qe[qe.tournament_user_deleted=42]="tournament_user_deleted",qe[qe.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",qe[qe.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",qe[qe.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",qe[qe.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",qe[qe.tournament_team_deleted=47]="tournament_team_deleted",qe[qe.org_tournament_invite_created=48]="org_tournament_invite_created",qe[qe.org_tournament_invite_declined=49]="org_tournament_invite_declined",qe[qe.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",qe[qe.org_tournament_invite_changed=51]="org_tournament_invite_changed",qe[qe.org_tournament_user_deleted=52]="org_tournament_user_deleted",qe[qe.org_tournament_user_invited=53]="org_tournament_user_invited",qe[qe.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",qe[qe.org_tournament_team_leave=55]="org_tournament_team_leave",($e=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[$e.public=1]="public",$e[$e.org=2]="org";var Ke,Ze=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"important",{get:function(){return!0},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",event_type:"event",data:"data",initiator:"initiator",team:"team",team_invite:"teamInvite",team_user:"teamUser",poll:"poll",game:"game",game_invite:"gameInvite",team_event:"teamEvent",team_event_invite:"teamEventInvite",tournament:"tournament",tournament_invite:"tournamentInvite",tournament_team:"tournamentTeam",viewed:"viewed",protected:"protected",service:"service",created_at:"createdAt"},relation:{event:S(t.NotificationType),initiator:Z,team:Q,teamInvite:Me,teamUser:Ht,poll:Ve,game:kt,gameInvite:Ne,teamEvent:We,teamEventInvite:Xe,tournament:ft,tournamentInvite:Ye,tournamentTeam:At,service:S(t.NotificationServiceEnum),createdAt:G}})],n)}(k);(Ke=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[Ke.all=1]="all",Ke[Ke.important=2]="important",Ke[Ke.none=3]="none";var Qe,tn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:S(t.NotificationAllowTypes),browser:S(t.NotificationAllowTypes)}})],n)}(k),en=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCount=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/count/").pipe(o.map((function(t){return+t}))).toPromise()]}))}))},t.prototype.getList=function(t,e,i){return void 0===i&&(i={}),g(this,void 0,void 0,(function(){var r,a,s,u,l,c;return _(this,(function(p){r=(new n.HttpParams).set("page",t.toString()).set("size",e.toString());try{for(a=v(Object.keys(i)),s=a.next();!s.done;s=a.next())u=s.value,r=r.set(u,i[u])}catch(t){l={error:t}}finally{try{s&&!s.done&&(c=a.return)&&c.call(a)}finally{if(l)throw l.error}}return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/",{params:r,observe:"response"}).pipe(o.map((function(t){var e=Ze.toFront(t.body);return{total:+t.headers.get("x-page-count"),data:e}}))).toPromise()]}))}))},t.prototype.markViewed=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/"+t+"/viewed/",{viewed:e}).pipe(o.map((function(t){return Ze.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(o.map((function(t){return Ze.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(o.map((function(t){return tn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",tn.toBack(t)).pipe(o.map((function(t){return tn.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),nn=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(en),on=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/org/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(en),rn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCities=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(o.map((function(t){return M.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(o.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(k);(Qe=t.TeamPermissionTypes||(t.TeamPermissionTypes={}))[Qe.for_all=1]="for_all",Qe[Qe.for_users=2]="for_users",Qe[Qe.for_team=3]="for_team";var sn,un=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{players:"players",games:"games",statistic:"statistic",polls:"polls",events:"events"},relation:{players:S(t.TeamPermissionTypes),games:S(t.TeamPermissionTypes),statistic:S(t.TeamPermissionTypes),polls:S(t.TeamPermissionTypes),events:S(t.TeamPermissionTypes)}})],n)}(k),ln=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{can_edit:"canEdit",can_view_users:"canViewUsers",can_manage_permission:"canManagePermission",can_change_owner:"canChangeOwner",can_delete:"canDelete",can_manage_invites:"canManageInvites",can_view_invites:"canViewInvites",can_manage_polls:"canManagePolls",can_view_polls:"canViewPolls",can_answer_poll:"canAnswerPoll",can_manage_games:"canManageGames",can_view_games:"canViewGames",can_view_statistic:"canViewStatistic",can_promote_users:"canPromoteUsers",can_edit_users:"canEditUsers",can_delete_users:"canDeleteUsers",can_view_events:"canViewEvents",can_manage_events:"canManageEvents",can_view_tournaments:"canViewTournaments",can_manage_tournaments:"canManageTournaments",role:"role"},relation:{role:S(t.TeamUserRole)}})],n)}(k),cn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.search=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=(new n.HttpParams).set("search",t),e&&(i=i.set("sport",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/",{params:i}).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.create=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/",Q.toBack(t)).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/").pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamAccess=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/access/").pipe(o.map((function(t){return ln.toFront(t)}))).toPromise()]}))}))},i.prototype.update=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/",Q.toBack(e)).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.delete=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.id+"/").toPromise()]}))}))},i.prototype.getPermission=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/").pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.updatePermission=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/",un.toBack(e)).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsers=function(t,e){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=new n.HttpParams,e&&(i=i.set("tournament_id",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/",{params:i}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserRole=function(e,n,i){return g(this,void 0,void 0,(function(){return _(this,(function(r){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+e+"/users/"+n+"/role/",{role:t.TeamUserRole[i]}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserNumber=function(t,e,n){return g(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/"+e+"/number/",{number:n.toString()}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteUser=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.teamId+"/users/"+t.id+"/").toPromise()]}))}))},i.prototype.changeOwner=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/owner/",{id:e.id}).pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvites=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/").pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInvite=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/",{user:e}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/accept/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/decline/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.resendInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/resend/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvitesExternal=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/").pipe(o.map((function(t){return an.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInviteExternal=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/",an.toBack(e)).pipe(o.map((function(t){return an.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteInviteExternal=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/").toPromise()]}))}))},i.prototype.resendInviteExternal=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/resend/",{}).pipe(o.map((function(t){return an.toFront(t)}))).toPromise()]}))}))},i.prototype.getPolls=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/"+(e?"?archive=1":"")).pipe(o.map((function(t){return Ve.toFront(t)}))).toPromise()]}))}))},i.prototype.createPoll=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/",Ve.toBack(e)).pipe(o.map((function(t){return Ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsersStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/statistics/").pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return ye.toFront(t)}))).toPromise()]}))}))},i.prototype.joinTeam=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/join/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.leaveTeam=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/leave/",{}).toPromise()]}))}))},i.prototype.getGames=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/"+(e?"?archive=1":"")).pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.createGame=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/",kt.toBack(e)).pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/").pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},i.prototype.createTeamEvent=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/",We.toBack(e)).pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_teams/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentInvites=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_invites/").pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",i.toString()),r&&(a=a.set("size",r.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/"+e+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:kt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.acceptTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/accept/",{}).pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},i.prototype.declineTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/decline/",{}).pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},i.prototype.registerLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/lazy_user/",{user:Z.toBack(e)}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getLazyUser=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.updateLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/",{user:Z.toBack(e)}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteLazyUser=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").toPromise()]}))}))},i.prototype.resendLazyUserEmail=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/resend_email/",{}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),pn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamEvent=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},t.prototype.updateTeamEvent=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team_event/"+t.id+"/",We.toBack(t)).pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},t.prototype.deleteTeamEvent=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").toPromise()]}))}))},t.prototype.getTeamEventInvites=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/").pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.prototype.createTeamEventInvite=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/",{team_user_id:e}).pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/accept/",{}).pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.prototype.declineTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/decline/",{}).pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"usersCount",{get:function(){return this.validUsersCount+this.invalidUsersCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.hasAccess&&!this.inviteSent&&!this.alreadyInTournament},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(k),fn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",join_data:"joinData"},relation:{team:Q,joinData:mn}})],e)}(k),dn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamsForJoin=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams_for_join/").pipe(o.map((function(t){return fn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={team:{id:e},user_invites:Je.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",i).pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),hn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/"+e+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/tournaments/").pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=Ge(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:kt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Fe.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:kt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/teams/").pipe(o.map((function(t){return At.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/games_stages/").pipe(o.map((function(t){return me.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),gn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(o.map((function(t){return Lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(o.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),_n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{edit:"edit",personal_data:"personalData",teams:"teams",statistic:"statistic",games:"games"}})],e)}(k);(sn=t.UserPermissionTypes||(t.UserPermissionTypes={}))[sn.denied=1]="denied",sn[sn.for_all=2]="for_all",sn[sn.for_users=3]="for_users",sn[sn.for_team=4]="for_team";var vn,yn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",personal_data:"personalData",games:"games",teams:"teams",statistic:"statistic"},relation:{personalData:S(t.UserPermissionTypes),games:S(t.UserPermissionTypes),teams:S(t.UserPermissionTypes),statistic:S(t.UserPermissionTypes)}})],n)}(k),bn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCurrentUser=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/").pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/").pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.getAccess=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/access/").pipe(o.map((function(t){return _n.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUser=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/",Z.toBack(e)).pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPhoto=function(t,e){return g(this,void 0,void 0,(function(){var n;return _(this,(function(i){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/photo/",n).pipe(o.map((function(t){return A.toFront(t)}))).toPromise()]}))}))},t.prototype.changePassword=function(t,e,n,o){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={old_password:e,password:n,password_confirm:o},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_password/",i).toPromise()]}))}))},t.prototype.changeEmail=function(t,e,n){return g(this,void 0,void 0,(function(){var o;return _(this,(function(i){return o={email:e,password:n},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email/",o).toPromise()]}))}))},t.prototype.changeEmailConfirm=function(t,e,n,o){return g(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={email:e,password:n,token:o},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email_confirm/",i).toPromise()]}))}))},t.prototype.getUserProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/profile/").pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.getBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/basketball_profile/").pipe(o.map((function(t){return N.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_profile/").pipe(o.map((function(t){return W.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/profile/",V.toBack(t)).pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/basketball_profile/",N.toBack(t)).pipe(o.map((function(t){return N.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserVolleyballProfile=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/volleyball_profile/",W.toBack(t)).pipe(o.map((function(t){return W.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserPermissions=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/permission/").pipe(o.map((function(t){return yn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPermission=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/current/permission/",yn.toBack(t)).pipe(o.map((function(t){return yn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/teams/").pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()]}))}))},t.prototype.getInvites=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/invites/").pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/accept/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},t.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/decline/",{}).pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},t.prototype.getStatistics=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/statistics/").pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},t.prototype.getStreetballStatistics=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/streetball_statistics/").pipe(o.map((function(t){return Et.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return ye.toFront(t)}))).toPromise()]}))}))},t.prototype.getGames=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/games/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},t.prototype.getGameInvites=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/").pipe(o.map((function(t){return Ne.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptGameInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/accept/",{}).pipe(o.map((function(t){return Ne.toFront(t)}))).toPromise()]}))}))},t.prototype.declineGameInvite=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/decline/",{}).pipe(o.map((function(t){return Ne.toFront(t)}))).toPromise()]}))}))},t.prototype.searchUsers=function(t){return g(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=(new n.HttpParams).set("search",t),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/",{params:e}).pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.setWizardShowed=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.put(this.configService.get("apiUrl")+"/api/v1/user/current/wizards/",{wizard:t}).pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/team_events/").pipe(o.map((function(t){return We.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:ye,competitorTeam:ye}})],e)}(k),kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attacks",{get:function(){return this.attackSpikes+this.attackShots},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blocks",{get:function(){return this.stuffBlocks+this.blockRebounds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalReceives",{get:function(){return this.receives+this.excellentReceives},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{game_user_id:"gameUserId",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",points:"points",faults:"faults",yellow_cards:"yellowCards"}})],e)}(k);(vn=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[vn.enter_game=1]="enter_game",vn[vn.exit_game=2]="exit_game",vn[vn.remove_game=3]="remove_game",vn[vn.serve_hit=4]="serve_hit",vn[vn.serve_fault=5]="serve_fault",vn[vn.serve_ace=6]="serve_ace",vn[vn.stuff_block=7]="stuff_block",vn[vn.block_fault=8]="block_fault",vn[vn.block_rebound=9]="block_rebound",vn[vn.attack_spike=10]="attack_spike",vn[vn.attack_fault=11]="attack_fault",vn[vn.attack_shot=12]="attack_shot",vn[vn.receive=13]="receive",vn[vn.receive_fault=14]="receive_fault",vn[vn.excellent_receive=15]="excellent_receive",vn[vn.point=16]="point",vn[vn.fault=17]="fault",vn[vn.serve_receive=18]="serve_receive",vn[vn.serve_receive_fault=19]="serve_receive_fault",vn[vn.excellent_serve_receive=20]="excellent_serve_receive",vn[vn.timeout=21]="timeout",vn[vn.yellow_card=22]="yellow_card";var Sn,Pn,Fn,wn,Gn,Cn,In,Un,Bn,jn,Ln,An,On,Hn,xn,Vn,Mn=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],En=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],zn=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.rally===t.rally&&this.set===t.set?this.datetime&&t.datetime?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.id<t.id?1:-1:this.set===t.set?this.rally<t.rally?1:-1:this.set<t.set?1:-1},n.prototype.isScoreType=function(){return Mn.includes(this.logType)},n.prototype.isFaultType=function(){return En.includes(this.logType)},n.prototype.isServe=function(){return[t.VolleyballGameLogType.serve_hit,t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.serve_fault].includes(this.logType)},n.prototype.isAttack=function(){return[t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.attack_shot].includes(this.logType)},n.prototype.isReceive=function(){return[t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.receive,t.VolleyballGameLogType.excellent_receive].includes(this.logType)},n.prototype.isServeReceive=function(){return[t.VolleyballGameLogType.serve_receive_fault,t.VolleyballGameLogType.serve_receive,t.VolleyballGameLogType.excellent_serve_receive].includes(this.logType)},n.prototype.isBlock=function(){return[t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.block_rebound,t.VolleyballGameLogType.stuff_block].includes(this.logType)},n.prototype.isEnterExit=function(){return[t.VolleyballGameLogType.enter_game,t.VolleyballGameLogType.exit_game,t.VolleyballGameLogType.timeout].includes(this.logType)},n.prototype.isComboType=function(){return![t.VolleyballGameLogType.receive,t.VolleyballGameLogType.serve_receive].includes(this.logType)},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([C({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",log_type:"logType",set:"set",rally:"rally",position:"position",team_id:"teamId",datetime:"datetime"},relation:{logType:S(t.VolleyballGameLogType),datetime:G}})],n)}(k),Nn=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return Tn.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return kn.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/logs/").pipe(o.map((function(t){return zn.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}($t),Dn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_team/"+t+"/").pipe(o.map((function(t){return Q.toFront(t)}))).toPromise()},t.prototype.getTournamentTeams=function(t,e){var i=(new n.HttpParams).set("league_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_team/"+t+"/tournament_teams/",{params:i}).pipe(o.map((function(t){return At.toFront(t)}))).toPromise()},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Rn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/").pipe(o.map((function(t){return Z.toFront(t)}))).toPromise()},t.prototype.getTournaments=function(t,e){var i=(new n.HttpParams).set("league_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/tournaments/",{params:i}).pipe(o.map((function(t){return ft.toFront(t)}))).toPromise()},t.prototype.getTournamentUser=function(t,e){var i=(new n.HttpParams).set("season_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/tournament_user/",{params:i}).pipe(o.map((function(t){return Vt.toFront(t)}))).toPromise()},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Wn=((Sn={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",Sn[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",Sn[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",Sn[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",Sn[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",Sn[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",Sn[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",Sn[t.BasketballGameLogTypes.two_point_made]="2 очка",Sn[t.BasketballGameLogTypes.three_point_made]="3 очка",Sn[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",Sn[t.BasketballGameLogTypes.one_point_made]="1 очко",Sn[t.BasketballGameLogTypes.assist]="Передача",Sn[t.BasketballGameLogTypes.block]="Блокшот",Sn[t.BasketballGameLogTypes.rebound]="Подбор",Sn[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",Sn[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",Sn[t.BasketballGameLogTypes.steal]="Перехват",Sn[t.BasketballGameLogTypes.turnover]="Потеря",Sn[t.BasketballGameLogTypes.personal_foul]="Фол",Sn[t.BasketballGameLogTypes.technical_foul]="Технический фол",Sn[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",Sn[t.BasketballGameLogTypes.timeout]="Таймаут",Sn),qn=((Pn={})[t.HockeyGameLogTypes.enter_game]="Выход на площадку",Pn[t.HockeyGameLogTypes.exit_game]="Ушел с площадки",Pn[t.HockeyGameLogTypes.shot_miss]="Бросок мимо",Pn[t.HockeyGameLogTypes.shot_on_goal]="Бросок по воротам",Pn[t.HockeyGameLogTypes.shot_blocked]="Заблокированный бросок",Pn[t.HockeyGameLogTypes.goal]="Гол",Pn[t.HockeyGameLogTypes.shootout_attempt]="Булит промах",Pn[t.HockeyGameLogTypes.shootout_goal]="Булит гол",Pn[t.HockeyGameLogTypes.assist]="Передача",Pn[t.HockeyGameLogTypes.block_shot]="Блокировка броска",Pn[t.HockeyGameLogTypes.minor_penalty]="Малый штраф",Pn[t.HockeyGameLogTypes.major_penalty]="Большой штраф",Pn[t.HockeyGameLogTypes.misconduct_penalty]="Дисциплинарный штраф",Pn[t.HockeyGameLogTypes.game_misconduct_penalty]="Дисциплинарный штраф до конца игры",Pn[t.HockeyGameLogTypes.match_penalty]="Матч-штраф",Pn[t.HockeyGameLogTypes.penalty_shot]="Штрафной бросок",Pn[t.HockeyGameLogTypes.face_off_lose]="Проигрыш в вбрасывании",Pn[t.HockeyGameLogTypes.face_off_win]="Победа в вбрасывании",Pn[t.HockeyGameLogTypes.save]="Отражен бросок",Pn[t.HockeyGameLogTypes.timeout]="Таймаут",Pn[t.HockeyGameLogTypes.penalty_start]="Начало штрафного времени",Pn[t.HockeyGameLogTypes.penalty_end]="Конец штрафного времени",Pn),$n=((Fn={})[t.FootballGameLogTypes.enter_game]="Выход на поле",Fn[t.FootballGameLogTypes.exit_game]="Ушел с поля",Fn[t.FootballGameLogTypes.shot_miss]="Удар мимо",Fn[t.FootballGameLogTypes.shot_on_goal]="Удар в створ",Fn[t.FootballGameLogTypes.shot_blocked]="Заблокированный удар",Fn[t.FootballGameLogTypes.goal]="Гол",Fn[t.FootballGameLogTypes.assist]="Передача",Fn[t.FootballGameLogTypes.penalty_attempt]="Пенальти промах",Fn[t.FootballGameLogTypes.penalty_goal]="Пенальти гол",Fn[t.FootballGameLogTypes.small_penalty_attempt]="10-метровый промах",Fn[t.FootballGameLogTypes.small_penalty_goal]="10-метровый гол",Fn[t.FootballGameLogTypes.block_shot]="Блокировка удара",Fn[t.FootballGameLogTypes.corner]="Угловой",Fn[t.FootballGameLogTypes.free_kick]="Штрафной удар",Fn[t.FootballGameLogTypes.save]="Отражен удар",Fn[t.FootballGameLogTypes.penalty_save]="Отражен пенальти",Fn[t.FootballGameLogTypes.small_penalty_save]="Отражен 10 метровый",Fn[t.FootballGameLogTypes.foul]="Фол",Fn[t.FootballGameLogTypes.yellow_card]="Желтая карточка",Fn[t.FootballGameLogTypes.red_card]="Красная карточка",Fn[t.FootballGameLogTypes.perfect_pass]="Пас",Fn[t.FootballGameLogTypes.loss]="Потеря",Fn[t.FootballGameLogTypes.steal]="Перехват",Fn[t.FootballGameLogTypes.out]="Аут",Fn[t.FootballGameLogTypes.timeout]="Таймаут",Fn),Xn=((wn={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",wn[t.OvertimeTypes.to_score_total]="До N очков",wn[t.OvertimeTypes.time]="По времени",wn[t.OvertimeTypes.without_overtime]="Без овертайма",wn[t.OvertimeTypes.to_first_goal]="На N минут до первой шайбы",wn[t.OvertimeTypes.to_first_goal_and_bullitts]="На N минут до первой шайбы + буллиты",wn[t.OvertimeTypes.bullitts]="Буллиты",wn[t.OvertimeTypes.penalties]="Пенальти",wn[t.OvertimeTypes.time_and_penalties]="Дополнительное время + пенальти",wn),Jn=((Gn={})[t.TeamUserRole.member]="Пользователь",Gn[t.TeamUserRole.moderator]="Модератор",Gn[t.TeamUserRole.admin]="Владелец",Gn[t.TeamUserRole.coach]="Тренер",Gn[t.TeamUserRole.head_coach]="Главный тренер",Gn[t.TeamUserRole.playing_coach]="Играющий тренер",Gn[t.TeamUserRole.manager]="Менеджер",Gn[t.TeamUserRole.head_manager]="Генеральный менеджер",Gn[t.TeamUserRole.captain]="Капитан",Gn[t.TeamUserRole.assistant]="Ассистент",Gn),Yn=((Cn={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",Cn[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",Cn[t.GameBasketballPosition.small_forward]="Легкий форвард",Cn[t.GameBasketballPosition.power_forward]="Мощный форвард",Cn[t.GameBasketballPosition.center]="Центровой",Cn),Kn=((In={})[t.GameBasketballPosition.point_guard]="PG",In[t.GameBasketballPosition.shooting_guard]="SG",In[t.GameBasketballPosition.small_forward]="SF",In[t.GameBasketballPosition.power_forward]="PF",In[t.GameBasketballPosition.center]="C",In),Zn=((Un={})[t.WorkHand.left]="Левая",Un[t.WorkHand.right]="Правая",Un),Qn=((Bn={})[t.GameVolleyballPosition.setter]="Связующий",Bn[t.GameVolleyballPosition.libero]="Либеро",Bn[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",Bn[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",Bn[t.GameVolleyballPosition.dioganal]="Диагональный",Bn),to=((jn={})[t.GameVolleyballPosition.setter]="S",jn[t.GameVolleyballPosition.libero]="L",jn[t.GameVolleyballPosition.middle_player]="MP",jn[t.GameVolleyballPosition.receiver_attacker]="RA",jn[t.GameVolleyballPosition.dioganal]="D",jn),eo=((Ln={})[t.GameVolleyballPosition.setter]="связ.",Ln[t.GameVolleyballPosition.libero]="либеро",Ln[t.GameVolleyballPosition.middle_player]="блок.",Ln[t.GameVolleyballPosition.receiver_attacker]="доигр.",Ln[t.GameVolleyballPosition.dioganal]="диаг.",Ln),no=((An={})[t.VolleyballWorkHand.left]="Левая",An[t.VolleyballWorkHand.right]="Правая",An),oo=((On={})[t.GameHockeyPosition.goaltender]="Вратарь",On[t.GameHockeyPosition.defensemen]="Защитник",On[t.GameHockeyPosition.forward]="Нападающий",On),io=((Hn={})[t.GameFootballPosition.goalkeeper]="Вратарь",Hn[t.GameFootballPosition.defensemen]="Защитник",Hn[t.GameFootballPosition.midfielder]="Полузащитник",Hn[t.GameFootballPosition.forward]="Нападающий",Hn),ro=((xn={})[t.FootballWorkFoot.left]="Левая",xn[t.FootballWorkFoot.right]="Правая",xn[t.FootballWorkFoot.both]="Обе",xn),ao=((Vn={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",Vn[t.VolleyballGameLogType.exit_game]="Уход с площадки",Vn[t.VolleyballGameLogType.remove_game]="Удаление с площадки",Vn[t.VolleyballGameLogType.serve_ace]="Эйс",Vn[t.VolleyballGameLogType.serve_hit]="Подача",Vn[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",Vn[t.VolleyballGameLogType.attack_spike]="Результативная атака",Vn[t.VolleyballGameLogType.attack_shot]="Атака",Vn[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",Vn[t.VolleyballGameLogType.stuff_block]="Результативный блок",Vn[t.VolleyballGameLogType.block_rebound]="Блок",Vn[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",Vn[t.VolleyballGameLogType.excellent_receive]="Отличный прием",Vn[t.VolleyballGameLogType.receive]="Прием",Vn[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",Vn[t.VolleyballGameLogType.serve_receive]="Прием подачи",Vn[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",Vn[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",Vn[t.VolleyballGameLogType.point]="Очко",Vn[t.VolleyballGameLogType.fault]="Ошибка",Vn[t.VolleyballGameLogType.timeout]="Таймаут",Vn[t.VolleyballGameLogType.yellow_card]="Предупреждение",Vn),so=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([C({mappingFields:{id:"id",name:"name",files:"files",key_code:"keyCode"},relation:{files:F(A)}})],e)}(k),uo=function(){function t(t,e){this.httpClient=t,this.configService=e,this.channels$={},this.subscriptions={},this.connectedSubject=new i.BehaviorSubject(!1)}return Object.defineProperty(t.prototype,"connected$",{get:function(){return this.connectedSubject},enumerable:!0,configurable:!0}),t.prototype.listen=function(t){var e=this;if(t in this.channels$)return this.channels$[t];this.channels$[t]=new r.Subject;var n=this.connect().subscribe((function(o){e.subscriptions[t]=e.addEngineSubscription(t),setTimeout((function(){n.unsubscribe()}))}));return this.channels$[t]},t.prototype.unsubscribe=function(t){this.subscriptions[t]&&(this.subscriptions[t].unsubscribe(),delete this.subscriptions[t]),this.channels$[t]&&(this.channels$[t].complete(),delete this.channels$[t])},t.prototype.connect=function(){var t=this;return this.initializeEngineSubject||(this.initializeEngineSubject=new a.ReplaySubject(1),this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/centrifugo/").subscribe((function(e){t.initializeEngine({url:t.configService.get("centrifugoUrl"),user:e.user,timestamp:e.timestamp,token:e.token,transports:["websocket"]}),t.centrifuge.connect(),t.centrifuge.on("connect",(function(){t.initializeEngineSubject.next(!0),t.connectedSubject.next(!0)})),t.centrifuge.on("disconnect",(function(){t.connectedSubject.next(!1)}))}))),this.initializeEngineSubject},t.prototype.publish=function(t,e){var n=this;return new i.Observable((function(o){n.connect().subscribe((function(){n.subscriptions[t]||(n.subscriptions[t]=n.addEngineSubscription(t)),n.subscriptions[t].publish(e).then((function(t){o.next(t),o.complete()}),(function(t){throw t}))}))}))},t.prototype.disconnect=function(){this.centrifuge.disconnect(),this.initializeEngineSubject=void 0,this.channels$={},this.subscriptions={}},t.prototype.initializeEngine=function(t){this.centrifuge=new s(t)},t.prototype.addEngineSubscription=function(t){return this.centrifuge.subscribe(t,this.resolveMessage.bind(this))},t.prototype.resolveMessage=function(t){var e=t.channel;this.channels$[e]&&this.channels$[e].next(t.data)},t.ctorParameters=function(){return[{type:n.HttpClient},{type:jt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(jt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),lo=function(){function t(t,e){this.modelClass=e,this.defaultValue=t}return t.prototype.toFront=function(t){return this.modelClass?this.modelClass.toFront(t):t},t.prototype.toBack=function(t){return this.modelClass?this.modelClass.toBack(t):t},t}(),co=function(){function t(t,e){this.name=t,this.fields=e}return t.prototype.addField=function(t,e){this.fields[t]=e},t.prototype.save=function(t,e){this.fields[t]&&this.setItem(this.name+"_"+t,this.fields[t].toBack(e))},t.prototype.get=function(t){if(this.fields[t]){var e=this.getItem(this.name+"_"+t);return null===e&&(e=this.fields[t].defaultValue),null==e?e:this.fields[t].toFront(e)}},t.prototype.clear=function(){var t,e;try{for(var n=v(Object.keys(this.fields)),o=n.next();!o.done;o=n.next()){var i=o.value;this.removeItem(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.getItem=function(t){throw new Error("Function getItem for store engine "+typeof this+" not implemented")},t.prototype.setItem=function(t,e){throw new Error("Function setItem for store engine "+typeof this+" not implemented")},t.prototype.removeItem=function(t){throw new Error("Function deleteItem for store engine "+typeof this+" not implemented")},t}(),po=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.setItem=function(t,e){localStorage.setItem(t,JSON.stringify(e))},e.prototype.getItem=function(t){try{return JSON.parse(localStorage.getItem(t))}catch(t){return}},e.prototype.removeItem=function(t){localStorage.removeItem(t)},e}(co);function mo(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function fo(t){return[{rel:"apple-touch-icon",sizes:"180x180",href:"/assets/favicon/"+t+"apple-touch-icon.png"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/assets/favicon/"+t+"favicon-32x32.png"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/assets/favicon/"+t+"favicon-16x16.png"},{rel:"shortcut icon",href:"/assets/favicon/"+t+"favicon.ico"},{rel:"manifest",href:"/assets/favicon/"+t+"site.webmanifest"},{rel:"mask-icon",href:"/assets/favicon/"+t+"safari-pinned-tab.svg",color:"#ff0000"}]}var ho=function(){function t(t,e){this.injector=t,this.platformId=e,this.isBrowser=c.isPlatformBrowser(this.platformId)}return t.prototype.intercept=function(t,e){if(!this.isBrowser)return e.handle(t);t=t.clone({withCredentials:!0});var n=mo("csrftoken");return n&&(t=t.clone({setHeaders:{"X-CSRFToken":n}})),e.handle(t)},t.ctorParameters=function(){return[{type:e.Injector},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t=d([e.Injectable(),h(1,e.Inject(e.PLATFORM_ID))],t)}();t.BaseModel=k,t.BaseService=Bt,t.BaseStatistic=Mt,t.BasketballGameApi=Xt,t.BasketballGameConfig=dt,t.BasketballGameLog=Wt,t.BasketballGameLogTypeLocalization=Wn,t.BasketballGameStatistic=Nt,t.BasketballGameTeamStatistic=zt,t.BasketballProfile=N,t.BasketballStatistic=Et,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=uo,t.City=M,t.ConfigService=jt,t.DateField=w,t.DateTimeField=G,t.FAULT_LOG_TYPES=En,t.Feedback=Jt,t.FeedbackApi=Yt,t.File=A,t.FileApi=Kt,t.FootballGameApi=le,t.FootballGameConfig=Tt,t.FootballGameLog=re,t.FootballGameLogTypeLocalization=$n,t.FootballGameStatistic=ae,t.FootballGameTeamStatistic=ue,t.FootballProfile=Y,t.FootballStatistic=se,t.FootballWorkFootLocalization=ro,t.Game=kt,t.GameBasketballPositionLocalization=Yn,t.GameBasketballPositionShortLocalization=Kn,t.GameFootballPositionLocalization=io,t.GameHockeyPositionLocalization=oo,t.GameInvite=Ne,t.GameTimelineStageItem=pe,t.GameTimelineStages=me,t.GameUser=qt,t.GameVolleyballPositionLocalization=Qn,t.GameVolleyballPositionShortLocalization=to,t.GameVolleyballPositionShortRuLocalization=eo,t.HockeyGameApi=oe,t.HockeyGameConfig=bt,t.HockeyGameLog=Qt,t.HockeyGameLogTypeLocalization=qn,t.HockeyGameStatistic=te,t.HockeyGameTeamStatistic=ne,t.HockeyPenaltyTypes=T,t.HockeyProfile=X,t.HockeyStatistic=ee,t.HttpCookieInterceptor=ho,t.League=et,t.LeagueApi=je,t.LeagueBanner=Be,t.LeagueCourt=vt,t.LeagueNews=ke,t.LeagueNewsApi=Le,t.LeaguePartner=Ie,t.LeaguePlaylist=so,t.LocalStorageEngine=po,t.MediaApi=Ae,t.MediaItem=yt,t.ModelInstance=C,t.Notification=Ze,t.NotificationApi=nn,t.NotificationBaseApi=en,t.NotificationSettings=tn,t.OrgNotificationApi=on,t.Organization=tt,t.OvertimeTypeLocalization=Xn,t.Playoff=ve,t.PlayoffSettings=_e,t.Poll=Ve,t.PollAnswer=xe,t.PollVariant=He,t.PublicTeamApi=Dn,t.PublicUserApi=Rn,t.ReferenceApi=rn,t.SCORE_LOG_TYPES=Mn,t.Sport=x,t.StorageEngine=co,t.StorageEngineField=lo,t.Store=Ut,t.Team=Q,t.TeamAccess=ln,t.TeamApi=cn,t.TeamEvent=We,t.TeamEventApi=pn,t.TeamEventInvite=Xe,t.TeamEventTypeLocalization=Re,t.TeamInvite=Me,t.TeamInviteExternal=an,t.TeamPermission=un,t.TeamUser=Ht,t.TeamUserRoleLocalization=Jn,t.ToBackHook=B,t.ToFrontHook=U,t.Tournament=ft,t.TournamentApi=we,t.TournamentDisqualification=xt,t.TournamentEvent=Fe,t.TournamentGroup=Lt,t.TournamentInvite=Ye,t.TournamentJoinApi=dn,t.TournamentJoinData=mn,t.TournamentJoinTeam=fn,t.TournamentNews=ce,t.TournamentSeason=lt,t.TournamentSeasonApi=hn,t.TournamentSettings=pt,t.TournamentStage=de,t.TournamentStageApi=gn,t.TournamentStageTeam=be,t.TournamentTeam=At,t.TournamentTeamUser=Vt,t.TournamentTeamUserInvite=Je,t.TournamentTeamWinner=mt,t.UntilDestroy=function(t){var e,n=(e=t).ɵcmp||e.ɵdir,o=n.onDestroy;t.__componentDestroyed$=new r.Subject,n.onDestroy=function(){t.__componentDestroyed$.next(),t.__componentDestroyed$.complete(),o.apply(this)}},t.User=Z,t.UserAccess=_n,t.UserApi=bn,t.UserPermission=yn,t.UserProfile=V,t.VolleyballGameApi=Nn,t.VolleyballGameConfig=_t,t.VolleyballGameLog=zn,t.VolleyballGameLogTypeLocalization=ao,t.VolleyballGameStatistic=kn,t.VolleyballGameTeamStatistic=Tn,t.VolleyballProfile=W,t.VolleyballStatistic=ye,t.VolleyballWorkHandLocalization=no,t.WorkHandLocalization=Zn,t.addItemInArray=Ft,t.changeFavicons=function(t,e){var n,o,i,r,a="";"ablmoscow"===e&&(a="abl/");var s=fo(a);try{for(var u=v(s),l=u.next();!l.done;l=u.next()){var c=l.value,p=t.createElement("link");try{for(var m=(i=void 0,v(Object.keys(c))),f=m.next();!f.done;f=m.next()){var d=f.value;p.setAttribute(d,c[d])}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=m.return)&&r.call(m)}finally{if(i)throw i.error}}t.head.appendChild(p)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}},t.componentDestroyed=function(t){if(t.constructor.__componentDestroyed$)return t.constructor.__componentDestroyed$;throw new Error("Use @UntilDestroy decorator in class")},t.deleteItemFromArray=Gt,t.enumField=S,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=he,t.getArrayChunks=function(t,e){var n=[],o=Math.ceil(t.length/e);if(0===o)return[t];for(var i=0;i<o;i++)n.push(t.slice(i*e,(i+1)*e));return n},t.getCookie=mo,t.getEnumOptions=function(t){return Object.keys(t).map((function(e){return t[e]})).filter((function(t){return!1===isNaN(+t)})).map((function(t){return+t}))},t.getIconsData=fo,t.handleError=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),(!t||0!==t.status&&404!==t.status||e&&0!==t.status)&&u.captureException(t),n||console.error(t)},t.isTouchDevice=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch)return!0;var e,n=["(",t.join("touch-enabled),("),"heartz",")"].join("");return e=n,window.matchMedia(e).matches},t.listField=F,t.markFormGroupTouched=function t(e){Object.values(e.controls).forEach((function(e){e.markAsTouched(),e.markAsDirty(),e instanceof l.FormGroup?t(e):e.controls&&e.controls.forEach((function(e){e instanceof l.FormGroup?t(e):(e.markAsTouched(),e.markAsDirty())}))}))},t.minLengthArrayValidator=function(t){return function(e){return e.value.length<t?{minLengthArray:{valid:!1}}:null}},t.patchItemInArray=function(t,e,n){return Array.isArray(t)?t.map((function(t){if(n&&Ct(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.updateItemInArray=St,t.updateItemsInArray=Pt,t.validateDate=function(t){return!t.value||/\d{2}\.\d{2}\.\d{4}/gi.test(t.value)?null:{invalidDate:{valid:!1}}},t.validateEmail=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=[]);var r=i.of(null).pipe(o.delay(500));return function(a){return n.indexOf(a.value)>-1?i.of(null):r.pipe(o.switchMap((function(){return t.checkEmail(a.value,e).pipe(o.map((function(t){return t?null:{emailTaken:!0}})))})))}},t.validatePhone=function(t){return t.value?11===(""+t.value).replace(/\D/gi,"").length?null:{invalidPhone:{valid:!1}}:null},t.validateUrl=function(t){return!t.value||/^(?:http(s)?:\/\/)[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(t.value)?null:{invalidUrl:!0}},t.ɵa=P,t.ɵb=$t,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=mtgame-core.umd.min.js.map
|