Merge branch 'issue/1936' into 'develop'
[akkoma] / priv / static / adminfe / static / js / chunk-7c6b.7c4844a9.js.map
1 {"version":3,"sources":["webpack:///./src/views/invites/index.vue?3e9a","webpack:///./src/views/invites/index.vue?b523","webpack:///src/views/invites/index.vue","webpack:///./src/views/invites/index.vue","webpack:///./src/views/invites/index.vue?0fc1"],"names":["views_invitesvue_type_script_lang_js_","components","RebootButton","data","rules","email","validator","this","validateEmail","trigger","newTokenForm","maxUse","expiresAt","inviteUserForm","name","createTokenDialogVisible","inviteUserDialogVisible","computed","objectSpread_default","Object","vuex_esm","getLabelWidth","isDesktop","inviteLink","concat","utils","authHost","newToken","token","$store","state","app","device","loading","invites","tokens","inviteTokens","mounted","dispatch","methods","closeDialogWindow","$data","createToken","inviteUserViaEmail","_inviteUserViaEmail","asyncToGenerator_default","regenerator_default","a","mark","_callee2","_this","wrap","_context2","prev","next","$refs","validate","_ref","_callee","valid","_context","$message","type","message","$t","abrupt","stop","_x","apply","arguments","revokeInviteToken","rule","value","callback","Error","validEmail","test","component","componentNormalizer","_vm","_h","$createElement","_c","_self","staticClass","_v","_s","on","click","$event","attrs","visible","show-close","title","custom-class","update:visible","ref","model","label-width","status-icon","label","min","size","$$v","$set","expression","placeholder","value-format","slot","href","underline","target","_e","prop","autofocus","directives","rawName","default-sort","order","min-width","sortable","align","header-align","scopedSlots","_u","key","fn","scope","row","used","disable-transitions","nativeOn","options","__file","__webpack_exports__","_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_index_js_ref_11_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_lib_index_js_ref_11_2_node_modules_sass_loader_lib_loader_js_ref_11_3_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_rel_stylesheet_2Fscss_lang_scss___WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","n"],"mappings":"6GAAA,uGCA0MA,GCmK1MC,YAAAC,eAAA,GACAC,KAFA,WAGA,OACAC,OAC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GAAA,KAAAH,EAAA,mBAAoCQ,OAAOU,MAAArB,EAAAf,GAAA,mBAAAuD,YAAAxC,EAAAzD,UAAA,OAAAmG,MAAA,SAAAC,eAAA,UAAgHC,YAAA5C,EAAA6C,KAAsBC,IAAA,UAAAC,GAAA,SAAAC,GAAiC,OAAA7C,EAAA,aAAwBQ,OAAO5B,KAAA,OAAAwC,KAAA,SAA6B6B,UAAW3C,MAAA,SAAAC,GAAyB,OAAAV,EAAAT,kBAAAyD,EAAAC,IAAApG,WAAgDmD,EAAAM,GAAA,eAAAN,EAAAO,GAAAP,EAAAf,GAAA,2CAA8E,YGY/0M,EACA,KACA,KACA,MAIAa,EAAAuD,QAAAC,OAAA,YACeC,EAAA,QAAAzD,6CCpBf,IAAA0D,EAAAC,EAAA,QAAAA,EAAAC,EAAAF,GAAud","file":"static/js/chunk-7c6b.7c4844a9.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"invites-container\"},[_c('div',{staticClass:\"invites-header-container\"},[_c('h1',[_vm._v(_vm._s(_vm.$t('invites.inviteTokens')))]),_vm._v(\" \"),_c('reboot-button')],1),_vm._v(\" \"),_c('div',{staticClass:\"actions-container\"},[_c('el-button',{staticClass:\"create-invite-token\",on:{\"click\":function($event){_vm.createTokenDialogVisible = true}}},[_c('span',[_c('i',{staticClass:\"icon el-icon-plus\"}),_vm._v(\"\\n \"+_vm._s(_vm.$t('invites.createInviteToken'))+\"\\n \")])]),_vm._v(\" \"),_c('el-button',{staticClass:\"invite-via-email\",on:{\"click\":function($event){_vm.inviteUserDialogVisible = true}}},[_c('span',[_c('i',{staticClass:\"icon el-icon-message\"}),_vm._v(\"\\n \"+_vm._s(_vm.$t('invites.inviteUserViaEmail'))+\"\\n \")])])],1),_vm._v(\" \"),_c('el-dialog',{attrs:{\"visible\":_vm.createTokenDialogVisible,\"show-close\":false,\"title\":_vm.$t('invites.createInviteToken'),\"custom-class\":\"create-new-token-dialog\"},on:{\"update:visible\":function($event){_vm.createTokenDialogVisible=$event}}},[_c('el-form',{ref:\"newTokenForm\",attrs:{\"model\":_vm.newTokenForm,\"label-width\":_vm.getLabelWidth,\"status-icon\":\"\"}},[_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.maxUse')}},[_c('el-input-number',{attrs:{\"min\":0,\"size\":_vm.isDesktop ? 'medium' : 'small',\"name\":\"maxUse\"},model:{value:(_vm.newTokenForm.maxUse),callback:function ($$v) {_vm.$set(_vm.newTokenForm, \"maxUse\", $$v)},expression:\"newTokenForm.maxUse\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.expiresAt')}},[_c('el-date-picker',{staticClass:\"pick-date\",attrs:{\"placeholder\":_vm.$t('invites.pickDate'),\"type\":\"date\",\"name\":\"date\",\"value-format\":\"yyyy-MM-dd\"},model:{value:(_vm.newTokenForm.expiresAt),callback:function ($$v) {_vm.$set(_vm.newTokenForm, \"expiresAt\", $$v)},expression:\"newTokenForm.expiresAt\"}})],1)],1),_vm._v(\" \"),_c('span',{attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{staticClass:\"invites-close-dialog\",on:{\"click\":_vm.closeDialogWindow}},[_vm._v(_vm._s(_vm.$t('invites.cancel')))]),_vm._v(\" \"),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.createToken}},[_vm._v(_vm._s(_vm.$t('invites.create')))])],1),_vm._v(\" \"),('token' in _vm.newToken)?_c('el-card',[_c('div',{staticClass:\"clearfix\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('span',[_vm._v(_vm._s(_vm.$t('invites.tokenCreated')))])]),_vm._v(\" \"),_c('el-form',{staticClass:\"new-token-card\",attrs:{\"label-width\":\"85px\"}},[_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.inviteLink')}},[_c('el-link',{attrs:{\"href\":_vm.inviteLink,\"underline\":false,\"target\":\"_blank\"}},[_vm._v(\"\\n \"+_vm._s(_vm.inviteLink)+\"\\n \")])],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.token')}},[_vm._v(\"\\n \"+_vm._s(_vm.newToken.token)+\"\\n \")]),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.maxUse')}},[_vm._v(\"\\n \"+_vm._s(_vm.newToken.maxUse)+\"\\n \")]),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.expiresAt')}},[_vm._v(\"\\n \"+_vm._s(_vm.newToken.expiresAt || '(not set)')+\"\\n \")])],1)],1):_vm._e()],1),_vm._v(\" \"),_c('el-dialog',{attrs:{\"visible\":_vm.inviteUserDialogVisible,\"show-close\":false,\"title\":_vm.$t('invites.sendRegistration'),\"custom-class\":\"invite-via-email-dialog\"},on:{\"update:visible\":function($event){_vm.inviteUserDialogVisible=$event}}},[_c('div',[_c('p',{staticClass:\"info\"},[_vm._v(_vm._s(_vm.$t('invites.inviteViaEmailAlert')))]),_vm._v(\" \"),_c('el-form',{ref:\"inviteUserForm\",attrs:{\"model\":_vm.inviteUserForm,\"rules\":_vm.rules,\"label-width\":_vm.getLabelWidth,\"status-icon\":\"\"}},[_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.email'),\"prop\":\"email\"}},[_c('el-input',{attrs:{\"name\":\"email\",\"type\":\"email\",\"autofocus\":\"\"},model:{value:(_vm.inviteUserForm.email),callback:function ($$v) {_vm.$set(_vm.inviteUserForm, \"email\", $$v)},expression:\"inviteUserForm.email\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":_vm.$t('invites.name'),\"prop\":\"name\"}},[_c('el-input',{attrs:{\"name\":\"name\"},model:{value:(_vm.inviteUserForm.name),callback:function ($$v) {_vm.$set(_vm.inviteUserForm, \"name\", $$v)},expression:\"inviteUserForm.name\"}})],1)],1)],1),_vm._v(\" \"),_c('span',{attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":_vm.closeDialogWindow}},[_vm._v(_vm._s(_vm.$t('invites.cancel')))]),_vm._v(\" \"),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.inviteUserViaEmail}},[_vm._v(_vm._s(_vm.$t('invites.create')))])],1)]),_vm._v(\" \"),_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"invite-token-table\",attrs:{\"data\":_vm.tokens,\"default-sort\":{prop: 'used', order: 'ascending'}}},[(_vm.isDesktop)?_c('el-table-column',{attrs:{\"label\":_vm.$t('invites.id'),\"min-width\":\"60\",\"prop\":\"id\",\"sortable\":\"\"}}):_vm._e(),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":_vm.$t('invites.token'),\"min-width\":_vm.isDesktop ? 320 : 120,\"prop\":\"token\"}}),_vm._v(\" \"),(_vm.isDesktop)?_c('el-table-column',{attrs:{\"label\":_vm.$t('invites.expiresAt'),\"align\":\"center\",\"header-align\":\"center\",\"min-width\":\"110\",\"prop\":\"expires_at\",\"sortable\":\"\"}}):_vm._e(),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":_vm.$t('invites.maxUse'),\"align\":\"center\",\"header-align\":\"center\",\"min-width\":\"60\",\"prop\":\"max_use\",\"sortable\":\"\"}}),_vm._v(\" \"),(_vm.isDesktop)?_c('el-table-column',{attrs:{\"label\":_vm.$t('invites.uses'),\"align\":\"center\",\"header-align\":\"center\",\"min-width\":\"60\",\"prop\":\"uses\"}}):_vm._e(),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":_vm.$t('invites.used'),\"min-width\":_vm.isDesktop ? 60 : 50,\"align\":\"center\",\"header-align\":\"center\",\"prop\":\"used\",\"sortable\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-tag',{attrs:{\"type\":scope.row.used ? 'danger' : 'success',\"disable-transitions\":\"\"}},[_vm._v(\"\\n \"+_vm._s(scope.row.used ? _vm.$t('invites.used') : _vm.$t('invites.active'))+\"\\n \")])]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":_vm.$t('invites.actions'),\"min-width\":_vm.isDesktop ? 100 : 50,\"align\":\"center\",\"header-align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},nativeOn:{\"click\":function($event){return _vm.revokeInviteToken(scope.row.token)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('invites.revoke'))+\"\\n \")])]}}])})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js?cacheDirectory!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js?cacheDirectory!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","<template>\n <div class=\"invites-container\">\n <div class=\"invites-header-container\">\n <h1>{{ $t('invites.inviteTokens') }}</h1>\n <reboot-button/>\n </div>\n <div class=\"actions-container\">\n <el-button class=\"create-invite-token\" @click=\"createTokenDialogVisible = true\">\n <span>\n <i class=\"icon el-icon-plus\"/>\n {{ $t('invites.createInviteToken') }}\n </span>\n </el-button>\n <el-button class=\"invite-via-email\" @click=\"inviteUserDialogVisible = true\">\n <span>\n <i class=\"icon el-icon-message\"/>\n {{ $t('invites.inviteUserViaEmail') }}\n </span>\n </el-button>\n </div>\n <el-dialog\n :visible.sync=\"createTokenDialogVisible\"\n :show-close=\"false\"\n :title=\"$t('invites.createInviteToken')\"\n custom-class=\"create-new-token-dialog\">\n <el-form ref=\"newTokenForm\" :model=\"newTokenForm\" :label-width=\"getLabelWidth\" status-icon>\n <el-form-item :label=\"$t('invites.maxUse')\">\n <el-input-number\n v-model=\"newTokenForm.maxUse\"\n :min=\"0\"\n :size=\"isDesktop ? 'medium' : 'small'\"\n name=\"maxUse\"/>\n </el-form-item>\n <el-form-item :label=\"$t('invites.expiresAt')\">\n <el-date-picker\n v-model=\"newTokenForm.expiresAt\"\n :placeholder=\"$t('invites.pickDate')\"\n class=\"pick-date\"\n type=\"date\"\n name=\"date\"\n value-format=\"yyyy-MM-dd\"/>\n </el-form-item>\n </el-form>\n <span slot=\"footer\">\n <el-button class=\"invites-close-dialog\" @click=\"closeDialogWindow\">{{ $t('invites.cancel') }}</el-button>\n <el-button type=\"primary\" @click=\"createToken\">{{ $t('invites.create') }}</el-button>\n </span>\n <el-card v-if=\"'token' in newToken\">\n <div slot=\"header\" class=\"clearfix\">\n <span>{{ $t('invites.tokenCreated') }}</span>\n </div>\n <el-form label-width=\"85px\" class=\"new-token-card\">\n <el-form-item :label=\"$t('invites.inviteLink')\">\n <el-link :href=\"inviteLink\" :underline=\"false\" target=\"_blank\">\n {{ inviteLink }}\n </el-link>\n </el-form-item>\n <el-form-item :label=\"$t('invites.token')\">\n {{ newToken.token }}\n </el-form-item>\n <el-form-item :label=\"$t('invites.maxUse')\">\n {{ newToken.maxUse }}\n </el-form-item>\n <el-form-item :label=\"$t('invites.expiresAt')\">\n {{ newToken.expiresAt || '(not set)' }}\n </el-form-item>\n </el-form>\n </el-card>\n </el-dialog>\n <el-dialog\n :visible.sync=\"inviteUserDialogVisible\"\n :show-close=\"false\"\n :title=\"$t('invites.sendRegistration')\"\n custom-class=\"invite-via-email-dialog\">\n <div>\n <p class=\"info\">{{ $t('invites.inviteViaEmailAlert') }}</p>\n <el-form ref=\"inviteUserForm\" :model=\"inviteUserForm\" :rules=\"rules\" :label-width=\"getLabelWidth\" status-icon>\n <el-form-item :label=\"$t('invites.email')\" prop=\"email\">\n <el-input v-model=\"inviteUserForm.email\" name=\"email\" type=\"email\" autofocus/>\n </el-form-item>\n <el-form-item :label=\"$t('invites.name')\" prop=\"name\">\n <el-input v-model=\"inviteUserForm.name\" name=\"name\"/>\n </el-form-item>\n </el-form>\n </div>\n <span slot=\"footer\">\n <el-button @click=\"closeDialogWindow\">{{ $t('invites.cancel') }}</el-button>\n <el-button type=\"primary\" @click=\"inviteUserViaEmail\">{{ $t('invites.create') }}</el-button>\n </span>\n </el-dialog>\n <el-table\n v-loading=\"loading\"\n :data=\"tokens\"\n :default-sort = \"{prop: 'used', order: 'ascending'}\"\n class=\"invite-token-table\">\n <el-table-column\n v-if=\"isDesktop\"\n :label=\"$t('invites.id')\"\n min-width=\"60\"\n prop=\"id\"\n sortable/>\n <el-table-column\n :label=\"$t('invites.token')\"\n :min-width=\"isDesktop ? 320 : 120\"\n prop=\"token\"/>\n <el-table-column\n v-if=\"isDesktop\"\n :label=\"$t('invites.expiresAt')\"\n align=\"center\"\n header-align=\"center\"\n min-width=\"110\"\n prop=\"expires_at\"\n sortable/>\n <el-table-column\n :label=\"$t('invites.maxUse')\"\n align=\"center\"\n header-align=\"center\"\n min-width=\"60\"\n prop=\"max_use\"\n sortable/>\n <el-table-column\n v-if=\"isDesktop\"\n :label=\"$t('invites.uses')\"\n align=\"center\"\n header-align=\"center\"\n min-width=\"60\"\n prop=\"uses\"/>\n <el-table-column\n :label=\"$t('invites.used')\"\n :min-width=\"isDesktop ? 60 : 50\"\n align=\"center\"\n header-align=\"center\"\n prop=\"used\"\n sortable>\n <template slot-scope=\"scope\">\n <el-tag\n :type=\"scope.row.used ? 'danger' : 'success'\"\n disable-transitions>\n {{ scope.row.used ? $t('invites.used') : $t('invites.active') }}\n </el-tag>\n </template>\n </el-table-column>\n <el-table-column\n :label=\"$t('invites.actions')\"\n :min-width=\"isDesktop ? 100 : 50\"\n align=\"center\"\n header-align=\"center\">\n <template slot-scope=\"scope\">\n <el-button type=\"text\" size=\"small\" @click.native=\"revokeInviteToken(scope.row.token)\">\n {{ $t('invites.revoke') }}\n </el-button>\n </template>\n </el-table-column>\n </el-table>\n </div>\n</template>\n\n<script>\nimport RebootButton from '@/components/RebootButton'\nimport { mapGetters } from 'vuex'\nimport { baseName } from '@/api/utils'\n\nexport default {\n components: { RebootButton },\n data() {\n return {\n rules: {\n email: [\n { validator: this.validateEmail, trigger: 'blur' }\n ]\n },\n newTokenForm: {\n maxUse: 1,\n expiresAt: ''\n },\n inviteUserForm: {\n email: '',\n name: ''\n },\n createTokenDialogVisible: false,\n inviteUserDialogVisible: false\n }\n },\n computed: {\n ...mapGetters([\n 'authHost'\n ]),\n getLabelWidth() {\n return this.isDesktop ? '100px' : '85px'\n },\n inviteLink() {\n return `${baseName(this.authHost)}/registration/${this.newToken.token}`\n },\n isDesktop() {\n return this.$store.state.app.device === 'desktop'\n },\n loading() {\n return this.$store.state.invites.loading\n },\n newToken() {\n return this.$store.state.invites.newToken\n },\n tokens() {\n return this.$store.state.invites.inviteTokens\n }\n },\n mounted() {\n this.$store.dispatch('GetNodeInfo')\n this.$store.dispatch('NeedReboot')\n this.$store.dispatch('FetchInviteTokens')\n },\n methods: {\n closeDialogWindow() {\n this.inviteUserDialogVisible = false\n this.createTokenDialogVisible = false\n this.$store.dispatch('RemoveNewToken')\n this.$data.inviteUserForm.email = ''\n this.$data.inviteUserForm.name = ''\n },\n createToken() {\n this.$store.dispatch('GenerateInviteToken', this.$data.newTokenForm)\n },\n async inviteUserViaEmail() {\n this.$refs['inviteUserForm'].validate(async(valid) => {\n if (valid) {\n await this.$store.dispatch('InviteUserViaEmail', this.$data.inviteUserForm)\n this.closeDialogWindow()\n } else {\n this.$message({\n type: 'error',\n message: this.$t('invites.submitFormError')\n })\n return false\n }\n })\n },\n revokeInviteToken(token) {\n this.$store.dispatch('RevokeToken', token)\n },\n validateEmail(rule, value, callback) {\n if (value === '') {\n return callback(new Error(this.$t('invites.emptyEmailError')))\n } else if (!this.validEmail(value)) {\n return callback(new Error(this.$t('invites.invalidEmailError')))\n } else {\n return callback()\n }\n },\n validEmail(email) {\n const re = /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/\n return re.test(email)\n }\n }\n}\n</script>\n\n<style rel='stylesheet/scss' lang='scss'>\n.invites-container {\n .actions-container {\n display: flex;\n height: 36px;\n justify-content: space-between;\n align-items: center;\n margin: 15px 15px 15px 15px;\n }\n .create-invite-token {\n text-align: left;\n width: 350px;\n padding: 10px;\n }\n .create-new-token-dialog {\n width: 50%;\n a {\n margin-bottom: 3px;\n }\n .el-card__body {\n padding: 10px 20px;\n }\n }\n .el-dialog__body {\n padding: 5px 20px 0 20px\n }\n h1 {\n margin: 0;\n }\n .icon {\n margin-right: 5px;\n }\n .invite-token-table {\n width: 100%;\n margin: 0 15px;\n }\n .invite-via-email {\n text-align: left;\n width: 350px;\n padding: 10px;\n }\n .invite-via-email-dialog {\n width: 50%\n }\n .invites-header-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 10px 15px;\n }\n .info {\n color: #666666;\n font-size: 13px;\n line-height: 22px;\n margin: 0 0 10px 0;\n }\n .new-token-card {\n .el-form-item {\n margin: 0;\n }\n }\n .reboot-button {\n padding: 10px;\n margin: 0;\n width: 145px;\n }\n}\n\n@media only screen and (max-width:480px) {\n .invites-container {\n .actions-container {\n display: flex;\n height: 82px;\n flex-direction: column;\n align-items: center;\n margin: 15px 10px 7px 10px;\n }\n .cell {\n padding: 0;\n }\n .create-invite-token {\n width: 100%;\n }\n .create-new-token-dialog {\n width: 85%\n }\n .el-date-editor {\n width: 150px;\n }\n .el-dialog__body {\n padding: 5px 15px 0 15px\n }\n h1 {\n margin: 0;\n }\n .invite-token-table {\n width: 100%;\n margin: 0 5px;\n font-size: 12px;\n font-weight: 500;\n }\n .invite-via-email {\n width: 100%;\n margin: 10px 0 0 0;\n }\n .invite-via-email-dialog {\n width: 85%\n }\n .invites-header-container {\n margin: 0 10px;\n }\n .info {\n margin: 0 0 10px 5px;\n }\n th {\n .cell {\n padding: 0;\n }\n }\n }\n .create-invite-token {\n width: 100%\n }\n .invite-via-email {\n width: 100%\n }\n}\n</style>\n","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=92978bf4&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&rel=stylesheet%2Fscss&lang=scss&\"\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\ncomponent.options.__file = \"index.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/index.js??ref--11-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/lib/index.js??ref--11-2!../../../node_modules/sass-loader/lib/loader.js??ref--11-3!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&rel=stylesheet%2Fscss&lang=scss&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/index.js??ref--11-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/lib/index.js??ref--11-2!../../../node_modules/sass-loader/lib/loader.js??ref--11-3!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&rel=stylesheet%2Fscss&lang=scss&\""],"sourceRoot":""}