{"version":3,"sources":["webpack:///./node_modules/core-js/modules/_string-pad.js","webpack:///./src/utils/date-helpers.ts","webpack:///./src/config/wow/armor-types.ts","webpack:///./src/api/compositions.ts","webpack:///./src/components/composition/CompositionsPage.vue?7b2f","webpack:///./src/components/composition/CompositionsPage.vue","webpack:///./src/components/composition/CompositionsPage.vue?68af","webpack:///./src/components/composition/CompositionsPage.vue?6caa","webpack:///./src/utils/sort-helpers.ts","webpack:///./node_modules/core-js/modules/es7.string.pad-start.js"],"names":["toLength","repeat","defined","module","exports","that","maxLength","fillString","left","S","String","stringLength","length","fillStr","undefined","intMaxLength","fillLen","stringFiller","call","Math","ceil","slice","createDateString","year","month","day","toString","padStart","getLocaleString","date","locale","toLocaleString","getLocaleStringFromDateString","dateString","Date","parse","getLocaleStringFromDateStringWithOptions","options","getDateTimeString","getTime","getTimezoneOffset","toISOString","getElegantDateString","toLocaleDateString","weekday","getElegantDateStringFromString","dateAsString","getMonthName","monthNumber","getDateStringFromDateTimeAsString","dateTimeAsString","split","getDateString","smartDisplayDays","numberOfDays","years","floor","months","days","result","push","join","differenceInMinutesBetweenDates","date1","date2","round","differenceInDaysBetweenDates","UTC","getFullYear","getMonth","getDate","getMaxDate","dates","reduce","a","b","getTimeSince","referenceDate","onlyMinutes","intervalType","seconds","interval","type","classes","fetchCompositions","teamID","get","data","fetchCompositionGroup","compositionGroupID","withSignups","withCompositions","withUnknownSignups","arrayFields","createComposition","payload","post","editComposition","put","copyComposition","compositionToCopyID","destinationDate","deleteCompositionGroup","delete","saveAll","compositionGroup","id","setSignupState","broadcastToDiscord","compositionID","togglePublished","patch","toggleLocked","render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","teamUrl","currentTeam","isLoading","$vuetify","breakpoint","smAndDown","_v","_e","_s","$t","isEditing","on","handleCopyAddonStringClick","isThereAnyCharacter","key","$route","params","fetchCurrentCompositionGroup","staticRenderFns","teamModule","fullPath","endsWith","hasPermission","roles","MANAGE_COMPOSITIONS","hasFeaturePermission","DISCORD","compositions","some","x","characters","addonString","filter","map","composition","name","sort","role","character","realm","navigator","clipboard","writeText","$snackbar","openInfo","State","components","GroupCard","component","VBtn","VCol","VContainer","VIcon","VRow","sortByAsc","f","sortByDesc","$export","$pad","userAgent","WEBKIT_BUG","test","P","F","arguments"],"mappings":"qGACA,IAAIA,EAAW,EAAQ,QACnBC,EAAS,EAAQ,QACjBC,EAAU,EAAQ,QAEtBC,EAAOC,QAAU,SAAUC,EAAMC,EAAWC,EAAYC,GACtD,IAAIC,EAAIC,OAAOR,EAAQG,IACnBM,EAAeF,EAAEG,OACjBC,OAAyBC,IAAfP,EAA2B,IAAMG,OAAOH,GAClDQ,EAAef,EAASM,GAC5B,GAAIS,GAAgBJ,GAA2B,IAAXE,EAAe,OAAOJ,EAC1D,IAAIO,EAAUD,EAAeJ,EACzBM,EAAehB,EAAOiB,KAAKL,EAASM,KAAKC,KAAKJ,EAAUH,EAAQD,SAEpE,OADIK,EAAaL,OAASI,IAASC,EAAeA,EAAaI,MAAM,EAAGL,IACjER,EAAOS,EAAeR,EAAIA,EAAIQ,I,0cCR1BK,G,8BAAmB,SAACC,EAAcC,EAAeC,GAC7D,gBAAUF,EAAV,YAAkBC,EAAME,WAAWC,SAAS,EAAG,KAA/C,YAAuDF,EAAIC,WAAWC,SAAS,EAAG,QAiBtEC,EAAkB,SAACC,GAAgC,IAApBC,EAAoB,uDAAX,QACpD,OAAOD,EAAKE,eAAeD,IAQfE,EAAgC,SAACC,GAAwC,IAApBH,EAAoB,uDAAX,QAC1E,OAAOF,EAAgB,IAAIM,KAAKA,KAAKC,MAAMF,IAAcH,IAM7CM,EAA2C,SAACH,EAAoBI,GAA0D,IAApBP,EAAoB,uDAAX,QAC3H,OAAQ,IAAII,KAAKA,KAAKC,MAAMF,IAAcF,eAAeD,EAAQO,IAQrDC,EAAoB,SAACT,GACjC,OAAO,IAAIK,KAAKL,EAAKU,UAAwC,IAA3BV,EAAKW,qBAA8BC,eASzDC,EAAuB,SAACb,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AUC,UAAUC,UAAUX,GAC9BtC,KAAKkD,UAAUC,SAASnD,KAAKgB,GAAG,sCAtDnC,GAA8C,QAmB7C,gBADCU,EAAW0B,MAAM,S,kCAlBE,EAAgB,gBALpC,eAAU,CACVC,WAAY,CACXC,YAAA,SAGmB,WC5GwY,I,6FCOzZC,EAAY,eACd,EACAzD,EACA2B,GACA,EACA,KACA,KACA,MAIa,aAAA8B,EAAiB,QAShC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,OAAA,KAAKC,aAAA,KAAWC,QAAA,KAAMC,OAAA,Q,kCC3BzD,oEAAO,IAAMC,EAAY,SAAUC,GAClC,OAAO,SAACvG,EAAMC,GACb,OAAIsG,EAAEvG,GAAKuG,EAAEtG,IAAc,EACvBsG,EAAEvG,GAAKuG,EAAEtG,GAAa,EACnB,IAIIuG,EAAa,SAAUD,GACnC,OAAO,SAACvG,EAAMC,GACb,OAAIsG,EAAEvG,GAAKuG,EAAEtG,GAAa,EACtBsG,EAAEvG,GAAKuG,EAAEtG,IAAc,EACpB,K,kCCVT,IAAIwG,EAAU,EAAQ,QAClBC,EAAO,EAAQ,QACfC,EAAY,EAAQ,QAGpBC,EAAa,mDAAmDC,KAAKF,GAEzEF,EAAQA,EAAQK,EAAIL,EAAQM,EAAIH,EAAY,SAAU,CACpD3J,SAAU,SAAkBrB,GAC1B,OAAO8K,EAAKjE,KAAM7G,EAAWoL,UAAU9K,OAAS,EAAI8K,UAAU,QAAK5K,GAAW","file":"dist/js/chunk-05a1e783.aeaaa302.js","sourcesContent":["// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('./_to-length');\nvar repeat = require('./_string-repeat');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, maxLength, fillString, left) {\n var S = String(defined(that));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n if (intMaxLength <= stringLength || fillStr == '') return S;\n var fillLen = intMaxLength - stringLength;\n var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n","/**\n * Retourne un *string* de la forme \"YYYY-MM-DD\" à partir de Year, Month, Day.\n * @param year\n * @param month\n * @param day\n */\nexport const createDateString = (year: number, month: number, day: number) => {\n\treturn `${year}-${month.toString().padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}`;\n};\n\n/**\n * Retourne un *string* de la forme \"DD/MM/YYYY\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getLocaleDateString = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleDateString(locale);\n};\n\n/**\n * Retourne un *string* de la forme \"DD/MM/YYYY à HH:mm:ss\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getLocaleString = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleString(locale);\n};\n\n/**\n * Retourne un *string* de la forme \"DD/MM/YYYY à HH:mm:ss\" à partir d'une date string.\n * @param dateString\n * @param locale\n */\nexport const getLocaleStringFromDateString = (dateString: string, locale = \"en-GB\") => {\n\treturn getLocaleString(new Date(Date.parse(dateString)), locale);\n};\n\n/**\n * Retourne un *string* de la forme \"Aug 22nd 2020 hh:mm:ss UTC\" à partir d'une date string.\n */\nexport const getLocaleStringFromDateStringWithOptions = (dateString: string, options?: Intl.DateTimeFormatOptions, locale = \"en-GB\") => {\n\treturn (new Date(Date.parse(dateString))).toLocaleString(locale, options);\n};\n\n\n/**\n * Retourne un *string* de la forme \"2019-03-20T11:24:06.065Z\".\n * @param date\n */\nexport const getDateTimeString = (date: Date) => {\n\treturn new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString();\n};\n\n\n/**\n * Retourne un *string* de la forme \"lundi 1 janvier 2000\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getElegantDateString = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleDateString(locale, {\n\t\tweekday: \"long\",\n\t\tyear: \"numeric\",\n\t\tmonth: \"long\",\n\t\tday: \"numeric\"\n\t});\n};\n\n/**\n * Retourne un *string* de la forme \"lundi 1 janvier 2000\" à partir d'une string de la forme yyyy-MM-dd.\n */\nexport const getElegantDateStringFromString = (dateAsString: string, locale = \"en-US\") => {\n\treturn (new Date(`${dateAsString}T00:00:00`)).toLocaleDateString(locale, {\n\t\tweekday: \"long\",\n\t\tyear: \"numeric\",\n\t\tmonth: \"long\",\n\t\tday: \"numeric\"\n\t});\n};\n\n/**\n * Retourne le mois traduit dans la {locale} à partir du numéro du mois.\n * @param monthNumber\n * @param locale\n */\nexport const getMonthName = (monthNumber: number, locale = \"en-US\") => {\n\treturn (new Date(`2000-${monthNumber.toString().padStart(2, \"0\")}-01T00:00:00`)).toLocaleDateString(locale, {\n\t\tmonth: \"long\"\n\t});\n};\n\n\n/**\n * Retourne un *string* de la forme \"janvier\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getMonthStringFromDate = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleDateString(locale, {\n\t\tmonth: \"long\"\n\t});\n};\n\n/**\n * Retourne le timestamp en nombre de jours (arrondi en floor).\n */\nexport const getTimestampInDays = (timestampInMS: number) => {\n\treturn Math.floor((((timestampInMS / 1000) / 60) / 60) / 24);\n};\n\n/**\n * Retourne un *string* de la forme \"2019-03-20\".\n */\nexport const getDateStringFromDateTimeAsString = (dateTimeAsString: string) => {\n\treturn dateTimeAsString.split(\"T\")[0];\n};\n\n/**\n * Retourne un *string* de la forme \"2019-03-20\".\n * @param date\n */\nexport const getDateString = (date: Date) => {\n\treturn getDateStringFromDateTimeAsString(getDateTimeString(date));\n};\n/**\n * Retourne un *string* de la forme \"2019-03\".\n * @param date\n */\nexport const getYearMonthString = (date: Date) => {\n\tconst dateStringSplit = getDateString(date).split(\"-\");\n\treturn `${dateStringSplit[0]}-${dateStringSplit[1]}`;\n};\n/**\n * Retourne un *string* de la forme \"11:24:06.065Z\".\n * @param date\n */\nexport const getTimeString = (date: Date) => {\n\treturn getDateTimeString(date).split(\"T\")[1];\n};\n/**\n * Retourne un *string* de la forme \"11:24\".\n * @param date\n */\nexport const getShortTimeString = (date: Date) => {\n\tconst timeSplit = getTimeString(date).split(\":\");\n\treturn `${timeSplit[0]}:${timeSplit[1]}`;\n};\n\n/**\n * Ajout un nombre de minutes à un time de la forme \"11:24\".\n * @param time\n * @param nbMinutesToAdd\n */\nexport const addMinutes = (time: string, nbMinutesToAdd: number) => {\n\tconst timeSplit = time.split(\":\");\n\tconst hour = parseInt(timeSplit[0], 10);\n\tconst minute = parseInt(timeSplit[1], 10);\n\n\tconst rawMinuteAfterAddition = minute + nbMinutesToAdd;\n\treturn `${(hour + Math.floor(rawMinuteAfterAddition / 60)).toString().padStart(2, \"0\")}:${(rawMinuteAfterAddition % 60).toString().padStart(2, \"0\")}`;\n};\n\n/**\n * Retourne un affichage *string* intelligent d'une durée en heures ou en minutes.\n * @param minutes\n */\nexport const smartDisplayMinutes = (minutes: number) => {\n\tif (minutes == null) {\n\t\treturn \"-\";\n\t}\n\tif (minutes >= 60) {\n\t\tconst remainingSeconds = minutes % 60;\n\t\treturn `${Math.floor(minutes / 60)}h` + (remainingSeconds > 0 ? remainingSeconds.toString().padStart(2, \"0\") : \"\");\n\t}\n\treturn `${minutes} min`;\n};\n\n/**\n * Retourne un affichage *string* intelligent d'une durée en jours (Y year, M months, D days).\n * @param numberOfDays\n */\nexport const smartDisplayDays = (numberOfDays: number) => {\n\tif (numberOfDays == 0) {\n\t\treturn \"today\";\n\t}\n\n\tconst years = Math.floor(numberOfDays / 365);\n\tconst months = Math.floor(numberOfDays % 365 / 30);\n\tconst days = Math.floor(numberOfDays % 365 % 30);\n\n\tconst result = [];\n\tif (years > 0) {\n\t\tresult.push(years + (years == 1 ? \" year\" : \" years\"));\n\t}\n\tif (months > 0) {\n\t\tresult.push(months + (months == 1 ? \" month\" : \" months\"));\n\t}\n\tif (days > 0) {\n\t\tresult.push(days + (days == 1 ? \" day\" : \" days\"));\n\t}\n\n\treturn result.join(\", \");\n};\n\n/**\n * Retourne la différence en minutes entre *date1* et *date2* telles que date1 < date2.\n */\nexport const differenceInMinutesBetweenDates = (date1: Date, date2: Date) => {\n\treturn Math.round(((date2.getTime() - date1.getTime()) / 1000) / 60); // minutes\n};\n\n/**\n * Retourne la différence en jours entre *date1* et *date2* telles que date1 < date2.\n */\nexport const differenceInDaysBetweenDates = function (date1: Date, date2: Date) {\n\treturn Math.floor((Date.UTC(date2.getFullYear(), date2.getMonth(), date2.getDate()) - Date.UTC(date1.getFullYear(), date1.getMonth(), date1.getDate())) / (1000 * 60 * 60 * 24));\n};\n\n/**\n * Retourne la différence en minutes entre *hh1:mm1* et *hh2:mm2* telles que hh1:mm1 < hh2:mm2.\n */\nexport const differenceInMinutesBetweenHoursMinutes = (hm1: string, hm2: string) => {\n\tconst h1 = parseInt(hm1.split(\":\")[0], 10);\n\tconst m1 = parseInt(hm1.split(\":\")[1], 10);\n\tconst h2 = parseInt(hm2.split(\":\")[0], 10);\n\tconst m2 = parseInt(hm2.split(\":\")[1], 10);\n\treturn (60 * h2 + m2) - (60 * h1 + m1);\n};\n\n/**\n * Fonction de tri par date croissant si a < b.\n * @param a\n * @param b\n */\nexport const sortByDate = (a: Date, b: Date) => {\n\treturn a > b ? -1 : a < b ? 1 : 0;\n};\n\n\n/**\n * Retourne la date minimale d'un array de dates.\n */\nexport const getMinDate = (dates: Date[]) => {\n\treturn dates.reduce(function (a, b) {\n\t\treturn a < b ? a : b;\n\t});\n};\n\n/**\n * Retourne la date maximale d'un array de dates.\n */\nexport const getMaxDate = (dates: Date[]) => {\n\treturn dates.reduce(function (a, b) {\n\t\treturn a > b ? a : b;\n\t});\n};\n\n/**\n * Retourne la durée formatée entre maintenant et la date passée en paramètre.\n * @param date\n * @param referenceDate\n * @param onlyMinutes\n */\nexport const getTimeSince = (date: Date, referenceDate: Date = new Date(), onlyMinutes = false) => {\n\tif (typeof date !== \"object\") {\n\t\tdate = new Date(date);\n\t}\n\n\tlet seconds = Math.floor((+referenceDate - +date) / 1000);\n\tif (seconds < 0) {\n\t\tseconds = 0;\n\t}\n\tlet intervalType;\n\n\tlet interval = Math.floor(seconds / 31536000);\n\tif (interval >= 1) {\n\t\tintervalType = \"year\";\n\t}\n\telse {\n\t\tinterval = Math.floor(seconds / 2592000);\n\t\tif (interval >= 1) {\n\t\t\tintervalType = \"month\";\n\t\t}\n\t\telse {\n\t\t\tinterval = Math.floor(seconds / 86400);\n\t\t\tif (interval >= 1) {\n\t\t\t\tintervalType = \"day\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinterval = Math.floor(seconds / 3600);\n\t\t\t\tif (interval >= 1) {\n\t\t\t\t\tintervalType = \"hour\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinterval = Math.floor(seconds / 60);\n\t\t\t\t\tif (interval >= 1 || onlyMinutes) {\n\t\t\t\t\t\tintervalType = \"minute\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tinterval = seconds;\n\t\t\t\t\t\tintervalType = \"second\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (interval > 1 || interval === 0) {\n\t\tintervalType += \"s\";\n\t}\n\n\n\tif (onlyMinutes) {\n\n\t}\n\n\treturn (interval > 0 ? interval : \"< 1\") + \" \" + intervalType;\n};","export default [{\n\ttype: \"Cloth\",\n\tclasses: [8, 5, 9]\n}, {\n\ttype: \"Leather\",\n\tclasses: [4, 11, 10, 12]\n}, {\n\ttype: \"Mail\",\n\tclasses: [7, 3, 13]\n}, {\n\ttype: \"Plate\",\n\tclasses: [1, 2, 6]\n}];","import axios from \"@/utils/axios\";\nimport { GetOneCompositionGroupResponse } from \"@/api/compositions/get-one-composition-group.response\";\nimport { Guid } from \"@/domain/guid\";\nimport { GetCompositionGroupsResponse } from \"@/api/compositions/get-composition-groups.response\";\nimport { CreateCompositionGroupRequest } from \"@/api/compositions/create-composition-group.request\";\nimport { SetSignupStateRequest } from \"@/api/compositions/set-signup-state.request\";\n\nexport default {\n\tasync fetchCompositions(teamID: Guid, month: number, year: number): Promise {\n\t\treturn (await axios().get(`/compositions?month=${month}&year=${year}&teamID=${teamID}`)).data;\n\t},\n\tasync fetchCompositionGroup(\n\t\tcompositionGroupID: Guid,\n\t\twithSignups = false,\n\t\twithCompositions = false,\n\t\twithUnknownSignups = false\n\t): Promise {\n\t\t\n\t\tconst arrayFields: string[] = [];\n\t\tif (withSignups) {\n\t\t\tarrayFields.push(\"signups\");\n\t\t}\n\t\tif (withCompositions) {\n\t\t\tarrayFields.push(\"compositions\");\n\t\t}\n\t\tif (withUnknownSignups) {\n\t\t\tarrayFields.push(\"signups-unknown\");\n\t\t}\n\t\treturn (await axios().get(`/compositions/${compositionGroupID}?fields=${arrayFields.join(\",\")}`)).data;\n\t},\n\tasync createComposition(teamID: Guid, payload: CreateCompositionGroupRequest): Promise {\n\t\treturn (await axios().post(`/compositions/create?teamID=${teamID}`, payload)).data;\n\t},\n\tasync editComposition(compositionGroupID: Guid, payload: any): Promise {\n\t\treturn (await axios().put(`/compositions/${compositionGroupID}/meta`, payload)).data;\n\t},\n\tasync copyComposition(compositionToCopyID: Guid, destinationDate: string): Promise {\n\t\treturn (await axios().post(`/compositions/copy/${compositionToCopyID}/${destinationDate}`)).data;\n\t},\n\tasync deleteCompositionGroup(compositionGroupID: Guid): Promise {\n\t\treturn (await axios().delete(`/compositions/${compositionGroupID}`)).data;\n\t},\n\tasync saveAll(compositionGroup: any): Promise {\n\t\treturn (await axios().put(`/compositions/${compositionGroup.id}`, compositionGroup)).data;\n\t},\n\tasync setSignupState(compositionGroupID: Guid, payload: SetSignupStateRequest): Promise {\n\t\treturn (await axios().post(`/compositions/setSignupState/${compositionGroupID}`, payload)).data;\n\t},\n\tasync broadcastToDiscord(compositionID: Guid): Promise {\n\t\treturn (await axios().post(`/compositions/composition/${compositionID}/discord`)).data;\n\t},\n\tasync togglePublished(compositionGroupID: Guid): Promise {\n\t\treturn (await axios().patch(`/compositions/${compositionGroupID}/togglePublished`)).data;\n\t},\n\tasync toggleLocked(compositionGroupID: Guid): Promise {\n\t\treturn (await axios().patch(`/compositions/${compositionGroupID}/toggleLocked`)).data;\n\t},\n};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{attrs:{\"fluid\":\"\",\"pa-0\":\"\",\"ma-0\":\"\",\"grid-list-xl\":\"\"}},[(_vm.compositionGroup != null)?_c('v-row',{attrs:{\"no-gutters\":\"\"}},[_c('v-col',{attrs:{\"cols\":\"4\"}},[_c('v-btn',{staticClass:\"mr-2\",attrs:{\"to\":_vm.teamUrl(_vm.currentTeam, (\"/events/\" + (_vm.compositionGroup.id) + \"/compositions\")),\"disabled\":_vm.isLoading,\"depressed\":\"\",\"exact\":\"\"}},[_c('v-icon',{attrs:{\"left\":!_vm.$vuetify.breakpoint.smAndDown}},[_vm._v(\"list\")]),(!_vm.$vuetify.breakpoint.smAndDown)?[_vm._v(_vm._s(_vm.$t('composition.view')))]:_vm._e()],2),(_vm.canManageCompositions)?_c('v-btn',{attrs:{\"to\":_vm.teamUrl(_vm.currentTeam, (\"/events/\" + (_vm.compositionGroup.id) + \"/compositions/edit\")),\"disabled\":_vm.isLoading,\"depressed\":\"\"}},[_c('v-icon',{attrs:{\"left\":!_vm.$vuetify.breakpoint.smAndDown}},[_vm._v(\"edit\")]),(!_vm.$vuetify.breakpoint.smAndDown)?[_vm._v(_vm._s(_vm.$t('composition.edit')))]:_vm._e()],2):_vm._e()],1),_c('v-col',{staticClass:\"text-right\"},[(_vm.canCopyAddonString)?_c('v-btn',{staticClass:\"mr-2\",attrs:{\"disabled\":_vm.isEditing,\"depressed\":\"\"},on:{\"click\":_vm.handleCopyAddonStringClick}},[_c('v-icon',[_vm._v(\"content_copy\")])],1):_vm._e(),_c('v-btn',{staticClass:\"mr-2\",attrs:{\"to\":_vm.teamUrl(_vm.currentTeam, (\"/events/\" + (_vm.compositionGroup.id) + \"/compositions/compare\")),\"disabled\":_vm.isEditing,\"depressed\":\"\"}},[_c('v-icon',{attrs:{\"left\":!_vm.$vuetify.breakpoint.smAndDown}},[_vm._v(\"fas fa-exchange-alt\")]),(!_vm.$vuetify.breakpoint.smAndDown)?[_vm._v(_vm._s(_vm.$t('composition.compare')))]:_vm._e()],2),_c('v-btn',{staticClass:\"mr-2\",attrs:{\"to\":_vm.teamUrl(_vm.currentTeam, (\"/events/\" + (_vm.compositionGroup.id) + \"/compositions/distribution\")),\"disabled\":!_vm.isThereAnyCharacter || _vm.isEditing,\"depressed\":\"\"}},[_c('v-icon',{attrs:{\"left\":!_vm.$vuetify.breakpoint.smAndDown}},[_vm._v(\"bar_chart\")]),(!_vm.$vuetify.breakpoint.smAndDown)?[_vm._v(_vm._s(_vm.$t('composition.view_distribution')))]:_vm._e()],2),_c('v-btn',{attrs:{\"to\":_vm.teamUrl(_vm.currentTeam, (\"/events/\" + (_vm.compositionGroup.id) + \"/compositions/wide\")),\"disabled\":!_vm.isThereAnyCharacter || _vm.isEditing,\"depressed\":\"\"}},[_c('v-icon',{attrs:{\"left\":!_vm.$vuetify.breakpoint.smAndDown}},[_vm._v(\"stacked_bar_chart\")]),(!_vm.$vuetify.breakpoint.smAndDown)?[_vm._v(_vm._s(_vm.$t('composition.view_wide')))]:_vm._e()],2)],1)],1):_vm._e(),(!_vm.isLoading)?_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('router-view',{key:_vm.$route.params.id,attrs:{\"composition-group\":_vm.compositionGroup,\"notify-fetch-composition-group\":_vm.fetchCurrentCompositionGroup}})],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\nimport { Component, Vue } from \"vue-property-decorator\";\nimport { namespace } from \"vuex-class\";\n\n/**\n * Utils\n */\nimport classes from \"@/config/wow/classes\";\nimport * as externalLinks from \"@/config/external-links\";\nimport * as imageLinks from \"@/config/image-links\";\nimport armorTypes from \"@/config/wow/armor-types\";\nimport { features, roles } from \"@/config/roles\";\n\nimport { getElegantDateString } from \"@/utils/date-helpers\";\nimport { teamUrl } from \"@/utils/url-helpers\";\nimport { sortByDesc } from \"@/utils/sort-helpers\";\n\n/**\n * Components\n */\nimport GroupCard from \"@/components/_global/GroupCard.vue\";\n\n\n/**\n * API\n */\nimport compositionsAPI from \"@/api/compositions\";\nimport { GetOneCompositionGroupResponse } from \"@/api/compositions/get-one-composition-group.response\";\nimport { GetOneTeamResponse } from \"@/api/teams/get-one-team.response\";\nimport { Guid } from \"@/domain/guid\";\n\n/**\n * Types\n */\n\n/**\n * VueX Modules\n */\nconst teamModule = namespace(\"team\");\n\n\n/**\n * Compositions page.\n */\n@Component({\n\tcomponents: {\n\t\tGroupCard\n\t}\n})\nexport default class CompositionsPage extends Vue {\n\t/// Injections\n\tclasses = classes;\n\texternalLinks = externalLinks;\n\timageLinks = imageLinks;\n\tarmorTypes = armorTypes;\n\tgetElegantDateString = getElegantDateString;\n\n\tteamUrl = teamUrl;\n\n\t/// Props\n\n\n\t/// Attributes\n\tisLoading = false;\n\tcompositionGroup: GetOneCompositionGroupResponse | null = null;\n\n\t/// VueX Modules\n\t@teamModule.State(\"team\")\n\tcurrentTeam!: GetOneTeamResponse;\n\n\tget isEditing() {\n\t\treturn this.$route.fullPath.endsWith(\"edit\");\n\t}\n\n\tget canManageCompositions() {\n\t\treturn this.hasPermission(roles.MANAGE_COMPOSITIONS);\n\t}\n\n\tget canCopyAddonString() {\n\t\treturn this.hasFeaturePermission(features.DISCORD);\n\t}\n\n\tget isThereAnyCharacter() {\n\t\tif (this.compositionGroup == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.compositionGroup.compositions.some(x => x.characters.length > 0);\n\t}\n\n\t/// Methods\n\tasync fetchCurrentCompositionGroup() {\n\t\tawait this.fetchCompositionGroup(this.$route.params.id);\n\t}\n\n\tasync fetchCompositionGroup(id: Guid) {\n\t\tthis.compositionGroup = await compositionsAPI.fetchCompositionGroup(id, true, true);\n\t}\n\n\thandleCopyAddonStringClick() {\n\t\tif (this.compositionGroup != null) {\n\t\t\tconst addonString = this.compositionGroup.compositions.filter(x => x.characters.length > 0)\n\t\t\t\t.map((composition) => `${composition.name}@${composition.characters.sort(sortByDesc(x => x.role ?? \"\")).map(character => `${character.name}-${character.realm}|${character.role}`).join(\";\")}`).join(\"~\");\n\t\t\tnavigator.clipboard.writeText(addonString);\n\t\t\tthis.$snackbar.openInfo(this.$t(\"snackbar.copied_to_clipboard\"));\n\t\t}\n\t}\n\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!./CompositionsPage.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!./CompositionsPage.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CompositionsPage.vue?vue&type=template&id=1f1b0988&\"\nimport script from \"./CompositionsPage.vue?vue&type=script&lang=ts&\"\nexport * from \"./CompositionsPage.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';\ninstallComponents(component, {VBtn,VCol,VContainer,VIcon,VRow})\n","export const sortByAsc = (f: (x: T) => string | number) => {\n\treturn (a: T, b: T): number => {\n\t\tif (f(a) < f(b)) { return -1; }\n\t\tif (f(a) > f(b)) { return 1; }\n\t\treturn 0;\n\t};\n};\n\nexport const sortByDesc = (f: (x: T) => string | number) => {\n\treturn (a: T, b: T): number => {\n\t\tif (f(a) < f(b)) { return 1; }\n\t\tif (f(a) > f(b)) { return -1; }\n\t\treturn 0;\n\t};\n};","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export');\nvar $pad = require('./_string-pad');\nvar userAgent = require('./_user-agent');\n\n// https://github.com/zloirock/core-js/issues/280\nvar WEBKIT_BUG = /Version\\/10\\.\\d+(\\.\\d+)?( Mobile\\/\\w+)? Safari\\//.test(userAgent);\n\n$export($export.P + $export.F * WEBKIT_BUG, 'String', {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n"],"sourceRoot":""}