PageSourceSearch

https://behmalt.com/_next/static/chunks/6601-f8b21dea212f7741.js

js behmalt.com collected 2026-09-25 10:25:19 UTC 8,533 bytes, 13 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6601],{409:(e,a,t)=>{t.d(a,{Bl:()=>g,HP:()=>u,PW:()=>o,Si:()=>m,Yp:()=>x,e2:()=>p,lg:()=>h,p:()=>c,pK:()=>y});var l=t(12115),r=t(22356),s=t(25366),i=t(26708),n=t(35625),d=t(48934);let o=(e=10)=>{let a=function(e=10){return"number"==typeof e?{pageSize:e,searchTerm:"",folderId:null,enabled:!0}:{pageSize:e.pageSize??10,searchTerm:e.searchTerm??"",folderId:e.folderId??null,enabled:e.enabled??!0}}(e);return(0,s.q)({queryKey:["media","get-all-medias",a],initialPageParam:1,enabled:a.enabled,queryFn:async({pageParam:e=1})=>{let t=new URLSearchParams({page:String(e),pageSize:String(a.pageSize)});return a.searchTerm.trim()&&t.set("searchTerm",a.searchTerm.trim()),a.folderId&&t.set("folderId",a.folderId),(await r.FH.get(`/FileManager/GetAll?${t.toString()}`)).data},getNextPageParam:e=>e.hasMore?e.nextPage:void 0})},c=(e="")=>(0,i.I)({queryKey:["media","folders",e],queryFn:async()=>{let a=new URLSearchParams;return e.trim()&&a.set("term",e.trim()),(await r.FH.get(`/FileManager/GetFolders${a.toString()?`?${a.toString()}`:""}`)).data}}),m=()=>{let e=(0,n.jE)();return(0,d.n)({mutationFn:async e=>(await r.FH.post("/FileManager/CreateFolder",e)).data,onSuccess:()=>{e.invalidateQueries({queryKey:["media","folders"]})}})},u=()=>{let e=(0,n.jE)();return(0,d.n)({mutationFn:async e=>(await r.FH.put("/FileManager/UpdateFolder",e)).data,onSuccess:()=>{e.invalidateQueries({queryKey:["media","folders"]}),e.invalidateQueries({queryKey:["media","get-all-medias"]})}})},p=()=>{let e=(0,n.jE)();return(0,d.n)({mutationFn:async e=>{let a="string"==typeof e?e:e.folderId,t="string"!=typeof e&&!!e.moveFilesToRoot;return(await r.FH.delete(`/FileManager/RemoveFolderById/${a}`,{params:{moveFilesToRoot:t}})).data},onSuccess:()=>{e.invalidateQueries({queryKey:["media","folders"]}),e.invalidateQueries({queryKey:["media","get-all-medias"]}),e.invalidateQueries({queryKey:["media"]})}})},f=async(e,a)=>{let t=new FormData;return t.append("description",e?.description??""),e.folderId&&t.append("folderId",e.folderId),e.folderName&&t.append("folderName",e.folderName),t.append("applyImageCopyright",e?.applyImageCopyright?"true":"false"),(e?.files??[]).forEach(e=>{t.append("files",e)}),await r.FH.post("/FileManager/UploadMany",t,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:a?.onUploadProgress})},x=()=>{let e=(0,n.jE)();return(0,d.n)({mutationFn:async e=>(await r.FH.delete(`/FileManager/RemoveById/${e}`)).data,onSuccess:()=>{e.invalidateQueries({queryKey:["media"]})}})},g=()=>{let e=(0,n.jE)();return(0,d.n)({mutationFn:async e=>(await r.FH.put("/FileManager/MoveMedia",e)).data,onSuccess:()=>{e.invalidateQueries({queryKey:["media"]}),e.invalidateQueries({queryKey:["media","folders"]})}})},y=()=>{let e=(0,n.jE)();return(0,d.n)({mutationFn:async e=>(await r.FH.post("/FileManager/EditImage",e)).data,onSuccess:()=>{e.invalidateQueries({queryKey:["media"]}),e.invalidateQueries({queryKey:["media","folders"]})}})},h=()=>{let e=(0,n.jE)(),[a,t]=(0,l.useState)(0);return{...(0,d.n)({mutationFn:async e=>await f(e,{onUploadProgress:e=>{t(Math.round(100*e.loaded/(e.total||1)))}}),onSuccess:()=>{t(0),e.invalidateQueries({queryKey:["media"]})},onError:()=>{t(0)}}),progress:a}}},62662:(e,a,t)=>{t.d(a,{p:()=>r});var l,r=((l={})[l.Image=1]="Image",l[l.Document=2]="Document",l[l.Video=3]="Video",l[l.Audio=4]="Audio",l[l.Other=99]="Other",l)},93745:(e,a,t)=>{t.d(a,{A:()=>d});var l=t(95155),r=t(62662),s=t(90346),i=t(6576),n=t(12115);function d({file:e,className:a="",variant:t="default"}){let[o,c]=(0,n.useState)(!1),[m,u]=(0,n.useState)(!1),p="compact"===t,f=e.filePath,x="displayName"in e?String(e.displayName||""):"originalFileName"in e?String(e.originalFileName||""):"fileName"in e?String(e.fileName||""):f.split("/").pop()||"file",g="uploadedDateTime"in e&&e.uploadedDateTime?new Date(e.uploadedDateTime).getTime():void 0,y=g?`${(0,i.IB)(f)}${(0,i.IB)(f).includes("?")?"&":"?"}v=${g}`:(0,i.IB)(f),h=e.fileType;if(!h){let e=f.split(".").pop()?.toLowerCase()||"";h=["jpg","jpeg","png","gif","webp","svg","avif","bmp"].includes(e)?r.p.Image:["mp4","mov","avi","mkv","webm","flv","
1wmv"].includes(e)?r.p.Video:["mp3","wav","ogg","aac","flac","m4a"].includes(e)?r.p.Audio:r.p.Document}let v=`
2    w-full
3    ${p?"h-24":"h-full"}
4    flex
5    items-center
6    justify-center
7    overflow-hidden
8    rounded-xl
9    bg-gray-50
10    dark:bg-slate-700
11    relative
12    group
13  `;return(0,l.jsxs)("div",{className:`${v} ${a}`,children:[(()=>{switch(h){case r.p.Image:return(0,l.jsxs)(l.Fragment,{children:[o&&(0,l.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-gray-100 dark:bg-slate-600",children:(0,l.jsx)(s.tK,{size:"small"})}),m?(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center text-gray-400 dark:text-gray-500",children:[(0,l.jsx)("i",{className:"fas fa-image text-4xl"}),(0,l.jsx)("span",{className:"mt-1 text-[10px]",children:"خطا در بارگذاری"})]}):(0,l.jsx)("img",{src:y,alt:x,className:"absolute h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",onLoad:()=>c(!1),onError:()=>{u(!0),c(!1)},onLoadStart:()=>c(!0)})]});case r.p.Video:return(0,l.jsxs)("div",{className:"relative h-full w-full",children:[(0,l.jsx)("video",{src:y,className:"h-full w-full object-contain",muted:!0,preload:"metadata",onLoadedData:()=>c(!1),onLoadStart:()=>c(!0)}),o&&(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30",children:(0,l.jsx)(s.tK,{size:"small",className:"[&_.ant-spin-dot-item]:bg-white"})}),(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/0 transition-colors group-hover:bg-black/25",children:(0,l.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-white/90 shadow-lg opacity-0 transition-opacity group-hover:opacity-100 dark:bg-slate-800/90",children:(0,l.jsx)("i",{className:"fas fa-play ml-0.5 text-xl text-gray-800 dark:text-gray-200"})})})]});case r.p.Audio:return(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center px-4",children:[(0,l.jsx)("div",{className:"mb-3 flex h-14 w-14 items-center justify-center rounded-full bg-gradient-to-br from-[#00D5A7]/20 to-[#00D5A7]/5 dark:from-[#00D5A7]/30 dark:to-[#00D5A7]/10",children:(0,l.jsx)("i",{className:"fas fa-music text-2xl text-[#00D5A7]"})}),p?(0,l.jsx)("span",{className:"mt-1 text-[9px] text-gray-400 dark:text-gray-500",children:"صدا"}):(0,l.jsx)("audio",{controls:!0,className:"mt-2 h-8 w-full max-w-[200px]",children:(0,l.jsx)("source",{src:y})})]});case r.p.Document:default:let e,a;return(0,l.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center",children:(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(e=f.split(".").pop()?.toLowerCase()||"",a=p?"text-3xl":"text-5xl",["pdf"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-pdf ${a} text-red-500 dark:text-red-400`}):["doc","docx"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-word ${a} text-blue-600 dark:text-blue-400`}):["xls","xlsx","csv"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-excel ${a} text-green-600 dark:text-green-400`}):["ppt","pptx"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-powerpoint ${a} text-orange-500 dark:text-orange-400`}):["zip","rar","7z","tar","gz"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-archive ${a} text-yellow-600 dark:text-yellow-400`}):["jpg","jpeg","png","gif","webp","svg","avif","bmp"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-image ${a} text-purple-500 dark:text-purple-400`}):["mp4","mov","avi","mkv","webm"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-video ${a} text-pink-500 dark:text-pink-400`}):["mp3","wav","ogg","aac","flac","m4a"].includes(e)?(0,l.jsx)("i",{className:`fas fa-file-audio ${a} text-cyan-500 dark:text-cyan-400`}):(0,l.jsx)("i",{className:`fas fa-file ${a} text-gray-400 dark:text-gray-500`})),!p&&(0,l.jsx)("span",{className:"mt-2 max-w-full truncate px-3 text-center text-[11px] text-gray-500 dark:text-gray-400",children:x})]})})}})(),!p&&h!==r.p.Image&&(0,l.jsx)("div",{className:"absolute bottom-2 right-2",children:(0,l.jsx)("div",{className:"rounded-md bg-white/90 px-1.5 py-0.5 shadow-sm dark:bg-slate-800/90",children:(0,l.jsxs)("span",{className:"text-[9px] font-medium uppercase text-gray-500 dark:text-gray-400",children:[h===r.p.Video&&"ویدئو",h===r.p.Audio&&"صدا",h===r.p.Document&&"سند"]})})})]})}}}]);

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.