PageSourceSearch

https://dropdock-five.vercel.app/_next/static/chunks/163-86b0266c15945260.js

js dropdock-five.vercel.app collected 2026-10-03 06:48:13 UTC 16,002 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[163],{9361:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(95155);a(12115);var n=a(66766),i=a(53999);let l=e=>{let{type:t,extension:a,url:l="",imageClassName:r,className:o}=e,d="image"===t&&"svg"!==a;return(0,s.jsx)("figure",{className:(0,i.cn)("thumbnail",o),children:(0,s.jsx)(n.default,{src:d?l:(0,i.I3)(a,t),alt:"Thumbnail",width:100,height:100,className:(0,i.cn)("size-8 object-contain",r,d&&"thumbnail-image")})})}},16958:(e,t,a)=>{a.d(t,{A:()=>i});var s=a(95155);a(12115);var n=a(53999);let i=e=>{let{date:t,className:a}=e;return(0,s.jsx)("p",{className:(0,n.cn)("body-1 text-light-200",a),children:(0,n.r6)(t)})}},23312:(e,t,a)=>{a.d(t,{Cn:()=>s,To:()=>n,w3:()=>l,wE:()=>i});let s=[{name:"Dashboard",icon:"/assets/icons/dashboard.svg",url:"/"},{name:"Documents",icon:"/assets/icons/documents.svg",url:"/documents"},{name:"Images",icon:"/assets/icons/images.svg",url:"/images"},{name:"Media",icon:"/assets/icons/video.svg",url:"/media"},{name:"Others",icon:"/assets/icons/others.svg",url:"/others"}],n=[{label:"Rename",icon:"/assets/icons/edit.svg",value:"rename"},{label:"Details",icon:"/assets/icons/info.svg",value:"details"},{label:"Share",icon:"/assets/icons/share.svg",value:"share"},{label:"Download",icon:"/assets/icons/download.svg",value:"download"},{label:"Delete",icon:"/assets/icons/delete.svg",value:"delete"}],i=[{label:"Date created (newest)",value:"$createdAt-desc"},{label:"Created Date (oldest)",value:"$createdAt-asc"},{label:"Name (A-Z)",value:"name-asc"},{label:"Name (Z-A)",value:"name-desc"},{label:"Size (Highest)",value:"size-desc"},{label:"Size (Lowest)",value:"size-asc"}],l=0x3200000},53999:(e,t,a)=>{a.d(t,{$4:()=>u,Ad:()=>l,BR:()=>r,I3:()=>d,TU:()=>o,cn:()=>i,r6:()=>m,ti:()=>c});var s=a(52596),n=a(39688);function i(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,n.QP)((0,s.$)(t))}let l=e=>URL.createObjectURL(e),r=(e,t)=>e<1024?e+" Bytes":e<1048576?(e/1024).toFixed(t||1)+" KB":e<0x40000000?(e/1048576).toFixed(t||1)+" MB":(e/0x40000000).toFixed(t||1)+" GB",o=e=>"".concat("https://fra.cloud.appwrite.io/v1","/storage/buckets/").concat("68a9fb1c002a5ce15f73","/files/").concat(e,"/download?project=").concat("68a9e9e0003420a4be5b"),d=(e,t)=>{switch(e){case"pdf":return"/assets/icons/file-pdf.svg";case"doc":return"/assets/icons/file-doc.svg";case"docx":return"/assets/icons/file-docx.svg";case"csv":return"/assets/icons/file-csv.svg";case"txt":return"/assets/icons/file-txt.svg";case"xls":case"xlsx":return"/assets/icons/file-document.svg";case"svg":return"/assets/icons/file-image.svg";case"mkv":case"mov":case"avi":case"wmv":case"mp4":case"flv":case"webm":case"m4v":case"3gp":return"/assets/icons/file-video.svg";case"mp3":case"mpeg":case"wav":case"aac":case"flac":case"ogg":case"wma":case"m4a":case"aiff":case"alac":return"/assets/icons/file-audio.svg";default:switch(t){case"image":return"/assets/icons/file-image.svg";case"document":return"/assets/icons/file-document.svg";case"video":return"/assets/icons/file-video.svg";case"audio":return"/assets/icons/file-audio.svg";default:return"/assets/icons/file-other.svg"}}},c=e=>{let t=(e||"").split(/[?#]/)[0].split("/").pop()||"",a=t.lastIndexOf("."),s=a>0?t.slice(a).toLowerCase():null,n=new Set([".png",".jpg",".jpeg",".gif",".webp",".bmp",".svg",".tiff",".ico"]),i=new Set([".mp4",".mov",".avi",".mkv",".webm",".flv"]),l=new Set([".mp3",".wav",".ogg",".flac",".aac",".m4a"]),r=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".rtf"]),o=new Set([".zip",".rar",".7z",".tar",".gz",".tgz"]),d=new Set([".js",".ts",".jsx",".tsx",".json",".html",".css",".scss",".py",".java",".c",".cpp",".go",".rb",".php",".rs"]);return s?n.has(s)?{type:"image",extension:s}:i.has(s)?{type:"video",extension:s}:l.has(s)?{type:"audio",extension:s}:r.has(s)?{type:"document",extension:s}:o.has(s)?{type:"archive",extension:s}:d.has(s)?{type:"code",extension:s}:{type:"other",extension:s}:{type:"unknown",extension:null}},u=e=>Number((e/0x80000000*100).toFixed(2)),m=e=>{if(!e)return"—";let t=new Date(e),a=t.getHours(),s=t.getMinutes(),n=a>=12?"pm":"am";a=a%12||12;let i="".concat(a,":").concat(s.toString().padStart(2,"0")).concat(n),l=t.getDate(),r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()];return"".concat(i,", ").concat(l," ").concat(r)}},60163:(e,t,a)=>{a.d(t,{default:()=>B});var s=a(95155),n=a(97168),i=a(12115),l=a(87625),r=a(54416),o=a(53999);function d(e){let{...t}=e;return(0,s.jsx)(l.bL,{"data-slot":"dialog",...t})}function c(e){let{...t}=e;return(0,s.jsx)(l.ZL,{"data-slot":"dialog-portal",...t})}function u(e){let{className:t,...a}=e;return(0,s.jsx)(l.hJ,{"data-slot":"dialog-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function m(e){let{className:t,children:a,showCloseButton:n=!0,...i}=e;return(0,s.jsxs)(c,{"data-slot":"dialog-portal",children:[(0,s.jsx)(u,{}),(0,s.jsxs)(l.UC,{"data-slot":"dialog-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
1ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...i,children:[a,n&&(0,s.jsxs)(l.bm,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,s.jsx)(r.A,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function f(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"dialog-header",className:(0,o.cn)("flex flex-col gap-2 text-center sm:text-left",t),...a})}function v(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"dialog-footer",className:(0,o.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function x(e){let{className:t,...a}=e;return(0,s.jsx)(l.hE,{"data-slot":"dialog-title",className:(0,o.cn)("text-lg leading-none font-semibold",t),...a})}var g=a(89852),p=a(63473);function h(e){let{...t}=e;return(0,s.jsx)(p.bL,{"data-slot":"dropdown-menu",...t})}function b(e){let{...t}=e;return(0,s.jsx)(p.l9,{"data-slot":"dropdown-menu-trigger",...t})}function j(e){let{className:t,sideOffset:a=4,...n}=e;return(0,s.jsx)(p.ZL,{children:(0,s.jsx)(p.UC,{"data-slot":"dropdown-menu-content",sideOffset:a,className:(0,o.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...n})})}function w(e){let{className:t,inset:a,variant:n="default",...i}=e;return(0,s.jsx)(p.q7,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":n,className:(0,o.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...i})}function N(e){let{className:t,inset:a,...n}=e;return(0,s.jsx)(p.JU,{"data-slot":"dropdown-menu-label","data-inset":a,className:(0,o.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...n})}function y(e){let{className:t,...a}=e;return(0,s.jsx)(p.wv,{"data-slot":"dropdown-menu-separator",className:(0,o.cn)("bg-border -mx-1 my-1 h-px",t),...a})}var k=a(66766),S=a(23312),z=a(6874),C=a.n(z),A=a(34477);let F=(0,A.createServerReference)("7f8dbf5d251100b42f45a6afc71b6a3155003b8e33",A.callServer,void 0,A.findSourceMapURL,"renameFile"),$=(0,A.createServerReference)("7f799956b6999b033bb0410f1c4f7d633358cb5eca",A.callServer,void 0,A.findSourceMapURL,"updateFileUsers"),_=(0,A.createServerReference)("7ff6f7b8382c1e3b70bae5955310dc4823ec3f4b98",A.callServer,void 0,A.findSourceMapURL,"deleteFile");var L=a(35695),R=a(9361),I=a(16958);let D=e=>{let{file:t}=e;return(0,s.jsxs)("div",{className:"file-details-thumbnail",children:[(0,s.jsx)(R.A,{type:t.type,extension:t.extension,url:t.url}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("p",{className:"subtitle-2 mb-1",children:t.name}),(0,s.jsx)(I.A,{date:t.$createdAt,className:"caption"})]})]})},U=e=>{let{label:t,value:a}=e;return(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)("p",{className:"file-details-label text-left",children:t}),(0,s.jsx)("p",{className:"file-details-value text-left",children:a})]})},M=e=>{let{file:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(D,{file:t}),(0,s.jsxs)("div",{className:"space-y-4 px-2 pt-2",children:[(0,s.jsx)(U,{label:"Format:",value:t.extension}),(0,s.jsx)(U,{label:"Size:",value:(0,o.BR)(t.size)}),(0,s.jsx)(U,{label:"Owner:",value:"Fahid Javid"}),(0,s.jsx)(U,{label:"Last edit:",value:(0,o.r6)(t.$updatedAt)})]})]})},O=e=>{let{file:t,onInputChange:a,onRemove:i}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(D,{file:t}),(0,s.jsxs)("div",{className:"share-wrapper",children:[(0,s.jsx)("p",{className:"subtitle-2 pl-1 text-light-100",children:"Share file with other users "}),(0,s.jsx)(g.p,{type:"email",placeholder:"Enter email address",onChange:e=>a(e.target.value.trim().split(",")),className:"share-input-field"}),(0,s.jsxs)("div",{className:"pt-4",children:[(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("p",{className:"subtitle-2 text-light-100",children:"Shared with"}),(0,s.jsxs)("p",{className:"subtitle-2 text-light-200",children:[t.users.length," users "]})]}),(0,s.jsx)("ul",{className:"pt-2",children:t.users.map(e=>(0,s.jsxs)("li",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"subtitle-2",children:e}),(0,s.jsx)(n.$,{onClick:()=>i(e),className:"share-remove-user",children:(0,s.jsx)(k.default,{src:"/assets/icons/remove.svg",alt:"Remove",width:24,height:24,className:"remove-icon"})})]},e))})]})]})]})},B=e=>{let{file:t}=e,[a,l]=(0,i.useState)(!1),[r,c]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[z,A]=(0,i.useState)(t.name),[R,I]=(0,i.useState)(!1),[D,U]=(0,i.useState)([]),B=(0,L.usePathname)(),J=()=>{l(!1),c(!1),p(null),A(t.name)},E=async()=>
1{if(!u)return;I(!0);let e=!1;await ({rename:()=>F({fileId:t.$id,name:z,extension:t.extension,path:B}),share:()=>$({fileId:t.$id,emails:D,path:B}),delete:()=>_({fileId:t.$id,bucketFileId:t.bucketFileId,path:B})})[u.value]()&&J(),I(!1)},T=async e=>{let a=D.filter(t=>t!==e);await $({fileId:t.$id,emails:a,path:B})&&U(a),J()};return(0,s.jsxs)(d,{open:a,onOpenChange:l,children:[(0,s.jsxs)(h,{open:r,onOpenChange:c,children:[(0,s.jsx)(b,{asChild:!0,className:"shad-no-focus",children:(0,s.jsx)(k.default,{src:"/assets/icons/dots.svg",alt:"...",width:34,height:34})}),(0,s.jsxs)(j,{className:"w-56",align:"start",children:[(0,s.jsx)(N,{className:"max-w-[200px] truncate",children:t.name}),(0,s.jsx)(y,{}),S.To.map(e=>(0,s.jsx)(w,{className:"shad-dropdown-item",onClick:()=>{p(e),["rename","share","delete","details"].includes(e.value)&&l(!0)},children:"download"===e.value?(0,s.jsxs)(C(),{href:(0,o.TU)(t.bucketFileId),download:t.name,className:"flex items-center gap-2",children:[(0,s.jsx)(k.default,{src:e.icon,alt:e.label,width:30,height:30}),e.label]}):(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(k.default,{src:e.icon,alt:e.label,width:30,height:30}),e.label]})},e.value))]})]}),(()=>{if(!u)return null;let[e,a]=[u.value,u.label];return(0,s.jsxs)(m,{className:"shad-dialog button",children:[(0,s.jsx)(f,{className:"flex flex-col gap-3",children:(0,s.jsx)(x,{className:"text-center text-light-100",children:a})}),"rename"===e&&(0,s.jsx)(g.p,{type:"text",value:z,onChange:e=>A(e.target.value)}),"details"===e&&(0,s.jsx)(M,{file:t}),"share"===e&&(0,s.jsx)(O,{file:t,onInputChange:U,onRemove:T}),"delete"===e&&(0,s.jsxs)("p",{className:"delete-confirmation",children:["Are you sure you want to delete"," ",(0,s.jsx)("span",{className:"delete-file-name",children:t.name}),"?"]}),["rename","delete","share"].includes(e)&&(0,s.jsxs)(v,{className:"flex flex-col gap-3 md:flex-row",children:[(0,s.jsx)(n.$,{onClick:J,className:"modal-cancel-button",children:"Cancel"}),(0,s.jsxs)(n.$,{onClick:E,className:"modal-submit-button",children:[(0,s.jsx)("p",{className:"capitalize",children:e}),R&&(0,s.jsx)(k.default,{src:"/assets/icons/loader.svg",alt:"Loading...",width:24,height:24,className:"animate-spin"})]})]})]})})()]})}},89852:(e,t,a)=>{a.d(t,{p:()=>i});var s=a(95155);a(12115);var n=a(53999);function i(e){let{className:t,type:a,...i}=e;return(0,s.jsx)("input",{type:a,"data-slot":"input",className:(0,n.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...i})}},97168:(e,t,a)=>{a.d(t,{$:()=>o,r:()=>r});var s=a(95155);a(12115);var n=a(99708),i=a(74466),l=a(53999);let r=(0,i.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:a,size:i,asChild:o=!1,...d}=e,c=o?n.DX:"button";return(0,s.jsx)(c,{"data-slot":"button",className:(0,l.cn)(r({variant:a,size:i,className:t})),...d})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.