{"version":3,"sources":["webpack:///./src/components/admin/CharactersListPage.vue?c9d7","webpack:///./src/components/admin/CharactersListPage.vue","webpack:///./src/components/admin/CharactersListPage.vue?12ec","webpack:///./src/components/admin/CharactersListPage.vue?7400","webpack:///../../../src/components/VCheckbox/VCheckbox.ts","webpack:///../../../src/mixins/rippleable/index.ts","webpack:///../../../src/mixins/selectable/index.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","fetch","model","value","callback","$$v","searchField","expression","staticClass","displaySubscribedUsers","users","_v","_s","displayedUsers","length","subscribedUsers","_e","reduce","a","b","characters","pageCount","page","headers","isLoading","on","$event","scopedSlots","_u","key","fn","ref","item","_l","c","id","style","isArchived","classes","class","color","$vuetify","theme","dark","imageLinks","iconFaction","side","name","guildRank","region","toUpperCase","Date","createdAt","toLocaleDateString","getLocaleStringFromDateString","smartDisplayDays","differenceInDaysBetweenDates","now","updatedAt","premiumPlan","staticRenderFns","x","theDate","parse","computeConnectionTimesPerDay","connectionTimes","result","text","$t","align","sortable","push","filter","u","battleTag","includes","discord","find","guildName","map","meanConnectionTimesPerDay","toFixed","admin","getUsers","getSubscribedUsers","components","DataFetcher","StatCard","component","VAvatar","VCheckbox","VChip","VDataTable","VImg","VPagination","VTextField","props","indeterminate","indeterminateIcon","type","default","offIcon","onIcon","data","inputIndeterminate","computed","computedIcon","validationState","isDisabled","hasError","hasColor","watch","isActive","methods","genCheckbox","checkboxAttrs","setTextColor","dense","light","genInput","toString","genRipple","genDefaultSlot","directives","ripple","Boolean","center","e","mixins","prop","event","inputValue","falseValue","trueValue","multiple","label","String","lazyValue","computedColor","isDark","isMultiple","Array","input","undefined","valueComparator","isDirty","rippleState","genLabel","VInput","click","prevent","Object","disabled","role","domProps","checked","blur","change","focus","keydown","onBlur","onClick","onChange","onFocus","onKeydown"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG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UAKF0J,MAAOC,GAETvH,IAAK,WAGTiI,OApCO,WAqCLrK,KAAA,cAEFsK,QAvCO,SAuCA,GACLtK,KAAA,WACAA,KAAA,kBAEFuK,SA3CO,WA2CC,WACN,GAAKvK,KAAL,eAEA,IAAMQ,EAAQR,KAAd,MACImJ,EAAQnJ,KAAZ,cAEA,GAAIA,KAAJ,WAAqB,CACdkJ,MAAA,QAAL,KACEC,EAAA,IAGF,IAAMhI,EAASgI,EAAf,OAEAA,EAAQA,EAAA,QAAc,SAAA9G,GAAD,OAAgB,oBAArC,MAEI8G,EAAA,SAAJ,GACEA,EAAA,aAGFA,OAD4BC,IAAnBpJ,KAAK0I,gBAAT,IAAoC1I,KAAKyI,WACtCzI,KAAKqJ,gBAAgBF,EAAOnJ,KAA5B,WAA8CA,KAA9C,WAAgEA,KAAxE,UACSQ,EACDR,KAAKqJ,gBAAgBF,EAAO3I,GAAS,KAA7C,GAEA2I,EAGFnJ,KAAA,eACAA,KAAA,gBACAA,KAAA,aAEFwK,QAzEO,WA0ELxK,KAAA,cAGFyK,UA7EO,SA6EE","file":"dist/js/chunk-bdddefa2.d510773b.js","sourcesContent":["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}},[_c('div',[_c('v-text-field',{attrs:{\"label\":\"Search\",\"outlined\":\"\",\"hide-details\":\"\"},model:{value:(_vm.searchField),callback:function ($$v) {_vm.searchField=$$v},expression:\"searchField\"}}),_c('div',{staticClass:\"d-flex\"},[_c('v-checkbox',{attrs:{\"color\":\"primary\",\"label\":\"Display subscribed users\",\"hide-details\":\"\"},model:{value:(_vm.displaySubscribedUsers),callback:function ($$v) {_vm.displaySubscribedUsers=$$v},expression:\"displaySubscribedUsers\"}})],1),(_vm.users != null)?_c('div',{staticClass:\"d-flex flex-wrap gap-x-6 gap-y-3 mt-3\"},[_c('stat-card',{attrs:{\"title\":\"Users\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.displayedUsers.length)+\"\\n\\t\\t\\t\")]),(_vm.subscribedUsers)?_c('stat-card',{attrs:{\"title\":\"Subscribed Users\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.subscribedUsers.length)+\"\\n\\t\\t\\t\")]):_vm._e(),_c('stat-card',{attrs:{\"title\":\"Characters linked to users\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.displayedUsers.reduce(function (a, b) { return a + b.characters.length; }, 0))+\"\\n\\t\\t\\t\")])],1):_vm._e(),_c('div',{staticClass:\"text-center pb-2 mt-3\"},[_c('v-pagination',{attrs:{\"length\":_vm.pageCount,\"total-visible\":11},model:{value:(_vm.page),callback:function ($$v) {_vm.page=$$v},expression:\"page\"}})],1),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.displayedUsers,\"loading\":_vm.isLoading,\"page\":_vm.page,\"items-per-page\":20,\"mobile-breakpoint\":0,\"dense\":\"\",\"sort-by\":\"createdAt\",\"sort-desc\":\"\",\"hide-default-footer\":\"\"},on:{\"update:page\":function($event){_vm.page=$event},\"page-count\":function($event){_vm.pageCount = $event}},scopedSlots:_vm._u([{key:\"item.characters\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._l((item.characters),function(c){return [_c('v-chip',{key:c.id,style:({'width':'100%', 'text-decoration-line': c.isArchived ? 'line-through' : 'none'}),attrs:{\"color\":_vm.classes[c.class].color,\"outlined\":_vm.$vuetify.theme.dark,\"label\":\"\"}},[_c('v-avatar',{attrs:{\"left\":\"\"}},[_c('v-img',{attrs:{\"src\":_vm.imageLinks.iconFaction(c.side)}})],1),_vm._v(\"\\n\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(c.name)+\"\\n\\t\\t\\t\\t\\t\\t\"),(c.guildName)?_c('span',[_vm._v(_vm._s((\" <\" + (c.guildName) + \">\")))]):_vm._e(),(c.guildRank != null)?_c('span',[_vm._v(_vm._s((\" (\" + (c.guildRank) + \")\")))]):_vm._e(),(c.realm)?_c('span',[_vm._v(_vm._s((\" - (\" + (c.region.toUpperCase()) + \") \" + (c.realm))))]):_vm._e()],1),_c('br',{key:c.id})]})]}},{key:\"item.createdAt\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('span',{class:{'font-weight-bold':((new Date(item.createdAt)).toLocaleDateString() === (new Date()).toLocaleDateString())}},[_vm._v(_vm._s(_vm.getLocaleStringFromDateString(item.createdAt))),_c('br'),_vm._v(\"\\n\\t\\t\\t\\t\\t(\"+_vm._s(_vm.smartDisplayDays(_vm.differenceInDaysBetweenDates(new Date(item.createdAt), _vm.now)))+\")\")])]}},{key:\"item.updatedAt\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('span',{class:{'font-weight-bold':((new Date(item.updatedAt)).toLocaleDateString() === (new Date()).toLocaleDateString())}},[_vm._v(_vm._s(_vm.getLocaleStringFromDateString(item.updatedAt))),_c('br'),_vm._v(\"\\n\\t\\t\\t\\t\\t(\"+_vm._s(_vm.smartDisplayDays(_vm.differenceInDaysBetweenDates(new Date(item.updatedAt), _vm.now)))+\")\")])]}},{key:\"item.premiumPlan\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(item.premiumPlan)+\"\\n\\t\\t\\t\")]}}])})],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\nimport { Component, Vue } from \"vue-property-decorator\";\n\n\n/**\n * Utils\n */\nimport classes from \"@/config/wow/classes\";\nimport * as imageLinks from \"@/config/image-links\";\nimport { getLocaleStringFromDateString, differenceInDaysBetweenDates, getMaxDate, smartDisplayDays } from \"@/utils/date-helpers\";\n\n\nconst computeDurationFromRegistration = (x: any) => {\n\tconst theDate = new Date(\"10/16/2017\");\n\treturn differenceInDaysBetweenDates(getMaxDate([new Date(Date.parse(x.createdAt)), theDate]), new Date());\n};\nconst computeConnectionTimesPerDay = (x: any) => {\n\treturn x.connectionTimes / computeDurationFromRegistration(x);\n};\n\n/**\n * Components\n */\n\n/**\n * API\n */\nimport adminAPI from \"@/api/admin\";\nimport { normalizeString } from \"@/utils/string-helpers\";\nimport StatCard from \"@/components/admin/components/StatCard.vue\";\nimport DataFetcher from \"@/components/_global/DataFetcher.vue\";\n\n/**\n * Types\n */\n\n\n/**\n * VueX Modules\n */\n\n/**\n * Admin characters list page.\n */\n@Component({\n\tcomponents: {\n\t\tDataFetcher,\n\t\tStatCard\n\t}\n})\nexport default class CharactersListPage extends Vue {\n\t/// Injections\n\tclasses = classes;\n\tgetLocaleStringFromDateString = getLocaleStringFromDateString;\n\tdifferenceInDaysBetweenDates = differenceInDaysBetweenDates;\n\tsmartDisplayDays = smartDisplayDays;\n\timageLinks = imageLinks;\n\n\t/// Attributes\n\tnow = new Date();\n\tisLoading = false;\n\n\t// Filters\n\tsearchField = \"\";\n\tdisplaySubscribedUsers = false;\n\n\t// Pagination\n\tpage = 1;\n\tpageCount = 0;\n\t// Table\n\tusers: any[] | null = null;\n\tsubscribedUsers: any[] | null = null;\n\n\tget headers() {\n\t\tconst result = [\n\t\t\t{\n\t\t\t\ttext: this.$t(\"user.battle_tag\"),\n\t\t\t\tvalue: \"battleTag\",\n\t\t\t\talign: \"left\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: this.$t(\"user.characters\"),\n\t\t\t\tvalue: \"characters\",\n\t\t\t\talign: \"left\",\n\t\t\t\tsortable: false\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: this.$t(\"user.created_at\"),\n\t\t\t\tvalue: \"createdAt\",\n\t\t\t\talign: \"left\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: this.$t(\"user.updated_at\"),\n\t\t\t\tvalue: \"updatedAt\",\n\t\t\t\talign: \"left\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: this.$t(\"user.connection_times\"),\n\t\t\t\tvalue: \"connectionTimes\",\n\t\t\t\talign: \"left\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: this.$t(\"user.mean_connection_times_per_day\"),\n\t\t\t\tvalue: \"meanConnectionTimesPerDay\",\n\t\t\t\talign: \"left\"\n\t\t\t}];\n\n\t\tif (this.displaySubscribedUsers) {\n\t\t\tresult.push({\n\t\t\t\ttext: this.$t(\"user.premium_plan\"),\n\t\t\t\tvalue: \"premiumPlan\",\n\t\t\t\talign: \"left\"\n\t\t\t});\n\t\t}\n\n\t\tresult.push({\n\t\t\ttext: this.$t(\"user.discord\"),\n\t\t\tvalue: \"discord\",\n\t\t\talign: \"left\"\n\t\t});\n\n\t\treturn result;\n\t}\n\n\tget displayedUsers() {\n\t\tconst users = this.displaySubscribedUsers ? this.subscribedUsers : this.users;\n\t\tif (users == null) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst searchField = normalizeString(this.searchField);\n\t\treturn users\n\t\t\t.filter(u =>\n\t\t\t\tu.battleTag && normalizeString(u.battleTag).includes(searchField)\n\t\t\t\t|| u.discord && normalizeString(u.discord).includes(searchField)\n\t\t\t\t|| u.characters.find((c: any) => c.name && normalizeString(c.name).includes(searchField)) != null\n\t\t\t\t|| u.characters.find((c: any) => c.guildName && normalizeString(c.guildName).includes(searchField)) != null)\n\t\t\t.map(u => ({\n\t\t\t\t...u,\n\t\t\t\tcharacters: u.characters,\n\t\t\t\tmeanConnectionTimesPerDay: computeConnectionTimesPerDay(u).toFixed(2)\n\t\t\t}));\n\t}\n\n\t/// Methods\n\tasync created() {\n\t}\n\n\tasync fetch() {\n\t\tthis.users = await adminAPI.getUsers();\n\t\tthis.subscribedUsers = await adminAPI.getSubscribedUsers();\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!./CharactersListPage.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!./CharactersListPage.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CharactersListPage.vue?vue&type=template&id=61dd2b4b&\"\nimport script from \"./CharactersListPage.vue?vue&type=script&lang=ts&\"\nexport * from \"./CharactersListPage.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 { VAvatar } from 'vuetify/lib/components/VAvatar';\nimport { VCheckbox } from 'vuetify/lib/components/VCheckbox';\nimport { VChip } from 'vuetify/lib/components/VChip';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VImg } from 'vuetify/lib/components/VImg';\nimport { VPagination } from 'vuetify/lib/components/VPagination';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VAvatar,VCheckbox,VChip,VDataTable,VImg,VPagination,VTextField})\n","// Styles\nimport './VCheckbox.sass'\nimport '../../styles/components/_selection-controls.sass'\n\n// Components\nimport VIcon from '../VIcon'\nimport VInput from '../VInput'\n\n// Mixins\nimport Selectable from '../../mixins/selectable'\n\n/* @vue/component */\nexport default Selectable.extend({\n name: 'v-checkbox',\n\n props: {\n indeterminate: Boolean,\n indeterminateIcon: {\n type: String,\n default: '$checkboxIndeterminate',\n },\n offIcon: {\n type: String,\n default: '$checkboxOff',\n },\n onIcon: {\n type: String,\n default: '$checkboxOn',\n },\n },\n\n data () {\n return {\n inputIndeterminate: this.indeterminate,\n }\n },\n\n computed: {\n classes (): object {\n return {\n ...VInput.options.computed.classes.call(this),\n 'v-input--selection-controls': true,\n 'v-input--checkbox': true,\n 'v-input--indeterminate': this.inputIndeterminate,\n }\n },\n computedIcon (): string {\n if (this.inputIndeterminate) {\n return this.indeterminateIcon\n } else if (this.isActive) {\n return this.onIcon\n } else {\n return this.offIcon\n }\n },\n // Do not return undefined if disabled,\n // according to spec, should still show\n // a color when disabled and active\n validationState (): string | undefined {\n if (this.isDisabled && !this.inputIndeterminate) return undefined\n if (this.hasError && this.shouldValidate) return 'error'\n if (this.hasSuccess) return 'success'\n if (this.hasColor !== null) return this.computedColor\n return undefined\n },\n },\n\n watch: {\n indeterminate (val) {\n // https://github.com/vuetifyjs/vuetify/issues/8270\n this.$nextTick(() => (this.inputIndeterminate = val))\n },\n inputIndeterminate (val) {\n this.$emit('update:indeterminate', val)\n },\n isActive () {\n if (!this.indeterminate) return\n this.inputIndeterminate = false\n },\n },\n\n methods: {\n genCheckbox () {\n const { title, ...checkboxAttrs } = this.attrs$\n return this.$createElement('div', {\n staticClass: 'v-input--selection-controls__input',\n }, [\n this.$createElement(VIcon, this.setTextColor(this.validationState, {\n props: {\n dense: this.dense,\n dark: this.dark,\n light: this.light,\n },\n }), this.computedIcon),\n this.genInput('checkbox', {\n ...checkboxAttrs,\n 'aria-checked': this.inputIndeterminate\n ? 'mixed'\n : this.isActive.toString(),\n }),\n this.genRipple(this.setTextColor(this.rippleState)),\n ])\n },\n genDefaultSlot () {\n return [\n this.genCheckbox(),\n this.genLabel(),\n ]\n },\n },\n})\n","// Directives\nimport ripple from '../../directives/ripple'\n\n// Types\nimport Vue, { VNode, VNodeData, VNodeDirective } from 'vue'\n\nexport default Vue.extend({\n name: 'rippleable',\n\n directives: { ripple },\n\n props: {\n ripple: {\n type: [Boolean, Object],\n default: true,\n },\n },\n\n methods: {\n genRipple (data: VNodeData = {}): VNode | null {\n if (!this.ripple) return null\n\n data.staticClass = 'v-input--selection-controls__ripple'\n\n data.directives = data.directives || []\n data.directives.push({\n name: 'ripple',\n value: { center: true },\n } as VNodeDirective)\n\n return this.$createElement('div', data)\n },\n },\n})\n","// Components\nimport VInput from '../../components/VInput'\n\n// Mixins\nimport Rippleable from '../rippleable'\nimport Comparable from '../comparable'\n\n// Utilities\nimport mixins from '../../util/mixins'\n\nexport function prevent (e: Event) {\n e.preventDefault()\n}\n\n/* @vue/component */\nexport default mixins(\n VInput,\n Rippleable,\n Comparable\n).extend({\n name: 'selectable',\n\n model: {\n prop: 'inputValue',\n event: 'change',\n },\n\n props: {\n id: String,\n inputValue: null as any,\n falseValue: null as any,\n trueValue: null as any,\n multiple: {\n type: Boolean,\n default: null,\n },\n label: String,\n },\n\n data () {\n return {\n hasColor: this.inputValue,\n lazyValue: this.inputValue,\n }\n },\n\n computed: {\n computedColor (): string | undefined {\n if (!this.isActive) return undefined\n if (this.color) return this.color\n if (this.isDark && !this.appIsDark) return 'white'\n return 'primary'\n },\n isMultiple (): boolean {\n return this.multiple === true || (this.multiple === null && Array.isArray(this.internalValue))\n },\n isActive (): boolean {\n const value = this.value\n const input = this.internalValue\n\n if (this.isMultiple) {\n if (!Array.isArray(input)) return false\n\n return input.some(item => this.valueComparator(item, value))\n }\n\n if (this.trueValue === undefined || this.falseValue === undefined) {\n return value\n ? this.valueComparator(value, input)\n : Boolean(input)\n }\n\n return this.valueComparator(input, this.trueValue)\n },\n isDirty (): boolean {\n return this.isActive\n },\n rippleState (): string | undefined {\n return !this.isDisabled && !this.validationState\n ? undefined\n : this.validationState\n },\n },\n\n watch: {\n inputValue (val) {\n this.lazyValue = val\n this.hasColor = val\n },\n },\n\n methods: {\n genLabel () {\n const label = VInput.options.methods.genLabel.call(this)\n\n if (!label) return label\n\n label!.data!.on = {\n // Label shouldn't cause the input to focus\n click: prevent,\n }\n\n return label\n },\n genInput (type: string, attrs: object) {\n return this.$createElement('input', {\n attrs: Object.assign({\n 'aria-checked': this.isActive.toString(),\n disabled: this.isDisabled,\n id: this.computedId,\n role: type,\n type,\n }, attrs),\n domProps: {\n value: this.value,\n checked: this.isActive,\n },\n on: {\n blur: this.onBlur,\n change: this.onChange,\n focus: this.onFocus,\n keydown: this.onKeydown,\n click: prevent,\n },\n ref: 'input',\n })\n },\n onBlur () {\n this.isFocused = false\n },\n onClick (e: Event) {\n this.onChange()\n this.$emit('click', e)\n },\n onChange () {\n if (!this.isInteractive) return\n\n const value = this.value\n let input = this.internalValue\n\n if (this.isMultiple) {\n if (!Array.isArray(input)) {\n input = []\n }\n\n const length = input.length\n\n input = input.filter((item: any) => !this.valueComparator(item, value))\n\n if (input.length === length) {\n input.push(value)\n }\n } else if (this.trueValue !== undefined && this.falseValue !== undefined) {\n input = this.valueComparator(input, this.trueValue) ? this.falseValue : this.trueValue\n } else if (value) {\n input = this.valueComparator(input, value) ? null : value\n } else {\n input = !input\n }\n\n this.validate(true, input)\n this.internalValue = input\n this.hasColor = input\n },\n onFocus () {\n this.isFocused = true\n },\n /** @abstract */\n onKeydown (e: Event) {},\n },\n})\n"],"sourceRoot":""}