flex-mcp 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/api/backup.d.ts +6 -0
  2. package/dist/api/backup.d.ts.map +1 -0
  3. package/dist/api/backup.js +212 -0
  4. package/dist/api/backup.js.map +1 -0
  5. package/dist/api/configs.js +3 -6
  6. package/dist/api/configs.js.map +1 -1
  7. package/dist/api/index.d.ts.map +1 -1
  8. package/dist/api/index.js +3 -0
  9. package/dist/api/index.js.map +1 -1
  10. package/dist/api/prompts.js +37 -7
  11. package/dist/api/prompts.js.map +1 -1
  12. package/dist/config.d.ts +4 -0
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/config.js +12 -0
  15. package/dist/config.js.map +1 -1
  16. package/dist/db/index.d.ts.map +1 -1
  17. package/dist/db/index.js +61 -0
  18. package/dist/db/index.js.map +1 -1
  19. package/dist/db/schema.d.ts +24 -0
  20. package/dist/db/schema.d.ts.map +1 -1
  21. package/dist/db/schema.js +2 -0
  22. package/dist/db/schema.js.map +1 -1
  23. package/dist/mcp/aggregator.d.ts.map +1 -1
  24. package/dist/mcp/aggregator.js +128 -74
  25. package/dist/mcp/aggregator.js.map +1 -1
  26. package/dist/types/index.d.ts +2 -0
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/dist/web/assets/Backup-BnJJcJ1y.js +1 -0
  29. package/dist/web/assets/{Blank-BHJQs5sx.js → Blank-DYHf__-I.js} +1 -1
  30. package/dist/web/assets/{Configs-BsYYESfj.js → Configs-BhOuA1TR.js} +1 -1
  31. package/dist/web/assets/Dashboard-XGeMGzfq.js +83 -0
  32. package/dist/web/assets/InitScriptEditor-tSkIU_zo.js +588 -0
  33. package/dist/web/assets/Layout-CtytdFcc.js +1 -0
  34. package/dist/web/assets/{Layout-BmR6ReTO.js → Layout-DoiZawSk.js} +1 -1
  35. package/dist/web/assets/{Login-CwxdtbCd.js → Login-Cr1ve1cB.js} +1 -1
  36. package/dist/web/assets/{Login-B12ArZ__.js → Login-DVWgtC9D.js} +1 -1
  37. package/dist/web/assets/{Users-CyJLDYCZ.js → Users-C4kFgZqa.js} +1 -1
  38. package/dist/web/assets/index-BBxZKz3O.js +2 -0
  39. package/dist/web/assets/{monaco-editor-BXWd1EVR.js → monaco-editor-D-KqHnQ9.js} +1 -1
  40. package/dist/web/assets/{naive-ui-UIL-VU-f.js → naive-ui-C5lXjE56.js} +2 -2
  41. package/dist/web/assets/style-DyYDoNC5.css +1 -0
  42. package/dist/web/assets/vendor-D1MaVSrs.js +63 -0
  43. package/dist/web/index.html +5 -5
  44. package/package.json +1 -1
  45. package/dist/web/assets/Dashboard-sRUOp0M_.js +0 -83
  46. package/dist/web/assets/InitScriptEditor-iTJN-PPD.js +0 -588
  47. package/dist/web/assets/Layout-DM8EAalA.js +0 -1
  48. package/dist/web/assets/index-DAevE53R.js +0 -2
  49. package/dist/web/assets/style-CIoc_HY4.css +0 -1
  50. package/dist/web/assets/vendor-DpXl860f.js +0 -58
