![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.ca/private_html/.next/server/chunks/ |
exports.id=6847,exports.ids=[6847],exports.modules={46847:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var a=s(8732),l=s(82015);s(86120),s(81430);let r=["text/plain","text/markdown","text/csv","application/json","text/x-log","text/x-yaml","text/yaml","text/xml","application/xml","text/html","text/css","text/javascript","application/javascript","application/typescript","text/typescript"],i=[".txt",".md",".csv",".log",".json",".ts",".js",".css",".html",".xml",".yaml",".yml"],n=({url:e,type:t,name:s,status:n,onApprove:o,onReject:x,onDelete:c,isAdmin:d})=>{let[m,p]=(0,l.useState)(null),[h,f]=(0,l.useState)(!1),[u,v]=(0,l.useState)(null),y=()=>{let e=s?s.slice(s.lastIndexOf(".")).toLowerCase():"";return r.includes(t)||i.includes(e)};return((0,l.useEffect)(()=>{y()&&(f(!0),v(null),fetch(e).then(e=>{if(!e.ok)throw Error("Failed to fetch file");return e.text()}).then(p).catch(e=>v(e.message)).finally(()=>f(!1)))},[e,t,s]),y())?h?(0,a.jsx)("div",{className:"p-8 text-center text-gray-500",children:"Loading preview..."}):u?(0,a.jsxs)("div",{className:"p-8 text-center text-red-600",children:["Failed to load file: ",u]}):(0,a.jsx)("div",{className:"p-4 max-h-[70vh] overflow-auto bg-gray-900 text-gray-100 rounded-lg shadow-inner border border-gray-300 text-left",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm font-mono",children:m})}):(0,a.jsxs)("div",{className:"p-8 text-center text-red-600 font-bold",children:["PDF viewing is temporarily disabled for stability. Please contact the admin if you need this feature re-enabled.",(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"block mt-2 text-gray-500",children:"Preview not available for this file type."}),d&&(0,a.jsxs)("div",{className:"mt-4 text-sm",children:["Admin mode: ",s]})]})},o=e=>(0,a.jsx)(n,{...e})},81430:()=>{},86120:()=>{}};