(function(){"use strict";var e={3710:function(e,n,t){t(6992),t(8674),t(9601),t(7727),t(1539),t(4747),t(7941);var r=t(9963),o=t(8722),u=t(137),a=t(837),i=t(9622),c=t(6246),s=(t(4415),t(4466)),l=t(4239),d=t(6252);function f(e,n){var t=(0,d.up)("router-view");return(0,d.wg)(),(0,d.j4)(t)}var m=t(3744);const p={},h=(0,m.Z)(p,[["render",f]]);var g=h,v=t(1836),b=t(3577),w=["src"],y=["src"];function k(e,n,r,o,u,a){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(2357),style:{"max-width":"33px","max-height":"33px"}},null,8,w)]})),_: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(3609),style:{"max-width":"33px","max-height":"33px"}},null,8,y)]})),_:1},8,["content"])):((0,d.wg)(),(0,d.iD)(d.HY,{key:2},[(0,d.Uk)((0,b.zw)(r.databaseType),1)],64))}var _={props:{databaseType:String}};const T=(0,m.Z)(_,[["render",k]]);var j=T,L=t(4890),S=(0,r.ri)(g);Object.keys(u).forEach((function(e){S.component(e,u[e])})),S.component("database-icon",j),S.directive("require-roles",{mounted:function(e,n){var t=n.value;v.E.hasAnyRoles(t)||e.parentNode&&e.parentNode.removeChild(e)}}),S.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 u=o.parentElement.querySelector(".el-select-dropdown .el-scrollbar .el-select-dropdown__wrap");null!=u?u.addEventListener("scroll",(function(){var e=this.scrollHeight-this.scrollTop-1<=this.clientHeight;e&&n.value()})):console.log("load select component failed")}}}),a.Z.registerLanguage("javascript",i.Z),S.use(c.Z),S.use(l.Z),S.use(o.Z),S.use(s.Z),S.use(L._),S.mount("#app")},4466:function(e,n,t){t.d(n,{Z:function(){return Y}});t(1539),t(8783),t(3948);var r=t(2119),o=t(6252);function u(e,n,t,r,u,a){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 a=t(3577),i=(0,o._)("span",null,"Databasir",-1);function c(e,n,t,r,u,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,a.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,a.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,a.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(1836),d=t(4239),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},u=function(){d.Z.commit("expandMenu")};return{isCollapse:e,isShowMenu:o,expandMenu:u,routes:t}}},m=t(3744);const p=(0,m.Z)(f,[["render",c]]);var h=p;t(8309);function g(e,n,t,r,u,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,a.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 b=(0,m.Z)(v,[["render",g]]);var w=b,y=(0,o.Uk)("个人中心"),k=(0,o.Uk)("注销登陆");function _(e,n,t,r,u,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,a.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 j=(0,m.Z)(T,[["render",_]]);var L=j,S={components:{AppNav:h,Breadcrumb:w,Avatar:L}};const A=(0,m.Z)(S,[["render",u]]);var E=A;function N(){return{name:"首页",to:{path:"/"}}}function q(){return{name:"项目中心",to:{name:"groupListPage"}}}function P(e){var n="项目组";return e.query.groupName&&(n=e.query.groupName),{name:n,to:{path:"/groups/"+e.params.groupId}}}function x(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 C(){return{name:"用户列表",to:{path:"/users"}}}function D(){return{name:"个人中心",to:{path:"/profile"}}}function I(){return{name:"邮箱设置",to:{path:"/settings/sysEmail"}}}function O(){return{name:"操作日志",to:{path:"/settings/sysLog"}}}function W(){return{name:"登录设置",to:{path:"/settings/sysOauth2"}}}function Z(){return{name:"数据库扩展",to:{path:"/settings/sysDatabaseType"}}}function M(){return{name:"文档模板",to:{path:"/settings/sysDocumentTemplate"}}}var U={index:function(){return[N()]},groupList:function(){return[N(),q()]},groupDashboard:function(e,n){return[N(),q(),P(e,n)]},groupProjectDocument:function(e,n){return[N(),q(),P(e,n),x(e)]},userProfile:function(){return[N(),D()]},userList:function(){return[N(),C()]},sysEmailEdit:function(){return[N(),I()]},sysLog:function(){return[N(),O()]},sysOauth2:function(){return[N(),W()]},sysDatabaseType:function(){return[N(),Z()]},sysDocumentTemplate:function(){return[N(),M()]}},R=U,$=[{path:"/login",component:function(){return Promise.all([t.e(269),t.e(139)]).then(t.bind(t,1139))},hidden:!0,meta:{requireAuth:!1}},{path:"/login/oauth2/:id",component:function(){return Promise.all([t.e(269),t.e(865)]).then(t.bind(t,8865))},hidden:!0,props:!0,meta:{requireAuth:!1}},{path:"/",hidden:!0,component:E,children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(295)]).then(t.bind(t,6295))},meta:{breadcrumb:R.groupList}}]},{path:"/groups",icon:"Collection",component:E,meta:{nav:"项目中心"},children:[{path:"",name:"groupListPage",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(295)]).then(t.bind(t,6295))},meta:{breadcrumb:R.groupList}},{path:":groupId",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(968)]).then(t.bind(t,7469))},meta:{breadcrumb:R.groupDashboard}},{path:":groupId/projects/:projectId/documents",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(756)]).then(t.bind(t,756))},meta:{breadcrumb:R.groupProjectDocument}}]},{path:"/users",icon:"List",component:E,meta:{nav:"用户中心",requireAnyRoles:["SYS_OWNER"]},children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(850)]).then(t.bind(t,4850))},meta:{breadcrumb:R.userList}}]},{path:"/profile",icon:"User",component:E,meta:{nav:"个人中心",breadcrumb:R.userProfile},children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(469)]).then(t.bind(t,6469))}}]},{path:"/settings",icon:"Setting",component:E,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,1243))},meta:{nav:"邮箱设置",breadcrumb:R.sysEmailEdit}},{path:"sysLog",icon:"Document",component:function(){return Promise.all([t.e(269),t.e(99)]).then(t.bind(t,2099))},meta:{nav:"操作日志",breadcrumb:R.sysLog}},{path:"sysOauth2",icon:"Connection",component:function(){return Promise.all([t.e(269),t.e(418)]).then(t.bind(t,2418))},meta:{nav:"登陆设置",breadcrumb:R.sysOauth2}},{path:"sysDatabaseType",icon:"office-building",component:function(){return Promise.all([t.e(269),t.e(933)]).then(t.bind(t,3933))},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,3227))},meta:{nav:"文档模板",breadcrumb:R.sysDocumentTemplate}},{path:"sysKey",icon:"Key",hidden:"true",component:E,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},4239:function(e,n,t){var r=t(8637),o=t(1836),u=(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"]=u},1836:function(e,n,t){t.d(n,{r:function(){return a},E:function(){return i}});t(8862),t(1539),t(1249);var r="accessToken",o="accessTokenExpireAt",u="userLoginData",a={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(u,JSON.stringify(e))},removeUserLoginData:function(){window.localStorage.removeItem(u),window.localStorage.removeItem(r),window.localStorage.removeItem(o)},loadUserLoginData:function(){if(!window.localStorage.getItem(u))return null;var e=window.localStorage.getItem(u);return JSON.parse(e)},hasAnyRoles:function(e){var n=window.localStorage.getItem(u);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(u);if(null==e)return null;var n=JSON.parse(e);return n.refreshToken}}},2357:function(e,n,t){e.exports=t.p+"img/MySQL.c8f47618.svg"},3609:function(e,n,t){e.exports=t.p+"img/PostgreSQL.6e3d3a5e.svg"}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var u=n[r]={exports:{}};return e[r].call(u.exports,u,u.exports,t),u.exports}t.m=e,function(){var e=[];t.O=function(n,r,o,u){if(!r){var a=1/0;for(l=0;l=u)&&Object.keys(t.O).every((function(e){return t.O[e](r[c])}))?r.splice(c--,1):(i=!1,u0&&e[l-1][2]>u;l--)e[l]=e[l-1];e[l]=[r,o,u]}}(),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."+{99:"a6207cbf",139:"bb664a4b",227:"e9b83fb6",243:"4885c64a",269:"c2f287be",295:"b1d95042",418:"61a767c2",469:"abf48de2",756:"35a795bd",850:"f555352b",865:"8a22ebd0",924:"ac2f1802",933:"baac99f0",968:"62121c10"}[e]+".js"}}(),function(){t.miniCssF=function(e){return"css/"+e+"."+{139:"a7dec339",227:"90d5c1b0",295:"b144be0e",756:"a8ab2b3e",865:"7df1e56e",968:"82a2f213"}[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,u,a){if(e[r])e[r].push(o);else{var i,c;if(void 0!==u)for(var s=document.getElementsByTagName("script"),l=0;l