@@ -0,0 +1 @@
1
+ import{q as U,s as z,c6 as I,r as u,o as T,c0 as v,c1 as e,c2 as N,bW as f,bV as h,bs as S,F,bN as G,bT as H,c7 as k,G as a,bU as i,bm as D,c5 as P,bS as w,c8 as y,T as R,c3 as $}from"./vendor-D1MaVSrs.js";import{u as q,a as _}from"./index-BBxZKz3O.js";import{u as Z,A as E,B as O}from"./naive-ui-C5lXjE56.js";import{_ as W}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-D-KqHnQ9.js";const J={class:"app-shell"},K={class:"app-header"},Q={class:"app-header__container"},X={class:"app-header__right"},Y={class:"app-body"},ee={class:"app-sidebar"},oe={class:"sidebar-nav"},te=["onClick"],se={class:"nav-item__icon admin-nav-icon"},ae={class:"nav-item__content"},ne={class:"nav-item__label"},re={class:"nav-item__description"},ie={key:0,class:"nav-item__indicator admin-indicator"},ce={class:"app-content"},de={class:"content-wrapper"},le={class:"app-footer"},pe={class:"version-info"},ue={class:"version-text"},ve=U({__name:"Layout",setup(fe){const m=$(),x=I(),C=q(),r=Z(),b=E(),g=z(()=>x.name),d=u(!1),l=u(!1),p=u("..."),M=[{label:"用户管理",key:"AdminUsers",icon:()=>a("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),description:"管理系统用户和权限"},{label:"配置管理",key:"AdminConfigs",icon:()=>a("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),description:"管理用户的 MCP 配置"},{label:"数据备份",key:"AdminBackup",icon:()=>a("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),a("polyline",{points:"17 8 12 3 7 8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),a("line",{x1:"12",y1:"3",x2:"12",y2:"15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),description:"备份服务数据"}];function B(t){m.push({name:t})}function L(){C.adminLogout(),m.push("/admin/login")}async function V(){if(!d.value){d.value=!0;try{const o=(await _.get("/update/check")).data;o.success&&o.hasUpdate&&b.warning({title:"发现新版本",content:()=>a("div",[a("p",{style:"margin-bottom: 12px;"},`当前版本: ${o.currentVersion}`),a("p",{style:"margin-bottom: 12px;"},`最新版本: ${o.latestVersion}`),a("p",{style:"color: #666; font-size: 14px;"},"是否立即更新?更新后系统将自动重启。")]),positiveText:"立即更新",negativeText:"稍后提醒",onPositiveClick:async()=>{await j()},onNegativeClick:()=>{}})}catch(t){console.error("检查更新失败:",t)}finally{d.value=!1}}}async function j(){var o,c;if(l.value)return;l.value=!0;const t=r.loading("正在更新,请稍候...",{duration:0});try{const n=(await _.post("/update/execute")).data;t.destroy(),n.success?n.restartFailed?r.warning("更新成功,但重启失败,请手动重启服务",{duration:5e3}):(r.success("更新成功,系统正在重启...",{duration:3e3}),setTimeout(()=>{window.location.reload()},3e3)):r.error(n.error||"更新失败",{duration:5e3})}catch(s){t.destroy();const n=((c=(o=s.response)==null?void 0:o.data)==null?void 0:c.error)||s.message||"更新失败";r.error(n,{duration:5e3})}finally{l.value=!1}}async function A(){try{const t=await _.get("/update/version");t.data.success&&(p.value=t.data.version)}catch(t){console.error("获取版本失败:",t),p.value="unknown"}}return T(()=>{A(),setTimeout(()=>{V()},2e3)}),(t,o)=>{const c=H("router-view");return i(),v("div",J,[e("header",K,[e("div",Q,[o[2]||(o[2]=N('<div class="app-header__left" data-v-0eecf274><div class="app-logo" data-v-0eecf274><div class="logo-icon admin-theme" data-v-0eecf274><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-0eecf274><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#admin-gradient1)" data-v-0eecf274></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#admin-gradient2)" data-v-0eecf274></path><defs data-v-0eecf274><linearGradient id="admin-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-0eecf274><stop offset="0%" stop-color="#dc2626" data-v-0eecf274></stop><stop offset="100%" stop-color="#ea580c" data-v-0eecf274></stop></linearGradient><linearGradient id="admin-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-0eecf274><stop offset="0%" stop-color="#ea580c" data-v-0eecf274></stop><stop offset="100%" stop-color="#f59e0b" data-v-0eecf274></stop></linearGradient></defs></svg></div><div class="logo-text" data-v-0eecf274><div class="logo-title admin-title" data-v-0eecf274>Flex MCP Admin</div><div class="logo-subtitle" data-v-0eecf274>管理员控制台</div></div></div></div>',1)),e("div",X,[o[1]||(o[1]=e("div",{class:"admin-badge"},[e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"管理员")],-1)),f(S(O),{class:"logout-btn",quaternary:"",circle:"",onClick:L},{icon:h(()=>[...o[0]||(o[0]=[e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M16 17L21 12L16 7",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M21 12H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1})])])]),e("div",Y,[e("aside",ee,[e("nav",oe,[(i(),v(F,null,G(M,s=>e("div",{key:s.key,class:D(["nav-item",{"nav-item--active":g.value===s.key}]),onClick:n=>B(s.key)},[e("div",se,[(i(),w(y(s.icon)))]),e("div",ae,[e("div",ne,k(s.label),1),e("div",re,k(s.description),1)]),g.value===s.key?(i(),v("div",ie)):P("",!0)],10,te)),64))])]),e("main",ce,[e("div",de,[f(c,null,{default:h(({Component:s,route:n})=>[f(R,{name:"page-fade",mode:"out-in"},{default:h(()=>[(i(),w(y(s),{key:n.path}))]),_:2},1024)]),_:1})])])]),e("footer",le,[e("div",pe,[e("span",ue,"v"+k(p.value),1)])])])}}}),Ce=W(ve,[["__scopeId","data-v-0eecf274"]]);export{Ce as default};
@@ -1 +1 @@
1
- import{G as o,q as A,r as D,s as w,c6 as $,o as N,c0 as d,c1 as e,c2 as F,bW as k,bV as m,bs as _,F as K,bN as T,bT as U,c7 as p,bU as a,bm as G,c5 as O,bS as x,c8 as y,T as R,c3 as q}from"./vendor-DpXl860f.js";import{u as E,a as C}from"./index-DAevE53R.js";import{u as W,f as Z}from"./naive-ui-UIL-VU-f.js";import{_ as J}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-BXWd1EVR.js";const Q=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),o("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),o("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),o("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"})]),X=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),Y=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M4 7h3m13 0h-3m-2 4l-2 5l-2-5m9-4l-3 8l-3-8m-6 11h3m0 0h3m-3 0V10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),oo=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("polyline",{points:"16 18 22 12 16 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("polyline",{points:"8 6 2 12 8 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),eo=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h7v2H7v-2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),to=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M14 2v6h6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M16 13H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),o("path",{d:"M16 17H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),o("path",{d:"M10 9H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})]),so=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M8 9l3 3-3 3m5 0h3M5 20h14a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v14a1 1 0 001 1z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),b=[{label:"MCP 组件",key:"section-components",icon:Q,description:"管理 MCP 服务组件"},{label:"自定义工具",key:"section-tools",icon:X,description:"创建和编辑工具"},{label:"变量管理",key:"section-variables",icon:Y,description:"配置环境变量",hideForAdmin:!0},{label:"初始化脚本",key:"section-init",icon:oo,description:"编写启动脚本"},{label:"数据管理",key:"section-tables",icon:eo,description:"创建和管理数据表",hideForAdmin:!0},{label:"提示词管理",key:"section-prompts",icon:to,description:"创建和管理提示词模板"},{label:"接口管理",key:"section-interfaces",icon:so,description:"创建页面和函数,提供SDK调用"}],no={class:"app-shell"},ro={class:"app-header"},io={class:"app-header__container"},ao={class:"app-header__right"},lo={class:"user-info"},co={class:"user-email"},po={class:"app-body"},uo={class:"app-sidebar"},ho={class:"sidebar-nav"},vo=["onClick"],wo={class:"nav-item__icon"},ko={class:"nav-item__content"},mo={class:"nav-item__label"},fo={class:"nav-item__description"},go={key:0,class:"nav-item__indicator"},_o={class:"app-content"},xo={class:"content-wrapper"},yo={class:"app-footer"},Co={class:"version-info"},bo={class:"version-text"},Mo=A({__name:"Layout",setup(Vo){const u=q(),h=$(),r=E(),l=W(),v=D("..."),f=w(()=>h.name==="UserDashboard"?`section-${h.query.section||"components"}`:h.name),M=w(()=>{var n;return((n=r.user)==null?void 0:n.role)==="admin"?b.filter(i=>!i.hideForAdmin):b});function V(s){if(s.startsWith("section-")){const n=s.replace("section-","");u.push({name:"UserDashboard",query:{section:n}});return}u.push({name:s})}function B(){r.userLogout(),u.push("/user/login")}async function L(){try{const s=await C.get("/update/version");s.data.success&&(v.value=s.data.version)}catch(s){console.error("获取版本失败:",s),v.value="unknown"}}const j=w(()=>[{label:"复制 MCP 配置",key:"copy-mcp-config",icon:()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"16px",height:"16px"}},[o("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])},{type:"divider",key:"divider-1"},{label:"退出登录",key:"logout",icon:()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"16px",height:"16px"}},[o("path",{d:"M9 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M16 17L21 12L16 7",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M21 12H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])}]);async function H(){var s,n,i;try{if(!((s=r.user)!=null&&s.id)){l.error("用户信息未找到");return}const t=await C.get(`/users/${r.user.id}`);if(!t.data.success||!t.data.data.apiKey){l.error("无法获取 API Key");return}const c=t.data.data.apiKey,S=r.user.email,z=window.location.hostname,g=["5173","5174"].includes(window.location.port)?"3000":window.location.port,P={mcpServers:{"flex-mcp":{url:`${`${window.location.protocol}//${z}${g?`:${g}`:""}`}/mcp/sse`,headers:{email:S,apiKey:c}}}};await navigator.clipboard.writeText(JSON.stringify(P,null,2)),l.success("MCP 配置已复制到剪贴板")}catch(t){console.error("复制 MCP 配置失败:",t),l.error(((i=(n=t.response)==null?void 0:n.data)==null?void 0:i.error)||"复制失败,请稍后重试")}}function I(s){s==="copy-mcp-config"?H():s==="logout"&&B()}return N(()=>{L()}),(s,n)=>{const i=U("router-view");return a(),d("div",no,[e("header",ro,[e("div",io,[n[2]||(n[2]=F('<div class="app-header__left" data-v-3409e7a3><div class="app-logo" data-v-3409e7a3><div class="logo-icon" data-v-3409e7a3><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3409e7a3><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#gradient1)" data-v-3409e7a3></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#gradient2)" data-v-3409e7a3></path><defs data-v-3409e7a3><linearGradient id="gradient1" x1="2" y1="2" x2="22" y2="12" data-v-3409e7a3><stop offset="0%" stop-color="#6366f1" data-v-3409e7a3></stop><stop offset="100%" stop-color="#8b5cf6" data-v-3409e7a3></stop></linearGradient><linearGradient id="gradient2" x1="2" y1="12" x2="22" y2="22" data-v-3409e7a3><stop offset="0%" stop-color="#8b5cf6" data-v-3409e7a3></stop><stop offset="100%" stop-color="#ec4899" data-v-3409e7a3></stop></linearGradient></defs></svg></div><div class="logo-text" data-v-3409e7a3><div class="logo-title" data-v-3409e7a3>Flex MCP</div><div class="logo-subtitle" data-v-3409e7a3>MCP 服务运营平台</div></div></div></div>',1)),e("div",ao,[k(_(Z),{options:j.value,placement:"bottom-end",trigger:"click",onSelect:I},{default:m(()=>{var t;return[e("div",lo,[n[0]||(n[0]=e("div",{class:"user-avatar"},[e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("circle",{cx:"12",cy:"8",r:"4",fill:"currentColor",opacity:"0.3"}),e("path",{d:"M6 21C6 17.686 8.686 15 12 15C15.314 15 18 17.686 18 21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])],-1)),e("span",co,p(((t=_(r).user)==null?void 0:t.email)||"用户"),1),n[1]||(n[1]=e("svg",{class:"dropdown-arrow",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M6 9l6 6 6-6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))])]}),_:1},8,["options"])])])]),e("div",po,[e("aside",uo,[e("nav",ho,[(a(!0),d(K,null,T(M.value,t=>(a(),d("div",{key:t.key,class:G(["nav-item",{"nav-item--active":f.value===t.key}]),onClick:c=>V(t.key)},[e("div",wo,[(a(),x(y(t.icon)))]),e("div",ko,[e("div",mo,p(t.label),1),e("div",fo,p(t.description),1)]),f.value===t.key?(a(),d("div",go)):O("",!0)],10,vo))),128))])]),e("main",_o,[e("div",xo,[k(i,null,{default:m(({Component:t,route:c})=>[k(R,{name:"page-fade",mode:"out-in"},{default:m(()=>[(a(),x(y(t),{key:c.path}))]),_:2},1024)]),_:1})])])]),e("footer",yo,[e("div",Co,[e("span",bo,"v"+p(v.value),1)])])])}}}),Po=J(Mo,[["__scopeId","data-v-3409e7a3"]]);export{Po as default};
1
+ import{G as o,q as A,r as D,s as w,c6 as $,o as N,c0 as d,c1 as e,c2 as F,bW as k,bV as m,bs as _,F as K,bN as T,bT as U,c7 as p,bU as i,bm as G,c5 as O,bS as b,c8 as x,T as R,c3 as q}from"./vendor-D1MaVSrs.js";import{u as E,a as y}from"./index-BBxZKz3O.js";import{u as W,f as Z}from"./naive-ui-C5lXjE56.js";import{_ as J}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-D-KqHnQ9.js";const Q=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),o("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),o("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),o("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"})]),X=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),Y=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M4 7h3m13 0h-3m-2 4l-2 5l-2-5m9-4l-3 8l-3-8m-6 11h3m0 0h3m-3 0V10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),oo=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("polyline",{points:"16 18 22 12 16 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("polyline",{points:"8 6 2 12 8 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),eo=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h7v2H7v-2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),to=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M14 2v6h6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M16 13H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),o("path",{d:"M16 17H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),o("path",{d:"M10 9H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})]),so=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M8 9l3 3-3 3m5 0h3M5 20h14a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v14a1 1 0 001 1z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),C=[{label:"MCP 组件",key:"section-components",icon:Q,description:"管理 MCP 服务组件"},{label:"自定义工具",key:"section-tools",icon:X,description:"创建和编辑工具"},{label:"变量管理",key:"section-variables",icon:Y,description:"配置环境变量",hideForAdmin:!0},{label:"初始化脚本",key:"section-init",icon:oo,description:"编写启动脚本"},{label:"数据管理",key:"section-tables",icon:eo,description:"创建和管理数据表",hideForAdmin:!0},{label:"提示词管理",key:"section-prompts",icon:to,description:"创建和管理提示词模板"},{label:"接口管理",key:"section-interfaces",icon:so,description:"创建页面和函数,提供SDK调用"}],no={class:"app-shell"},ro={class:"app-header"},ao={class:"app-header__container"},io={class:"app-header__right"},lo={class:"user-info"},co={class:"user-email"},po={class:"app-body"},uo={class:"app-sidebar"},ho={class:"sidebar-nav"},vo=["onClick"],wo={class:"nav-item__icon"},ko={class:"nav-item__content"},mo={class:"nav-item__label"},fo={class:"nav-item__description"},go={key:0,class:"nav-item__indicator"},_o={class:"app-content"},bo={class:"content-wrapper"},xo={class:"app-footer"},yo={class:"version-info"},Co={class:"version-text"},Mo=A({__name:"Layout",setup(Vo){const u=q(),h=$(),r=E(),l=W(),v=D("..."),f=w(()=>h.name==="UserDashboard"?`section-${h.query.section||"components"}`:h.name),M=w(()=>{var n;return((n=r.user)==null?void 0:n.role)==="admin"?C.filter(a=>!a.hideForAdmin):C});function V(s){if(s.startsWith("section-")){const n=s.replace("section-","");u.push({name:"UserDashboard",query:{section:n}});return}u.push({name:s})}function B(){r.userLogout(),u.push("/user/login")}async function L(){try{const s=await y.get("/update/version");s.data.success&&(v.value=s.data.version)}catch(s){console.error("获取版本失败:",s),v.value="unknown"}}const j=w(()=>[{label:"复制 MCP 配置",key:"copy-mcp-config",icon:()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"16px",height:"16px"}},[o("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])},{type:"divider",key:"divider-1"},{label:"退出登录",key:"logout",icon:()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"16px",height:"16px"}},[o("path",{d:"M9 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M16 17L21 12L16 7",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M21 12H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])}]);async function H(){var s,n,a;try{if(!((s=r.user)!=null&&s.id)){l.error("用户信息未找到");return}const t=await y.get(`/users/${r.user.id}`);if(!t.data.success||!t.data.data.apiKey){l.error("无法获取 API Key");return}const c=t.data.data.apiKey,S=r.user.email,z=window.location.hostname,g=["5173","5174"].includes(window.location.port)?"3000":window.location.port,P={mcpServers:{"flex-mcp":{url:`${`${window.location.protocol}//${z}${g?`:${g}`:""}`}/mcp/sse`,headers:{email:S,apiKey:c}}}};await navigator.clipboard.writeText(JSON.stringify(P,null,2)),l.success("MCP 配置已复制到剪贴板")}catch(t){console.error("复制 MCP 配置失败:",t),l.error(((a=(n=t.response)==null?void 0:n.data)==null?void 0:a.error)||"复制失败,请稍后重试")}}function I(s){s==="copy-mcp-config"?H():s==="logout"&&B()}return N(()=>{L()}),(s,n)=>{const a=U("router-view");return i(),d("div",no,[e("header",ro,[e("div",ao,[n[2]||(n[2]=F('<div class="app-header__left" data-v-a859ba0d><div class="app-logo" data-v-a859ba0d><div class="logo-icon" data-v-a859ba0d><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-a859ba0d><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#gradient1)" data-v-a859ba0d></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#gradient2)" data-v-a859ba0d></path><defs data-v-a859ba0d><linearGradient id="gradient1" x1="2" y1="2" x2="22" y2="12" data-v-a859ba0d><stop offset="0%" stop-color="#6366f1" data-v-a859ba0d></stop><stop offset="100%" stop-color="#8b5cf6" data-v-a859ba0d></stop></linearGradient><linearGradient id="gradient2" x1="2" y1="12" x2="22" y2="22" data-v-a859ba0d><stop offset="0%" stop-color="#8b5cf6" data-v-a859ba0d></stop><stop offset="100%" stop-color="#ec4899" data-v-a859ba0d></stop></linearGradient></defs></svg></div><div class="logo-text" data-v-a859ba0d><div class="logo-title" data-v-a859ba0d>Flex MCP</div><div class="logo-subtitle" data-v-a859ba0d>MCP 服务运营平台</div></div></div></div>',1)),e("div",io,[k(_(Z),{options:j.value,placement:"bottom-end",trigger:"click",onSelect:I},{default:m(()=>{var t;return[e("div",lo,[n[0]||(n[0]=e("div",{class:"user-avatar"},[e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("circle",{cx:"12",cy:"8",r:"4",fill:"currentColor",opacity:"0.3"}),e("path",{d:"M6 21C6 17.686 8.686 15 12 15C15.314 15 18 17.686 18 21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])],-1)),e("span",co,p(((t=_(r).user)==null?void 0:t.email)||"用户"),1),n[1]||(n[1]=e("svg",{class:"dropdown-arrow",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M6 9l6 6 6-6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))])]}),_:1},8,["options"])])])]),e("div",po,[e("aside",uo,[e("nav",ho,[(i(!0),d(K,null,T(M.value,t=>(i(),d("div",{key:t.key,class:G(["nav-item",{"nav-item--active":f.value===t.key}]),onClick:c=>V(t.key)},[e("div",wo,[(i(),b(x(t.icon)))]),e("div",ko,[e("div",mo,p(t.label),1),e("div",fo,p(t.description),1)]),f.value===t.key?(i(),d("div",go)):O("",!0)],10,vo))),128))])]),e("main",_o,[e("div",bo,[k(a,null,{default:m(({Component:t,route:c})=>[k(R,{name:"page-fade",mode:"out-in"},{default:m(()=>[(i(),b(x(t),{key:c.path}))]),_:2},1024)]),_:1})])])]),e("footer",xo,[e("div",yo,[e("span",Co,"v"+p(v.value),1)])])])}}}),Po=J(Mo,[["__scopeId","data-v-a859ba0d"]]);export{Po as default};
@@ -1 +1 @@
1
- import{q as C,r as v,c0 as u,c1 as e,c2 as M,bW as d,bV as t,bs as r,l as w,bU as f,c3 as B,c4 as m,c5 as L}from"./vendor-DpXl860f.js";import{u as V}from"./index-DAevE53R.js";import{u as K,c as j,d as g,e as h,B as z}from"./naive-ui-UIL-VU-f.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-BXWd1EVR.js";const I={class:"auth-bg"},P={class:"login-container"},A={class:"form-section"},H={class:"form-card"},_={key:0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G=C({__name:"Login",setup(U){const b=B(),p=K(),k=V(),c=v(),l=v(!1),o=v({email:"",apiKey:""}),x={email:{required:!0,message:"请输入邮箱地址",trigger:"blur"},apiKey:{required:!0,message:"请输入 API Key",trigger:"blur"}};async function n(){var i,a,s;try{await((i=c.value)==null?void 0:i.validate()),l.value=!0,await k.loginUser(o.value.email,o.value.apiKey),p.success("登录成功"),b.push("/user/dashboard")}catch(y){p.error(((s=(a=y.response)==null?void 0:a.data)==null?void 0:s.error)||"登录失败,请检查您的凭据")}finally{l.value=!1}}return(i,a)=>(f(),u("div",I,[a[11]||(a[11]=e("div",{class:"floating-shapes"},[e("div",{class:"shape shape-1"}),e("div",{class:"shape shape-2"}),e("div",{class:"shape shape-3"})],-1)),e("div",P,[a[10]||(a[10]=M('<div class="brand-section" data-v-d6d8ce7b><div class="brand-content" data-v-d6d8ce7b><div class="brand-logo" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#logo-gradient1)" data-v-d6d8ce7b></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#logo-gradient2)" data-v-d6d8ce7b></path><defs data-v-d6d8ce7b><linearGradient id="logo-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-d6d8ce7b><stop offset="0%" stop-color="#6366f1" data-v-d6d8ce7b></stop><stop offset="100%" stop-color="#8b5cf6" data-v-d6d8ce7b></stop></linearGradient><linearGradient id="logo-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-d6d8ce7b><stop offset="0%" stop-color="#8b5cf6" data-v-d6d8ce7b></stop><stop offset="100%" stop-color="#ec4899" data-v-d6d8ce7b></stop></linearGradient></defs></svg></div><h1 class="brand-title" data-v-d6d8ce7b>Flex MCP</h1><p class="brand-subtitle" data-v-d6d8ce7b>MCP 服务运营平台</p><div class="brand-features" data-v-d6d8ce7b><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>统一管理 MCP 组件</span></div><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M13 10V3L4 14h7v7l9-11h-7z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>快速创建自定义工具</span></div><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>安全的 API 密钥管理</span></div></div></div></div>',1)),e("div",A,[e("div",H,[a[8]||(a[8]=e("div",{class:"form-header"},[e("h2",{class:"form-title"},"欢迎回来"),e("p",{class:"form-description"},"使用您的账户凭据登录系统")],-1)),d(r(j),{ref_key:"formRef",ref:c,model:o.value,rules:x,size:"large"},{default:t(()=>[d(r(g),{path:"email"},{label:t(()=>[...a[2]||(a[2]=[e("div",{class:"input-label"},[e("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"邮箱地址")],-1)])]),default:t(()=>[d(r(h),{value:o.value.email,"onUpdate:value":a[0]||(a[0]=s=>o.value.email=s),placeholder:"your@email.com",class:"modern-input",onKeyup:m(n,["enter"])},{prefix:t(()=>[...a[3]||(a[3]=[e("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),d(r(g),{path:"apiKey"},{label:t(()=>[...a[4]||(a[4]=[e("div",{class:"input-label"},[e("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"API 密钥")],-1)])]),default:t(()=>[d(r(h),{value:o.value.apiKey,"onUpdate:value":a[1]||(a[1]=s=>o.value.apiKey=s),type:"password",placeholder:"输入您的 API Key",class:"modern-input","show-password-on":"click",onKeyup:m(n,["enter"])},{prefix:t(()=>[...a[5]||(a[5]=[e("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M7 11V7a5 5 0 0110 0v4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),d(r(z),{type:"primary",size:"large",block:"",loading:l.value,class:"login-button",onClick:n},{icon:t(()=>[l.value?L("",!0):(f(),u("svg",_,[...a[6]||(a[6]=[e("path",{d:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))]),default:t(()=>[a[7]||(a[7]=w(" 登录系统 ",-1))]),_:1},8,["loading"])]),_:1},8,["model"]),a[9]||(a[9]=e("div",{class:"form-footer"},[e("p",{class:"help-text"},[e("svg",{class:"help-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),w(" 首次使用?请联系管理员获取账户信息 ")])],-1))])])])]))}}),E=N(G,[["__scopeId","data-v-d6d8ce7b"]]);export{E as default};
1
+ import{q as C,r as v,c0 as u,c1 as e,c2 as M,bW as d,bV as t,bs as r,l as w,bU as f,c3 as B,c4 as m,c5 as L}from"./vendor-D1MaVSrs.js";import{u as V}from"./index-BBxZKz3O.js";import{u as K,c as j,d as g,e as h,B as z}from"./naive-ui-C5lXjE56.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-D-KqHnQ9.js";const I={class:"auth-bg"},P={class:"login-container"},A={class:"form-section"},H={class:"form-card"},_={key:0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G=C({__name:"Login",setup(U){const b=B(),p=K(),k=V(),c=v(),l=v(!1),o=v({email:"",apiKey:""}),x={email:{required:!0,message:"请输入邮箱地址",trigger:"blur"},apiKey:{required:!0,message:"请输入 API Key",trigger:"blur"}};async function n(){var i,a,s;try{await((i=c.value)==null?void 0:i.validate()),l.value=!0,await k.loginUser(o.value.email,o.value.apiKey),p.success("登录成功"),b.push("/user/dashboard")}catch(y){p.error(((s=(a=y.response)==null?void 0:a.data)==null?void 0:s.error)||"登录失败,请检查您的凭据")}finally{l.value=!1}}return(i,a)=>(f(),u("div",I,[a[11]||(a[11]=e("div",{class:"floating-shapes"},[e("div",{class:"shape shape-1"}),e("div",{class:"shape shape-2"}),e("div",{class:"shape shape-3"})],-1)),e("div",P,[a[10]||(a[10]=M('<div class="brand-section" data-v-d6d8ce7b><div class="brand-content" data-v-d6d8ce7b><div class="brand-logo" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#logo-gradient1)" data-v-d6d8ce7b></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#logo-gradient2)" data-v-d6d8ce7b></path><defs data-v-d6d8ce7b><linearGradient id="logo-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-d6d8ce7b><stop offset="0%" stop-color="#6366f1" data-v-d6d8ce7b></stop><stop offset="100%" stop-color="#8b5cf6" data-v-d6d8ce7b></stop></linearGradient><linearGradient id="logo-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-d6d8ce7b><stop offset="0%" stop-color="#8b5cf6" data-v-d6d8ce7b></stop><stop offset="100%" stop-color="#ec4899" data-v-d6d8ce7b></stop></linearGradient></defs></svg></div><h1 class="brand-title" data-v-d6d8ce7b>Flex MCP</h1><p class="brand-subtitle" data-v-d6d8ce7b>MCP 服务运营平台</p><div class="brand-features" data-v-d6d8ce7b><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>统一管理 MCP 组件</span></div><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M13 10V3L4 14h7v7l9-11h-7z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>快速创建自定义工具</span></div><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>安全的 API 密钥管理</span></div></div></div></div>',1)),e("div",A,[e("div",H,[a[8]||(a[8]=e("div",{class:"form-header"},[e("h2",{class:"form-title"},"欢迎回来"),e("p",{class:"form-description"},"使用您的账户凭据登录系统")],-1)),d(r(j),{ref_key:"formRef",ref:c,model:o.value,rules:x,size:"large"},{default:t(()=>[d(r(g),{path:"email"},{label:t(()=>[...a[2]||(a[2]=[e("div",{class:"input-label"},[e("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"邮箱地址")],-1)])]),default:t(()=>[d(r(h),{value:o.value.email,"onUpdate:value":a[0]||(a[0]=s=>o.value.email=s),placeholder:"your@email.com",class:"modern-input",onKeyup:m(n,["enter"])},{prefix:t(()=>[...a[3]||(a[3]=[e("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),d(r(g),{path:"apiKey"},{label:t(()=>[...a[4]||(a[4]=[e("div",{class:"input-label"},[e("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"API 密钥")],-1)])]),default:t(()=>[d(r(h),{value:o.value.apiKey,"onUpdate:value":a[1]||(a[1]=s=>o.value.apiKey=s),type:"password",placeholder:"输入您的 API Key",class:"modern-input","show-password-on":"click",onKeyup:m(n,["enter"])},{prefix:t(()=>[...a[5]||(a[5]=[e("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M7 11V7a5 5 0 0110 0v4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),d(r(z),{type:"primary",size:"large",block:"",loading:l.value,class:"login-button",onClick:n},{icon:t(()=>[l.value?L("",!0):(f(),u("svg",_,[...a[6]||(a[6]=[e("path",{d:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))]),default:t(()=>[a[7]||(a[7]=w(" 登录系统 ",-1))]),_:1},8,["loading"])]),_:1},8,["model"]),a[9]||(a[9]=e("div",{class:"form-footer"},[e("p",{class:"help-text"},[e("svg",{class:"help-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),w(" 首次使用?请联系管理员获取账户信息 ")])],-1))])])])]))}}),E=N(G,[["__scopeId","data-v-d6d8ce7b"]]);export{E as default};
@@ -1 +1 @@
1
- import{q as C,r as v,c0 as c,c1 as a,c2 as f,bW as r,bV as t,bs as n,l as w,bU as m,c4 as g,c5 as B,c3 as z}from"./vendor-DpXl860f.js";import{u as j}from"./index-DAevE53R.js";import{u as L,c as V,d as h,e as k,B as A}from"./naive-ui-UIL-VU-f.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-BXWd1EVR.js";const _={class:"auth-bg admin-theme"},H={class:"login-container"},G={class:"form-section"},q={class:"form-card"},F={key:0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I=C({__name:"Login",setup(K){const x=z(),p=L(),b=j(),u=v(),l=v(!1),s=v({username:"",password:""}),M={username:{required:!0,message:"请输入管理员用户名",trigger:"blur"},password:{required:!0,message:"请输入管理员密码",trigger:"blur"}};async function i(){var d,e,o;try{await((d=u.value)==null?void 0:d.validate()),l.value=!0,await b.loginAdmin(s.value.username,s.value.password),p.success("登录成功"),x.push("/admin/users")}catch(y){p.error(((o=(e=y.response)==null?void 0:e.data)==null?void 0:o.error)||"登录失败,请检查您的凭据")}finally{l.value=!1}}return(d,e)=>(m(),c("div",_,[e[11]||(e[11]=a("div",{class:"floating-shapes"},[a("div",{class:"shape shape-1"}),a("div",{class:"shape shape-2"}),a("div",{class:"shape shape-3"})],-1)),a("div",H,[e[10]||(e[10]=f('<div class="brand-section admin-gradient" data-v-332e576e><div class="brand-content" data-v-332e576e><div class="brand-logo" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#admin-logo-gradient1)" data-v-332e576e></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#admin-logo-gradient2)" data-v-332e576e></path><defs data-v-332e576e><linearGradient id="admin-logo-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-332e576e><stop offset="0%" stop-color="#ffffff" data-v-332e576e></stop><stop offset="100%" stop-color="#fef3c7" data-v-332e576e></stop></linearGradient><linearGradient id="admin-logo-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-332e576e><stop offset="0%" stop-color="#fef3c7" data-v-332e576e></stop><stop offset="100%" stop-color="#ffffff" data-v-332e576e></stop></linearGradient></defs></svg></div><h1 class="brand-title" data-v-332e576e>Flex MCP Admin</h1><p class="brand-subtitle" data-v-332e576e>超级管理员控制台</p><div class="brand-features" data-v-332e576e><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>全面的用户管理</span></div><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path><path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>灵活的配置管理</span></div><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>强大的权限控制</span></div></div></div></div>',1)),a("div",G,[a("div",q,[e[8]||(e[8]=f('<div class="form-header" data-v-332e576e><div class="admin-badge" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg><span data-v-332e576e>管理员登录</span></div><h2 class="form-title" data-v-332e576e>系统管理后台</h2><p class="form-description" data-v-332e576e>使用管理员凭据访问控制面板</p></div>',1)),r(n(V),{ref_key:"formRef",ref:u,model:s.value,rules:M,size:"large"},{default:t(()=>[r(n(h),{path:"username"},{label:t(()=>[...e[2]||(e[2]=[a("div",{class:"input-label"},[a("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),a("span",null,"管理员账号")],-1)])]),default:t(()=>[r(n(k),{value:s.value.username,"onUpdate:value":e[0]||(e[0]=o=>s.value.username=o),placeholder:"输入管理员用户名",class:"modern-input",onKeyup:g(i,["enter"])},{prefix:t(()=>[...e[3]||(e[3]=[a("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),r(n(h),{path:"password"},{label:t(()=>[...e[4]||(e[4]=[a("div",{class:"input-label"},[a("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),a("span",null,"管理员密码")],-1)])]),default:t(()=>[r(n(k),{value:s.value.password,"onUpdate:value":e[1]||(e[1]=o=>s.value.password=o),type:"password",placeholder:"输入管理员密码",class:"modern-input","show-password-on":"click",onKeyup:g(i,["enter"])},{prefix:t(()=>[...e[5]||(e[5]=[a("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M7 11V7a5 5 0 0110 0v4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),r(n(A),{type:"primary",size:"large",block:"",loading:l.value,class:"login-button admin-login-btn",onClick:i},{icon:t(()=>[l.value?B("",!0):(m(),c("svg",F,[...e[6]||(e[6]=[a("path",{d:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))]),default:t(()=>[e[7]||(e[7]=w(" 进入管理后台 ",-1))]),_:1},8,["loading"])]),_:1},8,["model"]),e[9]||(e[9]=a("div",{class:"form-footer"},[a("p",{class:"help-text"},[a("svg",{class:"help-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),w(" 仅限授权管理员访问,未经授权的访问将被记录 ")])],-1))])])])]))}}),P=N(I,[["__scopeId","data-v-332e576e"]]);export{P as default};
1
+ import{q as C,r as v,c0 as c,c1 as a,c2 as f,bW as r,bV as t,bs as n,l as w,bU as m,c4 as g,c5 as B,c3 as z}from"./vendor-D1MaVSrs.js";import{u as j}from"./index-BBxZKz3O.js";import{u as L,c as V,d as h,e as k,B as A}from"./naive-ui-C5lXjE56.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-D-KqHnQ9.js";const _={class:"auth-bg admin-theme"},H={class:"login-container"},G={class:"form-section"},q={class:"form-card"},F={key:0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I=C({__name:"Login",setup(K){const x=z(),p=L(),b=j(),u=v(),l=v(!1),s=v({username:"",password:""}),M={username:{required:!0,message:"请输入管理员用户名",trigger:"blur"},password:{required:!0,message:"请输入管理员密码",trigger:"blur"}};async function i(){var d,e,o;try{await((d=u.value)==null?void 0:d.validate()),l.value=!0,await b.loginAdmin(s.value.username,s.value.password),p.success("登录成功"),x.push("/admin/users")}catch(y){p.error(((o=(e=y.response)==null?void 0:e.data)==null?void 0:o.error)||"登录失败,请检查您的凭据")}finally{l.value=!1}}return(d,e)=>(m(),c("div",_,[e[11]||(e[11]=a("div",{class:"floating-shapes"},[a("div",{class:"shape shape-1"}),a("div",{class:"shape shape-2"}),a("div",{class:"shape shape-3"})],-1)),a("div",H,[e[10]||(e[10]=f('<div class="brand-section admin-gradient" data-v-332e576e><div class="brand-content" data-v-332e576e><div class="brand-logo" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#admin-logo-gradient1)" data-v-332e576e></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#admin-logo-gradient2)" data-v-332e576e></path><defs data-v-332e576e><linearGradient id="admin-logo-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-332e576e><stop offset="0%" stop-color="#ffffff" data-v-332e576e></stop><stop offset="100%" stop-color="#fef3c7" data-v-332e576e></stop></linearGradient><linearGradient id="admin-logo-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-332e576e><stop offset="0%" stop-color="#fef3c7" data-v-332e576e></stop><stop offset="100%" stop-color="#ffffff" data-v-332e576e></stop></linearGradient></defs></svg></div><h1 class="brand-title" data-v-332e576e>Flex MCP Admin</h1><p class="brand-subtitle" data-v-332e576e>超级管理员控制台</p><div class="brand-features" data-v-332e576e><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>全面的用户管理</span></div><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path><path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>灵活的配置管理</span></div><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>强大的权限控制</span></div></div></div></div>',1)),a("div",G,[a("div",q,[e[8]||(e[8]=f('<div class="form-header" data-v-332e576e><div class="admin-badge" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg><span data-v-332e576e>管理员登录</span></div><h2 class="form-title" data-v-332e576e>系统管理后台</h2><p class="form-description" data-v-332e576e>使用管理员凭据访问控制面板</p></div>',1)),r(n(V),{ref_key:"formRef",ref:u,model:s.value,rules:M,size:"large"},{default:t(()=>[r(n(h),{path:"username"},{label:t(()=>[...e[2]||(e[2]=[a("div",{class:"input-label"},[a("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),a("span",null,"管理员账号")],-1)])]),default:t(()=>[r(n(k),{value:s.value.username,"onUpdate:value":e[0]||(e[0]=o=>s.value.username=o),placeholder:"输入管理员用户名",class:"modern-input",onKeyup:g(i,["enter"])},{prefix:t(()=>[...e[3]||(e[3]=[a("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),r(n(h),{path:"password"},{label:t(()=>[...e[4]||(e[4]=[a("div",{class:"input-label"},[a("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),a("span",null,"管理员密码")],-1)])]),default:t(()=>[r(n(k),{value:s.value.password,"onUpdate:value":e[1]||(e[1]=o=>s.value.password=o),type:"password",placeholder:"输入管理员密码",class:"modern-input","show-password-on":"click",onKeyup:g(i,["enter"])},{prefix:t(()=>[...e[5]||(e[5]=[a("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M7 11V7a5 5 0 0110 0v4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),r(n(A),{type:"primary",size:"large",block:"",loading:l.value,class:"login-button admin-login-btn",onClick:i},{icon:t(()=>[l.value?B("",!0):(m(),c("svg",F,[...e[6]||(e[6]=[a("path",{d:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))]),default:t(()=>[e[7]||(e[7]=w(" 进入管理后台 ",-1))]),_:1},8,["loading"])]),_:1},8,["model"]),e[9]||(e[9]=a("div",{class:"form-footer"},[a("p",{class:"help-text"},[a("svg",{class:"help-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),w(" 仅限授权管理员访问,未经授权的访问将被记录 ")])],-1))])])])]))}}),P=N(I,[["__scopeId","data-v-332e576e"]]);export{P as default};
@@ -1 +1 @@
1
- import{a as y}from"./index-DAevE53R.js";import{u as V,A as D,B as p,g as L,h as C,c as q,d as M,e as z,p as O,o as E,D as F,r as G}from"./naive-ui-UIL-VU-f.js";import{q as J,r as n,o as R,c0 as W,c1 as o,bW as a,bV as s,bs as r,bU as Q,l as v,G as B}from"./vendor-DpXl860f.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-BXWd1EVR.js";const Y={class:"users-page"},Z={class:"page-header"},_={class:"users-card"},ee={class:"modal-footer"},oe={class:"apikey-section"},se={class:"mcp-config-section"},le=J({__name:"Users",setup(te){const d=V(),N=D(),g=n(!1),f=n(!1),c=n(!1),w=n(!1),m=n(""),b=n(""),h=n([]),x=n(),i=n({email:"",role:"user"}),A={pageSize:10,showSizePicker:!0,pageSizes:[10,20,50]},j=t=>({style:"cursor: pointer; transition: all 0.2s ease;",onMouseenter:e=>{e.currentTarget.style.backgroundColor="rgba(99, 102, 241, 0.04)"},onMouseleave:e=>{e.currentTarget.style.backgroundColor=""}}),U=[{label:"普通用户",value:"user"},{label:"管理员",value:"admin"}],P={email:{required:!0,message:"请输入邮箱地址",trigger:"blur"},role:{required:!0,message:"请选择用户角色",trigger:"change"}},$=[{title:"邮箱",key:"email",ellipsis:{tooltip:!0}},{title:"角色",key:"role",width:120,render(t){return B(G,{type:t.role==="admin"?"error":"info",round:!0},{default:()=>t.role==="admin"?"管理员":"普通用户"})}},{title:"创建时间",key:"createdAt",width:180},{title:"操作",key:"actions",width:100,render(t){return B(p,{type:"error",size:"small",secondary:!0,onClick:()=>H(t)},{default:()=>"删除"})}}];async function k(){g.value=!0;try{const t=await y.get("/users");h.value=t.data.data}catch{d.error("加载用户列表失败")}finally{g.value=!1}}async function T(){var t,e,l;try{await((t=x.value)==null?void 0:t.validate()),f.value=!0;const u=await y.post("/users",i.value);u.data.data&&u.data.data.apiKey?(m.value=u.data.data.apiKey,b.value=i.value.email,w.value=!0):d.success("创建成功"),c.value=!1,i.value={email:"",role:"user"},await k()}catch(u){d.error(((l=(e=u.response)==null?void 0:e.data)==null?void 0:l.error)||"创建失败")}finally{f.value=!1}}function H(t){N.warning({title:"确认删除",content:`确定要删除用户 ${t.email} 吗?此操作不可恢复。`,positiveText:"删除",negativeText:"取消",onPositiveClick:async()=>{var e,l;try{await y.delete(`/users/${t.id}`),d.success("删除成功"),await k()}catch(u){d.error(((l=(e=u.response)==null?void 0:e.data)==null?void 0:l.error)||"删除失败")}}})}function I(){navigator.clipboard.writeText(m.value),d.success("已复制到剪贴板")}function K(){const t=window.location.hostname,l=["5173","5174"].includes(window.location.port)?"3000":window.location.port,S={mcpServers:{"flex-mcp":{url:`${`${window.location.protocol}//${t}${l?`:${l}`:""}`}/mcp/sse`,headers:{email:b.value,apiKey:m.value}}}};navigator.clipboard.writeText(JSON.stringify(S,null,2)),d.success("MCP 配置已复制到剪贴板")}return R(()=>{k()}),(t,e)=>(Q(),W("div",Y,[o("div",Z,[e[9]||(e[9]=o("div",null,[o("h1",{class:"page-title"},"用户管理"),o("p",{class:"page-description"},"创建和管理系统用户,分配权限和 API 密钥")],-1)),a(r(p),{type:"primary",size:"large",class:"create-btn",onClick:e[0]||(e[0]=l=>c.value=!0)},{icon:s(()=>[...e[7]||(e[7]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M12 4v16m8-8H4",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[8]||(e[8]=v(" 创建用户 ",-1))]),_:1})]),o("div",_,[a(r(L),{columns:$,data:h.value,loading:g.value,pagination:A,"row-props":j,class:"modern-table"},null,8,["data","loading"])]),a(r(C),{show:c.value,"onUpdate:show":e[4]||(e[4]=l=>c.value=l),preset:"card",title:"创建新用户",class:"create-modal",bordered:!1,size:"huge"},{header:s(()=>[...e[10]||(e[10]=[o("div",{class:"modal-header"},[o("div",{class:"modal-icon"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])]),o("div",null,[o("h3",{class:"modal-title"},"创建新用户"),o("p",{class:"modal-subtitle"},"为新用户设置邮箱和角色权限")])],-1)])]),footer:s(()=>[o("div",ee,[a(r(p),{size:"large",onClick:e[3]||(e[3]=l=>c.value=!1)},{default:s(()=>[...e[13]||(e[13]=[v("取消",-1)])]),_:1}),a(r(p),{type:"primary",size:"large",loading:f.value,class:"submit-btn",onClick:T},{icon:s(()=>[...e[14]||(e[14]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M5 13l4 4L19 7",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[15]||(e[15]=v(" 创建用户 ",-1))]),_:1},8,["loading"])])]),default:s(()=>[a(r(q),{ref_key:"formRef",ref:x,model:i.value,rules:P,size:"large"},{default:s(()=>[a(r(M),{path:"email"},{label:s(()=>[...e[11]||(e[11]=[o("div",{class:"form-label"},[o("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"用户邮箱")],-1)])]),default:s(()=>[a(r(z),{value:i.value.email,"onUpdate:value":e[1]||(e[1]=l=>i.value.email=l),placeholder:"user@example.com","input-props":{type:"email"}},null,8,["value"])]),_:1}),a(r(M),{path:"role"},{label:s(()=>[...e[12]||(e[12]=[o("div",{class:"form-label"},[o("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"用户角色")],-1)])]),default:s(()=>[a(r(O),{value:i.value.role,"onUpdate:value":e[2]||(e[2]=l=>i.value.role=l),options:U,placeholder:"选择用户角色"},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["show"]),a(r(C),{show:w.value,"onUpdate:show":e[6]||(e[6]=l=>w.value=l),preset:"card",title:"用户创建成功",closable:!1,"mask-closable":!1,class:"apikey-modal",bordered:!1,size:"huge"},{header:s(()=>[...e[16]||(e[16]=[o("div",{class:"success-header"},[o("div",{class:"success-icon"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])]),o("div",null,[o("h3",{class:"success-title"},"用户创建成功!"),o("p",{class:"success-subtitle"},"请妥善保管以下信息")])],-1)])]),footer:s(()=>[a(r(p),{type:"primary",size:"large",block:"",class:"confirm-btn",onClick:e[5]||(e[5]=l=>w.value=!1)},{default:s(()=>[...e[25]||(e[25]=[v(" 我已保存,关闭窗口 ",-1)])]),_:1})]),default:s(()=>[a(r(E),{type:"warning",class:"warning-alert"},{icon:s(()=>[...e[17]||(e[17]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[18]||(e[18]=o("div",{class:"warning-content"},[o("strong",null,"重要提示"),o("p",null,"API Key 只会显示一次,请立即复制并妥善保存!丢失后需要重新创建用户。")],-1))]),_:1}),o("div",oe,[e[21]||(e[21]=o("div",{class:"section-label"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"API 密钥")],-1)),a(r(F),{class:"apikey-input-group"},{default:s(()=>[a(r(z),{value:m.value,readonly:"",placeholder:"API Key",size:"large",class:"apikey-input"},null,8,["value"]),a(r(p),{type:"primary",size:"large",class:"copy-btn",onClick:I},{icon:s(()=>[...e[19]||(e[19]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[20]||(e[20]=v(" 复制 ",-1))]),_:1})]),_:1})]),o("div",se,[e[24]||(e[24]=o("div",{class:"section-label"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"MCP 配置 (用于 Cursor / Claude)")],-1)),a(r(p),{type:"primary",size:"large",block:"",class:"copy-config-btn",onClick:K},{icon:s(()=>[...e[22]||(e[22]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[23]||(e[23]=v(" 复制 MCP 配置 JSON ",-1))]),_:1})])]),_:1},8,["show"])]))}}),de=X(le,[["__scopeId","data-v-8c8c351d"]]);export{de as default};
1
+ import{a as y}from"./index-BBxZKz3O.js";import{u as V,A as D,B as p,g as L,h as C,c as q,d as M,e as z,p as O,o as E,D as F,r as G}from"./naive-ui-C5lXjE56.js";import{q as J,r as n,o as R,c0 as W,c1 as o,bW as a,bV as s,bs as r,bU as Q,l as v,G as B}from"./vendor-D1MaVSrs.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-D-KqHnQ9.js";const Y={class:"users-page"},Z={class:"page-header"},_={class:"users-card"},ee={class:"modal-footer"},oe={class:"apikey-section"},se={class:"mcp-config-section"},le=J({__name:"Users",setup(te){const d=V(),N=D(),g=n(!1),f=n(!1),c=n(!1),w=n(!1),m=n(""),b=n(""),h=n([]),x=n(),i=n({email:"",role:"user"}),A={pageSize:10,showSizePicker:!0,pageSizes:[10,20,50]},j=t=>({style:"cursor: pointer; transition: all 0.2s ease;",onMouseenter:e=>{e.currentTarget.style.backgroundColor="rgba(99, 102, 241, 0.04)"},onMouseleave:e=>{e.currentTarget.style.backgroundColor=""}}),U=[{label:"普通用户",value:"user"},{label:"管理员",value:"admin"}],P={email:{required:!0,message:"请输入邮箱地址",trigger:"blur"},role:{required:!0,message:"请选择用户角色",trigger:"change"}},$=[{title:"邮箱",key:"email",ellipsis:{tooltip:!0}},{title:"角色",key:"role",width:120,render(t){return B(G,{type:t.role==="admin"?"error":"info",round:!0},{default:()=>t.role==="admin"?"管理员":"普通用户"})}},{title:"创建时间",key:"createdAt",width:180},{title:"操作",key:"actions",width:100,render(t){return B(p,{type:"error",size:"small",secondary:!0,onClick:()=>H(t)},{default:()=>"删除"})}}];async function k(){g.value=!0;try{const t=await y.get("/users");h.value=t.data.data}catch{d.error("加载用户列表失败")}finally{g.value=!1}}async function T(){var t,e,l;try{await((t=x.value)==null?void 0:t.validate()),f.value=!0;const u=await y.post("/users",i.value);u.data.data&&u.data.data.apiKey?(m.value=u.data.data.apiKey,b.value=i.value.email,w.value=!0):d.success("创建成功"),c.value=!1,i.value={email:"",role:"user"},await k()}catch(u){d.error(((l=(e=u.response)==null?void 0:e.data)==null?void 0:l.error)||"创建失败")}finally{f.value=!1}}function H(t){N.warning({title:"确认删除",content:`确定要删除用户 ${t.email} 吗?此操作不可恢复。`,positiveText:"删除",negativeText:"取消",onPositiveClick:async()=>{var e,l;try{await y.delete(`/users/${t.id}`),d.success("删除成功"),await k()}catch(u){d.error(((l=(e=u.response)==null?void 0:e.data)==null?void 0:l.error)||"删除失败")}}})}function I(){navigator.clipboard.writeText(m.value),d.success("已复制到剪贴板")}function K(){const t=window.location.hostname,l=["5173","5174"].includes(window.location.port)?"3000":window.location.port,S={mcpServers:{"flex-mcp":{url:`${`${window.location.protocol}//${t}${l?`:${l}`:""}`}/mcp/sse`,headers:{email:b.value,apiKey:m.value}}}};navigator.clipboard.writeText(JSON.stringify(S,null,2)),d.success("MCP 配置已复制到剪贴板")}return R(()=>{k()}),(t,e)=>(Q(),W("div",Y,[o("div",Z,[e[9]||(e[9]=o("div",null,[o("h1",{class:"page-title"},"用户管理"),o("p",{class:"page-description"},"创建和管理系统用户,分配权限和 API 密钥")],-1)),a(r(p),{type:"primary",size:"large",class:"create-btn",onClick:e[0]||(e[0]=l=>c.value=!0)},{icon:s(()=>[...e[7]||(e[7]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M12 4v16m8-8H4",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[8]||(e[8]=v(" 创建用户 ",-1))]),_:1})]),o("div",_,[a(r(L),{columns:$,data:h.value,loading:g.value,pagination:A,"row-props":j,class:"modern-table"},null,8,["data","loading"])]),a(r(C),{show:c.value,"onUpdate:show":e[4]||(e[4]=l=>c.value=l),preset:"card",title:"创建新用户",class:"create-modal",bordered:!1,size:"huge"},{header:s(()=>[...e[10]||(e[10]=[o("div",{class:"modal-header"},[o("div",{class:"modal-icon"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])]),o("div",null,[o("h3",{class:"modal-title"},"创建新用户"),o("p",{class:"modal-subtitle"},"为新用户设置邮箱和角色权限")])],-1)])]),footer:s(()=>[o("div",ee,[a(r(p),{size:"large",onClick:e[3]||(e[3]=l=>c.value=!1)},{default:s(()=>[...e[13]||(e[13]=[v("取消",-1)])]),_:1}),a(r(p),{type:"primary",size:"large",loading:f.value,class:"submit-btn",onClick:T},{icon:s(()=>[...e[14]||(e[14]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M5 13l4 4L19 7",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[15]||(e[15]=v(" 创建用户 ",-1))]),_:1},8,["loading"])])]),default:s(()=>[a(r(q),{ref_key:"formRef",ref:x,model:i.value,rules:P,size:"large"},{default:s(()=>[a(r(M),{path:"email"},{label:s(()=>[...e[11]||(e[11]=[o("div",{class:"form-label"},[o("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"用户邮箱")],-1)])]),default:s(()=>[a(r(z),{value:i.value.email,"onUpdate:value":e[1]||(e[1]=l=>i.value.email=l),placeholder:"user@example.com","input-props":{type:"email"}},null,8,["value"])]),_:1}),a(r(M),{path:"role"},{label:s(()=>[...e[12]||(e[12]=[o("div",{class:"form-label"},[o("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"用户角色")],-1)])]),default:s(()=>[a(r(O),{value:i.value.role,"onUpdate:value":e[2]||(e[2]=l=>i.value.role=l),options:U,placeholder:"选择用户角色"},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["show"]),a(r(C),{show:w.value,"onUpdate:show":e[6]||(e[6]=l=>w.value=l),preset:"card",title:"用户创建成功",closable:!1,"mask-closable":!1,class:"apikey-modal",bordered:!1,size:"huge"},{header:s(()=>[...e[16]||(e[16]=[o("div",{class:"success-header"},[o("div",{class:"success-icon"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])]),o("div",null,[o("h3",{class:"success-title"},"用户创建成功!"),o("p",{class:"success-subtitle"},"请妥善保管以下信息")])],-1)])]),footer:s(()=>[a(r(p),{type:"primary",size:"large",block:"",class:"confirm-btn",onClick:e[5]||(e[5]=l=>w.value=!1)},{default:s(()=>[...e[25]||(e[25]=[v(" 我已保存,关闭窗口 ",-1)])]),_:1})]),default:s(()=>[a(r(E),{type:"warning",class:"warning-alert"},{icon:s(()=>[...e[17]||(e[17]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[18]||(e[18]=o("div",{class:"warning-content"},[o("strong",null,"重要提示"),o("p",null,"API Key 只会显示一次,请立即复制并妥善保存!丢失后需要重新创建用户。")],-1))]),_:1}),o("div",oe,[e[21]||(e[21]=o("div",{class:"section-label"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"API 密钥")],-1)),a(r(F),{class:"apikey-input-group"},{default:s(()=>[a(r(z),{value:m.value,readonly:"",placeholder:"API Key",size:"large",class:"apikey-input"},null,8,["value"]),a(r(p),{type:"primary",size:"large",class:"copy-btn",onClick:I},{icon:s(()=>[...e[19]||(e[19]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[20]||(e[20]=v(" 复制 ",-1))]),_:1})]),_:1})]),o("div",se,[e[24]||(e[24]=o("div",{class:"section-label"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),o("span",null,"MCP 配置 (用于 Cursor / Claude)")],-1)),a(r(p),{type:"primary",size:"large",block:"",class:"copy-config-btn",onClick:K},{icon:s(()=>[...e[22]||(e[22]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:s(()=>[e[23]||(e[23]=v(" 复制 MCP 配置 JSON ",-1))]),_:1})])]),_:1},8,["show"])]))}}),de=X(le,[["__scopeId","data-v-8c8c351d"]]);export{de as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-Cr1ve1cB.js","assets/vendor-D1MaVSrs.js","assets/naive-ui-C5lXjE56.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/monaco-editor-D-KqHnQ9.js","assets/Login-DVWgtC9D.js","assets/Layout-DoiZawSk.js","assets/Dashboard-XGeMGzfq.js","assets/InitScriptEditor-tSkIU_zo.js","assets/Blank-DYHf__-I.js","assets/Layout-CtytdFcc.js","assets/Users-C4kFgZqa.js","assets/Configs-BhOuA1TR.js","assets/Backup-BnJJcJ1y.js"])))=>i.map(i=>d[i]);
2
+ import{q as T,r as g,bS as O,bs as A,bT as D,bU as C,bV as P,bW as b,bX as R,bY as U,bZ as N,b_ as q,br as V,b$ as B}from"./vendor-D1MaVSrs.js";import{N as M,a as W,b as $,n as j}from"./naive-ui-C5lXjE56.js";import{l as F}from"./monaco-editor-D-KqHnQ9.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))s(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(t){if(t.ep)return;t.ep=!0;const r=n(t);fetch(t.href,r)}})();const x=T({__name:"App",setup(e){const a=g(null);return(n,s)=>{const t=D("router-view");return C(),O(A(M),{theme:a.value},{default:P(()=>[b(A(W),null,{default:P(()=>[b(A($),null,{default:P(()=>[b(t)]),_:1})]),_:1})]),_:1},8,["theme"])}}}),z="modulepreload",H=function(e){return"/"+e},S={},d=function(a,n,s){let t=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));t=Promise.allSettled(n.map(c=>{if(c=H(c),c in S)return;S[c]=!0;const p=c.endsWith(".css"),u=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const i=document.createElement("link");if(i.rel=p?"stylesheet":z,p||(i.as="script"),i.crossOrigin="",i.href=c,l&&i.setAttribute("nonce",l),document.head.appendChild(i),p)return new Promise((_,m)=>{i.addEventListener("load",_),i.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return t.then(o=>{for(const l of o||[])l.status==="rejected"&&r(l.reason);return a().catch(r)})};let y=null,f=null,L=!1;function v(){return L&&y?Promise.resolve(y):f||(f=F.init().then(e=>(y=e,L=!0,f=null,e)).catch(e=>{throw f=null,e}),f)}const K=[{path:"/",redirect:"/user/login"},{path:"/user/login",name:"UserLogin",component:()=>d(()=>import("./Login-Cr1ve1cB.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/admin/login",name:"AdminLogin",component:()=>d(()=>import("./Login-DVWgtC9D.js"),__vite__mapDeps([5,1,2,3,4]))},{path:"/user",name:"UserLayout",component:()=>d(()=>import("./Layout-DoiZawSk.js"),__vite__mapDeps([6,1,2,3,4])),meta:{requiresAuth:!0,role:"user"},children:[{path:"dashboard",name:"UserDashboard",component:()=>d(()=>import("./Dashboard-XGeMGzfq.js"),__vite__mapDeps([7,1,8,2,3,4]))},{path:"blank",name:"UserBlank",component:()=>d(()=>import("./Blank-DYHf__-I.js"),__vite__mapDeps([9,1,3]))}]},{path:"/admin",name:"AdminLayout",component:()=>d(()=>import("./Layout-CtytdFcc.js"),__vite__mapDeps([10,1,2,3,4])),meta:{requiresAuth:!0,role:"admin"},children:[{path:"users",name:"AdminUsers",component:()=>d(()=>import("./Users-C4kFgZqa.js"),__vite__mapDeps([11,2,1,3,4]))},{path:"configs",name:"AdminConfigs",component:()=>d(()=>import("./Configs-BhOuA1TR.js"),__vite__mapDeps([12,8,1,2,3,4]))},{path:"backup",name:"AdminBackup",component:()=>d(()=>import("./Backup-BnJJcJ1y.js"),__vite__mapDeps([13,2,1,3,4]))}]}],I=R({history:U(),routes:K});I.beforeEach(async(e,a,n)=>{if(e.meta.requiresAuth){if(e.meta.role==="admin"){if(!localStorage.getItem("admin_token"))return n("/admin/login")}else if(!localStorage.getItem("user_token"))return n("/user/login");(e.name==="UserDashboard"||e.name==="AdminConfigs")&&v().catch(s=>{console.warn("Monaco Editor 预加载失败:",s)})}n()});const E=N.create({baseURL:"/api",headers:{"Content-Type":"application/json"}});E.interceptors.request.use(e=>{const n=window.location.pathname.startsWith("/admin")?localStorage.getItem("admin_token"):localStorage.getItem("user_token");return n&&(e.headers.Authorization=`Bearer ${n}`),e});E.interceptors.response.use(e=>e,e=>{var n,s,t;if(!e.response&&e.request&&(e.code==="ECONNREFUSED"||((n=e.message)==null?void 0:n.includes("ECONNREFUSED"))||((s=e.message)==null?void 0:s.includes("Network Error"))||e.request.readyState===4&&e.request.status===0)){const r=window.__lastConnectionErrorTime||0,o=Date.now();o-r>5e3&&(window.__lastConnectionErrorTime=o,console.error("❌ 无法连接到后端服务器"),console.error(" 请确保后端服务器正在运行在 http://localhost:3000"),console.error("💡 启动方法:"),console.error(" - 开发模式: pnpm dev (同时启动前后端)"),console.error(" - 仅后端: pnpm --filter server dev"),console.error(" - 生产模式: pnpm start"))}return((t=e.response)==null?void 0:t.status)===401&&(window.location.pathname.startsWith("/admin")?(localStorage.removeItem("admin_token"),window.location.pathname.includes("/login")||(window.location.href="/admin/login")):(localStorage.removeItem("user_token"),window.location.pathname.includes("/login")||(window.location.href="/user/login"))),Promise.reject(e)});const X=q("auth",()=>{const e=g(null),a=g(localStorage.getItem("user_token")),n=g(null),s=g(localStorage.getItem("admin_token"));async function t(u,i){const _=await E.post("/auth/user/login",{email:u,apiKey:i}),{token:m,user:h}=_.data.data;return a.value=m,e.value=h,localStorage.setItem("user_token",m),v().catch(k=>{console.warn("Monaco Editor 预加载失败:",k)}),{token:m,user:h}}async function r(u,i){const _=await E.post("/auth/admin/login",{username:u,password:i}),{token:m,role:h}=_.data.data;return s.value=m,n.value=h,localStorage.setItem("admin_token",m),v().catch(k=>{console.warn("Monaco Editor 预加载失败:",k)}),{token:m,role:h}}function o(){e.value=null,a.value=null,localStorage.removeItem("user_token")}function l(){n.value=null,s.value=null,localStorage.removeItem("admin_token")}function c(){o(),l()}async function p(){if(a.value&&!e.value)try{const u=await E.get("/auth/user/me");e.value=u.data.data,v().catch(i=>{console.warn("Monaco Editor 预加载失败:",i)})}catch{a.value=null,localStorage.removeItem("user_token")}s.value&&v().catch(u=>{console.warn("Monaco Editor 预加载失败:",u)})}return{user:e,userToken:a,adminRole:n,adminToken:s,loginUser:t,loginAdmin:r,userLogout:o,adminLogout:l,logout:c,initUser:p}}),w=V(x);w.use(B());w.use(I);w.use(j);const Y=X();Y.initUser();w.mount("#app");export{E as a,v as p,X as u};
@@ -1,4 +1,4 @@
1
- import{i as P}from"./vendor-DpXl860f.js";function v(n,r){(r==null||r>n.length)&&(r=n.length);for(var e=0,t=Array(r);e<r;e++)t[e]=n[e];return t}function S(n){if(Array.isArray(n))return n}function I(n,r,e){return(r=L(r))in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function A(n,r){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,o,i,a,u=[],c=!0,p=!1;try{if(i=(e=e.call(n)).next,r!==0)for(;!(c=(t=i.call(e)).done)&&(u.push(t.value),u.length!==r);c=!0);}catch(O){p=!0,o=O}finally{try{if(!c&&e.return!=null&&(a=e.return(),Object(a)!==a))return}finally{if(p)throw o}}return u}}function E(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{i as P}from"./vendor-D1MaVSrs.js";function v(n,r){(r==null||r>n.length)&&(r=n.length);for(var e=0,t=Array(r);e<r;e++)t[e]=n[e];return t}function S(n){if(Array.isArray(n))return n}function I(n,r,e){return(r=L(r))in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function A(n,r){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,o,i,a,u=[],c=!0,p=!1;try{if(i=(e=e.call(n)).next,r!==0)for(;!(c=(t=i.call(e)).done)&&(u.push(t.value),u.length!==r);c=!0);}catch(O){p=!0,o=O}finally{try{if(!c&&e.return!=null&&(a=e.return(),Object(a)!==a))return}finally{if(p)throw o}}return u}}function E(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function g(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?d(Object(e),!0).forEach(function(t){I(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):d(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function T(n,r){if(n==null)return{};var e,t,o=C(n,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)e=i[t],r.indexOf(e)===-1&&{}.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function C(n,r){if(n==null)return{};var e={};for(var t in n)if({}.hasOwnProperty.call(n,t)){if(r.indexOf(t)!==-1)continue;e[t]=n[t]}return e}function z(n,r){return S(n)||A(n,r)||M(n,r)||E()}function D(n,r){if(typeof n!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,r);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function L(n){var r=D(n,"string");return typeof r=="symbol"?r:r+""}function M(n,r){if(n){if(typeof n=="string")return v(n,r);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?v(n,r):void 0}}var _={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function q(n){return function r(){for(var e=this,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return o.length>=n.length?n.apply(this,o):function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];return r.apply(e,[].concat(o,u))}}}function x(n){return{}.toString.call(n).includes("Object")}function $(n){return n||b("configIsRequired"),x(n)||b("configType"),n.urls?(R(),{paths:{vs:n.urls.monacoBase}}):n}function R(){console.warn(y.deprecation)}function N(n,r){throw new Error(n[r]||n.default)}var y={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
@@ -1,4 +1,4 @@
1
- import{p as kg,C as zg,r as B,o as Nt,a as Tt,b as Yt,c as Bt,u as st,d as Ae,w as gt,g as il,e as Hr,f as Pg,h as Dd,j as ea,k as Qt,l as Si,F as Vt,m as al,v as _o,n as $g,q,s as C,t as Ed,x as Pt,y as Vr,z as Ln,A as nt,B as Tg,D as Og,E as ir,G as i,H as ll,I as Ar,J as ae,K as vo,T as Ft,L as Fg,M as Bi,N as ar,O as Co,P as lt,V as zo,Q as At,R as Ig,S as uo,U as Ao,W as Zo,X as Nd,Y as qt,Z as Rt,_ as Bg,$ as Do,a0 as To,a1 as Mg,a2 as sl,a3 as eo,a4 as Hn,a5 as _g,a6 as Uo,a7 as Mi,a8 as Wo,a9 as yt,aa as yn,ab as vt,ac as $a,ad as dl,ae as Po,af as _i,ag as Ag,ah as Ai,ai as Lt,aj as et,ak as Vo,al as Or,am as Ld,an as Dg,ao as Yo,ap as It,aq as jr,ar as mo,as as Ta,at as Oa,au as Eg,av as Ur,aw as Ht,ax as Ho,ay as Hd,az as Vd,aA as Ng,aB as Lg,aC as Hg,aD as dr,aE as Vg,aF as jd,aG as as,aH as jg,aI as Ud,aJ as Oo,aK as Ug,aL as Wg,aM as Kg,aN as ln,aO as Dn,aP as yi,aQ as sn,aR as pn,aS as xn,aT as lr,aU as En,aV as Wd,aW as Fa,aX as Ia,aY as Ba,aZ as Br,a_ as Ma,a$ as _a,b0 as Aa,b1 as ls,b2 as Ri,b3 as cl,b4 as jt,b5 as Cn,b6 as qg,b7 as po,b8 as Yg,b9 as ul,ba as Da,bb as fl,bc as bn,bd as Kd,be as Fn,bf as Gg,bg as ta,bh as Xg,bi as oa,bj as Zg,bk as ki,bl as zi,bm as Ea,bn as hl,bo as vl,bp as Di,bq as Ei,br as Jg,bs as ss,bt as na,bu as ra,bv as qd,bw as Yd,bx as ds,by as Qg,bz as Zn,bA as em,bB as Gd,bC as tm,bD as om,bE as Xd,bF as nm,bG as rm,bH as im,bI as am,bJ as lm,bK as sm,bL as Zd,bM as dm,bN as cm,bO as um,bP as cs,bQ as fm,bR as us}from"./vendor-DpXl860f.js";const hm="n",Dr=`.${hm}-`,vm="__",gm="--",Jd=zg(),Qd=kg({blockPrefix:Dr,elementPrefix:vm,modifierPrefix:gm});Jd.use(Qd);const{c:R,find:Mz}=Jd,{cB:p,cE:P,cM:T,cNotM:ct}=Qd;function tn(e){return R(({props:{bPrefix:t}})=>`${t||Dr}modal, ${t||Dr}drawer`,[e])}function fn(e){return R(({props:{bPrefix:t}})=>`${t||Dr}popover`,[e])}function ec(e){return R(({props:{bPrefix:t}})=>`&${t||Dr}modal`,e)}const mm=(...e)=>R(">",[p(...e)]);function pe(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,o=>o.toUpperCase()))}const gl="n-internal-select-menu",tc="n-internal-select-menu-body",Wr="n-drawer-body",ml="n-drawer",Kr="n-modal-body",pm="n-modal-provider",oc="n-modal",gr="n-popover-body",nc="__disabled__";function _t(e){const t=Ae(Kr,null),o=Ae(Wr,null),n=Ae(gr,null),r=Ae(tc,null),a=B();if(typeof document<"u"){a.value=document.fullscreenElement;const s=()=>{a.value=document.fullscreenElement};Nt(()=>{Tt("fullscreenchange",document,s)}),Yt(()=>{Bt("fullscreenchange",document,s)})}return st(()=>{var s;const{to:l}=e;return l!==void 0?l===!1?nc:l===!0?a.value||"body":l:t!=null&&t.value?(s=t.value.$el)!==null&&s!==void 0?s:t.value:o!=null&&o.value?o.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:l??(a.value||"body")})}_t.tdkey=nc;_t.propTo={type:[String,Object,Boolean],default:void 0};function bm(e,t,o){var n;const r=Ae(e,null);if(r===null)return;const a=(n=il())===null||n===void 0?void 0:n.proxy;gt(o,s),s(o.value),Yt(()=>{s(void 0,o.value)});function s(c,u){if(!r)return;const f=r[t];u!==void 0&&l(f,u),c!==void 0&&d(f,c)}function l(c,u){c[u]||(c[u]=[]),c[u].splice(c[u].findIndex(f=>f===a),1)}function d(c,u){c[u]||(c[u]=[]),~c[u].findIndex(f=>f===a)||c[u].push(a)}}function xm(e,t,o){const n=Ae(e,null);n!==null&&(t in n||(n[t]=[]),n[t].push(o.value),gt(o,(r,a)=>{const s=n[t],l=s.findIndex(d=>d===a);~l&&s.splice(l,1),s.push(r)}),Yt(()=>{const r=n[t],a=r.findIndex(s=>s===o.value);~a&&r.splice(a,1)}))}function ym(e,t,o){const n=Ae(e,null);n!==null&&(t in n||(n[t]=[]),Nt(()=>{const r=o();r&&n[t].push(r)}),Yt(()=>{const r=n[t],a=o(),s=r.findIndex(l=>l===a);~s&&r.splice(s,1)}))}function Cm(e,t,o){const n=B(e.value);let r=null;return gt(e,a=>{r!==null&&window.clearTimeout(r),a===!0?o&&!o.value?n.value=!0:r=window.setTimeout(()=>{n.value=!0},t):n.value=!1}),n}const Ro=typeof document<"u"&&typeof window<"u";let fs=!1;function pl(){if(Ro&&window.CSS&&!fs&&(fs=!0,"registerProperty"in(window==null?void 0:window.CSS)))try{CSS.registerProperty({name:"--n-color-start",syntax:"<color>",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"<color>",inherits:!1,initialValue:"#0000"})}catch{}}const bl=B(!1);function hs(){bl.value=!0}function vs(){bl.value=!1}let Pr=0;function rc(){return Ro&&(Hr(()=>{Pr||(window.addEventListener("compositionstart",hs),window.addEventListener("compositionend",vs)),Pr++}),Yt(()=>{Pr<=1?(window.removeEventListener("compositionstart",hs),window.removeEventListener("compositionend",vs),Pr=0):Pr--})),bl}let Jn=0,gs="",ms="",ps="",bs="";const Na=B("0px");function ic(e){if(typeof document>"u")return;const t=document.documentElement;let o,n=!1;const r=()=>{t.style.marginRight=gs,t.style.overflow=ms,t.style.overflowX=ps,t.style.overflowY=bs,Na.value="0px"};Nt(()=>{o=gt(e,a=>{if(a){if(!Jn){const s=window.innerWidth-t.offsetWidth;s>0&&(gs=t.style.marginRight,t.style.marginRight=`${s}px`,Na.value=`${s}px`),ms=t.style.overflow,ps=t.style.overflowX,bs=t.style.overflowY,t.style.overflow="hidden",t.style.overflowX="hidden",t.style.overflowY="hidden"}n=!0,Jn++}else Jn--,Jn||r(),n=!1},{immediate:!0})}),Yt(()=>{o==null||o(),n&&(Jn--,Jn||r(),n=!1)})}function xl(e){const t={isDeactivated:!1};let o=!1;return Pg(()=>{if(t.isDeactivated=!1,!o){o=!0;return}e()}),Dd(()=>{t.isDeactivated=!0,o||(o=!0)}),t}function Ni(e,t){t&&(Nt(()=>{const{value:o}=e;o&&ea.registerHandler(o,t)}),gt(e,(o,n)=>{n&&ea.unregisterHandler(n)},{deep:!1}),Yt(()=>{const{value:o}=e;o&&ea.unregisterHandler(o)}))}function Vn(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const wm=/^(\d|\.)+$/,xs=/(\d|\.)+/;function wt(e,{c:t=1,offset:o=0,attachPx:n=!0}={}){if(typeof e=="number"){const r=(e+o)*t;return r===0?"0":`${r}px`}else if(typeof e=="string")if(wm.test(e)){const r=(Number(e)+o)*t;return n?r===0?"0":`${r}px`:`${r}`}else{const r=xs.exec(e);return r?e.replace(xs,String((Number(r[0])+o)*t)):e}return e}function ys(e){const{left:t,right:o,top:n,bottom:r}=Qt(e);return`${n} ${t} ${r} ${o}`}function Li(e,t){if(!e)return;const o=document.createElement("a");o.href=e,t!==void 0&&(o.download=t),document.body.appendChild(o),o.click(),document.body.removeChild(o)}function Sm(e,t){Li(e,t)}function Cs(e){return e.nodeName==="#document"}let ia;function Rm(){return ia===void 0&&(ia=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),ia}const ac=new WeakSet;function jn(e){ac.add(e)}function lc(e){return!ac.has(e)}function cr(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}const km={tiny:"mini",small:"tiny",medium:"small",large:"medium",huge:"large"};function La(e){const t=km[e];if(t===void 0)throw new Error(`${e} has no smaller size.`);return t}function zm(e,t){if(e===null&&t===null)return!0;if(e===null||t===null)return!1;if(e.length===t.length){for(let o=0;o<e.length;++o)if(e[o]!==t[o])return!1;return!0}return!1}const ws=new Set;function Pm(e,t){const o=`[naive/${e}]: ${t}`;ws.has(o)||(ws.add(o),console.error(o))}function fo(e,t){console.error(`[naive/${e}]: ${t}`)}function Ss(e,t,o){console.error(`[naive/${e}]: ${t}`,o)}function ro(e,t){throw new Error(`[naive/${e}]: ${t}`)}function re(e,...t){if(Array.isArray(e))e.forEach(o=>re(o,...t));else return e(...t)}function sc(e){return typeof e=="string"?`s-${e}`:`n-${e}`}function dc(e){return t=>{t?e.value=t.$el:e.value=null}}function $o(e,t=!0,o=[]){return e.forEach(n=>{if(n!==null){if(typeof n!="object"){(typeof n=="string"||typeof n=="number")&&o.push(Si(String(n)));return}if(Array.isArray(n)){$o(n,t,o);return}if(n.type===Vt){if(n.children===null)return;Array.isArray(n.children)&&$o(n.children,t,o)}else{if(n.type===al&&t)return;o.push(n)}}}),o}function $m(e,t="default",o=void 0){const n=e[t];if(!n)return fo("getFirstSlotVNode",`slot[${t}] is empty`),null;const r=$o(n(o));return r.length===1?r[0]:(fo("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function cc(e,t,o){if(!t)return null;const n=$o(t(o));return n.length===1?n[0]:(fo("getFirstSlotVNode",`slot[${e}] should have exactly one child`),null)}function mr(e,t="default",o=[]){const r=e.$slots[t];return r===void 0?o:r()}function Rs(e,t="default",o=[]){const{children:n}=e;if(n!==null&&typeof n=="object"&&!Array.isArray(n)){const r=n[t];if(typeof r=="function")return r()}return o}function Tm(e){var t;const o=(t=e.dirs)===null||t===void 0?void 0:t.find(({dir:n})=>n===_o);return!!(o&&o.value===!1)}function no(e,t=[],o){const n={};return t.forEach(r=>{n[r]=e[r]}),Object.assign(n,o)}function ho(e){return Object.keys(e)}function Mr(e){const t=e.filter(o=>o!==void 0);if(t.length!==0)return t.length===1?t[0]:o=>{e.forEach(n=>{n&&n(o)})}}function Pn(e,t=[],o){const n={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(n[a]=e[a])}),Object.assign(n,o)}function Et(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?Si(e):typeof e=="number"?Si(String(e)):null}function jo(e){return e.some(t=>$g(t)?!(t.type===al||t.type===Vt&&!jo(t.children)):!0)?e:null}function ut(e,t){return e&&jo(e())||t()}function Xt(e,t,o){return e&&jo(e(t))||o(t)}function xt(e,t){const o=e&&jo(e());return t(o||null)}function Om(e,t,o){const n=e&&jo(e(t));return o(n||null)}function Nn(e){return!(e&&jo(e()))}const Ha=q({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),So="n-config-provider",Pi="n";function De(e={},t={defaultBordered:!0}){const o=Ae(So,null);return{inlineThemeDisabled:o==null?void 0:o.inlineThemeDisabled,mergedRtlRef:o==null?void 0:o.mergedRtlRef,mergedComponentPropsRef:o==null?void 0:o.mergedComponentPropsRef,mergedBreakpointsRef:o==null?void 0:o.mergedBreakpointsRef,mergedBorderedRef:C(()=>{var n,r;const{bordered:a}=e;return a!==void 0?a:(r=(n=o==null?void 0:o.mergedBorderedRef.value)!==null&&n!==void 0?n:t.defaultBordered)!==null&&r!==void 0?r:!0}),mergedClsPrefixRef:o?o.mergedClsPrefixRef:Ed(Pi),namespaceRef:C(()=>o==null?void 0:o.mergedNamespaceRef.value)}}function uc(){const e=Ae(So,null);return e?e.mergedClsPrefixRef:Ed(Pi)}function Ge(e,t,o,n){o||ro("useThemeClass","cssVarsRef is not passed");const r=Ae(So,null),a=r==null?void 0:r.mergedThemeHashRef,s=r==null?void 0:r.styleMountTarget,l=B(""),d=Vr();let c;const u=`__${e}`,f=()=>{let v=u;const g=t?t.value:void 0,h=a==null?void 0:a.value;h&&(v+=`-${h}`),g&&(v+=`-${g}`);const{themeOverrides:m,builtinThemeOverrides:x}=n;m&&(v+=`-${Ln(JSON.stringify(m))}`),x&&(v+=`-${Ln(JSON.stringify(x))}`),l.value=v,c=()=>{const b=o.value;let y="";for(const z in b)y+=`${z}: ${b[z]};`;R(`.${v}`,y).mount({id:v,ssr:d,parent:s}),c=void 0}};return Pt(()=>{f()}),{themeClass:l,onRender:()=>{c==null||c()}}}const $i="n-form-item";function Zt(e,{defaultSize:t="medium",mergedSize:o,mergedDisabled:n}={}){const r=Ae($i,null);nt($i,null);const a=C(o?()=>o(r):()=>{const{size:d}=e;if(d)return d;if(r){const{mergedSize:c}=r;if(c.value!==void 0)return c.value}return t}),s=C(n?()=>n(r):()=>{const{disabled:d}=e;return d!==void 0?d:r?r.disabled.value:!1}),l=C(()=>{const{status:d}=e;return d||(r==null?void 0:r.mergedValidationStatus.value)});return Yt(()=>{r&&r.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:s,mergedStatusRef:l,nTriggerFormBlur(){r&&r.handleContentBlur()},nTriggerFormChange(){r&&r.handleContentChange()},nTriggerFormFocus(){r&&r.handleContentFocus()},nTriggerFormInput(){r&&r.handleContentInput()}}}function fc(e,t){const o=Ae(So,null);return C(()=>e.hljs||(o==null?void 0:o.mergedHljsRef.value))}const Fm={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"},Heatmap:{less:"less",more:"more",monthFormat:"MMM",weekdayFormat:"eee"}},Im={name:"en-US",locale:Tg};function Gt(e){const{mergedLocaleRef:t,mergedDateLocaleRef:o}=Ae(So,null)||{},n=C(()=>{var a,s;return(s=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&s!==void 0?s:Fm[e]});return{dateLocaleRef:C(()=>{var a;return(a=o==null?void 0:o.value)!==null&&a!==void 0?a:Im}),localeRef:n}}const ur="naive-ui-style";function $t(e,t,o){if(!t)return;const n=Vr(),r=C(()=>{const{value:l}=t;if(!l)return;const d=l[e];if(d)return d}),a=Ae(So,null),s=()=>{Pt(()=>{const{value:l}=o,d=`${l}${e}Rtl`;if(Og(d,n))return;const{value:c}=r;c&&c.style.mount({id:d,head:!0,anchorMetaName:ur,props:{bPrefix:l?`.${l}-`:void 0},ssr:n,parent:a==null?void 0:a.styleMountTarget})})};return n?s():Hr(s),r}const Fo={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Bm,fontFamily:Mm,lineHeight:_m}=Fo,hc=R("body",`
1
+ import{p as kg,C as zg,r as B,o as Nt,a as Tt,b as Yt,c as Bt,u as st,d as Ae,w as gt,g as il,e as Hr,f as Pg,h as Dd,j as ea,k as Qt,l as Si,F as Vt,m as al,v as _o,n as $g,q,s as C,t as Ed,x as Pt,y as Vr,z as Ln,A as nt,B as Tg,D as Og,E as ir,G as i,H as ll,I as Ar,J as ae,K as vo,T as Ft,L as Fg,M as Bi,N as ar,O as Co,P as lt,V as zo,Q as At,R as Ig,S as uo,U as Ao,W as Zo,X as Nd,Y as qt,Z as Rt,_ as Bg,$ as Do,a0 as To,a1 as Mg,a2 as sl,a3 as eo,a4 as Hn,a5 as _g,a6 as Uo,a7 as Mi,a8 as Wo,a9 as yt,aa as yn,ab as vt,ac as $a,ad as dl,ae as Po,af as _i,ag as Ag,ah as Ai,ai as Lt,aj as et,ak as Vo,al as Or,am as Ld,an as Dg,ao as Yo,ap as It,aq as jr,ar as mo,as as Ta,at as Oa,au as Eg,av as Ur,aw as Ht,ax as Ho,ay as Hd,az as Vd,aA as Ng,aB as Lg,aC as Hg,aD as dr,aE as Vg,aF as jd,aG as as,aH as jg,aI as Ud,aJ as Oo,aK as Ug,aL as Wg,aM as Kg,aN as ln,aO as Dn,aP as yi,aQ as sn,aR as pn,aS as xn,aT as lr,aU as En,aV as Wd,aW as Fa,aX as Ia,aY as Ba,aZ as Br,a_ as Ma,a$ as _a,b0 as Aa,b1 as ls,b2 as Ri,b3 as cl,b4 as jt,b5 as Cn,b6 as qg,b7 as po,b8 as Yg,b9 as ul,ba as Da,bb as fl,bc as bn,bd as Kd,be as Fn,bf as Gg,bg as ta,bh as Xg,bi as oa,bj as Zg,bk as ki,bl as zi,bm as Ea,bn as hl,bo as vl,bp as Di,bq as Ei,br as Jg,bs as ss,bt as na,bu as ra,bv as qd,bw as Yd,bx as ds,by as Qg,bz as Zn,bA as em,bB as Gd,bC as tm,bD as om,bE as Xd,bF as nm,bG as rm,bH as im,bI as am,bJ as lm,bK as sm,bL as Zd,bM as dm,bN as cm,bO as um,bP as cs,bQ as fm,bR as us}from"./vendor-D1MaVSrs.js";const hm="n",Dr=`.${hm}-`,vm="__",gm="--",Jd=zg(),Qd=kg({blockPrefix:Dr,elementPrefix:vm,modifierPrefix:gm});Jd.use(Qd);const{c:R,find:Mz}=Jd,{cB:p,cE:P,cM:T,cNotM:ct}=Qd;function tn(e){return R(({props:{bPrefix:t}})=>`${t||Dr}modal, ${t||Dr}drawer`,[e])}function fn(e){return R(({props:{bPrefix:t}})=>`${t||Dr}popover`,[e])}function ec(e){return R(({props:{bPrefix:t}})=>`&${t||Dr}modal`,e)}const mm=(...e)=>R(">",[p(...e)]);function pe(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,o=>o.toUpperCase()))}const gl="n-internal-select-menu",tc="n-internal-select-menu-body",Wr="n-drawer-body",ml="n-drawer",Kr="n-modal-body",pm="n-modal-provider",oc="n-modal",gr="n-popover-body",nc="__disabled__";function _t(e){const t=Ae(Kr,null),o=Ae(Wr,null),n=Ae(gr,null),r=Ae(tc,null),a=B();if(typeof document<"u"){a.value=document.fullscreenElement;const s=()=>{a.value=document.fullscreenElement};Nt(()=>{Tt("fullscreenchange",document,s)}),Yt(()=>{Bt("fullscreenchange",document,s)})}return st(()=>{var s;const{to:l}=e;return l!==void 0?l===!1?nc:l===!0?a.value||"body":l:t!=null&&t.value?(s=t.value.$el)!==null&&s!==void 0?s:t.value:o!=null&&o.value?o.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:l??(a.value||"body")})}_t.tdkey=nc;_t.propTo={type:[String,Object,Boolean],default:void 0};function bm(e,t,o){var n;const r=Ae(e,null);if(r===null)return;const a=(n=il())===null||n===void 0?void 0:n.proxy;gt(o,s),s(o.value),Yt(()=>{s(void 0,o.value)});function s(c,u){if(!r)return;const f=r[t];u!==void 0&&l(f,u),c!==void 0&&d(f,c)}function l(c,u){c[u]||(c[u]=[]),c[u].splice(c[u].findIndex(f=>f===a),1)}function d(c,u){c[u]||(c[u]=[]),~c[u].findIndex(f=>f===a)||c[u].push(a)}}function xm(e,t,o){const n=Ae(e,null);n!==null&&(t in n||(n[t]=[]),n[t].push(o.value),gt(o,(r,a)=>{const s=n[t],l=s.findIndex(d=>d===a);~l&&s.splice(l,1),s.push(r)}),Yt(()=>{const r=n[t],a=r.findIndex(s=>s===o.value);~a&&r.splice(a,1)}))}function ym(e,t,o){const n=Ae(e,null);n!==null&&(t in n||(n[t]=[]),Nt(()=>{const r=o();r&&n[t].push(r)}),Yt(()=>{const r=n[t],a=o(),s=r.findIndex(l=>l===a);~s&&r.splice(s,1)}))}function Cm(e,t,o){const n=B(e.value);let r=null;return gt(e,a=>{r!==null&&window.clearTimeout(r),a===!0?o&&!o.value?n.value=!0:r=window.setTimeout(()=>{n.value=!0},t):n.value=!1}),n}const Ro=typeof document<"u"&&typeof window<"u";let fs=!1;function pl(){if(Ro&&window.CSS&&!fs&&(fs=!0,"registerProperty"in(window==null?void 0:window.CSS)))try{CSS.registerProperty({name:"--n-color-start",syntax:"<color>",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"<color>",inherits:!1,initialValue:"#0000"})}catch{}}const bl=B(!1);function hs(){bl.value=!0}function vs(){bl.value=!1}let Pr=0;function rc(){return Ro&&(Hr(()=>{Pr||(window.addEventListener("compositionstart",hs),window.addEventListener("compositionend",vs)),Pr++}),Yt(()=>{Pr<=1?(window.removeEventListener("compositionstart",hs),window.removeEventListener("compositionend",vs),Pr=0):Pr--})),bl}let Jn=0,gs="",ms="",ps="",bs="";const Na=B("0px");function ic(e){if(typeof document>"u")return;const t=document.documentElement;let o,n=!1;const r=()=>{t.style.marginRight=gs,t.style.overflow=ms,t.style.overflowX=ps,t.style.overflowY=bs,Na.value="0px"};Nt(()=>{o=gt(e,a=>{if(a){if(!Jn){const s=window.innerWidth-t.offsetWidth;s>0&&(gs=t.style.marginRight,t.style.marginRight=`${s}px`,Na.value=`${s}px`),ms=t.style.overflow,ps=t.style.overflowX,bs=t.style.overflowY,t.style.overflow="hidden",t.style.overflowX="hidden",t.style.overflowY="hidden"}n=!0,Jn++}else Jn--,Jn||r(),n=!1},{immediate:!0})}),Yt(()=>{o==null||o(),n&&(Jn--,Jn||r(),n=!1)})}function xl(e){const t={isDeactivated:!1};let o=!1;return Pg(()=>{if(t.isDeactivated=!1,!o){o=!0;return}e()}),Dd(()=>{t.isDeactivated=!0,o||(o=!0)}),t}function Ni(e,t){t&&(Nt(()=>{const{value:o}=e;o&&ea.registerHandler(o,t)}),gt(e,(o,n)=>{n&&ea.unregisterHandler(n)},{deep:!1}),Yt(()=>{const{value:o}=e;o&&ea.unregisterHandler(o)}))}function Vn(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const wm=/^(\d|\.)+$/,xs=/(\d|\.)+/;function wt(e,{c:t=1,offset:o=0,attachPx:n=!0}={}){if(typeof e=="number"){const r=(e+o)*t;return r===0?"0":`${r}px`}else if(typeof e=="string")if(wm.test(e)){const r=(Number(e)+o)*t;return n?r===0?"0":`${r}px`:`${r}`}else{const r=xs.exec(e);return r?e.replace(xs,String((Number(r[0])+o)*t)):e}return e}function ys(e){const{left:t,right:o,top:n,bottom:r}=Qt(e);return`${n} ${t} ${r} ${o}`}function Li(e,t){if(!e)return;const o=document.createElement("a");o.href=e,t!==void 0&&(o.download=t),document.body.appendChild(o),o.click(),document.body.removeChild(o)}function Sm(e,t){Li(e,t)}function Cs(e){return e.nodeName==="#document"}let ia;function Rm(){return ia===void 0&&(ia=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),ia}const ac=new WeakSet;function jn(e){ac.add(e)}function lc(e){return!ac.has(e)}function cr(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}const km={tiny:"mini",small:"tiny",medium:"small",large:"medium",huge:"large"};function La(e){const t=km[e];if(t===void 0)throw new Error(`${e} has no smaller size.`);return t}function zm(e,t){if(e===null&&t===null)return!0;if(e===null||t===null)return!1;if(e.length===t.length){for(let o=0;o<e.length;++o)if(e[o]!==t[o])return!1;return!0}return!1}const ws=new Set;function Pm(e,t){const o=`[naive/${e}]: ${t}`;ws.has(o)||(ws.add(o),console.error(o))}function fo(e,t){console.error(`[naive/${e}]: ${t}`)}function Ss(e,t,o){console.error(`[naive/${e}]: ${t}`,o)}function ro(e,t){throw new Error(`[naive/${e}]: ${t}`)}function re(e,...t){if(Array.isArray(e))e.forEach(o=>re(o,...t));else return e(...t)}function sc(e){return typeof e=="string"?`s-${e}`:`n-${e}`}function dc(e){return t=>{t?e.value=t.$el:e.value=null}}function $o(e,t=!0,o=[]){return e.forEach(n=>{if(n!==null){if(typeof n!="object"){(typeof n=="string"||typeof n=="number")&&o.push(Si(String(n)));return}if(Array.isArray(n)){$o(n,t,o);return}if(n.type===Vt){if(n.children===null)return;Array.isArray(n.children)&&$o(n.children,t,o)}else{if(n.type===al&&t)return;o.push(n)}}}),o}function $m(e,t="default",o=void 0){const n=e[t];if(!n)return fo("getFirstSlotVNode",`slot[${t}] is empty`),null;const r=$o(n(o));return r.length===1?r[0]:(fo("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function cc(e,t,o){if(!t)return null;const n=$o(t(o));return n.length===1?n[0]:(fo("getFirstSlotVNode",`slot[${e}] should have exactly one child`),null)}function mr(e,t="default",o=[]){const r=e.$slots[t];return r===void 0?o:r()}function Rs(e,t="default",o=[]){const{children:n}=e;if(n!==null&&typeof n=="object"&&!Array.isArray(n)){const r=n[t];if(typeof r=="function")return r()}return o}function Tm(e){var t;const o=(t=e.dirs)===null||t===void 0?void 0:t.find(({dir:n})=>n===_o);return!!(o&&o.value===!1)}function no(e,t=[],o){const n={};return t.forEach(r=>{n[r]=e[r]}),Object.assign(n,o)}function ho(e){return Object.keys(e)}function Mr(e){const t=e.filter(o=>o!==void 0);if(t.length!==0)return t.length===1?t[0]:o=>{e.forEach(n=>{n&&n(o)})}}function Pn(e,t=[],o){const n={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(n[a]=e[a])}),Object.assign(n,o)}function Et(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?Si(e):typeof e=="number"?Si(String(e)):null}function jo(e){return e.some(t=>$g(t)?!(t.type===al||t.type===Vt&&!jo(t.children)):!0)?e:null}function ut(e,t){return e&&jo(e())||t()}function Xt(e,t,o){return e&&jo(e(t))||o(t)}function xt(e,t){const o=e&&jo(e());return t(o||null)}function Om(e,t,o){const n=e&&jo(e(t));return o(n||null)}function Nn(e){return!(e&&jo(e()))}const Ha=q({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),So="n-config-provider",Pi="n";function De(e={},t={defaultBordered:!0}){const o=Ae(So,null);return{inlineThemeDisabled:o==null?void 0:o.inlineThemeDisabled,mergedRtlRef:o==null?void 0:o.mergedRtlRef,mergedComponentPropsRef:o==null?void 0:o.mergedComponentPropsRef,mergedBreakpointsRef:o==null?void 0:o.mergedBreakpointsRef,mergedBorderedRef:C(()=>{var n,r;const{bordered:a}=e;return a!==void 0?a:(r=(n=o==null?void 0:o.mergedBorderedRef.value)!==null&&n!==void 0?n:t.defaultBordered)!==null&&r!==void 0?r:!0}),mergedClsPrefixRef:o?o.mergedClsPrefixRef:Ed(Pi),namespaceRef:C(()=>o==null?void 0:o.mergedNamespaceRef.value)}}function uc(){const e=Ae(So,null);return e?e.mergedClsPrefixRef:Ed(Pi)}function Ge(e,t,o,n){o||ro("useThemeClass","cssVarsRef is not passed");const r=Ae(So,null),a=r==null?void 0:r.mergedThemeHashRef,s=r==null?void 0:r.styleMountTarget,l=B(""),d=Vr();let c;const u=`__${e}`,f=()=>{let v=u;const g=t?t.value:void 0,h=a==null?void 0:a.value;h&&(v+=`-${h}`),g&&(v+=`-${g}`);const{themeOverrides:m,builtinThemeOverrides:x}=n;m&&(v+=`-${Ln(JSON.stringify(m))}`),x&&(v+=`-${Ln(JSON.stringify(x))}`),l.value=v,c=()=>{const b=o.value;let y="";for(const z in b)y+=`${z}: ${b[z]};`;R(`.${v}`,y).mount({id:v,ssr:d,parent:s}),c=void 0}};return Pt(()=>{f()}),{themeClass:l,onRender:()=>{c==null||c()}}}const $i="n-form-item";function Zt(e,{defaultSize:t="medium",mergedSize:o,mergedDisabled:n}={}){const r=Ae($i,null);nt($i,null);const a=C(o?()=>o(r):()=>{const{size:d}=e;if(d)return d;if(r){const{mergedSize:c}=r;if(c.value!==void 0)return c.value}return t}),s=C(n?()=>n(r):()=>{const{disabled:d}=e;return d!==void 0?d:r?r.disabled.value:!1}),l=C(()=>{const{status:d}=e;return d||(r==null?void 0:r.mergedValidationStatus.value)});return Yt(()=>{r&&r.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:s,mergedStatusRef:l,nTriggerFormBlur(){r&&r.handleContentBlur()},nTriggerFormChange(){r&&r.handleContentChange()},nTriggerFormFocus(){r&&r.handleContentFocus()},nTriggerFormInput(){r&&r.handleContentInput()}}}function fc(e,t){const o=Ae(So,null);return C(()=>e.hljs||(o==null?void 0:o.mergedHljsRef.value))}const Fm={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"},Heatmap:{less:"less",more:"more",monthFormat:"MMM",weekdayFormat:"eee"}},Im={name:"en-US",locale:Tg};function Gt(e){const{mergedLocaleRef:t,mergedDateLocaleRef:o}=Ae(So,null)||{},n=C(()=>{var a,s;return(s=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&s!==void 0?s:Fm[e]});return{dateLocaleRef:C(()=>{var a;return(a=o==null?void 0:o.value)!==null&&a!==void 0?a:Im}),localeRef:n}}const ur="naive-ui-style";function $t(e,t,o){if(!t)return;const n=Vr(),r=C(()=>{const{value:l}=t;if(!l)return;const d=l[e];if(d)return d}),a=Ae(So,null),s=()=>{Pt(()=>{const{value:l}=o,d=`${l}${e}Rtl`;if(Og(d,n))return;const{value:c}=r;c&&c.style.mount({id:d,head:!0,anchorMetaName:ur,props:{bPrefix:l?`.${l}-`:void 0},ssr:n,parent:a==null?void 0:a.styleMountTarget})})};return n?s():Hr(s),r}const Fo={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Bm,fontFamily:Mm,lineHeight:_m}=Fo,hc=R("body",`
2
2
  margin: 0;
3
3
  font-size: ${Bm};
4
4
  font-family: ${Mm};
@@ -7310,4 +7310,4 @@ import{p as kg,C as zg,r as B,o as Nt,a as Tt,b as Yt,c as Bt,u as st,d as Ae,w
7310
7310
  height: max(284vh, 284vw);
7311
7311
  width: max(284vh, 284vw);
7312
7312
  `)])]);function $z(e){if(!e)return 1;const t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t}const rg=Object.assign(Object.assign({},ve.props),{debug:Boolean,cross:Boolean,fullscreen:Boolean,width:{type:Number,default:32},height:{type:Number,default:32},zIndex:{type:Number,default:10},xGap:{type:Number,default:0},yGap:{type:Number,default:0},yOffset:{type:Number,default:0},xOffset:{type:Number,default:0},rotate:{type:Number,default:0},textAlign:{type:String,default:"left"},image:String,imageOpacity:{type:Number,default:1},imageHeight:Number,imageWidth:Number,content:String,selectable:{type:Boolean,default:!0},fontSize:{type:Number,default:14},fontFamily:String,fontStyle:{type:String,default:"normal"},fontVariant:{type:String,default:""},fontWeight:{type:Number,default:400},fontColor:{type:String,default:"rgba(128, 128, 128, .3)"},fontStretch:{type:String,default:""},lineHeight:{type:Number,default:14},globalRotate:{type:Number,default:0}}),Tz=q({name:"Watermark",props:rg,setup(e,{slots:t}){const{mergedClsPrefixRef:o}=De(e),n=ve("Watermark","-watermark",Pz,fS,e,o),r=B(""),a=Ro?document.createElement("canvas"):null,s=a?a.getContext("2d"):null,l=B(!1);return dl(()=>l.value=!0),Pt(()=>{if(!a)return;l.value;const d=$z(s),{xGap:c,yGap:u,width:f,height:v,yOffset:g,xOffset:h,rotate:m,image:x,content:b,fontColor:y,fontStyle:z,fontVariant:S,fontStretch:w,fontWeight:k,fontFamily:$,fontSize:M,lineHeight:O,debug:F}=e,_=(c+f)*d,I=(u+v)*d,D=h*d,H=g*d;if(a.width=_,a.height=I,s){s.translate(0,0);const E=f*d,G=v*d;if(F&&(s.strokeStyle="grey",s.strokeRect(0,0,E,G)),s.rotate(m*(Math.PI/180)),x){const Y=new Image;Y.crossOrigin="anonymous",Y.referrerPolicy="no-referrer",Y.src=x,Y.onload=()=>{s.globalAlpha=e.imageOpacity;const{imageWidth:ie,imageHeight:xe}=e;s.drawImage(Y,D,H,(e.imageWidth||(xe?Y.width*xe/Y.height:Y.width))*d,(e.imageHeight||(ie?Y.height*ie/Y.width:Y.height))*d),r.value=a.toDataURL()}}else if(b){F&&(s.strokeStyle="green",s.strokeRect(0,0,E,G)),s.font=`${z} ${S} ${k} ${w} ${M*d}px/${O*d}px ${$||n.value.self.fontFamily}`,s.fillStyle=y;let Y=0;const{textAlign:ie}=e;b.split(`
7313
- `).map(xe=>{const he=s.measureText(xe).width;return Y=Math.max(Y,he),{width:he,line:xe}}).forEach(({line:xe,width:he},K)=>{const j=ie==="left"?0:ie==="center"?(Y-he)/2:Y-he;s.fillText(xe,D+j,H+O*d*(K+1))}),r.value=a.toDataURL()}else b||(s.clearRect(0,0,a.width,a.height),r.value=a.toDataURL())}else Pm("watermark","Canvas is not supported in the browser.")}),()=>{var d;const{globalRotate:c,fullscreen:u,zIndex:f}=e,v=o.value,g=c!==0&&u,h="max(142vh, 142vw)",m=i("div",{class:[`${v}-watermark`,c!==0&&`${v}-watermark--global-rotate`,u&&`${v}-watermark--fullscreen`],style:{transform:c?`translateX(-50%) translateY(-50%) rotate(${c}deg)`:void 0,zIndex:g?void 0:f,backgroundSize:`${e.xGap+e.width}px`,backgroundPosition:c===0?e.cross?`${e.width/2}px ${e.height/2}px, 0 0`:"":e.cross?`calc(${h} + ${e.width/2}px) calc(${h} + ${e.height/2}px), ${h} ${h}`:h,backgroundImage:e.cross?`url(${r.value}), url(${r.value})`:`url(${r.value})`}});return e.fullscreen&&!c?m:i("div",{class:[`${v}-watermark-container`,c!==0&&`${v}-watermark-container--global-rotate`,u&&`${v}-watermark-container--fullscreen`,e.selectable&&`${v}-watermark-container--selectable`],style:{zIndex:g?f:void 0}},(d=t.default)===null||d===void 0?void 0:d.call(t),m)}}}),Ad=Object.freeze(Object.defineProperty({__proto__:null,NA:j2,NAffix:vc,NAlert:Qp,NAnchor:sb,NAnchorLink:nb,NAutoComplete:kb,NAvatar:ja,NAvatarGroup:Ib,NBackTop:Eb,NBadge:Vb,NBlockquote:W2,NBreadcrumb:qb,NBreadcrumbItem:Gb,NButton:zt,NButtonGroup:kl,NCalendar:f0,NCard:hu,NCarousel:B0,NCarouselItem:gu,NCascader:q0,NCheckbox:vn,NCheckboxGroup:xu,NCode:Ru,NCol:Ch,NCollapse:Q0,NCollapseItem:tx,NCollapseTransition:ix,NColorPicker:Bx,NConfigProvider:Iu,NCountdown:Mx,NDataTable:Qy,NDatePicker:xC,NDescriptions:kC,NDescriptionsItem:zC,NDialog:Vl,NDialogProvider:_f,NDivider:b1,NDrawer:_1,NDrawerContent:A1,NDropdown:Dl,NDynamicInput:j1,NDynamicTags:G1,NEl:Qs,NElement:Qs,NEllipsis:Wi,NEmpty:cn,NEquation:Z1,NFlex:tw,NFloatButton:yS,NFloatButtonGroup:mS,NForm:SS,NFormItem:Yl,NFormItemCol:wh,NFormItemGi:rd,NFormItemGridItem:rd,NFormItemRow:AS,NGi:Ja,NGlobalStyle:DS,NGradientText:NS,NGrid:HS,NGridItem:Ja,NH1:q2,NH2:Y2,NH3:G2,NH4:X2,NH5:Z2,NH6:J2,NHeatmap:JS,NHighlight:tR,NHr:ez,NIcon:lf,NIconWrapper:iR,NImage:Nh,NImageGroup:Dh,NImagePreview:Zl,NInfiniteScroll:vR,NInput:ao,NInputGroup:Hc,NInputGroupLabel:bb,NInputNumber:bR,NInputOtp:CR,NLayout:SR,NLayoutContent:RR,NLayoutFooter:zR,NLayoutHeader:$R,NLayoutSider:IR,NLegacyTransfer:NR,NLi:tz,NList:HR,NListItem:VR,NLoadingBarProvider:Nf,NLog:qR,NMarquee:JR,NMention:tk,NMenu:ck,NMessageProvider:Wf,NModal:Wl,NModalProvider:Yf,NNotificationProvider:Zf,NNumberAnimation:hk,NOl:oz,NP:rz,NPageHeader:gk,NPagination:ju,NPerformantEllipsis:nf,NPopconfirm:bk,NPopover:Xn,NPopselect:Au,NProgress:hv,NQrCode:Tk,NRadio:Ml,NRadioButton:cy,NRadioGroup:ef,NRate:Ik,NResult:Nk,NRow:yh,NScrollbar:Lk,NSelect:Nu,NSkeleton:Uk,NSlider:qk,NSpace:ih,NSpin:Xk,NSplit:e2,NStatistic:o2,NStep:l2,NSteps:a2,NSwitch:d2,NTab:Ii,NTabPane:p2,NTable:u2,NTabs:x2,NTag:_r,NTbody:f2,NTd:h2,NText:az,NTh:v2,NThead:g2,NThing:C2,NTime:w2,NTimePicker:Fi,NTimeline:R2,NTimelineItem:k2,NTooltip:Gr,NTr:m2,NTransfer:$2,NTree:Hv,NTreeSelect:H2,NUl:lz,NUpload:kz,NUploadDragger:Zv,NUploadFileList:eg,NUploadTrigger:is,NVirtualList:zz,NWatermark:Tz,NxButton:Xo,aProps:jv,affixProps:Hi,alertProps:Mc,anchorLinkProps:_c,anchorProps:Ac,autoCompleteProps:Wc,avatarGroupProps:Zc,avatarProps:Xc,backTopProps:Jc,badgeProps:Qc,blockquoteProps:Uv,breadcrumbItemProps:ou,breadcrumbProps:tu,buttonGroupProps:au,buttonProps:ru,calendarProps:cu,cardProps:fu,carouselProps:mu,cascaderProps:Cu,checkboxGroupProps:bu,checkboxProps:yu,codeProps:Su,colProps:Zi,collapseItemProps:Pu,collapseProps:ku,collapseTransitionProps:$u,colorPickerProps:Ou,configProviderProps:Fu,countdownProps:Bu,createDiscreteApi:v1,dataTableProps:Wu,datePickerProps:Cf,descriptionsItemProps:Rf,descriptionsProps:Sf,dialogProps:Xr,dialogProviderProps:Mf,dividerProps:Qf,drawerContentProps:th,drawerProps:eh,dropdownProps:uf,dynamicInputProps:oh,dynamicTagsProps:ah,elementProps:lh,ellipsisProps:_l,emptyProps:Sc,equationProps:sh,flexProps:dh,floatButtonGroupProps:hh,floatButtonProps:gh,formItemGiProps:Qa,formItemGridItemProps:Qa,formItemProps:Jr,formProps:ph,giProps:Nr,gradientTextProps:kh,gridItemProps:Nr,gridProps:Ph,h1Props:An,h2Props:An,h3Props:An,h4Props:An,h5Props:An,h6Props:An,heatmapDark:QS,heatmapLight:Th,heatmapMockData:ZS,heatmapProps:Oh,highlightProps:Fh,iconProps:af,iconWrapperProps:Ih,imageGroupProps:Ah,imagePreviewProps:Mh,imageProps:Eh,infiniteScrollProps:Lh,inputGroupLabelProps:Vc,inputGroupProps:Lc,inputNumberProps:Hh,inputOtpProps:Vh,inputProps:Nc,layoutContentProps:el,layoutFooterProps:Kh,layoutHeaderProps:qh,layoutProps:el,layoutSiderProps:Yh,legacyTransferProps:Gh,listProps:Xh,loadingBarProviderProps:Ef,logProps:Qh,mentionProps:ev,menuProps:av,messageProviderProps:Uf,modalProps:Ul,modalProviderProps:qf,notificationProviderProps:Xf,numberAnimationProps:lv,olProps:Kv,pProps:qv,pageHeaderProps:sv,paginationProps:Vu,popconfirmProps:uv,popoverProps:zc,popselectProps:_u,progressProps:fv,qrCodeProps:vv,radioButtonProps:dy,radioGroupProps:Qu,radioProps:Ju,rateProps:gv,resultProps:mv,rowProps:Xi,scrollbarProps:pv,selectProps:Eu,skeletonProps:bv,sliderProps:xv,spaceProps:rh,spinProps:yv,splitProps:Cv,statisticProps:wv,stepProps:kv,stepsProps:Sv,switchProps:zv,tabPaneProps:ns,tabProps:$v,tableProps:Pv,tabsProps:Tv,tagProps:Tc,textProps:Yv,thingProps:Ov,timePickerProps:yf,timeProps:Fv,timelineItemProps:Mv,timelineProps:Iv,tooltipProps:tf,transferProps:_v,treeGetClickTarget:A2,treeProps:Lv,treeSelectProps:Vv,ulProps:Gv,uploadDownload:Sm,uploadProps:og,useDialog:$f,useDialogReactiveList:PC,useLoadingBar:Lf,useMessage:Kf,useModal:Bf,useModalReactiveList:_C,useNotification:Jf,virtualListProps:ng,watermarkProps:rg},Symbol.toStringTag,{value:"Module"})),Oz="2.43.2";function Fz({componentPrefix:e="N",components:t=[]}={}){const o=[];function n(a,s,l){a.component(e+s)||a.component(e+s,l)}function r(a){o.includes(a)||(o.push(a),t.forEach(s=>{const{name:l,alias:d}=s;n(a,l,s),d&&d.forEach(c=>{n(a,c,s)})}))}return{version:Oz,componentPrefix:e,install:r}}const Iz=Fz({components:Object.keys(Ad).map(e=>Ad[e])});Iz.install;export{$f as A,zt as B,Ru as C,Hc as D,HR as E,VR as F,ef as G,cy as H,j1 as I,ix as J,hv as K,Iu as N,Wf as a,_f as b,SS as c,Yl as d,ao as e,Dl as f,Qy as g,Wl as h,vn as i,az as j,ih as k,x2 as l,p2 as m,Iz as n,Qp as o,Nu as p,b1 as q,_r as r,Gr as s,cn as t,Kf as u,kz as v,Zv as w,Xk as x,d2 as y,Xn as z};
7313
+ `).map(xe=>{const he=s.measureText(xe).width;return Y=Math.max(Y,he),{width:he,line:xe}}).forEach(({line:xe,width:he},K)=>{const j=ie==="left"?0:ie==="center"?(Y-he)/2:Y-he;s.fillText(xe,D+j,H+O*d*(K+1))}),r.value=a.toDataURL()}else b||(s.clearRect(0,0,a.width,a.height),r.value=a.toDataURL())}else Pm("watermark","Canvas is not supported in the browser.")}),()=>{var d;const{globalRotate:c,fullscreen:u,zIndex:f}=e,v=o.value,g=c!==0&&u,h="max(142vh, 142vw)",m=i("div",{class:[`${v}-watermark`,c!==0&&`${v}-watermark--global-rotate`,u&&`${v}-watermark--fullscreen`],style:{transform:c?`translateX(-50%) translateY(-50%) rotate(${c}deg)`:void 0,zIndex:g?void 0:f,backgroundSize:`${e.xGap+e.width}px`,backgroundPosition:c===0?e.cross?`${e.width/2}px ${e.height/2}px, 0 0`:"":e.cross?`calc(${h} + ${e.width/2}px) calc(${h} + ${e.height/2}px), ${h} ${h}`:h,backgroundImage:e.cross?`url(${r.value}), url(${r.value})`:`url(${r.value})`}});return e.fullscreen&&!c?m:i("div",{class:[`${v}-watermark-container`,c!==0&&`${v}-watermark-container--global-rotate`,u&&`${v}-watermark-container--fullscreen`,e.selectable&&`${v}-watermark-container--selectable`],style:{zIndex:g?f:void 0}},(d=t.default)===null||d===void 0?void 0:d.call(t),m)}}}),Ad=Object.freeze(Object.defineProperty({__proto__:null,NA:j2,NAffix:vc,NAlert:Qp,NAnchor:sb,NAnchorLink:nb,NAutoComplete:kb,NAvatar:ja,NAvatarGroup:Ib,NBackTop:Eb,NBadge:Vb,NBlockquote:W2,NBreadcrumb:qb,NBreadcrumbItem:Gb,NButton:zt,NButtonGroup:kl,NCalendar:f0,NCard:hu,NCarousel:B0,NCarouselItem:gu,NCascader:q0,NCheckbox:vn,NCheckboxGroup:xu,NCode:Ru,NCol:Ch,NCollapse:Q0,NCollapseItem:tx,NCollapseTransition:ix,NColorPicker:Bx,NConfigProvider:Iu,NCountdown:Mx,NDataTable:Qy,NDatePicker:xC,NDescriptions:kC,NDescriptionsItem:zC,NDialog:Vl,NDialogProvider:_f,NDivider:b1,NDrawer:_1,NDrawerContent:A1,NDropdown:Dl,NDynamicInput:j1,NDynamicTags:G1,NEl:Qs,NElement:Qs,NEllipsis:Wi,NEmpty:cn,NEquation:Z1,NFlex:tw,NFloatButton:yS,NFloatButtonGroup:mS,NForm:SS,NFormItem:Yl,NFormItemCol:wh,NFormItemGi:rd,NFormItemGridItem:rd,NFormItemRow:AS,NGi:Ja,NGlobalStyle:DS,NGradientText:NS,NGrid:HS,NGridItem:Ja,NH1:q2,NH2:Y2,NH3:G2,NH4:X2,NH5:Z2,NH6:J2,NHeatmap:JS,NHighlight:tR,NHr:ez,NIcon:lf,NIconWrapper:iR,NImage:Nh,NImageGroup:Dh,NImagePreview:Zl,NInfiniteScroll:vR,NInput:ao,NInputGroup:Hc,NInputGroupLabel:bb,NInputNumber:bR,NInputOtp:CR,NLayout:SR,NLayoutContent:RR,NLayoutFooter:zR,NLayoutHeader:$R,NLayoutSider:IR,NLegacyTransfer:NR,NLi:tz,NList:HR,NListItem:VR,NLoadingBarProvider:Nf,NLog:qR,NMarquee:JR,NMention:tk,NMenu:ck,NMessageProvider:Wf,NModal:Wl,NModalProvider:Yf,NNotificationProvider:Zf,NNumberAnimation:hk,NOl:oz,NP:rz,NPageHeader:gk,NPagination:ju,NPerformantEllipsis:nf,NPopconfirm:bk,NPopover:Xn,NPopselect:Au,NProgress:hv,NQrCode:Tk,NRadio:Ml,NRadioButton:cy,NRadioGroup:ef,NRate:Ik,NResult:Nk,NRow:yh,NScrollbar:Lk,NSelect:Nu,NSkeleton:Uk,NSlider:qk,NSpace:ih,NSpin:Xk,NSplit:e2,NStatistic:o2,NStep:l2,NSteps:a2,NSwitch:d2,NTab:Ii,NTabPane:p2,NTable:u2,NTabs:x2,NTag:_r,NTbody:f2,NTd:h2,NText:az,NTh:v2,NThead:g2,NThing:C2,NTime:w2,NTimePicker:Fi,NTimeline:R2,NTimelineItem:k2,NTooltip:Gr,NTr:m2,NTransfer:$2,NTree:Hv,NTreeSelect:H2,NUl:lz,NUpload:kz,NUploadDragger:Zv,NUploadFileList:eg,NUploadTrigger:is,NVirtualList:zz,NWatermark:Tz,NxButton:Xo,aProps:jv,affixProps:Hi,alertProps:Mc,anchorLinkProps:_c,anchorProps:Ac,autoCompleteProps:Wc,avatarGroupProps:Zc,avatarProps:Xc,backTopProps:Jc,badgeProps:Qc,blockquoteProps:Uv,breadcrumbItemProps:ou,breadcrumbProps:tu,buttonGroupProps:au,buttonProps:ru,calendarProps:cu,cardProps:fu,carouselProps:mu,cascaderProps:Cu,checkboxGroupProps:bu,checkboxProps:yu,codeProps:Su,colProps:Zi,collapseItemProps:Pu,collapseProps:ku,collapseTransitionProps:$u,colorPickerProps:Ou,configProviderProps:Fu,countdownProps:Bu,createDiscreteApi:v1,dataTableProps:Wu,datePickerProps:Cf,descriptionsItemProps:Rf,descriptionsProps:Sf,dialogProps:Xr,dialogProviderProps:Mf,dividerProps:Qf,drawerContentProps:th,drawerProps:eh,dropdownProps:uf,dynamicInputProps:oh,dynamicTagsProps:ah,elementProps:lh,ellipsisProps:_l,emptyProps:Sc,equationProps:sh,flexProps:dh,floatButtonGroupProps:hh,floatButtonProps:gh,formItemGiProps:Qa,formItemGridItemProps:Qa,formItemProps:Jr,formProps:ph,giProps:Nr,gradientTextProps:kh,gridItemProps:Nr,gridProps:Ph,h1Props:An,h2Props:An,h3Props:An,h4Props:An,h5Props:An,h6Props:An,heatmapDark:QS,heatmapLight:Th,heatmapMockData:ZS,heatmapProps:Oh,highlightProps:Fh,iconProps:af,iconWrapperProps:Ih,imageGroupProps:Ah,imagePreviewProps:Mh,imageProps:Eh,infiniteScrollProps:Lh,inputGroupLabelProps:Vc,inputGroupProps:Lc,inputNumberProps:Hh,inputOtpProps:Vh,inputProps:Nc,layoutContentProps:el,layoutFooterProps:Kh,layoutHeaderProps:qh,layoutProps:el,layoutSiderProps:Yh,legacyTransferProps:Gh,listProps:Xh,loadingBarProviderProps:Ef,logProps:Qh,mentionProps:ev,menuProps:av,messageProviderProps:Uf,modalProps:Ul,modalProviderProps:qf,notificationProviderProps:Xf,numberAnimationProps:lv,olProps:Kv,pProps:qv,pageHeaderProps:sv,paginationProps:Vu,popconfirmProps:uv,popoverProps:zc,popselectProps:_u,progressProps:fv,qrCodeProps:vv,radioButtonProps:dy,radioGroupProps:Qu,radioProps:Ju,rateProps:gv,resultProps:mv,rowProps:Xi,scrollbarProps:pv,selectProps:Eu,skeletonProps:bv,sliderProps:xv,spaceProps:rh,spinProps:yv,splitProps:Cv,statisticProps:wv,stepProps:kv,stepsProps:Sv,switchProps:zv,tabPaneProps:ns,tabProps:$v,tableProps:Pv,tabsProps:Tv,tagProps:Tc,textProps:Yv,thingProps:Ov,timePickerProps:yf,timeProps:Fv,timelineItemProps:Mv,timelineProps:Iv,tooltipProps:tf,transferProps:_v,treeGetClickTarget:A2,treeProps:Lv,treeSelectProps:Vv,ulProps:Gv,uploadDownload:Sm,uploadProps:og,useDialog:$f,useDialogReactiveList:PC,useLoadingBar:Lf,useMessage:Kf,useModal:Bf,useModalReactiveList:_C,useNotification:Jf,virtualListProps:ng,watermarkProps:rg},Symbol.toStringTag,{value:"Module"})),Oz="2.43.2";function Fz({componentPrefix:e="N",components:t=[]}={}){const o=[];function n(a,s,l){a.component(e+s)||a.component(e+s,l)}function r(a){o.includes(a)||(o.push(a),t.forEach(s=>{const{name:l,alias:d}=s;n(a,l,s),d&&d.forEach(c=>{n(a,c,s)})}))}return{version:Oz,componentPrefix:e,install:r}}const Iz=Fz({components:Object.keys(Ad).map(e=>Ad[e])});Iz.install;export{$f as A,zt as B,Ru as C,Hc as D,HR as E,VR as F,ef as G,cy as H,j1 as I,ix as J,hv as K,Q0 as L,bk as M,Iu as N,tx as O,Wf as a,_f as b,SS as c,Yl as d,ao as e,Dl as f,Qy as g,Wl as h,vn as i,az as j,ih as k,x2 as l,p2 as m,Iz as n,Qp as o,Nu as p,b1 as q,_r as r,d2 as s,Gr as t,Kf as u,cn as v,kz as w,Zv as x,Xk as y,Xn as z};