(function(){"use strict";var e={21381:function(e,n,t){t(66992),t(88674),t(19601),t(17727),t(41539),t(54747),t(47941);var r=t(49963),o=t(8722),a=t(30137),u=t(30837),i=t(99622),c=t(66246),s=(t(54415),t(34466)),l=t(24239),d=t(66252);function f(e,n){var t=(0,d.up)("router-view");return(0,d.wg)(),(0,d.j4)(t)}var m=t(83744);const p={},h=(0,m.Z)(p,[["render",f]]);var g=h,v=t(51836),w=t(3577),b=["src"],y=["src"],k=["src"],_=["src"],T=["src"],x=["src"];function j(e,n,r,o,a,u){var i=(0,d.up)("el-tooltip");return"mysql"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:0,content:r.databaseType,placement:"left"},{default:(0,d.w5)((function(){return[(0,d._)("img",{src:t(92357),style:{"max-width":"33px","max-height":"33px"}},null,8,b)]})),_:1},8,["content"])):"postgresql"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:1,content:r.databaseType,placement:"left"},{default:(0,d.w5)((function(){return[(0,d._)("img",{src:t(43609),style:{"max-width":"33px","max-height":"33px"}},null,8,y)]})),_:1},8,["content"])):"oracle"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:2,content:r.databaseType,placement:"left"},{default:(0,d.w5)((function(){return[(0,d._)("img",{src:t(22260),style:{"max-width":"33px","max-height":"33px"}},null,8,k)]})),_:1},8,["content"])):"mariadb"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:3,content:r.databaseType,placement:"left"},{default:(0,d.w5)((function(){return[(0,d._)("img",{src:t(36658),style:{"max-width":"33px","max-height":"33px"}},null,8,_)]})),_:1},8,["content"])):"sqlserver"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:4,content:r.databaseType,placement:"left"},{default:(0,d.w5)((function(){return[(0,d._)("img",{src:t(35641),style:{"max-width":"33px","max-height":"33px"}},null,8,T)]})),_:1},8,["content"])):r.icon?((0,d.wg)(),(0,d.j4)(i,{key:5,content:r.databaseType,placement:"left"},{default:(0,d.w5)((function(){return[(0,d._)("img",{src:r.icon,style:{"max-width":"33px","max-height":"33px"}},null,8,x)]})),_:1},8,["content"])):((0,d.wg)(),(0,d.iD)(d.HY,{key:6},[(0,d.Uk)((0,w.zw)(r.databaseType),1)],64))}var L={props:{databaseType:String,icon:String}};const S=(0,m.Z)(L,[["render",j]]);var A=S,q=t(94890),C=(0,r.ri)(g);Object.keys(a).forEach((function(e){C.component(e,a[e])})),C.component("database-icon",A),C.directive("require-roles",{mounted:function(e,n){var t=n.value;v.E.hasAnyRoles(t)||e.parentNode&&e.parentNode.removeChild(e)}}),C.directive("select-more",{updated:function(e,n){var t=e.querySelector(".select-trigger"),r=t.getAttribute("aria-describedby"),o=document.getElementById(r);if(null!=o){var a=o.parentElement.querySelector(".el-select-dropdown .el-scrollbar .el-select-dropdown__wrap");null!=a?a.addEventListener("scroll",(function(){var e=this.scrollHeight-this.scrollTop-1<=this.clientHeight;e&&n.value()})):console.log("load select component failed")}}}),u.Z.registerLanguage("javascript",i.Z),C.use(c.Z),C.use(l.Z),C.use(o.Z),C.use(s.Z),C.use(q._),C.mount("#app")},34466:function(e,n,t){t.d(n,{Z:function(){return Y}});t(41539),t(78783),t(33948);var r=t(42119),o=t(66252);function a(e,n,t,r,a,u){var i=(0,o.up)("AppNav"),c=(0,o.up)("el-aside"),s=(0,o.up)("Breadcrumb"),l=(0,o.up)("Avatar"),d=(0,o.up)("el-header"),f=(0,o.up)("router-view"),m=(0,o.up)("el-main"),p=(0,o.up)("el-container");return(0,o.wg)(),(0,o.j4)(p,{class:"databasir"},{default:(0,o.w5)((function(){return[(0,o.Wm)(c,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(i,{class:"databasir-nav"})]})),_:1}),(0,o.Wm)(d,{class:"databasir-main-header"},{default:(0,o.w5)((function(){return[(0,o.Wm)(s),(0,o.Wm)(l)]})),_:1}),(0,o.Wm)(m,{class:"databasir-main"},{default:(0,o.w5)((function(){return[(0,o.Wm)(p,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(m,{class:"databasir-main-content"},{default:(0,o.w5)((function(){return[(0,o.Wm)(f)]})),_:1})]})),_:1})]})),_:1})]})),_:1})}var u=t(3577),i=(0,o._)("span",null,"Databasir",-1);function c(e,n,t,r,a,c){var s=(0,o.up)("home-filled"),l=(0,o.up)("el-icon"),d=(0,o.up)("el-menu-item"),f=(0,o.up)("el-sub-menu"),m=(0,o.up)("el-menu");return(0,o.wg)(),(0,o.j4)(m,{router:"",collapse:r.isCollapse,mode:"vertical",class:"left-menu"},{default:(0,o.w5)((function(){return[(0,o.Wm)(d,{index:"/"},{title:(0,o.w5)((function(){return[i]})),default:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(s)]})),_:1})]})),_:1}),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(r.routes,(function(e,n){return(0,o.wg)(),(0,o.iD)(o.HY,{key:n},[r.isShowMenu(e)&&e.children.length>0&&e.children.some((function(e){return!e.hidden}))?((0,o.wg)(),(0,o.j4)(f,{key:0,index:e.path},{title:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[((0,o.wg)(),(0,o.j4)((0,o.LL)(e.icon)))]})),_:2},1024),(0,o._)("span",null,(0,u.zw)(e.meta.nav),1)]})),default:(0,o.w5)((function(){return[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.children,(function(t,r){return(0,o.wg)(),(0,o.iD)(o.HY,{key:n+"-"+r},[t.hidden?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:0,index:e.path+"/"+t.path},{title:(0,o.w5)((function(){return[(0,o._)("span",null,(0,u.zw)(t.meta.nav),1)]})),default:(0,o.w5)((function(){return[t.icon?((0,o.wg)(),(0,o.j4)(l,{key:0},{default:(0,o.w5)((function(){return[((0,o.wg)(),(0,o.j4)((0,o.LL)(t.icon)))]})),_:2},1024)):(0,o.kq)("",!0)]})),_:2},1032,["index"]))],64)})),128))]})),_:2},1032,["index"])):r.isShowMenu(e)?((0,o.wg)(),(0,o.j4)(d,{key:1,index:e.path},{title:(0,o.w5)((function(){return[(0,o._)("span",null,(0,u.zw)(e.meta.nav),1)]})),default:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[((0,o.wg)(),(0,o.j4)((0,o.LL)(e.icon)))]})),_:2},1024)]})),_:2},1032,["index"])):(0,o.kq)("",!0)],64)})),128))]})),_:1},8,["collapse"])}var s=t(2262),l=t(51836),d=t(24239),f={setup:function(){var e=(0,s.Fl)((function(){return d.Z.state.menu.isCollapse})),n=(0,r.tv)(),t=n.options.routes,o=function(e){if(e.hidden)return!1;if(e.meta.requireAnyRoles&&e.meta.requireAnyRoles.length>0){var n=l.E.hasAnyRoles(e.meta.requireAnyRoles);if(!n)return!1}return!0},a=function(){d.Z.commit("expandMenu")};return{isCollapse:e,isShowMenu:o,expandMenu:a,routes:t}}},m=t(83744);const p=(0,m.Z)(f,[["render",c]]);var h=p;t(68309);function g(e,n,t,r,a,i){var c=(0,o.up)("fold"),s=(0,o.up)("el-icon"),l=(0,o.up)("el-link"),d=(0,o.up)("el-breadcrumb-item"),f=(0,o.up)("el-breadcrumb");return(0,o.wg)(),(0,o.j4)(f,{separator:"/"},{default:(0,o.w5)((function(){return[i.menuIsCollapse?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:0},{default:(0,o.w5)((function(){return[(0,o.Wm)(l,{onClick:n[0]||(n[0]=function(e){return i.onFoldMenu()}),underline:!1},{default:(0,o.w5)((function(){return[(0,o.Wm)(s,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(c)]})),_:1})]})),_:1})]})),_:1})),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(i.breadcrumbs,(function(e,n){return(0,o.wg)(),(0,o.j4)(d,{key:n,to:e.to},{default:(0,o.w5)((function(){return[(0,o.Uk)((0,u.zw)(e.name),1)]})),_:2},1032,["to"])})),128))]})),_:1})}var v={computed:{breadcrumbs:function(){return"function"===typeof this.$route.meta.breadcrumb?this.$route.meta.breadcrumb(this.$route,this.$store.state):[]},menuIsCollapse:function(){return this.$store.state.menu.isCollapse}},methods:{onFoldMenu:function(){this.$store.commit("foldMenu")}}};const w=(0,m.Z)(v,[["render",g]]);var b=w,y=(0,o.Uk)("个人中心"),k=(0,o.Uk)("注销登陆");function _(e,n,t,r,a,i){var c=(0,o.up)("el-avatar"),s=(0,o.up)("el-dropdown-item"),l=(0,o.up)("el-dropdown-menu"),d=(0,o.up)("el-dropdown");return(0,o.wg)(),(0,o.j4)(d,null,{dropdown:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(s,null,{default:(0,o.w5)((function(){return[(0,o.Uk)((0,u.zw)(i.userNickname),1)]})),_:1}),(0,o.Wm)(s,{icon:"user",divided:"",onClick:n[0]||(n[0]=function(e){return i.toProfilePage()})},{default:(0,o.w5)((function(){return[y]})),_:1}),(0,o.Wm)(s,{icon:"back",onClick:n[1]||(n[1]=function(e){return i.onLogout()})},{default:(0,o.w5)((function(){return[k]})),_:1})]})),_:1})]})),default:(0,o.w5)((function(){return[(0,o.Wm)(c,{size:36,src:i.avatarUrl,icon:"avatar"},null,8,["src"])]})),_:1})}var T={computed:{userNickname:function(){return this.$store.state.user.nickname},avatarUrl:function(){return this.$store.state.user.avatar}},methods:{onLogout:function(){l.E.removeUserLoginData(),this.$router.push({path:"/login"})},toProfilePage:function(){this.$router.push({path:"/profile"})}}};const x=(0,m.Z)(T,[["render",_]]);var j=x,L={components:{AppNav:h,Breadcrumb:b,Avatar:j}};const S=(0,m.Z)(L,[["render",a]]);var A=S;function q(){return{name:"首页",to:{path:"/"}}}function C(){return{name:"项目中心",to:{name:"groupListPage"}}}function E(e){var n="项目组";return e.query.groupName&&(n=e.query.groupName),{name:n,to:{path:"/groups/"+e.params.groupId}}}function N(e){var n="项目文档";e.query.projectName&&(n=e.query.projectName);var t=e.params.projectId,r=e.params.groupId;return{name:n,to:{path:"/groups/"+r+"/projects/"+t+"/documents",query:{projectName:n}}}}function P(){return{name:"用户列表",to:{path:"/users"}}}function D(){return{name:"个人中心",to:{path:"/profile"}}}function O(){return{name:"邮箱设置",to:{path:"/settings/sysEmail"}}}function I(){return{name:"操作日志",to:{path:"/settings/sysLog"}}}function W(){return{name:"登录设置",to:{path:"/settings/sysOauth2"}}}function M(){return{name:"数据库扩展",to:{path:"/settings/sysDatabaseType"}}}function Z(){return{name:"文档模板",to:{path:"/settings/sysDocumentTemplate"}}}var U={index:function(){return[q()]},groupList:function(){return[q(),C()]},groupDashboard:function(e,n){return[q(),C(),E(e,n)]},groupProjectDocument:function(e,n){return[q(),C(),E(e,n),N(e)]},userProfile:function(){return[q(),D()]},userList:function(){return[q(),P()]},sysEmailEdit:function(){return[q(),O()]},sysLog:function(){return[q(),I()]},sysOauth2:function(){return[q(),W()]},sysDatabaseType:function(){return[q(),M()]},sysDocumentTemplate:function(){return[q(),Z()]}},R=U,$=[{path:"/login",component:function(){return Promise.all([t.e(269),t.e(139)]).then(t.bind(t,41139))},hidden:!0,meta:{requireAuth:!1}},{path:"/login/oauth2/:id",component:function(){return Promise.all([t.e(269),t.e(865)]).then(t.bind(t,68865))},hidden:!0,props:!0,meta:{requireAuth:!1}},{path:"/",hidden:!0,component:A,children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(950)]).then(t.bind(t,55950))},meta:{breadcrumb:R.groupList}}]},{path:"/groups",icon:"Collection",component:A,meta:{nav:"项目中心"},children:[{path:"",name:"groupListPage",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(950)]).then(t.bind(t,55950))},meta:{breadcrumb:R.groupList}},{path:":groupId",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(189)]).then(t.bind(t,54189))},meta:{breadcrumb:R.groupDashboard}},{path:":groupId/projects/:projectId/documents",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(749)]).then(t.bind(t,58749))},meta:{breadcrumb:R.groupProjectDocument}}]},{path:"/users",icon:"List",component:A,meta:{nav:"用户中心",requireAnyRoles:["SYS_OWNER"]},children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(106)]).then(t.bind(t,87106))},meta:{breadcrumb:R.userList}}]},{path:"/profile",icon:"User",component:A,meta:{nav:"个人中心",breadcrumb:R.userProfile},children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(469)]).then(t.bind(t,26469))}}]},{path:"/settings",icon:"Setting",component:A,meta:{nav:"系统中心",requireAnyRoles:["SYS_OWNER"]},children:[{path:"sysEmail",icon:"Notification",component:function(){return Promise.all([t.e(269),t.e(243)]).then(t.bind(t,51243))},meta:{nav:"邮箱设置",breadcrumb:R.sysEmailEdit}},{path:"sysLog",icon:"Document",component:function(){return Promise.all([t.e(269),t.e(17)]).then(t.bind(t,16017))},meta:{nav:"操作日志",breadcrumb:R.sysLog}},{path:"sysOauth2",icon:"Connection",component:function(){return Promise.all([t.e(269),t.e(834)]).then(t.bind(t,86834))},meta:{nav:"登陆设置",breadcrumb:R.sysOauth2}},{path:"sysDatabaseType",icon:"office-building",component:function(){return Promise.all([t.e(269),t.e(674)]).then(t.bind(t,95674))},meta:{nav:"数据库扩展",breadcrumb:R.sysDatabaseType}},{path:"sysDocumentTemplate",icon:"document-add",component:function(){return Promise.all([t.e(269),t.e(227)]).then(t.bind(t,93227))},meta:{nav:"文档模板",breadcrumb:R.sysDocumentTemplate}},{path:"sysKey",icon:"Key",hidden:"true",component:A,meta:{nav:"系统秘钥",breadcrumb:R.sysKeyEdit}}]}],H=(0,r.p7)({history:(0,r.PO)(),routes:$});H.beforeEach((function(e,n,t){0==e.meta.requireAuth?"/login"==e.path&&l.r.hasAccessToken()?t(n):t():l.r.hasAccessToken()?t():t({path:"/login"})})),H.beforeEach((function(e,n,t){!e.query.groupName&&n.query.groupName&&(e.query.groupName=n.query.groupName),!e.query.projectName&&n.query.projectName&&(e.query.projectName=n.query.projectName),t()}));var Y=H},24239:function(e,n,t){var r=t(88637),o=t(51836),a=(0,r.MT)({state:function(){var e={user:{nickname:null,usernmae:null,email:null,avatar:null},groupListActiveTab:null,menu:{isCollapse:!0}},n=o.E.loadUserLoginData();return n&&(e.user.nickname=n.nickname,e.user.usernmae=n.usernmae,e.user.email=n.email,e.user.avatar=n.avatar),e},mutations:{userUpdate:function(e,n){n.nickname&&(e.user.nickname=n.nickname),n.usernmae&&(e.user.usernmae=n.usernmae),n.email&&(e.user.email=n.email),n.avatar&&(e.user.avatar=n.avatar)},foldMenu:function(e){e.menu.isCollapse=!0},expandMenu:function(e){e.menu.isCollapse=!1},switchGroupListActiveTab:function(e,n){n&&(e.groupListActiveTab=n)}}});n["Z"]=a},51836:function(e,n,t){t.d(n,{r:function(){return u},E:function(){return i}});t(38862),t(41539),t(21249);var r="accessToken",o="accessTokenExpireAt",a="userLoginData",u={hasAccessToken:function(){var e=this.loadAccessToken();return e},hasValidAccessToken:function(){var e=this.loadAccessToken(),n=window.localStorage.getItem(o);return e&&n?n>(new Date).getTime()-1e4:(console.log("warn: not found accessToken and expireAt key"),!1)},saveAccessToken:function(e,n){window.localStorage.setItem(r,e),window.localStorage.setItem(o,n)},loadAccessToken:function(){var e=window.localStorage.getItem(r);return e||null}},i={saveUserLoginData:function(e){window.localStorage.setItem(r,e.accessToken),window.localStorage.setItem(o,e.accessTokenExpireAt),window.localStorage.setItem(a,JSON.stringify(e))},removeUserLoginData:function(){window.localStorage.removeItem(a),window.localStorage.removeItem(r),window.localStorage.removeItem(o)},loadUserLoginData:function(){if(!window.localStorage.getItem(a))return null;var e=window.localStorage.getItem(a);return JSON.parse(e)},hasAnyRoles:function(e){var n=window.localStorage.getItem(a);if(null==n)return!1;var t=JSON.parse(n);return t.roles.map((function(e){return e.groupId?e.role+"?groupId="+e.groupId:e.role})).some((function(n){return e.some((function(e){return e==n}))}))},getRefreshToken:function(){var e=window.localStorage.getItem(a);if(null==e)return null;var n=JSON.parse(e);return n.refreshToken}}},36658:function(e,n,t){e.exports=t.p+"img/MariaDB.9e6854cc.svg"},92357:function(e,n,t){e.exports=t.p+"img/MySQL.c8f47618.svg"},22260:function(e,n,t){e.exports=t.p+"img/Oracle.c9ed26e0.svg"},43609:function(e,n,t){e.exports=t.p+"img/PostgreSQL.6e3d3a5e.svg"},35641:function(e,n,t){e.exports=t.p+"img/Sqlserver.deff7c4c.svg"}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var a=n[r]={exports:{}};return e[r].call(a.exports,a,a.exports,t),a.exports}t.m=e,function(){var e=[];t.O=function(n,r,o,a){if(!r){var u=1/0;for(l=0;l=a)&&Object.keys(t.O).every((function(e){return t.O[e](r[c])}))?r.splice(c--,1):(i=!1,a0&&e[l-1][2]>a;l--)e[l]=e[l-1];e[l]=[r,o,a]}}(),function(){t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,{a:n}),n}}(),function(){t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}}(),function(){t.f={},t.e=function(e){return Promise.all(Object.keys(t.f).reduce((function(n,r){return t.f[r](e,n),n}),[]))}}(),function(){t.u=function(e){return"js/"+e+"-legacy."+{17:"5bee094a",106:"8a3eaacc",139:"2e4437df",189:"788ddf45",227:"25f65528",243:"0e928586",269:"af28be5f",469:"9029bf4c",674:"7ef39287",749:"02f1fda9",834:"07f2e4ab",865:"5ba4977e",924:"5f64d622",950:"d9b790e1"}[e]+".js"}}(),function(){t.miniCssF=function(e){return"css/"+e+"."+{139:"a7dec339",189:"82a2f213",227:"90d5c1b0",674:"fc5957ed",749:"1969b1d0",834:"f2905e33",865:"7df1e56e",950:"475513d3"}[e]+".css"}}(),function(){t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(),function(){var e={},n="databasir:";t.l=function(r,o,a,u){if(e[r])e[r].push(o);else{var i,c;if(void 0!==a)for(var s=document.getElementsByTagName("script"),l=0;l