Files
filecodebox/themes/2024/assets/SendFileView-DFl_xv-F.js
T
2025-03-02 20:29:24 +08:00

22 lines
21 KiB
Python

import{c as N,d as se,r as I,o as ne,w as Me,a as M,b as e,e as S,_ as le,u as ie,f as Se,g as x,n as l,h as o,i as ze,t as C,j as E,k as B,l as j,m as Q,v as Z,T as J,p as Te,F as ee,q as te,s as U,x as Ie,X as De,y as Ae,z as Pe,A as L}from"./index-hMSZf8YD.js";import{u as Fe,S as $e,C as Ue,a as Re,Q as Be,E as je}from"./fileData-CXpAng5L.js";import{F as oe}from"./file-BCRuKjxJ.js";import{H as Le}from"./hard-drive-DGYHAt92.js";import{T as Ve}from"./trash-DAKjwu5a.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 He=N("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 Ee=N("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 Ne=N("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 qe=N("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"}]]),We=se({__name:"BorderProgressBar",props:{progress:{}},setup(_){const k=_,P=I(null),s=I(null);let u=null;const w=()=>{if(!u||!s.value||!P.value)return;const p=P.value.clientWidth,h=P.value.clientHeight;s.value.width=p,s.value.height=h;const c=4,r=8;u.lineWidth=c;const y=u.createLinearGradient(0,0,p,h);y.addColorStop(0,"#4f46e5"),y.addColorStop(.5,"#7c3aed"),y.addColorStop(1,"#db2777"),u.strokeStyle="rgba(229, 231, 235, 0.2)",f(u,c/2,c/2,p-c,h-c,r),u.stroke();const z=((p+h)*2-8*r+2*Math.PI*r)*k.progress/100;u.strokeStyle=y,u.lineCap="round",u.lineJoin="round",u.beginPath();let i=z;const v=c/2,T=p-c,F=h-c;if(i>0){const g=Math.min(T-2*r,i);u.moveTo(r+v,v),u.lineTo(g+r+v,v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(T-r+v,r+v,r,-Math.PI/2,g-Math.PI/2,!1),i-=g*r}if(i>0){const g=Math.min(F-2*r,i);u.lineTo(T+v,g+r+v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(T-r+v,F-r+v,r,0,g,!1),i-=g*r}if(i>0){const g=Math.min(T-2*r,i);u.lineTo(T-g-r+v,F+v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(r+v,F-r+v,r,Math.PI/2,Math.PI/2+g,!1),i-=g*r}if(i>0){const g=Math.min(F-2*r,i);u.lineTo(v,F-g-r+v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(r+v,r+v,r,Math.PI,Math.PI+g,!1)}u.stroke()};function f(p,h,c,r,y,m){p.beginPath(),p.moveTo(h+m,c),p.lineTo(h+r-m,c),p.arcTo(h+r,c,h+r,c+m,m),p.lineTo(h+r,c+y-m),p.arcTo(h+r,c+y,h+r-m,c+y,m),p.lineTo(h+m,c+y),p.arcTo(h,c+y,h,c+y-m,m),p.lineTo(h,c+m),p.arcTo(h,c,h+m,c,m),p.closePath()}return ne(()=>{s.value&&(u=s.value.getContext("2d"),w())}),Me(()=>k.progress,w),(p,h)=>(S(),M("div",{class:"border-progress-container",ref_key:"container",ref:P},[e("canvas",{ref_key:"canvas",ref:s,class:"border-progress-canvas"},null,512)],512))}}),Ge=le(We,[["__scopeId","data-v-2fbf5085"]]),ce=async(_,k={})=>{const{successMsg:P="复制成功",errorMsg:s="复制失败,请手动复制",showMsg:u=!0}=k,w=ie();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(_),u&&w.showAlert(P,"success"),!0;const f=document.createElement("textarea");f.value=_,f.style.position="fixed",f.style.opacity="0",document.body.appendChild(f),f.select();const p=document.execCommand("copy");if(document.body.removeChild(f),p)return u&&w.showAlert(P,"success"),!0;throw new Error("execCommand copy failed")}catch(f){return console.error("复制失败:",f),u&&w.showAlert(s,"error"),!1}},re=async _=>{const k=`${window.location.origin}/#/?code=${_}`;return ce(k,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},Oe=async _=>ce(_,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),ae=_=>_>=1024*1024*1024?Math.round(_/(1024*1024*1024))+"GB":_>=1024*1024?Math.round(_/(1024*1024))+"MB":Math.round(_/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"},ot=["value"],rt={key:0,class:"flex items-center space-x-2"},at={class:"relative flex-grow"},st=["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"},pt={class:"flex-shrink-0 flex space-x-2"},gt=["onClick"],ft=["onClick"],ht=["onClick"],vt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},xt={class:"space-y-4"},mt={class:"flex items-center"},yt={class:"flex items-center"},bt={class:"flex items-center"},wt={class:"flex items-center"},kt={class:"mt-6 flex justify-between items-center"},_t={class:"flex flex-col items-center w-1/2 pr-2"},Ct={class:"text-2xl font-bold text-indigo-600"},Mt={class:"flex flex-col items-center w-1/2 pl-2"},St={class:"bg-white p-2 rounded-lg shadow-md"},zt=se({__name:"SendFileView",setup(_){const k=JSON.parse(localStorage.getItem("config")||"{}"),P=Pe(),s=ze("isDarkMode"),u=Fe(),w=I("file"),f=I(null),p=I(""),h=I(null),c=I("day"),r=I("1"),y=I(0),m=I(!1),z=I(null),i=ie(),v=Se(()=>u.shareData),T=I(""),F=()=>{var n;(n=h.value)==null||n.click()},g=async n=>{const t=n.target;if(t.files&&t.files.length>0){const d=t.files[0];if(f.value=d,!G())return;T.value=await q(d),console.log(T.value)}},de=async n=>{var t;if((t=n.dataTransfer)!=null&&t.files&&n.dataTransfer.files.length>0){const d=n.dataTransfer.files[0];if(f.value=d,!G())return;T.value=await q(d)}},ue=async n=>{var d;const t=(d=n.clipboardData)==null?void 0:d.items;if(t){for(const a of t)if(a.kind==="file"){const b=a.getAsFile();if(b){if(f.value=b,!G())return;T.value=await q(b),i.showAlert("已从剪贴板添加文件:"+b.name,"success");break}}}},q=async n=>new Promise(t=>{const a=new FileReader;let b=0;const D=Math.ceil(n.size/2097152);a.onload=async $=>{const A=new Uint8Array($.target.result),V=await crypto.subtle.digest("SHA-256",A),O=Array.from(new Uint8Array(V)).map(H=>H.toString(16).padStart(2,"0")).join("");b++,b<D?R():t(O)};const R=()=>{const $=b*2097152,A=$+2097152>=n.size?n.size:$+2097152;a.readAsArrayBuffer(n.slice($,A))};R()}),pe=(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""}},ge=async n=>{var t,d;try{const b=Math.ceil(n.size/5242880),D=await L.post("/chunk/upload/init/",{file_name:n.name,file_size:n.size,chunk_size:5242880,file_hash:T.value});if(D.code!==200)throw new Error("初始化切片上传失败");if(D.detail.existed)return D;const R=D.detail.upload_id;for(let A=0;A<b;A++){const V=A*5242880,Y=Math.min(V+5242880,n.size),O=n.slice(V,Y),H=new FormData;if(H.append("chunk",new Blob([O],{type:n.type})),(await L.post(`/chunk/upload/chunk/${R}/${A}`,H,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:_e=>{const Ce=Math.round((A*5242880+_e.loaded)*100/n.size);y.value=Ce}})).code!==200)throw new Error(`切片 ${A} 上传失败`)}const $=await L.post(`/chunk/upload/complete/${R}`,{expire_value:r.value?parseInt(r.value):1,expire_style:c.value});if($.code!==200)throw new Error("完成上传失败");return $}catch(a){throw console.error("切片上传失败:",a),(d=(t=a.response)==null?void 0:t.data)!=null&&d.detail?i.showAlert(a.response.data.detail,"error"):i.showAlert("上传失败,请稍后重试","error"),a}},fe=async n=>{const t=new FormData,d={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:b=>{const D=Math.round(b.loaded*100/b.total);y.value=D}};return t.append("file",n),t.append("expire_value",r.value),t.append("expire_style",c.value),await L.post("/share/file/",t,d)},he=()=>k.openUpload===0&&localStorage.getItem("token")===null?(i.showAlert("游客上传功能已关闭","error"),!1):!0,ve=n=>n.size>k.uploadSize?(i.showAlert(`文件大小超过限制 (${ae(k.uploadSize)})`,"error"),f.value=null,!1):!0,K=(n,t)=>{if(n==="forever"||n==="count")return!0;const d=k.max_save_seconds||0;if(d===0)return!0;let a=0;switch(n){case"minute":a=parseInt(t)*60;break;case"hour":a=parseInt(t)*3600;break;case"day":a=parseInt(t)*86400;break;default:return!1}return a<=d},G=()=>!(!he()||!ve(f.value)||!K(c.value,r.value)),xe=async()=>{var n,t;if(w.value==="file"&&!f.value){i.showAlert("请选择要上传的文件","error");return}if(w.value==="text"&&!p.value.trim()){i.showAlert("请输入要发送的文本","error");return}if(c.value!=="forever"&&!r.value){i.showAlert("请输入过期值","error");return}if(!K(c.value,r.value)){const d=Math.floor(k.max_save_seconds/86400);i.showAlert(`过期时间不能超过${d}天`,"error");return}try{let d;if(w.value==="file")k.enableChunk?d=await ge(f.value):d=await fe(f.value);else{const a=new FormData;a.append("text",p.value),a.append("expire_value",r.value),a.append("expire_style",c.value),d=await L.post("/share/text/",a,{headers:{"Content-Type":"multipart/form-data"}})}if(d&&d.code===200){const a=d.detail.code,b=d.detail.name,D={id:Date.now(),filename:b,date:new Date().toISOString().split("T")[0],size:w.value==="text"?`${(p.value.length/1024).toFixed(2)} KB`:`${(f.value.size/(1024*1024)).toFixed(1)} MB`,expiration:c.value==="forever"?"永久":`${r.value}${W()}后过期`,retrieveCode:a};u.addShareData(D),i.showAlert(`文件发送成功!取件码:${a}`,"success"),f.value=null,p.value="",r.value="",y.value=0,m.value=!0,await re(a)}else throw new Error("服务器响应异常")}catch(d){console.error("发送失败:",d),(t=(n=d.response)==null?void 0:n.data)!=null&&t.detail?i.showAlert(d.response.data.detail,"error"):i.showAlert("发送失败,请稍后重试","error")}finally{y.value=0}},me=()=>{P.push("/")},X=()=>{m.value=!m.value},ye=n=>{z.value=n},be=n=>{const t=u.shareData.findIndex(d=>d.id===n);t!==-1&&u.deleteShareData(t)},we=window.location.origin+"/#/",ke=n=>`${we}?code=${n.retrieveCode}`;return ne(()=>{console.log("SendFileView mounted")}),(n,t)=>{const d=Ie("router-link");return S(),M("div",Qe,[e("div",{class:l(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[o(s)?"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",[o(s)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:me},C(o(k).name),3),e("form",{onSubmit:E(xe,["prevent"]),class:"space-y-8"},[e("div",Ke,[e("button",{type:"button",onClick:t[0]||(t[0]=a=>w.value="file"),class:l(["px-4 py-2 rounded-lg",w.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),e("button",{type:"button",onClick:t[1]||(t[1]=a=>w.value="text"),class:l(["px-4 py-2 rounded-lg",w.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),x(J,{name:"fade",mode:"out-in"},{default:B(()=>[w.value==="file"?(S(),M("div",{key:"file",class:"grid grid-cols-1 gap-8",onPaste:E(ue,["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",[o(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:F,onDragover:t[2]||(t[2]=E(()=>{},["prevent"])),onDrop:E(de,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:g,ref_key:"fileInput",ref:h},null,544),y.value>0?(S(),M("div",Xe,[x(Ge,{progress:y.value},null,8,["progress"])])):j("",!0),x(o(Ne),{class:l(["w-16 h-16 transition-colors duration-300",o(s)?"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",o(s)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Ye,C(f.value?f.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:l(["mt-2 text-xs",o(s)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+C(o(ae)(o(k).uploadSize)),3)],34)],32)):(S(),M("div",Ze,[w.value==="text"?(S(),M("div",et,[Q(e("textarea",{id:"text-content","onUpdate:modelValue":t[3]||(t[3]=a=>p.value=a),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",o(s)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[Z,p.value]])])):j("",!0)]))]),_:1}),e("div",tt,[e("label",{class:l(["text-sm font-medium",o(s)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),Q(e("select",{"onUpdate:modelValue":t[4]||(t[4]=a=>c.value=a),class:l(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",o(s)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(S(!0),M(ee,null,te(o(k).expireStyle,a=>(S(),M("option",{value:a,key:a},C(W(a)),9,ot))),128))],2),[[Te,c.value]]),c.value!=="forever"?(S(),M("div",rt,[e("div",at,[Q(e("input",{"onUpdate:modelValue":t[5]||(t[5]=a=>r.value=a),type:"number",placeholder:pe(),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",o(s)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,st),[[Z,r.value]]),e("span",{class:l(["absolute right-3 top-1/2 transform -translate-y-1/2",o(s)?"text-gray-300":"text-gray-700"])},C(W()),3)])])):j("",!0)]),e("button",nt,[t[9]||(t[9]=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,[x(o(qe),{class:"w-6 h-6 mr-2"}),t[8]||(t[8]=e("span",null,"安全寄送",-1))])])],32),e("div",it,[x(d,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:B(()=>t[10]||(t[10]=[U(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:l(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[o(s)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:l(["text-sm flex items-center",[o(s)?"text-gray-300":"text-gray-800"]])},[x(o($e),{class:"w-4 h-4 mr-1 text-green-400"}),t[11]||(t[11]=U(" 安全加密 "))],2),e("button",{onClick:X,class:l(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[o(s)?"text-indigo-400":"text-indigo-600"]])},[t[12]||(t[12]=U(" 发件记录 ")),x(o(Ue),{class:"w-4 h-4 ml-1"})],2)],2)],2),x(J,{name:"drawer"},{default:B(()=>[m.value?(S(),M("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",[o(s)?"bg-gray-900":"bg-white"]])},[e("div",{class:l(["flex justify-between items-center p-6 border-b",[o(s)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:l(["text-2xl font-bold",[o(s)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:X,class:l(["hover:text-white transition duration-300",[o(s)?"text-gray-400":"text-gray-800"]])},[x(o(De),{class:"w-6 h-6"})],2)],2),e("div",ct,[x(Ae,{name:"list",tag:"div",class:"space-y-4"},{default:B(()=>[(S(!0),M(ee,null,te(v.value,a=>(S(),M("div",{key:a.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",[o(s)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",dt,[x(o(oe),{class:l(["w-10 h-10",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",ut,[e("p",{class:l(["font-medium text-lg truncate",[o(s)?"text-white":"text-gray-800"]])},C(a.filename?a.filename:"Text"),3),e("p",{class:l(["text-sm truncate",[o(s)?"text-gray-400":"text-gray-600"]])},C(a.date)+" · "+C(a.size),3)]),e("div",pt,[e("button",{onClick:b=>o(re)(a.retrieveCode),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(s)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[x(o(He),{class:"w-5 h-5"})],10,gt),e("button",{onClick:b=>ye(a),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(s)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[x(o(je),{class:"w-5 h-5"})],10,ft),e("button",{onClick:b=>be(a.id),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(s)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[x(o(Ve),{class:"w-5 h-5"})],10,ht)])],2))),128))]),_:1})])],2)):j("",!0)]),_:1}),x(J,{name:"fade"},{default:B(()=>[z.value?(S(),M("div",vt,[e("div",{class:l(["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",[o(s)?"bg-gray-800":"bg-white"]])},[e("h3",{class:l(["text-2xl font-bold mb-6",[o(s)?"text-white":"text-gray-800"]])}," 文件详情 ",2),e("div",xt,[e("div",mt,[x(o(oe),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[13]||(t[13]=e("span",{class:"font-medium"},"文件名:",-1)),U(C(z.value.filename),1)],2)]),e("div",yt,[x(o(Re),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[14]||(t[14]=e("span",{class:"font-medium"},"发送日期:",-1)),U(C(z.value.date),1)],2)]),e("div",bt,[x(o(Le),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[15]||(t[15]=e("span",{class:"font-medium"},"文件大小:",-1)),U(C(z.value.size),1)],2)]),e("div",wt,[x(o(Ee),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[16]||(t[16]=e("span",{class:"font-medium"},"过期时间:",-1)),U(C(z.value.expiration),1)],2)])]),e("div",kt,[e("div",_t,[e("h4",{class:l(["text-lg font-semibold mb-3",[o(s)?"text-white":"text-gray-800"]])}," 取件码 ",2),e("div",{class:"bg-gray-100 p-3 rounded-lg shadow-md cursor-pointer hover:bg-gray-200 transition-colors duration-300 w-full text-center",onClick:t[6]||(t[6]=a=>o(Oe)(z.value.retrieveCode))},[e("p",Ct,C(z.value.retrieveCode),1)]),e("p",{class:l(["mt-2 text-sm",[o(s)?"text-gray-400":"text-gray-600"]])}," 点击复制取件码 ",2)]),e("div",Mt,[e("h4",{class:l(["text-lg font-semibold mb-3",[o(s)?"text-white":"text-gray-800"]])}," 二维码 ",2),e("div",St,[x(Be,{value:ke(z.value),size:128,level:"M"},null,8,["value"])]),e("p",{class:l(["mt-2 text-sm",[o(s)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)])]),e("button",{onClick:t[7]||(t[7]=a=>z.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)])):j("",!0)]),_:1})])}}}),$t=le(zt,[["__scopeId","data-v-99bb4a5e"]]);export{$t as default};