diff --git a/themes/2024/assets/AdminLayout-BKq3HqMl.js b/themes/2024/assets/AdminLayout-DnkjFqWq.js similarity index 98% rename from themes/2024/assets/AdminLayout-BKq3HqMl.js rename to themes/2024/assets/AdminLayout-DnkjFqWq.js index 68bffa8..ef815f3 100644 --- a/themes/2024/assets/AdminLayout-BKq3HqMl.js +++ b/themes/2024/assets/AdminLayout-DnkjFqWq.js @@ -1,4 +1,4 @@ -import{c as i,d as k,r as h,o as u,I as v,a as d,b as x,e as t,n as o,g as e,i as n,X as w,F as _,p as M,A as C,x as z,z as L,J as B,K as D,q as F,t as I}from"./index-B2REZq7f.js";import{B as j}from"./box-H6C9Cns8.js";/** +import{c as i,d as k,r as h,o as u,I as v,a as d,b as x,e as t,n as o,g as e,i as n,X as w,F as _,p as M,A as C,x as z,z as L,J as B,K as D,q as F,t as I}from"./index-YD9XVcaL.js";import{B as j}from"./box-6z1N6vdl.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/DashboardView-BqyK3lsK.js b/themes/2024/assets/DashboardView-BqyK3lsK.js new file mode 100644 index 0000000..41bf6aa --- /dev/null +++ b/themes/2024/assets/DashboardView-BqyK3lsK.js @@ -0,0 +1,11 @@ +import{c as x,d as m,H as b,o as h,a as f,b as v,e as t,n as a,g as e,t as n,i as g,q as w,x as _,y as F}from"./index-YD9XVcaL.js";import{F as k}from"./file-DnnQU8q_.js";import{H as C}from"./hard-drive-CeSuRVUM.js";/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U=x("ActivityIcon",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z=x("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),D={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},M={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},S={class:"flex items-center justify-between"},B={class:"flex items-center justify-between"},$={class:"flex items-center justify-between"},j={class:"flex items-center justify-between"},H={class:"text-sm mt-1"},N=m({__name:"DashboardView",setup(I){const s=_("isDarkMode"),o=b({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),u=l=>{const i=new Date().getTime()-l,d=Math.floor(i/(24*60*60*1e3)),c=Math.floor(i%(24*60*60*1e3)/(60*60*1e3));return`${d}天${c}小时`},y=l=>{const r=parseInt(l)/1024,i=r/1024,d=i/1024,c=d/1024;return c>1?`${c.toFixed(2)}TB`:d>1?`${d.toFixed(2)}GB`:i>1?`${i.toFixed(2)}MB`:r>1?`${r.toFixed(2)}KB`:`${l}B`},p=async()=>{const l=await F.get("admin/dashboard");o.totalFiles=l.detail.totalFiles,o.storageUsed=y(l.detail.storageUsed),o.yesterdaySize=y(l.detail.yesterdaySize),o.todaySize=y(l.detail.todaySize),o.yesterdayCount=l.detail.yesterdayCount,o.todayCount=l.detail.todayCount,o.sysUptime=u(l.detail.sysUptime)};return h(()=>{p()}),(l,r)=>(f(),v("div",D,[t("h2",{class:a(["text-2xl font-bold mb-6",[e(s)?"text-white":"text-gray-800"]])}," 仪表盘 ",2),t("div",M,[t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",S,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 总文件数 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])},n(o.totalFiles),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-indigo-900":"bg-indigo-100"]])},[g(e(k),{class:a(["w-6 h-6",[e(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-green-400":"text-green-600"]])},[t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"昨天:",2),t("span",null,n(o.yesterdayCount),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(o.todayCount),1)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",B,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 存储空间 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])},n(o.storageUsed),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-purple-900":"bg-purple-100"]])},[g(e(C),{class:a(["w-6 h-6",[e(s)?"text-purple-400":"text-purple-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-green-400":"text-green-600"]])},[t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"昨天:",2),t("span",null,n(o.yesterdaySize),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(o.todaySize),1)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",$,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 活跃用户 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])}," 25 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-green-900":"bg-green-100"]])},[g(e(z),{class:a(["w-6 h-6",[e(s)?"text-green-400":"text-green-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-red-400":"text-red-600"]])},[r[0]||(r[0]=t("span",null,"↓ 5% ",-1)),t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"较上周",2)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",j,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 系统状态 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])}," 正常 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-blue-900":"bg-blue-100"]])},[g(e(U),{class:a(["w-6 h-6",[e(s)?"text-blue-400":"text-blue-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-gray-400":"text-gray-600"]])}," 服务器运行时间: "+n(o.sysUptime),3)],2)]),t("div",{class:a(["mt-auto text-center py-4",[e(s)?"text-gray-400":"text-gray-600"]])},[r[2]||(r[2]=t("p",{class:"text-sm"}," 版本 v2.0.3 更新时间:2025-03-03 ",-1)),t("p",H,[w(" © "+n(new Date().getFullYear())+" ",1),r[1]||(r[1]=t("a",{href:"https://github.com/vastsa/FileCodeBox"},"FileCodeBox",-1))])],2)]))}});export{N as default}; diff --git a/themes/2024/assets/DashboardView-CbjxXslN.js b/themes/2024/assets/DashboardView-CbjxXslN.js deleted file mode 100644 index d4264f2..0000000 --- a/themes/2024/assets/DashboardView-CbjxXslN.js +++ /dev/null @@ -1,11 +0,0 @@ -import{c as x,d as m,H as b,o as h,a as f,b as v,e as t,n as a,g as e,t as n,i as g,q as w,x as _,y as F}from"./index-B2REZq7f.js";import{F as k}from"./file-vEntDFgk.js";import{H as C}from"./hard-drive-J2sqyRb4.js";/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U=x("ActivityIcon",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z=x("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),D={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},M={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},S={class:"flex items-center justify-between"},B={class:"flex items-center justify-between"},$={class:"flex items-center justify-between"},j={class:"flex items-center justify-between"},H={class:"text-sm mt-1"},N=m({__name:"DashboardView",setup(I){const s=_("isDarkMode"),o=b({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),u=l=>{const i=new Date().getTime()-l,d=Math.floor(i/(24*60*60*1e3)),c=Math.floor(i%(24*60*60*1e3)/(60*60*1e3));return`${d}天${c}小时`},y=l=>{const r=parseInt(l)/1024,i=r/1024,d=i/1024,c=d/1024;return c>1?`${c.toFixed(2)}TB`:d>1?`${d.toFixed(2)}GB`:i>1?`${i.toFixed(2)}MB`:r>1?`${r.toFixed(2)}KB`:`${l}B`},p=async()=>{const l=await F.get("/admin/dashboard");o.totalFiles=l.detail.totalFiles,o.storageUsed=y(l.detail.storageUsed),o.yesterdaySize=y(l.detail.yesterdaySize),o.todaySize=y(l.detail.todaySize),o.yesterdayCount=l.detail.yesterdayCount,o.todayCount=l.detail.todayCount,o.sysUptime=u(l.detail.sysUptime)};return h(()=>{p()}),(l,r)=>(f(),v("div",D,[t("h2",{class:a(["text-2xl font-bold mb-6",[e(s)?"text-white":"text-gray-800"]])}," 仪表盘 ",2),t("div",M,[t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",S,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 总文件数 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])},n(o.totalFiles),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-indigo-900":"bg-indigo-100"]])},[g(e(k),{class:a(["w-6 h-6",[e(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-green-400":"text-green-600"]])},[t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"昨天:",2),t("span",null,n(o.yesterdayCount),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(o.todayCount),1)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",B,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 存储空间 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])},n(o.storageUsed),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-purple-900":"bg-purple-100"]])},[g(e(C),{class:a(["w-6 h-6",[e(s)?"text-purple-400":"text-purple-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-green-400":"text-green-600"]])},[t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"昨天:",2),t("span",null,n(o.yesterdaySize),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(o.todaySize),1)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",$,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 活跃用户 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])}," 25 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-green-900":"bg-green-100"]])},[g(e(z),{class:a(["w-6 h-6",[e(s)?"text-green-400":"text-green-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-red-400":"text-red-600"]])},[r[0]||(r[0]=t("span",null,"↓ 5% ",-1)),t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"较上周",2)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",j,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 系统状态 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])}," 正常 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-blue-900":"bg-blue-100"]])},[g(e(U),{class:a(["w-6 h-6",[e(s)?"text-blue-400":"text-blue-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-gray-400":"text-gray-600"]])}," 服务器运行时间: "+n(o.sysUptime),3)],2)]),t("div",{class:a(["mt-auto text-center py-4",[e(s)?"text-gray-400":"text-gray-600"]])},[r[2]||(r[2]=t("p",{class:"text-sm"}," 版本 v2.0.3 更新时间:2025-03-03 ",-1)),t("p",H,[w(" © "+n(new Date().getFullYear())+" ",1),r[1]||(r[1]=t("a",{href:"https://github.com/vastsa/FileCodeBox"},"FileCodeBox",-1))])],2)]))}});export{N as default}; diff --git a/themes/2024/assets/FileManageView-B45y_rSl.js b/themes/2024/assets/FileManageView-B45y_rSl.js deleted file mode 100644 index 38e340d..0000000 --- a/themes/2024/assets/FileManageView-B45y_rSl.js +++ /dev/null @@ -1,26 +0,0 @@ -import{c as w,d as R,r as M,u as Y,f as L,a as u,b as p,e as t,n as i,g as e,l as x,v as y,L as G,i as l,q as h,F as S,p as $,t as g,k as J,x as N,y as j}from"./index-B2REZq7f.js";import{F as O}from"./file-vEntDFgk.js";import{T as Q}from"./trash-6hUac_7h.js";/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f=w("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const W=w("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const X=w("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U=w("PencilIcon",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I=w("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},tt={class:"mb-8"},et={class:"flex flex-1 gap-4 w-full sm:w-auto"},ot={class:"relative flex-1"},st={class:"overflow-x-auto"},it={class:"px-6 py-4 whitespace-nowrap"},at={class:"flex items-center"},rt={class:"px-6 py-4"},nt={class:"flex items-center group relative"},lt=["title"],dt={class:"absolute left-0 -top-2 -translate-y-full opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},gt={class:"bg-gray-900 text-white text-sm rounded px-2 py-1 max-w-xs break-all"},ct={class:"px-6 py-4 whitespace-nowrap"},ut={class:"px-6 py-4"},pt={class:"group relative"},xt={class:"absolute left-0 -top-2 -translate-y-full opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none z-10"},yt={class:"bg-gray-900 text-white text-sm rounded px-2 py-1 max-w-xs break-all"},ht={class:"px-6 py-4 whitespace-nowrap"},ft={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},bt={class:"flex items-center space-x-2"},mt=["onClick"],vt=["onClick"],wt={class:"flex items-center space-x-2"},_t=["disabled"],kt={class:"flex items-center space-x-1"},Ct=["onClick"],Mt=["disabled"],St={key:0,class:"fixed inset-0 z-50","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},zt={class:"fixed inset-0 z-10 overflow-y-auto"},Vt={class:"flex min-h-full items-center justify-center p-4 text-center sm:p-0"},$t={class:"flex items-center justify-between"},jt={class:"flex items-center space-x-3"},Ft={class:"px-6 py-5"},Dt={class:"grid gap-6"},Lt={class:"space-y-2 group"},Ut={class:"relative rounded-lg shadow-sm"},It={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Tt={class:"space-y-2 group"},Bt={class:"relative rounded-lg shadow-sm"},Pt={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},qt={class:"space-y-2 group"},Et={class:"relative rounded-lg shadow-sm"},At={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Ht={class:"space-y-2 group"},Kt={class:"relative rounded-lg shadow-sm"},Rt={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Yt={class:"space-y-2 group"},Gt={class:"relative rounded-lg shadow-sm"},Jt={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Xt=R({__name:"FileManageView",setup(Nt){function T(r){const s=new Date(r),a=s.getFullYear(),c=(s.getMonth()+1).toString().padStart(2,"0"),k=s.getDate().toString().padStart(2,"0"),C=s.getHours().toString().padStart(2,"0"),v=s.getMinutes().toString().padStart(2,"0"),K=s.getSeconds().toString().padStart(2,"0");return`${a}-${c}-${k} ${C}:${v}:${K}`}const o=N("isDarkMode"),F=M([]),B=Y(),P=["取件码","名称","大小","描述","过期时间","操作"],n=M({page:1,size:10,total:0,keyword:""}),z=M(!1),d=M({id:null,code:"",prefix:"",suffix:"",expired_at:"",expired_count:null}),q=r=>{d.value={id:r.id,code:r.code,prefix:r.prefix,suffix:r.suffix,expired_at:r.expired_at?r.expired_at.slice(0,16):"",expired_count:r.expired_count},z.value=!0},_=()=>{z.value=!1,d.value={id:null,code:"",prefix:"",suffix:"",expired_at:"",expired_count:null}},E=async()=>{try{await j({url:"/admin/file/update",method:"patch",data:d.value}),await b(),_()}catch(r){B.showAlert(r.response.data.detail,"error")}},A=async r=>{try{await j({url:"/admin/file/delete",method:"delete",data:{id:r}}),await b()}catch(s){console.error("删除失败:",s)}},b=async()=>{try{const r=await j({url:"/admin/file/list",method:"get",params:n.value});F.value=r.detail.data,n.value.total=r.detail.total}catch(r){console.error("加载文件列表失败:",r)}},V=async r=>{r<1||r>m.value||(n.value.page=r,await b())};b();const m=L(()=>Math.ceil(n.value.total/n.value.size)),H=L(()=>{const r=n.value.page,s=m.value,a=2;let c=[];c.push(1);let k=Math.max(2,r-a),C=Math.min(s-1,r+a);k>2&&c.push("...");for(let v=k;v<=C;v++)c.push(v);return C1&&c.push(s),c}),D=async()=>{n.value.page=1,await b()};return(r,s)=>(u(),p("div",Z,[t("div",tt,[t("h2",{class:i(["text-2xl font-bold mb-4",[e(o)?"text-white":"text-gray-800"]])}," 文件管理 ",2)]),t("div",{class:i(["mb-6 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between bg-opacity-70 p-4 rounded-lg shadow-sm",[e(o)?"bg-gray-800":"bg-white"]])},[t("div",et,[t("div",ot,[x(t("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=a=>n.value.keyword=a),onKeyup:G(D,["enter"]),class:i([e(o)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400":"bg-white border-gray-300 text-gray-900 placeholder-gray-400","w-full pl-10 pr-4 py-2.5 rounded-lg border focus:ring-2 focus:ring-indigo-500 focus:border-transparent"]),placeholder:"搜索文件名称、描述..."},null,34),[[y,n.value.keyword]]),l(e(I),{class:i(["absolute left-3 top-3 w-5 h-5",[e(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"])]),t("button",{onClick:D,class:"px-4 py-2.5 rounded-lg inline-flex items-center transition-all duration-200 bg-indigo-600 hover:bg-indigo-700 text-white shadow-sm"},[l(e(I),{class:"w-5 h-5 mr-2"}),s[8]||(s[8]=h(" 搜索 "))])])],2),t("div",{class:i(["rounded-lg shadow-sm overflow-hidden transition-all duration-300",[e(o)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",{class:i(["px-6 py-4 border-b",[e(o)?"border-gray-700":"border-gray-200"]])},[t("h3",{class:i(["text-lg font-medium",[e(o)?"text-white":"text-gray-800"]])}," 所有文件 ",2)],2),t("div",st,[t("table",{class:i(["min-w-full divide-y",[e(o)?"divide-gray-700":"divide-gray-200"]])},[t("thead",{class:i([e(o)?"bg-gray-900/50":"bg-gray-50"])},[t("tr",null,[(u(),p(S,null,$(P,a=>t("th",{key:a,class:i(["px-6 py-3.5 text-left text-xs font-medium uppercase tracking-wider",[e(o)?"text-gray-400":"text-gray-500"]])},g(a),3)),64))])],2),t("tbody",{class:i([e(o)?"bg-gray-800/50 divide-y divide-gray-700":"bg-white divide-y divide-gray-200"])},[(u(!0),p(S,null,$(F.value,a=>(u(),p("tr",{key:a.id,class:i(["hover:bg-opacity-50 transition-colors duration-200",[e(o)?"hover:bg-gray-700":"hover:bg-gray-50"]])},[t("td",it,[t("div",at,[t("span",{class:i(["font-medium select-all",[e(o)?"text-white":"text-gray-900"]])},g(a.code),3)])]),t("td",rt,[t("div",nt,[l(e(O),{class:i(["w-5 h-5 mr-2 flex-shrink-0",[e(o)?"text-indigo-400":"text-indigo-500"]])},null,8,["class"]),t("span",{class:i(["font-medium truncate max-w-[200px]",[e(o)?"text-white":"text-gray-900"]]),title:a.prefix},g(a.prefix),11,lt),t("div",dt,[t("div",gt,g(a.prefix),1)])])]),t("td",ct,[t("span",{class:i(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",[e(o)?"bg-gray-700 text-gray-300":"bg-gray-100 text-gray-800"]])},g(Math.round(a.size/1024/1024*100)/100)+"MB ",3)]),t("td",ut,[t("div",pt,[t("span",{class:i(["block truncate max-w-[250px]",[e(o)?"text-gray-400":"text-gray-500"]])},g(a.text),3),t("div",xt,[t("div",yt,g(a.text),1)])])]),t("td",ht,[t("span",{class:i(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",[a.expired_at?e(o)?"bg-yellow-900/30 text-yellow-400":"bg-yellow-100 text-yellow-800":e(o)?"bg-green-900/30 text-green-400":"bg-green-100 text-green-800"]])},g(a.expired_at?T(a.expired_at):"永久"),3)]),t("td",ft,[t("div",bt,[t("button",{onClick:c=>q(a),class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?"bg-blue-900/20 text-blue-400 hover:bg-blue-900/30":"bg-blue-50 text-blue-600 hover:bg-blue-100"]])},[l(e(U),{class:"w-4 h-4 mr-1.5"}),s[9]||(s[9]=h(" 编辑 "))],10,mt),t("button",{onClick:c=>A(a.id),class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?"bg-red-900/20 text-red-400 hover:bg-red-900/30":"bg-red-50 text-red-600 hover:bg-red-100"]])},[l(e(Q),{class:"w-4 h-4 mr-1.5"}),s[10]||(s[10]=h(" 删除 "))],10,vt)])])],2))),128))],2)],2)]),t("div",{class:i(["mt-4 flex items-center justify-between px-6 py-4 border-t",[e(o)?"border-gray-700":"border-gray-200"]])},[t("div",{class:i(["flex items-center text-sm",[e(o)?"text-gray-400":"text-gray-500"]])}," 显示第 "+g((n.value.page-1)*n.value.size+1)+" 到 "+g(Math.min(n.value.page*n.value.size,n.value.total))+" 条,共 "+g(n.value.total)+" 条 ",3),t("div",wt,[t("button",{onClick:s[1]||(s[1]=a=>V(n.value.page-1)),disabled:n.value.page===1,class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?n.value.page===1?"bg-gray-800 text-gray-600 cursor-not-allowed":"bg-gray-800 text-gray-300 hover:bg-gray-700":n.value.page===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},[l(e(W),{class:"w-4 h-4"}),s[11]||(s[11]=h(" 上一页 "))],10,_t),t("div",kt,[(u(!0),p(S,null,$(H.value,a=>(u(),p(S,{key:a},[a!=="..."?(u(),p("button",{key:0,onClick:c=>V(a),class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[n.value.page===a?"bg-indigo-600 text-white":e(o)?"bg-gray-800 text-gray-300 hover:bg-gray-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},g(a),11,Ct)):(u(),p("span",{key:1,class:i(["px-2",[e(o)?"text-gray-400":"text-gray-500"]])}," ... ",2))],64))),128))]),t("button",{onClick:s[2]||(s[2]=a=>V(n.value.page+1)),disabled:n.value.page>=m.value,class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?n.value.page>=m.value?"bg-gray-800 text-gray-600 cursor-not-allowed":"bg-gray-800 text-gray-300 hover:bg-gray-700":n.value.page>=m.value?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},[s[12]||(s[12]=h(" 下一页 ")),l(e(X),{class:"w-4 h-4"})],10,Mt)])],2)],2),z.value?(u(),p("div",St,[t("div",{class:"fixed inset-0 bg-gradient-to-br from-gray-900/90 to-black/90 backdrop-blur-sm transition-opacity duration-300",onClick:_}),t("div",zt,[t("div",Vt,[t("div",{class:i(["relative transform overflow-hidden rounded-2xl text-left shadow-2xl transition-all sm:my-8 sm:w-full sm:max-w-xl animate-modal-scale",[e(o)?"bg-gray-800/95 backdrop-blur-md":"bg-white"]])},[t("div",{class:i(["relative px-6 pt-6 pb-4",[e(o)?"bg-gradient-to-r from-gray-800/50 to-gray-700/50":"bg-gradient-to-r from-gray-50 to-white"]])},[t("div",$t,[t("div",jt,[t("div",{class:i(["p-2 rounded-lg",[e(o)?"bg-indigo-500/10":"bg-indigo-50"]])},[l(e(U),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2),t("h3",{class:i(["text-xl font-semibold leading-6",[e(o)?"text-white":"text-gray-900"]])}," 编辑文件信息 ",2)]),t("button",{onClick:_,class:i(["rounded-lg p-2 transition-all duration-200 hover:rotate-90",[e(o)?"text-gray-400 hover:text-white hover:bg-white/10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"]])},s[13]||(s[13]=[t("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]),2)])],2),t("div",Ft,[t("div",Dt,[t("div",Lt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[14]||(s[14]=t("span",null,"取件码",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Ut,[x(t("input",{type:"text","onUpdate:modelValue":s[3]||(s[3]=a=>d.value.code=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入取件码"},null,2),[[y,d.value.code]]),t("div",It,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",Tt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[15]||(s[15]=t("span",null,"文件名称",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Bt,[x(t("input",{type:"text","onUpdate:modelValue":s[4]||(s[4]=a=>d.value.prefix=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入文件名称"},null,2),[[y,d.value.prefix]]),t("div",Pt,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",qt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[16]||(s[16]=t("span",null,"文件后缀",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Et,[x(t("input",{type:"text","onUpdate:modelValue":s[5]||(s[5]=a=>d.value.suffix=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入文件后缀"},null,2),[[y,d.value.suffix]]),t("div",At,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",Ht,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[17]||(s[17]=t("span",null,"过期时间",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Kt,[x(t("input",{type:"datetime-local","onUpdate:modelValue":s[6]||(s[6]=a=>d.value.expired_at=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]])},null,2),[[y,d.value.expired_at]]),t("div",Rt,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",Yt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[18]||(s[18]=t("span",null,"下载次数限制",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Gt,[x(t("input",{type:"number","onUpdate:modelValue":s[7]||(s[7]=a=>d.value.expired_count=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入下载次数限制"},null,2),[[y,d.value.expired_count]]),t("div",Jt,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])])])]),t("div",{class:i(["flex items-center justify-end gap-3 px-6 py-4 border-t bg-gradient-to-b",[e(o)?"border-gray-700/50 from-gray-800/50 to-gray-800":"border-gray-200 from-gray-50 to-white"]])},[t("button",{onClick:_,class:i(["inline-flex items-center justify-center rounded-lg px-4 py-2.5 text-sm font-medium transition-all duration-200",[e(o)?"bg-gray-700/50 text-gray-300 hover:bg-gray-600/50 hover:text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])}," 取消 ",2),t("button",{onClick:E,class:"inline-flex items-center justify-center rounded-lg px-4 py-2.5 text-sm font-medium transition-all duration-200 bg-gradient-to-r from-indigo-600 to-indigo-500 hover:from-indigo-500 hover:to-indigo-600 text-white shadow-lg shadow-indigo-500/25 hover:shadow-indigo-500/35"},[l(e(f),{class:"w-4 h-4 mr-2"}),s[19]||(s[19]=h(" 保存更改 "))])],2)],2)])])])):J("",!0)]))}});export{Xt as default}; diff --git a/themes/2024/assets/FileManageView-CIqGYRg2.js b/themes/2024/assets/FileManageView-CIqGYRg2.js new file mode 100644 index 0000000..afabf46 --- /dev/null +++ b/themes/2024/assets/FileManageView-CIqGYRg2.js @@ -0,0 +1,26 @@ +import{c as w,d as R,r as M,u as Y,f as L,a as u,b as p,e as t,n as i,g as e,l as x,v as y,L as G,i as l,q as h,F as S,p as $,t as g,k as J,x as N,y as j}from"./index-YD9XVcaL.js";import{F as O}from"./file-DnnQU8q_.js";import{T as Q}from"./trash-hKmESNHA.js";/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f=w("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W=w("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const X=w("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U=w("PencilIcon",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I=w("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},tt={class:"mb-8"},et={class:"flex flex-1 gap-4 w-full sm:w-auto"},ot={class:"relative flex-1"},st={class:"overflow-x-auto"},it={class:"px-6 py-4 whitespace-nowrap"},at={class:"flex items-center"},rt={class:"px-6 py-4"},nt={class:"flex items-center group relative"},lt=["title"],dt={class:"absolute left-0 -top-2 -translate-y-full opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},gt={class:"bg-gray-900 text-white text-sm rounded px-2 py-1 max-w-xs break-all"},ct={class:"px-6 py-4 whitespace-nowrap"},ut={class:"px-6 py-4"},pt={class:"group relative"},xt={class:"absolute left-0 -top-2 -translate-y-full opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none z-10"},yt={class:"bg-gray-900 text-white text-sm rounded px-2 py-1 max-w-xs break-all"},ht={class:"px-6 py-4 whitespace-nowrap"},ft={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},bt={class:"flex items-center space-x-2"},mt=["onClick"],vt=["onClick"],wt={class:"flex items-center space-x-2"},_t=["disabled"],kt={class:"flex items-center space-x-1"},Ct=["onClick"],Mt=["disabled"],St={key:0,class:"fixed inset-0 z-50","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},zt={class:"fixed inset-0 z-10 overflow-y-auto"},Vt={class:"flex min-h-full items-center justify-center p-4 text-center sm:p-0"},$t={class:"flex items-center justify-between"},jt={class:"flex items-center space-x-3"},Ft={class:"px-6 py-5"},Dt={class:"grid gap-6"},Lt={class:"space-y-2 group"},Ut={class:"relative rounded-lg shadow-sm"},It={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Tt={class:"space-y-2 group"},Bt={class:"relative rounded-lg shadow-sm"},Pt={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},qt={class:"space-y-2 group"},Et={class:"relative rounded-lg shadow-sm"},At={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Ht={class:"space-y-2 group"},Kt={class:"relative rounded-lg shadow-sm"},Rt={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Yt={class:"space-y-2 group"},Gt={class:"relative rounded-lg shadow-sm"},Jt={class:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-opacity duration-200 opacity-0 group-focus-within:opacity-100"},Xt=R({__name:"FileManageView",setup(Nt){function T(r){const s=new Date(r),a=s.getFullYear(),c=(s.getMonth()+1).toString().padStart(2,"0"),k=s.getDate().toString().padStart(2,"0"),C=s.getHours().toString().padStart(2,"0"),v=s.getMinutes().toString().padStart(2,"0"),K=s.getSeconds().toString().padStart(2,"0");return`${a}-${c}-${k} ${C}:${v}:${K}`}const o=N("isDarkMode"),F=M([]),B=Y(),P=["取件码","名称","大小","描述","过期时间","操作"],n=M({page:1,size:10,total:0,keyword:""}),z=M(!1),d=M({id:null,code:"",prefix:"",suffix:"",expired_at:"",expired_count:null}),q=r=>{d.value={id:r.id,code:r.code,prefix:r.prefix,suffix:r.suffix,expired_at:r.expired_at?r.expired_at.slice(0,16):"",expired_count:r.expired_count},z.value=!0},_=()=>{z.value=!1,d.value={id:null,code:"",prefix:"",suffix:"",expired_at:"",expired_count:null}},E=async()=>{try{await j({url:"admin/file/update",method:"patch",data:d.value}),await b(),_()}catch(r){B.showAlert(r.response.data.detail,"error")}},A=async r=>{try{await j({url:"admin/file/delete",method:"delete",data:{id:r}}),await b()}catch(s){console.error("删除失败:",s)}},b=async()=>{try{const r=await j({url:"/admin/file/list",method:"get",params:n.value});F.value=r.detail.data,n.value.total=r.detail.total}catch(r){console.error("加载文件列表失败:",r)}},V=async r=>{r<1||r>m.value||(n.value.page=r,await b())};b();const m=L(()=>Math.ceil(n.value.total/n.value.size)),H=L(()=>{const r=n.value.page,s=m.value,a=2;let c=[];c.push(1);let k=Math.max(2,r-a),C=Math.min(s-1,r+a);k>2&&c.push("...");for(let v=k;v<=C;v++)c.push(v);return C1&&c.push(s),c}),D=async()=>{n.value.page=1,await b()};return(r,s)=>(u(),p("div",Z,[t("div",tt,[t("h2",{class:i(["text-2xl font-bold mb-4",[e(o)?"text-white":"text-gray-800"]])}," 文件管理 ",2)]),t("div",{class:i(["mb-6 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between bg-opacity-70 p-4 rounded-lg shadow-sm",[e(o)?"bg-gray-800":"bg-white"]])},[t("div",et,[t("div",ot,[x(t("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=a=>n.value.keyword=a),onKeyup:G(D,["enter"]),class:i([e(o)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400":"bg-white border-gray-300 text-gray-900 placeholder-gray-400","w-full pl-10 pr-4 py-2.5 rounded-lg border focus:ring-2 focus:ring-indigo-500 focus:border-transparent"]),placeholder:"搜索文件名称、描述..."},null,34),[[y,n.value.keyword]]),l(e(I),{class:i(["absolute left-3 top-3 w-5 h-5",[e(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"])]),t("button",{onClick:D,class:"px-4 py-2.5 rounded-lg inline-flex items-center transition-all duration-200 bg-indigo-600 hover:bg-indigo-700 text-white shadow-sm"},[l(e(I),{class:"w-5 h-5 mr-2"}),s[8]||(s[8]=h(" 搜索 "))])])],2),t("div",{class:i(["rounded-lg shadow-sm overflow-hidden transition-all duration-300",[e(o)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",{class:i(["px-6 py-4 border-b",[e(o)?"border-gray-700":"border-gray-200"]])},[t("h3",{class:i(["text-lg font-medium",[e(o)?"text-white":"text-gray-800"]])}," 所有文件 ",2)],2),t("div",st,[t("table",{class:i(["min-w-full divide-y",[e(o)?"divide-gray-700":"divide-gray-200"]])},[t("thead",{class:i([e(o)?"bg-gray-900/50":"bg-gray-50"])},[t("tr",null,[(u(),p(S,null,$(P,a=>t("th",{key:a,class:i(["px-6 py-3.5 text-left text-xs font-medium uppercase tracking-wider",[e(o)?"text-gray-400":"text-gray-500"]])},g(a),3)),64))])],2),t("tbody",{class:i([e(o)?"bg-gray-800/50 divide-y divide-gray-700":"bg-white divide-y divide-gray-200"])},[(u(!0),p(S,null,$(F.value,a=>(u(),p("tr",{key:a.id,class:i(["hover:bg-opacity-50 transition-colors duration-200",[e(o)?"hover:bg-gray-700":"hover:bg-gray-50"]])},[t("td",it,[t("div",at,[t("span",{class:i(["font-medium select-all",[e(o)?"text-white":"text-gray-900"]])},g(a.code),3)])]),t("td",rt,[t("div",nt,[l(e(O),{class:i(["w-5 h-5 mr-2 flex-shrink-0",[e(o)?"text-indigo-400":"text-indigo-500"]])},null,8,["class"]),t("span",{class:i(["font-medium truncate max-w-[200px]",[e(o)?"text-white":"text-gray-900"]]),title:a.prefix},g(a.prefix),11,lt),t("div",dt,[t("div",gt,g(a.prefix),1)])])]),t("td",ct,[t("span",{class:i(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",[e(o)?"bg-gray-700 text-gray-300":"bg-gray-100 text-gray-800"]])},g(Math.round(a.size/1024/1024*100)/100)+"MB ",3)]),t("td",ut,[t("div",pt,[t("span",{class:i(["block truncate max-w-[250px]",[e(o)?"text-gray-400":"text-gray-500"]])},g(a.text),3),t("div",xt,[t("div",yt,g(a.text),1)])])]),t("td",ht,[t("span",{class:i(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",[a.expired_at?e(o)?"bg-yellow-900/30 text-yellow-400":"bg-yellow-100 text-yellow-800":e(o)?"bg-green-900/30 text-green-400":"bg-green-100 text-green-800"]])},g(a.expired_at?T(a.expired_at):"永久"),3)]),t("td",ft,[t("div",bt,[t("button",{onClick:c=>q(a),class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?"bg-blue-900/20 text-blue-400 hover:bg-blue-900/30":"bg-blue-50 text-blue-600 hover:bg-blue-100"]])},[l(e(U),{class:"w-4 h-4 mr-1.5"}),s[9]||(s[9]=h(" 编辑 "))],10,mt),t("button",{onClick:c=>A(a.id),class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?"bg-red-900/20 text-red-400 hover:bg-red-900/30":"bg-red-50 text-red-600 hover:bg-red-100"]])},[l(e(Q),{class:"w-4 h-4 mr-1.5"}),s[10]||(s[10]=h(" 删除 "))],10,vt)])])],2))),128))],2)],2)]),t("div",{class:i(["mt-4 flex items-center justify-between px-6 py-4 border-t",[e(o)?"border-gray-700":"border-gray-200"]])},[t("div",{class:i(["flex items-center text-sm",[e(o)?"text-gray-400":"text-gray-500"]])}," 显示第 "+g((n.value.page-1)*n.value.size+1)+" 到 "+g(Math.min(n.value.page*n.value.size,n.value.total))+" 条,共 "+g(n.value.total)+" 条 ",3),t("div",wt,[t("button",{onClick:s[1]||(s[1]=a=>V(n.value.page-1)),disabled:n.value.page===1,class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?n.value.page===1?"bg-gray-800 text-gray-600 cursor-not-allowed":"bg-gray-800 text-gray-300 hover:bg-gray-700":n.value.page===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},[l(e(W),{class:"w-4 h-4"}),s[11]||(s[11]=h(" 上一页 "))],10,_t),t("div",kt,[(u(!0),p(S,null,$(H.value,a=>(u(),p(S,{key:a},[a!=="..."?(u(),p("button",{key:0,onClick:c=>V(a),class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[n.value.page===a?"bg-indigo-600 text-white":e(o)?"bg-gray-800 text-gray-300 hover:bg-gray-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},g(a),11,Ct)):(u(),p("span",{key:1,class:i(["px-2",[e(o)?"text-gray-400":"text-gray-500"]])}," ... ",2))],64))),128))]),t("button",{onClick:s[2]||(s[2]=a=>V(n.value.page+1)),disabled:n.value.page>=m.value,class:i(["inline-flex items-center px-3 py-1.5 rounded-md transition-colors duration-200",[e(o)?n.value.page>=m.value?"bg-gray-800 text-gray-600 cursor-not-allowed":"bg-gray-800 text-gray-300 hover:bg-gray-700":n.value.page>=m.value?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},[s[12]||(s[12]=h(" 下一页 ")),l(e(X),{class:"w-4 h-4"})],10,Mt)])],2)],2),z.value?(u(),p("div",St,[t("div",{class:"fixed inset-0 bg-gradient-to-br from-gray-900/90 to-black/90 backdrop-blur-sm transition-opacity duration-300",onClick:_}),t("div",zt,[t("div",Vt,[t("div",{class:i(["relative transform overflow-hidden rounded-2xl text-left shadow-2xl transition-all sm:my-8 sm:w-full sm:max-w-xl animate-modal-scale",[e(o)?"bg-gray-800/95 backdrop-blur-md":"bg-white"]])},[t("div",{class:i(["relative px-6 pt-6 pb-4",[e(o)?"bg-gradient-to-r from-gray-800/50 to-gray-700/50":"bg-gradient-to-r from-gray-50 to-white"]])},[t("div",$t,[t("div",jt,[t("div",{class:i(["p-2 rounded-lg",[e(o)?"bg-indigo-500/10":"bg-indigo-50"]])},[l(e(U),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2),t("h3",{class:i(["text-xl font-semibold leading-6",[e(o)?"text-white":"text-gray-900"]])}," 编辑文件信息 ",2)]),t("button",{onClick:_,class:i(["rounded-lg p-2 transition-all duration-200 hover:rotate-90",[e(o)?"text-gray-400 hover:text-white hover:bg-white/10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"]])},s[13]||(s[13]=[t("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]),2)])],2),t("div",Ft,[t("div",Dt,[t("div",Lt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[14]||(s[14]=t("span",null,"取件码",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Ut,[x(t("input",{type:"text","onUpdate:modelValue":s[3]||(s[3]=a=>d.value.code=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入取件码"},null,2),[[y,d.value.code]]),t("div",It,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",Tt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[15]||(s[15]=t("span",null,"文件名称",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Bt,[x(t("input",{type:"text","onUpdate:modelValue":s[4]||(s[4]=a=>d.value.prefix=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入文件名称"},null,2),[[y,d.value.prefix]]),t("div",Pt,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",qt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[16]||(s[16]=t("span",null,"文件后缀",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Et,[x(t("input",{type:"text","onUpdate:modelValue":s[5]||(s[5]=a=>d.value.suffix=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入文件后缀"},null,2),[[y,d.value.suffix]]),t("div",At,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",Ht,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[17]||(s[17]=t("span",null,"过期时间",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Kt,[x(t("input",{type:"datetime-local","onUpdate:modelValue":s[6]||(s[6]=a=>d.value.expired_at=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]])},null,2),[[y,d.value.expired_at]]),t("div",Rt,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])]),t("div",Yt,[t("label",{class:i(["text-sm font-medium flex items-center space-x-2 transition-colors duration-200",[e(o)?"text-gray-300 group-focus-within:text-indigo-400":"text-gray-700 group-focus-within:text-indigo-600"]])},[s[18]||(s[18]=t("span",null,"下载次数限制",-1)),t("div",{class:i(["h-px flex-1 transition-colors duration-200",[e(o)?"bg-gray-700 group-focus-within:bg-indigo-500/50":"bg-gray-200 group-focus-within:bg-indigo-500/30"]])},null,2)],2),t("div",Gt,[x(t("input",{type:"number","onUpdate:modelValue":s[7]||(s[7]=a=>d.value.expired_count=a),class:i(["block w-full rounded-lg border-0 py-2.5 pl-4 pr-10 transition-all duration-200 focus:ring-2 focus:ring-inset sm:text-sm",[e(o)?"bg-gray-700/50 text-white placeholder-gray-400 focus:ring-indigo-500/50":"bg-gray-50 text-gray-900 placeholder-gray-400 focus:ring-indigo-500"]]),placeholder:"输入下载次数限制"},null,2),[[y,d.value.expired_count]]),t("div",Jt,[l(e(f),{class:i(["w-5 h-5",[e(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])])])])])]),t("div",{class:i(["flex items-center justify-end gap-3 px-6 py-4 border-t bg-gradient-to-b",[e(o)?"border-gray-700/50 from-gray-800/50 to-gray-800":"border-gray-200 from-gray-50 to-white"]])},[t("button",{onClick:_,class:i(["inline-flex items-center justify-center rounded-lg px-4 py-2.5 text-sm font-medium transition-all duration-200",[e(o)?"bg-gray-700/50 text-gray-300 hover:bg-gray-600/50 hover:text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])}," 取消 ",2),t("button",{onClick:E,class:"inline-flex items-center justify-center rounded-lg px-4 py-2.5 text-sm font-medium transition-all duration-200 bg-gradient-to-r from-indigo-600 to-indigo-500 hover:from-indigo-500 hover:to-indigo-600 text-white shadow-lg shadow-indigo-500/25 hover:shadow-indigo-500/35"},[l(e(f),{class:"w-4 h-4 mr-2"}),s[19]||(s[19]=h(" 保存更改 "))])],2)],2)])])])):J("",!0)]))}});export{Xt as default}; diff --git a/themes/2024/assets/LoginView-CmfCcdby.js b/themes/2024/assets/LoginView-BnEvnNIL.js similarity index 96% rename from themes/2024/assets/LoginView-CmfCcdby.js rename to themes/2024/assets/LoginView-BnEvnNIL.js index 884814e..32dd55b 100644 --- a/themes/2024/assets/LoginView-CmfCcdby.js +++ b/themes/2024/assets/LoginView-BnEvnNIL.js @@ -1 +1 @@ -import{G as y,r as u,d as b,u as v,a as w,b as x,e,n as l,g as o,i as h,h as k,l as S,v as A,q as V,t as D,x as B,A as P,y as _,_ as j}from"./index-B2REZq7f.js";import{B as M}from"./box-H6C9Cns8.js";const z=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),a=u(""),i=u(!1),s=B("isDarkMode"),c=z(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=P(),f=async()=>{if(p()){_.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(w(),x("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(M),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,a.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=j(T,[["__scopeId","data-v-66eb7914"]]);export{E as default}; +import{G as y,r as u,d as b,u as v,a as w,b as x,e,n as l,g as o,i as h,h as k,l as S,v as A,q as V,t as D,x as B,A as P,y as _,_ as j}from"./index-YD9XVcaL.js";import{B as M}from"./box-6z1N6vdl.js";const z=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),a=u(""),i=u(!1),s=B("isDarkMode"),c=z(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=P(),f=async()=>{if(p()){_.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(w(),x("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(M),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,a.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=j(T,[["__scopeId","data-v-66eb7914"]]);export{E as default}; diff --git a/themes/2024/assets/RetrievewFileView-3EiIbIrL.css b/themes/2024/assets/RetrievewFileView-3EiIbIrL.css new file mode 100644 index 0000000..97c23a5 --- /dev/null +++ b/themes/2024/assets/RetrievewFileView-3EiIbIrL.css @@ -0,0 +1 @@ +@keyframes blob-0d2ae864{0%,to{transform:translate(0) scale(1)}25%{transform:translate(20px,-50px) scale(1.1)}50%{transform:translate(-20px,20px) scale(.9)}75%{transform:translate(50px,50px) scale(1.05)}}.animate-blob-1[data-v-0d2ae864]{animation:blob-0d2ae864 25s infinite}.animate-blob-2[data-v-0d2ae864]{animation:blob-0d2ae864 30s infinite}.animate-blob-3[data-v-0d2ae864]{animation:blob-0d2ae864 35s infinite}.animate-blob-4[data-v-0d2ae864]{animation:blob-0d2ae864 40s infinite}.animate-spin-slow[data-v-0d2ae864]{animation:spin-0d2ae864 8s linear infinite}@keyframes spin-0d2ae864{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-enter-active[data-v-0d2ae864],.fade-leave-active[data-v-0d2ae864]{transition:opacity .3s ease}.fade-enter-from[data-v-0d2ae864],.fade-leave-to[data-v-0d2ae864]{opacity:0}.list-enter-active[data-v-0d2ae864],.list-leave-active[data-v-0d2ae864]{transition:all .5s ease}.list-enter-from[data-v-0d2ae864],.list-leave-to[data-v-0d2ae864]{opacity:0;transform:translate(30px)}.drawer-enter-active[data-v-0d2ae864],.drawer-leave-active[data-v-0d2ae864]{transition:transform .3s ease}.drawer-enter-from[data-v-0d2ae864],.drawer-leave-to[data-v-0d2ae864]{transform:translate(100%)}.w-97-100[data-v-0d2ae864]{width:97%}[data-v-0d2ae864] .prose{text-align:left}[data-v-0d2ae864] .prose h1,[data-v-0d2ae864] .prose h2,[data-v-0d2ae864] .prose h3,[data-v-0d2ae864] .prose h4,[data-v-0d2ae864] .prose h5,[data-v-0d2ae864] .prose h6{color:#4f46e5}@media (prefers-color-scheme: dark){[data-v-0d2ae864] .prose h1,[data-v-0d2ae864] .prose h2,[data-v-0d2ae864] .prose h3,[data-v-0d2ae864] .prose h4,[data-v-0d2ae864] .prose h5,[data-v-0d2ae864] .prose h6{color:#818cf8}}@media (min-width: 640px){.sm\:w-120[data-v-0d2ae864]{width:30rem}} diff --git a/themes/2024/assets/RetrievewFileView-BJNzgq08.css b/themes/2024/assets/RetrievewFileView-BJNzgq08.css deleted file mode 100644 index f011674..0000000 --- a/themes/2024/assets/RetrievewFileView-BJNzgq08.css +++ /dev/null @@ -1 +0,0 @@ -@keyframes blob-16bdf5db{0%,to{transform:translate(0) scale(1)}25%{transform:translate(20px,-50px) scale(1.1)}50%{transform:translate(-20px,20px) scale(.9)}75%{transform:translate(50px,50px) scale(1.05)}}.animate-blob-1[data-v-16bdf5db]{animation:blob-16bdf5db 25s infinite}.animate-blob-2[data-v-16bdf5db]{animation:blob-16bdf5db 30s infinite}.animate-blob-3[data-v-16bdf5db]{animation:blob-16bdf5db 35s infinite}.animate-blob-4[data-v-16bdf5db]{animation:blob-16bdf5db 40s infinite}.animate-spin-slow[data-v-16bdf5db]{animation:spin-16bdf5db 8s linear infinite}@keyframes spin-16bdf5db{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-enter-active[data-v-16bdf5db],.fade-leave-active[data-v-16bdf5db]{transition:opacity .3s ease}.fade-enter-from[data-v-16bdf5db],.fade-leave-to[data-v-16bdf5db]{opacity:0}.list-enter-active[data-v-16bdf5db],.list-leave-active[data-v-16bdf5db]{transition:all .5s ease}.list-enter-from[data-v-16bdf5db],.list-leave-to[data-v-16bdf5db]{opacity:0;transform:translate(30px)}.drawer-enter-active[data-v-16bdf5db],.drawer-leave-active[data-v-16bdf5db]{transition:transform .3s ease}.drawer-enter-from[data-v-16bdf5db],.drawer-leave-to[data-v-16bdf5db]{transform:translate(100%)}.w-97-100[data-v-16bdf5db]{width:97%}[data-v-16bdf5db] .prose{text-align:left}[data-v-16bdf5db] .prose h1,[data-v-16bdf5db] .prose h2,[data-v-16bdf5db] .prose h3,[data-v-16bdf5db] .prose h4,[data-v-16bdf5db] .prose h5,[data-v-16bdf5db] .prose h6{color:#4f46e5}@media (prefers-color-scheme: dark){[data-v-16bdf5db] .prose h1,[data-v-16bdf5db] .prose h2,[data-v-16bdf5db] .prose h3,[data-v-16bdf5db] .prose h4,[data-v-16bdf5db] .prose h5,[data-v-16bdf5db] .prose h6{color:#818cf8}}@media (min-width: 640px){.sm\:w-120[data-v-16bdf5db]{width:30rem}} diff --git a/themes/2024/assets/RetrievewFileView-DYGo5XeV.js b/themes/2024/assets/RetrievewFileView-CnyG2_V6.js similarity index 77% rename from themes/2024/assets/RetrievewFileView-DYGo5XeV.js rename to themes/2024/assets/RetrievewFileView-CnyG2_V6.js index f889a1a..bc60391 100644 --- a/themes/2024/assets/RetrievewFileView-DYGo5XeV.js +++ b/themes/2024/assets/RetrievewFileView-CnyG2_V6.js @@ -1,4 +1,4 @@ -var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>Pe(d,typeof e!="symbol"?e+"":e,t);import{c as ce,_ as Fe,u as Ze,B as Oe,r as D,o as Ue,w as Qe,f as He,b as L,e as p,n as b,g as f,i as $,t as j,h as Ne,l as Ve,v as Ge,k as ee,j as Q,q as Z,T as le,C as We,z as Xe,a as C,X as ke,s as Ke,F as Je,p as Ye,A as et,x as tt,y as nt}from"./index-B2REZq7f.js";import{u as st,S as it,C as rt,Q as ot,E as lt}from"./fileData-D0vhoF43.js";import{B as at}from"./box-H6C9Cns8.js";import{F as be}from"./file-vEntDFgk.js";import{H as ct}from"./hard-drive-J2sqyRb4.js";import{T as ut}from"./trash-6hUac_7h.js";/** +var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>Pe(d,typeof e!="symbol"?e+"":e,t);import{c as ce,_ as Fe,u as Ze,B as Oe,r as D,o as Ue,w as Qe,f as He,b as L,e as p,n as w,g as f,i as $,t as j,h as Ne,l as Ve,v as Ge,k as ee,j as Q,q as Z,T as le,C as We,z as Xe,a as C,X as ke,s as Ke,F as Je,p as Ye,A as et,x as tt,y as nt}from"./index-YD9XVcaL.js";import{u as st,S as it,C as rt,Q as ot,E as lt}from"./fileData-DwFxbdR7.js";import{B as at}from"./box-6z1N6vdl.js";import{F as we}from"./file-DnnQU8q_.js";import{H as ct}from"./hard-drive-CeSuRVUM.js";import{T as ut}from"./trash-hKmESNHA.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. @@ -13,31 +13,31 @@ var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,config * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const we=ce("DownloadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var H=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Te={exports:{}};(function(d,e){(function(t,n){n()})(H,function(){function t(c,l){return typeof l>"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,l,u){var h=new XMLHttpRequest;h.open("GET",c),h.responseType="blob",h.onload=function(){a(h.response,l,u)},h.onerror=function(){console.error("could not download file")},h.send()}function s(c){var l=new XMLHttpRequest;l.open("HEAD",c,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(l)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof H=="object"&&H.global===H?H:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,l,u){var h=r.URL||r.webkitURL,g=document.createElement("a");l=l||c.name||"download",g.download=l,g.rel="noopener",typeof c=="string"?(g.href=c,g.origin===location.origin?i(g):s(g.href)?n(c,l,u):i(g,g.target="_blank")):(g.href=h.createObjectURL(c),setTimeout(function(){h.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(c,l,u){if(l=l||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(t(c,u),l);else if(s(c))n(c,l,u);else{var h=document.createElement("a");h.href=c,h.target="_blank",setTimeout(function(){i(h)})}}:function(c,l,u,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof c=="string")return n(c,l,u);var g=c.type==="application/octet-stream",w=/constructor/i.test(r.HTMLElement)||r.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||g&&w||o)&&typeof FileReader<"u"){var R=new FileReader;R.onloadend=function(){var E=R.result;E=T?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=E:location=E,h=null},R.readAsDataURL(c)}else{var B=r.URL||r.webkitURL,M=B.createObjectURL(c);h?h.location=M:location.href=M,h=null,setTimeout(function(){B.revokeObjectURL(M)},4e4)}});r.saveAs=a.saveAs=a,d.exports=a})})(Te);var dt=Te.exports;function ue(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let F=ue();function Re(d){F=d}const ze=/[&<>"']/,ft=new RegExp(ze.source,"g"),Se=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,gt=new RegExp(Se.source,"g"),xt={"&":"&","<":"<",">":">",'"':""","'":"'"},me=d=>xt[d];function z(d,e){if(e){if(ze.test(d))return d.replace(ft,me)}else if(Se.test(d))return d.replace(gt,me);return d}const kt=/(^|[^\[])\^/g;function y(d,e){let t=typeof d=="string"?d:d.source;e=e||"";const n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(kt,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}function ye(d){try{d=encodeURI(d).replace(/%25/g,"%")}catch{return null}return d}const G={exec:()=>null};function ve(d,e){const t=d.replace(/\|/g,(i,r,o)=>{let a=!1,c=r;for(;--c>=0&&o[c]==="\\";)a=!a;return a?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,l,u){var h=new XMLHttpRequest;h.open("GET",c),h.responseType="blob",h.onload=function(){a(h.response,l,u)},h.onerror=function(){console.error("could not download file")},h.send()}function s(c){var l=new XMLHttpRequest;l.open("HEAD",c,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(l)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof H=="object"&&H.global===H?H:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,l,u){var h=r.URL||r.webkitURL,g=document.createElement("a");l=l||c.name||"download",g.download=l,g.rel="noopener",typeof c=="string"?(g.href=c,g.origin===location.origin?i(g):s(g.href)?n(c,l,u):i(g,g.target="_blank")):(g.href=h.createObjectURL(c),setTimeout(function(){h.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(c,l,u){if(l=l||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(t(c,u),l);else if(s(c))n(c,l,u);else{var h=document.createElement("a");h.href=c,h.target="_blank",setTimeout(function(){i(h)})}}:function(c,l,u,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof c=="string")return n(c,l,u);var g=c.type==="application/octet-stream",b=/constructor/i.test(r.HTMLElement)||r.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||g&&b||o)&&typeof FileReader<"u"){var R=new FileReader;R.onloadend=function(){var E=R.result;E=T?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=E:location=E,h=null},R.readAsDataURL(c)}else{var B=r.URL||r.webkitURL,M=B.createObjectURL(c);h?h.location=M:location.href=M,h=null,setTimeout(function(){B.revokeObjectURL(M)},4e4)}});r.saveAs=a.saveAs=a,d.exports=a})})(Te);var dt=Te.exports;function ue(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let F=ue();function Re(d){F=d}const ze=/[&<>"']/,ft=new RegExp(ze.source,"g"),Se=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,gt=new RegExp(Se.source,"g"),xt={"&":"&","<":"<",">":">",'"':""","'":"'"},me=d=>xt[d];function z(d,e){if(e){if(ze.test(d))return d.replace(ft,me)}else if(Se.test(d))return d.replace(gt,me);return d}const kt=/(^|[^\[])\^/g;function y(d,e){let t=typeof d=="string"?d:d.source;e=e||"";const n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(kt,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}function ye(d){try{d=encodeURI(d).replace(/%25/g,"%")}catch{return null}return d}const G={exec:()=>null};function ve(d,e){const t=d.replace(/\|/g,(i,r,o)=>{let a=!1,c=r;for(;--c>=0&&o[c]==="\\";)a=!a;return a?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{const i=s.match(/^\s+/);if(i===null)return s;const[r]=i;return r.length>=n.length?s.slice(n.length):s}).join(` `)}class ne{constructor(e){v(this,"options");v(this,"rules");v(this,"lexer");this.options=e||F}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:N(n,` -`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=wt(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=N(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:N(t[0],` +`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=bt(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=N(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:N(t[0],` `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=N(t[0],` `).split(` `),s="",i="";const r=[];for(;n.length>0;){let o=!1;const a=[];let c;for(c=0;c/.test(n[c]))a.push(n[c]),o=!0;else if(!o)a.push(n[c]);else break;n=n.slice(c);const l=a.join(` `),u=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` $1`).replace(/^ {0,3}>[ \t]?/gm,"");s=s?`${s} ${l}`:l,i=i?`${i} -${u}`:u;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,r,!0),this.lexer.state.top=h,n.length===0)break;const g=r[r.length-1];if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const w=g,T=w.raw+` +${u}`:u;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,r,!0),this.lexer.state.top=h,n.length===0)break;const g=r[r.length-1];if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const b=g,T=b.raw+` `+n.join(` -`),R=this.blockquote(T);r[r.length-1]=R,s=s.substring(0,s.length-w.raw.length)+R.raw,i=i.substring(0,i.length-w.text.length)+R.text;break}else if((g==null?void 0:g.type)==="list"){const w=g,T=w.raw+` +`),R=this.blockquote(T);r[r.length-1]=R,s=s.substring(0,s.length-b.raw.length)+R.raw,i=i.substring(0,i.length-b.text.length)+R.text;break}else if((g==null?void 0:g.type)==="list"){const b=g,T=b.raw+` `+n.join(` -`),R=this.list(T);r[r.length-1]=R,s=s.substring(0,s.length-g.raw.length)+R.raw,i=i.substring(0,i.length-w.raw.length)+R.raw,n=T.substring(r[r.length-1].raw.length).split(` +`),R=this.list(T);r[r.length-1]=R,s=s.substring(0,s.length-g.raw.length)+R.raw,i=i.substring(0,i.length-b.raw.length)+R.raw,n=T.substring(r[r.length-1].raw.length).split(` `);continue}}return{type:"blockquote",raw:s,tokens:r,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const r=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let a=!1,c="",l="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let u=t[2].split(` `,1)[0].replace(/^\t+/,B=>" ".repeat(3*B.length)),h=e.split(` -`,1)[0],g=!u.trim(),w=0;if(this.options.pedantic?(w=2,l=u.trimStart()):g?w=t[1].length+1:(w=t[2].search(/[^ ]/),w=w>4?1:w,l=u.slice(w),w+=t[1].length),g&&/^[ \t]*$/.test(h)&&(c+=h+` -`,e=e.substring(h.length+1),a=!0),!a){const B=new RegExp(`^ {0,${Math.min(3,w-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),M=new RegExp(`^ {0,${Math.min(3,w-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),E=new RegExp(`^ {0,${Math.min(3,w-1)}}(?:\`\`\`|~~~)`),O=new RegExp(`^ {0,${Math.min(3,w-1)}}#`),oe=new RegExp(`^ {0,${Math.min(3,w-1)}}<[a-z].*>`,"i");for(;e;){const U=e.split(` -`,1)[0];let q;if(h=U,this.options.pedantic?(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),q=h):q=h.replace(/\t/g," "),E.test(h)||O.test(h)||oe.test(h)||B.test(h)||M.test(h))break;if(q.search(/[^ ]/)>=w||!h.trim())l+=` -`+q.slice(w);else{if(g||u.replace(/\t/g," ").search(/[^ ]/)>=4||E.test(u)||O.test(u)||M.test(u))break;l+=` +`,1)[0],g=!u.trim(),b=0;if(this.options.pedantic?(b=2,l=u.trimStart()):g?b=t[1].length+1:(b=t[2].search(/[^ ]/),b=b>4?1:b,l=u.slice(b),b+=t[1].length),g&&/^[ \t]*$/.test(h)&&(c+=h+` +`,e=e.substring(h.length+1),a=!0),!a){const B=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),M=new RegExp(`^ {0,${Math.min(3,b-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),E=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:\`\`\`|~~~)`),O=new RegExp(`^ {0,${Math.min(3,b-1)}}#`),oe=new RegExp(`^ {0,${Math.min(3,b-1)}}<[a-z].*>`,"i");for(;e;){const U=e.split(` +`,1)[0];let q;if(h=U,this.options.pedantic?(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),q=h):q=h.replace(/\t/g," "),E.test(h)||O.test(h)||oe.test(h)||B.test(h)||M.test(h))break;if(q.search(/[^ ]/)>=b||!h.trim())l+=` +`+q.slice(b);else{if(g||u.replace(/\t/g," ").search(/[^ ]/)>=4||E.test(u)||O.test(u)||M.test(u))break;l+=` `+h}!g&&!h.trim()&&(g=!0),c+=U+` -`,e=e.substring(U.length+1),u=q.slice(w)}}i.loose||(o?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(c)&&(o=!0));let T=null,R;this.options.gfm&&(T=/^\[[ xX]\] /.exec(l),T&&(R=T[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:c,task:!!T,checked:R,loose:!1,text:l,tokens:[]}),i.raw+=c}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let a=0;au.type==="space"),l=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));i.loose=l}if(i.loose)for(let a=0;a$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=ve(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` +`,e=e.substring(U.length+1),u=q.slice(b)}}i.loose||(o?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(c)&&(o=!0));let T=null,R;this.options.gfm&&(T=/^\[[ xX]\] /.exec(l),T&&(R=T[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:c,task:!!T,checked:R,loose:!1,text:l,tokens:[]}),i.raw+=c}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let a=0;au.type==="space"),l=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));i.loose=l}if(i.loose)for(let a=0;a$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=ve(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` `):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const o of s)/^ *-+: *$/.test(o)?r.align.push("right"):/^ *:-+: *$/.test(o)?r.align.push("center"):/^ *:-+ *$/.test(o)?r.align.push("left"):r.align.push(null);for(let o=0;o({text:a,tokens:this.lexer.inline(a),header:!1,align:r.align[c]})));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:z(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const r=N(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=bt(t[2],"()");if(r>-1){const a=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);r&&(s=r[1],i=r[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),$e(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(/\s+/g," "),i=t[s.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return $e(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...s[0]].length-1;let o,a,c=r,l=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(s=u.exec(t))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(a=[...o].length,s[3]||s[4]){c+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){l+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+l);const h=[...s[0]][0].length,g=e.slice(0,r+s.index+h+a);if(Math.min(r,a)%2){const T=g.slice(1,-1);return{type:"em",raw:g,text:T,tokens:this.lexer.inlineTokens(T)}}const w=g.slice(2,-2);return{type:"strong",raw:g,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return s&&i&&(n=n.substring(1,n.length-1)),n=z(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=z(t[1]),s="mailto:"+n):(n=z(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,i;if(t[2]==="@")s=z(t[0]),i="mailto:"+s;else{let r;do r=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(r!==t[0]);s=z(t[0]),t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=z(t[0]),{type:"text",raw:t[0],text:n}}}}const mt=/^(?:[ \t]*(?:\n|$))+/,yt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,X=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ae=/(?:[*+-]|\d{1,9}[.)])/,Ee=y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),pe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_t=/^[^\n]+/,he=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Tt=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",he).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rt=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ae).getRegex(),re="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",de=/|$))/,zt=y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",de).replace("tag",re).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ie=y(pe).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),St=y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ie).getRegex(),fe={blockquote:St,code:yt,def:Tt,fences:vt,heading:$t,hr:X,html:zt,lheading:Ee,list:Rt,newline:mt,paragraph:Ie,table:G,text:_t},_e=y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),At={...fe,table:_e,paragraph:y(pe).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex()},Et={...fe,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:G,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(pe).replace("hr",X).replace("heading",` *#{1,6} *[^ +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:z(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const r=N(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=wt(t[2],"()");if(r>-1){const a=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);r&&(s=r[1],i=r[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),$e(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(/\s+/g," "),i=t[s.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return $e(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...s[0]].length-1;let o,a,c=r,l=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(s=u.exec(t))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(a=[...o].length,s[3]||s[4]){c+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){l+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+l);const h=[...s[0]][0].length,g=e.slice(0,r+s.index+h+a);if(Math.min(r,a)%2){const T=g.slice(1,-1);return{type:"em",raw:g,text:T,tokens:this.lexer.inlineTokens(T)}}const b=g.slice(2,-2);return{type:"strong",raw:g,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return s&&i&&(n=n.substring(1,n.length-1)),n=z(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=z(t[1]),s="mailto:"+n):(n=z(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,i;if(t[2]==="@")s=z(t[0]),i="mailto:"+s;else{let r;do r=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(r!==t[0]);s=z(t[0]),t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=z(t[0]),{type:"text",raw:t[0],text:n}}}}const mt=/^(?:[ \t]*(?:\n|$))+/,yt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,X=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ae=/(?:[*+-]|\d{1,9}[.)])/,Ee=y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),pe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_t=/^[^\n]+/,he=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Tt=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",he).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rt=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ae).getRegex(),re="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",de=/|$))/,zt=y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",de).replace("tag",re).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ie=y(pe).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),St=y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ie).getRegex(),fe={blockquote:St,code:yt,def:Tt,fences:vt,heading:$t,hr:X,html:zt,lheading:Ee,list:Rt,newline:mt,paragraph:Ie,table:G,text:_t},_e=y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),At={...fe,table:_e,paragraph:y(pe).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex()},Et={...fe,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:G,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(pe).replace("hr",X).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Ee).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Le=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,It=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ce=/^( {2,}|\\)\n(?!\s*$)/,Lt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Mt=y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,K).getRegex(),jt=y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,K).getRegex(),qt=y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,K).getRegex(),Dt=y(/\\([punct])/,"gu").replace(/punct/g,K).getRegex(),Pt=y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ft=y(de).replace("(?:-->|$)","-->").getRegex(),Zt=y("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ft).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),se=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ot=y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",se).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Be=y(/^!?\[(label)\]\[(ref)\]/).replace("label",se).replace("ref",he).getRegex(),Me=y(/^!?\[(ref)\](?:\[\])?/).replace("ref",he).getRegex(),Ut=y("reflink|nolink(?!\\()","g").replace("reflink",Be).replace("nolink",Me).getRegex(),ge={_backpedal:G,anyPunctuation:Dt,autolink:Pt,blockSkip:Bt,br:Ce,code:It,del:G,emStrongLDelim:Mt,emStrongRDelimAst:jt,emStrongRDelimUnd:qt,escape:Le,link:Ot,nolink:Me,punctuation:Ct,reflink:Be,reflinkSearch:Ut,tag:Zt,text:Lt,url:G},Qt={...ge,link:y(/^!?\[(label)\]\((.*?)\)/).replace("label",se).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se).getRegex()},ae={...ge,escape:y(Le).replace("])","~|])").getRegex(),url:y(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\(s=o.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))){if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length),s.raw.length===1&&t.length>0?t[t.length-1].raw+=` `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` @@ -68,4 +68,4 @@ ${e} `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),i=ye(e);if(i===null)return s;e=i;let r='
",r}image({href:e,title:t,text:n}){const s=ye(e);if(s===null)return n;e=s;let i=`${n}{const c=o[a].flat(1/0);n=n.concat(this.walkTokens(c,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const r=t.renderers[i.name];r?t.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=r.apply(this,o)),a}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[i.level];r?r.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),s.extensions=t),n.renderer){const i=this.defaults.renderer||new ie(this.defaults);for(const r in n.renderer){if(!(r in i))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const o=r,a=n.renderer[o],c=i[o];i[o]=(...l)=>{let u=a.apply(i,l);return u===!1&&(u=c.apply(i,l)),u||""}}s.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new ne(this.defaults);for(const r in n.tokenizer){if(!(r in i))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const o=r,a=n.tokenizer[o],c=i[o];i[o]=(...l)=>{let u=a.apply(i,l);return u===!1&&(u=c.apply(i,l)),u}}s.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new W;for(const r in n.hooks){if(!(r in i))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const o=r,a=n.hooks[o],c=i[o];W.passThroughHooks.has(r)?i[o]=l=>{if(this.defaults.async)return Promise.resolve(a.call(i,l)).then(h=>c.call(i,h));const u=a.call(i,l);return c.call(i,u)}:i[o]=(...l)=>{let u=a.apply(i,l);return u===!1&&(u=c.apply(i,l)),u}}s.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,r=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(r.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return S.lex(e,t??this.defaults)}parser(e,t){return A.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{const i={...s},r={...this.defaults,...i},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const a=r.hooks?r.hooks.provideLexer():e?S.lex:S.lexInline,c=r.hooks?r.hooks.provideParser():e?A.parse:A.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>a(l,r)).then(l=>r.hooks?r.hooks.processAllTokens(l):l).then(l=>r.walkTokens?Promise.all(this.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>c(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(o);try{r.hooks&&(n=r.hooks.preprocess(n));let l=a(n,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let u=c(l,r);return r.hooks&&(u=r.hooks.postprocess(u)),u}catch(l){return o(l)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const s="

An error occurred:

"+z(n.message+"",!0)+"
";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}}const P=new Nt;function m(d,e){return P.parse(d,e)}m.options=m.setOptions=function(d){return P.setOptions(d),m.defaults=P.defaults,Re(m.defaults),m};m.getDefaults=ue;m.defaults=F;m.use=function(...d){return P.use(...d),m.defaults=P.defaults,Re(m.defaults),m};m.walkTokens=function(d,e){return P.walkTokens(d,e)};m.parseInline=P.parseInline;m.Parser=A;m.parser=A.parse;m.Renderer=ie;m.TextRenderer=xe;m.Lexer=S;m.lexer=S.lex;m.Tokenizer=ne;m.Hooks=W;m.parse=m;m.options;m.setOptions;m.use;m.walkTokens;m.parseInline;A.parse;S.lex;const Vt={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},Gt={class:"w-full max-w-md relative z-10"},Wt={class:"p-8"},Xt={class:"flex justify-center mb-8"},Kt={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},Jt={class:"rounded-full bg-gray-900 p-2"},Yt={class:"mb-6 relative"},en={class:"relative"},tn=["readonly"],nn={key:0,class:"absolute inset-y-0 right-0 flex items-center pr-3"},sn=["disabled"],rn={class:"flex items-center justify-center relative z-10"},on={class:"mt-6 text-center"},ln={class:"flex-grow overflow-y-auto p-6"},an={class:"flex-shrink-0 mr-4"},cn={class:"flex-grow min-w-0 mr-4"},un={class:"flex-shrink-0 flex space-x-2"},pn=["onClick"],hn=["onClick"],dn=["onClick"],fn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},gn={class:"space-y-4"},xn={class:"flex items-center"},kn={class:"flex items-center"},bn={class:"flex items-center"},wn={class:"flex items-center"},mn={key:0,class:"ml-2"},yn={key:1},vn=["href"],$n={class:"mt-6 flex flex-col items-center"},_n={class:"bg-white p-2 rounded-lg shadow-md"},Tn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Rn={class:"flex justify-between items-center mb-4"},zn=["innerHTML"],Sn={__name:"RetrievewFileView",setup(d){const e=Ze(),t=window.location.origin,n=et(),s=tt("isDarkMode"),i=st(),{receiveData:r}=Oe(i),o=D(""),a=D({readonly:!1,loading:!1}),c=D(!1),l=D(""),u=D(null),h=D(!1),g=We(),w=r,T=JSON.parse(localStorage.getItem("config")||"{}");Ue(()=>{const k=g.query.code;k&&(o.value=k)}),Qe(o,k=>{k.length===5&&R()});const R=async()=>{if(o.value.length!==5){e.showAlert("请输入5位取件码","error");return}a.value.readonly=!0,a.value.loading=!0;try{const k=await nt.post("/share/select/",{code:o.value});if(k.code===200)if(k.detail){const x=k.detail.text.startsWith("/share/download")||k.detail.name!=="Text",I={id:Date.now(),code:k.detail.code,filename:k.detail.name,size:B(k.detail.size),downloadUrl:x?k.detail.text:null,content:x?null:k.detail.text,date:new Date().toLocaleString()};let _=!0;i.receiveData.forEach(Y=>{if(Y.code===I.code){_=!1;return}}),_&&i.addReceiveData(I),x?u.value=I:(u.value=I,J.value=!0),e.showAlert("文件获取成功","success")}else e.showAlert("无效的取件码","error");else e.showAlert(k.detail||"获取文件失败","error")}catch(k){e.showAlert(`取件失败,请稍后重试:${k.response.data.detail}`,"error")}finally{a.value.readonly=!1,a.value.loading=!1,o.value=""}},B=k=>{if(k===0)return"0 Bytes";const x=1024,I=["Bytes","KB","MB","GB","TB"],_=Math.floor(Math.log(k)/Math.log(x));return parseFloat((k/Math.pow(x,_)).toFixed(2))+" "+I[_]},M=k=>{u.value=k},E=k=>{const x=w.value.findIndex(I=>I.id===k);x!==-1&&i.deleteReceiveData(x)},O=()=>{h.value=!h.value},oe=()=>{n.push("/send")},U=k=>k.downloadUrl?`${t}${k.downloadUrl}`:`${t}?code=${k.code}`,q=k=>{if(console.log(k),k.downloadUrl)window.open(`${k.downloadUrl.startsWith("http")?"":t}${k.downloadUrl}`,"_blank");else if(k.content){const x=new Blob([k.content],{type:"text/plain;charset=utf-8"});dt.saveAs(x,`${k.filename}.txt`)}},J=D(!1),je=He(()=>u.value&&u.value.content?m(u.value.content):""),qe=()=>{J.value=!0};return(k,x)=>{const I=Xe("router-link");return C(),L("div",Vt,[p("div",Gt,[p("div",{class:b(["rounded-3xl shadow-2xl overflow-hidden border transform transition-all duration-300",[f(s)?"bg-gray-800 bg-opacity-50 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[p("div",Wt,[p("div",Xt,[p("div",Kt,[p("div",Jt,[$(f(at),{class:"w-8 h-8 text-white"})])])]),p("h2",{onClick:oe,class:b(["text-3xl cursor-pointer font-extrabold text-center mb-6",[f(s)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]])},j(f(T).name),3),p("form",{onSubmit:Ne(R,["prevent"])},[p("div",Yt,[p("label",{for:"code",class:b(["block text-sm font-medium mb-2",[f(s)?"text-gray-300":"text-gray-800"]])},"取件码",2),p("div",en,[Ve(p("input",{id:"code","onUpdate:modelValue":x[0]||(x[0]=_=>o.value=_),type:"text",class:b(["w-full px-4 py-3 rounded-lg placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 pr-10",[f(s)?"bg-gray-700 bg-opacity-50":"bg-gray-100",{"ring-2 ring-red-500":l.value},f(s)?"text-gray-300":"text-gray-800"]]),placeholder:"请输入5位取件码",required:"",readonly:a.value.readonly,maxlength:"5",onFocus:x[1]||(x[1]=_=>c.value=!0),onBlur:x[2]||(x[2]=_=>c.value=!1)},null,42,tn),[[Ge,o.value]]),a.value.loading?(C(),L("div",nn,x[5]||(x[5]=[p("span",{class:"animate-spin rounded-full h-5 w-5 border-b-2 border-indigo-500"},null,-1)]))):ee("",!0)]),p("div",{class:b(["absolute -bottom-0.5 left-2 h-0.5 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 transition-all duration-300 ease-in-out",{"w-97-100":c.value,"w-0":!c.value}])},null,2)]),p("button",{type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-3 px-4 rounded-lg hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group",disabled:a.value.loading},[p("span",rn,[p("span",null,j(a.value.loading?"处理中...":"提取文件"),1),$(f(pt),{class:"w-5 h-5 ml-2 transition-transform duration-300 transform group-hover:translate-x-1"})]),x[6]||(x[6]=p("span",{class:"absolute top-0 left-0 w-full h-full bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"},null,-1))],8,sn)],32),p("div",on,[$(I,{to:"/send",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:Q(()=>x[7]||(x[7]=[Z(" 需要发送文件?点击这里 ")])),_:1})])]),p("div",{class:b(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[f(s)?"bg-gray-800":"bg-gray-100"]])},[p("span",{class:b(["text-sm flex items-center",[f(s)?"text-gray-300":"text-gray-800"]])},[$(f(it),{class:"w-4 h-4 mr-1 text-green-400"}),x[8]||(x[8]=Z(" 安全加密 "))],2),p("button",{onClick:O,class:b(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[f(s)?"text-indigo-400":"text-indigo-600"]])},[x[9]||(x[9]=Z(" 取件记录 ")),$(f(rt),{class:"w-4 h-4 ml-1"})],2)],2)],2)]),$(le,{name:"drawer"},{default:Q(()=>[h.value?(C(),L("div",{key:0,class:b(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[f(s)?"bg-gray-900":"bg-white"]])},[p("div",{class:b(["flex justify-between items-center p-6 border-b",[f(s)?"border-gray-700":"border-gray-200"]])},[p("h3",{class:b(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 取件记录 ",2),p("button",{onClick:O,class:b(["hover:text-white transition duration-300",[f(s)?"text-gray-400":"text-gray-800"]])},[$(f(ke),{class:"w-6 h-6"})],2)],2),p("div",ln,[$(Ke,{name:"list",tag:"div",class:"space-y-4"},{default:Q(()=>[(C(!0),L(Je,null,Ye(f(w),_=>(C(),L("div",{key:_.id,class:b(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[f(s)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[p("div",an,[$(f(be),{class:b(["w-10 h-10",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),p("div",cn,[p("p",{class:b(["font-medium text-lg truncate",[f(s)?"text-white":"text-gray-800"]])},j(_.filename),3),p("p",{class:b(["text-sm truncate",[f(s)?"text-gray-400":"text-gray-600"]])},j(_.date)+" · "+j(_.size),3)]),p("div",un,[p("button",{onClick:Y=>M(_),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-indigo-400 text-indigo-400":"hover:bg-indigo-100 text-indigo-600"]])},[$(f(lt),{class:"w-5 h-5"})],10,pn),p("button",{onClick:Y=>q(_),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[$(f(we),{class:"w-5 h-5"})],10,hn),p("button",{onClick:Y=>E(_.id),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[$(f(ut),{class:"w-5 h-5"})],10,dn)])],2))),128))]),_:1})])],2)):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[u.value?(C(),L("div",fn,[p("div",{class:b(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 overflow-hidden",[f(s)?"bg-gray-800":"bg-white"]])},[p("h3",{class:b(["text-2xl font-bold mb-6 truncate",[f(s)?"text-white":"text-gray-800"]])}," 文件详情 ",2),p("div",gn,[p("div",xn,[$(f(be),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[10]||(x[10]=p("span",{class:"font-medium"},"文件名:",-1)),Z(j(u.value.filename),1)],2)]),p("div",kn,[$(f(ht),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[11]||(x[11]=p("span",{class:"font-medium"},"取件日期:",-1)),Z(j(u.value.date),1)],2)]),p("div",bn,[$(f(ct),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[12]||(x[12]=p("span",{class:"font-medium"},"文件大小:",-1)),Z(j(u.value.size),1)],2)]),p("div",wn,[$(f(we),{class:b(["w-6 h-6 mr-3",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([f(s)?"text-gray-300":"text-gray-800"])},x[13]||(x[13]=[p("span",{class:"font-medium"},"文件内容:",-1)]),2),u.value.filename=="Text"?(C(),L("div",mn,[p("button",{onClick:qe,class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 预览内容 ")])):(C(),L("div",yn,[p("a",{href:`${f(t)}${u.value.downloadUrl}`,target:"_blank",rel:"noopener noreferrer",class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 点击下载 ",8,vn)]))])]),p("div",$n,[p("h4",{class:b(["text-lg font-semibold mb-3",[f(s)?"text-white":"text-gray-800"]])}," 取件二维码 ",2),p("div",_n,[$(ot,{value:U(u.value),size:128,level:"M"},null,8,["value"])]),p("p",{class:b(["mt-2 text-sm",[f(s)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)]),p("button",{onClick:x[3]||(x[3]=_=>u.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[J.value?(C(),L("div",Tn,[p("div",{class:b(["p-8 rounded-2xl max-w-3xl w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 max-h-[80vh] overflow-y-auto",[f(s)?"bg-gray-800":"bg-white"]])},[p("div",Rn,[p("h3",{class:b(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 内容预览 ",2),p("button",{onClick:x[4]||(x[4]=_=>J.value=!1),class:"text-gray-500 hover:text-gray-700"},[$(f(ke),{class:"w-6 h-6"})])]),p("div",{class:b(["prose max-w-none",[f(s)?"prose-invert":""]]),innerHTML:je.value},null,10,zn)],2)])):ee("",!0)]),_:1})])}}},jn=Fe(Sn,[["__scopeId","data-v-16bdf5db"]]);export{jn as default}; +Please report this to https://github.com/markedjs/marked.`,e){const s="

An error occurred:

"+z(n.message+"",!0)+"
";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}}const P=new Nt;function m(d,e){return P.parse(d,e)}m.options=m.setOptions=function(d){return P.setOptions(d),m.defaults=P.defaults,Re(m.defaults),m};m.getDefaults=ue;m.defaults=F;m.use=function(...d){return P.use(...d),m.defaults=P.defaults,Re(m.defaults),m};m.walkTokens=function(d,e){return P.walkTokens(d,e)};m.parseInline=P.parseInline;m.Parser=A;m.parser=A.parse;m.Renderer=ie;m.TextRenderer=xe;m.Lexer=S;m.lexer=S.lex;m.Tokenizer=ne;m.Hooks=W;m.parse=m;m.options;m.setOptions;m.use;m.walkTokens;m.parseInline;A.parse;S.lex;const Vt={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},Gt={class:"w-full max-w-md relative z-10"},Wt={class:"p-8"},Xt={class:"flex justify-center mb-8"},Kt={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},Jt={class:"rounded-full bg-gray-900 p-2"},Yt={class:"mb-6 relative"},en={class:"relative"},tn=["readonly"],nn={key:0,class:"absolute inset-y-0 right-0 flex items-center pr-3"},sn=["disabled"],rn={class:"flex items-center justify-center relative z-10"},on={class:"mt-6 text-center"},ln={class:"flex-grow overflow-y-auto p-6"},an={class:"flex-shrink-0 mr-4"},cn={class:"flex-grow min-w-0 mr-4"},un={class:"flex-shrink-0 flex space-x-2"},pn=["onClick"],hn=["onClick"],dn=["onClick"],fn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},gn={class:"space-y-4"},xn={class:"flex items-center"},kn={class:"flex items-center"},wn={class:"flex items-center"},bn={class:"flex items-center"},mn={key:0,class:"ml-2"},yn={key:1},vn=["href"],$n={class:"mt-6 flex flex-col items-center"},_n={class:"bg-white p-2 rounded-lg shadow-md"},Tn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Rn={class:"flex justify-between items-center mb-4"},zn=["innerHTML"],Sn={__name:"RetrievewFileView",setup(d){const e=Ze(),t=window.location.origin,n=et(),s=tt("isDarkMode"),i=st(),{receiveData:r}=Oe(i),o=D(""),a=D({readonly:!1,loading:!1}),c=D(!1),l=D(""),u=D(null),h=D(!1),g=We(),b=r,T=JSON.parse(localStorage.getItem("config")||"{}");Ue(()=>{const k=g.query.code;k&&(o.value=k)}),Qe(o,k=>{k.length===5&&R()});const R=async()=>{if(o.value.length!==5){e.showAlert("请输入5位取件码","error");return}a.value.readonly=!0,a.value.loading=!0;try{const k=await nt.post("share/select/",{code:o.value});if(k.code===200)if(k.detail){const x=k.detail.text.startsWith("share/download")||k.detail.name!=="Text",I={id:Date.now(),code:k.detail.code,filename:k.detail.name,size:B(k.detail.size),downloadUrl:x?k.detail.text:null,content:x?null:k.detail.text,date:new Date().toLocaleString()};let _=!0;i.receiveData.forEach(Y=>{if(Y.code===I.code){_=!1;return}}),_&&i.addReceiveData(I),x?u.value=I:(u.value=I,J.value=!0),e.showAlert("文件获取成功","success")}else e.showAlert("无效的取件码","error");else e.showAlert(k.detail||"获取文件失败","error")}catch(k){e.showAlert(`取件失败,请稍后重试:${k.response.data.detail}`,"error")}finally{a.value.readonly=!1,a.value.loading=!1,o.value=""}},B=k=>{if(k===0)return"0 Bytes";const x=1024,I=["Bytes","KB","MB","GB","TB"],_=Math.floor(Math.log(k)/Math.log(x));return parseFloat((k/Math.pow(x,_)).toFixed(2))+" "+I[_]},M=k=>{u.value=k},E=k=>{const x=b.value.findIndex(I=>I.id===k);x!==-1&&i.deleteReceiveData(x)},O=()=>{h.value=!h.value},oe=()=>{n.push("send")},U=k=>k.downloadUrl?`${t}${k.downloadUrl}`:`${t}?code=${k.code}`,q=k=>{if(console.log(k),k.downloadUrl)window.open(`${k.downloadUrl.startsWith("http")?"":t}${k.downloadUrl}`,"_blank");else if(k.content){const x=new Blob([k.content],{type:"text/plain;charset=utf-8"});dt.saveAs(x,`${k.filename}.txt`)}},J=D(!1),je=He(()=>u.value&&u.value.content?m(u.value.content):""),qe=()=>{J.value=!0};return(k,x)=>{const I=Xe("router-link");return C(),L("div",Vt,[p("div",Gt,[p("div",{class:w(["rounded-3xl shadow-2xl overflow-hidden border transform transition-all duration-300",[f(s)?"bg-gray-800 bg-opacity-50 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[p("div",Wt,[p("div",Xt,[p("div",Kt,[p("div",Jt,[$(f(at),{class:"w-8 h-8 text-white"})])])]),p("h2",{onClick:oe,class:w(["text-3xl cursor-pointer font-extrabold text-center mb-6",[f(s)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]])},j(f(T).name),3),p("form",{onSubmit:Ne(R,["prevent"])},[p("div",Yt,[p("label",{for:"code",class:w(["block text-sm font-medium mb-2",[f(s)?"text-gray-300":"text-gray-800"]])},"取件码",2),p("div",en,[Ve(p("input",{id:"code","onUpdate:modelValue":x[0]||(x[0]=_=>o.value=_),type:"text",class:w(["w-full px-4 py-3 rounded-lg placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 pr-10",[f(s)?"bg-gray-700 bg-opacity-50":"bg-gray-100",{"ring-2 ring-red-500":l.value},f(s)?"text-gray-300":"text-gray-800"]]),placeholder:"请输入5位取件码",required:"",readonly:a.value.readonly,maxlength:"5",onFocus:x[1]||(x[1]=_=>c.value=!0),onBlur:x[2]||(x[2]=_=>c.value=!1)},null,42,tn),[[Ge,o.value]]),a.value.loading?(C(),L("div",nn,x[5]||(x[5]=[p("span",{class:"animate-spin rounded-full h-5 w-5 border-b-2 border-indigo-500"},null,-1)]))):ee("",!0)]),p("div",{class:w(["absolute -bottom-0.5 left-2 h-0.5 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 transition-all duration-300 ease-in-out",{"w-97-100":c.value,"w-0":!c.value}])},null,2)]),p("button",{type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-3 px-4 rounded-lg hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group",disabled:a.value.loading},[p("span",rn,[p("span",null,j(a.value.loading?"处理中...":"提取文件"),1),$(f(pt),{class:"w-5 h-5 ml-2 transition-transform duration-300 transform group-hover:translate-x-1"})]),x[6]||(x[6]=p("span",{class:"absolute top-0 left-0 w-full h-full bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"},null,-1))],8,sn)],32),p("div",on,[$(I,{to:"/send",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:Q(()=>x[7]||(x[7]=[Z(" 需要发送文件?点击这里 ")])),_:1})])]),p("div",{class:w(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[f(s)?"bg-gray-800":"bg-gray-100"]])},[p("span",{class:w(["text-sm flex items-center",[f(s)?"text-gray-300":"text-gray-800"]])},[$(f(it),{class:"w-4 h-4 mr-1 text-green-400"}),x[8]||(x[8]=Z(" 安全加密 "))],2),p("button",{onClick:O,class:w(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[f(s)?"text-indigo-400":"text-indigo-600"]])},[x[9]||(x[9]=Z(" 取件记录 ")),$(f(rt),{class:"w-4 h-4 ml-1"})],2)],2)],2)]),$(le,{name:"drawer"},{default:Q(()=>[h.value?(C(),L("div",{key:0,class:w(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[f(s)?"bg-gray-900":"bg-white"]])},[p("div",{class:w(["flex justify-between items-center p-6 border-b",[f(s)?"border-gray-700":"border-gray-200"]])},[p("h3",{class:w(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 取件记录 ",2),p("button",{onClick:O,class:w(["hover:text-white transition duration-300",[f(s)?"text-gray-400":"text-gray-800"]])},[$(f(ke),{class:"w-6 h-6"})],2)],2),p("div",ln,[$(Ke,{name:"list",tag:"div",class:"space-y-4"},{default:Q(()=>[(C(!0),L(Je,null,Ye(f(b),_=>(C(),L("div",{key:_.id,class:w(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[f(s)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[p("div",an,[$(f(we),{class:w(["w-10 h-10",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),p("div",cn,[p("p",{class:w(["font-medium text-lg truncate",[f(s)?"text-white":"text-gray-800"]])},j(_.filename),3),p("p",{class:w(["text-sm truncate",[f(s)?"text-gray-400":"text-gray-600"]])},j(_.date)+" · "+j(_.size),3)]),p("div",un,[p("button",{onClick:Y=>M(_),class:w(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-indigo-400 text-indigo-400":"hover:bg-indigo-100 text-indigo-600"]])},[$(f(lt),{class:"w-5 h-5"})],10,pn),p("button",{onClick:Y=>q(_),class:w(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[$(f(be),{class:"w-5 h-5"})],10,hn),p("button",{onClick:Y=>E(_.id),class:w(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[$(f(ut),{class:"w-5 h-5"})],10,dn)])],2))),128))]),_:1})])],2)):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[u.value?(C(),L("div",fn,[p("div",{class:w(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 overflow-hidden",[f(s)?"bg-gray-800":"bg-white"]])},[p("h3",{class:w(["text-2xl font-bold mb-6 truncate",[f(s)?"text-white":"text-gray-800"]])}," 文件详情 ",2),p("div",gn,[p("div",xn,[$(f(we),{class:w(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:w([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[10]||(x[10]=p("span",{class:"font-medium"},"文件名:",-1)),Z(j(u.value.filename),1)],2)]),p("div",kn,[$(f(ht),{class:w(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:w([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[11]||(x[11]=p("span",{class:"font-medium"},"取件日期:",-1)),Z(j(u.value.date),1)],2)]),p("div",wn,[$(f(ct),{class:w(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:w([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[12]||(x[12]=p("span",{class:"font-medium"},"文件大小:",-1)),Z(j(u.value.size),1)],2)]),p("div",bn,[$(f(be),{class:w(["w-6 h-6 mr-3",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:w([f(s)?"text-gray-300":"text-gray-800"])},x[13]||(x[13]=[p("span",{class:"font-medium"},"文件内容:",-1)]),2),u.value.filename=="Text"?(C(),L("div",mn,[p("button",{onClick:qe,class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 预览内容 ")])):(C(),L("div",yn,[p("a",{href:`${f(t)}${u.value.downloadUrl}`,target:"_blank",rel:"noopener noreferrer",class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 点击下载 ",8,vn)]))])]),p("div",$n,[p("h4",{class:w(["text-lg font-semibold mb-3",[f(s)?"text-white":"text-gray-800"]])}," 取件二维码 ",2),p("div",_n,[$(ot,{value:U(u.value),size:128,level:"M"},null,8,["value"])]),p("p",{class:w(["mt-2 text-sm",[f(s)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)]),p("button",{onClick:x[3]||(x[3]=_=>u.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[J.value?(C(),L("div",Tn,[p("div",{class:w(["p-8 rounded-2xl max-w-3xl w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 max-h-[80vh] overflow-y-auto",[f(s)?"bg-gray-800":"bg-white"]])},[p("div",Rn,[p("h3",{class:w(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 内容预览 ",2),p("button",{onClick:x[4]||(x[4]=_=>J.value=!1),class:"text-gray-500 hover:text-gray-700"},[$(f(ke),{class:"w-6 h-6"})])]),p("div",{class:w(["prose max-w-none",[f(s)?"prose-invert":""]]),innerHTML:je.value},null,10,zn)],2)])):ee("",!0)]),_:1})])}}},jn=Fe(Sn,[["__scopeId","data-v-0d2ae864"]]);export{jn as default}; diff --git a/themes/2024/assets/SendFileView-BR8DiYNn.js b/themes/2024/assets/SendFileView-BR8DiYNn.js deleted file mode 100644 index 856dba5..0000000 --- a/themes/2024/assets/SendFileView-BR8DiYNn.js +++ /dev/null @@ -1,26 +0,0 @@ -import{c as L,d as ce,r as I,o as de,w as Te,a as S,b as z,e,_ as ue,u as ge,f as Ie,n as l,g as t,t as M,h as H,i as m,j as R,k as j,l as Q,v as se,T as J,m as Ae,F as oe,p as re,q,X as ae,s as De,x as $e,y as B,z as Pe,A as Fe}from"./index-B2REZq7f.js";import{u as Ue,S as ne,C as Re,Q as je,E as Be}from"./fileData-D0vhoF43.js";import{F as le}from"./file-vEntDFgk.js";import{T as Le}from"./trash-6hUac_7h.js";/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const K=L("ClipboardCopyIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ve=L("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ee=L("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const He=L("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qe=L("TerminalIcon",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),Ne=ce({__name:"BorderProgressBar",props:{progress:{}},setup(k){const v=k,$=I(null),o=I(null);let u=null;const _=()=>{if(!u||!o.value||!$.value)return;const g=$.value.clientWidth,f=$.value.clientHeight;o.value.width=g,o.value.height=f;const c=4,a=8;u.lineWidth=c;const y=u.createLinearGradient(0,0,g,f);y.addColorStop(0,"#4f46e5"),y.addColorStop(.5,"#7c3aed"),y.addColorStop(1,"#db2777"),u.strokeStyle="rgba(229, 231, 235, 0.2)",h(u,c/2,c/2,g-c,f-c,a),u.stroke();const C=((g+f)*2-8*a+2*Math.PI*a)*v.progress/100;u.strokeStyle=y,u.lineCap="round",u.lineJoin="round",u.beginPath();let i=C;const x=c/2,T=g-c,P=f-c;if(i>0){const p=Math.min(T-2*a,i);u.moveTo(a+x,x),u.lineTo(p+a+x,x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(T-a+x,a+x,a,-Math.PI/2,p-Math.PI/2,!1),i-=p*a}if(i>0){const p=Math.min(P-2*a,i);u.lineTo(T+x,p+a+x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(T-a+x,P-a+x,a,0,p,!1),i-=p*a}if(i>0){const p=Math.min(T-2*a,i);u.lineTo(T-p-a+x,P+x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(a+x,P-a+x,a,Math.PI/2,Math.PI/2+p,!1),i-=p*a}if(i>0){const p=Math.min(P-2*a,i);u.lineTo(x,P-p-a+x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(a+x,a+x,a,Math.PI,Math.PI+p,!1)}u.stroke()};function h(g,f,c,a,y,b){g.beginPath(),g.moveTo(f+b,c),g.lineTo(f+a-b,c),g.arcTo(f+a,c,f+a,c+b,b),g.lineTo(f+a,c+y-b),g.arcTo(f+a,c+y,f+a-b,c+y,b),g.lineTo(f+b,c+y),g.arcTo(f,c+y,f,c+y-b,b),g.lineTo(f,c+b),g.arcTo(f,c,f+b,c,b),g.closePath()}return de(()=>{o.value&&(u=o.value.getContext("2d"),_())}),Te(()=>v.progress,_),(g,f)=>(S(),z("div",{class:"border-progress-container",ref_key:"container",ref:$},[e("canvas",{ref_key:"canvas",ref:o,class:"border-progress-canvas"},null,512)],512))}}),We=ue(Ne,[["__scopeId","data-v-2fbf5085"]]),Y=async(k,v={})=>{const{successMsg:$="复制成功",errorMsg:o="复制失败,请手动复制",showMsg:u=!0}=v,_=ge();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(k),u&&_.showAlert($,"success"),!0;const h=document.createElement("textarea");h.value=k,h.style.position="fixed",h.style.opacity="0",document.body.appendChild(h),h.select();const g=document.execCommand("copy");if(document.body.removeChild(h),g)return u&&_.showAlert($,"success"),!0;throw new Error("execCommand copy failed")}catch(h){return console.error("复制失败:",h),u&&_.showAlert(o,"error"),!1}},X=async k=>{const v=`${window.location.origin}/#/?code=${k}`;return Y(v,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},Ge=async k=>Y(k,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),Oe=async k=>{const v=`wget ${window.location.origin}/share/select?code=${k}`;return Y(v,{successMsg:"wget命令已复制到剪贴板",errorMsg:"复制失败,请手动复制wget命令"})},ie=k=>k>=1024*1024*1024?Math.round(k/(1024*1024*1024))+"GB":k>=1024*1024?Math.round(k/(1024*1024))+"MB":Math.round(k/1024)+"KB",Qe={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},Je={class:"p-8"},Ke={class:"flex justify-center space-x-4 mb-6"},Xe={key:0,class:"absolute inset-0 w-full h-full"},Ye={class:"block truncate"},Ze={key:"text",class:"grid grid-cols-1 gap-8"},et={key:0,class:"flex flex-col"},tt={class:"flex flex-col space-y-4"},st=["value"],ot={key:0,class:"flex items-center space-x-2"},rt={class:"relative flex-grow"},at=["placeholder"],nt={type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-4 px-6 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition-all duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group"},lt={class:"relative z-10 flex items-center justify-center text-lg"},it={class:"mt-6 text-center"},ct={class:"flex-grow overflow-y-auto p-6"},dt={class:"flex-shrink-0 mr-4"},ut={class:"flex-grow min-w-0 mr-4"},gt={class:"flex-shrink-0 flex space-x-2"},pt=["onClick"],ht=["onClick"],ft=["onClick"],mt={key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-3 sm:p-4 overflow-y-auto"},xt={class:"flex items-center justify-between"},vt={class:"p-4 sm:p-6"},yt={class:"bg-gray-50 dark:bg-gray-800/50 rounded-xl p-3 sm:p-4 mb-4 sm:mb-6"},bt={class:"flex items-center mb-3 sm:mb-4"},wt={class:"ml-3 sm:ml-4"},kt={class:"grid grid-cols-2 gap-3 sm:gap-4"},_t={class:"flex items-center"},Ct={class:"flex items-center"},Mt={class:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6"},St={class:"space-y-3 sm:space-y-4"},zt={class:"bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl p-4 sm:p-5 text-white"},Tt={class:"flex items-center justify-between mb-3 sm:mb-4"},It={class:"text-2xl sm:text-3xl font-bold tracking-wider text-center"},At={class:"bg-gray-50 dark:bg-gray-800/50 rounded-xl p-3 sm:p-4"},Dt={class:"flex items-center justify-between mb-2 sm:mb-3"},$t={class:"bg-gray-50 dark:bg-gray-800/50 rounded-xl p-4 sm:p-5 flex flex-col items-center"},Pt={class:"bg-white p-3 sm:p-4 rounded-lg shadow-sm mb-3 sm:mb-4"},Ft=ce({__name:"SendFileView",setup(k){const v=JSON.parse(localStorage.getItem("config")||"{}"),$=Fe(),o=$e("isDarkMode"),u=Ue(),_=I("file"),h=I(null),g=I(""),f=I(null),c=I("day"),a=I("1"),y=I(0),b=I(!1),C=I(null),i=ge(),x=Ie(()=>u.shareData),T=I(""),P=()=>{var n;(n=f.value)==null||n.click()},p=async n=>{const s=n.target;if(s.files&&s.files.length>0){const d=s.files[0];if(h.value=d,!G())return;T.value=await N(d),console.log(T.value)}},pe=async n=>{var s;if((s=n.dataTransfer)!=null&&s.files&&n.dataTransfer.files.length>0){const d=n.dataTransfer.files[0];if(h.value=d,!G())return;T.value=await N(d)}},he=async n=>{var d;const s=(d=n.clipboardData)==null?void 0:d.items;if(s){for(const r of s)if(r.kind==="file"){const w=r.getAsFile();if(w){if(h.value=w,!G())return;T.value=await N(w),i.showAlert("已从剪贴板添加文件:"+w.name,"success");break}}}},N=async n=>new Promise(s=>{const r=new FileReader;let w=0;const A=Math.ceil(n.size/2097152);r.onload=async F=>{const D=new Uint8Array(F.target.result),V=await crypto.subtle.digest("SHA-256",D),O=Array.from(new Uint8Array(V)).map(E=>E.toString(16).padStart(2,"0")).join("");w++,w{const F=w*2097152,D=F+2097152>=n.size?n.size:F+2097152;r.readAsArrayBuffer(n.slice(F,D))};U()}),fe=(n=c.value)=>{switch(n){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},W=(n=c.value)=>{switch(n){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},me=async n=>{var s,d;try{const w=Math.ceil(n.size/5242880),A=await B.post("/chunk/upload/init/",{file_name:n.name,file_size:n.size,chunk_size:5242880,file_hash:T.value});if(A.code!==200)throw new Error("初始化切片上传失败");if(A.detail.existed)return A;const U=A.detail.upload_id;for(let D=0;D{const ze=Math.round((D*5242880+Se.loaded)*100/n.size);y.value=ze}})).code!==200)throw new Error(`切片 ${D} 上传失败`)}const F=await B.post(`/chunk/upload/complete/${U}`,{expire_value:a.value?parseInt(a.value):1,expire_style:c.value});if(F.code!==200)throw new Error("完成上传失败");return F}catch(r){throw console.error("切片上传失败:",r),(d=(s=r.response)==null?void 0:s.data)!=null&&d.detail?i.showAlert(r.response.data.detail,"error"):i.showAlert("上传失败,请稍后重试","error"),r}},xe=async n=>{const s=new FormData,d={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:w=>{const A=Math.round(w.loaded*100/w.total);y.value=A}};return s.append("file",n),s.append("expire_value",a.value),s.append("expire_style",c.value),await B.post("/share/file/",s,d)},ve=()=>v.openUpload===0&&localStorage.getItem("token")===null?(i.showAlert("游客上传功能已关闭","error"),!1):!0,ye=n=>n.size>v.uploadSize?(i.showAlert(`文件大小超过限制 (${ie(v.uploadSize)})`,"error"),h.value=null,!1):!0,Z=(n,s)=>{if(n==="forever"||n==="count")return!0;const d=v.max_save_seconds||0;if(d===0)return!0;let r=0;switch(n){case"minute":r=parseInt(s)*60;break;case"hour":r=parseInt(s)*3600;break;case"day":r=parseInt(s)*86400;break;default:return!1}return r<=d},G=()=>!(!ve()||!ye(h.value)||!Z(c.value,a.value)),be=async()=>{var n,s;if(_.value==="file"&&!h.value){i.showAlert("请选择要上传的文件","error");return}if(_.value==="text"&&!g.value.trim()){i.showAlert("请输入要发送的文本","error");return}if(c.value!=="forever"&&!a.value){i.showAlert("请输入过期值","error");return}if(!Z(c.value,a.value)){const d=Math.floor(v.max_save_seconds/86400);i.showAlert(`过期时间不能超过${d}天`,"error");return}try{let d;if(_.value==="file")v.enableChunk?d=await me(h.value):d=await xe(h.value);else{const r=new FormData;r.append("text",g.value),r.append("expire_value",a.value),r.append("expire_style",c.value),d=await B.post("/share/text/",r,{headers:{"Content-Type":"multipart/form-data"}})}if(d&&d.code===200){const r=d.detail.code,w=d.detail.name,A={id:Date.now(),filename:w,date:new Date().toISOString().split("T")[0],size:_.value==="text"?`${(g.value.length/1024).toFixed(2)} KB`:`${(h.value.size/(1024*1024)).toFixed(1)} MB`,expiration:c.value==="forever"?"永久":`${a.value}${W()}后过期`,retrieveCode:r};u.addShareData(A),i.showAlert(`文件发送成功!取件码:${r}`,"success"),h.value=null,g.value="",a.value="",y.value=0,C.value=A,await X(r)}else throw new Error("服务器响应异常")}catch(d){console.error("发送失败:",d),(s=(n=d.response)==null?void 0:n.data)!=null&&s.detail?i.showAlert(d.response.data.detail,"error"):i.showAlert("发送失败,请稍后重试","error")}finally{y.value=0}},we=()=>{$.push("/")},ee=()=>{b.value=!b.value},ke=n=>{C.value=n},_e=n=>{const s=u.shareData.findIndex(d=>d.id===n);s!==-1&&u.deleteShareData(s)},Ce=window.location.origin+"/#/",Me=n=>`${Ce}?code=${n.retrieveCode}`;return de(()=>{console.log("SendFileView mounted")}),(n,s)=>{const d=Pe("router-link");return S(),z("div",Qe,[e("div",{class:l(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[t(o)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[e("div",Je,[e("h2",{class:l(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[t(o)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:we},M(t(v).name),3),e("form",{onSubmit:H(be,["prevent"]),class:"space-y-8"},[e("div",Ke,[e("button",{type:"button",onClick:s[0]||(s[0]=r=>_.value="file"),class:l(["px-4 py-2 rounded-lg",_.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),e("button",{type:"button",onClick:s[1]||(s[1]=r=>_.value="text"),class:l(["px-4 py-2 rounded-lg",_.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),m(J,{name:"fade",mode:"out-in"},{default:R(()=>[_.value==="file"?(S(),z("div",{key:"file",class:"grid grid-cols-1 gap-8",onPaste:H(he,["prevent"])},[e("div",{class:l(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[t(o)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:P,onDragover:s[2]||(s[2]=H(()=>{},["prevent"])),onDrop:H(pe,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:p,ref_key:"fileInput",ref:f},null,544),y.value>0?(S(),z("div",Xe,[m(We,{progress:y.value},null,8,["progress"])])):j("",!0),m(t(Ee),{class:l(["w-16 h-16 transition-colors duration-300",t(o)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),e("p",{class:l(["mt-4 text-sm transition-colors duration-300 w-full text-center",t(o)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Ye,M(h.value?h.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:l(["mt-2 text-xs",t(o)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+M(t(ie)(t(v).uploadSize)),3)],34)],32)):(S(),z("div",Ze,[_.value==="text"?(S(),z("div",et,[Q(e("textarea",{id:"text-content","onUpdate:modelValue":s[3]||(s[3]=r=>g.value=r),rows:"7",class:l(["flex-grow px-4 py-3 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 resize-none",t(o)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[se,g.value]])])):j("",!0)]))]),_:1}),e("div",tt,[e("label",{class:l(["text-sm font-medium",t(o)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),Q(e("select",{"onUpdate:modelValue":s[4]||(s[4]=r=>c.value=r),class:l(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",t(o)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(S(!0),z(oe,null,re(t(v).expireStyle,r=>(S(),z("option",{value:r,key:r},M(W(r)),9,st))),128))],2),[[Ae,c.value]]),c.value!=="forever"?(S(),z("div",ot,[e("div",rt,[Q(e("input",{"onUpdate:modelValue":s[5]||(s[5]=r=>a.value=r),type:"number",placeholder:fe(),class:l(["w-full px-4 py-2 pr-16 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500",t(o)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,at),[[se,a.value]]),e("span",{class:l(["absolute right-3 top-1/2 transform -translate-y-1/2",t(o)?"text-gray-300":"text-gray-700"])},M(W()),3)])])):j("",!0)]),e("button",nt,[s[11]||(s[11]=e("span",{class:"absolute top-0 left-0 w-full h-full bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300"},null,-1)),e("span",lt,[m(t(He),{class:"w-6 h-6 mr-2"}),s[10]||(s[10]=e("span",null,"安全寄送",-1))])])],32),e("div",it,[m(d,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:R(()=>s[12]||(s[12]=[q(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:l(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[t(o)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:l(["text-sm flex items-center",[t(o)?"text-gray-300":"text-gray-800"]])},[m(t(ne),{class:"w-4 h-4 mr-1 text-green-400"}),s[13]||(s[13]=q(" 安全加密 "))],2),e("button",{onClick:ee,class:l(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[t(o)?"text-indigo-400":"text-indigo-600"]])},[s[14]||(s[14]=q(" 发件记录 ")),m(t(Re),{class:"w-4 h-4 ml-1"})],2)],2)],2),m(J,{name:"drawer"},{default:R(()=>[b.value?(S(),z("div",{key:0,class:l(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[t(o)?"bg-gray-900":"bg-white"]])},[e("div",{class:l(["flex justify-between items-center p-6 border-b",[t(o)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:l(["text-2xl font-bold",[t(o)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:ee,class:l(["hover:text-white transition duration-300",[t(o)?"text-gray-400":"text-gray-800"]])},[m(t(ae),{class:"w-6 h-6"})],2)],2),e("div",ct,[m(De,{name:"list",tag:"div",class:"space-y-4"},{default:R(()=>[(S(!0),z(oe,null,re(x.value,r=>(S(),z("div",{key:r.id,class:l(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[t(o)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",dt,[m(t(le),{class:l(["w-10 h-10",[t(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",ut,[e("p",{class:l(["font-medium text-lg truncate",[t(o)?"text-white":"text-gray-800"]])},M(r.filename?r.filename:"Text"),3),e("p",{class:l(["text-sm truncate",[t(o)?"text-gray-400":"text-gray-600"]])},M(r.date)+" · "+M(r.size),3)]),e("div",gt,[e("button",{onClick:w=>t(X)(r.retrieveCode),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(o)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[m(t(K),{class:"w-5 h-5"})],10,pt),e("button",{onClick:w=>ke(r),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(o)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[m(t(Be),{class:"w-5 h-5"})],10,ht),e("button",{onClick:w=>_e(r.id),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(o)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[m(t(Le),{class:"w-5 h-5"})],10,ft)])],2))),128))]),_:1})])],2)):j("",!0)]),_:1}),m(J,{name:"fade"},{default:R(()=>[C.value?(S(),z("div",mt,[e("div",{class:l(["w-full max-w-2xl rounded-2xl shadow-2xl transform transition-all duration-300 ease-out overflow-hidden",[t(o)?"bg-gray-900":"bg-white"]])},[e("div",{class:l(["px-4 sm:px-6 py-3 sm:py-4 border-b",[t(o)?"border-gray-800":"border-gray-100"]])},[e("div",xt,[e("h3",{class:l(["text-lg sm:text-xl font-semibold",[t(o)?"text-white":"text-gray-900"]])}," 文件详情 ",2),e("button",{onClick:s[6]||(s[6]=r=>C.value=null),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[m(t(ae),{class:l(["w-4 h-4 sm:w-5 sm:h-5",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])])],2),e("div",vt,[e("div",yt,[e("div",bt,[e("div",{class:l(["p-2 sm:p-3 rounded-lg",[t(o)?"bg-gray-800":"bg-white"]])},[m(t(le),{class:l(["w-5 h-5 sm:w-6 sm:h-6",[t(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2),e("div",wt,[e("h4",{class:l(["font-medium text-sm sm:text-base",[t(o)?"text-white":"text-gray-900"]])},M(C.value.filename),3),e("p",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-400":"text-gray-500"]])},M(C.value.size)+" · "+M(C.value.date),3)])]),e("div",kt,[e("div",_t,[m(t(Ve),{class:l(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),e("span",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-300":"text-gray-600"]])},M(C.value.expiration),3)]),e("div",Ct,[m(t(ne),{class:l(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),e("span",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-300":"text-gray-600"]])}," 安全加密 ",2)])])]),e("div",Mt,[e("div",St,[e("div",zt,[e("div",Tt,[s[15]||(s[15]=e("h4",{class:"font-medium text-sm sm:text-base"},"取件码",-1)),e("button",{onClick:s[7]||(s[7]=r=>t(Ge)(C.value.retrieveCode)),class:"p-1.5 sm:p-2 rounded-full hover:bg-white/10 transition-colors"},[m(t(K),{class:"w-4 h-4 sm:w-5 sm:h-5"})])]),e("p",It,M(C.value.retrieveCode),1)]),e("div",At,[e("div",Dt,[e("h4",{class:l(["font-medium text-sm sm:text-base flex items-center",[t(o)?"text-white":"text-gray-900"]])},[m(t(qe),{class:"w-4 h-4 sm:w-5 sm:h-5 mr-1.5 sm:mr-2 text-indigo-500"}),s[16]||(s[16]=q(" wget下载 "))],2),e("button",{onClick:s[8]||(s[8]=r=>t(Oe)(C.value.retrieveCode)),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"},[m(t(K),{class:l(["w-4 h-4 sm:w-5 sm:h-5",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])]),e("p",{class:l(["text-xs sm:text-sm font-mono break-all",[t(o)?"text-gray-300":"text-gray-600"]])}," 点击复制wget命令 ",2)])]),e("div",$t,[e("div",Pt,[m(je,{value:Me(C.value),size:140,level:"M",class:"sm:w-[160px] sm:h-[160px]"},null,8,["value"])]),e("p",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-400":"text-gray-500"]])}," 扫描二维码快速取件 ",2)])])]),e("div",{class:l(["px-4 sm:px-6 py-3 sm:py-4 border-t",[t(o)?"border-gray-800":"border-gray-100"]])},[e("button",{onClick:s[9]||(s[9]=r=>t(X)(C.value.retrieveCode)),class:"w-full bg-indigo-600 hover:bg-indigo-700 text-white px-4 sm:px-6 py-2 sm:py-3 rounded-lg text-sm sm:text-base font-medium transition-colors"}," 复制取件链接 ")],2)],2)])):j("",!0)]),_:1})])}}}),Vt=ue(Ft,[["__scopeId","data-v-48e09ed3"]]);export{Vt as default}; diff --git a/themes/2024/assets/SendFileView-DBPnDoZR.js b/themes/2024/assets/SendFileView-DBPnDoZR.js new file mode 100644 index 0000000..1f7865a --- /dev/null +++ b/themes/2024/assets/SendFileView-DBPnDoZR.js @@ -0,0 +1,26 @@ +import{c as L,d as ce,r as I,o as de,w as Te,a as S,b as z,e,_ as ue,u as ge,f as Ie,n as l,g as t,t as M,h as H,i as m,j as R,k as j,l as Q,v as se,T as J,m as Ae,F as oe,p as re,q,X as ae,s as De,x as $e,y as B,z as Pe,A as Fe}from"./index-YD9XVcaL.js";import{u as Ue,S as ne,C as Re,Q as je,E as Be}from"./fileData-DwFxbdR7.js";import{F as le}from"./file-DnnQU8q_.js";import{T as Le}from"./trash-hKmESNHA.js";/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const K=L("ClipboardCopyIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ve=L("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ee=L("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const He=L("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qe=L("TerminalIcon",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),Ne=ce({__name:"BorderProgressBar",props:{progress:{}},setup(k){const v=k,$=I(null),o=I(null);let u=null;const _=()=>{if(!u||!o.value||!$.value)return;const g=$.value.clientWidth,f=$.value.clientHeight;o.value.width=g,o.value.height=f;const c=4,a=8;u.lineWidth=c;const y=u.createLinearGradient(0,0,g,f);y.addColorStop(0,"#4f46e5"),y.addColorStop(.5,"#7c3aed"),y.addColorStop(1,"#db2777"),u.strokeStyle="rgba(229, 231, 235, 0.2)",h(u,c/2,c/2,g-c,f-c,a),u.stroke();const C=((g+f)*2-8*a+2*Math.PI*a)*v.progress/100;u.strokeStyle=y,u.lineCap="round",u.lineJoin="round",u.beginPath();let i=C;const x=c/2,T=g-c,P=f-c;if(i>0){const p=Math.min(T-2*a,i);u.moveTo(a+x,x),u.lineTo(p+a+x,x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(T-a+x,a+x,a,-Math.PI/2,p-Math.PI/2,!1),i-=p*a}if(i>0){const p=Math.min(P-2*a,i);u.lineTo(T+x,p+a+x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(T-a+x,P-a+x,a,0,p,!1),i-=p*a}if(i>0){const p=Math.min(T-2*a,i);u.lineTo(T-p-a+x,P+x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(a+x,P-a+x,a,Math.PI/2,Math.PI/2+p,!1),i-=p*a}if(i>0){const p=Math.min(P-2*a,i);u.lineTo(x,P-p-a+x),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/a);u.arc(a+x,a+x,a,Math.PI,Math.PI+p,!1)}u.stroke()};function h(g,f,c,a,y,b){g.beginPath(),g.moveTo(f+b,c),g.lineTo(f+a-b,c),g.arcTo(f+a,c,f+a,c+b,b),g.lineTo(f+a,c+y-b),g.arcTo(f+a,c+y,f+a-b,c+y,b),g.lineTo(f+b,c+y),g.arcTo(f,c+y,f,c+y-b,b),g.lineTo(f,c+b),g.arcTo(f,c,f+b,c,b),g.closePath()}return de(()=>{o.value&&(u=o.value.getContext("2d"),_())}),Te(()=>v.progress,_),(g,f)=>(S(),z("div",{class:"border-progress-container",ref_key:"container",ref:$},[e("canvas",{ref_key:"canvas",ref:o,class:"border-progress-canvas"},null,512)],512))}}),We=ue(Ne,[["__scopeId","data-v-2fbf5085"]]),Y=async(k,v={})=>{const{successMsg:$="复制成功",errorMsg:o="复制失败,请手动复制",showMsg:u=!0}=v,_=ge();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(k),u&&_.showAlert($,"success"),!0;const h=document.createElement("textarea");h.value=k,h.style.position="fixed",h.style.opacity="0",document.body.appendChild(h),h.select();const g=document.execCommand("copy");if(document.body.removeChild(h),g)return u&&_.showAlert($,"success"),!0;throw new Error("execCommand copy failed")}catch(h){return console.error("复制失败:",h),u&&_.showAlert(o,"error"),!1}},X=async k=>{const v=`${window.location.origin}/#/?code=${k}`;return Y(v,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},Ge=async k=>Y(k,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),Oe=async k=>{const v=`wget ${window.location.origin}/share/select?code=${k}`;return Y(v,{successMsg:"wget命令已复制到剪贴板",errorMsg:"复制失败,请手动复制wget命令"})},ie=k=>k>=1024*1024*1024?Math.round(k/(1024*1024*1024))+"GB":k>=1024*1024?Math.round(k/(1024*1024))+"MB":Math.round(k/1024)+"KB",Qe={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},Je={class:"p-8"},Ke={class:"flex justify-center space-x-4 mb-6"},Xe={key:0,class:"absolute inset-0 w-full h-full"},Ye={class:"block truncate"},Ze={key:"text",class:"grid grid-cols-1 gap-8"},et={key:0,class:"flex flex-col"},tt={class:"flex flex-col space-y-4"},st=["value"],ot={key:0,class:"flex items-center space-x-2"},rt={class:"relative flex-grow"},at=["placeholder"],nt={type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-4 px-6 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition-all duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group"},lt={class:"relative z-10 flex items-center justify-center text-lg"},it={class:"mt-6 text-center"},ct={class:"flex-grow overflow-y-auto p-6"},dt={class:"flex-shrink-0 mr-4"},ut={class:"flex-grow min-w-0 mr-4"},gt={class:"flex-shrink-0 flex space-x-2"},pt=["onClick"],ht=["onClick"],ft=["onClick"],mt={key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-3 sm:p-4 overflow-y-auto"},xt={class:"flex items-center justify-between"},vt={class:"p-4 sm:p-6"},yt={class:"bg-gray-50 dark:bg-gray-800/50 rounded-xl p-3 sm:p-4 mb-4 sm:mb-6"},bt={class:"flex items-center mb-3 sm:mb-4"},wt={class:"ml-3 sm:ml-4"},kt={class:"grid grid-cols-2 gap-3 sm:gap-4"},_t={class:"flex items-center"},Ct={class:"flex items-center"},Mt={class:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6"},St={class:"space-y-3 sm:space-y-4"},zt={class:"bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl p-4 sm:p-5 text-white"},Tt={class:"flex items-center justify-between mb-3 sm:mb-4"},It={class:"text-2xl sm:text-3xl font-bold tracking-wider text-center"},At={class:"bg-gray-50 dark:bg-gray-800/50 rounded-xl p-3 sm:p-4"},Dt={class:"flex items-center justify-between mb-2 sm:mb-3"},$t={class:"bg-gray-50 dark:bg-gray-800/50 rounded-xl p-4 sm:p-5 flex flex-col items-center"},Pt={class:"bg-white p-3 sm:p-4 rounded-lg shadow-sm mb-3 sm:mb-4"},Ft=ce({__name:"SendFileView",setup(k){const v=JSON.parse(localStorage.getItem("config")||"{}"),$=Fe(),o=$e("isDarkMode"),u=Ue(),_=I("file"),h=I(null),g=I(""),f=I(null),c=I("day"),a=I("1"),y=I(0),b=I(!1),C=I(null),i=ge(),x=Ie(()=>u.shareData),T=I(""),P=()=>{var n;(n=f.value)==null||n.click()},p=async n=>{const s=n.target;if(s.files&&s.files.length>0){const d=s.files[0];if(h.value=d,!G())return;T.value=await N(d),console.log(T.value)}},pe=async n=>{var s;if((s=n.dataTransfer)!=null&&s.files&&n.dataTransfer.files.length>0){const d=n.dataTransfer.files[0];if(h.value=d,!G())return;T.value=await N(d)}},he=async n=>{var d;const s=(d=n.clipboardData)==null?void 0:d.items;if(s){for(const r of s)if(r.kind==="file"){const w=r.getAsFile();if(w){if(h.value=w,!G())return;T.value=await N(w),i.showAlert("已从剪贴板添加文件:"+w.name,"success");break}}}},N=async n=>new Promise(s=>{const r=new FileReader;let w=0;const A=Math.ceil(n.size/2097152);r.onload=async F=>{const D=new Uint8Array(F.target.result),V=await crypto.subtle.digest("SHA-256",D),O=Array.from(new Uint8Array(V)).map(E=>E.toString(16).padStart(2,"0")).join("");w++,w{const F=w*2097152,D=F+2097152>=n.size?n.size:F+2097152;r.readAsArrayBuffer(n.slice(F,D))};U()}),fe=(n=c.value)=>{switch(n){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},W=(n=c.value)=>{switch(n){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},me=async n=>{var s,d;try{const w=Math.ceil(n.size/5242880),A=await B.post("chunk/upload/init/",{file_name:n.name,file_size:n.size,chunk_size:5242880,file_hash:T.value});if(A.code!==200)throw new Error("初始化切片上传失败");if(A.detail.existed)return A;const U=A.detail.upload_id;for(let D=0;D{const ze=Math.round((D*5242880+Se.loaded)*100/n.size);y.value=ze}})).code!==200)throw new Error(`切片 ${D} 上传失败`)}const F=await B.post(`chunk/upload/complete/${U}`,{expire_value:a.value?parseInt(a.value):1,expire_style:c.value});if(F.code!==200)throw new Error("完成上传失败");return F}catch(r){throw console.error("切片上传失败:",r),(d=(s=r.response)==null?void 0:s.data)!=null&&d.detail?i.showAlert(r.response.data.detail,"error"):i.showAlert("上传失败,请稍后重试","error"),r}},xe=async n=>{const s=new FormData,d={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:w=>{const A=Math.round(w.loaded*100/w.total);y.value=A}};return s.append("file",n),s.append("expire_value",a.value),s.append("expire_style",c.value),await B.post("share/file/",s,d)},ve=()=>v.openUpload===0&&localStorage.getItem("token")===null?(i.showAlert("游客上传功能已关闭","error"),!1):!0,ye=n=>n.size>v.uploadSize?(i.showAlert(`文件大小超过限制 (${ie(v.uploadSize)})`,"error"),h.value=null,!1):!0,Z=(n,s)=>{if(n==="forever"||n==="count")return!0;const d=v.max_save_seconds||0;if(d===0)return!0;let r=0;switch(n){case"minute":r=parseInt(s)*60;break;case"hour":r=parseInt(s)*3600;break;case"day":r=parseInt(s)*86400;break;default:return!1}return r<=d},G=()=>!(!ve()||!ye(h.value)||!Z(c.value,a.value)),be=async()=>{var n,s;if(_.value==="file"&&!h.value){i.showAlert("请选择要上传的文件","error");return}if(_.value==="text"&&!g.value.trim()){i.showAlert("请输入要发送的文本","error");return}if(c.value!=="forever"&&!a.value){i.showAlert("请输入过期值","error");return}if(!Z(c.value,a.value)){const d=Math.floor(v.max_save_seconds/86400);i.showAlert(`过期时间不能超过${d}天`,"error");return}try{let d;if(_.value==="file")v.enableChunk?d=await me(h.value):d=await xe(h.value);else{const r=new FormData;r.append("text",g.value),r.append("expire_value",a.value),r.append("expire_style",c.value),d=await B.post("share/text/",r,{headers:{"Content-Type":"multipart/form-data"}})}if(d&&d.code===200){const r=d.detail.code,w=d.detail.name,A={id:Date.now(),filename:w,date:new Date().toISOString().split("T")[0],size:_.value==="text"?`${(g.value.length/1024).toFixed(2)} KB`:`${(h.value.size/(1024*1024)).toFixed(1)} MB`,expiration:c.value==="forever"?"永久":`${a.value}${W()}后过期`,retrieveCode:r};u.addShareData(A),i.showAlert(`文件发送成功!取件码:${r}`,"success"),h.value=null,g.value="",a.value="",y.value=0,C.value=A,await X(r)}else throw new Error("服务器响应异常")}catch(d){console.error("发送失败:",d),(s=(n=d.response)==null?void 0:n.data)!=null&&s.detail?i.showAlert(d.response.data.detail,"error"):i.showAlert("发送失败,请稍后重试","error")}finally{y.value=0}},we=()=>{$.push("/")},ee=()=>{b.value=!b.value},ke=n=>{C.value=n},_e=n=>{const s=u.shareData.findIndex(d=>d.id===n);s!==-1&&u.deleteShareData(s)},Ce=window.location.origin+"/#/",Me=n=>`${Ce}?code=${n.retrieveCode}`;return de(()=>{console.log("SendFileView mounted")}),(n,s)=>{const d=Pe("router-link");return S(),z("div",Qe,[e("div",{class:l(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[t(o)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[e("div",Je,[e("h2",{class:l(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[t(o)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:we},M(t(v).name),3),e("form",{onSubmit:H(be,["prevent"]),class:"space-y-8"},[e("div",Ke,[e("button",{type:"button",onClick:s[0]||(s[0]=r=>_.value="file"),class:l(["px-4 py-2 rounded-lg",_.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),e("button",{type:"button",onClick:s[1]||(s[1]=r=>_.value="text"),class:l(["px-4 py-2 rounded-lg",_.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),m(J,{name:"fade",mode:"out-in"},{default:R(()=>[_.value==="file"?(S(),z("div",{key:"file",class:"grid grid-cols-1 gap-8",onPaste:H(he,["prevent"])},[e("div",{class:l(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[t(o)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:P,onDragover:s[2]||(s[2]=H(()=>{},["prevent"])),onDrop:H(pe,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:p,ref_key:"fileInput",ref:f},null,544),y.value>0?(S(),z("div",Xe,[m(We,{progress:y.value},null,8,["progress"])])):j("",!0),m(t(Ee),{class:l(["w-16 h-16 transition-colors duration-300",t(o)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),e("p",{class:l(["mt-4 text-sm transition-colors duration-300 w-full text-center",t(o)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Ye,M(h.value?h.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:l(["mt-2 text-xs",t(o)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+M(t(ie)(t(v).uploadSize)),3)],34)],32)):(S(),z("div",Ze,[_.value==="text"?(S(),z("div",et,[Q(e("textarea",{id:"text-content","onUpdate:modelValue":s[3]||(s[3]=r=>g.value=r),rows:"7",class:l(["flex-grow px-4 py-3 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 resize-none",t(o)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[se,g.value]])])):j("",!0)]))]),_:1}),e("div",tt,[e("label",{class:l(["text-sm font-medium",t(o)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),Q(e("select",{"onUpdate:modelValue":s[4]||(s[4]=r=>c.value=r),class:l(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",t(o)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(S(!0),z(oe,null,re(t(v).expireStyle,r=>(S(),z("option",{value:r,key:r},M(W(r)),9,st))),128))],2),[[Ae,c.value]]),c.value!=="forever"?(S(),z("div",ot,[e("div",rt,[Q(e("input",{"onUpdate:modelValue":s[5]||(s[5]=r=>a.value=r),type:"number",placeholder:fe(),class:l(["w-full px-4 py-2 pr-16 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500",t(o)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,at),[[se,a.value]]),e("span",{class:l(["absolute right-3 top-1/2 transform -translate-y-1/2",t(o)?"text-gray-300":"text-gray-700"])},M(W()),3)])])):j("",!0)]),e("button",nt,[s[11]||(s[11]=e("span",{class:"absolute top-0 left-0 w-full h-full bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300"},null,-1)),e("span",lt,[m(t(He),{class:"w-6 h-6 mr-2"}),s[10]||(s[10]=e("span",null,"安全寄送",-1))])])],32),e("div",it,[m(d,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:R(()=>s[12]||(s[12]=[q(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:l(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[t(o)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:l(["text-sm flex items-center",[t(o)?"text-gray-300":"text-gray-800"]])},[m(t(ne),{class:"w-4 h-4 mr-1 text-green-400"}),s[13]||(s[13]=q(" 安全加密 "))],2),e("button",{onClick:ee,class:l(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[t(o)?"text-indigo-400":"text-indigo-600"]])},[s[14]||(s[14]=q(" 发件记录 ")),m(t(Re),{class:"w-4 h-4 ml-1"})],2)],2)],2),m(J,{name:"drawer"},{default:R(()=>[b.value?(S(),z("div",{key:0,class:l(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[t(o)?"bg-gray-900":"bg-white"]])},[e("div",{class:l(["flex justify-between items-center p-6 border-b",[t(o)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:l(["text-2xl font-bold",[t(o)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:ee,class:l(["hover:text-white transition duration-300",[t(o)?"text-gray-400":"text-gray-800"]])},[m(t(ae),{class:"w-6 h-6"})],2)],2),e("div",ct,[m(De,{name:"list",tag:"div",class:"space-y-4"},{default:R(()=>[(S(!0),z(oe,null,re(x.value,r=>(S(),z("div",{key:r.id,class:l(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[t(o)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",dt,[m(t(le),{class:l(["w-10 h-10",[t(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",ut,[e("p",{class:l(["font-medium text-lg truncate",[t(o)?"text-white":"text-gray-800"]])},M(r.filename?r.filename:"Text"),3),e("p",{class:l(["text-sm truncate",[t(o)?"text-gray-400":"text-gray-600"]])},M(r.date)+" · "+M(r.size),3)]),e("div",gt,[e("button",{onClick:w=>t(X)(r.retrieveCode),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(o)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[m(t(K),{class:"w-5 h-5"})],10,pt),e("button",{onClick:w=>ke(r),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(o)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[m(t(Be),{class:"w-5 h-5"})],10,ht),e("button",{onClick:w=>_e(r.id),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(o)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[m(t(Le),{class:"w-5 h-5"})],10,ft)])],2))),128))]),_:1})])],2)):j("",!0)]),_:1}),m(J,{name:"fade"},{default:R(()=>[C.value?(S(),z("div",mt,[e("div",{class:l(["w-full max-w-2xl rounded-2xl shadow-2xl transform transition-all duration-300 ease-out overflow-hidden",[t(o)?"bg-gray-900":"bg-white"]])},[e("div",{class:l(["px-4 sm:px-6 py-3 sm:py-4 border-b",[t(o)?"border-gray-800":"border-gray-100"]])},[e("div",xt,[e("h3",{class:l(["text-lg sm:text-xl font-semibold",[t(o)?"text-white":"text-gray-900"]])}," 文件详情 ",2),e("button",{onClick:s[6]||(s[6]=r=>C.value=null),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[m(t(ae),{class:l(["w-4 h-4 sm:w-5 sm:h-5",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])])],2),e("div",vt,[e("div",yt,[e("div",bt,[e("div",{class:l(["p-2 sm:p-3 rounded-lg",[t(o)?"bg-gray-800":"bg-white"]])},[m(t(le),{class:l(["w-5 h-5 sm:w-6 sm:h-6",[t(o)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2),e("div",wt,[e("h4",{class:l(["font-medium text-sm sm:text-base",[t(o)?"text-white":"text-gray-900"]])},M(C.value.filename),3),e("p",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-400":"text-gray-500"]])},M(C.value.size)+" · "+M(C.value.date),3)])]),e("div",kt,[e("div",_t,[m(t(Ve),{class:l(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),e("span",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-300":"text-gray-600"]])},M(C.value.expiration),3)]),e("div",Ct,[m(t(ne),{class:l(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),e("span",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-300":"text-gray-600"]])}," 安全加密 ",2)])])]),e("div",Mt,[e("div",St,[e("div",zt,[e("div",Tt,[s[15]||(s[15]=e("h4",{class:"font-medium text-sm sm:text-base"},"取件码",-1)),e("button",{onClick:s[7]||(s[7]=r=>t(Ge)(C.value.retrieveCode)),class:"p-1.5 sm:p-2 rounded-full hover:bg-white/10 transition-colors"},[m(t(K),{class:"w-4 h-4 sm:w-5 sm:h-5"})])]),e("p",It,M(C.value.retrieveCode),1)]),e("div",At,[e("div",Dt,[e("h4",{class:l(["font-medium text-sm sm:text-base flex items-center",[t(o)?"text-white":"text-gray-900"]])},[m(t(qe),{class:"w-4 h-4 sm:w-5 sm:h-5 mr-1.5 sm:mr-2 text-indigo-500"}),s[16]||(s[16]=q(" wget下载 "))],2),e("button",{onClick:s[8]||(s[8]=r=>t(Oe)(C.value.retrieveCode)),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"},[m(t(K),{class:l(["w-4 h-4 sm:w-5 sm:h-5",[t(o)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])]),e("p",{class:l(["text-xs sm:text-sm font-mono break-all",[t(o)?"text-gray-300":"text-gray-600"]])}," 点击复制wget命令 ",2)])]),e("div",$t,[e("div",Pt,[m(je,{value:Me(C.value),size:140,level:"M",class:"sm:w-[160px] sm:h-[160px]"},null,8,["value"])]),e("p",{class:l(["text-xs sm:text-sm",[t(o)?"text-gray-400":"text-gray-500"]])}," 扫描二维码快速取件 ",2)])])]),e("div",{class:l(["px-4 sm:px-6 py-3 sm:py-4 border-t",[t(o)?"border-gray-800":"border-gray-100"]])},[e("button",{onClick:s[9]||(s[9]=r=>t(X)(C.value.retrieveCode)),class:"w-full bg-indigo-600 hover:bg-indigo-700 text-white px-4 sm:px-6 py-2 sm:py-3 rounded-lg text-sm sm:text-base font-medium transition-colors"}," 复制取件链接 ")],2)],2)])):j("",!0)]),_:1})])}}}),Vt=ue(Ft,[["__scopeId","data-v-7f2ecb24"]]);export{Vt as default}; diff --git a/themes/2024/assets/SendFileView-DLs2P9Ev.css b/themes/2024/assets/SendFileView-DLs2P9Ev.css new file mode 100644 index 0000000..0090191 --- /dev/null +++ b/themes/2024/assets/SendFileView-DLs2P9Ev.css @@ -0,0 +1 @@ +.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-7f2ecb24],.fade-leave-active[data-v-7f2ecb24]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-7f2ecb24],.fade-leave-to[data-v-7f2ecb24]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-7f2ecb24]{width:30rem}}.fade-enter-to[data-v-7f2ecb24],.fade-leave-from[data-v-7f2ecb24]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-7f2ecb24],.drawer-leave-active[data-v-7f2ecb24]{transition:transform .3s ease}.drawer-enter-from[data-v-7f2ecb24],.drawer-leave-to[data-v-7f2ecb24]{transform:translate(100%)}.list-enter-active[data-v-7f2ecb24],.list-leave-active[data-v-7f2ecb24]{transition:all .5s ease}.list-enter-from[data-v-7f2ecb24],.list-leave-to[data-v-7f2ecb24]{opacity:0;transform:translate(30px)} diff --git a/themes/2024/assets/SendFileView-nTcsxJId.css b/themes/2024/assets/SendFileView-nTcsxJId.css deleted file mode 100644 index 931ed2d..0000000 --- a/themes/2024/assets/SendFileView-nTcsxJId.css +++ /dev/null @@ -1 +0,0 @@ -.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-48e09ed3],.fade-leave-active[data-v-48e09ed3]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-48e09ed3],.fade-leave-to[data-v-48e09ed3]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-48e09ed3]{width:30rem}}.fade-enter-to[data-v-48e09ed3],.fade-leave-from[data-v-48e09ed3]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-48e09ed3],.drawer-leave-active[data-v-48e09ed3]{transition:transform .3s ease}.drawer-enter-from[data-v-48e09ed3],.drawer-leave-to[data-v-48e09ed3]{transform:translate(100%)}.list-enter-active[data-v-48e09ed3],.list-leave-active[data-v-48e09ed3]{transition:all .5s ease}.list-enter-from[data-v-48e09ed3],.list-leave-to[data-v-48e09ed3]{opacity:0;transform:translate(30px)} diff --git a/themes/2024/assets/SystemSettingsView-BkSv8Xom.js b/themes/2024/assets/SystemSettingsView-BkSv8Xom.js new file mode 100644 index 0000000..53c01b1 --- /dev/null +++ b/themes/2024/assets/SystemSettingsView-BkSv8Xom.js @@ -0,0 +1 @@ +import{d as B,r as m,u as M,a as c,b as y,e,n as a,g as l,l as n,v as d,m as x,F as w,p as _,t as b,k as h,x as F,y as k,M as A}from"./index-YD9XVcaL.js";const z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},E={class:"space-y-4"},T={class:"grid grid-cols-1 gap-6"},W={class:"space-y-2"},K={class:"space-y-2"},I={class:"space-y-2"},j={class:"relative"},G={class:"space-y-2"},N={class:"space-y-2"},R=["value"],L={class:"space-y-2"},$={class:"grid grid-cols-1 gap-6 mt-8"},P={class:"space-y-2"},H={class:"space-y-2"},q={class:"space-y-4"},J={class:"space-y-2"},O={class:"space-y-4"},Q={class:"space-y-2"},X={key:0,class:"space-y-2"},Y={class:"flex items-center"},Z=["aria-checked"],ee={key:1,class:"space-y-4"},oe={class:"space-y-2"},re={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},te={class:"space-y-2"},ae={class:"space-y-2"},se={key:2,class:"space-y-4"},le={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ne={class:"space-y-2"},de={class:"space-y-2"},ie={class:"space-y-2"},ue={class:"space-y-2"},ge={class:"space-y-2"},ce={class:"space-y-2"},ye={class:"space-y-2"},be={class:"space-y-2"},pe={class:"flex items-center"},ve=["aria-checked"],me={class:"mt-8"},xe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},he={class:"space-y-2"},fe={class:"flex items-center space-x-2"},we={class:"space-y-2"},_e={class:"flex items-center space-x-2"},ke={class:"space-y-2"},Ue={class:"flex items-center space-x-2"},Se={class:"space-y-2"},Ve={class:"flex flex-wrap gap-3"},Ce=["value"],De={class:"space-y-2"},Be={class:"flex items-center space-x-2"},Me={class:"space-y-2"},Fe={class:"flex items-center"},Ae=["aria-checked"],ze={class:"mt-8"},Ee={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Te={class:"space-y-2"},We={class:"flex items-center space-x-2"},Ke={class:"space-y-2"},Ie={class:"flex items-center space-x-2"},Ne=B({__name:"SystemSettingsView",setup(je){const s=F("isDarkMode"),t=m({name:"",description:"",file_storage:"",webdav_url:"",webdav_username:"",webdav_password:"",themesChoices:[],expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",storage_path:"",notify_content:"",openUpload:1,uploadSize:1,enableChunk:0,uploadMinute:1,max_save_seconds:0,opacity:.9,s3_access_key_id:"",background:"",showAdminAddr:0,page_explain:"",s3_secret_access_key:"",aws_session_token:"",s3_signature_version:"",s3_region_name:"",s3_bucket_name:"",s3_endpoint_url:"",s3_hostname:"",uploadCount:1,errorMinute:1,errorCount:1,s3_proxy:0,themesSelect:""}),p=m(1),v=m("MB"),u=m(1),g=m("天"),U=(i,o)=>i*{秒:1,分:60,时:3600,天:86400}[o],S=()=>{k({url:"admin/config/get",method:"get"}).then(i=>{t.value=i.detail;let o=t.value.uploadSize;o>=1024*1024*1024?(p.value=Math.round(o/(1024*1024*1024)),v.value="GB"):o>=1024*1024?(p.value=Math.round(o/(1024*1024)),v.value="MB"):(p.value=Math.round(o/1024),v.value="KB");let r=t.value.max_save_seconds;r===0?(u.value=7,g.value="天"):r%86400===0&&r>=86400?(u.value=r/86400,g.value="天"):r%3600===0&&r>=3600?(u.value=r/3600,g.value="时"):r%60===0&&r>=60?(u.value=r/60,g.value="分"):(u.value=r,g.value="秒")})},f=M(),V=(i,o)=>i*{KB:1024,MB:1048576,GB:1073741824}[o],C=()=>{const i={...t.value};i.uploadSize=V(p.value,v.value),u.value===0?i.max_save_seconds=7*86400:i.max_save_seconds=U(u.value,g.value),k({url:"admin/config/update",method:"patch",data:i}).then(o=>{o.code==200?f.showAlert("保存成功","success"):f.showAlert(o.message,"error")})};return S(),(i,o)=>(c(),y("div",z,[e("h2",{class:a(["text-2xl font-bold mb-6",[l(s)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:a(["space-y-6 rounded-lg shadow-md p-6",[l(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",E,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",T,[e("div",W,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>t.value.name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.name]])]),e("div",K,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>t.value.description=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.description]])]),e("div",I,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",j,[n(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>t.value.admin_token=r),placeholder:"留空则不修改密码",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.admin_token]]),e("div",{class:a(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[l(s)?"text-gray-500":"text-gray-400"]])},o[32]||(o[32]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",G,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>t.value.keywords=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.keywords]])]),e("div",N,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 主题选择 ",2),n(e("select",{"onUpdate:modelValue":o[4]||(o[4]=r=>t.value.themesSelect=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},[(c(!0),y(w,null,_(t.value.themesChoices,r=>(c(),y("option",{value:r.key,key:r.key},b(r.name)+" (by "+b(r.author)+" V"+b(r.version)+") ",9,R))),128))],2),[[x,t.value.themesSelect]])]),e("div",L,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),n(e("textarea",{"onUpdate:modelValue":o[5]||(o[5]=r=>t.value.robotsText=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.robotsText]])])]),e("div",$,[e("div",P,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[6]||(o[6]=r=>t.value.notify_title=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.notify_title]])]),e("div",H,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),n(e("textarea",{"onUpdate:modelValue":o[7]||(o[7]=r=>t.value.notify_content=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.notify_content]])])]),e("div",q,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",J,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储路径 ",2),n(e("input",{type:"text",placeholder:"留空则使用默认路径,可不填写","onUpdate:modelValue":o[8]||(o[8]=r=>t.value.storage_path=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.storage_path]])]),e("div",O,[e("div",Q,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),n(e("select",{"onUpdate:modelValue":o[9]||(o[9]=r=>t.value.file_storage=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},o[33]||(o[33]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1),e("option",{value:"webdav"},"Webdav 存储",-1)]),2),[[x,t.value.file_storage]])]),t.value.file_storage==="local"?(c(),y("div",X,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题) ",2),e("div",Y,[e("button",{type:"button",onClick:o[10]||(o[10]=r=>t.value.enableChunk=t.value.enableChunk===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.enableChunk===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.enableChunk===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.enableChunk===1?"translate-x-5":"translate-x-0",l(s)&&t.value.enableChunk!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Z),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.enableChunk===1?"已开启":"已关闭"),3)])])):h("",!0),t.value.file_storage==="webdav"?(c(),y("div",ee,[e("div",oe,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav URL ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav URL","onUpdate:modelValue":o[11]||(o[11]=r=>t.value.webdav_url=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_url]])]),e("div",re,[e("div",te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Username ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav Username","onUpdate:modelValue":o[12]||(o[12]=r=>t.value.webdav_username=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_username]])]),e("div",ae,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Password ",2),n(e("input",{type:"password",placeholder:"请输入 Webdav Password","onUpdate:modelValue":o[13]||(o[13]=r=>t.value.webdav_password=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_password]])])])])):h("",!0),t.value.file_storage==="s3"?(c(),y("div",se,[e("div",le,[e("div",ne,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),n(e("input",{type:"text","onUpdate:modelValue":o[14]||(o[14]=r=>t.value.s3_access_key_id=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_access_key_id]])]),e("div",de,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),n(e("input",{type:"password","onUpdate:modelValue":o[15]||(o[15]=r=>t.value.s3_secret_access_key=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_secret_access_key]])]),e("div",ie,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),n(e("input",{type:"text","onUpdate:modelValue":o[16]||(o[16]=r=>t.value.s3_bucket_name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_bucket_name]])]),e("div",ue,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),n(e("input",{type:"text","onUpdate:modelValue":o[17]||(o[17]=r=>t.value.s3_endpoint_url=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_endpoint_url]])]),e("div",ge,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Region Name ",2),n(e("input",{type:"text","onUpdate:modelValue":o[18]||(o[18]=r=>t.value.s3_region_name=r),placeholder:"auto",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_region_name]])]),e("div",ce,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Signature Version ",2),n(e("select",{"onUpdate:modelValue":o[19]||(o[19]=r=>t.value.s3_signature_version=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[34]||(o[34]=[e("option",{value:"s3v2"},"S3v2",-1),e("option",{value:"s3v4"},"S3v4",-1)]),2),[[x,t.value.s3_signature_version]])]),e("div",ye,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Hostname ",2),n(e("input",{type:"text","onUpdate:modelValue":o[20]||(o[20]=r=>t.value.s3_hostname=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_hostname]])]),e("div",be,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 启用代理 ",2),e("div",pe,[e("button",{type:"button",onClick:o[21]||(o[21]=r=>t.value.s3_proxy=t.value.s3_proxy===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.s3_proxy===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.s3_proxy===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.s3_proxy===1?"translate-x-5":"translate-x-0",l(s)&&t.value.s3_proxy!==1?"bg-gray-100":"bg-white"]])},null,2)],10,ve),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.s3_proxy===1?"已开启":"已关闭"),3)])])])])):h("",!0)])]),e("div",me,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",xe,[e("div",he,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",fe,[n(e("input",{type:"number","onUpdate:modelValue":o[22]||(o[22]=r=>t.value.uploadMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.uploadMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",we,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",_e,[n(e("input",{type:"number","onUpdate:modelValue":o[23]||(o[23]=r=>t.value.uploadCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.uploadCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",Ue,[n(e("input",{type:"number","onUpdate:modelValue":o[24]||(o[24]=r=>p.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,p.value]]),n(e("select",{"onUpdate:modelValue":o[25]||(o[25]=r=>v.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[35]||(o[35]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[x,v.value]])])]),e("div",Se,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",Ve,[(c(),y(w,null,_(["day","hour","minute","forever","count"],r=>e("label",{key:r,class:"relative inline-flex items-center group cursor-pointer"},[n(e("input",{type:"checkbox",value:r,"onUpdate:modelValue":o[26]||(o[26]=D=>t.value.expireStyle=D),class:"peer sr-only"},null,8,Ce),[[A,t.value.expireStyle]]),e("div",{class:a(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[t.value.expireStyle.includes(r)?(l(s),"bg-indigo-600 border-indigo-600 text-white"):l(s)?"bg-gray-700 border-gray-600 text-gray-300 hover:border-indigo-500":"bg-white border-gray-300 text-gray-700 hover:border-indigo-500"]])},b({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",De,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",Be,[n(e("input",{type:"number","onUpdate:modelValue":o[27]||(o[27]=r=>u.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,u.value]]),n(e("select",{"onUpdate:modelValue":o[28]||(o[28]=r=>g.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[36]||(o[36]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[x,g.value]])])]),e("div",Me,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",Fe,[e("button",{type:"button",onClick:o[29]||(o[29]=r=>t.value.openUpload=t.value.openUpload===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.openUpload===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.openUpload===1?"translate-x-5":"translate-x-0",l(s)&&t.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Ae),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",ze,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",Ee,[e("div",Te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",We,[n(e("input",{type:"number","onUpdate:modelValue":o[30]||(o[30]=r=>t.value.errorMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.errorMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",Ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",Ie,[n(e("input",{type:"number","onUpdate:modelValue":o[31]||(o[31]=r=>t.value.errorCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.errorCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:C,class:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200"}," 保存设置 ")])])],2)]))}});export{Ne as default}; diff --git a/themes/2024/assets/SystemSettingsView-CqWcNZ_F.js b/themes/2024/assets/SystemSettingsView-CqWcNZ_F.js deleted file mode 100644 index f6b8c5a..0000000 --- a/themes/2024/assets/SystemSettingsView-CqWcNZ_F.js +++ /dev/null @@ -1 +0,0 @@ -import{d as B,r as m,u as M,a as c,b as y,e,n as a,g as l,l as n,v as d,m as x,F as w,p as _,t as b,k as h,x as F,y as k,M as A}from"./index-B2REZq7f.js";const z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},E={class:"space-y-4"},T={class:"grid grid-cols-1 gap-6"},W={class:"space-y-2"},K={class:"space-y-2"},I={class:"space-y-2"},j={class:"relative"},G={class:"space-y-2"},N={class:"space-y-2"},R=["value"],L={class:"space-y-2"},$={class:"grid grid-cols-1 gap-6 mt-8"},P={class:"space-y-2"},H={class:"space-y-2"},q={class:"space-y-4"},J={class:"space-y-2"},O={class:"space-y-4"},Q={class:"space-y-2"},X={key:0,class:"space-y-2"},Y={class:"flex items-center"},Z=["aria-checked"],ee={key:1,class:"space-y-4"},oe={class:"space-y-2"},re={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},te={class:"space-y-2"},ae={class:"space-y-2"},se={key:2,class:"space-y-4"},le={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ne={class:"space-y-2"},de={class:"space-y-2"},ie={class:"space-y-2"},ue={class:"space-y-2"},ge={class:"space-y-2"},ce={class:"space-y-2"},ye={class:"space-y-2"},be={class:"space-y-2"},pe={class:"flex items-center"},ve=["aria-checked"],me={class:"mt-8"},xe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},he={class:"space-y-2"},fe={class:"flex items-center space-x-2"},we={class:"space-y-2"},_e={class:"flex items-center space-x-2"},ke={class:"space-y-2"},Ue={class:"flex items-center space-x-2"},Se={class:"space-y-2"},Ve={class:"flex flex-wrap gap-3"},Ce=["value"],De={class:"space-y-2"},Be={class:"flex items-center space-x-2"},Me={class:"space-y-2"},Fe={class:"flex items-center"},Ae=["aria-checked"],ze={class:"mt-8"},Ee={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Te={class:"space-y-2"},We={class:"flex items-center space-x-2"},Ke={class:"space-y-2"},Ie={class:"flex items-center space-x-2"},Ne=B({__name:"SystemSettingsView",setup(je){const s=F("isDarkMode"),t=m({name:"",description:"",file_storage:"",webdav_url:"",webdav_username:"",webdav_password:"",themesChoices:[],expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",storage_path:"",notify_content:"",openUpload:1,uploadSize:1,enableChunk:0,uploadMinute:1,max_save_seconds:0,opacity:.9,s3_access_key_id:"",background:"",showAdminAddr:0,page_explain:"",s3_secret_access_key:"",aws_session_token:"",s3_signature_version:"",s3_region_name:"",s3_bucket_name:"",s3_endpoint_url:"",s3_hostname:"",uploadCount:1,errorMinute:1,errorCount:1,s3_proxy:0,themesSelect:""}),p=m(1),v=m("MB"),u=m(1),g=m("天"),U=(i,o)=>i*{秒:1,分:60,时:3600,天:86400}[o],S=()=>{k({url:"/admin/config/get",method:"get"}).then(i=>{t.value=i.detail;let o=t.value.uploadSize;o>=1024*1024*1024?(p.value=Math.round(o/(1024*1024*1024)),v.value="GB"):o>=1024*1024?(p.value=Math.round(o/(1024*1024)),v.value="MB"):(p.value=Math.round(o/1024),v.value="KB");let r=t.value.max_save_seconds;r===0?(u.value=7,g.value="天"):r%86400===0&&r>=86400?(u.value=r/86400,g.value="天"):r%3600===0&&r>=3600?(u.value=r/3600,g.value="时"):r%60===0&&r>=60?(u.value=r/60,g.value="分"):(u.value=r,g.value="秒")})},f=M(),V=(i,o)=>i*{KB:1024,MB:1048576,GB:1073741824}[o],C=()=>{const i={...t.value};i.uploadSize=V(p.value,v.value),u.value===0?i.max_save_seconds=7*86400:i.max_save_seconds=U(u.value,g.value),k({url:"/admin/config/update",method:"patch",data:i}).then(o=>{o.code==200?f.showAlert("保存成功","success"):f.showAlert(o.message,"error")})};return S(),(i,o)=>(c(),y("div",z,[e("h2",{class:a(["text-2xl font-bold mb-6",[l(s)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:a(["space-y-6 rounded-lg shadow-md p-6",[l(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",E,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",T,[e("div",W,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>t.value.name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.name]])]),e("div",K,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>t.value.description=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.description]])]),e("div",I,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",j,[n(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>t.value.admin_token=r),placeholder:"留空则不修改密码",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.admin_token]]),e("div",{class:a(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[l(s)?"text-gray-500":"text-gray-400"]])},o[32]||(o[32]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",G,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>t.value.keywords=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.keywords]])]),e("div",N,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 主题选择 ",2),n(e("select",{"onUpdate:modelValue":o[4]||(o[4]=r=>t.value.themesSelect=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},[(c(!0),y(w,null,_(t.value.themesChoices,r=>(c(),y("option",{value:r.key,key:r.key},b(r.name)+" (by "+b(r.author)+" V"+b(r.version)+") ",9,R))),128))],2),[[x,t.value.themesSelect]])]),e("div",L,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),n(e("textarea",{"onUpdate:modelValue":o[5]||(o[5]=r=>t.value.robotsText=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.robotsText]])])]),e("div",$,[e("div",P,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[6]||(o[6]=r=>t.value.notify_title=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.notify_title]])]),e("div",H,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),n(e("textarea",{"onUpdate:modelValue":o[7]||(o[7]=r=>t.value.notify_content=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.notify_content]])])]),e("div",q,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",J,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储路径 ",2),n(e("input",{type:"text",placeholder:"留空则使用默认路径,可不填写","onUpdate:modelValue":o[8]||(o[8]=r=>t.value.storage_path=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.storage_path]])]),e("div",O,[e("div",Q,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),n(e("select",{"onUpdate:modelValue":o[9]||(o[9]=r=>t.value.file_storage=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},o[33]||(o[33]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1),e("option",{value:"webdav"},"Webdav 存储",-1)]),2),[[x,t.value.file_storage]])]),t.value.file_storage==="local"?(c(),y("div",X,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题) ",2),e("div",Y,[e("button",{type:"button",onClick:o[10]||(o[10]=r=>t.value.enableChunk=t.value.enableChunk===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.enableChunk===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.enableChunk===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.enableChunk===1?"translate-x-5":"translate-x-0",l(s)&&t.value.enableChunk!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Z),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.enableChunk===1?"已开启":"已关闭"),3)])])):h("",!0),t.value.file_storage==="webdav"?(c(),y("div",ee,[e("div",oe,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav URL ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav URL","onUpdate:modelValue":o[11]||(o[11]=r=>t.value.webdav_url=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_url]])]),e("div",re,[e("div",te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Username ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav Username","onUpdate:modelValue":o[12]||(o[12]=r=>t.value.webdav_username=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_username]])]),e("div",ae,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Password ",2),n(e("input",{type:"password",placeholder:"请输入 Webdav Password","onUpdate:modelValue":o[13]||(o[13]=r=>t.value.webdav_password=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_password]])])])])):h("",!0),t.value.file_storage==="s3"?(c(),y("div",se,[e("div",le,[e("div",ne,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),n(e("input",{type:"text","onUpdate:modelValue":o[14]||(o[14]=r=>t.value.s3_access_key_id=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_access_key_id]])]),e("div",de,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),n(e("input",{type:"password","onUpdate:modelValue":o[15]||(o[15]=r=>t.value.s3_secret_access_key=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_secret_access_key]])]),e("div",ie,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),n(e("input",{type:"text","onUpdate:modelValue":o[16]||(o[16]=r=>t.value.s3_bucket_name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_bucket_name]])]),e("div",ue,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),n(e("input",{type:"text","onUpdate:modelValue":o[17]||(o[17]=r=>t.value.s3_endpoint_url=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_endpoint_url]])]),e("div",ge,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Region Name ",2),n(e("input",{type:"text","onUpdate:modelValue":o[18]||(o[18]=r=>t.value.s3_region_name=r),placeholder:"auto",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_region_name]])]),e("div",ce,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Signature Version ",2),n(e("select",{"onUpdate:modelValue":o[19]||(o[19]=r=>t.value.s3_signature_version=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[34]||(o[34]=[e("option",{value:"s3v2"},"S3v2",-1),e("option",{value:"s3v4"},"S3v4",-1)]),2),[[x,t.value.s3_signature_version]])]),e("div",ye,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Hostname ",2),n(e("input",{type:"text","onUpdate:modelValue":o[20]||(o[20]=r=>t.value.s3_hostname=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_hostname]])]),e("div",be,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 启用代理 ",2),e("div",pe,[e("button",{type:"button",onClick:o[21]||(o[21]=r=>t.value.s3_proxy=t.value.s3_proxy===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.s3_proxy===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.s3_proxy===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.s3_proxy===1?"translate-x-5":"translate-x-0",l(s)&&t.value.s3_proxy!==1?"bg-gray-100":"bg-white"]])},null,2)],10,ve),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.s3_proxy===1?"已开启":"已关闭"),3)])])])])):h("",!0)])]),e("div",me,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",xe,[e("div",he,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",fe,[n(e("input",{type:"number","onUpdate:modelValue":o[22]||(o[22]=r=>t.value.uploadMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.uploadMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",we,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",_e,[n(e("input",{type:"number","onUpdate:modelValue":o[23]||(o[23]=r=>t.value.uploadCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.uploadCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",Ue,[n(e("input",{type:"number","onUpdate:modelValue":o[24]||(o[24]=r=>p.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,p.value]]),n(e("select",{"onUpdate:modelValue":o[25]||(o[25]=r=>v.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[35]||(o[35]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[x,v.value]])])]),e("div",Se,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",Ve,[(c(),y(w,null,_(["day","hour","minute","forever","count"],r=>e("label",{key:r,class:"relative inline-flex items-center group cursor-pointer"},[n(e("input",{type:"checkbox",value:r,"onUpdate:modelValue":o[26]||(o[26]=D=>t.value.expireStyle=D),class:"peer sr-only"},null,8,Ce),[[A,t.value.expireStyle]]),e("div",{class:a(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[t.value.expireStyle.includes(r)?(l(s),"bg-indigo-600 border-indigo-600 text-white"):l(s)?"bg-gray-700 border-gray-600 text-gray-300 hover:border-indigo-500":"bg-white border-gray-300 text-gray-700 hover:border-indigo-500"]])},b({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",De,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",Be,[n(e("input",{type:"number","onUpdate:modelValue":o[27]||(o[27]=r=>u.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,u.value]]),n(e("select",{"onUpdate:modelValue":o[28]||(o[28]=r=>g.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[36]||(o[36]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[x,g.value]])])]),e("div",Me,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",Fe,[e("button",{type:"button",onClick:o[29]||(o[29]=r=>t.value.openUpload=t.value.openUpload===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.openUpload===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.openUpload===1?"translate-x-5":"translate-x-0",l(s)&&t.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Ae),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",ze,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",Ee,[e("div",Te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",We,[n(e("input",{type:"number","onUpdate:modelValue":o[30]||(o[30]=r=>t.value.errorMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.errorMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",Ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",Ie,[n(e("input",{type:"number","onUpdate:modelValue":o[31]||(o[31]=r=>t.value.errorCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.errorCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:C,class:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200"}," 保存设置 ")])])],2)]))}});export{Ne as default}; diff --git a/themes/2024/assets/box-H6C9Cns8.js b/themes/2024/assets/box-6z1N6vdl.js similarity index 90% rename from themes/2024/assets/box-H6C9Cns8.js rename to themes/2024/assets/box-6z1N6vdl.js index 2e40504..48389c1 100644 --- a/themes/2024/assets/box-H6C9Cns8.js +++ b/themes/2024/assets/box-6z1N6vdl.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-B2REZq7f.js";/** +import{c as a}from"./index-YD9XVcaL.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/file-vEntDFgk.js b/themes/2024/assets/file-DnnQU8q_.js similarity index 88% rename from themes/2024/assets/file-vEntDFgk.js rename to themes/2024/assets/file-DnnQU8q_.js index ab9494e..396f1a0 100644 --- a/themes/2024/assets/file-vEntDFgk.js +++ b/themes/2024/assets/file-DnnQU8q_.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-B2REZq7f.js";/** +import{c as a}from"./index-YD9XVcaL.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/fileData-D0vhoF43.js b/themes/2024/assets/fileData-DwFxbdR7.js similarity index 99% rename from themes/2024/assets/fileData-D0vhoF43.js rename to themes/2024/assets/fileData-DwFxbdR7.js index 9c1a923..555c9b9 100644 --- a/themes/2024/assets/fileData-D0vhoF43.js +++ b/themes/2024/assets/fileData-DwFxbdR7.js @@ -1,4 +1,4 @@ -import{c as L,d as _,D as I,r as y,E as U,o as W,G as $,H as Q}from"./index-B2REZq7f.js";/** +import{c as L,d as _,D as I,r as y,E as U,o as W,G as $,H as Q}from"./index-YD9XVcaL.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/hard-drive-J2sqyRb4.js b/themes/2024/assets/hard-drive-CeSuRVUM.js similarity index 92% rename from themes/2024/assets/hard-drive-J2sqyRb4.js rename to themes/2024/assets/hard-drive-CeSuRVUM.js index a32a17a..061e09a 100644 --- a/themes/2024/assets/hard-drive-J2sqyRb4.js +++ b/themes/2024/assets/hard-drive-CeSuRVUM.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-B2REZq7f.js";/** +import{c as e}from"./index-YD9XVcaL.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/index-B2REZq7f.js b/themes/2024/assets/index-YD9XVcaL.js similarity index 99% rename from themes/2024/assets/index-B2REZq7f.js rename to themes/2024/assets/index-YD9XVcaL.js index 5ce7fea..ca2e6f9 100644 --- a/themes/2024/assets/index-B2REZq7f.js +++ b/themes/2024/assets/index-YD9XVcaL.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-BR8DiYNn.js","assets/fileData-D0vhoF43.js","assets/file-vEntDFgk.js","assets/trash-6hUac_7h.js","assets/SendFileView-nTcsxJId.css","assets/RetrievewFileView-DYGo5XeV.js","assets/box-H6C9Cns8.js","assets/hard-drive-J2sqyRb4.js","assets/RetrievewFileView-BJNzgq08.css","assets/AdminLayout-BKq3HqMl.js","assets/AdminLayout-N15TxCCO.css","assets/DashboardView-CbjxXslN.js","assets/FileManageView-B45y_rSl.js","assets/FileManageView-2VUfeVR1.css","assets/LoginView-CmfCcdby.js","assets/LoginView-DegRNfFa.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-DBPnDoZR.js","assets/fileData-DwFxbdR7.js","assets/file-DnnQU8q_.js","assets/trash-hKmESNHA.js","assets/SendFileView-DLs2P9Ev.css","assets/RetrievewFileView-CnyG2_V6.js","assets/box-6z1N6vdl.js","assets/hard-drive-CeSuRVUM.js","assets/RetrievewFileView-3EiIbIrL.css","assets/AdminLayout-DnkjFqWq.js","assets/AdminLayout-N15TxCCO.css","assets/DashboardView-BqyK3lsK.js","assets/FileManageView-CIqGYRg2.js","assets/FileManageView-2VUfeVR1.css","assets/LoginView-BnEvnNIL.js","assets/LoginView-DegRNfFa.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** * @vue/shared v3.5.8 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -83,4 +83,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-BR `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[xi]=this[xi]={accessors:{}}).accessors,r=this.prototype;function o(i){const l=bn(i);s[l]||(up(r,i),s[l]=!0)}return b.isArray(t)?t.forEach(o):o(t),this}}Ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Ie.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});b.freezeMethods(Ie);function ir(e,t){const n=this||Gn,s=t||n,r=Ie.from(s.headers);let o=s.data;return b.forEach(e,function(l){o=l.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Dc(e){return!!(e&&e.__CANCEL__)}function hn(e,t,n){G.call(this,e??"canceled",G.ERR_CANCELED,t,n),this.name="CanceledError"}b.inherits(hn,G,{__CANCEL__:!0});function jc(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fp(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dp(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),a=s[o];i||(i=u),n[r]=c,s[r]=u;let f=o,p=0;for(;f!==r;)p+=n[f++],f=f%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),u-i{n=a,r=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const a=Date.now(),f=a-n;f>=s?i(u,a):(r=u,o||(o=setTimeout(()=>{o=null,i(r)},s-f)))},()=>r&&i(r)]}const gs=(e,t,n=3)=>{let s=0;const r=dp(50,250);return hp(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,c=i-s,u=r(c),a=i<=l;s=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&a?(l-i)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Ri=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Ci=e=>(...t)=>b.asap(()=>e(...t)),pp=Pe.hasStandardBrowserEnv?function(){const t=Pe.navigator&&/(msie|trident)/i.test(Pe.navigator.userAgent),n=document.createElement("a");let s;function r(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(i){const l=b.isString(i)?r(i):i;return l.protocol===s.protocol&&l.host===s.host}}():function(){return function(){return!0}}(),mp=Pe.hasStandardBrowserEnv?{write(e,t,n,s,r,o){const i=[e+"="+encodeURIComponent(t)];b.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),b.isString(s)&&i.push("path="+s),b.isString(r)&&i.push("domain="+r),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function gp(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Bc(e,t){return e&&!gp(t)?yp(e,t):t}const Ai=e=>e instanceof Ie?{...e}:e;function Kt(e,t){t=t||{};const n={};function s(u,a,f){return b.isPlainObject(u)&&b.isPlainObject(a)?b.merge.call({caseless:f},u,a):b.isPlainObject(a)?b.merge({},a):b.isArray(a)?a.slice():a}function r(u,a,f){if(b.isUndefined(a)){if(!b.isUndefined(u))return s(void 0,u,f)}else return s(u,a,f)}function o(u,a){if(!b.isUndefined(a))return s(void 0,a)}function i(u,a){if(b.isUndefined(a)){if(!b.isUndefined(u))return s(void 0,u)}else return s(void 0,a)}function l(u,a,f){if(f in t)return s(u,a);if(f in e)return s(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,a)=>r(Ai(u),Ai(a),!0)};return b.forEach(Object.keys(Object.assign({},e,t)),function(a){const f=c[a]||r,p=f(e[a],t[a],a);b.isUndefined(p)&&f!==l||(n[a]=p)}),n}const Hc=e=>{const t=Kt({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=Ie.from(i),t.url=Mc(Bc(t.baseURL,t.url),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(b.isFormData(n)){if(Pe.hasStandardBrowserEnv||Pe.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...a]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...a].join("; "))}}if(Pe.hasStandardBrowserEnv&&(s&&b.isFunction(s)&&(s=s(t)),s||s!==!1&&pp(t.url))){const u=r&&o&&mp.read(o);u&&i.set(r,u)}return t},bp=typeof XMLHttpRequest<"u",_p=bp&&function(e){return new Promise(function(n,s){const r=Hc(e);let o=r.data;const i=Ie.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,a,f,p,m,y;function v(){m&&m(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function T(){if(!E)return;const P=Ie.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),j={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:P,config:e,request:E};jc(function(z){n(z),v()},function(z){s(z),v()},j),E=null}"onloadend"in E?E.onloadend=T:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(T)},E.onabort=function(){E&&(s(new G("Request aborted",G.ECONNABORTED,e,E)),E=null)},E.onerror=function(){s(new G("Network Error",G.ERR_NETWORK,e,E)),E=null},E.ontimeout=function(){let I=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const j=r.transitional||kc;r.timeoutErrorMessage&&(I=r.timeoutErrorMessage),s(new G(I,j.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,E)),E=null},o===void 0&&i.setContentType(null),"setRequestHeader"in E&&b.forEach(i.toJSON(),function(I,j){E.setRequestHeader(j,I)}),b.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),l&&l!=="json"&&(E.responseType=r.responseType),u&&([p,y]=gs(u,!0),E.addEventListener("progress",p)),c&&E.upload&&([f,m]=gs(c),E.upload.addEventListener("progress",f),E.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(a=P=>{E&&(s(!P||P.type?new hn(null,e,E):P),E.abort(),E=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const C=fp(r.url);if(C&&Pe.protocols.indexOf(C)===-1){s(new G("Unsupported protocol "+C+":",G.ERR_BAD_REQUEST,e));return}E.send(o||null)})},wp=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const o=function(u){if(!r){r=!0,l();const a=u instanceof Error?u:this.reason;s.abort(a instanceof G?a:new hn(a instanceof Error?a.message:a))}};let i=t&&setTimeout(()=>{i=null,o(new G(`timeout ${t} of ms exceeded`,G.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=s;return c.unsubscribe=()=>b.asap(l),c}},vp=function*(e,t){let n=e.byteLength;if(n{const r=Ep(e,t);let o=0,i,l=c=>{i||(i=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:u,value:a}=await r.next();if(u){l(),c.close();return}let f=a.byteLength;if(n){let p=o+=f;n(p)}c.enqueue(new Uint8Array(a))}catch(u){throw l(u),u}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},Hs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$c=Hs&&typeof ReadableStream=="function",xp=Hs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Uc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Rp=$c&&Uc(()=>{let e=!1;const t=new Request(Pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Oi=64*1024,Ar=$c&&Uc(()=>b.isReadableStream(new Response("").body)),ys={stream:Ar&&(e=>e.body)};Hs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ys[t]&&(ys[t]=b.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new G(`Response type '${t}' is not supported`,G.ERR_NOT_SUPPORT,s)})})})(new Response);const Cp=async e=>{if(e==null)return 0;if(b.isBlob(e))return e.size;if(b.isSpecCompliantForm(e))return(await new Request(Pe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(b.isArrayBufferView(e)||b.isArrayBuffer(e))return e.byteLength;if(b.isURLSearchParams(e)&&(e=e+""),b.isString(e))return(await xp(e)).byteLength},Ap=async(e,t)=>{const n=b.toFiniteNumber(e.getContentLength());return n??Cp(t)},Tp=Hs&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:a,withCredentials:f="same-origin",fetchOptions:p}=Hc(e);u=u?(u+"").toLowerCase():"text";let m=wp([r,o&&o.toAbortSignal()],i),y;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let E;try{if(c&&Rp&&n!=="get"&&n!=="head"&&(E=await Ap(a,s))!==0){let j=new Request(t,{method:"POST",body:s,duplex:"half"}),X;if(b.isFormData(s)&&(X=j.headers.get("content-type"))&&a.setContentType(X),j.body){const[z,V]=Ri(E,gs(Ci(c)));s=Ti(j.body,Oi,z,V)}}b.isString(f)||(f=f?"include":"omit");const T="credentials"in Request.prototype;y=new Request(t,{...p,signal:m,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:s,duplex:"half",credentials:T?f:void 0});let C=await fetch(y);const P=Ar&&(u==="stream"||u==="response");if(Ar&&(l||P&&v)){const j={};["status","statusText","headers"].forEach(N=>{j[N]=C[N]});const X=b.toFiniteNumber(C.headers.get("content-length")),[z,V]=l&&Ri(X,gs(Ci(l),!0))||[];C=new Response(Ti(C.body,Oi,z,()=>{V&&V(),v&&v()}),j)}u=u||"text";let I=await ys[b.findKey(ys,u)||"text"](C,e);return!P&&v&&v(),await new Promise((j,X)=>{jc(j,X,{data:I,headers:Ie.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:y})})}catch(T){throw v&&v(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,e,y),{cause:T.cause||T}):G.from(T,T&&T.code,e,y)}}),Tr={http:Vh,xhr:_p,fetch:Tp};b.forEach(Tr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Pi=e=>`- ${e}`,Op=e=>b.isFunction(e)||e===null||e===!1,Vc={getAdapter:e=>{e=b.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(Pi).join(` `):" "+Pi(o[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return s},adapters:Tr};function lr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hn(null,e)}function Ii(e){return lr(e),e.headers=Ie.from(e.headers),e.data=ir.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vc.getAdapter(e.adapter||Gn.adapter)(e).then(function(s){return lr(e),s.data=ir.call(e,e.transformResponse,s),s.headers=Ie.from(s.headers),s},function(s){return Dc(s)||(lr(e),s&&s.response&&(s.response.data=ir.call(e,e.transformResponse,s.response),s.response.headers=Ie.from(s.response.headers))),Promise.reject(s)})}const qc="1.7.7",oo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{oo[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Li={};oo.transitional=function(t,n,s){function r(o,i){return"[Axios v"+qc+"] Transitional option '"+o+"'"+i+(s?". "+s:"")}return(o,i,l)=>{if(t===!1)throw new G(r(i," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!Li[i]&&(Li[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};function Pp(e,t,n){if(typeof e!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],i=t[o];if(i){const l=e[o],c=l===void 0||i(l,o,e);if(c!==!0)throw new G("option "+o+" must be "+c,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G("Unknown option "+o,G.ERR_BAD_OPTION)}}const Or={assertOptions:Pp,validators:oo},_t=Or.validators;class Ut{constructor(t){this.defaults=t,this.interceptors={request:new Si,response:new Si}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=` -`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Kt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Or.assertOptions(s,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:Or.assertOptions(r,{encode:_t.function,serialize:_t.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ie.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let a,f=0,p;if(!c){const y=[Ii.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,a=Promise.resolve(n);f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new hn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new io(function(r){t=r}),cancel:t}}}function Ip(e){return function(n){return e.apply(null,n)}}function Lp(e){return b.isObject(e)&&e.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pr).forEach(([e,t])=>{Pr[t]=e});function Kc(e){const t=new Ut(e),n=Ec(Ut.prototype.request,t);return b.extend(n,Ut.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Kc(Kt(e,r))},n}const ge=Kc(Gn);ge.Axios=Ut;ge.CanceledError=hn;ge.CancelToken=io;ge.isCancel=Dc;ge.VERSION=qc;ge.toFormData=Bs;ge.AxiosError=G;ge.Cancel=ge.CanceledError;ge.all=function(t){return Promise.all(t)};ge.spread=Ip;ge.isAxiosError=Lp;ge.mergeConfig=Kt;ge.AxiosHeaders=Ie;ge.formToJSON=e=>Fc(b.isHTMLForm(e)?new FormData(e):e);ge.getAdapter=Vc.getAdapter;ge.HttpStatusCode=Pr;ge.default=ge;const Np="",Wc=Np,lo=ge.create({baseURL:Wc,timeout:1e15,headers:{"Content-Type":"application/json"}});lo.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${Wc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));lo.interceptors.response.use(e=>e.data,e=>{if(e.response)switch(e.response.status){case 401:console.error("未授权,请重新登录"),localStorage.clear(),window.location.href="/#/login";break;case 403:console.error("禁止访问");break;case 404:console.error("请求的资源不存在");break;default:console.error("发生错误:",e.response.data)}else e.request?console.error("未收到响应:",e.request):console.error("请求配置错误:",e.message);return Promise.reject(e)});const zc=Vf("alert",{state:()=>({alerts:[]}),actions:{showAlert(e,t="info",n=5e3){const s=Date.now(),r=Date.now();this.alerts.push({id:s,message:e,type:t,progress:100,duration:n,startTime:r}),setTimeout(()=>this.removeAlert(s),n)},removeAlert(e){const t=this.alerts.findIndex(n=>n.id===e);t>-1&&this.alerts.splice(t,1)},updateAlertProgress(e){const t=this.alerts.find(n=>n.id===e);if(t){const s=100-(Date.now()-t.startTime)/t.duration*100;t.progress=Math.max(0,s),t.progress<=0&&this.removeAlert(e)}}}}),Mp={class:"p-4"},kp={class:"flex items-start"},Fp={class:"flex-shrink-0"},Dp={class:"ml-3 flex-1 pt-0.5"},jp=["innerHTML"],Bp={class:"ml-4 flex-shrink-0 flex"},Hp=["onClick"],$p={class:"h-1 bg-white bg-opacity-25"},Up=Kn({__name:"AlertComponent",setup(e){const t=zc(),{alerts:n}=qf(t),{removeAlert:s,updateAlertProgress:r}=t,o={success:"from-green-500 to-green-600",error:"from-red-500 to-red-600",warning:"from-yellow-500 to-yellow-600",info:"from-blue-500 to-blue-600"},i={success:Qd,error:th,warning:Xd,info:Yd};let l;return Ts(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),Jr(()=>{clearInterval(l)}),(c,u)=>(We(),sn(Ef,{name:"alert-fade",tag:"div",class:"fixed top-4 left-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:ds(()=>[(We(!0),Fn(Ue,null,su(Te(n),a=>(We(),Fn("div",{key:a.id,class:fn(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[De("div",Mp,[De("div",kp,[De("div",Fp,[(We(),sn(Al(i[a.type]),{class:"h-6 w-6 text-white"}))]),De("div",Dp,[De("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,jp)]),De("div",Bp,[De("button",{onClick:f=>Te(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=De("span",{class:"sr-only"},"关闭",-1)),ye(Te(nh),{class:"h-5 w-5"})],8,Hp)])])]),De("div",$p,[De("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:vs({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Vp=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},qp=Vp(Up,[["__scopeId","data-v-6fdbaa84"]]),Kp={key:0,class:"loading-overlay"},Wp=Kn({__name:"App",setup(e){const t=nn(!1),n=nn(!1),s=zd(),r=zc(),o=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,i=()=>{const c=localStorage.getItem("colorMode");return c?c==="dark":null},l=c=>{t.value=c,localStorage.setItem("colorMode",c?"dark":"light")};return Ts(()=>{const c=i();l(c!==null?c:o()),lo.post("/",{}).then(u=>{u.code===200&&(localStorage.setItem("config",JSON.stringify(u.detail)),u.detail.notify_title&&u.detail.notify_content&&localStorage.getItem("notify")!==u.detail.notify_title+u.detail.notify_content&&(localStorage.setItem("notify",u.detail.notify_title+u.detail.notify_content),r.showAlert(u.detail.notify_title+": "+u.detail.notify_content,"success")))})}),Ru(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),$t("isDarkMode",t),$t("setColorMode",l),$t("isLoading",n),(c,u)=>(We(),Fn("div",{class:fn(["app-container",t.value?"dark":"light"])},[ye(sh,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(We(),Fn("div",Kp,u[1]||(u[1]=[De("div",{class:"loading-spinner"},null,-1)]))):ju("",!0),ye(Te(vc),null,{default:ds(({Component:a})=>[ye(ef,{name:"fade",mode:"out-in"},{default:ds(()=>[(We(),sn(Al(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),ye(qp)],2))}}),zp="modulepreload",Gp=function(e){return"/"+e},Ni={},Ft=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Gp(c),c in Ni)return;Ni[c]=!0;const u=c.endsWith(".css"),a=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":zp,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Jp=()=>Ft(()=>import("./SendFileView-BR8DiYNn.js"),__vite__mapDeps([0,1,2,3,4])),Xp=Kd({history:Ed("/"),routes:[{path:"/",name:"Retrieve",component:()=>Ft(()=>import("./RetrievewFileView-DYGo5XeV.js"),__vite__mapDeps([5,1,6,2,7,3,8]))},{path:"/send",name:"Send",component:Jp},{path:"/admin",name:"Manage",component:()=>Ft(()=>import("./AdminLayout-BKq3HqMl.js"),__vite__mapDeps([9,6,10])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>Ft(()=>import("./DashboardView-CbjxXslN.js"),__vite__mapDeps([11,2,7]))},{path:"/admin/files",name:"FileManage",component:()=>Ft(()=>import("./FileManageView-B45y_rSl.js"),__vite__mapDeps([12,2,3,13]))},{path:"/admin/settings",name:"Settings",component:()=>Ft(()=>import("./SystemSettingsView-CqWcNZ_F.js"),[])}]},{path:"/login",name:"Login",component:()=>Ft(()=>import("./LoginView-CmfCcdby.js"),__vite__mapDeps([14,6,15]))}]}),co=Nf(Wp);co.use(Df());co.use(Xp);co.mount("#app");export{zd as A,qf as B,rm as C,rn as D,Sl as E,Ue as F,Vf as G,Vn as H,Jr as I,sn as J,Al as K,sm as L,em as M,ef as T,nh as X,Vp as _,We as a,Fn as b,Wt as c,Kn as d,De as e,Ve as f,Te as g,nm as h,ye as i,ds as j,ju as k,Qp as l,tm as m,fn as n,Ts as o,su as p,Du as q,nn as r,Ef as s,la as t,zc as u,Zp as v,xn as w,Oe as x,lo as y,Yp as z}; +`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Kt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Or.assertOptions(s,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:Or.assertOptions(r,{encode:_t.function,serialize:_t.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ie.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let a,f=0,p;if(!c){const y=[Ii.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,a=Promise.resolve(n);f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new hn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new io(function(r){t=r}),cancel:t}}}function Ip(e){return function(n){return e.apply(null,n)}}function Lp(e){return b.isObject(e)&&e.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pr).forEach(([e,t])=>{Pr[t]=e});function Kc(e){const t=new Ut(e),n=Ec(Ut.prototype.request,t);return b.extend(n,Ut.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Kc(Kt(e,r))},n}const ge=Kc(Gn);ge.Axios=Ut;ge.CanceledError=hn;ge.CancelToken=io;ge.isCancel=Dc;ge.VERSION=qc;ge.toFormData=Bs;ge.AxiosError=G;ge.Cancel=ge.CanceledError;ge.all=function(t){return Promise.all(t)};ge.spread=Ip;ge.isAxiosError=Lp;ge.mergeConfig=Kt;ge.AxiosHeaders=Ie;ge.formToJSON=e=>Fc(b.isHTMLForm(e)?new FormData(e):e);ge.getAdapter=Vc.getAdapter;ge.HttpStatusCode=Pr;ge.default=ge;const Np="",Wc=Np,lo=ge.create({baseURL:Wc,timeout:1e15,headers:{"Content-Type":"application/json"}});lo.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${Wc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));lo.interceptors.response.use(e=>e.data,e=>{if(e.response)switch(e.response.status){case 401:console.error("未授权,请重新登录"),localStorage.clear(),window.location.href="/#/login";break;case 403:console.error("禁止访问");break;case 404:console.error("请求的资源不存在");break;default:console.error("发生错误:",e.response.data)}else e.request?console.error("未收到响应:",e.request):console.error("请求配置错误:",e.message);return Promise.reject(e)});const zc=Vf("alert",{state:()=>({alerts:[]}),actions:{showAlert(e,t="info",n=5e3){const s=Date.now(),r=Date.now();this.alerts.push({id:s,message:e,type:t,progress:100,duration:n,startTime:r}),setTimeout(()=>this.removeAlert(s),n)},removeAlert(e){const t=this.alerts.findIndex(n=>n.id===e);t>-1&&this.alerts.splice(t,1)},updateAlertProgress(e){const t=this.alerts.find(n=>n.id===e);if(t){const s=100-(Date.now()-t.startTime)/t.duration*100;t.progress=Math.max(0,s),t.progress<=0&&this.removeAlert(e)}}}}),Mp={class:"p-4"},kp={class:"flex items-start"},Fp={class:"flex-shrink-0"},Dp={class:"ml-3 flex-1 pt-0.5"},jp=["innerHTML"],Bp={class:"ml-4 flex-shrink-0 flex"},Hp=["onClick"],$p={class:"h-1 bg-white bg-opacity-25"},Up=Kn({__name:"AlertComponent",setup(e){const t=zc(),{alerts:n}=qf(t),{removeAlert:s,updateAlertProgress:r}=t,o={success:"from-green-500 to-green-600",error:"from-red-500 to-red-600",warning:"from-yellow-500 to-yellow-600",info:"from-blue-500 to-blue-600"},i={success:Qd,error:th,warning:Xd,info:Yd};let l;return Ts(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),Jr(()=>{clearInterval(l)}),(c,u)=>(We(),sn(Ef,{name:"alert-fade",tag:"div",class:"fixed top-4 left-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:ds(()=>[(We(!0),Fn(Ue,null,su(Te(n),a=>(We(),Fn("div",{key:a.id,class:fn(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[De("div",Mp,[De("div",kp,[De("div",Fp,[(We(),sn(Al(i[a.type]),{class:"h-6 w-6 text-white"}))]),De("div",Dp,[De("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,jp)]),De("div",Bp,[De("button",{onClick:f=>Te(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=De("span",{class:"sr-only"},"关闭",-1)),ye(Te(nh),{class:"h-5 w-5"})],8,Hp)])])]),De("div",$p,[De("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:vs({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Vp=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},qp=Vp(Up,[["__scopeId","data-v-6fdbaa84"]]),Kp={key:0,class:"loading-overlay"},Wp=Kn({__name:"App",setup(e){const t=nn(!1),n=nn(!1),s=zd(),r=zc(),o=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,i=()=>{const c=localStorage.getItem("colorMode");return c?c==="dark":null},l=c=>{t.value=c,localStorage.setItem("colorMode",c?"dark":"light")};return Ts(()=>{const c=i();l(c!==null?c:o()),lo.post("/",{}).then(u=>{u.code===200&&(localStorage.setItem("config",JSON.stringify(u.detail)),u.detail.notify_title&&u.detail.notify_content&&localStorage.getItem("notify")!==u.detail.notify_title+u.detail.notify_content&&(localStorage.setItem("notify",u.detail.notify_title+u.detail.notify_content),r.showAlert(u.detail.notify_title+": "+u.detail.notify_content,"success")))})}),Ru(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),$t("isDarkMode",t),$t("setColorMode",l),$t("isLoading",n),(c,u)=>(We(),Fn("div",{class:fn(["app-container",t.value?"dark":"light"])},[ye(sh,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(We(),Fn("div",Kp,u[1]||(u[1]=[De("div",{class:"loading-spinner"},null,-1)]))):ju("",!0),ye(Te(vc),null,{default:ds(({Component:a})=>[ye(ef,{name:"fade",mode:"out-in"},{default:ds(()=>[(We(),sn(Al(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),ye(qp)],2))}}),zp="modulepreload",Gp=function(e){return"/"+e},Ni={},Ft=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Gp(c),c in Ni)return;Ni[c]=!0;const u=c.endsWith(".css"),a=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":zp,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Jp=()=>Ft(()=>import("./SendFileView-DBPnDoZR.js"),__vite__mapDeps([0,1,2,3,4])),Xp=Kd({history:Ed("/"),routes:[{path:"/",name:"Retrieve",component:()=>Ft(()=>import("./RetrievewFileView-CnyG2_V6.js"),__vite__mapDeps([5,1,6,2,7,3,8]))},{path:"/send",name:"Send",component:Jp},{path:"/admin",name:"Manage",component:()=>Ft(()=>import("./AdminLayout-DnkjFqWq.js"),__vite__mapDeps([9,6,10])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>Ft(()=>import("./DashboardView-BqyK3lsK.js"),__vite__mapDeps([11,2,7]))},{path:"/admin/files",name:"FileManage",component:()=>Ft(()=>import("./FileManageView-CIqGYRg2.js"),__vite__mapDeps([12,2,3,13]))},{path:"/admin/settings",name:"Settings",component:()=>Ft(()=>import("./SystemSettingsView-BkSv8Xom.js"),[])}]},{path:"/login",name:"Login",component:()=>Ft(()=>import("./LoginView-BnEvnNIL.js"),__vite__mapDeps([14,6,15]))}]}),co=Nf(Wp);co.use(Df());co.use(Xp);co.mount("#app");export{zd as A,qf as B,rm as C,rn as D,Sl as E,Ue as F,Vf as G,Vn as H,Jr as I,sn as J,Al as K,sm as L,em as M,ef as T,nh as X,Vp as _,We as a,Fn as b,Wt as c,Kn as d,De as e,Ve as f,Te as g,nm as h,ye as i,ds as j,ju as k,Qp as l,tm as m,fn as n,Ts as o,su as p,Du as q,nn as r,Ef as s,la as t,zc as u,Zp as v,xn as w,Oe as x,lo as y,Yp as z}; diff --git a/themes/2024/assets/trash-6hUac_7h.js b/themes/2024/assets/trash-hKmESNHA.js similarity index 90% rename from themes/2024/assets/trash-6hUac_7h.js rename to themes/2024/assets/trash-hKmESNHA.js index d7cd130..2eb34a5 100644 --- a/themes/2024/assets/trash-6hUac_7h.js +++ b/themes/2024/assets/trash-hKmESNHA.js @@ -1,4 +1,4 @@ -import{c}from"./index-B2REZq7f.js";/** +import{c}from"./index-YD9XVcaL.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/index.html b/themes/2024/index.html index aea0393..a00cf0a 100644 --- a/themes/2024/index.html +++ b/themes/2024/index.html @@ -12,7 +12,7 @@ {{title}} - +