import{c as H,d as de,r as T,o as ue,w as ze,a as _,b as t,e as C,_ as ge,u as Te,f as Ae,g as f,n,h as r,i as $e,t as z,j as E,k as U,l as V,m as G,v as se,T as O,F as Q,p as De,q as ae,s as J,x as Ie,X as ne,y as Fe,z as Pe,A as L}from"./index-CL9mnhPI.js";import{u as je,S as le,C as Be,c as Re,a as Ue,Q as Ve,b as K,E as Le}from"./clipboard-DyBaoW_S.js";import{F as ie}from"./file-CeiRRIJG.js";import{T as He}from"./trash-Cr3Lyvdp.js";/**
* @license lucide-vue-next v0.535.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=H("clipboard-copy",[["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.535.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=H("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-vue-next v0.535.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ne=H("cloud-upload",[["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.535.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const We=H("send",[["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.535.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=H("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),Ge=de({__name:"BorderProgressBar",props:{progress:{}},setup($){const S=$,F=T(null),s=T(null);let u=null;const w=()=>{if(!u||!s.value||!F.value)return;const g=F.value.clientWidth,h=F.value.clientHeight;s.value.width=g,s.value.height=h;const c=4,l=8;u.lineWidth=c;const x=u.createLinearGradient(0,0,g,h);x.addColorStop(0,"#4f46e5"),x.addColorStop(.5,"#7c3aed"),x.addColorStop(1,"#db2777"),u.strokeStyle="rgba(229, 231, 235, 0.2)",k(u,c/2,c/2,g-c,h-c,l),u.stroke();const y=((g+h)*2-8*l+2*Math.PI*l)*S.progress/100;u.strokeStyle=x,u.lineCap="round",u.lineJoin="round",u.beginPath();let i=y;const m=c/2,M=g-c,D=h-c;if(i>0){const p=Math.min(M-2*l,i);u.moveTo(l+m,m),u.lineTo(p+l+m,m),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/l);u.arc(M-l+m,l+m,l,-Math.PI/2,p-Math.PI/2,!1),i-=p*l}if(i>0){const p=Math.min(D-2*l,i);u.lineTo(M+m,p+l+m),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/l);u.arc(M-l+m,D-l+m,l,0,p,!1),i-=p*l}if(i>0){const p=Math.min(M-2*l,i);u.lineTo(M-p-l+m,D+m),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/l);u.arc(l+m,D-l+m,l,Math.PI/2,Math.PI/2+p,!1),i-=p*l}if(i>0){const p=Math.min(D-2*l,i);u.lineTo(m,D-p-l+m),i-=p}if(i>0){const p=Math.min(Math.PI/2,i/l);u.arc(l+m,l+m,l,Math.PI,Math.PI+p,!1)}u.stroke()};function k(g,h,c,l,x,v){g.beginPath(),g.moveTo(h+v,c),g.lineTo(h+l-v,c),g.arcTo(h+l,c,h+l,c+v,v),g.lineTo(h+l,c+x-v),g.arcTo(h+l,c+x,h+l-v,c+x,v),g.lineTo(h+v,c+x),g.arcTo(h,c+x,h,c+x-v,v),g.lineTo(h,c+v),g.arcTo(h,c,h+v,c,v),g.closePath()}return ue(()=>{s.value&&(u=s.value.getContext("2d"),w())}),ze(()=>S.progress,w),(g,h)=>(C(),_("div",{class:"border-progress-container",ref_key:"container",ref:F},[t("canvas",{ref_key:"canvas",ref:s,class:"border-progress-canvas"},null,512)],512))}}),Oe=ge(Ge,[["__scopeId","data-v-2fbf5085"]]),ce=$=>$>=1024*1024*1024?Math.round($/(1024*1024*1024))+"GB":$>=1024*1024?Math.round($/(1024*1024))+"MB":Math.round($/1024)+"KB",Qe={class:"p-8"},Je={class:"flex justify-center space-x-4 mb-6"},Ke={key:"file",class:"grid grid-cols-1 gap-8"},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-3"},rt={class:"relative flex-grow group"},ot=["placeholder"],st=["value"],at={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"},nt={class:"relative z-10 flex items-center justify-center text-lg"},lt={class:"mt-6 text-center"},it={class:"flex-grow overflow-y-auto p-6"},ct={class:"flex-shrink-0 mr-4"},dt={class:"flex-grow min-w-0 mr-4"},ut={class:"flex-shrink-0 flex space-x-2"},gt=["onClick"],pt=["onClick"],ht=["onClick"],ft={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"},mt={class:"flex items-center justify-between"},xt={class:"p-4 sm:p-6"},vt={class:"flex items-center mb-3 sm:mb-4"},yt={class:"ml-3 sm:ml-4 min-w-0 flex-1"},bt={class:"grid grid-cols-2 gap-3 sm:gap-4"},wt={class:"flex items-center min-w-0"},kt={class:"flex items-center min-w-0"},_t={class:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6"},Ct={class:"space-y-3 sm:space-y-4"},St={class:"bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl p-4 sm:p-5 text-white"},Mt={class:"flex items-center justify-between mb-3 sm:mb-4"},zt={class:"text-2xl sm:text-3xl font-bold tracking-wider text-center break-all"},Tt={class:"flex items-center justify-between mb-2 sm:mb-3"},At={class:"bg-white p-3 sm:p-4 rounded-lg shadow-sm mb-3 sm:mb-4"},$t=de({__name:"SendFileView",setup($){const S=JSON.parse(localStorage.getItem("config")||"{}"),F=Pe(),s=$e("isDarkMode"),u=je(),w=T("file"),k=T(null),g=T(""),h=T(null),c=T("day"),l=T("1"),x=T(0),v=T(!1),y=T(null),i=Te(),m=Ae(()=>u.shareData),M=T(""),D=()=>{h.value?.click()},p=async o=>{const e=o.target;if(e.files&&e.files.length>0){const d=e.files[0];if(k.value=d,!W())return;M.value=await N(d),console.log(M.value)}},pe=async o=>{if(o.dataTransfer?.files&&o.dataTransfer.files.length>0){const e=o.dataTransfer.files[0];if(k.value=e,!W())return;M.value=await N(e)}},he=async o=>{const e=o.clipboardData?.items;if(e)for(const d of e)if(d.kind==="file"){const a=d.getAsFile();if(a){if(a.size===0){i.showAlert("无法读取空文件","error");return}if(k.value=a,!W())return;try{M.value=await N(a),i.showAlert("已从剪贴板添加文件:"+a.name,"success")}catch(b){i.showAlert("文件处理失败","error"),console.error("File hash calculation failed:",b)}break}}else w.value="text",e[0].getAsString(a=>{g.value+=a})},N=async o=>new Promise(e=>{const a=new FileReader;let b=0;const P=Math.ceil(o.size/2097152);a.onload=async I=>{const B=new Uint8Array(I.target.result);try{if(window.isSecureContext){const j=await crypto.subtle.digest("SHA-256",B),oe=Array.from(new Uint8Array(j)).map(q=>q.toString(16).padStart(2,"0")).join("");b++,b
{const I=b*2097152,B=I+2097152>=o.size?o.size:I+2097152;a.readAsArrayBuffer(o.slice(I,B))};A()}),Y=o=>{const e=`${o.name}-${o.size}-${o.lastModified}`;let d=0;for(let a=0;a{switch(o){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},Z=(o=c.value)=>{switch(o){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},me=async o=>{try{const d=Math.ceil(o.size/5242880),a=await L.post("chunk/upload/init/",{file_name:o.name,file_size:o.size,chunk_size:5242880,file_hash:M.value});if(a.code!==200)throw new Error("初始化切片上传失败");if(a.detail.existed)return a;const b=a.detail.upload_id;for(let A=0;A{const Me=Math.round((A*5242880+q.loaded)*100/o.size);x.value=Me}})).code!==200)throw new Error(`切片 ${A} 上传失败`)}const P=await L.post(`chunk/upload/complete/${b}`,{expire_value:l.value?parseInt(l.value):1,expire_style:c.value});if(P.code!==200)throw new Error("完成上传失败");return P}catch(e){throw console.error("切片上传失败:",e),e.response?.data?.detail?i.showAlert(e.response.data.detail,"error"):i.showAlert("上传失败,请稍后重试","error"),e}},xe=async o=>{const e=new FormData,d={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:b=>{const P=Math.round(b.loaded*100/b.total);x.value=P}};return e.append("file",o),e.append("expire_value",l.value),e.append("expire_style",c.value),await L.post("share/file/",e,d)},ve=()=>S.openUpload===0&&localStorage.getItem("token")===null?(i.showAlert("游客上传功能已关闭","error"),!1):!0,ye=o=>o.size>S.uploadSize?(i.showAlert(`文件大小超过限制 (${ce(S.uploadSize)})`,"error"),k.value=null,!1):!0,ee=(o,e)=>{if(o==="forever"||o==="count")return!0;const d=S.max_save_seconds||0;if(d===0)return!0;let a=0;switch(o){case"minute":a=parseInt(e)*60;break;case"hour":a=parseInt(e)*3600;break;case"day":a=parseInt(e)*86400;break;default:return!1}return a<=d},W=()=>!(!ve()||!ye(k.value)||!ee(c.value,l.value)),be=async()=>{if(w.value==="file"&&!k.value){i.showAlert("请选择要上传的文件","error");return}if(w.value==="text"&&!g.value.trim()){i.showAlert("请输入要发送的文本","error");return}if(c.value!=="forever"&&!l.value){i.showAlert("请输入过期值","error");return}if(!ee(c.value,l.value)){const o=Math.floor(S.max_save_seconds/86400);i.showAlert(`过期时间不能超过${o}天`,"error");return}try{let o;if(w.value==="file")S.enableChunk?o=await me(k.value):o=await xe(k.value);else{const e=new FormData;e.append("text",g.value),e.append("expire_value",l.value),e.append("expire_style",c.value),o=await L.post("share/text/",e,{headers:{"Content-Type":"multipart/form-data"}})}if(o&&o.code===200){const e=o.detail.code,d=o.detail.name,a={id:Date.now(),filename:d,date:new Date().toISOString().split("T")[0],size:w.value==="text"?`${(g.value.length/1024).toFixed(2)} KB`:`${(k.value.size/(1024*1024)).toFixed(1)} MB`,expiration:c.value==="forever"?"永久":`${l.value}${Z()}后过期`,retrieveCode:e};u.addShareData(a),i.showAlert(`文件发送成功!取件码:${e}`,"success"),k.value=null,g.value="",x.value=0,y.value=a,await K(e)}else throw new Error("服务器响应异常")}catch(o){console.error("发送失败:",o),o.response?.data?.detail?i.showAlert(o.response.data.detail,"error"):i.showAlert("发送失败,请稍后重试","error")}finally{x.value=0}},we=()=>{F.push("/")},te=()=>{v.value=!v.value},ke=o=>{y.value=o},_e=o=>{const e=u.shareData.findIndex(d=>d.id===o);e!==-1&&u.deleteShareData(e)},Ce=window.location.origin+"/#/",Se=o=>`${Ce}?code=${o.retrieveCode}`,re=o=>{const d=(parseInt(l.value)||0)+o;d>=1&&(l.value=d.toString())};return ue(()=>{console.log("SendFileView mounted")}),(o,e)=>{const d=Ie("router-link");return C(),_("div",{class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300",onPaste:E(he,["prevent"])},[t("div",{class:n(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[r(s)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[t("div",Qe,[t("h2",{class:n(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[r(s)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:we},z(r(S).name),3),t("form",{onSubmit:E(be,["prevent"]),class:"space-y-8"},[t("div",Je,[t("button",{type:"button",onClick:e[0]||(e[0]=a=>w.value="file"),class:n(["px-4 py-2 rounded-lg",w.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),t("button",{type:"button",onClick:e[1]||(e[1]=a=>w.value="text"),class:n(["px-4 py-2 rounded-lg",w.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),f(O,{name:"fade",mode:"out-in"},{default:U(()=>[w.value==="file"?(C(),_("div",Ke,[t("div",{class:n(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[r(s)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:D,onDragover:e[2]||(e[2]=E(()=>{},["prevent"])),onDrop:E(pe,["prevent"])},[t("input",{id:"file-upload",type:"file",class:"hidden",onChange:p,ref_key:"fileInput",ref:h},null,544),x.value>0?(C(),_("div",Xe,[f(Oe,{progress:x.value},null,8,["progress"])])):V("",!0),f(r(Ne),{class:n(["w-16 h-16 transition-colors duration-300",r(s)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),t("p",{class:n(["mt-4 text-sm transition-colors duration-300 w-full text-center",r(s)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[t("span",Ye,z(k.value?k.value.name:"点击或拖放文件到此处上传"),1)],2),t("p",{class:n(["mt-2 text-xs",r(s)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+z(r(ce)(r(S).uploadSize)),3)],34)])):(C(),_("div",Ze,[w.value==="text"?(C(),_("div",et,[G(t("textarea",{id:"text-content","onUpdate:modelValue":e[3]||(e[3]=a=>g.value=a),rows:"7",class:n(["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",r(s)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[se,g.value]])])):V("",!0)]))]),_:1}),t("div",tt,[t("label",{class:n(["text-sm font-medium",r(s)?"text-gray-300":"text-gray-700"])}," 过期时间 ",2),t("div",rt,[t("div",{class:n(["relative h-11 rounded-xl border transition-all duration-300",r(s)?"bg-gray-800/50 border-gray-700/50 group-hover:border-gray-600":"bg-white border-gray-200 group-hover:border-gray-300"])},[c.value!=="forever"?(C(),_(Q,{key:0},[G(t("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>l.value=a),type:"number",placeholder:fe(),min:"1",class:n(["w-full h-full px-4 pr-32 rounded-xl placeholder-gray-400 transition-all duration-300","focus:outline-none focus:ring-2 focus:ring-offset-0","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","bg-transparent",r(s)?"text-gray-100 focus:ring-indigo-500/70 placeholder-gray-500":"text-gray-900 focus:ring-indigo-500/50 placeholder-gray-400"])},null,10,ot),[[se,l.value]]),t("div",{class:n(["absolute right-24 top-0 h-full flex flex-col border-l",[r(s)?"border-gray-700/50":"border-gray-200"]])},[t("button",{type:"button",onClick:e[5]||(e[5]=a=>re(1)),class:n(["flex-1 px-2 flex items-center justify-center transition-all duration-200",[r(s)?"hover:bg-gray-700/50 text-gray-400 hover:text-gray-200":"hover:bg-gray-50 text-gray-500 hover:text-gray-700"]])},e[12]||(e[12]=[t("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 15l7-7 7 7"})],-1)]),2),t("button",{type:"button",onClick:e[6]||(e[6]=a=>re(-1)),class:n(["flex-1 px-2 flex items-center justify-center transition-all duration-200",[r(s)?"hover:bg-gray-700/50 text-gray-400 hover:text-gray-200":"hover:bg-gray-50 text-gray-500 hover:text-gray-700"]])},e[13]||(e[13]=[t("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1)]),2)],2)],64)):V("",!0),G(t("select",{"onUpdate:modelValue":e[7]||(e[7]=a=>c.value=a),class:n(["absolute right-0 top-0 h-full appearance-none cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-0",c.value==="forever"?"w-full px-4":"w-24 pl-3 pr-8 border-l",r(s)?"text-gray-100 border-gray-700/50 focus:ring-indigo-500/70 bg-gray-800/50":"text-gray-900 border-gray-200 focus:ring-indigo-500/50 bg-white"])},[(C(!0),_(Q,null,ae(r(S).expireStyle,a=>(C(),_("option",{value:a,key:a,class:n([r(s)?"bg-gray-800 text-gray-100":"bg-white text-gray-900"])},z(Z(a)),11,st))),128))],2),[[De,c.value]]),t("div",{class:n(["absolute pointer-events-none",[c.value==="forever"?"right-3":"right-2","top-1/2 -translate-y-1/2"]])},[(C(),_("svg",{class:n(["w-4 h-4 transition-colors duration-300",[r(s)?"text-gray-400":"text-gray-500"]]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},e[14]||(e[14]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))],2)],2)])]),t("button",at,[e[16]||(e[16]=t("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)),t("span",nt,[f(r(We),{class:"w-6 h-6 mr-2"}),e[15]||(e[15]=t("span",null,"安全寄送",-1))])])],32),t("div",lt,[f(d,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:U(()=>e[17]||(e[17]=[J(" 需要取件?点击这里 ",-1)])),_:1,__:[17]})])]),t("div",{class:n(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[r(s)?"bg-gray-800":"bg-gray-100"]])},[t("span",{class:n(["text-sm flex items-center",[r(s)?"text-gray-300":"text-gray-800"]])},[f(r(le),{class:"w-4 h-4 mr-1 text-green-400"}),e[18]||(e[18]=J(" 安全加密 ",-1))],2),t("button",{onClick:te,class:n(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[r(s)?"text-indigo-400":"text-indigo-600"]])},[e[19]||(e[19]=J(" 发件记录 ",-1)),f(r(Be),{class:"w-4 h-4 ml-1"})],2)],2)],2),f(O,{name:"drawer"},{default:U(()=>[v.value?(C(),_("div",{key:0,class:n(["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",[r(s)?"bg-gray-900":"bg-white"]])},[t("div",{class:n(["flex justify-between items-center p-6 border-b",[r(s)?"border-gray-700":"border-gray-200"]])},[t("h3",{class:n(["text-2xl font-bold",[r(s)?"text-white":"text-gray-800"]])}," 发件记录 ",2),t("button",{onClick:te,class:n(["hover:text-white transition duration-300",[r(s)?"text-gray-400":"text-gray-800"]])},[f(r(ne),{class:"w-6 h-6"})],2)],2),t("div",it,[f(Fe,{name:"list",tag:"div",class:"space-y-4"},{default:U(()=>[(C(!0),_(Q,null,ae(m.value,a=>(C(),_("div",{key:a.id,class:n(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[r(s)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[t("div",ct,[f(r(ie),{class:n(["w-10 h-10",[r(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),t("div",dt,[t("p",{class:n(["font-medium text-lg truncate",[r(s)?"text-white":"text-gray-800"]])},z(a.filename?a.filename:"Text"),3),t("p",{class:n(["text-sm truncate",[r(s)?"text-gray-400":"text-gray-600"]])},z(a.date)+" · "+z(a.size),3)]),t("div",ut,[t("button",{onClick:b=>r(K)(a.retrieveCode),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[r(s)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[f(r(X),{class:"w-5 h-5"})],10,gt),t("button",{onClick:b=>ke(a),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[r(s)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[f(r(Le),{class:"w-5 h-5"})],10,pt),t("button",{onClick:b=>_e(a.id),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[r(s)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[f(r(He),{class:"w-5 h-5"})],10,ht)])],2))),128))]),_:1})])],2)):V("",!0)]),_:1}),f(O,{name:"fade"},{default:U(()=>[y.value?(C(),_("div",ft,[t("div",{class:n(["w-full max-w-2xl rounded-2xl shadow-2xl transform transition-all duration-300 ease-out overflow-hidden",[r(s)?"bg-gray-900 bg-opacity-70":"bg-white bg-opacity-95"]])},[t("div",{class:n(["px-4 sm:px-6 py-3 sm:py-4 border-b",[r(s)?"border-gray-800":"border-gray-100"]])},[t("div",mt,[t("h3",{class:n(["text-lg sm:text-xl font-semibold",[r(s)?"text-white":"text-gray-900"]])}," 文件详情 ",2),t("button",{onClick:e[8]||(e[8]=a=>y.value=null),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[f(r(ne),{class:n(["w-4 h-4 sm:w-5 sm:h-5",[r(s)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])])],2),t("div",xt,[t("div",{class:n(["rounded-xl p-3 sm:p-4 mb-4 sm:mb-6",[r(s)?"bg-gray-800 bg-opacity-50":"bg-gray-50 bg-opacity-95"]])},[t("div",vt,[t("div",{class:n(["p-2 sm:p-3 rounded-lg",[r(s)?"bg-gray-800":"bg-white"]])},[f(r(ie),{class:n(["w-5 h-5 sm:w-6 sm:h-6",[r(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2),t("div",yt,[t("h4",{class:n(["font-medium text-sm sm:text-base truncate",[r(s)?"text-white":"text-gray-900"]])},z(y.value.filename),3),t("p",{class:n(["text-xs sm:text-sm truncate",[r(s)?"text-gray-400":"text-gray-500"]])},z(y.value.size)+" · "+z(y.value.date),3)])]),t("div",bt,[t("div",wt,[f(r(Ee),{class:n(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2 flex-shrink-0",[r(s)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),t("span",{class:n(["text-xs sm:text-sm truncate",[r(s)?"text-gray-300":"text-gray-600"]])},z(y.value.expiration),3)]),t("div",kt,[f(r(le),{class:n(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2 flex-shrink-0",[r(s)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),t("span",{class:n(["text-xs sm:text-sm truncate",[r(s)?"text-gray-300":"text-gray-600"]])}," 安全加密 ",2)])])],2),t("div",_t,[t("div",Ct,[t("div",St,[t("div",Mt,[e[20]||(e[20]=t("h4",{class:"font-medium text-sm sm:text-base"},"取件码",-1)),t("button",{onClick:e[9]||(e[9]=a=>r(Re)(y.value.retrieveCode)),class:"p-1.5 sm:p-2 rounded-full hover:bg-white/10 transition-colors"},[f(r(X),{class:"w-4 h-4 sm:w-5 sm:h-5"})])]),t("p",zt,z(y.value.retrieveCode),1)]),t("div",{class:n(["rounded-xl p-3 sm:p-4",[r(s)?"bg-gray-800 bg-opacity-50":"bg-gray-50 bg-opacity-95"]])},[t("div",Tt,[t("h4",{class:n(["font-medium text-sm sm:text-base flex items-center min-w-0",[r(s)?"text-white":"text-gray-900"]])},[f(r(qe),{class:"w-4 h-4 sm:w-5 sm:h-5 mr-1.5 sm:mr-2 text-indigo-500 flex-shrink-0"}),e[21]||(e[21]=t("span",{class:"truncate"},"wget下载",-1))],2),t("button",{onClick:e[10]||(e[10]=a=>r(Ue)(y.value.retrieveCode,y.value.filename)),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors flex-shrink-0"},[f(r(X),{class:n(["w-4 h-4 sm:w-5 sm:h-5",[r(s)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])]),t("p",{class:n(["text-xs sm:text-sm font-mono break-all line-clamp-2",[r(s)?"text-gray-300":"text-gray-600"]])}," 点击复制wget命令 ",2)],2)]),t("div",{class:n(["rounded-xl p-4 sm:p-5 flex flex-col items-center",[r(s)?"bg-gray-800 bg-opacity-50":"bg-gray-50 bg-opacity-95"]])},[t("div",At,[f(Ve,{value:Se(y.value),size:140,level:"M",class:"sm:w-[160px] sm:h-[160px]"},null,8,["value"])]),t("p",{class:n(["text-xs sm:text-sm truncate max-w-full",[r(s)?"text-gray-400":"text-gray-500"]])}," 扫描二维码快速取件 ",2)],2)])]),t("div",{class:n(["px-4 sm:px-6 py-3 sm:py-4 border-t",[r(s)?"border-gray-800":"border-gray-100"]])},[t("button",{onClick:e[11]||(e[11]=a=>r(K)(y.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)])):V("",!0)]),_:1})],32)}}}),jt=ge($t,[["__scopeId","data-v-afcdcb37"]]);export{jt as default};