{"version":3,"sources":["webpack:///./src/api/rosters.ts","webpack:///./src/components/_global/RosterSelector.vue?8141","webpack:///./src/components/_global/RosterSelector.vue","webpack:///./src/components/_global/RosterSelector.vue?8f5b","webpack:///./src/components/_global/RosterSelector.vue?fcc1","webpack:///./src/components/_global/DataFetcher.vue?0fc9","webpack:///./src/components/_global/DataFetcher.vue?77e7","webpack:///./src/components/_global/DataFetcher.vue","webpack:///./src/components/_global/DataFetcher.vue?6448","webpack:///./src/components/_global/DataFetcher.vue?d9b7","webpack:///./src/components/roster/EditorPage.vue?628c","webpack:///./src/components/roster/EditorPage.vue","webpack:///./src/components/roster/EditorPage.vue?5ac7","webpack:///./src/components/roster/EditorPage.vue?fbee"],"names":["fetchRosters","teamID","get","data","fetchTeamCharacters","refreshRoster","rosterID","patch","refreshAllRosters","saveAll","rosters","put","createRoster","post","deleteRoster","delete","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","isLoading","canSetPreviousRoster","on","handleSetPreviousRoster","_v","$t","model","value","callback","$$v","activeRosterId","expression","canSetNextRoster","handleSetNextRoster","staticRenderFns","findIndex","x","id","length","val","$emit","externalModel","currentRosterIndex","type","String","component","VBtn","VIcon","VSelect","_t","loading","silentLoading","handleLoad","_s","hideLoading","useSilentLoading","handleSecondaryLoad","fetchData","error","secondaryFetchData","Function","required","Boolean","default","fetch","allCharacters","teamUrl","currentTeam","canSave","handleSaveClick","searchField","displayedTeamCharacters","activeRoster","characters","character","role","handleCopyCharacterToRoster","_e","canAddOrRemoveRoster","handleAddRosterClick","handleEditTitle","name","premium","nbMaximumCharactersPerRoster","handleRemoveCharacterFromRoster","handleMoveCharacterInRoster","handleCharacterContextMenu","handleRemoveRosterClick","teamModule","find","filter","c","includes","hasUnsavedChanges","$snackbar","openInfo","handleAPIError","activeRosterIndex","window","confirm","toString","nextRosterIndex","previousRosterID","nextRosterID","rosterToAddCharacterTo","r","charactersSet","rosterToDeleteCharacterFrom","ev","rosterToModifyCharacterFrom","characterToModify","roleInfo","roles","nonEmptyRoles","subroles","subRoleIndex","subRole","numberOfNonEmptyRoles","State","components","DataFetcher","GroupCard","RosterSelector","beforeRouteLeave","to","from","next","that","answer","VCol","VContainer","VRow","VTextField"],"mappings":"sJAKe,QACRA,aADQ,oEACKC,GADL,iGAEC,iBAAQC,IAAR,2BAAgCD,IAFjC,uCAE4CE,MAF5C,oGAIRC,oBAJQ,oEAIYH,GAJZ,iGAKC,iBAAQC,IAAR,iBAAsBD,EAAtB,iBALD,uCAK8CE,MAL9C,oGAORE,cAPQ,oEAOMC,GAPN,iGAQC,iBAAQC,MAAR,mBAA0BD,EAA1B,uBARD,uCAQ0DH,MAR1D,oGAURK,kBAVQ,oEAUUP,GAVV,iGAWC,iBAAQM,MAAR,4CAAmDN,IAXpD,uCAW+DE,MAX/D,oGAaRM,QAbQ,oEAaAC,GAbA,iGAcC,iBAAQC,IAAI,YAAaD,GAd1B,uCAcoCP,MAdpC,oGAgBRS,aAhBQ,oEAgBKX,GAhBL,iGAiBC,iBAAQY,KAAR,iBAAuBZ,EAAvB,cAjBD,uCAiB4CE,MAjB5C,oGAmBRW,aAnBQ,oEAmBKR,GAnBL,iGAoBC,iBAAQS,OAAR,mBAA2BT,IApB5B,uCAoByCH,MApBzC,sG,kCCLf,IAAIa,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,8BAA8B,CAACF,EAAG,QAAQ,CAACG,MAAM,CAAC,SAAWP,EAAIQ,YAAcR,EAAIS,qBAAqB,KAAO,IAAIC,GAAG,CAAC,MAAQV,EAAIW,0BAA0B,CAACP,EAAG,SAAS,CAACJ,EAAIY,GAAG,uBAAuB,GAAGR,EAAG,WAAW,CAACE,YAAY,mBAAmBC,MAAM,CAAC,MAAQP,EAAIP,QAAQ,MAAQO,EAAIa,GAAG,iBAAiB,MAAQ,GAAG,SAAW,GAAG,YAAY,OAAO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,EAAoBD,EAA4BpC,WAAWgB,MAAK,SAACrD,GAAD,OAAYA,EAAEC,IAAMqC,EAAUrC,MAC9F0E,EAAWC,EAAA,KAAMvB,MAAK,SAAArD,GAAC,OAAIA,EAAE6C,MAAQ6B,EAAkBnC,QAC7D,GAAgB,MAAZoC,EAAJ,CAIA,IAAME,EAAgBF,EAASG,SAASxB,QAAO,SAAAtD,GAAC,MAAS,IAALA,KACpD,GAA4B,GAAxB6E,EAAc3E,OAAlB,CAIA,IAAM6E,EAAeF,EAAc9E,WAAU,SAAAC,GAAC,OAAIA,GAAK0E,EAAkBM,WAEnEC,EAAwBJ,EAAc3E,OAE5CwE,EAAkBM,QAAUH,GAAeE,EAAe,GAAKE,GAE/DxG,KAAKgF,mBAAoB,SA9L3B,GAA+C,QAe9C,gBADCL,EAAW8B,MAAM,S,kCAdE,EAAiB,gBApBrC,eAAU,CACVC,WAAY,CACXC,cAAA,KACAC,YAAA,KACAC,iBAAA,MAEDC,iBANU,SAMOC,EAAWC,EAAaC,GACxC,IAAMC,EAAOlH,KACb,IAAKkH,EAAKlC,kBACT,OAAOiC,IAER,IAAME,EAAS9B,OAAOC,QAAQ4B,EAAKtG,GAAG,4BAClCuG,EACHF,IAGAA,GAAK,OAIa,WC9KkY,I,yGCOnZjF,EAAY,eACd,EACAlC,EACAuB,GACA,EACA,KACA,KACA,MAIa,aAAAW,EAAiB,QAUhC,IAAkBA,EAAW,CAACC,OAAA,KAAKmF,OAAA,KAAKC,aAAA,KAAWnF,QAAA,KAAMoF,OAAA,KAAKC,aAAA,Q","file":"dist/js/chunk-1a34bd40.0889ec52.js","sourcesContent":["import axios from \"@/utils/axios\";\nimport { Guid } from \"@/domain/guid\";\nimport { GetRostersResponse } from \"@/api/rosters/get-rosters.response\";\n\n\nexport default {\n\tasync fetchRosters(teamID: Guid): Promise {\n\t\treturn (await axios().get(`/rosters/?teamID=${teamID}`)).data;\n\t},\n\tasync fetchTeamCharacters(teamID: Guid): Promise {\n\t\treturn (await axios().get(`/teams/${teamID}/characters/`)).data;\n\t},\n\tasync refreshRoster(rosterID: Guid): Promise {\n\t\treturn (await axios().patch(`/rosters/${rosterID}/characters/items/`)).data;\n\t},\n\tasync refreshAllRosters(teamID: Guid): Promise {\n\t\treturn (await axios().patch(`/rosters/characters/items/?teamID=${teamID}`)).data;\n\t},\n\tasync saveAll(rosters: any[]): Promise {\n\t\treturn (await axios().put(\"/rosters/\", rosters)).data;\n\t},\n\tasync createRoster(teamID: Guid): Promise {\n\t\treturn (await axios().post(`/teams/${teamID}/rosters/`)).data;\n\t},\n\tasync deleteRoster(rosterID: Guid): Promise {\n\t\treturn (await axios().delete(`/rosters/${rosterID}`)).data;\n\t}\n};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"d-flex align-center w-full\"},[_c('v-btn',{attrs:{\"disabled\":_vm.isLoading || !_vm.canSetPreviousRoster,\"icon\":\"\"},on:{\"click\":_vm.handleSetPreviousRoster}},[_c('v-icon',[_vm._v(\"mdi-chevron-left\")])],1),_c('v-select',{staticClass:\"mx-2 flex-grow-1\",attrs:{\"items\":_vm.rosters,\"label\":_vm.$t('roster.roster'),\"dense\":\"\",\"outlined\":\"\",\"item-text\":\"name\",\"item-value\":\"id\",\"hide-details\":\"\"},model:{value:(_vm.activeRosterId),callback:function ($$v) {_vm.activeRosterId=$$v},expression:\"activeRosterId\"}}),_c('v-btn',{attrs:{\"disabled\":_vm.isLoading || !_vm.canSetNextRoster,\"icon\":\"\"},on:{\"click\":_vm.handleSetNextRoster}},[_c('v-icon',[_vm._v(\"mdi-chevron-right\")])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Prop, Model, Watch } from \"vue-property-decorator\";\n\n/**\n * A roster selector component.\n */\n@Component\nexport default class RosterSelector extends Vue {\n\t/// Injections\n\n\t/// Properties\n\t@Prop()\n\trosters!: any[] | null;\n\n\t@Prop()\n\tisLoading!: boolean;\n\n\n\t/// Attributes\n\n\n\tget canSetPreviousRoster() {\n\t\tif (!this.rosters) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.rosters.findIndex(x => x.id == this.activeRosterId) > 0;\n\t}\n\n\tget canSetNextRoster() {\n\t\tif (!this.rosters) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.rosters.findIndex(x => x.id == this.activeRosterId) < this.rosters.length - 1;\n\t}\n\n\t/** V-MODEL */\n\t@Model(\"change\", {type: String})\n\treadonly externalModel!: string | null;\n\n\tactiveRosterId: string | null = null;\n\n\t@Watch(\"activeRosterId\")\n\tonInternalModelChanged(val: string) {\n\t\tthis.$emit(\"change\", val);\n\t}\n\n\t@Watch(\"externalModel\")\n\tonExternalModelChanged(val: string) {\n\t\tthis.activeRosterId = val;\n\t}\n\n\tcreated() {\n\t\tthis.activeRosterId = this.externalModel;\n\t}\n\n\thandleSetPreviousRoster() {\n\t\tif (!this.rosters) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentRosterIndex = this.rosters.findIndex(x => x.id == this.activeRosterId);\n\t\tthis.activeRosterId = this.rosters[(currentRosterIndex - 1 + this.rosters.length) % this.rosters.length].id;\n\t}\n\n\thandleSetNextRoster() {\n\t\tif (!this.rosters) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentRosterIndex = this.rosters.findIndex(x => x.id == this.activeRosterId);\n\t\tthis.activeRosterId = this.rosters[(currentRosterIndex + 1 + this.rosters.length) % this.rosters.length].id;\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RosterSelector.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RosterSelector.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./RosterSelector.vue?vue&type=template&id=01bd99f7&\"\nimport script from \"./RosterSelector.vue?vue&type=script&lang=ts&\"\nexport * from \"./RosterSelector.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\ninstallComponents(component, {VBtn,VIcon,VSelect})\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error)?_c('div',[_vm._t(\"message\",function(){return [_c('p',[_vm._v(\"Something went wrong. Please try again.\")])]}),_c('button',{attrs:{\"disabled\":_vm.loading || _vm.silentLoading},on:{\"click\":_vm.handleLoad}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.loading ? \"Retrying...\" : \"Retry\")+\"\\n\\t\")])],2):(_vm.loading && !_vm.silentLoading && !_vm.hideLoading)?_c('div',{staticClass:\"fill-height\"},[_c('app-loading')],1):_c('div',{staticClass:\"fill-height\"},[_vm._t(\"default\")],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, Prop, Watch } from \"vue-property-decorator\";\n\n@Component\nexport default class DataFetcher extends Vue {\n\t@Prop() id?: string; // ID passed as a prop (from route)\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: true\n\t})\n\treadonly fetchData!: () => Promise;\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: false\n\t})\n\treadonly secondaryFetchData?: () => Promise;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly useSilentLoading!: boolean;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly hideLoading!: boolean;\n\n\tloading = false;\n\tsilentLoading = false;\n\terror = false;\n\n\tasync created() {\n\t\tawait this.handleLoad();\n\t}\n\n\n\t// Watch for route param changes (id change)\n\t@Watch(\"id\")\n\tasync onIdChange() {\n\t\tif (this.useSilentLoading) {\n\t\t\tthis.silentLoading = true;\n\t\t}\n\t\tawait this.handleSecondaryLoad();\n\t}\n\n\tasync handleLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tawait this.fetchData();\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n\n\tasync handleSecondaryLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tif (this.secondaryFetchData) {\n\t\t\t\tawait this.secondaryFetchData();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tawait this.fetchData();\n\t\t\t}\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataFetcher.vue?vue&type=template&id=452e8cc9&scoped=true&\"\nimport script from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"452e8cc9\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('data-fetcher',{attrs:{\"fetch-data\":_vm.fetch}},[(_vm.rosters != null && _vm.allCharacters != null)?_c('v-container',{attrs:{\"fluid\":\"\",\"grid-list-xl\":\"\",\"px-0\":\"\"}},[_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\",\"md\":\"6\"}},[_c('v-btn',{staticClass:\"mr-2\",attrs:{\"to\":_vm.teamUrl(_vm.currentTeam, \"/rosters\"),\"exact\":\"\",\"depressed\":\"\"}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"list\")]),_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.$t('roster.view'))+\"\\n\\t\\t\\t\\t\")],1),_c('v-btn',{attrs:{\"to\":_vm.teamUrl(_vm.currentTeam, \"/rosters/edit\"),\"exact\":\"\",\"depressed\":\"\"}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"edit\")]),_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.$t('roster.edit'))+\"\\n\\t\\t\\t\\t\")],1)],1),_c('v-col',{staticClass:\"text-right\"},[_c('v-btn',{attrs:{\"disabled\":!_vm.canSave,\"color\":\"primary\",\"block\":\"\",\"depressed\":\"\"},on:{\"click\":_vm.handleSaveClick}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"save\")]),_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.$t('roster.save'))+\"\\n\\t\\t\\t\\t\")],1)],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\",\"md\":\"6\"}},[_c('v-text-field',{staticClass:\"mb-3\",attrs:{\"label\":_vm.$t('roster.search'),\"dense\":\"\",\"outlined\":\"\",\"hide-details\":\"\"},model:{value:(_vm.searchField),callback:function ($$v) {_vm.searchField=$$v},expression:\"searchField\"}}),(_vm.allCharacters)?_c('group-card',{attrs:{\"data\":_vm.displayedTeamCharacters,\"label-size\":3,\"observed-data\":_vm.activeRoster ? _vm.activeRoster.characters : [],\"title\":_vm.$t('roster.team_characters'),\"display-player-count\":\"\",\"is-interactive\":\"\",\"is-source\":\"\"},on:{\"on-copy\":function (character, rosterID, role) { return _vm.handleCopyCharacterToRoster(character, _vm.activeRoster.id, role); }}}):_vm._e()],1),_c('v-col',{attrs:{\"cols\":\"12\",\"md\":\"6\"}},[_c('v-row',{staticClass:\"flex-grow-1\",attrs:{\"no-gutters\":\"\"}},[_c('div',{staticClass:\"d-flex flex-grow-1 align-center\"},[_c('roster-selector',{attrs:{\"rosters\":_vm.rosters},model:{value:(_vm.activeRosterId),callback:function ($$v) {_vm.activeRosterId=$$v},expression:\"activeRosterId\"}}),_c('v-btn',{staticClass:\"ml-2\",attrs:{\"disabled\":!_vm.canAddOrRemoveRoster,\"color\":\"primary\",\"depressed\":\"\"},on:{\"click\":_vm.handleAddRosterClick}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"add\")]),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.$t('roster.add'))+\"\\n\\t\\t\\t\\t\\t\\t\")],1)],1)]),_c('v-row',{staticClass:\"mt-0\"},[_c('v-col',[(_vm.activeRoster && _vm.activeRoster.characters != null)?_c('group-card',{attrs:{\"data\":_vm.activeRoster.characters,\"index\":_vm.activeRoster.id,\"label-size\":3,\"on-edit-title\":_vm.handleEditTitle,\"title\":_vm.activeRoster.name,\"color-player-count\":function (x) { return x > _vm.currentTeam.premium.nbMaximumCharactersPerRoster ? 'red' : 'teal'; },\"display-i-lvl\":\"\",\"display-player-count\":\"\",\"is-interactive\":\"\"},on:{\"on-delete\":_vm.handleRemoveCharacterFromRoster,\"on-move\":_vm.handleMoveCharacterInRoster,\"on-copy\":_vm.handleCopyCharacterToRoster,\"on-character-context\":_vm.handleCharacterContextMenu}}):_vm._e(),(_vm.activeRoster)?_c('v-btn',{staticClass:\"mt-3\",attrs:{\"disabled\":!_vm.canAddOrRemoveRoster,\"color\":\"error\",\"depressed\":\"\"},on:{\"click\":_vm.handleRemoveRosterClick}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"clear\")]),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.$t('roster.delete'))+\"\\n\\t\\t\\t\\t\\t\\t\")],1):_vm._e()],1)],1)],1)],1)],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from \"vue-property-decorator\";\nimport { namespace } from \"vuex-class\";\nimport { NavigationGuardNext, Route } from \"vue-router\";\n\n/**\n * Utils\n */\nimport { teamUrl } from \"@/utils/url-helpers\";\n\n/**\n * Components\n */\nimport GroupCard from \"@/components/_global/GroupCard.vue\";\nimport RosterSelector from \"@/components/_global/RosterSelector.vue\";\n\n/**\n * API\n */\nimport rostersAPI from \"@/api/rosters\";\n\n/**\n * Types\n */\nimport roles from \"@/config/wow/roles\";\nimport { normalizeString } from \"@/utils/string-helpers\";\nimport { GetOneTeamResponse } from \"@/api/teams/get-one-team.response\";\nimport DataFetcher from \"@/components/_global/DataFetcher.vue\";\n\n/**\n * VueX Modules\n */\nconst teamModule = namespace(\"team\");\n\n/**\n * Roster's list page.\n */\n@Component({\n\tcomponents: {\n\t\tDataFetcher,\n\t\tGroupCard,\n\t\tRosterSelector\n\t},\n\tbeforeRouteLeave(to: Route, from: Route, next: NavigationGuardNext) {\n\t\tconst that = this as RostersEditorPage;\n\t\tif (!that.hasUnsavedChanges) {\n\t\t\treturn next();\n\t\t}\n\t\tconst answer = window.confirm(that.$t(\"global.alert_leave_page\") as string);\n\t\tif (answer) {\n\t\t\tnext();\n\t\t}\n\t\telse {\n\t\t\tnext(false);\n\t\t}\n\t}\n})\nexport default class RostersEditorPage extends Vue {\n\t/// Injections\n\tteamUrl = teamUrl;\n\n\t/// Attributes\n\tisLoading = false;\n\trosters: any[] | null = null;\n\thasUnsavedChanges = false;\n\tallCharacters: any[] | null = null;\n\tactiveRosterId: any | null = null;\n\t// Filters\n\tsearchField = \"\";\n\n\t/// VueX Modules\n\t@teamModule.State(\"team\")\n\tcurrentTeam!: GetOneTeamResponse;\n\n\tget activeRoster() {\n\t\tif (!this.rosters) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this.rosters.find(x => x.id == this.activeRosterId);\n\t}\n\n\tget displayedTeamCharacters() {\n\t\tif (!this.allCharacters) {\n\t\t\treturn null;\n\t\t}\n\t\tconst searchField = normalizeString(this.searchField);\n\t\treturn this.allCharacters.filter(c =>\n\t\t\tc.name && normalizeString(c.name).includes(searchField));\n\t}\n\n\n\tget canSave() {\n\t\treturn !this.isLoading && this.hasUnsavedChanges;\n\t}\n\n\tget canAddOrRemoveRoster() {\n\t\treturn !this.isLoading && !this.hasUnsavedChanges;\n\t}\n\n\t/// Methods\n\tasync created() {\n\t}\n\n\tasync fetch() {\n\t\tawait this.fetchRosters();\n\t\tthis.allCharacters = await rostersAPI.fetchTeamCharacters(this.currentTeam.id);\n\n\t\tif (this.rosters != null && this.rosters.length > 0) {\n\t\t\tthis.activeRosterId = this.rosters[0].id;\n\t\t}\n\t}\n\n\tasync fetchRosters() {\n\t\tthis.rosters = await rostersAPI.fetchRosters(this.currentTeam.id);\n\t\tthis.hasUnsavedChanges = false;\n\t}\n\n\thandleEditTitle(name: string) {\n\t\tthis.activeRoster.name = name;\n\t\tthis.hasUnsavedChanges = true;\n\t}\n\n\tasync handleSaveClick() {\n\t\tif (this.rosters == null) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isLoading = true;\n\t\ttry {\n\t\t\tawait rostersAPI.saveAll(this.rosters);\n\t\t\tawait this.fetchRosters();\n\t\t\tthis.$snackbar.openInfo(this.$t(\"snackbar.save_success\"));\n\t\t} catch (error) {\n\t\t\tthis.handleAPIError(error);\n\t\t}\n\t\tthis.isLoading = false;\n\t}\n\n\tasync handleAddRosterClick() {\n\t\tif (!this.rosters) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isLoading = true;\n\t\ttry {\n\t\t\tconst rosterID = await rostersAPI.createRoster(this.currentTeam.id);\n\t\t\tawait this.fetchRosters();\n\t\t\tthis.activeRosterId = rosterID;\n\t\t} catch (error) {\n\t\t\tthis.handleAPIError(error);\n\t\t}\n\t\tthis.isLoading = false;\n\t}\n\n\tasync handleRemoveRosterClick() {\n\t\tif (!this.rosters) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeRosterIndex = this.rosters.findIndex(x => x.id == this.activeRosterId);\n\n\t\tif (!window.confirm(this.$t(\"roster.alert_remove\").toString())) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isLoading = true;\n\t\ttry {\n\t\t\tawait rostersAPI.deleteRoster(this.activeRoster.id);\n\t\t\tawait this.fetchRosters();\n\t\t} catch (error) {\n\t\t\tthis.handleAPIError(error);\n\t\t}\n\t\tthis.isLoading = false;\n\n\t\tif (this.rosters.length > 0) {\n\t\t\tconst nextRosterIndex = activeRosterIndex >= this.rosters.length ? activeRosterIndex - 1 : activeRosterIndex;\n\t\t\tthis.activeRosterId = this.rosters[nextRosterIndex].id;\n\t\t}\n\t\telse {\n\t\t\tthis.activeRosterId = null;\n\t\t}\n\n\t}\n\n\thandleMoveCharacterInRoster(character: any, previousRosterID: any, nextRosterID: any, role: string) {\n\t\tif (this.rosters == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.handleRemoveCharacterFromRoster(character, previousRosterID);\n\t\tthis.handleCopyCharacterToRoster(character, nextRosterID, role);\n\n\t\tthis.hasUnsavedChanges = true;\n\t}\n\n\thandleCopyCharacterToRoster(character: any, rosterID: any, role: string) {\n\t\tif (this.rosters == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rosterToAddCharacterTo = this.rosters.find(r => r.id === rosterID);\n\n\t\tif (rosterToAddCharacterTo.characters.length >= this.currentTeam.premium.nbMaximumCharactersPerRoster) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst charactersSet = rosterToAddCharacterTo.characters as any[];\n\t\trosterToAddCharacterTo.characters = [...charactersSet.filter(c => c.id !== character.id), {\n\t\t\t...character,\n\t\t\trole: role\n\t\t}];\n\n\t\tthis.hasUnsavedChanges = true;\n\t}\n\n\thandleRemoveCharacterFromRoster(character: any, rosterID: any) {\n\t\tif (this.rosters == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst rosterToDeleteCharacterFrom = this.rosters.find(r => r.id === rosterID);\n\t\tconst charactersSet = rosterToDeleteCharacterFrom.characters as any[];\n\t\trosterToDeleteCharacterFrom.characters = charactersSet.filter(c => c.id !== character.id);\n\n\t\tthis.hasUnsavedChanges = true;\n\t}\n\n\thandleCharacterContextMenu(character: any, rosterID: any, ev: Event) {\n\t\tif (this.rosters == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst rosterToModifyCharacterFrom = this.rosters.find(r => r.id === rosterID);\n\t\tconst characterToModify = rosterToModifyCharacterFrom.characters.find((x: any) => x.id == character.id);\n\t\tconst roleInfo = roles.find(x => x.name == characterToModify.role);\n\t\tif (roleInfo == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nonEmptyRoles = roleInfo.subroles.filter(x => x != \"\");\n\t\tif (nonEmptyRoles.length == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst subRoleIndex = nonEmptyRoles.findIndex(x => x == characterToModify.subRole);\n\n\t\tconst numberOfNonEmptyRoles = nonEmptyRoles.length;\n\n\t\tcharacterToModify.subRole = nonEmptyRoles[(subRoleIndex + 1) % numberOfNonEmptyRoles];\n\n\t\tthis.hasUnsavedChanges = true;\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorPage.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditorPage.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./EditorPage.vue?vue&type=template&id=fd0bb9de&\"\nimport script from \"./EditorPage.vue?vue&type=script&lang=ts&\"\nexport * from \"./EditorPage.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VBtn,VCol,VContainer,VIcon,VRow,VTextField})\n"],"sourceRoot":""}