From 26c013b8c0f48996202826c9769c2e284683ac7b Mon Sep 17 00:00:00 2001 From: nojava Date: Mon, 18 May 2026 18:10:44 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jog-admin/src/main/resources/application.yml | 5 +++++ .../{AdminLayout-DvP_sFm_.js => AdminLayout-qkY3YKJ7.js} | 2 +- .../{AppLayout-DSAX1K3T.js => AppLayout-BQINpGrT.js} | 2 +- ...ticleDetail-DPqbcIbT.js => ArticleDetail-X20yYhRb.js} | 2 +- ...ticleEditor-Dsa5A3kx.js => ArticleEditor-Dgihcg_m.js} | 2 +- .../{Articles-Cgk7tDWL.js => Articles-BxbKIKuf.js} | 2 +- .../{BlogLayout-CLJXj_0i.js => BlogLayout-JD_c-qtM.js} | 2 +- .../{Categories-BgfxW3SS.js => Categories-DekTCGMM.js} | 2 +- .../{Comments-Cu7IbXrL.js => Comments-DJzfGb7i.js} | 2 +- .../{Dashboard-53hykQZu.js => Dashboard-BA3fZ-pb.js} | 2 +- .../{Dashboard-D_uVUpVV.js => Dashboard-ClOQVQTs.js} | 2 +- .../static/assets/{Home-Cbm5d2EI.js => Home-BVqtfCF5.js} | 2 +- .../assets/{Login-CfQEcRIy.js => Login-D8Rj1Gt6.js} | 2 +- .../{MyArticles-6cpz4JNa.js => MyArticles-DScevaa7.js} | 2 +- .../main/resources/static/assets/Register-BaEzokbR.js | 1 - .../main/resources/static/assets/Register-D9JHUvWr.js | 1 + .../main/resources/static/assets/Register-DHfsbhRj.css | 1 - .../main/resources/static/assets/Register-Db6nqye0.css | 1 + .../assets/{Users-wLT3o-KQ.js => Users-CrD0A4lX.js} | 2 +- .../assets/{article-9VCq7wnf.js => article-yQluyDRw.js} | 2 +- .../assets/{comment-DHhatGB5.js => comment-Z5L_VCb7.js} | 2 +- .../assets/{index-Ce3OdoWB.js => index-CptE6QA-.js} | 4 ++-- .../assets/{request-D458e9ik.js => request-BdgcZPJd.js} | 2 +- .../static/assets/{user-Ct5x882U.js => user-CyFJlq7v.js} | 2 +- jog-admin/src/main/resources/static/index.html | 2 +- jog-frontend/src/views/Register.vue | 9 ++++++++- 26 files changed, 36 insertions(+), 24 deletions(-) rename jog-admin/src/main/resources/static/assets/{AdminLayout-DvP_sFm_.js => AdminLayout-qkY3YKJ7.js} (90%) rename jog-admin/src/main/resources/static/assets/{AppLayout-DSAX1K3T.js => AppLayout-BQINpGrT.js} (94%) rename jog-admin/src/main/resources/static/assets/{ArticleDetail-DPqbcIbT.js => ArticleDetail-X20yYhRb.js} (94%) rename jog-admin/src/main/resources/static/assets/{ArticleEditor-Dsa5A3kx.js => ArticleEditor-Dgihcg_m.js} (99%) rename jog-admin/src/main/resources/static/assets/{Articles-Cgk7tDWL.js => Articles-BxbKIKuf.js} (95%) rename jog-admin/src/main/resources/static/assets/{BlogLayout-CLJXj_0i.js => BlogLayout-JD_c-qtM.js} (91%) rename jog-admin/src/main/resources/static/assets/{Categories-BgfxW3SS.js => Categories-DekTCGMM.js} (94%) rename jog-admin/src/main/resources/static/assets/{Comments-Cu7IbXrL.js => Comments-DJzfGb7i.js} (93%) rename jog-admin/src/main/resources/static/assets/{Dashboard-53hykQZu.js => Dashboard-BA3fZ-pb.js} (92%) rename jog-admin/src/main/resources/static/assets/{Dashboard-D_uVUpVV.js => Dashboard-ClOQVQTs.js} (78%) rename jog-admin/src/main/resources/static/assets/{Home-Cbm5d2EI.js => Home-BVqtfCF5.js} (95%) rename jog-admin/src/main/resources/static/assets/{Login-CfQEcRIy.js => Login-D8Rj1Gt6.js} (93%) rename jog-admin/src/main/resources/static/assets/{MyArticles-6cpz4JNa.js => MyArticles-DScevaa7.js} (95%) delete mode 100644 jog-admin/src/main/resources/static/assets/Register-BaEzokbR.js create mode 100644 jog-admin/src/main/resources/static/assets/Register-D9JHUvWr.js delete mode 100644 jog-admin/src/main/resources/static/assets/Register-DHfsbhRj.css create mode 100644 jog-admin/src/main/resources/static/assets/Register-Db6nqye0.css rename jog-admin/src/main/resources/static/assets/{Users-wLT3o-KQ.js => Users-CrD0A4lX.js} (95%) rename jog-admin/src/main/resources/static/assets/{article-9VCq7wnf.js => article-yQluyDRw.js} (93%) rename jog-admin/src/main/resources/static/assets/{comment-DHhatGB5.js => comment-Z5L_VCb7.js} (86%) rename jog-admin/src/main/resources/static/assets/{index-Ce3OdoWB.js => index-CptE6QA-.js} (99%) rename jog-admin/src/main/resources/static/assets/{request-D458e9ik.js => request-BdgcZPJd.js} (99%) rename jog-admin/src/main/resources/static/assets/{user-Ct5x882U.js => user-CyFJlq7v.js} (93%) diff --git a/jog-admin/src/main/resources/application.yml b/jog-admin/src/main/resources/application.yml index de663c7..96c75a7 100644 --- a/jog-admin/src/main/resources/application.yml +++ b/jog-admin/src/main/resources/application.yml @@ -6,6 +6,11 @@ server: spring: application: name: jog-system + mvc: + throw-exception-if-no-handler-found: false + web: + resources: + add-mappings: true datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://81.70.204.4:3306/jog?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true diff --git a/jog-admin/src/main/resources/static/assets/AdminLayout-DvP_sFm_.js b/jog-admin/src/main/resources/static/assets/AdminLayout-qkY3YKJ7.js similarity index 90% rename from jog-admin/src/main/resources/static/assets/AdminLayout-DvP_sFm_.js rename to jog-admin/src/main/resources/static/assets/AdminLayout-qkY3YKJ7.js index 6d974a8..8f1610e 100644 --- a/jog-admin/src/main/resources/static/assets/AdminLayout-DvP_sFm_.js +++ b/jog-admin/src/main/resources/static/assets/AdminLayout-qkY3YKJ7.js @@ -1 +1 @@ -import{_ as D,a3 as k,S as A,U as t,af as o,g as M,ac as S,a6 as e,E as B,P as a,v as U,w as q,q as I,p as L,b as N,T as i,u as V}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";import{u as $}from"./user-Ct5x882U.js";import"./request-D458e9ik.js";const T={class:"admin-layout"},H={__name:"AdminLayout",setup(P){const _=$(),m=S();async function p(){await _.logout(),m.push("/login")}return(u,n)=>{const c=e("DataAnalysis"),l=I,s=q,f=e("User"),v=e("Document"),x=e("ChatDotSquare"),E=e("Menu"),g=U,C=B,r=N,b=L,w=e("router-view"),y=V,d=M;return k(),A("div",T,[t(d,null,{default:o(()=>[t(C,{width:"220px"},{default:o(()=>[n[6]||(n[6]=a("div",{class:"admin-logo"},"管理后台",-1)),t(g,{"default-active":u.$route.path,router:"","background-color":"#304156","text-color":"#bfcbd9","active-text-color":"#409eff"},{default:o(()=>[t(s,{index:"/admin"},{default:o(()=>[t(l,null,{default:o(()=>[t(c)]),_:1}),n[1]||(n[1]=a("span",null,"仪表盘",-1))]),_:1}),t(s,{index:"/admin/users"},{default:o(()=>[t(l,null,{default:o(()=>[t(f)]),_:1}),n[2]||(n[2]=a("span",null,"用户管理",-1))]),_:1}),t(s,{index:"/admin/articles"},{default:o(()=>[t(l,null,{default:o(()=>[t(v)]),_:1}),n[3]||(n[3]=a("span",null,"文章管理",-1))]),_:1}),t(s,{index:"/admin/comments"},{default:o(()=>[t(l,null,{default:o(()=>[t(x)]),_:1}),n[4]||(n[4]=a("span",null,"评论管理",-1))]),_:1}),t(s,{index:"/admin/categories"},{default:o(()=>[t(l,null,{default:o(()=>[t(E)]),_:1}),n[5]||(n[5]=a("span",null,"分类管理",-1))]),_:1})]),_:1},8,["default-active"])]),_:1}),t(d,null,{default:o(()=>[t(b,{class:"admin-header"},{default:o(()=>[t(r,{onClick:n[0]||(n[0]=R=>u.$router.push("/"))},{default:o(()=>[...n[7]||(n[7]=[i("返回前台",-1)])]),_:1}),t(r,{onClick:p},{default:o(()=>[...n[8]||(n[8]=[i("退出",-1)])]),_:1})]),_:1}),t(y,null,{default:o(()=>[t(w)]),_:1})]),_:1})]),_:1})])}}},X=D(H,[["__scopeId","data-v-32b7a9c5"]]);export{X as default}; +import{_ as D,a3 as k,S as A,U as t,af as o,g as M,ac as S,a6 as e,E as B,P as a,v as U,w as q,q as I,p as L,b as N,T as i,u as V}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";import{u as $}from"./user-CyFJlq7v.js";import"./request-BdgcZPJd.js";const T={class:"admin-layout"},H={__name:"AdminLayout",setup(P){const _=$(),m=S();async function p(){await _.logout(),m.push("/login")}return(u,n)=>{const c=e("DataAnalysis"),l=I,s=q,f=e("User"),v=e("Document"),x=e("ChatDotSquare"),E=e("Menu"),g=U,C=B,r=N,b=L,w=e("router-view"),y=V,d=M;return k(),A("div",T,[t(d,null,{default:o(()=>[t(C,{width:"220px"},{default:o(()=>[n[6]||(n[6]=a("div",{class:"admin-logo"},"管理后台",-1)),t(g,{"default-active":u.$route.path,router:"","background-color":"#304156","text-color":"#bfcbd9","active-text-color":"#409eff"},{default:o(()=>[t(s,{index:"/admin"},{default:o(()=>[t(l,null,{default:o(()=>[t(c)]),_:1}),n[1]||(n[1]=a("span",null,"仪表盘",-1))]),_:1}),t(s,{index:"/admin/users"},{default:o(()=>[t(l,null,{default:o(()=>[t(f)]),_:1}),n[2]||(n[2]=a("span",null,"用户管理",-1))]),_:1}),t(s,{index:"/admin/articles"},{default:o(()=>[t(l,null,{default:o(()=>[t(v)]),_:1}),n[3]||(n[3]=a("span",null,"文章管理",-1))]),_:1}),t(s,{index:"/admin/comments"},{default:o(()=>[t(l,null,{default:o(()=>[t(x)]),_:1}),n[4]||(n[4]=a("span",null,"评论管理",-1))]),_:1}),t(s,{index:"/admin/categories"},{default:o(()=>[t(l,null,{default:o(()=>[t(E)]),_:1}),n[5]||(n[5]=a("span",null,"分类管理",-1))]),_:1})]),_:1},8,["default-active"])]),_:1}),t(d,null,{default:o(()=>[t(b,{class:"admin-header"},{default:o(()=>[t(r,{onClick:n[0]||(n[0]=R=>u.$router.push("/"))},{default:o(()=>[...n[7]||(n[7]=[i("返回前台",-1)])]),_:1}),t(r,{onClick:p},{default:o(()=>[...n[8]||(n[8]=[i("退出",-1)])]),_:1})]),_:1}),t(y,null,{default:o(()=>[t(w)]),_:1})]),_:1})]),_:1})])}}},X=D(H,[["__scopeId","data-v-32b7a9c5"]]);export{X as default}; diff --git a/jog-admin/src/main/resources/static/assets/AppLayout-DSAX1K3T.js b/jog-admin/src/main/resources/static/assets/AppLayout-BQINpGrT.js similarity index 94% rename from jog-admin/src/main/resources/static/assets/AppLayout-DSAX1K3T.js rename to jog-admin/src/main/resources/static/assets/AppLayout-BQINpGrT.js index 6f25982..7b48a76 100644 --- a/jog-admin/src/main/resources/static/assets/AppLayout-DSAX1K3T.js +++ b/jog-admin/src/main/resources/static/assets/AppLayout-BQINpGrT.js @@ -1 +1 @@ -import{_ as E,a3 as v,S as x,U as t,af as e,g as w,a6 as o,E as y,v as A,w as D,q as B,P as s,u as C}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";const I={},M={class:"app-layout"};function P(_,n){const p=o("DataAnalysis"),a=B,l=D,u=o("Document"),i=o("EditPen"),c=A,d=y,r=o("router-view"),m=C,f=w;return v(),x("div",M,[t(f,null,{default:e(()=>[t(d,{width:"200px"},{default:e(()=>[t(c,{"default-active":_.$route.path,router:""},{default:e(()=>[t(l,{index:"/app/dashboard"},{default:e(()=>[t(a,null,{default:e(()=>[t(p)]),_:1}),n[0]||(n[0]=s("span",null,"控制台",-1))]),_:1}),t(l,{index:"/app/articles"},{default:e(()=>[t(a,null,{default:e(()=>[t(u)]),_:1}),n[1]||(n[1]=s("span",null,"我的文章",-1))]),_:1}),t(l,{index:"/app/editor"},{default:e(()=>[t(a,null,{default:e(()=>[t(i)]),_:1}),n[2]||(n[2]=s("span",null,"写文章",-1))]),_:1})]),_:1},8,["default-active"])]),_:1}),t(m,null,{default:e(()=>[t(r)]),_:1})]),_:1})])}const L=E(I,[["render",P],["__scopeId","data-v-105f3892"]]);export{L as default}; +import{_ as E,a3 as v,S as x,U as t,af as e,g as w,a6 as o,E as y,v as A,w as D,q as B,P as s,u as C}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";const I={},M={class:"app-layout"};function P(_,n){const p=o("DataAnalysis"),a=B,l=D,u=o("Document"),i=o("EditPen"),c=A,d=y,r=o("router-view"),m=C,f=w;return v(),x("div",M,[t(f,null,{default:e(()=>[t(d,{width:"200px"},{default:e(()=>[t(c,{"default-active":_.$route.path,router:""},{default:e(()=>[t(l,{index:"/app/dashboard"},{default:e(()=>[t(a,null,{default:e(()=>[t(p)]),_:1}),n[0]||(n[0]=s("span",null,"控制台",-1))]),_:1}),t(l,{index:"/app/articles"},{default:e(()=>[t(a,null,{default:e(()=>[t(u)]),_:1}),n[1]||(n[1]=s("span",null,"我的文章",-1))]),_:1}),t(l,{index:"/app/editor"},{default:e(()=>[t(a,null,{default:e(()=>[t(i)]),_:1}),n[2]||(n[2]=s("span",null,"写文章",-1))]),_:1})]),_:1},8,["default-active"])]),_:1}),t(m,null,{default:e(()=>[t(r)]),_:1})]),_:1})])}const L=E(I,[["render",P],["__scopeId","data-v-105f3892"]]);export{L as default}; diff --git a/jog-admin/src/main/resources/static/assets/ArticleDetail-DPqbcIbT.js b/jog-admin/src/main/resources/static/assets/ArticleDetail-X20yYhRb.js similarity index 94% rename from jog-admin/src/main/resources/static/assets/ArticleDetail-DPqbcIbT.js rename to jog-admin/src/main/resources/static/assets/ArticleDetail-X20yYhRb.js index 5afec42..5b8faa7 100644 --- a/jog-admin/src/main/resources/static/assets/ArticleDetail-DPqbcIbT.js +++ b/jog-admin/src/main/resources/static/assets/ArticleDetail-X20yYhRb.js @@ -1 +1 @@ -import{_ as G,a2 as J,ag as K,ad as O,a3 as i,S as c,N as g,P as a,a9 as n,U as e,af as o,T as u,Q as E,R as y,a5 as N,aa as S,a4 as v,q as W,M as X,b as Y,s as Z,a6 as p,ab as ee,i as te,a as ae,x as z}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{f as ne,t as se}from"./article-9VCq7wnf.js";import{d as le,t as oe,c as ie}from"./comment-DHhatGB5.js";import{u as ue}from"./user-Ct5x882U.js";import"./request-D458e9ik.js";const ce={class:"article-detail"},re={class:"meta"},de={class:"tags"},_e=["innerHTML"],me={class:"actions"},ve={class:"comments-section"},pe={key:0,class:"comment-form"},fe={key:1,class:"login-tip"},ke={class:"comment-list"},ge={class:"comment-header"},ye={class:"nickname"},he={class:"time"},Ce={class:"comment-body"},we={class:"comment-actions"},Ne={key:0,class:"replies"},Te={class:"nickname"},xe={key:0,class:"reply-to"},Ae={class:"time"},De={__name:"ArticleDetail",setup(Le){const T=ee(),x=ue(),t=v(null),A=v([]),h=v(!0),m=v(""),C=v(!1),f=v(null);async function U(){h.value=!0;const s=await ne(T.params.id);t.value=s.data,h.value=!1}async function D(){const s=await le(T.params.id);A.value=s.data}async function B(){if(!x.isLoggedIn){z.warning("请先登录");return}const s=await se(t.value.id);t.value.liked=s.data,t.value.likeCount+=s.data?1:-1}function M(s){f.value=s,m.value=`@${s.nickname} `}async function q(){if(m.value.trim()){C.value=!0;try{const s={articleId:t.value.id,content:m.value};f.value&&(s.parentId=f.value.id,s.replyToUserId=f.value.userId),await ie(s),z.success("评论成功"),m.value="",f.value=null,D()}finally{C.value=!1}}}function w(s){return s?new Date(s).toLocaleString("zh-CN"):""}return J(()=>{U(),D()}),(s,r)=>{const R=p("User"),_=W,$=p("View"),L=p("ChatDotSquare"),H=p("Timer"),b=X,I=te,V=p("Star"),k=Y,F=Z,P=p("router-link"),Q=ae,j=O;return K((i(),c("div",ce,[t.value?(i(),c(g,{key:0},[a("h1",null,n(t.value.title),1),a("div",re,[a("span",null,[e(_,null,{default:o(()=>[e(R)]),_:1}),u(" "+n(t.value.authorNickname),1)]),a("span",null,[e(_,null,{default:o(()=>[e($)]),_:1}),u(" "+n(t.value.viewCount),1)]),a("span",null,[e(_,null,{default:o(()=>[e(L)]),_:1}),u(" "+n(t.value.commentCount),1)]),a("span",null,[e(_,null,{default:o(()=>[e(H)]),_:1}),u(" "+n(w(t.value.publishedAt)),1)]),t.value.categoryName?(i(),E(b,{key:0,size:"small"},{default:o(()=>[u(n(t.value.categoryName),1)]),_:1})):y("",!0)]),a("div",de,[(i(!0),c(g,null,N(t.value.tags,l=>(i(),E(b,{key:l.id,type:"info",size:"small"},{default:o(()=>[u(n(l.name),1)]),_:2},1024))),128))]),e(I),a("div",{class:"content",innerHTML:t.value.content},null,8,_e),e(I),a("div",me,[e(k,{type:t.value.liked?"danger":"default",onClick:B},{default:o(()=>[e(_,null,{default:o(()=>[e(V)]),_:1}),u(" "+n(t.value.liked?"已点赞":"点赞")+" ("+n(t.value.likeCount)+") ",1)]),_:1},8,["type"])]),a("div",ve,[a("h3",null,"评论 ("+n(t.value.commentCount)+")",1),S(x).isLoggedIn?(i(),c("div",pe,[e(F,{modelValue:m.value,"onUpdate:modelValue":r[0]||(r[0]=l=>m.value=l),type:"textarea",rows:3,placeholder:"写下你的评论..."},null,8,["modelValue"]),e(k,{type:"primary",onClick:q,loading:C.value,style:{"margin-top":"8px"}},{default:o(()=>[...r[1]||(r[1]=[u("发表评论",-1)])]),_:1},8,["loading"])])):(i(),c("div",fe,[e(P,{to:"/login"},{default:o(()=>[...r[2]||(r[2]=[u("登录",-1)])]),_:1}),r[3]||(r[3]=u(" 后可以评论 ",-1))])),a("div",ke,[(i(!0),c(g,null,N(A.value,l=>(i(),c("div",{key:l.id,class:"comment-item"},[a("div",ge,[e(Q,{size:32,src:l.avatar},null,8,["src"]),a("span",ye,n(l.nickname),1),a("span",he,n(w(l.createdAt)),1)]),a("div",Ce,n(l.content),1),a("div",we,[e(k,{text:"",size:"small",onClick:d=>M(l)},{default:o(()=>[e(_,null,{default:o(()=>[e(L)]),_:1}),r[4]||(r[4]=u(" 回复 ",-1))]),_:1},8,["onClick"]),e(k,{text:"",size:"small",onClick:d=>S(oe)(l)},{default:o(()=>[e(_,null,{default:o(()=>[e(V)]),_:1}),u(" "+n(l.likeCount),1)]),_:2},1032,["onClick"])]),l.children&&l.children.length?(i(),c("div",Ne,[(i(!0),c(g,null,N(l.children,d=>(i(),c("div",{key:d.id,class:"reply-item"},[a("span",Te,n(d.nickname),1),d.replyToNickname?(i(),c("span",xe,"回复 "+n(d.replyToNickname),1)):y("",!0),u(" :"+n(d.content)+" ",1),a("span",Ae,n(w(d.createdAt)),1)]))),128))])):y("",!0)]))),128))])])],64)):y("",!0)])),[[j,h.value]])}}},$e=G(De,[["__scopeId","data-v-1b96cb74"]]);export{$e as default}; +import{_ as G,a2 as J,ag as K,ad as O,a3 as i,S as c,N as g,P as a,a9 as n,U as e,af as o,T as u,Q as E,R as y,a5 as N,aa as S,a4 as v,q as W,M as X,b as Y,s as Z,a6 as p,ab as ee,i as te,a as ae,x as z}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{f as ne,t as se}from"./article-yQluyDRw.js";import{d as le,t as oe,c as ie}from"./comment-Z5L_VCb7.js";import{u as ue}from"./user-CyFJlq7v.js";import"./request-BdgcZPJd.js";const ce={class:"article-detail"},re={class:"meta"},de={class:"tags"},_e=["innerHTML"],me={class:"actions"},ve={class:"comments-section"},pe={key:0,class:"comment-form"},fe={key:1,class:"login-tip"},ke={class:"comment-list"},ge={class:"comment-header"},ye={class:"nickname"},he={class:"time"},Ce={class:"comment-body"},we={class:"comment-actions"},Ne={key:0,class:"replies"},Te={class:"nickname"},xe={key:0,class:"reply-to"},Ae={class:"time"},De={__name:"ArticleDetail",setup(Le){const T=ee(),x=ue(),t=v(null),A=v([]),h=v(!0),m=v(""),C=v(!1),f=v(null);async function U(){h.value=!0;const s=await ne(T.params.id);t.value=s.data,h.value=!1}async function D(){const s=await le(T.params.id);A.value=s.data}async function B(){if(!x.isLoggedIn){z.warning("请先登录");return}const s=await se(t.value.id);t.value.liked=s.data,t.value.likeCount+=s.data?1:-1}function M(s){f.value=s,m.value=`@${s.nickname} `}async function q(){if(m.value.trim()){C.value=!0;try{const s={articleId:t.value.id,content:m.value};f.value&&(s.parentId=f.value.id,s.replyToUserId=f.value.userId),await ie(s),z.success("评论成功"),m.value="",f.value=null,D()}finally{C.value=!1}}}function w(s){return s?new Date(s).toLocaleString("zh-CN"):""}return J(()=>{U(),D()}),(s,r)=>{const R=p("User"),_=W,$=p("View"),L=p("ChatDotSquare"),H=p("Timer"),b=X,I=te,V=p("Star"),k=Y,F=Z,P=p("router-link"),Q=ae,j=O;return K((i(),c("div",ce,[t.value?(i(),c(g,{key:0},[a("h1",null,n(t.value.title),1),a("div",re,[a("span",null,[e(_,null,{default:o(()=>[e(R)]),_:1}),u(" "+n(t.value.authorNickname),1)]),a("span",null,[e(_,null,{default:o(()=>[e($)]),_:1}),u(" "+n(t.value.viewCount),1)]),a("span",null,[e(_,null,{default:o(()=>[e(L)]),_:1}),u(" "+n(t.value.commentCount),1)]),a("span",null,[e(_,null,{default:o(()=>[e(H)]),_:1}),u(" "+n(w(t.value.publishedAt)),1)]),t.value.categoryName?(i(),E(b,{key:0,size:"small"},{default:o(()=>[u(n(t.value.categoryName),1)]),_:1})):y("",!0)]),a("div",de,[(i(!0),c(g,null,N(t.value.tags,l=>(i(),E(b,{key:l.id,type:"info",size:"small"},{default:o(()=>[u(n(l.name),1)]),_:2},1024))),128))]),e(I),a("div",{class:"content",innerHTML:t.value.content},null,8,_e),e(I),a("div",me,[e(k,{type:t.value.liked?"danger":"default",onClick:B},{default:o(()=>[e(_,null,{default:o(()=>[e(V)]),_:1}),u(" "+n(t.value.liked?"已点赞":"点赞")+" ("+n(t.value.likeCount)+") ",1)]),_:1},8,["type"])]),a("div",ve,[a("h3",null,"评论 ("+n(t.value.commentCount)+")",1),S(x).isLoggedIn?(i(),c("div",pe,[e(F,{modelValue:m.value,"onUpdate:modelValue":r[0]||(r[0]=l=>m.value=l),type:"textarea",rows:3,placeholder:"写下你的评论..."},null,8,["modelValue"]),e(k,{type:"primary",onClick:q,loading:C.value,style:{"margin-top":"8px"}},{default:o(()=>[...r[1]||(r[1]=[u("发表评论",-1)])]),_:1},8,["loading"])])):(i(),c("div",fe,[e(P,{to:"/login"},{default:o(()=>[...r[2]||(r[2]=[u("登录",-1)])]),_:1}),r[3]||(r[3]=u(" 后可以评论 ",-1))])),a("div",ke,[(i(!0),c(g,null,N(A.value,l=>(i(),c("div",{key:l.id,class:"comment-item"},[a("div",ge,[e(Q,{size:32,src:l.avatar},null,8,["src"]),a("span",ye,n(l.nickname),1),a("span",he,n(w(l.createdAt)),1)]),a("div",Ce,n(l.content),1),a("div",we,[e(k,{text:"",size:"small",onClick:d=>M(l)},{default:o(()=>[e(_,null,{default:o(()=>[e(L)]),_:1}),r[4]||(r[4]=u(" 回复 ",-1))]),_:1},8,["onClick"]),e(k,{text:"",size:"small",onClick:d=>S(oe)(l)},{default:o(()=>[e(_,null,{default:o(()=>[e(V)]),_:1}),u(" "+n(l.likeCount),1)]),_:2},1032,["onClick"])]),l.children&&l.children.length?(i(),c("div",Ne,[(i(!0),c(g,null,N(l.children,d=>(i(),c("div",{key:d.id,class:"reply-item"},[a("span",Te,n(d.nickname),1),d.replyToNickname?(i(),c("span",xe,"回复 "+n(d.replyToNickname),1)):y("",!0),u(" :"+n(d.content)+" ",1),a("span",Ae,n(w(d.createdAt)),1)]))),128))])):y("",!0)]))),128))])])],64)):y("",!0)])),[[j,h.value]])}}},$e=G(De,[["__scopeId","data-v-1b96cb74"]]);export{$e as default}; diff --git a/jog-admin/src/main/resources/static/assets/ArticleEditor-Dsa5A3kx.js b/jog-admin/src/main/resources/static/assets/ArticleEditor-Dgihcg_m.js similarity index 99% rename from jog-admin/src/main/resources/static/assets/ArticleEditor-Dsa5A3kx.js rename to jog-admin/src/main/resources/static/assets/ArticleEditor-Dgihcg_m.js index 70d1a78..4711154 100644 --- a/jog-admin/src/main/resources/static/assets/ArticleEditor-Dsa5A3kx.js +++ b/jog-admin/src/main/resources/static/assets/ArticleEditor-Dgihcg_m.js @@ -1,4 +1,4 @@ -import{a2 as ns,a1 as pr,$ as Go,a8 as Yo,V as Xo,W as Zo,Z as Qo,ae as el,a0 as tl,aa as W,a4 as bt,Y as nl,_ as rl,a3 as tt,S as Vt,P as Fr,a9 as il,U as D,af as R,O as sl,n as ol,ab as ll,ac as al,o as cl,s as ul,F as dl,N as Vr,a5 as $r,Q as Hr,z as fl,c as hl,b as pl,T as le,R as ml,C as gl,B as yl,x as En}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{h as bl,k as kl,f as xl,u as Sl,c as Ml}from"./article-9VCq7wnf.js";import"./request-D458e9ik.js";function j(r){this.content=r}j.prototype={constructor:j,find:function(r){for(var e=0;e>1}};j.from=function(r){if(r instanceof j)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new j(e)};function rs(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),s=e.child(n);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=rs(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function is(r,e,t,n){for(let i=r.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:n};let o=r.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,n-=a;continue}if(!o.sameMarkup(l))return{a:t,b:n};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;ce&&n(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),n,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&n&&(o?o=!1:s+=n),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),n.push(l),i+=l.nodeSize),o=a}return new b(n,i)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new b(i,s)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let i=this.child(t),s=n+i.nodeSize;if(s>=e)return s==e?$t(t+1,s):$t(t,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return b.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,n=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(s)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;tn.type.rank-i.type.rank),t}};I.none=[];class en extends Error{}class k{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=ls(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new k(n,this.openStart,this.openEnd)}removeBetween(e,t){return new k(ss(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return k.empty;let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new k(b.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new k(e,n,i)}}k.empty=new k(b.empty,0,0);function ss(r,e,t){let{index:n,offset:i}=r.findIndex(e),s=r.maybeChild(n),{index:o,offset:l}=r.findIndex(t);if(i==e||s.isText){if(l!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,s.copy(ss(s.content,e-i-1,t-i-1)))}function ls(r,e,t,n,i,s){let{index:o,offset:l}=r.findIndex(e),a=r.maybeChild(o);if(l==e||a.isText)return s&&n<=0&&i<=0&&!s.canReplace(o,o,t)?null:r.cut(0,e).append(t).append(r.cut(e));let c=ls(a.content,e-l-1,t,o==0?n-1:0,o==r.childCount-1?i-1:0,a);return c&&r.replaceChild(o,a.copy(c))}function Cl(r,e,t){if(t.openStart>r.depth)throw new en("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new en("Inconsistent open depths");return as(r,e,t,0)}function as(r,e,t,n){let i=r.index(n),s=r.node(n);if(i==e.index(n)&&n=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Mt(r,e,t,n){let i=(e||r).node(t),s=0,o=e?e.index(t):i.childCount;r&&(s=r.index(t),r.depth>t?s++:r.textOffset&&(Ke(r.nodeAfter,n),s++));for(let l=s;li&&Gn(r,e,i+1),o=n.depth>i&&Gn(t,n,i+1),l=[];return Mt(null,r,i,l),s&&o&&e.index(i)==t.index(i)?(cs(s,o),Ke(qe(s,us(r,e,t,n,i+1)),l)):(s&&Ke(qe(s,tn(r,e,i+1)),l),Mt(e,t,i,l),o&&Ke(qe(o,tn(t,n,i+1)),l)),Mt(n,null,i,l),new b(l)}function tn(r,e,t){let n=[];if(Mt(null,r,t,n),r.depth>t){let i=Gn(r,e,t+1);Ke(qe(i,tn(r,e,t+1)),n)}return Mt(e,null,t,n),new b(n)}function wl(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(b.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class Ot{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(t);return n?e.child(t).cut(n):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new nn(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(n.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Ot(t,n,s)}static resolveCached(e,t){let n=Wr.get(e);if(n)for(let s=0;se&&this.nodesBetween(e,t,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ds(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=b.empty,i=0,s=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=b.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,n);return s.type.checkAttrs(s.attrs),s}};ve.prototype.text=void 0;class rn extends ve{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ds(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new rn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new rn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ds(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Ye{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new El(e,t);if(n.next==null)return Ye.empty;let i=fs(n);n.next&&n.err("Unexpected trailing text");let s=Bl(Pl(i));return zl(s,n),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(n.next[o].next);return s}).join(` +import{a2 as ns,a1 as pr,$ as Go,a8 as Yo,V as Xo,W as Zo,Z as Qo,ae as el,a0 as tl,aa as W,a4 as bt,Y as nl,_ as rl,a3 as tt,S as Vt,P as Fr,a9 as il,U as D,af as R,O as sl,n as ol,ab as ll,ac as al,o as cl,s as ul,F as dl,N as Vr,a5 as $r,Q as Hr,z as fl,c as hl,b as pl,T as le,R as ml,C as gl,B as yl,x as En}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{h as bl,k as kl,f as xl,u as Sl,c as Ml}from"./article-yQluyDRw.js";import"./request-BdgcZPJd.js";function j(r){this.content=r}j.prototype={constructor:j,find:function(r){for(var e=0;e>1}};j.from=function(r){if(r instanceof j)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new j(e)};function rs(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),s=e.child(n);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=rs(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function is(r,e,t,n){for(let i=r.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:n};let o=r.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,n-=a;continue}if(!o.sameMarkup(l))return{a:t,b:n};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;ce&&n(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),n,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&n&&(o?o=!1:s+=n),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),n.push(l),i+=l.nodeSize),o=a}return new b(n,i)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new b(i,s)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let i=this.child(t),s=n+i.nodeSize;if(s>=e)return s==e?$t(t+1,s):$t(t,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return b.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,n=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(s)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;tn.type.rank-i.type.rank),t}};I.none=[];class en extends Error{}class k{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=ls(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new k(n,this.openStart,this.openEnd)}removeBetween(e,t){return new k(ss(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return k.empty;let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new k(b.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new k(e,n,i)}}k.empty=new k(b.empty,0,0);function ss(r,e,t){let{index:n,offset:i}=r.findIndex(e),s=r.maybeChild(n),{index:o,offset:l}=r.findIndex(t);if(i==e||s.isText){if(l!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,s.copy(ss(s.content,e-i-1,t-i-1)))}function ls(r,e,t,n,i,s){let{index:o,offset:l}=r.findIndex(e),a=r.maybeChild(o);if(l==e||a.isText)return s&&n<=0&&i<=0&&!s.canReplace(o,o,t)?null:r.cut(0,e).append(t).append(r.cut(e));let c=ls(a.content,e-l-1,t,o==0?n-1:0,o==r.childCount-1?i-1:0,a);return c&&r.replaceChild(o,a.copy(c))}function Cl(r,e,t){if(t.openStart>r.depth)throw new en("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new en("Inconsistent open depths");return as(r,e,t,0)}function as(r,e,t,n){let i=r.index(n),s=r.node(n);if(i==e.index(n)&&n=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Mt(r,e,t,n){let i=(e||r).node(t),s=0,o=e?e.index(t):i.childCount;r&&(s=r.index(t),r.depth>t?s++:r.textOffset&&(Ke(r.nodeAfter,n),s++));for(let l=s;li&&Gn(r,e,i+1),o=n.depth>i&&Gn(t,n,i+1),l=[];return Mt(null,r,i,l),s&&o&&e.index(i)==t.index(i)?(cs(s,o),Ke(qe(s,us(r,e,t,n,i+1)),l)):(s&&Ke(qe(s,tn(r,e,i+1)),l),Mt(e,t,i,l),o&&Ke(qe(o,tn(t,n,i+1)),l)),Mt(n,null,i,l),new b(l)}function tn(r,e,t){let n=[];if(Mt(null,r,t,n),r.depth>t){let i=Gn(r,e,t+1);Ke(qe(i,tn(r,e,t+1)),n)}return Mt(e,null,t,n),new b(n)}function wl(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(b.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class Ot{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(t);return n?e.child(t).cut(n):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new nn(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(n.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Ot(t,n,s)}static resolveCached(e,t){let n=Wr.get(e);if(n)for(let s=0;se&&this.nodesBetween(e,t,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ds(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=b.empty,i=0,s=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=b.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,n);return s.type.checkAttrs(s.attrs),s}};ve.prototype.text=void 0;class rn extends ve{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ds(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new rn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new rn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ds(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Ye{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new El(e,t);if(n.next==null)return Ye.empty;let i=fs(n);n.next&&n.err("Unexpected trailing text");let s=Bl(Pl(i));return zl(s,n),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(n.next[o].next);return s}).join(` `)}}Ye.empty=new Ye(!0);class El{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function fs(r){let e=[];do e.push(Al(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Al(r){let e=[];do e.push(vl(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function vl(r){let e=Rl(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=Dl(r,e);else break;return e}function jr(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function Dl(r,e){let t=jr(r),n=t;return r.eat(",")&&(r.next!="}"?n=jr(r):n=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function Il(r,e){let t=r.nodeTypes,n=t[e];if(n)return[n];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&r.err("No node type or group '"+e+"' found"),i}function Rl(r){if(r.eat("(")){let e=fs(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=Il(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Pl(r){let e=[[]];return i(s(r,0),t()),e;function t(){return e.push([])-1}function n(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return n(l,a),i(s(o.expr,a),a),[n(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[n(a)]}else{if(o.type=="opt")return[n(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{r[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[n.join(",")]=new Ye(n.indexOf(r.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ms(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ve(this,this.computeAttrs(e),b.from(t),I.setFrom(n))}createChecked(e=null,t,n){return t=b.from(t),this.checkContent(t),new ve(this,this.computeAttrs(e),t,I.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=b.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(b.empty,!0);return s?new ve(this,e,t.append(s),I.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tn[s]=new bs(s,t,o));let i=t.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function Ll(r,e,t){let n=t.split("|");return i=>{let s=i===null?"null":typeof i;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${s}`)}}class Fl{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?Ll(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class pn{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=ys(e,i.attrs),this.excluded=null;let s=ps(this.attrs);this.instance=s?new I(this,s):null}create(e=null){return!e&&this.instance?this.instance:new I(this,ms(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((s,o)=>n[s]=new pn(s,i++,t,o)),n}removeFromSet(e){for(var t=0;t-1}}class ks{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=j.from(e.nodes),t.marks=j.from(e.marks||{}),this.nodes=Kr.compile(this.spec.nodes,this),this.marks=pn.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=n[o]||(n[o]=Ye.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?qr(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:qr(this,o.split(" "))}this.nodeFromJSON=i=>ve.fromJSON(this,i),this.markFromJSON=i=>I.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Kr){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,i)}text(e,t){let n=this.nodes.text;return new rn(n,n.defaultAttrs,e,I.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function qr(r,e){let t=[];for(let n=0;n-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function Vl(r){return r.tag!=null}function $l(r){return r.style!=null}class De{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(i=>{if(Vl(i))this.tags.push(i);else if($l(i)){let s=/[^=]*/.exec(i.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let n=new Ur(this,t,!1);return n.addAll(e,I.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Ur(this,t,!0);return n.addAll(e,I.none,t.from,t.to),k.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function n(i){let s=i.priority==null?50:i.priority,o=0;for(;o{n(o=Gr(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{n(o=Gr(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new De(e,De.schemaRules(e)))}}const xs={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Hl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ss={ol:!0,ul:!0},Nt=1,Xn=2,Ct=4;function _r(r,e,t){return e!=null?(e?Nt:0)|(e==="full"?Xn:0):r&&r.whitespace=="pre"?Nt|Xn:t&~Ct}class Ht{constructor(e,t,n,i,s,o){this.type=e,this.attrs=t,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=I.none,this.match=s||(o&Ct?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Nt)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!xs.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ur{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=_r(null,t.preserveWhitespace,0)|(n?Ct:0);i?s=new Ht(i.type,i.attrs,I.none,!0,t.topMatch||i.type.contentMatch,o):n?s=new Ht(null,null,I.none,!0,null,o):s=new Ht(e.schema.topNodeType,null,I.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,i=this.top,s=i.options&Xn?"full":this.localPreserveWS||(i.options&Nt)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(s)if(s==="full")n=n.replace(/\r\n?/g,` `);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=n.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,n,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let a=this.enter(o,t.attrs||null,n,t.preserveWhitespace);a&&(s=!0,n=a)}else{let a=this.parser.schema.marks[t.mark];n=n.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,n,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,n),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,n,i){let s=n||0;for(let o=n?e.childNodes[n]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,n){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(n)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):Yr(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Ht(e,t,a,i,null,l)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Nt)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:n&&a>=s?n.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function Wl(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&Ss.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function jl(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function Gr(r){let e={};for(let t in r)e[t]=r[t];return e}function Yr(r,e){let t=e.schema.nodes;for(let n in t){let i=t[n];if(!i.allowsMarkType(r))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(e,t,n={}){let i=this.marks[e.type.name];return i&&Gt(Wt(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return typeof t=="string"?{dom:e.createTextNode(t)}:Gt(e,t,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new et(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Xr(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return Xr(e.marks)}}function Xr(r){let e={};for(let t in r){let n=r[t].spec.toDOM;n&&(e[t]=n)}return e}function Wt(r){return r.document||window.document}const Zr=new WeakMap;function Jl(r){let e=Zr.get(r);return e===void 0&&Zr.set(r,e=Kl(r)),e}function Kl(r){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let l,a=t?r.createElementNS(t,i):r.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(r.createTextNode(f));else{let{dom:p,contentDOM:h}=Gt(r,f,t,n);if(a.appendChild(p),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}const Ms=65535,Cs=Math.pow(2,16);function ql(r,e){return r+e*Cs}function Qr(r){return r&Ms}function _l(r){return(r-(r&Ms))/Cs}const ws=1,Ts=2,Yt=4,Os=8;class Zn{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Os)>0}get deletedBefore(){return(this.delInfo&(ws|Yt))>0}get deletedAfter(){return(this.delInfo&(Ts|Yt))>0}get deletedAcross(){return(this.delInfo&Yt)>0}}class ie{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ie.empty)return ie.empty}recover(e){let t=0,n=Qr(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,p=a+i+(f<0?0:u);if(n)return p;let h=e==(t<0?a:d)?null:ql(l/3,e-a),m=e==a?Ts:e==d?ws:Yt;return(t<0?e!=a:e!=d)&&(m|=Os),new Zn(p,m,h)}i+=u-c}return n?e+i:new Zn(e+i,0,null)}touches(e,t){let n=0,i=Qr(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;n+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?n-i-1:void 0)}}invert(){let e=new Et;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;ns&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return F.fromReplace(e,this.from,this.to,s)}invert(){return new me(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Ne(t.pos,n.pos,this.mark)}merge(e){return e instanceof Ne&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ne(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ne(t.from,t.to,e.markFromJSON(t.mark))}}X.jsonID("addMark",Ne);class me extends X{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new k(mr(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return F.fromReplace(e,this.from,this.to,n)}invert(){return new Ne(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new me(t.pos,n.pos,this.mark)}merge(e){return e instanceof me&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new me(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new me(t.from,t.to,e.markFromJSON(t.mark))}}X.jsonID("removeMark",me);class Ee extends X{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return F.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return F.fromReplace(e,this.pos,this.pos+1,new k(b.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let i=0;in.pos?null:new V(t.pos,n.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new V(t.from,t.to,t.gapFrom,t.gapTo,k.fromJSON(e,t.slice),t.insert,!!t.structure)}}X.jsonID("replaceAround",V);function Qn(r,e,t){let n=r.resolve(e),i=t-e,s=n.depth;for(;i>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,i--;if(i>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Ul(r,e,t,n){let i=[],s=[],o,l;r.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!n.isInSet(d)&&u.type.allowsMarkType(n.type)){let f=Math.max(c,e),p=Math.min(c+a.nodeSize,t),h=n.addToSet(d);for(let m=0;mr.step(a)),s.forEach(a=>r.step(a))}function Gl(r,e,t,n){let i=[],s=0;r.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(n instanceof pn){let c=o.marks,u;for(;u=n.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else n?n.isInSet(o.marks)&&(a=[n]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;ur.step(new me(o.from,o.to,o.style)))}function gr(r,e,t,n=t.contentMatch,i=!0){let s=r.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a=0;a--)r.step(o[a])}function Yl(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function gt(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let n=r.depth,i=0,s=0;;--n){let o=r.$from.node(n),l=r.$from.index(n)+i,a=r.$to.indexAfter(n)-s;if(nt;h--)m||n.index(h)>0?(m=!0,u=b.from(n.node(h).copy(u)),d++):a--;let f=b.empty,p=0;for(let h=s,m=!1;h>t;h--)m||i.after(h+1)=0;o--){if(n.size){let l=t[o].type.contentMatch.matchFragment(n);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=b.from(t[o].type.create(t[o].attrs,n))}let i=e.start,s=e.end;r.step(new V(i,s,i,s,new k(n,0,0),t.length,!0))}function ta(r,e,t,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=r.steps.length;r.doc.nodesBetween(e,t,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,a)&&na(r.doc,r.mapping.slice(s).map(l),n)){let c=null;if(n.schema.linebreakReplacement){let p=n.whitespace=="pre",h=!!n.contentMatch.matchType(n.schema.linebreakReplacement);p&&!h?c=!1:!p&&h&&(c=!0)}c===!1&&Es(r,o,l,s),gr(r,r.mapping.slice(s).map(l,1),n,void 0,c===null);let u=r.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return r.step(new V(d,f,d+1,f-1,new k(b.from(n.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Ns(r,o,l,s),!1}})}function Ns(r,e,t,n){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=r.mapping.slice(n).map(t+1+s+o.index);r.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Es(r,e,t,n){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=r.mapping.slice(n).map(t+1+s);r.replaceWith(o,o+1,e.type.schema.text(` diff --git a/jog-admin/src/main/resources/static/assets/Articles-Cgk7tDWL.js b/jog-admin/src/main/resources/static/assets/Articles-BxbKIKuf.js similarity index 95% rename from jog-admin/src/main/resources/static/assets/Articles-Cgk7tDWL.js rename to jog-admin/src/main/resources/static/assets/Articles-BxbKIKuf.js index f1aa0ee..be8395a 100644 --- a/jog-admin/src/main/resources/static/assets/Articles-Cgk7tDWL.js +++ b/jog-admin/src/main/resources/static/assets/Articles-BxbKIKuf.js @@ -1 +1 @@ -import{a2 as S,a3 as v,S as D,P as f,U as e,af as o,ah as M,ag as N,ad as U,Q as z,a4 as i,s as I,F as K,J as P,A as j,a6 as q,b as F,q as J,z as L,K as O,M as Q,T as b,a9 as $,y as G,x as H}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{g as R,a as W}from"./article-9VCq7wnf.js";import"./request-D458e9ik.js";const X={style:{"margin-bottom":"16px",display:"flex",gap:"12px"}},ge={__name:"Articles",setup(Y){const m=i([]),r=i(!1),p=i(1),_=i(0),u=i(""),c=i(null);async function s(){r.value=!0;const l=await R({page:p.value,pageSize:15,keyword:u.value,status:c.value});m.value=l.data.records,_.value=l.data.total,r.value=!1}async function y(l){await G.confirm("确定删除该文章?","警告",{type:"warning"}),await W(l),H.success("已删除"),s()}function w(l){return[null,"success","warning","info"][l.status]||""}function x(l){return["草稿","已发布","回收站"][l.status]||"未知"}return S(s),(l,t)=>{const h=q("Search"),E=J,g=F,C=I,d=L,k=K,n=O,V=Q,T=P,A=j,B=U;return v(),D("div",null,[t[4]||(t[4]=f("h2",null,"文章管理",-1)),f("div",X,[e(C,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=a=>u.value=a),placeholder:"搜索文章",clearable:"",style:{width:"300px"},onKeyup:M(s,["enter"])},{append:o(()=>[e(g,{onClick:s},{default:o(()=>[e(E,null,{default:o(()=>[e(h)]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(k,{modelValue:c.value,"onUpdate:modelValue":t[1]||(t[1]=a=>c.value=a),placeholder:"状态",clearable:"",onChange:s},{default:o(()=>[e(d,{label:"草稿",value:0}),e(d,{label:"已发布",value:1}),e(d,{label:"回收站",value:2})]),_:1},8,["modelValue"])]),N((v(),z(T,{data:m.value},{default:o(()=>[e(n,{prop:"id",label:"ID",width:"80"}),e(n,{prop:"title",label:"标题"}),e(n,{prop:"authorNickname",label:"作者",width:"120"}),e(n,{prop:"viewCount",label:"浏览",width:"80"}),e(n,{prop:"likeCount",label:"点赞",width:"80"}),e(n,{label:"状态",width:"100"},{default:o(({row:a})=>[e(V,{type:w(a)},{default:o(()=>[b($(x(a)),1)]),_:2},1032,["type"])]),_:1}),e(n,{label:"操作",width:"120"},{default:o(({row:a})=>[e(g,{text:"",type:"danger",onClick:Z=>y(a.id)},{default:o(()=>[...t[3]||(t[3]=[b("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[B,r.value]]),e(A,{"current-page":p.value,"onUpdate:currentPage":t[2]||(t[2]=a=>p.value=a),"page-size":15,total:_.value,layout:"prev, pager, next",onCurrentChange:s,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{ge as default}; +import{a2 as S,a3 as v,S as D,P as f,U as e,af as o,ah as M,ag as N,ad as U,Q as z,a4 as i,s as I,F as K,J as P,A as j,a6 as q,b as F,q as J,z as L,K as O,M as Q,T as b,a9 as $,y as G,x as H}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{g as R,a as W}from"./article-yQluyDRw.js";import"./request-BdgcZPJd.js";const X={style:{"margin-bottom":"16px",display:"flex",gap:"12px"}},ge={__name:"Articles",setup(Y){const m=i([]),r=i(!1),p=i(1),_=i(0),u=i(""),c=i(null);async function s(){r.value=!0;const l=await R({page:p.value,pageSize:15,keyword:u.value,status:c.value});m.value=l.data.records,_.value=l.data.total,r.value=!1}async function y(l){await G.confirm("确定删除该文章?","警告",{type:"warning"}),await W(l),H.success("已删除"),s()}function w(l){return[null,"success","warning","info"][l.status]||""}function x(l){return["草稿","已发布","回收站"][l.status]||"未知"}return S(s),(l,t)=>{const h=q("Search"),E=J,g=F,C=I,d=L,k=K,n=O,V=Q,T=P,A=j,B=U;return v(),D("div",null,[t[4]||(t[4]=f("h2",null,"文章管理",-1)),f("div",X,[e(C,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=a=>u.value=a),placeholder:"搜索文章",clearable:"",style:{width:"300px"},onKeyup:M(s,["enter"])},{append:o(()=>[e(g,{onClick:s},{default:o(()=>[e(E,null,{default:o(()=>[e(h)]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(k,{modelValue:c.value,"onUpdate:modelValue":t[1]||(t[1]=a=>c.value=a),placeholder:"状态",clearable:"",onChange:s},{default:o(()=>[e(d,{label:"草稿",value:0}),e(d,{label:"已发布",value:1}),e(d,{label:"回收站",value:2})]),_:1},8,["modelValue"])]),N((v(),z(T,{data:m.value},{default:o(()=>[e(n,{prop:"id",label:"ID",width:"80"}),e(n,{prop:"title",label:"标题"}),e(n,{prop:"authorNickname",label:"作者",width:"120"}),e(n,{prop:"viewCount",label:"浏览",width:"80"}),e(n,{prop:"likeCount",label:"点赞",width:"80"}),e(n,{label:"状态",width:"100"},{default:o(({row:a})=>[e(V,{type:w(a)},{default:o(()=>[b($(x(a)),1)]),_:2},1032,["type"])]),_:1}),e(n,{label:"操作",width:"120"},{default:o(({row:a})=>[e(g,{text:"",type:"danger",onClick:Z=>y(a.id)},{default:o(()=>[...t[3]||(t[3]=[b("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[B,r.value]]),e(A,{"current-page":p.value,"onUpdate:currentPage":t[2]||(t[2]=a=>p.value=a),"page-size":15,total:_.value,layout:"prev, pager, next",onCurrentChange:s,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{ge as default}; diff --git a/jog-admin/src/main/resources/static/assets/BlogLayout-CLJXj_0i.js b/jog-admin/src/main/resources/static/assets/BlogLayout-JD_c-qtM.js similarity index 91% rename from jog-admin/src/main/resources/static/assets/BlogLayout-CLJXj_0i.js rename to jog-admin/src/main/resources/static/assets/BlogLayout-JD_c-qtM.js index 35c2eb3..8a64bf9 100644 --- a/jog-admin/src/main/resources/static/assets/BlogLayout-CLJXj_0i.js +++ b/jog-admin/src/main/resources/static/assets/BlogLayout-JD_c-qtM.js @@ -1 +1 @@ -import{_ as L,a3 as l,S as f,U as e,af as t,p as M,u as S,m as V,ac as b,a6 as v,P as i,T as n,v as j,w as x,aa as u,Q as c,j as z,a as A,a9 as F,l as J,k as R,R as T,N as U,b as H}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";import{u as P}from"./user-Ct5x882U.js";import"./request-D458e9ik.js";const Q={class:"jog-layout"},q={class:"header-content"},G={class:"header-right"},K={class:"user-info"},O={__name:"BlogLayout",setup(W){const r=P(),g=b();async function k(){await r.logout(),g.push("/")}return(a,o)=>{const p=v("router-link"),w=x,E=j,y=A,d=R,C=J,$=z,m=H,B=M,I=v("router-view"),N=S,D=V;return l(),f("div",Q,[e(B,{class:"header"},{default:t(()=>[i("div",q,[e(p,{to:"/",class:"logo"},{default:t(()=>[...o[4]||(o[4]=[n("Jog",-1)])]),_:1}),e(E,{mode:"horizontal",ellipsis:!1,class:"nav-menu"},{default:t(()=>[e(w,{index:"home"},{default:t(()=>[e(p,{to:"/"},{default:t(()=>[...o[5]||(o[5]=[n("首页",-1)])]),_:1})]),_:1})]),_:1}),i("div",G,[u(r).isLoggedIn?(l(),c($,{key:0},{dropdown:t(()=>[e(C,null,{default:t(()=>[e(d,{onClick:o[0]||(o[0]=s=>a.$router.push("/app/dashboard"))},{default:t(()=>[...o[6]||(o[6]=[n("控制台",-1)])]),_:1}),u(r).isAdmin?(l(),c(d,{key:0,onClick:o[1]||(o[1]=s=>a.$router.push("/admin"))},{default:t(()=>[...o[7]||(o[7]=[n("管理后台",-1)])]),_:1})):T("",!0),e(d,{divided:"",onClick:k},{default:t(()=>[...o[8]||(o[8]=[n("退出登录",-1)])]),_:1})]),_:1})]),default:t(()=>{var s,_;return[i("span",K,[e(y,{size:28,src:(s=u(r).userInfo)==null?void 0:s.avatar},null,8,["src"]),n(" "+F(((_=u(r).userInfo)==null?void 0:_.nickname)||"用户"),1)])]}),_:1})):(l(),f(U,{key:1},[e(m,{type:"primary",onClick:o[2]||(o[2]=s=>a.$router.push("/login"))},{default:t(()=>[...o[9]||(o[9]=[n("登录",-1)])]),_:1}),e(m,{onClick:o[3]||(o[3]=s=>a.$router.push("/register"))},{default:t(()=>[...o[10]||(o[10]=[n("注册",-1)])]),_:1})],64))])])]),_:1}),e(N,{class:"main"},{default:t(()=>[e(I)]),_:1}),e(D,{class:"footer"},{default:t(()=>[...o[11]||(o[11]=[n("Jog © 2026",-1)])]),_:1})])}}},lo=L(O,[["__scopeId","data-v-359ee45d"]]);export{lo as default}; +import{_ as L,a3 as l,S as f,U as e,af as t,p as M,u as S,m as V,ac as b,a6 as v,P as i,T as n,v as j,w as x,aa as u,Q as c,j as z,a as A,a9 as F,l as J,k as R,R as T,N as U,b as H}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";import{u as P}from"./user-CyFJlq7v.js";import"./request-BdgcZPJd.js";const Q={class:"jog-layout"},q={class:"header-content"},G={class:"header-right"},K={class:"user-info"},O={__name:"BlogLayout",setup(W){const r=P(),g=b();async function k(){await r.logout(),g.push("/")}return(a,o)=>{const p=v("router-link"),w=x,E=j,y=A,d=R,C=J,$=z,m=H,B=M,I=v("router-view"),N=S,D=V;return l(),f("div",Q,[e(B,{class:"header"},{default:t(()=>[i("div",q,[e(p,{to:"/",class:"logo"},{default:t(()=>[...o[4]||(o[4]=[n("Jog",-1)])]),_:1}),e(E,{mode:"horizontal",ellipsis:!1,class:"nav-menu"},{default:t(()=>[e(w,{index:"home"},{default:t(()=>[e(p,{to:"/"},{default:t(()=>[...o[5]||(o[5]=[n("首页",-1)])]),_:1})]),_:1})]),_:1}),i("div",G,[u(r).isLoggedIn?(l(),c($,{key:0},{dropdown:t(()=>[e(C,null,{default:t(()=>[e(d,{onClick:o[0]||(o[0]=s=>a.$router.push("/app/dashboard"))},{default:t(()=>[...o[6]||(o[6]=[n("控制台",-1)])]),_:1}),u(r).isAdmin?(l(),c(d,{key:0,onClick:o[1]||(o[1]=s=>a.$router.push("/admin"))},{default:t(()=>[...o[7]||(o[7]=[n("管理后台",-1)])]),_:1})):T("",!0),e(d,{divided:"",onClick:k},{default:t(()=>[...o[8]||(o[8]=[n("退出登录",-1)])]),_:1})]),_:1})]),default:t(()=>{var s,_;return[i("span",K,[e(y,{size:28,src:(s=u(r).userInfo)==null?void 0:s.avatar},null,8,["src"]),n(" "+F(((_=u(r).userInfo)==null?void 0:_.nickname)||"用户"),1)])]}),_:1})):(l(),f(U,{key:1},[e(m,{type:"primary",onClick:o[2]||(o[2]=s=>a.$router.push("/login"))},{default:t(()=>[...o[9]||(o[9]=[n("登录",-1)])]),_:1}),e(m,{onClick:o[3]||(o[3]=s=>a.$router.push("/register"))},{default:t(()=>[...o[10]||(o[10]=[n("注册",-1)])]),_:1})],64))])])]),_:1}),e(N,{class:"main"},{default:t(()=>[e(I)]),_:1}),e(D,{class:"footer"},{default:t(()=>[...o[11]||(o[11]=[n("Jog © 2026",-1)])]),_:1})])}}},lo=L(O,[["__scopeId","data-v-359ee45d"]]);export{lo as default}; diff --git a/jog-admin/src/main/resources/static/assets/Categories-BgfxW3SS.js b/jog-admin/src/main/resources/static/assets/Categories-DekTCGMM.js similarity index 94% rename from jog-admin/src/main/resources/static/assets/Categories-BgfxW3SS.js rename to jog-admin/src/main/resources/static/assets/Categories-DekTCGMM.js index 293185d..c3322a6 100644 --- a/jog-admin/src/main/resources/static/assets/Categories-BgfxW3SS.js +++ b/jog-admin/src/main/resources/static/assets/Categories-DekTCGMM.js @@ -1 +1 @@ -import{a2 as S,a3 as y,S as $,P as V,U as l,af as a,ag as F,ad as A,Q as H,b as J,a4 as u,J as K,h as L,T as d,K as P,M as Q,a9 as j,n as q,o as z,s as G,H as O,t as R,y as W,x as c}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css *//* empty css */import{h as X,e as Y,l as Z,b as h}from"./article-9VCq7wnf.js";import"./request-D458e9ik.js";const ee={style:{"margin-bottom":"16px"}},ce={__name:"Categories",setup(le){const b=u([]),f=u(!1),s=u(!1),m=u(!1),v=u(null),o=u({name:"",description:"",enabled:!0,sort:0});async function _(){f.value=!0;const n=await X();b.value=n.data,f.value=!1}function C(){m.value=!1,v.value=null,o.value={name:"",description:"",enabled:!0,sort:0},s.value=!0}function E(n){m.value=!0,v.value=n.id,o.value={name:n.name,description:n.description,enabled:n.enabled,sort:n.sort},s.value=!0}async function w(){if(!o.value.name){c.warning("请输入分类名称");return}m.value?await Z(v.value,o.value):await h(o.value),c.success("操作成功"),s.value=!1,_()}async function x(n){await W.confirm(`确定删除分类"${n.name}"?`,"提示");try{await Y(n.id),c.success("已删除"),_()}catch{}}return S(_),(n,e)=>{const r=J,i=P,k=Q,D=K,g=G,p=z,B=O,U=R,I=q,T=L,M=A;return y(),$("div",null,[e[11]||(e[11]=V("h2",null,"分类管理",-1)),V("div",ee,[l(r,{type:"primary",onClick:C},{default:a(()=>[...e[6]||(e[6]=[d("新增分类",-1)])]),_:1})]),F((y(),H(D,{data:b.value},{default:a(()=>[l(i,{prop:"id",label:"ID",width:"80"}),l(i,{prop:"name",label:"名称"}),l(i,{prop:"description",label:"描述"}),l(i,{prop:"articleCount",label:"文章数",width:"100"}),l(i,{label:"状态",width:"100"},{default:a(({row:t})=>[l(k,{type:t.enabled?"success":"danger"},{default:a(()=>[d(j(t.enabled?"启用":"禁用"),1)]),_:2},1032,["type"])]),_:1}),l(i,{label:"操作",width:"180"},{default:a(({row:t})=>[l(r,{text:"",type:"primary",onClick:N=>E(t)},{default:a(()=>[...e[7]||(e[7]=[d("编辑",-1)])]),_:1},8,["onClick"]),l(r,{text:"",type:"danger",onClick:N=>x(t)},{default:a(()=>[...e[8]||(e[8]=[d("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[M,f.value]]),l(T,{modelValue:s.value,"onUpdate:modelValue":e[5]||(e[5]=t=>s.value=t),title:m.value?"编辑分类":"新增分类",width:"400px"},{footer:a(()=>[l(r,{onClick:e[4]||(e[4]=t=>s.value=!1)},{default:a(()=>[...e[9]||(e[9]=[d("取消",-1)])]),_:1}),l(r,{type:"primary",onClick:w},{default:a(()=>[...e[10]||(e[10]=[d("确定",-1)])]),_:1})]),default:a(()=>[l(I,{model:o.value,"label-width":"80px"},{default:a(()=>[l(p,{label:"名称"},{default:a(()=>[l(g,{modelValue:o.value.name,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value.name=t)},null,8,["modelValue"])]),_:1}),l(p,{label:"描述"},{default:a(()=>[l(g,{modelValue:o.value.description,"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.description=t),type:"textarea",rows:2},null,8,["modelValue"])]),_:1}),l(p,{label:"启用"},{default:a(()=>[l(B,{modelValue:o.value.enabled,"onUpdate:modelValue":e[2]||(e[2]=t=>o.value.enabled=t)},null,8,["modelValue"])]),_:1}),l(p,{label:"排序"},{default:a(()=>[l(U,{modelValue:o.value.sort,"onUpdate:modelValue":e[3]||(e[3]=t=>o.value.sort=t),min:0},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}};export{ce as default}; +import{a2 as S,a3 as y,S as $,P as V,U as l,af as a,ag as F,ad as A,Q as H,b as J,a4 as u,J as K,h as L,T as d,K as P,M as Q,a9 as j,n as q,o as z,s as G,H as O,t as R,y as W,x as c}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css *//* empty css */import{h as X,e as Y,l as Z,b as h}from"./article-yQluyDRw.js";import"./request-BdgcZPJd.js";const ee={style:{"margin-bottom":"16px"}},ce={__name:"Categories",setup(le){const b=u([]),f=u(!1),s=u(!1),m=u(!1),v=u(null),o=u({name:"",description:"",enabled:!0,sort:0});async function _(){f.value=!0;const n=await X();b.value=n.data,f.value=!1}function C(){m.value=!1,v.value=null,o.value={name:"",description:"",enabled:!0,sort:0},s.value=!0}function E(n){m.value=!0,v.value=n.id,o.value={name:n.name,description:n.description,enabled:n.enabled,sort:n.sort},s.value=!0}async function w(){if(!o.value.name){c.warning("请输入分类名称");return}m.value?await Z(v.value,o.value):await h(o.value),c.success("操作成功"),s.value=!1,_()}async function x(n){await W.confirm(`确定删除分类"${n.name}"?`,"提示");try{await Y(n.id),c.success("已删除"),_()}catch{}}return S(_),(n,e)=>{const r=J,i=P,k=Q,D=K,g=G,p=z,B=O,U=R,I=q,T=L,M=A;return y(),$("div",null,[e[11]||(e[11]=V("h2",null,"分类管理",-1)),V("div",ee,[l(r,{type:"primary",onClick:C},{default:a(()=>[...e[6]||(e[6]=[d("新增分类",-1)])]),_:1})]),F((y(),H(D,{data:b.value},{default:a(()=>[l(i,{prop:"id",label:"ID",width:"80"}),l(i,{prop:"name",label:"名称"}),l(i,{prop:"description",label:"描述"}),l(i,{prop:"articleCount",label:"文章数",width:"100"}),l(i,{label:"状态",width:"100"},{default:a(({row:t})=>[l(k,{type:t.enabled?"success":"danger"},{default:a(()=>[d(j(t.enabled?"启用":"禁用"),1)]),_:2},1032,["type"])]),_:1}),l(i,{label:"操作",width:"180"},{default:a(({row:t})=>[l(r,{text:"",type:"primary",onClick:N=>E(t)},{default:a(()=>[...e[7]||(e[7]=[d("编辑",-1)])]),_:1},8,["onClick"]),l(r,{text:"",type:"danger",onClick:N=>x(t)},{default:a(()=>[...e[8]||(e[8]=[d("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[M,f.value]]),l(T,{modelValue:s.value,"onUpdate:modelValue":e[5]||(e[5]=t=>s.value=t),title:m.value?"编辑分类":"新增分类",width:"400px"},{footer:a(()=>[l(r,{onClick:e[4]||(e[4]=t=>s.value=!1)},{default:a(()=>[...e[9]||(e[9]=[d("取消",-1)])]),_:1}),l(r,{type:"primary",onClick:w},{default:a(()=>[...e[10]||(e[10]=[d("确定",-1)])]),_:1})]),default:a(()=>[l(I,{model:o.value,"label-width":"80px"},{default:a(()=>[l(p,{label:"名称"},{default:a(()=>[l(g,{modelValue:o.value.name,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value.name=t)},null,8,["modelValue"])]),_:1}),l(p,{label:"描述"},{default:a(()=>[l(g,{modelValue:o.value.description,"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.description=t),type:"textarea",rows:2},null,8,["modelValue"])]),_:1}),l(p,{label:"启用"},{default:a(()=>[l(B,{modelValue:o.value.enabled,"onUpdate:modelValue":e[2]||(e[2]=t=>o.value.enabled=t)},null,8,["modelValue"])]),_:1}),l(p,{label:"排序"},{default:a(()=>[l(U,{modelValue:o.value.sort,"onUpdate:modelValue":e[3]||(e[3]=t=>o.value.sort=t),min:0},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}};export{ce as default}; diff --git a/jog-admin/src/main/resources/static/assets/Comments-Cu7IbXrL.js b/jog-admin/src/main/resources/static/assets/Comments-DJzfGb7i.js similarity index 93% rename from jog-admin/src/main/resources/static/assets/Comments-Cu7IbXrL.js rename to jog-admin/src/main/resources/static/assets/Comments-DJzfGb7i.js index 398532f..088d980 100644 --- a/jog-admin/src/main/resources/static/assets/Comments-Cu7IbXrL.js +++ b/jog-admin/src/main/resources/static/assets/Comments-DJzfGb7i.js @@ -1 +1 @@ -import{a2 as V,a3 as b,S as T,P as y,U as t,af as l,ag as h,ad as M,Q as S,a4 as i,F as z,J as A,A as I,z as N,K as P,M as U,T as p,a9 as $,b as j,x as C,y as F}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{g as J,b as K,a as L}from"./comment-DHhatGB5.js";import"./request-D458e9ik.js";const O={style:{"margin-bottom":"16px",display:"flex",gap:"12px"}},it={__name:"Comments",setup(Q){const g=i([]),u=i(!1),r=i(1),_=i(0),d=i(null);async function s(){u.value=!0;const o=await J({page:r.value,pageSize:15,status:d.value});g.value=o.data.records,_.value=o.data.total,u.value=!1}async function v(o,e){await K(o,e),C.success("操作成功"),s()}async function x(o){await F.confirm("确定删除该评论?","警告",{type:"warning"}),await L(o),C.success("已删除"),s()}return V(s),(o,e)=>{const m=N,w=z,n=P,k=U,c=j,E=A,B=I,D=M;return b(),T("div",null,[e[5]||(e[5]=y("h2",null,"评论管理",-1)),y("div",O,[t(w,{modelValue:d.value,"onUpdate:modelValue":e[0]||(e[0]=a=>d.value=a),placeholder:"状态",clearable:"",onChange:s},{default:l(()=>[t(m,{label:"待审核",value:0}),t(m,{label:"已通过",value:1}),t(m,{label:"已屏蔽",value:2})]),_:1},8,["modelValue"])]),h((b(),S(E,{data:g.value},{default:l(()=>[t(n,{prop:"id",label:"ID",width:"80"}),t(n,{prop:"nickname",label:"评论者",width:"120"}),t(n,{prop:"content",label:"内容","show-overflow-tooltip":""}),t(n,{prop:"articleId",label:"文章ID",width:"80"}),t(n,{label:"状态",width:"100"},{default:l(({row:a})=>[t(k,{type:[null,"success","danger"][a.status]||"info"},{default:l(()=>[p($(["待审核","已通过","已屏蔽","已删除"][a.status]),1)]),_:2},1032,["type"])]),_:1}),t(n,{label:"操作",width:"200"},{default:l(({row:a})=>[t(c,{text:"",type:"success",onClick:f=>v(a.id,1)},{default:l(()=>[...e[2]||(e[2]=[p("通过",-1)])]),_:1},8,["onClick"]),t(c,{text:"",type:"warning",onClick:f=>v(a.id,2)},{default:l(()=>[...e[3]||(e[3]=[p("屏蔽",-1)])]),_:1},8,["onClick"]),t(c,{text:"",type:"danger",onClick:f=>x(a.id)},{default:l(()=>[...e[4]||(e[4]=[p("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[D,u.value]]),t(B,{"current-page":r.value,"onUpdate:currentPage":e[1]||(e[1]=a=>r.value=a),"page-size":15,total:_.value,layout:"prev, pager, next",onCurrentChange:s,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{it as default}; +import{a2 as V,a3 as b,S as T,P as y,U as t,af as l,ag as h,ad as M,Q as S,a4 as i,F as z,J as A,A as I,z as N,K as P,M as U,T as p,a9 as $,b as j,x as C,y as F}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{g as J,b as K,a as L}from"./comment-Z5L_VCb7.js";import"./request-BdgcZPJd.js";const O={style:{"margin-bottom":"16px",display:"flex",gap:"12px"}},it={__name:"Comments",setup(Q){const g=i([]),u=i(!1),r=i(1),_=i(0),d=i(null);async function s(){u.value=!0;const o=await J({page:r.value,pageSize:15,status:d.value});g.value=o.data.records,_.value=o.data.total,u.value=!1}async function v(o,e){await K(o,e),C.success("操作成功"),s()}async function x(o){await F.confirm("确定删除该评论?","警告",{type:"warning"}),await L(o),C.success("已删除"),s()}return V(s),(o,e)=>{const m=N,w=z,n=P,k=U,c=j,E=A,B=I,D=M;return b(),T("div",null,[e[5]||(e[5]=y("h2",null,"评论管理",-1)),y("div",O,[t(w,{modelValue:d.value,"onUpdate:modelValue":e[0]||(e[0]=a=>d.value=a),placeholder:"状态",clearable:"",onChange:s},{default:l(()=>[t(m,{label:"待审核",value:0}),t(m,{label:"已通过",value:1}),t(m,{label:"已屏蔽",value:2})]),_:1},8,["modelValue"])]),h((b(),S(E,{data:g.value},{default:l(()=>[t(n,{prop:"id",label:"ID",width:"80"}),t(n,{prop:"nickname",label:"评论者",width:"120"}),t(n,{prop:"content",label:"内容","show-overflow-tooltip":""}),t(n,{prop:"articleId",label:"文章ID",width:"80"}),t(n,{label:"状态",width:"100"},{default:l(({row:a})=>[t(k,{type:[null,"success","danger"][a.status]||"info"},{default:l(()=>[p($(["待审核","已通过","已屏蔽","已删除"][a.status]),1)]),_:2},1032,["type"])]),_:1}),t(n,{label:"操作",width:"200"},{default:l(({row:a})=>[t(c,{text:"",type:"success",onClick:f=>v(a.id,1)},{default:l(()=>[...e[2]||(e[2]=[p("通过",-1)])]),_:1},8,["onClick"]),t(c,{text:"",type:"warning",onClick:f=>v(a.id,2)},{default:l(()=>[...e[3]||(e[3]=[p("屏蔽",-1)])]),_:1},8,["onClick"]),t(c,{text:"",type:"danger",onClick:f=>x(a.id)},{default:l(()=>[...e[4]||(e[4]=[p("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[D,u.value]]),t(B,{"current-page":r.value,"onUpdate:currentPage":e[1]||(e[1]=a=>r.value=a),"page-size":15,total:_.value,layout:"prev, pager, next",onCurrentChange:s,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{it as default}; diff --git a/jog-admin/src/main/resources/static/assets/Dashboard-53hykQZu.js b/jog-admin/src/main/resources/static/assets/Dashboard-BA3fZ-pb.js similarity index 92% rename from jog-admin/src/main/resources/static/assets/Dashboard-53hykQZu.js rename to jog-admin/src/main/resources/static/assets/Dashboard-BA3fZ-pb.js index ecccc42..a07df5a 100644 --- a/jog-admin/src/main/resources/static/assets/Dashboard-53hykQZu.js +++ b/jog-admin/src/main/resources/static/assets/Dashboard-BA3fZ-pb.js @@ -1 +1 @@ -import{_,a3 as u,S as c,P as r,U as t,af as e,D as d,f,d as i,G as p}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css */const m={};function v(x,o){const l=p,a=i,n=f,s=d;return u(),c("div",null,[o[0]||(o[0]=r("h2",null,"管理后台仪表盘",-1)),t(s,{gutter:20,style:{"margin-top":"20px"}},{default:e(()=>[t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"用户数",value:0})]),_:1})]),_:1}),t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"文章数",value:0})]),_:1})]),_:1}),t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"评论数",value:0})]),_:1})]),_:1}),t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"今日访问",value:0})]),_:1})]),_:1})]),_:1})])}const g=_(m,[["render",v]]);export{g as default}; +import{_,a3 as u,S as c,P as r,U as t,af as e,D as d,f,d as i,G as p}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css */const m={};function v(x,o){const l=p,a=i,n=f,s=d;return u(),c("div",null,[o[0]||(o[0]=r("h2",null,"管理后台仪表盘",-1)),t(s,{gutter:20,style:{"margin-top":"20px"}},{default:e(()=>[t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"用户数",value:0})]),_:1})]),_:1}),t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"文章数",value:0})]),_:1})]),_:1}),t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"评论数",value:0})]),_:1})]),_:1}),t(n,{span:6},{default:e(()=>[t(a,null,{default:e(()=>[t(l,{title:"今日访问",value:0})]),_:1})]),_:1})]),_:1})])}const g=_(m,[["render",v]]);export{g as default}; diff --git a/jog-admin/src/main/resources/static/assets/Dashboard-D_uVUpVV.js b/jog-admin/src/main/resources/static/assets/Dashboard-ClOQVQTs.js similarity index 78% rename from jog-admin/src/main/resources/static/assets/Dashboard-D_uVUpVV.js rename to jog-admin/src/main/resources/static/assets/Dashboard-ClOQVQTs.js index a399478..d116d22 100644 --- a/jog-admin/src/main/resources/static/assets/Dashboard-D_uVUpVV.js +++ b/jog-admin/src/main/resources/static/assets/Dashboard-ClOQVQTs.js @@ -1 +1 @@ -import{a3 as p,S as c,P as r,a9 as i,aa as m,U as t,af as e,D as d,f,d as E,G as S}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css */import{u as v}from"./user-Ct5x882U.js";import"./request-D458e9ik.js";const y={__name:"Dashboard",setup(x){const u=v();return(g,s)=>{var n;const a=S,l=E,o=f,_=d;return p(),c("div",null,[s[0]||(s[0]=r("h2",null,"控制台",-1)),r("p",null,"欢迎,"+i((n=m(u).userInfo)==null?void 0:n.nickname),1),t(_,{gutter:20,style:{"margin-top":"20px"}},{default:e(()=>[t(o,{span:8},{default:e(()=>[t(l,null,{default:e(()=>[t(a,{title:"我的文章",value:0})]),_:1})]),_:1}),t(o,{span:8},{default:e(()=>[t(l,null,{default:e(()=>[t(a,{title:"总浏览量",value:0})]),_:1})]),_:1}),t(o,{span:8},{default:e(()=>[t(l,null,{default:e(()=>[t(a,{title:"获赞数",value:0})]),_:1})]),_:1})]),_:1})])}}};export{y as default}; +import{a3 as p,S as c,P as r,a9 as i,aa as m,U as t,af as e,D as d,f,d as E,G as S}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css */import{u as v}from"./user-CyFJlq7v.js";import"./request-BdgcZPJd.js";const y={__name:"Dashboard",setup(x){const u=v();return(g,s)=>{var n;const a=S,l=E,o=f,_=d;return p(),c("div",null,[s[0]||(s[0]=r("h2",null,"控制台",-1)),r("p",null,"欢迎,"+i((n=m(u).userInfo)==null?void 0:n.nickname),1),t(_,{gutter:20,style:{"margin-top":"20px"}},{default:e(()=>[t(o,{span:8},{default:e(()=>[t(l,null,{default:e(()=>[t(a,{title:"我的文章",value:0})]),_:1})]),_:1}),t(o,{span:8},{default:e(()=>[t(l,null,{default:e(()=>[t(a,{title:"总浏览量",value:0})]),_:1})]),_:1}),t(o,{span:8},{default:e(()=>[t(l,null,{default:e(()=>[t(a,{title:"获赞数",value:0})]),_:1})]),_:1})]),_:1})])}}};export{y as default}; diff --git a/jog-admin/src/main/resources/static/assets/Home-Cbm5d2EI.js b/jog-admin/src/main/resources/static/assets/Home-BVqtfCF5.js similarity index 95% rename from jog-admin/src/main/resources/static/assets/Home-Cbm5d2EI.js rename to jog-admin/src/main/resources/static/assets/Home-BVqtfCF5.js index a29dc3b..34b3110 100644 --- a/jog-admin/src/main/resources/static/assets/Home-Cbm5d2EI.js +++ b/jog-admin/src/main/resources/static/assets/Home-BVqtfCF5.js @@ -1 +1 @@ -import{_ as q,a2 as F,a3 as r,S as m,P as a,U as t,af as n,ah as H,N as y,a5 as C,a4 as d,F as K,s as L,A as R,ac as $,a6 as p,Q as g,z as j,b as M,q as O,a9 as u,T as _,r as Q,R as G,d as J}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{j as W,h as X}from"./article-9VCq7wnf.js";import"./request-D458e9ik.js";const Y={class:"home"},Z={class:"filter-bar"},ee={class:"article-list"},te={class:"article-content"},ae={class:"summary"},oe={class:"meta"},ne={__name:"Home",setup(le){const k=$(),v=d([]),f=d([]),h=d(0),l=d({page:1,pageSize:15,categoryId:null,keyword:""});async function c(){const o=await W(l.value);v.value=o.data.records,h.value=o.data.total}async function w(){const o=await X();f.value=o.data}function V(o){k.push(`/article/${o}`)}function b(o){return o?new Date(o).toLocaleDateString("zh-CN"):""}return F(()=>{c(),w()}),(o,s)=>{const E=j,I=K,S=p("Search"),i=O,x=M,D=L,N=p("User"),z=p("View"),U=p("ChatDotSquare"),B=p("Timer"),A=Q,P=J,T=R;return r(),m("div",Y,[s[3]||(s[3]=a("div",{class:"hero"},[a("h1",null,"欢迎来到博客系统"),a("p",null,"分享知识,记录生活")],-1)),a("div",Z,[t(I,{modelValue:l.value.categoryId,"onUpdate:modelValue":s[0]||(s[0]=e=>l.value.categoryId=e),placeholder:"选择分类",clearable:"",onChange:c},{default:n(()=>[(r(!0),m(y,null,C(f.value,e=>(r(),g(E,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),t(D,{modelValue:l.value.keyword,"onUpdate:modelValue":s[1]||(s[1]=e=>l.value.keyword=e),placeholder:"搜索文章",clearable:"",style:{width:"300px"},onKeyup:H(c,["enter"])},{append:n(()=>[t(x,{onClick:c},{default:n(()=>[t(i,null,{default:n(()=>[t(S)]),_:1})]),_:1})]),_:1},8,["modelValue"])]),a("div",ee,[(r(!0),m(y,null,C(v.value,e=>(r(),g(P,{key:e.id,class:"article-card",onClick:se=>V(e.id)},{default:n(()=>[a("div",te,[a("h3",null,u(e.title),1),a("p",ae,u(e.summary),1),a("div",oe,[a("span",null,[t(i,null,{default:n(()=>[t(N)]),_:1}),_(" "+u(e.authorNickname),1)]),a("span",null,[t(i,null,{default:n(()=>[t(z)]),_:1}),_(" "+u(e.viewCount),1)]),a("span",null,[t(i,null,{default:n(()=>[t(U)]),_:1}),_(" "+u(e.commentCount),1)]),a("span",null,[t(i,null,{default:n(()=>[t(B)]),_:1}),_(" "+u(b(e.publishedAt)),1)])])]),e.coverImage?(r(),g(A,{key:0,src:e.coverImage,class:"cover",fit:"cover"},null,8,["src"])):G("",!0)]),_:2},1032,["onClick"]))),128))]),t(T,{"current-page":l.value.page,"onUpdate:currentPage":s[2]||(s[2]=e=>l.value.page=e),"page-size":l.value.pageSize,total:h.value,layout:"prev, pager, next",onCurrentChange:c},null,8,["current-page","page-size","total"])])}}},ye=q(ne,[["__scopeId","data-v-d23a1ade"]]);export{ye as default}; +import{_ as q,a2 as F,a3 as r,S as m,P as a,U as t,af as n,ah as H,N as y,a5 as C,a4 as d,F as K,s as L,A as R,ac as $,a6 as p,Q as g,z as j,b as M,q as O,a9 as u,T as _,r as Q,R as G,d as J}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{j as W,h as X}from"./article-yQluyDRw.js";import"./request-BdgcZPJd.js";const Y={class:"home"},Z={class:"filter-bar"},ee={class:"article-list"},te={class:"article-content"},ae={class:"summary"},oe={class:"meta"},ne={__name:"Home",setup(le){const k=$(),v=d([]),f=d([]),h=d(0),l=d({page:1,pageSize:15,categoryId:null,keyword:""});async function c(){const o=await W(l.value);v.value=o.data.records,h.value=o.data.total}async function w(){const o=await X();f.value=o.data}function V(o){k.push(`/article/${o}`)}function b(o){return o?new Date(o).toLocaleDateString("zh-CN"):""}return F(()=>{c(),w()}),(o,s)=>{const E=j,I=K,S=p("Search"),i=O,x=M,D=L,N=p("User"),z=p("View"),U=p("ChatDotSquare"),B=p("Timer"),A=Q,P=J,T=R;return r(),m("div",Y,[s[3]||(s[3]=a("div",{class:"hero"},[a("h1",null,"欢迎来到博客系统"),a("p",null,"分享知识,记录生活")],-1)),a("div",Z,[t(I,{modelValue:l.value.categoryId,"onUpdate:modelValue":s[0]||(s[0]=e=>l.value.categoryId=e),placeholder:"选择分类",clearable:"",onChange:c},{default:n(()=>[(r(!0),m(y,null,C(f.value,e=>(r(),g(E,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),t(D,{modelValue:l.value.keyword,"onUpdate:modelValue":s[1]||(s[1]=e=>l.value.keyword=e),placeholder:"搜索文章",clearable:"",style:{width:"300px"},onKeyup:H(c,["enter"])},{append:n(()=>[t(x,{onClick:c},{default:n(()=>[t(i,null,{default:n(()=>[t(S)]),_:1})]),_:1})]),_:1},8,["modelValue"])]),a("div",ee,[(r(!0),m(y,null,C(v.value,e=>(r(),g(P,{key:e.id,class:"article-card",onClick:se=>V(e.id)},{default:n(()=>[a("div",te,[a("h3",null,u(e.title),1),a("p",ae,u(e.summary),1),a("div",oe,[a("span",null,[t(i,null,{default:n(()=>[t(N)]),_:1}),_(" "+u(e.authorNickname),1)]),a("span",null,[t(i,null,{default:n(()=>[t(z)]),_:1}),_(" "+u(e.viewCount),1)]),a("span",null,[t(i,null,{default:n(()=>[t(U)]),_:1}),_(" "+u(e.commentCount),1)]),a("span",null,[t(i,null,{default:n(()=>[t(B)]),_:1}),_(" "+u(b(e.publishedAt)),1)])])]),e.coverImage?(r(),g(A,{key:0,src:e.coverImage,class:"cover",fit:"cover"},null,8,["src"])):G("",!0)]),_:2},1032,["onClick"]))),128))]),t(T,{"current-page":l.value.page,"onUpdate:currentPage":s[2]||(s[2]=e=>l.value.page=e),"page-size":l.value.pageSize,total:h.value,layout:"prev, pager, next",onCurrentChange:c},null,8,["current-page","page-size","total"])])}}},ye=q(ne,[["__scopeId","data-v-d23a1ade"]]);export{ye as default}; diff --git a/jog-admin/src/main/resources/static/assets/Login-CfQEcRIy.js b/jog-admin/src/main/resources/static/assets/Login-D8Rj1Gt6.js similarity index 93% rename from jog-admin/src/main/resources/static/assets/Login-CfQEcRIy.js rename to jog-admin/src/main/resources/static/assets/Login-D8Rj1Gt6.js index c139d02..327f3f3 100644 --- a/jog-admin/src/main/resources/static/assets/Login-CfQEcRIy.js +++ b/jog-admin/src/main/resources/static/assets/Login-D8Rj1Gt6.js @@ -1 +1 @@ -import{_ as S,a3 as U,S as T,U as a,af as o,d as N,ac as K,ab as A,a6 as P,P as m,L as Q,I as j,n as z,ai as E,o as D,s as G,Q as H,R as J,b as O,T as i,e as W,a4 as n,x as F}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{u as X,g as Y}from"./user-Ct5x882U.js";import"./request-D458e9ik.js";const Z={class:"login-page"},$={style:{display:"flex",gap:"8px"}},ee=["src"],ae={class:"footer-link"},oe={__name:"Login",setup(le){const c=K(),f=A(),_=X(),v=n("user"),d=n(!1),g=n(!1),y=n(""),t=n({account:"",password:"",captchaKey:"",captchaCode:""}),r=n({email:"",password:"",rememberMe:!1}),b=n(),w=n(),V={account:[{required:!0,message:"请输入账号",trigger:"blur"}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],captchaCode:[{required:!0,message:"请输入验证码",trigger:"blur"}]};async function h(){const p=await Y();t.value.captchaKey=p.data.captchaKey,y.value=p.data.captchaImage,g.value=!0}async function L(){var p,e;await b.value.validate(),d.value=!0;try{await _.loginAdmin(t.value),F.success("登录成功"),c.push(f.query.redirect||"/admin")}catch(s){((e=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:e.code)===1008&&h()}finally{d.value=!1}}async function R(){await w.value.validate(),d.value=!0;try{await _.loginUser(r.value),F.success("登录成功"),c.push(f.query.redirect||"/app/dashboard")}finally{d.value=!1}}return(p,e)=>{const s=G,u=D,x=O,k=z,C=j,q=W,I=Q,M=P("router-link"),B=N;return U(),T("div",Z,[a(B,{class:"login-card"},{default:o(()=>[e[12]||(e[12]=m("h2",null,"登录",-1)),a(I,{modelValue:v.value,"onUpdate:modelValue":e[6]||(e[6]=l=>v.value=l)},{default:o(()=>[a(C,{label:"管理员登录",name:"admin"},{default:o(()=>[a(k,{model:t.value,rules:V,ref_key:"adminFormRef",ref:b,onSubmit:E(L,["prevent"])},{default:o(()=>[a(u,{prop:"account"},{default:o(()=>[a(s,{modelValue:t.value.account,"onUpdate:modelValue":e[0]||(e[0]=l=>t.value.account=l),placeholder:"用户名或手机号","prefix-icon":"User"},null,8,["modelValue"])]),_:1}),a(u,{prop:"password"},{default:o(()=>[a(s,{modelValue:t.value.password,"onUpdate:modelValue":e[1]||(e[1]=l=>t.value.password=l),type:"password",placeholder:"密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),g.value?(U(),H(u,{key:0,prop:"captchaCode"},{default:o(()=>[m("div",$,[a(s,{modelValue:t.value.captchaCode,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.captchaCode=l),placeholder:"验证码"},null,8,["modelValue"]),m("img",{src:y.value,onClick:h,style:{cursor:"pointer",height:"40px"}},null,8,ee)])]),_:1})):J("",!0),a(u,null,{default:o(()=>[a(x,{type:"primary","native-type":"submit",loading:d.value,style:{width:"100%"}},{default:o(()=>[...e[7]||(e[7]=[i("登录",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1}),a(C,{label:"用户登录",name:"user"},{default:o(()=>[a(k,{model:r.value,rules:V,ref_key:"userFormRef",ref:w,onSubmit:E(R,["prevent"])},{default:o(()=>[a(u,{prop:"email"},{default:o(()=>[a(s,{modelValue:r.value.email,"onUpdate:modelValue":e[3]||(e[3]=l=>r.value.email=l),placeholder:"邮箱","prefix-icon":"Message"},null,8,["modelValue"])]),_:1}),a(u,{prop:"password"},{default:o(()=>[a(s,{modelValue:r.value.password,"onUpdate:modelValue":e[4]||(e[4]=l=>r.value.password=l),type:"password",placeholder:"密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),a(u,null,{default:o(()=>[a(q,{modelValue:r.value.rememberMe,"onUpdate:modelValue":e[5]||(e[5]=l=>r.value.rememberMe=l)},{default:o(()=>[...e[8]||(e[8]=[i("记住我",-1)])]),_:1},8,["modelValue"])]),_:1}),a(u,null,{default:o(()=>[a(x,{type:"primary","native-type":"submit",loading:d.value,style:{width:"100%"}},{default:o(()=>[...e[9]||(e[9]=[i("登录",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"]),m("div",ae,[e[11]||(e[11]=i(" 还没有账号?",-1)),a(M,{to:"/register"},{default:o(()=>[...e[10]||(e[10]=[i("立即注册",-1)])]),_:1})])]),_:1})])}}},ce=S(oe,[["__scopeId","data-v-a0b7679b"]]);export{ce as default}; +import{_ as S,a3 as U,S as T,U as a,af as o,d as N,ac as K,ab as A,a6 as P,P as m,L as Q,I as j,n as z,ai as E,o as D,s as G,Q as H,R as J,b as O,T as i,e as W,a4 as n,x as F}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{u as X,g as Y}from"./user-CyFJlq7v.js";import"./request-BdgcZPJd.js";const Z={class:"login-page"},$={style:{display:"flex",gap:"8px"}},ee=["src"],ae={class:"footer-link"},oe={__name:"Login",setup(le){const c=K(),f=A(),_=X(),v=n("user"),d=n(!1),g=n(!1),y=n(""),t=n({account:"",password:"",captchaKey:"",captchaCode:""}),r=n({email:"",password:"",rememberMe:!1}),b=n(),w=n(),V={account:[{required:!0,message:"请输入账号",trigger:"blur"}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],captchaCode:[{required:!0,message:"请输入验证码",trigger:"blur"}]};async function h(){const p=await Y();t.value.captchaKey=p.data.captchaKey,y.value=p.data.captchaImage,g.value=!0}async function L(){var p,e;await b.value.validate(),d.value=!0;try{await _.loginAdmin(t.value),F.success("登录成功"),c.push(f.query.redirect||"/admin")}catch(s){((e=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:e.code)===1008&&h()}finally{d.value=!1}}async function R(){await w.value.validate(),d.value=!0;try{await _.loginUser(r.value),F.success("登录成功"),c.push(f.query.redirect||"/app/dashboard")}finally{d.value=!1}}return(p,e)=>{const s=G,u=D,x=O,k=z,C=j,q=W,I=Q,M=P("router-link"),B=N;return U(),T("div",Z,[a(B,{class:"login-card"},{default:o(()=>[e[12]||(e[12]=m("h2",null,"登录",-1)),a(I,{modelValue:v.value,"onUpdate:modelValue":e[6]||(e[6]=l=>v.value=l)},{default:o(()=>[a(C,{label:"管理员登录",name:"admin"},{default:o(()=>[a(k,{model:t.value,rules:V,ref_key:"adminFormRef",ref:b,onSubmit:E(L,["prevent"])},{default:o(()=>[a(u,{prop:"account"},{default:o(()=>[a(s,{modelValue:t.value.account,"onUpdate:modelValue":e[0]||(e[0]=l=>t.value.account=l),placeholder:"用户名或手机号","prefix-icon":"User"},null,8,["modelValue"])]),_:1}),a(u,{prop:"password"},{default:o(()=>[a(s,{modelValue:t.value.password,"onUpdate:modelValue":e[1]||(e[1]=l=>t.value.password=l),type:"password",placeholder:"密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),g.value?(U(),H(u,{key:0,prop:"captchaCode"},{default:o(()=>[m("div",$,[a(s,{modelValue:t.value.captchaCode,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.captchaCode=l),placeholder:"验证码"},null,8,["modelValue"]),m("img",{src:y.value,onClick:h,style:{cursor:"pointer",height:"40px"}},null,8,ee)])]),_:1})):J("",!0),a(u,null,{default:o(()=>[a(x,{type:"primary","native-type":"submit",loading:d.value,style:{width:"100%"}},{default:o(()=>[...e[7]||(e[7]=[i("登录",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1}),a(C,{label:"用户登录",name:"user"},{default:o(()=>[a(k,{model:r.value,rules:V,ref_key:"userFormRef",ref:w,onSubmit:E(R,["prevent"])},{default:o(()=>[a(u,{prop:"email"},{default:o(()=>[a(s,{modelValue:r.value.email,"onUpdate:modelValue":e[3]||(e[3]=l=>r.value.email=l),placeholder:"邮箱","prefix-icon":"Message"},null,8,["modelValue"])]),_:1}),a(u,{prop:"password"},{default:o(()=>[a(s,{modelValue:r.value.password,"onUpdate:modelValue":e[4]||(e[4]=l=>r.value.password=l),type:"password",placeholder:"密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),a(u,null,{default:o(()=>[a(q,{modelValue:r.value.rememberMe,"onUpdate:modelValue":e[5]||(e[5]=l=>r.value.rememberMe=l)},{default:o(()=>[...e[8]||(e[8]=[i("记住我",-1)])]),_:1},8,["modelValue"])]),_:1}),a(u,null,{default:o(()=>[a(x,{type:"primary","native-type":"submit",loading:d.value,style:{width:"100%"}},{default:o(()=>[...e[9]||(e[9]=[i("登录",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"]),m("div",ae,[e[11]||(e[11]=i(" 还没有账号?",-1)),a(M,{to:"/register"},{default:o(()=>[...e[10]||(e[10]=[i("立即注册",-1)])]),_:1})])]),_:1})])}}},ce=S(oe,[["__scopeId","data-v-a0b7679b"]]);export{ce as default}; diff --git a/jog-admin/src/main/resources/static/assets/MyArticles-6cpz4JNa.js b/jog-admin/src/main/resources/static/assets/MyArticles-DScevaa7.js similarity index 95% rename from jog-admin/src/main/resources/static/assets/MyArticles-6cpz4JNa.js rename to jog-admin/src/main/resources/static/assets/MyArticles-DScevaa7.js index f45f0cd..78309f8 100644 --- a/jog-admin/src/main/resources/static/assets/MyArticles-6cpz4JNa.js +++ b/jog-admin/src/main/resources/static/assets/MyArticles-DScevaa7.js @@ -1 +1 @@ -import{a2 as B,a3 as f,S as E,P as y,U as a,af as n,ag as $,ad as D,Q as M,b as N,a4 as p,J as T,A as h,T as i,K as z,a9 as P,y as v,x as b}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{i as S,m as V,d as j}from"./article-9VCq7wnf.js";import"./request-D458e9ik.js";const L={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"20px"}},et={__name:"MyArticles",setup(R){const c=p([]),u=p(!1),d=p(1),m=p(0);async function r(){u.value=!0;const e=await S({page:d.value,pageSize:15});c.value=e.data.records,m.value=e.data.total,u.value=!1}async function _(e){await v.confirm("确定移入回收站?","提示"),await V(e),b.success("已移入回收站"),r()}async function w(e){await v.confirm("确定永久删除?此操作不可恢复","警告",{type:"warning"}),await j(e),b.success("已删除"),r()}function C(e){return e?new Date(e).toLocaleString("zh-CN"):"-"}return B(r),(e,t)=>{const s=N,l=z,k=T,x=h,A=D;return f(),E("div",null,[y("div",L,[t[3]||(t[3]=y("h2",null,"我的文章",-1)),a(s,{type:"primary",onClick:t[0]||(t[0]=o=>e.$router.push("/app/editor"))},{default:n(()=>[...t[2]||(t[2]=[i("写文章",-1)])]),_:1})]),$((f(),M(k,{data:c.value},{default:n(()=>[a(l,{prop:"title",label:"标题"}),a(l,{prop:"categoryName",label:"分类",width:"120"}),a(l,{prop:"viewCount",label:"浏览",width:"80"}),a(l,{prop:"likeCount",label:"点赞",width:"80"}),a(l,{prop:"publishedAt",label:"发布时间",width:"180"},{default:n(({row:o})=>[i(P(C(o.publishedAt)),1)]),_:1}),a(l,{label:"操作",width:"200"},{default:n(({row:o})=>[a(s,{text:"",type:"primary",onClick:g=>e.$router.push(`/app/editor/${o.id}`)},{default:n(()=>[...t[4]||(t[4]=[i("编辑",-1)])]),_:1},8,["onClick"]),a(s,{text:"",type:"warning",onClick:g=>_(o.id)},{default:n(()=>[...t[5]||(t[5]=[i("回收站",-1)])]),_:1},8,["onClick"]),a(s,{text:"",type:"danger",onClick:g=>w(o.id)},{default:n(()=>[...t[6]||(t[6]=[i("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[A,u.value]]),a(x,{"current-page":d.value,"onUpdate:currentPage":t[1]||(t[1]=o=>d.value=o),"page-size":15,total:m.value,layout:"prev, pager, next",onCurrentChange:r,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{et as default}; +import{a2 as B,a3 as f,S as E,P as y,U as a,af as n,ag as $,ad as D,Q as M,b as N,a4 as p,J as T,A as h,T as i,K as z,a9 as P,y as v,x as b}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{i as S,m as V,d as j}from"./article-yQluyDRw.js";import"./request-BdgcZPJd.js";const L={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"20px"}},et={__name:"MyArticles",setup(R){const c=p([]),u=p(!1),d=p(1),m=p(0);async function r(){u.value=!0;const e=await S({page:d.value,pageSize:15});c.value=e.data.records,m.value=e.data.total,u.value=!1}async function _(e){await v.confirm("确定移入回收站?","提示"),await V(e),b.success("已移入回收站"),r()}async function w(e){await v.confirm("确定永久删除?此操作不可恢复","警告",{type:"warning"}),await j(e),b.success("已删除"),r()}function C(e){return e?new Date(e).toLocaleString("zh-CN"):"-"}return B(r),(e,t)=>{const s=N,l=z,k=T,x=h,A=D;return f(),E("div",null,[y("div",L,[t[3]||(t[3]=y("h2",null,"我的文章",-1)),a(s,{type:"primary",onClick:t[0]||(t[0]=o=>e.$router.push("/app/editor"))},{default:n(()=>[...t[2]||(t[2]=[i("写文章",-1)])]),_:1})]),$((f(),M(k,{data:c.value},{default:n(()=>[a(l,{prop:"title",label:"标题"}),a(l,{prop:"categoryName",label:"分类",width:"120"}),a(l,{prop:"viewCount",label:"浏览",width:"80"}),a(l,{prop:"likeCount",label:"点赞",width:"80"}),a(l,{prop:"publishedAt",label:"发布时间",width:"180"},{default:n(({row:o})=>[i(P(C(o.publishedAt)),1)]),_:1}),a(l,{label:"操作",width:"200"},{default:n(({row:o})=>[a(s,{text:"",type:"primary",onClick:g=>e.$router.push(`/app/editor/${o.id}`)},{default:n(()=>[...t[4]||(t[4]=[i("编辑",-1)])]),_:1},8,["onClick"]),a(s,{text:"",type:"warning",onClick:g=>_(o.id)},{default:n(()=>[...t[5]||(t[5]=[i("回收站",-1)])]),_:1},8,["onClick"]),a(s,{text:"",type:"danger",onClick:g=>w(o.id)},{default:n(()=>[...t[6]||(t[6]=[i("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[A,u.value]]),a(x,{"current-page":d.value,"onUpdate:currentPage":t[1]||(t[1]=o=>d.value=o),"page-size":15,total:m.value,layout:"prev, pager, next",onCurrentChange:r,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{et as default}; diff --git a/jog-admin/src/main/resources/static/assets/Register-BaEzokbR.js b/jog-admin/src/main/resources/static/assets/Register-BaEzokbR.js deleted file mode 100644 index 475fb93..0000000 --- a/jog-admin/src/main/resources/static/assets/Register-BaEzokbR.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as x,a3 as b,S as E,U as o,af as s,d as k,ac as P,a6 as R,P as m,n as U,ai as C,o as B,s as S,b as q,T as i,x as I,a4 as u}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{u as M}from"./user-Ct5x882U.js";import"./request-D458e9ik.js";const N={class:"register-page"},F={class:"footer-link"},L={__name:"Register",setup(T){const p=P(),f=M(),n=u(!1),d=u(),r=u({email:"",password:"",confirmPassword:""}),g={email:[{required:!0,message:"请输入邮箱",trigger:"blur"},{type:"email",message:"邮箱格式不正确",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:8,max:32,message:"密码长度8-32位",trigger:"blur"}],confirmPassword:[{required:!0,message:"请确认密码",trigger:"blur"},{validator:(c,e,a)=>{e!==r.value.password?a(new Error("两次密码不一致")):a()},trigger:"blur"}]};async function _(){await d.value.validate(),n.value=!0;try{await f.registerUser(r.value),I.success("注册成功,请查看邮箱完成验证"),p.push("/login")}finally{n.value=!1}}return(c,e)=>{const a=S,l=B,v=q,w=U,V=R("router-link"),y=k;return b(),E("div",N,[o(y,{class:"register-card"},{default:s(()=>[e[6]||(e[6]=m("h2",null,"注册",-1)),o(w,{model:r.value,rules:g,ref_key:"formRef",ref:d,onSubmit:C(_,["prevent"])},{default:s(()=>[o(l,{prop:"email"},{default:s(()=>[o(a,{modelValue:r.value.email,"onUpdate:modelValue":e[0]||(e[0]=t=>r.value.email=t),placeholder:"邮箱","prefix-icon":"Message"},null,8,["modelValue"])]),_:1}),o(l,{prop:"password"},{default:s(()=>[o(a,{modelValue:r.value.password,"onUpdate:modelValue":e[1]||(e[1]=t=>r.value.password=t),type:"password",placeholder:"密码(8-32位,含大小写字母、数字和特殊字符中的至少三类)","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),o(l,{prop:"confirmPassword"},{default:s(()=>[o(a,{modelValue:r.value.confirmPassword,"onUpdate:modelValue":e[2]||(e[2]=t=>r.value.confirmPassword=t),type:"password",placeholder:"确认密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),o(l,null,{default:s(()=>[o(v,{type:"primary","native-type":"submit",loading:n.value,style:{width:"100%"}},{default:s(()=>[...e[3]||(e[3]=[i("注册",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),m("div",F,[e[5]||(e[5]=i(" 已有账号?",-1)),o(V,{to:"/login"},{default:s(()=>[...e[4]||(e[4]=[i("立即登录",-1)])]),_:1})])]),_:1})])}}},O=x(L,[["__scopeId","data-v-c2ac8d09"]]);export{O as default}; diff --git a/jog-admin/src/main/resources/static/assets/Register-D9JHUvWr.js b/jog-admin/src/main/resources/static/assets/Register-D9JHUvWr.js new file mode 100644 index 0000000..d3b5c31 --- /dev/null +++ b/jog-admin/src/main/resources/static/assets/Register-D9JHUvWr.js @@ -0,0 +1 @@ +import{_ as x,a3 as b,S as y,U as r,af as a,d as E,ac as U,a6 as P,P as d,n as R,ai as C,o as q,s as B,b as S,T as i,x as I,a4 as u}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{u as M}from"./user-CyFJlq7v.js";import"./request-BdgcZPJd.js";const N={class:"register-page"},F={class:"footer-link"},L={__name:"Register",setup(T){const p=U(),f=M(),n=u(!1),m=u(),o=u({email:"",nickname:"",password:"",confirmPassword:""}),g={email:[{required:!0,message:"请输入邮箱",trigger:"blur"},{type:"email",message:"邮箱格式不正确",trigger:"blur"}],nickname:[{required:!0,message:"请输入昵称",trigger:"blur"},{min:2,max:20,message:"昵称长度2-20位",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:8,max:32,message:"密码长度8-32位",trigger:"blur"}],confirmPassword:[{required:!0,message:"请确认密码",trigger:"blur"},{validator:(_,e,s)=>{e!==o.value.password?s(new Error("两次密码不一致")):s()},trigger:"blur"}]};async function c(){await m.value.validate(),n.value=!0;try{await f.registerUser(o.value),I.success("注册成功,请查看邮箱完成验证"),p.push("/login")}finally{n.value=!1}}return(_,e)=>{const s=B,t=q,v=S,w=R,V=P("router-link"),k=E;return b(),y("div",N,[r(k,{class:"register-card"},{default:a(()=>[e[7]||(e[7]=d("h2",null,"注册",-1)),r(w,{model:o.value,rules:g,ref_key:"formRef",ref:m,onSubmit:C(c,["prevent"])},{default:a(()=>[r(t,{prop:"email"},{default:a(()=>[r(s,{modelValue:o.value.email,"onUpdate:modelValue":e[0]||(e[0]=l=>o.value.email=l),placeholder:"邮箱","prefix-icon":"Message"},null,8,["modelValue"])]),_:1}),r(t,{prop:"nickname"},{default:a(()=>[r(s,{modelValue:o.value.nickname,"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.nickname=l),placeholder:"昵称","prefix-icon":"User"},null,8,["modelValue"])]),_:1}),r(t,{prop:"password"},{default:a(()=>[r(s,{modelValue:o.value.password,"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.password=l),type:"password",placeholder:"密码(8-32位,含大小写字母、数字和特殊字符中的至少三类)","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),r(t,{prop:"confirmPassword"},{default:a(()=>[r(s,{modelValue:o.value.confirmPassword,"onUpdate:modelValue":e[3]||(e[3]=l=>o.value.confirmPassword=l),type:"password",placeholder:"确认密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),r(t,null,{default:a(()=>[r(v,{type:"primary","native-type":"submit",loading:n.value,style:{width:"100%"}},{default:a(()=>[...e[4]||(e[4]=[i("注册",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),d("div",F,[e[6]||(e[6]=i(" 已有账号?",-1)),r(V,{to:"/login"},{default:a(()=>[...e[5]||(e[5]=[i("立即登录",-1)])]),_:1})])]),_:1})])}}},Q=x(L,[["__scopeId","data-v-c7016108"]]);export{Q as default}; diff --git a/jog-admin/src/main/resources/static/assets/Register-DHfsbhRj.css b/jog-admin/src/main/resources/static/assets/Register-DHfsbhRj.css deleted file mode 100644 index 2c23971..0000000 --- a/jog-admin/src/main/resources/static/assets/Register-DHfsbhRj.css +++ /dev/null @@ -1 +0,0 @@ -.register-page[data-v-c2ac8d09]{display:flex;justify-content:center;align-items:center;min-height:100vh;background:#f5f7fa}.register-card[data-v-c2ac8d09]{width:420px;padding:20px}.register-card h2[data-v-c2ac8d09]{text-align:center;margin-bottom:20px}.footer-link[data-v-c2ac8d09]{text-align:center;margin-top:16px;color:#909399} diff --git a/jog-admin/src/main/resources/static/assets/Register-Db6nqye0.css b/jog-admin/src/main/resources/static/assets/Register-Db6nqye0.css new file mode 100644 index 0000000..fed5751 --- /dev/null +++ b/jog-admin/src/main/resources/static/assets/Register-Db6nqye0.css @@ -0,0 +1 @@ +.register-page[data-v-c7016108]{display:flex;justify-content:center;align-items:center;min-height:100vh;background:#f5f7fa}.register-card[data-v-c7016108]{width:420px;padding:20px}.register-card h2[data-v-c7016108]{text-align:center;margin-bottom:20px}.footer-link[data-v-c7016108]{text-align:center;margin-top:16px;color:#909399} diff --git a/jog-admin/src/main/resources/static/assets/Users-wLT3o-KQ.js b/jog-admin/src/main/resources/static/assets/Users-CrD0A4lX.js similarity index 95% rename from jog-admin/src/main/resources/static/assets/Users-wLT3o-KQ.js rename to jog-admin/src/main/resources/static/assets/Users-CrD0A4lX.js index 72836e9..6ee5df4 100644 --- a/jog-admin/src/main/resources/static/assets/Users-wLT3o-KQ.js +++ b/jog-admin/src/main/resources/static/assets/Users-CrD0A4lX.js @@ -1 +1 @@ -import{a2 as P,a3 as v,S as V,P as y,U as e,af as s,ah as T,ag as M,ad as D,Q as I,a4 as i,s as K,J as N,A as q,a6 as z,b as L,q as j,K as A,T as w,a9 as J,y as x,x as b}from"./index-Ce3OdoWB.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{r as g}from"./request-D458e9ik.js";function Q(o){return g.get("/api/admin/user/list",{params:o})}function R(o,l){return g.put(`/api/admin/user/${o}/reset-password`,null,{params:{newPassword:l}})}function F(o,l){return g.put(`/api/admin/user/${o}/status`,null,{params:{status:l}})}const G={style:{"margin-bottom":"16px",display:"flex",gap:"12px"}},it={__name:"Users",setup(o){const l=i([]),c=i(!1),d=i(1),f=i(0),m=i("");async function r(){c.value=!0;const a=await Q({page:d.value,pageSize:15,keyword:m.value});l.value=a.data.records,f.value=a.data.total,c.value=!1}async function k(a){const{value:t}=await x.prompt("请输入新密码","重置密码",{inputPattern:/^.{8,32}$/,inputErrorMessage:"密码长度8-32位"});await R(a,t),b.success("密码已重置")}async function C(a){const t=a.status===0?1:0,u=t===1?"锁定":"解锁";await x.confirm(`确定${u}该用户?`,"提示"),await F(a.id,t),b.success(`已${u}`),r()}return P(r),(a,t)=>{const u=z("Search"),E=j,_=L,h=K,p=A,S=N,U=q,$=D;return v(),V("div",null,[t[3]||(t[3]=y("h2",null,"用户管理",-1)),y("div",G,[e(h,{modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=n=>m.value=n),placeholder:"搜索用户",clearable:"",style:{width:"300px"},onKeyup:T(r,["enter"])},{append:s(()=>[e(_,{onClick:r},{default:s(()=>[e(E,null,{default:s(()=>[e(u)]),_:1})]),_:1})]),_:1},8,["modelValue"])]),M((v(),I(S,{data:l.value},{default:s(()=>[e(p,{prop:"id",label:"ID",width:"80"}),e(p,{prop:"nickname",label:"昵称",width:"150"}),e(p,{prop:"email",label:"邮箱"}),e(p,{label:"操作",width:"240"},{default:s(({row:n})=>[e(_,{text:"",type:"warning",onClick:B=>k(n.id)},{default:s(()=>[...t[2]||(t[2]=[w("重置密码",-1)])]),_:1},8,["onClick"]),e(_,{text:"",type:n.status===1?"success":"danger",onClick:B=>C(n)},{default:s(()=>[w(J(n.status===1?"解锁":"锁定"),1)]),_:2},1032,["type","onClick"])]),_:1})]),_:1},8,["data"])),[[$,c.value]]),e(U,{"current-page":d.value,"onUpdate:currentPage":t[1]||(t[1]=n=>d.value=n),"page-size":15,total:f.value,layout:"prev, pager, next",onCurrentChange:r,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{it as default}; +import{a2 as P,a3 as v,S as V,P as y,U as e,af as s,ah as T,ag as M,ad as D,Q as I,a4 as i,s as K,J as N,A as q,a6 as z,b as L,q as j,K as A,T as w,a9 as J,y as x,x as b}from"./index-CptE6QA-.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import{r as g}from"./request-BdgcZPJd.js";function Q(o){return g.get("/api/admin/user/list",{params:o})}function R(o,l){return g.put(`/api/admin/user/${o}/reset-password`,null,{params:{newPassword:l}})}function F(o,l){return g.put(`/api/admin/user/${o}/status`,null,{params:{status:l}})}const G={style:{"margin-bottom":"16px",display:"flex",gap:"12px"}},it={__name:"Users",setup(o){const l=i([]),c=i(!1),d=i(1),f=i(0),m=i("");async function r(){c.value=!0;const a=await Q({page:d.value,pageSize:15,keyword:m.value});l.value=a.data.records,f.value=a.data.total,c.value=!1}async function k(a){const{value:t}=await x.prompt("请输入新密码","重置密码",{inputPattern:/^.{8,32}$/,inputErrorMessage:"密码长度8-32位"});await R(a,t),b.success("密码已重置")}async function C(a){const t=a.status===0?1:0,u=t===1?"锁定":"解锁";await x.confirm(`确定${u}该用户?`,"提示"),await F(a.id,t),b.success(`已${u}`),r()}return P(r),(a,t)=>{const u=z("Search"),E=j,_=L,h=K,p=A,S=N,U=q,$=D;return v(),V("div",null,[t[3]||(t[3]=y("h2",null,"用户管理",-1)),y("div",G,[e(h,{modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=n=>m.value=n),placeholder:"搜索用户",clearable:"",style:{width:"300px"},onKeyup:T(r,["enter"])},{append:s(()=>[e(_,{onClick:r},{default:s(()=>[e(E,null,{default:s(()=>[e(u)]),_:1})]),_:1})]),_:1},8,["modelValue"])]),M((v(),I(S,{data:l.value},{default:s(()=>[e(p,{prop:"id",label:"ID",width:"80"}),e(p,{prop:"nickname",label:"昵称",width:"150"}),e(p,{prop:"email",label:"邮箱"}),e(p,{label:"操作",width:"240"},{default:s(({row:n})=>[e(_,{text:"",type:"warning",onClick:B=>k(n.id)},{default:s(()=>[...t[2]||(t[2]=[w("重置密码",-1)])]),_:1},8,["onClick"]),e(_,{text:"",type:n.status===1?"success":"danger",onClick:B=>C(n)},{default:s(()=>[w(J(n.status===1?"解锁":"锁定"),1)]),_:2},1032,["type","onClick"])]),_:1})]),_:1},8,["data"])),[[$,c.value]]),e(U,{"current-page":d.value,"onUpdate:currentPage":t[1]||(t[1]=n=>d.value=n),"page-size":15,total:f.value,layout:"prev, pager, next",onCurrentChange:r,style:{"margin-top":"20px","justify-content":"center"}},null,8,["current-page","total"])])}}};export{it as default}; diff --git a/jog-admin/src/main/resources/static/assets/article-9VCq7wnf.js b/jog-admin/src/main/resources/static/assets/article-yQluyDRw.js similarity index 93% rename from jog-admin/src/main/resources/static/assets/article-9VCq7wnf.js rename to jog-admin/src/main/resources/static/assets/article-yQluyDRw.js index 7e9f421..689298f 100644 --- a/jog-admin/src/main/resources/static/assets/article-9VCq7wnf.js +++ b/jog-admin/src/main/resources/static/assets/article-yQluyDRw.js @@ -1 +1 @@ -import{r as e}from"./request-D458e9ik.js";function r(t){return e.get("/api/public/article/list",{params:t})}function n(t){return e.get(`/api/public/article/${t}`)}function c(t){return e.post("/api/app/article",t)}function u(t,i){return e.put(`/api/app/article/${t}`,i)}function p(t){return e.delete(`/api/app/article/${t}`)}function l(t){return e.get("/api/app/article/mine",{params:t})}function o(t){return e.put(`/api/app/article/${t}/recycle`)}function s(t){return e.post(`/api/app/article/${t}/like`)}function g(){return e.get("/api/public/category/list")}function f(){return e.get("/api/public/tag/list")}function d(t){return e.post("/api/admin/category",t)}function m(t,i){return e.put(`/api/admin/category/${t}`,i)}function y(t){return e.delete(`/api/admin/category/${t}`)}function A(t){return e.get("/api/admin/article/list",{params:t})}function $(t){return e.delete(`/api/admin/article/${t}`)}export{$ as a,d as b,c,p as d,y as e,n as f,A as g,g as h,l as i,r as j,f as k,m as l,o as m,s as t,u}; +import{r as e}from"./request-BdgcZPJd.js";function r(t){return e.get("/api/public/article/list",{params:t})}function n(t){return e.get(`/api/public/article/${t}`)}function c(t){return e.post("/api/app/article",t)}function u(t,i){return e.put(`/api/app/article/${t}`,i)}function p(t){return e.delete(`/api/app/article/${t}`)}function l(t){return e.get("/api/app/article/mine",{params:t})}function o(t){return e.put(`/api/app/article/${t}/recycle`)}function s(t){return e.post(`/api/app/article/${t}/like`)}function g(){return e.get("/api/public/category/list")}function f(){return e.get("/api/public/tag/list")}function d(t){return e.post("/api/admin/category",t)}function m(t,i){return e.put(`/api/admin/category/${t}`,i)}function y(t){return e.delete(`/api/admin/category/${t}`)}function A(t){return e.get("/api/admin/article/list",{params:t})}function $(t){return e.delete(`/api/admin/article/${t}`)}export{$ as a,d as b,c,p as d,y as e,n as f,A as g,g as h,l as i,r as j,f as k,m as l,o as m,s as t,u}; diff --git a/jog-admin/src/main/resources/static/assets/comment-DHhatGB5.js b/jog-admin/src/main/resources/static/assets/comment-Z5L_VCb7.js similarity index 86% rename from jog-admin/src/main/resources/static/assets/comment-DHhatGB5.js rename to jog-admin/src/main/resources/static/assets/comment-Z5L_VCb7.js index aa5589a..9f3e455 100644 --- a/jog-admin/src/main/resources/static/assets/comment-DHhatGB5.js +++ b/jog-admin/src/main/resources/static/assets/comment-Z5L_VCb7.js @@ -1 +1 @@ -import{r as e}from"./request-D458e9ik.js";function a(t){return e.get(`/api/app/comment/article/${t}`)}function i(t){return e.post("/api/app/comment",t)}function o(t){return e.post(`/api/app/comment/${t}/like`)}function r(t){return e.get("/api/admin/comment/list",{params:t})}function p(t,n){return e.put(`/api/admin/comment/${t}/audit`,null,{params:{status:n}})}function u(t){return e.delete(`/api/admin/comment/${t}`)}export{u as a,p as b,i as c,a as d,r as g,o as t}; +import{r as e}from"./request-BdgcZPJd.js";function a(t){return e.get(`/api/app/comment/article/${t}`)}function i(t){return e.post("/api/app/comment",t)}function o(t){return e.post(`/api/app/comment/${t}/like`)}function r(t){return e.get("/api/admin/comment/list",{params:t})}function p(t,n){return e.put(`/api/admin/comment/${t}/audit`,null,{params:{status:n}})}function u(t){return e.delete(`/api/admin/comment/${t}`)}export{u as a,p as b,i as c,a as d,r as g,o as t}; diff --git a/jog-admin/src/main/resources/static/assets/index-Ce3OdoWB.js b/jog-admin/src/main/resources/static/assets/index-CptE6QA-.js similarity index 99% rename from jog-admin/src/main/resources/static/assets/index-Ce3OdoWB.js rename to jog-admin/src/main/resources/static/assets/index-CptE6QA-.js index f1c2e30..7a5691f 100644 --- a/jog-admin/src/main/resources/static/assets/index-Ce3OdoWB.js +++ b/jog-admin/src/main/resources/static/assets/index-CptE6QA-.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-CfQEcRIy.js","assets/user-Ct5x882U.js","assets/request-D458e9ik.js","assets/Login-Bhfgmgea.css","assets/base-BhyKBIh7.css","assets/el-card-BAyktVMS.css","assets/el-checkbox-CzNtyWdF.css","assets/el-form-item-D_relxjU.css","assets/el-button-DITZ5HsB.css","assets/el-input-BddTPWVI.css","assets/Register-BaEzokbR.js","assets/Register-DHfsbhRj.css","assets/BlogLayout-CLJXj_0i.js","assets/el-tooltip-l0sNRNKZ.js","assets/BlogLayout-Cp0J6PUm.css","assets/el-menu-item-Cd3T85zg.css","assets/el-scrollbar-GF-yQkxY.css","assets/el-popper-Wf_ds9r7.css","assets/el-button-group-B09mLjuS.css","assets/el-avatar-DOlF0Z_P.css","assets/Home-Cbm5d2EI.js","assets/article-9VCq7wnf.js","assets/Home-BGII4Yz7.css","assets/el-tag-1VV9QMa7.css","assets/el-select-CK58rX4v.css","assets/el-pagination-CDeFZDGO.css","assets/ArticleDetail-DPqbcIbT.js","assets/comment-DHhatGB5.js","assets/ArticleDetail-CYfrm2kF.css","assets/el-loading-C-X_DDFa.css","assets/AppLayout-DSAX1K3T.js","assets/AppLayout-Cx7kgHx5.css","assets/el-container-rkZ0ibHP.css","assets/Dashboard-D_uVUpVV.js","assets/el-statistic-N9MwL_jC.css","assets/MyArticles-6cpz4JNa.js","assets/el-table-column-Dp73S2HR.css","assets/ArticleEditor-Dsa5A3kx.js","assets/ArticleEditor-DWr88nqC.css","assets/AdminLayout-DvP_sFm_.js","assets/AdminLayout-BsZficSf.css","assets/Dashboard-53hykQZu.js","assets/Users-wLT3o-KQ.js","assets/Articles-Cgk7tDWL.js","assets/Comments-Cu7IbXrL.js","assets/Categories-BgfxW3SS.js","assets/Categories-TqNADfa_.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-D8Rj1Gt6.js","assets/user-CyFJlq7v.js","assets/request-BdgcZPJd.js","assets/Login-Bhfgmgea.css","assets/base-BhyKBIh7.css","assets/el-card-BAyktVMS.css","assets/el-checkbox-CzNtyWdF.css","assets/el-form-item-D_relxjU.css","assets/el-button-DITZ5HsB.css","assets/el-input-BddTPWVI.css","assets/Register-D9JHUvWr.js","assets/Register-Db6nqye0.css","assets/BlogLayout-JD_c-qtM.js","assets/el-tooltip-l0sNRNKZ.js","assets/BlogLayout-Cp0J6PUm.css","assets/el-menu-item-Cd3T85zg.css","assets/el-scrollbar-GF-yQkxY.css","assets/el-popper-Wf_ds9r7.css","assets/el-button-group-B09mLjuS.css","assets/el-avatar-DOlF0Z_P.css","assets/Home-BVqtfCF5.js","assets/article-yQluyDRw.js","assets/Home-BGII4Yz7.css","assets/el-tag-1VV9QMa7.css","assets/el-select-CK58rX4v.css","assets/el-pagination-CDeFZDGO.css","assets/ArticleDetail-X20yYhRb.js","assets/comment-Z5L_VCb7.js","assets/ArticleDetail-CYfrm2kF.css","assets/el-loading-C-X_DDFa.css","assets/AppLayout-BQINpGrT.js","assets/AppLayout-Cx7kgHx5.css","assets/el-container-rkZ0ibHP.css","assets/Dashboard-ClOQVQTs.js","assets/el-statistic-N9MwL_jC.css","assets/MyArticles-DScevaa7.js","assets/el-table-column-Dp73S2HR.css","assets/ArticleEditor-Dgihcg_m.js","assets/ArticleEditor-DWr88nqC.css","assets/AdminLayout-qkY3YKJ7.js","assets/AdminLayout-BsZficSf.css","assets/Dashboard-BA3fZ-pb.js","assets/Users-CrD0A4lX.js","assets/Articles-BxbKIKuf.js","assets/Comments-DJzfGb7i.js","assets/Categories-DekTCGMM.js","assets/Categories-TqNADfa_.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&a(r)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();/** * @vue/shared v3.5.34 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -89,4 +89,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:a,curr * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let hie=()=>location.protocol+"//"+location.host;function g5(e,t){const{pathname:n,search:a,hash:l}=t,o=e.indexOf("#");if(o>-1){let r=l.includes(e.slice(o))?e.slice(o).length:1,s=l.slice(r);return s[0]!=="/"&&(s="/"+s),zg(s,"")}return zg(n,e)+a+l}function mie(e,t,n,a){let l=[],o=[],r=null;const s=({state:p})=>{const g=g5(e,location),v=n.value,m=t.value;let h=0;if(p){if(n.value=g,t.value=p,r&&r===v){r=null;return}h=m?p.position-m.position:0}else a(g);l.forEach(y=>{y(n.value,v,{delta:h,type:T2.pop,direction:h?h>0?a0.forward:a0.back:a0.unknown})})};function u(){r=n.value}function c(p){l.push(p);const g=()=>{const v=l.indexOf(p);v>-1&&l.splice(v,1)};return o.push(g),g}function d(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(an({},p.state,{scroll:ef()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",s),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",s),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:u,listen:c,destroy:f}}function Wg(e,t,n,a=!1,l=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:l?ef():null}}function gie(e){const{history:t,location:n}=window,a={value:g5(e,n)},l={value:t.state};l.value||o(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(u,c,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:hie()+e+u;try{t[d?"replaceState":"pushState"](c,"",p),l.value=c}catch(g){console.error(g),n[d?"replace":"assign"](p)}}function r(u,c){o(u,an({},t.state,Wg(l.value.back,u,l.value.forward,!0),c,{position:l.value.position}),!0),a.value=u}function s(u,c){const d=an({},l.value,t.state,{forward:u,scroll:ef()});o(d.current,d,!0),o(u,an({},Wg(a.value,u,null),{position:d.position+1},c),!1),a.value=u}return{location:a,state:l,push:s,replace:r}}function yie(e){e=tie(e);const t=gie(e),n=mie(e,t.state,t.location,t.replace);function a(o,r=!0){r||n.pauseListeners(),history.go(o)}const l=an({location:"",base:e,go:a,createHref:aie.bind(null,e)},t,n);return Object.defineProperty(l,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(l,"state",{enumerable:!0,get:()=>t.state.value}),l}let cr=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Dn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Dn||{});const bie={type:cr.Static,value:""},wie=/[a-zA-Z0-9_]/;function Cie(e){if(!e)return[[]];if(e==="/")return[[bie]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=Dn.Static,a=n;const l=[];let o;function r(){o&&l.push(o),o=[]}let s=0,u,c="",d="";function f(){c&&(n===Dn.Static?o.push({type:cr.Static,value:c}):n===Dn.Param||n===Dn.ParamRegExp||n===Dn.ParamRegExpEnd?(o.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:cr.Param,value:c,regexp:d,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=u}for(;st.length?t.length===1&&t[0]===fa.Static+fa.Segment?1:-1:0}function y5(e,t){let n=0;const a=e.score,l=t.score;for(;n0&&t[t.length-1]<0}const Eie={strict:!1,end:!0,sensitive:!1};function Mie(e,t,n){const a=xie(Cie(e.path),n),l=an(a,{record:e,parent:t,children:[],alias:[]});return t&&!l.record.aliasOf==!t.record.aliasOf&&t.children.push(l),l}function Tie(e,t){const n=[],a=new Map;t=Bg(Eie,t);function l(f){return a.get(f)}function o(f,p,g){const v=!g,m=Yg(f);m.aliasOf=g&&g.record;const h=Bg(t,f),y=[m];if("alias"in f){const _=typeof f.alias=="string"?[f.alias]:f.alias;for(const x of _)y.push(Yg(an({},m,{components:g?g.record.components:m.components,path:x,aliasOf:g?g.record:m})))}let b,C;for(const _ of y){const{path:x}=_;if(p&&x[0]!=="/"){const k=p.record.path,M=k[k.length-1]==="/"?"":"/";_.path=p.record.path+(x&&M+x)}if(b=Mie(_,p,h),g?g.alias.push(b):(C=C||b,C!==b&&C.alias.push(b),v&&f.name&&!Gg(b)&&r(f.name)),b5(b)&&u(b),m.children){const k=m.children;for(let M=0;M{r(C)}:wi}function r(f){if(h5(f)){const p=a.get(f);p&&(a.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(r),p.alias.forEach(r))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&a.delete(f.record.name),f.children.forEach(r),f.alias.forEach(r))}}function s(){return n}function u(f){const p=Nie(f,n);n.splice(p,0,f),f.record.name&&!Gg(f)&&a.set(f.record.name,f)}function c(f,p){let g,v={},m,h;if("name"in f&&f.name){if(g=a.get(f.name),!g)throw ks(Nn.MATCHER_NOT_FOUND,{location:f});h=g.record.name,v=an(Ug(p.params,g.keys.filter(C=>!C.optional).concat(g.parent?g.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),f.params&&Ug(f.params,g.keys.map(C=>C.name))),m=g.stringify(v)}else if(f.path!=null)m=f.path,g=n.find(C=>C.re.test(m)),g&&(v=g.parse(m),h=g.record.name);else{if(g=p.name?a.get(p.name):n.find(C=>C.re.test(p.path)),!g)throw ks(Nn.MATCHER_NOT_FOUND,{location:f,currentLocation:p});h=g.record.name,v=an({},p.params,f.params),m=g.stringify(v)}const y=[];let b=g;for(;b;)y.unshift(b.record),b=b.parent;return{name:h,path:m,params:v,matched:y,meta:Oie(y)}}e.forEach(f=>o(f));function d(){n.length=0,a.clear()}return{addRoute:o,resolve:c,removeRoute:r,clearRoutes:d,getRoutes:s,getRecordMatcher:l}}function Ug(e,t){const n={};for(const a of t)a in e&&(n[a]=e[a]);return n}function Yg(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:$ie(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function $ie(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const a in e.components)t[a]=typeof n=="object"?n[a]:n;return t}function Gg(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Oie(e){return e.reduce((t,n)=>an(t,n.meta),{})}function Nie(e,t){let n=0,a=t.length;for(;n!==a;){const o=n+a>>1;y5(e,t[o])<0?a=o:n=o+1}const l=Aie(e);return l&&(a=t.lastIndexOf(l,a-1)),a}function Aie(e){let t=e;for(;t=t.parent;)if(b5(t)&&y5(e,t)===0)return t}function b5({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Xg(e){const t=Ie(tf),n=Ie(jv),a=S(()=>{const u=i(e.to);return t.resolve(u)}),l=S(()=>{const{matched:u}=a.value,{length:c}=u,d=u[c-1],f=n.matched;if(!d||!f.length)return-1;const p=f.findIndex(xs.bind(null,d));if(p>-1)return p;const g=Zg(u[c-2]);return c>1&&Zg(d)===g&&f[f.length-1].path!==g?f.findIndex(xs.bind(null,u[c-2])):p}),o=S(()=>l.value>-1&&Lie(n.params,a.value.params)),r=S(()=>l.value>-1&&l.value===n.matched.length-1&&v5(n.params,a.value.params));function s(u={}){if(Vie(u)){const c=t[i(e.replace)?"replace":"push"](i(e.to)).catch(wi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:a,href:S(()=>a.value.href),isActive:o,isExactActive:r,navigate:s}}function Rie(e){return e.length===1?e[0]:e}const Iie=D({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Xg,setup(e,{slots:t}){const n=Vt(Xg(e)),{options:a}=Ie(tf),l=S(()=>({[Jg(e.activeClass,a.linkActiveClass,"router-link-active")]:n.isActive,[Jg(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Rie(t.default(n));return e.custom?o:Ye("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:l.value},o)}}}),Pie=Iie;function Vie(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Lie(e,t){for(const n in t){const a=t[n],l=e[n];if(typeof a=="string"){if(a!==l)return!1}else if(!il(l)||l.length!==a.length||a.some((o,r)=>o.valueOf()!==l[r].valueOf()))return!1}return!0}function Zg(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Jg=(e,t,n)=>e??t??n,Bie=D({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const a=Ie(O2),l=S(()=>e.route||a.value),o=Ie(Kg,0),r=S(()=>{let c=i(o);const{matched:d}=l.value;let f;for(;(f=d[c])&&!f.components;)c++;return c}),s=S(()=>l.value.matched[r.value]);Ct(Kg,S(()=>r.value+1)),Ct(pie,s),Ct(O2,l);const u=L();return de(()=>[u.value,s.value,e.name],([c,d,f],[p,g,v])=>{d&&(d.instances[f]=c,g&&g!==d&&c&&c===p&&(d.leaveGuards.size||(d.leaveGuards=g.leaveGuards),d.updateGuards.size||(d.updateGuards=g.updateGuards))),c&&d&&(!g||!xs(d,g)||!p)&&(d.enterCallbacks[f]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=l.value,d=e.name,f=s.value,p=f&&f.components[d];if(!p)return Qg(n.default,{Component:p,route:c});const g=f.props[d],v=g?g===!0?c.params:typeof g=="function"?g(c):g:null,h=Ye(p,an({},v,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(f.instances[d]=null)},ref:u}));return Qg(n.default,{Component:h,route:c})||h}}});function Qg(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const zie=Bie;function Die(e){const t=Tie(e.routes,e),n=e.parseQuery||die,a=e.stringifyQuery||Fg,l=e.history,o=Xs(),r=Xs(),s=Xs(),u=Mt(So);let c=So;Ur&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=t0.bind(null,ee=>""+ee),f=t0.bind(null,Yse),p=t0.bind(null,Yi);function g(ee,fe){let ue,Y;return h5(ee)?(ue=t.getRecordMatcher(ee),Y=fe):Y=ee,t.addRoute(Y,ue)}function v(ee){const fe=t.getRecordMatcher(ee);fe&&t.removeRoute(fe)}function m(){return t.getRoutes().map(ee=>ee.record)}function h(ee){return!!t.getRecordMatcher(ee)}function y(ee,fe){if(fe=an({},fe||u.value),typeof ee=="string"){const ne=n0(n,ee,fe.path),ce=t.resolve({path:ne.path},fe),ve=l.createHref(ne.fullPath);return an(ne,ce,{params:p(ce.params),hash:Yi(ne.hash),redirectedFrom:void 0,href:ve})}let ue;if(ee.path!=null)ue=an({},ee,{path:n0(n,ee.path,fe.path).path});else{const ne=an({},ee.params);for(const ce in ne)ne[ce]==null&&delete ne[ce];ue=an({},ee,{params:f(ne)}),fe.params=f(fe.params)}const Y=t.resolve(ue,fe),X=ee.hash||"";Y.params=d(p(Y.params));const z=Zse(a,an({},ee,{hash:jse(X),path:Y.path})),G=l.createHref(z);return an({fullPath:z,hash:X,query:a===Fg?fie(ee.query):ee.query||{}},Y,{redirectedFrom:void 0,href:G})}function b(ee){return typeof ee=="string"?n0(n,ee,u.value.path):an({},ee)}function C(ee,fe){if(c!==ee)return ks(Nn.NAVIGATION_CANCELLED,{from:fe,to:ee})}function _(ee){return M(ee)}function x(ee){return _(an(b(ee),{replace:!0}))}function k(ee,fe){const ue=ee.matched[ee.matched.length-1];if(ue&&ue.redirect){const{redirect:Y}=ue;let X=typeof Y=="function"?Y(ee,fe):Y;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),an({query:ee.query,hash:ee.hash,params:X.path!=null?{}:ee.params},X)}}function M(ee,fe){const ue=c=y(ee),Y=u.value,X=ee.state,z=ee.force,G=ee.replace===!0,ne=k(ue,Y);if(ne)return M(an(b(ne),{state:typeof ne=="object"?an({},X,ne.state):X,force:z,replace:G}),fe||ue);const ce=ue;ce.redirectedFrom=fe;let ve;return!z&&Jse(a,Y,ue)&&(ve=ks(Nn.NAVIGATION_DUPLICATED,{to:ce,from:Y}),q(Y,Y,!0,!1)),(ve?Promise.resolve(ve):$(ce,Y)).catch(pe=>Kl(pe)?Kl(pe,Nn.NAVIGATION_GUARD_REDIRECT)?pe:K(pe):P(pe,ce,Y)).then(pe=>{if(pe){if(Kl(pe,Nn.NAVIGATION_GUARD_REDIRECT))return M(an({replace:G},b(pe.to),{state:typeof pe.to=="object"?an({},X,pe.to.state):X,force:z}),fe||ce)}else pe=R(ce,Y,!0,G,X);return I(ce,Y,pe),pe})}function T(ee,fe){const ue=C(ee,fe);return ue?Promise.reject(ue):Promise.resolve()}function N(ee){const fe=ae.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(ee):ee()}function $(ee,fe){let ue;const[Y,X,z]=vie(ee,fe);ue=l0(Y.reverse(),"beforeRouteLeave",ee,fe);for(const ne of Y)ne.leaveGuards.forEach(ce=>{ue.push(No(ce,ee,fe))});const G=T.bind(null,ee,fe);return ue.push(G),ie(ue).then(()=>{ue=[];for(const ne of o.list())ue.push(No(ne,ee,fe));return ue.push(G),ie(ue)}).then(()=>{ue=l0(X,"beforeRouteUpdate",ee,fe);for(const ne of X)ne.updateGuards.forEach(ce=>{ue.push(No(ce,ee,fe))});return ue.push(G),ie(ue)}).then(()=>{ue=[];for(const ne of z)if(ne.beforeEnter)if(il(ne.beforeEnter))for(const ce of ne.beforeEnter)ue.push(No(ce,ee,fe));else ue.push(No(ne.beforeEnter,ee,fe));return ue.push(G),ie(ue)}).then(()=>(ee.matched.forEach(ne=>ne.enterCallbacks={}),ue=l0(z,"beforeRouteEnter",ee,fe,N),ue.push(G),ie(ue))).then(()=>{ue=[];for(const ne of r.list())ue.push(No(ne,ee,fe));return ue.push(G),ie(ue)}).catch(ne=>Kl(ne,Nn.NAVIGATION_CANCELLED)?ne:Promise.reject(ne))}function I(ee,fe,ue){s.list().forEach(Y=>N(()=>Y(ee,fe,ue)))}function R(ee,fe,ue,Y,X){const z=C(ee,fe);if(z)return z;const G=fe===So,ne=Ur?history.state:{};ue&&(Y||G?l.replace(ee.fullPath,an({scroll:G&&ne&&ne.scroll},X)):l.push(ee.fullPath,X)),u.value=ee,q(ee,fe,ue,G),K()}let B;function U(){B||(B=l.listen((ee,fe,ue)=>{if(!te.listening)return;const Y=y(ee),X=k(Y,te.currentRoute.value);if(X){M(an(X,{replace:!0,force:!0}),Y).catch(wi);return}c=Y;const z=u.value;Ur&&rie(Hg(z.fullPath,ue.delta),ef()),$(Y,z).catch(G=>Kl(G,Nn.NAVIGATION_ABORTED|Nn.NAVIGATION_CANCELLED)?G:Kl(G,Nn.NAVIGATION_GUARD_REDIRECT)?(M(an(b(G.to),{force:!0}),Y).then(ne=>{Kl(ne,Nn.NAVIGATION_ABORTED|Nn.NAVIGATION_DUPLICATED)&&!ue.delta&&ue.type===T2.pop&&l.go(-1,!1)}).catch(wi),Promise.reject()):(ue.delta&&l.go(-ue.delta,!1),P(G,Y,z))).then(G=>{G=G||R(Y,z,!1),G&&(ue.delta&&!Kl(G,Nn.NAVIGATION_CANCELLED)?l.go(-ue.delta,!1):ue.type===T2.pop&&Kl(G,Nn.NAVIGATION_ABORTED|Nn.NAVIGATION_DUPLICATED)&&l.go(-1,!1)),I(Y,z,G)}).catch(wi)}))}let W=Xs(),F=Xs(),V;function P(ee,fe,ue){K(ee);const Y=F.list();return Y.length?Y.forEach(X=>X(ee,fe,ue)):console.error(ee),Promise.reject(ee)}function H(){return V&&u.value!==So?Promise.resolve():new Promise((ee,fe)=>{W.add([ee,fe])})}function K(ee){return V||(V=!ee,U(),W.list().forEach(([fe,ue])=>ee?ue(ee):fe()),W.reset()),ee}function q(ee,fe,ue,Y){const{scrollBehavior:X}=e;if(!Ur||!X)return Promise.resolve();const z=!ue&&sie(Hg(ee.fullPath,0))||(Y||!ue)&&history.state&&history.state.scroll||null;return Pe().then(()=>X(ee,fe,z)).then(G=>G&&oie(G)).catch(G=>P(G,ee,fe))}const j=ee=>l.go(ee);let Q;const ae=new Set,te={currentRoute:u,listening:!0,addRoute:g,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:h,getRoutes:m,resolve:y,options:e,push:_,replace:x,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:o.add,beforeResolve:r.add,afterEach:s.add,onError:F.add,isReady:H,install(ee){ee.component("RouterLink",Pie),ee.component("RouterView",zie),ee.config.globalProperties.$router=te,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>i(u)}),Ur&&!Q&&u.value===So&&(Q=!0,_(l.location).catch(Y=>{}));const fe={};for(const Y in So)Object.defineProperty(fe,Y,{get:()=>u.value[Y],enumerable:!0});ee.provide(tf,te),ee.provide(jv,fd(fe)),ee.provide(O2,u);const ue=ee.unmount;ae.add(ee),ee.unmount=function(){ae.delete(ee),ae.size<1&&(c=So,B&&B(),B=null,u.value=So,Q=!1,V=!1),ue()}}};function ie(ee){return ee.reduce((fe,ue)=>fe.then(()=>N(ue)),Promise.resolve())}return te}function Wie(){return Ie(tf)}function jie(e){return Ie(jv)}const Hie=[{path:"/login",name:"Login",component:()=>ea(()=>import("./Login-CfQEcRIy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),meta:{title:"登录"}},{path:"/register",name:"Register",component:()=>ea(()=>import("./Register-BaEzokbR.js"),__vite__mapDeps([10,1,2,11,4,5,7,8,9])),meta:{title:"注册"}},{path:"/",component:()=>ea(()=>import("./BlogLayout-CLJXj_0i.js"),__vite__mapDeps([12,13,1,2,14,4,15,8,16,17,18,19])),children:[{path:"",name:"Home",component:()=>ea(()=>import("./Home-Cbm5d2EI.js"),__vite__mapDeps([20,21,2,22,4,9,16,17,23,24,25,5,8])),meta:{title:"首页"}},{path:"article/:id",name:"ArticleDetail",component:()=>ea(()=>import("./ArticleDetail-DPqbcIbT.js"),__vite__mapDeps([26,21,2,27,1,28,4,29,19,9,8,23])),meta:{title:"文章详情"}}]},{path:"/app",component:()=>ea(()=>import("./AppLayout-DSAX1K3T.js"),__vite__mapDeps([30,13,31,4,32,15,17])),meta:{requiresAuth:!0},children:[{path:"dashboard",name:"Dashboard",component:()=>ea(()=>import("./Dashboard-D_uVUpVV.js"),__vite__mapDeps([33,1,2,4,34,5])),meta:{title:"控制台",requiresAuth:!0}},{path:"articles",name:"MyArticles",component:()=>ea(()=>import("./MyArticles-6cpz4JNa.js"),__vite__mapDeps([35,13,21,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"我的文章",requiresAuth:!0}},{path:"editor",name:"NewArticle",component:()=>ea(()=>import("./ArticleEditor-Dsa5A3kx.js"),__vite__mapDeps([37,21,2,38,4,7,18,8,16,17,23,24,9])),meta:{title:"写文章",requiresAuth:!0}},{path:"editor/:id",name:"EditArticle",component:()=>ea(()=>import("./ArticleEditor-Dsa5A3kx.js"),__vite__mapDeps([37,21,2,38,4,7,18,8,16,17,23,24,9])),meta:{title:"编辑文章",requiresAuth:!0}}]},{path:"/admin",component:()=>ea(()=>import("./AdminLayout-DvP_sFm_.js"),__vite__mapDeps([39,13,1,2,40,4,32,15,8,17])),meta:{requiresAuth:!0,requiresAdmin:!0},children:[{path:"",name:"AdminDashboard",component:()=>ea(()=>import("./Dashboard-53hykQZu.js"),__vite__mapDeps([41,4,34,5])),meta:{title:"管理后台",requiresAuth:!0,requiresAdmin:!0}},{path:"users",name:"AdminUsers",component:()=>ea(()=>import("./Users-wLT3o-KQ.js"),__vite__mapDeps([42,13,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"用户管理",requiresAuth:!0,requiresAdmin:!0}},{path:"articles",name:"AdminArticles",component:()=>ea(()=>import("./Articles-Cgk7tDWL.js"),__vite__mapDeps([43,13,21,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"文章管理",requiresAuth:!0,requiresAdmin:!0}},{path:"comments",name:"AdminComments",component:()=>ea(()=>import("./Comments-Cu7IbXrL.js"),__vite__mapDeps([44,13,27,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"评论管理",requiresAuth:!0,requiresAdmin:!0}},{path:"categories",name:"AdminCategories",component:()=>ea(()=>import("./Categories-BgfxW3SS.js"),__vite__mapDeps([45,13,21,2,46,4,29,7,9,16,17,6,36,23,8])),meta:{title:"分类管理",requiresAuth:!0,requiresAdmin:!0}}]}],w5=Die({history:yie(),routes:Hie});w5.beforeEach((e,t,n)=>{document.title=e.meta.title?`${e.meta.title} - 博客系统`:"博客系统";const a=localStorage.getItem("access_token"),l=JSON.parse(localStorage.getItem("user_info")||"null");e.meta.requiresAuth&&!a?n({name:"Login",query:{redirect:e.fullPath}}):e.meta.requiresAdmin&&(l==null?void 0:l.role)!=="ADMIN"?n({name:"Home"}):n()});const ku=$3(Ase);for(const[e,t]of Object.entries(Az))ku.component(e,t);ku.use(UC());ku.use(w5);ku.use(Mse,{locale:Tse});ku.mount("#app");export{Fa as $,fQ as A,cb as B,Rj as C,pq as D,vU as E,jo as F,Tb as G,ete as H,aae as I,ine as J,une as K,nae as L,to as M,Fe as N,S as O,E as P,se as Q,re as R,O as S,wt as T,J as U,Fie as V,D as W,Kie as X,ht as Y,Ye as Z,$se as _,tF as a,Pe as a0,Dt as a1,gt as a2,w as a3,L as a4,xt as a5,It as a6,w5 as a7,Mt as a8,xe as a9,i as aa,jie as ab,Wie as ac,bi as ad,sa as ae,le as af,pt as ag,sn as ah,Xe as ai,Ln as b,iy as c,kW as d,sl as e,mq as f,pU as g,FG as h,Bb as i,FX as j,KX as k,WX as l,hU as m,BD as n,zD as o,mU as p,ze as q,AZ as r,jn as s,Gb as t,gU as u,SJ as v,xJ as w,Hre as x,tse as y,Hc as z}; + */let hie=()=>location.protocol+"//"+location.host;function g5(e,t){const{pathname:n,search:a,hash:l}=t,o=e.indexOf("#");if(o>-1){let r=l.includes(e.slice(o))?e.slice(o).length:1,s=l.slice(r);return s[0]!=="/"&&(s="/"+s),zg(s,"")}return zg(n,e)+a+l}function mie(e,t,n,a){let l=[],o=[],r=null;const s=({state:p})=>{const g=g5(e,location),v=n.value,m=t.value;let h=0;if(p){if(n.value=g,t.value=p,r&&r===v){r=null;return}h=m?p.position-m.position:0}else a(g);l.forEach(y=>{y(n.value,v,{delta:h,type:T2.pop,direction:h?h>0?a0.forward:a0.back:a0.unknown})})};function u(){r=n.value}function c(p){l.push(p);const g=()=>{const v=l.indexOf(p);v>-1&&l.splice(v,1)};return o.push(g),g}function d(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(an({},p.state,{scroll:ef()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",s),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",s),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:u,listen:c,destroy:f}}function Wg(e,t,n,a=!1,l=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:l?ef():null}}function gie(e){const{history:t,location:n}=window,a={value:g5(e,n)},l={value:t.state};l.value||o(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(u,c,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:hie()+e+u;try{t[d?"replaceState":"pushState"](c,"",p),l.value=c}catch(g){console.error(g),n[d?"replace":"assign"](p)}}function r(u,c){o(u,an({},t.state,Wg(l.value.back,u,l.value.forward,!0),c,{position:l.value.position}),!0),a.value=u}function s(u,c){const d=an({},l.value,t.state,{forward:u,scroll:ef()});o(d.current,d,!0),o(u,an({},Wg(a.value,u,null),{position:d.position+1},c),!1),a.value=u}return{location:a,state:l,push:s,replace:r}}function yie(e){e=tie(e);const t=gie(e),n=mie(e,t.state,t.location,t.replace);function a(o,r=!0){r||n.pauseListeners(),history.go(o)}const l=an({location:"",base:e,go:a,createHref:aie.bind(null,e)},t,n);return Object.defineProperty(l,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(l,"state",{enumerable:!0,get:()=>t.state.value}),l}let cr=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Dn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Dn||{});const bie={type:cr.Static,value:""},wie=/[a-zA-Z0-9_]/;function Cie(e){if(!e)return[[]];if(e==="/")return[[bie]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=Dn.Static,a=n;const l=[];let o;function r(){o&&l.push(o),o=[]}let s=0,u,c="",d="";function f(){c&&(n===Dn.Static?o.push({type:cr.Static,value:c}):n===Dn.Param||n===Dn.ParamRegExp||n===Dn.ParamRegExpEnd?(o.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:cr.Param,value:c,regexp:d,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=u}for(;st.length?t.length===1&&t[0]===fa.Static+fa.Segment?1:-1:0}function y5(e,t){let n=0;const a=e.score,l=t.score;for(;n0&&t[t.length-1]<0}const Eie={strict:!1,end:!0,sensitive:!1};function Mie(e,t,n){const a=xie(Cie(e.path),n),l=an(a,{record:e,parent:t,children:[],alias:[]});return t&&!l.record.aliasOf==!t.record.aliasOf&&t.children.push(l),l}function Tie(e,t){const n=[],a=new Map;t=Bg(Eie,t);function l(f){return a.get(f)}function o(f,p,g){const v=!g,m=Yg(f);m.aliasOf=g&&g.record;const h=Bg(t,f),y=[m];if("alias"in f){const _=typeof f.alias=="string"?[f.alias]:f.alias;for(const x of _)y.push(Yg(an({},m,{components:g?g.record.components:m.components,path:x,aliasOf:g?g.record:m})))}let b,C;for(const _ of y){const{path:x}=_;if(p&&x[0]!=="/"){const k=p.record.path,M=k[k.length-1]==="/"?"":"/";_.path=p.record.path+(x&&M+x)}if(b=Mie(_,p,h),g?g.alias.push(b):(C=C||b,C!==b&&C.alias.push(b),v&&f.name&&!Gg(b)&&r(f.name)),b5(b)&&u(b),m.children){const k=m.children;for(let M=0;M{r(C)}:wi}function r(f){if(h5(f)){const p=a.get(f);p&&(a.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(r),p.alias.forEach(r))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&a.delete(f.record.name),f.children.forEach(r),f.alias.forEach(r))}}function s(){return n}function u(f){const p=Nie(f,n);n.splice(p,0,f),f.record.name&&!Gg(f)&&a.set(f.record.name,f)}function c(f,p){let g,v={},m,h;if("name"in f&&f.name){if(g=a.get(f.name),!g)throw ks(Nn.MATCHER_NOT_FOUND,{location:f});h=g.record.name,v=an(Ug(p.params,g.keys.filter(C=>!C.optional).concat(g.parent?g.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),f.params&&Ug(f.params,g.keys.map(C=>C.name))),m=g.stringify(v)}else if(f.path!=null)m=f.path,g=n.find(C=>C.re.test(m)),g&&(v=g.parse(m),h=g.record.name);else{if(g=p.name?a.get(p.name):n.find(C=>C.re.test(p.path)),!g)throw ks(Nn.MATCHER_NOT_FOUND,{location:f,currentLocation:p});h=g.record.name,v=an({},p.params,f.params),m=g.stringify(v)}const y=[];let b=g;for(;b;)y.unshift(b.record),b=b.parent;return{name:h,path:m,params:v,matched:y,meta:Oie(y)}}e.forEach(f=>o(f));function d(){n.length=0,a.clear()}return{addRoute:o,resolve:c,removeRoute:r,clearRoutes:d,getRoutes:s,getRecordMatcher:l}}function Ug(e,t){const n={};for(const a of t)a in e&&(n[a]=e[a]);return n}function Yg(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:$ie(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function $ie(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const a in e.components)t[a]=typeof n=="object"?n[a]:n;return t}function Gg(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Oie(e){return e.reduce((t,n)=>an(t,n.meta),{})}function Nie(e,t){let n=0,a=t.length;for(;n!==a;){const o=n+a>>1;y5(e,t[o])<0?a=o:n=o+1}const l=Aie(e);return l&&(a=t.lastIndexOf(l,a-1)),a}function Aie(e){let t=e;for(;t=t.parent;)if(b5(t)&&y5(e,t)===0)return t}function b5({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Xg(e){const t=Ie(tf),n=Ie(jv),a=S(()=>{const u=i(e.to);return t.resolve(u)}),l=S(()=>{const{matched:u}=a.value,{length:c}=u,d=u[c-1],f=n.matched;if(!d||!f.length)return-1;const p=f.findIndex(xs.bind(null,d));if(p>-1)return p;const g=Zg(u[c-2]);return c>1&&Zg(d)===g&&f[f.length-1].path!==g?f.findIndex(xs.bind(null,u[c-2])):p}),o=S(()=>l.value>-1&&Lie(n.params,a.value.params)),r=S(()=>l.value>-1&&l.value===n.matched.length-1&&v5(n.params,a.value.params));function s(u={}){if(Vie(u)){const c=t[i(e.replace)?"replace":"push"](i(e.to)).catch(wi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:a,href:S(()=>a.value.href),isActive:o,isExactActive:r,navigate:s}}function Rie(e){return e.length===1?e[0]:e}const Iie=D({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Xg,setup(e,{slots:t}){const n=Vt(Xg(e)),{options:a}=Ie(tf),l=S(()=>({[Jg(e.activeClass,a.linkActiveClass,"router-link-active")]:n.isActive,[Jg(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Rie(t.default(n));return e.custom?o:Ye("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:l.value},o)}}}),Pie=Iie;function Vie(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Lie(e,t){for(const n in t){const a=t[n],l=e[n];if(typeof a=="string"){if(a!==l)return!1}else if(!il(l)||l.length!==a.length||a.some((o,r)=>o.valueOf()!==l[r].valueOf()))return!1}return!0}function Zg(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Jg=(e,t,n)=>e??t??n,Bie=D({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const a=Ie(O2),l=S(()=>e.route||a.value),o=Ie(Kg,0),r=S(()=>{let c=i(o);const{matched:d}=l.value;let f;for(;(f=d[c])&&!f.components;)c++;return c}),s=S(()=>l.value.matched[r.value]);Ct(Kg,S(()=>r.value+1)),Ct(pie,s),Ct(O2,l);const u=L();return de(()=>[u.value,s.value,e.name],([c,d,f],[p,g,v])=>{d&&(d.instances[f]=c,g&&g!==d&&c&&c===p&&(d.leaveGuards.size||(d.leaveGuards=g.leaveGuards),d.updateGuards.size||(d.updateGuards=g.updateGuards))),c&&d&&(!g||!xs(d,g)||!p)&&(d.enterCallbacks[f]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=l.value,d=e.name,f=s.value,p=f&&f.components[d];if(!p)return Qg(n.default,{Component:p,route:c});const g=f.props[d],v=g?g===!0?c.params:typeof g=="function"?g(c):g:null,h=Ye(p,an({},v,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(f.instances[d]=null)},ref:u}));return Qg(n.default,{Component:h,route:c})||h}}});function Qg(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const zie=Bie;function Die(e){const t=Tie(e.routes,e),n=e.parseQuery||die,a=e.stringifyQuery||Fg,l=e.history,o=Xs(),r=Xs(),s=Xs(),u=Mt(So);let c=So;Ur&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=t0.bind(null,ee=>""+ee),f=t0.bind(null,Yse),p=t0.bind(null,Yi);function g(ee,fe){let ue,Y;return h5(ee)?(ue=t.getRecordMatcher(ee),Y=fe):Y=ee,t.addRoute(Y,ue)}function v(ee){const fe=t.getRecordMatcher(ee);fe&&t.removeRoute(fe)}function m(){return t.getRoutes().map(ee=>ee.record)}function h(ee){return!!t.getRecordMatcher(ee)}function y(ee,fe){if(fe=an({},fe||u.value),typeof ee=="string"){const ne=n0(n,ee,fe.path),ce=t.resolve({path:ne.path},fe),ve=l.createHref(ne.fullPath);return an(ne,ce,{params:p(ce.params),hash:Yi(ne.hash),redirectedFrom:void 0,href:ve})}let ue;if(ee.path!=null)ue=an({},ee,{path:n0(n,ee.path,fe.path).path});else{const ne=an({},ee.params);for(const ce in ne)ne[ce]==null&&delete ne[ce];ue=an({},ee,{params:f(ne)}),fe.params=f(fe.params)}const Y=t.resolve(ue,fe),X=ee.hash||"";Y.params=d(p(Y.params));const z=Zse(a,an({},ee,{hash:jse(X),path:Y.path})),G=l.createHref(z);return an({fullPath:z,hash:X,query:a===Fg?fie(ee.query):ee.query||{}},Y,{redirectedFrom:void 0,href:G})}function b(ee){return typeof ee=="string"?n0(n,ee,u.value.path):an({},ee)}function C(ee,fe){if(c!==ee)return ks(Nn.NAVIGATION_CANCELLED,{from:fe,to:ee})}function _(ee){return M(ee)}function x(ee){return _(an(b(ee),{replace:!0}))}function k(ee,fe){const ue=ee.matched[ee.matched.length-1];if(ue&&ue.redirect){const{redirect:Y}=ue;let X=typeof Y=="function"?Y(ee,fe):Y;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),an({query:ee.query,hash:ee.hash,params:X.path!=null?{}:ee.params},X)}}function M(ee,fe){const ue=c=y(ee),Y=u.value,X=ee.state,z=ee.force,G=ee.replace===!0,ne=k(ue,Y);if(ne)return M(an(b(ne),{state:typeof ne=="object"?an({},X,ne.state):X,force:z,replace:G}),fe||ue);const ce=ue;ce.redirectedFrom=fe;let ve;return!z&&Jse(a,Y,ue)&&(ve=ks(Nn.NAVIGATION_DUPLICATED,{to:ce,from:Y}),q(Y,Y,!0,!1)),(ve?Promise.resolve(ve):$(ce,Y)).catch(pe=>Kl(pe)?Kl(pe,Nn.NAVIGATION_GUARD_REDIRECT)?pe:K(pe):P(pe,ce,Y)).then(pe=>{if(pe){if(Kl(pe,Nn.NAVIGATION_GUARD_REDIRECT))return M(an({replace:G},b(pe.to),{state:typeof pe.to=="object"?an({},X,pe.to.state):X,force:z}),fe||ce)}else pe=R(ce,Y,!0,G,X);return I(ce,Y,pe),pe})}function T(ee,fe){const ue=C(ee,fe);return ue?Promise.reject(ue):Promise.resolve()}function N(ee){const fe=ae.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(ee):ee()}function $(ee,fe){let ue;const[Y,X,z]=vie(ee,fe);ue=l0(Y.reverse(),"beforeRouteLeave",ee,fe);for(const ne of Y)ne.leaveGuards.forEach(ce=>{ue.push(No(ce,ee,fe))});const G=T.bind(null,ee,fe);return ue.push(G),ie(ue).then(()=>{ue=[];for(const ne of o.list())ue.push(No(ne,ee,fe));return ue.push(G),ie(ue)}).then(()=>{ue=l0(X,"beforeRouteUpdate",ee,fe);for(const ne of X)ne.updateGuards.forEach(ce=>{ue.push(No(ce,ee,fe))});return ue.push(G),ie(ue)}).then(()=>{ue=[];for(const ne of z)if(ne.beforeEnter)if(il(ne.beforeEnter))for(const ce of ne.beforeEnter)ue.push(No(ce,ee,fe));else ue.push(No(ne.beforeEnter,ee,fe));return ue.push(G),ie(ue)}).then(()=>(ee.matched.forEach(ne=>ne.enterCallbacks={}),ue=l0(z,"beforeRouteEnter",ee,fe,N),ue.push(G),ie(ue))).then(()=>{ue=[];for(const ne of r.list())ue.push(No(ne,ee,fe));return ue.push(G),ie(ue)}).catch(ne=>Kl(ne,Nn.NAVIGATION_CANCELLED)?ne:Promise.reject(ne))}function I(ee,fe,ue){s.list().forEach(Y=>N(()=>Y(ee,fe,ue)))}function R(ee,fe,ue,Y,X){const z=C(ee,fe);if(z)return z;const G=fe===So,ne=Ur?history.state:{};ue&&(Y||G?l.replace(ee.fullPath,an({scroll:G&&ne&&ne.scroll},X)):l.push(ee.fullPath,X)),u.value=ee,q(ee,fe,ue,G),K()}let B;function U(){B||(B=l.listen((ee,fe,ue)=>{if(!te.listening)return;const Y=y(ee),X=k(Y,te.currentRoute.value);if(X){M(an(X,{replace:!0,force:!0}),Y).catch(wi);return}c=Y;const z=u.value;Ur&&rie(Hg(z.fullPath,ue.delta),ef()),$(Y,z).catch(G=>Kl(G,Nn.NAVIGATION_ABORTED|Nn.NAVIGATION_CANCELLED)?G:Kl(G,Nn.NAVIGATION_GUARD_REDIRECT)?(M(an(b(G.to),{force:!0}),Y).then(ne=>{Kl(ne,Nn.NAVIGATION_ABORTED|Nn.NAVIGATION_DUPLICATED)&&!ue.delta&&ue.type===T2.pop&&l.go(-1,!1)}).catch(wi),Promise.reject()):(ue.delta&&l.go(-ue.delta,!1),P(G,Y,z))).then(G=>{G=G||R(Y,z,!1),G&&(ue.delta&&!Kl(G,Nn.NAVIGATION_CANCELLED)?l.go(-ue.delta,!1):ue.type===T2.pop&&Kl(G,Nn.NAVIGATION_ABORTED|Nn.NAVIGATION_DUPLICATED)&&l.go(-1,!1)),I(Y,z,G)}).catch(wi)}))}let W=Xs(),F=Xs(),V;function P(ee,fe,ue){K(ee);const Y=F.list();return Y.length?Y.forEach(X=>X(ee,fe,ue)):console.error(ee),Promise.reject(ee)}function H(){return V&&u.value!==So?Promise.resolve():new Promise((ee,fe)=>{W.add([ee,fe])})}function K(ee){return V||(V=!ee,U(),W.list().forEach(([fe,ue])=>ee?ue(ee):fe()),W.reset()),ee}function q(ee,fe,ue,Y){const{scrollBehavior:X}=e;if(!Ur||!X)return Promise.resolve();const z=!ue&&sie(Hg(ee.fullPath,0))||(Y||!ue)&&history.state&&history.state.scroll||null;return Pe().then(()=>X(ee,fe,z)).then(G=>G&&oie(G)).catch(G=>P(G,ee,fe))}const j=ee=>l.go(ee);let Q;const ae=new Set,te={currentRoute:u,listening:!0,addRoute:g,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:h,getRoutes:m,resolve:y,options:e,push:_,replace:x,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:o.add,beforeResolve:r.add,afterEach:s.add,onError:F.add,isReady:H,install(ee){ee.component("RouterLink",Pie),ee.component("RouterView",zie),ee.config.globalProperties.$router=te,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>i(u)}),Ur&&!Q&&u.value===So&&(Q=!0,_(l.location).catch(Y=>{}));const fe={};for(const Y in So)Object.defineProperty(fe,Y,{get:()=>u.value[Y],enumerable:!0});ee.provide(tf,te),ee.provide(jv,fd(fe)),ee.provide(O2,u);const ue=ee.unmount;ae.add(ee),ee.unmount=function(){ae.delete(ee),ae.size<1&&(c=So,B&&B(),B=null,u.value=So,Q=!1,V=!1),ue()}}};function ie(ee){return ee.reduce((fe,ue)=>fe.then(()=>N(ue)),Promise.resolve())}return te}function Wie(){return Ie(tf)}function jie(e){return Ie(jv)}const Hie=[{path:"/login",name:"Login",component:()=>ea(()=>import("./Login-D8Rj1Gt6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),meta:{title:"登录"}},{path:"/register",name:"Register",component:()=>ea(()=>import("./Register-D9JHUvWr.js"),__vite__mapDeps([10,1,2,11,4,5,7,8,9])),meta:{title:"注册"}},{path:"/",component:()=>ea(()=>import("./BlogLayout-JD_c-qtM.js"),__vite__mapDeps([12,13,1,2,14,4,15,8,16,17,18,19])),children:[{path:"",name:"Home",component:()=>ea(()=>import("./Home-BVqtfCF5.js"),__vite__mapDeps([20,21,2,22,4,9,16,17,23,24,25,5,8])),meta:{title:"首页"}},{path:"article/:id",name:"ArticleDetail",component:()=>ea(()=>import("./ArticleDetail-X20yYhRb.js"),__vite__mapDeps([26,21,2,27,1,28,4,29,19,9,8,23])),meta:{title:"文章详情"}}]},{path:"/app",component:()=>ea(()=>import("./AppLayout-BQINpGrT.js"),__vite__mapDeps([30,13,31,4,32,15,17])),meta:{requiresAuth:!0},children:[{path:"dashboard",name:"Dashboard",component:()=>ea(()=>import("./Dashboard-ClOQVQTs.js"),__vite__mapDeps([33,1,2,4,34,5])),meta:{title:"控制台",requiresAuth:!0}},{path:"articles",name:"MyArticles",component:()=>ea(()=>import("./MyArticles-DScevaa7.js"),__vite__mapDeps([35,13,21,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"我的文章",requiresAuth:!0}},{path:"editor",name:"NewArticle",component:()=>ea(()=>import("./ArticleEditor-Dgihcg_m.js"),__vite__mapDeps([37,21,2,38,4,7,18,8,16,17,23,24,9])),meta:{title:"写文章",requiresAuth:!0}},{path:"editor/:id",name:"EditArticle",component:()=>ea(()=>import("./ArticleEditor-Dgihcg_m.js"),__vite__mapDeps([37,21,2,38,4,7,18,8,16,17,23,24,9])),meta:{title:"编辑文章",requiresAuth:!0}}]},{path:"/admin",component:()=>ea(()=>import("./AdminLayout-qkY3YKJ7.js"),__vite__mapDeps([39,13,1,2,40,4,32,15,8,17])),meta:{requiresAuth:!0,requiresAdmin:!0},children:[{path:"",name:"AdminDashboard",component:()=>ea(()=>import("./Dashboard-BA3fZ-pb.js"),__vite__mapDeps([41,4,34,5])),meta:{title:"管理后台",requiresAuth:!0,requiresAdmin:!0}},{path:"users",name:"AdminUsers",component:()=>ea(()=>import("./Users-CrD0A4lX.js"),__vite__mapDeps([42,13,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"用户管理",requiresAuth:!0,requiresAdmin:!0}},{path:"articles",name:"AdminArticles",component:()=>ea(()=>import("./Articles-BxbKIKuf.js"),__vite__mapDeps([43,13,21,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"文章管理",requiresAuth:!0,requiresAdmin:!0}},{path:"comments",name:"AdminComments",component:()=>ea(()=>import("./Comments-DJzfGb7i.js"),__vite__mapDeps([44,13,27,2,4,29,9,16,17,23,24,25,6,36,8])),meta:{title:"评论管理",requiresAuth:!0,requiresAdmin:!0}},{path:"categories",name:"AdminCategories",component:()=>ea(()=>import("./Categories-DekTCGMM.js"),__vite__mapDeps([45,13,21,2,46,4,29,7,9,16,17,6,36,23,8])),meta:{title:"分类管理",requiresAuth:!0,requiresAdmin:!0}}]}],w5=Die({history:yie(),routes:Hie});w5.beforeEach((e,t,n)=>{document.title=e.meta.title?`${e.meta.title} - 博客系统`:"博客系统";const a=localStorage.getItem("access_token"),l=JSON.parse(localStorage.getItem("user_info")||"null");e.meta.requiresAuth&&!a?n({name:"Login",query:{redirect:e.fullPath}}):e.meta.requiresAdmin&&(l==null?void 0:l.role)!=="ADMIN"?n({name:"Home"}):n()});const ku=$3(Ase);for(const[e,t]of Object.entries(Az))ku.component(e,t);ku.use(UC());ku.use(w5);ku.use(Mse,{locale:Tse});ku.mount("#app");export{Fa as $,fQ as A,cb as B,Rj as C,pq as D,vU as E,jo as F,Tb as G,ete as H,aae as I,ine as J,une as K,nae as L,to as M,Fe as N,S as O,E as P,se as Q,re as R,O as S,wt as T,J as U,Fie as V,D as W,Kie as X,ht as Y,Ye as Z,$se as _,tF as a,Pe as a0,Dt as a1,gt as a2,w as a3,L as a4,xt as a5,It as a6,w5 as a7,Mt as a8,xe as a9,i as aa,jie as ab,Wie as ac,bi as ad,sa as ae,le as af,pt as ag,sn as ah,Xe as ai,Ln as b,iy as c,kW as d,sl as e,mq as f,pU as g,FG as h,Bb as i,FX as j,KX as k,WX as l,hU as m,BD as n,zD as o,mU as p,ze as q,AZ as r,jn as s,Gb as t,gU as u,SJ as v,xJ as w,Hre as x,tse as y,Hc as z}; diff --git a/jog-admin/src/main/resources/static/assets/request-D458e9ik.js b/jog-admin/src/main/resources/static/assets/request-BdgcZPJd.js similarity index 99% rename from jog-admin/src/main/resources/static/assets/request-D458e9ik.js rename to jog-admin/src/main/resources/static/assets/request-BdgcZPJd.js index 85ff1b4..a3340b9 100644 --- a/jog-admin/src/main/resources/static/assets/request-D458e9ik.js +++ b/jog-admin/src/main/resources/static/assets/request-BdgcZPJd.js @@ -1,4 +1,4 @@ -import{x as Y,a7 as $e}from"./index-Ce3OdoWB.js";function st(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ct}=Object.prototype,{getPrototypeOf:pe}=Object,{iterator:he,toStringTag:ot}=Symbol,me=(e=>t=>{const n=Ct.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),L=e=>(e=e.toLowerCase(),t=>me(t)===e),ye=e=>t=>typeof t===e,{isArray:K}=Array,v=ye("undefined");function ee(e){return e!==null&&!v(e)&&e.constructor!==null&&!v(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const it=L("ArrayBuffer");function Nt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&it(e.buffer),t}const Pt=ye("string"),C=ye("function"),at=ye("number"),te=e=>e!==null&&typeof e=="object",Dt=e=>e===!0||e===!1,le=e=>{if(me(e)!=="object")return!1;const t=pe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ot in e)&&!(he in e)},Lt=e=>{if(!te(e)||ee(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ft=L("Date"),Ut=L("File"),Bt=e=>!!(e&&typeof e.uri<"u"),kt=e=>e&&typeof e.getParts<"u",It=L("Blob"),jt=L("FileList"),qt=e=>te(e)&&C(e.pipe);function Ht(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ve=Ht(),Je=typeof Ve.FormData<"u"?Ve.FormData:void 0,Mt=e=>{if(!e)return!1;if(Je&&e instanceof Je)return!0;const t=pe(e);if(!t||t===Object.prototype||!C(e.append))return!1;const n=me(e);return n==="formdata"||n==="object"&&C(e.toString)&&e.toString()==="[object FormData]"},zt=L("URLSearchParams"),[$t,Vt,Jt,Wt]=["ReadableStream","Request","Response","Headers"].map(L),vt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lt=e=>!v(e)&&e!==z;function Te(...e){const{caseless:t,skipUndefined:n}=lt(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&ct(r,i)||i,l=xe(r,c)?r[c]:void 0;le(l)&&le(o)?r[c]=Te(l,o):le(o)?r[c]=Te({},o):K(o)?r[c]=o.slice():(!n||!v(o))&&(r[c]=o)};for(let o=0,i=e.length;o(ne(t,(s,o)=>{n&&C(s)?Object.defineProperty(e,o,{__proto__:null,value:st(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Xt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Qt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&pe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Yt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zt=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!at(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},en=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pe(Uint8Array)),tn=(e,t)=>{const r=(e&&e[he]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},nn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},rn=L("HTMLFormElement"),sn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),on=L("RegExp"),ut=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ne(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},an=e=>{ut(e,(t,n)=>{if(C(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(C(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return K(e)?r(e):r(String(e).split(t)),n},ln=()=>{},un=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function fn(e){return!!(e&&C(e.append)&&e[ot]==="FormData"&&e[he])}const dn=e=>{const t=new WeakSet,n=r=>{if(te(r)){if(t.has(r))return;if(ee(r))return r;if(!("toJSON"in r)){t.add(r);const s=K(r)?[]:{};return ne(r,(o,i)=>{const c=n(o);!v(c)&&(s[i]=c)}),t.delete(r),s}}return r};return n(e)},pn=L("AsyncFunction"),hn=e=>e&&(te(e)||C(e))&&C(e.then)&&C(e.catch),ft=((e,t)=>e?setImmediate:t?((n,r)=>(z.addEventListener("message",({source:s,data:o})=>{s===z&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",C(z.postMessage)),mn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||ft,yn=e=>e!=null&&C(e[he]),a={isArray:K,isArrayBuffer:it,isBuffer:ee,isFormData:Mt,isArrayBufferView:Nt,isString:Pt,isNumber:at,isBoolean:Dt,isObject:te,isPlainObject:le,isEmptyObject:Lt,isReadableStream:$t,isRequest:Vt,isResponse:Jt,isHeaders:Wt,isUndefined:v,isDate:Ft,isFile:Ut,isReactNativeBlob:Bt,isReactNative:kt,isBlob:It,isRegExp:on,isFunction:C,isStream:qt,isURLSearchParams:zt,isTypedArray:en,isFileList:jt,forEach:ne,merge:Te,extend:Kt,trim:vt,stripBOM:Xt,inherits:Gt,toFlatObject:Qt,kindOf:me,kindOfTest:L,endsWith:Yt,toArray:Zt,forEachEntry:tn,matchAll:nn,isHTMLForm:rn,hasOwnProperty:xe,hasOwnProp:xe,reduceDescriptors:ut,freezeMethods:an,toObjectSet:cn,toCamelCase:sn,noop:ln,toFiniteNumber:un,findKey:ct,global:z,isContextDefined:lt,isSpecCompliantForm:fn,toJSONObject:dn,isAsyncFn:pn,isThenable:hn,setImmediate:ft,asap:mn,isIterable:yn},bn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wn=e=>{const t={};let n,r,s;return e&&e.split(` +import{x as Y,a7 as $e}from"./index-CptE6QA-.js";function st(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ct}=Object.prototype,{getPrototypeOf:pe}=Object,{iterator:he,toStringTag:ot}=Symbol,me=(e=>t=>{const n=Ct.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),L=e=>(e=e.toLowerCase(),t=>me(t)===e),ye=e=>t=>typeof t===e,{isArray:K}=Array,v=ye("undefined");function ee(e){return e!==null&&!v(e)&&e.constructor!==null&&!v(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const it=L("ArrayBuffer");function Nt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&it(e.buffer),t}const Pt=ye("string"),C=ye("function"),at=ye("number"),te=e=>e!==null&&typeof e=="object",Dt=e=>e===!0||e===!1,le=e=>{if(me(e)!=="object")return!1;const t=pe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ot in e)&&!(he in e)},Lt=e=>{if(!te(e)||ee(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ft=L("Date"),Ut=L("File"),Bt=e=>!!(e&&typeof e.uri<"u"),kt=e=>e&&typeof e.getParts<"u",It=L("Blob"),jt=L("FileList"),qt=e=>te(e)&&C(e.pipe);function Ht(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ve=Ht(),Je=typeof Ve.FormData<"u"?Ve.FormData:void 0,Mt=e=>{if(!e)return!1;if(Je&&e instanceof Je)return!0;const t=pe(e);if(!t||t===Object.prototype||!C(e.append))return!1;const n=me(e);return n==="formdata"||n==="object"&&C(e.toString)&&e.toString()==="[object FormData]"},zt=L("URLSearchParams"),[$t,Vt,Jt,Wt]=["ReadableStream","Request","Response","Headers"].map(L),vt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lt=e=>!v(e)&&e!==z;function Te(...e){const{caseless:t,skipUndefined:n}=lt(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&ct(r,i)||i,l=xe(r,c)?r[c]:void 0;le(l)&&le(o)?r[c]=Te(l,o):le(o)?r[c]=Te({},o):K(o)?r[c]=o.slice():(!n||!v(o))&&(r[c]=o)};for(let o=0,i=e.length;o(ne(t,(s,o)=>{n&&C(s)?Object.defineProperty(e,o,{__proto__:null,value:st(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Xt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Qt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&pe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Yt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zt=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!at(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},en=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pe(Uint8Array)),tn=(e,t)=>{const r=(e&&e[he]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},nn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},rn=L("HTMLFormElement"),sn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),on=L("RegExp"),ut=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ne(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},an=e=>{ut(e,(t,n)=>{if(C(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(C(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return K(e)?r(e):r(String(e).split(t)),n},ln=()=>{},un=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function fn(e){return!!(e&&C(e.append)&&e[ot]==="FormData"&&e[he])}const dn=e=>{const t=new WeakSet,n=r=>{if(te(r)){if(t.has(r))return;if(ee(r))return r;if(!("toJSON"in r)){t.add(r);const s=K(r)?[]:{};return ne(r,(o,i)=>{const c=n(o);!v(c)&&(s[i]=c)}),t.delete(r),s}}return r};return n(e)},pn=L("AsyncFunction"),hn=e=>e&&(te(e)||C(e))&&C(e.then)&&C(e.catch),ft=((e,t)=>e?setImmediate:t?((n,r)=>(z.addEventListener("message",({source:s,data:o})=>{s===z&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",C(z.postMessage)),mn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||ft,yn=e=>e!=null&&C(e[he]),a={isArray:K,isArrayBuffer:it,isBuffer:ee,isFormData:Mt,isArrayBufferView:Nt,isString:Pt,isNumber:at,isBoolean:Dt,isObject:te,isPlainObject:le,isEmptyObject:Lt,isReadableStream:$t,isRequest:Vt,isResponse:Jt,isHeaders:Wt,isUndefined:v,isDate:Ft,isFile:Ut,isReactNativeBlob:Bt,isReactNative:kt,isBlob:It,isRegExp:on,isFunction:C,isStream:qt,isURLSearchParams:zt,isTypedArray:en,isFileList:jt,forEach:ne,merge:Te,extend:Kt,trim:vt,stripBOM:Xt,inherits:Gt,toFlatObject:Qt,kindOf:me,kindOfTest:L,endsWith:Yt,toArray:Zt,forEachEntry:tn,matchAll:nn,isHTMLForm:rn,hasOwnProperty:xe,hasOwnProp:xe,reduceDescriptors:ut,freezeMethods:an,toObjectSet:cn,toCamelCase:sn,noop:ln,toFiniteNumber:un,findKey:ct,global:z,isContextDefined:lt,isSpecCompliantForm:fn,toJSONObject:dn,isAsyncFn:pn,isThenable:hn,setImmediate:ft,asap:mn,isIterable:yn},bn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wn=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&bn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function En(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Rn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Le(e,t){return a.isArray(e)?e.map(n=>Le(n,t)):En(String(e).replace(t,""))}const Sn=e=>Le(e,Rn),On=e=>Le(e,gn);function dt(e){const t=Object.create(null);return a.forEach(e.toJSON(),(n,r)=>{t[r]=On(n)}),t}const We=Symbol("internals");function Z(e){return e&&String(e).trim().toLowerCase()}function ue(e){return e===!1||e==null?e:a.isArray(e)?e.map(ue):Sn(String(e))}function An(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const _n=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Se(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Tn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function xn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let x=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,l,f){const u=Z(l);if(!u)throw new Error("header name must be a non-empty string");const y=a.findKey(s,u);(!y||s[y]===void 0||f===!0||f===void 0&&s[y]!==!1)&&(s[y||l]=ue(c))}const i=(c,l)=>a.forEach(c,(f,u)=>o(f,u,l));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!_n(t))i(wn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},l,f;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[f=u[0]]=(l=c[f])?a.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Z(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return An(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Z(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Se(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Z(i),i){const c=a.findKey(r,i);c&&(!n||Se(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Se(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=ue(s),delete n[o];return}const c=t?Tn(o):String(o).trim();c!==o&&delete n[o],n[c]=ue(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[We]=this[We]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=Z(i);r[c]||(xn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(x.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(x);const Cn="[REDACTED ****]";function Nn(e){if(a.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(a.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Pn(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||a.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof x&&(o=o.toJSON()),r.push(o);let i;if(a.isArray(o))i=[],o.forEach((c,l)=>{const f=s(c);a.isUndefined(f)||(i[l]=f)});else{if(!a.isPlainObject(o)&&Nn(o))return r.pop(),o;i=Object.create(null);for(const[c,l]of Object.entries(o)){const f=n.has(c.toLowerCase())?Cn:s(l);a.isUndefined(f)||(i[c]=f)}}return r.pop(),i};return s(e)}let p=class pt extends Error{static from(t,n,r,s,o,i){const c=new pt(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&a.hasOwnProp(t,"redact")?t.redact:void 0,r=a.isArray(n)&&n.length>0?Pn(t,n):a.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};p.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";p.ERR_BAD_OPTION="ERR_BAD_OPTION";p.ECONNABORTED="ECONNABORTED";p.ETIMEDOUT="ETIMEDOUT";p.ECONNREFUSED="ECONNREFUSED";p.ERR_NETWORK="ERR_NETWORK";p.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";p.ERR_DEPRECATED="ERR_DEPRECATED";p.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";p.ERR_BAD_REQUEST="ERR_BAD_REQUEST";p.ERR_CANCELED="ERR_CANCELED";p.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";p.ERR_INVALID_URL="ERR_INVALID_URL";p.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Dn=null;function Ce(e){return a.isPlainObject(e)||a.isArray(e)}function ht(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Oe(e,t,n){return e?e.concat(t).map(function(s,o){return s=ht(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Ln(e){return a.isArray(e)&&!e.some(Ce)}const Fn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function be(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,m){return!a.isUndefined(m[d])});const r=n.metaTokens,s=n.visitor||y,o=n.dots,i=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,f=c&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(a.isBoolean(h))return h.toString();if(!f&&a.isBlob(h))throw new p("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function y(h,d,m){let S=h;if(a.isReactNative(t)&&a.isReactNativeBlob(h))return t.append(Oe(m,d,o),u(h)),!1;if(h&&!m&&typeof h=="object"){if(a.endsWith(d,"{}"))d=r?d:d.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&Ln(h)||(a.isFileList(h)||a.endsWith(d,"[]"))&&(S=a.toArray(h)))return d=ht(d),S.forEach(function(R,N){!(a.isUndefined(R)||R===null)&&t.append(i===!0?Oe([d],N,o):i===null?d:d+"[]",u(R))}),!1}return Ce(h)?!0:(t.append(Oe(m,d,o),u(h)),!1)}const E=[],b=Object.assign(Fn,{defaultVisitor:y,convertValue:u,isVisitable:Ce});function w(h,d,m=0){if(!a.isUndefined(h)){if(m>l)throw new p("Object is too deeply nested ("+m+" levels). Max depth: "+l,p.ERR_FORM_DATA_DEPTH_EXCEEDED);if(E.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));E.push(h),a.forEach(h,function(g,R){(!(a.isUndefined(g)||g===null)&&s.call(t,g,a.isString(R)?R.trim():R,d,b))===!0&&w(g,d?d.concat(R):[R],m+1)}),E.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return w(e),t}function ve(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Fe(e,t){this._pairs=[],e&&be(e,this,t)}const mt=Fe.prototype;mt.append=function(t,n){this._pairs.push([t,n])};mt.toString=function(t){const n=t?function(r){return t.call(this,r,ve)}:ve;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Un(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function yt(e,t,n){if(!t)return e;const r=n&&n.encode||Un,s=a.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=a.isURLSearchParams(t)?t.toString():new Fe(t,s).toString(r),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ke{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Bn=typeof URLSearchParams<"u"?URLSearchParams:Fe,kn=typeof FormData<"u"?FormData:null,In=typeof Blob<"u"?Blob:null,jn={isBrowser:!0,classes:{URLSearchParams:Bn,FormData:kn,Blob:In},protocols:["http","https","file","blob","url","data"]},Be=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,qn=Be&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),Hn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mn=Be&&window.location.href||"http://localhost",zn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Be,hasStandardBrowserEnv:qn,hasStandardBrowserWebWorkerEnv:Hn,navigator:Ne,origin:Mn},Symbol.toStringTag,{value:"Module"})),T={...zn,...jn};function $n(e,t){return be(e,new T.classes.URLSearchParams,{visitor:function(n,r,s,o){return T.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Vn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Jn(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,l?(a.hasOwnProp(s,i)?s[i]=a.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!c):((!a.hasOwnProp(s,i)||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Jn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Vn(r),s,n,0)}),n}return null}const W=(e,t)=>e!=null&&a.hasOwnProp(e,t)?e[t]:void 0;function Wn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const re={transitional:Ue,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(bt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const l=W(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return $n(t,l).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=W(this,"env"),u=f&&f.FormData;return be(c?{"files[]":t}:t,u&&new u,l)}}return o||s?(n.setContentType("application/json",!1),Wn(t)):t}],transformResponse:[function(t){const n=W(this,"transitional")||re.transitional,r=n&&n.forcedJSONParsing,s=W(this,"responseType"),o=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,W(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?p.from(l,p.ERR_BAD_RESPONSE,this,null,W(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch","query"],e=>{re.headers[e]={}});function Ae(e,t){const n=this||re,r=t||n,s=x.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function wt(e){return!!(e&&e.__CANCEL__)}let se=class extends p{constructor(t,n,r){super(t??"canceled",p.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Et(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new p("Request failed with status code "+n.status,n.status>=400&&n.status<500?p.ERR_BAD_REQUEST:p.ERR_BAD_RESPONSE,n.config,n.request,n))}function vn(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Kn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const f=Date.now(),u=r[o];i||(i=f),n[s]=l,r[s]=f;let y=o,E=0;for(;y!==s;)E+=n[y++],y=y%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),y=u-n;y>=r?i(f,u):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-y)))},()=>s&&i(s)]}const de=(e,t,n=3)=>{let r=0;const s=Kn(50,250);return Xn(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,c=o.lengthComputable?o.total:void 0,l=c!=null?Math.min(i,c):i,f=Math.max(0,l-r),u=s(f);r=Math.max(r,l);const y={loaded:l,total:c,progress:c?l/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c?(c-l)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(y)},n)},Xe=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ge=e=>(...t)=>a.asap(()=>e(...t)),Gn=T.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,T.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,Qn=T.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof x?{...e}:e;function V(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,u,y,E){return a.isPlainObject(f)&&a.isPlainObject(u)?a.merge.call({caseless:E},f,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(f,u,y,E){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f,y,E)}else return r(f,u,y,E)}function o(f,u){if(!a.isUndefined(u))return r(void 0,u)}function i(f,u){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function c(f,u,y){if(a.hasOwnProp(t,y))return r(f,u);if(a.hasOwnProp(e,y))return r(void 0,f)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(f,u,y)=>s(Qe(f),Qe(u),y,!0)};return a.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const y=a.hasOwnProp(l,u)?l[u]:s,E=a.hasOwnProp(e,u)?e[u]:void 0,b=a.hasOwnProp(t,u)?t[u]:void 0,w=y(E,b,u);a.isUndefined(w)&&y!==c||(n[u]=w)}),n}const er=["content-type","content-length"];function tr(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,s])=>{er.includes(r.toLowerCase())&&e.set(r,s)})}const nr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),gt=e=>{const t=V({},e),n=E=>a.hasOwnProp(t,E)?t[E]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let c=n("headers");const l=n("auth"),f=n("baseURL"),u=n("allowAbsoluteUrls"),y=n("url");if(t.headers=c=x.from(c),t.url=yt(Rt(f,y,u),e.params,e.paramsSerializer),l&&c.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?nr(l.password):""))),a.isFormData(r)&&(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):a.isFunction(r.getHeaders)&&tr(c,r.getHeaders(),n("formDataHeaderPolicy"))),T.hasStandardBrowserEnv&&(a.isFunction(s)&&(s=s(t)),s===!0||s==null&&Gn(t.url))){const b=o&&i&&Qn.read(i);b&&c.set(o,b)}return t},rr=typeof XMLHttpRequest<"u",sr=rr&&function(e){return new Promise(function(n,r){const s=gt(e);let o=s.data;const i=x.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:f}=s,u,y,E,b,w;function h(){b&&b(),w&&w(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(s.method.toUpperCase(),s.url,!0),d.timeout=s.timeout;function m(){if(!d)return;const g=x.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),N={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:e,request:d};Et(function(X){n(X),h()},function(X){r(X),h()},N),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.startsWith("file:"))||setTimeout(m)},d.onabort=function(){d&&(r(new p("Request aborted",p.ECONNABORTED,e,d)),h(),d=null)},d.onerror=function(R){const N=R&&R.message?R.message:"Network Error",q=new p(N,p.ERR_NETWORK,e,d);q.event=R||null,r(q),h(),d=null},d.ontimeout=function(){let R=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Ue;s.timeoutErrorMessage&&(R=s.timeoutErrorMessage),r(new p(R,N.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,e,d)),h(),d=null},o===void 0&&i.setContentType(null),"setRequestHeader"in d&&a.forEach(dt(i),function(R,N){d.setRequestHeader(N,R)}),a.isUndefined(s.withCredentials)||(d.withCredentials=!!s.withCredentials),c&&c!=="json"&&(d.responseType=s.responseType),f&&([E,w]=de(f,!0),d.addEventListener("progress",E)),l&&d.upload&&([y,b]=de(l),d.upload.addEventListener("progress",y),d.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(u=g=>{d&&(r(!g||g.type?new se(null,e,d):g),d.abort(),h(),d=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const S=vn(s.url);if(S&&!T.protocols.includes(S)){r(new p("Unsupported protocol "+S+":",p.ERR_BAD_REQUEST,e));return}d.send(o||null)})},or=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,i();const f=l instanceof Error?l:this.reason;n.abort(f instanceof p?f:new se(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,s(new p(`timeout of ${t}ms exceeded`,p.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>a.asap(i),c},ir=function*(e,t){let n=e.byteLength;if(n{const s=ar(e,t);let o=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:u}=await s.next();if(f){c(),l.close();return}let y=u.byteLength;if(n){let E=o+=y;n(E)}l.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(l){return c(l),s.return()}},{highWaterMark:2})};function lr(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let i=r.length;const c=r.length;for(let b=0;b=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102)&&(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102)&&(i-=2,b+=2)}let l=0,f=c-1;const u=b=>b>=2&&r.charCodeAt(b-2)===37&&r.charCodeAt(b-1)===51&&(r.charCodeAt(b)===68||r.charCodeAt(b)===100);f>=0&&(r.charCodeAt(f)===61?(l++,f--):u(f)&&(l++,f-=3)),l===1&&f>=0&&(r.charCodeAt(f)===61||u(f))&&l++;const E=Math.floor(i/4)*3-(l||0);return E>0?E:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let o=0;for(let i=0,c=r.length;i=55296&&l<=56319&&i+1=56320&&f<=57343?(o+=4,i++):o+=3}else o+=3}return o}const ke="1.16.1",Ze=64*1024,{isFunction:ce}=a,et=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ur=e=>{const t=a.global!==void 0&&a.global!==null?a.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=a.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,c=s?ce(s):typeof fetch=="function",l=ce(o),f=ce(i);if(!c)return!1;const u=c&&ce(n),y=c&&(typeof r=="function"?(m=>S=>m.encode(S))(new r):async m=>new Uint8Array(await new o(m).arrayBuffer())),E=l&&u&&et(()=>{let m=!1;const S=new o(T.origin,{body:new n,method:"POST",get duplex(){return m=!0,"half"}}),g=S.headers.has("Content-Type");return S.body!=null&&S.body.cancel(),m&&!g}),b=f&&u&&et(()=>a.isReadableStream(new i("").body)),w={stream:b&&(m=>m.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!w[m]&&(w[m]=(S,g)=>{let R=S&&S[m];if(R)return R.call(S);throw new p(`Response type '${m}' is not supported`,p.ERR_NOT_SUPPORT,g)})});const h=async m=>{if(m==null)return 0;if(a.isBlob(m))return m.size;if(a.isSpecCompliantForm(m))return(await new o(T.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(a.isArrayBufferView(m)||a.isArrayBuffer(m))return m.byteLength;if(a.isURLSearchParams(m)&&(m=m+""),a.isString(m))return(await y(m)).byteLength},d=async(m,S)=>{const g=a.toFiniteNumber(m.getContentLength());return g??h(S)};return async m=>{let{url:S,method:g,data:R,signal:N,cancelToken:q,timeout:X,onDownloadProgress:Ee,onUploadProgress:je,responseType:k,headers:H,withCredentials:oe="same-origin",fetchOptions:qe,maxContentLength:F,maxBodyLength:Re}=gt(m);const G=a.isNumber(F)&&F>-1,Tt=a.isNumber(Re)&&Re>-1;let He=s||fetch;k=k?(k+"").toLowerCase():"text";let I=or([N,q&&q.toAbortSignal()],X),P=null;const M=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let Me;try{if(G&&typeof S=="string"&&S.startsWith("data:")&&lr(S)>F)throw new p("maxContentLength size of "+F+" exceeded",p.ERR_BAD_RESPONSE,m,P);if(Tt&&g!=="get"&&g!=="head"){const O=await d(H,R);if(typeof O=="number"&&isFinite(O)&&O>Re)throw new p("Request body larger than maxBodyLength limit",p.ERR_BAD_REQUEST,m,P)}if(je&&E&&g!=="get"&&g!=="head"&&(Me=await d(H,R))!==0){let O=new o(S,{method:"POST",body:R,duplex:"half"}),J;if(a.isFormData(R)&&(J=O.headers.get("content-type"))&&H.setContentType(J),O.body){const[ie,ae]=Xe(Me,de(Ge(je)));R=Ye(O.body,Ze,ie,ae)}}a.isString(oe)||(oe=oe?"include":"omit");const _=l&&"credentials"in o.prototype;if(a.isFormData(R)){const O=H.getContentType();O&&/^multipart\/form-data/i.test(O)&&!/boundary=/i.test(O)&&H.delete("content-type")}H.set("User-Agent","axios/"+ke,!1);const j={...qe,signal:I,method:g.toUpperCase(),headers:dt(H.normalize()),body:R,duplex:"half",credentials:_?oe:void 0};P=l&&new o(S,j);let U=await(l?He(P,qe):He(S,j));if(G){const O=a.toFiniteNumber(U.headers.get("content-length"));if(O!=null&&O>F)throw new p("maxContentLength size of "+F+" exceeded",p.ERR_BAD_RESPONSE,m,P)}const ge=b&&(k==="stream"||k==="response");if(b&&U.body&&(Ee||G||ge&&M)){const O={};["status","statusText","headers"].forEach(Q=>{O[Q]=U[Q]});const J=a.toFiniteNumber(U.headers.get("content-length")),[ie,ae]=Ee&&Xe(J,de(Ge(Ee),!0))||[];let ze=0;const xt=Q=>{if(G&&(ze=Q,ze>F))throw new p("maxContentLength size of "+F+" exceeded",p.ERR_BAD_RESPONSE,m,P);ie&&ie(Q)};U=new i(Ye(U.body,Ze,xt,()=>{ae&&ae(),M&&M()}),O)}k=k||"text";let B=await w[a.findKey(w,k)||"text"](U,m);if(G&&!b&&!ge){let O;if(B!=null&&(typeof B.byteLength=="number"?O=B.byteLength:typeof B.size=="number"?O=B.size:typeof B=="string"&&(O=typeof r=="function"?new r().encode(B).byteLength:B.length)),typeof O=="number"&&O>F)throw new p("maxContentLength size of "+F+" exceeded",p.ERR_BAD_RESPONSE,m,P)}return!ge&&M&&M(),await new Promise((O,J)=>{Et(O,J,{data:B,headers:x.from(U.headers),status:U.status,statusText:U.statusText,config:m,request:P})})}catch(_){if(M&&M(),I&&I.aborted&&I.reason instanceof p){const j=I.reason;throw j.config=m,P&&(j.request=P),_!==j&&(j.cause=_),j}throw _&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new p("Network Error",p.ERR_NETWORK,m,P,_&&_.response),{cause:_.cause||_}):p.from(_,_&&_.code,m,P,_&&_.response)}}},fr=new Map,St=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,l,f,u=fr;for(;c--;)l=o[c],f=u.get(l),f===void 0&&u.set(l,f=c?new Map:ur(t)),u=f;return f};St();const Ie={http:Dn,xhr:sr,fetch:{get:St}};a.forEach(Ie,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const tt=e=>`- ${e}`,dr=e=>a.isFunction(e)||e===null||e===!1;function pr(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since : `+i.map(tt).join(` diff --git a/jog-admin/src/main/resources/static/assets/user-Ct5x882U.js b/jog-admin/src/main/resources/static/assets/user-CyFJlq7v.js similarity index 93% rename from jog-admin/src/main/resources/static/assets/user-Ct5x882U.js rename to jog-admin/src/main/resources/static/assets/user-CyFJlq7v.js index 7171fe8..e37260a 100644 --- a/jog-admin/src/main/resources/static/assets/user-Ct5x882U.js +++ b/jog-admin/src/main/resources/static/assets/user-CyFJlq7v.js @@ -1 +1 @@ -import{X as d,a4 as u,O as g}from"./index-Ce3OdoWB.js";import{r as a}from"./request-D458e9ik.js";function y(t){return a.post("/api/public/admin/login",{email:t.email||t.account,password:t.password,rememberMe:t.rememberMe||!1})}function _(t){return a.post("/api/public/user/login",t)}function h(t){return a.post("/api/public/user/register",t)}function A(){return a.get("/api/public/captcha")}function U(){return a.post("/api/app/user/logout")}function w(){return a.get("/api/app/user/me")}const M=d("user",()=>{const t=u(localStorage.getItem("access_token")||""),s=u(localStorage.getItem("refresh_token")||""),r=u(JSON.parse(localStorage.getItem("user_info")||"null")),m=g(()=>!!t.value),c=g(()=>{var e;return((e=r.value)==null?void 0:e.role)==="ADMIN"});async function p(e){const o=(await y(e)).data;return i(o.accessToken,o.refreshToken),r.value=f(o,"ADMIN"),localStorage.setItem("user_info",JSON.stringify(r.value)),o}async function v(e){const o=(await _(e)).data;return i(o.accessToken,o.refreshToken),r.value=f(o,"USER"),localStorage.setItem("user_info",JSON.stringify(r.value)),o}async function I(e){return await h(e)}async function S(){const e=await w(),n=c.value?"ADMIN":"USER";r.value={...e.data,role:n},localStorage.setItem("user_info",JSON.stringify(r.value))}async function k(){try{await U()}catch{}l()}function i(e,n){t.value=e,s.value=n,localStorage.setItem("access_token",e),localStorage.setItem("refresh_token",n)}function l(){t.value="",s.value="",r.value=null,localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("user_info")}function f(e,n){return{id:e.userId,email:e.email,nickname:e.nickname,avatar:e.avatar,type:e.type,role:n}}return{token:t,refreshToken:s,userInfo:r,isLoggedIn:m,isAdmin:c,loginAdmin:p,loginUser:v,registerUser:I,fetchUserInfo:S,logout:k,clearAuth:l}});export{A as g,M as u}; +import{X as d,a4 as u,O as g}from"./index-CptE6QA-.js";import{r as a}from"./request-BdgcZPJd.js";function y(t){return a.post("/api/public/admin/login",{email:t.email||t.account,password:t.password,rememberMe:t.rememberMe||!1})}function _(t){return a.post("/api/public/user/login",t)}function h(t){return a.post("/api/public/user/register",t)}function A(){return a.get("/api/public/captcha")}function U(){return a.post("/api/app/user/logout")}function w(){return a.get("/api/app/user/me")}const M=d("user",()=>{const t=u(localStorage.getItem("access_token")||""),s=u(localStorage.getItem("refresh_token")||""),r=u(JSON.parse(localStorage.getItem("user_info")||"null")),m=g(()=>!!t.value),c=g(()=>{var e;return((e=r.value)==null?void 0:e.role)==="ADMIN"});async function p(e){const o=(await y(e)).data;return i(o.accessToken,o.refreshToken),r.value=f(o,"ADMIN"),localStorage.setItem("user_info",JSON.stringify(r.value)),o}async function v(e){const o=(await _(e)).data;return i(o.accessToken,o.refreshToken),r.value=f(o,"USER"),localStorage.setItem("user_info",JSON.stringify(r.value)),o}async function I(e){return await h(e)}async function S(){const e=await w(),n=c.value?"ADMIN":"USER";r.value={...e.data,role:n},localStorage.setItem("user_info",JSON.stringify(r.value))}async function k(){try{await U()}catch{}l()}function i(e,n){t.value=e,s.value=n,localStorage.setItem("access_token",e),localStorage.setItem("refresh_token",n)}function l(){t.value="",s.value="",r.value=null,localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("user_info")}function f(e,n){return{id:e.userId,email:e.email,nickname:e.nickname,avatar:e.avatar,type:e.type,role:n}}return{token:t,refreshToken:s,userInfo:r,isLoggedIn:m,isAdmin:c,loginAdmin:p,loginUser:v,registerUser:I,fetchUserInfo:S,logout:k,clearAuth:l}});export{A as g,M as u}; diff --git a/jog-admin/src/main/resources/static/index.html b/jog-admin/src/main/resources/static/index.html index 1cfe7f5..764f383 100644 --- a/jog-admin/src/main/resources/static/index.html +++ b/jog-admin/src/main/resources/static/index.html @@ -4,7 +4,7 @@ 博客系统 - + diff --git a/jog-frontend/src/views/Register.vue b/jog-frontend/src/views/Register.vue index 56a3dab..6660a1c 100644 --- a/jog-frontend/src/views/Register.vue +++ b/jog-frontend/src/views/Register.vue @@ -6,6 +6,9 @@ + + + @@ -33,7 +36,7 @@ const router = useRouter() const userStore = useUserStore() const loading = ref(false) const formRef = ref() -const form = ref({ email: '', password: '', confirmPassword: '' }) +const form = ref({ email: '', nickname: '', password: '', confirmPassword: '' }) const validateConfirm = (rule, value, callback) => { if (value !== form.value.password) { @@ -48,6 +51,10 @@ const rules = { { required: true, message: '请输入邮箱', trigger: 'blur' }, { type: 'email', message: '邮箱格式不正确', trigger: 'blur' }, ], + nickname: [ + { required: true, message: '请输入昵称', trigger: 'blur' }, + { min: 2, max: 20, message: '昵称长度2-20位', trigger: 'blur' }, + ], password: [ { required: true, message: '请输入密码', trigger: 'blur' }, { min: 8, max: 32, message: '密码长度8-32位', trigger: 'blur' },