@mtgame/core 0.0.3 → 0.0.4
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/api/feedback-api.d.ts +9 -0
- package/api/file-api.d.ts +13 -0
- package/api/league-news-api.d.ts +13 -0
- package/api/public-api.d.ts +6 -0
- package/api/team-api.d.ts +66 -0
- package/api/team-event-api.d.ts +16 -0
- package/api/user-api.d.ts +51 -0
- package/bundles/mtgame-core.umd.js +1787 -534
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +2 -2
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/feedback-api.js +32 -0
- package/esm2015/api/file-api.js +46 -0
- package/esm2015/api/league-news-api.js +59 -0
- package/esm2015/api/public-api.js +7 -1
- package/esm2015/api/team-api.js +394 -0
- package/esm2015/api/team-event-api.js +81 -0
- package/esm2015/api/user-api.js +284 -0
- package/esm2015/models/basketball-game-config.js +2 -1
- package/esm2015/models/feedback.js +32 -0
- package/esm2015/models/league-news.js +39 -0
- package/esm2015/models/public-api.js +7 -1
- package/esm2015/models/team-access.js +45 -0
- package/esm2015/models/team-permission.js +38 -0
- package/esm2015/models/tournament-event.js +11 -4
- package/esm2015/models/tournament.js +2 -1
- package/esm2015/models/user-access.js +25 -0
- package/esm2015/models/user-permission.js +38 -0
- package/esm5/api/feedback-api.js +35 -0
- package/esm5/api/file-api.js +64 -0
- package/esm5/api/league-news-api.js +68 -0
- package/esm5/api/public-api.js +7 -1
- package/esm5/api/team-api.js +486 -0
- package/esm5/api/team-event-api.js +96 -0
- package/esm5/api/user-api.js +350 -0
- package/esm5/models/basketball-game-config.js +2 -1
- package/esm5/models/feedback.js +35 -0
- package/esm5/models/league-news.js +44 -0
- package/esm5/models/public-api.js +7 -1
- package/esm5/models/team-access.js +50 -0
- package/esm5/models/team-permission.js +43 -0
- package/esm5/models/tournament-event.js +11 -4
- package/esm5/models/tournament.js +2 -1
- package/esm5/models/user-access.js +30 -0
- package/esm5/models/user-permission.js +43 -0
- package/fesm2015/mtgame-core.js +1197 -187
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +1777 -536
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/basketball-game-config.d.ts +1 -0
- package/models/feedback.d.ts +9 -0
- package/models/league-news.d.ts +16 -0
- package/models/public-api.d.ts +6 -0
- package/models/team-access.d.ts +27 -0
- package/models/team-permission.d.ts +15 -0
- package/models/tournament-event.d.ts +5 -2
- package/models/tournament.d.ts +1 -0
- package/models/user-access.d.ts +10 -0
- package/models/user-permission.d.ts +16 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("rxjs/internal/Subject"),require("rxjs/internal/ReplaySubject"),require("centrifuge"),require("@sentry/browser"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("@mtgame/core",["exports","@angular/core","@angular/common/http","rxjs/operators","rxjs","rxjs/internal/Subject","rxjs/internal/ReplaySubject","centrifuge","@sentry/browser","@angular/forms","@angular/common"],e):e(((t=t||self).mtgame=t.mtgame||{},t.mtgame.core={}),t.ng.core,t.ng.common.http,t.rxjs.operators,t.rxjs,t.rxjs["internal/Subject"],t.rxjs["internal/ReplaySubject"],t.Centrifuge,t.browser,t.ng.forms,t.ng.common)}(this,(function(t,e,n,o,
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("rxjs/internal/Subject"),require("rxjs/internal/ReplaySubject"),require("centrifuge"),require("@sentry/browser"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("@mtgame/core",["exports","@angular/core","@angular/common/http","rxjs/operators","rxjs","rxjs/internal/Subject","rxjs/internal/ReplaySubject","centrifuge","@sentry/browser","@angular/forms","@angular/common"],e):e(((t=t||self).mtgame=t.mtgame||{},t.mtgame.core={}),t.ng.core,t.ng.common.http,t.rxjs.operators,t.rxjs,t.rxjs["internal/Subject"],t.rxjs["internal/ReplaySubject"],t.Centrifuge,t.browser,t.ng.forms,t.ng.common)}(this,(function(t,e,n,i,o,r,a,s,u,l,c){"use strict";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -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 _(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 h(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=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 T(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function S(t){return{toFront:function(e){return Array.isArray(e)?t.toFront(e):[]},toBack:function(e){return Array.isArray(e)?t.toBack(e):[]}}}var F=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),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){if(t){new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()));return t.toISOString()}},e}(k);function P(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 B,I=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)}}},G=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}}(B=t.FileEngine||(t.FileEngine={}))[B.django=1]="django",B[B.s3=2]="s3";var C,L=function(){function e(){}return e.toFront=function(t){return null},e.toBack=function(t){return null},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",path:"path",mime_type:"mimeType",size:"size",engine:"engine"},relation:{engine:T(t.FileEngine)}})],e)}();(C=t.SportTypes||(t.SportTypes={}))[C.basketball=1]="basketball",C[C.volleyball=2]="volleyball",C[C.classic_basketball=3]="classic_basketball",C[C.streetball=4]="streetball";var U,A,V=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.isVolleyball=function(){return this.id===t.SportTypes.volleyball||this.parentId===t.SportTypes.volleyball},n.prototype.isStreetball=function(){return this.id===t.SportTypes.streetball},n.toFront=function(t){return null},n.toBack=function(t){return null},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(k),x=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([I],t,"toFront",null),d([G],t,"toBack",null),t=d([P({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),O=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name"}})],e)}(k);(U=t.GameBasketballPosition||(t.GameBasketballPosition={}))[U.point_guard=1]="point_guard",U[U.shooting_guard=2]="shooting_guard",U[U.small_forward=3]="small_forward",U[U.power_forward=4]="power_forward",U[U.center=5]="center",(A=t.WorkHand||(t.WorkHand={}))[A.left=1]="left",A[A.right=2]="right";var E,N,H=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:T(t.GameBasketballPosition),workHand:T(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",(N=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[N.left=1]="left",N[N.right=2]="right";var D,R=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:T(t.GameVolleyballPosition),workHand:T(t.VolleyballWorkHand)}})],n)}(k);(D=t.UserGender||(t.UserGender={}))[D.male=1]="male",D[D.female=2]="female";var z,M,q,W,$=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:F,photo:L,profile:x,basketballProfile:H,volleyballProfile:R,city:O,gender:T(t.UserGender)}})],n)}(k),J=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"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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:V,logo:L,owner:$,city:O,closestGameDatetime:F}})],e)}(k),X=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:$}})],e)}(k),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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"},relation:{organization:X,logo:L,cover:L,sport:V}})],e)}(k);(z=t.TournamentTypes||(t.TournamentTypes={})).group="group",z.elimination="elimination",z.fiba="fiba",(M=t.TournamentStatuses||(t.TournamentStatuses={}))[M.open=0]="open",M[M.in_progress=1]="in_progress",M[M.closed=2]="closed",(q=t.TournamentGender||(t.TournamentGender={}))[q.male=1]="male",q[q.female=2]="female",q[q.all=3]="all",(W=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[W.standard=1]="standard",W[W.light=2]="light",W[W.extended=3]="extended";var Z,K=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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"},relation:{type:T(t.TournamentTypes),gender:T(t.TournamentGender),basketballStatisticType:T(t.BasketballStatisticTypes)}})],n)}(k),Q=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",team:"team",points:"points"},relation:{team:J}})],e)}(k),tt=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"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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"},relation:{logo:L,cover:L,city:O,sport:V,regulationFile:L,settings:K,date:w,league:Y,status:T(t.TournamentStatuses),teamWinner:Q}})],n)}(k);(Z=t.OvertimeTypes||(t.OvertimeTypes={}))[Z.to_score_total=1]="to_score_total",Z[Z.to_score_diff=2]="to_score_diff",Z[Z.time=3]="time";var et,nt=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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"},relation:{overtimeType:T(t.OvertimeTypes),statisticType:T(t.BasketballStatisticTypes)}})],n)}(k);(et=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[et.best_of_five=1]="best_of_five",et[et.best_of_three=2]="best_of_three";var ot,it,rt=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",score_in_set:"scoreInSet",score_in_last_set:"scoreInLastSet"},relation:{gameType:T(t.VolleyballGameTypes)}})],n)}(k),at=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(k),st=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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"},relation:{originalPhoto:L,listPhoto:L,detailPhoto:L,videoPreview:L}})],e)}(k);(ot=t.GameStatuses||(t.GameStatuses={}))[ot.open=1]="open",ot[ot.in_progress=2]="in_progress",ot[ot.closed=3]="closed",ot[ot.archived=4]="archived",ot[ot.draft=5]="draft",(it=t.GameResultTypes||(t.GameResultTypes={}))[it.team_won=1]="team_won",it[it.competitor_team_won=2]="competitor_team_won",it[it.team_technical_defeat=3]="team_technical_defeat",it[it.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var ut,lt=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",status:"status",team:"team",team_id:"teamId",competitor_team:"competitorTeam",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",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_court:"tournamentCourt",media_count:"mediaCount",media:"media"},relation:{status:T(t.GameStatuses),team:J,competitorTeam:J,datetime:w,resultType:T(t.GameResultTypes),basketballGameConfig:nt,volleyballGameConfig:rt,tournamentCourt:at,media:S(st)}})],n)}(k);(ut=t.TeamUserRole||(t.TeamUserRole={}))[ut.member=1]="member",ut[ut.moderator=2]="moderator",ut[ut.admin=3]="admin";var ct=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:$,team:J,role:T(t.TeamUserRole)}})],n)}(k),pt=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",tournament_stage_id:"tournamentStageId"}})],e)}(k),mt=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",tournament:"tournament",team:"team",group:"group",games_count:"gamesCount",won_games_count:"wonGamesCount",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"},relation:{tournament:tt,team:J,group:pt,games:lt}})],e)}(k),ft=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:F,dateTo:F}})],e)}(k),dt=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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"},relation:{tournamentTeam:mt,teamUser:ct,photo:L,disqualification:ft}})],e)}(k),_t=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",updated_at:"updatedAt"},relation:{teamUser:ct,tournamentTeamUser:dt,updatedAt:w}})],e)}(k);function gt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(o&&kt(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 ht(t,e,n,o){return void 0===n&&(n=!1),e.forEach((function(e){t=gt(t,e,n,o)})),t}function vt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return kt(o)?o(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function yt(t,e,n,o){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=vt(t,e,n,o)})),t}function bt(t,e){return Array.isArray(t)?kt(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function kt(t){return t&&"[object Function]"==={}.toString.call(t)}var Tt,St=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,vt(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,yt(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,vt(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,yt(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,o){this.save(t,gt(this.value(t)||[],e,n,o))},t.prototype.updateItems=function(t,e,n,o){this.save(t,ht(this.value(t)||[],e,n,o))},t.prototype.deleteItem=function(t,e){this.save(t,bt(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}(),Ft=function(){function t(){this.store=new St}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)}(),wt=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"}),_(0,e.Optional()),_(0,e.Inject("mtg-core-config-data"))],n)}(Ft),Pt=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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:dt,team:J,teamUser:ct,user:$,tournamentTeam:mt,month:F}})],e)}(k),Bt=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Pt,competitorTeam:Pt}})],e)}(k),It=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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:w}})],e)}(k);(Tt=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[Tt.enter_game=1]="enter_game",Tt[Tt.exit_game=2]="exit_game",Tt[Tt.remove_game=3]="remove_game",Tt[Tt.two_point_made=4]="two_point_made",Tt[Tt.three_point_made=5]="three_point_made",Tt[Tt.free_throw_made=6]="free_throw_made",Tt[Tt.two_point_attempt=7]="two_point_attempt",Tt[Tt.three_point_attempt=8]="three_point_attempt",Tt[Tt.free_throw_attempt=9]="free_throw_attempt",Tt[Tt.assist=10]="assist",Tt[Tt.block=11]="block",Tt[Tt.rebound=12]="rebound",Tt[Tt.offensive_rebound=13]="offensive_rebound",Tt[Tt.defensive_rebound=14]="defensive_rebound",Tt[Tt.steal=15]="steal",Tt[Tt.turnover=16]="turnover",Tt[Tt.personal_foul=17]="personal_foul",Tt[Tt.technical_foul=18]="technical_foul",Tt[Tt.unsportsmanlike_foul=19]="unsportsmanlike_foul",Tt[Tt.one_point_attempt=20]="one_point_attempt",Tt[Tt.one_point_made=21]="one_point_made",Tt[Tt.timeout=22]="timeout";var Gt,jt=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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:w,logType:T(t.BasketballGameLogTypes)}})],n)}(k),Ct=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 h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return _t.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return h(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 Bt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return h(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 It.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return h(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 jt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();(Gt=t.TournamentEventTypes||(t.TournamentEventTypes={}))[Gt.game_closed=1]="game_closed",Gt[Gt.media_added=2]="media_added";var Lt,Ut=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",game:"game",tournament:"tournament",event:"event",datetime:"datetime"},relation:{game:lt,tournament:tt,datetime:F,event:T(t.TournamentEventTypes)}})],n)}(k),At=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 h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getByDomain=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/").pipe(o.map((function(t){return tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(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))),[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:Ut.toFront(t.body)}}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Vt=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 h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(o.map((function(t){return st.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(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:lt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(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:lt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMediaById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGameMedia=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/").pipe(o.map((function(t){return st.toFront(t)}))).toPromise()]}))}))},i.prototype.createZip=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();(Lt=t.PollStatuses||(t.PollStatuses={}))[Lt.open=1]="open",Lt[Lt.closed=2]="closed",Lt[Lt.archived=3]="archived";var xt,Ot=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{uuid:"uuid",name:"name"}})],e)}(k),Et=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:$}})],e)}(k),Nt=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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:T(t.PollStatuses),variants:Ot,author:$,answers:Et,createdAt:w}})],n)}(k),Ht=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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:$,team:J,createdAt:w,updateAt:w}})],e)}(k);(xt=t.GameInviteStatus||(t.GameInviteStatus={}))[xt.accepted=1]="accepted",xt[xt.declined=2]="declined";var Dt,Rt,zt=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:lt,teamUser:ct,status:T(t.GameInviteStatus)}})],n)}(k);(Dt=t.TeamEventTypes||(t.TeamEventTypes={}))[Dt.training=1]="training",Dt[Dt.other=2]="other";var Mt,qt=((Rt={})[t.TeamEventTypes.training]="Тренировка",Rt[t.TeamEventTypes.other]="Другое",Rt),Wt=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:qt[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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:T(t.TeamEventTypes),team:J,datetime:w}})],n)}(k);(Mt=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[Mt.accepted=1]="accepted",Mt[Mt.declined=2]="declined";var $t,Jt,Xt=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:T(t.TeamEventInviteStatuses)}})],e)}(),Yt=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:ct}})],e)}(k),Zt=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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:J,tournament:tt,userInvites:Yt}})],e)}(k);($t=t.NotificationType||(t.NotificationType={}))[$t.team_updated=1]="team_updated",$t[$t.team_invited=2]="team_invited",$t[$t.team_join_request=3]="team_join_request",$t[$t.team_join_declined_by_team=4]="team_join_declined_by_team",$t[$t.team_join_declined_by_user=5]="team_join_declined_by_user",$t[$t.team_join_canceled_by_team=6]="team_join_canceled_by_team",$t[$t.team_join_canceled_by_user=7]="team_join_canceled_by_user",$t[$t.team_joined_for_user=8]="team_joined_for_user",$t[$t.team_joined_for_team=9]="team_joined_for_team",$t[$t.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",$t[$t.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",$t[$t.team_user_number_changed=12]="team_user_number_changed",$t[$t.team_user_deleted_for_user=13]="team_user_deleted_for_user",$t[$t.team_user_deleted_for_team=14]="team_user_deleted_for_team",$t[$t.team_user_left=15]="team_user_left",$t[$t.game_updated=16]="game_updated",$t[$t.game_invited=17]="game_invited",$t[$t.game_invite_accepted=18]="game_invite_accepted",$t[$t.game_invite_declined=19]="game_invite_declined",$t[$t.game_remind=20]="game_remind",$t[$t.game_won=21]="game_won",$t[$t.game_losing=22]="game_losing",$t[$t.game_tech_defeat=23]="game_tech_defeat",$t[$t.game_tech_victory=24]="game_tech_victory",$t[$t.poll_created=25]="poll_created",$t[$t.poll_closed=26]="poll_closed",$t[$t.team_event_invited=27]="team_event_invited",$t[$t.team_event_accepted=28]="team_event_accepted",$t[$t.team_event_declined=29]="team_event_declined",$t[$t.team_event_remind=30]="team_event_remind",$t[$t.tournament_invited=31]="tournament_invited",$t[$t.tournament_joined=32]="tournament_joined",$t[$t.tournament_join_declined=33]="tournament_join_declined",$t[$t.tournament_join_canceled=34]="tournament_join_canceled",$t[$t.tournament_user_invited=35]="tournament_user_invited",$t[$t.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",$t[$t.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",$t[$t.tournament_user_added=38]="tournament_user_added",$t[$t.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",$t[$t.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",$t[$t.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",$t[$t.tournament_user_deleted=42]="tournament_user_deleted",$t[$t.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",$t[$t.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",$t[$t.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",$t[$t.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",$t[$t.tournament_team_deleted=47]="tournament_team_deleted",$t[$t.org_tournament_invite_created=48]="org_tournament_invite_created",$t[$t.org_tournament_invite_declined=49]="org_tournament_invite_declined",$t[$t.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",$t[$t.org_tournament_invite_changed=51]="org_tournament_invite_changed",$t[$t.org_tournament_user_deleted=52]="org_tournament_user_deleted",$t[$t.org_tournament_user_invited=53]="org_tournament_user_invited",$t[$t.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",$t[$t.org_tournament_team_leave=55]="org_tournament_team_leave",(Jt=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[Jt.public=1]="public",Jt[Jt.org=2]="org";var Kt,Qt=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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:T(t.NotificationType),initiator:$,team:J,teamInvite:Ht,teamUser:ct,poll:Nt,game:lt,gameInvite:zt,teamEvent:Wt,teamEventInvite:Xt,tournament:tt,tournamentInvite:Zt,tournamentTeam:mt,service:T(t.NotificationServiceEnum),createdAt:w}})],n)}(k);(Kt=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[Kt.all=1]="all",Kt[Kt.important=2]="important",Kt[Kt.none=3]="none";var te,ee=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:T(t.NotificationAllowTypes),browser:T(t.NotificationAllowTypes)}})],n)}(k),ne=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 h(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 h(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=Qt.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 h(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 Qt.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(o.map((function(t){return Qt.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(o.map((function(t){return ee.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",ee.toBack(t)).pipe(o.map((function(t){return ee.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),oe=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(wt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(ne),ie=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(wt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(ne),re=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 h(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(o.map((function(t){return O.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),ae=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:L,author:$,createdAt:w}})],e)}(k),se=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([I],t,"toFront",null),d([G],t,"toBack",null),t=d([P({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount"}})],t)}(),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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:S(se)}})],e)}(k);(te=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[te.open=0]="open",te[te.in_progress=1]="in_progress",te[te.closed=2]="closed";var le=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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:F,status:T(t.TournamentStageStatuses)}})],n)}(k);function ce(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}var pe,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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount"}})],e)}(k),fe=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=ce(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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:me}})],e)}(k),de=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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:J,teamUser:ct,tournamentTeamUser:dt,tournamentTeam:mt,user:$,month:F}})],e)}(k),_e=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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:mt,group:pt}})],e)}(k),ge=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 h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(o.map((function(t){return tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getNews=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(o.map((function(t){return ae.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(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))),[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:Ut.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentStages=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoff=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(o.map((function(t){return fe.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffGames=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(o.map((function(t){return ue.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return void 0===a&&(a={}),g(this,void 0,void 0,(function(){var s;return h(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/").pipe(o.map((function(t){return mt.toFront(t)}))).toPromise()]}))}))},i.prototype.getStageTeams=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(o.map((function(t){return _e.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(o.map((function(t){return mt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(o.map((function(t){return dt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserGames=function(t){return g(this,void 0,void 0,(function(){return h(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 lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getBasketballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return h(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"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e}).pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return h(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"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e}).pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),he=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(k),ve=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{team:"team",join_data:"joinData"},relation:{team:J,joinData:he}})],e)}(k),ye=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 h(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 ve.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(o.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return g(this,void 0,void 0,(function(){var i;return h(this,(function(r){return i={team:{id:e},user_invites:Yt.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",i).pipe(o.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),be=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 h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(o.map((function(t){return pt.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(o.map((function(t){return fe.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(o.map((function(t){return _e.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),ke=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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:de,competitorTeam:de}})],e)}(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,"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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({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"}})],e)}(k);(pe=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[pe.enter_game=1]="enter_game",pe[pe.exit_game=2]="exit_game",pe[pe.remove_game=3]="remove_game",pe[pe.serve_hit=4]="serve_hit",pe[pe.serve_fault=5]="serve_fault",pe[pe.serve_ace=6]="serve_ace",pe[pe.stuff_block=7]="stuff_block",pe[pe.block_fault=8]="block_fault",pe[pe.block_rebound=9]="block_rebound",pe[pe.attack_spike=10]="attack_spike",pe[pe.attack_fault=11]="attack_fault",pe[pe.attack_shot=12]="attack_shot",pe[pe.receive=13]="receive",pe[pe.receive_fault=14]="receive_fault",pe[pe.excellent_receive=15]="excellent_receive",pe[pe.point=16]="point",pe[pe.fault=17]="fault",pe[pe.serve_receive=18]="serve_receive",pe[pe.serve_receive_fault=19]="serve_receive_fault",pe[pe.excellent_serve_receive=20]="excellent_serve_receive",pe[pe.timeout=21]="timeout";var Se,Fe,we,Pe,Be,Ie,Ge,je,Ce,Le,Ue,Ae=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],Ve=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],xe=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 Ae.includes(this.logType)},n.prototype.isFaultType=function(){return Ve.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([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({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:T(t.VolleyballGameLogType),datetime:w}})],n)}(k),Oe=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 h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return _t.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return h(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 ke.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return h(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 Te.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return h(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 xe.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ee=((Se={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",Se[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",Se[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",Se[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",Se[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",Se[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",Se[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",Se[t.BasketballGameLogTypes.two_point_made]="2 очка",Se[t.BasketballGameLogTypes.three_point_made]="3 очка",Se[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",Se[t.BasketballGameLogTypes.one_point_made]="1 очко",Se[t.BasketballGameLogTypes.assist]="Передача",Se[t.BasketballGameLogTypes.block]="Блокшот",Se[t.BasketballGameLogTypes.rebound]="Подбор",Se[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",Se[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",Se[t.BasketballGameLogTypes.steal]="Перехват",Se[t.BasketballGameLogTypes.turnover]="Потеря",Se[t.BasketballGameLogTypes.personal_foul]="Фол",Se[t.BasketballGameLogTypes.technical_foul]="Технический фол",Se[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",Se[t.BasketballGameLogTypes.timeout]="Таймаут",Se),Ne=((Fe={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",Fe[t.OvertimeTypes.to_score_total]="До N очков",Fe[t.OvertimeTypes.time]="По времени",Fe),He=((we={})[t.TeamUserRole.moderator]="Модератор",we[t.TeamUserRole.member]="Пользователь",we[t.TeamUserRole.admin]="Владелец",we),De=((Pe={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",Pe[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",Pe[t.GameBasketballPosition.small_forward]="Легкий форвард",Pe[t.GameBasketballPosition.power_forward]="Мощный форвард",Pe[t.GameBasketballPosition.center]="Центровой",Pe),Re=((Be={})[t.GameBasketballPosition.point_guard]="PG",Be[t.GameBasketballPosition.shooting_guard]="SG",Be[t.GameBasketballPosition.small_forward]="SF",Be[t.GameBasketballPosition.power_forward]="PF",Be[t.GameBasketballPosition.center]="C",Be),ze=((Ie={})[t.WorkHand.left]="Левая",Ie[t.WorkHand.right]="Правая",Ie),Me=((Ge={})[t.GameVolleyballPosition.setter]="Связующий",Ge[t.GameVolleyballPosition.libero]="Либеро",Ge[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",Ge[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",Ge[t.GameVolleyballPosition.dioganal]="Диагональный",Ge),qe=((je={})[t.GameVolleyballPosition.setter]="S",je[t.GameVolleyballPosition.libero]="L",je[t.GameVolleyballPosition.middle_player]="MP",je[t.GameVolleyballPosition.receiver_attacker]="RA",je[t.GameVolleyballPosition.dioganal]="D",je),We=((Ce={})[t.GameVolleyballPosition.setter]="связ.",Ce[t.GameVolleyballPosition.libero]="либеро",Ce[t.GameVolleyballPosition.middle_player]="блок.",Ce[t.GameVolleyballPosition.receiver_attacker]="доигр.",Ce[t.GameVolleyballPosition.dioganal]="диаг.",Ce),$e=((Le={})[t.VolleyballWorkHand.left]="Левая",Le[t.VolleyballWorkHand.right]="Правая",Le),Je=((Ue={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",Ue[t.VolleyballGameLogType.exit_game]="Уход с площадки",Ue[t.VolleyballGameLogType.remove_game]="Удаление с площадки",Ue[t.VolleyballGameLogType.serve_ace]="Эйс",Ue[t.VolleyballGameLogType.serve_hit]="Подача",Ue[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",Ue[t.VolleyballGameLogType.attack_spike]="Результативная атака",Ue[t.VolleyballGameLogType.attack_shot]="Успешная атака",Ue[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",Ue[t.VolleyballGameLogType.stuff_block]="Результативный блок",Ue[t.VolleyballGameLogType.block_rebound]="Успешный блок",Ue[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",Ue[t.VolleyballGameLogType.excellent_receive]="Отличный прием",Ue[t.VolleyballGameLogType.receive]="Прием",Ue[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",Ue[t.VolleyballGameLogType.serve_receive]="Прием подачи",Ue[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",Ue[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",Ue[t.VolleyballGameLogType.point]="Очко",Ue[t.VolleyballGameLogType.fault]="Ошибка",Ue[t.VolleyballGameLogType.timeout]="Таймаут",Ue),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([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(k),Ye=function(){function t(t,e){this.httpClient=t,this.configService=e,this.channels$={},this.subscriptions={}}return 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)}))}))),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:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ze=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}(),Ke=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}(),Qe=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}(Ke);function tn(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function en(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 nn=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=tn("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(),_(1,e.Inject(e.PLATFORM_ID))],t)}();t.BaseModel=k,t.BaseService=Ft,t.BasketballGameApi=Ct,t.BasketballGameConfig=nt,t.BasketballGameLog=jt,t.BasketballGameLogTypeLocalization=Ee,t.BasketballGameStatistic=It,t.BasketballGameTeamStatistic=Bt,t.BasketballProfile=H,t.BasketballStatistic=Pt,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=Ye,t.City=O,t.ConfigService=wt,t.DateField=F,t.DateTimeField=w,t.FAULT_LOG_TYPES=Ve,t.File=L,t.Game=lt,t.GameBasketballPositionLocalization=De,t.GameBasketballPositionShortLocalization=Re,t.GameInvite=zt,t.GameTimelineStageItem=se,t.GameTimelineStages=ue,t.GameUser=_t,t.GameVolleyballPositionLocalization=Me,t.GameVolleyballPositionShortLocalization=qe,t.GameVolleyballPositionShortRuLocalization=We,t.HttpCookieInterceptor=nn,t.League=Y,t.LeagueApi=At,t.LeagueCourt=at,t.LocalStorageEngine=Qe,t.MediaApi=Vt,t.MediaItem=st,t.ModelInstance=P,t.Notification=Qt,t.NotificationApi=oe,t.NotificationBaseApi=ne,t.NotificationSettings=ee,t.OrgNotificationApi=ie,t.Organization=X,t.OvertimeTypeLocalization=Ne,t.Playoff=fe,t.PlayoffSettings=me,t.Poll=Nt,t.PollAnswer=Et,t.PollVariant=Ot,t.ReferenceApi=re,t.SCORE_LOG_TYPES=Ae,t.Sport=V,t.StorageEngine=Ke,t.StorageEngineField=Ze,t.Store=St,t.Team=J,t.TeamEvent=Wt,t.TeamEventInvite=Xt,t.TeamEventTypeLocalization=qt,t.TeamInvite=Ht,t.TeamInviteExternal=Xe,t.TeamUser=ct,t.TeamUserRoleLocalization=He,t.ToBackHook=G,t.ToFrontHook=I,t.Tournament=tt,t.TournamentApi=ge,t.TournamentDisqualification=ft,t.TournamentEvent=Ut,t.TournamentGroup=pt,t.TournamentInvite=Zt,t.TournamentJoinApi=ye,t.TournamentJoinData=he,t.TournamentJoinTeam=ve,t.TournamentNews=ae,t.TournamentSettings=K,t.TournamentStage=le,t.TournamentStageApi=be,t.TournamentStageTeam=_e,t.TournamentTeam=mt,t.TournamentTeamUser=dt,t.TournamentTeamUserInvite=Yt,t.TournamentTeamWinner=Q,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=$,t.UserProfile=x,t.VolleyballGameApi=Oe,t.VolleyballGameConfig=rt,t.VolleyballGameLog=xe,t.VolleyballGameLogTypeLocalization=Je,t.VolleyballGameStatistic=Te,t.VolleyballGameTeamStatistic=ke,t.VolleyballProfile=R,t.VolleyballStatistic=de,t.VolleyballWorkHandLocalization=$e,t.WorkHandLocalization=ze,t.addItemInArray=vt,t.changeFavicons=function(t,e){var n,o,i,r,a="";"ablmoscow"===e&&(a="abl/");var s=en(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=bt,t.enumField=T,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=ce,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=tn,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=en,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=S,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&&kt(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.updateItemInArray=gt,t.updateItemsInArray=ht,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}},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,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function d(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function h(t,e){return function(n,i){e(n,i,t)}}function g(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{u(i.next(t))}catch(t){r(t)}}function s(t){try{u(i.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function v(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function _(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],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 i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}var k=function(){function t(t){var e,n;if(t)try{for(var i=_(Object.keys(t)),o=i.next();!o.done;o=i.next()){var r=o.value;this[r]=t[r]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}return t.toFront=function(t){},t.toBack=function(t){},t}();function T(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function S(t){return{toFront:function(e){return Array.isArray(e)?t.toFront(e):[]},toBack:function(e){return Array.isArray(e)?t.toBack(e):[]}}}var F=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),P=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 w(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,i){var o,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=_(Object.keys(s)),c=l.next();!c.done;c=l.next()){var p=c.value,m=s[p],f=B(p,n);u&&u.hasOwnProperty(m)?a[m]=u[m].toFront(f):a[m]=f}}catch(t){o={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(o)throw o.error}}return a}(e,t)},e._to_back_=function(t,n){return function t(e,n,i){var o,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=_(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){o={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(o)throw o.error}}return a}(e,t)})}}var C,I=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t._to_front_;if(i)return i(e[0],e.length>1?e[1]:void 0)}}},U=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t._to_back_;if(i)return i(e[0])}}};function B(t,e){var n,i;if(e){var o=t.split(".");if(1===o.length)return t in e?e[t]:void 0;try{for(var r=_(o),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&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return e}}(C=t.FileEngine||(t.FileEngine={}))[C.django=1]="django",C[C.s3=2]="s3";var G,j=function(){function e(){}return e.toFront=function(t){return null},e.toBack=function(t){return null},d([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",name:"name",path:"path",mime_type:"mimeType",size:"size",engine:"engine"},relation:{engine:T(t.FileEngine)}})],e)}();(G=t.SportTypes||(t.SportTypes={}))[G.basketball=1]="basketball",G[G.volleyball=2]="volleyball",G[G.classic_basketball=3]="classic_basketball",G[G.streetball=4]="streetball";var L,A,V=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.isVolleyball=function(){return this.id===t.SportTypes.volleyball||this.parentId===t.SportTypes.volleyball},n.prototype.isStreetball=function(){return this.id===t.SportTypes.streetball},n.toFront=function(t){return null},n.toBack=function(t){return null},d([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(k),x=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([I],t,"toFront",null),d([U],t,"toBack",null),t=d([w({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),O=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",name:"name"}})],e)}(k);(L=t.GameBasketballPosition||(t.GameBasketballPosition={}))[L.point_guard=1]="point_guard",L[L.shooting_guard=2]="shooting_guard",L[L.small_forward=3]="small_forward",L[L.power_forward=4]="power_forward",L[L.center=5]="center",(A=t.WorkHand||(t.WorkHand={}))[A.left=1]="left",A[A.right=2]="right";var E,H,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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:T(t.GameBasketballPosition),workHand:T(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",(H=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[H.left=1]="left",H[H.right=2]="right";var z,D=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:T(t.GameVolleyballPosition),workHand:T(t.VolleyballWorkHand)}})],n)}(k);(z=t.UserGender||(t.UserGender={}))[z.male=1]="male",z[z.female=2]="female";var R,M,q,W,$=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:F,photo:j,profile:x,basketballProfile:N,volleyballProfile:D,city:O,gender:T(t.UserGender)}})],n)}(k),X=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"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},d([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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:V,logo:j,owner:$,city:O,closestGameDatetime:F}})],e)}(k),J=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:$}})],e)}(k),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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"},relation:{organization:J,logo:j,cover:j,sport:V}})],e)}(k);(R=t.TournamentTypes||(t.TournamentTypes={})).group="group",R.elimination="elimination",R.fiba="fiba",(M=t.TournamentStatuses||(t.TournamentStatuses={}))[M.open=0]="open",M[M.in_progress=1]="in_progress",M[M.closed=2]="closed",(q=t.TournamentGender||(t.TournamentGender={}))[q.male=1]="male",q[q.female=2]="female",q[q.all=3]="all",(W=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[W.standard=1]="standard",W[W.light=2]="light",W[W.extended=3]="extended";var Z,K=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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",shot_clock_enabled:"shotClockEnabled"},relation:{type:T(t.TournamentTypes),gender:T(t.TournamentGender),basketballStatisticType:T(t.BasketballStatisticTypes)}})],n)}(k),Q=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",team:"team",points:"points"},relation:{team:X}})],e)}(k),tt=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"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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"},relation:{logo:j,cover:j,city:O,sport:V,regulationFile:j,settings:K,date:P,league:Y,status:T(t.TournamentStatuses),teamWinner:Q}})],n)}(k);(Z=t.OvertimeTypes||(t.OvertimeTypes={}))[Z.to_score_total=1]="to_score_total",Z[Z.to_score_diff=2]="to_score_diff",Z[Z.time=3]="time";var et,nt=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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"},relation:{overtimeType:T(t.OvertimeTypes),statisticType:T(t.BasketballStatisticTypes)}})],n)}(k);(et=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[et.best_of_five=1]="best_of_five",et[et.best_of_three=2]="best_of_three";var it,ot,rt=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",score_in_set:"scoreInSet",score_in_last_set:"scoreInLastSet"},relation:{gameType:T(t.VolleyballGameTypes)}})],n)}(k),at=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(k),st=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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"},relation:{originalPhoto:j,listPhoto:j,detailPhoto:j,videoPreview:j}})],e)}(k);(it=t.GameStatuses||(t.GameStatuses={}))[it.open=1]="open",it[it.in_progress=2]="in_progress",it[it.closed=3]="closed",it[it.archived=4]="archived",it[it.draft=5]="draft",(ot=t.GameResultTypes||(t.GameResultTypes={}))[ot.team_won=1]="team_won",ot[ot.competitor_team_won=2]="competitor_team_won",ot[ot.team_technical_defeat=3]="team_technical_defeat",ot[ot.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var ut,lt=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",status:"status",team:"team",team_id:"teamId",competitor_team:"competitorTeam",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",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_court:"tournamentCourt",media_count:"mediaCount",media:"media"},relation:{status:T(t.GameStatuses),team:X,competitorTeam:X,datetime:P,resultType:T(t.GameResultTypes),basketballGameConfig:nt,volleyballGameConfig:rt,tournamentCourt:at,media:S(st)}})],n)}(k);(ut=t.TeamUserRole||(t.TeamUserRole={}))[ut.member=1]="member",ut[ut.moderator=2]="moderator",ut[ut.admin=3]="admin";var ct=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:$,team:X,role:T(t.TeamUserRole)}})],n)}(k),pt=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",name:"name",tournament_stage_id:"tournamentStageId"}})],e)}(k),mt=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",tournament:"tournament",team:"team",group:"group",games_count:"gamesCount",won_games_count:"wonGamesCount",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"},relation:{tournament:tt,team:X,group:pt,games:lt}})],e)}(k),ft=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:F,dateTo:F}})],e)}(k),dt=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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"},relation:{tournamentTeam:mt,teamUser:ct,photo:j,disqualification:ft}})],e)}(k),ht=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",updated_at:"updatedAt"},relation:{teamUser:ct,tournamentTeamUser:dt,updatedAt:P}})],e)}(k);function gt(t,e,n,i){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(i&&kt(i)){if(!i(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 vt(t,e,n,i){return void 0===n&&(n=!1),e.forEach((function(e){t=gt(t,e,n,i)})),t}function _t(t,e,n,i){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return kt(i)?i(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function yt(t,e,n,i){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=_t(t,e,n,i)})),t}function bt(t,e){return Array.isArray(t)?kt(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function kt(t){return t&&"[object Function]"==={}.toString.call(t)}var Tt,St=function(){function t(t){this.engine=t,this.data={}}return t.prototype.get=function(t){return this.getSubject(t).pipe(i.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,_t(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,yt(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,_t(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,yt(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,i){this.save(t,gt(this.value(t)||[],e,n,i))},t.prototype.updateItems=function(t,e,n,i){this.save(t,vt(this.value(t)||[],e,n,i))},t.prototype.deleteItem=function(t,e){this.save(t,bt(this.value(t)||[],e))},t.prototype.dispose=function(){var t,e;try{for(var n=_(Object.keys(this.data)),i=n.next();!i.done;i=n.next()){var o=i.value;this.data[o].complete(),delete this.data[o]}}catch(e){t={error:e}}finally{try{i&&!i.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 o.BehaviorSubject(this.engine?this.engine.get(t):void 0)),this.data[t]},t}(),Ft=function(){function t(){this.store=new St}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)}(),Pt=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)}(Ft),wt=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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:dt,team:X,teamUser:ct,user:$,tournamentTeam:mt,month:F}})],e)}(k),Ct=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:wt,competitorTeam:wt}})],e)}(k),It=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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:P}})],e)}(k);(Tt=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[Tt.enter_game=1]="enter_game",Tt[Tt.exit_game=2]="exit_game",Tt[Tt.remove_game=3]="remove_game",Tt[Tt.two_point_made=4]="two_point_made",Tt[Tt.three_point_made=5]="three_point_made",Tt[Tt.free_throw_made=6]="free_throw_made",Tt[Tt.two_point_attempt=7]="two_point_attempt",Tt[Tt.three_point_attempt=8]="three_point_attempt",Tt[Tt.free_throw_attempt=9]="free_throw_attempt",Tt[Tt.assist=10]="assist",Tt[Tt.block=11]="block",Tt[Tt.rebound=12]="rebound",Tt[Tt.offensive_rebound=13]="offensive_rebound",Tt[Tt.defensive_rebound=14]="defensive_rebound",Tt[Tt.steal=15]="steal",Tt[Tt.turnover=16]="turnover",Tt[Tt.personal_foul=17]="personal_foul",Tt[Tt.technical_foul=18]="technical_foul",Tt[Tt.unsportsmanlike_foul=19]="unsportsmanlike_foul",Tt[Tt.one_point_attempt=20]="one_point_attempt",Tt[Tt.one_point_made=21]="one_point_made",Tt[Tt.timeout=22]="timeout";var Ut,Bt=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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:P,logType:T(t.BasketballGameLogTypes)}})],n)}(k),Gt=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 v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(i.map((function(t){return ht.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/team_statistic/").pipe(i.map((function(t){return Ct.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/user_statistic/").pipe(i.map((function(t){return It.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/logs/").pipe(i.map((function(t){return Bt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),jt=function(){function t(){}return t.toFront=function(t){return null},t.toBack=function(t){return null},d([I],t,"toFront",null),d([U],t,"toBack",null),t=d([w({mappingFields:{id:"id",theme:"theme",message:"message",files:"files"},relation:{files:j}})],t)}(),Lt=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 v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/feedback/",jt.toBack(t)).pipe(i.map((function(t){return jt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),At=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 v(this,(function(o){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/",n).pipe(i.map((function(t){return j.toFront(t)}))).toPromise()]}))}))},t.prototype.createZipArchive=function(t){return g(this,void 0,void 0,(function(){var e,n,i,o,r,a;return v(this,(function(s){e=new FormData;try{for(n=_(t),i=n.next();!i.done;i=n.next())o=i.value,e.append("files",o.file,o.filename)}catch(t){r={error:t}}finally{try{i&&!i.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:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",title:"title",datetime:"datetime",preview_text:"previewText",detail_text:"detailText",picture:"picture",cover:"cover",is_main:"isMain",tournaments:"tournaments"},relation:{datetime:P,picture:j,cover:j,tournaments:S(tt)}})],e)}(k);(Ut=t.TournamentEventTypes||(t.TournamentEventTypes={}))[Ut.game_closed=1]="game_closed",Ut[Ut.media_added=2]="media_added",Ut[Ut.news=3]="news";var xt,Ot=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",game:"game",news:"news",league:"league",tournaments:"tournaments",event:"event",datetime:"datetime"},relation:{game:lt,news:Vt,league:Y,tournaments:S(tt),datetime:F,event:T(t.TournamentEventTypes)}})],n)}(k),Et=function(){function o(t,e){this.httpClient=t,this.configService=e}return o.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(i.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},o.prototype.getByDomain=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(i.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},o.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/").pipe(i.map((function(t){return tt.toFront(t)}))).toPromise()]}))}))},o.prototype.getEvents=function(e,o,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",o.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/events/",{params:s,observe:"response"}).pipe(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ot.toFront(t.body)}}))).toPromise()]}))}))},o.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(),Ht=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getLeagueNewsList=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/",{observe:"response"}).pipe(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Vt.toFront(t.body)}}))).toPromise()]}))}))},t.prototype.getMainLeagueNews=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/?is_main=true").pipe(i.map((function(t){return t&&t.length>0?Vt.toFront(t[0]):null}))).toPromise()]}))}))},t.prototype.getNewsById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_news/"+t).pipe(i.map((function(t){return Vt.toFront(t)}))).toPromise()]}))}))},t.prototype.getTournamentNewsList=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/",{observe:"response"}).pipe(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Vt.toFront(t.body)}}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Nt=function(){function o(t,e){this.httpClient=t,this.configService=e}return o.prototype.getMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(i.map((function(t){return st.toFront(t)}))).toPromise()]}))}))},o.prototype.getTournamentGameMedia=function(e,o,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",o.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(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},o.prototype.getLeagueGameMedia=function(e,o,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",o.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(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},o.prototype.getGameMediaById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},o.prototype.getGameMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/").pipe(i.map((function(t){return st.toFront(t)}))).toPromise()]}))}))},o.prototype.createZip=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},o.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}();(xt=t.PollStatuses||(t.PollStatuses={}))[xt.open=1]="open",xt[xt.closed=2]="closed",xt[xt.archived=3]="archived";var zt,Dt=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{uuid:"uuid",name:"name"}})],e)}(k),Rt=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:$}})],e)}(k),Mt=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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:T(t.PollStatuses),variants:Dt,author:$,answers:Rt,createdAt:P}})],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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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:$,team:X,createdAt:P,updateAt:P}})],e)}(k);(zt=t.GameInviteStatus||(t.GameInviteStatus={}))[zt.accepted=1]="accepted",zt[zt.declined=2]="declined";var Wt,$t,Xt=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:lt,teamUser:ct,status:T(t.GameInviteStatus)}})],n)}(k);(Wt=t.TeamEventTypes||(t.TeamEventTypes={}))[Wt.training=1]="training",Wt[Wt.other=2]="other";var Jt,Yt=(($t={})[t.TeamEventTypes.training]="Тренировка",$t[t.TeamEventTypes.other]="Другое",$t),Zt=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:Yt[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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:T(t.TeamEventTypes),team:X,datetime:P}})],n)}(k);(Jt=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[Jt.accepted=1]="accepted",Jt[Jt.declined=2]="declined";var Kt,Qt,te=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:T(t.TeamEventInviteStatuses)}})],e)}(),ee=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:ct}})],e)}(k),ne=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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:X,tournament:tt,userInvites:ee}})],e)}(k);(Kt=t.NotificationType||(t.NotificationType={}))[Kt.team_updated=1]="team_updated",Kt[Kt.team_invited=2]="team_invited",Kt[Kt.team_join_request=3]="team_join_request",Kt[Kt.team_join_declined_by_team=4]="team_join_declined_by_team",Kt[Kt.team_join_declined_by_user=5]="team_join_declined_by_user",Kt[Kt.team_join_canceled_by_team=6]="team_join_canceled_by_team",Kt[Kt.team_join_canceled_by_user=7]="team_join_canceled_by_user",Kt[Kt.team_joined_for_user=8]="team_joined_for_user",Kt[Kt.team_joined_for_team=9]="team_joined_for_team",Kt[Kt.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",Kt[Kt.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",Kt[Kt.team_user_number_changed=12]="team_user_number_changed",Kt[Kt.team_user_deleted_for_user=13]="team_user_deleted_for_user",Kt[Kt.team_user_deleted_for_team=14]="team_user_deleted_for_team",Kt[Kt.team_user_left=15]="team_user_left",Kt[Kt.game_updated=16]="game_updated",Kt[Kt.game_invited=17]="game_invited",Kt[Kt.game_invite_accepted=18]="game_invite_accepted",Kt[Kt.game_invite_declined=19]="game_invite_declined",Kt[Kt.game_remind=20]="game_remind",Kt[Kt.game_won=21]="game_won",Kt[Kt.game_losing=22]="game_losing",Kt[Kt.game_tech_defeat=23]="game_tech_defeat",Kt[Kt.game_tech_victory=24]="game_tech_victory",Kt[Kt.poll_created=25]="poll_created",Kt[Kt.poll_closed=26]="poll_closed",Kt[Kt.team_event_invited=27]="team_event_invited",Kt[Kt.team_event_accepted=28]="team_event_accepted",Kt[Kt.team_event_declined=29]="team_event_declined",Kt[Kt.team_event_remind=30]="team_event_remind",Kt[Kt.tournament_invited=31]="tournament_invited",Kt[Kt.tournament_joined=32]="tournament_joined",Kt[Kt.tournament_join_declined=33]="tournament_join_declined",Kt[Kt.tournament_join_canceled=34]="tournament_join_canceled",Kt[Kt.tournament_user_invited=35]="tournament_user_invited",Kt[Kt.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",Kt[Kt.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",Kt[Kt.tournament_user_added=38]="tournament_user_added",Kt[Kt.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",Kt[Kt.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",Kt[Kt.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",Kt[Kt.tournament_user_deleted=42]="tournament_user_deleted",Kt[Kt.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",Kt[Kt.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",Kt[Kt.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",Kt[Kt.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",Kt[Kt.tournament_team_deleted=47]="tournament_team_deleted",Kt[Kt.org_tournament_invite_created=48]="org_tournament_invite_created",Kt[Kt.org_tournament_invite_declined=49]="org_tournament_invite_declined",Kt[Kt.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",Kt[Kt.org_tournament_invite_changed=51]="org_tournament_invite_changed",Kt[Kt.org_tournament_user_deleted=52]="org_tournament_user_deleted",Kt[Kt.org_tournament_user_invited=53]="org_tournament_user_invited",Kt[Kt.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",Kt[Kt.org_tournament_team_leave=55]="org_tournament_team_leave",(Qt=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[Qt.public=1]="public",Qt[Qt.org=2]="org";var ie,oe=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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:T(t.NotificationType),initiator:$,team:X,teamInvite:qt,teamUser:ct,poll:Mt,game:lt,gameInvite:Xt,teamEvent:Zt,teamEventInvite:te,tournament:tt,tournamentInvite:ne,tournamentTeam:mt,service:T(t.NotificationServiceEnum),createdAt:P}})],n)}(k);(ie=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[ie.all=1]="all",ie[ie.important=2]="important",ie[ie.none=3]="none";var re,ae=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:T(t.NotificationAllowTypes),browser:T(t.NotificationAllowTypes)}})],n)}(k),se=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 v(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/count/").pipe(i.map((function(t){return+t}))).toPromise()]}))}))},t.prototype.getList=function(t,e,o){return void 0===o&&(o={}),g(this,void 0,void 0,(function(){var r,a,s,u,l,c;return v(this,(function(p){r=(new n.HttpParams).set("page",t.toString()).set("size",e.toString());try{for(a=_(Object.keys(o)),s=a.next();!s.done;s=a.next())u=s.value,r=r.set(u,o[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(i.map((function(t){var e=oe.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 v(this,(function(n){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/"+t+"/viewed/",{viewed:e}).pipe(i.map((function(t){return oe.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(i.map((function(t){return oe.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(i.map((function(t){return ae.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",ae.toBack(t)).pipe(i.map((function(t){return ae.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),ue=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/api/v1",e}return m(i,t),i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(se),le=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/org/api/v1",e}return m(i,t),i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(se),ce=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 v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(i.map((function(t){return O.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(i.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),pe=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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:X,teamUser:ct,tournamentTeamUser:dt,tournamentTeam:mt,user:$,month:F}})],e)}(k);(re=t.TeamPermissionTypes||(t.TeamPermissionTypes={}))[re.for_all=1]="for_all",re[re.for_users=2]="for_users",re[re.for_team=3]="for_team";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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{players:"players",games:"games",statistic:"statistic",polls:"polls",events:"events"},relation:{players:T(t.TeamPermissionTypes),games:T(t.TeamPermissionTypes),statistic:T(t.TeamPermissionTypes),polls:T(t.TeamPermissionTypes),events:T(t.TeamPermissionTypes)}})],n)}(k),he=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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:T(t.TeamUserRole)}})],n)}(k),ge=function(){function o(t,e){this.httpClient=t,this.configService=e}return o.prototype.search=function(t,e){return g(this,void 0,void 0,(function(){var o;return v(this,(function(r){return o=(new n.HttpParams).set("search",t),e&&(o=o.set("sport",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/",{params:o}).pipe(i.map((function(t){return X.toFront(t)}))).toPromise()]}))}))},o.prototype.create=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/",X.toBack(t)).pipe(i.map((function(t){return X.toFront(t)}))).toPromise()]}))}))},o.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/").pipe(i.map((function(t){return X.toFront(t)}))).toPromise()]}))}))},o.prototype.getTeamAccess=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/access/").pipe(i.map((function(t){return he.toFront(t)}))).toPromise()]}))}))},o.prototype.update=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/",X.toBack(e)).pipe(i.map((function(t){return X.toFront(t)}))).toPromise()]}))}))},o.prototype.delete=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.id+"/").toPromise()]}))}))},o.prototype.getPermission=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/").pipe(i.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},o.prototype.updatePermission=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/",de.toBack(e)).pipe(i.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},o.prototype.getUsers=function(t,e){return g(this,void 0,void 0,(function(){var o;return v(this,(function(r){return o=new n.HttpParams,e&&(o=o.set("tournament_id",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/",{params:o}).pipe(i.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},o.prototype.updateUserRole=function(e,n,o){return g(this,void 0,void 0,(function(){return v(this,(function(r){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+e+"/users/"+n+"/role/",{role:t.TeamUserRole[o]}).pipe(i.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},o.prototype.updateUserNumber=function(t,e,n){return g(this,void 0,void 0,(function(){return v(this,(function(o){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/"+e+"/number/",{number:n.toString()}).pipe(i.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},o.prototype.deleteUser=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.teamId+"/users/"+t.id+"/").toPromise()]}))}))},o.prototype.changeOwner=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/owner/",{id:e.id}).pipe(i.map((function(t){return X.toFront(t)}))).toPromise()]}))}))},o.prototype.getInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/").pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},o.prototype.sendInvite=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/",{user:e}).pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},o.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/accept/",{}).pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},o.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/decline/",{}).pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},o.prototype.resendInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/resend/",{}).pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},o.prototype.getInvitesExternal=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/").pipe(i.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},o.prototype.sendInviteExternal=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/",pe.toBack(e)).pipe(i.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},o.prototype.deleteInviteExternal=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/").toPromise()]}))}))},o.prototype.resendInviteExternal=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/resend/",{}).pipe(i.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},o.prototype.getPolls=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/"+(e?"?archive=1":"")).pipe(i.map((function(t){return Mt.toFront(t)}))).toPromise()]}))}))},o.prototype.createPoll=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/",Mt.toBack(e)).pipe(i.map((function(t){return Mt.toFront(t)}))).toPromise()]}))}))},o.prototype.getUsersStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/statistics/").pipe(i.map((function(t){return wt.toFront(t)}))).toPromise()]}))}))},o.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/volleyball_statistics/").pipe(i.map((function(t){return me.toFront(t)}))).toPromise()]}))}))},o.prototype.joinTeam=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/join/",{}).pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},o.prototype.leaveTeam=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/leave/",{}).toPromise()]}))}))},o.prototype.getGames=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/"+(e?"?archive=1":"")).pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},o.prototype.createGame=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/",lt.toBack(e)).pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},o.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/").pipe(i.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},o.prototype.createTeamEvent=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/",Zt.toBack(e)).pipe(i.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},o.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/").pipe(i.map((function(t){return tt.toFront(t)}))).toPromise()]}))}))},o.prototype.getTournamentTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_teams/").pipe(i.map((function(t){return mt.toFront(t)}))).toPromise()]}))}))},o.prototype.getTournamentInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_invites/").pipe(i.map((function(t){return ne.toFront(t)}))).toPromise()]}))}))},o.prototype.getTournamentGames=function(t,e,o,r){return g(this,void 0,void 0,(function(){var a;return v(this,(function(s){return a=(new n.HttpParams).set("page",o.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(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},o.prototype.acceptTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/accept/",{}).pipe(i.map((function(t){return ne.toFront(t)}))).toPromise()]}))}))},o.prototype.declineTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/decline/",{}).pipe(i.map((function(t){return ne.toFront(t)}))).toPromise()]}))}))},o.prototype.registerLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/lazy_user/",{user:$.toBack(e)}).pipe(i.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},o.prototype.getLazyUser=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").pipe(i.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},o.prototype.updateLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/",{user:$.toBack(e)}).pipe(i.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},o.prototype.deleteLazyUser=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").toPromise()]}))}))},o.prototype.resendLazyUserEmail=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/resend_email/",{}).toPromise()]}))}))},o.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(),ve=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 v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").pipe(i.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},t.prototype.updateTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team_event/"+t.id+"/",Zt.toBack(t)).pipe(i.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},t.prototype.deleteTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(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 v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/").pipe(i.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},t.prototype.createTeamEventInvite=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/",{team_user_id:e}).pipe(i.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/accept/",{}).pipe(i.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},t.prototype.declineTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/decline/",{}).pipe(i.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),_e=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:j,author:$,createdAt:P}})],e)}(k),ye=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([I],t,"toFront",null),d([U],t,"toBack",null),t=d([w({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount"}})],t)}(),be=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:S(ye)}})],e)}(k);(fe=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[fe.open=0]="open",fe[fe.in_progress=1]="in_progress",fe[fe.closed=2]="closed";var 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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:F,status:T(t.TournamentStageStatuses)}})],n)}(k);function Te(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}var Se,Fe=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount"}})],e)}(k),Pe=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=Te(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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:Fe}})],e)}(k),we=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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:mt,group:pt}})],e)}(k),Ce=function(){function o(t,e){this.httpClient=t,this.configService=e}return o.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(i.map((function(t){return tt.toFront(t)}))).toPromise()]}))}))},o.prototype.getNews=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(i.map((function(t){return _e.toFront(t)}))).toPromise()]}))}))},o.prototype.getEvents=function(e,o,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",o.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/events/",{params:s,observe:"response"}).pipe(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ot.toFront(t.body)}}))).toPromise()]}))}))},o.prototype.getTournamentStages=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(i.map((function(t){return ke.toFront(t)}))).toPromise()]}))}))},o.prototype.getPlayoff=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(i.map((function(t){return Pe.toFront(t)}))).toPromise()]}))}))},o.prototype.getPlayoffGames=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/").pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},o.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(i.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},o.prototype.getGames=function(e,o,r,a){return void 0===a&&(a={}),g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",o.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/games/",{params:s,observe:"response"}).pipe(i.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},o.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/").pipe(i.map((function(t){return mt.toFront(t)}))).toPromise()]}))}))},o.prototype.getStageTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(i.map((function(t){return we.toFront(t)}))).toPromise()]}))}))},o.prototype.getTeamById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(i.map((function(t){return mt.toFront(t)}))).toPromise()]}))}))},o.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(i.map((function(t){return dt.toFront(t)}))).toPromise()]}))}))},o.prototype.getUserGames=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/games/").pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},o.prototype.getBasketballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,o,r,a,s,u;return v(this,(function(l){if(e=new n.HttpParams,t){try{for(o=_(Object.keys(t)),r=o.next();!r.done;r=o.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=o.return)&&u.call(o)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e}).pipe(i.map((function(t){return wt.toFront(t)}))).toPromise()]}))}))},o.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,o,r,a,s,u;return v(this,(function(l){if(e=new n.HttpParams,t){try{for(o=_(Object.keys(t)),r=o.next();!r.done;r=o.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=o.return)&&u.call(o)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e}).pipe(i.map((function(t){return me.toFront(t)}))).toPromise()]}))}))},o.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(),Ie=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(k),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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{team:"team",join_data:"joinData"},relation:{team:X,joinData:Ie}})],e)}(k),Be=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 v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams_for_join/").pipe(i.map((function(t){return Ue.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(i.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return g(this,void 0,void 0,(function(){var o;return v(this,(function(r){return o={team:{id:e},user_invites:ee.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",o).pipe(i.map((function(t){return ne.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ge=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 v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(i.map((function(t){return ke.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(i.map((function(t){return pt.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(i.map((function(t){return Pe.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(i.map((function(t){return we.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{edit:"edit",personal_data:"personalData",teams:"teams",statistic:"statistic",games:"games"}})],e)}(k);(Se=t.UserPermissionTypes||(t.UserPermissionTypes={}))[Se.denied=1]="denied",Se[Se.for_all=2]="for_all",Se[Se.for_users=3]="for_users",Se[Se.for_team=4]="for_team";var Le,Ae=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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({mappingFields:{id:"id",personal_data:"personalData",games:"games",teams:"teams",statistic:"statistic"},relation:{personalData:T(t.UserPermissionTypes),games:T(t.UserPermissionTypes),teams:T(t.UserPermissionTypes),statistic:T(t.UserPermissionTypes)}})],n)}(k),Ve=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 v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/").pipe(i.map((function(t){return $.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/").pipe(i.map((function(t){return $.toFront(t)}))).toPromise()]}))}))},t.prototype.getAccess=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/access/").pipe(i.map((function(t){return je.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/",$.toBack(e)).pipe(i.map((function(t){return $.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPhoto=function(t,e){return g(this,void 0,void 0,(function(){var n;return v(this,(function(o){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/photo/",n).pipe(i.map((function(t){return j.toFront(t)}))).toPromise()]}))}))},t.prototype.changePassword=function(t,e,n,i){return g(this,void 0,void 0,(function(){var o;return v(this,(function(r){return o={old_password:e,password:n,password_confirm:i},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_password/",o).toPromise()]}))}))},t.prototype.changeEmail=function(t,e,n){return g(this,void 0,void 0,(function(){var i;return v(this,(function(o){return i={email:e,password:n},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email/",i).toPromise()]}))}))},t.prototype.changeEmailConfirm=function(t,e,n,i){return g(this,void 0,void 0,(function(){var o;return v(this,(function(r){return o={email:e,password:n,token:i},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email_confirm/",o).toPromise()]}))}))},t.prototype.getUserProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/profile/").pipe(i.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.prototype.getBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/basketball_profile/").pipe(i.map((function(t){return N.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_profile/").pipe(i.map((function(t){return D.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/profile/",x.toBack(t)).pipe(i.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/basketball_profile/",N.toBack(t)).pipe(i.map((function(t){return N.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserVolleyballProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/volleyball_profile/",D.toBack(t)).pipe(i.map((function(t){return D.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserPermissions=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/permission/").pipe(i.map((function(t){return Ae.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPermission=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/current/permission/",Ae.toBack(t)).pipe(i.map((function(t){return Ae.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/teams/").pipe(i.map((function(t){return X.toFront(t)}))).toPromise()]}))}))},t.prototype.getInvites=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/invites/").pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/accept/",{}).pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},t.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/decline/",{}).pipe(i.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},t.prototype.getStatistics=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/statistics/").pipe(i.map((function(t){return wt.toFront(t)}))).toPromise()]}))}))},t.prototype.getStreetballStatistics=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/streetball_statistics/").pipe(i.map((function(t){return wt.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_statistics/").pipe(i.map((function(t){return me.toFront(t)}))).toPromise()]}))}))},t.prototype.getGames=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/games/").pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getGameInvites=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/").pipe(i.map((function(t){return Xt.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptGameInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/accept/",{}).pipe(i.map((function(t){return Xt.toFront(t)}))).toPromise()]}))}))},t.prototype.declineGameInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/decline/",{}).pipe(i.map((function(t){return Xt.toFront(t)}))).toPromise()]}))}))},t.prototype.searchUsers=function(t){return g(this,void 0,void 0,(function(){var e;return v(this,(function(o){return e=(new n.HttpParams).set("search",t),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/",{params:e}).pipe(i.map((function(t){return $.toFront(t)}))).toPromise()]}))}))},t.prototype.setWizardShowed=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.put(this.configService.get("apiUrl")+"/api/v1/user/current/wizards/",{wizard:t}).pipe(i.map((function(t){return $.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/team_events/").pipe(i.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:me,competitorTeam:me}})],e)}(k),Oe=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([I],e,"toFront",null),d([U],e,"toBack",null),e=d([w({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"}})],e)}(k);(Le=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[Le.enter_game=1]="enter_game",Le[Le.exit_game=2]="exit_game",Le[Le.remove_game=3]="remove_game",Le[Le.serve_hit=4]="serve_hit",Le[Le.serve_fault=5]="serve_fault",Le[Le.serve_ace=6]="serve_ace",Le[Le.stuff_block=7]="stuff_block",Le[Le.block_fault=8]="block_fault",Le[Le.block_rebound=9]="block_rebound",Le[Le.attack_spike=10]="attack_spike",Le[Le.attack_fault=11]="attack_fault",Le[Le.attack_shot=12]="attack_shot",Le[Le.receive=13]="receive",Le[Le.receive_fault=14]="receive_fault",Le[Le.excellent_receive=15]="excellent_receive",Le[Le.point=16]="point",Le[Le.fault=17]="fault",Le[Le.serve_receive=18]="serve_receive",Le[Le.serve_receive_fault=19]="serve_receive_fault",Le[Le.excellent_serve_receive=20]="excellent_serve_receive",Le[Le.timeout=21]="timeout";var Ee,He,Ne,ze,De,Re,Me,qe,We,$e,Xe,Je=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],Ye=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],Ze=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 Je.includes(this.logType)},n.prototype.isFaultType=function(){return Ye.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([I],n,"toFront",null),d([U],n,"toBack",null),n=d([w({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:T(t.VolleyballGameLogType),datetime:P}})],n)}(k),Ke=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 v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(i.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(i.map((function(t){return ht.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/team_statistic/").pipe(i.map((function(t){return xe.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/user_statistic/").pipe(i.map((function(t){return Oe.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/logs/").pipe(i.map((function(t){return Ze.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Qe=((Ee={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",Ee[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",Ee[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",Ee[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",Ee[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",Ee[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",Ee[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",Ee[t.BasketballGameLogTypes.two_point_made]="2 очка",Ee[t.BasketballGameLogTypes.three_point_made]="3 очка",Ee[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",Ee[t.BasketballGameLogTypes.one_point_made]="1 очко",Ee[t.BasketballGameLogTypes.assist]="Передача",Ee[t.BasketballGameLogTypes.block]="Блокшот",Ee[t.BasketballGameLogTypes.rebound]="Подбор",Ee[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",Ee[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",Ee[t.BasketballGameLogTypes.steal]="Перехват",Ee[t.BasketballGameLogTypes.turnover]="Потеря",Ee[t.BasketballGameLogTypes.personal_foul]="Фол",Ee[t.BasketballGameLogTypes.technical_foul]="Технический фол",Ee[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",Ee[t.BasketballGameLogTypes.timeout]="Таймаут",Ee),tn=((He={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",He[t.OvertimeTypes.to_score_total]="До N очков",He[t.OvertimeTypes.time]="По времени",He),en=((Ne={})[t.TeamUserRole.moderator]="Модератор",Ne[t.TeamUserRole.member]="Пользователь",Ne[t.TeamUserRole.admin]="Владелец",Ne),nn=((ze={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",ze[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",ze[t.GameBasketballPosition.small_forward]="Легкий форвард",ze[t.GameBasketballPosition.power_forward]="Мощный форвард",ze[t.GameBasketballPosition.center]="Центровой",ze),on=((De={})[t.GameBasketballPosition.point_guard]="PG",De[t.GameBasketballPosition.shooting_guard]="SG",De[t.GameBasketballPosition.small_forward]="SF",De[t.GameBasketballPosition.power_forward]="PF",De[t.GameBasketballPosition.center]="C",De),rn=((Re={})[t.WorkHand.left]="Левая",Re[t.WorkHand.right]="Правая",Re),an=((Me={})[t.GameVolleyballPosition.setter]="Связующий",Me[t.GameVolleyballPosition.libero]="Либеро",Me[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",Me[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",Me[t.GameVolleyballPosition.dioganal]="Диагональный",Me),sn=((qe={})[t.GameVolleyballPosition.setter]="S",qe[t.GameVolleyballPosition.libero]="L",qe[t.GameVolleyballPosition.middle_player]="MP",qe[t.GameVolleyballPosition.receiver_attacker]="RA",qe[t.GameVolleyballPosition.dioganal]="D",qe),un=((We={})[t.GameVolleyballPosition.setter]="связ.",We[t.GameVolleyballPosition.libero]="либеро",We[t.GameVolleyballPosition.middle_player]="блок.",We[t.GameVolleyballPosition.receiver_attacker]="доигр.",We[t.GameVolleyballPosition.dioganal]="диаг.",We),ln=(($e={})[t.VolleyballWorkHand.left]="Левая",$e[t.VolleyballWorkHand.right]="Правая",$e),cn=((Xe={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",Xe[t.VolleyballGameLogType.exit_game]="Уход с площадки",Xe[t.VolleyballGameLogType.remove_game]="Удаление с площадки",Xe[t.VolleyballGameLogType.serve_ace]="Эйс",Xe[t.VolleyballGameLogType.serve_hit]="Подача",Xe[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",Xe[t.VolleyballGameLogType.attack_spike]="Результативная атака",Xe[t.VolleyballGameLogType.attack_shot]="Успешная атака",Xe[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",Xe[t.VolleyballGameLogType.stuff_block]="Результативный блок",Xe[t.VolleyballGameLogType.block_rebound]="Успешный блок",Xe[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",Xe[t.VolleyballGameLogType.excellent_receive]="Отличный прием",Xe[t.VolleyballGameLogType.receive]="Прием",Xe[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",Xe[t.VolleyballGameLogType.serve_receive]="Прием подачи",Xe[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",Xe[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",Xe[t.VolleyballGameLogType.point]="Очко",Xe[t.VolleyballGameLogType.fault]="Ошибка",Xe[t.VolleyballGameLogType.timeout]="Таймаут",Xe),pn=function(){function t(t,e){this.httpClient=t,this.configService=e,this.channels$={},this.subscriptions={}}return 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(i){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)}))}))),this.initializeEngineSubject},t.prototype.publish=function(t,e){var n=this;return new o.Observable((function(i){n.connect().subscribe((function(){n.subscriptions[t]||(n.subscriptions[t]=n.addEngineSubscription(t)),n.subscriptions[t].publish(e).then((function(t){i.next(t),i.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:Pt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Pt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),mn=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}(),fn=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=_(Object.keys(this.fields)),i=n.next();!i.done;i=n.next()){var o=i.value;this.removeItem(o)}}catch(e){t={error:e}}finally{try{i&&!i.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}(),dn=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}(fn);function hn(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function gn(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 vn=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=hn("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=Ft,t.BasketballGameApi=Gt,t.BasketballGameConfig=nt,t.BasketballGameLog=Bt,t.BasketballGameLogTypeLocalization=Qe,t.BasketballGameStatistic=It,t.BasketballGameTeamStatistic=Ct,t.BasketballProfile=N,t.BasketballStatistic=wt,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=pn,t.City=O,t.ConfigService=Pt,t.DateField=F,t.DateTimeField=P,t.FAULT_LOG_TYPES=Ye,t.Feedback=jt,t.FeedbackApi=Lt,t.File=j,t.FileApi=At,t.Game=lt,t.GameBasketballPositionLocalization=nn,t.GameBasketballPositionShortLocalization=on,t.GameInvite=Xt,t.GameTimelineStageItem=ye,t.GameTimelineStages=be,t.GameUser=ht,t.GameVolleyballPositionLocalization=an,t.GameVolleyballPositionShortLocalization=sn,t.GameVolleyballPositionShortRuLocalization=un,t.HttpCookieInterceptor=vn,t.League=Y,t.LeagueApi=Et,t.LeagueCourt=at,t.LeagueNews=Vt,t.LeagueNewsApi=Ht,t.LocalStorageEngine=dn,t.MediaApi=Nt,t.MediaItem=st,t.ModelInstance=w,t.Notification=oe,t.NotificationApi=ue,t.NotificationBaseApi=se,t.NotificationSettings=ae,t.OrgNotificationApi=le,t.Organization=J,t.OvertimeTypeLocalization=tn,t.Playoff=Pe,t.PlayoffSettings=Fe,t.Poll=Mt,t.PollAnswer=Rt,t.PollVariant=Dt,t.ReferenceApi=ce,t.SCORE_LOG_TYPES=Je,t.Sport=V,t.StorageEngine=fn,t.StorageEngineField=mn,t.Store=St,t.Team=X,t.TeamAccess=he,t.TeamApi=ge,t.TeamEvent=Zt,t.TeamEventApi=ve,t.TeamEventInvite=te,t.TeamEventTypeLocalization=Yt,t.TeamInvite=qt,t.TeamInviteExternal=pe,t.TeamPermission=de,t.TeamUser=ct,t.TeamUserRoleLocalization=en,t.ToBackHook=U,t.ToFrontHook=I,t.Tournament=tt,t.TournamentApi=Ce,t.TournamentDisqualification=ft,t.TournamentEvent=Ot,t.TournamentGroup=pt,t.TournamentInvite=ne,t.TournamentJoinApi=Be,t.TournamentJoinData=Ie,t.TournamentJoinTeam=Ue,t.TournamentNews=_e,t.TournamentSettings=K,t.TournamentStage=ke,t.TournamentStageApi=Ge,t.TournamentStageTeam=we,t.TournamentTeam=mt,t.TournamentTeamUser=dt,t.TournamentTeamUserInvite=ee,t.TournamentTeamWinner=Q,t.UntilDestroy=function(t){var e,n=(e=t).ɵcmp||e.ɵdir,i=n.onDestroy;t.__componentDestroyed$=new r.Subject,n.onDestroy=function(){t.__componentDestroyed$.next(),t.__componentDestroyed$.complete(),i.apply(this)}},t.User=$,t.UserAccess=je,t.UserApi=Ve,t.UserPermission=Ae,t.UserProfile=x,t.VolleyballGameApi=Ke,t.VolleyballGameConfig=rt,t.VolleyballGameLog=Ze,t.VolleyballGameLogTypeLocalization=cn,t.VolleyballGameStatistic=Oe,t.VolleyballGameTeamStatistic=xe,t.VolleyballProfile=D,t.VolleyballStatistic=me,t.VolleyballWorkHandLocalization=ln,t.WorkHandLocalization=rn,t.addItemInArray=_t,t.changeFavicons=function(t,e){var n,i,o,r,a="";"ablmoscow"===e&&(a="abl/");var s=gn(a);try{for(var u=_(s),l=u.next();!l.done;l=u.next()){var c=l.value,p=t.createElement("link");try{for(var m=(o=void 0,_(Object.keys(c))),f=m.next();!f.done;f=m.next()){var d=f.value;p.setAttribute(d,c[d])}}catch(t){o={error:t}}finally{try{f&&!f.done&&(r=m.return)&&r.call(m)}finally{if(o)throw o.error}}t.head.appendChild(p)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.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=bt,t.enumField=T,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=Te,t.getArrayChunks=function(t,e){var n=[],i=Math.ceil(t.length/e);if(0===i)return[t];for(var o=0;o<i;o++)n.push(t.slice(o*e,(o+1)*e));return n},t.getCookie=hn,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=gn,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=S,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&&kt(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.updateItemInArray=gt,t.updateItemsInArray=vt,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=o.of(null).pipe(i.delay(500));return function(a){return n.indexOf(a.value)>-1?o.of(null):r.pipe(i.switchMap((function(){return t.checkEmail(a.value,e).pipe(i.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}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=mtgame-core.umd.min.js.map
|